From 46c9314f43d2f947755e8239eb62f18892da19df Mon Sep 17 00:00:00 2001 From: Shahed Nasser Date: Mon, 10 Mar 2025 13:55:51 +0200 Subject: [PATCH] add integrations sidebar --- www/apps/resources/app/integrations/page.mdx | 34 +++- .../generated-integrations-sidebar.mjs | 147 ++++++++++++++++ .../generated/generated-resources-sidebar.mjs | 132 -------------- www/apps/resources/sidebar.mjs | 6 +- www/apps/resources/sidebars/integrations.mjs | 164 +++++++++--------- .../resources/utils/get-sidebar-for-path.ts | 7 + 6 files changed, 273 insertions(+), 217 deletions(-) create mode 100644 www/apps/resources/generated/generated-integrations-sidebar.mjs diff --git a/www/apps/resources/app/integrations/page.mdx b/www/apps/resources/app/integrations/page.mdx index aa4cedafc5..da4bf9bfaf 100644 --- a/www/apps/resources/app/integrations/page.mdx +++ b/www/apps/resources/app/integrations/page.mdx @@ -40,7 +40,7 @@ Learn how to integrate a custom third-party authentication provider in [this gui ## CMS -Integrate third-party CMS to utilize rich content-related features. +Integrate a third-party Content-Management System (CMS) to utilize rich content-related features. + +To learn about the general approach of integrating an ERP with Medusa and the different use cases you can implement, refer to the [ERP Recipe](../recipes/erp/page.mdx). + + + + + +--- + ## File A File Module Provider uploads and manages assets, such as product images, on a third-party service. @@ -87,7 +113,7 @@ A Fulfillment Module Provider provides fulfillment options during checkout, calc title: "ShipStation", badge: { variant: "blue", - children: "Guide" + children: "Tutorial" } } ]} @@ -113,7 +139,7 @@ A Notification Module Provider sends messages to users and customers in your Med title: "Resend", badge: { variant: "blue", - children: "Guide" + children: "Tutorial" } } ]} diff --git a/www/apps/resources/generated/generated-integrations-sidebar.mjs b/www/apps/resources/generated/generated-integrations-sidebar.mjs new file mode 100644 index 0000000000..01580cfbb5 --- /dev/null +++ b/www/apps/resources/generated/generated-integrations-sidebar.mjs @@ -0,0 +1,147 @@ +const generatedgeneratedIntegrationsSidebarSidebar = { + "sidebar_id": "integrations", + "title": "Integrations", + "items": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/integrations", + "title": "Overview", + "children": [] + }, + { + "type": "separator" + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Auth", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "path": "/commerce-modules/auth/auth-providers/google", + "title": "Google", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "path": "/commerce-modules/auth/auth-providers/github", + "title": "GitHub", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "CMS", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/integrations/guides/sanity", + "title": "Sanity", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "ERP", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "path": "/recipes/erp/odoo", + "title": "Odoo", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "File", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "path": "/architectural-modules/file/s3", + "title": "AWS", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Fulfillment", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/integrations/guides/shipstation", + "title": "ShipStation", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Notification", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/integrations/guides/resend", + "title": "Resend", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "path": "/architectural-modules/notification/sendgrid", + "title": "SendGrid", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Payment", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "path": "/commerce-modules/payment/payment-provider/stripe", + "title": "Stripe", + "children": [] + } + ] + } + ] +} + +export default generatedgeneratedIntegrationsSidebarSidebar \ No newline at end of file diff --git a/www/apps/resources/generated/generated-resources-sidebar.mjs b/www/apps/resources/generated/generated-resources-sidebar.mjs index 2d571eff8b..5e8605f9e6 100644 --- a/www/apps/resources/generated/generated-resources-sidebar.mjs +++ b/www/apps/resources/generated/generated-resources-sidebar.mjs @@ -17144,138 +17144,6 @@ const generatedgeneratedResourcesSidebarSidebar = { } ] }, - { - "loaded": true, - "isPathHref": true, - "type": "sidebar", - "sidebar_id": "integrations", - "title": "Integrations", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/integrations", - "title": "Overview", - "children": [] - }, - { - "type": "separator" - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Auth", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/auth/auth-providers/google", - "title": "Google", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/auth/auth-providers/github", - "title": "GitHub", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "CMS", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/integrations/guides/sanity", - "title": "Sanity", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "File", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/architectural-modules/file/s3", - "title": "AWS", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Fulfillment", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/integrations/guides/shipstation", - "title": "ShipStation", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Notification", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/architectural-modules/notification/sendgrid", - "title": "SendGrid", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/integrations/guides/resend", - "title": "Resend", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Payment", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/payment/payment-provider/stripe", - "title": "Stripe", - "children": [] - } - ] - } - ] - }, { "loaded": true, "isPathHref": true, diff --git a/www/apps/resources/sidebar.mjs b/www/apps/resources/sidebar.mjs index 687ee2c266..b02ecaa43c 100644 --- a/www/apps/resources/sidebar.mjs +++ b/www/apps/resources/sidebar.mjs @@ -70,7 +70,6 @@ export const sidebar = [ ], }, ...architecturalModulesSidebar, - ...integrationsSidebar, ...pluginsSidebar, ...storefrontGuidesSidebar, { @@ -130,4 +129,9 @@ export const sidebar = [ title: "How-To & Tutorials", items: howToTutorialsSidebar, }, + { + sidebar_id: "integrations", + title: "Integrations", + items: integrationsSidebar, + }, ] diff --git a/www/apps/resources/sidebars/integrations.mjs b/www/apps/resources/sidebars/integrations.mjs index c22ed1f7cb..237791158b 100644 --- a/www/apps/resources/sidebars/integrations.mjs +++ b/www/apps/resources/sidebars/integrations.mjs @@ -1,93 +1,97 @@ /** @type {import('types').Sidebar.SidebarItem[]} */ export const integrationsSidebar = [ { - type: "sidebar", - sidebar_id: "integrations", - title: "Integrations", + type: "link", + path: "/integrations", + title: "Overview", + }, + { + type: "separator", + }, + { + type: "category", + title: "Auth", + children: [ + { + type: "ref", + path: "/commerce-modules/auth/auth-providers/google", + title: "Google", + }, + { + type: "ref", + path: "/commerce-modules/auth/auth-providers/github", + title: "GitHub", + }, + ], + }, + { + type: "category", + title: "CMS", children: [ { type: "link", - path: "/integrations", - title: "Overview", + path: "/integrations/guides/sanity", + title: "Sanity", + }, + ], + }, + { + type: "category", + title: "ERP", + children: [ + { + type: "ref", + path: "/recipes/erp/odoo", + title: "Odoo", + }, + ], + }, + { + type: "category", + title: "File", + children: [ + { + type: "ref", + path: "/architectural-modules/file/s3", + title: "AWS", + }, + ], + }, + { + type: "category", + title: "Fulfillment", + children: [ + { + type: "link", + path: "/integrations/guides/shipstation", + title: "ShipStation", + }, + ], + }, + { + type: "category", + title: "Notification", + children: [ + { + type: "link", + path: "/integrations/guides/resend", + title: "Resend", }, { - type: "separator", + type: "ref", + path: "/architectural-modules/notification/sendgrid", + title: "SendGrid", }, + ], + }, + { + type: "category", + title: "Payment", + children: [ { - type: "category", - title: "Auth", - children: [ - { - type: "link", - path: "/commerce-modules/auth/auth-providers/google", - title: "Google", - }, - { - type: "link", - path: "/commerce-modules/auth/auth-providers/github", - title: "GitHub", - }, - ], - }, - { - type: "category", - title: "CMS", - children: [ - { - type: "link", - path: "/integrations/guides/sanity", - title: "Sanity", - }, - ], - }, - { - type: "category", - title: "File", - children: [ - { - type: "link", - path: "/architectural-modules/file/s3", - title: "AWS", - }, - ], - }, - { - type: "category", - title: "Fulfillment", - children: [ - { - type: "link", - path: "/integrations/guides/shipstation", - title: "ShipStation", - }, - ], - }, - { - type: "category", - title: "Notification", - children: [ - { - type: "link", - path: "/architectural-modules/notification/sendgrid", - title: "SendGrid", - }, - { - type: "link", - path: "/integrations/guides/resend", - title: "Resend", - }, - ], - }, - { - type: "category", - title: "Payment", - children: [ - { - type: "link", - path: "/commerce-modules/payment/payment-provider/stripe", - title: "Stripe", - }, - ], + type: "ref", + path: "/commerce-modules/payment/payment-provider/stripe", + title: "Stripe", }, ], }, diff --git a/www/apps/resources/utils/get-sidebar-for-path.ts b/www/apps/resources/utils/get-sidebar-for-path.ts index 2b90f42c24..8b841192fb 100644 --- a/www/apps/resources/utils/get-sidebar-for-path.ts +++ b/www/apps/resources/utils/get-sidebar-for-path.ts @@ -29,6 +29,13 @@ const sidebarMappings: { "/deployment", ], }, + { + module: async () => + import("@/generated/generated-integrations-sidebar.mjs") as Promise<{ + default: Sidebar.Sidebar + }>, + paths: ["/integrations"], + }, ] export async function getSidebarForPath( currentPath: string