diff --git a/www/apps/book/app/cheatsheet/page.mdx b/www/apps/book/app/more-resources/cheatsheet/page.mdx similarity index 100% rename from www/apps/book/app/cheatsheet/page.mdx rename to www/apps/book/app/more-resources/cheatsheet/page.mdx diff --git a/www/apps/book/app/more-resources/examples/page.mdx b/www/apps/book/app/more-resources/examples/page.mdx new file mode 100644 index 0000000000..84b211d801 --- /dev/null +++ b/www/apps/book/app/more-resources/examples/page.mdx @@ -0,0 +1,119 @@ +export const metadata = { + title: `${pageNumber} Examples`, +} + +# {metadata.title} + +This chapter provides links to example sections on different Medusa topics. + +## API Routes + +- [Execute a workflow in an API route](../../basics/workflows/page.mdx#3-execute-the-workflow) +- [Extend an existing API route](../../customization/extend-models/extend-create-product/page.mdx) +- [Override an existing API route](!resources!/recipes/subscriptions/examples/standard#step-6-override-complete-cart-api-route) +- [Restrict HTTP Methods in a middleware](../../advanced-development/api-routes/middlewares/page.mdx#restrict-http-methods) +- [Change response content to something other than JSON](../../advanced-development/api-routes/responses/page.mdx#change-response-content-type) +- [Retrieve logged-in customer's details](../../advanced-development/api-routes/protected-routes/page.mdx#retrieve-logged-in-customers-details) +- [Retrieve logged-in user's details](../../advanced-development/api-routes/protected-routes/page.mdx#retrieve-logged-in-admin-users-details) +- [Custom error handler](../../advanced-development/api-routes/errors/page.mdx#override-error-handler) +- [Using Query in an API route](../../advanced-development/modules/query/page.mdx#query-example) +- [Upload files in a custom API route](!resources!/recipes/digital-products/examples/standard#step-7-upload-digital-product-media-api-route) +- [Customize cart-completion API route](!resources!/recipes/digital-products/examples/standard#step-11-customize-cart-completion) + +--- + +## Modules + +- [Create a Brand Module](../../customization/custom-features/module/page.mdx) +- [Create a Marketplace Module](!resources!/recipes/marketplace/examples/vendors#step-1-create-marketplace-module) +- [Create a Restaurant Module](!resources!/recipes/marketplace/examples/restaurant-delivery#step-1-create-a-restaurant-module) +- [Create a Delivery Module](!resources!/recipes/marketplace/examples/restaurant-delivery#step-2-create-a-delivery-module) +- [Create a Subscription Module](!resources!/recipes/subscriptions/examples/standard#step-1-create-subscription-module) +- [Create a Digital Product Module](!resources!/recipes/digital-products/examples/standard#step-1-create-the-digital-product-module) +- [Create a link between a brand and a product](../../customization/extend-models/create-links/page.mdx) + +--- + +## Services + +- [Override a method generated by the service factory](!resources!/recipes/subscriptions/examples/standard#step-4-override-createsubscriptions-method-in-service) +- [Integrate a third-party system](../../customization/integrate-systems/service/page.mdx) + +--- + +## Subscribers + +- [Execute a workflow in a subscriber](../../basics/workflows/page.mdx#3-execute-the-workflow) +- [Handle a custom event](../../customization/integrate-systems/handle-event/page.mdx) + +--- + +## Scheduled Jobs + +- [Execute a workflow in a scheduled job](../../basics/workflows/page.mdx#3-execute-the-workflow) +- [Schedule a task to sync data to third-party system](../../customization/integrate-systems/schedule-task/page.mdx) + +--- + +## Workflows + +- [Create a brand workflow](../../customization/custom-features/workflow/page.mdx) +- [Emit event in a workflow](../../customization/integrate-systems/handle-event/page.mdx#1-emit-custom-event-for-brand-creation) +- [Sync data to a third-party system with a workflow](../../customization/integrate-systems/schedule-task/page.mdx#1-implement-syncing-workflow) +- [Create a long-running workflow to handle delivery from placed to completed](!resources!/recipes/marketplace/examples/restaurant-delivery#step-11-handle-delivery-workflow) +- [Access long-running workflow's status and result in an API route](../../advanced-development/workflows/long-running-workflow/page.mdx#access-long-running-workflow-status-and-result) + +--- + +## Admin Customizations + +- [Send a request to custom API routes from widgets or UI routes](../../customization/customize-admin/widget/page.mdx) +- [Create a Settings Page](../../advanced-development/admin/ui-routes/page.mdx#create-settings-page) +- [Link to another page in the admin dashboard](../../advanced-development/admin/tips/page.mdx#routing-functionalities) +- [Show table with pagination](!resources!/recipes/digital-products/examples/standard#step-8-add-digital-products-ui-route-in-admin) + +--- + +## Testing + +- [Writing integration tests for API routes](../../debugging-and-testing/testing-tools/integration-tests/api-routes/page.mdx) +- [Writing integration tests for workflows](../../debugging-and-testing/testing-tools/integration-tests/workflows/page.mdx) +- [Writing integration tests for modules](../../debugging-and-testing/testing-tools/modules-tests/module-example/page.mdx) + +--- + +## Storefront Development + +- [Storefront development guides](!resources!/storefront-development) + +--- + +## Commerce Modules + +### Auth + +- [Create a custom actor type](!resources!/commerce-modules/auth/create-actor-type) + +### Cart + +- [Retrieve tax lines of a cart](!resources!/commerce-modules/cart/tax-lines#retrieving-tax-lines) +- [Retrieve promotion actions of a cart](!resources!/commerce-modules/cart/promotions#promotion-actions) + +### Fulfillment + +- [Create a fulfillment module provider](!resources!/recipes/digital-products/examples/standard#step-10-create-digital-product-fulfillment-module-provider) + +### Order + +- [Retrieve promotion actions of an order](!resources!/commerce-modules/order/promotion-adjustments#promotion-actions) + +### Product + +- [Retrieve prices of product variants](!resources!/commerce-modules/product/guides/price) +- [Retrieve product variant prices with taxes](!resources!/commerce-modules/product/guides/price-with-taxes) + +--- + +## Integrations + +- [Send a notification with SendGrid](!resources!/architectural-modules/notification/sendgrid#test-out-the-module) diff --git a/www/apps/book/generated/edit-dates.mjs b/www/apps/book/generated/edit-dates.mjs index 4c56d9715b..688a15069b 100644 --- a/www/apps/book/generated/edit-dates.mjs +++ b/www/apps/book/generated/edit-dates.mjs @@ -7,7 +7,6 @@ export const generatedEditDates = { "app/basics/commerce-modules/page.mdx": "2024-09-03T07:48:48.148Z", "app/advanced-development/workflows/retry-failed-steps/page.mdx": "2024-07-31T17:01:33+03:00", "app/advanced-development/workflows/workflow-hooks/page.mdx": "2024-09-10T11:39:51.168Z", - "app/cheatsheet/page.mdx": "2024-07-11T13:53:40+03:00", "app/debugging-and-testing/logging/page.mdx": "2024-07-04T17:26:03+03:00", "app/more-resources/page.mdx": "2024-07-04T17:26:03+03:00", "app/storefront-development/page.mdx": "2024-09-11T10:58:59.290Z", @@ -99,5 +98,7 @@ export const generatedEditDates = { "app/customization/integrate-systems/service/page.mdx": "2024-09-12T12:39:12.831Z", "app/customization/next-steps/page.mdx": "2024-09-12T10:50:04.873Z", "app/customization/page.mdx": "2024-09-12T11:16:18.504Z", - "app/debugging-and-testing/instrumentation/page.mdx": "2024-09-17T08:53:15.910Z" + "app/debugging-and-testing/instrumentation/page.mdx": "2024-09-17T08:53:15.910Z", + "app/more-resources/cheatsheet/page.mdx": "2024-07-11T16:11:26.480Z", + "app/more-resources/examples/page.mdx": "2024-09-19T10:30:30.398Z" } \ No newline at end of file diff --git a/www/apps/book/next.config.mjs b/www/apps/book/next.config.mjs index 61feec7f79..c65a9e5087 100644 --- a/www/apps/book/next.config.mjs +++ b/www/apps/book/next.config.mjs @@ -134,6 +134,11 @@ const nextConfig = { destination: "/advanced-development/modules/query", permanent: true, }, + { + source: "/cheatsheet", + destination: "/more-resources/cheatsheet", + permanent: true, + }, ] }, } diff --git a/www/apps/book/sidebar.mjs b/www/apps/book/sidebar.mjs index aee7a77243..c0c1a504ad 100644 --- a/www/apps/book/sidebar.mjs +++ b/www/apps/book/sidebar.mjs @@ -545,11 +545,18 @@ export const sidebar = numberSidebarItems( type: "link", path: "/more-resources", title: "More Resources", - }, - { - type: "link", - path: "/cheatsheet", - title: "Cheat Sheet", + children: [ + { + type: "link", + path: "/more-resources/cheatsheet", + title: "Cheat Sheet", + }, + { + type: "link", + path: "/more-resources/examples", + title: "Examples", + }, + ], }, ]) )