diff --git a/www/apps/resources/app/architectural-modules/file/s3/page.mdx b/www/apps/resources/app/architectural-modules/file/s3/page.mdx index 126c1e3472..5a425c47c6 100644 --- a/www/apps/resources/app/architectural-modules/file/s3/page.mdx +++ b/www/apps/resources/app/architectural-modules/file/s3/page.mdx @@ -376,7 +376,7 @@ module.exports = defineConfig({ ], }, }, - } + }, }) ``` --- diff --git a/www/apps/resources/app/architectural-modules/notification/sendgrid/page.mdx b/www/apps/resources/app/architectural-modules/notification/sendgrid/page.mdx index da8030f1f8..0c1b77a117 100644 --- a/www/apps/resources/app/architectural-modules/notification/sendgrid/page.mdx +++ b/www/apps/resources/app/architectural-modules/notification/sendgrid/page.mdx @@ -163,7 +163,7 @@ export default async function productCreateHandler({ attachments: [ // optional var { content: base64, - content_type: MIME type, + content_type: "image/png", // mime type filename: filename.ext, disposition: "attachment or inline attachment", id: "id", // only needed for inline attachment diff --git a/www/apps/resources/app/commerce-modules/product/guides/price-with-taxes/page.mdx b/www/apps/resources/app/commerce-modules/product/guides/price-with-taxes/page.mdx index 5dd86ab925..7d9298ad5c 100644 --- a/www/apps/resources/app/commerce-modules/product/guides/price-with-taxes/page.mdx +++ b/www/apps/resources/app/commerce-modules/product/guides/price-with-taxes/page.mdx @@ -20,7 +20,7 @@ You'll need the following resources for the taxes calculation: ```ts // other imports... import { - ModuleRegistrationName + ModuleRegistrationName, } from "@medusajs/utils" // In an API route, workflow step, etc... @@ -48,19 +48,19 @@ const query = remoteQueryObjectFromString({ fields: [ "*", "variants.*", - "variants.calculated_price.*" + "variants.calculated_price.*", ], variables: { filters: { - id + id, }, "variants.calculated_price": { context: { region_id, currency_code, - } - } - } + }, + }, + }, }) const products = await remoteQuery(query) @@ -82,7 +82,7 @@ To retrieve the tax line of each product, first, add the following utility metho // other imports... import { HttpTypes, - TaxableItemDTO + TaxableItemDTO, } from "@medusajs/types" // ... @@ -118,7 +118,7 @@ Then, use it when retrieving the tax lines of the products retrieved earlier: ```ts // other imports... import { - ItemTaxLineDTO + ItemTaxLineDTO, } from "@medusajs/types" // ... @@ -128,7 +128,7 @@ const taxLines = (await taxModuleService.getTaxLines( // example of context properties. You can pass other ones. address: { country_code, - } + }, } )) as unknown as ItemTaxLineDTO[] ``` @@ -181,7 +181,7 @@ export const calculateTaxHighlights = [ ```ts highlights={calculateTaxHighlights} // other imports... import { - calculateAmountsWithTax + calculateAmountsWithTax, } from "@medusajs/utils" // ... diff --git a/www/apps/resources/app/medusa-cli/commands/db/page.mdx b/www/apps/resources/app/medusa-cli/commands/db/page.mdx new file mode 100644 index 0000000000..e6ad4c82ef --- /dev/null +++ b/www/apps/resources/app/medusa-cli/commands/db/page.mdx @@ -0,0 +1,468 @@ +--- +sidebar_label: "db" +sidebar_position: 5 +--- + +import { Table } from "docs-ui" + +export const metadata = { + title: `db Commands - Medusa CLI Reference`, +} + +# {metadata.title} + +Commands starting with `db:` perform actions on the database. + +## db\:setup + +Creates a database for the Medusa application with the specified name, if it doesn't exit. Then, it runs migrations and syncs links. + +It also updates your `.env` file with the database name. + +```bash +npx medusa db:setup --db +``` + + + +Use this command if you're setting up a Medusa project or database manually. + + + +### Options + + + + + Option + Description + Required + Default + + + + + + + `--db ` + + + + + The database name. + + + + + Yes + + + + + \- + + + + + + + `--skip-links` + + + + + Skip syncing links to the database. + + + + + No + + + + + Links are synced by default. + + + + + + + `--execute-safe-links` + + + + + Skip prompts when syncing links and execute only safe actions. + + + + + No + + + + + Prompts are shown for unsafe actions, by default. + + + + + + + `--execute-all-links` + + + + + Skip prompts when syncing links and execute all (including unsafe) actions. + + + + + No + + + + + Prompts are shown for unsafe actions, by default. + + + + + + + `--no-interactive` + + + + + Disable the command's prompts. + + + + + No + + + + + \- + + + + +
+ +## db\:create + +Creates a database for the Medusa application with the specified name, if it doesn't exit. + +It also updates your `.env` file with the database name. + +```bash +npx medusa db:create --db +``` + + + +Use this command if you want to only create a database. + + + +## Options + + + + + Option + Description + Required + Default + + + + + + + `--db ` + + + + + The database name. + + + + + Yes + + + + + \- + + + + + + + `--no-interactive` + + + + + Disable the command's prompts. + + + + + No + + + + + \- + + + + +
+ +## db\:generate + +Generate a migration file for the latest changes in one or more modules. + +```bash +npx medusa db:generate +``` + +## Arguments + + + + + Argument + Description + Required + + + + + + + `module_names` + + + + + The name of one or more module (separated by spaces) to generate migrations for. For example, `helloModuleService`. + + + + + Yes + + + + +
+ +## db\:migrate + +Run the latest migrations to reflect changes on the database, and sync link definitions with the database. + +```bash +npx medusa db:migrate +``` + + + +Use this command if you've updated the Medusa packages, or you've created customizations and want to reflect them in the database. + + + +### Options + + + + + Option + Description + Required + Default + + + + + + + `--skip-links` + + + + + Skip syncing links to the database. + + + + + No + + + + + Links are synced by default. + + + + + + + `--execute-safe-links` + + + + + Skip prompts when syncing links and execute only safe actions. + + + + + No + + + + + Prompts are shown for unsafe actions, by default. + + + + + + + `--execute-all-links` + + + + + Skip prompts when syncing links and execute all (including unsafe) actions. + + + + + No + + + + + Prompts are shown for unsafe actions, by default. + + + + +
+ +## db\:rollback + +Revert the last migrations ran on one or more modules. + +```bash +npx medusa db:rollback +``` + + + + + Argument + Description + Required + + + + + + + `module_names` + + + + + The name of one or more module (separated by spaces) to rollback their migrations for. For example, `helloModuleService`. + + + + + Yes + + + + +
+ +## db\:sync-links + +Sync the database with the link definitions in your application, including the definitions in Medusa's modules. + +```bash +npx medusa db:sync-links +``` + +### Options + + + + + Option + Description + Required + Default + + + + + + + `--execute-safe` + + + + + Skip prompts when syncing links and execute only safe actions. + + + + + No + + + + + Prompts are shown for unsafe actions, by default. + + + + + + + `--execute-all` + + + + + Skip prompts when syncing links and execute all (including unsafe) actions. + + + + + No + + + + + Prompts are shown for unsafe actions, by default. + + + + +
diff --git a/www/apps/resources/app/medusa-cli/commands/develop/page.mdx b/www/apps/resources/app/medusa-cli/commands/develop/page.mdx new file mode 100644 index 0000000000..f03029dbfd --- /dev/null +++ b/www/apps/resources/app/medusa-cli/commands/develop/page.mdx @@ -0,0 +1,66 @@ +--- +sidebar_label: "develop" +sidebar_position: 2 +--- + +import { Table } from "docs-ui" + +export const metadata = { + title: `develop Command - Medusa CLI Reference`, +} + +# {metadata.title} + +Start Medusa application in development. This command watches files for any changes, then rebuilds the files and restarts the Medusa application. + +```bash +npx medusa develop +``` + +## Options + + + + + Option + Description + Default + + + + + + + `-H `, `--host ` + + + + + Set host of the Medusa server. + + + + + `localhost` + + + + + + + `-p `, `--port ` + + + + + Set port of the Medusa server. + + + + + `9000` + + + + +
\ No newline at end of file diff --git a/www/apps/resources/app/medusa-cli/commands/exec/page.mdx b/www/apps/resources/app/medusa-cli/commands/exec/page.mdx new file mode 100644 index 0000000000..e640962ef4 --- /dev/null +++ b/www/apps/resources/app/medusa-cli/commands/exec/page.mdx @@ -0,0 +1,66 @@ +--- +sidebar_label: "exec" +sidebar_position: 6 +--- + +import { Table } from "docs-ui" + +export const metadata = { + title: `exec Command - Medusa CLI Reference`, +} + +# {metadata.title} + +Run a custom CLI script. Learn more about it in [this guide](!docs!/advanced-development/custom-cli-scripts). + +```bash +npx medusa exec [file] [args...] +``` + +## Arguments + + + + + Argument + Description + Required + + + + + + + `file` + + + + + The path to the TypeScript or JavaScript file holding the function to execute. + + + + + Yes + + + + + + + `args` + + + + + A list of arguments to pass to the function. These arguments are passed in the `args` property of the function's object parameter. + + + + + No + + + + +
\ No newline at end of file diff --git a/www/apps/resources/app/medusa-cli/commands/new/page.mdx b/www/apps/resources/app/medusa-cli/commands/new/page.mdx new file mode 100644 index 0000000000..a3d7a8c9e4 --- /dev/null +++ b/www/apps/resources/app/medusa-cli/commands/new/page.mdx @@ -0,0 +1,198 @@ +--- +sidebar_label: "new" +sidebar_position: 1 +--- + +import { Table } from "docs-ui" + +export const metadata = { + title: `new Command - Medusa CLI Reference`, +} + +# {metadata.title} + +Create a new Medusa application. Unlike the `create-medusa-app` CLI tool, this command provides more flexibility for experienced Medusa developers in creating and configuring their project. + +```bash +medusa new [ []] +``` + +## Arguments + + + + + Argument + Description + Required + Default + + + + + + + `dir_name` + + + + + The name of the directory to create the Medusa application in. + + + + + Yes + + + + + \- + + + + + + + `starter_url` + + + + + The name of the directory to create the Medusa application in. + + + + + No + + + + + `https://github.com/medusajs/medusa-starter-default` + + + + +
+ +## Options + + + + + Option + Description + + + + + + + `-y`, `--useDefaults` + + + + + Skip all prompts, such as databaes prompts. A database might not be created if default PostgreSQL credentials don't work. + + + + + + + `--skip-db` + + + + + Skip database creation. + + + + + + + `--skip-env` + + + + + Skip populating `.env`. + + + + + + + `--db-user ` + + + + + The database user to use for database setup. + + + + + + + `--db-database ` + + + + + The name of the database used for database setup. + + + + + + + `--db-pass ` + + + + + The database password to use for database setup. + + + + + + + `--db-port ` + + + + + The database port to use for database setup. + + + + + + + `--db-host ` + + + + + The database host to use for database setup. + + + + + + + `--v2` + + + + + Installs Medusa v2, which is still not ready for production. + + + + +
\ No newline at end of file diff --git a/www/apps/resources/app/medusa-cli/commands/start-cluster/page.mdx b/www/apps/resources/app/medusa-cli/commands/start-cluster/page.mdx new file mode 100644 index 0000000000..8b4b49a313 --- /dev/null +++ b/www/apps/resources/app/medusa-cli/commands/start-cluster/page.mdx @@ -0,0 +1,85 @@ +--- +sidebar_label: "start-cluster" +sidebar_position: 7 +--- + +import { Table } from "docs-ui" + +export const metadata = { + title: `start-cluster Command - Medusa CLI Reference`, +} + +# {metadata.title} + +Starts the Medusa application in [cluster mode](https://expressjs.com/en/advanced/best-practice-performance.html#run-your-app-in-a-cluster). + +Running in cluster mode significantly improves performance as the workload and tasks are distributed among all available instances instead of a single one. + +```bash +npx medusa start-cluster +``` + +#### Options + + + + + Option + Description + Default + + + + + + + `-c `, `--cpus ` + + + + + The number of CPUs that Medusa can consume. + + + + + Medusa will try to consume all CPUs. + + + + + + + `-H `, `--host ` + + + + + Set host of the Medusa server. + + + + + `localhost` + + + + + + + `-p `, `--port ` + + + + + Set port of the Medusa server. + + + + + `9000` + + + + +
diff --git a/www/apps/resources/app/medusa-cli/commands/start/page.mdx b/www/apps/resources/app/medusa-cli/commands/start/page.mdx new file mode 100644 index 0000000000..633fa1004d --- /dev/null +++ b/www/apps/resources/app/medusa-cli/commands/start/page.mdx @@ -0,0 +1,66 @@ +--- +sidebar_label: "start" +sidebar_position: 3 +--- + +import { Table } from "docs-ui" + +export const metadata = { + title: `start Command - Medusa CLI Reference`, +} + +# {metadata.title} + +Start the Medusa application in production. + +```bash +npx medusa start +``` + +## Options + + + + + Option + Description + Default + + + + + + + `-H `, `--host ` + + + + + Set host of the Medusa server. + + + + + `localhost` + + + + + + + `-p `, `--port ` + + + + + Set port of the Medusa server. + + + + + `9000` + + + + +
\ No newline at end of file diff --git a/www/apps/resources/app/medusa-cli/commands/telemtry/page.mdx b/www/apps/resources/app/medusa-cli/commands/telemtry/page.mdx new file mode 100644 index 0000000000..5c41eb586f --- /dev/null +++ b/www/apps/resources/app/medusa-cli/commands/telemtry/page.mdx @@ -0,0 +1,55 @@ +--- +sidebar_label: "telemetry" +sidebar_position: 8 +--- + +import { Table } from "docs-ui" + +export const metadata = { + title: `telemetry Command - Medusa CLI Reference`, +} + +# {metadata.title} + +Enable or disable the collection of anonymous data usage. If no option is provided, the command enables the collection of anonymous data usage. + +```bash +npx medusa telemetry +``` + +#### Options + + + + + Option + Description + + + + + + + `--enable` + + + + + Enable telemetry (default). + + + + + + + `--disable` + + + + + Disable telemetry. + + + + +
diff --git a/www/apps/resources/app/medusa-cli/commands/user/page.mdx b/www/apps/resources/app/medusa-cli/commands/user/page.mdx new file mode 100644 index 0000000000..9d85235227 --- /dev/null +++ b/www/apps/resources/app/medusa-cli/commands/user/page.mdx @@ -0,0 +1,122 @@ +--- +sidebar_label: "user" +sidebar_position: 4 +--- + +import { Table } from "docs-ui" + +export const metadata = { + title: `user Command - Medusa CLI Reference`, +} + +# {metadata.title} + +Create a new admin user. + +```bash +npx medusa user --email [--password ] +``` + +## Options + + + + + Option + Description + Required + Default + + + + + + + `-e `, `--email ` + + + + + The user's email. + + + + + Yes + + + + + \- + + + + + + + `-p `, `--password ` + + + + + The user's password. + + + + + No + + + + + \- + + + + + + + `-i `, `--id ` + + + + + The user's ID. + + + + + No + + + + + An automatically generated ID. + + + + + + + `--invite` + + + + + Whether to create an invite instead of a user. When using this option, you don't need to specify a password. + If ran successfully, you'll receive the invite token in the output. + + + + + No + + + + + `false` + + + + +
\ No newline at end of file diff --git a/www/apps/resources/app/medusa-cli/page.mdx b/www/apps/resources/app/medusa-cli/page.mdx index 2660007317..1718e7093e 100644 --- a/www/apps/resources/app/medusa-cli/page.mdx +++ b/www/apps/resources/app/medusa-cli/page.mdx @@ -1,7 +1,7 @@ -import { Table, Prerequisites } from "docs-ui" +import { Table, Prerequisites, ChildDocs } from "docs-ui" export const metadata = { - title: `Medusa CLI Tool`, + title: `Medusa CLI Reference`, } # {metadata.title} @@ -35,711 +35,4 @@ npx medusa --help --- -## Commands - -### new - -Create a new Medusa application. Unlike the `create-medusa-app` CLI tool, this command provides more flexibility for experienced Medusa developers in creating and configuring their project. - -```bash -medusa new [ []] -``` - -#### Arguments - - - - - Argument - Description - Required - Default - - - - - - - `dir_name` - - - - - The name of the directory to create the Medusa application in. - - - - - Yes - - - - - \- - - - - - - - `starter_url` - - - - - The name of the directory to create the Medusa application in. - - - - - No - - - - - `https://github.com/medusajs/medusa-starter-default` - - - - -
- -#### Options - - - - - Option - Description - - - - - - - `-y`, `--useDefaults` - - - - - Skip all prompts, such as databaes prompts. A database might not be created if default PostgreSQL credentials don't work. - - - - - - - `--skip-db` - - - - - Skip database creation. - - - - - - - `--skip-env` - - - - - Skip populating `.env`. - - - - - - - `--db-user ` - - - - - The database user to use for database setup. - - - - - - - `--db-database ` - - - - - The name of the database used for database setup. - - - - - - - `--db-pass ` - - - - - The database password to use for database setup. - - - - - - - `--db-port ` - - - - - The database port to use for database setup. - - - - - - - `--db-host ` - - - - - The database host to use for database setup. - - - - - - - `--v2` - - - - - Installs Medusa v2, which is still not ready for production. - - - - -
- -### develop - -Start Medusa application in development. This command watches files for any changes, then rebuilds the files and restarts the Medusa application. - -```bash -npx medusa develop -``` - -#### Options - - - - - Option - Description - Default - - - - - - - `-H `, `--host ` - - - - - Set host of the Medusa server. - - - - - `localhost` - - - - - - - `-p `, `--port ` - - - - - Set port of the Medusa server. - - - - - `9000` - - - - -
- -### start - -Start the Medusa application in production. - -```bash -npx medusa start -``` - -#### Options - - - - - Option - Description - Default - - - - - - - `-H `, `--host ` - - - - - Set host of the Medusa server. - - - - - `localhost` - - - - - - - `-p `, `--port ` - - - - - Set port of the Medusa server. - - - - - `9000` - - - - -
- -### migrations run - -Run the latest migrations to reflect changes on the database. - -```bash -npx medusa migrations run -``` - -### migrations revert - -Revert the last migrations ran on one or more modules. - -```bash -npx medusa migrations revert -``` - -#### Arguments - - - - - Argument - Description - Required - - - - - - - `module_names` - - - - - The name of one or more module (separated by spaces) to rever their migrations. For example, `helloModuleService`. - - - - - Yes - - - - -
- -### migrations generate - -Generate a migration file for the latest changes in one or more modules. - -```bash -npx medusa migrations generate -``` - -#### Arguments - - - - - Argument - Description - Required - - - - - - - `module_names` - - - - - The name of one or more module (separated by spaces) to generate migrations for. For example, `helloModuleService`. - - - - - Yes - - - - -
- -### links - -Manage module links in the database. - -```bash -npx medusa links -``` - -#### Actions - -The `links` command receive an action name as an argument. - - - - - Name - Description - - - - - - - `sync` - - - - - Add, update, or delete links based on the definitions in the `src/links` directory of your project. - - - - -
- -### user - -Create a new admin user. - -```bash -npx medusa user --email [--password ] -``` - -#### Options - - - - - Option - Description - Required - Default - - - - - - - `-e `, `--email ` - - - - - The user's email. - - - - - Yes - - - - - \- - - - - - - - `-p `, `--password ` - - - - - The user's password. - - - - - No - - - - - \- - - - - - - - `-i `, `--id ` - - - - - The user's ID. - - - - - No - - - - - An automatically generated ID. - - - - - - - `--invite` - - - - - Whether to create an invite instead of a user. When using this option, you don't need to specify a password. - If ran successfully, you'll receive the invite token in the output. - - - - - No - - - - - `false` - - - - -
- -### exec - -Run a custom CLI script. Learn more about it in [this guide](!docs!/advanced-development/custom-cli-scripts). - -```bash -npx medusa exec [file] [args...] -``` - -#### Arguments - - - - - Argument - Description - Required - - - - - - - `file` - - - - - The path to the TypeScript or JavaScript file holding the function to execute. - - - - - Yes - - - - - - - `args` - - - - - A list of arguments to pass to the function. These arguments are passed in the `args` property of the function's object parameter. - - - - - No - - - - -
- -### start-cluster - -Starts the Medusa application in [cluster mode](https://expressjs.com/en/advanced/best-practice-performance.html#run-your-app-in-a-cluster). Running in cluster mode significantly improves performance as the workload and tasks are distributed among all available instances instead of a single one. - -```bash -npx medusa start-cluster -``` - -#### Options - - - - - Option - Description - Default - - - - - - - `-c `, `--cpus ` - - - - - The number of CPUs that Medusa can consume. - - - - - Medusa will try to consume all CPUs. - - - - - - - `-H `, `--host ` - - - - - Set host of the Medusa server. - - - - - `localhost` - - - - - - - `-p `, `--port ` - - - - - Set port of the Medusa server. - - - - - `9000` - - - - -
- -### telemetry - -Enable or disable the collection of anonymous data usage. If no option is provided, the command enables the collection of anonymous data usage. - -```bash -npx medusa telemetry -``` - -#### Options - - - - - Option - Description - - - - - - - `--enable` - - - - - Enable telemetry (default). - - - - - - - `--disable` - - - - - Disable telemetry. - - - - -
\ No newline at end of file + \ No newline at end of file diff --git a/www/apps/resources/app/recipes/digital-products/examples/standard/page.mdx b/www/apps/resources/app/recipes/digital-products/examples/standard/page.mdx index c3368c69e9..bf7486c439 100644 --- a/www/apps/resources/app/recipes/digital-products/examples/standard/page.mdx +++ b/www/apps/resources/app/recipes/digital-products/examples/standard/page.mdx @@ -527,7 +527,7 @@ export const createDpWorkflowHighlights = [ import { createWorkflow, transform, - WorkflowResponse + WorkflowResponse, } from "@medusajs/workflows-sdk" import { CreateProductWorkflowInputDTO, @@ -1515,8 +1515,8 @@ Finally, register the module provider in `medusa-config.js`: ```js title="medusa-config.js" // other imports... import { - Modules -} from '@medusajs/utils' + Modules, +} from "@medusajs/utils" module.exports = defineConfig({ modules: { @@ -1531,12 +1531,12 @@ module.exports = defineConfig({ }, { resolve: "./modules/digital-product-fulfillment", - id: "digital" - } + id: "digital", + }, ], }, }, - } + }, }) ``` @@ -1671,14 +1671,14 @@ import { createWorkflow, transform, when, - WorkflowResponse + WorkflowResponse, } from "@medusajs/workflows-sdk" import { completeCartWorkflow, useRemoteQueryStep, createRemoteLinkStep, createOrderFulfillmentWorkflow, - emitEventStep + emitEventStep, } from "@medusajs/core-flows" import { Modules } from "@medusajs/utils" import createDigitalProductOrderStep from "./steps/create-digital-product-order" @@ -1693,8 +1693,8 @@ const createDigitalProductOrderWorkflow = createWorkflow( (input: WorkflowInput) => { const order = completeCartWorkflow.runAsStep({ input: { - id: input.cart_id - } + id: input.cart_id, + }, }) const { items } = useRemoteQueryStep({ @@ -1703,19 +1703,19 @@ const createDigitalProductOrderWorkflow = createWorkflow( "*", "items.*", "items.variant.*", - "items.variant.digital_product.*" + "items.variant.digital_product.*", ], variables: { filters: { - id: order.id - } + id: order.id, + }, }, throw_if_key_not_found: true, - list: false + list: false, }) const itemsWithDigitalProducts = transform({ - items + items, }, (data) => { return data.items.filter((item) => item.variant.digital_product !== undefined) @@ -1732,32 +1732,32 @@ const createDigitalProductOrderWorkflow = createWorkflow( createRemoteLinkStep([{ [DIGITAL_PRODUCT_MODULE]: { - digital_product_order_id: digital_product_order.id + digital_product_order_id: digital_product_order.id, }, [Modules.ORDER]: { - order_id: order.id - } + order_id: order.id, + }, }]) createOrderFulfillmentWorkflow.runAsStep({ input: { order_id: order.id, items: transform({ - itemsWithDigitalProducts + itemsWithDigitalProducts, }, (data) => { return data.itemsWithDigitalProducts.map((item) => ({ id: item.id, - quantity: item.quantity + quantity: item.quantity, })) - }) - } + }), + }, }) emitEventStep({ eventName: "digital_product_order.created", data: { - id: digital_product_order.id - } + id: digital_product_order.id, + }, }) return digital_product_order @@ -1765,7 +1765,7 @@ const createDigitalProductOrderWorkflow = createWorkflow( return new WorkflowResponse({ order, - digital_product_order + digital_product_order, }) } ) @@ -1846,11 +1846,11 @@ import type { } from "@medusajs/medusa" import { INotificationModuleService, - IFileModuleService + IFileModuleService, } from "@medusajs/types" import { ModuleRegistrationName, - remoteQueryObjectFromString + remoteQueryObjectFromString, } from "@medusajs/utils" import { MediaType } from "../modules/digital-product/types" @@ -1871,13 +1871,13 @@ async function digitalProductOrderCreatedHandler({ "*", "products.*", "products.medias.*", - "order.*" + "order.*", ], variables: { filters: { - id: data.id - } - } + id: data.id, + }, + }, }) const digitalProductOrder = (await remoteQuery(query))[0] @@ -1920,7 +1920,7 @@ const notificationData = await Promise.all( return { name: product.name, - medias + medias, } }) ) @@ -1930,8 +1930,8 @@ await notificationModuleService.createNotifications({ template: "digital-order-template", channel: "email", data: { - products: notificationData - } + products: notificationData, + }, }) ``` diff --git a/www/apps/resources/app/recipes/subscriptions/examples/standard/page.mdx b/www/apps/resources/app/recipes/subscriptions/examples/standard/page.mdx index 6cd9c3a7f6..bc079a1709 100644 --- a/www/apps/resources/app/recipes/subscriptions/examples/standard/page.mdx +++ b/www/apps/resources/app/recipes/subscriptions/examples/standard/page.mdx @@ -590,7 +590,7 @@ export const createSubscriptionWorkflowHighlights = [ ```ts title="src/workflows/create-subscription/index.ts" highlights={createSubscriptionWorkflowHighlights} collapsibleLines="1-13" expandMoreLabel="Show Imports" import { createWorkflow, - WorkflowResponse + WorkflowResponse, } from "@medusajs/workflows-sdk" import { createRemoteLinkStep, @@ -1765,7 +1765,7 @@ export const createSubscriptionOrderWorkflowHighlights = [ ```ts title="src/workflows/create-subscription-order/index.ts" highlights={createSubscriptionOrderWorkflowHighlights} collapsibleLines="1-25" expandMoreLabel="Show Imports" import { createWorkflow, - WorkflowResponse + WorkflowResponse, } from "@medusajs/workflows-sdk" import { useRemoteQueryStep, diff --git a/www/apps/resources/generated/edit-dates.mjs b/www/apps/resources/generated/edit-dates.mjs index 1cec20a409..ede397f650 100644 --- a/www/apps/resources/generated/edit-dates.mjs +++ b/www/apps/resources/generated/edit-dates.mjs @@ -135,7 +135,7 @@ export const generatedEditDates = { "app/deployment/storefront/vercel/page.mdx": "2024-07-26T07:21:31+00:00", "app/deployment/page.mdx": "2024-07-25T09:55:22+03:00", "app/integrations/page.mdx": "2024-07-19T08:49:08+00:00", - "app/medusa-cli/page.mdx": "2024-08-05T11:10:55+03:00", + "app/medusa-cli/page.mdx": "2024-08-28T11:25:32.382Z", "app/medusa-container-resources/page.mdx": "2024-08-05T07:24:27+00:00", "app/medusa-workflows-reference/page.mdx": "2024-08-15T12:13:13+03:00", "app/nextjs-starter/page.mdx": "2024-07-01T10:21:19+03:00", @@ -561,5 +561,13 @@ export const generatedEditDates = { "references/types/interfaces/types.BaseReturn/page.mdx": "2024-08-28T00:11:05.678Z", "references/types/types.DmlTypes/page.mdx": "2024-08-28T00:11:04.914Z", "references/types/types.ModulesSdkTypes/page.mdx": "2024-08-28T00:11:05.834Z", - "references/types/types/types.FlowRunOptions/page.mdx": "2024-08-28T00:11:06.110Z" + "references/types/types/types.FlowRunOptions/page.mdx": "2024-08-28T00:11:06.110Z", + "app/medusa-cli/commands/db/page.mdx": "2024-08-28T11:26:33.889Z", + "app/medusa-cli/commands/develop/page.mdx": "2024-08-28T10:43:45.452Z", + "app/medusa-cli/commands/exec/page.mdx": "2024-08-28T10:45:31.229Z", + "app/medusa-cli/commands/new/page.mdx": "2024-08-28T10:43:34.110Z", + "app/medusa-cli/commands/start-cluster/page.mdx": "2024-08-28T11:25:05.257Z", + "app/medusa-cli/commands/start/page.mdx": "2024-08-28T10:44:19.952Z", + "app/medusa-cli/commands/telemtry/page.mdx": "2024-08-28T11:25:08.553Z", + "app/medusa-cli/commands/user/page.mdx": "2024-08-28T10:44:52.489Z" } \ No newline at end of file diff --git a/www/apps/resources/generated/files-map.mjs b/www/apps/resources/generated/files-map.mjs index 39f0ef8bbf..205ec297d9 100644 --- a/www/apps/resources/generated/files-map.mjs +++ b/www/apps/resources/generated/files-map.mjs @@ -675,6 +675,38 @@ export const filesMap = [ "filePath": "/www/apps/resources/app/integrations/page.mdx", "pathname": "/integrations" }, + { + "filePath": "/www/apps/resources/app/medusa-cli/commands/db/page.mdx", + "pathname": "/medusa-cli/commands/db" + }, + { + "filePath": "/www/apps/resources/app/medusa-cli/commands/develop/page.mdx", + "pathname": "/medusa-cli/commands/develop" + }, + { + "filePath": "/www/apps/resources/app/medusa-cli/commands/exec/page.mdx", + "pathname": "/medusa-cli/commands/exec" + }, + { + "filePath": "/www/apps/resources/app/medusa-cli/commands/new/page.mdx", + "pathname": "/medusa-cli/commands/new" + }, + { + "filePath": "/www/apps/resources/app/medusa-cli/commands/start/page.mdx", + "pathname": "/medusa-cli/commands/start" + }, + { + "filePath": "/www/apps/resources/app/medusa-cli/commands/start-cluster/page.mdx", + "pathname": "/medusa-cli/commands/start-cluster" + }, + { + "filePath": "/www/apps/resources/app/medusa-cli/commands/telemtry/page.mdx", + "pathname": "/medusa-cli/commands/telemtry" + }, + { + "filePath": "/www/apps/resources/app/medusa-cli/commands/user/page.mdx", + "pathname": "/medusa-cli/commands/user" + }, { "filePath": "/www/apps/resources/app/medusa-cli/page.mdx", "pathname": "/medusa-cli" diff --git a/www/apps/resources/generated/sidebar.mjs b/www/apps/resources/generated/sidebar.mjs index 830aea3cca..5cb57ebce2 100644 --- a/www/apps/resources/generated/sidebar.mjs +++ b/www/apps/resources/generated/sidebar.mjs @@ -7629,7 +7629,94 @@ export const generatedSidebar = [ "type": "link", "path": "/medusa-cli", "title": "Medusa CLI", - "children": [] + "isChildSidebar": true, + "childSidebarTitle": "Medusa CLI Reference", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/medusa-cli", + "title": "Overview", + "children": [] + }, + { + "type": "separator" + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Commands", + "autogenerate_path": "medusa-cli/commands", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/medusa-cli/commands/new", + "title": "new", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/medusa-cli/commands/develop", + "title": "develop", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/medusa-cli/commands/start", + "title": "start", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/medusa-cli/commands/user", + "title": "user", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/medusa-cli/commands/db", + "title": "db", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/medusa-cli/commands/exec", + "title": "exec", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/medusa-cli/commands/start-cluster", + "title": "start-cluster", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/medusa-cli/commands/telemtry", + "title": "telemetry", + "children": [] + } + ] + } + ] }, { "loaded": true, diff --git a/www/apps/resources/sidebar.mjs b/www/apps/resources/sidebar.mjs index b4a576be45..91743ab1b5 100644 --- a/www/apps/resources/sidebar.mjs +++ b/www/apps/resources/sidebar.mjs @@ -1660,6 +1660,23 @@ export const sidebar = sidebarAttachHrefCommonOptions([ type: "link", path: "/medusa-cli", title: "Medusa CLI", + isChildSidebar: true, + childSidebarTitle: "Medusa CLI Reference", + children: [ + { + type: "link", + path: "/medusa-cli", + title: "Overview", + }, + { + type: "separator", + }, + { + type: "category", + title: "Commands", + autogenerate_path: "medusa-cli/commands", + }, + ], }, { type: "link",