From d9fcf8a621d319fcc9ad09edbaac25dc69ebfed7 Mon Sep 17 00:00:00 2001 From: Shahed Nasser Date: Wed, 23 Apr 2025 12:47:46 +0300 Subject: [PATCH] docs: fix reference of draft orders JS SDK methods (#12271) * docs: fix reference of draft orders JS SDK methods * generate --- www/apps/book/public/llms-full.txt | 30820 ++++++++-------- .../js_sdk.admin.Admin.draftOrder/page.mdx | 79 +- .../js_sdk.admin.DraftOrder.addItems/page.mdx | 4 +- .../page.mdx | 4 +- .../page.mdx | 4 +- .../page.mdx | 4 +- .../page.mdx | 4 +- .../page.mdx | 4 +- .../page.mdx | 4 +- .../js_sdk.admin.DraftOrder.create/page.mdx | 2 +- .../page.mdx | 4 +- .../page.mdx | 4 +- .../page.mdx | 4 +- .../page.mdx | 19 +- .../page.mdx | 4 +- .../js_sdk.admin.DraftOrder.update/page.mdx | 2 +- .../page.mdx | 4 +- .../page.mdx | 4 +- .../page.mdx | 2 +- .../page.mdx | 2 +- .../generated/typedoc-json-output/js-sdk.json | 13672 +++---- 21 files changed, 22438 insertions(+), 22212 deletions(-) diff --git a/www/apps/book/public/llms-full.txt b/www/apps/book/public/llms-full.txt index 567cafd72a..20447894b6 100644 --- a/www/apps/book/public/llms-full.txt +++ b/www/apps/book/public/llms-full.txt @@ -330,28 +330,6 @@ Refer to [this documentation](https://docs.medusajs.com/learn/update/index.html. In the next chapters, you'll learn about the architecture of your Medusa application, then learn how to customize your application to build custom features. -# Storefront Development - -The Medusa application is made up of a Node.js server and an admin dashboard. Storefronts are installed, built, and hosted separately from the Medusa application, giving you the flexibility to choose the frontend tech stack that you and your team are proficient in, and implement unique design systems and user experience. - -You can build your storefront from scratch with your preferred tech stack, or start with our Next.js Starter storefront. The Next.js Starter storefront provides rich commerce features and a sleek design. Developers and businesses can use it as-is or build on top of it to tailor it for the business's unique use case, design, and customer experience. - -- [Install Next.js Starter Storefront](https://docs.medusajs.com/resources/nextjs-starter/index.html.md) -- [Build Custom Storefront](https://docs.medusajs.com/resources/storefront-development/index.html.md) - -*** - -## Passing a Publishable API Key in Storefront Requests - -When sending a request to an API route starting with `/store`, you must include a publishable API key in the header of your request. - -A publishable API key sets the scope of your request to one or more sales channels. - -Then, when you retrieve products, only products of those sales channels are retrieved. This also ensures you retrieve correct inventory data, and associate created orders with the scoped sales channel. - -Learn more about passing the publishable API key in [this storefront development guide](https://docs.medusajs.com/resources/storefront-development/publishable-api-keys/index.html.md). - - # Updating Medusa In this chapter, you'll learn about updating your Medusa application and packages. @@ -458,6 +436,28 @@ npm install ``` +# Storefront Development + +The Medusa application is made up of a Node.js server and an admin dashboard. Storefronts are installed, built, and hosted separately from the Medusa application, giving you the flexibility to choose the frontend tech stack that you and your team are proficient in, and implement unique design systems and user experience. + +You can build your storefront from scratch with your preferred tech stack, or start with our Next.js Starter storefront. The Next.js Starter storefront provides rich commerce features and a sleek design. Developers and businesses can use it as-is or build on top of it to tailor it for the business's unique use case, design, and customer experience. + +- [Install Next.js Starter Storefront](https://docs.medusajs.com/resources/nextjs-starter/index.html.md) +- [Build Custom Storefront](https://docs.medusajs.com/resources/storefront-development/index.html.md) + +*** + +## Passing a Publishable API Key in Storefront Requests + +When sending a request to an API route starting with `/store`, you must include a publishable API key in the header of your request. + +A publishable API key sets the scope of your request to one or more sales channels. + +Then, when you retrieve products, only products of those sales channels are retrieved. This also ensures you retrieve correct inventory data, and associate created orders with the scoped sales channel. + +Learn more about passing the publishable API key in [this storefront development guide](https://docs.medusajs.com/resources/storefront-development/publishable-api-keys/index.html.md). + + # Medusa Application Configuration In this chapter, you'll learn available configurations in the Medusa application. You can change the application's configurations to customize the behavior of the application, its integrated modules and plugins, and more. @@ -1405,350 +1405,88 @@ import { BrandModuleService } from "@/modules/brand/service" ``` -# Configure Instrumentation +# Build Custom Features -In this chapter, you'll learn about observability in Medusa and how to configure instrumentation with OpenTelemetry. +In the upcoming chapters, you'll follow step-by-step guides to build custom features in Medusa. These guides gradually introduce Medusa's concepts to help you understand what they are and how to use them. -## Observability with OpenTelemtry +By following these guides, you'll add brands to the Medusa application that you can associate with products. -Medusa uses [OpenTelemetry](https://opentelemetry.io/) for instrumentation and reporting. When configured, it reports traces for: +To build a custom feature in Medusa, you need three main tools: -- HTTP requests -- Workflow executions -- Query usages -- Database queries and operations +- [Module](https://docs.medusajs.com/learn/fundamentals/modules/index.html.md): a package with commerce logic for a single domain. It defines new tables to add to the database, and a class of methods to manage these tables. +- [Workflow](https://docs.medusajs.com/learn/fundamentals/workflows/index.html.md): a tool to perform an operation comprising multiple steps with built-in rollback and retry mechanisms. +- [API route](https://docs.medusajs.com/learn/fundamentals/api-routes/index.html.md): a REST endpoint that exposes commerce features to clients, such as the admin dashboard or a storefront. The API route executes a workflow that implements the commerce feature using modules. + +![Diagram showcasing the flow of a custom developed feature](https://res.cloudinary.com/dza7lstvk/image/upload/v1725867628/Medusa%20Book/custom-development_nofvp6.jpg) *** -## How to Configure Instrumentation in Medusa? +## Next Chapters: Brand Module Example -### Prerequisites +The next chapters will guide you to: -- [An exporter to visualize your application's traces, such as Zipkin.](https://zipkin.io/pages/quickstart.html) +1. Build a Brand Module that creates a `Brand` data model and provides data-management features. +2. Add a workflow to create a brand. +3. Expose an API route that allows admin users to create a brand using the workflow. -### Install Dependencies -Start by installing the following OpenTelemetry dependencies in your Medusa project: +# Customize Medusa Admin Dashboard -```bash npm2yarn -npm install @opentelemetry/sdk-node @opentelemetry/resources @opentelemetry/sdk-trace-node @opentelemetry/instrumentation-pg -``` +In the previous chapters, you've customized your Medusa application to [add brands](https://docs.medusajs.com/learn/customization/custom-features/module/index.html.md), [expose an API route to create brands](https://docs.medusajs.com/learn/customization/custom-features/api-route/index.html.md), and [linked brands to products](https://docs.medusajs.com/learn/customization/extend-features/define-link/index.html.md). -Also, install the dependencies relevant for the exporter you use. If you're using Zipkin, install the following dependencies: +After customizing and extending your application with new features, you may need to provide an interface for admin users to utilize these features. The Medusa Admin dashboard is extendable, allowing you to: -```bash npm2yarn -npm install @opentelemetry/exporter-zipkin -``` +- Insert components, called [widgets](https://docs.medusajs.com/learn/fundamentals/admin/widgets/index.html.md), on existing pages. +- Add new pages, called [UI Routes](https://docs.medusajs.com/learn/fundamentals/admin/ui-routes/index.html.md). -### Add instrumentation.ts - -Next, create the file `instrumentation.ts` with the following content: - -```ts title="instrumentation.ts" -import { registerOtel } from "@medusajs/medusa" -import { ZipkinExporter } from "@opentelemetry/exporter-zipkin" - -// If using an exporter other than Zipkin, initialize it here. -const exporter = new ZipkinExporter({ - serviceName: "my-medusa-project", -}) - -export function register() { - registerOtel({ - serviceName: "medusajs", - // pass exporter - exporter, - instrument: { - http: true, - workflows: true, - query: true, - }, - }) -} -``` - -In the `instrumentation.ts` file, you export a `register` function that uses Medusa's `registerOtel` utility function. You also initialize an instance of the exporter, such as Zipkin, and pass it to the `registerOtel` function. - -`registerOtel` accepts an object where you can pass any [NodeSDKConfiguration](https://open-telemetry.github.io/opentelemetry-js/interfaces/_opentelemetry_sdk_node.NodeSDKConfiguration.html) property along with the following properties: - -The `NodeSDKConfiguration` properties are accepted since Medusa v2.5.1. - -- serviceName: (\`string\`) The name of the service traced. -- exporter: (\[SpanExporter]\(https://open-telemetry.github.io/opentelemetry-js/interfaces/\_opentelemetry\_sdk\_trace\_base.SpanExporter.html)) An instance of an exporter, such as Zipkin. -- instrument: (\`object\`) Options specifying what to trace. - - - http: (\`boolean\`) Whether to trace HTTP requests. - - - query: (\`boolean\`) Whether to trace Query usages. - - - workflows: (\`boolean\`) Whether to trace Workflow executions. - - - db: (\`boolean\`) Whether to trace database queries and operations. -- instrumentations: (\[Instrumentation\[]]\(https://open-telemetry.github.io/opentelemetry-js/interfaces/\_opentelemetry\_instrumentation.Instrumentation.html)) Additional instrumentation options that OpenTelemetry accepts. +From these customizations, you can send requests to custom API routes, allowing admin users to manage custom resources on the dashboard *** -## Test it Out +## Next Chapters: View Brands in Dashboard -To test it out, start your exporter, such as Zipkin. +In the next chapters, you'll continue with the brands example to: -Then, start your Medusa application: - -```bash npm2yarn -npm run dev -``` - -Try to open the Medusa Admin or send a request to an API route. - -If you check traces in your exporter, you'll find new traces reported. - -### Trace Span Names - -Trace span names start with the following keywords based on what it's reporting: - -- `{methodName} {URL}` when reporting HTTP requests, where `{methodName}` is the HTTP method, and `{URL}` is the URL the request is sent to. -- `route:` when reporting route handlers running on an HTTP request. -- `middleware:` when reporting a middleware running on an HTTP request. -- `workflow:` when reporting a workflow execution. -- `step:` when reporting a step in a workflow execution. -- `query.graph:` when reporting Query usages. -- `pg.query:` when reporting database queries and operations. +- Add a new section to the product details page that shows the product's brand. +- Add a new page in the dashboard that shows all brands in the store. -# Logging +# Extend Core Commerce Features -In this chapter, you’ll learn how to use Medusa’s logging utility. +In the upcoming chapters, you'll learn about the concepts and tools to extend Medusa's core commerce features. -## Logger Class +In other commerce platforms, you extend core features and models through hacky workarounds that can introduce unexpected issues and side effects across the platform. It also makes your application difficult to maintain and upgrade in the long run. -Medusa provides a `Logger` class with advanced logging functionalities. This includes configuring logging levels or saving logs to a file. +The Medusa Framework and orchestration tools mitigate these issues while supporting all your customization needs: -The Medusa application registers the `Logger` class in the Medusa container and each module's container as `logger`. +- [Module Links](https://docs.medusajs.com/learn/fundamentals/module-links/index.html.md): Link data models of different modules without building direct dependencies, ensuring that the Medusa application integrates your modules without side effects. +- [Workflow Hooks](https://docs.medusajs.com/learn/fundamentals/workflows/workflow-hooks/index.html.md): inject custom functionalities into a workflow at predefined points, called hooks. This allows you to perform custom actions as a part of a core workflow without hacky workarounds. +- [Additional Data in API Routes](https://docs.medusajs.com/learn/fundamentals/api-routes/additional-data/index.html.md): Configure core API routes to accept request parameters relevant to your customizations. These parameters are passed to the underlying workflow's hooks, where you can manage your custom data as part of an existing flow. *** -## How to Log a Message +## Next Chapters: Link Brands to Products Example -Resolve the `logger` using the Medusa container to log a message in your resource. +The next chapters explain how to use the tools mentioned above with step-by-step guides. You'll continue with the [brands example from the previous chapters](https://docs.medusajs.com/learn/customization/custom-features/index.html.md) to: -For example, create the file `src/jobs/log-message.ts` with the following content: +- Link brands from the custom [Brand Module](https://docs.medusajs.com/learn/customization/custom-features/module/index.html.md) to products from Medusa's [Product Module](https://docs.medusajs.com/resources/commerce-modules/product/index.html.md). +- Extend the core product-creation workflow and the API route that uses it to allow setting the brand of a newly created product. +- Retrieve a product's associated brand's details. -```ts title="src/jobs/log-message.ts" highlights={highlights} -import { MedusaContainer } from "@medusajs/framework/types" -import { ContainerRegistrationKeys } from "@medusajs/framework/utils" -export default async function myCustomJob( - container: MedusaContainer -) { - const logger = container.resolve(ContainerRegistrationKeys.LOGGER) +# Re-Use Customizations with Plugins - logger.info("I'm using the logger!") -} +In the previous chapters, you've learned important concepts related to creating modules, implementing commerce features in workflows, exposing those features in API routes, customizing the Medusa Admin dashboard with Admin Extensions, and integrating third-party systems. -export const config = { - name: "test-logger", - // execute every minute - schedule: "* * * * *", -} -``` +You've implemented the brands example within a single Medusa application. However, this approach is not scalable when you want to reuse your customizations across multiple projects. -This creates a scheduled job that resolves the `logger` from the Medusa container and uses it to log a message. +To reuse your customizations across multiple Medusa applications, such as implementing brands in different projects, you can create a plugin. A plugin is an NPM package that encapsulates your customizations and can be installed in any Medusa application. Plugins can include modules, workflows, API routes, Admin Extensions, and more. -### Test the Scheduled Job +![Diagram showcasing how the Brand Plugin would add its resources to any application it's installed in](https://res.cloudinary.com/dza7lstvk/image/upload/v1737540091/Medusa%20Book/brand-plugin_bk9zi9.jpg) -To test out the above scheduled job, start the Medusa application: +Medusa provides the tooling to create a plugin package, test it in a local Medusa application, and publish it to NPM. -```bash npm2yarn -npm run dev -``` - -After a minute, you'll see the following message as part of the logged messages: - -```text -info: I'm using the logger! -``` - -*** - -## Log Levels - -The `Logger` class has the following methods: - -- `info`: The message is logged with level `info`. -- `warn`: The message is logged with level `warn`. -- `error`: The message is logged with level `error`. -- `debug`: The message is logged with level `debug`. - -Each of these methods accepts a string parameter to log in the terminal with the associated level. - -*** - -## Logging Configurations - -### Log Level - -The available log levels, from lowest to highest levels, are: - -1. `silly` (default, meaning messages of all levels are logged) -2. `debug` -3. `info` -4. `warn` -5. `error` - -You can change that by setting the `LOG_LEVEL` environment variable to the minimum level you want to be logged. - -For example: - -```bash -LOG_LEVEL=error -``` - -This logs `error` messages only. - -The environment variable must be set as a system environment variable and not in `.env`. - -### Save Logs in a File - -Aside from showing the logs in the terminal, you can save the logs in a file by setting the `LOG_FILE` environment variable to the path of the file relative to the Medusa server’s root directory. - -For example: - -```bash -LOG_FILE=all.log -``` - -Your logs are now saved in the `all.log` file at the root of your Medusa application. - -The environment variable must be set as a system environment variable and not in `.env`. - -*** - -## Show Log with Progress - -The `Logger` class has an `activity` method used to log a message of level `info`. If the Medusa application is running in a development environment, a spinner starts to show the activity's progress. - -For example: - -```ts title="src/jobs/log-message.ts" -import { MedusaContainer } from "@medusajs/framework/types" -import { ContainerRegistrationKeys } from "@medusajs/framework/utils" - -export default async function myCustomJob( - container: MedusaContainer -) { - const logger = container.resolve(ContainerRegistrationKeys.LOGGER) - - const activityId = logger.activity("First log message") - - logger.progress(activityId, `Second log message`) - - logger.success(activityId, "Last log message") -} -``` - -The `activity` method returns the ID of the started activity. This ID can then be passed to one of the following methods of the `Logger` class: - -- `progress`: Log a message of level `info` that indicates progress within that same activity. -- `success`: Log a message of level `info` that indicates that the activity has succeeded. This also ends the associated activity. -- `failure`: Log a message of level `error` that indicates that the activity has failed. This also ends the associated activity. - -If you configured the `LOG_LEVEL` environment variable to a level higher than those associated with the above methods, their messages won’t be logged. - - -# Medusa Testing Tools - -In this chapter, you'll learn about Medusa's testing tools and how to install and configure them. - -## @medusajs/test-utils Package - -Medusa provides a Testing Framework to create integration tests for your custom API routes, modules, or other Medusa customizations. - -To use the Testing Framework, install `@medusajs/test-utils` as a `devDependency`: - -```bash npm2yarn -npm install --save-dev @medusajs/test-utils@latest -``` - -*** - -## Install and Configure Jest - -Writing tests with `@medusajs/test-utils`'s tools requires installing and configuring Jest in your project. - -Run the following command to install the required Jest dependencies: - -```bash npm2yarn -npm install --save-dev jest @types/jest @swc/jest -``` - -Then, create the file `jest.config.js` with the following content: - -```js title="jest.config.js" -const { loadEnv } = require("@medusajs/framework/utils") -loadEnv("test", process.cwd()) - -module.exports = { - transform: { - "^.+\\.[jt]s$": [ - "@swc/jest", - { - jsc: { - parser: { syntax: "typescript", decorators: true }, - }, - }, - ], - }, - testEnvironment: "node", - moduleFileExtensions: ["js", "ts", "json"], - modulePathIgnorePatterns: ["dist/"], - setupFiles: ["./integration-tests/setup.js"], -} - -if (process.env.TEST_TYPE === "integration:http") { - module.exports.testMatch = ["**/integration-tests/http/*.spec.[jt]s"] -} else if (process.env.TEST_TYPE === "integration:modules") { - module.exports.testMatch = ["**/src/modules/*/__tests__/**/*.[jt]s"] -} else if (process.env.TEST_TYPE === "unit") { - module.exports.testMatch = ["**/src/**/__tests__/**/*.unit.spec.[jt]s"] -} -``` - -Next, create the `integration-tests/setup.js` file with the following content: - -```js title="integration-tests/setup.js" -const { MetadataStorage } = require("@mikro-orm/core") - -MetadataStorage.clear() -``` - -*** - -## Add Test Commands - -Finally, add the following scripts to `package.json`: - -```json title="package.json" -"scripts": { - // ... - "test:integration:http": "TEST_TYPE=integration:http NODE_OPTIONS=--experimental-vm-modules jest --silent=false --runInBand --forceExit", - "test:integration:modules": "TEST_TYPE=integration:modules NODE_OPTIONS=--experimental-vm-modules jest --silent --runInBand --forceExit", - "test:unit": "TEST_TYPE=unit NODE_OPTIONS=--experimental-vm-modules jest --silent --runInBand --forceExit" -}, -``` - -You now have two commands: - -- `test:integration:http` to run integration tests (for example, for API routes and workflows) available under the `integration-tests/http` directory. -- `test:integration:modules` to run integration tests for modules available in any `__tests__` directory under `src/modules`. -- `test:unit` to run unit tests in any `__tests__` directory under the `src` directory. - -Medusa's Testing Framework works for integration tests only. You can write unit tests using Jest. - -*** - -## Test Tools and Writing Tests - -The next chapters explain how to use the testing tools provided by `@medusajs/test-utils` to write tests. +To learn more about plugins and how to create them, refer to [this chapter](https://docs.medusajs.com/learn/fundamentals/plugins/index.html.md). # General Medusa Application Deployment Guide @@ -2059,113 +1797,6 @@ Replace the email `admin-medusa@test.com` and password `supersecret` with the cr You can use these credentials to log into the Medusa Admin dashboard. -# Build Custom Features - -In the upcoming chapters, you'll follow step-by-step guides to build custom features in Medusa. These guides gradually introduce Medusa's concepts to help you understand what they are and how to use them. - -By following these guides, you'll add brands to the Medusa application that you can associate with products. - -To build a custom feature in Medusa, you need three main tools: - -- [Module](https://docs.medusajs.com/learn/fundamentals/modules/index.html.md): a package with commerce logic for a single domain. It defines new tables to add to the database, and a class of methods to manage these tables. -- [Workflow](https://docs.medusajs.com/learn/fundamentals/workflows/index.html.md): a tool to perform an operation comprising multiple steps with built-in rollback and retry mechanisms. -- [API route](https://docs.medusajs.com/learn/fundamentals/api-routes/index.html.md): a REST endpoint that exposes commerce features to clients, such as the admin dashboard or a storefront. The API route executes a workflow that implements the commerce feature using modules. - -![Diagram showcasing the flow of a custom developed feature](https://res.cloudinary.com/dza7lstvk/image/upload/v1725867628/Medusa%20Book/custom-development_nofvp6.jpg) - -*** - -## Next Chapters: Brand Module Example - -The next chapters will guide you to: - -1. Build a Brand Module that creates a `Brand` data model and provides data-management features. -2. Add a workflow to create a brand. -3. Expose an API route that allows admin users to create a brand using the workflow. - - -# Customize Medusa Admin Dashboard - -In the previous chapters, you've customized your Medusa application to [add brands](https://docs.medusajs.com/learn/customization/custom-features/module/index.html.md), [expose an API route to create brands](https://docs.medusajs.com/learn/customization/custom-features/api-route/index.html.md), and [linked brands to products](https://docs.medusajs.com/learn/customization/extend-features/define-link/index.html.md). - -After customizing and extending your application with new features, you may need to provide an interface for admin users to utilize these features. The Medusa Admin dashboard is extendable, allowing you to: - -- Insert components, called [widgets](https://docs.medusajs.com/learn/fundamentals/admin/widgets/index.html.md), on existing pages. -- Add new pages, called [UI Routes](https://docs.medusajs.com/learn/fundamentals/admin/ui-routes/index.html.md). - -From these customizations, you can send requests to custom API routes, allowing admin users to manage custom resources on the dashboard - -*** - -## Next Chapters: View Brands in Dashboard - -In the next chapters, you'll continue with the brands example to: - -- Add a new section to the product details page that shows the product's brand. -- Add a new page in the dashboard that shows all brands in the store. - - -# Extend Core Commerce Features - -In the upcoming chapters, you'll learn about the concepts and tools to extend Medusa's core commerce features. - -In other commerce platforms, you extend core features and models through hacky workarounds that can introduce unexpected issues and side effects across the platform. It also makes your application difficult to maintain and upgrade in the long run. - -The Medusa Framework and orchestration tools mitigate these issues while supporting all your customization needs: - -- [Module Links](https://docs.medusajs.com/learn/fundamentals/module-links/index.html.md): Link data models of different modules without building direct dependencies, ensuring that the Medusa application integrates your modules without side effects. -- [Workflow Hooks](https://docs.medusajs.com/learn/fundamentals/workflows/workflow-hooks/index.html.md): inject custom functionalities into a workflow at predefined points, called hooks. This allows you to perform custom actions as a part of a core workflow without hacky workarounds. -- [Additional Data in API Routes](https://docs.medusajs.com/learn/fundamentals/api-routes/additional-data/index.html.md): Configure core API routes to accept request parameters relevant to your customizations. These parameters are passed to the underlying workflow's hooks, where you can manage your custom data as part of an existing flow. - -*** - -## Next Chapters: Link Brands to Products Example - -The next chapters explain how to use the tools mentioned above with step-by-step guides. You'll continue with the [brands example from the previous chapters](https://docs.medusajs.com/learn/customization/custom-features/index.html.md) to: - -- Link brands from the custom [Brand Module](https://docs.medusajs.com/learn/customization/custom-features/module/index.html.md) to products from Medusa's [Product Module](https://docs.medusajs.com/resources/commerce-modules/product/index.html.md). -- Extend the core product-creation workflow and the API route that uses it to allow setting the brand of a newly created product. -- Retrieve a product's associated brand's details. - - -# Integrate Third-Party Systems - -Commerce applications often connect to third-party systems that provide additional or specialized features. For example, you may integrate a Content-Management System (CMS) for rich content features, a payment provider to process credit-card payments, and a notification service to send emails. - -The Medusa Framework facilitates integrating these systems and orchestrating operations across them, saving you the effort of managing them yourself. You won't find those capabilities in other commerce platforms that in these scenarios become a bottleneck to building customizations and iterating quickly. - -In Medusa, you integrate a third-party system by: - -1. Creating a module whose service provides the methods to connect to and perform operations in the third-party system. -2. Building workflows that complete tasks spanning across systems. You use the module that integrates a third-party system in the workflow's steps. -3. Executing the workflows you built in an [API route](https://docs.medusajs.com/learn/fundamentals/api-routes/index.html.md), at a scheduled time, or when an event is emitted. - -*** - -## Next Chapters: Sync Brands Example - -In the previous chapters, you've [added brands](https://docs.medusajs.com/learn/customization/custom-features/module/index.html.md) to your Medusa application. In the next chapters, you will: - -1. Integrate a dummy third-party CMS in the Brand Module. -2. Sync brands to the CMS when a brand is created. -3. Sync brands from the CMS at a daily schedule. - - -# Re-Use Customizations with Plugins - -In the previous chapters, you've learned important concepts related to creating modules, implementing commerce features in workflows, exposing those features in API routes, customizing the Medusa Admin dashboard with Admin Extensions, and integrating third-party systems. - -You've implemented the brands example within a single Medusa application. However, this approach is not scalable when you want to reuse your customizations across multiple projects. - -To reuse your customizations across multiple Medusa applications, such as implementing brands in different projects, you can create a plugin. A plugin is an NPM package that encapsulates your customizations and can be installed in any Medusa application. Plugins can include modules, workflows, API routes, Admin Extensions, and more. - -![Diagram showcasing how the Brand Plugin would add its resources to any application it's installed in](https://res.cloudinary.com/dza7lstvk/image/upload/v1737540091/Medusa%20Book/brand-plugin_bk9zi9.jpg) - -Medusa provides the tooling to create a plugin package, test it in a local Medusa application, and publish it to NPM. - -To learn more about plugins and how to create them, refer to [this chapter](https://docs.medusajs.com/learn/fundamentals/plugins/index.html.md). - - # Customizations Next Steps: Learn the Fundamentals The previous guides introduced Medusa's different concepts and how you can use them to customize Medusa for a realistic use case, You added brands to your application, linked them to products, customized the admin dashboard, and integrated a third-party CMS. @@ -2261,50 +1892,27 @@ The following diagram illustrates Medusa's architecture including all its layers ![Full diagram illustrating Medusa's architecture combining all the different layers.](https://res.cloudinary.com/dza7lstvk/image/upload/v1727174897/Medusa%20Book/architectural-diagram-full.jpg) -# Admin Development +# Integrate Third-Party Systems -In this chapter, you'll learn about th Medusa Admin dashboard and the possible ways to customize it. +Commerce applications often connect to third-party systems that provide additional or specialized features. For example, you may integrate a Content-Management System (CMS) for rich content features, a payment provider to process credit-card payments, and a notification service to send emails. -## What is the Medusa Admin? +The Medusa Framework facilitates integrating these systems and orchestrating operations across them, saving you the effort of managing them yourself. You won't find those capabilities in other commerce platforms that in these scenarios become a bottleneck to building customizations and iterating quickly. -The Medusa Admin is an intuitive dashboard that allows merchants to manage their ecommerce store. It provides management featuers related to products, orders, customers, and more. +In Medusa, you integrate a third-party system by: -To explore more what you can do with the Medusa Admin, check out the [User Guide](https://docs.medusajs.com/user-guide/index.html.md). These user guides are designed for merchants and provide the steps to perform any task within the Medusa Admin. - -The Medusa Admin is built with [Vite](https://vite.dev/). When you [install the Medusa application](https://docs.medusajs.com/learn/installation/index.html.md), you also install the Medusa Admin. Then, when you start the Medusa application, you can access the Medusa Admin at `http://localhost:9000/app`. - -If you don't have an admin user, use the [Medusa CLI](https://docs.medusajs.com/resources/medusa-cli/commands/user/index.html.md) to create one. +1. Creating a module whose service provides the methods to connect to and perform operations in the third-party system. +2. Building workflows that complete tasks spanning across systems. You use the module that integrates a third-party system in the workflow's steps. +3. Executing the workflows you built in an [API route](https://docs.medusajs.com/learn/fundamentals/api-routes/index.html.md), at a scheduled time, or when an event is emitted. *** -## How to Customize the Medusa Admin? +## Next Chapters: Sync Brands Example -You can customize the Medusa Admin dashboard by: +In the previous chapters, you've [added brands](https://docs.medusajs.com/learn/customization/custom-features/module/index.html.md) to your Medusa application. In the next chapters, you will: -- Adding new sections to existing pages using [Widgets](https://docs.medusajs.com/learn/fundamentals/admin/widgets/index.html.md). -- Adding new pages using [UI Routes](https://docs.medusajs.com/learn/fundamentals/admin/ui-routes/index.html.md). - -The next chapters will cover these two topics in detail. - -### What You Can't Customize in the Medusa Admin - -You can't customize the admin dashboard's layout, design, or the content of the existing pages (aside from injecting widgets). - -If your use case requires heavy customization of the admin dashboard, you can build a custom admin dashboard using Medusa's [Admin API routes](https://docs.medusajs.com/api/admin). - -*** - -## Medusa UI Package - -Medusa provides a Medusa UI package to facilitate your admin development through ready-made components and ensure a consistent design between your customizations and the dashboard’s design. - -Refer to the [Medusa UI documentation](https://docs.medusajs.com/ui/index.html.md) to learn how to install it and use its components. - -*** - -## Admin Components List - -To build admin customizations that match the Medusa Admin's designs and layouts, refer to [this guide](https://docs.medusajs.com/resources/admin-components/index.html.md) to find common components. +1. Integrate a dummy third-party CMS in the Brand Module. +2. Sync brands to the CMS when a brand is created. +3. Sync brands from the CMS at a daily schedule. # Custom CLI Scripts @@ -2377,6 +1985,156 @@ npx medusa exec ./src/scripts/my-script.ts arg1 arg2 ``` +# Admin Development + +In this chapter, you'll learn about th Medusa Admin dashboard and the possible ways to customize it. + +## What is the Medusa Admin? + +The Medusa Admin is an intuitive dashboard that allows merchants to manage their ecommerce store. It provides management featuers related to products, orders, customers, and more. + +To explore more what you can do with the Medusa Admin, check out the [User Guide](https://docs.medusajs.com/user-guide/index.html.md). These user guides are designed for merchants and provide the steps to perform any task within the Medusa Admin. + +The Medusa Admin is built with [Vite](https://vite.dev/). When you [install the Medusa application](https://docs.medusajs.com/learn/installation/index.html.md), you also install the Medusa Admin. Then, when you start the Medusa application, you can access the Medusa Admin at `http://localhost:9000/app`. + +If you don't have an admin user, use the [Medusa CLI](https://docs.medusajs.com/resources/medusa-cli/commands/user/index.html.md) to create one. + +*** + +## How to Customize the Medusa Admin? + +You can customize the Medusa Admin dashboard by: + +- Adding new sections to existing pages using [Widgets](https://docs.medusajs.com/learn/fundamentals/admin/widgets/index.html.md). +- Adding new pages using [UI Routes](https://docs.medusajs.com/learn/fundamentals/admin/ui-routes/index.html.md). + +The next chapters will cover these two topics in detail. + +### What You Can't Customize in the Medusa Admin + +You can't customize the admin dashboard's layout, design, or the content of the existing pages (aside from injecting widgets). + +If your use case requires heavy customization of the admin dashboard, you can build a custom admin dashboard using Medusa's [Admin API routes](https://docs.medusajs.com/api/admin). + +*** + +## Medusa UI Package + +Medusa provides a Medusa UI package to facilitate your admin development through ready-made components and ensure a consistent design between your customizations and the dashboard’s design. + +Refer to the [Medusa UI documentation](https://docs.medusajs.com/ui/index.html.md) to learn how to install it and use its components. + +*** + +## Admin Components List + +To build admin customizations that match the Medusa Admin's designs and layouts, refer to [this guide](https://docs.medusajs.com/resources/admin-components/index.html.md) to find common components. + + +# Data Models + +In this chapter, you'll learn what a data model is and how to create a data model. + +## What is a Data Model? + +A data model represents a table in the database. You create data models using Medusa's data modeling language (DML). It simplifies defining a table's columns, relations, and indexes with straightforward methods and configurations. + +You create a data model in a [module](https://docs.medusajs.com/learn/fundamentals/modules/index.html.md). The module's service provides the methods to store and manage those data models. Then, you can resolve the module's service in other customizations, such as a [workflow](https://docs.medusajs.com/learn/fundamentals/workflows/index.html.md), to manage the data models' records. + +*** + +## How to Create a Data Model + +In a module, you can create a data model in a TypeScript or JavaScript file under the module's `models` directory. + +So, for example, assuming you have a Blog Module at `src/modules/blog`, you can create a `Post` data model by creating the `src/modules/blog/models/post.ts` file with the following content: + +![Updated directory overview after adding the data model](https://res.cloudinary.com/dza7lstvk/image/upload/v1732806790/Medusa%20Book/blog-dir-overview-1_jfvovj.jpg) + +```ts title="src/modules/blog/models/post.ts" +import { model } from "@medusajs/framework/utils" + +const Post = model.define("post", { + id: model.id().primaryKey(), + title: model.text(), +}) + +export default Post +``` + +You define the data model using the `define` method of the DML. It accepts two parameters: + +1. The first one is the name of the data model's table in the database. Use snake-case names. +2. The second is an object, which is the data model's schema. The schema's properties are defined using the `model`'s methods, such as `text` and `id`. + - Data models automatically have the date properties `created_at`, `updated_at`, and `deleted_at`, so you don't need to add them manually. + +The code snippet above defines a `Post` data model with `id` and `title` properties. + +*** + +## Generate Migrations + +After you create a data model in a module, then [register that module in your Medusa configurations](https://docs.medusajs.com/learn/fundamentals/modules#4-add-module-to-medusas-configurations/index.html.md), you must generate a migration to create the data model's table in the database. + +A migration is a TypeScript or JavaScript file that defines database changes made by a module. Migrations are useful when you re-use a module or you're working in a team, so that when one member of a team makes a database change, everyone else can reflect it on their side by running the migrations. + +For example, to generate a migration for the Blog Module, run the following command in your Medusa application's directory: + +If you're creating the module in a plugin, use the [plugin:db:generate command](https://docs.medusajs.com/resources/medusa-cli/commands/plugin#plugindbgenerate/index.html.md) instead. + +```bash +npx medusa db:generate blog +``` + +The `db:generate` command of the Medusa CLI accepts one or more module names to generate the migration for. It will create a migration file for the Blog Module in the directory `src/modules/blog/migrations` similar to the following: + +```ts +import { Migration } from "@mikro-orm/migrations" + +export class Migration20241121103722 extends Migration { + + async up(): Promise { + this.addSql("create table if not exists \"post\" (\"id\" text not null, \"title\" text not null, \"created_at\" timestamptz not null default now(), \"updated_at\" timestamptz not null default now(), \"deleted_at\" timestamptz null, constraint \"post_pkey\" primary key (\"id\"));") + } + + async down(): Promise { + this.addSql("drop table if exists \"post\" cascade;") + } + +} +``` + +In the migration class, the `up` method creates the table `post` and defines its columns using PostgreSQL syntax. The `down` method drops the table. + +### Run Migrations + +To reflect the changes in the generated migration file on the database, run the `db:migrate` command: + +If you're creating the module in a plugin, run this command on the Medusa application that the plugin is installed in. + +```bash +npx medusa db:migrate +``` + +This creates the `post` table in the database. + +### Migrations on Data Model Changes + +Whenever you make a change to a data model, you must generate and run the migrations. + +For example, if you add a new column to the `Post` data model, you must generate a new migration and run it. + +*** + +## Manage Data Models + +Your module's service should extend the [service factory](https://docs.medusajs.com/learn/fundamentals/modules/service-factory/index.html.md), which generates data-management methods for your module's data models. + +For example, the Blog Module's service would have methods like `retrievePost` and `createPosts`. + +Refer to the [Service Factory](https://docs.medusajs.com/learn/fundamentals/modules/service-factory/index.html.md) chapter to learn more about how to extend the service factory and manage data models, and refer to the [Service Factory Reference](https://docs.medusajs.com/resources/service-factory-reference/index.html.md) for the full list of generated methods and how to use them. + + # API Routes In this chapter, you’ll learn what API Routes are and how to create them. @@ -3387,260 +3145,6 @@ To learn more about the different concepts useful for building plugins, check ou - [Plugins](https://docs.medusajs.com/learn/fundamentals/plugins/index.html.md) -# Medusa Container - -In this chapter, you’ll learn about the Medusa container and how to use it. - -## What is the Medusa Container? - -The Medusa container is a registry of Framework and commerce tools that's accessible across your application. Medusa automatically registers these tools in the container, including custom ones that you've built, so that you can use them in your customizations. - -In other platforms, if you have a resource A (for example, a class) that depends on a resource B, you have to manually add resource B to the container or specify it beforehand as A's dependency, which is often done in a file separate from A's code. This becomes difficult to manage as you maintain larger applications with many changing dependencies. - -Medusa simplifies this process by giving you access to the container, with the tools or resources already registered, at all times in your customizations. When you reach a point in your code where you need a tool, you resolve it from the container and use it. - -For example, consider you're creating an API route that retrieves products based on filters using [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query/index.html.md), a tool that fetches data across the application. In the API route's function, you can resolve Query from the container passed to the API route and use it: - -```ts highlights={highlights} -import { MedusaRequest, MedusaResponse } from "@medusajs/framework" -import { ContainerRegistrationKeys } from "@medusajs/framework/utils" - -export async function GET( - req: MedusaRequest, - res: MedusaResponse -) { - const query = req.scope.resolve("query") - - const { data: products } = await query.graph({ - entity: "product", - fields: ["*"], - filters: { - id: "prod_123", - }, - }) - - res.json({ - products, - }) -} -``` - -The API route accepts as a first parameter a request object that has a `scope` property, which is the Medusa container. It has a `resolve` method that resolves a resource from the container by the key it's registered with. - -You can learn more about how Query works in [this chapter](https://docs.medusajs.com/learn/fundamentals/module-links/query/index.html.md). - -*** - -## List of Resources Registered in the Medusa Container - -Find a full list of the registered resources and their registration key in [this reference](https://docs.medusajs.com/resources/medusa-container-resources/index.html.md) - -*** - -## How to Resolve From the Medusa Container - -This section gives quick examples of how to resolve resources from the Medusa container in customizations other than an API route, which is covered in the section above. - -### Subscriber - -A [subscriber](https://docs.medusajs.com/learn/fundamentals/events-and-subscribers/index.html.md) function, which is executed when an event is emitted, accepts as a parameter an object with a `container` property, whose value is the Medusa container. Use its `resolve` method to resolve a resource by its registration key: - -```ts highlights={subscriberHighlights} -import { SubscriberArgs, type SubscriberConfig } from "@medusajs/framework" -import { ContainerRegistrationKeys } from "@medusajs/framework/utils" - -export default async function productCreateHandler({ - event: { data }, - container, -}: SubscriberArgs<{ id: string }>) { - const query = container.resolve(ContainerRegistrationKeys.QUERY) - - const { data: products } = await query.graph({ - entity: "product", - fields: ["*"], - filters: { - id: data.id, - }, - }) - - console.log(`You created a product with the title ${products[0].title}`) -} - -export const config: SubscriberConfig = { - event: `product.created`, -} -``` - -### Scheduled Job - -A [scheduled job](https://docs.medusajs.com/learn/fundamentals/scheduled-jobs/index.html.md) function, which is executed at a specified interval, accepts the Medusa container as a parameter. Use its `resolve` method to resolve a resource by its registration key: - -```ts highlights={scheduledJobHighlights} -import { MedusaContainer } from "@medusajs/framework/types" -import { ContainerRegistrationKeys } from "@medusajs/framework/utils" - -export default async function myCustomJob( - container: MedusaContainer -) { - const query = container.resolve(ContainerRegistrationKeys.QUERY) - - const { data: products } = await query.graph({ - entity: "product", - fields: ["*"], - filters: { - id: "prod_123", - }, - }) - - console.log( - `You have ${products.length} matching your filters.` - ) -} - -export const config = { - name: "every-minute-message", - // execute every minute - schedule: "* * * * *", -} -``` - -### Workflow Step - -A [step in a workflow](https://docs.medusajs.com/learn/fundamentals/workflows/index.html.md), which is a special function where you build durable execution logic across multiple modules, accepts in its second parameter a `container` property, whose value is the Medusa container. Use its `resolve` method to resolve a resource by its registration key: - -```ts highlights={workflowStepsHighlight} -import { - createStep, - StepResponse, -} from "@medusajs/framework/workflows-sdk" -import { ContainerRegistrationKeys } from "@medusajs/framework/utils" - -const step1 = createStep("step-1", async (_, { container }) => { - const query = container.resolve(ContainerRegistrationKeys.QUERY) - - const { data: products } = await query.graph({ - entity: "product", - fields: ["*"], - filters: { - id: "prod_123", - }, - }) - - return new StepResponse(products) -}) -``` - -### Module Services and Loaders - -A [module](https://docs.medusajs.com/learn/fundamentals/modules/index.html.md), which is a package of functionalities for a single feature or domain, has its own container, so it can't resolve resources from the Medusa container. - -Learn more about the module's container in [this chapter](https://docs.medusajs.com/learn/fundamentals/modules/container/index.html.md). - - -# Data Models - -In this chapter, you'll learn what a data model is and how to create a data model. - -## What is a Data Model? - -A data model represents a table in the database. You create data models using Medusa's data modeling language (DML). It simplifies defining a table's columns, relations, and indexes with straightforward methods and configurations. - -You create a data model in a [module](https://docs.medusajs.com/learn/fundamentals/modules/index.html.md). The module's service provides the methods to store and manage those data models. Then, you can resolve the module's service in other customizations, such as a [workflow](https://docs.medusajs.com/learn/fundamentals/workflows/index.html.md), to manage the data models' records. - -*** - -## How to Create a Data Model - -In a module, you can create a data model in a TypeScript or JavaScript file under the module's `models` directory. - -So, for example, assuming you have a Blog Module at `src/modules/blog`, you can create a `Post` data model by creating the `src/modules/blog/models/post.ts` file with the following content: - -![Updated directory overview after adding the data model](https://res.cloudinary.com/dza7lstvk/image/upload/v1732806790/Medusa%20Book/blog-dir-overview-1_jfvovj.jpg) - -```ts title="src/modules/blog/models/post.ts" -import { model } from "@medusajs/framework/utils" - -const Post = model.define("post", { - id: model.id().primaryKey(), - title: model.text(), -}) - -export default Post -``` - -You define the data model using the `define` method of the DML. It accepts two parameters: - -1. The first one is the name of the data model's table in the database. Use snake-case names. -2. The second is an object, which is the data model's schema. The schema's properties are defined using the `model`'s methods, such as `text` and `id`. - - Data models automatically have the date properties `created_at`, `updated_at`, and `deleted_at`, so you don't need to add them manually. - -The code snippet above defines a `Post` data model with `id` and `title` properties. - -*** - -## Generate Migrations - -After you create a data model in a module, then [register that module in your Medusa configurations](https://docs.medusajs.com/learn/fundamentals/modules#4-add-module-to-medusas-configurations/index.html.md), you must generate a migration to create the data model's table in the database. - -A migration is a TypeScript or JavaScript file that defines database changes made by a module. Migrations are useful when you re-use a module or you're working in a team, so that when one member of a team makes a database change, everyone else can reflect it on their side by running the migrations. - -For example, to generate a migration for the Blog Module, run the following command in your Medusa application's directory: - -If you're creating the module in a plugin, use the [plugin:db:generate command](https://docs.medusajs.com/resources/medusa-cli/commands/plugin#plugindbgenerate/index.html.md) instead. - -```bash -npx medusa db:generate blog -``` - -The `db:generate` command of the Medusa CLI accepts one or more module names to generate the migration for. It will create a migration file for the Blog Module in the directory `src/modules/blog/migrations` similar to the following: - -```ts -import { Migration } from "@mikro-orm/migrations" - -export class Migration20241121103722 extends Migration { - - async up(): Promise { - this.addSql("create table if not exists \"post\" (\"id\" text not null, \"title\" text not null, \"created_at\" timestamptz not null default now(), \"updated_at\" timestamptz not null default now(), \"deleted_at\" timestamptz null, constraint \"post_pkey\" primary key (\"id\"));") - } - - async down(): Promise { - this.addSql("drop table if exists \"post\" cascade;") - } - -} -``` - -In the migration class, the `up` method creates the table `post` and defines its columns using PostgreSQL syntax. The `down` method drops the table. - -### Run Migrations - -To reflect the changes in the generated migration file on the database, run the `db:migrate` command: - -If you're creating the module in a plugin, run this command on the Medusa application that the plugin is installed in. - -```bash -npx medusa db:migrate -``` - -This creates the `post` table in the database. - -### Migrations on Data Model Changes - -Whenever you make a change to a data model, you must generate and run the migrations. - -For example, if you add a new column to the `Post` data model, you must generate a new migration and run it. - -*** - -## Manage Data Models - -Your module's service should extend the [service factory](https://docs.medusajs.com/learn/fundamentals/modules/service-factory/index.html.md), which generates data-management methods for your module's data models. - -For example, the Blog Module's service would have methods like `retrievePost` and `createPosts`. - -Refer to the [Service Factory](https://docs.medusajs.com/learn/fundamentals/modules/service-factory/index.html.md) chapter to learn more about how to extend the service factory and manage data models, and refer to the [Service Factory Reference](https://docs.medusajs.com/resources/service-factory-reference/index.html.md) for the full list of generated methods and how to use them. - - # Define Module Link In this chapter, you’ll learn what a module link is and how to define one. @@ -3856,6 +3360,980 @@ npx medusa db:migrate ``` +# Medusa Container + +In this chapter, you’ll learn about the Medusa container and how to use it. + +## What is the Medusa Container? + +The Medusa container is a registry of Framework and commerce tools that's accessible across your application. Medusa automatically registers these tools in the container, including custom ones that you've built, so that you can use them in your customizations. + +In other platforms, if you have a resource A (for example, a class) that depends on a resource B, you have to manually add resource B to the container or specify it beforehand as A's dependency, which is often done in a file separate from A's code. This becomes difficult to manage as you maintain larger applications with many changing dependencies. + +Medusa simplifies this process by giving you access to the container, with the tools or resources already registered, at all times in your customizations. When you reach a point in your code where you need a tool, you resolve it from the container and use it. + +For example, consider you're creating an API route that retrieves products based on filters using [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query/index.html.md), a tool that fetches data across the application. In the API route's function, you can resolve Query from the container passed to the API route and use it: + +```ts highlights={highlights} +import { MedusaRequest, MedusaResponse } from "@medusajs/framework" +import { ContainerRegistrationKeys } from "@medusajs/framework/utils" + +export async function GET( + req: MedusaRequest, + res: MedusaResponse +) { + const query = req.scope.resolve("query") + + const { data: products } = await query.graph({ + entity: "product", + fields: ["*"], + filters: { + id: "prod_123", + }, + }) + + res.json({ + products, + }) +} +``` + +The API route accepts as a first parameter a request object that has a `scope` property, which is the Medusa container. It has a `resolve` method that resolves a resource from the container by the key it's registered with. + +You can learn more about how Query works in [this chapter](https://docs.medusajs.com/learn/fundamentals/module-links/query/index.html.md). + +*** + +## List of Resources Registered in the Medusa Container + +Find a full list of the registered resources and their registration key in [this reference](https://docs.medusajs.com/resources/medusa-container-resources/index.html.md) + +*** + +## How to Resolve From the Medusa Container + +This section gives quick examples of how to resolve resources from the Medusa container in customizations other than an API route, which is covered in the section above. + +### Subscriber + +A [subscriber](https://docs.medusajs.com/learn/fundamentals/events-and-subscribers/index.html.md) function, which is executed when an event is emitted, accepts as a parameter an object with a `container` property, whose value is the Medusa container. Use its `resolve` method to resolve a resource by its registration key: + +```ts highlights={subscriberHighlights} +import { SubscriberArgs, type SubscriberConfig } from "@medusajs/framework" +import { ContainerRegistrationKeys } from "@medusajs/framework/utils" + +export default async function productCreateHandler({ + event: { data }, + container, +}: SubscriberArgs<{ id: string }>) { + const query = container.resolve(ContainerRegistrationKeys.QUERY) + + const { data: products } = await query.graph({ + entity: "product", + fields: ["*"], + filters: { + id: data.id, + }, + }) + + console.log(`You created a product with the title ${products[0].title}`) +} + +export const config: SubscriberConfig = { + event: `product.created`, +} +``` + +### Scheduled Job + +A [scheduled job](https://docs.medusajs.com/learn/fundamentals/scheduled-jobs/index.html.md) function, which is executed at a specified interval, accepts the Medusa container as a parameter. Use its `resolve` method to resolve a resource by its registration key: + +```ts highlights={scheduledJobHighlights} +import { MedusaContainer } from "@medusajs/framework/types" +import { ContainerRegistrationKeys } from "@medusajs/framework/utils" + +export default async function myCustomJob( + container: MedusaContainer +) { + const query = container.resolve(ContainerRegistrationKeys.QUERY) + + const { data: products } = await query.graph({ + entity: "product", + fields: ["*"], + filters: { + id: "prod_123", + }, + }) + + console.log( + `You have ${products.length} matching your filters.` + ) +} + +export const config = { + name: "every-minute-message", + // execute every minute + schedule: "* * * * *", +} +``` + +### Workflow Step + +A [step in a workflow](https://docs.medusajs.com/learn/fundamentals/workflows/index.html.md), which is a special function where you build durable execution logic across multiple modules, accepts in its second parameter a `container` property, whose value is the Medusa container. Use its `resolve` method to resolve a resource by its registration key: + +```ts highlights={workflowStepsHighlight} +import { + createStep, + StepResponse, +} from "@medusajs/framework/workflows-sdk" +import { ContainerRegistrationKeys } from "@medusajs/framework/utils" + +const step1 = createStep("step-1", async (_, { container }) => { + const query = container.resolve(ContainerRegistrationKeys.QUERY) + + const { data: products } = await query.graph({ + entity: "product", + fields: ["*"], + filters: { + id: "prod_123", + }, + }) + + return new StepResponse(products) +}) +``` + +### Module Services and Loaders + +A [module](https://docs.medusajs.com/learn/fundamentals/modules/index.html.md), which is a package of functionalities for a single feature or domain, has its own container, so it can't resolve resources from the Medusa container. + +Learn more about the module's container in [this chapter](https://docs.medusajs.com/learn/fundamentals/modules/container/index.html.md). + + +# Plugins + +In this chapter, you'll learn what a plugin is in Medusa. + +Plugins are available starting from [Medusa v2.3.0](https://github.com/medusajs/medusa/releases/tag/v2.3.0). + +## What is a Plugin? + +A plugin is a package of reusable Medusa customizations that you can install in any Medusa application. The supported customizations are [Modules](https://docs.medusajs.com/learn/fundamentals/modules/index.html.md), [API Routes](https://docs.medusajs.com/learn/fundamentals/api-routes/index.html.md), [Workflows](https://docs.medusajs.com/learn/fundamentals/workflows/index.html.md), [Workflow Hooks](https://docs.medusajs.com/learn/fundamentals/workflows/workflow-hooks/index.html.md), [Links](https://docs.medusajs.com/learn/fundamentals/module-links/index.html.md), [Subscribers](https://docs.medusajs.com/learn/fundamentals/events-and-subscribers/index.html.md), [Scheduled Jobs](https://docs.medusajs.com/learn/fundamentals/scheduled-jobs/index.html.md), and [Admin Extensions](https://docs.medusajs.com/learn/fundamentals/admin/index.html.md). + +Plugins allow you to reuse your Medusa customizations across multiple projects or share them with the community. They can be published to npm and installed in any Medusa project. + +![Diagram showcasing a wishlist plugin installed in a Medusa application](https://res.cloudinary.com/dza7lstvk/image/upload/v1737540762/Medusa%20Book/plugin-diagram_oepiis.jpg) + +Learn how to create a wishlist plugin in [this guide](https://docs.medusajs.com/resources/plugins/guides/wishlist/index.html.md). + +*** + +## Plugin vs Module + +A [module](https://docs.medusajs.com/learn/fundamentals/modules/index.html.md) is an isolated package related to a single domain or functionality, such as product reviews or integrating a Content Management System. A module can't access any resources in the Medusa application that are outside its codebase. + +A plugin, on the other hand, can contain multiple Medusa customizations, including modules. Your plugin can define a module, then build flows around it. + +For example, in a plugin, you can define a module that integrates a third-party service, then add a workflow that uses the module when a certain event occurs to sync data to that service. + +- You want to reuse your Medusa customizations across multiple projects. +- You want to share your Medusa customizations with the community. + +- You want to build a custom feature related to a single domain or integrate a third-party service. Instead, use a [module](https://docs.medusajs.com/learn/fundamentals/modules/index.html.md). You can wrap that module in a plugin if it's used in other customizations, such as if it has a module link or it's used in a workflow. + +*** + +## How to Create a Plugin? + +The next chapter explains how you can create and publish a plugin. + + +# Scheduled Jobs + +In this chapter, you’ll learn about scheduled jobs and how to use them. + +## What is a Scheduled Job? + +When building your commerce application, you may need to automate tasks and run them repeatedly at a specific schedule. For example, you need to automatically sync products to a third-party service once a day. + +In other commerce platforms, this feature isn't natively supported. Instead, you have to setup a separate application to execute cron jobs, which adds complexity as to how you expose this task to be executed in a cron job, or how do you debug it when it's not running within the platform's tooling. + +Medusa removes this overhead by supporting this feature natively with scheduled jobs. A scheduled job is an asynchronous function that the Medusa application runs at the interval you specify during the Medusa application's runtime. Your efforts are only spent on implementing the functionality performed by the job, such as syncing products to an ERP. + +- You want the action to execute at a specified schedule while the Medusa application **isn't** running. Instead, use the operating system's equivalent of a cron job. +- You want to execute the action once when the application loads. Use [loaders](https://docs.medusajs.com/learn/fundamentals/modules/loaders/index.html.md) instead. +- You want to execute the action if an event occurs. Use [subscribers](https://docs.medusajs.com/learn/fundamentals/events-and-subscribers/index.html.md) instead. + +*** + +## How to Create a Scheduled Job? + +You create a scheduled job in a TypeScript or JavaScript file under the `src/jobs` directory. The file exports the asynchronous function to run, and the configurations indicating the schedule to run the function. + +For example, create the file `src/jobs/hello-world.ts` with the following content: + +![Example of scheduled job file in the application's directory structure](https://res.cloudinary.com/dza7lstvk/image/upload/v1732866423/Medusa%20Book/scheduled-job-dir-overview_ediqgm.jpg) + +```ts title="src/jobs/hello-world.ts" highlights={highlights} +import { MedusaContainer } from "@medusajs/framework/types" + +export default async function greetingJob(container: MedusaContainer) { + const logger = container.resolve("logger") + + logger.info("Greeting!") +} + +export const config = { + name: "greeting-every-minute", + schedule: "* * * * *", +} +``` + +You export an asynchronous function that receives the [Medusa container](https://docs.medusajs.com/learn/fundamentals/medusa-container/index.html.md) as a parameter. In the function, you resolve the [Logger utility](https://docs.medusajs.com/learn/debugging-and-testing/logging/index.html.md) from the Medusa container and log a message. + +You also export a `config` object that has the following properties: + +- `name`: A unique name for the job. +- `schedule`: A string that holds a [cron expression](https://crontab.guru/) indicating the schedule to run the job. + +This scheduled job executes every minute and logs into the terminal `Greeting!`. + +### Test the Scheduled Job + +To test out your scheduled job, start the Medusa application: + +```bash npm2yarn +npm run dev +``` + +After a minute, the following message will be logged to the terminal: + +```bash +info: Greeting! +``` + +*** + +## Example: Sync Products Once a Day + +In this section, you'll find a brief example of how you use a scheduled job to sync products to a third-party service. + +When implementing flows spanning across systems or [modules](https://docs.medusajs.com/learn/fundamentals/modules/index.html.md), you use [workflows](https://docs.medusajs.com/learn/fundamentals/workflows/index.html.md). A workflow is a task made up of a series of steps, and you construct it like you would a regular function, but it's a special function that supports rollback mechanism in case of errors, background execution, and more. + +You can learn how to create a workflow in [this chapter](https://docs.medusajs.com/learn/fundamentals/workflows/index.html.md), but this example assumes you already have a `syncProductToErpWorkflow` implemented. To execute this workflow once a day, create a scheduled job at `src/jobs/sync-products.ts` with the following content: + +```ts title="src/jobs/sync-products.ts" +import { MedusaContainer } from "@medusajs/framework/types" +import { syncProductToErpWorkflow } from "../workflows/sync-products-to-erp" + +export default async function syncProductsJob(container: MedusaContainer) { + await syncProductToErpWorkflow(container) + .run() +} + +export const config = { + name: "sync-products-job", + schedule: "0 0 * * *", +} +``` + +In the scheduled job function, you execute the `syncProductToErpWorkflow` by invoking it and passing it the container, then invoking the `run` method. You also specify in the exported configurations the schedule `0 0 * * *` which indicates midnight time of every day. + +The next time you start the Medusa application, it will run this job every day at midnight. + + +# Configure Instrumentation + +In this chapter, you'll learn about observability in Medusa and how to configure instrumentation with OpenTelemetry. + +## Observability with OpenTelemtry + +Medusa uses [OpenTelemetry](https://opentelemetry.io/) for instrumentation and reporting. When configured, it reports traces for: + +- HTTP requests +- Workflow executions +- Query usages +- Database queries and operations + +*** + +## How to Configure Instrumentation in Medusa? + +### Prerequisites + +- [An exporter to visualize your application's traces, such as Zipkin.](https://zipkin.io/pages/quickstart.html) + +### Install Dependencies + +Start by installing the following OpenTelemetry dependencies in your Medusa project: + +```bash npm2yarn +npm install @opentelemetry/sdk-node @opentelemetry/resources @opentelemetry/sdk-trace-node @opentelemetry/instrumentation-pg +``` + +Also, install the dependencies relevant for the exporter you use. If you're using Zipkin, install the following dependencies: + +```bash npm2yarn +npm install @opentelemetry/exporter-zipkin +``` + +### Add instrumentation.ts + +Next, create the file `instrumentation.ts` with the following content: + +```ts title="instrumentation.ts" +import { registerOtel } from "@medusajs/medusa" +import { ZipkinExporter } from "@opentelemetry/exporter-zipkin" + +// If using an exporter other than Zipkin, initialize it here. +const exporter = new ZipkinExporter({ + serviceName: "my-medusa-project", +}) + +export function register() { + registerOtel({ + serviceName: "medusajs", + // pass exporter + exporter, + instrument: { + http: true, + workflows: true, + query: true, + }, + }) +} +``` + +In the `instrumentation.ts` file, you export a `register` function that uses Medusa's `registerOtel` utility function. You also initialize an instance of the exporter, such as Zipkin, and pass it to the `registerOtel` function. + +`registerOtel` accepts an object where you can pass any [NodeSDKConfiguration](https://open-telemetry.github.io/opentelemetry-js/interfaces/_opentelemetry_sdk_node.NodeSDKConfiguration.html) property along with the following properties: + +The `NodeSDKConfiguration` properties are accepted since Medusa v2.5.1. + +- serviceName: (\`string\`) The name of the service traced. +- exporter: (\[SpanExporter]\(https://open-telemetry.github.io/opentelemetry-js/interfaces/\_opentelemetry\_sdk\_trace\_base.SpanExporter.html)) An instance of an exporter, such as Zipkin. +- instrument: (\`object\`) Options specifying what to trace. + + - http: (\`boolean\`) Whether to trace HTTP requests. + + - query: (\`boolean\`) Whether to trace Query usages. + + - workflows: (\`boolean\`) Whether to trace Workflow executions. + + - db: (\`boolean\`) Whether to trace database queries and operations. +- instrumentations: (\[Instrumentation\[]]\(https://open-telemetry.github.io/opentelemetry-js/interfaces/\_opentelemetry\_instrumentation.Instrumentation.html)) Additional instrumentation options that OpenTelemetry accepts. + +*** + +## Test it Out + +To test it out, start your exporter, such as Zipkin. + +Then, start your Medusa application: + +```bash npm2yarn +npm run dev +``` + +Try to open the Medusa Admin or send a request to an API route. + +If you check traces in your exporter, you'll find new traces reported. + +### Trace Span Names + +Trace span names start with the following keywords based on what it's reporting: + +- `{methodName} {URL}` when reporting HTTP requests, where `{methodName}` is the HTTP method, and `{URL}` is the URL the request is sent to. +- `route:` when reporting route handlers running on an HTTP request. +- `middleware:` when reporting a middleware running on an HTTP request. +- `workflow:` when reporting a workflow execution. +- `step:` when reporting a step in a workflow execution. +- `query.graph:` when reporting Query usages. +- `pg.query:` when reporting database queries and operations. + + +# Logging + +In this chapter, you’ll learn how to use Medusa’s logging utility. + +## Logger Class + +Medusa provides a `Logger` class with advanced logging functionalities. This includes configuring logging levels or saving logs to a file. + +The Medusa application registers the `Logger` class in the Medusa container and each module's container as `logger`. + +*** + +## How to Log a Message + +Resolve the `logger` using the Medusa container to log a message in your resource. + +For example, create the file `src/jobs/log-message.ts` with the following content: + +```ts title="src/jobs/log-message.ts" highlights={highlights} +import { MedusaContainer } from "@medusajs/framework/types" +import { ContainerRegistrationKeys } from "@medusajs/framework/utils" + +export default async function myCustomJob( + container: MedusaContainer +) { + const logger = container.resolve(ContainerRegistrationKeys.LOGGER) + + logger.info("I'm using the logger!") +} + +export const config = { + name: "test-logger", + // execute every minute + schedule: "* * * * *", +} +``` + +This creates a scheduled job that resolves the `logger` from the Medusa container and uses it to log a message. + +### Test the Scheduled Job + +To test out the above scheduled job, start the Medusa application: + +```bash npm2yarn +npm run dev +``` + +After a minute, you'll see the following message as part of the logged messages: + +```text +info: I'm using the logger! +``` + +*** + +## Log Levels + +The `Logger` class has the following methods: + +- `info`: The message is logged with level `info`. +- `warn`: The message is logged with level `warn`. +- `error`: The message is logged with level `error`. +- `debug`: The message is logged with level `debug`. + +Each of these methods accepts a string parameter to log in the terminal with the associated level. + +*** + +## Logging Configurations + +### Log Level + +The available log levels, from lowest to highest levels, are: + +1. `silly` (default, meaning messages of all levels are logged) +2. `debug` +3. `info` +4. `warn` +5. `error` + +You can change that by setting the `LOG_LEVEL` environment variable to the minimum level you want to be logged. + +For example: + +```bash +LOG_LEVEL=error +``` + +This logs `error` messages only. + +The environment variable must be set as a system environment variable and not in `.env`. + +### Save Logs in a File + +Aside from showing the logs in the terminal, you can save the logs in a file by setting the `LOG_FILE` environment variable to the path of the file relative to the Medusa server’s root directory. + +For example: + +```bash +LOG_FILE=all.log +``` + +Your logs are now saved in the `all.log` file at the root of your Medusa application. + +The environment variable must be set as a system environment variable and not in `.env`. + +*** + +## Show Log with Progress + +The `Logger` class has an `activity` method used to log a message of level `info`. If the Medusa application is running in a development environment, a spinner starts to show the activity's progress. + +For example: + +```ts title="src/jobs/log-message.ts" +import { MedusaContainer } from "@medusajs/framework/types" +import { ContainerRegistrationKeys } from "@medusajs/framework/utils" + +export default async function myCustomJob( + container: MedusaContainer +) { + const logger = container.resolve(ContainerRegistrationKeys.LOGGER) + + const activityId = logger.activity("First log message") + + logger.progress(activityId, `Second log message`) + + logger.success(activityId, "Last log message") +} +``` + +The `activity` method returns the ID of the started activity. This ID can then be passed to one of the following methods of the `Logger` class: + +- `progress`: Log a message of level `info` that indicates progress within that same activity. +- `success`: Log a message of level `info` that indicates that the activity has succeeded. This also ends the associated activity. +- `failure`: Log a message of level `error` that indicates that the activity has failed. This also ends the associated activity. + +If you configured the `LOG_LEVEL` environment variable to a level higher than those associated with the above methods, their messages won’t be logged. + + +# Workflows + +In this chapter, you’ll learn about workflows and how to define and execute them. + +## What is a Workflow? + +In digital commerce you typically have many systems involved in your operations. For example, you may have an ERP system that holds product master data and accounting reports, a CMS system for content, a CRM system for managing customer campaigns, a payment service to process credit cards, and so on. Sometimes you may even have custom built applications that need to participate in the commerce stack. One of the biggest challenges when operating a stack like this is ensuring consistency in the data spread across systems. + +Medusa has a built-in durable execution engine to help complete tasks that span multiple systems. You orchestrate your operations across systems in Medusa instead of having to manage it yourself. Other commerce platforms don't have this capability, which makes them a bottleneck to building customizations and iterating quickly. + +A workflow is a series of queries and actions, called steps, that complete a task. You construct a workflow similar to how you create a JavaScript function. + +However, unlike regular functions, workflows: + +- Create an internal representation of your steps, allowing you to track them and their progress. +- Support defining roll-back logic for each step, so that you can handle errors gracefully and your data remain consistent across systems. +- Perform long actions asynchronously, giving you control over when a step starts and finishes. + +You implement all custom flows within workflows, then execute them from [API routes](https://docs.medusajs.com/learn/fundamentals/api-routes/index.html.md), [subscribers](https://docs.medusajs.com/learn/fundamentals/events-and-subscribers/index.html.md), and [scheduled jobs](https://docs.medusajs.com/learn/fundamentals/scheduled-jobs/index.html.md). + +*** + +## How to Create and Execute a Workflow? + +### 1. Create the Steps + +A workflow is made of a series of steps. A step is created using `createStep` from the Workflows SDK. + +Create the file `src/workflows/hello-world.ts` with the following content: + +![Example of workflow file in the application's directory structure](https://res.cloudinary.com/dza7lstvk/image/upload/v1732866980/Medusa%20Book/workflow-dir-overview_xklukj.jpg) + +```ts title="src/workflows/hello-world.ts" highlights={step1Highlights} +import { createStep, StepResponse } from "@medusajs/framework/workflows-sdk" + +const step1 = createStep( + "step-1", + async () => { + return new StepResponse(`Hello from step one!`) + } +) +``` + +The `createStep` function accepts the step's unique name as a first parameter, and the step's function as a second parameter. + +Steps must return an instance of `StepResponse`, whose parameter is the data to return to the workflow executing the step. + +Steps can accept input parameters. For example, add the following to `src/workflows/hello-world.ts`: + +```ts title="src/workflows/hello-world.ts" highlights={step2Highlights} +type WorkflowInput = { + name: string +} + +const step2 = createStep( + "step-2", + async ({ name }: WorkflowInput) => { + return new StepResponse(`Hello ${name} from step two!`) + } +) +``` + +This adds another step whose function accepts as a parameter an object with a `name` property. + +### 2. Create a Workflow + +Next, add the following to the same file to create the workflow using the `createWorkflow` function: + +```ts title="src/workflows/hello-world.ts" highlights={workflowHighlights} +import { + // other imports... + createWorkflow, + WorkflowResponse, +} from "@medusajs/framework/workflows-sdk" + +// ... + +const myWorkflow = createWorkflow( + "hello-world", + function (input: WorkflowInput) { + const str1 = step1() + // to pass input + const str2 = step2(input) + + return new WorkflowResponse({ + message: str2, + }) + } +) + +export default myWorkflow +``` + +The `createWorkflow` function accepts the workflow's unique name as a first parameter, and the workflow's function as a second parameter. The workflow can accept input which is passed as a parameter to the function. + +The workflow must return an instance of `WorkflowResponse`, whose parameter is returned to workflow executors. + +### 3. Execute the Workflow + +You can execute a workflow from different customizations: + +- Execute in an API route to expose the workflow's functionalities to clients. +- Execute in a subscriber to use the workflow's functionalities when a commerce operation is performed. +- Execute in a scheduled job to run the workflow's functionalities automatically at a specified repeated interval. + +To execute the workflow, invoke it passing the [Medusa container](https://docs.medusajs.com/learn/fundamentals/medusa-container/index.html.md) as a parameter. Then, use its `run` method: + +### API Route + +```ts title="src/api/workflow/route.ts" highlights={[["11"], ["12"], ["13"], ["14"], ["15"], ["16"]]} collapsibleLines="1-6" expandButtonLabel="Show Imports" +import type { + MedusaRequest, + MedusaResponse, +} from "@medusajs/framework/http" +import myWorkflow from "../../workflows/hello-world" + +export async function GET( + req: MedusaRequest, + res: MedusaResponse +) { + const { result } = await myWorkflow(req.scope) + .run({ + input: { + name: "John", + }, + }) + + res.send(result) +} +``` + +### Subscriber + +```ts title="src/subscribers/order-placed.ts" highlights={[["11"], ["12"], ["13"], ["14"], ["15"], ["16"]]} collapsibleLines="1-6" expandButtonLabel="Show Imports" +import { + type SubscriberConfig, + type SubscriberArgs, +} from "@medusajs/framework" +import myWorkflow from "../workflows/hello-world" + +export default async function handleOrderPlaced({ + event: { data }, + container, +}: SubscriberArgs<{ id: string }>) { + const { result } = await myWorkflow(container) + .run({ + input: { + name: "John", + }, + }) + + console.log(result) +} + +export const config: SubscriberConfig = { + event: "order.placed", +} +``` + +### Scheduled Job + +```ts title="src/jobs/message-daily.ts" highlights={[["7"], ["8"], ["9"], ["10"], ["11"], ["12"]]} +import { MedusaContainer } from "@medusajs/framework/types" +import myWorkflow from "../workflows/hello-world" + +export default async function myCustomJob( + container: MedusaContainer +) { + const { result } = await myWorkflow(container) + .run({ + input: { + name: "John", + }, + }) + + console.log(result.message) +} + +export const config = { + name: "run-once-a-day", + schedule: `0 0 * * *`, +}; +``` + +### 4. Test Workflow + +To test out your workflow, start your Medusa application: + +```bash npm2yarn +npm run dev +``` + +Then, if you added the API route above, send a `GET` request to `/workflow`: + +```bash +curl http://localhost:9000/workflow +``` + +You’ll receive the following response: + +```json title="Example Response" +{ + "message": "Hello John from step two!" +} +``` + +*** + +## Access Medusa Container in Workflow Steps + +A step receives an object as a second parameter with configurations and context-related properties. One of these properties is the `container` property, which is the [Medusa container](https://docs.medusajs.com/learn/fundamentals/medusa-container/index.html.md) to allow you to resolve Framework and commerce tools in your application. + +For example, consider you want to implement a workflow that returns the total products in your application. Create the file `src/workflows/product-count.ts` with the following content: + +```ts title="src/workflows/product-count.ts" highlights={highlights} collapsibleLines="1-7" expandButtonLabel="Show Imports" +import { + createStep, + StepResponse, + createWorkflow, + WorkflowResponse, +} from "@medusajs/framework/workflows-sdk" + +const getProductCountStep = createStep( + "get-product-count", + async (_, { container }) => { + const productModuleService = container.resolve("product") + + const [, count] = await productModuleService.listAndCountProducts() + + return new StepResponse(count) + } +) + +const productCountWorkflow = createWorkflow( + "product-count", + function () { + const count = getProductCountStep() + + return new WorkflowResponse({ + count, + }) + } +) + +export default productCountWorkflow +``` + +In `getProductCountStep`, you use the `container` to resolve the Product Module's main service. Then, you use its `listAndCountProducts` method to retrieve the total count of products and return it in the step's response. You then execute this step in the `productCountWorkflow`. + +You can now execute this workflow in a custom API route, scheduled job, or subscriber to get the total count of products. + +Find a full list of the registered resources in the Medusa container and their registration key in [this reference](https://docs.medusajs.com/resources/medusa-container-resources/index.html.md). You can use these resources in your custom workflows. + + +# Worker Mode of Medusa Instance + +In this chapter, you'll learn about the different modes of running a Medusa instance and how to configure the mode. + +## What is Worker Mode? + +By default, the Medusa application runs both the server, which handles all incoming requests, and the worker, which processes background tasks, in a single process. While this setup is suitable for development, it is not optimal for production environments where background tasks can be long-running or resource-intensive. + +In a production environment, you should deploy two separate instances of your Medusa application: + +1. A server instance that handles incoming requests to the application's API routes. +2. A worker instance that processes background tasks. This includes scheduled jobs and subscribers. + +You don't need to set up different projects for each instance. Instead, you can configure the Medusa application to run in different modes based on environment variables, as you'll see later in this chapter. + +This separation ensures that the server instance remains responsive to incoming requests, while the worker instance processes tasks in the background. + +![Diagram showcasing how the server and worker work together](https://res.cloudinary.com/dza7lstvk/image/upload/fl_lossy/f_auto/r_16/ar_16:9,c_pad/v1/Medusa%20Book/medusa-worker_klkbch.jpg?_a=BATFJtAA0) + +*** + +## How to Set Worker Mode + +You can set the worker mode of your application using the `projectConfig.workerMode` configuration in the `medusa-config.ts`. The `workerMode` configuration accepts the following values: + +- `shared`: (default) run the application in a single process, meaning the worker and server run in the same process. +- `worker`: run a worker process only. +- `server`: run the application server only. + +Instead of creating different projects with different worker mode configurations, you can set the worker mode using an environment variable. Then, the worker mode configuration will change based on the environment variable. + +For example, set the worker mode in `medusa-config.ts` to the following: + +```ts title="medusa-config.ts" +module.exports = defineConfig({ + projectConfig: { + workerMode: process.env.WORKER_MODE || "shared", + // ... + }, + // ... +}) +``` + +You set the worker mode configuration to the `process.env.WORKER_MODE` environment variable and set a default value of `shared`. + +Then, in the deployed server Medusa instance, set `WORKER_MODE` to `server`, and in the worker Medusa instance, set `WORKER_MODE` to `worker`: + +### Server Medusa Instance + +```bash +WORKER_MODE=server +``` + +### Worker Medusa Instance + +```bash +WORKER_MODE=worker +``` + +### Disable Admin in Worker Mode + +Since the worker instance only processes background tasks, you should disable the admin interface in it. That will save resources in the worker instance. + +To disable the admin interface, set the `admin.disable` configuration in the `medusa-config.ts` file: + +```ts title="medusa-config.ts" +module.exports = defineConfig({ + admin: { + disable: process.env.ADMIN_DISABLED === "true" || + false, + }, + // ... +}) +``` + +Similar to before, you set the value in an environment variable, allowing you to enable or disable the admin interface based on the environment. + +Then, in the deployed server Medusa instance, set `ADMIN_DISABLED` to `false`, and in the worker Medusa instance, set `ADMIN_DISABLED` to `true`: + +### Server Medusa Instance + +```bash +ADMIN_DISABLED=false +``` + +### Worker Medusa Instance + +```bash +ADMIN_DISABLED=true +``` + + +# Medusa Testing Tools + +In this chapter, you'll learn about Medusa's testing tools and how to install and configure them. + +## @medusajs/test-utils Package + +Medusa provides a Testing Framework to create integration tests for your custom API routes, modules, or other Medusa customizations. + +To use the Testing Framework, install `@medusajs/test-utils` as a `devDependency`: + +```bash npm2yarn +npm install --save-dev @medusajs/test-utils@latest +``` + +*** + +## Install and Configure Jest + +Writing tests with `@medusajs/test-utils`'s tools requires installing and configuring Jest in your project. + +Run the following command to install the required Jest dependencies: + +```bash npm2yarn +npm install --save-dev jest @types/jest @swc/jest +``` + +Then, create the file `jest.config.js` with the following content: + +```js title="jest.config.js" +const { loadEnv } = require("@medusajs/framework/utils") +loadEnv("test", process.cwd()) + +module.exports = { + transform: { + "^.+\\.[jt]s$": [ + "@swc/jest", + { + jsc: { + parser: { syntax: "typescript", decorators: true }, + }, + }, + ], + }, + testEnvironment: "node", + moduleFileExtensions: ["js", "ts", "json"], + modulePathIgnorePatterns: ["dist/"], + setupFiles: ["./integration-tests/setup.js"], +} + +if (process.env.TEST_TYPE === "integration:http") { + module.exports.testMatch = ["**/integration-tests/http/*.spec.[jt]s"] +} else if (process.env.TEST_TYPE === "integration:modules") { + module.exports.testMatch = ["**/src/modules/*/__tests__/**/*.[jt]s"] +} else if (process.env.TEST_TYPE === "unit") { + module.exports.testMatch = ["**/src/**/__tests__/**/*.unit.spec.[jt]s"] +} +``` + +Next, create the `integration-tests/setup.js` file with the following content: + +```js title="integration-tests/setup.js" +const { MetadataStorage } = require("@mikro-orm/core") + +MetadataStorage.clear() +``` + +*** + +## Add Test Commands + +Finally, add the following scripts to `package.json`: + +```json title="package.json" +"scripts": { + // ... + "test:integration:http": "TEST_TYPE=integration:http NODE_OPTIONS=--experimental-vm-modules jest --silent=false --runInBand --forceExit", + "test:integration:modules": "TEST_TYPE=integration:modules NODE_OPTIONS=--experimental-vm-modules jest --silent --runInBand --forceExit", + "test:unit": "TEST_TYPE=unit NODE_OPTIONS=--experimental-vm-modules jest --silent --runInBand --forceExit" +}, +``` + +You now have two commands: + +- `test:integration:http` to run integration tests (for example, for API routes and workflows) available under the `integration-tests/http` directory. +- `test:integration:modules` to run integration tests for modules available in any `__tests__` directory under `src/modules`. +- `test:unit` to run unit tests in any `__tests__` directory under the `src` directory. + +Medusa's Testing Framework works for integration tests only. You can write unit tests using Jest. + +*** + +## Test Tools and Writing Tests + +The next chapters explain how to use the testing tools provided by `@medusajs/test-utils` to write tests. + + # Modules In this chapter, you’ll learn about modules and how to create them. @@ -4156,574 +4634,6 @@ This will create a post and return it in the response: You can also execute the workflow from a [subscriber](https://docs.medusajs.com/learn/fundamentals/events-and-subscribers/index.html.md) when an event occurs, or from a [scheduled job](https://docs.medusajs.com/learn/fundamentals/scheduled-jobs/index.html.md) to run it at a specified interval. -# Plugins - -In this chapter, you'll learn what a plugin is in Medusa. - -Plugins are available starting from [Medusa v2.3.0](https://github.com/medusajs/medusa/releases/tag/v2.3.0). - -## What is a Plugin? - -A plugin is a package of reusable Medusa customizations that you can install in any Medusa application. The supported customizations are [Modules](https://docs.medusajs.com/learn/fundamentals/modules/index.html.md), [API Routes](https://docs.medusajs.com/learn/fundamentals/api-routes/index.html.md), [Workflows](https://docs.medusajs.com/learn/fundamentals/workflows/index.html.md), [Workflow Hooks](https://docs.medusajs.com/learn/fundamentals/workflows/workflow-hooks/index.html.md), [Links](https://docs.medusajs.com/learn/fundamentals/module-links/index.html.md), [Subscribers](https://docs.medusajs.com/learn/fundamentals/events-and-subscribers/index.html.md), [Scheduled Jobs](https://docs.medusajs.com/learn/fundamentals/scheduled-jobs/index.html.md), and [Admin Extensions](https://docs.medusajs.com/learn/fundamentals/admin/index.html.md). - -Plugins allow you to reuse your Medusa customizations across multiple projects or share them with the community. They can be published to npm and installed in any Medusa project. - -![Diagram showcasing a wishlist plugin installed in a Medusa application](https://res.cloudinary.com/dza7lstvk/image/upload/v1737540762/Medusa%20Book/plugin-diagram_oepiis.jpg) - -Learn how to create a wishlist plugin in [this guide](https://docs.medusajs.com/resources/plugins/guides/wishlist/index.html.md). - -*** - -## Plugin vs Module - -A [module](https://docs.medusajs.com/learn/fundamentals/modules/index.html.md) is an isolated package related to a single domain or functionality, such as product reviews or integrating a Content Management System. A module can't access any resources in the Medusa application that are outside its codebase. - -A plugin, on the other hand, can contain multiple Medusa customizations, including modules. Your plugin can define a module, then build flows around it. - -For example, in a plugin, you can define a module that integrates a third-party service, then add a workflow that uses the module when a certain event occurs to sync data to that service. - -- You want to reuse your Medusa customizations across multiple projects. -- You want to share your Medusa customizations with the community. - -- You want to build a custom feature related to a single domain or integrate a third-party service. Instead, use a [module](https://docs.medusajs.com/learn/fundamentals/modules/index.html.md). You can wrap that module in a plugin if it's used in other customizations, such as if it has a module link or it's used in a workflow. - -*** - -## How to Create a Plugin? - -The next chapter explains how you can create and publish a plugin. - - -# Scheduled Jobs - -In this chapter, you’ll learn about scheduled jobs and how to use them. - -## What is a Scheduled Job? - -When building your commerce application, you may need to automate tasks and run them repeatedly at a specific schedule. For example, you need to automatically sync products to a third-party service once a day. - -In other commerce platforms, this feature isn't natively supported. Instead, you have to setup a separate application to execute cron jobs, which adds complexity as to how you expose this task to be executed in a cron job, or how do you debug it when it's not running within the platform's tooling. - -Medusa removes this overhead by supporting this feature natively with scheduled jobs. A scheduled job is an asynchronous function that the Medusa application runs at the interval you specify during the Medusa application's runtime. Your efforts are only spent on implementing the functionality performed by the job, such as syncing products to an ERP. - -- You want the action to execute at a specified schedule while the Medusa application **isn't** running. Instead, use the operating system's equivalent of a cron job. -- You want to execute the action once when the application loads. Use [loaders](https://docs.medusajs.com/learn/fundamentals/modules/loaders/index.html.md) instead. -- You want to execute the action if an event occurs. Use [subscribers](https://docs.medusajs.com/learn/fundamentals/events-and-subscribers/index.html.md) instead. - -*** - -## How to Create a Scheduled Job? - -You create a scheduled job in a TypeScript or JavaScript file under the `src/jobs` directory. The file exports the asynchronous function to run, and the configurations indicating the schedule to run the function. - -For example, create the file `src/jobs/hello-world.ts` with the following content: - -![Example of scheduled job file in the application's directory structure](https://res.cloudinary.com/dza7lstvk/image/upload/v1732866423/Medusa%20Book/scheduled-job-dir-overview_ediqgm.jpg) - -```ts title="src/jobs/hello-world.ts" highlights={highlights} -import { MedusaContainer } from "@medusajs/framework/types" - -export default async function greetingJob(container: MedusaContainer) { - const logger = container.resolve("logger") - - logger.info("Greeting!") -} - -export const config = { - name: "greeting-every-minute", - schedule: "* * * * *", -} -``` - -You export an asynchronous function that receives the [Medusa container](https://docs.medusajs.com/learn/fundamentals/medusa-container/index.html.md) as a parameter. In the function, you resolve the [Logger utility](https://docs.medusajs.com/learn/debugging-and-testing/logging/index.html.md) from the Medusa container and log a message. - -You also export a `config` object that has the following properties: - -- `name`: A unique name for the job. -- `schedule`: A string that holds a [cron expression](https://crontab.guru/) indicating the schedule to run the job. - -This scheduled job executes every minute and logs into the terminal `Greeting!`. - -### Test the Scheduled Job - -To test out your scheduled job, start the Medusa application: - -```bash npm2yarn -npm run dev -``` - -After a minute, the following message will be logged to the terminal: - -```bash -info: Greeting! -``` - -*** - -## Example: Sync Products Once a Day - -In this section, you'll find a brief example of how you use a scheduled job to sync products to a third-party service. - -When implementing flows spanning across systems or [modules](https://docs.medusajs.com/learn/fundamentals/modules/index.html.md), you use [workflows](https://docs.medusajs.com/learn/fundamentals/workflows/index.html.md). A workflow is a task made up of a series of steps, and you construct it like you would a regular function, but it's a special function that supports rollback mechanism in case of errors, background execution, and more. - -You can learn how to create a workflow in [this chapter](https://docs.medusajs.com/learn/fundamentals/workflows/index.html.md), but this example assumes you already have a `syncProductToErpWorkflow` implemented. To execute this workflow once a day, create a scheduled job at `src/jobs/sync-products.ts` with the following content: - -```ts title="src/jobs/sync-products.ts" -import { MedusaContainer } from "@medusajs/framework/types" -import { syncProductToErpWorkflow } from "../workflows/sync-products-to-erp" - -export default async function syncProductsJob(container: MedusaContainer) { - await syncProductToErpWorkflow(container) - .run() -} - -export const config = { - name: "sync-products-job", - schedule: "0 0 * * *", -} -``` - -In the scheduled job function, you execute the `syncProductToErpWorkflow` by invoking it and passing it the container, then invoking the `run` method. You also specify in the exported configurations the schedule `0 0 * * *` which indicates midnight time of every day. - -The next time you start the Medusa application, it will run this job every day at midnight. - - -# Worker Mode of Medusa Instance - -In this chapter, you'll learn about the different modes of running a Medusa instance and how to configure the mode. - -## What is Worker Mode? - -By default, the Medusa application runs both the server, which handles all incoming requests, and the worker, which processes background tasks, in a single process. While this setup is suitable for development, it is not optimal for production environments where background tasks can be long-running or resource-intensive. - -In a production environment, you should deploy two separate instances of your Medusa application: - -1. A server instance that handles incoming requests to the application's API routes. -2. A worker instance that processes background tasks. This includes scheduled jobs and subscribers. - -You don't need to set up different projects for each instance. Instead, you can configure the Medusa application to run in different modes based on environment variables, as you'll see later in this chapter. - -This separation ensures that the server instance remains responsive to incoming requests, while the worker instance processes tasks in the background. - -![Diagram showcasing how the server and worker work together](https://res.cloudinary.com/dza7lstvk/image/upload/fl_lossy/f_auto/r_16/ar_16:9,c_pad/v1/Medusa%20Book/medusa-worker_klkbch.jpg?_a=BATFJtAA0) - -*** - -## How to Set Worker Mode - -You can set the worker mode of your application using the `projectConfig.workerMode` configuration in the `medusa-config.ts`. The `workerMode` configuration accepts the following values: - -- `shared`: (default) run the application in a single process, meaning the worker and server run in the same process. -- `worker`: run a worker process only. -- `server`: run the application server only. - -Instead of creating different projects with different worker mode configurations, you can set the worker mode using an environment variable. Then, the worker mode configuration will change based on the environment variable. - -For example, set the worker mode in `medusa-config.ts` to the following: - -```ts title="medusa-config.ts" -module.exports = defineConfig({ - projectConfig: { - workerMode: process.env.WORKER_MODE || "shared", - // ... - }, - // ... -}) -``` - -You set the worker mode configuration to the `process.env.WORKER_MODE` environment variable and set a default value of `shared`. - -Then, in the deployed server Medusa instance, set `WORKER_MODE` to `server`, and in the worker Medusa instance, set `WORKER_MODE` to `worker`: - -### Server Medusa Instance - -```bash -WORKER_MODE=server -``` - -### Worker Medusa Instance - -```bash -WORKER_MODE=worker -``` - -### Disable Admin in Worker Mode - -Since the worker instance only processes background tasks, you should disable the admin interface in it. That will save resources in the worker instance. - -To disable the admin interface, set the `admin.disable` configuration in the `medusa-config.ts` file: - -```ts title="medusa-config.ts" -module.exports = defineConfig({ - admin: { - disable: process.env.ADMIN_DISABLED === "true" || - false, - }, - // ... -}) -``` - -Similar to before, you set the value in an environment variable, allowing you to enable or disable the admin interface based on the environment. - -Then, in the deployed server Medusa instance, set `ADMIN_DISABLED` to `false`, and in the worker Medusa instance, set `ADMIN_DISABLED` to `true`: - -### Server Medusa Instance - -```bash -ADMIN_DISABLED=false -``` - -### Worker Medusa Instance - -```bash -ADMIN_DISABLED=true -``` - - -# Workflows - -In this chapter, you’ll learn about workflows and how to define and execute them. - -## What is a Workflow? - -In digital commerce you typically have many systems involved in your operations. For example, you may have an ERP system that holds product master data and accounting reports, a CMS system for content, a CRM system for managing customer campaigns, a payment service to process credit cards, and so on. Sometimes you may even have custom built applications that need to participate in the commerce stack. One of the biggest challenges when operating a stack like this is ensuring consistency in the data spread across systems. - -Medusa has a built-in durable execution engine to help complete tasks that span multiple systems. You orchestrate your operations across systems in Medusa instead of having to manage it yourself. Other commerce platforms don't have this capability, which makes them a bottleneck to building customizations and iterating quickly. - -A workflow is a series of queries and actions, called steps, that complete a task. You construct a workflow similar to how you create a JavaScript function. - -However, unlike regular functions, workflows: - -- Create an internal representation of your steps, allowing you to track them and their progress. -- Support defining roll-back logic for each step, so that you can handle errors gracefully and your data remain consistent across systems. -- Perform long actions asynchronously, giving you control over when a step starts and finishes. - -You implement all custom flows within workflows, then execute them from [API routes](https://docs.medusajs.com/learn/fundamentals/api-routes/index.html.md), [subscribers](https://docs.medusajs.com/learn/fundamentals/events-and-subscribers/index.html.md), and [scheduled jobs](https://docs.medusajs.com/learn/fundamentals/scheduled-jobs/index.html.md). - -*** - -## How to Create and Execute a Workflow? - -### 1. Create the Steps - -A workflow is made of a series of steps. A step is created using `createStep` from the Workflows SDK. - -Create the file `src/workflows/hello-world.ts` with the following content: - -![Example of workflow file in the application's directory structure](https://res.cloudinary.com/dza7lstvk/image/upload/v1732866980/Medusa%20Book/workflow-dir-overview_xklukj.jpg) - -```ts title="src/workflows/hello-world.ts" highlights={step1Highlights} -import { createStep, StepResponse } from "@medusajs/framework/workflows-sdk" - -const step1 = createStep( - "step-1", - async () => { - return new StepResponse(`Hello from step one!`) - } -) -``` - -The `createStep` function accepts the step's unique name as a first parameter, and the step's function as a second parameter. - -Steps must return an instance of `StepResponse`, whose parameter is the data to return to the workflow executing the step. - -Steps can accept input parameters. For example, add the following to `src/workflows/hello-world.ts`: - -```ts title="src/workflows/hello-world.ts" highlights={step2Highlights} -type WorkflowInput = { - name: string -} - -const step2 = createStep( - "step-2", - async ({ name }: WorkflowInput) => { - return new StepResponse(`Hello ${name} from step two!`) - } -) -``` - -This adds another step whose function accepts as a parameter an object with a `name` property. - -### 2. Create a Workflow - -Next, add the following to the same file to create the workflow using the `createWorkflow` function: - -```ts title="src/workflows/hello-world.ts" highlights={workflowHighlights} -import { - // other imports... - createWorkflow, - WorkflowResponse, -} from "@medusajs/framework/workflows-sdk" - -// ... - -const myWorkflow = createWorkflow( - "hello-world", - function (input: WorkflowInput) { - const str1 = step1() - // to pass input - const str2 = step2(input) - - return new WorkflowResponse({ - message: str2, - }) - } -) - -export default myWorkflow -``` - -The `createWorkflow` function accepts the workflow's unique name as a first parameter, and the workflow's function as a second parameter. The workflow can accept input which is passed as a parameter to the function. - -The workflow must return an instance of `WorkflowResponse`, whose parameter is returned to workflow executors. - -### 3. Execute the Workflow - -You can execute a workflow from different customizations: - -- Execute in an API route to expose the workflow's functionalities to clients. -- Execute in a subscriber to use the workflow's functionalities when a commerce operation is performed. -- Execute in a scheduled job to run the workflow's functionalities automatically at a specified repeated interval. - -To execute the workflow, invoke it passing the [Medusa container](https://docs.medusajs.com/learn/fundamentals/medusa-container/index.html.md) as a parameter. Then, use its `run` method: - -### API Route - -```ts title="src/api/workflow/route.ts" highlights={[["11"], ["12"], ["13"], ["14"], ["15"], ["16"]]} collapsibleLines="1-6" expandButtonLabel="Show Imports" -import type { - MedusaRequest, - MedusaResponse, -} from "@medusajs/framework/http" -import myWorkflow from "../../workflows/hello-world" - -export async function GET( - req: MedusaRequest, - res: MedusaResponse -) { - const { result } = await myWorkflow(req.scope) - .run({ - input: { - name: "John", - }, - }) - - res.send(result) -} -``` - -### Subscriber - -```ts title="src/subscribers/order-placed.ts" highlights={[["11"], ["12"], ["13"], ["14"], ["15"], ["16"]]} collapsibleLines="1-6" expandButtonLabel="Show Imports" -import { - type SubscriberConfig, - type SubscriberArgs, -} from "@medusajs/framework" -import myWorkflow from "../workflows/hello-world" - -export default async function handleOrderPlaced({ - event: { data }, - container, -}: SubscriberArgs<{ id: string }>) { - const { result } = await myWorkflow(container) - .run({ - input: { - name: "John", - }, - }) - - console.log(result) -} - -export const config: SubscriberConfig = { - event: "order.placed", -} -``` - -### Scheduled Job - -```ts title="src/jobs/message-daily.ts" highlights={[["7"], ["8"], ["9"], ["10"], ["11"], ["12"]]} -import { MedusaContainer } from "@medusajs/framework/types" -import myWorkflow from "../workflows/hello-world" - -export default async function myCustomJob( - container: MedusaContainer -) { - const { result } = await myWorkflow(container) - .run({ - input: { - name: "John", - }, - }) - - console.log(result.message) -} - -export const config = { - name: "run-once-a-day", - schedule: `0 0 * * *`, -}; -``` - -### 4. Test Workflow - -To test out your workflow, start your Medusa application: - -```bash npm2yarn -npm run dev -``` - -Then, if you added the API route above, send a `GET` request to `/workflow`: - -```bash -curl http://localhost:9000/workflow -``` - -You’ll receive the following response: - -```json title="Example Response" -{ - "message": "Hello John from step two!" -} -``` - -*** - -## Access Medusa Container in Workflow Steps - -A step receives an object as a second parameter with configurations and context-related properties. One of these properties is the `container` property, which is the [Medusa container](https://docs.medusajs.com/learn/fundamentals/medusa-container/index.html.md) to allow you to resolve Framework and commerce tools in your application. - -For example, consider you want to implement a workflow that returns the total products in your application. Create the file `src/workflows/product-count.ts` with the following content: - -```ts title="src/workflows/product-count.ts" highlights={highlights} collapsibleLines="1-7" expandButtonLabel="Show Imports" -import { - createStep, - StepResponse, - createWorkflow, - WorkflowResponse, -} from "@medusajs/framework/workflows-sdk" - -const getProductCountStep = createStep( - "get-product-count", - async (_, { container }) => { - const productModuleService = container.resolve("product") - - const [, count] = await productModuleService.listAndCountProducts() - - return new StepResponse(count) - } -) - -const productCountWorkflow = createWorkflow( - "product-count", - function () { - const count = getProductCountStep() - - return new WorkflowResponse({ - count, - }) - } -) - -export default productCountWorkflow -``` - -In `getProductCountStep`, you use the `container` to resolve the Product Module's main service. Then, you use its `listAndCountProducts` method to retrieve the total count of products and return it in the step's response. You then execute this step in the `productCountWorkflow`. - -You can now execute this workflow in a custom API route, scheduled job, or subscriber to get the total count of products. - -Find a full list of the registered resources in the Medusa container and their registration key in [this reference](https://docs.medusajs.com/resources/medusa-container-resources/index.html.md). You can use these resources in your custom workflows. - - -# Usage Information - -At Medusa, we strive to provide the best experience for developers using our platform. For that reason, Medusa collects anonymous and non-sensitive data that provides a global understanding of how users are using Medusa. - -*** - -## Purpose - -As an open source solution, we work closely and constantly interact with our community to ensure that we provide the best experience for everyone using Medusa. - -We are capable of getting a general understanding of how developers use Medusa and what general issues they run into through different means such as our Discord server, GitHub issues and discussions, and occasional one-on-one sessions. - -However, although these methods can be insightful, they’re not enough to get a full and global understanding of how developers are using Medusa, especially in production. - -Collecting this data allows us to understand certain details such as: - -- What operating system do most Medusa developers use? -- What version of Medusa is widely used? -- What parts of the Medusa Admin are generally undiscovered by our users? -- How much data do users manage through our Medusa Admin? Is it being used for large number of products, orders, and other types of data? -- What Node version is globally used? Should we focus our efforts on providing support for versions that we don’t currently support? - -*** - -## Medusa Application Analytics - -This section covers which data in the Medusa application are collected and how to opt out of it. - -### Collected Data in the Medusa Application - -The following data is being collected on your Medusa application: - -- Unique project ID generated with UUID. -- Unique machine ID generated with UUID. -- Operating system information including Node version or operating system platform used. -- The version of the Medusa application and Medusa CLI are used. - -Data is only collected when the Medusa application is run with the command `medusa start`. - -### How to Opt Out - -If you prefer to disable data collection, you can do it either by setting the following environment variable to true: - -```bash -MEDUSA_DISABLE_TELEMETRY=true -``` - -Or, you can run the following command in the root of your Medusa application project to disable it: - -```bash -npx medusa telemetry --disable -``` - -*** - -## Admin Analytics - -This section covers which data in the admin are collected and how to opt out of it. - -### Collected Data in Admin - -Users have the option to [enable or disable the anonymization](#how-to-enable-anonymization) of the collected data. - -The following data is being collected on your admin: - -- The name of the store. -- The email of the user. -- The total number of products, orders, discounts, and users. -- The number of regions and their names. -- The currencies used in the store. -- Errors that occur while using the admin. - -### How to Enable Anonymization - -To enable anonymization of your data from the Medusa Admin: - -1. Go to Settings → Personal Information. -2. In the Usage insights section, click on the “Edit preferences” button. -3. Enable the "Anonymize my usage data” toggle. -4. Click on the “Submit and close” button. - -### How to Opt-Out - -To opt out of analytics collection in the Medusa Admin, set the following environment variable: - -```bash -MEDUSA_FF_ANALYTICS=false -``` - - # Guide: Create Brand API Route In the previous two chapters, you created a [Brand Module](https://docs.medusajs.com/learn/customization/custom-features/module/index.html.md) that added the concepts of brands to your application, then created a [workflow to create a brand](https://docs.medusajs.com/learn/customization/custom-features/workflow/index.html.md). In this chapter, you'll expose an API route that allows admin users to create a brand using the workflow from the previous chapter. @@ -4932,361 +4842,232 @@ Now that you have brands in your Medusa application, you want to associate a bra In the next chapters, you'll learn how to build associations between data models defined in different modules. -# Write Tests for Modules +# Usage Information -In this chapter, you'll learn about `moduleIntegrationTestRunner` from Medusa's Testing Framework and how to use it to write integration tests for a module's main service. - -### Prerequisites - -- [Testing Tools Setup](https://docs.medusajs.com/learn/debugging-and-testing/testing-tools/index.html.md) - -## moduleIntegrationTestRunner Utility - -`moduleIntegrationTestRunner` creates integration tests for a module. The integration tests run on a test Medusa application with only the specified module enabled. - -For example, assuming you have a `blog` module, create a test file at `src/modules/blog/__tests__/service.spec.ts`: - -```ts title="src/modules/blog/__tests__/service.spec.ts" -import { moduleIntegrationTestRunner } from "@medusajs/test-utils" -import { BLOG_MODULE } from ".." -import BlogModuleService from "../service" -import Post from "../models/post" - -moduleIntegrationTestRunner({ - moduleName: BLOG_MODULE, - moduleModels: [Post], - resolve: "./src/modules/blog", - testSuite: ({ service }) => { - // TODO write tests - }, -}) - -jest.setTimeout(60 * 1000) -``` - -The `moduleIntegrationTestRunner` function accepts as a parameter an object with the following properties: - -- `moduleName`: The name of the module. -- `moduleModels`: An array of models in the module. Refer to [this section](#write-tests-for-modules-without-data-models) if your module doesn't have data models. -- `resolve`: The path to the module's directory. -- `testSuite`: A function that defines the tests to run. - -The `testSuite` function accepts as a parameter an object having the `service` property, which is an instance of the module's main service. - -The type argument provided to the `moduleIntegrationTestRunner` function is used as the type of the `service` property. - -The tests in the `testSuite` function are written using [Jest](https://jestjs.io/). +At Medusa, we strive to provide the best experience for developers using our platform. For that reason, Medusa collects anonymous and non-sensitive data that provides a global understanding of how users are using Medusa. *** -## Run Tests +## Purpose -Run the following command to run your module integration tests: +As an open source solution, we work closely and constantly interact with our community to ensure that we provide the best experience for everyone using Medusa. -```bash npm2yarn -npm run test:integration:modules -``` +We are capable of getting a general understanding of how developers use Medusa and what general issues they run into through different means such as our Discord server, GitHub issues and discussions, and occasional one-on-one sessions. -If you don't have a `test:integration:modules` script in `package.json`, refer to the [Medusa Testing Tools chapter](https://docs.medusajs.com/learn/debugging-and-testing/testing-tools#add-test-commands/index.html.md). +However, although these methods can be insightful, they’re not enough to get a full and global understanding of how developers are using Medusa, especially in production. -This runs your Medusa application and runs the tests available in any `__tests__` directory under the `src/modules` directory. +Collecting this data allows us to understand certain details such as: + +- What operating system do most Medusa developers use? +- What version of Medusa is widely used? +- What parts of the Medusa Admin are generally undiscovered by our users? +- How much data do users manage through our Medusa Admin? Is it being used for large number of products, orders, and other types of data? +- What Node version is globally used? Should we focus our efforts on providing support for versions that we don’t currently support? *** -## Pass Module Options +## Medusa Application Analytics -If your module accepts options, you can set them using the `moduleOptions` property of the `moduleIntegrationTestRunner`'s parameter. +This section covers which data in the Medusa application are collected and how to opt out of it. -For example: +### Collected Data in the Medusa Application -```ts -import { moduleIntegrationTestRunner } from "@medusajs/test-utils" -import BlogModuleService from "../service" +The following data is being collected on your Medusa application: -moduleIntegrationTestRunner({ - moduleOptions: { - apiKey: "123", - }, - // ... -}) -``` +- Unique project ID generated with UUID. +- Unique machine ID generated with UUID. +- Operating system information including Node version or operating system platform used. +- The version of the Medusa application and Medusa CLI are used. -*** +Data is only collected when the Medusa application is run with the command `medusa start`. -## Write Tests for Modules without Data Models +### How to Opt Out -If your module doesn't have a data model, pass a dummy model in the `moduleModels` property. - -For example: - -```ts -import { moduleIntegrationTestRunner } from "@medusajs/test-utils" -import BlogModuleService from "../service" -import { model } from "@medusajs/framework/utils" - -const DummyModel = model.define("dummy_model", { - id: model.id().primaryKey(), -}) - -moduleIntegrationTestRunner({ - moduleModels: [DummyModel], - // ... -}) - -jest.setTimeout(60 * 1000) -``` - -*** - -### Other Options and Inputs - -Refer to [the Test Tooling Reference](https://docs.medusajs.com/resources/test-tools-reference/moduleIntegrationTestRunner/index.html.md) for other available parameter options and inputs of the `testSuite` function. - -*** - -## Database Used in Tests - -The `moduleIntegrationTestRunner` function creates a database with a random name before running the tests. Then, it drops that database after all the tests end. - -To manage that database, such as changing its name or perform operations on it in your tests, refer to [the Test Tooling Reference](https://docs.medusajs.com/resources/test-tools-reference/moduleIntegrationTestRunner/index.html.md). - - -# Write Integration Tests - -In this chapter, you'll learn about `medusaIntegrationTestRunner` from Medusa's Testing Framework and how to use it to write integration tests. - -### Prerequisites - -- [Testing Tools Setup](https://docs.medusajs.com/learn/debugging-and-testing/testing-tools/index.html.md) - -## medusaIntegrationTestRunner Utility - -The `medusaIntegrationTestRunner` is from Medusa's Testing Framework and it's used to create integration tests in your Medusa project. It runs a full Medusa application, allowing you test API routes, workflows, or other customizations. - -For example: - -```ts title="integration-tests/http/test.spec.ts" highlights={highlights} -import { medusaIntegrationTestRunner } from "@medusajs/test-utils" - -medusaIntegrationTestRunner({ - testSuite: ({ api, getContainer }) => { - // TODO write tests... - }, -}) - -jest.setTimeout(60 * 1000) -``` - -The `medusaIntegrationTestRunner` function accepts an object as a parameter. The object has a required property `testSuite`. - -`testSuite`'s value is a function that defines the tests to run. The function accepts as a parameter an object that has the following properties: - -- `api`: a set of utility methods used to send requests to the Medusa application. It has the following methods: - - `get`: Send a `GET` request to an API route. - - `post`: Send a `POST` request to an API route. - - `delete`: Send a `DELETE` request to an API route. -- `getContainer`: a function that retrieves the Medusa Container. Use the `getContainer().resolve` method to resolve resources from the Medusa Container. - -The tests in the `testSuite` function are written using [Jest](https://jestjs.io/). - -### Jest Timeout - -Since your tests connect to the database and perform actions that require more time than the typical tests, make sure to increase the timeout in your test: - -```ts title="integration-tests/http/test.spec.ts" -// in your test's file -jest.setTimeout(60 * 1000) -``` - -*** - -### Run Tests - -Run the following command to run your tests: - -```bash npm2yarn -npm run test:integration -``` - -If you don't have a `test:integration` script in `package.json`, refer to the [Medusa Testing Tools chapter](https://docs.medusajs.com/learn/debugging-and-testing/testing-tools#add-test-commands/index.html.md). - -This runs your Medusa application and runs the tests available under the `src/integrations/http` directory. - -*** - -## Other Options and Inputs - -Refer to [the Test Tooling Reference](https://docs.medusajs.com/resources/test-tools-reference/medusaIntegrationTestRunner/index.html.md) for other available parameter options and inputs of the `testSuite` function. - -*** - -## Database Used in Tests - -The `medusaIntegrationTestRunner` function creates a database with a random name before running the tests. Then, it drops that database after all the tests end. - -To manage that database, such as changing its name or perform operations on it in your tests, refer to [the Test Tooling Reference](https://docs.medusajs.com/resources/test-tools-reference/medusaIntegrationTestRunner/index.html.md). - -*** - -## Example Integration Tests - -The next chapters provide examples of writing integration tests for API routes and workflows. - - -# Guide: Implement Brand Module - -In this chapter, you'll build a Brand Module that adds a `brand` table to the database and provides data-management features for it. - -A module is a reusable package of functionalities related to a single domain or integration. Medusa comes with multiple pre-built modules for core commerce needs, such as the [Cart Module](https://docs.medusajs.com/resources/commerce-modules/cart/index.html.md) that holds the data models and business logic for cart operations. - -In a module, you create data models and business logic to manage them. In the next chapters, you'll see how you use the module to build commerce features. - -Learn more about modules in [this chapter](https://docs.medusajs.com/learn/fundamentals/modules/index.html.md). - -## 1. Create Module Directory - -Modules are created in a sub-directory of `src/modules`. So, start by creating the directory `src/modules/brand` that will hold the Brand Module's files. - -![Directory structure in Medusa project after adding the brand directory](https://res.cloudinary.com/dza7lstvk/image/upload/v1732868844/Medusa%20Book/brand-dir-overview-1_hxwvgx.jpg) - -*** - -## 2. Create Data Model - -A data model represents a table in the database. You create data models using Medusa's Data Model Language (DML). It simplifies defining a table's columns, relations, and indexes with straightforward methods and configurations. - -Learn more about data models in [this chapter](https://docs.medusajs.com/learn/fundamentals/modules#1-create-data-model/index.html.md). - -You create a data model in a TypeScript or JavaScript file under the `models` directory of a module. So, to create a data model that represents a new `brand` table in the database, create the file `src/modules/brand/models/brand.ts` with the following content: - -![Directory structure in module after adding the brand data model](https://res.cloudinary.com/dza7lstvk/image/upload/v1732868920/Medusa%20Book/brand-dir-overview-2_lexhdl.jpg) - -```ts title="src/modules/brand/models/brand.ts" -import { model } from "@medusajs/framework/utils" - -export const Brand = model.define("brand", { - id: model.id().primaryKey(), - name: model.text(), -}) -``` - -You create a `Brand` data model which has an `id` primary key property, and a `name` text property. - -You define the data model using the `define` method of the DML. It accepts two parameters: - -1. The first one is the name of the data model's table in the database. Use snake-case names. -2. The second is an object, which is the data model's schema. - -Learn about other property types in [this chapter](https://docs.medusajs.com/learn/fundamentals/data-models/properties/index.html.md). - -*** - -## 3. Create Module Service - -You perform database operations on your data models in a service, which is a class exported by the module and acts like an interface to its functionalities. - -In this step, you'll create the Brand Module's service that provides methods to manage the `Brand` data model. In the next chapters, you'll use this service when exposing custom features that involve managing brands. - -Learn more about services in [this chapter](https://docs.medusajs.com/learn/fundamentals/modules#2-create-service/index.html.md). - -You define a service in a `service.ts` or `service.js` file at the root of your module's directory. So, create the file `src/modules/brand/service.ts` with the following content: - -![Directory structure in module after adding the service](https://res.cloudinary.com/dza7lstvk/image/upload/v1732868984/Medusa%20Book/brand-dir-overview-3_jo7baj.jpg) - -```ts title="src/modules/brand/service.ts" highlights={serviceHighlights} -import { MedusaService } from "@medusajs/framework/utils" -import { Brand } from "./models/brand" - -class BrandModuleService extends MedusaService({ - Brand, -}) { - -} - -export default BrandModuleService -``` - -The `BrandModuleService` extends a class returned by `MedusaService` from the Modules SDK. This function generates a class with data-management methods for your module's data models. - -The `MedusaService` function receives an object of the module's data models as a parameter, and generates methods to manage those data models. So, the `BrandModuleService` now has methods like `createBrands` and `retrieveBrand` to manage the `Brand` data model. - -You'll use these methods in the [next chapter](https://docs.medusajs.com/learn/customization/custom-features/workflow/index.html.md). - -Find a reference of all generated methods in [this guide](https://docs.medusajs.com/resources/service-factory-reference/index.html.md). - -*** - -## 4. Export Module Definition - -A module must export a definition that tells Medusa the name of the module and its main service. This definition is exported in an `index.ts` file at the module's root directory. - -So, to export the Brand Module's definition, create the file `src/modules/brand/index.ts` with the following content: - -![Directory structure in module after adding the definition file](https://res.cloudinary.com/dza7lstvk/image/upload/v1732869045/Medusa%20Book/brand-dir-overview-4_nf8ymw.jpg) - -```ts title="src/modules/brand/index.ts" -import { Module } from "@medusajs/framework/utils" -import BrandModuleService from "./service" - -export const BRAND_MODULE = "brand" - -export default Module(BRAND_MODULE, { - service: BrandModuleService, -}) -``` - -You use `Module` from the Modules SDK to create the module's definition. It accepts two parameters: - -1. The module's name (`brand`). You'll use this name when you use this module in other customizations. -2. An object with a required property `service` indicating the module's main service. - -You export `BRAND_MODULE` to reference the module's name more reliably in other customizations. - -*** - -## 5. Add Module to Medusa's Configurations - -To start using your module, you must add it to Medusa's configurations in `medusa-config.ts`. - -The object passed to `defineConfig` in `medusa-config.ts` accepts a `modules` property, whose value is an array of modules to add to the application. So, add the following in `medusa-config.ts`: - -```ts title="medusa-config.ts" -module.exports = defineConfig({ - // ... - modules: [ - { - resolve: "./src/modules/brand", - }, - ], -}) -``` - -The Brand Module is now added to your Medusa application. You'll start using it in the [next chapter](https://docs.medusajs.com/learn/customization/custom-features/workflow/index.html.md). - -*** - -## 6. Generate and Run Migrations - -A migration is a TypeScript or JavaScript file that defines database changes made by a module. Migrations ensure that your module is re-usable and removes friction when working in a team, making it easy to reflect changes across team members' databases. - -Learn more about migrations in [this chapter](https://docs.medusajs.com/learn/fundamentals/modules#5-generate-migrations/index.html.md). - -[Medusa's CLI tool](https://docs.medusajs.com/resources/medusa-cli/index.html.md) allows you to generate migration files for your module, then run those migrations to reflect the changes in the database. So, run the following commands in your Medusa application's directory: +If you prefer to disable data collection, you can do it either by setting the following environment variable to true: ```bash -npx medusa db:generate brand -npx medusa db:migrate +MEDUSA_DISABLE_TELEMETRY=true ``` -The `db:generate` command accepts as an argument the name of the module to generate the migrations for, and the `db:migrate` command runs all migrations that haven't been run yet in the Medusa application. +Or, you can run the following command in the root of your Medusa application project to disable it: + +```bash +npx medusa telemetry --disable +``` *** -## Next Step: Create Brand Workflow +## Admin Analytics -The Brand Module now creates a `brand` table in the database and provides a class to manage its records. +This section covers which data in the admin are collected and how to opt out of it. -In the next chapter, you'll implement the functionality to create a brand in a workflow. You'll then use that workflow in a later chapter to expose an endpoint that allows admin users to create a brand. +### Collected Data in Admin + +Users have the option to [enable or disable the anonymization](#how-to-enable-anonymization) of the collected data. + +The following data is being collected on your admin: + +- The name of the store. +- The email of the user. +- The total number of products, orders, discounts, and users. +- The number of regions and their names. +- The currencies used in the store. +- Errors that occur while using the admin. + +### How to Enable Anonymization + +To enable anonymization of your data from the Medusa Admin: + +1. Go to Settings → Personal Information. +2. In the Usage insights section, click on the “Edit preferences” button. +3. Enable the "Anonymize my usage data” toggle. +4. Click on the “Submit and close” button. + +### How to Opt-Out + +To opt out of analytics collection in the Medusa Admin, set the following environment variable: + +```bash +MEDUSA_FF_ANALYTICS=false +``` + + +# Guide: Create Brand Workflow + +This chapter builds on the work from the [previous chapter](https://docs.medusajs.com/learn/customization/custom-features/module/index.html.md) where you created a Brand Module. + +After adding custom modules to your application, you build commerce features around them using workflows. A workflow is a series of queries and actions, called steps, that complete a task spanning across modules. You construct a workflow similar to a regular function, but it's a special function that allows you to define roll-back logic, retry configurations, and more advanced features. + +The workflow you'll create in this chapter will use the Brand Module's service to implement the feature of creating a brand. In the [next chapter](https://docs.medusajs.com/learn/customization/custom-features/api-route/index.html.md), you'll expose an API route that allows admin users to create a brand, and you'll use this workflow in the route's implementation. + +Learn more about workflows in [this chapter](https://docs.medusajs.com/learn/fundamentals/workflows/index.html.md). + +### Prerequisites + +- [Brand Module](https://docs.medusajs.com/learn/customization/custom-features/module/index.html.md) + +*** + +## 1. Create createBrandStep + +A workflow consists of a series of steps, each step created in a TypeScript or JavaScript file under the `src/workflows` directory. A step is defined using `createStep` from the Workflows SDK + +The workflow you're creating in this guide has one step to create the brand. So, create the file `src/workflows/create-brand.ts` with the following content: + +![Directory structure in the Medusa project after adding the file for createBrandStep](https://res.cloudinary.com/dza7lstvk/image/upload/v1732869184/Medusa%20Book/brand-workflow-dir-overview-1_fjvf5j.jpg) + +```ts title="src/workflows/create-brand.ts" +import { + createStep, + StepResponse, +} from "@medusajs/framework/workflows-sdk" +import { BRAND_MODULE } from "../modules/brand" +import BrandModuleService from "../modules/brand/service" + +export type CreateBrandStepInput = { + name: string +} + +export const createBrandStep = createStep( + "create-brand-step", + async (input: CreateBrandStepInput, { container }) => { + const brandModuleService: BrandModuleService = container.resolve( + BRAND_MODULE + ) + + const brand = await brandModuleService.createBrands(input) + + return new StepResponse(brand, brand.id) + } +) +``` + +You create a `createBrandStep` using the `createStep` function. It accepts the step's unique name as a first parameter, and the step's function as a second parameter. + +The step function receives two parameters: input passed to the step when it's invoked, and an object of general context and configurations. This object has a `container` property, which is the Medusa container. + +The [Medusa container](https://docs.medusajs.com/learn/fundamentals/medusa-container/index.html.md) is a registry of Framework and commerce tools accessible in your customizations, such as a workflow's step. The Medusa application registers the services of core and custom modules in the container, allowing you to resolve and use them. + +So, In the step function, you use the Medusa container to resolve the Brand Module's service and use its generated `createBrands` method, which accepts an object of brands to create. + +Learn more about the generated `create` method's usage in [this reference](https://docs.medusajs.com/resources/service-factory-reference/methods/create/index.html.md). + +A step must return an instance of `StepResponse`. Its first parameter is the data returned by the step, and the second is the data passed to the compensation function, which you'll learn about next. + +### Add Compensation Function to Step + +You define for each step a compensation function that's executed when an error occurs in the workflow. The compensation function defines the logic to roll-back the changes made by the step. This ensures your data remains consistent if an error occurs, which is especially useful when you integrate third-party services. + +Learn more about the compensation function in [this chapter](https://docs.medusajs.com/learn/fundamentals/workflows/compensation-function/index.html.md). + +To add a compensation function to the `createBrandStep`, pass it as a third parameter to `createStep`: + +```ts title="src/workflows/create-brand.ts" +export const createBrandStep = createStep( + // ... + async (id: string, { container }) => { + const brandModuleService: BrandModuleService = container.resolve( + BRAND_MODULE + ) + + await brandModuleService.deleteBrands(id) + } +) +``` + +The compensation function's first parameter is the brand's ID which you passed as a second parameter to the step function's returned `StepResponse`. It also accepts a context object with a `container` property as a second parameter, similar to the step function. + +In the compensation function, you resolve the Brand Module's service from the Medusa container, then use its generated `deleteBrands` method to delete the brand created by the step. This method accepts the ID of the brand to delete. + +Learn more about the generated `delete` method's usage in [this reference](https://docs.medusajs.com/resources/service-factory-reference/methods/delete/index.html.md). + +So, if an error occurs during the workflow's execution, the brand that was created by the step is deleted to maintain data consistency. + +*** + +## 2. Create createBrandWorkflow + +You can now create the workflow that runs the `createBrandStep`. A workflow is created in a TypeScript or JavaScript file under the `src/workflows` directory. In the file, you use `createWorkflow` from the Workflows SDK to create the workflow. + +Add the following content in the same `src/workflows/create-brand.ts` file: + +```ts title="src/workflows/create-brand.ts" +// other imports... +import { + // ... + createWorkflow, + WorkflowResponse, +} from "@medusajs/framework/workflows-sdk" + +// ... + +type CreateBrandWorkflowInput = { + name: string +} + +export const createBrandWorkflow = createWorkflow( + "create-brand", + (input: CreateBrandWorkflowInput) => { + const brand = createBrandStep(input) + + return new WorkflowResponse(brand) + } +) +``` + +You create the `createBrandWorkflow` using the `createWorkflow` function. This function accepts two parameters: the workflow's unique name, and the workflow's constructor function holding the workflow's implementation. + +The constructor function accepts the workflow's input as a parameter. In the function, you invoke the `createBrandStep` you created in the previous step to create a brand. + +A workflow must return an instance of `WorkflowResponse`. It accepts as a parameter the data to return to the workflow's executor. + +*** + +## Next Steps: Expose Create Brand API Route + +You now have a `createBrandWorkflow` that you can execute to create a brand. + +In the next chapter, you'll add an API route that allows admin users to create a brand. You'll learn how to create the API route, and execute in it the workflow you implemented in this chapter. # Create Brands UI Route in Admin @@ -5815,212 +5596,216 @@ The [Admin Components guides](https://docs.medusajs.com/resources/admin-componen In the next chapter, you'll add a UI route that displays the list of brands in your application and allows admin users. -# Guide: Create Brand Workflow +# Guide: Extend Create Product Flow -This chapter builds on the work from the [previous chapter](https://docs.medusajs.com/learn/customization/custom-features/module/index.html.md) where you created a Brand Module. +After linking the [custom Brand data model](https://docs.medusajs.com/learn/customization/custom-features/module/index.html.md) and Medusa's [Product Module](https://docs.medusajs.com/resources/commerce-modules/product/index.html.md) in the [previous chapter](https://docs.medusajs.com/learn/customization/extend-features/define-link/index.html.md), you'll extend the create product workflow and API route to allow associating a brand with a product. -After adding custom modules to your application, you build commerce features around them using workflows. A workflow is a series of queries and actions, called steps, that complete a task spanning across modules. You construct a workflow similar to a regular function, but it's a special function that allows you to define roll-back logic, retry configurations, and more advanced features. +Some API routes, including the [Create Product API route](https://docs.medusajs.com/api/admin#products_postproducts), accept an `additional_data` request body parameter. This parameter can hold custom data that's passed to the [hooks](https://docs.medusajs.com/learn/fundamentals/workflows/workflow-hooks/index.html.md) of the workflow executed in the API route, allowing you to consume those hooks and perform actions with the custom data. -The workflow you'll create in this chapter will use the Brand Module's service to implement the feature of creating a brand. In the [next chapter](https://docs.medusajs.com/learn/customization/custom-features/api-route/index.html.md), you'll expose an API route that allows admin users to create a brand, and you'll use this workflow in the route's implementation. +So, in this chapter, to extend the create product flow and associate a brand with a product, you will: -Learn more about workflows in [this chapter](https://docs.medusajs.com/learn/fundamentals/workflows/index.html.md). +- Consume the [productsCreated](https://docs.medusajs.com/resources/references/medusa-workflows/createProductsWorkflow#productsCreated/index.html.md) hook of the [createProductsWorkflow](https://docs.medusajs.com/resources/references/medusa-workflows/createProductsWorkflow/index.html.md), which is executed within the workflow after the product is created. You'll link the product with the brand passed in the `additional_data` parameter. +- Extend the Create Product API route to allow passing a brand ID in `additional_data`. + +To learn more about the `additional_data` property and the API routes that accept additional data, refer to [this chapter](https://docs.medusajs.com/learn/fundamentals/api-routes/additional-data/index.html.md). ### Prerequisites - [Brand Module](https://docs.medusajs.com/learn/customization/custom-features/module/index.html.md) +- [Defined link between the Brand and Product data models.](https://docs.medusajs.com/learn/customization/extend-features/define-link/index.html.md) *** -## 1. Create createBrandStep +## 1. Consume the productsCreated Hook -A workflow consists of a series of steps, each step created in a TypeScript or JavaScript file under the `src/workflows` directory. A step is defined using `createStep` from the Workflows SDK +A workflow hook is a point in a workflow where you can inject a step to perform a custom functionality. Consuming a workflow hook allows you to extend the features of a workflow and, consequently, the API route that uses it. -The workflow you're creating in this guide has one step to create the brand. So, create the file `src/workflows/create-brand.ts` with the following content: +Learn more about the workflow hooks in [this chapter](https://docs.medusajs.com/learn/fundamentals/workflows/workflow-hooks/index.html.md). -![Directory structure in the Medusa project after adding the file for createBrandStep](https://res.cloudinary.com/dza7lstvk/image/upload/v1732869184/Medusa%20Book/brand-workflow-dir-overview-1_fjvf5j.jpg) +The [createProductsWorkflow](https://docs.medusajs.com/resources/references/medusa-workflows/createProductsWorkflow/index.html.md) used in the [Create Product API route](https://docs.medusajs.com/api/admin#products_postproducts) has a `productsCreated` hook that runs after the product is created. You'll consume this hook to link the created product with the brand specified in the request parameters. -```ts title="src/workflows/create-brand.ts" -import { - createStep, - StepResponse, -} from "@medusajs/framework/workflows-sdk" -import { BRAND_MODULE } from "../modules/brand" -import BrandModuleService from "../modules/brand/service" +To consume the `productsCreated` hook, create the file `src/workflows/hooks/created-product.ts` with the following content: -export type CreateBrandStepInput = { - name: string +![Directory structure after creating the hook's file.](https://res.cloudinary.com/dza7lstvk/image/upload/v1733384338/Medusa%20Book/brands-hook-dir-overview_ltwr5h.jpg) + +```ts title="src/workflows/hooks/created-product.ts" highlights={hook1Highlights} +import { createProductsWorkflow } from "@medusajs/medusa/core-flows" +import { StepResponse } from "@medusajs/framework/workflows-sdk" +import { Modules } from "@medusajs/framework/utils" +import { LinkDefinition } from "@medusajs/framework/types" +import { BRAND_MODULE } from "../../modules/brand" +import BrandModuleService from "../../modules/brand/service" + +createProductsWorkflow.hooks.productsCreated( + (async ({ products, additional_data }, { container }) => { + if (!additional_data?.brand_id) { + return new StepResponse([], []) + } + + const brandModuleService: BrandModuleService = container.resolve( + BRAND_MODULE + ) + // if the brand doesn't exist, an error is thrown. + await brandModuleService.retrieveBrand(additional_data.brand_id as string) + + // TODO link brand to product + }) +) +``` + +Workflows have a special `hooks` property to access its hooks and consume them. Each hook, such as `productsCreated`, accepts a step function as a parameter. The step function accepts the following parameters: + +1. An object having an `additional_data` property, which is the custom data passed in the request body under `additional_data`. The object will also have properties passed from the workflow to the hook, which in this case is the `products` property that holds an array of the created products. +2. An object of properties related to the step's context. It has a `container` property whose value is the [Medusa container](https://docs.medusajs.com/learn/fundamentals/medusa-container/index.html.md) to resolve Framework and commerce tools. + +In the step, if a brand ID is passed in `additional_data`, you resolve the Brand Module's service and use its generated `retrieveBrand` method to retrieve the brand by its ID. The `retrieveBrand` method will throw an error if the brand doesn't exist. + +### Link Brand to Product + +Next, you want to create a link between the created products and the brand. To do so, you use Link, which is a class from the Modules SDK that provides methods to manage linked records. + +Learn more about Link in [this chapter](https://docs.medusajs.com/learn/fundamentals/module-links/link/index.html.md). + +To use Link in the `productsCreated` hook, replace the `TODO` with the following: + +```ts title="src/workflows/hooks/created-product.ts" highlights={hook2Highlights} +const link = container.resolve("link") +const logger = container.resolve("logger") + +const links: LinkDefinition[] = [] + +for (const product of products) { + links.push({ + [Modules.PRODUCT]: { + product_id: product.id, + }, + [BRAND_MODULE]: { + brand_id: additional_data.brand_id, + }, + }) } -export const createBrandStep = createStep( - "create-brand-step", - async (input: CreateBrandStepInput, { container }) => { - const brandModuleService: BrandModuleService = container.resolve( - BRAND_MODULE - ) +await link.create(links) - const brand = await brandModuleService.createBrands(input) +logger.info("Linked brand to products") - return new StepResponse(brand, brand.id) - } -) +return new StepResponse(links, links) ``` -You create a `createBrandStep` using the `createStep` function. It accepts the step's unique name as a first parameter, and the step's function as a second parameter. +You resolve Link from the container. Then you loop over the created products to assemble an array of links to be created. After that, you pass the array of links to Link's `create` method, which will link the product and brand records. -The step function receives two parameters: input passed to the step when it's invoked, and an object of general context and configurations. This object has a `container` property, which is the Medusa container. +Each property in the link object is the name of a module, and its value is an object having a `{model_name}_id` property, where `{model_name}` is the snake-case name of the module's data model. Its value is the ID of the record to be linked. The link object's properties must be set in the same order as the link configurations passed to `defineLink`. -The [Medusa container](https://docs.medusajs.com/learn/fundamentals/medusa-container/index.html.md) is a registry of Framework and commerce tools accessible in your customizations, such as a workflow's step. The Medusa application registers the services of core and custom modules in the container, allowing you to resolve and use them. +![Diagram showcasing how the order of defining a link affects creating the link](https://res.cloudinary.com/dza7lstvk/image/upload/v1733386156/Medusa%20Book/remote-link-brand-product-exp_fhjmg4.jpg) -So, In the step function, you use the Medusa container to resolve the Brand Module's service and use its generated `createBrands` method, which accepts an object of brands to create. +Finally, you return an instance of `StepResponse` returning the created links. -Learn more about the generated `create` method's usage in [this reference](https://docs.medusajs.com/resources/service-factory-reference/methods/create/index.html.md). +### Dismiss Links in Compensation -A step must return an instance of `StepResponse`. Its first parameter is the data returned by the step, and the second is the data passed to the compensation function, which you'll learn about next. +You can pass as a second parameter of the hook a compensation function that undoes what the step did. It receives as a first parameter the returned `StepResponse`'s second parameter, and the step context object as a second parameter. -### Add Compensation Function to Step +To undo creating the links in the hook, pass the following compensation function as a second parameter to `productsCreated`: -You define for each step a compensation function that's executed when an error occurs in the workflow. The compensation function defines the logic to roll-back the changes made by the step. This ensures your data remains consistent if an error occurs, which is especially useful when you integrate third-party services. - -Learn more about the compensation function in [this chapter](https://docs.medusajs.com/learn/fundamentals/workflows/compensation-function/index.html.md). - -To add a compensation function to the `createBrandStep`, pass it as a third parameter to `createStep`: - -```ts title="src/workflows/create-brand.ts" -export const createBrandStep = createStep( +```ts title="src/workflows/hooks/created-product.ts" +createProductsWorkflow.hooks.productsCreated( // ... - async (id: string, { container }) => { - const brandModuleService: BrandModuleService = container.resolve( - BRAND_MODULE - ) + (async (links, { container }) => { + if (!links?.length) { + return + } - await brandModuleService.deleteBrands(id) - } + const link = container.resolve("link") + + await link.dismiss(links) + }) ) ``` -The compensation function's first parameter is the brand's ID which you passed as a second parameter to the step function's returned `StepResponse`. It also accepts a context object with a `container` property as a second parameter, similar to the step function. - -In the compensation function, you resolve the Brand Module's service from the Medusa container, then use its generated `deleteBrands` method to delete the brand created by the step. This method accepts the ID of the brand to delete. - -Learn more about the generated `delete` method's usage in [this reference](https://docs.medusajs.com/resources/service-factory-reference/methods/delete/index.html.md). - -So, if an error occurs during the workflow's execution, the brand that was created by the step is deleted to maintain data consistency. +In the compensation function, if the `links` parameter isn't empty, you resolve Link from the container and use its `dismiss` method. This method removes a link between two records. It accepts the same parameter as the `create` method. *** -## 2. Create createBrandWorkflow +## 2. Configure Additional Data Validation -You can now create the workflow that runs the `createBrandStep`. A workflow is created in a TypeScript or JavaScript file under the `src/workflows` directory. In the file, you use `createWorkflow` from the Workflows SDK to create the workflow. +Now that you've consumed the `productsCreated` hook, you want to configure the `/admin/products` API route that creates a new product to accept a brand ID in its `additional_data` parameter. -Add the following content in the same `src/workflows/create-brand.ts` file: +You configure the properties accepted in `additional_data` in the `src/api/middlewares.ts` that exports middleware configurations. So, create the file (or, if already existing, add to the file) `src/api/middlewares.ts` the following content: -```ts title="src/workflows/create-brand.ts" -// other imports... -import { - // ... - createWorkflow, - WorkflowResponse, -} from "@medusajs/framework/workflows-sdk" +![Directory structure after adding the middelwares file](https://res.cloudinary.com/dza7lstvk/image/upload/v1733386868/Medusa%20Book/brands-middleware-dir-overview_uczos1.jpg) + +```ts title="src/api/middlewares.ts" +import { defineMiddlewares } from "@medusajs/framework/http" +import { z } from "zod" // ... -type CreateBrandWorkflowInput = { - name: string -} - -export const createBrandWorkflow = createWorkflow( - "create-brand", - (input: CreateBrandWorkflowInput) => { - const brand = createBrandStep(input) - - return new WorkflowResponse(brand) - } -) +export default defineMiddlewares({ + routes: [ + // ... + { + matcher: "/admin/products", + method: ["POST"], + additionalDataValidator: { + brand_id: z.string().optional(), + }, + }, + ], +}) ``` -You create the `createBrandWorkflow` using the `createWorkflow` function. This function accepts two parameters: the workflow's unique name, and the workflow's constructor function holding the workflow's implementation. +Objects in `routes` accept an `additionalDataValidator` property that configures the validation rules for custom properties passed in the `additional_data` request parameter. It accepts an object whose keys are custom property names, and their values are validation rules created using [Zod](https://zod.dev/). -The constructor function accepts the workflow's input as a parameter. In the function, you invoke the `createBrandStep` you created in the previous step to create a brand. - -A workflow must return an instance of `WorkflowResponse`. It accepts as a parameter the data to return to the workflow's executor. +So, `POST` requests sent to `/admin/products` can now pass the ID of a brand in the `brand_id` property of `additional_data`. *** -## Next Steps: Expose Create Brand API Route +## Test it Out -You now have a `createBrandWorkflow` that you can execute to create a brand. - -In the next chapter, you'll add an API route that allows admin users to create a brand. You'll learn how to create the API route, and execute in it the workflow you implemented in this chapter. - - -# Guide: Define Module Link Between Brand and Product - -In this chapter, you'll learn how to define a module link between a brand defined in the [custom Brand Module](https://docs.medusajs.com/learn/customization/custom-features/module/index.html.md), and a product defined in the [Product Module](https://docs.medusajs.com/resources/commerce-modules/product/index.html.md) that's available in your Medusa application out-of-the-box. - -Modules are [isolated](https://docs.medusajs.com/learn/fundamentals/modules/isolation/index.html.md) from other resources, ensuring that they're integrated into the Medusa application without side effects. However, you may need to associate data models of different modules, or you're trying to extend data models from Commerce Modules with custom properties. To do that, you define module links. - -A module link forms an association between two data models of different modules while maintaining module isolation. You can then manage and query linked records of the data models using Medusa's Modules SDK. - -In this chapter, you'll define a module link between the `Brand` data model of the Brand Module, and the `Product` data model of the Product Module. In later chapters, you'll manage and retrieve linked product and brand records. - -Learn more about module links in [this chapters](https://docs.medusajs.com/learn/fundamentals/module-links/index.html.md). - -### Prerequisites - -- [Brand Module having a Brand data model](https://docs.medusajs.com/learn/customization/custom-features/module/index.html.md) - -## 1. Define Link - -Links are defined in a TypeScript or JavaScript file under the `src/links` directory. The file defines and exports the link using `defineLink` from the Modules SDK. - -So, to define a link between the `Product` and `Brand` models, create the file `src/links/product-brand.ts` with the following content: - -![The directory structure of the Medusa application after adding the link.](https://res.cloudinary.com/dza7lstvk/image/upload/v1733329897/Medusa%20Book/brands-link-dir-overview_t1rhlp.jpg) - -```ts title="src/links/product-brand.ts" highlights={highlights} -import BrandModule from "../modules/brand" -import ProductModule from "@medusajs/medusa/product" -import { defineLink } from "@medusajs/framework/utils" - -export default defineLink( - { - linkable: ProductModule.linkable.product, - isList: true, - }, - BrandModule.linkable.brand -) -``` - -You import each module's definition object from the `index.ts` file of the module's directory. Each module object has a special `linkable` property that holds the data models' link configurations. - -The `defineLink` function accepts two parameters of the same type, which is either: - -- The data model's link configuration, which you access from the Module's `linkable` property; -- Or an object that has two properties: - - `linkable`: the data model's link configuration, which you access from the Module's `linkable` property. - - `isList`: A boolean indicating whether many records of the data model can be linked to the other model. - -So, in the above code snippet, you define a link between the `Product` and `Brand` data models. Since a brand can be associated with multiple products, you enable `isList` in the `Product` model's object. - -*** - -## 2. Sync the Link to the Database - -A module link is represented in the database as a table that stores the IDs of linked records. So, after defining the link, run the following command to create the module link's table in the database: +To test it out, first, retrieve the authentication token of your admin user by sending a `POST` request to `/auth/user/emailpass`: ```bash -npx medusa db:migrate +curl -X POST 'http://localhost:9000/auth/user/emailpass' \ +-H 'Content-Type: application/json' \ +--data-raw '{ + "email": "admin@medusa-test.com", + "password": "supersecret" +}' ``` -This command reflects migrations on the database and syncs module links, which creates a table for the `product-brand` link. +Make sure to replace the email and password in the request body with your user's credentials. -You can also run the `npx medusa db:sync-links` to just sync module links without running migrations. +Then, send a `POST` request to `/admin/products` to create a product, and pass in the `additional_data` parameter a brand's ID: + +```bash +curl -X POST 'http://localhost:9000/admin/products' \ +-H 'Content-Type: application/json' \ +-H 'Authorization: Bearer {token}' \ +--data '{ + "title": "Product 1", + "options": [ + { + "title": "Default option", + "values": ["Default option value"] + } + ], + "shipping_profile_id": "{shipping_profile_id}", + "additional_data": { + "brand_id": "{brand_id}" + } +}' +``` + +Make sure to replace `{token}` with the token you received from the previous request, `shipping_profile_id` with the ID of a shipping profile in your application, and `{brand_id}` with the ID of a brand in your application. You can retrieve the ID of a shipping profile either from the Medusa Admin, or the [List Shipping Profiles API route](https://docs.medusajs.com/api/admin#shipping-profiles_getshippingprofiles). + +The request creates a product and returns it. + +In the Medusa application's logs, you'll find the message `Linked brand to products`, indicating that the workflow hook handler ran and linked the brand to the products. *** -## Next Steps: Extend Create Product Flow +## Next Steps: Query Linked Brands and Products -In the next chapter, you'll extend Medusa's workflow and API route that create a product to allow associating a brand with a product. You'll also learn how to link brand and product records. +Now that you've extending the create-product flow to link a brand to it, you want to retrieve the brand details of a product. You'll learn how to do so in the next chapter. # Guide: Query Product's Brands @@ -6443,216 +6228,230 @@ info: API Key: "123" You can also automate syncing data from a third-party system to Medusa at a regular interval. In the next chapter, you'll learn how to sync brands from the third-party CMS to Medusa once a day. -# Guide: Extend Create Product Flow +# Guide: Define Module Link Between Brand and Product -After linking the [custom Brand data model](https://docs.medusajs.com/learn/customization/custom-features/module/index.html.md) and Medusa's [Product Module](https://docs.medusajs.com/resources/commerce-modules/product/index.html.md) in the [previous chapter](https://docs.medusajs.com/learn/customization/extend-features/define-link/index.html.md), you'll extend the create product workflow and API route to allow associating a brand with a product. +In this chapter, you'll learn how to define a module link between a brand defined in the [custom Brand Module](https://docs.medusajs.com/learn/customization/custom-features/module/index.html.md), and a product defined in the [Product Module](https://docs.medusajs.com/resources/commerce-modules/product/index.html.md) that's available in your Medusa application out-of-the-box. -Some API routes, including the [Create Product API route](https://docs.medusajs.com/api/admin#products_postproducts), accept an `additional_data` request body parameter. This parameter can hold custom data that's passed to the [hooks](https://docs.medusajs.com/learn/fundamentals/workflows/workflow-hooks/index.html.md) of the workflow executed in the API route, allowing you to consume those hooks and perform actions with the custom data. +Modules are [isolated](https://docs.medusajs.com/learn/fundamentals/modules/isolation/index.html.md) from other resources, ensuring that they're integrated into the Medusa application without side effects. However, you may need to associate data models of different modules, or you're trying to extend data models from Commerce Modules with custom properties. To do that, you define module links. -So, in this chapter, to extend the create product flow and associate a brand with a product, you will: +A module link forms an association between two data models of different modules while maintaining module isolation. You can then manage and query linked records of the data models using Medusa's Modules SDK. -- Consume the [productsCreated](https://docs.medusajs.com/resources/references/medusa-workflows/createProductsWorkflow#productsCreated/index.html.md) hook of the [createProductsWorkflow](https://docs.medusajs.com/resources/references/medusa-workflows/createProductsWorkflow/index.html.md), which is executed within the workflow after the product is created. You'll link the product with the brand passed in the `additional_data` parameter. -- Extend the Create Product API route to allow passing a brand ID in `additional_data`. +In this chapter, you'll define a module link between the `Brand` data model of the Brand Module, and the `Product` data model of the Product Module. In later chapters, you'll manage and retrieve linked product and brand records. -To learn more about the `additional_data` property and the API routes that accept additional data, refer to [this chapter](https://docs.medusajs.com/learn/fundamentals/api-routes/additional-data/index.html.md). +Learn more about module links in [this chapters](https://docs.medusajs.com/learn/fundamentals/module-links/index.html.md). ### Prerequisites -- [Brand Module](https://docs.medusajs.com/learn/customization/custom-features/module/index.html.md) -- [Defined link between the Brand and Product data models.](https://docs.medusajs.com/learn/customization/extend-features/define-link/index.html.md) +- [Brand Module having a Brand data model](https://docs.medusajs.com/learn/customization/custom-features/module/index.html.md) -*** +## 1. Define Link -## 1. Consume the productsCreated Hook +Links are defined in a TypeScript or JavaScript file under the `src/links` directory. The file defines and exports the link using `defineLink` from the Modules SDK. -A workflow hook is a point in a workflow where you can inject a step to perform a custom functionality. Consuming a workflow hook allows you to extend the features of a workflow and, consequently, the API route that uses it. +So, to define a link between the `Product` and `Brand` models, create the file `src/links/product-brand.ts` with the following content: -Learn more about the workflow hooks in [this chapter](https://docs.medusajs.com/learn/fundamentals/workflows/workflow-hooks/index.html.md). +![The directory structure of the Medusa application after adding the link.](https://res.cloudinary.com/dza7lstvk/image/upload/v1733329897/Medusa%20Book/brands-link-dir-overview_t1rhlp.jpg) -The [createProductsWorkflow](https://docs.medusajs.com/resources/references/medusa-workflows/createProductsWorkflow/index.html.md) used in the [Create Product API route](https://docs.medusajs.com/api/admin#products_postproducts) has a `productsCreated` hook that runs after the product is created. You'll consume this hook to link the created product with the brand specified in the request parameters. +```ts title="src/links/product-brand.ts" highlights={highlights} +import BrandModule from "../modules/brand" +import ProductModule from "@medusajs/medusa/product" +import { defineLink } from "@medusajs/framework/utils" -To consume the `productsCreated` hook, create the file `src/workflows/hooks/created-product.ts` with the following content: - -![Directory structure after creating the hook's file.](https://res.cloudinary.com/dza7lstvk/image/upload/v1733384338/Medusa%20Book/brands-hook-dir-overview_ltwr5h.jpg) - -```ts title="src/workflows/hooks/created-product.ts" highlights={hook1Highlights} -import { createProductsWorkflow } from "@medusajs/medusa/core-flows" -import { StepResponse } from "@medusajs/framework/workflows-sdk" -import { Modules } from "@medusajs/framework/utils" -import { LinkDefinition } from "@medusajs/framework/types" -import { BRAND_MODULE } from "../../modules/brand" -import BrandModuleService from "../../modules/brand/service" - -createProductsWorkflow.hooks.productsCreated( - (async ({ products, additional_data }, { container }) => { - if (!additional_data?.brand_id) { - return new StepResponse([], []) - } - - const brandModuleService: BrandModuleService = container.resolve( - BRAND_MODULE - ) - // if the brand doesn't exist, an error is thrown. - await brandModuleService.retrieveBrand(additional_data.brand_id as string) - - // TODO link brand to product - }) +export default defineLink( + { + linkable: ProductModule.linkable.product, + isList: true, + }, + BrandModule.linkable.brand ) ``` -Workflows have a special `hooks` property to access its hooks and consume them. Each hook, such as `productsCreated`, accepts a step function as a parameter. The step function accepts the following parameters: +You import each module's definition object from the `index.ts` file of the module's directory. Each module object has a special `linkable` property that holds the data models' link configurations. -1. An object having an `additional_data` property, which is the custom data passed in the request body under `additional_data`. The object will also have properties passed from the workflow to the hook, which in this case is the `products` property that holds an array of the created products. -2. An object of properties related to the step's context. It has a `container` property whose value is the [Medusa container](https://docs.medusajs.com/learn/fundamentals/medusa-container/index.html.md) to resolve Framework and commerce tools. +The `defineLink` function accepts two parameters of the same type, which is either: -In the step, if a brand ID is passed in `additional_data`, you resolve the Brand Module's service and use its generated `retrieveBrand` method to retrieve the brand by its ID. The `retrieveBrand` method will throw an error if the brand doesn't exist. +- The data model's link configuration, which you access from the Module's `linkable` property; +- Or an object that has two properties: + - `linkable`: the data model's link configuration, which you access from the Module's `linkable` property. + - `isList`: A boolean indicating whether many records of the data model can be linked to the other model. -### Link Brand to Product +So, in the above code snippet, you define a link between the `Product` and `Brand` data models. Since a brand can be associated with multiple products, you enable `isList` in the `Product` model's object. -Next, you want to create a link between the created products and the brand. To do so, you use Link, which is a class from the Modules SDK that provides methods to manage linked records. +*** -Learn more about Link in [this chapter](https://docs.medusajs.com/learn/fundamentals/module-links/link/index.html.md). +## 2. Sync the Link to the Database -To use Link in the `productsCreated` hook, replace the `TODO` with the following: +A module link is represented in the database as a table that stores the IDs of linked records. So, after defining the link, run the following command to create the module link's table in the database: -```ts title="src/workflows/hooks/created-product.ts" highlights={hook2Highlights} -const link = container.resolve("link") -const logger = container.resolve("logger") +```bash +npx medusa db:migrate +``` -const links: LinkDefinition[] = [] +This command reflects migrations on the database and syncs module links, which creates a table for the `product-brand` link. + +You can also run the `npx medusa db:sync-links` to just sync module links without running migrations. + +*** + +## Next Steps: Extend Create Product Flow + +In the next chapter, you'll extend Medusa's workflow and API route that create a product to allow associating a brand with a product. You'll also learn how to link brand and product records. + + +# Guide: Implement Brand Module + +In this chapter, you'll build a Brand Module that adds a `brand` table to the database and provides data-management features for it. + +A module is a reusable package of functionalities related to a single domain or integration. Medusa comes with multiple pre-built modules for core commerce needs, such as the [Cart Module](https://docs.medusajs.com/resources/commerce-modules/cart/index.html.md) that holds the data models and business logic for cart operations. + +In a module, you create data models and business logic to manage them. In the next chapters, you'll see how you use the module to build commerce features. + +Learn more about modules in [this chapter](https://docs.medusajs.com/learn/fundamentals/modules/index.html.md). + +## 1. Create Module Directory + +Modules are created in a sub-directory of `src/modules`. So, start by creating the directory `src/modules/brand` that will hold the Brand Module's files. + +![Directory structure in Medusa project after adding the brand directory](https://res.cloudinary.com/dza7lstvk/image/upload/v1732868844/Medusa%20Book/brand-dir-overview-1_hxwvgx.jpg) + +*** + +## 2. Create Data Model + +A data model represents a table in the database. You create data models using Medusa's Data Model Language (DML). It simplifies defining a table's columns, relations, and indexes with straightforward methods and configurations. + +Learn more about data models in [this chapter](https://docs.medusajs.com/learn/fundamentals/modules#1-create-data-model/index.html.md). + +You create a data model in a TypeScript or JavaScript file under the `models` directory of a module. So, to create a data model that represents a new `brand` table in the database, create the file `src/modules/brand/models/brand.ts` with the following content: + +![Directory structure in module after adding the brand data model](https://res.cloudinary.com/dza7lstvk/image/upload/v1732868920/Medusa%20Book/brand-dir-overview-2_lexhdl.jpg) + +```ts title="src/modules/brand/models/brand.ts" +import { model } from "@medusajs/framework/utils" + +export const Brand = model.define("brand", { + id: model.id().primaryKey(), + name: model.text(), +}) +``` + +You create a `Brand` data model which has an `id` primary key property, and a `name` text property. + +You define the data model using the `define` method of the DML. It accepts two parameters: + +1. The first one is the name of the data model's table in the database. Use snake-case names. +2. The second is an object, which is the data model's schema. + +Learn about other property types in [this chapter](https://docs.medusajs.com/learn/fundamentals/data-models/properties/index.html.md). + +*** + +## 3. Create Module Service + +You perform database operations on your data models in a service, which is a class exported by the module and acts like an interface to its functionalities. + +In this step, you'll create the Brand Module's service that provides methods to manage the `Brand` data model. In the next chapters, you'll use this service when exposing custom features that involve managing brands. + +Learn more about services in [this chapter](https://docs.medusajs.com/learn/fundamentals/modules#2-create-service/index.html.md). + +You define a service in a `service.ts` or `service.js` file at the root of your module's directory. So, create the file `src/modules/brand/service.ts` with the following content: + +![Directory structure in module after adding the service](https://res.cloudinary.com/dza7lstvk/image/upload/v1732868984/Medusa%20Book/brand-dir-overview-3_jo7baj.jpg) + +```ts title="src/modules/brand/service.ts" highlights={serviceHighlights} +import { MedusaService } from "@medusajs/framework/utils" +import { Brand } from "./models/brand" + +class BrandModuleService extends MedusaService({ + Brand, +}) { -for (const product of products) { - links.push({ - [Modules.PRODUCT]: { - product_id: product.id, - }, - [BRAND_MODULE]: { - brand_id: additional_data.brand_id, - }, - }) } -await link.create(links) - -logger.info("Linked brand to products") - -return new StepResponse(links, links) +export default BrandModuleService ``` -You resolve Link from the container. Then you loop over the created products to assemble an array of links to be created. After that, you pass the array of links to Link's `create` method, which will link the product and brand records. +The `BrandModuleService` extends a class returned by `MedusaService` from the Modules SDK. This function generates a class with data-management methods for your module's data models. -Each property in the link object is the name of a module, and its value is an object having a `{model_name}_id` property, where `{model_name}` is the snake-case name of the module's data model. Its value is the ID of the record to be linked. The link object's properties must be set in the same order as the link configurations passed to `defineLink`. +The `MedusaService` function receives an object of the module's data models as a parameter, and generates methods to manage those data models. So, the `BrandModuleService` now has methods like `createBrands` and `retrieveBrand` to manage the `Brand` data model. -![Diagram showcasing how the order of defining a link affects creating the link](https://res.cloudinary.com/dza7lstvk/image/upload/v1733386156/Medusa%20Book/remote-link-brand-product-exp_fhjmg4.jpg) +You'll use these methods in the [next chapter](https://docs.medusajs.com/learn/customization/custom-features/workflow/index.html.md). -Finally, you return an instance of `StepResponse` returning the created links. - -### Dismiss Links in Compensation - -You can pass as a second parameter of the hook a compensation function that undoes what the step did. It receives as a first parameter the returned `StepResponse`'s second parameter, and the step context object as a second parameter. - -To undo creating the links in the hook, pass the following compensation function as a second parameter to `productsCreated`: - -```ts title="src/workflows/hooks/created-product.ts" -createProductsWorkflow.hooks.productsCreated( - // ... - (async (links, { container }) => { - if (!links?.length) { - return - } - - const link = container.resolve("link") - - await link.dismiss(links) - }) -) -``` - -In the compensation function, if the `links` parameter isn't empty, you resolve Link from the container and use its `dismiss` method. This method removes a link between two records. It accepts the same parameter as the `create` method. +Find a reference of all generated methods in [this guide](https://docs.medusajs.com/resources/service-factory-reference/index.html.md). *** -## 2. Configure Additional Data Validation +## 4. Export Module Definition -Now that you've consumed the `productsCreated` hook, you want to configure the `/admin/products` API route that creates a new product to accept a brand ID in its `additional_data` parameter. +A module must export a definition that tells Medusa the name of the module and its main service. This definition is exported in an `index.ts` file at the module's root directory. -You configure the properties accepted in `additional_data` in the `src/api/middlewares.ts` that exports middleware configurations. So, create the file (or, if already existing, add to the file) `src/api/middlewares.ts` the following content: +So, to export the Brand Module's definition, create the file `src/modules/brand/index.ts` with the following content: -![Directory structure after adding the middelwares file](https://res.cloudinary.com/dza7lstvk/image/upload/v1733386868/Medusa%20Book/brands-middleware-dir-overview_uczos1.jpg) +![Directory structure in module after adding the definition file](https://res.cloudinary.com/dza7lstvk/image/upload/v1732869045/Medusa%20Book/brand-dir-overview-4_nf8ymw.jpg) -```ts title="src/api/middlewares.ts" -import { defineMiddlewares } from "@medusajs/framework/http" -import { z } from "zod" +```ts title="src/modules/brand/index.ts" +import { Module } from "@medusajs/framework/utils" +import BrandModuleService from "./service" -// ... +export const BRAND_MODULE = "brand" -export default defineMiddlewares({ - routes: [ - // ... +export default Module(BRAND_MODULE, { + service: BrandModuleService, +}) +``` + +You use `Module` from the Modules SDK to create the module's definition. It accepts two parameters: + +1. The module's name (`brand`). You'll use this name when you use this module in other customizations. +2. An object with a required property `service` indicating the module's main service. + +You export `BRAND_MODULE` to reference the module's name more reliably in other customizations. + +*** + +## 5. Add Module to Medusa's Configurations + +To start using your module, you must add it to Medusa's configurations in `medusa-config.ts`. + +The object passed to `defineConfig` in `medusa-config.ts` accepts a `modules` property, whose value is an array of modules to add to the application. So, add the following in `medusa-config.ts`: + +```ts title="medusa-config.ts" +module.exports = defineConfig({ + // ... + modules: [ { - matcher: "/admin/products", - method: ["POST"], - additionalDataValidator: { - brand_id: z.string().optional(), - }, + resolve: "./src/modules/brand", }, ], }) ``` -Objects in `routes` accept an `additionalDataValidator` property that configures the validation rules for custom properties passed in the `additional_data` request parameter. It accepts an object whose keys are custom property names, and their values are validation rules created using [Zod](https://zod.dev/). - -So, `POST` requests sent to `/admin/products` can now pass the ID of a brand in the `brand_id` property of `additional_data`. +The Brand Module is now added to your Medusa application. You'll start using it in the [next chapter](https://docs.medusajs.com/learn/customization/custom-features/workflow/index.html.md). *** -## Test it Out +## 6. Generate and Run Migrations -To test it out, first, retrieve the authentication token of your admin user by sending a `POST` request to `/auth/user/emailpass`: +A migration is a TypeScript or JavaScript file that defines database changes made by a module. Migrations ensure that your module is re-usable and removes friction when working in a team, making it easy to reflect changes across team members' databases. + +Learn more about migrations in [this chapter](https://docs.medusajs.com/learn/fundamentals/modules#5-generate-migrations/index.html.md). + +[Medusa's CLI tool](https://docs.medusajs.com/resources/medusa-cli/index.html.md) allows you to generate migration files for your module, then run those migrations to reflect the changes in the database. So, run the following commands in your Medusa application's directory: ```bash -curl -X POST 'http://localhost:9000/auth/user/emailpass' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "email": "admin@medusa-test.com", - "password": "supersecret" -}' +npx medusa db:generate brand +npx medusa db:migrate ``` -Make sure to replace the email and password in the request body with your user's credentials. - -Then, send a `POST` request to `/admin/products` to create a product, and pass in the `additional_data` parameter a brand's ID: - -```bash -curl -X POST 'http://localhost:9000/admin/products' \ --H 'Content-Type: application/json' \ --H 'Authorization: Bearer {token}' \ ---data '{ - "title": "Product 1", - "options": [ - { - "title": "Default option", - "values": ["Default option value"] - } - ], - "shipping_profile_id": "{shipping_profile_id}", - "additional_data": { - "brand_id": "{brand_id}" - } -}' -``` - -Make sure to replace `{token}` with the token you received from the previous request, `shipping_profile_id` with the ID of a shipping profile in your application, and `{brand_id}` with the ID of a brand in your application. You can retrieve the ID of a shipping profile either from the Medusa Admin, or the [List Shipping Profiles API route](https://docs.medusajs.com/api/admin#shipping-profiles_getshippingprofiles). - -The request creates a product and returns it. - -In the Medusa application's logs, you'll find the message `Linked brand to products`, indicating that the workflow hook handler ran and linked the brand to the products. +The `db:generate` command accepts as an argument the name of the module to generate the migrations for, and the `db:migrate` command runs all migrations that haven't been run yet in the Medusa application. *** -## Next Steps: Query Linked Brands and Products +## Next Step: Create Brand Workflow -Now that you've extending the create-product flow to link a brand to it, you want to retrieve the brand details of a product. You'll learn how to do so in the next chapter. +The Brand Module now creates a `brand` table in the database and provides a class to manage its records. + +In the next chapter, you'll implement the functionality to create a brand in a workflow. You'll then use that workflow in a later chapter to expose an endpoint that allows admin users to create a brand. # Guide: Schedule Syncing Brands from Third-Party @@ -6964,6 +6763,194 @@ By following the previous chapters, you utilized the Medusa Framework and orches With Medusa, you can integrate any service from your commerce ecosystem with ease. You don't have to set up separate applications to manage your different customizations, or worry about data inconsistency across systems. Your efforts only go into implementing the business logic that ties your systems together. +# Seed Data with Custom CLI Script + +In this chapter, you'll learn how to seed data using a custom CLI script. + +## How to Seed Data + +To seed dummy data for development or demo purposes, use a custom CLI script. + +In the CLI script, use your custom workflows or Medusa's existing workflows, which you can browse in [this reference](https://docs.medusajs.com/resources/medusa-workflows-reference/index.html.md), to seed data. + +### Example: Seed Dummy Products + +In this section, you'll follow an example of creating a custom CLI script that seeds fifty dummy products. + +First, install the [Faker](https://fakerjs.dev/) library to generate random data in your script: + +```bash npm2yarn +npm install --save-dev @faker-js/faker +``` + +Then, create the file `src/scripts/demo-products.ts` with the following content: + +```ts title="src/scripts/demo-products.ts" highlights={highlights} collapsibleLines="1-12" expandButtonLabel="Show Imports" +import { ExecArgs } from "@medusajs/framework/types" +import { faker } from "@faker-js/faker" +import { + ContainerRegistrationKeys, + Modules, + ProductStatus, +} from "@medusajs/framework/utils" +import { + createInventoryLevelsWorkflow, + createProductsWorkflow, +} from "@medusajs/medusa/core-flows" + +export default async function seedDummyProducts({ + container, +}: ExecArgs) { + const salesChannelModuleService = container.resolve( + Modules.SALES_CHANNEL + ) + const logger = container.resolve( + ContainerRegistrationKeys.LOGGER + ) + const query = container.resolve( + ContainerRegistrationKeys.QUERY + ) + + const defaultSalesChannel = await salesChannelModuleService + .listSalesChannels({ + name: "Default Sales Channel", + }) + + const sizeOptions = ["S", "M", "L", "XL"] + const colorOptions = ["Black", "White"] + const currency_code = "eur" + const productsNum = 50 + + // TODO seed products +} +``` + +So far, in the script, you: + +- Resolve the Sales Channel Module's main service to retrieve the application's default sales channel. This is the sales channel the dummy products will be available in. +- Resolve the Logger to log messages in the terminal, and Query to later retrieve data useful for the seeded products. +- Initialize some default data to use when seeding the products next. + +Next, replace the `TODO` with the following: + +```ts title="src/scripts/demo-products.ts" +const productsData = new Array(productsNum).fill(0).map((_, index) => { + const title = faker.commerce.product() + "_" + index + return { + title, + is_giftcard: true, + description: faker.commerce.productDescription(), + status: ProductStatus.PUBLISHED, + options: [ + { + title: "Size", + values: sizeOptions, + }, + { + title: "Color", + values: colorOptions, + }, + ], + images: [ + { + url: faker.image.urlPlaceholder({ + text: title, + }), + }, + { + url: faker.image.urlPlaceholder({ + text: title, + }), + }, + ], + variants: new Array(10).fill(0).map((_, variantIndex) => ({ + title: `${title} ${variantIndex}`, + sku: `variant-${variantIndex}${index}`, + prices: new Array(10).fill(0).map((_, priceIndex) => ({ + currency_code, + amount: 10 * priceIndex, + })), + options: { + Size: sizeOptions[Math.floor(Math.random() * 3)], + }, + })), + shipping_profile_id: "sp_123", + sales_channels: [ + { + id: defaultSalesChannel[0].id, + }, + ], + } +}) + +// TODO seed products +``` + +You generate fifty products using the sales channel and variables you initialized, and using Faker for random data, such as the product's title or images. + +Then, replace the new `TODO` with the following: + +```ts title="src/scripts/demo-products.ts" +const { result: products } = await createProductsWorkflow(container).run({ + input: { + products: productsData, + }, +}) + +logger.info(`Seeded ${products.length} products.`) + +// TODO add inventory levels +``` + +You create the generated products using the `createProductsWorkflow` imported previously from `@medusajs/medusa/core-flows`. It accepts the product data as input, and returns the created products. + +Only thing left is to create inventory levels for the products. So, replace the last `TODO` with the following: + +```ts title="src/scripts/demo-products.ts" +logger.info("Seeding inventory levels.") + +const { data: stockLocations } = await query.graph({ + entity: "stock_location", + fields: ["id"], +}) + +const { data: inventoryItems } = await query.graph({ + entity: "inventory_item", + fields: ["id"], +}) + +const inventoryLevels = inventoryItems.map((inventoryItem) => ({ + location_id: stockLocations[0].id, + stocked_quantity: 1000000, + inventory_item_id: inventoryItem.id, +})) + +await createInventoryLevelsWorkflow(container).run({ + input: { + inventory_levels: inventoryLevels, + }, +}) + +logger.info("Finished seeding inventory levels data.") +``` + +You use Query to retrieve the stock location, to use the first location in the application, and the inventory items. + +Then, you generate inventory levels for each inventory item, associating it with the first stock location. + +Finally, you use the `createInventoryLevelsWorkflow` from Medusa's core workflows to create the inventory levels. + +### Test Script + +To test out the script, run the following command in your project's directory: + +```bash +npx medusa exec ./src/scripts/demo-products.ts +``` + +This seeds the products to your database. If you run your Medusa application and view the products in the dashboard, you'll find fifty new products. + + # Guide: Integrate Third-Party Brand System In the previous chapters, you've created a [Brand Module](https://docs.medusajs.com/learn/customization/custom-features/module/index.html.md) that adds brands to your application. In this chapter, you'll integrate a dummy Content-Management System (CMS) in a new module. The module's service will provide methods to retrieve and manage brands in the CMS. You'll later use this service to sync data from and to the CMS. @@ -7123,51 +7110,6 @@ You can now use the CMS Module's service to perform actions on the third-party C In the next chapter, you'll learn how to emit an event when a brand is created, then handle that event to sync the brand from Medusa to the third-party service. -# Admin Development Constraints - -This chapter lists some constraints of admin widgets and UI routes. - -## Arrow Functions - -Widget and UI route components must be created as arrow functions. - -```ts highlights={arrowHighlights} -// Don't -function ProductWidget() { - // ... -} - -// Do -const ProductWidget = () => { - // ... -} -``` - -*** - -## Widget Zone - -A widget zone's value must be wrapped in double or single quotes. It can't be a template literal or a variable. - -```ts highlights={zoneHighlights} -// Don't -export const config = defineWidgetConfig({ - zone: `product.details.before`, -}) - -// Don't -const ZONE = "product.details.after" -export const config = defineWidgetConfig({ - zone: ZONE, -}) - -// Do -export const config = defineWidgetConfig({ - zone: "product.details.before", -}) -``` - - # Environment Variables in Admin Customizations In this chapter, you'll learn how to use environment variables in your admin customizations. @@ -7245,6 +7187,182 @@ When you build the Medusa application, including the Medusa Admin, with the `bui For example, the `VITE_MY_API_KEY` environment variable in the example above will be replaced with the actual value during the build process. +# Admin Development Constraints + +This chapter lists some constraints of admin widgets and UI routes. + +## Arrow Functions + +Widget and UI route components must be created as arrow functions. + +```ts highlights={arrowHighlights} +// Don't +function ProductWidget() { + // ... +} + +// Do +const ProductWidget = () => { + // ... +} +``` + +*** + +## Widget Zone + +A widget zone's value must be wrapped in double or single quotes. It can't be a template literal or a variable. + +```ts highlights={zoneHighlights} +// Don't +export const config = defineWidgetConfig({ + zone: `product.details.before`, +}) + +// Don't +const ZONE = "product.details.after" +export const config = defineWidgetConfig({ + zone: ZONE, +}) + +// Do +export const config = defineWidgetConfig({ + zone: "product.details.before", +}) +``` + + +# Admin Development Tips + +In this chapter, you'll find some tips for your admin development. + +## Send Requests to API Routes + +To send a request to an API route in the Medusa Application, use Medusa's [JS SDK](https://docs.medusajs.com/resources/js-sdk/index.html.md) with [Tanstack Query](https://tanstack.com/query/latest). Both of these tools are installed in your project by default. + +Do not install Tanstack Query as that will cause unexpected errors in your development. If you prefer installing it for better auto-completion in your code editor, make sure to install `v5.64.2` as a development dependency. + +First, create the file `src/admin/lib/config.ts` to setup the SDK for use in your customizations: + +```ts +import Medusa from "@medusajs/js-sdk" + +export const sdk = new Medusa({ + baseUrl: import.meta.env.VITE_BACKEND_URL || "/", + debug: import.meta.env.DEV, + auth: { + type: "session", + }, +}) +``` + +Notice that you use `import.meta.env` to access environment variables in your customizations, as explained in [this chapter](https://docs.medusajs.com/learn/fundamentals/admin/environment-variables/index.html.md). + +Learn more about the JS SDK's configurations [this documentation](https://docs.medusajs.com/resources/js-sdk#js-sdk-configurations/index.html.md). + +Then, use the configured SDK with the `useQuery` Tanstack Query hook to send `GET` requests, and `useMutation` hook to send `POST` or `DELETE` requests. + +For example: + +### Query + +```tsx title="src/admin/widgets/product-widget.ts" highlights={queryHighlights} +import { defineWidgetConfig } from "@medusajs/admin-sdk" +import { Button, Container } from "@medusajs/ui" +import { useQuery } from "@tanstack/react-query" +import { sdk } from "../lib/config" +import { DetailWidgetProps, HttpTypes } from "@medusajs/framework/types" + +const ProductWidget = () => { + const { data, isLoading } = useQuery({ + queryFn: () => sdk.admin.product.list(), + queryKey: ["products"], + }) + + return ( + + {isLoading && Loading...} + {data?.products && ( +
    + {data.products.map((product) => ( +
  • {product.title}
  • + ))} +
+ )} +
+ ) +} + +export const config = defineWidgetConfig({ + zone: "product.list.before", +}) + +export default ProductWidget +``` + +### Mutation + +```tsx title="src/admin/widgets/product-widget.ts" highlights={mutationHighlights} +import { defineWidgetConfig } from "@medusajs/admin-sdk" +import { Button, Container } from "@medusajs/ui" +import { useMutation } from "@tanstack/react-query" +import { sdk } from "../lib/config" +import { DetailWidgetProps, HttpTypes } from "@medusajs/framework/types" + +const ProductWidget = ({ + data: productData, +}: DetailWidgetProps) => { + const { mutateAsync } = useMutation({ + mutationFn: (payload: HttpTypes.AdminUpdateProduct) => + sdk.admin.product.update(productData.id, payload), + onSuccess: () => alert("updated product"), + }) + + const handleUpdate = () => { + mutateAsync({ + title: "New Product Title", + }) + } + + return ( + + + + ) +} + +export const config = defineWidgetConfig({ + zone: "product.details.before", +}) + +export default ProductWidget +``` + +You can also send requests to custom routes as explained in the [JS SDK reference](https://docs.medusajs.com/resources/js-sdk/index.html.md). + +### Use Route Loaders for Initial Data + +You may need to retrieve data before your component is rendered, or you may need to pass some initial data to your component to be used while data is being fetched. In those cases, you can use a [route loader](https://docs.medusajs.com/learn/fundamentals/admin/routing/index.html.md). + +*** + +## Global Variables in Admin Customizations + +In your admin customizations, you can use the following global variables: + +- `__BASE__`: The base path of the Medusa Admin, as set in the [admin.path](https://docs.medusajs.com/learn/configurations/medusa-config#path/index.html.md) configuration in `medusa-config.ts`. +- `__BACKEND_URL__`: The URL to the Medusa backend, as set in the [admin.backendUrl](https://docs.medusajs.com/learn/configurations/medusa-config#backendurl/index.html.md) configuration in `medusa-config.ts`. +- `__STOREFRONT_URL__`: The URL to the storefront, as set in the [admin.storefrontUrl](https://docs.medusajs.com/learn/configurations/medusa-config#storefrontUrl/index.html.md) configuration in `medusa-config.ts`. + +*** + +## Admin Translations + +The Medusa Admin dashboard can be displayed in languages other than English, which is the default. Other languages are added through community contributions. + +Learn how to add a new language translation for the Medusa Admin in [this guide](https://docs.medusajs.com/learn/resources/contribution-guidelines/admin-translations/index.html.md). + + # Admin Routing Customizations The Medusa Admin dashboard uses [React Router](https://reactrouter.com) under the hood to manage routing. So, you can have more flexibility in routing-related customizations using some of React Router's utilities, hooks, and components. @@ -7634,137 +7752,6 @@ To build admin customizations that match the Medusa Admin's designs and layouts, For more customizations related to routes, refer to the [Routing Customizations chapter](https://docs.medusajs.com/learn/fundamentals/admin/routing/index.html.md). -# Admin Development Tips - -In this chapter, you'll find some tips for your admin development. - -## Send Requests to API Routes - -To send a request to an API route in the Medusa Application, use Medusa's [JS SDK](https://docs.medusajs.com/resources/js-sdk/index.html.md) with [Tanstack Query](https://tanstack.com/query/latest). Both of these tools are installed in your project by default. - -Do not install Tanstack Query as that will cause unexpected errors in your development. If you prefer installing it for better auto-completion in your code editor, make sure to install `v5.64.2` as a development dependency. - -First, create the file `src/admin/lib/config.ts` to setup the SDK for use in your customizations: - -```ts -import Medusa from "@medusajs/js-sdk" - -export const sdk = new Medusa({ - baseUrl: import.meta.env.VITE_BACKEND_URL || "/", - debug: import.meta.env.DEV, - auth: { - type: "session", - }, -}) -``` - -Notice that you use `import.meta.env` to access environment variables in your customizations, as explained in [this chapter](https://docs.medusajs.com/learn/fundamentals/admin/environment-variables/index.html.md). - -Learn more about the JS SDK's configurations [this documentation](https://docs.medusajs.com/resources/js-sdk#js-sdk-configurations/index.html.md). - -Then, use the configured SDK with the `useQuery` Tanstack Query hook to send `GET` requests, and `useMutation` hook to send `POST` or `DELETE` requests. - -For example: - -### Query - -```tsx title="src/admin/widgets/product-widget.ts" highlights={queryHighlights} -import { defineWidgetConfig } from "@medusajs/admin-sdk" -import { Button, Container } from "@medusajs/ui" -import { useQuery } from "@tanstack/react-query" -import { sdk } from "../lib/config" -import { DetailWidgetProps, HttpTypes } from "@medusajs/framework/types" - -const ProductWidget = () => { - const { data, isLoading } = useQuery({ - queryFn: () => sdk.admin.product.list(), - queryKey: ["products"], - }) - - return ( - - {isLoading && Loading...} - {data?.products && ( -
    - {data.products.map((product) => ( -
  • {product.title}
  • - ))} -
- )} -
- ) -} - -export const config = defineWidgetConfig({ - zone: "product.list.before", -}) - -export default ProductWidget -``` - -### Mutation - -```tsx title="src/admin/widgets/product-widget.ts" highlights={mutationHighlights} -import { defineWidgetConfig } from "@medusajs/admin-sdk" -import { Button, Container } from "@medusajs/ui" -import { useMutation } from "@tanstack/react-query" -import { sdk } from "../lib/config" -import { DetailWidgetProps, HttpTypes } from "@medusajs/framework/types" - -const ProductWidget = ({ - data: productData, -}: DetailWidgetProps) => { - const { mutateAsync } = useMutation({ - mutationFn: (payload: HttpTypes.AdminUpdateProduct) => - sdk.admin.product.update(productData.id, payload), - onSuccess: () => alert("updated product"), - }) - - const handleUpdate = () => { - mutateAsync({ - title: "New Product Title", - }) - } - - return ( - - - - ) -} - -export const config = defineWidgetConfig({ - zone: "product.details.before", -}) - -export default ProductWidget -``` - -You can also send requests to custom routes as explained in the [JS SDK reference](https://docs.medusajs.com/resources/js-sdk/index.html.md). - -### Use Route Loaders for Initial Data - -You may need to retrieve data before your component is rendered, or you may need to pass some initial data to your component to be used while data is being fetched. In those cases, you can use a [route loader](https://docs.medusajs.com/learn/fundamentals/admin/routing/index.html.md). - -*** - -## Global Variables in Admin Customizations - -In your admin customizations, you can use the following global variables: - -- `__BASE__`: The base path of the Medusa Admin, as set in the [admin.path](https://docs.medusajs.com/learn/configurations/medusa-config#path/index.html.md) configuration in `medusa-config.ts`. -- `__BACKEND_URL__`: The URL to the Medusa backend, as set in the [admin.backendUrl](https://docs.medusajs.com/learn/configurations/medusa-config#backendurl/index.html.md) configuration in `medusa-config.ts`. -- `__STOREFRONT_URL__`: The URL to the storefront, as set in the [admin.storefrontUrl](https://docs.medusajs.com/learn/configurations/medusa-config#storefrontUrl/index.html.md) configuration in `medusa-config.ts`. - -*** - -## Admin Translations - -The Medusa Admin dashboard can be displayed in languages other than English, which is the default. Other languages are added through community contributions. - -Learn how to add a new language translation for the Medusa Admin in [this guide](https://docs.medusajs.com/learn/resources/contribution-guidelines/admin-translations/index.html.md). - - # Admin Widgets In this chapter, you’ll learn more about widgets and how to use them. @@ -7884,299 +7871,1191 @@ Refer to [this reference](https://docs.medusajs.com/resources/admin-widget-injec To build admin customizations that match the Medusa Admin's designs and layouts, refer to [this guide](https://docs.medusajs.com/resources/admin-components/index.html.md) to find common components. -# Seed Data with Custom CLI Script +# Add Data Model Check Constraints -In this chapter, you'll learn how to seed data using a custom CLI script. +In this chapter, you'll learn how to add check constraints to your data model. -## How to Seed Data +## What is a Check Constraint? -To seed dummy data for development or demo purposes, use a custom CLI script. +A check constraint is a condition that must be satisfied by records inserted into a database table, otherwise an error is thrown. -In the CLI script, use your custom workflows or Medusa's existing workflows, which you can browse in [this reference](https://docs.medusajs.com/resources/medusa-workflows-reference/index.html.md), to seed data. +For example, if you have a data model with a `price` property, you want to only allow positive number values. So, you add a check constraint that fails when inserting a record with a negative price value. -### Example: Seed Dummy Products +*** -In this section, you'll follow an example of creating a custom CLI script that seeds fifty dummy products. +## How to Set a Check Constraint? -First, install the [Faker](https://fakerjs.dev/) library to generate random data in your script: +To set check constraints on a data model, use the `checks` method. This method accepts an array of check constraints to apply on the data model. -```bash npm2yarn -npm install --save-dev @faker-js/faker -``` +For example, to set a check constraint on a `price` property that ensures its value can only be a positive number: -Then, create the file `src/scripts/demo-products.ts` with the following content: +```ts highlights={checks1Highlights} +import { model } from "@medusajs/framework/utils" -```ts title="src/scripts/demo-products.ts" highlights={highlights} collapsibleLines="1-12" expandButtonLabel="Show Imports" -import { ExecArgs } from "@medusajs/framework/types" -import { faker } from "@faker-js/faker" -import { - ContainerRegistrationKeys, - Modules, - ProductStatus, -} from "@medusajs/framework/utils" -import { - createInventoryLevelsWorkflow, - createProductsWorkflow, -} from "@medusajs/medusa/core-flows" - -export default async function seedDummyProducts({ - container, -}: ExecArgs) { - const salesChannelModuleService = container.resolve( - Modules.SALES_CHANNEL - ) - const logger = container.resolve( - ContainerRegistrationKeys.LOGGER - ) - const query = container.resolve( - ContainerRegistrationKeys.QUERY - ) - - const defaultSalesChannel = await salesChannelModuleService - .listSalesChannels({ - name: "Default Sales Channel", - }) - - const sizeOptions = ["S", "M", "L", "XL"] - const colorOptions = ["Black", "White"] - const currency_code = "eur" - const productsNum = 50 - - // TODO seed products -} -``` - -So far, in the script, you: - -- Resolve the Sales Channel Module's main service to retrieve the application's default sales channel. This is the sales channel the dummy products will be available in. -- Resolve the Logger to log messages in the terminal, and Query to later retrieve data useful for the seeded products. -- Initialize some default data to use when seeding the products next. - -Next, replace the `TODO` with the following: - -```ts title="src/scripts/demo-products.ts" -const productsData = new Array(productsNum).fill(0).map((_, index) => { - const title = faker.commerce.product() + "_" + index - return { - title, - is_giftcard: true, - description: faker.commerce.productDescription(), - status: ProductStatus.PUBLISHED, - options: [ - { - title: "Size", - values: sizeOptions, - }, - { - title: "Color", - values: colorOptions, - }, - ], - images: [ - { - url: faker.image.urlPlaceholder({ - text: title, - }), - }, - { - url: faker.image.urlPlaceholder({ - text: title, - }), - }, - ], - variants: new Array(10).fill(0).map((_, variantIndex) => ({ - title: `${title} ${variantIndex}`, - sku: `variant-${variantIndex}${index}`, - prices: new Array(10).fill(0).map((_, priceIndex) => ({ - currency_code, - amount: 10 * priceIndex, - })), - options: { - Size: sizeOptions[Math.floor(Math.random() * 3)], - }, - })), - shipping_profile_id: "sp_123", - sales_channels: [ - { - id: defaultSalesChannel[0].id, - }, - ], - } +const CustomProduct = model.define("custom_product", { + // ... + price: model.bigNumber(), }) - -// TODO seed products +.checks([ + (columns) => `${columns.price} >= 0`, +]) ``` -You generate fifty products using the sales channel and variables you initialized, and using Faker for random data, such as the product's title or images. +The item passed in the array parameter of `checks` can be a callback function that accepts as a parameter an object whose keys are the names of the properties in the data model schema, and values the respective column name in the database. -Then, replace the new `TODO` with the following: +The function returns a string indicating the [SQL check constraint expression](https://www.postgresql.org/docs/current/ddl-constraints.html#DDL-CONSTRAINTS-CHECK-CONSTRAINTS). In the expression, use the `columns` parameter to access a property's column name. -```ts title="src/scripts/demo-products.ts" -const { result: products } = await createProductsWorkflow(container).run({ - input: { - products: productsData, +You can also pass an object to the `checks` method: + +```ts highlights={checks2Highlights} +import { model } from "@medusajs/framework/utils" + +const CustomProduct = model.define("custom_product", { + // ... + price: model.bigNumber(), +}) +.checks([ + { + name: "custom_product_price_check", + expression: (columns) => `${columns.price} >= 0`, }, -}) - -logger.info(`Seeded ${products.length} products.`) - -// TODO add inventory levels +]) ``` -You create the generated products using the `createProductsWorkflow` imported previously from `@medusajs/medusa/core-flows`. It accepts the product data as input, and returns the created products. +The object accepts the following properties: -Only thing left is to create inventory levels for the products. So, replace the last `TODO` with the following: +- `name`: The check constraint's name. +- `expression`: A function similar to the one that can be passed to the array. It accepts an object of columns and returns an [SQL check constraint expression](https://www.postgresql.org/docs/current/ddl-constraints.html#DDL-CONSTRAINTS-CHECK-CONSTRAINTS). -```ts title="src/scripts/demo-products.ts" -logger.info("Seeding inventory levels.") +*** -const { data: stockLocations } = await query.graph({ - entity: "stock_location", - fields: ["id"], -}) +## Apply in Migrations -const { data: inventoryItems } = await query.graph({ - entity: "inventory_item", - fields: ["id"], -}) +After adding the check constraint, make sure to generate and run migrations if you already have the table in the database. Otherwise, the check constraint won't be reflected. -const inventoryLevels = inventoryItems.map((inventoryItem) => ({ - location_id: stockLocations[0].id, - stocked_quantity: 1000000, - inventory_item_id: inventoryItem.id, -})) - -await createInventoryLevelsWorkflow(container).run({ - input: { - inventory_levels: inventoryLevels, - }, -}) - -logger.info("Finished seeding inventory levels data.") -``` - -You use Query to retrieve the stock location, to use the first location in the application, and the inventory items. - -Then, you generate inventory levels for each inventory item, associating it with the first stock location. - -Finally, you use the `createInventoryLevelsWorkflow` from Medusa's core workflows to create the inventory levels. - -### Test Script - -To test out the script, run the following command in your project's directory: +To generate a migration for the data model's module then reflect it on the database, run the following command: ```bash -npx medusa exec ./src/scripts/demo-products.ts +npx medusa db:generate custom_module +npx medusa db:migrate ``` -This seeds the products to your database. If you run your Medusa application and view the products in the dashboard, you'll find fifty new products. +The first command generates the migration under the `migrations` directory of your module's directory, and the second reflects it on the database. -# Throwing and Handling Errors +# Data Model Database Index -In this guide, you'll learn how to throw errors in your Medusa application, how it affects an API route's response, and how to change the default error handler of your Medusa application. +In this chapter, you’ll learn how to define a database index on a data model. -## Throw MedusaError +You can also define an index on a property as explained in the [Properties chapter](https://docs.medusajs.com/learn/fundamentals/data-models/properties#define-database-index-on-property/index.html.md). -When throwing an error in your API routes, middlewares, workflows, or any customization, throw a `MedusaError` from the Medusa Framework. +## Define Database Index on Data Model -The Medusa application's API route error handler then wraps your thrown error in a uniform object and returns it in the response. +A data model has an `indexes` method that defines database indices on its properties. + +The index can be on multiple columns (composite index). For example: + +```ts highlights={dataModelIndexHighlights} +import { model } from "@medusajs/framework/utils" + +const MyCustom = model.define("my_custom", { + id: model.id().primaryKey(), + name: model.text(), + age: model.number(), +}).indexes([ + { + on: ["name", "age"], + }, +]) + +export default MyCustom +``` + +The `indexes` method receives an array of indices as a parameter. Each index is an object with a required `on` property indicating the properties to apply the index on. + +In the above example, you define a composite index on the `name` and `age` properties. + +### Index Conditions + +An index can have conditions. For example: + +```ts highlights={conditionHighlights} +import { model } from "@medusajs/framework/utils" + +const MyCustom = model.define("my_custom", { + id: model.id().primaryKey(), + name: model.text(), + age: model.number(), +}).indexes([ + { + on: ["name", "age"], + where: { + age: 30, + }, + }, +]) + +export default MyCustom +``` + +The index object passed to `indexes` accepts a `where` property whose value is an object of conditions. The object's key is a property's name, and its value is the condition on that property. + +In the example above, the composite index is created on the `name` and `age` properties when the `age`'s value is `30`. + +A property's condition can be a negation. For example: + +```ts highlights={negationHighlights} +import { model } from "@medusajs/framework/utils" + +const MyCustom = model.define("my_custom", { + id: model.id().primaryKey(), + name: model.text(), + age: model.number().nullable(), +}).indexes([ + { + on: ["name", "age"], + where: { + age: { + $ne: null, + }, + }, + }, +]) + +export default MyCustom +``` + +A property's value in `where` can be an object having a `$ne` property. `$ne`'s value indicates what the specified property's value shouldn't be. + +In the example above, the composite index is created on the `name` and `age` properties when `age`'s value is not `null`. + +### Unique Database Index + +The object passed to `indexes` accepts a `unique` property indicating that the created index must be a unique index. + +For example: + +```ts highlights={uniqueHighlights} +import { model } from "@medusajs/framework/utils" + +const MyCustom = model.define("my_custom", { + id: model.id().primaryKey(), + name: model.text(), + age: model.number(), +}).indexes([ + { + on: ["name", "age"], + unique: true, + }, +]) + +export default MyCustom +``` + +This creates a unique composite index on the `name` and `age` properties. + + +# Infer Type of Data Model + +In this chapter, you'll learn how to infer the type of a data model. + +## How to Infer Type of Data Model? + +Consider you have a `Post` data model. You can't reference this data model in a type, such as a workflow input or service method output types, since it's a variable. + +Instead, Medusa provides `InferTypeOf` that transforms your data model to a type. For example: ```ts -import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" -import { MedusaError } from "@medusajs/framework/utils" +import { InferTypeOf } from "@medusajs/framework/types" +import { Post } from "../modules/blog/models/post" // relative path to the model -export const GET = async ( - req: MedusaRequest, - res: MedusaResponse -) => { - if (!req.query.q) { - throw new MedusaError( - MedusaError.Types.INVALID_DATA, - "The `q` query parameter is required." - ) +export type Post = InferTypeOf +``` + +`InferTypeOf` accepts as a type argument the type of the data model. + +Since the `Post` data model is a variable, use the `typeof` operator to pass the data model as a type argument to `InferTypeOf`. + +You can now use the `Post` type to reference a data model in other types, such as in workflow inputs or service method outputs: + +```ts title="Example Service" +// other imports... +import { InferTypeOf } from "@medusajs/framework/types" +import { Post } from "../models/post" + +type Post = InferTypeOf + +class BlogModuleService extends MedusaService({ Post }) { + async doSomething(): Promise { + // ... } - - // ... } ``` -The `MedusaError` class accepts in its constructor two parameters: -1. The first is the error's type. `MedusaError` has a static property `Types` that you can use. `Types` is an enum whose possible values are explained in the next section. -2. The second is the message to show in the error response. +# Manage Relationships -### Error Object in Response +In this chapter, you'll learn how to manage relationships between data models when creating, updating, or retrieving records using the module's main service. -The error object returned in the response has two properties: +## Manage One-to-One Relationship -- `type`: The error's type. -- `message`: The error message, if available. -- `code`: A common snake-case code. Its values can be: - - `invalid_request_error` for the `DUPLICATE_ERROR` type. - - `api_error`: for the `DB_ERROR` type. - - `invalid_state_error` for `CONFLICT` error type. - - `unknown_error` for any unidentified error type. - - For other error types, this property won't be available unless you provide a code as a third parameter to the `MedusaError` constructor. +### BelongsTo Side of One-to-One -### MedusaError Types +When you create a record of a data model that belongs to another through a one-to-one relation, pass the ID of the other data model's record in the `{relation}_id` property, where `{relation}` is the name of the relation property. -|Type|Description|Status Code| -|---|---|---|---|---| -|\`DB\_ERROR\`|Indicates a database error.|\`500\`| -|\`DUPLICATE\_ERROR\`|Indicates a duplicate of a record already exists. For example, when trying to create a customer whose email is registered by another customer.|\`422\`| -|\`INVALID\_ARGUMENT\`|Indicates an error that occurred due to incorrect arguments or other unexpected state.|\`500\`| -|\`INVALID\_DATA\`|Indicates a validation error.|\`400\`| -|\`UNAUTHORIZED\`|Indicates that a user is not authorized to perform an action or access a route.|\`401\`| -|\`NOT\_FOUND\`|Indicates that the requested resource, such as a route or a record, isn't found.|\`404\`| -|\`NOT\_ALLOWED\`|Indicates that an operation isn't allowed.|\`400\`| -|\`CONFLICT\`|Indicates that a request conflicts with another previous or ongoing request. The error message in this case is ignored for a default message.|\`409\`| -|\`PAYMENT\_AUTHORIZATION\_ERROR\`|Indicates an error has occurred while authorizing a payment.|\`422\`| -|Other error types|Any other error type results in an |\`500\`| +For example, assuming you have the [User and Email data models from the previous chapter](https://docs.medusajs.com/learn/fundamentals/data-models/relationships#one-to-one-relationship/index.html.md), set an email's user ID as follows: -*** +```ts highlights={belongsHighlights} +// when creating an email +const email = await helloModuleService.createEmails({ + // other properties... + user_id: "123", +}) -## Override Error Handler - -The `defineMiddlewares` function used to apply middlewares on routes accepts an `errorHandler` in its object parameter. Use it to override the default error handler for API routes. - -This error handler will also be used for errors thrown in Medusa's API routes and resources. - -For example, create `src/api/middlewares.ts` with the following: - -```ts title="src/api/middlewares.ts" collapsibleLines="1-8" expandMoreLabel="Show Imports" -import { - defineMiddlewares, - MedusaNextFunction, - MedusaRequest, - MedusaResponse, -} from "@medusajs/framework/http" -import { MedusaError } from "@medusajs/framework/utils" - -export default defineMiddlewares({ - errorHandler: ( - error: MedusaError | any, - req: MedusaRequest, - res: MedusaResponse, - next: MedusaNextFunction - ) => { - res.status(400).json({ - error: "Something happened.", - }) - }, +// when updating an email +const email = await helloModuleService.updateEmails({ + id: "321", + // other properties... + user_id: "123", }) ``` -The `errorHandler` property's value is a function that accepts four parameters: +In the example above, you pass the `user_id` property when creating or updating an email to specify the user it belongs to. -1. The error thrown. Its type can be `MedusaError` or any other thrown error type. -2. A request object of type `MedusaRequest`. -3. A response object of type `MedusaResponse`. -4. A function of type MedusaNextFunction that executes the next middleware in the stack. +### HasOne Side -This example overrides Medusa's default error handler with a handler that always returns a `400` status code with the same message. +When you create a record of a data model that has one of another, pass the ID of the other data model's record in the relation property. + +For example, assuming you have the [User and Email data models from the previous chapter](https://docs.medusajs.com/learn/fundamentals/data-models/relationships#one-to-one-relationship/index.html.md), set a user's email ID as follows: + +```ts highlights={hasOneHighlights} +// when creating a user +const user = await helloModuleService.createUsers({ + // other properties... + email: "123", +}) + +// when updating a user +const user = await helloModuleService.updateUsers({ + id: "321", + // other properties... + email: "123", +}) +``` + +In the example above, you pass the `email` property when creating or updating a user to specify the email it has. + +*** + +## Manage One-to-Many Relationship + +In a one-to-many relationship, you can only manage the associations from the `belongsTo` side. + +When you create a record of the data model on the `belongsTo` side, pass the ID of the other data model's record in the `{relation}_id` property, where `{relation}` is the name of the relation property. + +For example, assuming you have the [Product and Store data models from the previous chapter](https://docs.medusajs.com/learn/fundamentals/data-models/relationships#one-to-many-relationship/index.html.md), set a product's store ID as follows: + +```ts highlights={manyBelongsHighlights} +// when creating a product +const product = await helloModuleService.createProducts({ + // other properties... + store_id: "123", +}) + +// when updating a product +const product = await helloModuleService.updateProducts({ + id: "321", + // other properties... + store_id: "123", +}) +``` + +In the example above, you pass the `store_id` property when creating or updating a product to specify the store it belongs to. + +*** + +## Manage Many-to-Many Relationship + +If your many-to-many relation is represented with a [pivotEntity](https://docs.medusajs.com/learn/fundamentals/data-models/relationships#many-to-many-with-custom-columns/index.html.md), refer to [this section](#manage-many-to-many-relationship-with-pivotentity) instead. + +### Create Associations + +When you create a record of a data model that has a many-to-many relationship to another data model, pass an array of IDs of the other data model's records in the relation property. + +For example, assuming you have the [Order and Product data models from the previous chapter](https://docs.medusajs.com/learn/fundamentals/data-models/relationships#many-to-many-relationship/index.html.md), set the association between products and orders as follows: + +```ts highlights={manyHighlights} +// when creating a product +const product = await helloModuleService.createProducts({ + // other properties... + orders: ["123", "321"], +}) + +// when creating an order +const order = await helloModuleService.createOrders({ + id: "321", + // other properties... + products: ["123", "321"], +}) +``` + +In the example above, you pass the `orders` property when you create a product, and you pass the `products` property when you create an order. + +### Update Associations + +When you use the `update` methods generated by the service factory, you also pass an array of IDs as the relation property's value to add new associated records. + +However, this removes any existing associations to records whose IDs aren't included in the array. + +For example, assuming you have the [Order and Product data models from the previous chapter](https://docs.medusajs.com/learn/fundamentals/data-models/relationships#many-to-many-relationship/index.html.md), you update the product's related orders as so: + +```ts +const product = await helloModuleService.updateProducts({ + id: "123", + // other properties... + orders: ["321"], +}) +``` + +If the product was associated with an order, and you don't include that order's ID in the `orders` array, the association between the product and order is removed. + +So, to add a new association without removing existing ones, retrieve the product first to pass its associated orders when updating the product: + +```ts highlights={updateAssociationHighlights} +const product = await helloModuleService.retrieveProduct( + "123", + { + relations: ["orders"], + } +) + +const updatedProduct = await helloModuleService.updateProducts({ + id: product.id, + // other properties... + orders: [ + ...product.orders.map((order) => order.id), + "321", + ], +}) +``` + +This keeps existing associations between the product and orders, and adds a new one. + +*** + +## Manage Many-to-Many Relationship with pivotEntity + +If your many-to-many relation is represented without a [pivotEntity](https://docs.medusajs.com/learn/fundamentals/data-models/relationships#many-to-many-with-custom-columns/index.html.md), refer to [this section](#manage-many-to-many-relationship) instead. + +If you have a many-to-many relation with a `pivotEntity` specified, make sure to pass the data model representing the pivot table to [MedusaService](https://docs.medusajs.com/learn/fundamentals/modules/service-factory/index.html.md) that your module's service extends. + +For example, assuming you have the [Order, Product, and OrderProduct models from the previous chapter](https://docs.medusajs.com/learn/fundamentals/data-models/relationships#many-to-many-with-custom-columns/index.html.md), add `OrderProduct` to `MedusaService`'s object parameter: + +```ts highlights={["4"]} +class BlogModuleService extends MedusaService({ + Order, + Product, + OrderProduct, +}) {} +``` + +This will generate Create, Read, Update and Delete (CRUD) methods for the `OrderProduct` data model, which you can use to create relations between orders and products and manage the extra columns in the pivot table. + +For example: + +```ts +// create order-product association +const orderProduct = await blogModuleService.createOrderProducts({ + order_id: "123", + product_id: "123", + metadata: { + test: true, + }, +}) + +// update order-product association +const orderProduct = await blogModuleService.updateOrderProducts({ + id: "123", + metadata: { + test: false, + }, +}) + +// delete order-product association +await blogModuleService.deleteOrderProducts("123") +``` + +Since the `OrderProduct` data model belongs to the `Order` and `Product` data models, you can set its order and product as explained in the [one-to-many relationship section](#manage-one-to-many-relationship) using `order_id` and `product_id`. + +Refer to the [service factory reference](https://docs.medusajs.com/resources/service-factory-reference/index.html.md) for a full list of generated methods and their usages. + +*** + +## Retrieve Records of Relation + +The `list`, `listAndCount`, and `retrieve` methods of a module's main service accept as a second parameter an object of options. + +To retrieve the records associated with a data model's records through a relationship, pass in the second parameter object a `relations` property whose value is an array of relationship names. + +For example, assuming you have the [Order and Product data models from the previous chapter](https://docs.medusajs.com/learn/fundamentals/data-models/relationships#many-to-many-relationship/index.html.md), you retrieve a product's orders as follows: + +```ts highlights={retrieveHighlights} +const product = await blogModuleService.retrieveProducts( + "123", + { + relations: ["orders"], + } +) +``` + +In the example above, the retrieved product has an `orders` property, whose value is an array of orders associated with the product. + + +# Data Model Relationships + +In this chapter, you’ll learn how to define relationships between data models in your module. + +## What is a Relationship Property? + +A relationship property defines an association in the database between two models. It's created using the Data Model Language (DML) methods, such as `hasOne` or `belongsTo`. + +When you generate a migration for these data models, the migrations include foreign key columns or pivot tables, based on the relationship's type. + +You want to create a relation between data models in the same module. + +You want to create a relationship between data models in different modules. Use module links instead. + +*** + +## One-to-One Relationship + +A one-to-one relationship indicates that one record of a data model belongs to or is associated with another. + +To define a one-to-one relationship, create relationship properties in the data models using the following methods: + +1. `hasOne`: indicates that the model has one record of the specified model. +2. `belongsTo`: indicates that the model belongs to one record of the specified model. + +For example: + +```ts highlights={oneToOneHighlights} +import { model } from "@medusajs/framework/utils" + +const User = model.define("user", { + id: model.id().primaryKey(), + email: model.hasOne(() => Email), +}) + +const Email = model.define("email", { + id: model.id().primaryKey(), + user: model.belongsTo(() => User, { + mappedBy: "email", + }), +}) +``` + +In the example above, a user has one email, and an email belongs to one user. + +The `hasOne` and `belongsTo` methods accept a function as the first parameter. The function returns the associated data model. + +The `belongsTo` method also requires passing as a second parameter an object with the property `mappedBy`. Its value is the name of the relationship property in the other data model. + +### Optional Relationship + +To make the relationship optional on the `hasOne` or `belongsTo` side, use the `nullable` method on either property as explained in [this chapter](https://docs.medusajs.com/learn/fundamentals/data-models/properties#make-property-optional/index.html.md). + +### One-sided One-to-One Relationship + +If the one-to-one relationship is only defined on one side, pass `undefined` to the `mappedBy` property in the `belongsTo` method. + +For example: + +```ts highlights={oneToOneUndefinedHighlights} +import { model } from "@medusajs/framework/utils" + +const User = model.define("user", { + id: model.id().primaryKey(), +}) + +const Email = model.define("email", { + id: model.id().primaryKey(), + user: model.belongsTo(() => User, { + mappedBy: undefined, + }), +}) +``` + +### One-to-One Relationship in the Database + +When you generate the migrations of data models that have a one-to-one relationship, the migration adds to the table of the data model that has the `belongsTo` property: + +1. A column of the format `{relation_name}_id` to store the ID of the record of the related data model. For example, the `email` table will have a `user_id` column. +2. A foreign key on the `{relation_name}_id` column to the table of the related data model. + +![Diagram illustrating the relation between user and email records in the database](https://res.cloudinary.com/dza7lstvk/image/upload/v1726733492/Medusa%20Book/one-to-one_cj5np3.jpg) + +*** + +## One-to-Many Relationship + +A one-to-many relationship indicates that one record of a data model has many records of another data model. + +To define a one-to-many relationship, create relationship properties in the data models using the following methods: + +1. `hasMany`: indicates that the model has more than one record of the specified model. +2. `belongsTo`: indicates that the model belongs to one record of the specified model. + +For example: + +```ts highlights={oneToManyHighlights} +import { model } from "@medusajs/framework/utils" + +const Store = model.define("store", { + id: model.id().primaryKey(), + products: model.hasMany(() => Product), +}) + +const Product = model.define("product", { + id: model.id().primaryKey(), + store: model.belongsTo(() => Store, { + mappedBy: "products", + }), +}) +``` + +In this example, a store has many products, but a product belongs to one store. + +### Optional Relationship + +To make the relationship optional on the `belongsTo` side, use the `nullable` method on the property as explained in [this chapter](https://docs.medusajs.com/learn/fundamentals/data-models/properties#make-property-optional/index.html.md). + +### One-to-Many Relationship in the Database + +When you generate the migrations of data models that have a one-to-many relationship, the migration adds to the table of the data model that has the `belongsTo` property: + +1. A column of the format `{relation_name}_id` to store the ID of the record of the related data model. For example, the `product` table will have a `store_id` column. +2. A foreign key on the `{relation_name}_id` column to the table of the related data model. + +![Diagram illustrating the relation between a store and product records in the database](https://res.cloudinary.com/dza7lstvk/image/upload/v1726733937/Medusa%20Book/one-to-many_d6wtcw.jpg) + +*** + +## Many-to-Many Relationship + +A many-to-many relationship indicates that many records of a data model can be associated with many records of another data model. + +To define a many-to-many relationship, create relationship properties in the data models using the `manyToMany` method. + +For example: + +```ts highlights={manyToManyHighlights} +import { model } from "@medusajs/framework/utils" + +const Order = model.define("order", { + id: model.id().primaryKey(), + products: model.manyToMany(() => Product, { + mappedBy: "orders", + pivotTable: "order_product", + joinColumn: "order_id", + inverseJoinColumn: "product_id", + }), +}) + +const Product = model.define("product", { + id: model.id().primaryKey(), + orders: model.manyToMany(() => Order, { + mappedBy: "products", + }), +}) +``` + +The `manyToMany` method accepts two parameters: + +1. A function that returns the associated data model. +2. An object of optional configuration. Only one of the data models in the relation can define the `pivotTable`, `joinColumn`, and `inverseJoinColumn` configurations, and it's considered the owner data model. The object can accept the following properties: + - `mappedBy`: The name of the relationship property in the other data model. If not set, the property's name is inferred from the associated data model's name. + - `pivotTable`: The name of the pivot table created in the database for the many-to-many relation. If not set, the pivot table is inferred by combining the names of the data models' tables in alphabetical order, separating them by `_`, and pluralizing the last name. For example, `order_products`. + - `joinColumn`: The name of the column in the pivot table that points to the owner model's primary key. + - `inverseJoinColumn`: The name of the column in the pivot table that points to the owned model's primary key. + +The `pivotTable`, `joinColumn`, and `inverseJoinColumn` properties are only available after [Medusa v2.0.7](https://github.com/medusajs/medusa/releases/tag/v2.0.7). + +Following [Medusa v2.1.0](https://github.com/medusajs/medusa/releases/tag/v2.1.0), if `pivotTable`, `joinColumn`, and `inverseJoinColumn` aren't specified on either model, the owner is decided based on alphabetical order. So, in the example above, the `Order` data model would be the owner. + +In this example, an order is associated with many products, and a product is associated with many orders. Since the `pivotTable`, `joinColumn`, and `inverseJoinColumn` configurations are defined on the order, it's considered the owner data model. + +### Many-to-Many Relationship in the Database + +When you generate the migrations of data models that have a many-to-many relationship, the migration adds a new pivot table. Its name is either the name you specify in the `pivotTable` configuration or the inferred name combining the names of the data models' tables in alphabetical order, separating them by `_`, and pluralizing the last name. For example, `order_products`. + +The pivot table has a column with the name `{data_model}_id` for each of the data model's tables. It also has foreign keys on each of these columns to their respective tables. + +The pivot table has columns with foreign keys pointing to the primary key of the associated tables. The column's name is either: + +- The value of the `joinColumn` configuration for the owner table, and the `inverseJoinColumn` configuration for the owned table; +- Or the inferred name `{table_name}_id`. + +![Diagram illustrating the relation between order and product records in the database](https://res.cloudinary.com/dza7lstvk/image/upload/v1726734269/Medusa%20Book/many-to-many_fzy5pq.jpg) + +### Many-To-Many with Custom Columns + +To add custom columns to the pivot table between two data models having a many-to-many relationship, you must define a new data model that represents the pivot table. + +For example: + +```ts highlights={manyToManyColumnHighlights} +import { model } from "@medusajs/framework/utils" + +export const Order = model.define("order_test", { + id: model.id().primaryKey(), + products: model.manyToMany(() => Product, { + pivotEntity: () => OrderProduct, + }), +}) + +export const Product = model.define("product_test", { + id: model.id().primaryKey(), + orders: model.manyToMany(() => Order), +}) + +export const OrderProduct = model.define("orders_products", { + id: model.id().primaryKey(), + order: model.belongsTo(() => Order, { + mappedBy: "products", + }), + product: model.belongsTo(() => Product, { + mappedBy: "orders", + }), + metadata: model.json().nullable(), +}) +``` + +The `Order` and `Product` data models have a many-to-many relationship. To add extra columns to the created pivot table, you pass a `pivotEntity` option to the `products` relation in `Order` (since `Order` is the owner). The value of `pivotEntity` is a function that returns the data model representing the pivot table. + +The `OrderProduct` model defines, aside from the ID, the following properties: + +- `order`: A relation that indicates this model belongs to the `Order` data model. You set the `mappedBy` option to the many-to-many relation's name in the `Order` data model. +- `product`: A relation that indicates this model belongs to the `Product` data model. You set the `mappedBy` option to the many-to-many relation's name in the `Product` data model. +- `metadata`: An extra column to add to the pivot table of type `json`. You can add other columns as well to the model. + +*** + +## Set Relationship Name in the Other Model + +The relationship property methods accept as a second parameter an object of options. The `mappedBy` property defines the name of the relationship in the other data model. + +This is useful if the relationship property’s name is different from that of the associated data model. + +As seen in previous examples, the `mappedBy` option is required for the `belongsTo` method. + +For example: + +```ts highlights={relationNameHighlights} +import { model } from "@medusajs/framework/utils" + +const User = model.define("user", { + id: model.id().primaryKey(), + email: model.hasOne(() => Email, { + mappedBy: "owner", + }), +}) + +const Email = model.define("email", { + id: model.id().primaryKey(), + owner: model.belongsTo(() => User, { + mappedBy: "email", + }), +}) +``` + +In this example, you specify in the `User` data model’s relationship property that the name of the relationship in the `Email` data model is `owner`. + +*** + +## Cascades + +When an operation is performed on a data model, such as record deletion, the relationship cascade specifies what related data model records should be affected by it. + +For example, if a store is deleted, its products should also be deleted. + +The `cascades` method used on a data model configures which child records an operation is cascaded to. + +For example: + +```ts highlights={highlights} +import { model } from "@medusajs/framework/utils" + +const Store = model.define("store", { + id: model.id().primaryKey(), + products: model.hasMany(() => Product), +}) +.cascades({ + delete: ["products"], +}) + +const Product = model.define("product", { + id: model.id().primaryKey(), + store: model.belongsTo(() => Store, { + mappedBy: "products", + }), +}) +``` + +The `cascades` method accepts an object. Its key is the operation’s name, such as `delete`. The value is an array of relationship property names that the operation is cascaded to. + +In the example above, when a store is deleted, its associated products are also deleted. + + +# Data Model Properties + +In this chapter, you'll learn about the different property types you can use in a data model and how to configure a data model's properties. + +## Data Model's Default Properties + +By default, Medusa creates the following properties for every data model: + +- `created_at`: A [dateTime](#dateTime) property that stores when a record of the data model was created. +- `updated_at`: A [dateTime](#dateTime) property that stores when a record of the data model was updated. +- `deleted_at`: A [dateTime](#dateTime) property that stores when a record of the data model was deleted. When you soft-delete a record, Medusa sets the `deleted_at` property to the current date. + +*** + +## Property Types + +This section covers the different property types you can define in a data model's schema using the `model` methods. + +### id + +The `id` method defines an automatically generated string ID property. The generated ID is a unique string that has a mix of letters and numbers. + +For example: + +```ts highlights={idHighlights} +import { model } from "@medusajs/framework/utils" + +const Post = model.define("post", { + id: model.id(), + // ... +}) + +export default Post +``` + +### text + +The `text` method defines a string property. + +For example: + +```ts highlights={textHighlights} +import { model } from "@medusajs/framework/utils" + +const Post = model.define("post", { + name: model.text(), + // ... +}) + +export default Post +``` + +### number + +The `number` method defines a number property. + +For example: + +```ts highlights={numberHighlights} +import { model } from "@medusajs/framework/utils" + +const Post = model.define("post", { + age: model.number(), + // ... +}) + +export default Post +``` + +### float + +This property is only available after [Medusa v2.1.2](https://github.com/medusajs/medusa/releases/tag/v2.1.2). + +The `float` method defines a number property that allows for values with decimal places. + +Use this property type when it's less important to have high precision for numbers with large decimal places. Alternatively, for higher percision, use the [bigNumber property](#bignumber). + +For example: + +```ts highlights={floatHighlights} +import { model } from "@medusajs/framework/utils" + +const Post = model.define("post", { + rating: model.float(), + // ... +}) + +export default Post +``` + +### bigNumber + +The `bigNumber` method defines a number property that expects large numbers, such as prices. + +Use this property type when it's important to have high precision for numbers with large decimal places. Alternatively, for less percision, use the [float property](#float). + +For example: + +```ts highlights={bigNumberHighlights} +import { model } from "@medusajs/framework/utils" + +const Post = model.define("post", { + price: model.bigNumber(), + // ... +}) + +export default Post +``` + +### boolean + +The `boolean` method defines a boolean property. + +For example: + +```ts highlights={booleanHighlights} +import { model } from "@medusajs/framework/utils" + +const Post = model.define("post", { + hasAccount: model.boolean(), + // ... +}) + +export default Post +``` + +### enum + +The `enum` method defines a property whose value can only be one of the specified values. + +For example: + +```ts highlights={enumHighlights} +import { model } from "@medusajs/framework/utils" + +const Post = model.define("post", { + color: model.enum(["black", "white"]), + // ... +}) + +export default Post +``` + +The `enum` method accepts an array of possible string values. + +### dateTime + +The `dateTime` method defines a timestamp property. + +For example: + +```ts highlights={dateTimeHighlights} +import { model } from "@medusajs/framework/utils" + +const Post = model.define("post", { + date_of_birth: model.dateTime(), + // ... +}) + +export default Post +``` + +### json + +The `json` method defines a property whose value is a stringified JSON object. + +For example: + +```ts highlights={jsonHighlights} +import { model } from "@medusajs/framework/utils" + +const Post = model.define("post", { + metadata: model.json(), + // ... +}) + +export default Post +``` + +### array + +The `array` method defines an array of strings property. + +For example: + +```ts highlights={arrHightlights} +import { model } from "@medusajs/framework/utils" + +const Post = model.define("post", { + names: model.array(), + // ... +}) + +export default Post +``` + +### Properties Reference + +Refer to the [Data Model Language (DML) reference](https://docs.medusajs.com/resources/references/data-model/index.html.md) for a full reference of the properties. + +*** + +## Set Primary Key Property + +To set any `id`, `text`, or `number` property as a primary key, use the `primaryKey` method. + +For example: + +```ts highlights={highlights} +import { model } from "@medusajs/framework/utils" + +const Post = model.define("post", { + id: model.id().primaryKey(), + // ... +}) + +export default Post +``` + +In the example above, the `id` property is defined as the data model's primary key. + +*** + +## Property Default Value + +Use the `default` method on a property's definition to specify the default value of a property. + +For example: + +```ts highlights={defaultHighlights} +import { model } from "@medusajs/framework/utils" + +const Post = model.define("post", { + color: model + .enum(["black", "white"]) + .default("black"), + age: model + .number() + .default(0), + // ... +}) + +export default Post +``` + +In this example, you set the default value of the `color` enum property to `black`, and that of the `age` number property to `0`. + +*** + +## Make Property Optional + +Use the `nullable` method to indicate that a property’s value can be `null`. This is useful when you want a property to be optional. + +For example: + +```ts highlights={nullableHighlights} +import { model } from "@medusajs/framework/utils" + +const Post = model.define("post", { + price: model.bigNumber().nullable(), + // ... +}) + +export default Post +``` + +In the example above, the `price` property is configured to allow `null` values, making it optional. + +*** + +## Unique Property + +The `unique` method indicates that a property’s value must be unique in the database through a unique index. + +For example: + +```ts highlights={uniqueHighlights} +import { model } from "@medusajs/framework/utils" + +const User = model.define("user", { + email: model.text().unique(), + // ... +}) + +export default User +``` + +In this example, multiple users can’t have the same email. + +*** + +## Define Database Index on Property + +Use the `index` method on a property's definition to define a database index. + +For example: + +```ts highlights={dbIndexHighlights} +import { model } from "@medusajs/framework/utils" + +const Post = model.define("post", { + id: model.id().primaryKey(), + name: model.text().index( + "IDX_MY_CUSTOM_NAME" + ), +}) + +export default Post +``` + +The `index` method optionally accepts the name of the index as a parameter. + +In this example, you define an index on the `name` property. + +*** + +## Define a Searchable Property + +Methods generated by the [service factory](https://docs.medusajs.com/learn/fundamentals/modules/service-factory/index.html.md) that accept filters, such as `list{ModelName}s`, accept a `q` property as part of the filters. + +When the `q` filter is passed, the data model's searchable properties are queried to find matching records. + +Use the `searchable` method on a `text` property to indicate that it's searchable. + +For example: + +```ts highlights={searchableHighlights} +import { model } from "@medusajs/framework/utils" + +const Post = model.define("post", { + title: model.text().searchable(), + // ... +}) + +export default Post +``` + +In this example, the `title` property is searchable. + +### Search Example + +If you pass a `q` filter to the `listPosts` method: + +```ts +const posts = await blogModuleService.listPosts({ + q: "New Products", +}) +``` + +This retrieves records that include `New Products` in their `title` property. + + +# Migrations + +In this chapter, you'll learn what a migration is and how to generate a migration or write it manually. + +## What is a Migration? + +A migration is a TypeScript or JavaScript file that defines database changes made by a module. Migrations are useful when you re-use a module or you're working in a team, so that when one member of a team makes a database change, everyone else can reflect it on their side by running the migrations. + +The migration's file has a class with two methods: + +- The `up` method reflects changes on the database. +- The `down` method reverts the changes made in the `up` method. + +*** + +## Generate Migration + +Instead of you writing the migration manually, the Medusa CLI tool provides a [db:generate](https://docs.medusajs.com/resources/medusa-cli/commands/db#dbgenerate/index.html.md) command to generate a migration for a modules' data models. + +For example, assuming you have a `blog` Module, you can generate a migration for it by running the following command: + +```bash +npx medusa db:generate blog +``` + +This generates a migration file under the `migrations` directory of the Blog Module. You can then run it to reflect the changes in the database as mentioned in [this section](#run-the-migration). + +*** + +## Write a Migration Manually + +You can also write migrations manually. To do that, create a file in the `migrations` directory of the module and in it, a class that has an `up` and `down` method. The class's name should be of the format `Migration{YEAR}{MONTH}{DAY}{HOUR}{MINUTE}.ts` to ensure migrations are ran in the correct order. + +For example: + +```ts title="src/modules/blog/migrations/Migration202507021059.ts" +import { Migration } from "@mikro-orm/migrations" + +export class Migration202507021059 extends Migration { + + async up(): Promise { + this.addSql("create table if not exists \"author\" (\"id\" text not null, \"name\" text not null, \"created_at\" timestamptz not null default now(), \"updated_at\" timestamptz not null default now(), \"deleted_at\" timestamptz null, constraint \"author_pkey\" primary key (\"id\"));") + } + + async down(): Promise { + this.addSql("drop table if exists \"author\" cascade;") + } + +} +``` + +The migration class in the file extends the `Migration` class imported from `@mikro-orm/migrations`. In the `up` and `down` method of the migration class, you use the `addSql` method provided by MikroORM's `Migration` class to run PostgreSQL syntax. + +In the example above, the `up` method creates the table `author`, and the `down` method drops the table if the migration is reverted. + +Refer to [MikroORM's documentation](https://mikro-orm.io/docs/migrations#migration-class) for more details on writing migrations. + +*** + +## Run the Migration + +To run your migration, run the following command: + +This command also syncs module links. If you don't want that, use the `--skip-links` option. + +```bash +npx medusa db:migrate +``` + +This reflects the changes in the database as implemented in the migration's `up` method. + +*** + +## Rollback the Migration + +To rollback or revert the last migration you ran for a module, run the following command: + +```bash +npx medusa db:rollback blog +``` + +This rolls back the last ran migration on the Blog Module. + +### Caution: Rollback Migration before Deleting + +If you need to delete a migration file, make sure to rollback the migration first. Otherwise, you might encounter issues when generating and running new migrations. + +For example, if you delete the migration of the Blog Module, then try to create a new one, Medusa will create a brand new migration that re-creates the tables or indices. If those are still in the database, you might encounter errors. + +So, always rollback the migration before deleting it. + +*** + +## More Database Commands + +To learn more about the Medusa CLI's database commands, refer to [this CLI reference](https://docs.medusajs.com/resources/medusa-cli/commands/db/index.html.md). # Pass Additional Data to Medusa's API Route @@ -8378,159 +9257,111 @@ createProductsWorkflow.hooks.productsCreated( This updates the products to their original state before adding the brand to their `metadata` property. -# HTTP Methods +# Throwing and Handling Errors -In this chapter, you'll learn about how to add new API routes for each HTTP method. +In this guide, you'll learn how to throw errors in your Medusa application, how it affects an API route's response, and how to change the default error handler of your Medusa application. -## HTTP Method Handler +## Throw MedusaError -An API route is created for every HTTP method you export a handler function for in a route file. +When throwing an error in your API routes, middlewares, workflows, or any customization, throw a `MedusaError` from the Medusa Framework. -Allowed HTTP methods are: `GET`, `POST`, `DELETE`, `PUT`, `PATCH`, `OPTIONS`, and `HEAD`. +The Medusa application's API route error handler then wraps your thrown error in a uniform object and returns it in the response. -For example, create the file `src/api/hello-world/route.ts` with the following content: +For example: -```ts title="src/api/hello-world/route.ts" -import type { - MedusaRequest, - MedusaResponse, -} from "@medusajs/framework/http" +```ts +import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" +import { MedusaError } from "@medusajs/framework/utils" export const GET = async ( req: MedusaRequest, res: MedusaResponse ) => { - res.json({ - message: "[GET] Hello world!", - }) -} + if (!req.query.q) { + throw new MedusaError( + MedusaError.Types.INVALID_DATA, + "The `q` query parameter is required." + ) + } -export const POST = async ( - req: MedusaRequest, - res: MedusaResponse -) => { - res.json({ - message: "[POST] Hello world!", - }) + // ... } ``` -This adds two API Routes: +The `MedusaError` class accepts in its constructor two parameters: -- A `GET` route at `http://localhost:9000/hello-world`. -- A `POST` route at `http://localhost:9000/hello-world`. +1. The first is the error's type. `MedusaError` has a static property `Types` that you can use. `Types` is an enum whose possible values are explained in the next section. +2. The second is the message to show in the error response. +### Error Object in Response -# Handling CORS in API Routes +The error object returned in the response has two properties: -In this chapter, you’ll learn about the CORS middleware and how to configure it for custom API routes. +- `type`: The error's type. +- `message`: The error message, if available. +- `code`: A common snake-case code. Its values can be: + - `invalid_request_error` for the `DUPLICATE_ERROR` type. + - `api_error`: for the `DB_ERROR` type. + - `invalid_state_error` for `CONFLICT` error type. + - `unknown_error` for any unidentified error type. + - For other error types, this property won't be available unless you provide a code as a third parameter to the `MedusaError` constructor. -## CORS Overview +### MedusaError Types -Cross-Origin Resource Sharing (CORS) allows only configured origins to access your API Routes. +|Type|Description|Status Code| +|---|---|---|---|---| +|\`DB\_ERROR\`|Indicates a database error.|\`500\`| +|\`DUPLICATE\_ERROR\`|Indicates a duplicate of a record already exists. For example, when trying to create a customer whose email is registered by another customer.|\`422\`| +|\`INVALID\_ARGUMENT\`|Indicates an error that occurred due to incorrect arguments or other unexpected state.|\`500\`| +|\`INVALID\_DATA\`|Indicates a validation error.|\`400\`| +|\`UNAUTHORIZED\`|Indicates that a user is not authorized to perform an action or access a route.|\`401\`| +|\`NOT\_FOUND\`|Indicates that the requested resource, such as a route or a record, isn't found.|\`404\`| +|\`NOT\_ALLOWED\`|Indicates that an operation isn't allowed.|\`400\`| +|\`CONFLICT\`|Indicates that a request conflicts with another previous or ongoing request. The error message in this case is ignored for a default message.|\`409\`| +|\`PAYMENT\_AUTHORIZATION\_ERROR\`|Indicates an error has occurred while authorizing a payment.|\`422\`| +|Other error types|Any other error type results in an |\`500\`| -For example, if you allow only origins starting with `http://localhost:7001` to access your Admin API Routes, other origins accessing those routes get a CORS error. +*** -### CORS Configurations +## Override Error Handler -The `storeCors` and `adminCors` properties of Medusa's `http` configuration set the allowed origins for routes starting with `/store` and `/admin` respectively. +The `defineMiddlewares` function used to apply middlewares on routes accepts an `errorHandler` in its object parameter. Use it to override the default error handler for API routes. -These configurations accept a URL pattern to identify allowed origins. +This error handler will also be used for errors thrown in Medusa's API routes and resources. -For example: +For example, create `src/api/middlewares.ts` with the following: -```js title="medusa-config.ts" -module.exports = defineConfig({ - projectConfig: { - http: { - storeCors: "http://localhost:8000", - adminCors: "http://localhost:7001", - // ... - }, +```ts title="src/api/middlewares.ts" collapsibleLines="1-8" expandMoreLabel="Show Imports" +import { + defineMiddlewares, + MedusaNextFunction, + MedusaRequest, + MedusaResponse, +} from "@medusajs/framework/http" +import { MedusaError } from "@medusajs/framework/utils" + +export default defineMiddlewares({ + errorHandler: ( + error: MedusaError | any, + req: MedusaRequest, + res: MedusaResponse, + next: MedusaNextFunction + ) => { + res.status(400).json({ + error: "Something happened.", + }) }, }) ``` -This allows the `http://localhost:7001` origin to access the Admin API Routes, and the `http://localhost:8000` origin to access Store API Routes. +The `errorHandler` property's value is a function that accepts four parameters: -Learn more about the CORS configurations in [this resource guide](https://docs.medusajs.com/learn/configurations/medusa-config#http/index.html.md). +1. The error thrown. Its type can be `MedusaError` or any other thrown error type. +2. A request object of type `MedusaRequest`. +3. A response object of type `MedusaResponse`. +4. A function of type MedusaNextFunction that executes the next middleware in the stack. -*** - -## CORS in Store and Admin Routes - -To disable the CORS middleware for a route, export a `CORS` variable in the route file with its value set to `false`. - -For example: - -```ts title="src/api/store/custom/route.ts" highlights={[["15"]]} -import type { - MedusaRequest, - MedusaResponse, -} from "@medusajs/framework/http" - -export const GET = ( - req: MedusaRequest, - res: MedusaResponse -) => { - res.json({ - message: "[GET] Hello world!", - }) -} - -export const CORS = false -``` - -This disables the CORS middleware on API Routes at the path `/store/custom`. - -*** - -## CORS in Custom Routes - -If you create a route that doesn’t start with `/store` or `/admin`, you must apply the CORS middleware manually. Otherwise, all requests to your API route lead to a CORS error. - -You can do that in the exported middlewares configurations in `src/api/middlewares.ts`. - -For example: - -```ts title="src/api/middlewares.ts" highlights={highlights} collapsibleLines="1-10" expandButtonLabel="Show Imports" -import { defineMiddlewares } from "@medusajs/framework/http" -import type { - MedusaNextFunction, - MedusaRequest, - MedusaResponse, -} from "@medusajs/framework/http" -import { ConfigModule } from "@medusajs/framework/types" -import { parseCorsOrigins } from "@medusajs/framework/utils" -import cors from "cors" - -export default defineMiddlewares({ - routes: [ - { - matcher: "/custom*", - middlewares: [ - ( - req: MedusaRequest, - res: MedusaResponse, - next: MedusaNextFunction - ) => { - const configModule: ConfigModule = - req.scope.resolve("configModule") - - return cors({ - origin: parseCorsOrigins( - configModule.projectConfig.http.storeCors - ), - credentials: true, - })(req, res, next) - }, - ], - }, - ], -}) -``` - -This retrieves the configurations exported from `medusa-config.ts` and applies the `storeCors` to routes starting with `/custom`. +This example overrides Medusa's default error handler with a handler that always returns a `400` status code with the same message. # Middlewares @@ -8881,6 +9712,306 @@ A middleware can not override an existing middleware. Instead, middlewares are a For example, if you define a custom validation middleware, such as `validateAndTransformBody`, on an existing route, then both the original and the custom validation middleware will run. +# HTTP Methods + +In this chapter, you'll learn about how to add new API routes for each HTTP method. + +## HTTP Method Handler + +An API route is created for every HTTP method you export a handler function for in a route file. + +Allowed HTTP methods are: `GET`, `POST`, `DELETE`, `PUT`, `PATCH`, `OPTIONS`, and `HEAD`. + +For example, create the file `src/api/hello-world/route.ts` with the following content: + +```ts title="src/api/hello-world/route.ts" +import type { + MedusaRequest, + MedusaResponse, +} from "@medusajs/framework/http" + +export const GET = async ( + req: MedusaRequest, + res: MedusaResponse +) => { + res.json({ + message: "[GET] Hello world!", + }) +} + +export const POST = async ( + req: MedusaRequest, + res: MedusaResponse +) => { + res.json({ + message: "[POST] Hello world!", + }) +} +``` + +This adds two API Routes: + +- A `GET` route at `http://localhost:9000/hello-world`. +- A `POST` route at `http://localhost:9000/hello-world`. + + +# Handling CORS in API Routes + +In this chapter, you’ll learn about the CORS middleware and how to configure it for custom API routes. + +## CORS Overview + +Cross-Origin Resource Sharing (CORS) allows only configured origins to access your API Routes. + +For example, if you allow only origins starting with `http://localhost:7001` to access your Admin API Routes, other origins accessing those routes get a CORS error. + +### CORS Configurations + +The `storeCors` and `adminCors` properties of Medusa's `http` configuration set the allowed origins for routes starting with `/store` and `/admin` respectively. + +These configurations accept a URL pattern to identify allowed origins. + +For example: + +```js title="medusa-config.ts" +module.exports = defineConfig({ + projectConfig: { + http: { + storeCors: "http://localhost:8000", + adminCors: "http://localhost:7001", + // ... + }, + }, +}) +``` + +This allows the `http://localhost:7001` origin to access the Admin API Routes, and the `http://localhost:8000` origin to access Store API Routes. + +Learn more about the CORS configurations in [this resource guide](https://docs.medusajs.com/learn/configurations/medusa-config#http/index.html.md). + +*** + +## CORS in Store and Admin Routes + +To disable the CORS middleware for a route, export a `CORS` variable in the route file with its value set to `false`. + +For example: + +```ts title="src/api/store/custom/route.ts" highlights={[["15"]]} +import type { + MedusaRequest, + MedusaResponse, +} from "@medusajs/framework/http" + +export const GET = ( + req: MedusaRequest, + res: MedusaResponse +) => { + res.json({ + message: "[GET] Hello world!", + }) +} + +export const CORS = false +``` + +This disables the CORS middleware on API Routes at the path `/store/custom`. + +*** + +## CORS in Custom Routes + +If you create a route that doesn’t start with `/store` or `/admin`, you must apply the CORS middleware manually. Otherwise, all requests to your API route lead to a CORS error. + +You can do that in the exported middlewares configurations in `src/api/middlewares.ts`. + +For example: + +```ts title="src/api/middlewares.ts" highlights={highlights} collapsibleLines="1-10" expandButtonLabel="Show Imports" +import { defineMiddlewares } from "@medusajs/framework/http" +import type { + MedusaNextFunction, + MedusaRequest, + MedusaResponse, +} from "@medusajs/framework/http" +import { ConfigModule } from "@medusajs/framework/types" +import { parseCorsOrigins } from "@medusajs/framework/utils" +import cors from "cors" + +export default defineMiddlewares({ + routes: [ + { + matcher: "/custom*", + middlewares: [ + ( + req: MedusaRequest, + res: MedusaResponse, + next: MedusaNextFunction + ) => { + const configModule: ConfigModule = + req.scope.resolve("configModule") + + return cors({ + origin: parseCorsOrigins( + configModule.projectConfig.http.storeCors + ), + credentials: true, + })(req, res, next) + }, + ], + }, + ], +}) +``` + +This retrieves the configurations exported from `medusa-config.ts` and applies the `storeCors` to routes starting with `/custom`. + + +# API Route Parameters + +In this chapter, you’ll learn about path, query, and request body parameters. + +## Path Parameters + +To create an API route that accepts a path parameter, create a directory within the route file's path whose name is of the format `[param]`. + +For example, to create an API Route at the path `/hello-world/:id`, where `:id` is a path parameter, create the file `src/api/hello-world/[id]/route.ts` with the following content: + +```ts title="src/api/hello-world/[id]/route.ts" highlights={singlePathHighlights} +import type { + MedusaRequest, + MedusaResponse, +} from "@medusajs/framework/http" + +export const GET = async ( + req: MedusaRequest, + res: MedusaResponse +) => { + res.json({ + message: `[GET] Hello ${req.params.id}!`, + }) +} +``` + +The `MedusaRequest` object has a `params` property. `params` holds the path parameters in key-value pairs. + +### Multiple Path Parameters + +To create an API route that accepts multiple path parameters, create within the file's path multiple directories whose names are of the format `[param]`. + +For example, to create an API route at `/hello-world/:id/name/:name`, create the file `src/api/hello-world/[id]/name/[name]/route.ts` with the following content: + +```ts title="src/api/hello-world/[id]/name/[name]/route.ts" highlights={multiplePathHighlights} +import type { + MedusaRequest, + MedusaResponse, +} from "@medusajs/framework/http" + +export const GET = async ( + req: MedusaRequest, + res: MedusaResponse +) => { + res.json({ + message: `[GET] Hello ${ + req.params.id + } - ${req.params.name}!`, + }) +} +``` + +You access the `id` and `name` path parameters using the `req.params` property. + +*** + +## Query Parameters + +You can access all query parameters in the `query` property of the `MedusaRequest` object. `query` is an object of key-value pairs, where the key is a query parameter's name, and the value is its value. + +For example: + +```ts title="src/api/hello-world/route.ts" highlights={queryHighlights} +import type { + MedusaRequest, + MedusaResponse, +} from "@medusajs/framework/http" + +export const GET = async ( + req: MedusaRequest, + res: MedusaResponse +) => { + res.json({ + message: `Hello ${req.query.name}`, + }) +} +``` + +The value of `req.query.name` is the value passed in `?name=John`, for example. + +### Validate Query Parameters + +You can apply validation rules on received query parameters to ensure they match specified rules and types. + +Learn more in [this documentation](https://docs.medusajs.com/learn/fundamentals/api-routes/validation#how-to-validate-request-query-paramters/index.html.md). + +*** + +## Request Body Parameters + +The Medusa application parses the body of any request having a JSON, URL-encoded, or text request content types. The request body parameters are set in the `MedusaRequest`'s `body` property. + +Learn more about configuring body parsing in [this guide](https://docs.medusajs.com/learn/fundamentals/api-routes/parse-body/index.html.md). + +For example: + +```ts title="src/api/hello-world/route.ts" highlights={bodyHighlights} +import type { + MedusaRequest, + MedusaResponse, +} from "@medusajs/framework/http" + +type HelloWorldReq = { + name: string +} + +export const POST = async ( + req: MedusaRequest, + res: MedusaResponse +) => { + res.json({ + message: `[POST] Hello ${req.body.name}!`, + }) +} +``` + +In this example, you use the `name` request body parameter to create the message in the returned response. + +The `MedusaRequest` type accepts a type argument that indicates the type of the request body. This is useful for auto-completion and to avoid typing errors. + +To test it out, send the following request to your Medusa application: + +```bash +curl -X POST 'http://localhost:9000/hello-world' \ +-H 'Content-Type: application/json' \ +--data-raw '{ + "name": "John" +}' +``` + +This returns the following JSON object: + +```json +{ + "message": "[POST] Hello John!" +} +``` + +### Validate Body Parameters + +You can apply validation rules on received body parameters to ensure they match specified rules and types. + +Learn more in [this documentation](https://docs.medusajs.com/learn/fundamentals/api-routes/validation#how-to-validate-request-body/index.html.md). + + # Protected Routes In this chapter, you’ll learn how to create protected routes. @@ -9356,6 +10487,459 @@ This API route opens a stream by setting the `Content-Type` in the header to `te The `MedusaResponse` type is based on [Express's Response](https://expressjs.com/en/api.html#res). Refer to their API reference for other uses of responses. +# Retrieve Custom Links from Medusa's API Route + +In this chapter, you'll learn how to retrieve custom data models linked to existing Medusa data models from Medusa's API routes. + +## Why Retrieve Custom Linked Data Models? + +Often, you'll link custom data models to existing Medusa data models to implement custom features or expand on existing ones. + +For example, to add brands for products, you can create a `Brand` data model in a Brand Module, then [define a link](https://docs.medusajs.com/learn/fundamentals/module-links/index.html.md) to the [Product Module](https://docs.medusajs.com/resources/commerce-modules/product/index.html.md)'s `Product` data model. + +When you implement this customization, you might need to retrieve the brand of a product using the existing [Get Product API Route](https://docs.medusajs.com/api/admin#products_getproductsid). You can do this by passing the linked data model's name in the `fields` query parameter of the API route. + +*** + +## How to Retrieve Custom Linked Data Models Using `fields`? + +Most of Medusa's API routes accept a `fields` query parameter that allows you to specify the fields and relations to retrieve in the resource, such as a product. + +For example, to retrieve the brand of a product, you can pass the `brand` field in the `fields` query parameter of the [Get Product API Route](https://docs.medusajs.com/api/admin#products_getproductsid): + +```bash +curl 'http://localhost:9000/admin/products/{id}?fields=*brand' \ +-H 'Authorization: Bearer {access_token}' +``` + +The `fields` query parameter accepts a comma-separated list of fields and relations to retrieve. To learn more about using the `fields` query parameter, refer to the [API Reference](https://docs.medusajs.com/api/store#select-fields-and-relations). + +By prefixing `brand` with an asterisk (`*`), you retrieve all the default fields of the product, including the `brand` field. If you don't include the `*` prefix, the response will only include the product's brand. + +*** + +## API Routes that Restrict Retrievable Fields + +Some of Medusa's API routes restrict the fields and relations you can retrieve, which means you can't pass your custom linked data models in the `fields` query parameter. Medusa makes this restriction to ensure the API routes are performant and secure. + +The API routes that restrict the fields and relations you can retrieve are: + +- [Customer Store API Routes](https://docs.medusajs.com/api/store#customers) +- [Customer Admin API Routes](https://docs.medusajs.com/api/admin#customers) +- [Product Category Admin API Routes](https://docs.medusajs.com/api/admin#product-categories) + +### How to Override Allowed Fields and Relations + +For these routes, you need to override the allowed fields and relations to be retrieved. You can do this by adding a [middleware](https://docs.medusajs.com/learn/fundamentals/api-routes/middlewares/index.html.md) to those routes. + +For example, to allow retrieving the `b2b_company` of a customer using the [Get Customer Admin API Route](https://docs.medusajs.com/api/admin#customers_getcustomersid), create the file `src/api/middlewares.ts` with the following content: + +Learn how to create a middleware in the [Middlewares](https://docs.medusajs.com/learn/fundamentals/api-routes/middlewares/index.html.md) chapter. + +```ts title="src/api/middlewares.ts" highlights={highlights} +import { defineMiddlewares } from "@medusajs/medusa"; + +export default defineMiddlewares({ + routes: [ + { + matcher: "/store/customers/me", + method: "GET", + middlewares: [ + (req, res, next) => { + req.allowed?.push("b2b_company"); + next(); + }, + ], + }, + ], +}); +``` + +In this example, you apply a middleware to the [Get Customer Admin API Route](https://docs.medusajs.com/api/admin#customers_getcustomersid). + +The request object passed to middlewares has an `allowed` property that contains the fields and relations that can be retrieved. So, you modify the `allowed` array to include the `b2b_company` field. + +You can now retrieve the `b2b_company` field using the `fields` query parameter of the [Get Customer Admin API Route](https://docs.medusajs.com/api/admin#customers_getcustomersid): + +```bash +curl 'http://localhost:9000/admin/customers/{id}?fields=*b2b_company' \ +-H 'Authorization: Bearer {access_token}' +``` + +In this example, you retrieve the `b2b_company` relation of the customer using the `fields` query parameter. + + +# Event Data Payload + +In this chapter, you'll learn how subscribers receive an event's data payload. + +## Access Event's Data Payload + +When events are emitted, they’re emitted with a data payload. + +The object that the subscriber function receives as a parameter has an `event` property, which is an object holding the event payload in a `data` property with additional context. + +For example: + +```ts title="src/subscribers/product-created.ts" highlights={highlights} collapsibleLines="1-5" expandButtonLabel="Show Imports" +import type { + SubscriberArgs, + SubscriberConfig, +} from "@medusajs/framework" + +export default async function productCreateHandler({ + event, +}: SubscriberArgs<{ id: string }>) { + const productId = event.data.id + console.log(`The product ${productId} was created`) +} + +export const config: SubscriberConfig = { + event: "product.created", +} +``` + +The `event` object has the following properties: + +- data: (\`object\`) The data payload of the event. Its properties are different for each event. +- name: (string) The name of the triggered event. +- metadata: (\`object\`) Additional data and context of the emitted event. + +This logs the product ID received in the `product.created` event’s data payload to the console. + +{/* --- + +## List of Events with Data Payload + +Refer to [this reference](!resources!/events-reference) for a full list of events emitted by Medusa and their data payloads. */} + + +# Emit Workflow and Service Events + +In this chapter, you'll learn about event types and how to emit an event in a service or workflow. + +## Event Types + +In your customization, you can emit an event, then listen to it in a subscriber and perform an asynchronus action, such as send a notification or data to a third-party system. + +There are two types of events in Medusa: + +1. Workflow event: an event that's emitted in a workflow after a commerce feature is performed. For example, Medusa emits the `order.placed` event after a cart is completed. +2. Service event: an event that's emitted to track, trace, or debug processes under the hood. For example, you can emit an event with an audit trail. + +### Which Event Type to Use? + +**Workflow events** are the most common event type in development, as most custom features and customizations are built around workflows. + +Some examples of workflow events: + +1. When a user creates a blog post and you're emitting an event to send a newsletter email. +2. When you finish syncing products to a third-party system and you want to notify the admin user of new products added. +3. When a customer purchases a digital product and you want to generate and send it to them. + +You should only go for a **service event** if you're emitting an event for processes under the hood that don't directly affect front-facing features. + +Some examples of service events: + +1. When you're tracing data manipulation and changes, and you want to track every time some custom data is changed. +2. When you're syncing data with a search engine. + +*** + +## Emit Event in a Workflow + +To emit a workflow event, use the `emitEventStep` helper step provided in the `@medusajs/medusa/core-flows` package. + +For example: + +```ts highlights={highlights} +import { + createWorkflow, +} from "@medusajs/framework/workflows-sdk" +import { + emitEventStep, +} from "@medusajs/medusa/core-flows" + +const helloWorldWorkflow = createWorkflow( + "hello-world", + () => { + // ... + + emitEventStep({ + eventName: "custom.created", + data: { + id: "123", + // other data payload + }, + }) + } +) +``` + +The `emitEventStep` accepts an object having the following properties: + +- `eventName`: The event's name. +- `data`: The data payload as an object. You can pass any properties in the object, and subscribers listening to the event will receive this data in the event's payload. + +In this example, you emit the event `custom.created` and pass in the data payload an ID property. + +### Test it Out + +If you execute the workflow, the event is emitted and you can see it in your application's logs. + +Any subscribers listening to the event are executed. + +*** + +## Emit Event in a Service + +To emit a service event: + +1. Resolve `event_bus` from the module's container in your service's constructor: + +### Extending Service Factory + +```ts title="src/modules/blog/service.ts" highlights={["9"]} +import { IEventBusService } from "@medusajs/framework/types" +import { MedusaService } from "@medusajs/framework/utils" + +class BlogModuleService extends MedusaService({ + Post, +}){ + protected eventBusService_: AbstractEventBusModuleService + + constructor({ event_bus }) { + super(...arguments) + this.eventBusService_ = event_bus + } +} +``` + +### Without Service Factory + +```ts title="src/modules/blog/service.ts" highlights={["6"]} +import { IEventBusService } from "@medusajs/framework/types" + +class BlogModuleService { + protected eventBusService_: AbstractEventBusModuleService + + constructor({ event_bus }) { + this.eventBusService_ = event_bus + } +} +``` + +2. Use the event bus service's `emit` method in the service's methods to emit an event: + +```ts title="src/modules/blog/service.ts" highlights={serviceHighlights} +class BlogModuleService { + // ... + performAction() { + // TODO perform action + + this.eventBusService_.emit({ + name: "custom.event", + data: { + id: "123", + // other data payload + }, + }) + } +} +``` + +The method accepts an object having the following properties: + +- `name`: The event's name. +- `data`: The data payload as an object. You can pass any properties in the object, and subscribers listening to the event will receive this data in the event's payload. + +3. By default, the Event Module's service isn't injected into your module's container. To add it to the container, pass it in the module's registration object in `medusa-config.ts` in the `dependencies` property: + +```ts title="medusa-config.ts" highlights={depsHighlight} +import { Modules } from "@medusajs/framework/utils" + +module.exports = defineConfig({ + // ... + modules: [ + { + resolve: "./src/modules/blog", + dependencies: [ + Modules.EVENT_BUS, + ], + }, + ], +}) +``` + +The `dependencies` property accepts an array of module registration keys. The specified modules' main services are injected into the module's container. + +That's how you can resolve it in your module's main service's constructor. + +### Test it Out + +If you execute the `performAction` method of your service, the event is emitted and you can see it in your application's logs. + +Any subscribers listening to the event are also executed. + + +# Add Columns to a Link Table + +In this chapter, you'll learn how to add custom columns to a link definition's table and manage them. + +## Link Table's Default Columns + +When you define a link between two data models, Medusa creates a link table in the database to store the IDs of the linked records. You can learn more about the created table in the [Module Links chapter](https://docs.medusajs.com/learn/fundamentals/module-links/index.html.md). + +In various cases, you might need to store additional data in the link table. For example, if you define a link between a `product` and a `post`, you might want to store the publish date of the product's post in the link table. + +In those cases, you can add a custom column to a link's table in the link definition. You can later set that column whenever you create or update a link between the linked records. + +*** + +## How to Add Custom Columns to a Link's Table? + +The `defineLink` function used to define a link accepts a third parameter, which is an object of options. + +To add custom columns to a link's table, pass in the third parameter of `defineLink` a `database` property: + +```ts highlights={linkHighlights} +import BlogModule from "../modules/blog" +import ProductModule from "@medusajs/medusa/product" +import { defineLink } from "@medusajs/framework/utils" + +export default defineLink( + ProductModule.linkable.product, + BlogModule.linkable.blog, + { + database: { + extraColumns: { + metadata: { + type: "json", + }, + }, + }, + } +) +``` + +This adds to the table created for the link between `product` and `blog` a `metadata` column of type `json`. + +### Database Options + +The `database` property defines configuration for the table created in the database. + +Its `extraColumns` property defines custom columns to create in the link's table. + +`extraColumns`'s value is an object whose keys are the names of the columns, and values are the column's configurations as an object. + +### Column Configurations + +The column's configurations object accepts the following properties: + +- `type`: The column's type. Possible values are: + - `string` + - `text` + - `integer` + - `boolean` + - `date` + - `time` + - `datetime` + - `enum` + - `json` + - `array` + - `enumArray` + - `float` + - `double` + - `decimal` + - `bigint` + - `mediumint` + - `smallint` + - `tinyint` + - `blob` + - `uuid` + - `uint8array` +- `defaultValue`: The column's default value. +- `nullable`: Whether the column can have `null` values. + +*** + +## Set Custom Column when Creating Link + +The object you pass to Link's `create` method accepts a `data` property. Its value is an object whose keys are custom column names, and values are the value of the custom column for this link. + +For example: + +Learn more about Link, how to resolve it, and its methods in [this chapter](https://docs.medusajs.com/learn/fundamentals/module-links/link/index.html.md). + +```ts +await link.create({ + [Modules.PRODUCT]: { + product_id: "123", + }, + [BLOG_MODULE]: { + post_id: "321", + }, + data: { + metadata: { + test: true, + }, + }, +}) +``` + +*** + +## Retrieve Custom Column with Link + +To retrieve linked records with their custom columns, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query/index.html.md). A module link's definition, exported by a file under `src/links`, has a special `entryPoint` property. Use this property when specifying the `entity` property in Query's `graph` method. + +For example: + +```ts highlights={retrieveHighlights} +import productPostLink from "../links/product-post" + +// ... + +const { data } = await query.graph({ + entity: productPostLink.entryPoint, + fields: ["metadata", "product.*", "post.*"], + filters: { + product_id: "prod_123", + }, +}) +``` + +This retrieves the product of id `prod_123` and its linked `post` records. + +In the `fields` array you pass `metadata`, which is the custom column to retrieve of the link. + +*** + +## Update Custom Column's Value + +Link's `create` method updates a link's data if the link between the specified records already exists. + +So, to update the value of a custom column in a created link, use the `create` method again passing it a new value for the custom column. + +For example: + +```ts +await link.create({ + [Modules.PRODUCT]: { + product_id: "123", + }, + [BLOG_MODULE]: { + post_id: "321", + }, + data: { + metadata: { + test: false, + }, + }, +}) +``` + + # Request Body and Query Parameter Validation In this chapter, you'll learn how to validate request body and query parameters in your custom API route. @@ -9605,1791 +11189,6 @@ For example, if you omit the `a` parameter, you'll receive a `400` response code To see different examples and learn more about creating a validation schema, refer to [Zod's documentation](https://zod.dev). -# API Route Parameters - -In this chapter, you’ll learn about path, query, and request body parameters. - -## Path Parameters - -To create an API route that accepts a path parameter, create a directory within the route file's path whose name is of the format `[param]`. - -For example, to create an API Route at the path `/hello-world/:id`, where `:id` is a path parameter, create the file `src/api/hello-world/[id]/route.ts` with the following content: - -```ts title="src/api/hello-world/[id]/route.ts" highlights={singlePathHighlights} -import type { - MedusaRequest, - MedusaResponse, -} from "@medusajs/framework/http" - -export const GET = async ( - req: MedusaRequest, - res: MedusaResponse -) => { - res.json({ - message: `[GET] Hello ${req.params.id}!`, - }) -} -``` - -The `MedusaRequest` object has a `params` property. `params` holds the path parameters in key-value pairs. - -### Multiple Path Parameters - -To create an API route that accepts multiple path parameters, create within the file's path multiple directories whose names are of the format `[param]`. - -For example, to create an API route at `/hello-world/:id/name/:name`, create the file `src/api/hello-world/[id]/name/[name]/route.ts` with the following content: - -```ts title="src/api/hello-world/[id]/name/[name]/route.ts" highlights={multiplePathHighlights} -import type { - MedusaRequest, - MedusaResponse, -} from "@medusajs/framework/http" - -export const GET = async ( - req: MedusaRequest, - res: MedusaResponse -) => { - res.json({ - message: `[GET] Hello ${ - req.params.id - } - ${req.params.name}!`, - }) -} -``` - -You access the `id` and `name` path parameters using the `req.params` property. - -*** - -## Query Parameters - -You can access all query parameters in the `query` property of the `MedusaRequest` object. `query` is an object of key-value pairs, where the key is a query parameter's name, and the value is its value. - -For example: - -```ts title="src/api/hello-world/route.ts" highlights={queryHighlights} -import type { - MedusaRequest, - MedusaResponse, -} from "@medusajs/framework/http" - -export const GET = async ( - req: MedusaRequest, - res: MedusaResponse -) => { - res.json({ - message: `Hello ${req.query.name}`, - }) -} -``` - -The value of `req.query.name` is the value passed in `?name=John`, for example. - -### Validate Query Parameters - -You can apply validation rules on received query parameters to ensure they match specified rules and types. - -Learn more in [this documentation](https://docs.medusajs.com/learn/fundamentals/api-routes/validation#how-to-validate-request-query-paramters/index.html.md). - -*** - -## Request Body Parameters - -The Medusa application parses the body of any request having a JSON, URL-encoded, or text request content types. The request body parameters are set in the `MedusaRequest`'s `body` property. - -Learn more about configuring body parsing in [this guide](https://docs.medusajs.com/learn/fundamentals/api-routes/parse-body/index.html.md). - -For example: - -```ts title="src/api/hello-world/route.ts" highlights={bodyHighlights} -import type { - MedusaRequest, - MedusaResponse, -} from "@medusajs/framework/http" - -type HelloWorldReq = { - name: string -} - -export const POST = async ( - req: MedusaRequest, - res: MedusaResponse -) => { - res.json({ - message: `[POST] Hello ${req.body.name}!`, - }) -} -``` - -In this example, you use the `name` request body parameter to create the message in the returned response. - -The `MedusaRequest` type accepts a type argument that indicates the type of the request body. This is useful for auto-completion and to avoid typing errors. - -To test it out, send the following request to your Medusa application: - -```bash -curl -X POST 'http://localhost:9000/hello-world' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "name": "John" -}' -``` - -This returns the following JSON object: - -```json -{ - "message": "[POST] Hello John!" -} -``` - -### Validate Body Parameters - -You can apply validation rules on received body parameters to ensure they match specified rules and types. - -Learn more in [this documentation](https://docs.medusajs.com/learn/fundamentals/api-routes/validation#how-to-validate-request-body/index.html.md). - - -# Event Data Payload - -In this chapter, you'll learn how subscribers receive an event's data payload. - -## Access Event's Data Payload - -When events are emitted, they’re emitted with a data payload. - -The object that the subscriber function receives as a parameter has an `event` property, which is an object holding the event payload in a `data` property with additional context. - -For example: - -```ts title="src/subscribers/product-created.ts" highlights={highlights} collapsibleLines="1-5" expandButtonLabel="Show Imports" -import type { - SubscriberArgs, - SubscriberConfig, -} from "@medusajs/framework" - -export default async function productCreateHandler({ - event, -}: SubscriberArgs<{ id: string }>) { - const productId = event.data.id - console.log(`The product ${productId} was created`) -} - -export const config: SubscriberConfig = { - event: "product.created", -} -``` - -The `event` object has the following properties: - -- data: (\`object\`) The data payload of the event. Its properties are different for each event. -- name: (string) The name of the triggered event. -- metadata: (\`object\`) Additional data and context of the emitted event. - -This logs the product ID received in the `product.created` event’s data payload to the console. - -{/* --- - -## List of Events with Data Payload - -Refer to [this reference](!resources!/events-reference) for a full list of events emitted by Medusa and their data payloads. */} - - -# Retrieve Custom Links from Medusa's API Route - -In this chapter, you'll learn how to retrieve custom data models linked to existing Medusa data models from Medusa's API routes. - -## Why Retrieve Custom Linked Data Models? - -Often, you'll link custom data models to existing Medusa data models to implement custom features or expand on existing ones. - -For example, to add brands for products, you can create a `Brand` data model in a Brand Module, then [define a link](https://docs.medusajs.com/learn/fundamentals/module-links/index.html.md) to the [Product Module](https://docs.medusajs.com/resources/commerce-modules/product/index.html.md)'s `Product` data model. - -When you implement this customization, you might need to retrieve the brand of a product using the existing [Get Product API Route](https://docs.medusajs.com/api/admin#products_getproductsid). You can do this by passing the linked data model's name in the `fields` query parameter of the API route. - -*** - -## How to Retrieve Custom Linked Data Models Using `fields`? - -Most of Medusa's API routes accept a `fields` query parameter that allows you to specify the fields and relations to retrieve in the resource, such as a product. - -For example, to retrieve the brand of a product, you can pass the `brand` field in the `fields` query parameter of the [Get Product API Route](https://docs.medusajs.com/api/admin#products_getproductsid): - -```bash -curl 'http://localhost:9000/admin/products/{id}?fields=*brand' \ --H 'Authorization: Bearer {access_token}' -``` - -The `fields` query parameter accepts a comma-separated list of fields and relations to retrieve. To learn more about using the `fields` query parameter, refer to the [API Reference](https://docs.medusajs.com/api/store#select-fields-and-relations). - -By prefixing `brand` with an asterisk (`*`), you retrieve all the default fields of the product, including the `brand` field. If you don't include the `*` prefix, the response will only include the product's brand. - -*** - -## API Routes that Restrict Retrievable Fields - -Some of Medusa's API routes restrict the fields and relations you can retrieve, which means you can't pass your custom linked data models in the `fields` query parameter. Medusa makes this restriction to ensure the API routes are performant and secure. - -The API routes that restrict the fields and relations you can retrieve are: - -- [Customer Store API Routes](https://docs.medusajs.com/api/store#customers) -- [Customer Admin API Routes](https://docs.medusajs.com/api/admin#customers) -- [Product Category Admin API Routes](https://docs.medusajs.com/api/admin#product-categories) - -### How to Override Allowed Fields and Relations - -For these routes, you need to override the allowed fields and relations to be retrieved. You can do this by adding a [middleware](https://docs.medusajs.com/learn/fundamentals/api-routes/middlewares/index.html.md) to those routes. - -For example, to allow retrieving the `b2b_company` of a customer using the [Get Customer Admin API Route](https://docs.medusajs.com/api/admin#customers_getcustomersid), create the file `src/api/middlewares.ts` with the following content: - -Learn how to create a middleware in the [Middlewares](https://docs.medusajs.com/learn/fundamentals/api-routes/middlewares/index.html.md) chapter. - -```ts title="src/api/middlewares.ts" highlights={highlights} -import { defineMiddlewares } from "@medusajs/medusa"; - -export default defineMiddlewares({ - routes: [ - { - matcher: "/store/customers/me", - method: "GET", - middlewares: [ - (req, res, next) => { - req.allowed?.push("b2b_company"); - next(); - }, - ], - }, - ], -}); -``` - -In this example, you apply a middleware to the [Get Customer Admin API Route](https://docs.medusajs.com/api/admin#customers_getcustomersid). - -The request object passed to middlewares has an `allowed` property that contains the fields and relations that can be retrieved. So, you modify the `allowed` array to include the `b2b_company` field. - -You can now retrieve the `b2b_company` field using the `fields` query parameter of the [Get Customer Admin API Route](https://docs.medusajs.com/api/admin#customers_getcustomersid): - -```bash -curl 'http://localhost:9000/admin/customers/{id}?fields=*b2b_company' \ --H 'Authorization: Bearer {access_token}' -``` - -In this example, you retrieve the `b2b_company` relation of the customer using the `fields` query parameter. - - -# Emit Workflow and Service Events - -In this chapter, you'll learn about event types and how to emit an event in a service or workflow. - -## Event Types - -In your customization, you can emit an event, then listen to it in a subscriber and perform an asynchronus action, such as send a notification or data to a third-party system. - -There are two types of events in Medusa: - -1. Workflow event: an event that's emitted in a workflow after a commerce feature is performed. For example, Medusa emits the `order.placed` event after a cart is completed. -2. Service event: an event that's emitted to track, trace, or debug processes under the hood. For example, you can emit an event with an audit trail. - -### Which Event Type to Use? - -**Workflow events** are the most common event type in development, as most custom features and customizations are built around workflows. - -Some examples of workflow events: - -1. When a user creates a blog post and you're emitting an event to send a newsletter email. -2. When you finish syncing products to a third-party system and you want to notify the admin user of new products added. -3. When a customer purchases a digital product and you want to generate and send it to them. - -You should only go for a **service event** if you're emitting an event for processes under the hood that don't directly affect front-facing features. - -Some examples of service events: - -1. When you're tracing data manipulation and changes, and you want to track every time some custom data is changed. -2. When you're syncing data with a search engine. - -*** - -## Emit Event in a Workflow - -To emit a workflow event, use the `emitEventStep` helper step provided in the `@medusajs/medusa/core-flows` package. - -For example: - -```ts highlights={highlights} -import { - createWorkflow, -} from "@medusajs/framework/workflows-sdk" -import { - emitEventStep, -} from "@medusajs/medusa/core-flows" - -const helloWorldWorkflow = createWorkflow( - "hello-world", - () => { - // ... - - emitEventStep({ - eventName: "custom.created", - data: { - id: "123", - // other data payload - }, - }) - } -) -``` - -The `emitEventStep` accepts an object having the following properties: - -- `eventName`: The event's name. -- `data`: The data payload as an object. You can pass any properties in the object, and subscribers listening to the event will receive this data in the event's payload. - -In this example, you emit the event `custom.created` and pass in the data payload an ID property. - -### Test it Out - -If you execute the workflow, the event is emitted and you can see it in your application's logs. - -Any subscribers listening to the event are executed. - -*** - -## Emit Event in a Service - -To emit a service event: - -1. Resolve `event_bus` from the module's container in your service's constructor: - -### Extending Service Factory - -```ts title="src/modules/blog/service.ts" highlights={["9"]} -import { IEventBusService } from "@medusajs/framework/types" -import { MedusaService } from "@medusajs/framework/utils" - -class BlogModuleService extends MedusaService({ - Post, -}){ - protected eventBusService_: AbstractEventBusModuleService - - constructor({ event_bus }) { - super(...arguments) - this.eventBusService_ = event_bus - } -} -``` - -### Without Service Factory - -```ts title="src/modules/blog/service.ts" highlights={["6"]} -import { IEventBusService } from "@medusajs/framework/types" - -class BlogModuleService { - protected eventBusService_: AbstractEventBusModuleService - - constructor({ event_bus }) { - this.eventBusService_ = event_bus - } -} -``` - -2. Use the event bus service's `emit` method in the service's methods to emit an event: - -```ts title="src/modules/blog/service.ts" highlights={serviceHighlights} -class BlogModuleService { - // ... - performAction() { - // TODO perform action - - this.eventBusService_.emit({ - name: "custom.event", - data: { - id: "123", - // other data payload - }, - }) - } -} -``` - -The method accepts an object having the following properties: - -- `name`: The event's name. -- `data`: The data payload as an object. You can pass any properties in the object, and subscribers listening to the event will receive this data in the event's payload. - -3. By default, the Event Module's service isn't injected into your module's container. To add it to the container, pass it in the module's registration object in `medusa-config.ts` in the `dependencies` property: - -```ts title="medusa-config.ts" highlights={depsHighlight} -import { Modules } from "@medusajs/framework/utils" - -module.exports = defineConfig({ - // ... - modules: [ - { - resolve: "./src/modules/blog", - dependencies: [ - Modules.EVENT_BUS, - ], - }, - ], -}) -``` - -The `dependencies` property accepts an array of module registration keys. The specified modules' main services are injected into the module's container. - -That's how you can resolve it in your module's main service's constructor. - -### Test it Out - -If you execute the `performAction` method of your service, the event is emitted and you can see it in your application's logs. - -Any subscribers listening to the event are also executed. - - -# Data Model Database Index - -In this chapter, you’ll learn how to define a database index on a data model. - -You can also define an index on a property as explained in the [Properties chapter](https://docs.medusajs.com/learn/fundamentals/data-models/properties#define-database-index-on-property/index.html.md). - -## Define Database Index on Data Model - -A data model has an `indexes` method that defines database indices on its properties. - -The index can be on multiple columns (composite index). For example: - -```ts highlights={dataModelIndexHighlights} -import { model } from "@medusajs/framework/utils" - -const MyCustom = model.define("my_custom", { - id: model.id().primaryKey(), - name: model.text(), - age: model.number(), -}).indexes([ - { - on: ["name", "age"], - }, -]) - -export default MyCustom -``` - -The `indexes` method receives an array of indices as a parameter. Each index is an object with a required `on` property indicating the properties to apply the index on. - -In the above example, you define a composite index on the `name` and `age` properties. - -### Index Conditions - -An index can have conditions. For example: - -```ts highlights={conditionHighlights} -import { model } from "@medusajs/framework/utils" - -const MyCustom = model.define("my_custom", { - id: model.id().primaryKey(), - name: model.text(), - age: model.number(), -}).indexes([ - { - on: ["name", "age"], - where: { - age: 30, - }, - }, -]) - -export default MyCustom -``` - -The index object passed to `indexes` accepts a `where` property whose value is an object of conditions. The object's key is a property's name, and its value is the condition on that property. - -In the example above, the composite index is created on the `name` and `age` properties when the `age`'s value is `30`. - -A property's condition can be a negation. For example: - -```ts highlights={negationHighlights} -import { model } from "@medusajs/framework/utils" - -const MyCustom = model.define("my_custom", { - id: model.id().primaryKey(), - name: model.text(), - age: model.number().nullable(), -}).indexes([ - { - on: ["name", "age"], - where: { - age: { - $ne: null, - }, - }, - }, -]) - -export default MyCustom -``` - -A property's value in `where` can be an object having a `$ne` property. `$ne`'s value indicates what the specified property's value shouldn't be. - -In the example above, the composite index is created on the `name` and `age` properties when `age`'s value is not `null`. - -### Unique Database Index - -The object passed to `indexes` accepts a `unique` property indicating that the created index must be a unique index. - -For example: - -```ts highlights={uniqueHighlights} -import { model } from "@medusajs/framework/utils" - -const MyCustom = model.define("my_custom", { - id: model.id().primaryKey(), - name: model.text(), - age: model.number(), -}).indexes([ - { - on: ["name", "age"], - unique: true, - }, -]) - -export default MyCustom -``` - -This creates a unique composite index on the `name` and `age` properties. - - -# Add Data Model Check Constraints - -In this chapter, you'll learn how to add check constraints to your data model. - -## What is a Check Constraint? - -A check constraint is a condition that must be satisfied by records inserted into a database table, otherwise an error is thrown. - -For example, if you have a data model with a `price` property, you want to only allow positive number values. So, you add a check constraint that fails when inserting a record with a negative price value. - -*** - -## How to Set a Check Constraint? - -To set check constraints on a data model, use the `checks` method. This method accepts an array of check constraints to apply on the data model. - -For example, to set a check constraint on a `price` property that ensures its value can only be a positive number: - -```ts highlights={checks1Highlights} -import { model } from "@medusajs/framework/utils" - -const CustomProduct = model.define("custom_product", { - // ... - price: model.bigNumber(), -}) -.checks([ - (columns) => `${columns.price} >= 0`, -]) -``` - -The item passed in the array parameter of `checks` can be a callback function that accepts as a parameter an object whose keys are the names of the properties in the data model schema, and values the respective column name in the database. - -The function returns a string indicating the [SQL check constraint expression](https://www.postgresql.org/docs/current/ddl-constraints.html#DDL-CONSTRAINTS-CHECK-CONSTRAINTS). In the expression, use the `columns` parameter to access a property's column name. - -You can also pass an object to the `checks` method: - -```ts highlights={checks2Highlights} -import { model } from "@medusajs/framework/utils" - -const CustomProduct = model.define("custom_product", { - // ... - price: model.bigNumber(), -}) -.checks([ - { - name: "custom_product_price_check", - expression: (columns) => `${columns.price} >= 0`, - }, -]) -``` - -The object accepts the following properties: - -- `name`: The check constraint's name. -- `expression`: A function similar to the one that can be passed to the array. It accepts an object of columns and returns an [SQL check constraint expression](https://www.postgresql.org/docs/current/ddl-constraints.html#DDL-CONSTRAINTS-CHECK-CONSTRAINTS). - -*** - -## Apply in Migrations - -After adding the check constraint, make sure to generate and run migrations if you already have the table in the database. Otherwise, the check constraint won't be reflected. - -To generate a migration for the data model's module then reflect it on the database, run the following command: - -```bash -npx medusa db:generate custom_module -npx medusa db:migrate -``` - -The first command generates the migration under the `migrations` directory of your module's directory, and the second reflects it on the database. - - -# Manage Relationships - -In this chapter, you'll learn how to manage relationships between data models when creating, updating, or retrieving records using the module's main service. - -## Manage One-to-One Relationship - -### BelongsTo Side of One-to-One - -When you create a record of a data model that belongs to another through a one-to-one relation, pass the ID of the other data model's record in the `{relation}_id` property, where `{relation}` is the name of the relation property. - -For example, assuming you have the [User and Email data models from the previous chapter](https://docs.medusajs.com/learn/fundamentals/data-models/relationships#one-to-one-relationship/index.html.md), set an email's user ID as follows: - -```ts highlights={belongsHighlights} -// when creating an email -const email = await helloModuleService.createEmails({ - // other properties... - user_id: "123", -}) - -// when updating an email -const email = await helloModuleService.updateEmails({ - id: "321", - // other properties... - user_id: "123", -}) -``` - -In the example above, you pass the `user_id` property when creating or updating an email to specify the user it belongs to. - -### HasOne Side - -When you create a record of a data model that has one of another, pass the ID of the other data model's record in the relation property. - -For example, assuming you have the [User and Email data models from the previous chapter](https://docs.medusajs.com/learn/fundamentals/data-models/relationships#one-to-one-relationship/index.html.md), set a user's email ID as follows: - -```ts highlights={hasOneHighlights} -// when creating a user -const user = await helloModuleService.createUsers({ - // other properties... - email: "123", -}) - -// when updating a user -const user = await helloModuleService.updateUsers({ - id: "321", - // other properties... - email: "123", -}) -``` - -In the example above, you pass the `email` property when creating or updating a user to specify the email it has. - -*** - -## Manage One-to-Many Relationship - -In a one-to-many relationship, you can only manage the associations from the `belongsTo` side. - -When you create a record of the data model on the `belongsTo` side, pass the ID of the other data model's record in the `{relation}_id` property, where `{relation}` is the name of the relation property. - -For example, assuming you have the [Product and Store data models from the previous chapter](https://docs.medusajs.com/learn/fundamentals/data-models/relationships#one-to-many-relationship/index.html.md), set a product's store ID as follows: - -```ts highlights={manyBelongsHighlights} -// when creating a product -const product = await helloModuleService.createProducts({ - // other properties... - store_id: "123", -}) - -// when updating a product -const product = await helloModuleService.updateProducts({ - id: "321", - // other properties... - store_id: "123", -}) -``` - -In the example above, you pass the `store_id` property when creating or updating a product to specify the store it belongs to. - -*** - -## Manage Many-to-Many Relationship - -If your many-to-many relation is represented with a [pivotEntity](https://docs.medusajs.com/learn/fundamentals/data-models/relationships#many-to-many-with-custom-columns/index.html.md), refer to [this section](#manage-many-to-many-relationship-with-pivotentity) instead. - -### Create Associations - -When you create a record of a data model that has a many-to-many relationship to another data model, pass an array of IDs of the other data model's records in the relation property. - -For example, assuming you have the [Order and Product data models from the previous chapter](https://docs.medusajs.com/learn/fundamentals/data-models/relationships#many-to-many-relationship/index.html.md), set the association between products and orders as follows: - -```ts highlights={manyHighlights} -// when creating a product -const product = await helloModuleService.createProducts({ - // other properties... - orders: ["123", "321"], -}) - -// when creating an order -const order = await helloModuleService.createOrders({ - id: "321", - // other properties... - products: ["123", "321"], -}) -``` - -In the example above, you pass the `orders` property when you create a product, and you pass the `products` property when you create an order. - -### Update Associations - -When you use the `update` methods generated by the service factory, you also pass an array of IDs as the relation property's value to add new associated records. - -However, this removes any existing associations to records whose IDs aren't included in the array. - -For example, assuming you have the [Order and Product data models from the previous chapter](https://docs.medusajs.com/learn/fundamentals/data-models/relationships#many-to-many-relationship/index.html.md), you update the product's related orders as so: - -```ts -const product = await helloModuleService.updateProducts({ - id: "123", - // other properties... - orders: ["321"], -}) -``` - -If the product was associated with an order, and you don't include that order's ID in the `orders` array, the association between the product and order is removed. - -So, to add a new association without removing existing ones, retrieve the product first to pass its associated orders when updating the product: - -```ts highlights={updateAssociationHighlights} -const product = await helloModuleService.retrieveProduct( - "123", - { - relations: ["orders"], - } -) - -const updatedProduct = await helloModuleService.updateProducts({ - id: product.id, - // other properties... - orders: [ - ...product.orders.map((order) => order.id), - "321", - ], -}) -``` - -This keeps existing associations between the product and orders, and adds a new one. - -*** - -## Manage Many-to-Many Relationship with pivotEntity - -If your many-to-many relation is represented without a [pivotEntity](https://docs.medusajs.com/learn/fundamentals/data-models/relationships#many-to-many-with-custom-columns/index.html.md), refer to [this section](#manage-many-to-many-relationship) instead. - -If you have a many-to-many relation with a `pivotEntity` specified, make sure to pass the data model representing the pivot table to [MedusaService](https://docs.medusajs.com/learn/fundamentals/modules/service-factory/index.html.md) that your module's service extends. - -For example, assuming you have the [Order, Product, and OrderProduct models from the previous chapter](https://docs.medusajs.com/learn/fundamentals/data-models/relationships#many-to-many-with-custom-columns/index.html.md), add `OrderProduct` to `MedusaService`'s object parameter: - -```ts highlights={["4"]} -class BlogModuleService extends MedusaService({ - Order, - Product, - OrderProduct, -}) {} -``` - -This will generate Create, Read, Update and Delete (CRUD) methods for the `OrderProduct` data model, which you can use to create relations between orders and products and manage the extra columns in the pivot table. - -For example: - -```ts -// create order-product association -const orderProduct = await blogModuleService.createOrderProducts({ - order_id: "123", - product_id: "123", - metadata: { - test: true, - }, -}) - -// update order-product association -const orderProduct = await blogModuleService.updateOrderProducts({ - id: "123", - metadata: { - test: false, - }, -}) - -// delete order-product association -await blogModuleService.deleteOrderProducts("123") -``` - -Since the `OrderProduct` data model belongs to the `Order` and `Product` data models, you can set its order and product as explained in the [one-to-many relationship section](#manage-one-to-many-relationship) using `order_id` and `product_id`. - -Refer to the [service factory reference](https://docs.medusajs.com/resources/service-factory-reference/index.html.md) for a full list of generated methods and their usages. - -*** - -## Retrieve Records of Relation - -The `list`, `listAndCount`, and `retrieve` methods of a module's main service accept as a second parameter an object of options. - -To retrieve the records associated with a data model's records through a relationship, pass in the second parameter object a `relations` property whose value is an array of relationship names. - -For example, assuming you have the [Order and Product data models from the previous chapter](https://docs.medusajs.com/learn/fundamentals/data-models/relationships#many-to-many-relationship/index.html.md), you retrieve a product's orders as follows: - -```ts highlights={retrieveHighlights} -const product = await blogModuleService.retrieveProducts( - "123", - { - relations: ["orders"], - } -) -``` - -In the example above, the retrieved product has an `orders` property, whose value is an array of orders associated with the product. - - -# Data Model Properties - -In this chapter, you'll learn about the different property types you can use in a data model and how to configure a data model's properties. - -## Data Model's Default Properties - -By default, Medusa creates the following properties for every data model: - -- `created_at`: A [dateTime](#dateTime) property that stores when a record of the data model was created. -- `updated_at`: A [dateTime](#dateTime) property that stores when a record of the data model was updated. -- `deleted_at`: A [dateTime](#dateTime) property that stores when a record of the data model was deleted. When you soft-delete a record, Medusa sets the `deleted_at` property to the current date. - -*** - -## Property Types - -This section covers the different property types you can define in a data model's schema using the `model` methods. - -### id - -The `id` method defines an automatically generated string ID property. The generated ID is a unique string that has a mix of letters and numbers. - -For example: - -```ts highlights={idHighlights} -import { model } from "@medusajs/framework/utils" - -const Post = model.define("post", { - id: model.id(), - // ... -}) - -export default Post -``` - -### text - -The `text` method defines a string property. - -For example: - -```ts highlights={textHighlights} -import { model } from "@medusajs/framework/utils" - -const Post = model.define("post", { - name: model.text(), - // ... -}) - -export default Post -``` - -### number - -The `number` method defines a number property. - -For example: - -```ts highlights={numberHighlights} -import { model } from "@medusajs/framework/utils" - -const Post = model.define("post", { - age: model.number(), - // ... -}) - -export default Post -``` - -### float - -This property is only available after [Medusa v2.1.2](https://github.com/medusajs/medusa/releases/tag/v2.1.2). - -The `float` method defines a number property that allows for values with decimal places. - -Use this property type when it's less important to have high precision for numbers with large decimal places. Alternatively, for higher percision, use the [bigNumber property](#bignumber). - -For example: - -```ts highlights={floatHighlights} -import { model } from "@medusajs/framework/utils" - -const Post = model.define("post", { - rating: model.float(), - // ... -}) - -export default Post -``` - -### bigNumber - -The `bigNumber` method defines a number property that expects large numbers, such as prices. - -Use this property type when it's important to have high precision for numbers with large decimal places. Alternatively, for less percision, use the [float property](#float). - -For example: - -```ts highlights={bigNumberHighlights} -import { model } from "@medusajs/framework/utils" - -const Post = model.define("post", { - price: model.bigNumber(), - // ... -}) - -export default Post -``` - -### boolean - -The `boolean` method defines a boolean property. - -For example: - -```ts highlights={booleanHighlights} -import { model } from "@medusajs/framework/utils" - -const Post = model.define("post", { - hasAccount: model.boolean(), - // ... -}) - -export default Post -``` - -### enum - -The `enum` method defines a property whose value can only be one of the specified values. - -For example: - -```ts highlights={enumHighlights} -import { model } from "@medusajs/framework/utils" - -const Post = model.define("post", { - color: model.enum(["black", "white"]), - // ... -}) - -export default Post -``` - -The `enum` method accepts an array of possible string values. - -### dateTime - -The `dateTime` method defines a timestamp property. - -For example: - -```ts highlights={dateTimeHighlights} -import { model } from "@medusajs/framework/utils" - -const Post = model.define("post", { - date_of_birth: model.dateTime(), - // ... -}) - -export default Post -``` - -### json - -The `json` method defines a property whose value is a stringified JSON object. - -For example: - -```ts highlights={jsonHighlights} -import { model } from "@medusajs/framework/utils" - -const Post = model.define("post", { - metadata: model.json(), - // ... -}) - -export default Post -``` - -### array - -The `array` method defines an array of strings property. - -For example: - -```ts highlights={arrHightlights} -import { model } from "@medusajs/framework/utils" - -const Post = model.define("post", { - names: model.array(), - // ... -}) - -export default Post -``` - -### Properties Reference - -Refer to the [Data Model Language (DML) reference](https://docs.medusajs.com/resources/references/data-model/index.html.md) for a full reference of the properties. - -*** - -## Set Primary Key Property - -To set any `id`, `text`, or `number` property as a primary key, use the `primaryKey` method. - -For example: - -```ts highlights={highlights} -import { model } from "@medusajs/framework/utils" - -const Post = model.define("post", { - id: model.id().primaryKey(), - // ... -}) - -export default Post -``` - -In the example above, the `id` property is defined as the data model's primary key. - -*** - -## Property Default Value - -Use the `default` method on a property's definition to specify the default value of a property. - -For example: - -```ts highlights={defaultHighlights} -import { model } from "@medusajs/framework/utils" - -const Post = model.define("post", { - color: model - .enum(["black", "white"]) - .default("black"), - age: model - .number() - .default(0), - // ... -}) - -export default Post -``` - -In this example, you set the default value of the `color` enum property to `black`, and that of the `age` number property to `0`. - -*** - -## Make Property Optional - -Use the `nullable` method to indicate that a property’s value can be `null`. This is useful when you want a property to be optional. - -For example: - -```ts highlights={nullableHighlights} -import { model } from "@medusajs/framework/utils" - -const Post = model.define("post", { - price: model.bigNumber().nullable(), - // ... -}) - -export default Post -``` - -In the example above, the `price` property is configured to allow `null` values, making it optional. - -*** - -## Unique Property - -The `unique` method indicates that a property’s value must be unique in the database through a unique index. - -For example: - -```ts highlights={uniqueHighlights} -import { model } from "@medusajs/framework/utils" - -const User = model.define("user", { - email: model.text().unique(), - // ... -}) - -export default User -``` - -In this example, multiple users can’t have the same email. - -*** - -## Define Database Index on Property - -Use the `index` method on a property's definition to define a database index. - -For example: - -```ts highlights={dbIndexHighlights} -import { model } from "@medusajs/framework/utils" - -const Post = model.define("post", { - id: model.id().primaryKey(), - name: model.text().index( - "IDX_MY_CUSTOM_NAME" - ), -}) - -export default Post -``` - -The `index` method optionally accepts the name of the index as a parameter. - -In this example, you define an index on the `name` property. - -*** - -## Define a Searchable Property - -Methods generated by the [service factory](https://docs.medusajs.com/learn/fundamentals/modules/service-factory/index.html.md) that accept filters, such as `list{ModelName}s`, accept a `q` property as part of the filters. - -When the `q` filter is passed, the data model's searchable properties are queried to find matching records. - -Use the `searchable` method on a `text` property to indicate that it's searchable. - -For example: - -```ts highlights={searchableHighlights} -import { model } from "@medusajs/framework/utils" - -const Post = model.define("post", { - title: model.text().searchable(), - // ... -}) - -export default Post -``` - -In this example, the `title` property is searchable. - -### Search Example - -If you pass a `q` filter to the `listPosts` method: - -```ts -const posts = await blogModuleService.listPosts({ - q: "New Products", -}) -``` - -This retrieves records that include `New Products` in their `title` property. - - -# Data Model Relationships - -In this chapter, you’ll learn how to define relationships between data models in your module. - -## What is a Relationship Property? - -A relationship property defines an association in the database between two models. It's created using the Data Model Language (DML) methods, such as `hasOne` or `belongsTo`. - -When you generate a migration for these data models, the migrations include foreign key columns or pivot tables, based on the relationship's type. - -You want to create a relation between data models in the same module. - -You want to create a relationship between data models in different modules. Use module links instead. - -*** - -## One-to-One Relationship - -A one-to-one relationship indicates that one record of a data model belongs to or is associated with another. - -To define a one-to-one relationship, create relationship properties in the data models using the following methods: - -1. `hasOne`: indicates that the model has one record of the specified model. -2. `belongsTo`: indicates that the model belongs to one record of the specified model. - -For example: - -```ts highlights={oneToOneHighlights} -import { model } from "@medusajs/framework/utils" - -const User = model.define("user", { - id: model.id().primaryKey(), - email: model.hasOne(() => Email), -}) - -const Email = model.define("email", { - id: model.id().primaryKey(), - user: model.belongsTo(() => User, { - mappedBy: "email", - }), -}) -``` - -In the example above, a user has one email, and an email belongs to one user. - -The `hasOne` and `belongsTo` methods accept a function as the first parameter. The function returns the associated data model. - -The `belongsTo` method also requires passing as a second parameter an object with the property `mappedBy`. Its value is the name of the relationship property in the other data model. - -### Optional Relationship - -To make the relationship optional on the `hasOne` or `belongsTo` side, use the `nullable` method on either property as explained in [this chapter](https://docs.medusajs.com/learn/fundamentals/data-models/properties#make-property-optional/index.html.md). - -### One-sided One-to-One Relationship - -If the one-to-one relationship is only defined on one side, pass `undefined` to the `mappedBy` property in the `belongsTo` method. - -For example: - -```ts highlights={oneToOneUndefinedHighlights} -import { model } from "@medusajs/framework/utils" - -const User = model.define("user", { - id: model.id().primaryKey(), -}) - -const Email = model.define("email", { - id: model.id().primaryKey(), - user: model.belongsTo(() => User, { - mappedBy: undefined, - }), -}) -``` - -### One-to-One Relationship in the Database - -When you generate the migrations of data models that have a one-to-one relationship, the migration adds to the table of the data model that has the `belongsTo` property: - -1. A column of the format `{relation_name}_id` to store the ID of the record of the related data model. For example, the `email` table will have a `user_id` column. -2. A foreign key on the `{relation_name}_id` column to the table of the related data model. - -![Diagram illustrating the relation between user and email records in the database](https://res.cloudinary.com/dza7lstvk/image/upload/v1726733492/Medusa%20Book/one-to-one_cj5np3.jpg) - -*** - -## One-to-Many Relationship - -A one-to-many relationship indicates that one record of a data model has many records of another data model. - -To define a one-to-many relationship, create relationship properties in the data models using the following methods: - -1. `hasMany`: indicates that the model has more than one record of the specified model. -2. `belongsTo`: indicates that the model belongs to one record of the specified model. - -For example: - -```ts highlights={oneToManyHighlights} -import { model } from "@medusajs/framework/utils" - -const Store = model.define("store", { - id: model.id().primaryKey(), - products: model.hasMany(() => Product), -}) - -const Product = model.define("product", { - id: model.id().primaryKey(), - store: model.belongsTo(() => Store, { - mappedBy: "products", - }), -}) -``` - -In this example, a store has many products, but a product belongs to one store. - -### Optional Relationship - -To make the relationship optional on the `belongsTo` side, use the `nullable` method on the property as explained in [this chapter](https://docs.medusajs.com/learn/fundamentals/data-models/properties#make-property-optional/index.html.md). - -### One-to-Many Relationship in the Database - -When you generate the migrations of data models that have a one-to-many relationship, the migration adds to the table of the data model that has the `belongsTo` property: - -1. A column of the format `{relation_name}_id` to store the ID of the record of the related data model. For example, the `product` table will have a `store_id` column. -2. A foreign key on the `{relation_name}_id` column to the table of the related data model. - -![Diagram illustrating the relation between a store and product records in the database](https://res.cloudinary.com/dza7lstvk/image/upload/v1726733937/Medusa%20Book/one-to-many_d6wtcw.jpg) - -*** - -## Many-to-Many Relationship - -A many-to-many relationship indicates that many records of a data model can be associated with many records of another data model. - -To define a many-to-many relationship, create relationship properties in the data models using the `manyToMany` method. - -For example: - -```ts highlights={manyToManyHighlights} -import { model } from "@medusajs/framework/utils" - -const Order = model.define("order", { - id: model.id().primaryKey(), - products: model.manyToMany(() => Product, { - mappedBy: "orders", - pivotTable: "order_product", - joinColumn: "order_id", - inverseJoinColumn: "product_id", - }), -}) - -const Product = model.define("product", { - id: model.id().primaryKey(), - orders: model.manyToMany(() => Order, { - mappedBy: "products", - }), -}) -``` - -The `manyToMany` method accepts two parameters: - -1. A function that returns the associated data model. -2. An object of optional configuration. Only one of the data models in the relation can define the `pivotTable`, `joinColumn`, and `inverseJoinColumn` configurations, and it's considered the owner data model. The object can accept the following properties: - - `mappedBy`: The name of the relationship property in the other data model. If not set, the property's name is inferred from the associated data model's name. - - `pivotTable`: The name of the pivot table created in the database for the many-to-many relation. If not set, the pivot table is inferred by combining the names of the data models' tables in alphabetical order, separating them by `_`, and pluralizing the last name. For example, `order_products`. - - `joinColumn`: The name of the column in the pivot table that points to the owner model's primary key. - - `inverseJoinColumn`: The name of the column in the pivot table that points to the owned model's primary key. - -The `pivotTable`, `joinColumn`, and `inverseJoinColumn` properties are only available after [Medusa v2.0.7](https://github.com/medusajs/medusa/releases/tag/v2.0.7). - -Following [Medusa v2.1.0](https://github.com/medusajs/medusa/releases/tag/v2.1.0), if `pivotTable`, `joinColumn`, and `inverseJoinColumn` aren't specified on either model, the owner is decided based on alphabetical order. So, in the example above, the `Order` data model would be the owner. - -In this example, an order is associated with many products, and a product is associated with many orders. Since the `pivotTable`, `joinColumn`, and `inverseJoinColumn` configurations are defined on the order, it's considered the owner data model. - -### Many-to-Many Relationship in the Database - -When you generate the migrations of data models that have a many-to-many relationship, the migration adds a new pivot table. Its name is either the name you specify in the `pivotTable` configuration or the inferred name combining the names of the data models' tables in alphabetical order, separating them by `_`, and pluralizing the last name. For example, `order_products`. - -The pivot table has a column with the name `{data_model}_id` for each of the data model's tables. It also has foreign keys on each of these columns to their respective tables. - -The pivot table has columns with foreign keys pointing to the primary key of the associated tables. The column's name is either: - -- The value of the `joinColumn` configuration for the owner table, and the `inverseJoinColumn` configuration for the owned table; -- Or the inferred name `{table_name}_id`. - -![Diagram illustrating the relation between order and product records in the database](https://res.cloudinary.com/dza7lstvk/image/upload/v1726734269/Medusa%20Book/many-to-many_fzy5pq.jpg) - -### Many-To-Many with Custom Columns - -To add custom columns to the pivot table between two data models having a many-to-many relationship, you must define a new data model that represents the pivot table. - -For example: - -```ts highlights={manyToManyColumnHighlights} -import { model } from "@medusajs/framework/utils" - -export const Order = model.define("order_test", { - id: model.id().primaryKey(), - products: model.manyToMany(() => Product, { - pivotEntity: () => OrderProduct, - }), -}) - -export const Product = model.define("product_test", { - id: model.id().primaryKey(), - orders: model.manyToMany(() => Order), -}) - -export const OrderProduct = model.define("orders_products", { - id: model.id().primaryKey(), - order: model.belongsTo(() => Order, { - mappedBy: "products", - }), - product: model.belongsTo(() => Product, { - mappedBy: "orders", - }), - metadata: model.json().nullable(), -}) -``` - -The `Order` and `Product` data models have a many-to-many relationship. To add extra columns to the created pivot table, you pass a `pivotEntity` option to the `products` relation in `Order` (since `Order` is the owner). The value of `pivotEntity` is a function that returns the data model representing the pivot table. - -The `OrderProduct` model defines, aside from the ID, the following properties: - -- `order`: A relation that indicates this model belongs to the `Order` data model. You set the `mappedBy` option to the many-to-many relation's name in the `Order` data model. -- `product`: A relation that indicates this model belongs to the `Product` data model. You set the `mappedBy` option to the many-to-many relation's name in the `Product` data model. -- `metadata`: An extra column to add to the pivot table of type `json`. You can add other columns as well to the model. - -*** - -## Set Relationship Name in the Other Model - -The relationship property methods accept as a second parameter an object of options. The `mappedBy` property defines the name of the relationship in the other data model. - -This is useful if the relationship property’s name is different from that of the associated data model. - -As seen in previous examples, the `mappedBy` option is required for the `belongsTo` method. - -For example: - -```ts highlights={relationNameHighlights} -import { model } from "@medusajs/framework/utils" - -const User = model.define("user", { - id: model.id().primaryKey(), - email: model.hasOne(() => Email, { - mappedBy: "owner", - }), -}) - -const Email = model.define("email", { - id: model.id().primaryKey(), - owner: model.belongsTo(() => User, { - mappedBy: "email", - }), -}) -``` - -In this example, you specify in the `User` data model’s relationship property that the name of the relationship in the `Email` data model is `owner`. - -*** - -## Cascades - -When an operation is performed on a data model, such as record deletion, the relationship cascade specifies what related data model records should be affected by it. - -For example, if a store is deleted, its products should also be deleted. - -The `cascades` method used on a data model configures which child records an operation is cascaded to. - -For example: - -```ts highlights={highlights} -import { model } from "@medusajs/framework/utils" - -const Store = model.define("store", { - id: model.id().primaryKey(), - products: model.hasMany(() => Product), -}) -.cascades({ - delete: ["products"], -}) - -const Product = model.define("product", { - id: model.id().primaryKey(), - store: model.belongsTo(() => Store, { - mappedBy: "products", - }), -}) -``` - -The `cascades` method accepts an object. Its key is the operation’s name, such as `delete`. The value is an array of relationship property names that the operation is cascaded to. - -In the example above, when a store is deleted, its associated products are also deleted. - - -# Infer Type of Data Model - -In this chapter, you'll learn how to infer the type of a data model. - -## How to Infer Type of Data Model? - -Consider you have a `Post` data model. You can't reference this data model in a type, such as a workflow input or service method output types, since it's a variable. - -Instead, Medusa provides `InferTypeOf` that transforms your data model to a type. - -For example: - -```ts -import { InferTypeOf } from "@medusajs/framework/types" -import { Post } from "../modules/blog/models/post" // relative path to the model - -export type Post = InferTypeOf -``` - -`InferTypeOf` accepts as a type argument the type of the data model. - -Since the `Post` data model is a variable, use the `typeof` operator to pass the data model as a type argument to `InferTypeOf`. - -You can now use the `Post` type to reference a data model in other types, such as in workflow inputs or service method outputs: - -```ts title="Example Service" -// other imports... -import { InferTypeOf } from "@medusajs/framework/types" -import { Post } from "../models/post" - -type Post = InferTypeOf - -class BlogModuleService extends MedusaService({ Post }) { - async doSomething(): Promise { - // ... - } -} -``` - - -# Migrations - -In this chapter, you'll learn what a migration is and how to generate a migration or write it manually. - -## What is a Migration? - -A migration is a TypeScript or JavaScript file that defines database changes made by a module. Migrations are useful when you re-use a module or you're working in a team, so that when one member of a team makes a database change, everyone else can reflect it on their side by running the migrations. - -The migration's file has a class with two methods: - -- The `up` method reflects changes on the database. -- The `down` method reverts the changes made in the `up` method. - -*** - -## Generate Migration - -Instead of you writing the migration manually, the Medusa CLI tool provides a [db:generate](https://docs.medusajs.com/resources/medusa-cli/commands/db#dbgenerate/index.html.md) command to generate a migration for a modules' data models. - -For example, assuming you have a `blog` Module, you can generate a migration for it by running the following command: - -```bash -npx medusa db:generate blog -``` - -This generates a migration file under the `migrations` directory of the Blog Module. You can then run it to reflect the changes in the database as mentioned in [this section](#run-the-migration). - -*** - -## Write a Migration Manually - -You can also write migrations manually. To do that, create a file in the `migrations` directory of the module and in it, a class that has an `up` and `down` method. The class's name should be of the format `Migration{YEAR}{MONTH}{DAY}{HOUR}{MINUTE}.ts` to ensure migrations are ran in the correct order. - -For example: - -```ts title="src/modules/blog/migrations/Migration202507021059.ts" -import { Migration } from "@mikro-orm/migrations" - -export class Migration202507021059 extends Migration { - - async up(): Promise { - this.addSql("create table if not exists \"author\" (\"id\" text not null, \"name\" text not null, \"created_at\" timestamptz not null default now(), \"updated_at\" timestamptz not null default now(), \"deleted_at\" timestamptz null, constraint \"author_pkey\" primary key (\"id\"));") - } - - async down(): Promise { - this.addSql("drop table if exists \"author\" cascade;") - } - -} -``` - -The migration class in the file extends the `Migration` class imported from `@mikro-orm/migrations`. In the `up` and `down` method of the migration class, you use the `addSql` method provided by MikroORM's `Migration` class to run PostgreSQL syntax. - -In the example above, the `up` method creates the table `author`, and the `down` method drops the table if the migration is reverted. - -Refer to [MikroORM's documentation](https://mikro-orm.io/docs/migrations#migration-class) for more details on writing migrations. - -*** - -## Run the Migration - -To run your migration, run the following command: - -This command also syncs module links. If you don't want that, use the `--skip-links` option. - -```bash -npx medusa db:migrate -``` - -This reflects the changes in the database as implemented in the migration's `up` method. - -*** - -## Rollback the Migration - -To rollback or revert the last migration you ran for a module, run the following command: - -```bash -npx medusa db:rollback blog -``` - -This rolls back the last ran migration on the Blog Module. - -### Caution: Rollback Migration before Deleting - -If you need to delete a migration file, make sure to rollback the migration first. Otherwise, you might encounter issues when generating and running new migrations. - -For example, if you delete the migration of the Blog Module, then try to create a new one, Medusa will create a brand new migration that re-creates the tables or indices. If those are still in the database, you might encounter errors. - -So, always rollback the migration before deleting it. - -*** - -## More Database Commands - -To learn more about the Medusa CLI's database commands, refer to [this CLI reference](https://docs.medusajs.com/resources/medusa-cli/commands/db/index.html.md). - - -# Add Columns to a Link Table - -In this chapter, you'll learn how to add custom columns to a link definition's table and manage them. - -## Link Table's Default Columns - -When you define a link between two data models, Medusa creates a link table in the database to store the IDs of the linked records. You can learn more about the created table in the [Module Links chapter](https://docs.medusajs.com/learn/fundamentals/module-links/index.html.md). - -In various cases, you might need to store additional data in the link table. For example, if you define a link between a `product` and a `post`, you might want to store the publish date of the product's post in the link table. - -In those cases, you can add a custom column to a link's table in the link definition. You can later set that column whenever you create or update a link between the linked records. - -*** - -## How to Add Custom Columns to a Link's Table? - -The `defineLink` function used to define a link accepts a third parameter, which is an object of options. - -To add custom columns to a link's table, pass in the third parameter of `defineLink` a `database` property: - -```ts highlights={linkHighlights} -import BlogModule from "../modules/blog" -import ProductModule from "@medusajs/medusa/product" -import { defineLink } from "@medusajs/framework/utils" - -export default defineLink( - ProductModule.linkable.product, - BlogModule.linkable.blog, - { - database: { - extraColumns: { - metadata: { - type: "json", - }, - }, - }, - } -) -``` - -This adds to the table created for the link between `product` and `blog` a `metadata` column of type `json`. - -### Database Options - -The `database` property defines configuration for the table created in the database. - -Its `extraColumns` property defines custom columns to create in the link's table. - -`extraColumns`'s value is an object whose keys are the names of the columns, and values are the column's configurations as an object. - -### Column Configurations - -The column's configurations object accepts the following properties: - -- `type`: The column's type. Possible values are: - - `string` - - `text` - - `integer` - - `boolean` - - `date` - - `time` - - `datetime` - - `enum` - - `json` - - `array` - - `enumArray` - - `float` - - `double` - - `decimal` - - `bigint` - - `mediumint` - - `smallint` - - `tinyint` - - `blob` - - `uuid` - - `uint8array` -- `defaultValue`: The column's default value. -- `nullable`: Whether the column can have `null` values. - -*** - -## Set Custom Column when Creating Link - -The object you pass to Link's `create` method accepts a `data` property. Its value is an object whose keys are custom column names, and values are the value of the custom column for this link. - -For example: - -Learn more about Link, how to resolve it, and its methods in [this chapter](https://docs.medusajs.com/learn/fundamentals/module-links/link/index.html.md). - -```ts -await link.create({ - [Modules.PRODUCT]: { - product_id: "123", - }, - [BLOG_MODULE]: { - post_id: "321", - }, - data: { - metadata: { - test: true, - }, - }, -}) -``` - -*** - -## Retrieve Custom Column with Link - -To retrieve linked records with their custom columns, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query/index.html.md). A module link's definition, exported by a file under `src/links`, has a special `entryPoint` property. Use this property when specifying the `entity` property in Query's `graph` method. - -For example: - -```ts highlights={retrieveHighlights} -import productPostLink from "../links/product-post" - -// ... - -const { data } = await query.graph({ - entity: productPostLink.entryPoint, - fields: ["metadata", "product.*", "post.*"], - filters: { - product_id: "prod_123", - }, -}) -``` - -This retrieves the product of id `prod_123` and its linked `post` records. - -In the `fields` array you pass `metadata`, which is the custom column to retrieve of the link. - -*** - -## Update Custom Column's Value - -Link's `create` method updates a link's data if the link between the specified records already exists. - -So, to update the value of a custom column in a created link, use the `create` method again passing it a new value for the custom column. - -For example: - -```ts -await link.create({ - [Modules.PRODUCT]: { - product_id: "123", - }, - [BLOG_MODULE]: { - post_id: "321", - }, - data: { - metadata: { - test: false, - }, - }, -}) -``` - - # Module Link Direction In this chapter, you'll learn about the difference in module link directions, and which to use based on your use case. @@ -11451,6 +11250,942 @@ export default defineLink( ``` +# Link + +In this chapter, you’ll learn what Link is and how to use it to manage links. + +As of [Medusa v2.2.0](https://github.com/medusajs/medusa/releases/tag/v2.2.0), Remote Link has been deprecated in favor of Link. They have the same usage, so you only need to change the key used to resolve the tool from the Medusa container as explained below. + +## What is Link? + +Link is a class with utility methods to manage links between data models. It’s registered in the Medusa container under the `link` registration name. + +For example: + +```ts collapsibleLines="1-9" expandButtonLabel="Show Imports" +import { + MedusaRequest, + MedusaResponse, +} from "@medusajs/framework/http" +import { + ContainerRegistrationKeys, +} from "@medusajs/framework/utils" + +export async function POST( + req: MedusaRequest, + res: MedusaResponse +): Promise { + const link = req.scope.resolve( + ContainerRegistrationKeys.LINK + ) + + // ... +} +``` + +You can use its methods to manage links, such as create or delete links. + +*** + +## Create Link + +To create a link between records of two data models, use the `create` method of Link. + +For example: + +```ts +import { Modules } from "@medusajs/framework/utils" + +// ... + +await link.create({ + [Modules.PRODUCT]: { + product_id: "prod_123", + }, + "helloModuleService": { + my_custom_id: "mc_123", + }, +}) +``` + +The `create` method accepts as a parameter an object. The object’s keys are the names of the linked modules. + +The keys (names of linked modules) must be in the same [direction](https://docs.medusajs.com/learn/fundamentals/module-links/directions/index.html.md) of the link definition. + +The value of each module’s property is an object, whose keys are of the format `{data_model_snake_name}_id`, and values are the IDs of the linked record. + +So, in the example above, you link a record of the `MyCustom` data model in a `hello` module to a `Product` record in the Product Module. + +### Enforced Integrity Constraints on Link Creation + +Medusa enforces integrity constraints on links based on the link's relation type. So, an error is thrown in the following scenarios: + +- If the link is one-to-one and one of the linked records already has a link to another record of the same data model. For example: + +```ts +// no error +await link.create({ + [Modules.PRODUCT]: { + product_id: "prod_123", + }, + "helloModuleService": { + my_custom_id: "mc_123", + }, +}) + +// throws an error because `prod_123` already has a link to `mc_123` +await link.create({ + [Modules.PRODUCT]: { + product_id: "prod_123", + }, + "helloModuleService": { + my_custom_id: "mc_456", + }, +}) +``` + +- If the link is one-to-many and the "one" side already has a link to another record of the same data model. For example, if a product can have many `MyCustom` records, but a `MyCustom` record can only have one product: + +```ts +// no error +await link.create({ + [Modules.PRODUCT]: { + product_id: "prod_123", + }, + "helloModuleService": { + my_custom_id: "mc_123", + }, +}) + +// also no error +await link.create({ + [Modules.PRODUCT]: { + product_id: "prod_123", + }, + "helloModuleService": { + my_custom_id: "mc_456", + }, +}) + +// throws an error because `mc_123` already has a link to `prod_123` +await link.create({ + [Modules.PRODUCT]: { + product_id: "prod_456", + }, + "helloModuleService": { + my_custom_id: "mc_123", + }, +}) +``` + +There are no integrity constraints in a many-to-many link, so you can create multiple links between the same records. + +*** + +## Dismiss Link + +To remove a link between records of two data models, use the `dismiss` method of Link. + +For example: + +```ts +import { Modules } from "@medusajs/framework/utils" + +// ... + +await link.dismiss({ + [Modules.PRODUCT]: { + product_id: "prod_123", + }, + "helloModuleService": { + my_custom_id: "mc_123", + }, +}) +``` + +The `dismiss` method accepts the same parameter type as the [create method](#create-link). + +The keys (names of linked modules) must be in the same [direction](https://docs.medusajs.com/learn/fundamentals/module-links/directions/index.html.md) of the link definition. + +*** + +## Cascade Delete Linked Records + +If a record is deleted, use the `delete` method of Link to delete all linked records. + +For example: + +```ts +import { Modules } from "@medusajs/framework/utils" + +// ... + +await productModuleService.deleteVariants([variant.id]) + +await link.delete({ + [Modules.PRODUCT]: { + product_id: "prod_123", + }, +}) +``` + +This deletes all records linked to the deleted product. + +*** + +## Restore Linked Records + +If a record that was previously soft-deleted is now restored, use the `restore` method of Link to restore all linked records. + +For example: + +```ts +import { Modules } from "@medusajs/framework/utils" + +// ... + +await productModuleService.restoreProducts(["prod_123"]) + +await link.restore({ + [Modules.PRODUCT]: { + product_id: "prod_123", + }, +}) +``` + + +# Query Context + +In this chapter, you'll learn how to pass contexts when retrieving data with [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query/index.html.md). + +## What is Query Context? + +Query context is a way to pass additional information when retrieving data with Query. This data can be useful when applying custom transformations to the retrieved data based on the current context. + +For example, consider you have a Blog Module with posts and authors. You can accept the user's language as a context and return the posts in the user's language. Another example is how Medusa uses Query Context to [retrieve product variants' prices based on the customer's currency](https://docs.medusajs.com/resources/commerce-modules/product/guides/price/index.html.md). + +*** + +## How to Use Query Context + +The `query.graph` method accepts an optional `context` parameter that can be used to pass additional context either to the data model you're retrieving (for example, `post`), or its related and linked models (for example, `author`). + +You initialize a context using `QueryContext` from the Modules SDK. It accepts an object of contexts as an argument. + +For example, to retrieve posts using Query while passing the user's language as a context: + +```ts +const { data } = await query.graph({ + entity: "post", + fields: ["*"], + context: QueryContext({ + lang: "es", + }), +}) +``` + +In this example, you pass in the context a `lang` property whose value is `es`. + +Then, to handle the context while retrieving records of the data model, in the associated module's service you override the generated `list` method of the data model. + +For example, continuing the example above, you can override the `listPosts` method of the Blog Module's service to handle the context: + +```ts highlights={highlights2} +import { MedusaContext, MedusaService } from "@medusajs/framework/utils" +import { Context, FindConfig } from "@medusajs/framework/types" +import Post from "./models/post" +import Author from "./models/author" + +class BlogModuleService extends MedusaService({ + Post, + Author, +}){ + // @ts-ignore + async listPosts( + filters?: any, + config?: FindConfig | undefined, + @MedusaContext() sharedContext?: Context | undefined + ) { + const context = filters.context ?? {} + delete filters.context + + let posts = await super.listPosts(filters, config, sharedContext) + + if (context.lang === "es") { + posts = posts.map((post) => { + return { + ...post, + title: post.title + " en español", + } + }) + } + + return posts + } +} + +export default BlogModuleService +``` + +In the above example, you override the generated `listPosts` method. This method receives as a first parameter the filters passed to the query, but it also includes a `context` property that holds the context passed to the query. + +You extract the context from `filters`, then retrieve the posts using the parent's `listPosts` method. After that, if the language is set in the context, you transform the titles of the posts. + +All posts returned will now have their titles appended with "en español". + +Learn more about the generated `list` method in [this reference](https://docs.medusajs.com/resources/service-factory-reference/methods/list/index.html.md). + +### Using Pagination with Query + +If you pass pagination fields to `query.graph`, you must also override the `listAndCount` method in the service. + +For example, following along with the previous example, you must override the `listAndCountPosts` method of the Blog Module's service: + +```ts +import { MedusaContext, MedusaService } from "@medusajs/framework/utils" +import { Context, FindConfig } from "@medusajs/framework/types" +import Post from "./models/post" +import Author from "./models/author" + +class BlogModuleService extends MedusaService({ + Post, + Author, +}){ + // @ts-ignore + async listAndCountPosts( + filters?: any, + config?: FindConfig | undefined, + @MedusaContext() sharedContext?: Context | undefined + ) { + const context = filters.context ?? {} + delete filters.context + + const result = await super.listAndCountPosts( + filters, + config, + sharedContext + ) + + if (context.lang === "es") { + result.posts = posts.map((post) => { + return { + ...post, + title: post.title + " en español", + } + }) + } + + return result + } +} + +export default BlogModuleService +``` + +Now, the `listAndCountPosts` method will handle the context passed to `query.graph` when you pass pagination fields. You can also move the logic to transform the posts' titles to a separate method and call it from both `listPosts` and `listAndCountPosts`. + +*** + +## Passing Query Context to Related Data Models + +If you're retrieving a data model and you want to pass context to its associated model in the same module, you can pass them as part of `QueryContext`'s parameter, then handle them in the same `list` method. + +For linked data models, check out the [next section](#passing-query-context-to-linked-data-models). + +For example, to pass a context for the post's authors: + +```ts highlights={highlights3} +const { data } = await query.graph({ + entity: "post", + fields: ["*"], + context: QueryContext({ + lang: "es", + author: QueryContext({ + lang: "es", + }), + }), +}) +``` + +Then, in the `listPosts` method, you can handle the context for the post's authors: + +```ts highlights={highlights4} +import { MedusaContext, MedusaService } from "@medusajs/framework/utils" +import { Context, FindConfig } from "@medusajs/framework/types" +import Post from "./models/post" +import Author from "./models/author" + +class BlogModuleService extends MedusaService({ + Post, + Author, +}){ + // @ts-ignore + async listPosts( + filters?: any, + config?: FindConfig | undefined, + @MedusaContext() sharedContext?: Context | undefined + ) { + const context = filters.context ?? {} + delete filters.context + + let posts = await super.listPosts(filters, config, sharedContext) + + const isPostLangEs = context.lang === "es" + const isAuthorLangEs = context.author?.lang === "es" + + if (isPostLangEs || isAuthorLangEs) { + posts = posts.map((post) => { + return { + ...post, + title: isPostLangEs ? post.title + " en español" : post.title, + author: { + ...post.author, + name: isAuthorLangEs ? post.author.name + " en español" : post.author.name, + }, + } + }) + } + + return posts + } +} + +export default BlogModuleService +``` + +The context in `filters` will also have the context for `author`, which you can use to make transformations to the post's authors. + +*** + +## Passing Query Context to Linked Data Models + +If you're retrieving a data model and you want to pass context to a linked model in a different module, pass to the `context` property an object instead, where its keys are the linked model's name and the values are the context for that linked model. + +For example, consider the Product Module's `Product` data model is linked to the Blog Module's `Post` data model. You can pass context to the `Post` data model while retrieving products like so: + +```ts highlights={highlights5} +const { data } = await query.graph({ + entity: "product", + fields: ["*", "post.*"], + context: { + post: QueryContext({ + lang: "es", + }), + }, +}) +``` + +In this example, you retrieve products and their associated posts. You also pass a context for `post`, indicating the customer's language. + +To handle the context, you override the generated `listPosts` method of the Blog Module as explained [previously](#how-to-use-query-context). + + +# Read-Only Module Link + +In this chapter, you’ll learn what a read-only module link is and how to define one. + +## What is a Read-Only Module Link? + +Consider a scenario where you need to access related records from another module, but don't want the overhead of managing or storing the links between them. This can include cases where you're working with external data models not stored in your Medusa database, such as third-party systems. + +In those cases, instead of defining a [Module Link](https://docs.medusajs.com/learn/fundamentals/module-links/index.html.md) whose linked records must be stored in a link table in the database, you can use a read-only module link. A read-only module link builds a virtual relation from one data model to another in a different module without creating a link table in the database. Instead, the linked record's ID is stored in the first data model's field. + +For example, Medusa creates a read-only module link from the `Cart` data model of the [Cart Module](https://docs.medusajs.com/resources/commerce-modules/cart/index.html.md) to the `Customer` data model of the [Customer Module](https://docs.medusajs.com/resources/commerce-modules/customer/index.html.md). This link allows you to access the details of the cart's customer without managing the link. Instead, the customer's ID is stored in the `Cart` data model. + +![Diagram illustrating the read-only module link from cart to customer](https://res.cloudinary.com/dza7lstvk/image/upload/v1742212508/Medusa%20Book/cart-customer_w6vk59.jpg) + +*** + +## How to Define a Read-Only Module Link + +The `defineLink` function accepts an optional third-parameter object that can hold additional configurations for the module link. + +If you're not familiar with the `defineLink` function, refer to the [Module Links chapter](https://docs.medusajs.com/learn/fundamentals/module-links/index.html.md) for more information. + +To make the module link read-only, pass the `readOnly` property as `true`. You must also set in the link configuration of the first data model a `field` property that specifies the data model's field where the linked record's ID is stored. + +For example: + +```ts highlights={highlights} +import BlogModule from "../modules/blog" +import ProductModule from "@medusajs/medusa/product" +import { defineLink } from "@medusajs/framework/utils" + +export default defineLink( + { + linkable: BlogModule.linkable.post, + field: "product_id", + }, + ProductModule.linkable.product, + { + readOnly: true, + } +) +``` + +In this example, you define a read-only module link from the Blog Module's `post` data model to the Product Module's `product` data model. You do that by: + +- Passing an object as a first parameter that accepts the linkable configuration and the field where the linked record's ID is stored. +- Setting the `readOnly` property to `true` in the third parameter. + +Unlike the stored module link, Medusa will not create a table in the database for this link. Instead, Medusa uses the ID stored in the specified field of the first data model to retrieve the linked record. + +*** + +## Retrieve Read-Only Linked Record + +[Query](https://docs.medusajs.com/learn/fundamentals/module-links/query/index.html.md) allows you to retrieve records linked through a read-only module link. + +For example, assuming you have the module link created in [the above section](#how-to-define-a-read-only-module-link), you can retrieve a post and its linked product as follows: + +```ts +const { result } = await query.graph({ + entity: "post", + fields: ["id", "product.*"], + filters: { + id: "post_123", + }, +}) +``` + +In the above example, you retrieve a post and its linked product. Medusa will use the ID of the product in the post's `product_id` field to determine which product should be retrieved. + +*** + +## Read-Only Module Link Direction + +A read-only module is uni-directional. So, you can only retrieve the linked record from the first data model. If you need to access the linked record from the second data model, you must define another read-only module link in the opposite direction. + +In the `blog` -> `product` example, you can access a post's product, but you can't access a product's posts. You would have to define another read-only module link from `product` to `blog` to access a product's posts. + +*** + +## Inverse Read-Only Module Link + +An inverse read-only module link is a read-only module link that allows you to access the linked record based on the ID stored in the second data model. + +For example, consider you want to access a product's posts. You can define a read-only module link from the Product Module's `product` data model to the Blog Module's `post` data model: + +```ts +import BlogModule from "../modules/blog" +import ProductModule from "@medusajs/medusa/product" +import { defineLink } from "@medusajs/framework/utils" + +export default defineLink( + { + linkable: ProductModule.linkable.product, + field: "id", + }, + { + ...BlogModule.linkable.post.id, + primaryKey: "product_id", + }, + { + readOnly: true, + } +) +``` + +In the above example, you define a read-only module link from the Product Module's `product` data model to the Blog Module's `post` data model. This link allows you to access a product's posts. + +Since you can't add a `post_id` field to the `product` data model, you must: + +1. Set the `field` property in the first data model's link configuration to the product's ID field. +2. Spread the `BlogModule.linkable.post.id` object in the second parameter object and set the `primaryKey` property to the field in the `post` data model that holds the product's ID. + +You can now retrieve a product and its linked posts: + +```ts +const { result } = await query.graph({ + entity: "product", + fields: ["id", "post.*"], + filters: { + id: "prod_123", + }, +}) +``` + +*** + +## One-to-One or One-to-Many? + +When you retrieve the linked record through a read-only module link, the retrieved data may be an object (one-to-one) or an array of objects (one-to-many) based on different criteria. + +|Scenario|Relation Type| +|---|---|---| +|The first data model's |One-to-one relation| +|The first data model's |One-to-many relation| +|The read-only module link is inversed.|One-to-many relation if multiple records in the second data model have the same ID of the first data model. Otherwise, one-to-one relation.| + +### One-to-One Relation + +Consider the first read-only module link you defined in this chapter: + +```ts +import BlogModule from "../modules/blog" +import ProductModule from "@medusajs/medusa/product" + +export default defineLink( + { + linkable: BlogModule.linkable.post, + field: "product_id", + }, + ProductModule.linkable.product, + { + readOnly: true, + } +) +``` + +Since the `product_id` field of a post stores the ID of a single product, the link is a one-to-one relation. When querying a post, you'll get a single product object: + +```json title="Example Data" +[ + { + "id": "post_123", + "product_id": "prod_123", + "product": { + "id": "prod_123", + // ... + } + } +] +``` + +### One-to-Many Relation + +Consider the read-only module link from the `post` data model uses an array of product IDs: + +```ts +import BlogModule from "../modules/blog" +import ProductModule from "@medusajs/medusa/product" + +export default defineLink( + { + linkable: BlogModule.linkable.post, + field: "product_ids", + }, + ProductModule.linkable.product, + { + readOnly: true, + } +) +``` + +Where `product_ids` in the `post` data model is an array of strings. In this case, the link would be a one-to-many relation. So, an array of products would be returned when querying a post: + +```json title="Example Data" +[ + { + "id": "post_123", + "product_ids": ["prod_123", "prod_124"], + "product": [ + { + "id": "prod_123", + // ... + }, + { + "id": "prod_124", + // ... + } + ] + } +] +``` + +### Relation with Inversed Read-Only Link + +If you define an inversed read-only module link where the ID of the linked record is stored in the second data model, the link can be either one-to-one or one-to-many based on the number of records in the second data model that have the same ID of the first data model. + +For example, consider the `product` -> `post` link you defined in an earlier section: + +```ts +import BlogModule from "../modules/blog" +import ProductModule from "@medusajs/medusa/product" +import { defineLink } from "@medusajs/framework/utils" + +export default defineLink( + { + linkable: ProductModule.linkable.product, + field: "id", + }, + { + ...BlogModule.linkable.post.id, + primaryKey: "product_id", + }, + { + readOnly: true, + } +) +``` + +In the above snippet, the ID of the product is stored in the `post`'s `product_id` string field. + +When you retrieve the post of a product, it may be a post object, or an array of post objects if multiple posts are linked to the product: + +```json title="Example Data" +[ + { + "id": "prod_123", + "post": { + "id": "post_123", + "product_id": "prod_123" + // ... + } + }, + { + "id": "prod_321", + "post": [ + { + "id": "post_123", + "product_id": "prod_321" + // ... + }, + { + "id": "post_124", + "product_id": "prod_321" + // ... + } + ] + } +] +``` + +If, however, you use an array field in `post`, the relation would always be one-to-many: + +```json title="Example Data" +[ + { + "id": "prod_123", + "post": [ + { + "id": "post_123", + "product_id": "prod_123" + // ... + } + ] + } +] +``` + +#### Force One-to-Many Relation + +Alternatively, you can force a one-to-many relation by setting `isList` to `true` in the first data model's link configuration. For example: + +```ts +import BlogModule from "../modules/blog" +import ProductModule from "@medusajs/medusa/product" +import { defineLink } from "@medusajs/framework/utils" + +export default defineLink( + { + linkable: ProductModule.linkable.product, + field: "id", + isList: true, + }, + { + ...BlogModule.linkable.post.id, + primaryKey: "product_id", + }, + { + readOnly: true, + } +) +``` + +In this case, the relation would always be one-to-many, even if only one post is linked to a product: + +```json title="Example Data" +[ + { + "id": "prod_123", + "post": [ + { + "id": "post_123", + "product_id": "prod_123" + // ... + } + ] + } +] +``` + +*** + +## Example: Read-Only Module Link for Virtual Data Models + +Read-only module links are most useful when working with data models that aren't stored in your Medusa database. For example, data that is stored in a third-party system. In those cases, you can define a read-only module link between a data model in Medusa and the data model in the external system, facilitating the retrieval of the linked data. + +To define the read-only module link to a virtual data model, you must: + +1. Create a `list` method in the custom module's service. This method retrieves the linked records filtered by the ID(s) of the first data model. + - You can also create a `listAndCount` method to retrieve the related records with pagination. +2. Define the read-only module link from the first data model to the virtual data model. +3. Use Query to retrieve the first data model and its linked records from the virtual data model. + +For example, consider you have a third-party Content-Management System (CMS) that you're integrating with Medusa, and you want to retrieve the posts in the CMS associated with a product in Medusa. + +To do that, first, create a CMS Module having the following service: + +Refer to the [Modules chapter](https://docs.medusajs.com/learn/fundamentals/modules/index.html.md) to learn how to create a module and its service. + +```ts title="src/modules/cms/service.ts" +import { FindConfig } from "@medusajs/framework/types" + +type CmsModuleOptions = { + apiKey: string +} + +export default class CmsModuleService { + private client + + constructor({}, options: CmsModuleOptions) { + this.client = new Client(options) + } + + async list( + filter: { + id: string | string[] + } + ) { + return this.client.getPosts(filter) + /** + - Example of returned data: + - + - [ + - { + - "id": "post_123", + - "product_id": "prod_321" + - }, + - { + - "id": "post_456", + - "product_id": "prod_654" + - } + - ] + */ + } + + // To retrieve with pagination + async listAndCount( + filter: { + id: string | string[] + }, + config?: FindConfig | undefined, + ) { + return this.client.getPosts(filter, { + limit: config?.take, + offset: config?.skip, + }) + /** + - Example of returned data: + - + - { + - count: 2, + - data: [ + - { + - "id": "post_123", + - "product_id": "prod_321" + - }, + - { + - "id": "post_456", + - "product_id": "prod_654" + - } + - ] + - } + */ + } +} +``` + +The above service initializes a client, assuming your CMS has an SDK that allows you to retrieve posts. + +The service must have a `list` method to be part of the read-only module link. This method accepts the ID(s) of the products to retrieve their associated posts. The posts must include the product's ID in a field, such as `product_id`. + +You can also create a `listAndCount` method to retrieve the posts with pagination. This method is called if you pass [pagination parameters to Query](https://docs.medusajs.com/learn/fundamentals/module-links/query#apply-pagination/index.html.md). + +Next, define a read-only module link from the Product Module to the CMS Module: + +```ts title="src/links/product-cms.ts" +import { defineLink } from "@medusajs/framework/utils" +import ProductModule from "@medusajs/medusa/product" +import { CMS_MODULE } from "../modules/cms" + +export default defineLink( + { + linkable: ProductModule.linkable.product, + field: "id", + }, + { + linkable: { + serviceName: CMS_MODULE, + alias: "cms_post", + primaryKey: "product_id", + }, + }, + { + readOnly: true, + } +) +``` + +To define the read-only module link, you must pass to `defineLink`: + +1. The first parameter: an object with the linkable configuration of the data model in Medusa, and the fields that will be passed as a filter to the CMS service. For example, if you want to filter by product title instead, you can pass `title` instead of `id`. +2. The second parameter: an object with the linkable configuration of the virtual data model in the CMS. This object must have the following properties: + - `serviceName`: The name of the service, which is the CMS Module's name. Medusa uses this name to resolve the module's service from the [Medusa container](https://docs.medusajs.com/learn/fundamentals/medusa-container/index.html.md). + - `alias`: The alias to use when querying the linked records. You'll see how that works in a bit. + - `primaryKey`: The field in the CMS data model that holds the ID of a product. +3. The third parameter: an object with the `readOnly` property set to `true`. + +Now, you can use Query to retrieve a product and its linked post from the CMS: + +```ts +const { data } = await query.graph({ + entity: "product", + fields: ["id", "cms_post.*"], +}) +``` + +In the above example, each product that has a CMS post with the `product_id` field set to the product's ID will be retrieved: + +```json title="Example Data" +[ + { + "id": "prod_123", + "cms_post": { + "id": "post_123", + "product_id": "prod_123", + // ... + } + } +] +``` + +If multiple posts have their `product_id` set to a product's ID, an array of posts is returned instead: + +```json title="Example Data" +[ + { + "id": "prod_123", + "cms_post": [ + { + "id": "post_123", + "product_id": "prod_123", + // ... + }, + { + "id": "post_124", + "product_id": "prod_123", + // ... + } + ] + } +] +``` + +[Sanity Integration Tutorial](https://docs.medusajs.com/resources/integrations/guides/sanity/index.html.md). + + # Query In this chapter, you’ll learn about Query and how to use it to fetch data from modules. @@ -12007,2555 +12742,6 @@ Try passing one of the Query configuration parameters, like `fields` or `limit`, Learn more about [specifing fields and relations](https://docs.medusajs.com/api/store#select-fields-and-relations) and [pagination](https://docs.medusajs.com/api/store#pagination) in the API reference. -# Read-Only Module Link - -In this chapter, you’ll learn what a read-only module link is and how to define one. - -## What is a Read-Only Module Link? - -Consider a scenario where you need to access related records from another module, but don't want the overhead of managing or storing the links between them. This can include cases where you're working with external data models not stored in your Medusa database, such as third-party systems. - -In those cases, instead of defining a [Module Link](https://docs.medusajs.com/learn/fundamentals/module-links/index.html.md) whose linked records must be stored in a link table in the database, you can use a read-only module link. A read-only module link builds a virtual relation from one data model to another in a different module without creating a link table in the database. Instead, the linked record's ID is stored in the first data model's field. - -For example, Medusa creates a read-only module link from the `Cart` data model of the [Cart Module](https://docs.medusajs.com/resources/commerce-modules/cart/index.html.md) to the `Customer` data model of the [Customer Module](https://docs.medusajs.com/resources/commerce-modules/customer/index.html.md). This link allows you to access the details of the cart's customer without managing the link. Instead, the customer's ID is stored in the `Cart` data model. - -![Diagram illustrating the read-only module link from cart to customer](https://res.cloudinary.com/dza7lstvk/image/upload/v1742212508/Medusa%20Book/cart-customer_w6vk59.jpg) - -*** - -## How to Define a Read-Only Module Link - -The `defineLink` function accepts an optional third-parameter object that can hold additional configurations for the module link. - -If you're not familiar with the `defineLink` function, refer to the [Module Links chapter](https://docs.medusajs.com/learn/fundamentals/module-links/index.html.md) for more information. - -To make the module link read-only, pass the `readOnly` property as `true`. You must also set in the link configuration of the first data model a `field` property that specifies the data model's field where the linked record's ID is stored. - -For example: - -```ts highlights={highlights} -import BlogModule from "../modules/blog" -import ProductModule from "@medusajs/medusa/product" -import { defineLink } from "@medusajs/framework/utils" - -export default defineLink( - { - linkable: BlogModule.linkable.post, - field: "product_id", - }, - ProductModule.linkable.product, - { - readOnly: true, - } -) -``` - -In this example, you define a read-only module link from the Blog Module's `post` data model to the Product Module's `product` data model. You do that by: - -- Passing an object as a first parameter that accepts the linkable configuration and the field where the linked record's ID is stored. -- Setting the `readOnly` property to `true` in the third parameter. - -Unlike the stored module link, Medusa will not create a table in the database for this link. Instead, Medusa uses the ID stored in the specified field of the first data model to retrieve the linked record. - -*** - -## Retrieve Read-Only Linked Record - -[Query](https://docs.medusajs.com/learn/fundamentals/module-links/query/index.html.md) allows you to retrieve records linked through a read-only module link. - -For example, assuming you have the module link created in [the above section](#how-to-define-a-read-only-module-link), you can retrieve a post and its linked product as follows: - -```ts -const { result } = await query.graph({ - entity: "post", - fields: ["id", "product.*"], - filters: { - id: "post_123", - }, -}) -``` - -In the above example, you retrieve a post and its linked product. Medusa will use the ID of the product in the post's `product_id` field to determine which product should be retrieved. - -*** - -## Read-Only Module Link Direction - -A read-only module is uni-directional. So, you can only retrieve the linked record from the first data model. If you need to access the linked record from the second data model, you must define another read-only module link in the opposite direction. - -In the `blog` -> `product` example, you can access a post's product, but you can't access a product's posts. You would have to define another read-only module link from `product` to `blog` to access a product's posts. - -*** - -## Inverse Read-Only Module Link - -An inverse read-only module link is a read-only module link that allows you to access the linked record based on the ID stored in the second data model. - -For example, consider you want to access a product's posts. You can define a read-only module link from the Product Module's `product` data model to the Blog Module's `post` data model: - -```ts -import BlogModule from "../modules/blog" -import ProductModule from "@medusajs/medusa/product" -import { defineLink } from "@medusajs/framework/utils" - -export default defineLink( - { - linkable: ProductModule.linkable.product, - field: "id", - }, - { - ...BlogModule.linkable.post.id, - primaryKey: "product_id", - }, - { - readOnly: true, - } -) -``` - -In the above example, you define a read-only module link from the Product Module's `product` data model to the Blog Module's `post` data model. This link allows you to access a product's posts. - -Since you can't add a `post_id` field to the `product` data model, you must: - -1. Set the `field` property in the first data model's link configuration to the product's ID field. -2. Spread the `BlogModule.linkable.post.id` object in the second parameter object and set the `primaryKey` property to the field in the `post` data model that holds the product's ID. - -You can now retrieve a product and its linked posts: - -```ts -const { result } = await query.graph({ - entity: "product", - fields: ["id", "post.*"], - filters: { - id: "prod_123", - }, -}) -``` - -*** - -## One-to-One or One-to-Many? - -When you retrieve the linked record through a read-only module link, the retrieved data may be an object (one-to-one) or an array of objects (one-to-many) based on different criteria. - -|Scenario|Relation Type| -|---|---|---| -|The first data model's |One-to-one relation| -|The first data model's |One-to-many relation| -|The read-only module link is inversed.|One-to-many relation if multiple records in the second data model have the same ID of the first data model. Otherwise, one-to-one relation.| - -### One-to-One Relation - -Consider the first read-only module link you defined in this chapter: - -```ts -import BlogModule from "../modules/blog" -import ProductModule from "@medusajs/medusa/product" - -export default defineLink( - { - linkable: BlogModule.linkable.post, - field: "product_id", - }, - ProductModule.linkable.product, - { - readOnly: true, - } -) -``` - -Since the `product_id` field of a post stores the ID of a single product, the link is a one-to-one relation. When querying a post, you'll get a single product object: - -```json title="Example Data" -[ - { - "id": "post_123", - "product_id": "prod_123", - "product": { - "id": "prod_123", - // ... - } - } -] -``` - -### One-to-Many Relation - -Consider the read-only module link from the `post` data model uses an array of product IDs: - -```ts -import BlogModule from "../modules/blog" -import ProductModule from "@medusajs/medusa/product" - -export default defineLink( - { - linkable: BlogModule.linkable.post, - field: "product_ids", - }, - ProductModule.linkable.product, - { - readOnly: true, - } -) -``` - -Where `product_ids` in the `post` data model is an array of strings. In this case, the link would be a one-to-many relation. So, an array of products would be returned when querying a post: - -```json title="Example Data" -[ - { - "id": "post_123", - "product_ids": ["prod_123", "prod_124"], - "product": [ - { - "id": "prod_123", - // ... - }, - { - "id": "prod_124", - // ... - } - ] - } -] -``` - -### Relation with Inversed Read-Only Link - -If you define an inversed read-only module link where the ID of the linked record is stored in the second data model, the link can be either one-to-one or one-to-many based on the number of records in the second data model that have the same ID of the first data model. - -For example, consider the `product` -> `post` link you defined in an earlier section: - -```ts -import BlogModule from "../modules/blog" -import ProductModule from "@medusajs/medusa/product" -import { defineLink } from "@medusajs/framework/utils" - -export default defineLink( - { - linkable: ProductModule.linkable.product, - field: "id", - }, - { - ...BlogModule.linkable.post.id, - primaryKey: "product_id", - }, - { - readOnly: true, - } -) -``` - -In the above snippet, the ID of the product is stored in the `post`'s `product_id` string field. - -When you retrieve the post of a product, it may be a post object, or an array of post objects if multiple posts are linked to the product: - -```json title="Example Data" -[ - { - "id": "prod_123", - "post": { - "id": "post_123", - "product_id": "prod_123" - // ... - } - }, - { - "id": "prod_321", - "post": [ - { - "id": "post_123", - "product_id": "prod_321" - // ... - }, - { - "id": "post_124", - "product_id": "prod_321" - // ... - } - ] - } -] -``` - -If, however, you use an array field in `post`, the relation would always be one-to-many: - -```json title="Example Data" -[ - { - "id": "prod_123", - "post": [ - { - "id": "post_123", - "product_id": "prod_123" - // ... - } - ] - } -] -``` - -#### Force One-to-Many Relation - -Alternatively, you can force a one-to-many relation by setting `isList` to `true` in the first data model's link configuration. For example: - -```ts -import BlogModule from "../modules/blog" -import ProductModule from "@medusajs/medusa/product" -import { defineLink } from "@medusajs/framework/utils" - -export default defineLink( - { - linkable: ProductModule.linkable.product, - field: "id", - isList: true, - }, - { - ...BlogModule.linkable.post.id, - primaryKey: "product_id", - }, - { - readOnly: true, - } -) -``` - -In this case, the relation would always be one-to-many, even if only one post is linked to a product: - -```json title="Example Data" -[ - { - "id": "prod_123", - "post": [ - { - "id": "post_123", - "product_id": "prod_123" - // ... - } - ] - } -] -``` - -*** - -## Example: Read-Only Module Link for Virtual Data Models - -Read-only module links are most useful when working with data models that aren't stored in your Medusa database. For example, data that is stored in a third-party system. In those cases, you can define a read-only module link between a data model in Medusa and the data model in the external system, facilitating the retrieval of the linked data. - -To define the read-only module link to a virtual data model, you must: - -1. Create a `list` method in the custom module's service. This method retrieves the linked records filtered by the ID(s) of the first data model. - - You can also create a `listAndCount` method to retrieve the related records with pagination. -2. Define the read-only module link from the first data model to the virtual data model. -3. Use Query to retrieve the first data model and its linked records from the virtual data model. - -For example, consider you have a third-party Content-Management System (CMS) that you're integrating with Medusa, and you want to retrieve the posts in the CMS associated with a product in Medusa. - -To do that, first, create a CMS Module having the following service: - -Refer to the [Modules chapter](https://docs.medusajs.com/learn/fundamentals/modules/index.html.md) to learn how to create a module and its service. - -```ts title="src/modules/cms/service.ts" -import { FindConfig } from "@medusajs/framework/types" - -type CmsModuleOptions = { - apiKey: string -} - -export default class CmsModuleService { - private client - - constructor({}, options: CmsModuleOptions) { - this.client = new Client(options) - } - - async list( - filter: { - id: string | string[] - } - ) { - return this.client.getPosts(filter) - /** - - Example of returned data: - - - - [ - - { - - "id": "post_123", - - "product_id": "prod_321" - - }, - - { - - "id": "post_456", - - "product_id": "prod_654" - - } - - ] - */ - } - - // To retrieve with pagination - async listAndCount( - filter: { - id: string | string[] - }, - config?: FindConfig | undefined, - ) { - return this.client.getPosts(filter, { - limit: config?.take, - offset: config?.skip, - }) - /** - - Example of returned data: - - - - { - - count: 2, - - data: [ - - { - - "id": "post_123", - - "product_id": "prod_321" - - }, - - { - - "id": "post_456", - - "product_id": "prod_654" - - } - - ] - - } - */ - } -} -``` - -The above service initializes a client, assuming your CMS has an SDK that allows you to retrieve posts. - -The service must have a `list` method to be part of the read-only module link. This method accepts the ID(s) of the products to retrieve their associated posts. The posts must include the product's ID in a field, such as `product_id`. - -You can also create a `listAndCount` method to retrieve the posts with pagination. This method is called if you pass [pagination parameters to Query](https://docs.medusajs.com/learn/fundamentals/module-links/query#apply-pagination/index.html.md). - -Next, define a read-only module link from the Product Module to the CMS Module: - -```ts title="src/links/product-cms.ts" -import { defineLink } from "@medusajs/framework/utils" -import ProductModule from "@medusajs/medusa/product" -import { CMS_MODULE } from "../modules/cms" - -export default defineLink( - { - linkable: ProductModule.linkable.product, - field: "id", - }, - { - linkable: { - serviceName: CMS_MODULE, - alias: "cms_post", - primaryKey: "product_id", - }, - }, - { - readOnly: true, - } -) -``` - -To define the read-only module link, you must pass to `defineLink`: - -1. The first parameter: an object with the linkable configuration of the data model in Medusa, and the fields that will be passed as a filter to the CMS service. For example, if you want to filter by product title instead, you can pass `title` instead of `id`. -2. The second parameter: an object with the linkable configuration of the virtual data model in the CMS. This object must have the following properties: - - `serviceName`: The name of the service, which is the CMS Module's name. Medusa uses this name to resolve the module's service from the [Medusa container](https://docs.medusajs.com/learn/fundamentals/medusa-container/index.html.md). - - `alias`: The alias to use when querying the linked records. You'll see how that works in a bit. - - `primaryKey`: The field in the CMS data model that holds the ID of a product. -3. The third parameter: an object with the `readOnly` property set to `true`. - -Now, you can use Query to retrieve a product and its linked post from the CMS: - -```ts -const { data } = await query.graph({ - entity: "product", - fields: ["id", "cms_post.*"], -}) -``` - -In the above example, each product that has a CMS post with the `product_id` field set to the product's ID will be retrieved: - -```json title="Example Data" -[ - { - "id": "prod_123", - "cms_post": { - "id": "post_123", - "product_id": "prod_123", - // ... - } - } -] -``` - -If multiple posts have their `product_id` set to a product's ID, an array of posts is returned instead: - -```json title="Example Data" -[ - { - "id": "prod_123", - "cms_post": [ - { - "id": "post_123", - "product_id": "prod_123", - // ... - }, - { - "id": "post_124", - "product_id": "prod_123", - // ... - } - ] - } -] -``` - -[Sanity Integration Tutorial](https://docs.medusajs.com/resources/integrations/guides/sanity/index.html.md). - - -# Link - -In this chapter, you’ll learn what Link is and how to use it to manage links. - -As of [Medusa v2.2.0](https://github.com/medusajs/medusa/releases/tag/v2.2.0), Remote Link has been deprecated in favor of Link. They have the same usage, so you only need to change the key used to resolve the tool from the Medusa container as explained below. - -## What is Link? - -Link is a class with utility methods to manage links between data models. It’s registered in the Medusa container under the `link` registration name. - -For example: - -```ts collapsibleLines="1-9" expandButtonLabel="Show Imports" -import { - MedusaRequest, - MedusaResponse, -} from "@medusajs/framework/http" -import { - ContainerRegistrationKeys, -} from "@medusajs/framework/utils" - -export async function POST( - req: MedusaRequest, - res: MedusaResponse -): Promise { - const link = req.scope.resolve( - ContainerRegistrationKeys.LINK - ) - - // ... -} -``` - -You can use its methods to manage links, such as create or delete links. - -*** - -## Create Link - -To create a link between records of two data models, use the `create` method of Link. - -For example: - -```ts -import { Modules } from "@medusajs/framework/utils" - -// ... - -await link.create({ - [Modules.PRODUCT]: { - product_id: "prod_123", - }, - "helloModuleService": { - my_custom_id: "mc_123", - }, -}) -``` - -The `create` method accepts as a parameter an object. The object’s keys are the names of the linked modules. - -The keys (names of linked modules) must be in the same [direction](https://docs.medusajs.com/learn/fundamentals/module-links/directions/index.html.md) of the link definition. - -The value of each module’s property is an object, whose keys are of the format `{data_model_snake_name}_id`, and values are the IDs of the linked record. - -So, in the example above, you link a record of the `MyCustom` data model in a `hello` module to a `Product` record in the Product Module. - -### Enforced Integrity Constraints on Link Creation - -Medusa enforces integrity constraints on links based on the link's relation type. So, an error is thrown in the following scenarios: - -- If the link is one-to-one and one of the linked records already has a link to another record of the same data model. For example: - -```ts -// no error -await link.create({ - [Modules.PRODUCT]: { - product_id: "prod_123", - }, - "helloModuleService": { - my_custom_id: "mc_123", - }, -}) - -// throws an error because `prod_123` already has a link to `mc_123` -await link.create({ - [Modules.PRODUCT]: { - product_id: "prod_123", - }, - "helloModuleService": { - my_custom_id: "mc_456", - }, -}) -``` - -- If the link is one-to-many and the "one" side already has a link to another record of the same data model. For example, if a product can have many `MyCustom` records, but a `MyCustom` record can only have one product: - -```ts -// no error -await link.create({ - [Modules.PRODUCT]: { - product_id: "prod_123", - }, - "helloModuleService": { - my_custom_id: "mc_123", - }, -}) - -// also no error -await link.create({ - [Modules.PRODUCT]: { - product_id: "prod_123", - }, - "helloModuleService": { - my_custom_id: "mc_456", - }, -}) - -// throws an error because `mc_123` already has a link to `prod_123` -await link.create({ - [Modules.PRODUCT]: { - product_id: "prod_456", - }, - "helloModuleService": { - my_custom_id: "mc_123", - }, -}) -``` - -There are no integrity constraints in a many-to-many link, so you can create multiple links between the same records. - -*** - -## Dismiss Link - -To remove a link between records of two data models, use the `dismiss` method of Link. - -For example: - -```ts -import { Modules } from "@medusajs/framework/utils" - -// ... - -await link.dismiss({ - [Modules.PRODUCT]: { - product_id: "prod_123", - }, - "helloModuleService": { - my_custom_id: "mc_123", - }, -}) -``` - -The `dismiss` method accepts the same parameter type as the [create method](#create-link). - -The keys (names of linked modules) must be in the same [direction](https://docs.medusajs.com/learn/fundamentals/module-links/directions/index.html.md) of the link definition. - -*** - -## Cascade Delete Linked Records - -If a record is deleted, use the `delete` method of Link to delete all linked records. - -For example: - -```ts -import { Modules } from "@medusajs/framework/utils" - -// ... - -await productModuleService.deleteVariants([variant.id]) - -await link.delete({ - [Modules.PRODUCT]: { - product_id: "prod_123", - }, -}) -``` - -This deletes all records linked to the deleted product. - -*** - -## Restore Linked Records - -If a record that was previously soft-deleted is now restored, use the `restore` method of Link to restore all linked records. - -For example: - -```ts -import { Modules } from "@medusajs/framework/utils" - -// ... - -await productModuleService.restoreProducts(["prod_123"]) - -await link.restore({ - [Modules.PRODUCT]: { - product_id: "prod_123", - }, -}) -``` - - -# Query Context - -In this chapter, you'll learn how to pass contexts when retrieving data with [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query/index.html.md). - -## What is Query Context? - -Query context is a way to pass additional information when retrieving data with Query. This data can be useful when applying custom transformations to the retrieved data based on the current context. - -For example, consider you have a Blog Module with posts and authors. You can accept the user's language as a context and return the posts in the user's language. Another example is how Medusa uses Query Context to [retrieve product variants' prices based on the customer's currency](https://docs.medusajs.com/resources/commerce-modules/product/guides/price/index.html.md). - -*** - -## How to Use Query Context - -The `query.graph` method accepts an optional `context` parameter that can be used to pass additional context either to the data model you're retrieving (for example, `post`), or its related and linked models (for example, `author`). - -You initialize a context using `QueryContext` from the Modules SDK. It accepts an object of contexts as an argument. - -For example, to retrieve posts using Query while passing the user's language as a context: - -```ts -const { data } = await query.graph({ - entity: "post", - fields: ["*"], - context: QueryContext({ - lang: "es", - }), -}) -``` - -In this example, you pass in the context a `lang` property whose value is `es`. - -Then, to handle the context while retrieving records of the data model, in the associated module's service you override the generated `list` method of the data model. - -For example, continuing the example above, you can override the `listPosts` method of the Blog Module's service to handle the context: - -```ts highlights={highlights2} -import { MedusaContext, MedusaService } from "@medusajs/framework/utils" -import { Context, FindConfig } from "@medusajs/framework/types" -import Post from "./models/post" -import Author from "./models/author" - -class BlogModuleService extends MedusaService({ - Post, - Author, -}){ - // @ts-ignore - async listPosts( - filters?: any, - config?: FindConfig | undefined, - @MedusaContext() sharedContext?: Context | undefined - ) { - const context = filters.context ?? {} - delete filters.context - - let posts = await super.listPosts(filters, config, sharedContext) - - if (context.lang === "es") { - posts = posts.map((post) => { - return { - ...post, - title: post.title + " en español", - } - }) - } - - return posts - } -} - -export default BlogModuleService -``` - -In the above example, you override the generated `listPosts` method. This method receives as a first parameter the filters passed to the query, but it also includes a `context` property that holds the context passed to the query. - -You extract the context from `filters`, then retrieve the posts using the parent's `listPosts` method. After that, if the language is set in the context, you transform the titles of the posts. - -All posts returned will now have their titles appended with "en español". - -Learn more about the generated `list` method in [this reference](https://docs.medusajs.com/resources/service-factory-reference/methods/list/index.html.md). - -### Using Pagination with Query - -If you pass pagination fields to `query.graph`, you must also override the `listAndCount` method in the service. - -For example, following along with the previous example, you must override the `listAndCountPosts` method of the Blog Module's service: - -```ts -import { MedusaContext, MedusaService } from "@medusajs/framework/utils" -import { Context, FindConfig } from "@medusajs/framework/types" -import Post from "./models/post" -import Author from "./models/author" - -class BlogModuleService extends MedusaService({ - Post, - Author, -}){ - // @ts-ignore - async listAndCountPosts( - filters?: any, - config?: FindConfig | undefined, - @MedusaContext() sharedContext?: Context | undefined - ) { - const context = filters.context ?? {} - delete filters.context - - const result = await super.listAndCountPosts( - filters, - config, - sharedContext - ) - - if (context.lang === "es") { - result.posts = posts.map((post) => { - return { - ...post, - title: post.title + " en español", - } - }) - } - - return result - } -} - -export default BlogModuleService -``` - -Now, the `listAndCountPosts` method will handle the context passed to `query.graph` when you pass pagination fields. You can also move the logic to transform the posts' titles to a separate method and call it from both `listPosts` and `listAndCountPosts`. - -*** - -## Passing Query Context to Related Data Models - -If you're retrieving a data model and you want to pass context to its associated model in the same module, you can pass them as part of `QueryContext`'s parameter, then handle them in the same `list` method. - -For linked data models, check out the [next section](#passing-query-context-to-linked-data-models). - -For example, to pass a context for the post's authors: - -```ts highlights={highlights3} -const { data } = await query.graph({ - entity: "post", - fields: ["*"], - context: QueryContext({ - lang: "es", - author: QueryContext({ - lang: "es", - }), - }), -}) -``` - -Then, in the `listPosts` method, you can handle the context for the post's authors: - -```ts highlights={highlights4} -import { MedusaContext, MedusaService } from "@medusajs/framework/utils" -import { Context, FindConfig } from "@medusajs/framework/types" -import Post from "./models/post" -import Author from "./models/author" - -class BlogModuleService extends MedusaService({ - Post, - Author, -}){ - // @ts-ignore - async listPosts( - filters?: any, - config?: FindConfig | undefined, - @MedusaContext() sharedContext?: Context | undefined - ) { - const context = filters.context ?? {} - delete filters.context - - let posts = await super.listPosts(filters, config, sharedContext) - - const isPostLangEs = context.lang === "es" - const isAuthorLangEs = context.author?.lang === "es" - - if (isPostLangEs || isAuthorLangEs) { - posts = posts.map((post) => { - return { - ...post, - title: isPostLangEs ? post.title + " en español" : post.title, - author: { - ...post.author, - name: isAuthorLangEs ? post.author.name + " en español" : post.author.name, - }, - } - }) - } - - return posts - } -} - -export default BlogModuleService -``` - -The context in `filters` will also have the context for `author`, which you can use to make transformations to the post's authors. - -*** - -## Passing Query Context to Linked Data Models - -If you're retrieving a data model and you want to pass context to a linked model in a different module, pass to the `context` property an object instead, where its keys are the linked model's name and the values are the context for that linked model. - -For example, consider the Product Module's `Product` data model is linked to the Blog Module's `Post` data model. You can pass context to the `Post` data model while retrieving products like so: - -```ts highlights={highlights5} -const { data } = await query.graph({ - entity: "product", - fields: ["*", "post.*"], - context: { - post: QueryContext({ - lang: "es", - }), - }, -}) -``` - -In this example, you retrieve products and their associated posts. You also pass a context for `post`, indicating the customer's language. - -To handle the context, you override the generated `listPosts` method of the Blog Module as explained [previously](#how-to-use-query-context). - - -# Commerce Modules - -In this chapter, you'll learn about Medusa's Commerce Modules. - -## What is a Commerce Module? - -Commerce Modules are built-in [modules](https://docs.medusajs.com/learn/fundamentals/modules/index.html.md) of Medusa that provide core commerce logic specific to domains like Products, Orders, Customers, Fulfillment, and much more. - -Medusa's Commerce Modules are used to form Medusa's default [workflows](https://docs.medusajs.com/resources/medusa-workflows-reference/index.html.md) and [APIs](https://docs.medusajs.com/api/store). For example, when you call the add to cart endpoint. the add to cart workflow runs which uses the Product Module to check if the product exists, the Inventory Module to ensure the product is available in the inventory, and the Cart Module to finally add the product to the cart. - -You'll find the details and steps of the add-to-cart workflow in [this workflow reference](https://docs.medusajs.com/resources/references/medusa-workflows/addToCartWorkflow/index.html.md) - -The core commerce logic contained in Commerce Modules is also available directly when you are building customizations. This granular access to commerce functionality is unique and expands what's possible to build with Medusa drastically. - -### List of Medusa's Commerce Modules - -Refer to [this reference](https://docs.medusajs.com/resources/commerce-modules/index.html.md) for a full list of Commerce Modules in Medusa. - -*** - -## Use Commerce Modules in Custom Flows - -Similar to your [custom modules](https://docs.medusajs.com/learn/fundamentals/modules/index.html.md), the Medusa application registers a Commerce Module's service in the [container](https://docs.medusajs.com/learn/fundamentals/medusa-container/index.html.md). So, you can resolve it in your custom flows. This is useful as you build unique requirements extending core commerce features. - -For example, consider you have a [workflow](https://docs.medusajs.com/learn/fundamentals/workflows/index.html.md) (a special function that performs a task in a series of steps with rollback mechanism) that needs a step to retrieve the total number of products. You can create a step in the workflow that resolves the Product Module's service from the container to use its methods: - -```ts highlights={highlights} -import { createStep, StepResponse } from "@medusajs/framework/workflows-sdk" - -export const countProductsStep = createStep( - "count-products", - async ({ }, { container }) => { - const productModuleService = container.resolve("product") - - const [,count] = await productModuleService.listAndCountProducts() - - return new StepResponse(count) - } -) -``` - -Your workflow can use services of both custom and Commerce Modules, supporting you in building custom flows without having to re-build core commerce features. - - -# Module Container - -In this chapter, you'll learn about the module's container and how to resolve resources in that container. - -Since modules are isolated, each module has a local container only used by the resources of that module. - -So, resources in the module, such as services or loaders, can only resolve other resources registered in the module's container. - -### List of Registered Resources - -Find a list of resources or dependencies registered in a module's container in [the Container Resources reference](https://docs.medusajs.com/resources/medusa-container-resources/index.html.md). - -*** - -## Resolve Resources - -### Services - -A service's constructor accepts as a first parameter an object used to resolve resources registered in the module's container. - -For example: - -```ts highlights={[["4"], ["10"]]} -import { Logger } from "@medusajs/framework/types" - -type InjectedDependencies = { - logger: Logger -} - -export default class BlogModuleService { - protected logger_: Logger - - constructor({ logger }: InjectedDependencies) { - this.logger_ = logger - - this.logger_.info("[BlogModuleService]: Hello World!") - } - - // ... -} -``` - -### Loader - -A loader function accepts as a parameter an object having the property `container`. Its value is the module's container used to resolve resources. - -For example: - -```ts highlights={[["9"]]} -import { - LoaderOptions, -} from "@medusajs/framework/types" -import { - ContainerRegistrationKeys, -} from "@medusajs/framework/utils" - -export default async function helloWorldLoader({ - container, -}: LoaderOptions) { - const logger = container.resolve(ContainerRegistrationKeys.LOGGER) - - logger.info("[helloWorldLoader]: Hello, World!") -} -``` - - -# Perform Database Operations in a Service - -In this chapter, you'll learn how to perform database operations in a module's service. - -This chapter is intended for more advanced database use-cases where you need more control over queries and operations. For basic database operations, such as creating or retrieving data of a model, use the [Service Factory](https://docs.medusajs.com/learn/fundamentals/modules/service-factory/index.html.md) instead. - -## Run Queries - -[MikroORM's entity manager](https://mikro-orm.io/docs/entity-manager) is a class that has methods to run queries on the database and perform operations. - -Medusa provides an `InjectManager` decorator from the Modules SDK that injects a service's method with a [forked entity manager](https://mikro-orm.io/docs/identity-map#forking-entity-manager). - -So, to run database queries in a service: - -1. Add the `InjectManager` decorator to the method. -2. Add as a last parameter an optional `sharedContext` parameter that has the `MedusaContext` decorator from the Modules SDK. This context holds database-related context, including the manager injected by `InjectManager` - -For example, in your service, add the following methods: - -```ts highlights={methodsHighlight} -// other imports... -import { - InjectManager, - MedusaContext, -} from "@medusajs/framework/utils" -import { Context } from "@medusajs/framework/types" -import { EntityManager } from "@mikro-orm/knex" - -class BlogModuleService { - // ... - - @InjectManager() - async getCount( - @MedusaContext() sharedContext?: Context - ): Promise { - return await sharedContext?.manager?.count("my_custom") - } - - @InjectManager() - async getCountSql( - @MedusaContext() sharedContext?: Context - ): Promise { - const data = await sharedContext?.manager?.execute( - "SELECT COUNT(*) as num FROM my_custom" - ) - - return parseInt(data?.[0].num || 0) - } -} -``` - -You add two methods `getCount` and `getCountSql` that have the `InjectManager` decorator. Each of the methods also accept the `sharedContext` parameter which has the `MedusaContext` decorator. - -The entity manager is injected to the `sharedContext.manager` property, which is an instance of [EntityManager from the @mikro-orm/knex package](https://mikro-orm.io/api/knex/class/EntityManager). - -You use the manager in the `getCount` method to retrieve the number of records in a table, and in the `getCountSql` to run a PostgreSQL query that retrieves the count. - -Refer to [MikroORM's reference](https://mikro-orm.io/api/knex/class/EntityManager) for a full list of the entity manager's methods. - -*** - -## Execute Operations in Transactions - -To wrap database operations in a transaction, you create two methods: - -1. A private or protected method that's wrapped in a transaction. To wrap it in a transaction, you use the `InjectTransactionManager` decorator from the Modules SDK. -2. A public method that calls the transactional method. You use on it the `InjectManager` decorator as explained in the previous section. - -Both methods must accept as a last parameter an optional `sharedContext` parameter that has the `MedusaContext` decorator from the Modules SDK. It holds database-related contexts passed through the Medusa application. - -For example: - -```ts highlights={opHighlights} -import { - InjectManager, - InjectTransactionManager, - MedusaContext, -} from "@medusajs/framework/utils" -import { Context } from "@medusajs/framework/types" -import { EntityManager } from "@mikro-orm/knex" - -class BlogModuleService { - // ... - @InjectTransactionManager() - protected async update_( - input: { - id: string, - name: string - }, - @MedusaContext() sharedContext?: Context - ): Promise { - const transactionManager = sharedContext?.transactionManager - await transactionManager?.nativeUpdate( - "my_custom", - { - id: input.id, - }, - { - name: input.name, - } - ) - - // retrieve again - const updatedRecord = await transactionManager?.execute( - `SELECT * FROM my_custom WHERE id = '${input.id}'` - ) - - return updatedRecord - } - - @InjectManager() - async update( - input: { - id: string, - name: string - }, - @MedusaContext() sharedContext?: Context - ) { - return await this.update_(input, sharedContext) - } -} -``` - -The `BlogModuleService` has two methods: - -- A protected `update_` that performs the database operations inside a transaction. -- A public `update` that executes the transactional protected method. - -The shared context's `transactionManager` property holds the transactional entity manager (injected by `InjectTransactionManager`) that you use to perform database operations. - -Refer to [MikroORM's reference](https://mikro-orm.io/api/knex/class/EntityManager) for a full list of the entity manager's methods. - -### Why Wrap a Transactional Method - -The variables in the transactional method (for example, `update_`) hold values that are uncommitted to the database. They're only committed once the method finishes execution. - -So, if in your method you perform database operations, then use their result to perform other actions, such as connecting to a third-party service, you'll be working with uncommitted data. - -By placing only the database operations in a method that has the `InjectTransactionManager` and using it in a wrapper method, the wrapper method receives the committed result of the transactional method. - -This is also useful if you perform heavy data normalization outside of the database operations. In that case, you don't hold the transaction for a longer time than needed. - -For example, the `update` method could be changed to the following: - -```ts -// other imports... -import { - InjectManager, - InjectTransactionManager, - MedusaContext, -} from "@medusajs/framework/utils" -import { Context } from "@medusajs/framework/types" -import { EntityManager } from "@mikro-orm/knex" - -class BlogModuleService { - // ... - @InjectTransactionManager() - protected async update_( - // ... - ): Promise { - // ... - } - @InjectManager() - async update( - input: { - id: string, - name: string - }, - @MedusaContext() sharedContext?: Context - ) { - const newData = await this.update_(input, sharedContext) - - // example method that sends data to another system - await this.sendNewDataToSystem(newData) - - return newData - } -} -``` - -In this case, only the `update_` method is wrapped in a transaction. The returned value `newData` holds the committed result, which can be used for other operations, such as passed to a `sendNewDataToSystem` method. - -### Using Methods in Transactional Methods - -If your transactional method uses other methods that accept a Medusa context, pass the shared context to those methods. - -For example: - -```ts -// other imports... -import { - InjectTransactionManager, - MedusaContext, -} from "@medusajs/framework/utils" -import { Context } from "@medusajs/framework/types" -import { EntityManager } from "@mikro-orm/knex" - -class BlogModuleService { - // ... - @InjectTransactionManager() - protected async anotherMethod( - @MedusaContext() sharedContext?: Context - ) { - // ... - } - - @InjectTransactionManager() - protected async update_( - input: { - id: string, - name: string - }, - @MedusaContext() sharedContext?: Context - ): Promise { - this.anotherMethod(sharedContext) - } -} -``` - -You use the `anotherMethod` transactional method in the `update_` transactional method, so you pass it the shared context. - -The `anotherMethod` now runs in the same transaction as the `update_` method. - -*** - -## Configure Transactions - -To configure the transaction, such as its [isolation level](https://www.postgresql.org/docs/current/transaction-iso.html), use the `baseRepository` dependency registered in your module's container. - -The `baseRepository` is an instance of a repository class that provides methods to create transactions, run database operations, and more. - -The `baseRepository` has a `transaction` method that allows you to run a function within a transaction and configure that transaction. - -For example, resolve the `baseRepository` in your service's constructor: - -### Extending Service Factory - -```ts highlights={[["14"]]} -import { MedusaService } from "@medusajs/framework/utils" -import Post from "./models/post" -import { DAL } from "@medusajs/framework/types" - -type InjectedDependencies = { - baseRepository: DAL.RepositoryService -} - -class BlogModuleService extends MedusaService({ - Post, -}){ - protected baseRepository_: DAL.RepositoryService - - constructor({ baseRepository }: InjectedDependencies) { - super(...arguments) - this.baseRepository_ = baseRepository - } -} - -export default BlogModuleService -``` - -### Without Service Factory - -```ts highlights={[["10"]]} -import { DAL } from "@medusajs/framework/types" - -type InjectedDependencies = { - baseRepository: DAL.RepositoryService -} - -class BlogModuleService { - protected baseRepository_: DAL.RepositoryService - - constructor({ baseRepository }: InjectedDependencies) { - this.baseRepository_ = baseRepository - } -} - -export default BlogModuleService -``` - -Then, add the following method that uses it: - -```ts highlights={repoHighlights} -// ... -import { - InjectManager, - InjectTransactionManager, - MedusaContext, -} from "@medusajs/framework/utils" -import { Context } from "@medusajs/framework/types" -import { EntityManager } from "@mikro-orm/knex" - -class BlogModuleService { - // ... - @InjectTransactionManager() - protected async update_( - input: { - id: string, - name: string - }, - @MedusaContext() sharedContext?: Context - ): Promise { - return await this.baseRepository_.transaction( - async (transactionManager) => { - await transactionManager.nativeUpdate( - "my_custom", - { - id: input.id, - }, - { - name: input.name, - } - ) - - // retrieve again - const updatedRecord = await transactionManager.execute( - `SELECT * FROM my_custom WHERE id = '${input.id}'` - ) - - return updatedRecord - }, - { - transaction: sharedContext?.transactionManager, - } - ) - } - - @InjectManager() - async update( - input: { - id: string, - name: string - }, - @MedusaContext() sharedContext?: Context - ) { - return await this.update_(input, sharedContext) - } -} -``` - -The `update_` method uses the `baseRepository_.transaction` method to wrap a function in a transaction. - -The function parameter receives a transactional entity manager as a parameter. Use it to perform the database operations. - -The `baseRepository_.transaction` method also receives as a second parameter an object of options. You must pass in it the `transaction` property and set its value to the `sharedContext.transactionManager` property so that the function wrapped in the transaction uses the injected transaction manager. - -Refer to [MikroORM's reference](https://mikro-orm.io/api/knex/class/EntityManager) for a full list of the entity manager's methods. - -### Transaction Options - -The second parameter of the `baseRepository_.transaction` method is an object of options that accepts the following properties: - -1. `transaction`: Set the transactional entity manager passed to the function. You must provide this option as explained in the previous section. - -```ts highlights={[["16"]]} -// other imports... -import { EntityManager } from "@mikro-orm/knex" -import { - InjectTransactionManager, - MedusaContext, -} from "@medusajs/framework/utils" -import { Context } from "@medusajs/framework/types" -import { EntityManager } from "@mikro-orm/knex" - -class BlogModuleService { - // ... - @InjectTransactionManager() - async update_( - input: { - id: string, - name: string - }, - @MedusaContext() sharedContext?: Context - ): Promise { - return await this.baseRepository_.transaction( - async (transactionManager) => { - // ... - }, - { - transaction: sharedContext?.transactionManager, - } - ) - } -} -``` - -2. `isolationLevel`: Sets the transaction's [isolation level](https://www.postgresql.org/docs/current/transaction-iso.html). Its values can be: - - `read committed` - - `read uncommitted` - - `snapshot` - - `repeatable read` - - `serializable` - -```ts highlights={[["19"]]} -// other imports... -import { - InjectTransactionManager, - MedusaContext, -} from "@medusajs/framework/utils" -import { Context } from "@medusajs/framework/types" -import { EntityManager } from "@mikro-orm/knex" -import { IsolationLevel } from "@mikro-orm/core" - -class BlogModuleService { - // ... - @InjectTransactionManager() - async update_( - input: { - id: string, - name: string - }, - @MedusaContext() sharedContext?: Context - ): Promise { - return await this.baseRepository_.transaction( - async (transactionManager) => { - // ... - }, - { - isolationLevel: IsolationLevel.READ_COMMITTED, - } - ) - } -} -``` - -3. `enableNestedTransactions`: (default: `false`) whether to allow using nested transactions. - - If `transaction` is provided and this is disabled, the manager in `transaction` is re-used. - -```ts highlights={[["16"]]} -// other imports... -import { - InjectTransactionManager, - MedusaContext, -} from "@medusajs/framework/utils" -import { Context } from "@medusajs/framework/types" -import { EntityManager } from "@mikro-orm/knex" - -class BlogModuleService { - // ... - @InjectTransactionManager() - async update_( - input: { - id: string, - name: string - }, - @MedusaContext() sharedContext?: Context - ): Promise { - return await this.baseRepository_.transaction( - async (transactionManager) => { - // ... - }, - { - enableNestedTransactions: false, - } - ) - } -} -``` - - -# Infrastructure Modules - -In this chapter, you’ll learn about Infrastructure Modules. - -## What is an Infrastructure Module? - -An Infrastructure Module implements features and mechanisms related to the Medusa application’s architecture and infrastructure. - -Since modules are interchangeable, you have more control over Medusa’s architecture. For example, you can choose to use Memcached for event handling instead of Redis. - -*** - -## Infrastructure Module Types - -There are different Infrastructure Module types including: - -![Diagram illustrating how the modules connect to third-party services](https://res.cloudinary.com/dza7lstvk/image/upload/v1727095814/Medusa%20Book/infrastructure-modules_bj9bb9.jpg) - -- Cache Module: Defines the caching mechanism or logic to cache computational results. -- Event Module: Integrates a pub/sub service to handle subscribing to and emitting events. -- Workflow Engine Module: Integrates a service to store and track workflow executions and steps. -- File Module: Integrates a storage service to handle uploading and managing files. -- Notification Module: Integrates a third-party service or defines custom logic to send notifications to users and customers. -- Locking Module: Integrates a service that manages access to shared resources by multiple processes or threads. - -*** - -## Infrastructure Modules List - -Refer to the [Infrastructure Modules reference](https://docs.medusajs.com/resources/infrastructure-modules/index.html.md) for a list of Medusa’s Infrastructure Modules, available modules to install, and how to create an Infrastructure Module. - - -# Loaders - -In this chapter, you’ll learn about loaders and how to use them. - -## What is a Loader? - -When building a commerce application, you'll often need to execute an action the first time the application starts. For example, if your application needs to connect to databases other than Medusa's PostgreSQL database, you might need to establish a connection on application startup. - -In Medusa, you can execute an action when the application starts using a loader. A loader is a function exported by a [module](https://docs.medusajs.com/learn/fundamentals/modules/index.html.md), which is a package of business logic for a single domain. When the Medusa application starts, it executes all loaders exported by configured modules. - -Loaders are useful to register custom resources, such as database connections, in the [module's container](https://docs.medusajs.com/learn/fundamentals/modules/container/index.html.md), which is similar to the [Medusa container](https://docs.medusajs.com/learn/fundamentals/medusa-container/index.html.md) but includes only [resources available to the module](https://docs.medusajs.com/resources/medusa-container-resources#module-container-resources/index.html.md). Modules are isolated, so they can't access resources outside of them, such as a service in another module. - -Medusa isolates modules to ensure that they're re-usable across applications, aren't tightly coupled to other resources, and don't have implications when integrated into the Medusa application. Learn more about why modules are isolated in [this chapter](https://docs.medusajs.com/learn/fundamentals/modules/isolation/index.html.md), and check out [this reference for the list of resources in the module's container](https://docs.medusajs.com/resources/medusa-container-resources#module-container-resources/index.html.md). - -*** - -## How to Create a Loader? - -### 1. Implement Loader Function - -You create a loader function in a TypeScript or JavaScript file under a module's `loaders` directory. - -For example, consider you have a `hello` module, you can create a loader at `src/modules/hello/loaders/hello-world.ts` with the following content: - -![Example of loader file in the application's directory structure](https://res.cloudinary.com/dza7lstvk/image/upload/v1732865671/Medusa%20Book/loader-dir-overview_eg6vtu.jpg) - -Learn how to create a module in [this chapter](https://docs.medusajs.com/learn/fundamentals/modules/index.html.md). - -```ts title="src/modules/hello/loaders/hello-world.ts" -import { - LoaderOptions, -} from "@medusajs/framework/types" - -export default async function helloWorldLoader({ - container, -}: LoaderOptions) { - const logger = container.resolve("logger") - - logger.info("[HELLO MODULE] Just started the Medusa application!") -} -``` - -The loader file exports an async function, which is the function executed when the application loads. - -The function receives an object parameter that has a `container` property, which is the module's container that you can use to resolve resources from. In this example, you resolve the Logger utility to log a message in the terminal. - -Find the list of resources in the module's container in [this reference](https://docs.medusajs.com/resources/medusa-container-resources#module-container-resources/index.html.md). - -### 2. Export Loader in Module Definition - -After implementing the loader, you must export it in the module's definition in the `index.ts` file at the root of the module's directory. Otherwise, the Medusa application will not run it. - -So, to export the loader you implemented above in the `hello` module, add the following to `src/modules/hello/index.ts`: - -```ts title="src/modules/hello/index.ts" -// other imports... -import helloWorldLoader from "./loaders/hello-world" - -export default Module("hello", { - // ... - loaders: [helloWorldLoader], -}) -``` - -The second parameter of the `Module` function accepts a `loaders` property whose value is an array of loader functions. The Medusa application will execute these functions when it starts. - -### Test the Loader - -Assuming your module is [added to Medusa's configuration](https://docs.medusajs.com/learn/fundamentals/modules#4-add-module-to-medusas-configurations/index.html.md), you can test the loader by starting the Medusa application: - -```bash npm2yarn -npm run dev -``` - -Then, you'll find the following message logged in the terminal: - -```plain -info: [HELLO MODULE] Just started the Medusa application! -``` - -This indicates that the loader in the `hello` module ran and logged this message. - -*** - -## When are Loaders Executed? - -When you start the Medusa application, it executes the loaders of all modules in their registration order. - -A loader is executed before the module's main service is instantiated. So, you can use loaders to register in the module's container resources that you want to use in the module's service. For example, you can register a database connection. - -Loaders are also useful to only load a module if a certain condition is met. For example, if you try to connect to a database in a loader but the connection fails, you can throw an error in the loader to prevent the module from being loaded. This is useful if your module depends on an external service to work. - -*** - -## Example: Register Custom MongoDB Connection - -As mentioned in this chapter's introduction, loaders are most useful when you need to register a custom resource in the module's container to re-use it in other customizations in the module. - -Consider your have a MongoDB module that allows you to perform operations on a MongoDB database. - -### Prerequisites - -- [MongoDB database that you can connect to from a local machine.](https://www.mongodb.com) -- [Install the MongoDB SDK in your Medusa application.](https://www.mongodb.com/docs/drivers/node/current/quick-start/download-and-install/#install-the-node.js-driver) - -To connect to the database, you create the following loader in your module: - -```ts title="src/modules/mongo/loaders/connection.ts" highlights={loaderHighlights} -import { LoaderOptions } from "@medusajs/framework/types" -import { asValue } from "awilix" -import { MongoClient } from "mongodb" - -type ModuleOptions = { - connection_url?: string - db_name?: string -} - -export default async function mongoConnectionLoader({ - container, - options, -}: LoaderOptions) { - if (!options.connection_url) { - throw new Error(`[MONGO MDOULE]: connection_url option is required.`) - } - if (!options.db_name) { - throw new Error(`[MONGO MDOULE]: db_name option is required.`) - } - const logger = container.resolve("logger") - - try { - const clientDb = ( - await (new MongoClient(options.connection_url)).connect() - ).db(options.db_name) - - logger.info("Connected to MongoDB") - - container.register( - "mongoClient", - asValue(clientDb) - ) - } catch (e) { - logger.error( - `[MONGO MDOULE]: An error occurred while connecting to MongoDB: ${e}` - ) - } -} -``` - -The loader function accepts in its object parameter an `options` property, which is the options passed to the module in Medusa's configurations. For example: - -```ts title="medusa-config.ts" highlights={optionHighlights} -module.exports = defineConfig({ - // ... - modules: [ - { - resolve: "./src/modules/mongo", - options: { - connection_url: process.env.MONGO_CONNECTION_URL, - db_name: process.env.MONGO_DB_NAME, - }, - }, - ], -}) -``` - -Passing options is useful when your module needs informations like connection URLs or API keys, as it ensures your module can be re-usable across applications. For the MongoDB Module, you expect two options: - -- `connection_url`: the URL to connect to the MongoDB database. -- `db_name`: The name of the database to connect to. - -In the loader, you check first that these options are set before proceeding. Then, you create an instance of the MongoDB client and connect to the database specified in the options. - -After creating the client, you register it in the module's container using the container's `register` method. The method accepts two parameters: - -1. The key to register the resource under, which in this case is `mongoClient`. You'll use this name later to resolve the client. -2. The resource to register in the container, which is the MongoDB client you created. However, you don't pass the resource as-is. Instead, you need to use an `asValue` function imported from the [awilix package](https://github.com/jeffijoe/awilix), which is the package used to implement the container functionality in Medusa. - -### Use Custom Registered Resource in Module's Service - -After registering the custom MongoDB client in the module's container, you can now resolve and use it in the module's service. - -For example: - -```ts title="src/modules/mongo/service.ts" -import type { Db } from "mongodb" - -type InjectedDependencies = { - mongoClient: Db -} - -export default class MongoModuleService { - private mongoClient_: Db - - constructor({ mongoClient }: InjectedDependencies) { - this.mongoClient_ = mongoClient - } - - async createMovie({ title }: { - title: string - }) { - const moviesCol = this.mongoClient_.collection("movie") - - const insertedMovie = await moviesCol.insertOne({ - title, - }) - - const movie = await moviesCol.findOne({ - _id: insertedMovie.insertedId, - }) - - return movie - } - - async deleteMovie(id: string) { - const moviesCol = this.mongoClient_.collection("movie") - - await moviesCol.deleteOne({ - _id: { - equals: id, - }, - }) - } -} -``` - -The service `MongoModuleService` resolves the `mongoClient` resource you registered in the loader and sets it as a class property. You then use it in the `createMovie` and `deleteMovie` methods, which create and delete a document in a `movie` collection in the MongoDB database, respectively. - -Make sure to export the loader in the module's definition in the `index.ts` file at the root directory of the module: - -```ts title="src/modules/mongo/index.ts" highlights={[["9"]]} -import { Module } from "@medusajs/framework/utils" -import MongoModuleService from "./service" -import mongoConnectionLoader from "./loaders/connection" - -export const MONGO_MODULE = "mongo" - -export default Module(MONGO_MODULE, { - service: MongoModuleService, - loaders: [mongoConnectionLoader], -}) -``` - -### Test it Out - -You can test the connection out by starting the Medusa application. If it's successful, you'll see the following message logged in the terminal: - -```bash -info: Connected to MongoDB -``` - -You can now resolve the MongoDB Module's main service in your customizations to perform operations on the MongoDB database. - - -# Module Isolation - -In this chapter, you'll learn how modules are isolated, and what that means for your custom development. - -- Modules can't access resources, such as services or data models, from other modules. -- Use Medusa's linking concepts, as explained in the [Module Links chapters](https://docs.medusajs.com/learn/fundamentals/module-links/index.html.md), to extend a module's data models and retrieve data across modules. - -## How are Modules Isolated? - -A module is unaware of any resources other than its own, such as services or data models. This means it can't access these resources if they're implemented in another module. - -For example, your custom module can't resolve the Product Module's main service or have direct relationships from its data model to the Product Module's data models. - -*** - -## Why are Modules Isolated - -Some of the module isolation's benefits include: - -- Integrate your module into any Medusa application without side-effects to your setup. -- Replace existing modules with your custom implementation, if your use case is drastically different. -- Use modules in other environments, such as Edge functions and Next.js apps. - -*** - -## How to Extend Data Model of Another Module? - -To extend the data model of another module, such as the `product` data model of the Product Module, use Medusa's linking concepts as explained in the [Module Links chapters](https://docs.medusajs.com/learn/fundamentals/module-links/index.html.md). - -*** - -## How to Use Services of Other Modules? - -If you're building a feature that uses functionalities from different modules, use a workflow whose steps resolve the modules' services to perform these functionalities. - -Workflows ensure data consistency through their roll-back mechanism and tracking of each execution's status, steps, input, and output. - -### Example - -For example, consider you have two modules: - -1. A module that stores and manages brands in your application. -2. A module that integrates a third-party Content Management System (CMS). - -To sync brands from your application to the third-party system, create the following steps: - -```ts title="Example Steps" highlights={stepsHighlights} -const retrieveBrandsStep = createStep( - "retrieve-brands", - async (_, { container }) => { - const brandModuleService = container.resolve( - "brandModuleService" - ) - - const brands = await brandModuleService.listBrands() - - return new StepResponse(brands) - } -) - -const createBrandsInCmsStep = createStep( - "create-brands-in-cms", - async ({ brands }, { container }) => { - const cmsModuleService = container.resolve( - "cmsModuleService" - ) - - const cmsBrands = await cmsModuleService.createBrands(brands) - - return new StepResponse(cmsBrands, cmsBrands) - }, - async (brands, { container }) => { - const cmsModuleService = container.resolve( - "cmsModuleService" - ) - - await cmsModuleService.deleteBrands( - brands.map((brand) => brand.id) - ) - } -) -``` - -The `retrieveBrandsStep` retrieves the brands from a brand module, and the `createBrandsInCmsStep` creates the brands in a third-party system using a CMS module. - -Then, create the following workflow that uses these steps: - -```ts title="Example Workflow" -export const syncBrandsWorkflow = createWorkflow( - "sync-brands", - () => { - const brands = retrieveBrandsStep() - - createBrandsInCmsStep({ brands }) - } -) -``` - -You can then use this workflow in an API route, scheduled job, or other resources that use this functionality. - - -# Modules Directory Structure - -In this document, you'll learn about the expected files and directories in your module. - -![Module Directory Structure Example](https://res.cloudinary.com/dza7lstvk/image/upload/v1714379976/Medusa%20Book/modules-dir-overview_nqq7ne.jpg) - -## index.ts - -The `index.ts` file in the root of your module's directory is the only required file. It must export the module's definition as explained in a [previous chapter](https://docs.medusajs.com/learn/fundamentals/modules/index.html.md). - -*** - -## service.ts - -A module must have a main service. It's created in the `service.ts` file at the root of your module directory as explained in a [previous chapter](https://docs.medusajs.com/learn/fundamentals/modules/index.html.md). - -*** - -## Other Directories - -The following directories are optional and their content are explained more in the following chapters: - -- `models`: Holds the data models representing tables in the database. -- `migrations`: Holds the migration files used to reflect changes on the database. -- `loaders`: Holds the scripts to run on the Medusa application's start-up. - - -# Multiple Services in a Module - -In this chapter, you'll learn how to use multiple services in a module. - -## Module's Main and Internal Services - -A module has one main service only, which is the service exported in the module's definition. - -However, you may use other services in your module to better organize your code or split functionalities. These are called internal services that can be resolved within your module, but not in external resources. - -*** - -## How to Add an Internal Service - -### 1. Create Service - -To add an internal service, create it in the `services` directory of your module. - -For example, create the file `src/modules/blog/services/client.ts` with the following content: - -```ts title="src/modules/blog/services/client.ts" -export class ClientService { - async getMessage(): Promise { - return "Hello, World!" - } -} -``` - -### 2. Export Service in Index - -Next, create an `index.ts` file under the `services` directory of the module that exports your internal services. - -For example, create the file `src/modules/blog/services/index.ts` with the following content: - -```ts title="src/modules/blog/services/index.ts" -export * from "./client" -``` - -This exports the `ClientService`. - -### 3. Resolve Internal Service - -Internal services exported in the `services/index.ts` file of your module are now registered in the container and can be resolved in other services in the module as well as loaders. - -For example, in your main service: - -```ts title="src/modules/blog/service.ts" highlights={[["5"], ["13"]]} -// other imports... -import { ClientService } from "./services" - -type InjectedDependencies = { - clientService: ClientService -} - -class BlogModuleService extends MedusaService({ - Post, -}){ - protected clientService_: ClientService - - constructor({ clientService }: InjectedDependencies) { - super(...arguments) - this.clientService_ = clientService - } -} -``` - -You can now use your internal service in your main service. - -*** - -## Resolve Resources in Internal Service - -Resolve dependencies from your module's container in the constructor of your internal service. - -For example: - -```ts -import { Logger } from "@medusajs/framework/types" - -type InjectedDependencies = { - logger: Logger -} - -export class ClientService { - protected logger_: Logger - - constructor({ logger }: InjectedDependencies) { - this.logger_ = logger - } -} -``` - -*** - -## Access Module Options - -Your internal service can't access the module's options. - -To retrieve the module's options, use the `configModule` registered in the module's container, which is the configurations in `medusa-config.ts`. - -For example: - -```ts -import { ConfigModule } from "@medusajs/framework/types" -import { BLOG_MODULE } from ".." - -export type InjectedDependencies = { - configModule: ConfigModule -} - -export class ClientService { - protected options: Record - - constructor({ configModule }: InjectedDependencies) { - const moduleDef = configModule.modules[BLOG_MODULE] - - if (typeof moduleDef !== "boolean") { - this.options = moduleDef.options - } - } -} -``` - -The `configModule` has a `modules` property that includes all registered modules. Retrieve the module's configuration using its registration key. - -If its value is not a `boolean`, set the service's options to the module configuration's `options` property. - - -# Service Constraints - -This chapter lists constraints to keep in mind when creating a service. - -## Use Async Methods - -Medusa wraps service method executions to inject useful context or transactions. However, since Medusa can't detect whether the method is asynchronous, it always executes methods in the wrapper with the `await` keyword. - -For example, if you have a synchronous `getMessage` method, and you use it in other resources like workflows, Medusa executes it as an async method: - -```ts -await blogModuleService.getMessage() -``` - -So, make sure your service's methods are always async to avoid unexpected errors or behavior. - -```ts highlights={[["8", "", "Method must be async."], ["13", "async", "Correct way of defining the method."]]} -import { MedusaService } from "@medusajs/framework/utils" -import Post from "./models/post" - -class BlogModuleService extends MedusaService({ - Post, -}){ - // Don't - getMessage(): string { - return "Hello, World!" - } - - // Do - async getMessage(): Promise { - return "Hello, World!" - } -} - -export default BlogModuleService -``` - - -# Module Options - -In this chapter, you’ll learn about passing options to your module from the Medusa application’s configurations and using them in the module’s resources. - -## What are Module Options? - -A module can receive options to customize or configure its functionality. For example, if you’re creating a module that integrates a third-party service, you’ll want to receive the integration credentials in the options rather than adding them directly in your code. - -*** - -## How to Pass Options to a Module? - -To pass options to a module, add an `options` property to the module’s configuration in `medusa-config.ts`. - -For example: - -```ts title="medusa-config.ts" -module.exports = defineConfig({ - // ... - modules: [ - { - resolve: "./src/modules/blog", - options: { - capitalize: true, - }, - }, - ], -}) -``` - -The `options` property’s value is an object. You can pass any properties you want. - -### Pass Options to a Module in a Plugin - -If your module is part of a plugin, you can pass options to the module in the plugin’s configuration. - -For example: - -```ts title="medusa-config.ts" -import { defineConfig } from "@medusajs/framework/utils" -module.exports = defineConfig({ - plugins: [ - { - resolve: "@myorg/plugin-name", - options: { - capitalize: true, - }, - }, - ], -}) -``` - -The `options` property in the plugin configuration is passed to all modules in a plugin. - -*** - -## Access Module Options in Main Service - -The module’s main service receives the module options as a second parameter. - -For example: - -```ts title="src/modules/blog/service.ts" highlights={[["12"], ["14", "options?: ModuleOptions"], ["17"], ["18"], ["19"]]} -import { MedusaService } from "@medusajs/framework/utils" -import Post from "./models/post" - -// recommended to define type in another file -type ModuleOptions = { - capitalize?: boolean -} - -export default class BlogModuleService extends MedusaService({ - Post, -}){ - protected options_: ModuleOptions - - constructor({}, options?: ModuleOptions) { - super(...arguments) - - this.options_ = options || { - capitalize: false, - } - } - - // ... -} -``` - -*** - -## Access Module Options in Loader - -The object that a module’s loaders receive as a parameter has an `options` property holding the module's options. - -For example: - -```ts title="src/modules/blog/loaders/hello-world.ts" highlights={[["11"], ["12", "ModuleOptions", "The type of expected module options."], ["16"]]} -import { - LoaderOptions, -} from "@medusajs/framework/types" - -// recommended to define type in another file -type ModuleOptions = { - capitalize?: boolean -} - -export default async function helloWorldLoader({ - options, -}: LoaderOptions) { - - console.log( - "[BLOG MODULE] Just started the Medusa application!", - options - ) -} -``` - -*** - -## Validate Module Options - -If you expect a certain option and want to throw an error if it's not provided or isn't valid, it's recommended to perform the validation in a loader. The module's service is only instantiated when it's used, whereas the loader runs the when the Medusa application starts. - -So, by performing the validation in the loader, you ensure you can throw an error at an early point, rather than when the module is used. - -For example, to validate that the Hello Module received an `apiKey` option, create the loader `src/modules/loaders/validate.ts`: - -```ts title="src/modules/blog/loaders/validate.ts" -import { LoaderOptions } from "@medusajs/framework/types" -import { MedusaError } from "@medusajs/framework/utils" - -// recommended to define type in another file -type ModuleOptions = { - apiKey?: string -} - -export default async function validationLoader({ - options, -}: LoaderOptions) { - if (!options.apiKey) { - throw new MedusaError( - MedusaError.Types.INVALID_DATA, - "Hello Module requires an apiKey option." - ) - } -} -``` - -Then, export the loader in the module's definition file, as explained in [this chapter](https://docs.medusajs.com/learn/fundamentals/modules/loaders/index.html.md): - -```ts title="src/modules/blog/index.ts" -// other imports... -import validationLoader from "./loaders/validate" - -export const BLOG_MODULE = "blog" - -export default Module(BLOG_MODULE, { - // ... - loaders: [validationLoader], -}) -``` - -Now, when the Medusa application starts, the loader will run, validating the module's options and throwing an error if the `apiKey` option is missing. - - -# Service Factory - -In this chapter, you’ll learn about what the service factory is and how to use it. - -## What is the Service Factory? - -Medusa provides a service factory that your module’s main service can extend. - -The service factory generates data management methods for your data models in the database, so you don't have to implement these methods manually. - -Your service provides data-management functionalities of your data models. - -*** - -## How to Extend the Service Factory? - -Medusa provides the service factory as a `MedusaService` function your service extends. The function creates and returns a service class with generated data-management methods. - -For example, create the file `src/modules/blog/service.ts` with the following content: - -```ts title="src/modules/blog/service.ts" highlights={highlights} -import { MedusaService } from "@medusajs/framework/utils" -import Post from "./models/post" - -class BlogModuleService extends MedusaService({ - Post, -}){ - // TODO implement custom methods -} - -export default BlogModuleService -``` - -### MedusaService Parameters - -The `MedusaService` function accepts one parameter, which is an object of data models to generate data-management methods for. - -In the example above, since the `BlogModuleService` extends `MedusaService`, it has methods to manage the `Post` data model, such as `createPosts`. - -### Generated Methods - -The service factory generates methods to manage the records of each of the data models provided in the first parameter in the database. - -The method's names are the operation's name, suffixed by the data model's key in the object parameter passed to `MedusaService`. - -For example, the following methods are generated for the service above: - -Find a complete reference of each of the methods in [this documentation](https://docs.medusajs.com/resources/service-factory-reference/index.html.md) - -### listPosts - -### listPosts - -This method retrieves an array of records based on filters and pagination configurations. - -For example: - -```ts -const posts = await blogModuleService - .listPosts() - -// with filters -const posts = await blogModuleService - .listPosts({ - id: ["123"] - }) -``` - -### listAndCountPosts - -### retrievePost - -This method retrieves a record by its ID. - -For example: - -```ts -const post = await blogModuleService - .retrievePost("123") -``` - -### retrievePost - -### updatePosts - -This method updates and retrieves records of the data model. - -For example: - -```ts -const post = await blogModuleService - .updatePosts({ - id: "123", - title: "test" - }) - -// update multiple -const posts = await blogModuleService - .updatePosts([ - { - id: "123", - title: "test" - }, - { - id: "321", - title: "test 2" - }, - ]) - -// use filters -const posts = await blogModuleService - .updatePosts([ - { - selector: { - id: ["123", "321"] - }, - data: { - title: "test" - } - }, - ]) -``` - -### createPosts - -### softDeletePosts - -This method soft-deletes records using an array of IDs or an object of filters. - -For example: - -```ts -await blogModuleService.softDeletePosts("123") - -// soft-delete multiple -await blogModuleService.softDeletePosts([ - "123", "321" -]) - -// use filters -await blogModuleService.softDeletePosts({ - id: ["123", "321"] -}) -``` - -### updatePosts - -### deletePosts - -### softDeletePosts - -### restorePosts - -### Using a Constructor - -If you implement the `constructor` of your service, make sure to call `super` passing it `...arguments`. - -For example: - -```ts highlights={[["8"]]} -import { MedusaService } from "@medusajs/framework/utils" -import Post from "./models/post" - -class BlogModuleService extends MedusaService({ - Post, -}){ - constructor() { - super(...arguments) - } -} - -export default BlogModuleService -``` - - -# Scheduled Jobs Number of Executions - -In this chapter, you'll learn how to set a limit on the number of times a scheduled job is executed. - -## numberOfExecutions Option - -The export configuration object of the scheduled job accepts an optional property `numberOfExecutions`. Its value is a number indicating how many times the scheduled job can be executed during the Medusa application's runtime. - -For example: - -```ts highlights={highlights} -export default async function myCustomJob() { - console.log("I'll be executed three times only.") -} - -export const config = { - name: "hello-world", - // execute every minute - schedule: "* * * * *", - numberOfExecutions: 3, -} -``` - -The above scheduled job has the `numberOfExecutions` configuration set to `3`. - -So, it'll only execute 3 times, each every minute, then it won't be executed anymore. - -If you restart the Medusa application, the scheduled job will be executed again until reaching the number of executions specified. - - -# Translate Medusa Admin - -The Medusa Admin supports multiple languages, with the default being English. In this documentation, you'll learn how to contribute to the community by translating the Medusa Admin to a language you're fluent in. - -{/* vale docs.We = NO */} - -You can contribute either by translating the admin to a new language, or fixing translations for existing languages. As we can't validate every language's translations, some translations may be incorrect. Your contribution is welcome to fix any translation errors you find. - -{/* vale docs.We = YES */} - -Check out the translated languages either in the admin dashboard's settings or on [GitHub](https://github.com/medusajs/medusa/blob/develop/packages/admin/dashboard/src/i18n/languages.ts). - -*** - -## How to Contribute Translation - -1. Clone the [Medusa monorepository](https://github.com/medusajs/medusa) to your local machine: - -```bash -git clone https://github.com/medusajs/medusa.git -``` - -If you already have it cloned, make sure to pull the latest changes from the `develop` branch. - -2. Install the monorepository's dependencies. Since it's a Yarn workspace, it's highly recommended to use yarn: - -```bash -yarn install -``` - -3. Create a branch that you'll use to open the pull request later: - -```bash -git checkout -b feat/translate- -``` - -Where `` is your language name. For example, `feat/translate-da`. - -4. Translation files are under `packages/admin/dashboard/src/i18n/translations` as JSON files whose names are the ISO-2 name of the language. - - If you're adding a new language, copy the file `packages/admin/dashboard/src/i18n/translations/en.json` and paste it with the ISO-2 name for your language. For example, if you're adding Danish translations, copy the `en.json` file and paste it as `packages/admin/dashboard/src/i18n/translations/de.json`. - - If you're fixing a translation, find the JSON file of the language under `packages/admin/dashboard/src/i18n/translations`. - -5. Start translating the keys in the JSON file (or updating the targeted ones). All keys in the JSON file must be translated, and your PR tests will fail otherwise. - - You can check whether the JSON file is valid by running the following command in `packages/admin/dashboard`, replacing `da.json` with the JSON file's name: - -```bash title="packages/admin/dashboard" -yarn i18n:validate da.json -``` - -6. After finishing the translation, if you're adding a new language, import its JSON file in `packages/admin/dashboard/src/i18n/translations/index.ts` and add it to the exported object: - -```ts title="packages/admin/dashboard/src/i18n/translations/index.ts" highlights={[["2"], ["6"], ["7"], ["8"]]} -// other imports... -import da from "./da.json" - -export default { - // other languages... - da: { - translation: da, - }, -} -``` - -The language's key in the object is the ISO-2 name of the language. - -7. If you're adding a new language, add it to the file `packages/admin/dashboard/src/i18n/languages.ts`: - -```ts title="packages/admin/dashboard/src/i18n/languages.ts" highlights={languageHighlights} -import { da } from "date-fns/locale" -// other imports... - -export const languages: Language[] = [ - // other languages... - { - code: "da", - display_name: "Danish", - ltr: true, - date_locale: da, - }, -] -``` - -`languages` is an array having the following properties: - -- `code`: The ISO-2 name of the language. For example, `da` for Danish. -- `display_name`: The language's name to be displayed in the admin. -- `ltr`: Whether the language supports a left-to-right layout. For example, set this to `false` for languages like Arabic. -- `date_locale`: An instance of the locale imported from the [date-fns/locale](https://date-fns.org/) package. - -8. Once you're done, push the changes into your branch and open a pull request on GitHub. - -Our team will perform a general review on your PR and merge it if no issues are found. The translation will be available in the admin after the next release. - - # Create a Plugin In this chapter, you'll learn how to create a Medusa plugin and publish it. @@ -14738,7 +12924,7 @@ Make sure to replace `~/path/to/medusa-app` with the path to your Medusa applica Then, if your project was created before v2.3.1 of Medusa, make sure to install `yalc` as a development dependency: -```bash npm2yarn title="Medusa application" +```bash npm2yarn badgeLabel="Medusa Application" badgeColor="green" npm install --save-dev yalc ``` @@ -14811,7 +12997,7 @@ This command will: You can start your Medusa application's development server to test out your plugin: -```bash npm2yarn title="Medusa application" +```bash npm2yarn badgeLabel="Medusa Application" badgeColor="green" npm run dev ``` @@ -14990,268 +13176,34 @@ npm publish This will publish an updated version of your plugin under a new version. -# Docs Contribution Guidelines +# Scheduled Jobs Number of Executions -Thank you for your interest in contributing to the documentation! You will be helping the open source community and other developers interested in learning more about Medusa and using it. +In this chapter, you'll learn how to set a limit on the number of times a scheduled job is executed. -This guide is specific to contributing to the documentation. If you’re interested in contributing to Medusa’s codebase, check out the [contributing guidelines in the Medusa GitHub repository](https://github.com/medusajs/medusa/blob/develop/CONTRIBUTING.md). +## numberOfExecutions Option -## What Can You Contribute? - -You can contribute to the Medusa documentation in the following ways: - -- Fixes to existing content. This includes small fixes like typos, or adding missing information. -- Additions to the documentation. If you think a documentation page can be useful to other developers, you can contribute by adding it. - - Make sure to open an issue first in the [medusa repository](https://github.com/medusajs/medusa) to confirm that you can add that documentation page. -- Fixes to UI components and tooling. If you find a bug while browsing the documentation, you can contribute by fixing it. - -*** - -## Documentation Workspace - -Medusa's documentation projects are all part of the documentation yarn workspace, which you can find in the [medusa repository](https://github.com/medusajs/medusa) under the `www` directory. - -The workspace has the following two directories: - -- `apps`: this directory holds the different documentation websites and projects. - - `book`: includes the codebase for the [main Medusa documentation](https://docs.medusajs.com//index.html.md). It's built with [Next.js 15](https://nextjs.org/). - - `resources`: includes the codebase for the resources documentation, which powers different sections of the docs such as the [Integrations](https://docs.medusajs.com/resources/integrations/index.html.md) or [How-to & Tutorials](https://docs.medusajs.com/resources/how-to-tutorials/index.html.md) sections. It's built with [Next.js 15](https://nextjs.org/). - - `api-reference`: includes the codebase for the API reference website. It's built with [Next.js 15](https://nextjs.org/). - - `ui`: includes the codebase for the Medusa UI documentation website. It's built with [Next.js 15](https://nextjs.org/). -- `packages`: this directory holds the shared packages and components necessary for the development of the projects in the `apps` directory. - - `docs-ui` includes the shared React components between the different apps. - - `remark-rehype-plugins` includes Remark and Rehype plugins used by the documentation projects. - -*** - -## Documentation Content - -All documentation projects are built with Next.js. The content is writtin in MDX files. - -### Medusa Main Docs Content - -The content of the Medusa main docs are under the `www/apps/book/app` directory. - -### Medusa Resources Content - -The content of all pages under the `/resources` path are under the `www/apps/resources/app` directory. - -Documentation pages under the `www/apps/resources/references` directory are generated automatically from the source code under the `packages/medusa` directory. So, you can't directly make changes to them. Instead, you'll have to make changes to the comments in the original source code. - -### API Reference - -The API reference's content is split into two types: - -1. Static content, which are the content related to getting started, expanding fields, and more. These are located in the `www/apps/api-reference/markdown` directory. They are MDX files. -2. OpenAPI specs that are shown to developers when checking the reference of an API Route. These are generated from OpenApi Spec comments, which are under the `www/utils/generated/oas-output` directory. - -### Medusa UI Documentation - -The content of the Medusa UI documentation are located under the `www/apps/ui/src/content/docs` directory. They are MDX files. - -The UI documentation also shows code examples, which are under the `www/apps/ui/src/examples` directory. - -The UI component props are generated from the source code and placed into the `www/apps/ui/src/specs` directory. To contribute to these props and their comments, check the comments in the source code under the `packages/design-system/ui` directory. - -*** - -## Style Guide - -When you contribute to the documentation content, make sure to follow the [documentation style guide](https://www.notion.so/Style-Guide-Docs-fad86dd1c5f84b48b145e959f36628e0). - -*** - -## How to Contribute - -If you’re fixing errors in an existing documentation page, you can scroll down to the end of the page and click on the “Edit this page” link. You’ll be redirected to the GitHub edit form of that page and you can make edits directly and submit a pull request (PR). - -If you’re adding a new page or contributing to the codebase, fork the repository, create a new branch, and make all changes necessary in your repository. Then, once you’re done, create a PR in the Medusa repository. - -### Base Branch - -When you make an edit to an existing documentation page or fork the repository to make changes to the documentation, create a new branch. - -Documentation contributions always use `develop` as the base branch. Make sure to also open your PR against the `develop` branch. - -### Branch Name - -Make sure that the branch name starts with `docs/`. For example, `docs/fix-services`. Vercel deployed previews are only triggered for branches starting with `docs/`. - -### Pull Request Conventions - -When you create a pull request, prefix the title with `docs:` or `docs(PROJECT_NAME):`, where `PROJECT_NAME` is the name of the documentation project this pull request pertains to. For example, `docs(ui): fix titles`. - -In the body of the PR, explain clearly what the PR does. If the PR solves an issue, use [closing keywords](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword) with the issue number. For example, “Closes #1333”. - -*** - -## Images - -If you are adding images to a documentation page, you can host the image on [Imgur](https://imgur.com) for free to include it in the PR. Our team will later upload it to our image hosting. - -*** - -## NPM and Yarn Code Blocks - -If you’re adding code blocks that use NPM and Yarn, you must add the `npm2yarn` meta field. +The export configuration object of the scheduled job accepts an optional property `numberOfExecutions`. Its value is a number indicating how many times the scheduled job can be executed during the Medusa application's runtime. For example: -````md -```bash npm2yarn -npm run start -``` -```` +```ts highlights={highlights} +export default async function myCustomJob() { + console.log("I'll be executed three times only.") +} -The code snippet must be written using NPM. - -### Global Option - -When a command uses the global option `-g`, add it at the end of the NPM command to ensure that it’s transformed to a Yarn command properly. For example: - -```bash npm2yarn -npm install @medusajs/cli -g +export const config = { + name: "hello-world", + // execute every minute + schedule: "* * * * *", + numberOfExecutions: 3, +} ``` -*** +The above scheduled job has the `numberOfExecutions` configuration set to `3`. -## Linting with Vale +So, it'll only execute 3 times, each every minute, then it won't be executed anymore. -Medusa uses [Vale](https://vale.sh/) to lint documentation pages and perform checks on incoming PRs into the repository. - -### Result of Vale PR Checks - -You can check the result of running the "lint" action on your PR by clicking the Details link next to it. You can find there all errors that you need to fix. - -### Run Vale Locally - -If you want to check your work locally, you can do that by: - -1. [Installing Vale](https://vale.sh/docs/vale-cli/installation/) on your machine. -2. Changing to the `www/vale` directory: - -```bash -cd www/vale -``` - -3\. Running the `run-vale` script: - -```bash -# to lint content for the main documentation -./run-vale.sh book/app/learn error resources -# to lint content for the resources documentation -./run-vale.sh resources/app error -# to lint content for the API reference -./run-vale.sh api-reference/markdown error -# to lint content for the Medusa UI documentation -./run-vale.sh ui/src/content/docs error -# to lint content for the user guide -./run-vale.sh user-guide/app error -``` - -{/* TODO need to enable MDX v1 comments first. */} - -{/* ### Linter Exceptions - -If it's needed to break some style guide rules in a document, you can wrap the parts that the linter shouldn't scan with the following comments in the `md` or `mdx` files: - -```md - - -content that shouldn't be scanned for errors here... - - -``` - -You can also disable specific rules. For example: - -```md - - -Medusa supports Node versions 14 and 16. - - -``` - -If you use this in your PR, you must justify its usage. */} - -*** - -## Linting with ESLint - -Medusa uses ESlint to lint code blocks both in the content and the code base of the documentation apps. - -### Linting Content with ESLint - -Each PR runs through a check that lints the code in the content files using ESLint. The action's name is `content-eslint`. - -If you want to check content ESLint errors locally and fix them, you can do that by: - -1\. Install the dependencies in the `www` directory: - -```bash -yarn install -``` - -2\. Run the turbo command in the `www` directory: - -```bash -turbo run lint:content -``` - -This will fix any fixable errors, and show errors that require your action. - -### Linting Code with ESLint - -Each PR runs through a check that lints the code in the content files using ESLint. The action's name is `code-docs-eslint`. - -If you want to check code ESLint errors locally and fix them, you can do that by: - -1\. Install the dependencies in the `www` directory: - -```bash -yarn install -``` - -2\. Run the turbo command in the `www` directory: - -```bash -yarn lint -``` - -This will fix any fixable errors, and show errors that require your action. - -{/* TODO need to enable MDX v1 comments first. */} - -{/* ### ESLint Exceptions - -If some code blocks have errors that can't or shouldn't be fixed, you can add the following command before the code block: - -~~~md - - -```js -console.log("This block isn't linted") -``` - -```js -console.log("This block is linted") -``` -~~~ - -You can also disable specific rules. For example: - -~~~md - - -```js -console.log("This block can use semicolons"); -``` - -```js -console.log("This block can't use semi colons") -``` -~~~ */} +If you restart the Medusa application, the scheduled job will be executed again until reaching the number of executions specified. # Expose a Workflow Hook @@ -15323,6 +13275,51 @@ The hook is available on the workflow's `hooks` property using its name `product You invoke the hook, passing a step function (the hook handler) as a parameter. +# Access Workflow Errors + +In this chapter, you’ll learn how to access errors that occur during a workflow’s execution. + +## How to Access Workflow Errors? + +By default, when an error occurs in a workflow, it throws that error, and the execution stops. + +You can configure the workflow to return the errors instead so that you can access and handle them differently. + +For example: + +```ts title="src/api/workflows/route.ts" highlights={highlights} collapsibleLines="1-6" expandButtonLabel="Show Imports" +import type { + MedusaRequest, + MedusaResponse, +} from "@medusajs/framework/http" +import myWorkflow from "../../../workflows/hello-world" + +export async function GET( + req: MedusaRequest, + res: MedusaResponse +) { + const { result, errors } = await myWorkflow(req.scope) + .run({ + // ... + throwOnError: false, + }) + + if (errors.length) { + return res.send({ + errors: errors.map((error) => error.error), + }) + } + + res.send(result) +} + +``` + +The object passed to the `run` method accepts a `throwOnError` property. When disabled, the errors are returned in the `errors` property of `run`'s output. + +The value of `errors` is an array of error objects. Each object has an `error` property, whose value is the name or text of the thrown error. + + # Conditions in Workflows with When-Then In this chapter, you'll learn how to execute an action based on a condition in a workflow using when-then from the Workflows SDK. @@ -15482,51 +13479,6 @@ Since `then` returns a value different than the step's result, you pass to the ` The second and third parameters are the same as the parameters you previously passed to `when`. -# Access Workflow Errors - -In this chapter, you’ll learn how to access errors that occur during a workflow’s execution. - -## How to Access Workflow Errors? - -By default, when an error occurs in a workflow, it throws that error, and the execution stops. - -You can configure the workflow to return the errors instead so that you can access and handle them differently. - -For example: - -```ts title="src/api/workflows/route.ts" highlights={highlights} collapsibleLines="1-6" expandButtonLabel="Show Imports" -import type { - MedusaRequest, - MedusaResponse, -} from "@medusajs/framework/http" -import myWorkflow from "../../../workflows/hello-world" - -export async function GET( - req: MedusaRequest, - res: MedusaResponse -) { - const { result, errors } = await myWorkflow(req.scope) - .run({ - // ... - throwOnError: false, - }) - - if (errors.length) { - return res.send({ - errors: errors.map((error) => error.error), - }) - } - - res.send(result) -} - -``` - -The object passed to the `run` method accepts a `throwOnError` property. When disabled, the errors are returned in the `errors` property of `run`'s output. - -The value of `errors` is an array of error objects. Each object has an `error` property, whose value is the name or text of the thrown error. - - # Compensation Function In this chapter, you'll learn what a compensation function is and how to add it to a step. @@ -16259,6 +14211,80 @@ const workflow = createWorkflow( In this example, you use when-then to run the `createProductsWorkflow` only if `should_create` (passed in the `input`) is enabled. +# Multiple Step Usage in Workflow + +In this chapter, you'll learn how to use a step multiple times in a workflow. + +## Problem Reusing a Step in a Workflow + +In some cases, you may need to use a step multiple times in the same workflow. + +The most common example is using the `useQueryGraphStep` multiple times in a workflow to retrieve multiple unrelated data, such as customers and products. + +Each workflow step must have a unique ID, which is the ID passed as a first parameter when creating the step: + +```ts +const useQueryGraphStep = createStep( + "use-query-graph" + // ... +) +``` + +This causes an error when you use the same step multiple times in a workflow, as it's registered in the workflow as two steps having the same ID: + +```ts +const helloWorkflow = createWorkflow( + "hello", + () => { + const { data: products } = useQueryGraphStep({ + entity: "product", + fields: ["id"], + }) + + // ERROR OCCURS HERE: A STEP HAS THE SAME ID AS ANOTHER IN THE WORKFLOW + const { data: customers } = useQueryGraphStep({ + entity: "customer", + fields: ["id"], + }) + } +) +``` + +The next section explains how to fix this issue to use the same step multiple times in a workflow. + +*** + +## How to Use a Step Multiple Times in a Workflow? + +When you execute a step in a workflow, you can chain a `config` method to it to change the step's config. + +Use the `config` method to change a step's ID for a single execution. + +So, this is the correct way to write the example above: + +```ts highlights={highlights} +const helloWorkflow = createWorkflow( + "hello", + () => { + const { data: products } = useQueryGraphStep({ + entity: "product", + fields: ["id"], + }) + + // ✓ No error occurs, the step has a different ID. + const { data: customers } = useQueryGraphStep({ + entity: "customer", + fields: ["id"], + }).config({ name: "fetch-customers" }) + } +) +``` + +The `config` method accepts an object with a `name` property. Its value is a new ID of the step to use for this execution only. + +The first `useQueryGraphStep` usage has the ID `use-query-graph`, and the second `useQueryGraphStep` usage has the ID `fetch-customers`. + + # Run Workflow Steps in Parallel In this chapter, you’ll learn how to run workflow steps in parallel. @@ -16607,80 +14633,6 @@ To find a full example of a long-running workflow, refer to the [restaurant-deli In the recipe, you use a long-running workflow that moves an order from placed to completed. The workflow waits for the restaurant to accept the order, the driver to pick up the order, and other external actions. -# Multiple Step Usage in Workflow - -In this chapter, you'll learn how to use a step multiple times in a workflow. - -## Problem Reusing a Step in a Workflow - -In some cases, you may need to use a step multiple times in the same workflow. - -The most common example is using the `useQueryGraphStep` multiple times in a workflow to retrieve multiple unrelated data, such as customers and products. - -Each workflow step must have a unique ID, which is the ID passed as a first parameter when creating the step: - -```ts -const useQueryGraphStep = createStep( - "use-query-graph" - // ... -) -``` - -This causes an error when you use the same step multiple times in a workflow, as it's registered in the workflow as two steps having the same ID: - -```ts -const helloWorkflow = createWorkflow( - "hello", - () => { - const { data: products } = useQueryGraphStep({ - entity: "product", - fields: ["id"], - }) - - // ERROR OCCURS HERE: A STEP HAS THE SAME ID AS ANOTHER IN THE WORKFLOW - const { data: customers } = useQueryGraphStep({ - entity: "customer", - fields: ["id"], - }) - } -) -``` - -The next section explains how to fix this issue to use the same step multiple times in a workflow. - -*** - -## How to Use a Step Multiple Times in a Workflow? - -When you execute a step in a workflow, you can chain a `config` method to it to change the step's config. - -Use the `config` method to change a step's ID for a single execution. - -So, this is the correct way to write the example above: - -```ts highlights={highlights} -const helloWorkflow = createWorkflow( - "hello", - () => { - const { data: products } = useQueryGraphStep({ - entity: "product", - fields: ["id"], - }) - - // ✓ No error occurs, the step has a different ID. - const { data: customers } = useQueryGraphStep({ - entity: "customer", - fields: ["id"], - }).config({ name: "fetch-customers" }) - } -) -``` - -The `config` method accepts an object with a `name` property. Its value is a new ID of the step to use for this execution only. - -The first `useQueryGraphStep` usage has the ID `use-query-graph`, and the second `useQueryGraphStep` usage has the ID `fetch-customers`. - - # Retry Failed Steps In this chapter, you’ll learn how to configure steps to allow retrial on failure. @@ -16949,130 +14901,6 @@ if (workflowExecution.state === "failed") { Other state values include `done`, `invoking`, and `compensating`. -# Workflow Hooks - -In this chapter, you'll learn what a workflow hook is and how to consume them. - -## What is a Workflow Hook? - -A workflow hook is a point in a workflow where you can inject custom functionality as a step function, called a hook handler. - -Medusa exposes hooks in many of its workflows that are used in its API routes. You can consume those hooks to add your custom logic. - -Refer to the [Workflows Reference](https://docs.medusajs.com/resources/medusa-workflows-reference/index.html.md) to view all workflows and their hooks. - -You want to perform a custom action during a workflow's execution, such as when a product is created. - -*** - -## How to Consume a Hook? - -A workflow has a special `hooks` property which is an object that holds its hooks. - -So, in a TypeScript or JavaScript file created under the `src/workflows/hooks` directory: - -- Import the workflow. -- Access its hook using the `hooks` property. -- Pass the hook a step function as a parameter to consume it. - -For example, to consume the `productsCreated` hook of Medusa's `createProductsWorkflow`, create the file `src/workflows/hooks/product-created.ts` with the following content: - -```ts title="src/workflows/hooks/product-created.ts" highlights={handlerHighlights} -import { createProductsWorkflow } from "@medusajs/medusa/core-flows" - -createProductsWorkflow.hooks.productsCreated( - async ({ products }, { container }) => { - // TODO perform an action - } -) -``` - -The `productsCreated` hook is available on the workflow's `hooks` property by its name. - -You invoke the hook, passing a step function (the hook handler) as a parameter. - -Now, when a product is created using the [Create Product API route](https://docs.medusajs.com/api/admin#products_postproducts), your hook handler is executed after the product is created. - -A hook can have only one handler. - -Refer to the [createProductsWorkflow reference](https://docs.medusajs.com/resources/references/medusa-workflows/createProductsWorkflow/index.html.md) to see at which point the hook handler is executed. - -### Hook Handler Parameter - -Since a hook handler is essentially a step function, it receives the hook's input as a first parameter, and an object holding a `container` property as a second parameter. - -Each hook has different input. For example, the `productsCreated` hook receives an object having a `products` property holding the created product. - -### Hook Handler Compensation - -Since the hook handler is a step function, you can set its compensation function as a second parameter of the hook. - -For example: - -```ts title="src/workflows/hooks/product-created.ts" -import { createProductsWorkflow } from "@medusajs/medusa/core-flows" - -createProductsWorkflow.hooks.productsCreated( - async ({ products }, { container }) => { - // TODO perform an action - - return new StepResponse(undefined, { ids }) - }, - async ({ ids }, { container }) => { - // undo the performed action - } -) -``` - -The compensation function is executed if an error occurs in the workflow to undo the actions performed by the hook handler. - -The compensation function receives as an input the second parameter passed to the `StepResponse` returned by the step function. - -It also accepts as a second parameter an object holding a `container` property to resolve resources from the Medusa container. - -### Additional Data Property - -Medusa's workflows pass in the hook's input an `additional_data` property: - -```ts title="src/workflows/hooks/product-created.ts" highlights={[["4", "additional_data"]]} -import { createProductsWorkflow } from "@medusajs/medusa/core-flows" - -createProductsWorkflow.hooks.productsCreated( - async ({ products, additional_data }, { container }) => { - // TODO perform an action - } -) -``` - -This property is an object that holds additional data passed to the workflow through the request sent to the API route using the workflow. - -Learn how to pass `additional_data` in requests to API routes in [this chapter](https://docs.medusajs.com/learn/fundamentals/api-routes/additional-data/index.html.md). - -### Pass Additional Data to Workflow - -You can also pass that additional data when executing the workflow. Pass it as a parameter to the `.run` method of the workflow: - -```ts title="src/workflows/hooks/product-created.ts" highlights={[["10", "additional_data"]]} -import type { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" -import { createProductsWorkflow } from "@medusajs/medusa/core-flows" - -export async function POST(req: MedusaRequest, res: MedusaResponse) { - await createProductsWorkflow(req.scope).run({ - input: { - products: [ - // ... - ], - additional_data: { - custom_field: "test", - }, - }, - }) -} -``` - -Your hook handler then receives that passed data in the `additional_data` object. - - # Variable Manipulation in Workflows with transform In this chapter, you'll learn how to use `transform` from the Workflows SDK to manipulate variables in a workflow. @@ -17278,6 +15106,130 @@ const myWorkflow = createWorkflow( ``` +# Workflow Hooks + +In this chapter, you'll learn what a workflow hook is and how to consume them. + +## What is a Workflow Hook? + +A workflow hook is a point in a workflow where you can inject custom functionality as a step function, called a hook handler. + +Medusa exposes hooks in many of its workflows that are used in its API routes. You can consume those hooks to add your custom logic. + +Refer to the [Workflows Reference](https://docs.medusajs.com/resources/medusa-workflows-reference/index.html.md) to view all workflows and their hooks. + +You want to perform a custom action during a workflow's execution, such as when a product is created. + +*** + +## How to Consume a Hook? + +A workflow has a special `hooks` property which is an object that holds its hooks. + +So, in a TypeScript or JavaScript file created under the `src/workflows/hooks` directory: + +- Import the workflow. +- Access its hook using the `hooks` property. +- Pass the hook a step function as a parameter to consume it. + +For example, to consume the `productsCreated` hook of Medusa's `createProductsWorkflow`, create the file `src/workflows/hooks/product-created.ts` with the following content: + +```ts title="src/workflows/hooks/product-created.ts" highlights={handlerHighlights} +import { createProductsWorkflow } from "@medusajs/medusa/core-flows" + +createProductsWorkflow.hooks.productsCreated( + async ({ products }, { container }) => { + // TODO perform an action + } +) +``` + +The `productsCreated` hook is available on the workflow's `hooks` property by its name. + +You invoke the hook, passing a step function (the hook handler) as a parameter. + +Now, when a product is created using the [Create Product API route](https://docs.medusajs.com/api/admin#products_postproducts), your hook handler is executed after the product is created. + +A hook can have only one handler. + +Refer to the [createProductsWorkflow reference](https://docs.medusajs.com/resources/references/medusa-workflows/createProductsWorkflow/index.html.md) to see at which point the hook handler is executed. + +### Hook Handler Parameter + +Since a hook handler is essentially a step function, it receives the hook's input as a first parameter, and an object holding a `container` property as a second parameter. + +Each hook has different input. For example, the `productsCreated` hook receives an object having a `products` property holding the created product. + +### Hook Handler Compensation + +Since the hook handler is a step function, you can set its compensation function as a second parameter of the hook. + +For example: + +```ts title="src/workflows/hooks/product-created.ts" +import { createProductsWorkflow } from "@medusajs/medusa/core-flows" + +createProductsWorkflow.hooks.productsCreated( + async ({ products }, { container }) => { + // TODO perform an action + + return new StepResponse(undefined, { ids }) + }, + async ({ ids }, { container }) => { + // undo the performed action + } +) +``` + +The compensation function is executed if an error occurs in the workflow to undo the actions performed by the hook handler. + +The compensation function receives as an input the second parameter passed to the `StepResponse` returned by the step function. + +It also accepts as a second parameter an object holding a `container` property to resolve resources from the Medusa container. + +### Additional Data Property + +Medusa's workflows pass in the hook's input an `additional_data` property: + +```ts title="src/workflows/hooks/product-created.ts" highlights={[["4", "additional_data"]]} +import { createProductsWorkflow } from "@medusajs/medusa/core-flows" + +createProductsWorkflow.hooks.productsCreated( + async ({ products, additional_data }, { container }) => { + // TODO perform an action + } +) +``` + +This property is an object that holds additional data passed to the workflow through the request sent to the API route using the workflow. + +Learn how to pass `additional_data` in requests to API routes in [this chapter](https://docs.medusajs.com/learn/fundamentals/api-routes/additional-data/index.html.md). + +### Pass Additional Data to Workflow + +You can also pass that additional data when executing the workflow. Pass it as a parameter to the `.run` method of the workflow: + +```ts title="src/workflows/hooks/product-created.ts" highlights={[["10", "additional_data"]]} +import type { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" +import { createProductsWorkflow } from "@medusajs/medusa/core-flows" + +export async function POST(req: MedusaRequest, res: MedusaResponse) { + await createProductsWorkflow(req.scope).run({ + input: { + products: [ + // ... + ], + additional_data: { + custom_field: "test", + }, + }, + }) +} +``` + +Your hook handler then receives that passed data in the `additional_data` object. + + # Workflow Timeout In this chapter, you’ll learn how to set a timeout for workflows and steps. @@ -17364,6 +15316,2255 @@ This step's executions fail if they run longer than two seconds. A step’s timeout error is returned in the `errors` property of the workflow’s execution, as explained in [this chapter](https://docs.medusajs.com/learn/fundamentals/workflows/access-workflow-errors/index.html.md). The error’s name is `TransactionStepTimeoutError`. +# Write Integration Tests + +In this chapter, you'll learn about `medusaIntegrationTestRunner` from Medusa's Testing Framework and how to use it to write integration tests. + +### Prerequisites + +- [Testing Tools Setup](https://docs.medusajs.com/learn/debugging-and-testing/testing-tools/index.html.md) + +## medusaIntegrationTestRunner Utility + +The `medusaIntegrationTestRunner` is from Medusa's Testing Framework and it's used to create integration tests in your Medusa project. It runs a full Medusa application, allowing you test API routes, workflows, or other customizations. + +For example: + +```ts title="integration-tests/http/test.spec.ts" highlights={highlights} +import { medusaIntegrationTestRunner } from "@medusajs/test-utils" + +medusaIntegrationTestRunner({ + testSuite: ({ api, getContainer }) => { + // TODO write tests... + }, +}) + +jest.setTimeout(60 * 1000) +``` + +The `medusaIntegrationTestRunner` function accepts an object as a parameter. The object has a required property `testSuite`. + +`testSuite`'s value is a function that defines the tests to run. The function accepts as a parameter an object that has the following properties: + +- `api`: a set of utility methods used to send requests to the Medusa application. It has the following methods: + - `get`: Send a `GET` request to an API route. + - `post`: Send a `POST` request to an API route. + - `delete`: Send a `DELETE` request to an API route. +- `getContainer`: a function that retrieves the Medusa Container. Use the `getContainer().resolve` method to resolve resources from the Medusa Container. + +The tests in the `testSuite` function are written using [Jest](https://jestjs.io/). + +### Jest Timeout + +Since your tests connect to the database and perform actions that require more time than the typical tests, make sure to increase the timeout in your test: + +```ts title="integration-tests/http/test.spec.ts" +// in your test's file +jest.setTimeout(60 * 1000) +``` + +*** + +### Run Tests + +Run the following command to run your tests: + +```bash npm2yarn +npm run test:integration +``` + +If you don't have a `test:integration` script in `package.json`, refer to the [Medusa Testing Tools chapter](https://docs.medusajs.com/learn/debugging-and-testing/testing-tools#add-test-commands/index.html.md). + +This runs your Medusa application and runs the tests available under the `src/integrations/http` directory. + +*** + +## Other Options and Inputs + +Refer to [the Test Tooling Reference](https://docs.medusajs.com/resources/test-tools-reference/medusaIntegrationTestRunner/index.html.md) for other available parameter options and inputs of the `testSuite` function. + +*** + +## Database Used in Tests + +The `medusaIntegrationTestRunner` function creates a database with a random name before running the tests. Then, it drops that database after all the tests end. + +To manage that database, such as changing its name or perform operations on it in your tests, refer to [the Test Tooling Reference](https://docs.medusajs.com/resources/test-tools-reference/medusaIntegrationTestRunner/index.html.md). + +*** + +## Example Integration Tests + +The next chapters provide examples of writing integration tests for API routes and workflows. + + +# Write Tests for Modules + +In this chapter, you'll learn about `moduleIntegrationTestRunner` from Medusa's Testing Framework and how to use it to write integration tests for a module's main service. + +### Prerequisites + +- [Testing Tools Setup](https://docs.medusajs.com/learn/debugging-and-testing/testing-tools/index.html.md) + +## moduleIntegrationTestRunner Utility + +`moduleIntegrationTestRunner` creates integration tests for a module. The integration tests run on a test Medusa application with only the specified module enabled. + +For example, assuming you have a `blog` module, create a test file at `src/modules/blog/__tests__/service.spec.ts`: + +```ts title="src/modules/blog/__tests__/service.spec.ts" +import { moduleIntegrationTestRunner } from "@medusajs/test-utils" +import { BLOG_MODULE } from ".." +import BlogModuleService from "../service" +import Post from "../models/post" + +moduleIntegrationTestRunner({ + moduleName: BLOG_MODULE, + moduleModels: [Post], + resolve: "./src/modules/blog", + testSuite: ({ service }) => { + // TODO write tests + }, +}) + +jest.setTimeout(60 * 1000) +``` + +The `moduleIntegrationTestRunner` function accepts as a parameter an object with the following properties: + +- `moduleName`: The name of the module. +- `moduleModels`: An array of models in the module. Refer to [this section](#write-tests-for-modules-without-data-models) if your module doesn't have data models. +- `resolve`: The path to the module's directory. +- `testSuite`: A function that defines the tests to run. + +The `testSuite` function accepts as a parameter an object having the `service` property, which is an instance of the module's main service. + +The type argument provided to the `moduleIntegrationTestRunner` function is used as the type of the `service` property. + +The tests in the `testSuite` function are written using [Jest](https://jestjs.io/). + +*** + +## Run Tests + +Run the following command to run your module integration tests: + +```bash npm2yarn +npm run test:integration:modules +``` + +If you don't have a `test:integration:modules` script in `package.json`, refer to the [Medusa Testing Tools chapter](https://docs.medusajs.com/learn/debugging-and-testing/testing-tools#add-test-commands/index.html.md). + +This runs your Medusa application and runs the tests available in any `__tests__` directory under the `src/modules` directory. + +*** + +## Pass Module Options + +If your module accepts options, you can set them using the `moduleOptions` property of the `moduleIntegrationTestRunner`'s parameter. + +For example: + +```ts +import { moduleIntegrationTestRunner } from "@medusajs/test-utils" +import BlogModuleService from "../service" + +moduleIntegrationTestRunner({ + moduleOptions: { + apiKey: "123", + }, + // ... +}) +``` + +*** + +## Write Tests for Modules without Data Models + +If your module doesn't have a data model, pass a dummy model in the `moduleModels` property. + +For example: + +```ts +import { moduleIntegrationTestRunner } from "@medusajs/test-utils" +import BlogModuleService from "../service" +import { model } from "@medusajs/framework/utils" + +const DummyModel = model.define("dummy_model", { + id: model.id().primaryKey(), +}) + +moduleIntegrationTestRunner({ + moduleModels: [DummyModel], + // ... +}) + +jest.setTimeout(60 * 1000) +``` + +*** + +### Other Options and Inputs + +Refer to [the Test Tooling Reference](https://docs.medusajs.com/resources/test-tools-reference/moduleIntegrationTestRunner/index.html.md) for other available parameter options and inputs of the `testSuite` function. + +*** + +## Database Used in Tests + +The `moduleIntegrationTestRunner` function creates a database with a random name before running the tests. Then, it drops that database after all the tests end. + +To manage that database, such as changing its name or perform operations on it in your tests, refer to [the Test Tooling Reference](https://docs.medusajs.com/resources/test-tools-reference/moduleIntegrationTestRunner/index.html.md). + + +# Module Container + +In this chapter, you'll learn about the module's container and how to resolve resources in that container. + +Since modules are isolated, each module has a local container only used by the resources of that module. + +So, resources in the module, such as services or loaders, can only resolve other resources registered in the module's container. + +### List of Registered Resources + +Find a list of resources or dependencies registered in a module's container in [the Container Resources reference](https://docs.medusajs.com/resources/medusa-container-resources/index.html.md). + +*** + +## Resolve Resources + +### Services + +A service's constructor accepts as a first parameter an object used to resolve resources registered in the module's container. + +For example: + +```ts highlights={[["4"], ["10"]]} +import { Logger } from "@medusajs/framework/types" + +type InjectedDependencies = { + logger: Logger +} + +export default class BlogModuleService { + protected logger_: Logger + + constructor({ logger }: InjectedDependencies) { + this.logger_ = logger + + this.logger_.info("[BlogModuleService]: Hello World!") + } + + // ... +} +``` + +### Loader + +A loader function accepts as a parameter an object having the property `container`. Its value is the module's container used to resolve resources. + +For example: + +```ts highlights={[["9"]]} +import { + LoaderOptions, +} from "@medusajs/framework/types" +import { + ContainerRegistrationKeys, +} from "@medusajs/framework/utils" + +export default async function helloWorldLoader({ + container, +}: LoaderOptions) { + const logger = container.resolve(ContainerRegistrationKeys.LOGGER) + + logger.info("[helloWorldLoader]: Hello, World!") +} +``` + + +# Perform Database Operations in a Service + +In this chapter, you'll learn how to perform database operations in a module's service. + +This chapter is intended for more advanced database use-cases where you need more control over queries and operations. For basic database operations, such as creating or retrieving data of a model, use the [Service Factory](https://docs.medusajs.com/learn/fundamentals/modules/service-factory/index.html.md) instead. + +## Run Queries + +[MikroORM's entity manager](https://mikro-orm.io/docs/entity-manager) is a class that has methods to run queries on the database and perform operations. + +Medusa provides an `InjectManager` decorator from the Modules SDK that injects a service's method with a [forked entity manager](https://mikro-orm.io/docs/identity-map#forking-entity-manager). + +So, to run database queries in a service: + +1. Add the `InjectManager` decorator to the method. +2. Add as a last parameter an optional `sharedContext` parameter that has the `MedusaContext` decorator from the Modules SDK. This context holds database-related context, including the manager injected by `InjectManager` + +For example, in your service, add the following methods: + +```ts highlights={methodsHighlight} +// other imports... +import { + InjectManager, + MedusaContext, +} from "@medusajs/framework/utils" +import { Context } from "@medusajs/framework/types" +import { EntityManager } from "@mikro-orm/knex" + +class BlogModuleService { + // ... + + @InjectManager() + async getCount( + @MedusaContext() sharedContext?: Context + ): Promise { + return await sharedContext?.manager?.count("my_custom") + } + + @InjectManager() + async getCountSql( + @MedusaContext() sharedContext?: Context + ): Promise { + const data = await sharedContext?.manager?.execute( + "SELECT COUNT(*) as num FROM my_custom" + ) + + return parseInt(data?.[0].num || 0) + } +} +``` + +You add two methods `getCount` and `getCountSql` that have the `InjectManager` decorator. Each of the methods also accept the `sharedContext` parameter which has the `MedusaContext` decorator. + +The entity manager is injected to the `sharedContext.manager` property, which is an instance of [EntityManager from the @mikro-orm/knex package](https://mikro-orm.io/api/knex/class/EntityManager). + +You use the manager in the `getCount` method to retrieve the number of records in a table, and in the `getCountSql` to run a PostgreSQL query that retrieves the count. + +Refer to [MikroORM's reference](https://mikro-orm.io/api/knex/class/EntityManager) for a full list of the entity manager's methods. + +*** + +## Execute Operations in Transactions + +To wrap database operations in a transaction, you create two methods: + +1. A private or protected method that's wrapped in a transaction. To wrap it in a transaction, you use the `InjectTransactionManager` decorator from the Modules SDK. +2. A public method that calls the transactional method. You use on it the `InjectManager` decorator as explained in the previous section. + +Both methods must accept as a last parameter an optional `sharedContext` parameter that has the `MedusaContext` decorator from the Modules SDK. It holds database-related contexts passed through the Medusa application. + +For example: + +```ts highlights={opHighlights} +import { + InjectManager, + InjectTransactionManager, + MedusaContext, +} from "@medusajs/framework/utils" +import { Context } from "@medusajs/framework/types" +import { EntityManager } from "@mikro-orm/knex" + +class BlogModuleService { + // ... + @InjectTransactionManager() + protected async update_( + input: { + id: string, + name: string + }, + @MedusaContext() sharedContext?: Context + ): Promise { + const transactionManager = sharedContext?.transactionManager + await transactionManager?.nativeUpdate( + "my_custom", + { + id: input.id, + }, + { + name: input.name, + } + ) + + // retrieve again + const updatedRecord = await transactionManager?.execute( + `SELECT * FROM my_custom WHERE id = '${input.id}'` + ) + + return updatedRecord + } + + @InjectManager() + async update( + input: { + id: string, + name: string + }, + @MedusaContext() sharedContext?: Context + ) { + return await this.update_(input, sharedContext) + } +} +``` + +The `BlogModuleService` has two methods: + +- A protected `update_` that performs the database operations inside a transaction. +- A public `update` that executes the transactional protected method. + +The shared context's `transactionManager` property holds the transactional entity manager (injected by `InjectTransactionManager`) that you use to perform database operations. + +Refer to [MikroORM's reference](https://mikro-orm.io/api/knex/class/EntityManager) for a full list of the entity manager's methods. + +### Why Wrap a Transactional Method + +The variables in the transactional method (for example, `update_`) hold values that are uncommitted to the database. They're only committed once the method finishes execution. + +So, if in your method you perform database operations, then use their result to perform other actions, such as connecting to a third-party service, you'll be working with uncommitted data. + +By placing only the database operations in a method that has the `InjectTransactionManager` and using it in a wrapper method, the wrapper method receives the committed result of the transactional method. + +This is also useful if you perform heavy data normalization outside of the database operations. In that case, you don't hold the transaction for a longer time than needed. + +For example, the `update` method could be changed to the following: + +```ts +// other imports... +import { + InjectManager, + InjectTransactionManager, + MedusaContext, +} from "@medusajs/framework/utils" +import { Context } from "@medusajs/framework/types" +import { EntityManager } from "@mikro-orm/knex" + +class BlogModuleService { + // ... + @InjectTransactionManager() + protected async update_( + // ... + ): Promise { + // ... + } + @InjectManager() + async update( + input: { + id: string, + name: string + }, + @MedusaContext() sharedContext?: Context + ) { + const newData = await this.update_(input, sharedContext) + + // example method that sends data to another system + await this.sendNewDataToSystem(newData) + + return newData + } +} +``` + +In this case, only the `update_` method is wrapped in a transaction. The returned value `newData` holds the committed result, which can be used for other operations, such as passed to a `sendNewDataToSystem` method. + +### Using Methods in Transactional Methods + +If your transactional method uses other methods that accept a Medusa context, pass the shared context to those methods. + +For example: + +```ts +// other imports... +import { + InjectTransactionManager, + MedusaContext, +} from "@medusajs/framework/utils" +import { Context } from "@medusajs/framework/types" +import { EntityManager } from "@mikro-orm/knex" + +class BlogModuleService { + // ... + @InjectTransactionManager() + protected async anotherMethod( + @MedusaContext() sharedContext?: Context + ) { + // ... + } + + @InjectTransactionManager() + protected async update_( + input: { + id: string, + name: string + }, + @MedusaContext() sharedContext?: Context + ): Promise { + this.anotherMethod(sharedContext) + } +} +``` + +You use the `anotherMethod` transactional method in the `update_` transactional method, so you pass it the shared context. + +The `anotherMethod` now runs in the same transaction as the `update_` method. + +*** + +## Configure Transactions + +To configure the transaction, such as its [isolation level](https://www.postgresql.org/docs/current/transaction-iso.html), use the `baseRepository` dependency registered in your module's container. + +The `baseRepository` is an instance of a repository class that provides methods to create transactions, run database operations, and more. + +The `baseRepository` has a `transaction` method that allows you to run a function within a transaction and configure that transaction. + +For example, resolve the `baseRepository` in your service's constructor: + +### Extending Service Factory + +```ts highlights={[["14"]]} +import { MedusaService } from "@medusajs/framework/utils" +import Post from "./models/post" +import { DAL } from "@medusajs/framework/types" + +type InjectedDependencies = { + baseRepository: DAL.RepositoryService +} + +class BlogModuleService extends MedusaService({ + Post, +}){ + protected baseRepository_: DAL.RepositoryService + + constructor({ baseRepository }: InjectedDependencies) { + super(...arguments) + this.baseRepository_ = baseRepository + } +} + +export default BlogModuleService +``` + +### Without Service Factory + +```ts highlights={[["10"]]} +import { DAL } from "@medusajs/framework/types" + +type InjectedDependencies = { + baseRepository: DAL.RepositoryService +} + +class BlogModuleService { + protected baseRepository_: DAL.RepositoryService + + constructor({ baseRepository }: InjectedDependencies) { + this.baseRepository_ = baseRepository + } +} + +export default BlogModuleService +``` + +Then, add the following method that uses it: + +```ts highlights={repoHighlights} +// ... +import { + InjectManager, + InjectTransactionManager, + MedusaContext, +} from "@medusajs/framework/utils" +import { Context } from "@medusajs/framework/types" +import { EntityManager } from "@mikro-orm/knex" + +class BlogModuleService { + // ... + @InjectTransactionManager() + protected async update_( + input: { + id: string, + name: string + }, + @MedusaContext() sharedContext?: Context + ): Promise { + return await this.baseRepository_.transaction( + async (transactionManager) => { + await transactionManager.nativeUpdate( + "my_custom", + { + id: input.id, + }, + { + name: input.name, + } + ) + + // retrieve again + const updatedRecord = await transactionManager.execute( + `SELECT * FROM my_custom WHERE id = '${input.id}'` + ) + + return updatedRecord + }, + { + transaction: sharedContext?.transactionManager, + } + ) + } + + @InjectManager() + async update( + input: { + id: string, + name: string + }, + @MedusaContext() sharedContext?: Context + ) { + return await this.update_(input, sharedContext) + } +} +``` + +The `update_` method uses the `baseRepository_.transaction` method to wrap a function in a transaction. + +The function parameter receives a transactional entity manager as a parameter. Use it to perform the database operations. + +The `baseRepository_.transaction` method also receives as a second parameter an object of options. You must pass in it the `transaction` property and set its value to the `sharedContext.transactionManager` property so that the function wrapped in the transaction uses the injected transaction manager. + +Refer to [MikroORM's reference](https://mikro-orm.io/api/knex/class/EntityManager) for a full list of the entity manager's methods. + +### Transaction Options + +The second parameter of the `baseRepository_.transaction` method is an object of options that accepts the following properties: + +1. `transaction`: Set the transactional entity manager passed to the function. You must provide this option as explained in the previous section. + +```ts highlights={[["16"]]} +// other imports... +import { EntityManager } from "@mikro-orm/knex" +import { + InjectTransactionManager, + MedusaContext, +} from "@medusajs/framework/utils" +import { Context } from "@medusajs/framework/types" +import { EntityManager } from "@mikro-orm/knex" + +class BlogModuleService { + // ... + @InjectTransactionManager() + async update_( + input: { + id: string, + name: string + }, + @MedusaContext() sharedContext?: Context + ): Promise { + return await this.baseRepository_.transaction( + async (transactionManager) => { + // ... + }, + { + transaction: sharedContext?.transactionManager, + } + ) + } +} +``` + +2. `isolationLevel`: Sets the transaction's [isolation level](https://www.postgresql.org/docs/current/transaction-iso.html). Its values can be: + - `read committed` + - `read uncommitted` + - `snapshot` + - `repeatable read` + - `serializable` + +```ts highlights={[["19"]]} +// other imports... +import { + InjectTransactionManager, + MedusaContext, +} from "@medusajs/framework/utils" +import { Context } from "@medusajs/framework/types" +import { EntityManager } from "@mikro-orm/knex" +import { IsolationLevel } from "@mikro-orm/core" + +class BlogModuleService { + // ... + @InjectTransactionManager() + async update_( + input: { + id: string, + name: string + }, + @MedusaContext() sharedContext?: Context + ): Promise { + return await this.baseRepository_.transaction( + async (transactionManager) => { + // ... + }, + { + isolationLevel: IsolationLevel.READ_COMMITTED, + } + ) + } +} +``` + +3. `enableNestedTransactions`: (default: `false`) whether to allow using nested transactions. + - If `transaction` is provided and this is disabled, the manager in `transaction` is re-used. + +```ts highlights={[["16"]]} +// other imports... +import { + InjectTransactionManager, + MedusaContext, +} from "@medusajs/framework/utils" +import { Context } from "@medusajs/framework/types" +import { EntityManager } from "@mikro-orm/knex" + +class BlogModuleService { + // ... + @InjectTransactionManager() + async update_( + input: { + id: string, + name: string + }, + @MedusaContext() sharedContext?: Context + ): Promise { + return await this.baseRepository_.transaction( + async (transactionManager) => { + // ... + }, + { + enableNestedTransactions: false, + } + ) + } +} +``` + + +# Infrastructure Modules + +In this chapter, you’ll learn about Infrastructure Modules. + +## What is an Infrastructure Module? + +An Infrastructure Module implements features and mechanisms related to the Medusa application’s architecture and infrastructure. + +Since modules are interchangeable, you have more control over Medusa’s architecture. For example, you can choose to use Memcached for event handling instead of Redis. + +*** + +## Infrastructure Module Types + +There are different Infrastructure Module types including: + +![Diagram illustrating how the modules connect to third-party services](https://res.cloudinary.com/dza7lstvk/image/upload/v1727095814/Medusa%20Book/infrastructure-modules_bj9bb9.jpg) + +- Cache Module: Defines the caching mechanism or logic to cache computational results. +- Event Module: Integrates a pub/sub service to handle subscribing to and emitting events. +- Workflow Engine Module: Integrates a service to store and track workflow executions and steps. +- File Module: Integrates a storage service to handle uploading and managing files. +- Notification Module: Integrates a third-party service or defines custom logic to send notifications to users and customers. +- Locking Module: Integrates a service that manages access to shared resources by multiple processes or threads. + +*** + +## Infrastructure Modules List + +Refer to the [Infrastructure Modules reference](https://docs.medusajs.com/resources/infrastructure-modules/index.html.md) for a list of Medusa’s Infrastructure Modules, available modules to install, and how to create an Infrastructure Module. + + +# Commerce Modules + +In this chapter, you'll learn about Medusa's Commerce Modules. + +## What is a Commerce Module? + +Commerce Modules are built-in [modules](https://docs.medusajs.com/learn/fundamentals/modules/index.html.md) of Medusa that provide core commerce logic specific to domains like Products, Orders, Customers, Fulfillment, and much more. + +Medusa's Commerce Modules are used to form Medusa's default [workflows](https://docs.medusajs.com/resources/medusa-workflows-reference/index.html.md) and [APIs](https://docs.medusajs.com/api/store). For example, when you call the add to cart endpoint. the add to cart workflow runs which uses the Product Module to check if the product exists, the Inventory Module to ensure the product is available in the inventory, and the Cart Module to finally add the product to the cart. + +You'll find the details and steps of the add-to-cart workflow in [this workflow reference](https://docs.medusajs.com/resources/references/medusa-workflows/addToCartWorkflow/index.html.md) + +The core commerce logic contained in Commerce Modules is also available directly when you are building customizations. This granular access to commerce functionality is unique and expands what's possible to build with Medusa drastically. + +### List of Medusa's Commerce Modules + +Refer to [this reference](https://docs.medusajs.com/resources/commerce-modules/index.html.md) for a full list of Commerce Modules in Medusa. + +*** + +## Use Commerce Modules in Custom Flows + +Similar to your [custom modules](https://docs.medusajs.com/learn/fundamentals/modules/index.html.md), the Medusa application registers a Commerce Module's service in the [container](https://docs.medusajs.com/learn/fundamentals/medusa-container/index.html.md). So, you can resolve it in your custom flows. This is useful as you build unique requirements extending core commerce features. + +For example, consider you have a [workflow](https://docs.medusajs.com/learn/fundamentals/workflows/index.html.md) (a special function that performs a task in a series of steps with rollback mechanism) that needs a step to retrieve the total number of products. You can create a step in the workflow that resolves the Product Module's service from the container to use its methods: + +```ts highlights={highlights} +import { createStep, StepResponse } from "@medusajs/framework/workflows-sdk" + +export const countProductsStep = createStep( + "count-products", + async ({ }, { container }) => { + const productModuleService = container.resolve("product") + + const [,count] = await productModuleService.listAndCountProducts() + + return new StepResponse(count) + } +) +``` + +Your workflow can use services of both custom and Commerce Modules, supporting you in building custom flows without having to re-build core commerce features. + + +# Module Isolation + +In this chapter, you'll learn how modules are isolated, and what that means for your custom development. + +- Modules can't access resources, such as services or data models, from other modules. +- Use Medusa's linking concepts, as explained in the [Module Links chapters](https://docs.medusajs.com/learn/fundamentals/module-links/index.html.md), to extend a module's data models and retrieve data across modules. + +## How are Modules Isolated? + +A module is unaware of any resources other than its own, such as services or data models. This means it can't access these resources if they're implemented in another module. + +For example, your custom module can't resolve the Product Module's main service or have direct relationships from its data model to the Product Module's data models. + +*** + +## Why are Modules Isolated + +Some of the module isolation's benefits include: + +- Integrate your module into any Medusa application without side-effects to your setup. +- Replace existing modules with your custom implementation, if your use case is drastically different. +- Use modules in other environments, such as Edge functions and Next.js apps. + +*** + +## How to Extend Data Model of Another Module? + +To extend the data model of another module, such as the `product` data model of the Product Module, use Medusa's linking concepts as explained in the [Module Links chapters](https://docs.medusajs.com/learn/fundamentals/module-links/index.html.md). + +*** + +## How to Use Services of Other Modules? + +If you're building a feature that uses functionalities from different modules, use a workflow whose steps resolve the modules' services to perform these functionalities. + +Workflows ensure data consistency through their roll-back mechanism and tracking of each execution's status, steps, input, and output. + +### Example + +For example, consider you have two modules: + +1. A module that stores and manages brands in your application. +2. A module that integrates a third-party Content Management System (CMS). + +To sync brands from your application to the third-party system, create the following steps: + +```ts title="Example Steps" highlights={stepsHighlights} +const retrieveBrandsStep = createStep( + "retrieve-brands", + async (_, { container }) => { + const brandModuleService = container.resolve( + "brandModuleService" + ) + + const brands = await brandModuleService.listBrands() + + return new StepResponse(brands) + } +) + +const createBrandsInCmsStep = createStep( + "create-brands-in-cms", + async ({ brands }, { container }) => { + const cmsModuleService = container.resolve( + "cmsModuleService" + ) + + const cmsBrands = await cmsModuleService.createBrands(brands) + + return new StepResponse(cmsBrands, cmsBrands) + }, + async (brands, { container }) => { + const cmsModuleService = container.resolve( + "cmsModuleService" + ) + + await cmsModuleService.deleteBrands( + brands.map((brand) => brand.id) + ) + } +) +``` + +The `retrieveBrandsStep` retrieves the brands from a brand module, and the `createBrandsInCmsStep` creates the brands in a third-party system using a CMS module. + +Then, create the following workflow that uses these steps: + +```ts title="Example Workflow" +export const syncBrandsWorkflow = createWorkflow( + "sync-brands", + () => { + const brands = retrieveBrandsStep() + + createBrandsInCmsStep({ brands }) + } +) +``` + +You can then use this workflow in an API route, scheduled job, or other resources that use this functionality. + + +# Loaders + +In this chapter, you’ll learn about loaders and how to use them. + +## What is a Loader? + +When building a commerce application, you'll often need to execute an action the first time the application starts. For example, if your application needs to connect to databases other than Medusa's PostgreSQL database, you might need to establish a connection on application startup. + +In Medusa, you can execute an action when the application starts using a loader. A loader is a function exported by a [module](https://docs.medusajs.com/learn/fundamentals/modules/index.html.md), which is a package of business logic for a single domain. When the Medusa application starts, it executes all loaders exported by configured modules. + +Loaders are useful to register custom resources, such as database connections, in the [module's container](https://docs.medusajs.com/learn/fundamentals/modules/container/index.html.md), which is similar to the [Medusa container](https://docs.medusajs.com/learn/fundamentals/medusa-container/index.html.md) but includes only [resources available to the module](https://docs.medusajs.com/resources/medusa-container-resources#module-container-resources/index.html.md). Modules are isolated, so they can't access resources outside of them, such as a service in another module. + +Medusa isolates modules to ensure that they're re-usable across applications, aren't tightly coupled to other resources, and don't have implications when integrated into the Medusa application. Learn more about why modules are isolated in [this chapter](https://docs.medusajs.com/learn/fundamentals/modules/isolation/index.html.md), and check out [this reference for the list of resources in the module's container](https://docs.medusajs.com/resources/medusa-container-resources#module-container-resources/index.html.md). + +*** + +## How to Create a Loader? + +### 1. Implement Loader Function + +You create a loader function in a TypeScript or JavaScript file under a module's `loaders` directory. + +For example, consider you have a `hello` module, you can create a loader at `src/modules/hello/loaders/hello-world.ts` with the following content: + +![Example of loader file in the application's directory structure](https://res.cloudinary.com/dza7lstvk/image/upload/v1732865671/Medusa%20Book/loader-dir-overview_eg6vtu.jpg) + +Learn how to create a module in [this chapter](https://docs.medusajs.com/learn/fundamentals/modules/index.html.md). + +```ts title="src/modules/hello/loaders/hello-world.ts" +import { + LoaderOptions, +} from "@medusajs/framework/types" + +export default async function helloWorldLoader({ + container, +}: LoaderOptions) { + const logger = container.resolve("logger") + + logger.info("[HELLO MODULE] Just started the Medusa application!") +} +``` + +The loader file exports an async function, which is the function executed when the application loads. + +The function receives an object parameter that has a `container` property, which is the module's container that you can use to resolve resources from. In this example, you resolve the Logger utility to log a message in the terminal. + +Find the list of resources in the module's container in [this reference](https://docs.medusajs.com/resources/medusa-container-resources#module-container-resources/index.html.md). + +### 2. Export Loader in Module Definition + +After implementing the loader, you must export it in the module's definition in the `index.ts` file at the root of the module's directory. Otherwise, the Medusa application will not run it. + +So, to export the loader you implemented above in the `hello` module, add the following to `src/modules/hello/index.ts`: + +```ts title="src/modules/hello/index.ts" +// other imports... +import helloWorldLoader from "./loaders/hello-world" + +export default Module("hello", { + // ... + loaders: [helloWorldLoader], +}) +``` + +The second parameter of the `Module` function accepts a `loaders` property whose value is an array of loader functions. The Medusa application will execute these functions when it starts. + +### Test the Loader + +Assuming your module is [added to Medusa's configuration](https://docs.medusajs.com/learn/fundamentals/modules#4-add-module-to-medusas-configurations/index.html.md), you can test the loader by starting the Medusa application: + +```bash npm2yarn +npm run dev +``` + +Then, you'll find the following message logged in the terminal: + +```plain +info: [HELLO MODULE] Just started the Medusa application! +``` + +This indicates that the loader in the `hello` module ran and logged this message. + +*** + +## When are Loaders Executed? + +When you start the Medusa application, it executes the loaders of all modules in their registration order. + +A loader is executed before the module's main service is instantiated. So, you can use loaders to register in the module's container resources that you want to use in the module's service. For example, you can register a database connection. + +Loaders are also useful to only load a module if a certain condition is met. For example, if you try to connect to a database in a loader but the connection fails, you can throw an error in the loader to prevent the module from being loaded. This is useful if your module depends on an external service to work. + +*** + +## Example: Register Custom MongoDB Connection + +As mentioned in this chapter's introduction, loaders are most useful when you need to register a custom resource in the module's container to re-use it in other customizations in the module. + +Consider your have a MongoDB module that allows you to perform operations on a MongoDB database. + +### Prerequisites + +- [MongoDB database that you can connect to from a local machine.](https://www.mongodb.com) +- [Install the MongoDB SDK in your Medusa application.](https://www.mongodb.com/docs/drivers/node/current/quick-start/download-and-install/#install-the-node.js-driver) + +To connect to the database, you create the following loader in your module: + +```ts title="src/modules/mongo/loaders/connection.ts" highlights={loaderHighlights} +import { LoaderOptions } from "@medusajs/framework/types" +import { asValue } from "awilix" +import { MongoClient } from "mongodb" + +type ModuleOptions = { + connection_url?: string + db_name?: string +} + +export default async function mongoConnectionLoader({ + container, + options, +}: LoaderOptions) { + if (!options.connection_url) { + throw new Error(`[MONGO MDOULE]: connection_url option is required.`) + } + if (!options.db_name) { + throw new Error(`[MONGO MDOULE]: db_name option is required.`) + } + const logger = container.resolve("logger") + + try { + const clientDb = ( + await (new MongoClient(options.connection_url)).connect() + ).db(options.db_name) + + logger.info("Connected to MongoDB") + + container.register( + "mongoClient", + asValue(clientDb) + ) + } catch (e) { + logger.error( + `[MONGO MDOULE]: An error occurred while connecting to MongoDB: ${e}` + ) + } +} +``` + +The loader function accepts in its object parameter an `options` property, which is the options passed to the module in Medusa's configurations. For example: + +```ts title="medusa-config.ts" highlights={optionHighlights} +module.exports = defineConfig({ + // ... + modules: [ + { + resolve: "./src/modules/mongo", + options: { + connection_url: process.env.MONGO_CONNECTION_URL, + db_name: process.env.MONGO_DB_NAME, + }, + }, + ], +}) +``` + +Passing options is useful when your module needs informations like connection URLs or API keys, as it ensures your module can be re-usable across applications. For the MongoDB Module, you expect two options: + +- `connection_url`: the URL to connect to the MongoDB database. +- `db_name`: The name of the database to connect to. + +In the loader, you check first that these options are set before proceeding. Then, you create an instance of the MongoDB client and connect to the database specified in the options. + +After creating the client, you register it in the module's container using the container's `register` method. The method accepts two parameters: + +1. The key to register the resource under, which in this case is `mongoClient`. You'll use this name later to resolve the client. +2. The resource to register in the container, which is the MongoDB client you created. However, you don't pass the resource as-is. Instead, you need to use an `asValue` function imported from the [awilix package](https://github.com/jeffijoe/awilix), which is the package used to implement the container functionality in Medusa. + +### Use Custom Registered Resource in Module's Service + +After registering the custom MongoDB client in the module's container, you can now resolve and use it in the module's service. + +For example: + +```ts title="src/modules/mongo/service.ts" +import type { Db } from "mongodb" + +type InjectedDependencies = { + mongoClient: Db +} + +export default class MongoModuleService { + private mongoClient_: Db + + constructor({ mongoClient }: InjectedDependencies) { + this.mongoClient_ = mongoClient + } + + async createMovie({ title }: { + title: string + }) { + const moviesCol = this.mongoClient_.collection("movie") + + const insertedMovie = await moviesCol.insertOne({ + title, + }) + + const movie = await moviesCol.findOne({ + _id: insertedMovie.insertedId, + }) + + return movie + } + + async deleteMovie(id: string) { + const moviesCol = this.mongoClient_.collection("movie") + + await moviesCol.deleteOne({ + _id: { + equals: id, + }, + }) + } +} +``` + +The service `MongoModuleService` resolves the `mongoClient` resource you registered in the loader and sets it as a class property. You then use it in the `createMovie` and `deleteMovie` methods, which create and delete a document in a `movie` collection in the MongoDB database, respectively. + +Make sure to export the loader in the module's definition in the `index.ts` file at the root directory of the module: + +```ts title="src/modules/mongo/index.ts" highlights={[["9"]]} +import { Module } from "@medusajs/framework/utils" +import MongoModuleService from "./service" +import mongoConnectionLoader from "./loaders/connection" + +export const MONGO_MODULE = "mongo" + +export default Module(MONGO_MODULE, { + service: MongoModuleService, + loaders: [mongoConnectionLoader], +}) +``` + +### Test it Out + +You can test the connection out by starting the Medusa application. If it's successful, you'll see the following message logged in the terminal: + +```bash +info: Connected to MongoDB +``` + +You can now resolve the MongoDB Module's main service in your customizations to perform operations on the MongoDB database. + + +# Modules Directory Structure + +In this document, you'll learn about the expected files and directories in your module. + +![Module Directory Structure Example](https://res.cloudinary.com/dza7lstvk/image/upload/v1714379976/Medusa%20Book/modules-dir-overview_nqq7ne.jpg) + +## index.ts + +The `index.ts` file in the root of your module's directory is the only required file. It must export the module's definition as explained in a [previous chapter](https://docs.medusajs.com/learn/fundamentals/modules/index.html.md). + +*** + +## service.ts + +A module must have a main service. It's created in the `service.ts` file at the root of your module directory as explained in a [previous chapter](https://docs.medusajs.com/learn/fundamentals/modules/index.html.md). + +*** + +## Other Directories + +The following directories are optional and their content are explained more in the following chapters: + +- `models`: Holds the data models representing tables in the database. +- `migrations`: Holds the migration files used to reflect changes on the database. +- `loaders`: Holds the scripts to run on the Medusa application's start-up. + + +# Multiple Services in a Module + +In this chapter, you'll learn how to use multiple services in a module. + +## Module's Main and Internal Services + +A module has one main service only, which is the service exported in the module's definition. + +However, you may use other services in your module to better organize your code or split functionalities. These are called internal services that can be resolved within your module, but not in external resources. + +*** + +## How to Add an Internal Service + +### 1. Create Service + +To add an internal service, create it in the `services` directory of your module. + +For example, create the file `src/modules/blog/services/client.ts` with the following content: + +```ts title="src/modules/blog/services/client.ts" +export class ClientService { + async getMessage(): Promise { + return "Hello, World!" + } +} +``` + +### 2. Export Service in Index + +Next, create an `index.ts` file under the `services` directory of the module that exports your internal services. + +For example, create the file `src/modules/blog/services/index.ts` with the following content: + +```ts title="src/modules/blog/services/index.ts" +export * from "./client" +``` + +This exports the `ClientService`. + +### 3. Resolve Internal Service + +Internal services exported in the `services/index.ts` file of your module are now registered in the container and can be resolved in other services in the module as well as loaders. + +For example, in your main service: + +```ts title="src/modules/blog/service.ts" highlights={[["5"], ["13"]]} +// other imports... +import { ClientService } from "./services" + +type InjectedDependencies = { + clientService: ClientService +} + +class BlogModuleService extends MedusaService({ + Post, +}){ + protected clientService_: ClientService + + constructor({ clientService }: InjectedDependencies) { + super(...arguments) + this.clientService_ = clientService + } +} +``` + +You can now use your internal service in your main service. + +*** + +## Resolve Resources in Internal Service + +Resolve dependencies from your module's container in the constructor of your internal service. + +For example: + +```ts +import { Logger } from "@medusajs/framework/types" + +type InjectedDependencies = { + logger: Logger +} + +export class ClientService { + protected logger_: Logger + + constructor({ logger }: InjectedDependencies) { + this.logger_ = logger + } +} +``` + +*** + +## Access Module Options + +Your internal service can't access the module's options. + +To retrieve the module's options, use the `configModule` registered in the module's container, which is the configurations in `medusa-config.ts`. + +For example: + +```ts +import { ConfigModule } from "@medusajs/framework/types" +import { BLOG_MODULE } from ".." + +export type InjectedDependencies = { + configModule: ConfigModule +} + +export class ClientService { + protected options: Record + + constructor({ configModule }: InjectedDependencies) { + const moduleDef = configModule.modules[BLOG_MODULE] + + if (typeof moduleDef !== "boolean") { + this.options = moduleDef.options + } + } +} +``` + +The `configModule` has a `modules` property that includes all registered modules. Retrieve the module's configuration using its registration key. + +If its value is not a `boolean`, set the service's options to the module configuration's `options` property. + + +# Service Constraints + +This chapter lists constraints to keep in mind when creating a service. + +## Use Async Methods + +Medusa wraps service method executions to inject useful context or transactions. However, since Medusa can't detect whether the method is asynchronous, it always executes methods in the wrapper with the `await` keyword. + +For example, if you have a synchronous `getMessage` method, and you use it in other resources like workflows, Medusa executes it as an async method: + +```ts +await blogModuleService.getMessage() +``` + +So, make sure your service's methods are always async to avoid unexpected errors or behavior. + +```ts highlights={[["8", "", "Method must be async."], ["13", "async", "Correct way of defining the method."]]} +import { MedusaService } from "@medusajs/framework/utils" +import Post from "./models/post" + +class BlogModuleService extends MedusaService({ + Post, +}){ + // Don't + getMessage(): string { + return "Hello, World!" + } + + // Do + async getMessage(): Promise { + return "Hello, World!" + } +} + +export default BlogModuleService +``` + + +# Module Options + +In this chapter, you’ll learn about passing options to your module from the Medusa application’s configurations and using them in the module’s resources. + +## What are Module Options? + +A module can receive options to customize or configure its functionality. For example, if you’re creating a module that integrates a third-party service, you’ll want to receive the integration credentials in the options rather than adding them directly in your code. + +*** + +## How to Pass Options to a Module? + +To pass options to a module, add an `options` property to the module’s configuration in `medusa-config.ts`. + +For example: + +```ts title="medusa-config.ts" +module.exports = defineConfig({ + // ... + modules: [ + { + resolve: "./src/modules/blog", + options: { + capitalize: true, + }, + }, + ], +}) +``` + +The `options` property’s value is an object. You can pass any properties you want. + +### Pass Options to a Module in a Plugin + +If your module is part of a plugin, you can pass options to the module in the plugin’s configuration. + +For example: + +```ts title="medusa-config.ts" +import { defineConfig } from "@medusajs/framework/utils" +module.exports = defineConfig({ + plugins: [ + { + resolve: "@myorg/plugin-name", + options: { + capitalize: true, + }, + }, + ], +}) +``` + +The `options` property in the plugin configuration is passed to all modules in a plugin. + +*** + +## Access Module Options in Main Service + +The module’s main service receives the module options as a second parameter. + +For example: + +```ts title="src/modules/blog/service.ts" highlights={[["12"], ["14", "options?: ModuleOptions"], ["17"], ["18"], ["19"]]} +import { MedusaService } from "@medusajs/framework/utils" +import Post from "./models/post" + +// recommended to define type in another file +type ModuleOptions = { + capitalize?: boolean +} + +export default class BlogModuleService extends MedusaService({ + Post, +}){ + protected options_: ModuleOptions + + constructor({}, options?: ModuleOptions) { + super(...arguments) + + this.options_ = options || { + capitalize: false, + } + } + + // ... +} +``` + +*** + +## Access Module Options in Loader + +The object that a module’s loaders receive as a parameter has an `options` property holding the module's options. + +For example: + +```ts title="src/modules/blog/loaders/hello-world.ts" highlights={[["11"], ["12", "ModuleOptions", "The type of expected module options."], ["16"]]} +import { + LoaderOptions, +} from "@medusajs/framework/types" + +// recommended to define type in another file +type ModuleOptions = { + capitalize?: boolean +} + +export default async function helloWorldLoader({ + options, +}: LoaderOptions) { + + console.log( + "[BLOG MODULE] Just started the Medusa application!", + options + ) +} +``` + +*** + +## Validate Module Options + +If you expect a certain option and want to throw an error if it's not provided or isn't valid, it's recommended to perform the validation in a loader. The module's service is only instantiated when it's used, whereas the loader runs the when the Medusa application starts. + +So, by performing the validation in the loader, you ensure you can throw an error at an early point, rather than when the module is used. + +For example, to validate that the Hello Module received an `apiKey` option, create the loader `src/modules/loaders/validate.ts`: + +```ts title="src/modules/blog/loaders/validate.ts" +import { LoaderOptions } from "@medusajs/framework/types" +import { MedusaError } from "@medusajs/framework/utils" + +// recommended to define type in another file +type ModuleOptions = { + apiKey?: string +} + +export default async function validationLoader({ + options, +}: LoaderOptions) { + if (!options.apiKey) { + throw new MedusaError( + MedusaError.Types.INVALID_DATA, + "Hello Module requires an apiKey option." + ) + } +} +``` + +Then, export the loader in the module's definition file, as explained in [this chapter](https://docs.medusajs.com/learn/fundamentals/modules/loaders/index.html.md): + +```ts title="src/modules/blog/index.ts" +// other imports... +import validationLoader from "./loaders/validate" + +export const BLOG_MODULE = "blog" + +export default Module(BLOG_MODULE, { + // ... + loaders: [validationLoader], +}) +``` + +Now, when the Medusa application starts, the loader will run, validating the module's options and throwing an error if the `apiKey` option is missing. + + +# Translate Medusa Admin + +The Medusa Admin supports multiple languages, with the default being English. In this documentation, you'll learn how to contribute to the community by translating the Medusa Admin to a language you're fluent in. + +{/* vale docs.We = NO */} + +You can contribute either by translating the admin to a new language, or fixing translations for existing languages. As we can't validate every language's translations, some translations may be incorrect. Your contribution is welcome to fix any translation errors you find. + +{/* vale docs.We = YES */} + +Check out the translated languages either in the admin dashboard's settings or on [GitHub](https://github.com/medusajs/medusa/blob/develop/packages/admin/dashboard/src/i18n/languages.ts). + +*** + +## How to Contribute Translation + +1. Clone the [Medusa monorepository](https://github.com/medusajs/medusa) to your local machine: + +```bash +git clone https://github.com/medusajs/medusa.git +``` + +If you already have it cloned, make sure to pull the latest changes from the `develop` branch. + +2. Install the monorepository's dependencies. Since it's a Yarn workspace, it's highly recommended to use yarn: + +```bash +yarn install +``` + +3. Create a branch that you'll use to open the pull request later: + +```bash +git checkout -b feat/translate- +``` + +Where `` is your language name. For example, `feat/translate-da`. + +4. Translation files are under `packages/admin/dashboard/src/i18n/translations` as JSON files whose names are the ISO-2 name of the language. + - If you're adding a new language, copy the file `packages/admin/dashboard/src/i18n/translations/en.json` and paste it with the ISO-2 name for your language. For example, if you're adding Danish translations, copy the `en.json` file and paste it as `packages/admin/dashboard/src/i18n/translations/de.json`. + - If you're fixing a translation, find the JSON file of the language under `packages/admin/dashboard/src/i18n/translations`. + +5. Start translating the keys in the JSON file (or updating the targeted ones). All keys in the JSON file must be translated, and your PR tests will fail otherwise. + - You can check whether the JSON file is valid by running the following command in `packages/admin/dashboard`, replacing `da.json` with the JSON file's name: + +```bash title="packages/admin/dashboard" +yarn i18n:validate da.json +``` + +6. After finishing the translation, if you're adding a new language, import its JSON file in `packages/admin/dashboard/src/i18n/translations/index.ts` and add it to the exported object: + +```ts title="packages/admin/dashboard/src/i18n/translations/index.ts" highlights={[["2"], ["6"], ["7"], ["8"]]} +// other imports... +import da from "./da.json" + +export default { + // other languages... + da: { + translation: da, + }, +} +``` + +The language's key in the object is the ISO-2 name of the language. + +7. If you're adding a new language, add it to the file `packages/admin/dashboard/src/i18n/languages.ts`: + +```ts title="packages/admin/dashboard/src/i18n/languages.ts" highlights={languageHighlights} +import { da } from "date-fns/locale" +// other imports... + +export const languages: Language[] = [ + // other languages... + { + code: "da", + display_name: "Danish", + ltr: true, + date_locale: da, + }, +] +``` + +`languages` is an array having the following properties: + +- `code`: The ISO-2 name of the language. For example, `da` for Danish. +- `display_name`: The language's name to be displayed in the admin. +- `ltr`: Whether the language supports a left-to-right layout. For example, set this to `false` for languages like Arabic. +- `date_locale`: An instance of the locale imported from the [date-fns/locale](https://date-fns.org/) package. + +8. Once you're done, push the changes into your branch and open a pull request on GitHub. + +Our team will perform a general review on your PR and merge it if no issues are found. The translation will be available in the admin after the next release. + + +# Service Factory + +In this chapter, you’ll learn about what the service factory is and how to use it. + +## What is the Service Factory? + +Medusa provides a service factory that your module’s main service can extend. + +The service factory generates data management methods for your data models in the database, so you don't have to implement these methods manually. + +Your service provides data-management functionalities of your data models. + +*** + +## How to Extend the Service Factory? + +Medusa provides the service factory as a `MedusaService` function your service extends. The function creates and returns a service class with generated data-management methods. + +For example, create the file `src/modules/blog/service.ts` with the following content: + +```ts title="src/modules/blog/service.ts" highlights={highlights} +import { MedusaService } from "@medusajs/framework/utils" +import Post from "./models/post" + +class BlogModuleService extends MedusaService({ + Post, +}){ + // TODO implement custom methods +} + +export default BlogModuleService +``` + +### MedusaService Parameters + +The `MedusaService` function accepts one parameter, which is an object of data models to generate data-management methods for. + +In the example above, since the `BlogModuleService` extends `MedusaService`, it has methods to manage the `Post` data model, such as `createPosts`. + +### Generated Methods + +The service factory generates methods to manage the records of each of the data models provided in the first parameter in the database. + +The method's names are the operation's name, suffixed by the data model's key in the object parameter passed to `MedusaService`. + +For example, the following methods are generated for the service above: + +Find a complete reference of each of the methods in [this documentation](https://docs.medusajs.com/resources/service-factory-reference/index.html.md) + +### listPosts + +### listPosts + +This method retrieves an array of records based on filters and pagination configurations. + +For example: + +```ts +const posts = await blogModuleService + .listPosts() + +// with filters +const posts = await blogModuleService + .listPosts({ + id: ["123"] + }) +``` + +### listAndCountPosts + +### retrievePost + +This method retrieves a record by its ID. + +For example: + +```ts +const post = await blogModuleService + .retrievePost("123") +``` + +### retrievePost + +### updatePosts + +This method updates and retrieves records of the data model. + +For example: + +```ts +const post = await blogModuleService + .updatePosts({ + id: "123", + title: "test" + }) + +// update multiple +const posts = await blogModuleService + .updatePosts([ + { + id: "123", + title: "test" + }, + { + id: "321", + title: "test 2" + }, + ]) + +// use filters +const posts = await blogModuleService + .updatePosts([ + { + selector: { + id: ["123", "321"] + }, + data: { + title: "test" + } + }, + ]) +``` + +### createPosts + +### softDeletePosts + +This method soft-deletes records using an array of IDs or an object of filters. + +For example: + +```ts +await blogModuleService.softDeletePosts("123") + +// soft-delete multiple +await blogModuleService.softDeletePosts([ + "123", "321" +]) + +// use filters +await blogModuleService.softDeletePosts({ + id: ["123", "321"] +}) +``` + +### updatePosts + +### deletePosts + +### softDeletePosts + +### restorePosts + +### Using a Constructor + +If you implement the `constructor` of your service, make sure to call `super` passing it `...arguments`. + +For example: + +```ts highlights={[["8"]]} +import { MedusaService } from "@medusajs/framework/utils" +import Post from "./models/post" + +class BlogModuleService extends MedusaService({ + Post, +}){ + constructor() { + super(...arguments) + } +} + +export default BlogModuleService +``` + + +# Docs Contribution Guidelines + +Thank you for your interest in contributing to the documentation! You will be helping the open source community and other developers interested in learning more about Medusa and using it. + +This guide is specific to contributing to the documentation. If you’re interested in contributing to Medusa’s codebase, check out the [contributing guidelines in the Medusa GitHub repository](https://github.com/medusajs/medusa/blob/develop/CONTRIBUTING.md). + +## What Can You Contribute? + +You can contribute to the Medusa documentation in the following ways: + +- Fixes to existing content. This includes small fixes like typos, or adding missing information. +- Additions to the documentation. If you think a documentation page can be useful to other developers, you can contribute by adding it. + - Make sure to open an issue first in the [medusa repository](https://github.com/medusajs/medusa) to confirm that you can add that documentation page. +- Fixes to UI components and tooling. If you find a bug while browsing the documentation, you can contribute by fixing it. + +*** + +## Documentation Workspace + +Medusa's documentation projects are all part of the documentation yarn workspace, which you can find in the [medusa repository](https://github.com/medusajs/medusa) under the `www` directory. + +The workspace has the following two directories: + +- `apps`: this directory holds the different documentation websites and projects. + - `book`: includes the codebase for the [main Medusa documentation](https://docs.medusajs.com//index.html.md). It's built with [Next.js 15](https://nextjs.org/). + - `resources`: includes the codebase for the resources documentation, which powers different sections of the docs such as the [Integrations](https://docs.medusajs.com/resources/integrations/index.html.md) or [How-to & Tutorials](https://docs.medusajs.com/resources/how-to-tutorials/index.html.md) sections. It's built with [Next.js 15](https://nextjs.org/). + - `api-reference`: includes the codebase for the API reference website. It's built with [Next.js 15](https://nextjs.org/). + - `ui`: includes the codebase for the Medusa UI documentation website. It's built with [Next.js 15](https://nextjs.org/). +- `packages`: this directory holds the shared packages and components necessary for the development of the projects in the `apps` directory. + - `docs-ui` includes the shared React components between the different apps. + - `remark-rehype-plugins` includes Remark and Rehype plugins used by the documentation projects. + +*** + +## Documentation Content + +All documentation projects are built with Next.js. The content is writtin in MDX files. + +### Medusa Main Docs Content + +The content of the Medusa main docs are under the `www/apps/book/app` directory. + +### Medusa Resources Content + +The content of all pages under the `/resources` path are under the `www/apps/resources/app` directory. + +Documentation pages under the `www/apps/resources/references` directory are generated automatically from the source code under the `packages/medusa` directory. So, you can't directly make changes to them. Instead, you'll have to make changes to the comments in the original source code. + +### API Reference + +The API reference's content is split into two types: + +1. Static content, which are the content related to getting started, expanding fields, and more. These are located in the `www/apps/api-reference/markdown` directory. They are MDX files. +2. OpenAPI specs that are shown to developers when checking the reference of an API Route. These are generated from OpenApi Spec comments, which are under the `www/utils/generated/oas-output` directory. + +### Medusa UI Documentation + +The content of the Medusa UI documentation are located under the `www/apps/ui/src/content/docs` directory. They are MDX files. + +The UI documentation also shows code examples, which are under the `www/apps/ui/src/examples` directory. + +The UI component props are generated from the source code and placed into the `www/apps/ui/src/specs` directory. To contribute to these props and their comments, check the comments in the source code under the `packages/design-system/ui` directory. + +*** + +## Style Guide + +When you contribute to the documentation content, make sure to follow the [documentation style guide](https://www.notion.so/Style-Guide-Docs-fad86dd1c5f84b48b145e959f36628e0). + +*** + +## How to Contribute + +If you’re fixing errors in an existing documentation page, you can scroll down to the end of the page and click on the “Edit this page” link. You’ll be redirected to the GitHub edit form of that page and you can make edits directly and submit a pull request (PR). + +If you’re adding a new page or contributing to the codebase, fork the repository, create a new branch, and make all changes necessary in your repository. Then, once you’re done, create a PR in the Medusa repository. + +### Base Branch + +When you make an edit to an existing documentation page or fork the repository to make changes to the documentation, create a new branch. + +Documentation contributions always use `develop` as the base branch. Make sure to also open your PR against the `develop` branch. + +### Branch Name + +Make sure that the branch name starts with `docs/`. For example, `docs/fix-services`. Vercel deployed previews are only triggered for branches starting with `docs/`. + +### Pull Request Conventions + +When you create a pull request, prefix the title with `docs:` or `docs(PROJECT_NAME):`, where `PROJECT_NAME` is the name of the documentation project this pull request pertains to. For example, `docs(ui): fix titles`. + +In the body of the PR, explain clearly what the PR does. If the PR solves an issue, use [closing keywords](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword) with the issue number. For example, “Closes #1333”. + +*** + +## Images + +If you are adding images to a documentation page, you can host the image on [Imgur](https://imgur.com) for free to include it in the PR. Our team will later upload it to our image hosting. + +*** + +## NPM and Yarn Code Blocks + +If you’re adding code blocks that use NPM and Yarn, you must add the `npm2yarn` meta field. + +For example: + +````md +```bash npm2yarn +npm run start +``` +```` + +The code snippet must be written using NPM. + +### Global Option + +When a command uses the global option `-g`, add it at the end of the NPM command to ensure that it’s transformed to a Yarn command properly. For example: + +```bash npm2yarn +npm install @medusajs/cli -g +``` + +*** + +## Linting with Vale + +Medusa uses [Vale](https://vale.sh/) to lint documentation pages and perform checks on incoming PRs into the repository. + +### Result of Vale PR Checks + +You can check the result of running the "lint" action on your PR by clicking the Details link next to it. You can find there all errors that you need to fix. + +### Run Vale Locally + +If you want to check your work locally, you can do that by: + +1. [Installing Vale](https://vale.sh/docs/vale-cli/installation/) on your machine. +2. Changing to the `www/vale` directory: + +```bash +cd www/vale +``` + +3\. Running the `run-vale` script: + +```bash +# to lint content for the main documentation +./run-vale.sh book/app/learn error resources +# to lint content for the resources documentation +./run-vale.sh resources/app error +# to lint content for the API reference +./run-vale.sh api-reference/markdown error +# to lint content for the Medusa UI documentation +./run-vale.sh ui/src/content/docs error +# to lint content for the user guide +./run-vale.sh user-guide/app error +``` + +{/* TODO need to enable MDX v1 comments first. */} + +{/* ### Linter Exceptions + +If it's needed to break some style guide rules in a document, you can wrap the parts that the linter shouldn't scan with the following comments in the `md` or `mdx` files: + +```md + + +content that shouldn't be scanned for errors here... + + +``` + +You can also disable specific rules. For example: + +```md + + +Medusa supports Node versions 14 and 16. + + +``` + +If you use this in your PR, you must justify its usage. */} + +*** + +## Linting with ESLint + +Medusa uses ESlint to lint code blocks both in the content and the code base of the documentation apps. + +### Linting Content with ESLint + +Each PR runs through a check that lints the code in the content files using ESLint. The action's name is `content-eslint`. + +If you want to check content ESLint errors locally and fix them, you can do that by: + +1\. Install the dependencies in the `www` directory: + +```bash +yarn install +``` + +2\. Run the turbo command in the `www` directory: + +```bash +turbo run lint:content +``` + +This will fix any fixable errors, and show errors that require your action. + +### Linting Code with ESLint + +Each PR runs through a check that lints the code in the content files using ESLint. The action's name is `code-docs-eslint`. + +If you want to check code ESLint errors locally and fix them, you can do that by: + +1\. Install the dependencies in the `www` directory: + +```bash +yarn install +``` + +2\. Run the turbo command in the `www` directory: + +```bash +yarn lint +``` + +This will fix any fixable errors, and show errors that require your action. + +{/* TODO need to enable MDX v1 comments first. */} + +{/* ### ESLint Exceptions + +If some code blocks have errors that can't or shouldn't be fixed, you can add the following command before the code block: + +~~~md + + +```js +console.log("This block isn't linted") +``` + +```js +console.log("This block is linted") +``` +~~~ + +You can also disable specific rules. For example: + +~~~md + + +```js +console.log("This block can use semicolons"); +``` + +```js +console.log("This block can't use semi colons") +``` +~~~ */} + + +# Example: Write Integration Tests for Workflows + +In this chapter, you'll learn how to write integration tests for workflows using [medusaIntegrationTestRunner](https://docs.medusajs.com/learn/debugging-and-testing/testing-tools/integration-tests/index.html.md) from Medusa's Testing Framwork. + +### Prerequisites + +- [Testing Tools Setup](https://docs.medusajs.com/learn/debugging-and-testing/testing-tools/index.html.md) + +## Write Integration Test for Workflow + +Consider you have the following workflow defined at `src/workflows/hello-world.ts`: + +```ts title="src/workflows/hello-world.ts" +import { + createWorkflow, + createStep, + StepResponse, + WorkflowResponse, +} from "@medusajs/framework/workflows-sdk" + +const step1 = createStep("step-1", () => { + return new StepResponse("Hello, World!") +}) + +export const helloWorldWorkflow = createWorkflow( + "hello-world-workflow", + () => { + const message = step1() + + return new WorkflowResponse(message) + } +) +``` + +To write a test for this workflow, create the file `integration-tests/http/workflow.spec.ts` with the following content: + +```ts title="integration-tests/http/workflow.spec.ts" +import { medusaIntegrationTestRunner } from "@medusajs/test-utils" +import { helloWorldWorkflow } from "../../src/workflows/hello-world" + +medusaIntegrationTestRunner({ + testSuite: ({ getContainer }) => { + describe("Test hello-world workflow", () => { + it("returns message", async () => { + const { result } = await helloWorldWorkflow(getContainer()) + .run() + + expect(result).toEqual("Hello, World!") + }) + }) + }, +}) + +jest.setTimeout(60 * 1000) +``` + +You use the `medusaIntegrationTestRunner` to write an integration test for the workflow. The test pases if the workflow returns the string `"Hello, World!"`. + +### Jest Timeout + +Since your tests connect to the database and perform actions that require more time than the typical tests, make sure to increase the timeout in your test: + +```ts title="integration-tests/http/custom-routes.spec.ts" +// in your test's file +jest.setTimeout(60 * 1000) +``` + +*** + +## Run Test + +Run the following command to run your tests: + +```bash npm2yarn +npm run test:integration +``` + +If you don't have a `test:integration` script in `package.json`, refer to the [Medusa Testing Tools chapter](https://docs.medusajs.com/learn/debugging-and-testing/testing-tools#add-test-commands/index.html.md). + +This runs your Medusa application and runs the tests available under the `integrations/http` directory. + +*** + +## Test That a Workflow Throws an Error + +You might want to test that a workflow throws an error in certain cases. To test this: + +- Disable the `throwOnError` option when executing the workflow. +- Use the returned `errors` property to check what errors were thrown. + +For example, if you have a step that throws this error: + +```ts title="src/workflows/hello-world.ts" +import { MedusaError } from "@medusajs/framework/utils" +import { createStep } from "@medusajs/framework/workflows-sdk" + +const step1 = createStep("step-1", () => { + throw new MedusaError(MedusaError.Types.NOT_FOUND, "Item doesn't exist") +}) +``` + +You can write the following test to ensure that the workflow throws that error: + +```ts title="integration-tests/http/workflow.spec.ts" +import { medusaIntegrationTestRunner } from "@medusajs/test-utils" +import { helloWorldWorkflow } from "../../src/workflows/hello-world" + +medusaIntegrationTestRunner({ + testSuite: ({ getContainer }) => { + describe("Test hello-world workflow", () => { + it("returns message", async () => { + const { errors } = await helloWorldWorkflow(getContainer()) + .run({ + throwOnError: false, + }) + + expect(errors.length).toBeGreaterThan(0) + expect(errors[0].error.message).toBe("Item doesn't exist") + }) + }) + }, +}) + +jest.setTimeout(60 * 1000) +``` + +The `errors` property contains an array of errors thrown during the execution of the workflow. Each error item has an `error` object, being the error thrown. + +If you threw a `MedusaError`, then you can check the error message in `errors[0].error.message`. + + +# Example: Integration Tests for a Module + +In this chapter, find an example of writing an integration test for a module using [moduleIntegrationTestRunner](https://docs.medusajs.com/learn/debugging-and-testing/testing-tools/modules-tests/index.html.md) from Medusa's Testing Framework. + +### Prerequisites + +- [Testing Tools Setup](https://docs.medusajs.com/learn/debugging-and-testing/testing-tools/index.html.md) + +## Write Integration Test for Module + +Consider a `blog` module with a `BlogModuleService` that has a `getMessage` method: + +```ts title="src/modules/blog/service.ts" +import { MedusaService } from "@medusajs/framework/utils" +import MyCustom from "./models/my-custom" + +class BlogModuleService extends MedusaService({ + MyCustom, +}){ + getMessage(): string { + return "Hello, World!" + } +} + +export default BlogModuleService +``` + +To create an integration test for the method, create the file `src/modules/blog/__tests__/service.spec.ts` with the following content: + +```ts title="src/modules/blog/__tests__/service.spec.ts" +import { moduleIntegrationTestRunner } from "@medusajs/test-utils" +import { BLOG_MODULE } from ".." +import BlogModuleService from "../service" +import MyCustom from "../models/my-custom" + +moduleIntegrationTestRunner({ + moduleName: BLOG_MODULE, + moduleModels: [MyCustom], + resolve: "./src/modules/blog", + testSuite: ({ service }) => { + describe("BlogModuleService", () => { + it("says hello world", () => { + const message = service.getMessage() + + expect(message).toEqual("Hello, World!") + }) + }) + }, +}) + +jest.setTimeout(60 * 1000) +``` + +You use the `moduleIntegrationTestRunner` function to add tests for the `blog` module. You have one test that passes if the `getMessage` method returns the `"Hello, World!"` string. + +*** + +## Run Test + +Run the following command to run your module integration tests: + +```bash npm2yarn +npm run test:integration:modules +``` + +If you don't have a `test:integration:modules` script in `package.json`, refer to the [Medusa Testing Tools chapter](https://docs.medusajs.com/learn/debugging-and-testing/testing-tools#add-test-commands/index.html.md). + +This runs your Medusa application and runs the tests available in any `__tests__` directory under the `src/modules` directory. + + # Example: Write Integration Tests for API Routes In this chapter, you'll learn how to write integration tests for API routes using [medusaIntegrationTestRunner](https://docs.medusajs.com/learn/debugging-and-testing/testing-tools/integration-tests/index.html.md) from Medusa's Testing Framework. @@ -17933,207 +18134,6 @@ const response = await api.post(`/custom`, form, { ``` -# Example: Write Integration Tests for Workflows - -In this chapter, you'll learn how to write integration tests for workflows using [medusaIntegrationTestRunner](https://docs.medusajs.com/learn/debugging-and-testing/testing-tools/integration-tests/index.html.md) from Medusa's Testing Framwork. - -### Prerequisites - -- [Testing Tools Setup](https://docs.medusajs.com/learn/debugging-and-testing/testing-tools/index.html.md) - -## Write Integration Test for Workflow - -Consider you have the following workflow defined at `src/workflows/hello-world.ts`: - -```ts title="src/workflows/hello-world.ts" -import { - createWorkflow, - createStep, - StepResponse, - WorkflowResponse, -} from "@medusajs/framework/workflows-sdk" - -const step1 = createStep("step-1", () => { - return new StepResponse("Hello, World!") -}) - -export const helloWorldWorkflow = createWorkflow( - "hello-world-workflow", - () => { - const message = step1() - - return new WorkflowResponse(message) - } -) -``` - -To write a test for this workflow, create the file `integration-tests/http/workflow.spec.ts` with the following content: - -```ts title="integration-tests/http/workflow.spec.ts" -import { medusaIntegrationTestRunner } from "@medusajs/test-utils" -import { helloWorldWorkflow } from "../../src/workflows/hello-world" - -medusaIntegrationTestRunner({ - testSuite: ({ getContainer }) => { - describe("Test hello-world workflow", () => { - it("returns message", async () => { - const { result } = await helloWorldWorkflow(getContainer()) - .run() - - expect(result).toEqual("Hello, World!") - }) - }) - }, -}) - -jest.setTimeout(60 * 1000) -``` - -You use the `medusaIntegrationTestRunner` to write an integration test for the workflow. The test pases if the workflow returns the string `"Hello, World!"`. - -### Jest Timeout - -Since your tests connect to the database and perform actions that require more time than the typical tests, make sure to increase the timeout in your test: - -```ts title="integration-tests/http/custom-routes.spec.ts" -// in your test's file -jest.setTimeout(60 * 1000) -``` - -*** - -## Run Test - -Run the following command to run your tests: - -```bash npm2yarn -npm run test:integration -``` - -If you don't have a `test:integration` script in `package.json`, refer to the [Medusa Testing Tools chapter](https://docs.medusajs.com/learn/debugging-and-testing/testing-tools#add-test-commands/index.html.md). - -This runs your Medusa application and runs the tests available under the `integrations/http` directory. - -*** - -## Test That a Workflow Throws an Error - -You might want to test that a workflow throws an error in certain cases. To test this: - -- Disable the `throwOnError` option when executing the workflow. -- Use the returned `errors` property to check what errors were thrown. - -For example, if you have a step that throws this error: - -```ts title="src/workflows/hello-world.ts" -import { MedusaError } from "@medusajs/framework/utils" -import { createStep } from "@medusajs/framework/workflows-sdk" - -const step1 = createStep("step-1", () => { - throw new MedusaError(MedusaError.Types.NOT_FOUND, "Item doesn't exist") -}) -``` - -You can write the following test to ensure that the workflow throws that error: - -```ts title="integration-tests/http/workflow.spec.ts" -import { medusaIntegrationTestRunner } from "@medusajs/test-utils" -import { helloWorldWorkflow } from "../../src/workflows/hello-world" - -medusaIntegrationTestRunner({ - testSuite: ({ getContainer }) => { - describe("Test hello-world workflow", () => { - it("returns message", async () => { - const { errors } = await helloWorldWorkflow(getContainer()) - .run({ - throwOnError: false, - }) - - expect(errors.length).toBeGreaterThan(0) - expect(errors[0].error.message).toBe("Item doesn't exist") - }) - }) - }, -}) - -jest.setTimeout(60 * 1000) -``` - -The `errors` property contains an array of errors thrown during the execution of the workflow. Each error item has an `error` object, being the error thrown. - -If you threw a `MedusaError`, then you can check the error message in `errors[0].error.message`. - - -# Example: Integration Tests for a Module - -In this chapter, find an example of writing an integration test for a module using [moduleIntegrationTestRunner](https://docs.medusajs.com/learn/debugging-and-testing/testing-tools/modules-tests/index.html.md) from Medusa's Testing Framework. - -### Prerequisites - -- [Testing Tools Setup](https://docs.medusajs.com/learn/debugging-and-testing/testing-tools/index.html.md) - -## Write Integration Test for Module - -Consider a `blog` module with a `BlogModuleService` that has a `getMessage` method: - -```ts title="src/modules/blog/service.ts" -import { MedusaService } from "@medusajs/framework/utils" -import MyCustom from "./models/my-custom" - -class BlogModuleService extends MedusaService({ - MyCustom, -}){ - getMessage(): string { - return "Hello, World!" - } -} - -export default BlogModuleService -``` - -To create an integration test for the method, create the file `src/modules/blog/__tests__/service.spec.ts` with the following content: - -```ts title="src/modules/blog/__tests__/service.spec.ts" -import { moduleIntegrationTestRunner } from "@medusajs/test-utils" -import { BLOG_MODULE } from ".." -import BlogModuleService from "../service" -import MyCustom from "../models/my-custom" - -moduleIntegrationTestRunner({ - moduleName: BLOG_MODULE, - moduleModels: [MyCustom], - resolve: "./src/modules/blog", - testSuite: ({ service }) => { - describe("BlogModuleService", () => { - it("says hello world", () => { - const message = service.getMessage() - - expect(message).toEqual("Hello, World!") - }) - }) - }, -}) - -jest.setTimeout(60 * 1000) -``` - -You use the `moduleIntegrationTestRunner` function to add tests for the `blog` module. You have one test that passes if the `getMessage` method returns the `"Hello, World!"` string. - -*** - -## Run Test - -Run the following command to run your module integration tests: - -```bash npm2yarn -npm run test:integration:modules -``` - -If you don't have a `test:integration:modules` script in `package.json`, refer to the [Medusa Testing Tools chapter](https://docs.medusajs.com/learn/debugging-and-testing/testing-tools#add-test-commands/index.html.md). - -This runs your Medusa application and runs the tests available in any `__tests__` directory under the `src/modules` directory. - - # Commerce Modules In this section of the documentation, you'll find guides and references related to Medusa's Commerce Modules. @@ -18314,6 +18314,156 @@ Learn more about workflows in [this documentation](https://docs.medusajs.com/doc *** +# Cart Module + +In this section of the documentation, you will find resources to learn more about the Cart Module and how to use it in your application. + +Medusa has cart related features available out-of-the-box through the Cart Module. A [module](https://docs.medusajs.com/docs/learn/fundamentals/modules/index.html.md) is a standalone package that provides features for a single domain. Each of Medusa's commerce features are placed in Commerce Modules, such as this Cart Module. + +Learn more about why modules are isolated in [this documentation](https://docs.medusajs.com/docs/learn/fundamentals/modules/isolation/index.html.md). + +## Cart Features + +- [Cart Management](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/cart/concepts/index.html.md): Store and manage carts, including their addresses, line items, shipping methods, and more. +- [Apply Promotion Adjustments](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/cart/promotions/index.html.md): Apply promotions or discounts to line items and shipping methods by adding adjustment lines that are factored into their subtotals. +- [Apply Tax Lines](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/cart/tax-lines/index.html.md): Apply tax lines to line items and shipping methods. +- [Cart Scoping](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/cart/links-to-other-modules/index.html.md): When used in the Medusa application, Medusa creates links to other Commerce Modules, scoping a cart to a sales channel, region, and a customer. + +*** + +## How to Use the Cart Module + +In your Medusa application, you build flows around Commerce Modules. A flow is built as a [Workflow](https://docs.medusajs.com/docs/learn/fundamentals/workflows/index.html.md), which is a special function composed of a series of steps that guarantees data consistency and reliable roll-back mechanism. + +You can build custom workflows and steps. You can also re-use Medusa's workflows and steps, which are provided by the `@medusajs/medusa/core-flows` package. + +For example: + +```ts title="src/workflows/create-cart.ts" highlights={highlights} +import { + createWorkflow, + WorkflowResponse, + createStep, + StepResponse, +} from "@medusajs/framework/workflows-sdk" +import { Modules } from "@medusajs/framework/utils" + +const createCartStep = createStep( + "create-cart", + async ({}, { container }) => { + const cartModuleService = container.resolve(Modules.CART) + + const cart = await cartModuleService.createCarts({ + currency_code: "usd", + shipping_address: { + address_1: "1512 Barataria Blvd", + country_code: "us", + }, + items: [ + { + title: "Shirt", + unit_price: 1000, + quantity: 1, + }, + ], + }) + + return new StepResponse({ cart }, cart.id) + }, + async (cartId, { container }) => { + if (!cartId) { + return + } + const cartModuleService = container.resolve(Modules.CART) + + await cartModuleService.deleteCarts([cartId]) + } +) + +export const createCartWorkflow = createWorkflow( + "create-cart", + () => { + const { cart } = createCartStep() + + return new WorkflowResponse({ + cart, + }) + } +) +``` + +You can then execute the workflow in your custom API routes, scheduled jobs, or subscribers: + +### API Route + +```ts title="src/api/workflow/route.ts" highlights={[["11"], ["12"]]} collapsibleLines="1-6" expandButtonLabel="Show Imports" +import type { + MedusaRequest, + MedusaResponse, +} from "@medusajs/framework/http" +import { createCartWorkflow } from "../../workflows/create-cart" + +export async function GET( + req: MedusaRequest, + res: MedusaResponse +) { + const { result } = await createCartWorkflow(req.scope) + .run() + + res.send(result) +} +``` + +### Subscriber + +```ts title="src/subscribers/user-created.ts" highlights={[["11"], ["12"]]} collapsibleLines="1-6" expandButtonLabel="Show Imports" +import { + type SubscriberConfig, + type SubscriberArgs, +} from "@medusajs/framework" +import { createCartWorkflow } from "../workflows/create-cart" + +export default async function handleUserCreated({ + event: { data }, + container, +}: SubscriberArgs<{ id: string }>) { + const { result } = await createCartWorkflow(container) + .run() + + console.log(result) +} + +export const config: SubscriberConfig = { + event: "user.created", +} +``` + +### Scheduled Job + +```ts title="src/jobs/run-daily.ts" highlights={[["7"], ["8"]]} +import { MedusaContainer } from "@medusajs/framework/types" +import { createCartWorkflow } from "../workflows/create-cart" + +export default async function myCustomJob( + container: MedusaContainer +) { + const { result } = await createCartWorkflow(container) + .run() + + console.log(result) +} + +export const config = { + name: "run-once-a-day", + schedule: `0 0 * * *`, +} +``` + +Learn more about workflows in [this documentation](https://docs.medusajs.com/docs/learn/fundamentals/workflows/index.html.md). + +*** + + # Auth Module In this section of the documentation, you will find resources to learn more about the Auth Module and how to use it in your application. @@ -18585,156 +18735,6 @@ Learn more about workflows in [this documentation](https://docs.medusajs.com/doc *** -# Cart Module - -In this section of the documentation, you will find resources to learn more about the Cart Module and how to use it in your application. - -Medusa has cart related features available out-of-the-box through the Cart Module. A [module](https://docs.medusajs.com/docs/learn/fundamentals/modules/index.html.md) is a standalone package that provides features for a single domain. Each of Medusa's commerce features are placed in Commerce Modules, such as this Cart Module. - -Learn more about why modules are isolated in [this documentation](https://docs.medusajs.com/docs/learn/fundamentals/modules/isolation/index.html.md). - -## Cart Features - -- [Cart Management](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/cart/concepts/index.html.md): Store and manage carts, including their addresses, line items, shipping methods, and more. -- [Apply Promotion Adjustments](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/cart/promotions/index.html.md): Apply promotions or discounts to line items and shipping methods by adding adjustment lines that are factored into their subtotals. -- [Apply Tax Lines](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/cart/tax-lines/index.html.md): Apply tax lines to line items and shipping methods. -- [Cart Scoping](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/cart/links-to-other-modules/index.html.md): When used in the Medusa application, Medusa creates links to other Commerce Modules, scoping a cart to a sales channel, region, and a customer. - -*** - -## How to Use the Cart Module - -In your Medusa application, you build flows around Commerce Modules. A flow is built as a [Workflow](https://docs.medusajs.com/docs/learn/fundamentals/workflows/index.html.md), which is a special function composed of a series of steps that guarantees data consistency and reliable roll-back mechanism. - -You can build custom workflows and steps. You can also re-use Medusa's workflows and steps, which are provided by the `@medusajs/medusa/core-flows` package. - -For example: - -```ts title="src/workflows/create-cart.ts" highlights={highlights} -import { - createWorkflow, - WorkflowResponse, - createStep, - StepResponse, -} from "@medusajs/framework/workflows-sdk" -import { Modules } from "@medusajs/framework/utils" - -const createCartStep = createStep( - "create-cart", - async ({}, { container }) => { - const cartModuleService = container.resolve(Modules.CART) - - const cart = await cartModuleService.createCarts({ - currency_code: "usd", - shipping_address: { - address_1: "1512 Barataria Blvd", - country_code: "us", - }, - items: [ - { - title: "Shirt", - unit_price: 1000, - quantity: 1, - }, - ], - }) - - return new StepResponse({ cart }, cart.id) - }, - async (cartId, { container }) => { - if (!cartId) { - return - } - const cartModuleService = container.resolve(Modules.CART) - - await cartModuleService.deleteCarts([cartId]) - } -) - -export const createCartWorkflow = createWorkflow( - "create-cart", - () => { - const { cart } = createCartStep() - - return new WorkflowResponse({ - cart, - }) - } -) -``` - -You can then execute the workflow in your custom API routes, scheduled jobs, or subscribers: - -### API Route - -```ts title="src/api/workflow/route.ts" highlights={[["11"], ["12"]]} collapsibleLines="1-6" expandButtonLabel="Show Imports" -import type { - MedusaRequest, - MedusaResponse, -} from "@medusajs/framework/http" -import { createCartWorkflow } from "../../workflows/create-cart" - -export async function GET( - req: MedusaRequest, - res: MedusaResponse -) { - const { result } = await createCartWorkflow(req.scope) - .run() - - res.send(result) -} -``` - -### Subscriber - -```ts title="src/subscribers/user-created.ts" highlights={[["11"], ["12"]]} collapsibleLines="1-6" expandButtonLabel="Show Imports" -import { - type SubscriberConfig, - type SubscriberArgs, -} from "@medusajs/framework" -import { createCartWorkflow } from "../workflows/create-cart" - -export default async function handleUserCreated({ - event: { data }, - container, -}: SubscriberArgs<{ id: string }>) { - const { result } = await createCartWorkflow(container) - .run() - - console.log(result) -} - -export const config: SubscriberConfig = { - event: "user.created", -} -``` - -### Scheduled Job - -```ts title="src/jobs/run-daily.ts" highlights={[["7"], ["8"]]} -import { MedusaContainer } from "@medusajs/framework/types" -import { createCartWorkflow } from "../workflows/create-cart" - -export default async function myCustomJob( - container: MedusaContainer -) { - const { result } = await createCartWorkflow(container) - .run() - - console.log(result) -} - -export const config = { - name: "run-once-a-day", - schedule: `0 0 * * *`, -} -``` - -Learn more about workflows in [this documentation](https://docs.medusajs.com/docs/learn/fundamentals/workflows/index.html.md). - -*** - - # Currency Module In this section of the documentation, you will find resources to learn more about the Currency Module and how to use it in your application. @@ -18883,150 +18883,6 @@ Learn more about workflows in [this documentation](https://docs.medusajs.com/doc *** -# Inventory Module - -In this section of the documentation, you will find resources to learn more about the Inventory Module and how to use it in your application. - -Refer to the [Medusa Admin User Guide](https://docs.medusajs.com/user-guide/inventory/index.html.md) to learn how to manage inventory and related features using the dashboard. - -Medusa has inventory related features available out-of-the-box through the Inventory Module. A [module](https://docs.medusajs.com/docs/learn/fundamentals/modules/index.html.md) is a standalone package that provides features for a single domain. Each of Medusa's commerce features are placed in Commerce Modules, such as this Inventory Module. - -Learn more about why modules are isolated in [this documentation](https://docs.medusajs.com/docs/learn/fundamentals/modules/isolation/index.html.md). - -## Inventory Features - -- [Inventory Items Management](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/inventory/concepts/index.html.md): Store and manage inventory of any stock-kept item, such as product variants. -- [Inventory Across Locations](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/inventory/concepts#inventorylevel/index.html.md): Manage inventory levels across different locations, such as warehouses. -- [Reservation Management](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/inventory/concepts#reservationitem/index.html.md): Reserve quantities of inventory items at specific locations for orders or other purposes. -- [Check Inventory Availability](https://docs.medusajs.com/references/inventory-next/confirmInventory/index.html.md): Check whether an inventory item has the necessary quantity for purchase. -- [Inventory Kits](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/inventory/inventory-kit/index.html.md): Create and manage inventory kits for a single product, allowing you to implement use cases like bundled or multi-part products. - -*** - -## How to Use the Inventory Module - -In your Medusa application, you build flows around Commerce Modules. A flow is built as a [Workflow](https://docs.medusajs.com/docs/learn/fundamentals/workflows/index.html.md), which is a special function composed of a series of steps that guarantees data consistency and reliable roll-back mechanism. - -You can build custom workflows and steps. You can also re-use Medusa's workflows and steps, which are provided by the `@medusajs/medusa/core-flows` package. - -For example: - -```ts title="src/workflows/create-inventory-item.ts" highlights={highlights} -import { - createWorkflow, - WorkflowResponse, - createStep, - StepResponse, -} from "@medusajs/framework/workflows-sdk" -import { Modules } from "@medusajs/framework/utils" - -const createInventoryItemStep = createStep( - "create-inventory-item", - async ({}, { container }) => { - const inventoryModuleService = container.resolve(Modules.INVENTORY) - - const inventoryItem = await inventoryModuleService.createInventoryItems({ - sku: "SHIRT", - title: "Green Medusa Shirt", - requires_shipping: true, - }) - - return new StepResponse({ inventoryItem }, inventoryItem.id) - }, - async (inventoryItemId, { container }) => { - if (!inventoryItemId) { - return - } - const inventoryModuleService = container.resolve(Modules.INVENTORY) - - await inventoryModuleService.deleteInventoryItems([inventoryItemId]) - } -) - -export const createInventoryItemWorkflow = createWorkflow( - "create-inventory-item-workflow", - () => { - const { inventoryItem } = createInventoryItemStep() - - return new WorkflowResponse({ - inventoryItem, - }) - } -) -``` - -You can then execute the workflow in your custom API routes, scheduled jobs, or subscribers: - -### API Route - -```ts title="src/api/workflow/route.ts" highlights={[["11"], ["12"]]} collapsibleLines="1-6" expandButtonLabel="Show Imports" -import type { - MedusaRequest, - MedusaResponse, -} from "@medusajs/framework/http" -import { createInventoryItemWorkflow } from "../../workflows/create-inventory-item" - -export async function GET( - req: MedusaRequest, - res: MedusaResponse -) { - const { result } = await createInventoryItemWorkflow(req.scope) - .run() - - res.send(result) -} -``` - -### Subscriber - -```ts title="src/subscribers/user-created.ts" highlights={[["11"], ["12"]]} collapsibleLines="1-6" expandButtonLabel="Show Imports" -import { - type SubscriberConfig, - type SubscriberArgs, -} from "@medusajs/framework" -import { createInventoryItemWorkflow } from "../workflows/create-inventory-item" - -export default async function handleUserCreated({ - event: { data }, - container, -}: SubscriberArgs<{ id: string }>) { - const { result } = await createInventoryItemWorkflow(container) - .run() - - console.log(result) -} - -export const config: SubscriberConfig = { - event: "user.created", -} -``` - -### Scheduled Job - -```ts title="src/jobs/run-daily.ts" highlights={[["7"], ["8"]]} -import { MedusaContainer } from "@medusajs/framework/types" -import { createInventoryItemWorkflow } from "../workflows/create-inventory-item" - -export default async function myCustomJob( - container: MedusaContainer -) { - const { result } = await createInventoryItemWorkflow(container) - .run() - - console.log(result) -} - -export const config = { - name: "run-once-a-day", - schedule: `0 0 * * *`, -} -``` - -Learn more about workflows in [this documentation](https://docs.medusajs.com/docs/learn/fundamentals/workflows/index.html.md). - -*** - - # Fulfillment Module In this section of the documentation, you will find resources to learn more about the Fulfillment Module and how to use it in your application. @@ -19193,6 +19049,150 @@ The Fulfillment Module accepts options for further configurations. Refer to [thi *** +# Inventory Module + +In this section of the documentation, you will find resources to learn more about the Inventory Module and how to use it in your application. + +Refer to the [Medusa Admin User Guide](https://docs.medusajs.com/user-guide/inventory/index.html.md) to learn how to manage inventory and related features using the dashboard. + +Medusa has inventory related features available out-of-the-box through the Inventory Module. A [module](https://docs.medusajs.com/docs/learn/fundamentals/modules/index.html.md) is a standalone package that provides features for a single domain. Each of Medusa's commerce features are placed in Commerce Modules, such as this Inventory Module. + +Learn more about why modules are isolated in [this documentation](https://docs.medusajs.com/docs/learn/fundamentals/modules/isolation/index.html.md). + +## Inventory Features + +- [Inventory Items Management](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/inventory/concepts/index.html.md): Store and manage inventory of any stock-kept item, such as product variants. +- [Inventory Across Locations](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/inventory/concepts#inventorylevel/index.html.md): Manage inventory levels across different locations, such as warehouses. +- [Reservation Management](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/inventory/concepts#reservationitem/index.html.md): Reserve quantities of inventory items at specific locations for orders or other purposes. +- [Check Inventory Availability](https://docs.medusajs.com/references/inventory-next/confirmInventory/index.html.md): Check whether an inventory item has the necessary quantity for purchase. +- [Inventory Kits](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/inventory/inventory-kit/index.html.md): Create and manage inventory kits for a single product, allowing you to implement use cases like bundled or multi-part products. + +*** + +## How to Use the Inventory Module + +In your Medusa application, you build flows around Commerce Modules. A flow is built as a [Workflow](https://docs.medusajs.com/docs/learn/fundamentals/workflows/index.html.md), which is a special function composed of a series of steps that guarantees data consistency and reliable roll-back mechanism. + +You can build custom workflows and steps. You can also re-use Medusa's workflows and steps, which are provided by the `@medusajs/medusa/core-flows` package. + +For example: + +```ts title="src/workflows/create-inventory-item.ts" highlights={highlights} +import { + createWorkflow, + WorkflowResponse, + createStep, + StepResponse, +} from "@medusajs/framework/workflows-sdk" +import { Modules } from "@medusajs/framework/utils" + +const createInventoryItemStep = createStep( + "create-inventory-item", + async ({}, { container }) => { + const inventoryModuleService = container.resolve(Modules.INVENTORY) + + const inventoryItem = await inventoryModuleService.createInventoryItems({ + sku: "SHIRT", + title: "Green Medusa Shirt", + requires_shipping: true, + }) + + return new StepResponse({ inventoryItem }, inventoryItem.id) + }, + async (inventoryItemId, { container }) => { + if (!inventoryItemId) { + return + } + const inventoryModuleService = container.resolve(Modules.INVENTORY) + + await inventoryModuleService.deleteInventoryItems([inventoryItemId]) + } +) + +export const createInventoryItemWorkflow = createWorkflow( + "create-inventory-item-workflow", + () => { + const { inventoryItem } = createInventoryItemStep() + + return new WorkflowResponse({ + inventoryItem, + }) + } +) +``` + +You can then execute the workflow in your custom API routes, scheduled jobs, or subscribers: + +### API Route + +```ts title="src/api/workflow/route.ts" highlights={[["11"], ["12"]]} collapsibleLines="1-6" expandButtonLabel="Show Imports" +import type { + MedusaRequest, + MedusaResponse, +} from "@medusajs/framework/http" +import { createInventoryItemWorkflow } from "../../workflows/create-inventory-item" + +export async function GET( + req: MedusaRequest, + res: MedusaResponse +) { + const { result } = await createInventoryItemWorkflow(req.scope) + .run() + + res.send(result) +} +``` + +### Subscriber + +```ts title="src/subscribers/user-created.ts" highlights={[["11"], ["12"]]} collapsibleLines="1-6" expandButtonLabel="Show Imports" +import { + type SubscriberConfig, + type SubscriberArgs, +} from "@medusajs/framework" +import { createInventoryItemWorkflow } from "../workflows/create-inventory-item" + +export default async function handleUserCreated({ + event: { data }, + container, +}: SubscriberArgs<{ id: string }>) { + const { result } = await createInventoryItemWorkflow(container) + .run() + + console.log(result) +} + +export const config: SubscriberConfig = { + event: "user.created", +} +``` + +### Scheduled Job + +```ts title="src/jobs/run-daily.ts" highlights={[["7"], ["8"]]} +import { MedusaContainer } from "@medusajs/framework/types" +import { createInventoryItemWorkflow } from "../workflows/create-inventory-item" + +export default async function myCustomJob( + container: MedusaContainer +) { + const { result } = await createInventoryItemWorkflow(container) + .run() + + console.log(result) +} + +export const config = { + name: "run-once-a-day", + schedule: `0 0 * * *`, +} +``` + +Learn more about workflows in [this documentation](https://docs.medusajs.com/docs/learn/fundamentals/workflows/index.html.md). + +*** + + # Order Module In this section of the documentation, you will find resources to learn more about the Order Module and how to use it in your application. @@ -19349,160 +19349,6 @@ Learn more about workflows in [this documentation](https://docs.medusajs.com/doc *** -# Pricing Module - -In this section of the documentation, you will find resources to learn more about the Pricing Module and how to use it in your application. - -Refer to the [Medusa Admin User Guide](https://docs.medusajs.com/user-guide/price-lists/index.html.md) to learn how to manage price lists using the dashboard. - -Medusa has pricing related features available out-of-the-box through the Pricing Module. A [module](https://docs.medusajs.com/docs/learn/fundamentals/modules/index.html.md) is a standalone package that provides features for a single domain. Each of Medusa's commerce features are placed in Commerce Modules, such as this Pricing Module. - -Learn more about why modules are isolated in [this documentation](https://docs.medusajs.com/docs/learn/fundamentals/modules/isolation/index.html.md). - -## Pricing Features - -- [Price Management](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/pricing/concepts/index.html.md): Store and manage prices of a resource, such as a product or a variant. -- [Advanced Rule Engine](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/pricing/price-rules/index.html.md): Create prices with custom rules to condition prices based on different contexts. -- [Price Lists](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/pricing/concepts#price-list/index.html.md): Group prices and apply them only in specific conditions with price lists. -- [Price Calculation Strategy](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/pricing/price-calculation/index.html.md): Retrieve the best price in a given context and for the specified rule values. -- [Tax-Inclusive Pricing](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/pricing/tax-inclusive-pricing/index.html.md): Calculate prices with taxes included in the price, and Medusa will handle calculating the taxes automatically. - -*** - -## How to Use the Pricing Module - -In your Medusa application, you build flows around Commerce Modules. A flow is built as a [Workflow](https://docs.medusajs.com/docs/learn/fundamentals/workflows/index.html.md), which is a special function composed of a series of steps that guarantees data consistency and reliable roll-back mechanism. - -You can build custom workflows and steps. You can also re-use Medusa's workflows and steps, which are provided by the `@medusajs/medusa/core-flows` package. - -For example: - -```ts title="src/workflows/create-price-set.ts" highlights={highlights} -import { - createWorkflow, - WorkflowResponse, - createStep, - StepResponse, -} from "@medusajs/framework/workflows-sdk" -import { Modules } from "@medusajs/framework/utils" - -const createPriceSetStep = createStep( - "create-price-set", - async ({}, { container }) => { - const pricingModuleService = container.resolve(Modules.PRICING) - - const priceSet = await pricingModuleService.createPriceSets({ - prices: [ - { - amount: 500, - currency_code: "USD", - }, - { - amount: 400, - currency_code: "EUR", - min_quantity: 0, - max_quantity: 4, - rules: {}, - }, - ], - }) - - return new StepResponse({ priceSet }, priceSet.id) - }, - async (priceSetId, { container }) => { - if (!priceSetId) { - return - } - const pricingModuleService = container.resolve(Modules.PRICING) - - await pricingModuleService.deletePriceSets([priceSetId]) - } -) - -export const createPriceSetWorkflow = createWorkflow( - "create-price-set", - () => { - const { priceSet } = createPriceSetStep() - - return new WorkflowResponse({ - priceSet, - }) - } -) -``` - -You can then execute the workflow in your custom API routes, scheduled jobs, or subscribers: - -### API Route - -```ts title="src/api/workflow/route.ts" highlights={[["11"], ["12"]]} collapsibleLines="1-6" expandButtonLabel="Show Imports" -import type { - MedusaRequest, - MedusaResponse, -} from "@medusajs/framework/http" -import { createPriceSetWorkflow } from "../../workflows/create-price-set" - -export async function GET( - req: MedusaRequest, - res: MedusaResponse -) { - const { result } = await createPriceSetWorkflow(req.scope) - .run() - - res.send(result) -} -``` - -### Subscriber - -```ts title="src/subscribers/user-created.ts" highlights={[["11"], ["12"]]} collapsibleLines="1-6" expandButtonLabel="Show Imports" -import { - type SubscriberConfig, - type SubscriberArgs, -} from "@medusajs/framework" -import { createPriceSetWorkflow } from "../workflows/create-price-set" - -export default async function handleUserCreated({ - event: { data }, - container, -}: SubscriberArgs<{ id: string }>) { - const { result } = await createPriceSetWorkflow(container) - .run() - - console.log(result) -} - -export const config: SubscriberConfig = { - event: "user.created", -} -``` - -### Scheduled Job - -```ts title="src/jobs/run-daily.ts" highlights={[["7"], ["8"]]} -import { MedusaContainer } from "@medusajs/framework/types" -import { createPriceSetWorkflow } from "../workflows/create-price-set" - -export default async function myCustomJob( - container: MedusaContainer -) { - const { result } = await createPriceSetWorkflow(container) - .run() - - console.log(result) -} - -export const config = { - name: "run-once-a-day", - schedule: `0 0 * * *`, -} -``` - -Learn more about workflows in [this documentation](https://docs.medusajs.com/docs/learn/fundamentals/workflows/index.html.md). - -*** - - # Payment Module In this section of the documentation, you will find resources to learn more about the Payment Module and how to use it in your application. @@ -19658,6 +19504,160 @@ Medusa provides the following payment providers out-of-the-box. You can use them *** +# Pricing Module + +In this section of the documentation, you will find resources to learn more about the Pricing Module and how to use it in your application. + +Refer to the [Medusa Admin User Guide](https://docs.medusajs.com/user-guide/price-lists/index.html.md) to learn how to manage price lists using the dashboard. + +Medusa has pricing related features available out-of-the-box through the Pricing Module. A [module](https://docs.medusajs.com/docs/learn/fundamentals/modules/index.html.md) is a standalone package that provides features for a single domain. Each of Medusa's commerce features are placed in Commerce Modules, such as this Pricing Module. + +Learn more about why modules are isolated in [this documentation](https://docs.medusajs.com/docs/learn/fundamentals/modules/isolation/index.html.md). + +## Pricing Features + +- [Price Management](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/pricing/concepts/index.html.md): Store and manage prices of a resource, such as a product or a variant. +- [Advanced Rule Engine](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/pricing/price-rules/index.html.md): Create prices with custom rules to condition prices based on different contexts. +- [Price Lists](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/pricing/concepts#price-list/index.html.md): Group prices and apply them only in specific conditions with price lists. +- [Price Calculation Strategy](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/pricing/price-calculation/index.html.md): Retrieve the best price in a given context and for the specified rule values. +- [Tax-Inclusive Pricing](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/pricing/tax-inclusive-pricing/index.html.md): Calculate prices with taxes included in the price, and Medusa will handle calculating the taxes automatically. + +*** + +## How to Use the Pricing Module + +In your Medusa application, you build flows around Commerce Modules. A flow is built as a [Workflow](https://docs.medusajs.com/docs/learn/fundamentals/workflows/index.html.md), which is a special function composed of a series of steps that guarantees data consistency and reliable roll-back mechanism. + +You can build custom workflows and steps. You can also re-use Medusa's workflows and steps, which are provided by the `@medusajs/medusa/core-flows` package. + +For example: + +```ts title="src/workflows/create-price-set.ts" highlights={highlights} +import { + createWorkflow, + WorkflowResponse, + createStep, + StepResponse, +} from "@medusajs/framework/workflows-sdk" +import { Modules } from "@medusajs/framework/utils" + +const createPriceSetStep = createStep( + "create-price-set", + async ({}, { container }) => { + const pricingModuleService = container.resolve(Modules.PRICING) + + const priceSet = await pricingModuleService.createPriceSets({ + prices: [ + { + amount: 500, + currency_code: "USD", + }, + { + amount: 400, + currency_code: "EUR", + min_quantity: 0, + max_quantity: 4, + rules: {}, + }, + ], + }) + + return new StepResponse({ priceSet }, priceSet.id) + }, + async (priceSetId, { container }) => { + if (!priceSetId) { + return + } + const pricingModuleService = container.resolve(Modules.PRICING) + + await pricingModuleService.deletePriceSets([priceSetId]) + } +) + +export const createPriceSetWorkflow = createWorkflow( + "create-price-set", + () => { + const { priceSet } = createPriceSetStep() + + return new WorkflowResponse({ + priceSet, + }) + } +) +``` + +You can then execute the workflow in your custom API routes, scheduled jobs, or subscribers: + +### API Route + +```ts title="src/api/workflow/route.ts" highlights={[["11"], ["12"]]} collapsibleLines="1-6" expandButtonLabel="Show Imports" +import type { + MedusaRequest, + MedusaResponse, +} from "@medusajs/framework/http" +import { createPriceSetWorkflow } from "../../workflows/create-price-set" + +export async function GET( + req: MedusaRequest, + res: MedusaResponse +) { + const { result } = await createPriceSetWorkflow(req.scope) + .run() + + res.send(result) +} +``` + +### Subscriber + +```ts title="src/subscribers/user-created.ts" highlights={[["11"], ["12"]]} collapsibleLines="1-6" expandButtonLabel="Show Imports" +import { + type SubscriberConfig, + type SubscriberArgs, +} from "@medusajs/framework" +import { createPriceSetWorkflow } from "../workflows/create-price-set" + +export default async function handleUserCreated({ + event: { data }, + container, +}: SubscriberArgs<{ id: string }>) { + const { result } = await createPriceSetWorkflow(container) + .run() + + console.log(result) +} + +export const config: SubscriberConfig = { + event: "user.created", +} +``` + +### Scheduled Job + +```ts title="src/jobs/run-daily.ts" highlights={[["7"], ["8"]]} +import { MedusaContainer } from "@medusajs/framework/types" +import { createPriceSetWorkflow } from "../workflows/create-price-set" + +export default async function myCustomJob( + container: MedusaContainer +) { + const { result } = await createPriceSetWorkflow(container) + .run() + + console.log(result) +} + +export const config = { + name: "run-once-a-day", + schedule: `0 0 * * *`, +} +``` + +Learn more about workflows in [this documentation](https://docs.medusajs.com/docs/learn/fundamentals/workflows/index.html.md). + +*** + + # Product Module In this section of the documentation, you will find resources to learn more about the Product Module and how to use it in your application. @@ -19812,6 +19812,154 @@ Learn more about workflows in [this documentation](https://docs.medusajs.com/doc *** +# Promotion Module + +In this section of the documentation, you will find resources to learn more about the Promotion Module and how to use it in your application. + +Refer to the [Medusa Admin User Guide](https://docs.medusajs.com/user-guide/promotions/index.html.md) to learn how to manage promotions using the dashboard. + +Medusa has promotion related features available out-of-the-box through the Promotion Module. A [module](https://docs.medusajs.com/docs/learn/fundamentals/modules/index.html.md) is a standalone package that provides features for a single domain. Each of Medusa's commerce features are placed in Commerce Modules, such as this Promotion Module. + +Learn more about why modules are isolated in [this documentation](https://docs.medusajs.com/docs/learn/fundamentals/modules/isolation/index.html.md). + +## Promotion Features + +- [Discount Functionalities](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/promotion/concepts/index.html.md): A promotion discounts an amount or percentage of a cart's items, shipping methods, or the entire order. +- [Flexible Promotion Rules](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/promotion/concepts#flexible-rules/index.html.md): A promotion has rules that restricts when the promotion is applied. +- [Campaign Management](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/promotion/campaign/index.html.md): A campaign combines promotions under the same conditions, such as start and end dates, and budget configurations. +- [Apply Promotion on Carts and Orders](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/promotion/actions/index.html.md): Apply promotions on carts and orders to discount items, shipping methods, or the entire order. + +*** + +## How to Use the Promotion Module + +In your Medusa application, you build flows around Commerce Modules. A flow is built as a [Workflow](https://docs.medusajs.com/docs/learn/fundamentals/workflows/index.html.md), which is a special function composed of a series of steps that guarantees data consistency and reliable roll-back mechanism. + +You can build custom workflows and steps. You can also re-use Medusa's workflows and steps, which are provided by the `@medusajs/medusa/core-flows` package. + +For example: + +```ts title="src/workflows/create-promotion.ts" highlights={highlights} +import { + createWorkflow, + WorkflowResponse, + createStep, + StepResponse, +} from "@medusajs/framework/workflows-sdk" +import { Modules } from "@medusajs/framework/utils" + +const createPromotionStep = createStep( + "create-promotion", + async ({}, { container }) => { + const promotionModuleService = container.resolve(Modules.PROMOTION) + + const promotion = await promotionModuleService.createPromotions({ + code: "10%OFF", + type: "standard", + application_method: { + type: "percentage", + target_type: "order", + value: 10, + currency_code: "usd", + }, + }) + + return new StepResponse({ promotion }, promotion.id) + }, + async (promotionId, { container }) => { + if (!promotionId) { + return + } + const promotionModuleService = container.resolve(Modules.PROMOTION) + + await promotionModuleService.deletePromotions(promotionId) + } +) + +export const createPromotionWorkflow = createWorkflow( + "create-promotion", + () => { + const { promotion } = createPromotionStep() + + return new WorkflowResponse({ + promotion, + }) + } +) +``` + +You can then execute the workflow in your custom API routes, scheduled jobs, or subscribers: + +### API Route + +```ts title="src/api/workflow/route.ts" highlights={[["11"], ["12"]]} collapsibleLines="1-6" expandButtonLabel="Show Imports" +import type { + MedusaRequest, + MedusaResponse, +} from "@medusajs/framework/http" +import { createPromotionWorkflow } from "../../workflows/create-cart" + +export async function GET( + req: MedusaRequest, + res: MedusaResponse +) { + const { result } = await createPromotionWorkflow(req.scope) + .run() + + res.send(result) +} +``` + +### Subscriber + +```ts title="src/subscribers/user-created.ts" highlights={[["11"], ["12"]]} collapsibleLines="1-6" expandButtonLabel="Show Imports" +import { + type SubscriberConfig, + type SubscriberArgs, +} from "@medusajs/framework" +import { createPromotionWorkflow } from "../workflows/create-cart" + +export default async function handleUserCreated({ + event: { data }, + container, +}: SubscriberArgs<{ id: string }>) { + const { result } = await createPromotionWorkflow(container) + .run() + + console.log(result) +} + +export const config: SubscriberConfig = { + event: "user.created", +} +``` + +### Scheduled Job + +```ts title="src/jobs/run-daily.ts" highlights={[["7"], ["8"]]} +import { MedusaContainer } from "@medusajs/framework/types" +import { createPromotionWorkflow } from "../workflows/create-cart" + +export default async function myCustomJob( + container: MedusaContainer +) { + const { result } = await createPromotionWorkflow(container) + .run() + + console.log(result) +} + +export const config = { + name: "run-once-a-day", + schedule: `0 0 * * *`, +} +``` + +Learn more about workflows in [this documentation](https://docs.medusajs.com/docs/learn/fundamentals/workflows/index.html.md). + +*** + + # Region Module In this section of the documentation, you will find resources to learn more about the Region Module and how to use it in your application. @@ -20115,154 +20263,6 @@ Learn more about workflows in [this documentation](https://docs.medusajs.com/doc *** -# Promotion Module - -In this section of the documentation, you will find resources to learn more about the Promotion Module and how to use it in your application. - -Refer to the [Medusa Admin User Guide](https://docs.medusajs.com/user-guide/promotions/index.html.md) to learn how to manage promotions using the dashboard. - -Medusa has promotion related features available out-of-the-box through the Promotion Module. A [module](https://docs.medusajs.com/docs/learn/fundamentals/modules/index.html.md) is a standalone package that provides features for a single domain. Each of Medusa's commerce features are placed in Commerce Modules, such as this Promotion Module. - -Learn more about why modules are isolated in [this documentation](https://docs.medusajs.com/docs/learn/fundamentals/modules/isolation/index.html.md). - -## Promotion Features - -- [Discount Functionalities](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/promotion/concepts/index.html.md): A promotion discounts an amount or percentage of a cart's items, shipping methods, or the entire order. -- [Flexible Promotion Rules](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/promotion/concepts#flexible-rules/index.html.md): A promotion has rules that restricts when the promotion is applied. -- [Campaign Management](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/promotion/campaign/index.html.md): A campaign combines promotions under the same conditions, such as start and end dates, and budget configurations. -- [Apply Promotion on Carts and Orders](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/promotion/actions/index.html.md): Apply promotions on carts and orders to discount items, shipping methods, or the entire order. - -*** - -## How to Use the Promotion Module - -In your Medusa application, you build flows around Commerce Modules. A flow is built as a [Workflow](https://docs.medusajs.com/docs/learn/fundamentals/workflows/index.html.md), which is a special function composed of a series of steps that guarantees data consistency and reliable roll-back mechanism. - -You can build custom workflows and steps. You can also re-use Medusa's workflows and steps, which are provided by the `@medusajs/medusa/core-flows` package. - -For example: - -```ts title="src/workflows/create-promotion.ts" highlights={highlights} -import { - createWorkflow, - WorkflowResponse, - createStep, - StepResponse, -} from "@medusajs/framework/workflows-sdk" -import { Modules } from "@medusajs/framework/utils" - -const createPromotionStep = createStep( - "create-promotion", - async ({}, { container }) => { - const promotionModuleService = container.resolve(Modules.PROMOTION) - - const promotion = await promotionModuleService.createPromotions({ - code: "10%OFF", - type: "standard", - application_method: { - type: "percentage", - target_type: "order", - value: 10, - currency_code: "usd", - }, - }) - - return new StepResponse({ promotion }, promotion.id) - }, - async (promotionId, { container }) => { - if (!promotionId) { - return - } - const promotionModuleService = container.resolve(Modules.PROMOTION) - - await promotionModuleService.deletePromotions(promotionId) - } -) - -export const createPromotionWorkflow = createWorkflow( - "create-promotion", - () => { - const { promotion } = createPromotionStep() - - return new WorkflowResponse({ - promotion, - }) - } -) -``` - -You can then execute the workflow in your custom API routes, scheduled jobs, or subscribers: - -### API Route - -```ts title="src/api/workflow/route.ts" highlights={[["11"], ["12"]]} collapsibleLines="1-6" expandButtonLabel="Show Imports" -import type { - MedusaRequest, - MedusaResponse, -} from "@medusajs/framework/http" -import { createPromotionWorkflow } from "../../workflows/create-cart" - -export async function GET( - req: MedusaRequest, - res: MedusaResponse -) { - const { result } = await createPromotionWorkflow(req.scope) - .run() - - res.send(result) -} -``` - -### Subscriber - -```ts title="src/subscribers/user-created.ts" highlights={[["11"], ["12"]]} collapsibleLines="1-6" expandButtonLabel="Show Imports" -import { - type SubscriberConfig, - type SubscriberArgs, -} from "@medusajs/framework" -import { createPromotionWorkflow } from "../workflows/create-cart" - -export default async function handleUserCreated({ - event: { data }, - container, -}: SubscriberArgs<{ id: string }>) { - const { result } = await createPromotionWorkflow(container) - .run() - - console.log(result) -} - -export const config: SubscriberConfig = { - event: "user.created", -} -``` - -### Scheduled Job - -```ts title="src/jobs/run-daily.ts" highlights={[["7"], ["8"]]} -import { MedusaContainer } from "@medusajs/framework/types" -import { createPromotionWorkflow } from "../workflows/create-cart" - -export default async function myCustomJob( - container: MedusaContainer -) { - const { result } = await createPromotionWorkflow(container) - .run() - - console.log(result) -} - -export const config = { - name: "run-once-a-day", - schedule: `0 0 * * *`, -} -``` - -Learn more about workflows in [this documentation](https://docs.medusajs.com/docs/learn/fundamentals/workflows/index.html.md). - -*** - - # Stock Location Module In this section of the documentation, you will find resources to learn more about the Stock Location Module and how to use it in your application. @@ -20400,147 +20400,6 @@ Learn more about workflows in [this documentation](https://docs.medusajs.com/doc *** -# Store Module - -In this section of the documentation, you will find resources to learn more about the Store Module and how to use it in your application. - -Refer to the [Medusa Admin User Guide](https://docs.medusajs.com/user-guide/settings/store/index.html.md) to learn how to manage your store using the dashboard. - -Medusa has store related features available out-of-the-box through the Store Module. A [module](https://docs.medusajs.com/docs/learn/fundamentals/modules/index.html.md) is a standalone package that provides features for a single domain. Each of Medusa's commerce features are placed in Commerce Modules, such as this Store Module. - -Learn more about why modules are isolated in [this documentation](https://docs.medusajs.com/docs/learn/fundamentals/modules/isolation/index.html.md). - -## Store Features - -- [Store Management](https://docs.medusajs.com/references/store/models/Store/index.html.md): Create and manage stores in your application. -- [Multi-Tenancy Support](https://docs.medusajs.com/references/store/models/Store/index.html.md): Create multiple stores, each having its own configurations. - -*** - -## How to Use Store Module's Service - -In your Medusa application, you build flows around Commerce Modules. A flow is built as a [Workflow](https://docs.medusajs.com/docs/learn/fundamentals/workflows/index.html.md), which is a special function composed of a series of steps that guarantees data consistency and reliable roll-back mechanism. - -You can build custom workflows and steps. You can also re-use Medusa's workflows and steps, which are provided by the `@medusajs/medusa/core-flows` package. - -For example: - -```ts title="src/workflows/create-store.ts" highlights={highlights} -import { - createWorkflow, - WorkflowResponse, - createStep, - StepResponse, -} from "@medusajs/framework/workflows-sdk" -import { Modules } from "@medusajs/framework/utils" - -const createStoreStep = createStep( - "create-store", - async ({}, { container }) => { - const storeModuleService = container.resolve(Modules.STORE) - - const store = await storeModuleService.createStores({ - name: "My Store", - supported_currencies: [{ - currency_code: "usd", - is_default: true, - }], - }) - - return new StepResponse({ store }, store.id) - }, - async (storeId, { container }) => { - if(!storeId) { - return - } - const storeModuleService = container.resolve(Modules.STORE) - - await storeModuleService.deleteStores([storeId]) - } -) - -export const createStoreWorkflow = createWorkflow( - "create-store", - () => { - const { store } = createStoreStep() - - return new WorkflowResponse({ store }) - } -) -``` - -You can then execute the workflow in your custom API routes, scheduled jobs, or subscribers: - -### API Route - -```ts title="src/api/workflow/route.ts" highlights={[["11"], ["12"]]} collapsibleLines="1-6" expandButtonLabel="Show Imports" -import type { - MedusaRequest, - MedusaResponse, -} from "@medusajs/framework/http" -import { createStoreWorkflow } from "../../workflows/create-store" - -export async function GET( - req: MedusaRequest, - res: MedusaResponse -) { - const { result } = await createStoreWorkflow(req.scope) - .run() - - res.send(result) -} -``` - -### Subscriber - -```ts title="src/subscribers/user-created.ts" highlights={[["11"], ["12"]]} collapsibleLines="1-6" expandButtonLabel="Show Imports" -import { - type SubscriberConfig, - type SubscriberArgs, -} from "@medusajs/framework" -import { createStoreWorkflow } from "../workflows/create-store" - -export default async function handleUserCreated({ - event: { data }, - container, -}: SubscriberArgs<{ id: string }>) { - const { result } = await createStoreWorkflow(container) - .run() - - console.log(result) -} - -export const config: SubscriberConfig = { - event: "user.created", -} -``` - -### Scheduled Job - -```ts title="src/jobs/run-daily.ts" highlights={[["7"], ["8"]]} -import { MedusaContainer } from "@medusajs/framework/types" -import { createStoreWorkflow } from "../workflows/create-store" - -export default async function myCustomJob( - container: MedusaContainer -) { - const { result } = await createStoreWorkflow(container) - .run() - - console.log(result) -} - -export const config = { - name: "run-once-a-day", - schedule: `0 0 * * *`, -} -``` - -Learn more about workflows in [this documentation](https://docs.medusajs.com/docs/learn/fundamentals/workflows/index.html.md). - -*** - - # Tax Module In this section of the documentation, you will find resources to learn more about the Tax Module and how to use it in your application. @@ -20685,6 +20544,147 @@ The Tax Module accepts options for further configurations. Refer to [this docume *** +# Store Module + +In this section of the documentation, you will find resources to learn more about the Store Module and how to use it in your application. + +Refer to the [Medusa Admin User Guide](https://docs.medusajs.com/user-guide/settings/store/index.html.md) to learn how to manage your store using the dashboard. + +Medusa has store related features available out-of-the-box through the Store Module. A [module](https://docs.medusajs.com/docs/learn/fundamentals/modules/index.html.md) is a standalone package that provides features for a single domain. Each of Medusa's commerce features are placed in Commerce Modules, such as this Store Module. + +Learn more about why modules are isolated in [this documentation](https://docs.medusajs.com/docs/learn/fundamentals/modules/isolation/index.html.md). + +## Store Features + +- [Store Management](https://docs.medusajs.com/references/store/models/Store/index.html.md): Create and manage stores in your application. +- [Multi-Tenancy Support](https://docs.medusajs.com/references/store/models/Store/index.html.md): Create multiple stores, each having its own configurations. + +*** + +## How to Use Store Module's Service + +In your Medusa application, you build flows around Commerce Modules. A flow is built as a [Workflow](https://docs.medusajs.com/docs/learn/fundamentals/workflows/index.html.md), which is a special function composed of a series of steps that guarantees data consistency and reliable roll-back mechanism. + +You can build custom workflows and steps. You can also re-use Medusa's workflows and steps, which are provided by the `@medusajs/medusa/core-flows` package. + +For example: + +```ts title="src/workflows/create-store.ts" highlights={highlights} +import { + createWorkflow, + WorkflowResponse, + createStep, + StepResponse, +} from "@medusajs/framework/workflows-sdk" +import { Modules } from "@medusajs/framework/utils" + +const createStoreStep = createStep( + "create-store", + async ({}, { container }) => { + const storeModuleService = container.resolve(Modules.STORE) + + const store = await storeModuleService.createStores({ + name: "My Store", + supported_currencies: [{ + currency_code: "usd", + is_default: true, + }], + }) + + return new StepResponse({ store }, store.id) + }, + async (storeId, { container }) => { + if(!storeId) { + return + } + const storeModuleService = container.resolve(Modules.STORE) + + await storeModuleService.deleteStores([storeId]) + } +) + +export const createStoreWorkflow = createWorkflow( + "create-store", + () => { + const { store } = createStoreStep() + + return new WorkflowResponse({ store }) + } +) +``` + +You can then execute the workflow in your custom API routes, scheduled jobs, or subscribers: + +### API Route + +```ts title="src/api/workflow/route.ts" highlights={[["11"], ["12"]]} collapsibleLines="1-6" expandButtonLabel="Show Imports" +import type { + MedusaRequest, + MedusaResponse, +} from "@medusajs/framework/http" +import { createStoreWorkflow } from "../../workflows/create-store" + +export async function GET( + req: MedusaRequest, + res: MedusaResponse +) { + const { result } = await createStoreWorkflow(req.scope) + .run() + + res.send(result) +} +``` + +### Subscriber + +```ts title="src/subscribers/user-created.ts" highlights={[["11"], ["12"]]} collapsibleLines="1-6" expandButtonLabel="Show Imports" +import { + type SubscriberConfig, + type SubscriberArgs, +} from "@medusajs/framework" +import { createStoreWorkflow } from "../workflows/create-store" + +export default async function handleUserCreated({ + event: { data }, + container, +}: SubscriberArgs<{ id: string }>) { + const { result } = await createStoreWorkflow(container) + .run() + + console.log(result) +} + +export const config: SubscriberConfig = { + event: "user.created", +} +``` + +### Scheduled Job + +```ts title="src/jobs/run-daily.ts" highlights={[["7"], ["8"]]} +import { MedusaContainer } from "@medusajs/framework/types" +import { createStoreWorkflow } from "../workflows/create-store" + +export default async function myCustomJob( + container: MedusaContainer +) { + const { result } = await createStoreWorkflow(container) + .run() + + console.log(result) +} + +export const config = { + name: "run-once-a-day", + schedule: `0 0 * * *`, +} +``` + +Learn more about workflows in [this documentation](https://docs.medusajs.com/docs/learn/fundamentals/workflows/index.html.md). + +*** + + # User Module In this section of the documentation, you will find resources to learn more about the User Module and how to use it in your application. @@ -20832,34 +20832,6 @@ The User Module accepts options for further configurations. Refer to [this docum *** -# API Key Concepts - -In this document, you’ll learn about the different types of API keys, their expiration and verification. - -## API Key Types - -There are two types of API keys: - -- `publishable`: A public key used in client applications, such as a storefront. -- `secret`: A secret key used for authentication and verification purposes, such as an admin user’s authentication token or a password reset token. - -The API key’s type is stored in the `type` property of the [ApiKey data model](https://docs.medusajs.com/references/api-key/models/ApiKey/index.html.md). - -*** - -## API Key Expiration - -An API key expires when it’s revoked using the [revoke method of the module’s main service](https://docs.medusajs.com/references/api-key/revoke/index.html.md). - -The associated token is no longer usable or verifiable. - -*** - -## Token Verification - -To verify a token received as an input or in a request, use the [authenticate method of the module’s main service](https://docs.medusajs.com/references/api-key/authenticate/index.html.md) which validates the token against all non-expired tokens. - - # Links between API Key Module and Other Modules This document showcases the module links defined between the API Key Module and other Commerce Modules. @@ -20958,1442 +20930,6 @@ createRemoteLinkStep({ ``` -# Authentication Flows with the Auth Main Service - -In this document, you'll learn how to use the Auth Module's main service's methods to implement authentication flows and reset a user's password. - -## Authentication Methods - -### Register - -The [register method of the Auth Module's main service](https://docs.medusajs.com/references/auth/register/index.html.md) creates an auth identity that can be authenticated later. - -For example: - -```ts -const data = await authModuleService.register( - "emailpass", - // passed to auth provider - { - // ... - } -) -``` - -This method calls the `register` method of the provider specified in the first parameter and returns its data. - -### Authenticate - -To authenticate a user, you use the [authenticate method of the Auth Module's main service](https://docs.medusajs.com/references/auth/authenticate/index.html.md). For example: - -```ts -const data = await authModuleService.authenticate( - "emailpass", - // passed to auth provider - { - // ... - } -) -``` - -This method calls the `authenticate` method of the provider specified in the first parameter and returns its data. - -*** - -## Auth Flow 1: Basic Authentication - -The basic authentication flow requires first using the `register` method, then the `authenticate` method: - -```ts -const { success, authIdentity, error } = await authModuleService.register( - "emailpass", - // passed to auth provider - { - // ... - } -) - -if (error) { - // registration failed - // TODO return an error - return -} - -// later (can be another route for log-in) -const { success, authIdentity, location } = await authModuleService.authenticate( - "emailpass", - // passed to auth provider - { - // ... - } -) - -if (success && !location) { - // user is authenticated -} -``` - -If `success` is true and `location` isn't set, the user is authenticated successfully, and their authentication details are available within the `authIdentity` object. - -The next section explains the flow if `location` is set. - -Check out the [AuthIdentity](https://docs.medusajs.com/references/auth/models/AuthIdentity/index.html.md) reference for the received properties in `authIdentity`. - -![Diagram showcasing the basic authentication flow](https://res.cloudinary.com/dza7lstvk/image/upload/v1711373749/Medusa%20Resources/basic-auth_lgpqsj.jpg) - -### Auth Identity with Same Identifier - -If an auth identity, such as a `customer`, tries to register with an email of another auth identity, the `register` method returns an error. This can happen either if another customer is using the same email, or an admin user has the same email. - -There are two ways to handle this: - -- Consider the customer authenticated if the `authenticate` method validates that the email and password are correct. This allows admin users, for example, to authenticate as customers. -- Return an error message to the customer, informing them that the email is already in use. - -*** - -## Auth Flow 2: Third-Party Service Authentication - -The third-party service authentication method requires using the `authenticate` method first: - -```ts -const { success, authIdentity, location } = await authModuleService.authenticate( - "google", - // passed to auth provider - { - // ... - } -) - -if (location) { - // return the location for the front-end to redirect to -} - -if (!success) { - // authentication failed -} - -// authentication successful -``` - -If the `authenticate` method returns a `location` property, the authentication process requires the user to perform an action with a third-party service. So, you return the `location` to the front-end or client to redirect to that URL. - -For example, when using the `google` provider, the `location` is the URL that the user is navigated to login. - -![Diagram showcasing the first part of the third-party authentication flow](https://res.cloudinary.com/dza7lstvk/image/upload/v1711374847/Medusa%20Resources/third-party-auth-1_enyedy.jpg) - -### Overriding Callback URL - -The Google and GitHub providers allow you to override their `callbackUrl` option during authentication. This is useful when you redirect the user after authentication to a URL based on its actor type. For example, you redirect admin users and customers to different pages. - -```ts -const { success, authIdentity, location } = await authModuleService.authenticate( - "google", - // passed to auth provider - { - // ... - callback_url: "example.com", - } -) -``` - -### validateCallback - -Providers handling this authentication flow must implement the `validateCallback` method. It implements the logic to validate the authentication with the third-party service. - -So, once the user performs the required action with the third-party service (for example, log-in with Google), the frontend must redirect to an API route that uses the [validateCallback method of the Auth Module's main service](https://docs.medusajs.com/references/auth/validateCallback/index.html.md). - -The method calls the specified provider’s `validateCallback` method passing it the authentication details it received in the second parameter: - -```ts -const { success, authIdentity } = await authModuleService.validateCallback( - "google", - // passed to auth provider - { - // request data, such as - url, - headers, - query, - body, - protocol, - } -) - -if (success) { - // authentication succeeded -} -``` - -For providers like Google, the `query` object contains the query parameters from the original callback URL, such as the `code` and `state` parameters. - -If the returned `success` property is `true`, the authentication with the third-party provider was successful. - -![Diagram showcasing the second part of the third-party authentication flow](https://res.cloudinary.com/dza7lstvk/image/upload/v1711375123/Medusa%20Resources/third-party-auth-2_kmjxju.jpg) - -*** - -## Reset Password - -To update a user's password or other authentication details, use the `updateProvider` method of the Auth Module's main service. It calls the `update` method of the specified authentication provider. - -For example: - -```ts -const { success } = await authModuleService.updateProvider( - "emailpass", - // passed to the auth provider - { - entity_id: "user@example.com", - password: "supersecret", - } -) - -if (success) { - // password reset successfully -} -``` - -The method accepts as a first parameter the ID of the provider, and as a second parameter the data necessary to reset the password. - -In the example above, you use the `emailpass` provider, so you have to pass an object having an `email` and `password` properties. - -If the returned `success` property is `true`, the password has reset successfully. - - -# Auth Identity and Actor Types - -In this document, you’ll learn about concepts related to identity and actors in the Auth Module. - -## What is an Auth Identity? - -The [AuthIdentity data model](https://docs.medusajs.com/references/auth/models/AuthIdentity/index.html.md) represents a user registered by an [authentication provider](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/auth/auth-providers/index.html.md). When a user is registered using an authentication provider, the provider creates a record of `AuthIdentity`. - -Then, when the user logs-in in the future with the same authentication provider, the associated auth identity is used to validate their credentials. - -*** - -## Actor Types - -An actor type is a type of user that can be authenticated. The Auth Module doesn't store or manage any user-like models, such as for customers or users. Instead, the user types are created and managed by other modules. For example, a customer is managed by the [Customer Module](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/customer/index.html.md). - -Then, when an auth identity is created for the actor type, the ID of the user is stored in the `app_metadata` property of the auth identity. - -For example, an auth identity of a customer has the following `app_metadata` property: - -```json -{ - "app_metadata": { - "customer_id": "cus_123" - } -} -``` - -The ID of the user is stored in the key `{actor_type}_id` of the `app_metadata` property. - -*** - -## Protect Routes by Actor Type - -When you protect routes with the `authenticate` middleware, you specify in its first parameter the actor type that must be authenticated to access the specified API routes. - -For example: - -```ts title="src/api/middlewares.ts" highlights={highlights} -import { - defineMiddlewares, - authenticate, -} from "@medusajs/framework/http" - -export default defineMiddlewares({ - routes: [ - { - matcher: "/custom/admin*", - middlewares: [ - authenticate("user", ["session", "bearer", "api-key"]), - ], - }, - ], -}) -``` - -By specifying `user` as the first parameter of `authenticate`, only authenticated users of actor type `user` (admin users) can access API routes starting with `/custom/admin`. - -*** - -## Custom Actor Types - -You can define custom actor types that allows a custom user, managed by your custom module, to authenticate into Medusa. - -For example, if you have a custom module with a `Manager` data model, you can authenticate managers with the `manager` actor type. - -Learn how to create a custom actor type in [this guide](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/auth/create-actor-type/index.html.md). - - -# Auth Providers - -In this document, you’ll learn how the Auth Module handles authentication using providers. - -## What's an Auth Module Provider? - -An auth module provider handles authenticating customers and users, either using custom logic or by integrating a third-party service. - -For example, the EmailPass Auth Module Provider authenticates a user using their email and password, whereas the Google Auth Module Provider authenticates users using their Google account. - -### Auth Providers List - -- [Emailpass](https://docs.medusajs.com/commerce-modules/auth/auth-providers/emailpass/index.html.md) -- [Google](https://docs.medusajs.com/commerce-modules/auth/auth-providers/google/index.html.md) -- [GitHub](https://docs.medusajs.com/commerce-modules/auth/auth-providers/github/index.html.md) - -*** - -## Configure Allowed Auth Providers of Actor Types - -By default, users of all actor types can authenticate with all installed auth module providers. - -To restrict the auth providers used for actor types, use the [authMethodsPerActor option](https://docs.medusajs.com/docs/learn/configurations/medusa-config#httpauthMethodsPerActor/index.html.md) in Medusa's configurations: - -```ts title="medusa-config.ts" -module.exports = defineConfig({ - projectConfig: { - http: { - authMethodsPerActor: { - user: ["google"], - customer: ["emailpass"], - }, - // ... - }, - // ... - }, -}) -``` - -When you specify the `authMethodsPerActor` configuration, it overrides the default. So, if you don't specify any providers for an actor type, users of that actor type can't authenticate with any provider. - -*** - -## How to Create an Auth Module Provider - -Refer to [this guide](https://docs.medusajs.com/references/auth/provider/index.html.md) to learn how to create an auth module provider. - - -# How to Use Authentication Routes - -In this document, you'll learn about the authentication routes and how to use them to create and log-in users, and reset their password. - -These routes are added by Medusa's HTTP layer, not the Auth Module. - -## Types of Authentication Flows - -### 1. Basic Authentication Flow - -This authentication flow doesn't require validation with third-party services. - -[How to register customer in storefront using basic authentication flow](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/storefront-development/customers/register/index.html.md). - -The steps are: - -![Diagram showcasing the basic authentication flow between the frontend and the Medusa application](https://res.cloudinary.com/dza7lstvk/image/upload/v1725539370/Medusa%20Resources/basic-auth-routes_pgpjch.jpg) - -1. Register the user with the [Register Route](#register-route). -2. Use the authentication token to create the user with their respective API route. - - For example, for customers you would use the [Create Customer API route](https://docs.medusajs.com/api/store#customers_postcustomers). - - For admin users, you accept an invite using the [Accept Invite API route](https://docs.medusajs.com/api/admin#invites_postinvitesaccept) -3. Authenticate the user with the [Auth Route](#login-route). - -After registration, you only use the [Auth Route](#login-route) for subsequent authentication. - -To handle errors related to existing identities, refer to [this section](#handling-existing-identities). - -### 2. Third-Party Service Authenticate Flow - -This authentication flow authenticates the user with a third-party service, such as Google. - -[How to authenticate customer with a third-party provider in the storefront.](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/storefront-development/customers/third-party-login/index.html.md). - -It requires the following steps: - -![Diagram showcasing the authentication flow between the frontend, Medusa application, and third-party service](https://res.cloudinary.com/dza7lstvk/image/upload/v1725528159/Medusa%20Resources/Third_Party_Auth_tvf4ng.jpg) - -1. Authenticate the user with the [Auth Route](#login-route). -2. The auth route returns a URL to authenticate with third-party service, such as login with Google. The frontend (such as a storefront), when it receives a `location` property in the response, must redirect to the returned location. -3. Once the authentication with the third-party service finishes, it redirects back to the frontend with a `code` query parameter. So, make sure your third-party service is configured to redirect to your frontend page after successful authentication. -4. The frontend sends a request to the [Validate Callback Route](#validate-callback-route) passing it the query parameters received from the third-party service, such as the `code` and `state` query parameters. -5. If the callback validation is successful, the frontend receives the authentication token. -6. Decode the received token in the frontend using tools like [react-jwt](https://www.npmjs.com/package/react-jwt). - - If the decoded data has an `actor_id` property, then the user is already registered. So, use this token for subsequent authenticated requests. - - If not, follow the rest of the steps. -7. The frontend uses the authentication token to create the user with their respective API route. - - For example, for customers you would use the [Create Customer API route](https://docs.medusajs.com/api/store#customers_postcustomers). - - For admin users, you accept an invite using the [Accept Invite API route](https://docs.medusajs.com/api/admin#invites_postinvitesaccept) -8. The frontend sends a request to the [Refresh Token Route](#refresh-token-route) to retrieve a new token with the user information populated. - -*** - -## Register Route - -The Medusa application defines an API route at `/auth/{actor_type}/{provider}/register` that creates an auth identity for an actor type, such as a `customer`. It returns a JWT token that you pass to an API route that creates the user. - -```bash -curl -X POST http://localhost:9000/auth/{actor_type}/{providers}/register --H 'Content-Type: application/json' \ ---data-raw '{ - "email": "Whitney_Schultz@gmail.com" - // ... -}' -``` - -This API route is useful for providers like `emailpass` that uses custom logic to authenticate a user. For authentication providers that authenticate with third-party services, such as Google, use the [Auth Route](#login-route) instead. - -For example, if you're registering a customer, you: - -1. Send a request to `/auth/customer/emailpass/register` to retrieve the registration JWT token. -2. Send a request to the [Create Customer API route](https://docs.medusajs.com/api/store#customers_postcustomers) to create the customer, passing the [JWT token in the header](https://docs.medusajs.com/api/store#authentication). - -### Path Parameters - -Its path parameters are: - -- `{actor_type}`: the actor type of the user you're authenticating. For example, `customer`. -- `{provider}`: the auth provider to handle the authentication. For example, `emailpass`. - -### Request Body Parameters - -This route accepts in the request body the data that the specified authentication provider requires to handle authentication. - -For example, the EmailPass provider requires an `email` and `password` fields in the request body. - -### Response Fields - -If the authentication is successful, you'll receive a `token` field in the response body object: - -```json -{ - "token": "..." -} -``` - -Use that token in the header of subsequent requests to send authenticated requests. - -### Handling Existing Identities - -An auth identity with the same email may already exist in Medusa. This can happen if: - -- Another actor type is using that email. For example, an admin user is trying to register as a customer. -- The same email belongs to a record of the same actor type. For example, another customer has the same email. - -In these scenarios, the Register Route will return an error instead of a token: - -```json -{ - "type": "unauthorized", - "message": "Identity with email already exists" -} -``` - -To handle these scenarios, you can use the [Login Route](#login-route) to validate that the email and password match the existing identity. If so, you can allow the admin user, for example, to register as a customer. - -Otherwise, if the email and password don't match the existing identity, such as when the email belongs to another customer, the [Login Route](#login-route) returns an error: - -```json -{ - "type": "unauthorized", - "message": "Invalid email or password" -} -``` - -You can show that error message to the customer. - -*** - -## Login Route - -The Medusa application defines an API route at `/auth/{actor_type}/{provider}` that authenticates a user of an actor type. It returns a JWT token that can be passed in [the header of subsequent requests](https://docs.medusajs.com/api/store#authentication) to send authenticated requests. - -```bash -curl -X POST http://localhost:9000/auth/{actor_type}/{providers} --H 'Content-Type: application/json' \ ---data-raw '{ - "email": "Whitney_Schultz@gmail.com" - // ... -}' -``` - -For example, if you're authenticating a customer, you send a request to `/auth/customer/emailpass`. - -### Path Parameters - -Its path parameters are: - -- `{actor_type}`: the actor type of the user you're authenticating. For example, `customer`. -- `{provider}`: the auth provider to handle the authentication. For example, `emailpass`. - -### Request Body Parameters - -This route accepts in the request body the data that the specified authentication provider requires to handle authentication. - -For example, the EmailPass provider requires an `email` and `password` fields in the request body. - -#### Overriding Callback URL - -For the [GitHub](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/auth/auth-providers/github/index.html.md) and [Google](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/auth/auth-providers/google/index.html.md) providers, you can pass a `callback_url` body parameter that overrides the `callbackUrl` set in the provider's configurations. - -This is useful if you want to redirect the user to a different URL after authentication based on their actor type. For example, you can set different `callback_url` for admin users and customers. - -### Response Fields - -If the authentication is successful, you'll receive a `token` field in the response body object: - -```json -{ - "token": "..." -} -``` - -Use that token in the header of subsequent requests to send authenticated requests. - -If the authentication requires more action with a third-party service, you'll receive a `location` property: - -```json -{ - "location": "https://..." -} -``` - -Redirect to that URL in the frontend to continue the authentication process with the third-party service. - -[How to login Customers using the authentication route](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/storefront-development/customers/login/index.html.md). - -*** - -## Validate Callback Route - -The Medusa application defines an API route at `/auth/{actor_type}/{provider}/callback` that's useful for validating the authentication callback or redirect from third-party services like Google. - -```bash -curl -X POST http://localhost:9000/auth/{actor_type}/{providers}/callback?code=123&state=456 -``` - -Refer to the [third-party authentication flow](#2-third-party-service-authenticate-flow) section to see how this route fits into the authentication flow. - -### Path Parameters - -Its path parameters are: - -- `{actor_type}`: the actor type of the user you're authenticating. For example, `customer`. -- `{provider}`: the auth provider to handle the authentication. For example, `google`. - -### Query Parameters - -This route accepts all the query parameters that the third-party service sends to the frontend after the user completes the authentication process, such as the `code` and `state` query parameters. - -### Response Fields - -If the authentication is successful, you'll receive a `token` field in the response body object: - -```json -{ - "token": "..." -} -``` - -In your frontend, decode the token using tools like [react-jwt](https://www.npmjs.com/package/react-jwt): - -- If the decoded data has an `actor_id` property, the user is already registered. So, use this token for subsequent authenticated requests. -- If not, use the token in the header of a request that creates the user, such as the [Create Customer API route](https://docs.medusajs.com/api/store#customers_postcustomers). - -*** - -## Refresh Token Route - -The Medusa application defines an API route at `/auth/token/refresh` that's useful after authenticating a user with a third-party service to populate the user's token with their new information. - -It requires the user's JWT token that they received from the authentication or callback routes. - -```bash -curl -X POST http://localhost:9000/auth/token/refresh \ --H 'Authorization: Bearer {token}' -``` - -### Response Fields - -If the token was refreshed successfully, you'll receive a `token` field in the response body object: - -```json -{ - "token": "..." -} -``` - -Use that token in the header of subsequent requests to send authenticated requests. - -*** - -## Reset Password Routes - -To reset a user's password: - -1. Generate a token using the [Generate Reset Password Token API route](#generate-reset-password-token-route). - - The API route emits the `auth.password_reset` event, passing the token in the payload. - - You can create a subscriber, as seen in [this guide](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/auth/reset-password/index.html.md), that listens to the event and send a notification to the user. -2. Pass the token to the [Reset Password API route](#reset-password-route) to reset the password. - - The URL in the user's notification should direct them to a frontend URL, which sends a request to this route. - -[Storefront Development: How to Reset a Customer's Password.](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/storefront-development/customers/reset-password/index.html.md) - -### Generate Reset Password Token Route - -The Medusa application defines an API route at `/auth/{actor_type}/{auth_provider}/reset-password` that emits the `auth.password_reset` event, passing the token in the payload. - -```bash -curl -X POST http://localhost:9000/auth/{actor_type}/{providers}/reset-password --H 'Content-Type: application/json' \ ---data-raw '{ - "identifier": "Whitney_Schultz@gmail.com" -}' -``` - -This API route is useful for providers like `emailpass` that store a user's password and use it for authentication. - -#### Path Parameters - -Its path parameters are: - -- `{actor_type}`: the actor type of the user you're authenticating. For example, `customer`. -- `{provider}`: the auth provider to handle the authentication. For example, `emailpass`. - -#### Request Body Parameters - -This route accepts in the request body an object having the following property: - -- `identifier`: The user's identifier in the specified auth provider. For example, for the `emailpass` auth provider, you pass the user's email. - -#### Response Fields - -If the authentication is successful, the request returns a `201` response code. - -### Reset Password Route - -The Medusa application defines an API route at `/auth/{actor_type}/{auth_provider}/update` that accepts a token and, if valid, updates the user's password. - -```bash -curl -X POST http://localhost:9000/auth/{actor_type}/{providers}/update --H 'Content-Type: application/json' \ --H 'Authorization: Bearer {token}' \ ---data-raw '{ - "email": "Whitney_Schultz@gmail.com", - "password": "supersecret" -}' -``` - -This API route is useful for providers like `emailpass` that store a user's password and use it for logging them in. - -#### Path Parameters - -Its path parameters are: - -- `{actor_type}`: the actor type of the user you're authenticating. For example, `customer`. -- `{provider}`: the auth provider to handle the authentication. For example, `emailpass`. - -#### Pass Token in Authorization Header - -Before [Medusa v2.6](https://github.com/medusajs/medusa/releases/tag/v2.6), you passed the token as a query parameter. Now, you must pass it in the `Authorization` header. - -In the request's authorization header, you must pass the token generated using the [Generate Reset Password Token route](#generate-reset-password-token-route). You pass it as a bearer token. - -### Request Body Parameters - -This route accepts in the request body an object that has the data necessary for the provider to update the user's password. - -For the `emailpass` provider, you must pass the following properties: - -- `email`: The user's email. -- `password`: The new password. - -### Response Fields - -If the authentication is successful, the request returns an object with a `success` property set to `true`: - -```json -{ - "success": "true" -} -``` - - -# How to Create an Actor Type - -In this document, learn how to create an actor type and authenticate its associated data model. - -## 0. Create Module with Data Model - -Before creating an actor type, you must have a module with a data model representing the actor type. - -Learn how to create a module in [this guide](https://docs.medusajs.com/docs/learn/fundamentals/modules/index.html.md). - -The rest of this guide uses this `Manager` data model as an example: - -```ts title="src/modules/manager/models/manager.ts" -import { model } from "@medusajs/framework/utils" - -const Manager = model.define("manager", { - id: model.id().primaryKey(), - firstName: model.text(), - lastName: model.text(), - email: model.text(), -}) - -export default Manager -``` - -*** - -## 1. Create Workflow - -Start by creating a workflow that does two things: - -- Creates a record of the `Manager` data model. -- Sets the `app_metadata` property of the associated `AuthIdentity` record based on the new actor type. - -For example, create the file `src/workflows/create-manager.ts`. with the following content: - -```ts title="src/workflows/create-manager.ts" highlights={workflowHighlights} -import { - createWorkflow, - createStep, - StepResponse, - WorkflowResponse, -} from "@medusajs/framework/workflows-sdk" -import { - setAuthAppMetadataStep, -} from "@medusajs/medusa/core-flows" -import ManagerModuleService from "../modules/manager/service" - -type CreateManagerWorkflowInput = { - manager: { - first_name: string - last_name: string - email: string - } - authIdentityId: string -} - -const createManagerStep = createStep( - "create-manager-step", - async ({ - manager: managerData, - }: Pick, - { container }) => { - const managerModuleService: ManagerModuleService = - container.resolve("managerModuleService") - - const manager = await managerModuleService.createManager( - managerData - ) - - return new StepResponse(manager) - } -) - -const createManagerWorkflow = createWorkflow( - "create-manager", - function (input: CreateManagerWorkflowInput) { - const manager = createManagerStep({ - manager: input.manager, - }) - - setAuthAppMetadataStep({ - authIdentityId: input.authIdentityId, - actorType: "manager", - value: manager.id, - }) - - return new WorkflowResponse(manager) - } -) - -export default createManagerWorkflow -``` - -This workflow accepts the manager’s data and the associated auth identity’s ID as inputs. The next sections explain how the auth identity ID is retrieved. - -The workflow has two steps: - -1. Create the manager using the `createManagerStep`. -2. Set the `app_metadata` property of the associated auth identity using the `setAuthAppMetadataStep` from Medusa's core workflows. You specify the actor type `manager` in the `actorType` property of the step’s input. - -*** - -## 2. Define the Create API Route - -Next, you’ll use the workflow defined in the previous section in an API route that creates a manager. - -So, create the file `src/api/manager/route.ts` with the following content: - -```ts title="src/api/manager/route.ts" highlights={createRouteHighlights} -import type { - AuthenticatedMedusaRequest, - MedusaResponse, -} from "@medusajs/framework/http" -import { MedusaError } from "@medusajs/framework/utils" -import createManagerWorkflow from "../../workflows/create-manager" - -type RequestBody = { - first_name: string - last_name: string - email: string -} - -export async function POST( - req: AuthenticatedMedusaRequest, - res: MedusaResponse -) { - // If `actor_id` is present, the request carries - // authentication for an existing manager - if (req.auth_context.actor_id) { - throw new MedusaError( - MedusaError.Types.INVALID_DATA, - "Request already authenticated as a manager." - ) - } - - const { result } = await createManagerWorkflow(req.scope) - .run({ - input: { - manager: req.body, - authIdentityId: req.auth_context.auth_identity_id, - }, - }) - - res.status(200).json({ manager: result }) -} -``` - -Since the manager must be associated with an `AuthIdentity` record, the request is expected to be authenticated, even if the manager isn’t created yet. This can be achieved by: - -1. Obtaining a token usng the [/auth route](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/auth/authentication-route/index.html.md). -2. Passing the token in the bearer header of the request to this route. - -In the API route, you create the manager using the workflow from the previous section and return it in the response. - -*** - -## 3. Apply the `authenticate` Middleware - -The last step is to apply the `authenticate` middleware on the API routes that require a manager’s authentication. - -To do that, create the file `src/api/middlewares.ts` with the following content: - -```ts title="src/api/middlewares.ts" highlights={middlewareHighlights} -import { - defineMiddlewares, - authenticate, -} from "@medusajs/framework/http" - -export default defineMiddlewares({ - routes: [ - { - matcher: "/manager", - method: "POST", - middlewares: [ - authenticate("manager", ["session", "bearer"], { - allowUnregistered: true, - }), - ], - }, - { - matcher: "/manager/me*", - middlewares: [ - authenticate("manager", ["session", "bearer"]), - ], - }, - ], -}) -``` - -This applies middlewares on two route patterns: - -1. The `authenticate` middleware is applied on the `/manager` API route for `POST` requests while allowing unregistered managers. This requires that a bearer token be passed in the request to access the manager’s auth identity but doesn’t require the manager to be registered. -2. The `authenticate` middleware is applied on all routes starting with `/manager/me`, restricting these routes to authenticated managers only. - -### Retrieve Manager API Route - -For example, create the file `src/api/manager/me/route.ts` with the following content: - -```ts title="src/api/manager/me/route.ts" -import { - AuthenticatedMedusaRequest, - MedusaResponse, -} from "@medusajs/framework/http" -import ManagerModuleService from "../../../modules/manager/service" - -export async function GET( - req: AuthenticatedMedusaRequest, - res: MedusaResponse -): Promise { - const managerModuleService: ManagerModuleService = - req.scope.resolve("managerModuleService") - - const manager = await managerModuleService.retrieveManager( - req.auth_context.actor_id - ) - - res.json({ manager }) -} -``` - -This route is only accessible by authenticated managers. You access the manager’s ID using `req.auth_context.actor_id`. - -*** - -## Test Custom Actor Type Authentication Flow - -To authenticate managers: - -1. Send a `POST` request to `/auth/manager/emailpass/register` to create an auth identity for the manager: - -```bash -curl -X POST 'http://localhost:9000/auth/manager/emailpass/register' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "email": "manager@gmail.com", - "password": "supersecret" -}' -``` - -Copy the returned token to use it in the next request. - -2. Send a `POST` request to `/manager` to create a manager: - -```bash -curl -X POST 'http://localhost:9000/manager' \ --H 'Content-Type: application/json' \ --H 'Authorization: Bearer {token}' \ ---data-raw '{ - "first_name": "John", - "last_name": "Doe", - "email": "manager@gmail.com" -}' -``` - -Replace `{token}` with the token returned in the previous step. - -3. Send a `POST` request to `/auth/manager/emailpass` again to retrieve an authenticated token for the manager: - -```bash -curl -X POST 'http://localhost:9000/auth/manager/emailpass' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "email": "manager@gmail.com", - "password": "supersecret" -}' -``` - -4. You can now send authenticated requests as a manager. For example, send a `GET` request to `/manager/me` to retrieve the authenticated manager’s details: - -```bash -curl 'http://localhost:9000/manager/me' \ --H 'Authorization: Bearer {token}' -``` - -Whenever you want to log in as a manager, use the `/auth/manager/emailpass` API route, as explained in step 3. - -*** - -## Delete User of Actor Type - -When you delete a user of the actor type, you must update its auth identity to remove the association to the user. - -For example, create the following workflow that deletes a manager and updates its auth identity, create the file `src/workflows/delete-manager.ts` with the following content: - -```ts title="src/workflows/delete-manager.ts" collapsibleLines="1-6" expandButtonLabel="Show Imports" -import { - createStep, - StepResponse, -} from "@medusajs/framework/workflows-sdk" -import ManagerModuleService from "../modules/manager/service" - -export type DeleteManagerWorkflow = { - id: string -} - -const deleteManagerStep = createStep( - "delete-manager-step", - async ( - { id }: DeleteManagerWorkflow, - { container }) => { - const managerModuleService: ManagerModuleService = - container.resolve("managerModuleService") - - const manager = await managerModuleService.retrieve(id) - - await managerModuleService.deleteManagers(id) - - return new StepResponse(undefined, { manager }) - }, - async ({ manager }, { container }) => { - const managerModuleService: ManagerModuleService = - container.resolve("managerModuleService") - - await managerModuleService.createManagers(manager) - } - ) -``` - -You add a step that deletes the manager using the `deleteManagers` method of the module's main service. In the compensation function, you create the manager again. - -Next, in the same file, add the workflow that deletes a manager: - -```ts title="src/workflows/delete-manager.ts" collapsibleLines="1-15" expandButtonLabel="Show Imports" highlights={deleteHighlights} -// other imports -import { MedusaError } from "@medusajs/framework/utils" -import { - WorkflowData, - WorkflowResponse, - createWorkflow, - transform, -} from "@medusajs/framework/workflows-sdk" -import { - setAuthAppMetadataStep, - useQueryGraphStep, -} from "@medusajs/medusa/core-flows" - -// ... - -export const deleteManagerWorkflow = createWorkflow( - "delete-manager", - ( - input: WorkflowData - ): WorkflowResponse => { - deleteManagerStep(input) - - const { data: authIdentities } = useQueryGraphStep({ - entity: "auth_identity", - fields: ["id"], - filters: { - app_metadata: { - // the ID is of the format `{actor_type}_id`. - manager_id: input.id, - }, - }, - }) - - const authIdentity = transform( - { authIdentities }, - ({ authIdentities }) => { - const authIdentity = authIdentities[0] - - if (!authIdentity) { - throw new MedusaError( - MedusaError.Types.NOT_FOUND, - "Auth identity not found" - ) - } - - return authIdentity - } - ) - - setAuthAppMetadataStep({ - authIdentityId: authIdentity.id, - actorType: "manager", - value: null, - }) - - return new WorkflowResponse(input.id) - } -) -``` - -In the workflow, you: - -1. Use the `deleteManagerStep` defined earlier to delete the manager. -2. Retrieve the auth identity of the manager using Query. To do that, you filter the `app_metadata` property of an auth identity, which holds the user's ID under `{actor_type_name}_id`. So, in this case, it's `manager_id`. -3. Check that the auth identity exist, then, update the auth identity to remove the ID of the manager from it. - -You can use this workflow when deleting a manager, such as in an API route. - - -# Auth Module Options - -In this document, you'll learn about the options of the Auth Module. - -## providers - -The `providers` option is an array of auth module providers. - -When the Medusa application starts, these providers are registered and can be used to handle authentication. - -By default, the `emailpass` provider is registered to authenticate customers and admin users. - -For example: - -```ts title="medusa-config.ts" -import { Modules, ContainerRegistrationKeys } from "@medusajs/framework/utils" - -// ... - -module.exports = defineConfig({ - // ... - modules: [ - { - resolve: "@medusajs/medusa/auth", - dependencies: [Modules.CACHE, ContainerRegistrationKeys.LOGGER], - options: { - providers: [ - { - resolve: "@medusajs/medusa/auth-emailpass", - id: "emailpass", - options: { - // provider options... - }, - }, - ], - }, - }, - ], -}) -``` - -The `providers` option is an array of objects that accept the following properties: - -- `resolve`: A string indicating the package name of the module provider or the path to it relative to the `src` directory. -- `id`: A string indicating the provider's unique name or ID. -- `options`: An optional object of the module provider's options. - -*** - -## Auth CORS - -The Medusa application's authentication API routes are defined under the `/auth` prefix that requires setting the `authCors` property of the `http` configuration. - -By default, the Medusa application you created will have an `AUTH_CORS` environment variable, which is used as the value of `authCors`. - -Refer to [Medusa's configuration guide](https://docs.medusajs.com/docs/learn/configurations/medusa-config#httpauthCors/index.html.md) to learn more about the `authCors` configuration. - -*** - -## authMethodsPerActor Configuration - -The Medusa application's configuration accept an `authMethodsPerActor` configuration which restricts the allowed auth providers used with an actor type. - -Learn more about the `authMethodsPerActor` configuration in [this guide](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/auth/auth-providers#configure-allowed-auth-providers-of-actor-types/index.html.md). - - -# How to Handle Password Reset Token Event - -In this guide, you'll learn how to handle the `auth.password_reset` event, which is emitted when a request is sent to the [Generate Reset Password Token API route](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/auth/authentication-route#generate-reset-password-token-route/index.html.md). - -Refer to this [Medusa Admin User Guide](https://docs.medusajs.com/user-guide/reset-password/index.html.md) to learn how to reset your user admin password using the dashboard. - -You'll create a subscriber that listens to the event. When the event is emitted, the subscriber sends an email notification to the user. - -### Prerequisites - -- [A notification provider module, such as SendGrid](https://docs.medusajs.com/infrastructure-modules/notification/sendgrid/index.html.md) - -## 1. Create Subscriber - -The first step is to create a subscriber that listens to the `auth.password_reset` and sends the user a notification with instructions to reset their password. - -Create the file `src/subscribers/handle-reset.ts` with the following content: - -```ts title="src/subscribers/handle-reset.ts" highlights={highlights} collapsibleLines="1-6" expandMoreLabel="Show Imports" -import { - SubscriberArgs, - type SubscriberConfig, -} from "@medusajs/medusa" -import { Modules } from "@medusajs/framework/utils" - -export default async function resetPasswordTokenHandler({ - event: { data: { - entity_id: email, - token, - actor_type, - } }, - container, -}: SubscriberArgs<{ entity_id: string, token: string, actor_type: string }>) { - const notificationModuleService = container.resolve( - Modules.NOTIFICATION - ) - - const urlPrefix = actor_type === "customer" ? - "https://storefront.com" : - "https://admin.com/app" - - await notificationModuleService.createNotifications({ - to: email, - channel: "email", - template: "reset-password-template", - data: { - // a URL to a frontend application - url: `${urlPrefix}/reset-password?token=${token}&email=${email}`, - }, - }) -} - -export const config: SubscriberConfig = { - event: "auth.password_reset", -} -``` - -You subscribe to the `auth.password_reset` event. The event has a data payload object with the following properties: - -- `entity_id`: The identifier of the user. When using the `emailpass` provider, it's the user's email. -- `token`: The token to reset the user's password. -- `actor_type`: The user's actor type. For example, if the user is a customer, the `actor_type` is `customer`. If it's an admin user, the `actor_type` is `user`. - -This event's payload previously had an `actorType` field. It was renamed to `actor_type` after [Medusa v2.0.7](https://github.com/medusajs/medusa/releases/tag/v2.0.7). - -In the subscriber, you: - -- Decide the frontend URL based on whether the user is a customer or admin user by checking the value of `actor_type`. -- Resolve the Notification Module and use its `createNotifications` method to send the notification. -- You pass to the `createNotifications` method an object having the following properties: - - `to`: The identifier to send the notification to, which in this case is the email. - - `channel`: The channel to send the notification through, which in this case is email. - - `template`: The template ID in the third-party service. - - `data`: The data payload to pass to the template. You pass the URL to redirect the user to. You must pass the token and email in the URL so that the frontend can send them later to the Medusa application when reseting the password. - -*** - -## 2. Test it Out: Generate Reset Password Token - -To test the subscriber out, send a request to the `/auth/{actor_type}/{auth_provider}/reset-password` API route, replacing `{actor_type}` and `{auth_provider}` with the user's actor type and provider used for authentication respectively. - -For example, to generate a reset password token for an admin user using the `emailpass` provider, send the following request: - -```bash -curl --location 'http://localhost:9000/auth/user/emailpass/reset-password' \ ---header 'Content-Type: application/json' \ ---data-raw '{ - "identifier": "admin-test@gmail.com" -}' -``` - -In the request body, you must pass an `identifier` parameter. Its value is the user's identifier, which is the email in this case. - -If the token is generated successfully, the request returns a response with `201` status code. In the terminal, you'll find the following message indicating that the `auth.password_reset` event was emitted and your subscriber ran: - -```plain -info: Processing auth.password_reset which has 1 subscribers -``` - -The notification is sent to the user with the frontend URL to enter a new password. - -*** - -## Next Steps: Implementing Frontend - -In your frontend, you must have a page that accepts `token` and `email` query parameters. - -The page shows the user password fields to enter their new password, then submits the new password, token, and email to the [Reset Password Route](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/auth/authentication-route#reset-password-route/index.html.md). - -### Examples - -- [Storefront Guide: Reset Customer Password](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/storefront-development/customers/reset-password/index.html.md) - - -# Customer Accounts - -In this document, you’ll learn how registered and unregistered accounts are distinguished in the Medusa application. - -Refer to this [Medusa Admin User Guide](https://docs.medusajs.com/user-guide/customers/index.html.md) to learn how to manage customers using the dashboard. - -## `has_account` Property - -The [Customer data model](https://docs.medusajs.com/references/customer/models/Customer/index.html.md) has a `has_account` property, which is a boolean that indicates whether a customer is registered. - -When a guest customer places an order, a new `Customer` record is created with `has_account` set to `false`. - -When this or another guest customer registers an account with the same email, a new `Customer` record is created with `has_account` set to `true`. - -*** - -## Email Uniqueness - -The above behavior means that two `Customer` records may exist with the same email. However, the main difference is the `has_account` property's value. - -So, there can only be one guest customer (having `has_account=false`) and one registered customer (having `has_account=true`) with the same email. - - -# Links between Customer Module and Other Modules - -This document showcases the module links defined between the Customer Module and other Commerce Modules. - -## Summary - -The Customer Module has the following links to other modules: - -Read-only links are used to query data across modules, but the relations aren't stored in a pivot table in the database. - -|First Data Model|Second Data Model|Type|Description| -|---|---|---|---| -|| in |Stored - many-to-many|| -| in ||Read-only - has one|| -| in ||Read-only - has one|| - -*** - -## Payment Module - -Medusa defines a link between the `Customer` and `AccountHolder` data models, allowing payment providers to save payment methods for a customer, if the payment provider supports it. - -This link is available starting from Medusa `v2.5.0`. - -### Retrieve with Query - -To retrieve the account holder associated with a customer with [Query](https://docs.medusajs.com/docs/learn/fundamentals/module-links/query/index.html.md), pass `customer.*` in `fields`: - -### query.graph - -```ts -const { data: customers } = await query.graph({ - entity: "customer", - fields: [ - "account_holder_link.account_holder.*", - ], -}) - -// customers[0].account_holder_link?.[0]?.account_holder -``` - -### useQueryGraphStep - -```ts -import { useQueryGraphStep } from "@medusajs/medusa/core-flows" - -// ... - -const { data: customers } = useQueryGraphStep({ - entity: "customer", - fields: [ - "account_holder_link.account_holder.*", - ], -}) - -// customers[0].account_holder_link?.[0]?.account_holder -``` - -### Manage with Link - -To manage the account holders of a customer, use [Link](https://docs.medusajs.com/docs/learn/fundamentals/module-links/link/index.html.md): - -### link.create - -```ts -import { Modules } from "@medusajs/framework/utils" - -// ... - -await link.create({ - [Modules.CUSTOMER]: { - customer_id: "cus_123", - }, - [Modules.PAYMENT]: { - account_holder_id: "acchld_123", - }, -}) -``` - -### createRemoteLinkStep - -```ts -import { createRemoteLinkStep } from "@medusajs/medusa/core-flows" - -// ... - -createRemoteLinkStep({ - [Modules.CUSTOMER]: { - customer_id: "cus_123", - }, - [Modules.PAYMENT]: { - account_holder_id: "acchld_123", - }, -}) -``` - -*** - -## Cart Module - -Medusa defines a read-only link between the [Cart Module](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/cart/index.html.md)'s `Cart` data model and the `Customer` data model. Because the link is read-only from the `Cart`'s side, you can only retrieve the customer of a cart, and not the other way around. - -### Retrieve with Query - -To retrieve the customer of a cart with [Query](https://docs.medusajs.com/docs/learn/fundamentals/module-links/query/index.html.md), pass `customer.*` in `fields`: - -### query.graph - -```ts -const { data: carts } = await query.graph({ - entity: "cart", - fields: [ - "customer.*", - ], -}) - -// carts.customer -``` - -### useQueryGraphStep - -```ts -import { useQueryGraphStep } from "@medusajs/medusa/core-flows" - -// ... - -const { data: carts } = useQueryGraphStep({ - entity: "cart", - fields: [ - "customer.*", - ], -}) - -// carts.customer -``` - -*** - -## Order Module - -Medusa defines a read-only link between the [Order Module](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/order/index.html.md)'s `Order` data model and the `Customer` data model. Because the link is read-only from the `Order`'s side, you can only retrieve the customer of an order, and not the other way around. - -### Retrieve with Query - -To retrieve the customer of an order with [Query](https://docs.medusajs.com/docs/learn/fundamentals/module-links/query/index.html.md), pass `customer.*` in `fields`: - -### query.graph - -```ts -const { data: orders } = await query.graph({ - entity: "order", - fields: [ - "customer.*", - ], -}) - -// orders.customer -``` - -### useQueryGraphStep - -```ts -import { useQueryGraphStep } from "@medusajs/medusa/core-flows" - -// ... - -const { data: orders } = useQueryGraphStep({ - entity: "order", - fields: [ - "customer.*", - ], -}) - -// orders.customer -``` - - # Cart Concepts In this document, you’ll get an overview of the main concepts of a cart. @@ -23063,47 +21599,1468 @@ await cartModuleService.setLineItemTaxLines( ``` -# Inventory Concepts +# Auth Providers -In this document, you’ll learn about the main concepts in the Inventory Module, and how data is stored and related. +In this document, you’ll learn how the Auth Module handles authentication using providers. -## InventoryItem +## What's an Auth Module Provider? -An inventory item, represented by the [InventoryItem data model](https://docs.medusajs.com/references/inventory-next/models/InventoryItem/index.html.md), is a stock-kept item, such as a product, whose inventory can be managed. +An auth module provider handles authenticating customers and users, either using custom logic or by integrating a third-party service. -The `InventoryItem` data model mainly holds details related to the underlying stock item, but has relations to other data models that include its inventory details. +For example, the EmailPass Auth Module Provider authenticates a user using their email and password, whereas the Google Auth Module Provider authenticates users using their Google account. -![A diagram showcasing the relation between data models in the Inventory Module](https://res.cloudinary.com/dza7lstvk/image/upload/v1709658103/Medusa%20Resources/inventory-architecture_kxr2ql.png) +### Auth Providers List -### Inventory Shipping Requirement - -An inventory item has a `requires_shipping` field (enabled by default) that indicates whether the item requires shipping. For example, if you're selling a digital license that has limited stock quantity but doesn't require shipping. - -When a product variant is purchased in the Medusa application, this field is used to determine whether the item requires shipping. Learn more in [this documentation](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/product/selling-products/index.html.md). +- [Emailpass](https://docs.medusajs.com/commerce-modules/auth/auth-providers/emailpass/index.html.md) +- [Google](https://docs.medusajs.com/commerce-modules/auth/auth-providers/google/index.html.md) +- [GitHub](https://docs.medusajs.com/commerce-modules/auth/auth-providers/github/index.html.md) *** -## InventoryLevel +## Configure Allowed Auth Providers of Actor Types -An inventory level, represented by the [InventoryLevel data model](https://docs.medusajs.com/references/inventory-next/models/InventoryLevel/index.html.md), holds the inventory and quantity details of an inventory item in a specific location. +By default, users of all actor types can authenticate with all installed auth module providers. -It has three quantity-related properties: +To restrict the auth providers used for actor types, use the [authMethodsPerActor option](https://docs.medusajs.com/docs/learn/configurations/medusa-config#httpauthMethodsPerActor/index.html.md) in Medusa's configurations: -- `stocked_quantity`: The available stock quantity of an item in the associated location. -- `reserved_quantity`: The quantity reserved from the available `stocked_quantity`. It indicates the quantity that's still not removed from stock, but considered as unavailable when checking whether an item is in stock. -- `incoming_quantity`: The incoming stock quantity of an item into the associated location. This property doesn't play into the `stocked_quantity` or when checking whether an item is in stock. +```ts title="medusa-config.ts" +module.exports = defineConfig({ + projectConfig: { + http: { + authMethodsPerActor: { + user: ["google"], + customer: ["emailpass"], + }, + // ... + }, + // ... + }, +}) +``` -### Associated Location - -The inventory level's location is determined by the `location_id` property. Medusa links the `InventoryLevel` data model with the `StockLocation` data model from the Stock Location Module. +When you specify the `authMethodsPerActor` configuration, it overrides the default. So, if you don't specify any providers for an actor type, users of that actor type can't authenticate with any provider. *** -## ReservationItem +## How to Create an Auth Module Provider -A reservation item, represented by the [ReservationItem](https://docs.medusajs.com/references/inventory-next/models/ReservationItem/index.html.md) data model, represents unavailable quantity of an inventory item in a location. It's used when an order is placed but not fulfilled yet. +Refer to [this guide](https://docs.medusajs.com/references/auth/provider/index.html.md) to learn how to create an auth module provider. -The reserved quantity is associated with a location, so it has a similar relation to that of the `InventoryLevel` with the Stock Location Module. + +# Auth Identity and Actor Types + +In this document, you’ll learn about concepts related to identity and actors in the Auth Module. + +## What is an Auth Identity? + +The [AuthIdentity data model](https://docs.medusajs.com/references/auth/models/AuthIdentity/index.html.md) represents a user registered by an [authentication provider](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/auth/auth-providers/index.html.md). When a user is registered using an authentication provider, the provider creates a record of `AuthIdentity`. + +Then, when the user logs-in in the future with the same authentication provider, the associated auth identity is used to validate their credentials. + +*** + +## Actor Types + +An actor type is a type of user that can be authenticated. The Auth Module doesn't store or manage any user-like models, such as for customers or users. Instead, the user types are created and managed by other modules. For example, a customer is managed by the [Customer Module](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/customer/index.html.md). + +Then, when an auth identity is created for the actor type, the ID of the user is stored in the `app_metadata` property of the auth identity. + +For example, an auth identity of a customer has the following `app_metadata` property: + +```json +{ + "app_metadata": { + "customer_id": "cus_123" + } +} +``` + +The ID of the user is stored in the key `{actor_type}_id` of the `app_metadata` property. + +*** + +## Protect Routes by Actor Type + +When you protect routes with the `authenticate` middleware, you specify in its first parameter the actor type that must be authenticated to access the specified API routes. + +For example: + +```ts title="src/api/middlewares.ts" highlights={highlights} +import { + defineMiddlewares, + authenticate, +} from "@medusajs/framework/http" + +export default defineMiddlewares({ + routes: [ + { + matcher: "/custom/admin*", + middlewares: [ + authenticate("user", ["session", "bearer", "api-key"]), + ], + }, + ], +}) +``` + +By specifying `user` as the first parameter of `authenticate`, only authenticated users of actor type `user` (admin users) can access API routes starting with `/custom/admin`. + +*** + +## Custom Actor Types + +You can define custom actor types that allows a custom user, managed by your custom module, to authenticate into Medusa. + +For example, if you have a custom module with a `Manager` data model, you can authenticate managers with the `manager` actor type. + +Learn how to create a custom actor type in [this guide](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/auth/create-actor-type/index.html.md). + + +# API Key Concepts + +In this document, you’ll learn about the different types of API keys, their expiration and verification. + +## API Key Types + +There are two types of API keys: + +- `publishable`: A public key used in client applications, such as a storefront. +- `secret`: A secret key used for authentication and verification purposes, such as an admin user’s authentication token or a password reset token. + +The API key’s type is stored in the `type` property of the [ApiKey data model](https://docs.medusajs.com/references/api-key/models/ApiKey/index.html.md). + +*** + +## API Key Expiration + +An API key expires when it’s revoked using the [revoke method of the module’s main service](https://docs.medusajs.com/references/api-key/revoke/index.html.md). + +The associated token is no longer usable or verifiable. + +*** + +## Token Verification + +To verify a token received as an input or in a request, use the [authenticate method of the module’s main service](https://docs.medusajs.com/references/api-key/authenticate/index.html.md) which validates the token against all non-expired tokens. + + +# How to Create an Actor Type + +In this document, learn how to create an actor type and authenticate its associated data model. + +## 0. Create Module with Data Model + +Before creating an actor type, you must have a module with a data model representing the actor type. + +Learn how to create a module in [this guide](https://docs.medusajs.com/docs/learn/fundamentals/modules/index.html.md). + +The rest of this guide uses this `Manager` data model as an example: + +```ts title="src/modules/manager/models/manager.ts" +import { model } from "@medusajs/framework/utils" + +const Manager = model.define("manager", { + id: model.id().primaryKey(), + firstName: model.text(), + lastName: model.text(), + email: model.text(), +}) + +export default Manager +``` + +*** + +## 1. Create Workflow + +Start by creating a workflow that does two things: + +- Creates a record of the `Manager` data model. +- Sets the `app_metadata` property of the associated `AuthIdentity` record based on the new actor type. + +For example, create the file `src/workflows/create-manager.ts`. with the following content: + +```ts title="src/workflows/create-manager.ts" highlights={workflowHighlights} +import { + createWorkflow, + createStep, + StepResponse, + WorkflowResponse, +} from "@medusajs/framework/workflows-sdk" +import { + setAuthAppMetadataStep, +} from "@medusajs/medusa/core-flows" +import ManagerModuleService from "../modules/manager/service" + +type CreateManagerWorkflowInput = { + manager: { + first_name: string + last_name: string + email: string + } + authIdentityId: string +} + +const createManagerStep = createStep( + "create-manager-step", + async ({ + manager: managerData, + }: Pick, + { container }) => { + const managerModuleService: ManagerModuleService = + container.resolve("managerModuleService") + + const manager = await managerModuleService.createManager( + managerData + ) + + return new StepResponse(manager) + } +) + +const createManagerWorkflow = createWorkflow( + "create-manager", + function (input: CreateManagerWorkflowInput) { + const manager = createManagerStep({ + manager: input.manager, + }) + + setAuthAppMetadataStep({ + authIdentityId: input.authIdentityId, + actorType: "manager", + value: manager.id, + }) + + return new WorkflowResponse(manager) + } +) + +export default createManagerWorkflow +``` + +This workflow accepts the manager’s data and the associated auth identity’s ID as inputs. The next sections explain how the auth identity ID is retrieved. + +The workflow has two steps: + +1. Create the manager using the `createManagerStep`. +2. Set the `app_metadata` property of the associated auth identity using the `setAuthAppMetadataStep` from Medusa's core workflows. You specify the actor type `manager` in the `actorType` property of the step’s input. + +*** + +## 2. Define the Create API Route + +Next, you’ll use the workflow defined in the previous section in an API route that creates a manager. + +So, create the file `src/api/manager/route.ts` with the following content: + +```ts title="src/api/manager/route.ts" highlights={createRouteHighlights} +import type { + AuthenticatedMedusaRequest, + MedusaResponse, +} from "@medusajs/framework/http" +import { MedusaError } from "@medusajs/framework/utils" +import createManagerWorkflow from "../../workflows/create-manager" + +type RequestBody = { + first_name: string + last_name: string + email: string +} + +export async function POST( + req: AuthenticatedMedusaRequest, + res: MedusaResponse +) { + // If `actor_id` is present, the request carries + // authentication for an existing manager + if (req.auth_context.actor_id) { + throw new MedusaError( + MedusaError.Types.INVALID_DATA, + "Request already authenticated as a manager." + ) + } + + const { result } = await createManagerWorkflow(req.scope) + .run({ + input: { + manager: req.body, + authIdentityId: req.auth_context.auth_identity_id, + }, + }) + + res.status(200).json({ manager: result }) +} +``` + +Since the manager must be associated with an `AuthIdentity` record, the request is expected to be authenticated, even if the manager isn’t created yet. This can be achieved by: + +1. Obtaining a token usng the [/auth route](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/auth/authentication-route/index.html.md). +2. Passing the token in the bearer header of the request to this route. + +In the API route, you create the manager using the workflow from the previous section and return it in the response. + +*** + +## 3. Apply the `authenticate` Middleware + +The last step is to apply the `authenticate` middleware on the API routes that require a manager’s authentication. + +To do that, create the file `src/api/middlewares.ts` with the following content: + +```ts title="src/api/middlewares.ts" highlights={middlewareHighlights} +import { + defineMiddlewares, + authenticate, +} from "@medusajs/framework/http" + +export default defineMiddlewares({ + routes: [ + { + matcher: "/manager", + method: "POST", + middlewares: [ + authenticate("manager", ["session", "bearer"], { + allowUnregistered: true, + }), + ], + }, + { + matcher: "/manager/me*", + middlewares: [ + authenticate("manager", ["session", "bearer"]), + ], + }, + ], +}) +``` + +This applies middlewares on two route patterns: + +1. The `authenticate` middleware is applied on the `/manager` API route for `POST` requests while allowing unregistered managers. This requires that a bearer token be passed in the request to access the manager’s auth identity but doesn’t require the manager to be registered. +2. The `authenticate` middleware is applied on all routes starting with `/manager/me`, restricting these routes to authenticated managers only. + +### Retrieve Manager API Route + +For example, create the file `src/api/manager/me/route.ts` with the following content: + +```ts title="src/api/manager/me/route.ts" +import { + AuthenticatedMedusaRequest, + MedusaResponse, +} from "@medusajs/framework/http" +import ManagerModuleService from "../../../modules/manager/service" + +export async function GET( + req: AuthenticatedMedusaRequest, + res: MedusaResponse +): Promise { + const managerModuleService: ManagerModuleService = + req.scope.resolve("managerModuleService") + + const manager = await managerModuleService.retrieveManager( + req.auth_context.actor_id + ) + + res.json({ manager }) +} +``` + +This route is only accessible by authenticated managers. You access the manager’s ID using `req.auth_context.actor_id`. + +*** + +## Test Custom Actor Type Authentication Flow + +To authenticate managers: + +1. Send a `POST` request to `/auth/manager/emailpass/register` to create an auth identity for the manager: + +```bash +curl -X POST 'http://localhost:9000/auth/manager/emailpass/register' \ +-H 'Content-Type: application/json' \ +--data-raw '{ + "email": "manager@gmail.com", + "password": "supersecret" +}' +``` + +Copy the returned token to use it in the next request. + +2. Send a `POST` request to `/manager` to create a manager: + +```bash +curl -X POST 'http://localhost:9000/manager' \ +-H 'Content-Type: application/json' \ +-H 'Authorization: Bearer {token}' \ +--data-raw '{ + "first_name": "John", + "last_name": "Doe", + "email": "manager@gmail.com" +}' +``` + +Replace `{token}` with the token returned in the previous step. + +3. Send a `POST` request to `/auth/manager/emailpass` again to retrieve an authenticated token for the manager: + +```bash +curl -X POST 'http://localhost:9000/auth/manager/emailpass' \ +-H 'Content-Type: application/json' \ +--data-raw '{ + "email": "manager@gmail.com", + "password": "supersecret" +}' +``` + +4. You can now send authenticated requests as a manager. For example, send a `GET` request to `/manager/me` to retrieve the authenticated manager’s details: + +```bash +curl 'http://localhost:9000/manager/me' \ +-H 'Authorization: Bearer {token}' +``` + +Whenever you want to log in as a manager, use the `/auth/manager/emailpass` API route, as explained in step 3. + +*** + +## Delete User of Actor Type + +When you delete a user of the actor type, you must update its auth identity to remove the association to the user. + +For example, create the following workflow that deletes a manager and updates its auth identity, create the file `src/workflows/delete-manager.ts` with the following content: + +```ts title="src/workflows/delete-manager.ts" collapsibleLines="1-6" expandButtonLabel="Show Imports" +import { + createStep, + StepResponse, +} from "@medusajs/framework/workflows-sdk" +import ManagerModuleService from "../modules/manager/service" + +export type DeleteManagerWorkflow = { + id: string +} + +const deleteManagerStep = createStep( + "delete-manager-step", + async ( + { id }: DeleteManagerWorkflow, + { container }) => { + const managerModuleService: ManagerModuleService = + container.resolve("managerModuleService") + + const manager = await managerModuleService.retrieve(id) + + await managerModuleService.deleteManagers(id) + + return new StepResponse(undefined, { manager }) + }, + async ({ manager }, { container }) => { + const managerModuleService: ManagerModuleService = + container.resolve("managerModuleService") + + await managerModuleService.createManagers(manager) + } + ) +``` + +You add a step that deletes the manager using the `deleteManagers` method of the module's main service. In the compensation function, you create the manager again. + +Next, in the same file, add the workflow that deletes a manager: + +```ts title="src/workflows/delete-manager.ts" collapsibleLines="1-15" expandButtonLabel="Show Imports" highlights={deleteHighlights} +// other imports +import { MedusaError } from "@medusajs/framework/utils" +import { + WorkflowData, + WorkflowResponse, + createWorkflow, + transform, +} from "@medusajs/framework/workflows-sdk" +import { + setAuthAppMetadataStep, + useQueryGraphStep, +} from "@medusajs/medusa/core-flows" + +// ... + +export const deleteManagerWorkflow = createWorkflow( + "delete-manager", + ( + input: WorkflowData + ): WorkflowResponse => { + deleteManagerStep(input) + + const { data: authIdentities } = useQueryGraphStep({ + entity: "auth_identity", + fields: ["id"], + filters: { + app_metadata: { + // the ID is of the format `{actor_type}_id`. + manager_id: input.id, + }, + }, + }) + + const authIdentity = transform( + { authIdentities }, + ({ authIdentities }) => { + const authIdentity = authIdentities[0] + + if (!authIdentity) { + throw new MedusaError( + MedusaError.Types.NOT_FOUND, + "Auth identity not found" + ) + } + + return authIdentity + } + ) + + setAuthAppMetadataStep({ + authIdentityId: authIdentity.id, + actorType: "manager", + value: null, + }) + + return new WorkflowResponse(input.id) + } +) +``` + +In the workflow, you: + +1. Use the `deleteManagerStep` defined earlier to delete the manager. +2. Retrieve the auth identity of the manager using Query. To do that, you filter the `app_metadata` property of an auth identity, which holds the user's ID under `{actor_type_name}_id`. So, in this case, it's `manager_id`. +3. Check that the auth identity exist, then, update the auth identity to remove the ID of the manager from it. + +You can use this workflow when deleting a manager, such as in an API route. + + +# How to Handle Password Reset Token Event + +In this guide, you'll learn how to handle the `auth.password_reset` event, which is emitted when a request is sent to the [Generate Reset Password Token API route](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/auth/authentication-route#generate-reset-password-token-route/index.html.md). + +Refer to this [Medusa Admin User Guide](https://docs.medusajs.com/user-guide/reset-password/index.html.md) to learn how to reset your user admin password using the dashboard. + +You'll create a subscriber that listens to the event. When the event is emitted, the subscriber sends an email notification to the user. + +### Prerequisites + +- [A notification provider module, such as SendGrid](https://docs.medusajs.com/infrastructure-modules/notification/sendgrid/index.html.md) + +## 1. Create Subscriber + +The first step is to create a subscriber that listens to the `auth.password_reset` and sends the user a notification with instructions to reset their password. + +Create the file `src/subscribers/handle-reset.ts` with the following content: + +```ts title="src/subscribers/handle-reset.ts" highlights={highlights} collapsibleLines="1-6" expandMoreLabel="Show Imports" +import { + SubscriberArgs, + type SubscriberConfig, +} from "@medusajs/medusa" +import { Modules } from "@medusajs/framework/utils" + +export default async function resetPasswordTokenHandler({ + event: { data: { + entity_id: email, + token, + actor_type, + } }, + container, +}: SubscriberArgs<{ entity_id: string, token: string, actor_type: string }>) { + const notificationModuleService = container.resolve( + Modules.NOTIFICATION + ) + + const urlPrefix = actor_type === "customer" ? + "https://storefront.com" : + "https://admin.com/app" + + await notificationModuleService.createNotifications({ + to: email, + channel: "email", + template: "reset-password-template", + data: { + // a URL to a frontend application + url: `${urlPrefix}/reset-password?token=${token}&email=${email}`, + }, + }) +} + +export const config: SubscriberConfig = { + event: "auth.password_reset", +} +``` + +You subscribe to the `auth.password_reset` event. The event has a data payload object with the following properties: + +- `entity_id`: The identifier of the user. When using the `emailpass` provider, it's the user's email. +- `token`: The token to reset the user's password. +- `actor_type`: The user's actor type. For example, if the user is a customer, the `actor_type` is `customer`. If it's an admin user, the `actor_type` is `user`. + +This event's payload previously had an `actorType` field. It was renamed to `actor_type` after [Medusa v2.0.7](https://github.com/medusajs/medusa/releases/tag/v2.0.7). + +In the subscriber, you: + +- Decide the frontend URL based on whether the user is a customer or admin user by checking the value of `actor_type`. +- Resolve the Notification Module and use its `createNotifications` method to send the notification. +- You pass to the `createNotifications` method an object having the following properties: + - `to`: The identifier to send the notification to, which in this case is the email. + - `channel`: The channel to send the notification through, which in this case is email. + - `template`: The template ID in the third-party service. + - `data`: The data payload to pass to the template. You pass the URL to redirect the user to. You must pass the token and email in the URL so that the frontend can send them later to the Medusa application when reseting the password. + +*** + +## 2. Test it Out: Generate Reset Password Token + +To test the subscriber out, send a request to the `/auth/{actor_type}/{auth_provider}/reset-password` API route, replacing `{actor_type}` and `{auth_provider}` with the user's actor type and provider used for authentication respectively. + +For example, to generate a reset password token for an admin user using the `emailpass` provider, send the following request: + +```bash +curl --location 'http://localhost:9000/auth/user/emailpass/reset-password' \ +--header 'Content-Type: application/json' \ +--data-raw '{ + "identifier": "admin-test@gmail.com" +}' +``` + +In the request body, you must pass an `identifier` parameter. Its value is the user's identifier, which is the email in this case. + +If the token is generated successfully, the request returns a response with `201` status code. In the terminal, you'll find the following message indicating that the `auth.password_reset` event was emitted and your subscriber ran: + +```plain +info: Processing auth.password_reset which has 1 subscribers +``` + +The notification is sent to the user with the frontend URL to enter a new password. + +*** + +## Next Steps: Implementing Frontend + +In your frontend, you must have a page that accepts `token` and `email` query parameters. + +The page shows the user password fields to enter their new password, then submits the new password, token, and email to the [Reset Password Route](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/auth/authentication-route#reset-password-route/index.html.md). + +### Examples + +- [Storefront Guide: Reset Customer Password](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/storefront-development/customers/reset-password/index.html.md) + + +# Auth Module Options + +In this document, you'll learn about the options of the Auth Module. + +## providers + +The `providers` option is an array of auth module providers. + +When the Medusa application starts, these providers are registered and can be used to handle authentication. + +By default, the `emailpass` provider is registered to authenticate customers and admin users. + +For example: + +```ts title="medusa-config.ts" +import { Modules, ContainerRegistrationKeys } from "@medusajs/framework/utils" + +// ... + +module.exports = defineConfig({ + // ... + modules: [ + { + resolve: "@medusajs/medusa/auth", + dependencies: [Modules.CACHE, ContainerRegistrationKeys.LOGGER], + options: { + providers: [ + { + resolve: "@medusajs/medusa/auth-emailpass", + id: "emailpass", + options: { + // provider options... + }, + }, + ], + }, + }, + ], +}) +``` + +The `providers` option is an array of objects that accept the following properties: + +- `resolve`: A string indicating the package name of the module provider or the path to it relative to the `src` directory. +- `id`: A string indicating the provider's unique name or ID. +- `options`: An optional object of the module provider's options. + +*** + +## Auth CORS + +The Medusa application's authentication API routes are defined under the `/auth` prefix that requires setting the `authCors` property of the `http` configuration. + +By default, the Medusa application you created will have an `AUTH_CORS` environment variable, which is used as the value of `authCors`. + +Refer to [Medusa's configuration guide](https://docs.medusajs.com/docs/learn/configurations/medusa-config#httpauthCors/index.html.md) to learn more about the `authCors` configuration. + +*** + +## authMethodsPerActor Configuration + +The Medusa application's configuration accept an `authMethodsPerActor` configuration which restricts the allowed auth providers used with an actor type. + +Learn more about the `authMethodsPerActor` configuration in [this guide](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/auth/auth-providers#configure-allowed-auth-providers-of-actor-types/index.html.md). + + +# Customer Accounts + +In this document, you’ll learn how registered and unregistered accounts are distinguished in the Medusa application. + +Refer to this [Medusa Admin User Guide](https://docs.medusajs.com/user-guide/customers/index.html.md) to learn how to manage customers using the dashboard. + +## `has_account` Property + +The [Customer data model](https://docs.medusajs.com/references/customer/models/Customer/index.html.md) has a `has_account` property, which is a boolean that indicates whether a customer is registered. + +When a guest customer places an order, a new `Customer` record is created with `has_account` set to `false`. + +When this or another guest customer registers an account with the same email, a new `Customer` record is created with `has_account` set to `true`. + +*** + +## Email Uniqueness + +The above behavior means that two `Customer` records may exist with the same email. However, the main difference is the `has_account` property's value. + +So, there can only be one guest customer (having `has_account=false`) and one registered customer (having `has_account=true`) with the same email. + + +# Authentication Flows with the Auth Main Service + +In this document, you'll learn how to use the Auth Module's main service's methods to implement authentication flows and reset a user's password. + +## Authentication Methods + +### Register + +The [register method of the Auth Module's main service](https://docs.medusajs.com/references/auth/register/index.html.md) creates an auth identity that can be authenticated later. + +For example: + +```ts +const data = await authModuleService.register( + "emailpass", + // passed to auth provider + { + // ... + } +) +``` + +This method calls the `register` method of the provider specified in the first parameter and returns its data. + +### Authenticate + +To authenticate a user, you use the [authenticate method of the Auth Module's main service](https://docs.medusajs.com/references/auth/authenticate/index.html.md). For example: + +```ts +const data = await authModuleService.authenticate( + "emailpass", + // passed to auth provider + { + // ... + } +) +``` + +This method calls the `authenticate` method of the provider specified in the first parameter and returns its data. + +*** + +## Auth Flow 1: Basic Authentication + +The basic authentication flow requires first using the `register` method, then the `authenticate` method: + +```ts +const { success, authIdentity, error } = await authModuleService.register( + "emailpass", + // passed to auth provider + { + // ... + } +) + +if (error) { + // registration failed + // TODO return an error + return +} + +// later (can be another route for log-in) +const { success, authIdentity, location } = await authModuleService.authenticate( + "emailpass", + // passed to auth provider + { + // ... + } +) + +if (success && !location) { + // user is authenticated +} +``` + +If `success` is true and `location` isn't set, the user is authenticated successfully, and their authentication details are available within the `authIdentity` object. + +The next section explains the flow if `location` is set. + +Check out the [AuthIdentity](https://docs.medusajs.com/references/auth/models/AuthIdentity/index.html.md) reference for the received properties in `authIdentity`. + +![Diagram showcasing the basic authentication flow](https://res.cloudinary.com/dza7lstvk/image/upload/v1711373749/Medusa%20Resources/basic-auth_lgpqsj.jpg) + +### Auth Identity with Same Identifier + +If an auth identity, such as a `customer`, tries to register with an email of another auth identity, the `register` method returns an error. This can happen either if another customer is using the same email, or an admin user has the same email. + +There are two ways to handle this: + +- Consider the customer authenticated if the `authenticate` method validates that the email and password are correct. This allows admin users, for example, to authenticate as customers. +- Return an error message to the customer, informing them that the email is already in use. + +*** + +## Auth Flow 2: Third-Party Service Authentication + +The third-party service authentication method requires using the `authenticate` method first: + +```ts +const { success, authIdentity, location } = await authModuleService.authenticate( + "google", + // passed to auth provider + { + // ... + } +) + +if (location) { + // return the location for the front-end to redirect to +} + +if (!success) { + // authentication failed +} + +// authentication successful +``` + +If the `authenticate` method returns a `location` property, the authentication process requires the user to perform an action with a third-party service. So, you return the `location` to the front-end or client to redirect to that URL. + +For example, when using the `google` provider, the `location` is the URL that the user is navigated to login. + +![Diagram showcasing the first part of the third-party authentication flow](https://res.cloudinary.com/dza7lstvk/image/upload/v1711374847/Medusa%20Resources/third-party-auth-1_enyedy.jpg) + +### Overriding Callback URL + +The Google and GitHub providers allow you to override their `callbackUrl` option during authentication. This is useful when you redirect the user after authentication to a URL based on its actor type. For example, you redirect admin users and customers to different pages. + +```ts +const { success, authIdentity, location } = await authModuleService.authenticate( + "google", + // passed to auth provider + { + // ... + callback_url: "example.com", + } +) +``` + +### validateCallback + +Providers handling this authentication flow must implement the `validateCallback` method. It implements the logic to validate the authentication with the third-party service. + +So, once the user performs the required action with the third-party service (for example, log-in with Google), the frontend must redirect to an API route that uses the [validateCallback method of the Auth Module's main service](https://docs.medusajs.com/references/auth/validateCallback/index.html.md). + +The method calls the specified provider’s `validateCallback` method passing it the authentication details it received in the second parameter: + +```ts +const { success, authIdentity } = await authModuleService.validateCallback( + "google", + // passed to auth provider + { + // request data, such as + url, + headers, + query, + body, + protocol, + } +) + +if (success) { + // authentication succeeded +} +``` + +For providers like Google, the `query` object contains the query parameters from the original callback URL, such as the `code` and `state` parameters. + +If the returned `success` property is `true`, the authentication with the third-party provider was successful. + +![Diagram showcasing the second part of the third-party authentication flow](https://res.cloudinary.com/dza7lstvk/image/upload/v1711375123/Medusa%20Resources/third-party-auth-2_kmjxju.jpg) + +*** + +## Reset Password + +To update a user's password or other authentication details, use the `updateProvider` method of the Auth Module's main service. It calls the `update` method of the specified authentication provider. + +For example: + +```ts +const { success } = await authModuleService.updateProvider( + "emailpass", + // passed to the auth provider + { + entity_id: "user@example.com", + password: "supersecret", + } +) + +if (success) { + // password reset successfully +} +``` + +The method accepts as a first parameter the ID of the provider, and as a second parameter the data necessary to reset the password. + +In the example above, you use the `emailpass` provider, so you have to pass an object having an `email` and `password` properties. + +If the returned `success` property is `true`, the password has reset successfully. + + +# Links between Customer Module and Other Modules + +This document showcases the module links defined between the Customer Module and other Commerce Modules. + +## Summary + +The Customer Module has the following links to other modules: + +Read-only links are used to query data across modules, but the relations aren't stored in a pivot table in the database. + +|First Data Model|Second Data Model|Type|Description| +|---|---|---|---| +|| in |Stored - many-to-many|| +| in ||Read-only - has one|| +| in ||Read-only - has one|| + +*** + +## Payment Module + +Medusa defines a link between the `Customer` and `AccountHolder` data models, allowing payment providers to save payment methods for a customer, if the payment provider supports it. + +This link is available starting from Medusa `v2.5.0`. + +### Retrieve with Query + +To retrieve the account holder associated with a customer with [Query](https://docs.medusajs.com/docs/learn/fundamentals/module-links/query/index.html.md), pass `customer.*` in `fields`: + +### query.graph + +```ts +const { data: customers } = await query.graph({ + entity: "customer", + fields: [ + "account_holder_link.account_holder.*", + ], +}) + +// customers[0].account_holder_link?.[0]?.account_holder +``` + +### useQueryGraphStep + +```ts +import { useQueryGraphStep } from "@medusajs/medusa/core-flows" + +// ... + +const { data: customers } = useQueryGraphStep({ + entity: "customer", + fields: [ + "account_holder_link.account_holder.*", + ], +}) + +// customers[0].account_holder_link?.[0]?.account_holder +``` + +### Manage with Link + +To manage the account holders of a customer, use [Link](https://docs.medusajs.com/docs/learn/fundamentals/module-links/link/index.html.md): + +### link.create + +```ts +import { Modules } from "@medusajs/framework/utils" + +// ... + +await link.create({ + [Modules.CUSTOMER]: { + customer_id: "cus_123", + }, + [Modules.PAYMENT]: { + account_holder_id: "acchld_123", + }, +}) +``` + +### createRemoteLinkStep + +```ts +import { createRemoteLinkStep } from "@medusajs/medusa/core-flows" + +// ... + +createRemoteLinkStep({ + [Modules.CUSTOMER]: { + customer_id: "cus_123", + }, + [Modules.PAYMENT]: { + account_holder_id: "acchld_123", + }, +}) +``` + +*** + +## Cart Module + +Medusa defines a read-only link between the [Cart Module](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/cart/index.html.md)'s `Cart` data model and the `Customer` data model. Because the link is read-only from the `Cart`'s side, you can only retrieve the customer of a cart, and not the other way around. + +### Retrieve with Query + +To retrieve the customer of a cart with [Query](https://docs.medusajs.com/docs/learn/fundamentals/module-links/query/index.html.md), pass `customer.*` in `fields`: + +### query.graph + +```ts +const { data: carts } = await query.graph({ + entity: "cart", + fields: [ + "customer.*", + ], +}) + +// carts.customer +``` + +### useQueryGraphStep + +```ts +import { useQueryGraphStep } from "@medusajs/medusa/core-flows" + +// ... + +const { data: carts } = useQueryGraphStep({ + entity: "cart", + fields: [ + "customer.*", + ], +}) + +// carts.customer +``` + +*** + +## Order Module + +Medusa defines a read-only link between the [Order Module](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/order/index.html.md)'s `Order` data model and the `Customer` data model. Because the link is read-only from the `Order`'s side, you can only retrieve the customer of an order, and not the other way around. + +### Retrieve with Query + +To retrieve the customer of an order with [Query](https://docs.medusajs.com/docs/learn/fundamentals/module-links/query/index.html.md), pass `customer.*` in `fields`: + +### query.graph + +```ts +const { data: orders } = await query.graph({ + entity: "order", + fields: [ + "customer.*", + ], +}) + +// orders.customer +``` + +### useQueryGraphStep + +```ts +import { useQueryGraphStep } from "@medusajs/medusa/core-flows" + +// ... + +const { data: orders } = useQueryGraphStep({ + entity: "order", + fields: [ + "customer.*", + ], +}) + +// orders.customer +``` + + +# How to Use Authentication Routes + +In this document, you'll learn about the authentication routes and how to use them to create and log-in users, and reset their password. + +These routes are added by Medusa's HTTP layer, not the Auth Module. + +## Types of Authentication Flows + +### 1. Basic Authentication Flow + +This authentication flow doesn't require validation with third-party services. + +[How to register customer in storefront using basic authentication flow](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/storefront-development/customers/register/index.html.md). + +The steps are: + +![Diagram showcasing the basic authentication flow between the frontend and the Medusa application](https://res.cloudinary.com/dza7lstvk/image/upload/v1725539370/Medusa%20Resources/basic-auth-routes_pgpjch.jpg) + +1. Register the user with the [Register Route](#register-route). +2. Use the authentication token to create the user with their respective API route. + - For example, for customers you would use the [Create Customer API route](https://docs.medusajs.com/api/store#customers_postcustomers). + - For admin users, you accept an invite using the [Accept Invite API route](https://docs.medusajs.com/api/admin#invites_postinvitesaccept) +3. Authenticate the user with the [Auth Route](#login-route). + +After registration, you only use the [Auth Route](#login-route) for subsequent authentication. + +To handle errors related to existing identities, refer to [this section](#handling-existing-identities). + +### 2. Third-Party Service Authenticate Flow + +This authentication flow authenticates the user with a third-party service, such as Google. + +[How to authenticate customer with a third-party provider in the storefront.](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/storefront-development/customers/third-party-login/index.html.md). + +It requires the following steps: + +![Diagram showcasing the authentication flow between the frontend, Medusa application, and third-party service](https://res.cloudinary.com/dza7lstvk/image/upload/v1725528159/Medusa%20Resources/Third_Party_Auth_tvf4ng.jpg) + +1. Authenticate the user with the [Auth Route](#login-route). +2. The auth route returns a URL to authenticate with third-party service, such as login with Google. The frontend (such as a storefront), when it receives a `location` property in the response, must redirect to the returned location. +3. Once the authentication with the third-party service finishes, it redirects back to the frontend with a `code` query parameter. So, make sure your third-party service is configured to redirect to your frontend page after successful authentication. +4. The frontend sends a request to the [Validate Callback Route](#validate-callback-route) passing it the query parameters received from the third-party service, such as the `code` and `state` query parameters. +5. If the callback validation is successful, the frontend receives the authentication token. +6. Decode the received token in the frontend using tools like [react-jwt](https://www.npmjs.com/package/react-jwt). + - If the decoded data has an `actor_id` property, then the user is already registered. So, use this token for subsequent authenticated requests. + - If not, follow the rest of the steps. +7. The frontend uses the authentication token to create the user with their respective API route. + - For example, for customers you would use the [Create Customer API route](https://docs.medusajs.com/api/store#customers_postcustomers). + - For admin users, you accept an invite using the [Accept Invite API route](https://docs.medusajs.com/api/admin#invites_postinvitesaccept) +8. The frontend sends a request to the [Refresh Token Route](#refresh-token-route) to retrieve a new token with the user information populated. + +*** + +## Register Route + +The Medusa application defines an API route at `/auth/{actor_type}/{provider}/register` that creates an auth identity for an actor type, such as a `customer`. It returns a JWT token that you pass to an API route that creates the user. + +```bash +curl -X POST http://localhost:9000/auth/{actor_type}/{providers}/register +-H 'Content-Type: application/json' \ +--data-raw '{ + "email": "Whitney_Schultz@gmail.com" + // ... +}' +``` + +This API route is useful for providers like `emailpass` that uses custom logic to authenticate a user. For authentication providers that authenticate with third-party services, such as Google, use the [Auth Route](#login-route) instead. + +For example, if you're registering a customer, you: + +1. Send a request to `/auth/customer/emailpass/register` to retrieve the registration JWT token. +2. Send a request to the [Create Customer API route](https://docs.medusajs.com/api/store#customers_postcustomers) to create the customer, passing the [JWT token in the header](https://docs.medusajs.com/api/store#authentication). + +### Path Parameters + +Its path parameters are: + +- `{actor_type}`: the actor type of the user you're authenticating. For example, `customer`. +- `{provider}`: the auth provider to handle the authentication. For example, `emailpass`. + +### Request Body Parameters + +This route accepts in the request body the data that the specified authentication provider requires to handle authentication. + +For example, the EmailPass provider requires an `email` and `password` fields in the request body. + +### Response Fields + +If the authentication is successful, you'll receive a `token` field in the response body object: + +```json +{ + "token": "..." +} +``` + +Use that token in the header of subsequent requests to send authenticated requests. + +### Handling Existing Identities + +An auth identity with the same email may already exist in Medusa. This can happen if: + +- Another actor type is using that email. For example, an admin user is trying to register as a customer. +- The same email belongs to a record of the same actor type. For example, another customer has the same email. + +In these scenarios, the Register Route will return an error instead of a token: + +```json +{ + "type": "unauthorized", + "message": "Identity with email already exists" +} +``` + +To handle these scenarios, you can use the [Login Route](#login-route) to validate that the email and password match the existing identity. If so, you can allow the admin user, for example, to register as a customer. + +Otherwise, if the email and password don't match the existing identity, such as when the email belongs to another customer, the [Login Route](#login-route) returns an error: + +```json +{ + "type": "unauthorized", + "message": "Invalid email or password" +} +``` + +You can show that error message to the customer. + +*** + +## Login Route + +The Medusa application defines an API route at `/auth/{actor_type}/{provider}` that authenticates a user of an actor type. It returns a JWT token that can be passed in [the header of subsequent requests](https://docs.medusajs.com/api/store#authentication) to send authenticated requests. + +```bash +curl -X POST http://localhost:9000/auth/{actor_type}/{providers} +-H 'Content-Type: application/json' \ +--data-raw '{ + "email": "Whitney_Schultz@gmail.com" + // ... +}' +``` + +For example, if you're authenticating a customer, you send a request to `/auth/customer/emailpass`. + +### Path Parameters + +Its path parameters are: + +- `{actor_type}`: the actor type of the user you're authenticating. For example, `customer`. +- `{provider}`: the auth provider to handle the authentication. For example, `emailpass`. + +### Request Body Parameters + +This route accepts in the request body the data that the specified authentication provider requires to handle authentication. + +For example, the EmailPass provider requires an `email` and `password` fields in the request body. + +#### Overriding Callback URL + +For the [GitHub](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/auth/auth-providers/github/index.html.md) and [Google](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/auth/auth-providers/google/index.html.md) providers, you can pass a `callback_url` body parameter that overrides the `callbackUrl` set in the provider's configurations. + +This is useful if you want to redirect the user to a different URL after authentication based on their actor type. For example, you can set different `callback_url` for admin users and customers. + +### Response Fields + +If the authentication is successful, you'll receive a `token` field in the response body object: + +```json +{ + "token": "..." +} +``` + +Use that token in the header of subsequent requests to send authenticated requests. + +If the authentication requires more action with a third-party service, you'll receive a `location` property: + +```json +{ + "location": "https://..." +} +``` + +Redirect to that URL in the frontend to continue the authentication process with the third-party service. + +[How to login Customers using the authentication route](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/storefront-development/customers/login/index.html.md). + +*** + +## Validate Callback Route + +The Medusa application defines an API route at `/auth/{actor_type}/{provider}/callback` that's useful for validating the authentication callback or redirect from third-party services like Google. + +```bash +curl -X POST http://localhost:9000/auth/{actor_type}/{providers}/callback?code=123&state=456 +``` + +Refer to the [third-party authentication flow](#2-third-party-service-authenticate-flow) section to see how this route fits into the authentication flow. + +### Path Parameters + +Its path parameters are: + +- `{actor_type}`: the actor type of the user you're authenticating. For example, `customer`. +- `{provider}`: the auth provider to handle the authentication. For example, `google`. + +### Query Parameters + +This route accepts all the query parameters that the third-party service sends to the frontend after the user completes the authentication process, such as the `code` and `state` query parameters. + +### Response Fields + +If the authentication is successful, you'll receive a `token` field in the response body object: + +```json +{ + "token": "..." +} +``` + +In your frontend, decode the token using tools like [react-jwt](https://www.npmjs.com/package/react-jwt): + +- If the decoded data has an `actor_id` property, the user is already registered. So, use this token for subsequent authenticated requests. +- If not, use the token in the header of a request that creates the user, such as the [Create Customer API route](https://docs.medusajs.com/api/store#customers_postcustomers). + +*** + +## Refresh Token Route + +The Medusa application defines an API route at `/auth/token/refresh` that's useful after authenticating a user with a third-party service to populate the user's token with their new information. + +It requires the user's JWT token that they received from the authentication or callback routes. + +```bash +curl -X POST http://localhost:9000/auth/token/refresh \ +-H 'Authorization: Bearer {token}' +``` + +### Response Fields + +If the token was refreshed successfully, you'll receive a `token` field in the response body object: + +```json +{ + "token": "..." +} +``` + +Use that token in the header of subsequent requests to send authenticated requests. + +*** + +## Reset Password Routes + +To reset a user's password: + +1. Generate a token using the [Generate Reset Password Token API route](#generate-reset-password-token-route). + - The API route emits the `auth.password_reset` event, passing the token in the payload. + - You can create a subscriber, as seen in [this guide](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/auth/reset-password/index.html.md), that listens to the event and send a notification to the user. +2. Pass the token to the [Reset Password API route](#reset-password-route) to reset the password. + - The URL in the user's notification should direct them to a frontend URL, which sends a request to this route. + +[Storefront Development: How to Reset a Customer's Password.](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/storefront-development/customers/reset-password/index.html.md) + +### Generate Reset Password Token Route + +The Medusa application defines an API route at `/auth/{actor_type}/{auth_provider}/reset-password` that emits the `auth.password_reset` event, passing the token in the payload. + +```bash +curl -X POST http://localhost:9000/auth/{actor_type}/{providers}/reset-password +-H 'Content-Type: application/json' \ +--data-raw '{ + "identifier": "Whitney_Schultz@gmail.com" +}' +``` + +This API route is useful for providers like `emailpass` that store a user's password and use it for authentication. + +#### Path Parameters + +Its path parameters are: + +- `{actor_type}`: the actor type of the user you're authenticating. For example, `customer`. +- `{provider}`: the auth provider to handle the authentication. For example, `emailpass`. + +#### Request Body Parameters + +This route accepts in the request body an object having the following property: + +- `identifier`: The user's identifier in the specified auth provider. For example, for the `emailpass` auth provider, you pass the user's email. + +#### Response Fields + +If the authentication is successful, the request returns a `201` response code. + +### Reset Password Route + +The Medusa application defines an API route at `/auth/{actor_type}/{auth_provider}/update` that accepts a token and, if valid, updates the user's password. + +```bash +curl -X POST http://localhost:9000/auth/{actor_type}/{providers}/update +-H 'Content-Type: application/json' \ +-H 'Authorization: Bearer {token}' \ +--data-raw '{ + "email": "Whitney_Schultz@gmail.com", + "password": "supersecret" +}' +``` + +This API route is useful for providers like `emailpass` that store a user's password and use it for logging them in. + +#### Path Parameters + +Its path parameters are: + +- `{actor_type}`: the actor type of the user you're authenticating. For example, `customer`. +- `{provider}`: the auth provider to handle the authentication. For example, `emailpass`. + +#### Pass Token in Authorization Header + +Before [Medusa v2.6](https://github.com/medusajs/medusa/releases/tag/v2.6), you passed the token as a query parameter. Now, you must pass it in the `Authorization` header. + +In the request's authorization header, you must pass the token generated using the [Generate Reset Password Token route](#generate-reset-password-token-route). You pass it as a bearer token. + +### Request Body Parameters + +This route accepts in the request body an object that has the data necessary for the provider to update the user's password. + +For the `emailpass` provider, you must pass the following properties: + +- `email`: The user's email. +- `password`: The new password. + +### Response Fields + +If the authentication is successful, the request returns an object with a `success` property set to `true`: + +```json +{ + "success": "true" +} +``` # Links between Currency Module and Other Modules @@ -23163,6 +23120,707 @@ const { data: stores } = useQueryGraphStep({ ``` +# Fulfillment Concepts + +In this document, you’ll learn about some basic fulfillment concepts. + +## Fulfillment Set + +A fulfillment set is a general form or way of fulfillment. For example, shipping is a form of fulfillment, and pick-up is another form of fulfillment. Each of these can be created as fulfillment sets. + +A fulfillment set is represented by the [FulfillmentSet data model](https://docs.medusajs.com/references/fulfillment/models/FulfillmentSet/index.html.md). All other configurations, options, and management features are related to a fulfillment set, in one way or another. + +```ts +const fulfillmentSets = await fulfillmentModuleService.createFulfillmentSets( + [ + { + name: "Shipping", + type: "shipping", + }, + { + name: "Pick-up", + type: "pick-up", + }, + ] +) +``` + +*** + +## Service Zone + +A service zone is a collection of geographical zones or areas. It’s used to restrict available shipping options to a defined set of locations. + +A service zone is represented by the [ServiceZone data model](https://docs.medusajs.com/references/fulfillment/models/ServiceZone/index.html.md). It’s associated with a fulfillment set, as each service zone is specific to a form of fulfillment. For example, if a customer chooses to pick up items, you can restrict the available shipping options based on their location. + +![A diagram showcasing the relation between fulfillment sets, service zones, and geo zones](https://res.cloudinary.com/dza7lstvk/image/upload/v1712329770/Medusa%20Resources/service-zone_awmvfs.jpg) + +A service zone can have multiple geographical zones, each represented by the [GeoZone data model](https://docs.medusajs.com/references/fulfillment/models/GeoZone/index.html.md). It holds location-related details to narrow down supported areas, such as country, city, or province code. + +*** + +## Shipping Profile + +A shipping profile defines a type of items that are shipped in a similar manner. For example, a `default` shipping profile is used for all item types, but the `digital` shipping profile is used for digital items that aren’t shipped and delivered conventionally. + +A shipping profile is represented by the [ShippingProfile data model](https://docs.medusajs.com/references/fulfillment/models/ShippingProfile/index.html.md). It only defines the profile’s details, but it’s associated with the shipping options available for the item type. + + +# Fulfillment Module Provider + +In this document, you’ll learn what a fulfillment module provider is. + +Refer to this [Medusa Admin User Guide](https://docs.medusajs.com/user-guide/settings/locations-and-shipping/locations#manage-fulfillment-providers/index.html.md) to learn how to add a fulfillment provider to a location using the dashboard. + +## What’s a Fulfillment Module Provider? + +A fulfillment module provider handles fulfilling items, typically using a third-party integration. + +Fulfillment module providers registered in the Fulfillment Module's [options](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/fulfillment/module-options/index.html.md) are stored and represented by the [FulfillmentProvider data model](https://docs.medusajs.com/references/fulfillment/models/FulfillmentProvider/index.html.md). + +*** + +## Configure Fulfillment Providers + +The Fulfillment Module accepts a `providers` option that allows you to register providers in your application. + +Learn more about the `providers` option in [this documentation](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/fulfillment/module-options/index.html.md). + +*** + +## How to Create a Fulfillment Provider? + +Refer to [this guide](https://docs.medusajs.com/references/fulfillment/provider/index.html.md) to learn how to create a fulfillment module provider. + + +# Item Fulfillment + +In this document, you’ll learn about the concepts of item fulfillment. + +## Fulfillment Data Model + +A fulfillment is the shipping and delivery of one or more items to the customer. It’s represented by the [Fulfillment data model](https://docs.medusajs.com/references/fulfillment/models/Fulfillment/index.html.md). + +*** + +## Fulfillment Processing by a Fulfillment Provider + +A fulfillment is associated with a fulfillment provider that handles all its processing, such as creating a shipment for the fulfillment’s items. + +The fulfillment is also associated with a shipping option of that provider, which determines how the item is shipped. + +![A diagram showcasing the relation between a fulfillment, fulfillment provider, and shipping option](https://res.cloudinary.com/dza7lstvk/image/upload/v1712331947/Medusa%20Resources/fulfillment-shipping-option_jk9ndp.jpg) + +*** + +## data Property + +The `Fulfillment` data model has a `data` property that holds any necessary data for the third-party fulfillment provider to process the fulfillment. + +For example, the `data` property can hold the ID of the fulfillment in the third-party provider. The associated fulfillment provider then uses it whenever it retrieves the fulfillment’s details. + +*** + +## Fulfillment Items + +A fulfillment is used to fulfill one or more items. Each item is represented by the `FulfillmentItem` data model. + +The fulfillment item holds details relevant to fulfilling the item, such as barcode, SKU, and quantity to fulfill. + +![A diagram showcasing the relation between fulfillment and fulfillment items.](https://res.cloudinary.com/dza7lstvk/image/upload/v1712332114/Medusa%20Resources/fulfillment-item_etzxb0.jpg) + +*** + +## Fulfillment Label + +Once a shipment is created for the fulfillment, you can store its tracking number, URL, or other related details as a label, represented by the `FulfillmentLabel` data model. + +*** + +## Fulfillment Status + +The `Fulfillment` data model has three properties to keep track of the current status of the fulfillment: + +- `packed_at`: The date the fulfillment was packed. If set, then the fulfillment has been packed. +- `shipped_at`: The date the fulfillment was shipped. If set, then the fulfillment has been shipped. +- `delivered_at`: The date the fulfillment was delivered. If set, then the fulfillment has been delivered. + + +# Links between Fulfillment Module and Other Modules + +This document showcases the module links defined between the Fulfillment Module and other Commerce Modules. + +## Summary + +The Fulfillment Module has the following links to other modules: + +|First Data Model|Second Data Model|Type|Description| +|---|---|---|---| +| in ||Stored - one-to-many|| +| in ||Stored - one-to-many|| +| in ||Stored - many-to-one|| +| in ||Stored - many-to-one|| +| in ||Stored - one-to-many|| +| in ||Stored - one-to-many|| + +*** + +## Order Module + +The [Order Module](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/order/index.html.md) provides order-management functionalities. + +Medusa defines a link between the `Fulfillment` and `Order` data models. A fulfillment is created for an orders' items. + +![A diagram showcasing an example of how data models from the Fulfillment and Order modules are linked](https://res.cloudinary.com/dza7lstvk/image/upload/v1716549903/Medusa%20Resources/order-fulfillment_h0vlps.jpg) + +A fulfillment is also created for a return's items. So, Medusa defines a link between the `Fulfillment` and `Return` data models. + +![A diagram showcasing an example of how data models from the Fulfillment and Order modules are linked](https://res.cloudinary.com/dza7lstvk/image/upload/v1728399052/Medusa%20Resources/Social_Media_Graphics_2024_Order_Return_vetimk.jpg) + +### Retrieve with Query + +To retrieve the order of a fulfillment with [Query](https://docs.medusajs.com/docs/learn/fundamentals/module-links/query/index.html.md), pass `order.*` in `fields`: + +To retrieve the return, pass `return.*` in `fields`. + +### query.graph + +```ts +const { data: fulfillments } = await query.graph({ + entity: "fulfillment", + fields: [ + "order.*", + ], +}) + +// fulfillments.order +``` + +### useQueryGraphStep + +```ts +import { useQueryGraphStep } from "@medusajs/medusa/core-flows" + +// ... + +const { data: fulfillments } = useQueryGraphStep({ + entity: "fulfillment", + fields: [ + "order.*", + ], +}) + +// fulfillments.order +``` + +### Manage with Link + +To manage the order of a cart, use [Link](https://docs.medusajs.com/docs/learn/fundamentals/module-links/link/index.html.md): + +### link.create + +```ts +import { Modules } from "@medusajs/framework/utils" + +// ... + +await link.create({ + [Modules.ORDER]: { + order_id: "order_123", + }, + [Modules.FULFILLMENT]: { + fulfillment_id: "ful_123", + }, +}) +``` + +### createRemoteLinkStep + +```ts +import { Modules } from "@medusajs/framework/utils" +import { createRemoteLinkStep } from "@medusajs/medusa/core-flows" + +// ... + +createRemoteLinkStep({ + [Modules.ORDER]: { + order_id: "order_123", + }, + [Modules.FULFILLMENT]: { + fulfillment_id: "ful_123", + }, +}) +``` + +*** + +## Pricing Module + +The Pricing Module provides features to store, manage, and retrieve the best prices in a specified context. + +Medusa defines a link between the `PriceSet` and `ShippingOption` data models. A shipping option's price is stored as a price set. + +![A diagram showcasing an example of how data models from the Pricing and Fulfillment modules are linked](https://res.cloudinary.com/dza7lstvk/image/upload/v1716561747/Medusa%20Resources/pricing-fulfillment_spywwa.jpg) + +### Retrieve with Query + +To retrieve the price set of a shipping option with [Query](https://docs.medusajs.com/docs/learn/fundamentals/module-links/query/index.html.md), pass `price_set.*` in `fields`: + +### query.graph + +```ts +const { data: shippingOptions } = await query.graph({ + entity: "shipping_option", + fields: [ + "price_set_link.*", + ], +}) + +// shippingOptions[0].price_set_link?.price_set_id +``` + +### useQueryGraphStep + +```ts +import { useQueryGraphStep } from "@medusajs/medusa/core-flows" + +// ... + +const { data: shippingOptions } = useQueryGraphStep({ + entity: "shipping_option", + fields: [ + "price_set_link.*", + ], +}) + +// shippingOptions[0].price_set_link?.price_set_id +``` + +### Manage with Link + +To manage the price set of a shipping option, use [Link](https://docs.medusajs.com/docs/learn/fundamentals/module-links/link/index.html.md): + +### link.create + +```ts +import { Modules } from "@medusajs/framework/utils" + +// ... + +await link.create({ + [Modules.FULFILLMENT]: { + shipping_option_id: "so_123", + }, + [Modules.PRICING]: { + price_set_id: "pset_123", + }, +}) +``` + +### createRemoteLinkStep + +```ts +import { Modules } from "@medusajs/framework/utils" +import { createRemoteLinkStep } from "@medusajs/medusa/core-flows" + +// ... + +createRemoteLinkStep({ + [Modules.FULFILLMENT]: { + shipping_option_id: "so_123", + }, + [Modules.PRICING]: { + price_set_id: "pset_123", + }, +}) +``` + +*** + +## Product Module + +Medusa defines a link between the `ShippingProfile` data model and the `Product` data model of the Product Module. Each product must belong to a shipping profile. + +This link is introduced in [Medusa v2.5.0](https://github.com/medusajs/medusa/releases/tag/v2.5.0). + +### Retrieve with Query + +To retrieve the products of a shipping profile with [Query](https://docs.medusajs.com/docs/learn/fundamentals/module-links/query/index.html.md), pass `products.*` in `fields`: + +### query.graph + +```ts +const { data: shippingProfiles } = await query.graph({ + entity: "shipping_profile", + fields: [ + "products.*", + ], +}) + +// shippingProfiles[0].products +``` + +### useQueryGraphStep + +```ts +import { useQueryGraphStep } from "@medusajs/medusa/core-flows" + +// ... + +const { data: shippingProfiles } = useQueryGraphStep({ + entity: "shipping_profile", + fields: [ + "products.*", + ], +}) + +// shippingProfiles[0].products +``` + +### Manage with Link + +To manage the shipping profile of a product, use [Link](https://docs.medusajs.com/docs/learn/fundamentals/module-links/link/index.html.md): + +### link.create + +```ts +import { Modules } from "@medusajs/framework/utils" + +// ... + +await link.create({ + [Modules.PRODUCT]: { + product_id: "prod_123", + }, + [Modules.FULFILLMENT]: { + shipping_profile_id: "sp_123", + }, +}) +``` + +### createRemoteLinkStep + +```ts +import { Modules } from "@medusajs/framework/utils" +import { createRemoteLinkStep } from "@medusajs/medusa/core-flows" + +// ... + +createRemoteLinkStep({ + [Modules.PRODUCT]: { + product_id: "prod_123", + }, + [Modules.FULFILLMENT]: { + shipping_profile_id: "sp_123", + }, +}) +``` + +*** + +## Stock Location Module + +The Stock Location Module provides features to manage stock locations in a store. + +Medusa defines a link between the `FulfillmentSet` and `StockLocation` data models. A fulfillment set can be conditioned to a specific stock location. + +![A diagram showcasing an example of how data models from the Fulfillment and Stock Location modules are linked](https://res.cloudinary.com/dza7lstvk/image/upload/v1712567101/Medusa%20Resources/fulfillment-stock-location_nlkf7e.jpg) + +Medusa also defines a link between the `FulfillmentProvider` and `StockLocation` data models to indicate the providers that can be used in a location. + +![A diagram showcasing an example of how data models from the Fulfillment and Stock Location modules are linked](https://res.cloudinary.com/dza7lstvk/image/upload/v1728399492/Medusa%20Resources/fulfillment-provider-stock-location_b0mulo.jpg) + +### Retrieve with Query + +To retrieve the stock location of a fulfillment set with [Query](https://docs.medusajs.com/docs/learn/fundamentals/module-links/query/index.html.md), pass `location.*` in `fields`: + +To retrieve the stock location of a fulfillment provider, pass `locations.*` in `fields`. + +### query.graph + +```ts +const { data: fulfillmentSets } = await query.graph({ + entity: "fulfillment_set", + fields: [ + "location.*", + ], +}) + +// fulfillmentSets[0].location +``` + +### useQueryGraphStep + +```ts +import { useQueryGraphStep } from "@medusajs/medusa/core-flows" + +// ... + +const { data: fulfillmentSets } = useQueryGraphStep({ + entity: "fulfillment_set", + fields: [ + "location.*", + ], +}) + +// fulfillmentSets[0].location +``` + +### Manage with Link + +To manage the stock location of a fulfillment set, use [Link](https://docs.medusajs.com/docs/learn/fundamentals/module-links/link/index.html.md): + +### link.create + +```ts +import { Modules } from "@medusajs/framework/utils" + +// ... + +await link.create({ + [Modules.STOCK_LOCATION]: { + stock_location_id: "sloc_123", + }, + [Modules.FULFILLMENT]: { + fulfillment_set_id: "fset_123", + }, +}) +``` + +### createRemoteLinkStep + +```ts +import { Modules } from "@medusajs/framework/utils" +import { createRemoteLinkStep } from "@medusajs/medusa/core-flows" + +// ... + +createRemoteLinkStep({ + [Modules.STOCK_LOCATION]: { + stock_location_id: "sloc_123", + }, + [Modules.FULFILLMENT]: { + fulfillment_set_id: "fset_123", + }, +}) +``` + + +# Fulfillment Module Options + +In this document, you'll learn about the options of the Fulfillment Module. + +## providers + +The `providers` option is an array of fulfillment module providers. + +When the Medusa application starts, these providers are registered and can be used to process fulfillments. + +For example: + +```ts title="medusa-config.ts" +import { Modules } from "@medusajs/framework/utils" + +// ... + +module.exports = defineConfig({ + // ... + modules: [ + { + resolve: "@medusajs/medusa/fulfillment", + options: { + providers: [ + { + resolve: `@medusajs/medusa/fulfillment-manual`, + id: "manual", + options: { + // provider options... + }, + }, + ], + }, + }, + ], +}) +``` + +The `providers` option is an array of objects that accept the following properties: + +- `resolve`: A string indicating either the package name of the module provider or the path to it relative to the `src` directory. +- `id`: A string indicating the provider's unique name or ID. +- `options`: An optional object of the module provider's options. + + +# Shipping Option + +In this document, you’ll learn about shipping options and their rules. + +## What’s a Shipping Option? + +A shipping option is a way of shipping an item. Each fulfillment provider provides a set of shipping options. For example, a provider may provide a shipping option for express shipping and another for standard shipping. + +When the customer places their order, they choose a shipping option to be used to fulfill their items. + +A shipping option is represented by the [ShippingOption data model](https://docs.medusajs.com/references/fulfillment/models/ShippingOption/index.html.md). + +*** + +## Service Zone Restrictions + +A shipping option is restricted by a service zone, limiting the locations a shipping option be used in. + +For example, a fulfillment provider may have a shipping option that can be used in the United States, and another in Canada. + +![A diagram showcasing the relation between shipping options and service zones.](https://res.cloudinary.com/dza7lstvk/image/upload/v1712330831/Medusa%20Resources/shipping-option-service-zone_pobh6k.jpg) + +Service zones can be more restrictive, such as restricting to certain cities or province codes. + +![A diagram showcasing the relation between shipping options, service zones, and geo zones](https://res.cloudinary.com/dza7lstvk/image/upload/v1712331186/Medusa%20Resources/shipping-option-service-zone-city_m5sxod.jpg) + +*** + +## Shipping Option Rules + +You can restrict shipping options by custom rules, such as the item’s weight or the customer’s group. + +You can also restrict a shipping option's price based on specific conditions. For example, you can make a shipping option's price free based on the cart's total. Learn more in the Pricing Module's [Price Rules](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/pricing/price-rules#how-to-set-rules-on-a-price/index.html.md) guide. + +These rules are represented by the [ShippingOptionRule data model](https://docs.medusajs.com/references/fulfillment/models/ShippingOptionRule/index.html.md). Its properties define the custom rule: + +- `attribute`: The name of a property or table that the rule applies to. For example, `customer_group`. +- `operator`: The operator used in the condition. For example: + - To allow multiple values, use the operator `in`, which validates that the provided values are in the rule’s values. + - To create a negation condition that considers `value` against the rule, use `nin`, which validates that the provided values aren’t in the rule’s values. + - Check out more operators in [this reference](https://docs.medusajs.com/references/fulfillment/types/fulfillment.RuleOperatorType/index.html.md). +- `value`: One or more values. + +![A diagram showcasing the relation between shipping option and shipping option rules.](https://res.cloudinary.com/dza7lstvk/image/upload/v1712331340/Medusa%20Resources/shipping-option-rule_oosopf.jpg) + +A shipping option can have multiple rules. For example, you can add rules to a shipping option so that it's available if the customer belongs to the VIP group and the total weight is less than 2000g. + +![A diagram showcasing how a shipping option can have multiple rules.](https://res.cloudinary.com/dza7lstvk/image/upload/v1712331462/Medusa%20Resources/shipping-option-rule-2_ylaqdb.jpg) + +*** + +## Shipping Profile and Types + +A shipping option belongs to a type. For example, a shipping option’s type may be `express`, while another `standard`. The type is represented by the [ShippingOptionType data model](https://docs.medusajs.com/references/fulfillment/models/ShippingOptionType/index.html.md). + +A shipping option also belongs to a shipping profile, as each shipping profile defines the type of items to be shipped in a similar manner. + +*** + +## data Property + +When fulfilling an item, you might use a third-party fulfillment provider that requires additional custom data to be passed along from the checkout or order-creation process. + +The `ShippingOption` data model has a `data` property. It's an object that stores custom data relevant later when creating and processing a fulfillment. + + +# Inventory Concepts + +In this document, you’ll learn about the main concepts in the Inventory Module, and how data is stored and related. + +## InventoryItem + +An inventory item, represented by the [InventoryItem data model](https://docs.medusajs.com/references/inventory-next/models/InventoryItem/index.html.md), is a stock-kept item, such as a product, whose inventory can be managed. + +The `InventoryItem` data model mainly holds details related to the underlying stock item, but has relations to other data models that include its inventory details. + +![A diagram showcasing the relation between data models in the Inventory Module](https://res.cloudinary.com/dza7lstvk/image/upload/v1709658103/Medusa%20Resources/inventory-architecture_kxr2ql.png) + +### Inventory Shipping Requirement + +An inventory item has a `requires_shipping` field (enabled by default) that indicates whether the item requires shipping. For example, if you're selling a digital license that has limited stock quantity but doesn't require shipping. + +When a product variant is purchased in the Medusa application, this field is used to determine whether the item requires shipping. Learn more in [this documentation](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/product/selling-products/index.html.md). + +*** + +## InventoryLevel + +An inventory level, represented by the [InventoryLevel data model](https://docs.medusajs.com/references/inventory-next/models/InventoryLevel/index.html.md), holds the inventory and quantity details of an inventory item in a specific location. + +It has three quantity-related properties: + +- `stocked_quantity`: The available stock quantity of an item in the associated location. +- `reserved_quantity`: The quantity reserved from the available `stocked_quantity`. It indicates the quantity that's still not removed from stock, but considered as unavailable when checking whether an item is in stock. +- `incoming_quantity`: The incoming stock quantity of an item into the associated location. This property doesn't play into the `stocked_quantity` or when checking whether an item is in stock. + +### Associated Location + +The inventory level's location is determined by the `location_id` property. Medusa links the `InventoryLevel` data model with the `StockLocation` data model from the Stock Location Module. + +*** + +## ReservationItem + +A reservation item, represented by the [ReservationItem](https://docs.medusajs.com/references/inventory-next/models/ReservationItem/index.html.md) data model, represents unavailable quantity of an inventory item in a location. It's used when an order is placed but not fulfilled yet. + +The reserved quantity is associated with a location, so it has a similar relation to that of the `InventoryLevel` with the Stock Location Module. + + +# Inventory Module in Medusa Flows + +This document explains how the Inventory Module is used within the Medusa application's flows. + +## Product Variant Creation + +When a product variant is created and its `manage_inventory` property's value is `true`, the Medusa application creates an inventory item associated with that product variant. + +This flow is implemented within the [createProductVariantsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createProductVariantsWorkflow/index.html.md) + +![A diagram showcasing how the Inventory Module is used in the product variant creation form](https://res.cloudinary.com/dza7lstvk/image/upload/v1709661511/Medusa%20Resources/inventory-product-create_khz2hk.jpg) + +*** + +## Add to Cart + +When a product variant with `manage_inventory` set to `true` is added to cart, the Medusa application checks whether there's sufficient stocked quantity. If not, an error is thrown and the product variant won't be added to the cart. + +This flow is implemented within the [addToCartWorkflow](https://docs.medusajs.com/references/medusa-workflows/addToCartWorkflow/index.html.md) + +![A diagram showcasing how the Inventory Module is used in the add to cart flow](https://res.cloudinary.com/dza7lstvk/image/upload/v1709711645/Medusa%20Resources/inventory-cart-flow_achwq9.jpg) + +*** + +## Order Placed + +When an order is placed, the Medusa application creates a reservation item for each product variant with `manage_inventory` set to `true`. + +This flow is implemented within the [completeCartWorkflow](https://docs.medusajs.com/references/medusa-workflows/completeCartWorkflow/index.html.md) + +![A diagram showcasing how the Inventory Module is used in the order placed flow](https://res.cloudinary.com/dza7lstvk/image/upload/v1709712005/Medusa%20Resources/inventory-order-placed_qdxqdn.jpg) + +*** + +## Order Fulfillment + +When an item in an order is fulfilled and the associated variant has its `manage_inventory` property set to `true`, the Medusa application: + +- Subtracts the `reserved_quantity` from the `stocked_quantity` in the inventory level associated with the variant's inventory item. +- Resets the `reserved_quantity` to `0`. +- Deletes the associated reservation item. + +This flow is implemented within the [createOrderFulfillmentWorkflow](https://docs.medusajs.com/references/medusa-workflows/createOrderFulfillmentWorkflow/index.html.md) + +![A diagram showcasing how the Inventory Module is used in the order fulfillment flow](https://res.cloudinary.com/dza7lstvk/image/upload/v1709712390/Medusa%20Resources/inventory-order-fulfillment_o9wdxh.jpg) + +*** + +## Order Return + +When an item in an order is returned and the associated variant has its `manage_inventory` property set to `true`, the Medusa application increments the `stocked_quantity` of the inventory item's level with the returned quantity. + +This flow is implemented within the [confirmReturnReceiveWorkflow](https://docs.medusajs.com/references/medusa-workflows/confirmReturnReceiveWorkflow/index.html.md) + +![A diagram showcasing how the Inventory Module is used in the order return flow](https://res.cloudinary.com/dza7lstvk/image/upload/v1709712457/Medusa%20Resources/inventory-order-return_ihftyk.jpg) + +### Dismissed Returned Items + +If a returned item is considered damaged or is dismissed, its quantity doesn't increment the `stocked_quantity` of the inventory item's level. + + # Inventory Kits In this guide, you'll learn how inventory kits can be used in the Medusa application to support use cases like multi-part products, bundled products, and shared inventory across products. @@ -23551,67 +24209,6 @@ The bundled product has the same inventory items as those of the products part o You can now [execute the workflow](https://docs.medusajs.com/docs/learn/fundamentals/workflows#3-execute-the-workflow/index.html.md) in [API routes](https://docs.medusajs.com/docs/learn/fundamentals/api-routes/index.html.md), [scheduled jobs](https://docs.medusajs.com/docs/learn/fundamentals/scheduled-jobs/index.html.md), or [subscribers](https://docs.medusajs.com/docs/learn/fundamentals/events-and-subscribers/index.html.md). -# Inventory Module in Medusa Flows - -This document explains how the Inventory Module is used within the Medusa application's flows. - -## Product Variant Creation - -When a product variant is created and its `manage_inventory` property's value is `true`, the Medusa application creates an inventory item associated with that product variant. - -This flow is implemented within the [createProductVariantsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createProductVariantsWorkflow/index.html.md) - -![A diagram showcasing how the Inventory Module is used in the product variant creation form](https://res.cloudinary.com/dza7lstvk/image/upload/v1709661511/Medusa%20Resources/inventory-product-create_khz2hk.jpg) - -*** - -## Add to Cart - -When a product variant with `manage_inventory` set to `true` is added to cart, the Medusa application checks whether there's sufficient stocked quantity. If not, an error is thrown and the product variant won't be added to the cart. - -This flow is implemented within the [addToCartWorkflow](https://docs.medusajs.com/references/medusa-workflows/addToCartWorkflow/index.html.md) - -![A diagram showcasing how the Inventory Module is used in the add to cart flow](https://res.cloudinary.com/dza7lstvk/image/upload/v1709711645/Medusa%20Resources/inventory-cart-flow_achwq9.jpg) - -*** - -## Order Placed - -When an order is placed, the Medusa application creates a reservation item for each product variant with `manage_inventory` set to `true`. - -This flow is implemented within the [completeCartWorkflow](https://docs.medusajs.com/references/medusa-workflows/completeCartWorkflow/index.html.md) - -![A diagram showcasing how the Inventory Module is used in the order placed flow](https://res.cloudinary.com/dza7lstvk/image/upload/v1709712005/Medusa%20Resources/inventory-order-placed_qdxqdn.jpg) - -*** - -## Order Fulfillment - -When an item in an order is fulfilled and the associated variant has its `manage_inventory` property set to `true`, the Medusa application: - -- Subtracts the `reserved_quantity` from the `stocked_quantity` in the inventory level associated with the variant's inventory item. -- Resets the `reserved_quantity` to `0`. -- Deletes the associated reservation item. - -This flow is implemented within the [createOrderFulfillmentWorkflow](https://docs.medusajs.com/references/medusa-workflows/createOrderFulfillmentWorkflow/index.html.md) - -![A diagram showcasing how the Inventory Module is used in the order fulfillment flow](https://res.cloudinary.com/dza7lstvk/image/upload/v1709712390/Medusa%20Resources/inventory-order-fulfillment_o9wdxh.jpg) - -*** - -## Order Return - -When an item in an order is returned and the associated variant has its `manage_inventory` property set to `true`, the Medusa application increments the `stocked_quantity` of the inventory item's level with the returned quantity. - -This flow is implemented within the [confirmReturnReceiveWorkflow](https://docs.medusajs.com/references/medusa-workflows/confirmReturnReceiveWorkflow/index.html.md) - -![A diagram showcasing how the Inventory Module is used in the order return flow](https://res.cloudinary.com/dza7lstvk/image/upload/v1709712457/Medusa%20Resources/inventory-order-return_ihftyk.jpg) - -### Dismissed Returned Items - -If a returned item is considered damaged or is dismissed, its quantity doesn't increment the `stocked_quantity` of the inventory item's level. - - # Links between Inventory Module and Other Modules This document showcases the module links defined between the Inventory Module and other Commerce Modules. @@ -23753,603 +24350,6 @@ const { data: inventoryLevels } = useQueryGraphStep({ ``` -# Fulfillment Concepts - -In this document, you’ll learn about some basic fulfillment concepts. - -## Fulfillment Set - -A fulfillment set is a general form or way of fulfillment. For example, shipping is a form of fulfillment, and pick-up is another form of fulfillment. Each of these can be created as fulfillment sets. - -A fulfillment set is represented by the [FulfillmentSet data model](https://docs.medusajs.com/references/fulfillment/models/FulfillmentSet/index.html.md). All other configurations, options, and management features are related to a fulfillment set, in one way or another. - -```ts -const fulfillmentSets = await fulfillmentModuleService.createFulfillmentSets( - [ - { - name: "Shipping", - type: "shipping", - }, - { - name: "Pick-up", - type: "pick-up", - }, - ] -) -``` - -*** - -## Service Zone - -A service zone is a collection of geographical zones or areas. It’s used to restrict available shipping options to a defined set of locations. - -A service zone is represented by the [ServiceZone data model](https://docs.medusajs.com/references/fulfillment/models/ServiceZone/index.html.md). It’s associated with a fulfillment set, as each service zone is specific to a form of fulfillment. For example, if a customer chooses to pick up items, you can restrict the available shipping options based on their location. - -![A diagram showcasing the relation between fulfillment sets, service zones, and geo zones](https://res.cloudinary.com/dza7lstvk/image/upload/v1712329770/Medusa%20Resources/service-zone_awmvfs.jpg) - -A service zone can have multiple geographical zones, each represented by the [GeoZone data model](https://docs.medusajs.com/references/fulfillment/models/GeoZone/index.html.md). It holds location-related details to narrow down supported areas, such as country, city, or province code. - -*** - -## Shipping Profile - -A shipping profile defines a type of items that are shipped in a similar manner. For example, a `default` shipping profile is used for all item types, but the `digital` shipping profile is used for digital items that aren’t shipped and delivered conventionally. - -A shipping profile is represented by the [ShippingProfile data model](https://docs.medusajs.com/references/fulfillment/models/ShippingProfile/index.html.md). It only defines the profile’s details, but it’s associated with the shipping options available for the item type. - - -# Fulfillment Module Provider - -In this document, you’ll learn what a fulfillment module provider is. - -Refer to this [Medusa Admin User Guide](https://docs.medusajs.com/user-guide/settings/locations-and-shipping/locations#manage-fulfillment-providers/index.html.md) to learn how to add a fulfillment provider to a location using the dashboard. - -## What’s a Fulfillment Module Provider? - -A fulfillment module provider handles fulfilling items, typically using a third-party integration. - -Fulfillment module providers registered in the Fulfillment Module's [options](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/fulfillment/module-options/index.html.md) are stored and represented by the [FulfillmentProvider data model](https://docs.medusajs.com/references/fulfillment/models/FulfillmentProvider/index.html.md). - -*** - -## Configure Fulfillment Providers - -The Fulfillment Module accepts a `providers` option that allows you to register providers in your application. - -Learn more about the `providers` option in [this documentation](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/fulfillment/module-options/index.html.md). - -*** - -## How to Create a Fulfillment Provider? - -Refer to [this guide](https://docs.medusajs.com/references/fulfillment/provider/index.html.md) to learn how to create a fulfillment module provider. - - -# Item Fulfillment - -In this document, you’ll learn about the concepts of item fulfillment. - -## Fulfillment Data Model - -A fulfillment is the shipping and delivery of one or more items to the customer. It’s represented by the [Fulfillment data model](https://docs.medusajs.com/references/fulfillment/models/Fulfillment/index.html.md). - -*** - -## Fulfillment Processing by a Fulfillment Provider - -A fulfillment is associated with a fulfillment provider that handles all its processing, such as creating a shipment for the fulfillment’s items. - -The fulfillment is also associated with a shipping option of that provider, which determines how the item is shipped. - -![A diagram showcasing the relation between a fulfillment, fulfillment provider, and shipping option](https://res.cloudinary.com/dza7lstvk/image/upload/v1712331947/Medusa%20Resources/fulfillment-shipping-option_jk9ndp.jpg) - -*** - -## data Property - -The `Fulfillment` data model has a `data` property that holds any necessary data for the third-party fulfillment provider to process the fulfillment. - -For example, the `data` property can hold the ID of the fulfillment in the third-party provider. The associated fulfillment provider then uses it whenever it retrieves the fulfillment’s details. - -*** - -## Fulfillment Items - -A fulfillment is used to fulfill one or more items. Each item is represented by the `FulfillmentItem` data model. - -The fulfillment item holds details relevant to fulfilling the item, such as barcode, SKU, and quantity to fulfill. - -![A diagram showcasing the relation between fulfillment and fulfillment items.](https://res.cloudinary.com/dza7lstvk/image/upload/v1712332114/Medusa%20Resources/fulfillment-item_etzxb0.jpg) - -*** - -## Fulfillment Label - -Once a shipment is created for the fulfillment, you can store its tracking number, URL, or other related details as a label, represented by the `FulfillmentLabel` data model. - -*** - -## Fulfillment Status - -The `Fulfillment` data model has three properties to keep track of the current status of the fulfillment: - -- `packed_at`: The date the fulfillment was packed. If set, then the fulfillment has been packed. -- `shipped_at`: The date the fulfillment was shipped. If set, then the fulfillment has been shipped. -- `delivered_at`: The date the fulfillment was delivered. If set, then the fulfillment has been delivered. - - -# Fulfillment Module Options - -In this document, you'll learn about the options of the Fulfillment Module. - -## providers - -The `providers` option is an array of fulfillment module providers. - -When the Medusa application starts, these providers are registered and can be used to process fulfillments. - -For example: - -```ts title="medusa-config.ts" -import { Modules } from "@medusajs/framework/utils" - -// ... - -module.exports = defineConfig({ - // ... - modules: [ - { - resolve: "@medusajs/medusa/fulfillment", - options: { - providers: [ - { - resolve: `@medusajs/medusa/fulfillment-manual`, - id: "manual", - options: { - // provider options... - }, - }, - ], - }, - }, - ], -}) -``` - -The `providers` option is an array of objects that accept the following properties: - -- `resolve`: A string indicating either the package name of the module provider or the path to it relative to the `src` directory. -- `id`: A string indicating the provider's unique name or ID. -- `options`: An optional object of the module provider's options. - - -# Links between Fulfillment Module and Other Modules - -This document showcases the module links defined between the Fulfillment Module and other Commerce Modules. - -## Summary - -The Fulfillment Module has the following links to other modules: - -|First Data Model|Second Data Model|Type|Description| -|---|---|---|---| -| in ||Stored - one-to-many|| -| in ||Stored - one-to-many|| -| in ||Stored - many-to-one|| -| in ||Stored - many-to-one|| -| in ||Stored - one-to-many|| -| in ||Stored - one-to-many|| - -*** - -## Order Module - -The [Order Module](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/order/index.html.md) provides order-management functionalities. - -Medusa defines a link between the `Fulfillment` and `Order` data models. A fulfillment is created for an orders' items. - -![A diagram showcasing an example of how data models from the Fulfillment and Order modules are linked](https://res.cloudinary.com/dza7lstvk/image/upload/v1716549903/Medusa%20Resources/order-fulfillment_h0vlps.jpg) - -A fulfillment is also created for a return's items. So, Medusa defines a link between the `Fulfillment` and `Return` data models. - -![A diagram showcasing an example of how data models from the Fulfillment and Order modules are linked](https://res.cloudinary.com/dza7lstvk/image/upload/v1728399052/Medusa%20Resources/Social_Media_Graphics_2024_Order_Return_vetimk.jpg) - -### Retrieve with Query - -To retrieve the order of a fulfillment with [Query](https://docs.medusajs.com/docs/learn/fundamentals/module-links/query/index.html.md), pass `order.*` in `fields`: - -To retrieve the return, pass `return.*` in `fields`. - -### query.graph - -```ts -const { data: fulfillments } = await query.graph({ - entity: "fulfillment", - fields: [ - "order.*", - ], -}) - -// fulfillments.order -``` - -### useQueryGraphStep - -```ts -import { useQueryGraphStep } from "@medusajs/medusa/core-flows" - -// ... - -const { data: fulfillments } = useQueryGraphStep({ - entity: "fulfillment", - fields: [ - "order.*", - ], -}) - -// fulfillments.order -``` - -### Manage with Link - -To manage the order of a cart, use [Link](https://docs.medusajs.com/docs/learn/fundamentals/module-links/link/index.html.md): - -### link.create - -```ts -import { Modules } from "@medusajs/framework/utils" - -// ... - -await link.create({ - [Modules.ORDER]: { - order_id: "order_123", - }, - [Modules.FULFILLMENT]: { - fulfillment_id: "ful_123", - }, -}) -``` - -### createRemoteLinkStep - -```ts -import { Modules } from "@medusajs/framework/utils" -import { createRemoteLinkStep } from "@medusajs/medusa/core-flows" - -// ... - -createRemoteLinkStep({ - [Modules.ORDER]: { - order_id: "order_123", - }, - [Modules.FULFILLMENT]: { - fulfillment_id: "ful_123", - }, -}) -``` - -*** - -## Pricing Module - -The Pricing Module provides features to store, manage, and retrieve the best prices in a specified context. - -Medusa defines a link between the `PriceSet` and `ShippingOption` data models. A shipping option's price is stored as a price set. - -![A diagram showcasing an example of how data models from the Pricing and Fulfillment modules are linked](https://res.cloudinary.com/dza7lstvk/image/upload/v1716561747/Medusa%20Resources/pricing-fulfillment_spywwa.jpg) - -### Retrieve with Query - -To retrieve the price set of a shipping option with [Query](https://docs.medusajs.com/docs/learn/fundamentals/module-links/query/index.html.md), pass `price_set.*` in `fields`: - -### query.graph - -```ts -const { data: shippingOptions } = await query.graph({ - entity: "shipping_option", - fields: [ - "price_set_link.*", - ], -}) - -// shippingOptions[0].price_set_link?.price_set_id -``` - -### useQueryGraphStep - -```ts -import { useQueryGraphStep } from "@medusajs/medusa/core-flows" - -// ... - -const { data: shippingOptions } = useQueryGraphStep({ - entity: "shipping_option", - fields: [ - "price_set_link.*", - ], -}) - -// shippingOptions[0].price_set_link?.price_set_id -``` - -### Manage with Link - -To manage the price set of a shipping option, use [Link](https://docs.medusajs.com/docs/learn/fundamentals/module-links/link/index.html.md): - -### link.create - -```ts -import { Modules } from "@medusajs/framework/utils" - -// ... - -await link.create({ - [Modules.FULFILLMENT]: { - shipping_option_id: "so_123", - }, - [Modules.PRICING]: { - price_set_id: "pset_123", - }, -}) -``` - -### createRemoteLinkStep - -```ts -import { Modules } from "@medusajs/framework/utils" -import { createRemoteLinkStep } from "@medusajs/medusa/core-flows" - -// ... - -createRemoteLinkStep({ - [Modules.FULFILLMENT]: { - shipping_option_id: "so_123", - }, - [Modules.PRICING]: { - price_set_id: "pset_123", - }, -}) -``` - -*** - -## Product Module - -Medusa defines a link between the `ShippingProfile` data model and the `Product` data model of the Product Module. Each product must belong to a shipping profile. - -This link is introduced in [Medusa v2.5.0](https://github.com/medusajs/medusa/releases/tag/v2.5.0). - -### Retrieve with Query - -To retrieve the products of a shipping profile with [Query](https://docs.medusajs.com/docs/learn/fundamentals/module-links/query/index.html.md), pass `products.*` in `fields`: - -### query.graph - -```ts -const { data: shippingProfiles } = await query.graph({ - entity: "shipping_profile", - fields: [ - "products.*", - ], -}) - -// shippingProfiles[0].products -``` - -### useQueryGraphStep - -```ts -import { useQueryGraphStep } from "@medusajs/medusa/core-flows" - -// ... - -const { data: shippingProfiles } = useQueryGraphStep({ - entity: "shipping_profile", - fields: [ - "products.*", - ], -}) - -// shippingProfiles[0].products -``` - -### Manage with Link - -To manage the shipping profile of a product, use [Link](https://docs.medusajs.com/docs/learn/fundamentals/module-links/link/index.html.md): - -### link.create - -```ts -import { Modules } from "@medusajs/framework/utils" - -// ... - -await link.create({ - [Modules.PRODUCT]: { - product_id: "prod_123", - }, - [Modules.FULFILLMENT]: { - shipping_profile_id: "sp_123", - }, -}) -``` - -### createRemoteLinkStep - -```ts -import { Modules } from "@medusajs/framework/utils" -import { createRemoteLinkStep } from "@medusajs/medusa/core-flows" - -// ... - -createRemoteLinkStep({ - [Modules.PRODUCT]: { - product_id: "prod_123", - }, - [Modules.FULFILLMENT]: { - shipping_profile_id: "sp_123", - }, -}) -``` - -*** - -## Stock Location Module - -The Stock Location Module provides features to manage stock locations in a store. - -Medusa defines a link between the `FulfillmentSet` and `StockLocation` data models. A fulfillment set can be conditioned to a specific stock location. - -![A diagram showcasing an example of how data models from the Fulfillment and Stock Location modules are linked](https://res.cloudinary.com/dza7lstvk/image/upload/v1712567101/Medusa%20Resources/fulfillment-stock-location_nlkf7e.jpg) - -Medusa also defines a link between the `FulfillmentProvider` and `StockLocation` data models to indicate the providers that can be used in a location. - -![A diagram showcasing an example of how data models from the Fulfillment and Stock Location modules are linked](https://res.cloudinary.com/dza7lstvk/image/upload/v1728399492/Medusa%20Resources/fulfillment-provider-stock-location_b0mulo.jpg) - -### Retrieve with Query - -To retrieve the stock location of a fulfillment set with [Query](https://docs.medusajs.com/docs/learn/fundamentals/module-links/query/index.html.md), pass `location.*` in `fields`: - -To retrieve the stock location of a fulfillment provider, pass `locations.*` in `fields`. - -### query.graph - -```ts -const { data: fulfillmentSets } = await query.graph({ - entity: "fulfillment_set", - fields: [ - "location.*", - ], -}) - -// fulfillmentSets[0].location -``` - -### useQueryGraphStep - -```ts -import { useQueryGraphStep } from "@medusajs/medusa/core-flows" - -// ... - -const { data: fulfillmentSets } = useQueryGraphStep({ - entity: "fulfillment_set", - fields: [ - "location.*", - ], -}) - -// fulfillmentSets[0].location -``` - -### Manage with Link - -To manage the stock location of a fulfillment set, use [Link](https://docs.medusajs.com/docs/learn/fundamentals/module-links/link/index.html.md): - -### link.create - -```ts -import { Modules } from "@medusajs/framework/utils" - -// ... - -await link.create({ - [Modules.STOCK_LOCATION]: { - stock_location_id: "sloc_123", - }, - [Modules.FULFILLMENT]: { - fulfillment_set_id: "fset_123", - }, -}) -``` - -### createRemoteLinkStep - -```ts -import { Modules } from "@medusajs/framework/utils" -import { createRemoteLinkStep } from "@medusajs/medusa/core-flows" - -// ... - -createRemoteLinkStep({ - [Modules.STOCK_LOCATION]: { - stock_location_id: "sloc_123", - }, - [Modules.FULFILLMENT]: { - fulfillment_set_id: "fset_123", - }, -}) -``` - - -# Shipping Option - -In this document, you’ll learn about shipping options and their rules. - -## What’s a Shipping Option? - -A shipping option is a way of shipping an item. Each fulfillment provider provides a set of shipping options. For example, a provider may provide a shipping option for express shipping and another for standard shipping. - -When the customer places their order, they choose a shipping option to be used to fulfill their items. - -A shipping option is represented by the [ShippingOption data model](https://docs.medusajs.com/references/fulfillment/models/ShippingOption/index.html.md). - -*** - -## Service Zone Restrictions - -A shipping option is restricted by a service zone, limiting the locations a shipping option be used in. - -For example, a fulfillment provider may have a shipping option that can be used in the United States, and another in Canada. - -![A diagram showcasing the relation between shipping options and service zones.](https://res.cloudinary.com/dza7lstvk/image/upload/v1712330831/Medusa%20Resources/shipping-option-service-zone_pobh6k.jpg) - -Service zones can be more restrictive, such as restricting to certain cities or province codes. - -![A diagram showcasing the relation between shipping options, service zones, and geo zones](https://res.cloudinary.com/dza7lstvk/image/upload/v1712331186/Medusa%20Resources/shipping-option-service-zone-city_m5sxod.jpg) - -*** - -## Shipping Option Rules - -You can restrict shipping options by custom rules, such as the item’s weight or the customer’s group. - -You can also restrict a shipping option's price based on specific conditions. For example, you can make a shipping option's price free based on the cart's total. Learn more in the Pricing Module's [Price Rules](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/pricing/price-rules#how-to-set-rules-on-a-price/index.html.md) guide. - -These rules are represented by the [ShippingOptionRule data model](https://docs.medusajs.com/references/fulfillment/models/ShippingOptionRule/index.html.md). Its properties define the custom rule: - -- `attribute`: The name of a property or table that the rule applies to. For example, `customer_group`. -- `operator`: The operator used in the condition. For example: - - To allow multiple values, use the operator `in`, which validates that the provided values are in the rule’s values. - - To create a negation condition that considers `value` against the rule, use `nin`, which validates that the provided values aren’t in the rule’s values. - - Check out more operators in [this reference](https://docs.medusajs.com/references/fulfillment/types/fulfillment.RuleOperatorType/index.html.md). -- `value`: One or more values. - -![A diagram showcasing the relation between shipping option and shipping option rules.](https://res.cloudinary.com/dza7lstvk/image/upload/v1712331340/Medusa%20Resources/shipping-option-rule_oosopf.jpg) - -A shipping option can have multiple rules. For example, you can add rules to a shipping option so that it's available if the customer belongs to the VIP group and the total weight is less than 2000g. - -![A diagram showcasing how a shipping option can have multiple rules.](https://res.cloudinary.com/dza7lstvk/image/upload/v1712331462/Medusa%20Resources/shipping-option-rule-2_ylaqdb.jpg) - -*** - -## Shipping Profile and Types - -A shipping option belongs to a type. For example, a shipping option’s type may be `express`, while another `standard`. The type is represented by the [ShippingOptionType data model](https://docs.medusajs.com/references/fulfillment/models/ShippingOptionType/index.html.md). - -A shipping option also belongs to a shipping profile, as each shipping profile defines the type of items to be shipped in a similar manner. - -*** - -## data Property - -When fulfilling an item, you might use a third-party fulfillment provider that requires additional custom data to be passed along from the checkout or order-creation process. - -The `ShippingOption` data model has a `data` property. It's an object that stores custom data relevant later when creating and processing a fulfillment. - - # Order Concepts In this document, you’ll learn about orders and related concepts @@ -24399,60 +24399,6 @@ An order can have multiple transactions. The sum of these transactions must be e Learn more about transactions in [this guide](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/order/transactions/index.html.md). -# Order Claim - -In this document, you’ll learn about order claims. - -Refer to this [Medusa Admin User Guide](https://docs.medusajs.com/user-guide/orders/claims/index.html.md) to learn how to manage an order's claims using the dashboard. - -## What is a Claim? - -When a customer receives a defective or incorrect item, the merchant can create a claim to refund or replace the item. - -The [OrderClaim data model](https://docs.medusajs.com/references/order/models/OrderClaim/index.html.md) represents a claim. - -*** - -## Claim Type - -The `Claim` data model has a `type` property whose value indicates the type of the claim: - -- `refund`: the items are returned, and the customer is refunded. -- `replace`: the items are returned, and the customer receives new items. - -*** - -## Old and Replacement Items - -When the claim is created, a return, represented by the [Return data model](https://docs.medusajs.com/references/order/models/Return/index.html.md), is also created to handle receiving the old items from the customer. - -Learn more about returns in [this guide](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/order/return/index.html.md). - -If the claim’s type is `replace`, replacement items are represented by the [ClaimItem data model](https://docs.medusajs.com/references/order/models/OrderClaimItem/index.html.md). - -*** - -## Claim Shipping Methods - -A claim uses shipping methods to send the replacement items to the customer. These methods are represented by the [OrderShippingMethod data model](https://docs.medusajs.com/references/order/models/OrderShippingMethod/index.html.md). - -The shipping methods for the returned items are associated with the claim's return, as explained in [this guide](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/order/return#return-shipping-methods/index.html.md). - -*** - -## Claim Refund - -If the claim’s type is `refund`, the amount to be refunded is stored in the `refund_amount` property. - -The [Transaction data model](https://docs.medusajs.com/references/order/models/OrderTransaction/index.html.md) represents the refunds made for the claim. - -*** - -## How Claims Impact an Order’s Version - -When a claim is confirmed, the order’s version is incremented. - - # Order Edit In this document, you'll learn about order edits. @@ -25034,57 +24980,34 @@ const { data: orders } = useQueryGraphStep({ ``` -# Order Exchange +# Order Versioning -In this document, you’ll learn about order exchanges. +In this document, you’ll learn how an order and its details are versioned. -Refer to this [Medusa Admin User Guide](https://docs.medusajs.com/user-guide/orders/exchanges/index.html.md) to learn how to manage an order's exchanges using the dashboard. +## What's Versioning? -## What is an Exchange? +Versioning means assigning a version number to a record, such as an order and its items. This is useful to view the different versions of the order following changes in its lifetime. -An exchange is the replacement of an item that the customer ordered with another. - -A merchant creates the exchange, specifying the items to be replaced and the new items to be sent. - -The [OrderExchange data model](https://docs.medusajs.com/references/order/models/OrderExchange/index.html.md) represents an exchange. +When changes are made on an order, such as an item is added or returned, the order's version changes. *** -## Returned and New Items +## version Property -When the exchange is created, a return, represented by the [Return data model](https://docs.medusajs.com/references/order/models/Return/index.html.md), is created to handle receiving the items back from the customer. +The `Order` and `OrderSummary` data models have a `version` property that indicates the current version. By default, its value is `1`. -Learn more about returns in [this guide](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/order/return/index.html.md). - -The [OrderExchangeItem data model](https://docs.medusajs.com/references/order/models/OrderExchangeItem/index.html.md) represents the new items to be sent to the customer. +Other order-related data models, such as `OrderItem`, also has a `version` property, but it indicates the version it belongs to. *** -## Exchange Shipping Methods +## How the Version Changes -An exchange has shipping methods used to send the new items to the customer. They’re represented by the [OrderShippingMethod data model](https://docs.medusajs.com/references/order/models/OrderShippingMethod/index.html.md). +When the order is changed, such as an item is exchanged, this changes the version of the order and its related data: -The shipping methods for the returned items are associated with the exchange's return, as explained in [this guide](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/order/return#return-shipping-methods/index.html.md). +1. The version of the order and its summary is incremented. +2. Related order data that have a `version` property, such as the `OrderItem`, are duplicated. The duplicated item has the new version, whereas the original item has the previous version. -*** - -## Exchange Payment - -The `Exchange` data model has a `difference_due` property that stores the outstanding amount. - -|Condition|Result| -|---|---|---| -|\`difference\_due \< 0\`|Merchant owes the customer a refund of the | -|\`difference\_due > 0\`|Merchant requires additional payment from the customer of the | -|\`difference\_due = 0\`|No payment processing is required.| - -Any payment or refund made is stored in the [Transaction data model](https://docs.medusajs.com/references/order/models/OrderTransaction/index.html.md). - -*** - -## How Exchanges Impact an Order’s Version - -When an exchange is confirmed, the order’s version is incremented. +When the order is retrieved, only the related data having the same version is retrieved. # Order Change @@ -25248,95 +25171,33 @@ await orderModuleService.setOrderShippingMethodAdjustments( ``` -# Order Return +# Tax Lines in Order Module -In this document, you’ll learn about order returns. +In this document, you’ll learn about tax lines in an order. -Refer to this [Medusa Admin User Guide](https://docs.medusajs.com/user-guide/orders/returns/index.html.md) to learn how to manage an order's returns using the dashboard. +## What are Tax Lines? -## What is a Return? +A tax line indicates the tax rate of a line item or a shipping method. -A return is the return of items delivered from the customer back to the merchant. It is represented by the [Return data model](https://docs.medusajs.com/references/order/models/Return/index.html.md). +The [OrderLineItemTaxLine data model](https://docs.medusajs.com/references/order/models/OrderLineItemTaxLine/index.html.md) represents a line item’s tax line, and the [OrderShippingMethodTaxLine data model](https://docs.medusajs.com/references/order/models/OrderShippingMethodTaxLine/index.html.md) represents a shipping method’s tax line. -A return is requested either by the customer from the storefront, or the merchant from the admin. Medusa supports an automated Return Merchandise Authorization (RMA) flow. - -![Diagram showcasing the automated RMA flow.](https://res.cloudinary.com/dza7lstvk/image/upload/v1719578128/Medusa%20Resources/return-rma_pzprwq.jpg) - -Once the merchant receives the returned items, they mark the return as received. +![A diagram showcasing the relation between orders, items and shipping methods, and tax lines](https://res.cloudinary.com/dza7lstvk/image/upload/v1712307225/Medusa%20Resources/order-tax-lines_sixujd.jpg) *** -## Returned Items +## Tax Inclusivity -The items to be returned are represented by the [ReturnItem data model](references/order/models/ReturnItem). +By default, the tax amount is calculated by taking the tax rate from the line item or shipping method’s amount and then adding it to the item/method’s subtotal. -The `ReturnItem` model has two properties storing the item's quantity: +However, line items and shipping methods have an `is_tax_inclusive` property that, when enabled, indicates that the item or method’s price already includes taxes. -1. `received_quantity`: The quantity of the item that's received and can be added to the item's inventory quantity. -2. `damaged_quantity`: The quantity of the item that's damaged, meaning it can't be sold again or added to the item's inventory quantity. +So, instead of calculating the tax rate and adding it to the item/method’s subtotal, it’s calculated as part of the subtotal. -*** +The following diagram is a simplified showcase of how a subtotal is calculated from the tax perspective. -## Return Shipping Methods +![A diagram showcasing how a subtotal is calculated from the tax perspective](https://res.cloudinary.com/dza7lstvk/image/upload/v1712307395/Medusa%20Resources/order-tax-inclusive_oebdnm.jpg) -A return has shipping methods used to return the items to the merchant. The shipping methods are represented by the [OrderShippingMethod data model](references/order/models/OrderShippingMethod). - -In the Medusa application, the shipping method for a return is created only from a shipping option, provided by the Fulfillment Module, that has the rule `is_return` enabled. - -*** - -## Refund Payment - -The `refund_amount` property of the `Return` data model holds the amount a merchant must refund the customer. - -The [OrderTransaction data model](references/order/models/OrderTransaction) represents the refunds made for the return. - -*** - -## Returns in Exchanges and Claims - -When a merchant creates an exchange or a claim, it includes returning items from the customer. - -The `Return` data model also represents the return of these items. In this case, the return is associated with the exchange or claim it was created for. - -*** - -## How Returns Impact an Order’s Version - -The order’s version is incremented when: - -1. A return is requested. -2. A return is marked as received. - - -# Order Versioning - -In this document, you’ll learn how an order and its details are versioned. - -## What's Versioning? - -Versioning means assigning a version number to a record, such as an order and its items. This is useful to view the different versions of the order following changes in its lifetime. - -When changes are made on an order, such as an item is added or returned, the order's version changes. - -*** - -## version Property - -The `Order` and `OrderSummary` data models have a `version` property that indicates the current version. By default, its value is `1`. - -Other order-related data models, such as `OrderItem`, also has a `version` property, but it indicates the version it belongs to. - -*** - -## How the Version Changes - -When the order is changed, such as an item is exchanged, this changes the version of the order and its related data: - -1. The version of the order and its summary is incremented. -2. Related order data that have a `version` property, such as the `OrderItem`, are duplicated. The duplicated item has the new version, whereas the original item has the previous version. - -When the order is retrieved, only the related data having the same version is retrieved. +For example, if a line item's amount is `5000`, the tax rate is `10`, and `is_tax_inclusive` is enabled, the tax amount is 10% of `5000`, which is `500`. The item's unit price becomes `4500`. # Transactions @@ -25387,660 +25248,6 @@ The `OrderTransaction` data model has two properties that determine which data m - `reference_id`: indicates the ID of the record in the table. For example, `pay_123`. -# Tax Lines in Order Module - -In this document, you’ll learn about tax lines in an order. - -## What are Tax Lines? - -A tax line indicates the tax rate of a line item or a shipping method. - -The [OrderLineItemTaxLine data model](https://docs.medusajs.com/references/order/models/OrderLineItemTaxLine/index.html.md) represents a line item’s tax line, and the [OrderShippingMethodTaxLine data model](https://docs.medusajs.com/references/order/models/OrderShippingMethodTaxLine/index.html.md) represents a shipping method’s tax line. - -![A diagram showcasing the relation between orders, items and shipping methods, and tax lines](https://res.cloudinary.com/dza7lstvk/image/upload/v1712307225/Medusa%20Resources/order-tax-lines_sixujd.jpg) - -*** - -## Tax Inclusivity - -By default, the tax amount is calculated by taking the tax rate from the line item or shipping method’s amount and then adding it to the item/method’s subtotal. - -However, line items and shipping methods have an `is_tax_inclusive` property that, when enabled, indicates that the item or method’s price already includes taxes. - -So, instead of calculating the tax rate and adding it to the item/method’s subtotal, it’s calculated as part of the subtotal. - -The following diagram is a simplified showcase of how a subtotal is calculated from the tax perspective. - -![A diagram showcasing how a subtotal is calculated from the tax perspective](https://res.cloudinary.com/dza7lstvk/image/upload/v1712307395/Medusa%20Resources/order-tax-inclusive_oebdnm.jpg) - -For example, if a line item's amount is `5000`, the tax rate is `10`, and `is_tax_inclusive` is enabled, the tax amount is 10% of `5000`, which is `500`. The item's unit price becomes `4500`. - - -# Pricing Concepts - -In this document, you’ll learn about the main concepts in the Pricing Module. - -## Price Set - -A [PriceSet](https://docs.medusajs.com/references/pricing/models/PriceSet/index.html.md) represents a collection of prices that are linked to a resource (for example, a product or a shipping option). - -Each of these prices are represented by the [Price data module](https://docs.medusajs.com/references/pricing/models/Price/index.html.md). - -![A diagram showcasing the relation between the price set and price](https://res.cloudinary.com/dza7lstvk/image/upload/v1709648650/Medusa%20Resources/price-set-money-amount_xeees0.jpg) - -*** - -## Price List - -A [PriceList](https://docs.medusajs.com/references/pricing/models/PriceList/index.html.md) is a group of prices only enabled if their conditions and rules are satisfied. - -A price list has optional `start_date` and `end_date` properties that indicate the date range in which a price list can be applied. - -Its associated prices are represented by the `Price` data model. - - -# Price Rules - -In this Pricing Module guide, you'll learn about price rules for price sets and price lists, and how to add rules to a price. - -## Price Rule - -You can restrict prices by rules. Each rule of a price is represented by the [PriceRule data model](https://docs.medusajs.com/references/pricing/models/PriceRule/index.html.md). - -The `Price` data model has a `rules_count` property, which indicates how many rules, represented by `PriceRule`, are applied to the price. - -For exmaple, you create a price restricted to `10557` zip codes. - -![A diagram showcasing the relation between the PriceRule and Price](https://res.cloudinary.com/dza7lstvk/image/upload/v1709648772/Medusa%20Resources/price-rule-1_vy8bn9.jpg) - -A price can have multiple price rules. - -For example, a price can be restricted by a region and a zip code. - -![A diagram showcasing the relation between the PriceRule and Price with multiple rules.](https://res.cloudinary.com/dza7lstvk/image/upload/v1709649296/Medusa%20Resources/price-rule-3_pwpocz.jpg) - -*** - -## Price List Rules - -Rules applied to a price list are represented by the [PriceListRule data model](https://docs.medusajs.com/references/pricing/models/PriceListRule/index.html.md). - -The `rules_count` property of a `PriceList` indicates how many rules are applied to it. - -![A diagram showcasing the relation between the PriceSet, PriceList, Price, RuleType, and PriceListRuleValue](https://res.cloudinary.com/dza7lstvk/image/upload/v1709641999/Medusa%20Resources/price-list_zd10yd.jpg) - -*** - -## How to Set Rules on a Price? - -### Using Workflows - -Medusa uses the Pricing Module to store prices of different resources, such as product variants and shipping options. - -When you manage one of these resources using [Medusa's workflows](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/medusa-workflows-reference/index.html.md) or using the API routes that use them, you can set rules on a price using the `rules` property of the price object. - -For example, when creating a shipping option using the [createShippingOptionsWorkflow](https://docs.medusajs.com/resources/references/medusa-workflows/createShippingOptionsWorkflow/index.html.md) to create a shipping option, you can make the shipping price free based on the cart total: - -```ts highlights={workflowHighlights} -const { result } = await createShippingOptionsWorkflow(container) - .run({ - input: [{ - name: "Standard Shipping", - service_zone_id: "serzo_123", - shipping_profile_id: "sp_123", - provider_id: "prov_123", - type: { - label: "Standard", - description: "Standard shipping", - code: "standard", - }, - price_type: "flat", - prices: [ - // default price - { - currency_code: "usd", - amount: 10, - rules: {}, - }, - // price if cart total >= $100 - { - currency_code: "usd", - amount: 0, - rules: { - item_total: { - operator: "gte", - value: 100, - }, - }, - }, - ], - }], - }) -``` - -In this example, you create a shipping option whose default price is `$10`. When the total of the cart or order using this shipping option is greater than `$100`, the shipping option's price becomes free. - -### Using Pricing Module's Service - -For most use cases, it's recommended to use [workflows](#using-workflows) instead of directly using the module's service. - -When adding a price using the [addPrices](https://docs.medusajs.com/resources/references/pricing/addPrices/index.html.md) method of the Pricing Module's service, pass the `rules` property to a price object. - -For example: - -```ts -const priceSet = await pricingModule.addPrices({ - priceSetId: "pset_1", - prices: [ - // default price - { - currency_code: "usd", - amount: 10, - rules: {}, - }, - // price if cart total >= $100 - { - currency_code: "usd", - amount: 0, - rules: { - item_total: { - operator: "gte", - value: 100, - }, - }, - }, - ], -}) -``` - -In this example, you set the default price of a resource (for example, a shipping option), to `$10`. You also add a conditioned price that sets the price to `0` when the cart or order's total is greater than or equal to `$100`. - -### How is the Price Rule Applied? - -The [price calculation](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/pricing/price-calculation/index.html.md) mechanism considers a price applicable when the resource that this price is in matches the specified rules. - -For example, a [cart object](https://docs.medusajs.com/api/store#carts_cart_schema) has an `item_total` property. So, if a shipping option has the following price: - -```json -{ - "currency_code": "usd", - "amount": 0, - "rules": { - "item_total": { - "operator": "gte", - "value": 100, - } - } -} -``` - -The shipping option's price is applied when the cart's `item_total` is greater than or equal to `$100`. - -You can also apply the rule on nested relations and properties. For example, to apply a shipping option's price based on the customer's group, you can apply a rule on the `customer.group.id` attribute: - -```json -{ - "currency_code": "usd", - "amount": 0, - "rules": { - "customer.group.id": { - "operator": "eq", - "value": "cusgrp_123" - } - } -} -``` - -In this example, the price is only applied if a cart's customer belongs to the customer group of ID `cusgrp_123`. - -These same rules apply to product variant prices as well, or any other resource that has a price. - - -# Links between Pricing Module and Other Modules - -This document showcases the module links defined between the Pricing Module and other Commerce Modules. - -## Summary - -The Pricing Module has the following links to other modules: - -|First Data Model|Second Data Model|Type|Description| -|---|---|---|---| -| in ||Stored - one-to-one|| -| in ||Stored - one-to-one|| - -*** - -## Fulfillment Module - -The Fulfillment Module provides fulfillment-related functionalities, including shipping options that the customer chooses from when they place their order. However, it doesn't provide pricing-related functionalities for these options. - -Medusa defines a link between the `PriceSet` and `ShippingOption` data models. A shipping option's price is stored as a price set. - -![A diagram showcasing an example of how data models from the Pricing and Fulfillment modules are linked](https://res.cloudinary.com/dza7lstvk/image/upload/v1716561747/Medusa%20Resources/pricing-fulfillment_spywwa.jpg) - -### Retrieve with Query - -To retrieve the shipping option of a price set with [Query](https://docs.medusajs.com/docs/learn/fundamentals/module-links/query/index.html.md), pass `shipping_option.*` in `fields`: - -### query.graph - -```ts -const { data: priceSets } = await query.graph({ - entity: "price_set", - fields: [ - "shipping_option.*", - ], -}) - -// priceSets[0].shipping_option -``` - -### useQueryGraphStep - -```ts -import { useQueryGraphStep } from "@medusajs/medusa/core-flows" - -// ... - -const { data: priceSets } = useQueryGraphStep({ - entity: "price_set", - fields: [ - "shipping_option.*", - ], -}) - -// priceSets[0].shipping_option -``` - -### Manage with Link - -To manage the price set of a shipping option, use [Link](https://docs.medusajs.com/docs/learn/fundamentals/module-links/link/index.html.md): - -### link.create - -```ts -import { Modules } from "@medusajs/framework/utils" - -// ... - -await link.create({ - [Modules.FULFILLMENT]: { - shipping_option_id: "so_123", - }, - [Modules.PRICING]: { - price_set_id: "pset_123", - }, -}) -``` - -### createRemoteLinkStep - -```ts -import { Modules } from "@medusajs/framework/utils" -import { createRemoteLinkStep } from "@medusajs/medusa/core-flows" - -// ... - -createRemoteLinkStep({ - [Modules.FULFILLMENT]: { - shipping_option_id: "so_123", - }, - [Modules.PRICING]: { - price_set_id: "pset_123", - }, -}) -``` - -*** - -## Product Module - -The Product Module doesn't store or manage the prices of product variants. - -Medusa defines a link between the `ProductVariant` and the `PriceSet`. A product variant’s prices are stored as prices belonging to a price set. - -![A diagram showcasing an example of how data models from the Pricing and Product Module are linked. The PriceSet is linked to the ProductVariant of the Product Module.](https://res.cloudinary.com/dza7lstvk/image/upload/v1709651039/Medusa%20Resources/pricing-product_m4xaut.jpg) - -So, when you want to add prices for a product variant, you create a price set and add the prices to it. - -You can then benefit from adding rules to prices or using the `calculatePrices` method to retrieve the price of a product variant within a specified context. - -### Retrieve with Query - -To retrieve the variant of a price set with [Query](https://docs.medusajs.com/docs/learn/fundamentals/module-links/query/index.html.md), pass `variant.*` in `fields`: - -### query.graph - -```ts -const { data: priceSets } = await query.graph({ - entity: "price_set", - fields: [ - "variant.*", - ], -}) - -// priceSets[0].variant -``` - -### useQueryGraphStep - -```ts -import { useQueryGraphStep } from "@medusajs/medusa/core-flows" - -// ... - -const { data: priceSets } = useQueryGraphStep({ - entity: "price_set", - fields: [ - "variant.*", - ], -}) - -// priceSets[0].variant -``` - -### Manage with Link - -To manage the price set of a variant, use [Link](https://docs.medusajs.com/docs/learn/fundamentals/module-links/link/index.html.md): - -### link.create - -```ts -import { Modules } from "@medusajs/framework/utils" - -// ... - -await link.create({ - [Modules.PRODUCT]: { - variant_id: "variant_123", - }, - [Modules.PRICING]: { - price_set_id: "pset_123", - }, -}) -``` - -### createRemoteLinkStep - -```ts -import { Modules } from "@medusajs/framework/utils" -import { createRemoteLinkStep } from "@medusajs/medusa/core-flows" - -// ... - -createRemoteLinkStep({ - [Modules.PRODUCT]: { - variant_id: "variant_123", - }, - [Modules.PRICING]: { - price_set_id: "pset_123", - }, -}) -``` - - -# Prices Calculation - -In this document, you'll learn how prices are calculated when you use the [calculatePrices method](https://docs.medusajs.com/references/pricing/calculatePrices/index.html.md) of the Pricing Module's main service. - -## calculatePrices Method - -The [calculatePrices method](https://docs.medusajs.com/references/pricing/calculatePrices/index.html.md) accepts as parameters the ID of one or more price sets and a context. - -It returns a price object with the best matching price for each price set. - -### Calculation Context - -The calculation context is an optional object passed as a second parameter to the `calculatePrices` method. It accepts rules to restrict the selected prices in the price set. - -For example: - -```ts -const price = await pricingModuleService.calculatePrices( - { id: [priceSetId] }, - { - context: { - currency_code: currencyCode, - region_id: "reg_123", - }, - } -) -``` - -In this example, you retrieve the prices in a price set for the specified currency code and region ID. - -### Returned Price Object - -For each price set, the `calculatePrices` method selects two prices: - -- A calculated price: Either a price that belongs to a price list and best matches the specified context, or the same as the original price. -- An original price, which is either: - - The same price as the calculated price if the price list it belongs to is of type `override`; - - Or a price that doesn't belong to a price list and best matches the specified context. - -Both prices are returned in an object that has the following properties: - -- id: (\`string\`) The ID of the price set from which the price was selected. -- is\_calculated\_price\_price\_list: (\`boolean\`) Whether the calculated price belongs to a price list. -- calculated\_amount: (\`number\`) The amount of the calculated price, or \`null\` if there isn't a calculated price. This is the amount shown to the customer. -- is\_original\_price\_price\_list: (\`boolean\`) Whether the original price belongs to a price list. -- original\_amount: (\`number\`) The amount of the original price, or \`null\` if there isn't an original price. This amount is useful to compare with the \`calculated\_amount\`, such as to check for discounted value. -- currency\_code: (\`string\`) The currency code of the calculated price, or \`null\` if there isn't a calculated price. -- is\_calculated\_price\_tax\_inclusive: (\`boolean\`) Whether the calculated price is tax inclusive. Learn more about tax-inclusivity in \[this document]\(../tax-inclusive-pricing/page.mdx) -- is\_original\_price\_tax\_inclusive: (\`boolean\`) Whether the original price is tax inclusive. Learn more about tax-inclusivity in \[this document]\(../tax-inclusive-pricing/page.mdx) -- calculated\_price: (\`object\`) The calculated price's price details. - - - id: (\`string\`) The ID of the price. - - - price\_list\_id: (\`string\`) The ID of the associated price list. - - - price\_list\_type: (\`string\`) The price list's type. For example, \`sale\`. - - - min\_quantity: (\`number\`) The price's min quantity condition. - - - max\_quantity: (\`number\`) The price's max quantity condition. -- original\_price: (\`object\`) The original price's price details. - - - id: (\`string\`) The ID of the price. - - - price\_list\_id: (\`string\`) The ID of the associated price list. - - - price\_list\_type: (\`string\`) The price list's type. For example, \`sale\`. - - - min\_quantity: (\`number\`) The price's min quantity condition. - - - max\_quantity: (\`number\`) The price's max quantity condition. - -*** - -## Examples - -Consider the following price set: - -```ts -const priceSet = await pricingModuleService.createPriceSets({ - prices: [ - // default price - { - amount: 500, - currency_code: "EUR", - rules: {}, - }, - // prices with rules - { - amount: 400, - currency_code: "EUR", - rules: { - region_id: "reg_123", - }, - }, - { - amount: 450, - currency_code: "EUR", - rules: { - city: "krakow", - }, - }, - { - amount: 500, - currency_code: "EUR", - rules: { - city: "warsaw", - region_id: "reg_123", - }, - }, - ], -}) -``` - -### Default Price Selection - -### Code - -```ts -const price = await pricingModuleService.calculatePrices( - { id: [priceSet.id] }, - { - context: { - currency_code: "EUR" - } - } -) -``` - -### Result - -### Calculate Prices with Rules - -### Code - -```ts -const price = await pricingModuleService.calculatePrices( - { id: [priceSet.id] }, - { - context: { - currency_code: "EUR", - region_id: "reg_123", - city: "krakow" - } - } -) -``` - -### Result - -### Price Selection with Price List - -### Code - -```ts -const priceList = pricingModuleService.createPriceLists([{ - title: "Summer Price List", - description: "Price list for summer sale", - starts_at: Date.parse("01/10/2023").toString(), - ends_at: Date.parse("31/10/2023").toString(), - rules: { - region_id: ['PL'] - }, - type: "sale", - prices: [ - { - amount: 400, - currency_code: "EUR", - price_set_id: priceSet.id, - }, - { - amount: 450, - currency_code: "EUR", - price_set_id: priceSet.id, - }, - ], -}]); - -const price = await pricingModuleService.calculatePrices( - { id: [priceSet.id] }, - { - context: { - currency_code: "EUR", - region_id: "PL", - city: "krakow" - } - } -) -``` - -### Result - - -# Tax-Inclusive Pricing - -In this document, you’ll learn about tax-inclusive pricing and how it's used when calculating prices. - -## What is Tax-Inclusive Pricing? - -A tax-inclusive price is a price of a resource that includes taxes. Medusa calculates the tax amount from the price rather than adds the amount to it. - -For example, if a product’s price is $50, the tax rate is 2%, and tax-inclusive pricing is enabled, then the product's price is $49, and the applied tax amount is $1. - -*** - -## How is Tax-Inclusive Pricing Set? - -The [PricePreference data model](https://docs.medusajs.com/references/pricing/models/PricePreference/index.html.md) holds the tax-inclusive setting for a context. It has two properties that indicate the context: - -- `attribute`: The name of the attribute to compare against. For example, `region_id` or `currency_code`. -- `value`: The attribute’s value. For example, `reg_123` or `usd`. - -Only `region_id` and `currency_code` are supported as an `attribute` at the moment. - -The `is_tax_inclusive` property indicates whether tax-inclusivity is enabled in the specified context. - -For example: - -```json -{ - "attribute": "currency_code", - "value": "USD", - "is_tax_inclusive": true, -} -``` - -In this example, tax-inclusivity is enabled for the `USD` currency code. - -*** - -## Tax-Inclusive Pricing in Price Calculation - -### Tax Context - -As mentioned in the [Price Calculation documentation](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/pricing/price-calculation#calculation-context/index.html.md), The `calculatePrices` method accepts as a parameter a calculation context. - -To get accurate tax results, pass the `region_id` and / or `currency_code` in the calculation context. - -### Returned Tax Properties - -The `calculatePrices` method returns two properties related to tax-inclusivity: - -Learn more about the returned properties in [this guide](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/pricing/price-calculation#returned-price-object/index.html.md). - -- `is_calculated_price_tax_inclusive`: Whether the selected `calculated_price` is tax-inclusive. -- `is_original_price_tax_inclusive` : Whether the selected `original_price` is tax-inclusive. - -A price is considered tax-inclusive if: - -1. It belongs to the region or currency code specified in the calculation context; -2. and the region or currency code has a price preference with `is_tax_inclusive` enabled. - -### Tax Context Precedence - -A region’s price preference’s `is_tax_inclusive`'s value takes higher precedence in determining whether a price is tax-inclusive if: - -- both the `region_id` and `currency_code` are provided in the calculation context; -- the selected price belongs to the region; -- and the region has a price preference - - # Account Holders and Saved Payment Methods In this documentation, you'll learn about account holders, and how they're used to save payment methods in third-party payment providers. @@ -26491,6 +25698,41 @@ The `providers` option is an array of objects that accept the following properti - `options`: An optional object of the module provider's options. +# Payment + +In this document, you’ll learn what a payment is and how it's created, captured, and refunded. + +## What's a Payment? + +When a payment session is authorized, a payment, represented by the [Payment data model](https://docs.medusajs.com/references/payment/models/Payment/index.html.md), is created. This payment can later be captured or refunded. + +A payment carries many of the data and relations of a payment session: + +- It belongs to the same payment collection. +- It’s associated with the same payment provider, which handles further payment processing. +- It stores the payment session’s `data` property in its `data` property, as it’s still useful for the payment provider’s processing. + +*** + +## Capture Payments + +When a payment is captured, a capture, represented by the [Capture data model](https://docs.medusajs.com/references/payment/models/Capture/index.html.md), is created. It holds details related to the capture, such as the amount, the capture date, and more. + +The payment can also be captured incrementally, each time a capture record is created for that amount. + +![A diagram showcasing how a payment's multiple captures are stored](https://res.cloudinary.com/dza7lstvk/image/upload/v1711565445/Medusa%20Resources/payment-capture_f5fve1.jpg) + +*** + +## Refund Payments + +When a payment is refunded, a refund, represented by the [Refund data model](https://docs.medusajs.com/references/payment/models/Refund/index.html.md), is created. It holds details related to the refund, such as the amount, refund date, and more. + +A payment can be refunded multiple times, and each time a refund record is created. + +![A diagram showcasing how a payment's multiple refunds are stored](https://res.cloudinary.com/dza7lstvk/image/upload/v1711565555/Medusa%20Resources/payment-refund_lgfvyy.jpg) + + # Payment Collection In this document, you’ll learn what a payment collection is and how the Medusa application uses it with the Cart Module. @@ -26528,41 +25770,6 @@ It also implements the payment flow during checkout as explained in [this docume ![Diagram showcasing the relation between the Payment and Cart modules](https://res.cloudinary.com/dza7lstvk/image/upload/v1711537849/Medusa%20Resources/cart-payment_ixziqm.jpg) -# Payment - -In this document, you’ll learn what a payment is and how it's created, captured, and refunded. - -## What's a Payment? - -When a payment session is authorized, a payment, represented by the [Payment data model](https://docs.medusajs.com/references/payment/models/Payment/index.html.md), is created. This payment can later be captured or refunded. - -A payment carries many of the data and relations of a payment session: - -- It belongs to the same payment collection. -- It’s associated with the same payment provider, which handles further payment processing. -- It stores the payment session’s `data` property in its `data` property, as it’s still useful for the payment provider’s processing. - -*** - -## Capture Payments - -When a payment is captured, a capture, represented by the [Capture data model](https://docs.medusajs.com/references/payment/models/Capture/index.html.md), is created. It holds details related to the capture, such as the amount, the capture date, and more. - -The payment can also be captured incrementally, each time a capture record is created for that amount. - -![A diagram showcasing how a payment's multiple captures are stored](https://res.cloudinary.com/dza7lstvk/image/upload/v1711565445/Medusa%20Resources/payment-capture_f5fve1.jpg) - -*** - -## Refund Payments - -When a payment is refunded, a refund, represented by the [Refund data model](https://docs.medusajs.com/references/payment/models/Refund/index.html.md), is created. It holds details related to the refund, such as the amount, refund date, and more. - -A payment can be refunded multiple times, and each time a refund record is created. - -![A diagram showcasing how a payment's multiple refunds are stored](https://res.cloudinary.com/dza7lstvk/image/upload/v1711565555/Medusa%20Resources/payment-refund_lgfvyy.jpg) - - # Accept Payment Flow In this document, you’ll learn how to implement an accept-payment flow using workflows or the Payment Module's main service. @@ -26850,6 +26057,799 @@ If the event's details indicate that the payment should be captured, then the [c After the payment webhook actions are processed and the payment is authorized or captured, the Medusa application completes the cart associated with the payment's collection if it's not completed yet. +# Order Claim + +In this document, you’ll learn about order claims. + +Refer to this [Medusa Admin User Guide](https://docs.medusajs.com/user-guide/orders/claims/index.html.md) to learn how to manage an order's claims using the dashboard. + +## What is a Claim? + +When a customer receives a defective or incorrect item, the merchant can create a claim to refund or replace the item. + +The [OrderClaim data model](https://docs.medusajs.com/references/order/models/OrderClaim/index.html.md) represents a claim. + +*** + +## Claim Type + +The `Claim` data model has a `type` property whose value indicates the type of the claim: + +- `refund`: the items are returned, and the customer is refunded. +- `replace`: the items are returned, and the customer receives new items. + +*** + +## Old and Replacement Items + +When the claim is created, a return, represented by the [Return data model](https://docs.medusajs.com/references/order/models/Return/index.html.md), is also created to handle receiving the old items from the customer. + +Learn more about returns in [this guide](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/order/return/index.html.md). + +If the claim’s type is `replace`, replacement items are represented by the [ClaimItem data model](https://docs.medusajs.com/references/order/models/OrderClaimItem/index.html.md). + +*** + +## Claim Shipping Methods + +A claim uses shipping methods to send the replacement items to the customer. These methods are represented by the [OrderShippingMethod data model](https://docs.medusajs.com/references/order/models/OrderShippingMethod/index.html.md). + +The shipping methods for the returned items are associated with the claim's return, as explained in [this guide](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/order/return#return-shipping-methods/index.html.md). + +*** + +## Claim Refund + +If the claim’s type is `refund`, the amount to be refunded is stored in the `refund_amount` property. + +The [Transaction data model](https://docs.medusajs.com/references/order/models/OrderTransaction/index.html.md) represents the refunds made for the claim. + +*** + +## How Claims Impact an Order’s Version + +When a claim is confirmed, the order’s version is incremented. + + +# Order Exchange + +In this document, you’ll learn about order exchanges. + +Refer to this [Medusa Admin User Guide](https://docs.medusajs.com/user-guide/orders/exchanges/index.html.md) to learn how to manage an order's exchanges using the dashboard. + +## What is an Exchange? + +An exchange is the replacement of an item that the customer ordered with another. + +A merchant creates the exchange, specifying the items to be replaced and the new items to be sent. + +The [OrderExchange data model](https://docs.medusajs.com/references/order/models/OrderExchange/index.html.md) represents an exchange. + +*** + +## Returned and New Items + +When the exchange is created, a return, represented by the [Return data model](https://docs.medusajs.com/references/order/models/Return/index.html.md), is created to handle receiving the items back from the customer. + +Learn more about returns in [this guide](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/order/return/index.html.md). + +The [OrderExchangeItem data model](https://docs.medusajs.com/references/order/models/OrderExchangeItem/index.html.md) represents the new items to be sent to the customer. + +*** + +## Exchange Shipping Methods + +An exchange has shipping methods used to send the new items to the customer. They’re represented by the [OrderShippingMethod data model](https://docs.medusajs.com/references/order/models/OrderShippingMethod/index.html.md). + +The shipping methods for the returned items are associated with the exchange's return, as explained in [this guide](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/order/return#return-shipping-methods/index.html.md). + +*** + +## Exchange Payment + +The `Exchange` data model has a `difference_due` property that stores the outstanding amount. + +|Condition|Result| +|---|---|---| +|\`difference\_due \< 0\`|Merchant owes the customer a refund of the | +|\`difference\_due > 0\`|Merchant requires additional payment from the customer of the | +|\`difference\_due = 0\`|No payment processing is required.| + +Any payment or refund made is stored in the [Transaction data model](https://docs.medusajs.com/references/order/models/OrderTransaction/index.html.md). + +*** + +## How Exchanges Impact an Order’s Version + +When an exchange is confirmed, the order’s version is incremented. + + +# Order Return + +In this document, you’ll learn about order returns. + +Refer to this [Medusa Admin User Guide](https://docs.medusajs.com/user-guide/orders/returns/index.html.md) to learn how to manage an order's returns using the dashboard. + +## What is a Return? + +A return is the return of items delivered from the customer back to the merchant. It is represented by the [Return data model](https://docs.medusajs.com/references/order/models/Return/index.html.md). + +A return is requested either by the customer from the storefront, or the merchant from the admin. Medusa supports an automated Return Merchandise Authorization (RMA) flow. + +![Diagram showcasing the automated RMA flow.](https://res.cloudinary.com/dza7lstvk/image/upload/v1719578128/Medusa%20Resources/return-rma_pzprwq.jpg) + +Once the merchant receives the returned items, they mark the return as received. + +*** + +## Returned Items + +The items to be returned are represented by the [ReturnItem data model](references/order/models/ReturnItem). + +The `ReturnItem` model has two properties storing the item's quantity: + +1. `received_quantity`: The quantity of the item that's received and can be added to the item's inventory quantity. +2. `damaged_quantity`: The quantity of the item that's damaged, meaning it can't be sold again or added to the item's inventory quantity. + +*** + +## Return Shipping Methods + +A return has shipping methods used to return the items to the merchant. The shipping methods are represented by the [OrderShippingMethod data model](references/order/models/OrderShippingMethod). + +In the Medusa application, the shipping method for a return is created only from a shipping option, provided by the Fulfillment Module, that has the rule `is_return` enabled. + +*** + +## Refund Payment + +The `refund_amount` property of the `Return` data model holds the amount a merchant must refund the customer. + +The [OrderTransaction data model](references/order/models/OrderTransaction) represents the refunds made for the return. + +*** + +## Returns in Exchanges and Claims + +When a merchant creates an exchange or a claim, it includes returning items from the customer. + +The `Return` data model also represents the return of these items. In this case, the return is associated with the exchange or claim it was created for. + +*** + +## How Returns Impact an Order’s Version + +The order’s version is incremented when: + +1. A return is requested. +2. A return is marked as received. + + +# Pricing Concepts + +In this document, you’ll learn about the main concepts in the Pricing Module. + +## Price Set + +A [PriceSet](https://docs.medusajs.com/references/pricing/models/PriceSet/index.html.md) represents a collection of prices that are linked to a resource (for example, a product or a shipping option). + +Each of these prices are represented by the [Price data module](https://docs.medusajs.com/references/pricing/models/Price/index.html.md). + +![A diagram showcasing the relation between the price set and price](https://res.cloudinary.com/dza7lstvk/image/upload/v1709648650/Medusa%20Resources/price-set-money-amount_xeees0.jpg) + +*** + +## Price List + +A [PriceList](https://docs.medusajs.com/references/pricing/models/PriceList/index.html.md) is a group of prices only enabled if their conditions and rules are satisfied. + +A price list has optional `start_date` and `end_date` properties that indicate the date range in which a price list can be applied. + +Its associated prices are represented by the `Price` data model. + + +# Prices Calculation + +In this document, you'll learn how prices are calculated when you use the [calculatePrices method](https://docs.medusajs.com/references/pricing/calculatePrices/index.html.md) of the Pricing Module's main service. + +## calculatePrices Method + +The [calculatePrices method](https://docs.medusajs.com/references/pricing/calculatePrices/index.html.md) accepts as parameters the ID of one or more price sets and a context. + +It returns a price object with the best matching price for each price set. + +### Calculation Context + +The calculation context is an optional object passed as a second parameter to the `calculatePrices` method. It accepts rules to restrict the selected prices in the price set. + +For example: + +```ts +const price = await pricingModuleService.calculatePrices( + { id: [priceSetId] }, + { + context: { + currency_code: currencyCode, + region_id: "reg_123", + }, + } +) +``` + +In this example, you retrieve the prices in a price set for the specified currency code and region ID. + +### Returned Price Object + +For each price set, the `calculatePrices` method selects two prices: + +- A calculated price: Either a price that belongs to a price list and best matches the specified context, or the same as the original price. +- An original price, which is either: + - The same price as the calculated price if the price list it belongs to is of type `override`; + - Or a price that doesn't belong to a price list and best matches the specified context. + +Both prices are returned in an object that has the following properties: + +- id: (\`string\`) The ID of the price set from which the price was selected. +- is\_calculated\_price\_price\_list: (\`boolean\`) Whether the calculated price belongs to a price list. +- calculated\_amount: (\`number\`) The amount of the calculated price, or \`null\` if there isn't a calculated price. This is the amount shown to the customer. +- is\_original\_price\_price\_list: (\`boolean\`) Whether the original price belongs to a price list. +- original\_amount: (\`number\`) The amount of the original price, or \`null\` if there isn't an original price. This amount is useful to compare with the \`calculated\_amount\`, such as to check for discounted value. +- currency\_code: (\`string\`) The currency code of the calculated price, or \`null\` if there isn't a calculated price. +- is\_calculated\_price\_tax\_inclusive: (\`boolean\`) Whether the calculated price is tax inclusive. Learn more about tax-inclusivity in \[this document]\(../tax-inclusive-pricing/page.mdx) +- is\_original\_price\_tax\_inclusive: (\`boolean\`) Whether the original price is tax inclusive. Learn more about tax-inclusivity in \[this document]\(../tax-inclusive-pricing/page.mdx) +- calculated\_price: (\`object\`) The calculated price's price details. + + - id: (\`string\`) The ID of the price. + + - price\_list\_id: (\`string\`) The ID of the associated price list. + + - price\_list\_type: (\`string\`) The price list's type. For example, \`sale\`. + + - min\_quantity: (\`number\`) The price's min quantity condition. + + - max\_quantity: (\`number\`) The price's max quantity condition. +- original\_price: (\`object\`) The original price's price details. + + - id: (\`string\`) The ID of the price. + + - price\_list\_id: (\`string\`) The ID of the associated price list. + + - price\_list\_type: (\`string\`) The price list's type. For example, \`sale\`. + + - min\_quantity: (\`number\`) The price's min quantity condition. + + - max\_quantity: (\`number\`) The price's max quantity condition. + +*** + +## Examples + +Consider the following price set: + +```ts +const priceSet = await pricingModuleService.createPriceSets({ + prices: [ + // default price + { + amount: 500, + currency_code: "EUR", + rules: {}, + }, + // prices with rules + { + amount: 400, + currency_code: "EUR", + rules: { + region_id: "reg_123", + }, + }, + { + amount: 450, + currency_code: "EUR", + rules: { + city: "krakow", + }, + }, + { + amount: 500, + currency_code: "EUR", + rules: { + city: "warsaw", + region_id: "reg_123", + }, + }, + ], +}) +``` + +### Default Price Selection + +### Code + +```ts +const price = await pricingModuleService.calculatePrices( + { id: [priceSet.id] }, + { + context: { + currency_code: "EUR" + } + } +) +``` + +### Result + +### Calculate Prices with Rules + +### Code + +```ts +const price = await pricingModuleService.calculatePrices( + { id: [priceSet.id] }, + { + context: { + currency_code: "EUR", + region_id: "reg_123", + city: "krakow" + } + } +) +``` + +### Result + +### Price Selection with Price List + +### Code + +```ts +const priceList = pricingModuleService.createPriceLists([{ + title: "Summer Price List", + description: "Price list for summer sale", + starts_at: Date.parse("01/10/2023").toString(), + ends_at: Date.parse("31/10/2023").toString(), + rules: { + region_id: ['PL'] + }, + type: "sale", + prices: [ + { + amount: 400, + currency_code: "EUR", + price_set_id: priceSet.id, + }, + { + amount: 450, + currency_code: "EUR", + price_set_id: priceSet.id, + }, + ], +}]); + +const price = await pricingModuleService.calculatePrices( + { id: [priceSet.id] }, + { + context: { + currency_code: "EUR", + region_id: "PL", + city: "krakow" + } + } +) +``` + +### Result + + +# Price Rules + +In this Pricing Module guide, you'll learn about price rules for price sets and price lists, and how to add rules to a price. + +## Price Rule + +You can restrict prices by rules. Each rule of a price is represented by the [PriceRule data model](https://docs.medusajs.com/references/pricing/models/PriceRule/index.html.md). + +The `Price` data model has a `rules_count` property, which indicates how many rules, represented by `PriceRule`, are applied to the price. + +For exmaple, you create a price restricted to `10557` zip codes. + +![A diagram showcasing the relation between the PriceRule and Price](https://res.cloudinary.com/dza7lstvk/image/upload/v1709648772/Medusa%20Resources/price-rule-1_vy8bn9.jpg) + +A price can have multiple price rules. + +For example, a price can be restricted by a region and a zip code. + +![A diagram showcasing the relation between the PriceRule and Price with multiple rules.](https://res.cloudinary.com/dza7lstvk/image/upload/v1709649296/Medusa%20Resources/price-rule-3_pwpocz.jpg) + +*** + +## Price List Rules + +Rules applied to a price list are represented by the [PriceListRule data model](https://docs.medusajs.com/references/pricing/models/PriceListRule/index.html.md). + +The `rules_count` property of a `PriceList` indicates how many rules are applied to it. + +![A diagram showcasing the relation between the PriceSet, PriceList, Price, RuleType, and PriceListRuleValue](https://res.cloudinary.com/dza7lstvk/image/upload/v1709641999/Medusa%20Resources/price-list_zd10yd.jpg) + +*** + +## How to Set Rules on a Price? + +### Using Workflows + +Medusa uses the Pricing Module to store prices of different resources, such as product variants and shipping options. + +When you manage one of these resources using [Medusa's workflows](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/medusa-workflows-reference/index.html.md) or using the API routes that use them, you can set rules on a price using the `rules` property of the price object. + +For example, when creating a shipping option using the [createShippingOptionsWorkflow](https://docs.medusajs.com/resources/references/medusa-workflows/createShippingOptionsWorkflow/index.html.md) to create a shipping option, you can make the shipping price free based on the cart total: + +```ts highlights={workflowHighlights} +const { result } = await createShippingOptionsWorkflow(container) + .run({ + input: [{ + name: "Standard Shipping", + service_zone_id: "serzo_123", + shipping_profile_id: "sp_123", + provider_id: "prov_123", + type: { + label: "Standard", + description: "Standard shipping", + code: "standard", + }, + price_type: "flat", + prices: [ + // default price + { + currency_code: "usd", + amount: 10, + rules: {}, + }, + // price if cart total >= $100 + { + currency_code: "usd", + amount: 0, + rules: { + item_total: { + operator: "gte", + value: 100, + }, + }, + }, + ], + }], + }) +``` + +In this example, you create a shipping option whose default price is `$10`. When the total of the cart or order using this shipping option is greater than `$100`, the shipping option's price becomes free. + +### Using Pricing Module's Service + +For most use cases, it's recommended to use [workflows](#using-workflows) instead of directly using the module's service. + +When adding a price using the [addPrices](https://docs.medusajs.com/resources/references/pricing/addPrices/index.html.md) method of the Pricing Module's service, pass the `rules` property to a price object. + +For example: + +```ts +const priceSet = await pricingModule.addPrices({ + priceSetId: "pset_1", + prices: [ + // default price + { + currency_code: "usd", + amount: 10, + rules: {}, + }, + // price if cart total >= $100 + { + currency_code: "usd", + amount: 0, + rules: { + item_total: { + operator: "gte", + value: 100, + }, + }, + }, + ], +}) +``` + +In this example, you set the default price of a resource (for example, a shipping option), to `$10`. You also add a conditioned price that sets the price to `0` when the cart or order's total is greater than or equal to `$100`. + +### How is the Price Rule Applied? + +The [price calculation](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/pricing/price-calculation/index.html.md) mechanism considers a price applicable when the resource that this price is in matches the specified rules. + +For example, a [cart object](https://docs.medusajs.com/api/store#carts_cart_schema) has an `item_total` property. So, if a shipping option has the following price: + +```json +{ + "currency_code": "usd", + "amount": 0, + "rules": { + "item_total": { + "operator": "gte", + "value": 100, + } + } +} +``` + +The shipping option's price is applied when the cart's `item_total` is greater than or equal to `$100`. + +You can also apply the rule on nested relations and properties. For example, to apply a shipping option's price based on the customer's group, you can apply a rule on the `customer.group.id` attribute: + +```json +{ + "currency_code": "usd", + "amount": 0, + "rules": { + "customer.group.id": { + "operator": "eq", + "value": "cusgrp_123" + } + } +} +``` + +In this example, the price is only applied if a cart's customer belongs to the customer group of ID `cusgrp_123`. + +These same rules apply to product variant prices as well, or any other resource that has a price. + + +# Links between Pricing Module and Other Modules + +This document showcases the module links defined between the Pricing Module and other Commerce Modules. + +## Summary + +The Pricing Module has the following links to other modules: + +|First Data Model|Second Data Model|Type|Description| +|---|---|---|---| +| in ||Stored - one-to-one|| +| in ||Stored - one-to-one|| + +*** + +## Fulfillment Module + +The Fulfillment Module provides fulfillment-related functionalities, including shipping options that the customer chooses from when they place their order. However, it doesn't provide pricing-related functionalities for these options. + +Medusa defines a link between the `PriceSet` and `ShippingOption` data models. A shipping option's price is stored as a price set. + +![A diagram showcasing an example of how data models from the Pricing and Fulfillment modules are linked](https://res.cloudinary.com/dza7lstvk/image/upload/v1716561747/Medusa%20Resources/pricing-fulfillment_spywwa.jpg) + +### Retrieve with Query + +To retrieve the shipping option of a price set with [Query](https://docs.medusajs.com/docs/learn/fundamentals/module-links/query/index.html.md), pass `shipping_option.*` in `fields`: + +### query.graph + +```ts +const { data: priceSets } = await query.graph({ + entity: "price_set", + fields: [ + "shipping_option.*", + ], +}) + +// priceSets[0].shipping_option +``` + +### useQueryGraphStep + +```ts +import { useQueryGraphStep } from "@medusajs/medusa/core-flows" + +// ... + +const { data: priceSets } = useQueryGraphStep({ + entity: "price_set", + fields: [ + "shipping_option.*", + ], +}) + +// priceSets[0].shipping_option +``` + +### Manage with Link + +To manage the price set of a shipping option, use [Link](https://docs.medusajs.com/docs/learn/fundamentals/module-links/link/index.html.md): + +### link.create + +```ts +import { Modules } from "@medusajs/framework/utils" + +// ... + +await link.create({ + [Modules.FULFILLMENT]: { + shipping_option_id: "so_123", + }, + [Modules.PRICING]: { + price_set_id: "pset_123", + }, +}) +``` + +### createRemoteLinkStep + +```ts +import { Modules } from "@medusajs/framework/utils" +import { createRemoteLinkStep } from "@medusajs/medusa/core-flows" + +// ... + +createRemoteLinkStep({ + [Modules.FULFILLMENT]: { + shipping_option_id: "so_123", + }, + [Modules.PRICING]: { + price_set_id: "pset_123", + }, +}) +``` + +*** + +## Product Module + +The Product Module doesn't store or manage the prices of product variants. + +Medusa defines a link between the `ProductVariant` and the `PriceSet`. A product variant’s prices are stored as prices belonging to a price set. + +![A diagram showcasing an example of how data models from the Pricing and Product Module are linked. The PriceSet is linked to the ProductVariant of the Product Module.](https://res.cloudinary.com/dza7lstvk/image/upload/v1709651039/Medusa%20Resources/pricing-product_m4xaut.jpg) + +So, when you want to add prices for a product variant, you create a price set and add the prices to it. + +You can then benefit from adding rules to prices or using the `calculatePrices` method to retrieve the price of a product variant within a specified context. + +### Retrieve with Query + +To retrieve the variant of a price set with [Query](https://docs.medusajs.com/docs/learn/fundamentals/module-links/query/index.html.md), pass `variant.*` in `fields`: + +### query.graph + +```ts +const { data: priceSets } = await query.graph({ + entity: "price_set", + fields: [ + "variant.*", + ], +}) + +// priceSets[0].variant +``` + +### useQueryGraphStep + +```ts +import { useQueryGraphStep } from "@medusajs/medusa/core-flows" + +// ... + +const { data: priceSets } = useQueryGraphStep({ + entity: "price_set", + fields: [ + "variant.*", + ], +}) + +// priceSets[0].variant +``` + +### Manage with Link + +To manage the price set of a variant, use [Link](https://docs.medusajs.com/docs/learn/fundamentals/module-links/link/index.html.md): + +### link.create + +```ts +import { Modules } from "@medusajs/framework/utils" + +// ... + +await link.create({ + [Modules.PRODUCT]: { + variant_id: "variant_123", + }, + [Modules.PRICING]: { + price_set_id: "pset_123", + }, +}) +``` + +### createRemoteLinkStep + +```ts +import { Modules } from "@medusajs/framework/utils" +import { createRemoteLinkStep } from "@medusajs/medusa/core-flows" + +// ... + +createRemoteLinkStep({ + [Modules.PRODUCT]: { + variant_id: "variant_123", + }, + [Modules.PRICING]: { + price_set_id: "pset_123", + }, +}) +``` + + +# Tax-Inclusive Pricing + +In this document, you’ll learn about tax-inclusive pricing and how it's used when calculating prices. + +## What is Tax-Inclusive Pricing? + +A tax-inclusive price is a price of a resource that includes taxes. Medusa calculates the tax amount from the price rather than adds the amount to it. + +For example, if a product’s price is $50, the tax rate is 2%, and tax-inclusive pricing is enabled, then the product's price is $49, and the applied tax amount is $1. + +*** + +## How is Tax-Inclusive Pricing Set? + +The [PricePreference data model](https://docs.medusajs.com/references/pricing/models/PricePreference/index.html.md) holds the tax-inclusive setting for a context. It has two properties that indicate the context: + +- `attribute`: The name of the attribute to compare against. For example, `region_id` or `currency_code`. +- `value`: The attribute’s value. For example, `reg_123` or `usd`. + +Only `region_id` and `currency_code` are supported as an `attribute` at the moment. + +The `is_tax_inclusive` property indicates whether tax-inclusivity is enabled in the specified context. + +For example: + +```json +{ + "attribute": "currency_code", + "value": "USD", + "is_tax_inclusive": true, +} +``` + +In this example, tax-inclusivity is enabled for the `USD` currency code. + +*** + +## Tax-Inclusive Pricing in Price Calculation + +### Tax Context + +As mentioned in the [Price Calculation documentation](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/pricing/price-calculation#calculation-context/index.html.md), The `calculatePrices` method accepts as a parameter a calculation context. + +To get accurate tax results, pass the `region_id` and / or `currency_code` in the calculation context. + +### Returned Tax Properties + +The `calculatePrices` method returns two properties related to tax-inclusivity: + +Learn more about the returned properties in [this guide](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/pricing/price-calculation#returned-price-object/index.html.md). + +- `is_calculated_price_tax_inclusive`: Whether the selected `calculated_price` is tax-inclusive. +- `is_original_price_tax_inclusive` : Whether the selected `original_price` is tax-inclusive. + +A price is considered tax-inclusive if: + +1. It belongs to the region or currency code specified in the calculation context; +2. and the region or currency code has a price preference with `is_tax_inclusive` enabled. + +### Tax Context Precedence + +A region’s price preference’s `is_tax_inclusive`'s value takes higher precedence in determining whether a price is tax-inclusive if: + +- both the `region_id` and `currency_code` are provided in the calculation context; +- the selected price belongs to the region; +- and the region has a price preference + + # Links between Product Module and Other Modules This document showcases the module links defined between the Product Module and other Commerce Modules. @@ -27347,6 +27347,117 @@ By combining configurations of shipment requirements and inventory management, y |Item that doesn't require shipping and its variant inventory isn't managed by Medusa.||| +# Promotion Actions + +In this document, you’ll learn about promotion actions and how they’re computed using the [computeActions method](https://docs.medusajs.com/references/promotion/computeActions/index.html.md). + +## computeActions Method + +The Promotion Module's main service has a [computeActions method](https://docs.medusajs.com/references/promotion/computeActions/index.html.md) that returns an array of actions to perform on a cart when one or more promotions are applied. + +Actions inform you what adjustment must be made to a cart item or shipping method. Each action is an object having the `action` property indicating the type of action. + +*** + +## Action Types + +### `addItemAdjustment` Action + +The `addItemAdjustment` action indicates that an adjustment must be made to an item. For example, removing $5 off its amount. + +This action has the following format: + +```ts +export interface AddItemAdjustmentAction { + action: "addItemAdjustment" + item_id: string + amount: number + code: string + description?: string +} +``` + +This action means that a new record should be created of the `LineItemAdjustment` data model in the Cart Module, or `OrderLineItemAdjustment` data model in the Order Module. + +Refer to [this reference](https://docs.medusajs.com/references/promotion/interfaces/promotion.AddItemAdjustmentAction/index.html.md) for details on the object’s properties. + +### `removeItemAdjustment` Action + +The `removeItemAdjustment` action indicates that an adjustment must be removed from a line item. For example, remove the $5 discount. + +The `computeActions` method accepts any previous item adjustments in the `items` property of the second parameter. + +This action has the following format: + +```ts +export interface RemoveItemAdjustmentAction { + action: "removeItemAdjustment" + adjustment_id: string + description?: string + code: string +} +``` + +This action means that a new record should be removed of the `LineItemAdjustment` (or `OrderLineItemAdjustment`) with the specified ID in the `adjustment_id` property. + +Refer to [this reference](https://docs.medusajs.com/references/promotion/interfaces/promotion.RemoveItemAdjustmentAction/index.html.md) for details on the object’s properties. + +### `addShippingMethodAdjustment` Action + +The `addShippingMethodAdjustment` action indicates that an adjustment must be made on a shipping method. For example, make the shipping method free. + +This action has the following format: + +```ts +export interface AddShippingMethodAdjustment { + action: "addShippingMethodAdjustment" + shipping_method_id: string + amount: number + code: string + description?: string +} +``` + +This action means that a new record should be created of the `ShippingMethodAdjustment` data model in the Cart Module, or `OrderShippingMethodAdjustment` data model in the Order Module. + +Refer to [this reference](https://docs.medusajs.com/references/promotion/interfaces/promotion.AddShippingMethodAdjustment/index.html.md) for details on the object’s properties. + +### `removeShippingMethodAdjustment` Action + +The `removeShippingMethodAdjustment` action indicates that an adjustment must be removed from a shipping method. For example, remove the free shipping discount. + +The `computeActions` method accepts any previous shipping method adjustments in the `shipping_methods` property of the second parameter. + +This action has the following format: + +```ts +export interface RemoveShippingMethodAdjustment { + action: "removeShippingMethodAdjustment" + adjustment_id: string + code: string +} +``` + +When the Medusa application receives this action type, it removes the `ShippingMethodAdjustment` (or `OrderShippingMethodAdjustment`) with the specified ID in the `adjustment_id` property. + +Refer to [this reference](https://docs.medusajs.com/references/promotion/interfaces/promotion.RemoveShippingMethodAdjustment/index.html.md) for details on the object’s properties. + +### `campaignBudgetExceeded` Action + +When the `campaignBudgetExceeded` action is returned, the promotions within a campaign can no longer be used as the campaign budget has been exceeded. + +This action has the following format: + +```ts +export interface CampaignBudgetExceededAction { + action: "campaignBudgetExceeded" + code: string +} +``` + +Refer to [this reference](https://docs.medusajs.com/references/promotion/interfaces/promotion.CampaignBudgetExceededAction/index.html.md) for details on the object’s properties. + + # Product Variant Inventory # Product Variant Inventory @@ -27413,6 +27524,414 @@ The following guides provide more details on inventory management in the Medusa - [Storefront guide: how to retrieve a product variant's inventory details](https://docs.medusajs.com/resources/storefront-development/products/inventory/index.html.md). +# Application Method + +In this document, you'll learn what an application method is. + +## What is an Application Method? + +The [ApplicationMethod data model](https://docs.medusajs.com/references/promotion/models/ApplicationMethod/index.html.md) defines how a promotion is applied: + +|Property|Purpose| +|---|---| +|\`type\`|Does the promotion discount a fixed amount or a percentage?| +|\`target\_type\`|Is the promotion applied on a cart item, shipping method, or the entire order?| +|\`allocation\`|Is the discounted amount applied on each item or split between the applicable items?| + +## Target Promotion Rules + +When the promotion is applied to a cart item or a shipping method, you can restrict which items/shipping methods the promotion is applied to. + +The `ApplicationMethod` data model has a collection of `PromotionRule` records to restrict which items or shipping methods the promotion applies to. The `target_rules` property represents this relation. + +![A diagram showcasing the target\_rules relation between the ApplicationMethod and PromotionRule data models](https://res.cloudinary.com/dza7lstvk/image/upload/v1709898273/Medusa%20Resources/application-method-target-rules_hqaymz.jpg) + +In this example, the promotion is only applied on products in the cart having the SKU `SHIRT`. + +*** + +## Buy Promotion Rules + +When the promotion’s type is `buyget`, you must specify the “buy X” condition. For example, a cart must have two shirts before the promotion can be applied. + +The application method has a collection of `PromotionRule` items to define the “buy X” rule. The `buy_rules` property represents this relation. + +![A diagram showcasing the buy\_rules relation between the ApplicationMethod and PromotionRule data models](https://res.cloudinary.com/dza7lstvk/image/upload/v1709898453/Medusa%20Resources/application-method-buy-rules_djjuhw.jpg) + +In this example, the cart must have two products with the SKU `SHIRT` for the promotion to be applied. + + +# Campaign + +In this document, you'll learn about campaigns. + +Refer to this [Medusa Admin User Guide](https://docs.medusajs.com/user-guide/promotions/campaigns/index.html.md) to learn how to manage campaigns using the dashboard. + +## What is a Campaign? + +A [Campaign](https://docs.medusajs.com/references/promotion/models/Campaign/index.html.md) combines promotions under the same conditions, such as start and end dates. + +![A diagram showcasing the relation between the Campaign and Promotion data models](https://res.cloudinary.com/dza7lstvk/image/upload/v1709899225/Medusa%20Resources/campagin-promotion_hh3qsi.jpg) + +*** + +## Campaign Limits + +Each campaign has a budget represented by the [CampaignBudget data model](https://docs.medusajs.com/references/promotion/models/CampaignBudget/index.html.md). The budget limits how many times the promotion can be used. + +There are two types of budgets: + +- `spend`: An amount that, when crossed, the promotion becomes unusable. For example, if the amount limit is set to `$100`, and the total amount of usage of this promotion crosses that threshold, the promotion can no longer be applied. +- `usage`: The number of times that a promotion can be used. For example, if the usage limit is set to `10`, the promotion can be used only 10 times by customers. After that, it can no longer be applied. + +![A diagram showcasing the relation between the Campaign and CampaignBudget data models](https://res.cloudinary.com/dza7lstvk/image/upload/v1709899463/Medusa%20Resources/campagin-budget_rvqlmi.jpg) + + +# Promotion Concepts + +In this guide, you’ll learn about the main promotion and rule concepts in the Promotion Module. + +Refer to this [Medusa Admin User Guide](https://docs.medusajs.com/user-guide/promotions/index.html.md) to learn how to manage promotions using the dashboard. + +## What is a Promotion? + +A promotion, represented by the [Promotion data model](https://docs.medusajs.com/references/promotion/models/Promotion/index.html.md), is a discount that can be applied on cart items, shipping methods, or entire orders. + +A promotion has two types: + +- `standard`: A standard promotion with rules. +- `buyget`: “A buy X get Y” promotion with rules. + +|\`standard\`|\`buyget\`| +|---|---| +|A coupon code that gives customers 10% off their entire order.|Buy two shirts and get another for free.| +|A coupon code that gives customers $15 off any shirt in their order.|Buy two shirts and get 10% off the entire order.| +|A discount applied automatically for VIP customers that removes 10% off their shipping method’s amount.|Spend $100 and get free shipping.| + +The Medusa Admin UI may not provide a way to create each of these promotion examples. However, they are supported by the Promotion Module and Medusa's workflows and API routes. + +*** + +## Promotion Rules + +A promotion can be restricted by a set of rules, each rule is represented by the [PromotionRule data model](https://docs.medusajs.com/references/promotion/models/PromotionRule/index.html.md). + +For example, you can create a promotion that only customers of the `VIP` customer group can use. + +![A diagram showcasing the relation between Promotion and PromotionRule](https://res.cloudinary.com/dza7lstvk/image/upload/v1709833196/Medusa%20Resources/promotion-promotion-rule_msbx0w.jpg) + +A `PromotionRule`'s `attribute` property indicates the property's name to which this rule is applied. For example, `customer_group_id`. + +The expected value for the attribute is stored in the `PromotionRuleValue` data model. So, a rule can have multiple values. + +When testing whether a promotion can be applied to a cart, the rule's `attribute` property and its values are tested on the cart itself. + +For example, the cart's customer must be part of the customer group(s) indicated in the promotion rule's value. + +### Flexible Rules + +The `PromotionRule`'s `operator` property adds more flexibility to the rule’s condition rather than simple equality (`eq`). + +For example, to restrict the promotion to only `VIP` and `B2B` customer groups: + +- Add a `PromotionRule` record with its `attribute` property set to `customer_group_id` and `operator` property to `in`. +- Add two `PromotionRuleValue` records associated with the rule: one with the value `VIP` and the other `B2B`. + +![A diagram showcasing the relation between PromotionRule and PromotionRuleValue when a rule has multiple values](https://res.cloudinary.com/dza7lstvk/image/upload/v1709897383/Medusa%20Resources/promotion-promotion-rule-multiple_hctpmt.jpg) + +In this case, a customer’s group must be in the `VIP` and `B2B` set of values to use the promotion. + +*** + +## How to Apply Rules on a Promotion? + +### Using Workflows + +If you're managing promotions using [Medusa's workflows](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/medusa-workflows-reference/index.html.md) or the API routes that use them, you can specify rules for the promotion or its [application method](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/promotion/application-method/index.html.md). + +For example, if you're creating a promotion using the [createPromotionsWorkflow](https://docs.medusajs.com/resources/references/medusa-workflows/createPromotionsWorkflow/index.html.md): + +```ts +const { result } = await createPromotionsWorkflow(container) + .run({ + input: { + promotionsData: [{ + code: "10OFF", + type: "standard", + status: "active", + application_method: { + type: "percentage", + target_type: "items", + allocation: "across", + value: 10, + currency_code: "usd", + }, + rules: [ + { + attribute: "customer.group.id", + operator: "eq", + values: [ + "cusgrp_123" + ] + } + ] + }], + } + }) +``` + +In this example, the promotion is restricted to customers with the `cusgrp_123` customer group. + +### Using Promotion Module's Service + +For most use cases, it's recommended to use [workflows](#using-workflows) instead of directly using the module's service. + +If you're managing promotions using the Promotion Module's service, you can specify rules for the promotion or its [application method](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/promotion/application-method/index.html.md) in its methods. + +For example, if you're creating a promotion with the [createPromotions](https://docs.medusajs.com/resources/references/promotion/createPromotions/index.html.md) method: + +```ts +const promotions = await promotionModuleService.createPromotions([ + { + code: "50OFF", + type: "standard", + status: "active", + application_method: { + type: "percentage", + target_type: "items", + value: 50, + }, + rules: [ + { + attribute: "customer.group.id", + operator: "eq", + values: [ + "cusgrp_123" + ] + } + ] + }, +]) +``` + +In this example, the promotion is restricted to customers with the `cusgrp_123` customer group. + +### How is the Promotion Rule Applied? + +A promotion is applied on a resource if its attributes match the promotion's rules. + +For example, consider you have the following promotion with a rule that restricts the promotion to a specific customer: + +```json +{ + "code": "10OFF", + "type": "standard", + "status": "active", + "application_method": { + "type": "percentage", + "target_type": "items", + "allocation": "across", + "value": 10, + "currency_code": "usd" + }, + "rules": [ + { + "attribute": "customer_id", + "operator": "eq", + "values": [ + "cus_123" + ] + } + ] +} +``` + +When you try to apply this promotion on a cart, the cart's `customer_id` is compared to the promotion rule's value based on the specified operator. So, the promotion will only be applied if the cart's `customer_id` is equal to `cus_123`. + + +# Links between Promotion Module and Other Modules + +This document showcases the module links defined between the Promotion Module and other Commerce Modules. + +## Summary + +The Promotion Module has the following links to other modules: + +Read-only links are used to query data across modules, but the relations aren't stored in a pivot table in the database. + +|First Data Model|Second Data Model|Type|Description| +|---|---|---|---| +| in ||Stored - many-to-many|| +| in ||Read-only - has one|| +| in ||Stored - many-to-many|| + +*** + +## Cart Module + +A promotion can be applied on line items and shipping methods of a cart. Medusa defines a link between the `Cart` and `Promotion` data models. + +![A diagram showcasing an example of how data models from the Cart and Promotion modules are linked](https://res.cloudinary.com/dza7lstvk/image/upload/v1711538015/Medusa%20Resources/cart-promotion_kuh9vm.jpg) + +Medusa also defines a read-only link between the [Cart Module](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/cart/index.html.md)'s `LineItemAdjustment` data model and the `Promotion` data model. Because the link is read-only from the `LineItemAdjustment`'s side, you can only retrieve the promotion applied on a line item, and not the other way around. + +### Retrieve with Query + +To retrieve the carts that a promotion is applied on with [Query](https://docs.medusajs.com/docs/learn/fundamentals/module-links/query/index.html.md), pass `carts.*` in `fields`: + +To retrieve the promotion of a line item adjustment, pass `promotion.*` in `fields`. + +### query.graph + +```ts +const { data: promotions } = await query.graph({ + entity: "promotion", + fields: [ + "carts.*", + ], +}) + +// promotions[0].carts +``` + +### useQueryGraphStep + +```ts +import { useQueryGraphStep } from "@medusajs/medusa/core-flows" + +// ... + +const { data: promotions } = useQueryGraphStep({ + entity: "promotion", + fields: [ + "carts.*", + ], +}) + +// promotions[0].carts +``` + +### Manage with Link + +To manage the promotions of a cart, use [Link](https://docs.medusajs.com/docs/learn/fundamentals/module-links/link/index.html.md): + +### link.create + +```ts +import { Modules } from "@medusajs/framework/utils" + +// ... + +await link.create({ + [Modules.CART]: { + cart_id: "cart_123", + }, + [Modules.PROMOTION]: { + promotion_id: "promo_123", + }, +}) +``` + +### createRemoteLinkStep + +```ts +import { Modules } from "@medusajs/framework/utils" +import { createRemoteLinkStep } from "@medusajs/medusa/core-flows" + +// ... + +createRemoteLinkStep({ + [Modules.CART]: { + cart_id: "cart_123", + }, + [Modules.PROMOTION]: { + promotion_id: "promo_123", + }, +}) +``` + +*** + +## Order Module + +An order is associated with the promotion applied on it. Medusa defines a link between the `Order` and `Promotion` data models. + +![A diagram showcasing an example of how data models from the Order and Promotion modules are linked](https://res.cloudinary.com/dza7lstvk/image/upload/v1716555015/Medusa%20Resources/order-promotion_dgjzzd.jpg) + +### Retrieve with Query + +To retrieve the orders a promotion is applied on with [Query](https://docs.medusajs.com/docs/learn/fundamentals/module-links/query/index.html.md), pass `orders.*` in `fields`: + +### query.graph + +```ts +const { data: promotions } = await query.graph({ + entity: "promotion", + fields: [ + "orders.*", + ], +}) + +// promotions[0].orders +``` + +### useQueryGraphStep + +```ts +import { useQueryGraphStep } from "@medusajs/medusa/core-flows" + +// ... + +const { data: promotions } = useQueryGraphStep({ + entity: "promotion", + fields: [ + "orders.*", + ], +}) + +// promotions[0].orders +``` + +### Manage with Link + +To manage the promotion of an order, use [Link](https://docs.medusajs.com/docs/learn/fundamentals/module-links/link/index.html.md): + +### link.create + +```ts +import { Modules } from "@medusajs/framework/utils" + +// ... + +await link.create({ + [Modules.ORDER]: { + order_id: "order_123", + }, + [Modules.PROMOTION]: { + promotion_id: "promo_123", + }, +}) +``` + +### createRemoteLinkStep + +```ts +import { Modules } from "@medusajs/framework/utils" +import { createRemoteLinkStep } from "@medusajs/medusa/core-flows" + +// ... + +createRemoteLinkStep({ + [Modules.ORDER]: { + order_id: "order_123", + }, + [Modules.PROMOTION]: { + promotion_id: "promo_123", + }, +}) +``` + + # Links between Region Module and Other Modules This document showcases the module links defined between the Region Module and other Commerce Modules. @@ -27617,6 +28136,23 @@ The Medusa application infers the associated sales channels and ensures that onl To create a publishable API key, either use the [Medusa Admin](https://docs.medusajs.com/user-guide/settings/developer/publishable-api-keys/index.html.md) or the [Admin API Routes](https://docs.medusajs.com/api/admin#publishable-api-keys). +# Stock Location Concepts + +In this document, you’ll learn about the main concepts in the Stock Location Module. + +## Stock Location + +A stock location, represented by the `StockLocation` data model, represents a location where stock items are kept. For example, a warehouse. + +Medusa uses stock locations to provide inventory details, from the Inventory Module, per location. + +*** + +## StockLocationAddress + +The `StockLocationAddress` data model belongs to the `StockLocation` data model. It provides more detailed information of the location, such as country code or street address. + + # Links between Sales Channel Module and Other Modules This document showcases the module links defined between the Sales Channel Module and other Commerce Modules. @@ -27965,542 +28501,6 @@ createRemoteLinkStep({ ``` -# Promotion Actions - -In this document, you’ll learn about promotion actions and how they’re computed using the [computeActions method](https://docs.medusajs.com/references/promotion/computeActions/index.html.md). - -## computeActions Method - -The Promotion Module's main service has a [computeActions method](https://docs.medusajs.com/references/promotion/computeActions/index.html.md) that returns an array of actions to perform on a cart when one or more promotions are applied. - -Actions inform you what adjustment must be made to a cart item or shipping method. Each action is an object having the `action` property indicating the type of action. - -*** - -## Action Types - -### `addItemAdjustment` Action - -The `addItemAdjustment` action indicates that an adjustment must be made to an item. For example, removing $5 off its amount. - -This action has the following format: - -```ts -export interface AddItemAdjustmentAction { - action: "addItemAdjustment" - item_id: string - amount: number - code: string - description?: string -} -``` - -This action means that a new record should be created of the `LineItemAdjustment` data model in the Cart Module, or `OrderLineItemAdjustment` data model in the Order Module. - -Refer to [this reference](https://docs.medusajs.com/references/promotion/interfaces/promotion.AddItemAdjustmentAction/index.html.md) for details on the object’s properties. - -### `removeItemAdjustment` Action - -The `removeItemAdjustment` action indicates that an adjustment must be removed from a line item. For example, remove the $5 discount. - -The `computeActions` method accepts any previous item adjustments in the `items` property of the second parameter. - -This action has the following format: - -```ts -export interface RemoveItemAdjustmentAction { - action: "removeItemAdjustment" - adjustment_id: string - description?: string - code: string -} -``` - -This action means that a new record should be removed of the `LineItemAdjustment` (or `OrderLineItemAdjustment`) with the specified ID in the `adjustment_id` property. - -Refer to [this reference](https://docs.medusajs.com/references/promotion/interfaces/promotion.RemoveItemAdjustmentAction/index.html.md) for details on the object’s properties. - -### `addShippingMethodAdjustment` Action - -The `addShippingMethodAdjustment` action indicates that an adjustment must be made on a shipping method. For example, make the shipping method free. - -This action has the following format: - -```ts -export interface AddShippingMethodAdjustment { - action: "addShippingMethodAdjustment" - shipping_method_id: string - amount: number - code: string - description?: string -} -``` - -This action means that a new record should be created of the `ShippingMethodAdjustment` data model in the Cart Module, or `OrderShippingMethodAdjustment` data model in the Order Module. - -Refer to [this reference](https://docs.medusajs.com/references/promotion/interfaces/promotion.AddShippingMethodAdjustment/index.html.md) for details on the object’s properties. - -### `removeShippingMethodAdjustment` Action - -The `removeShippingMethodAdjustment` action indicates that an adjustment must be removed from a shipping method. For example, remove the free shipping discount. - -The `computeActions` method accepts any previous shipping method adjustments in the `shipping_methods` property of the second parameter. - -This action has the following format: - -```ts -export interface RemoveShippingMethodAdjustment { - action: "removeShippingMethodAdjustment" - adjustment_id: string - code: string -} -``` - -When the Medusa application receives this action type, it removes the `ShippingMethodAdjustment` (or `OrderShippingMethodAdjustment`) with the specified ID in the `adjustment_id` property. - -Refer to [this reference](https://docs.medusajs.com/references/promotion/interfaces/promotion.RemoveShippingMethodAdjustment/index.html.md) for details on the object’s properties. - -### `campaignBudgetExceeded` Action - -When the `campaignBudgetExceeded` action is returned, the promotions within a campaign can no longer be used as the campaign budget has been exceeded. - -This action has the following format: - -```ts -export interface CampaignBudgetExceededAction { - action: "campaignBudgetExceeded" - code: string -} -``` - -Refer to [this reference](https://docs.medusajs.com/references/promotion/interfaces/promotion.CampaignBudgetExceededAction/index.html.md) for details on the object’s properties. - - -# Application Method - -In this document, you'll learn what an application method is. - -## What is an Application Method? - -The [ApplicationMethod data model](https://docs.medusajs.com/references/promotion/models/ApplicationMethod/index.html.md) defines how a promotion is applied: - -|Property|Purpose| -|---|---| -|\`type\`|Does the promotion discount a fixed amount or a percentage?| -|\`target\_type\`|Is the promotion applied on a cart item, shipping method, or the entire order?| -|\`allocation\`|Is the discounted amount applied on each item or split between the applicable items?| - -## Target Promotion Rules - -When the promotion is applied to a cart item or a shipping method, you can restrict which items/shipping methods the promotion is applied to. - -The `ApplicationMethod` data model has a collection of `PromotionRule` records to restrict which items or shipping methods the promotion applies to. The `target_rules` property represents this relation. - -![A diagram showcasing the target\_rules relation between the ApplicationMethod and PromotionRule data models](https://res.cloudinary.com/dza7lstvk/image/upload/v1709898273/Medusa%20Resources/application-method-target-rules_hqaymz.jpg) - -In this example, the promotion is only applied on products in the cart having the SKU `SHIRT`. - -*** - -## Buy Promotion Rules - -When the promotion’s type is `buyget`, you must specify the “buy X” condition. For example, a cart must have two shirts before the promotion can be applied. - -The application method has a collection of `PromotionRule` items to define the “buy X” rule. The `buy_rules` property represents this relation. - -![A diagram showcasing the buy\_rules relation between the ApplicationMethod and PromotionRule data models](https://res.cloudinary.com/dza7lstvk/image/upload/v1709898453/Medusa%20Resources/application-method-buy-rules_djjuhw.jpg) - -In this example, the cart must have two products with the SKU `SHIRT` for the promotion to be applied. - - -# Promotion Concepts - -In this guide, you’ll learn about the main promotion and rule concepts in the Promotion Module. - -Refer to this [Medusa Admin User Guide](https://docs.medusajs.com/user-guide/promotions/index.html.md) to learn how to manage promotions using the dashboard. - -## What is a Promotion? - -A promotion, represented by the [Promotion data model](https://docs.medusajs.com/references/promotion/models/Promotion/index.html.md), is a discount that can be applied on cart items, shipping methods, or entire orders. - -A promotion has two types: - -- `standard`: A standard promotion with rules. -- `buyget`: “A buy X get Y” promotion with rules. - -|\`standard\`|\`buyget\`| -|---|---| -|A coupon code that gives customers 10% off their entire order.|Buy two shirts and get another for free.| -|A coupon code that gives customers $15 off any shirt in their order.|Buy two shirts and get 10% off the entire order.| -|A discount applied automatically for VIP customers that removes 10% off their shipping method’s amount.|Spend $100 and get free shipping.| - -The Medusa Admin UI may not provide a way to create each of these promotion examples. However, they are supported by the Promotion Module and Medusa's workflows and API routes. - -*** - -## Promotion Rules - -A promotion can be restricted by a set of rules, each rule is represented by the [PromotionRule data model](https://docs.medusajs.com/references/promotion/models/PromotionRule/index.html.md). - -For example, you can create a promotion that only customers of the `VIP` customer group can use. - -![A diagram showcasing the relation between Promotion and PromotionRule](https://res.cloudinary.com/dza7lstvk/image/upload/v1709833196/Medusa%20Resources/promotion-promotion-rule_msbx0w.jpg) - -A `PromotionRule`'s `attribute` property indicates the property's name to which this rule is applied. For example, `customer_group_id`. - -The expected value for the attribute is stored in the `PromotionRuleValue` data model. So, a rule can have multiple values. - -When testing whether a promotion can be applied to a cart, the rule's `attribute` property and its values are tested on the cart itself. - -For example, the cart's customer must be part of the customer group(s) indicated in the promotion rule's value. - -### Flexible Rules - -The `PromotionRule`'s `operator` property adds more flexibility to the rule’s condition rather than simple equality (`eq`). - -For example, to restrict the promotion to only `VIP` and `B2B` customer groups: - -- Add a `PromotionRule` record with its `attribute` property set to `customer_group_id` and `operator` property to `in`. -- Add two `PromotionRuleValue` records associated with the rule: one with the value `VIP` and the other `B2B`. - -![A diagram showcasing the relation between PromotionRule and PromotionRuleValue when a rule has multiple values](https://res.cloudinary.com/dza7lstvk/image/upload/v1709897383/Medusa%20Resources/promotion-promotion-rule-multiple_hctpmt.jpg) - -In this case, a customer’s group must be in the `VIP` and `B2B` set of values to use the promotion. - -*** - -## How to Apply Rules on a Promotion? - -### Using Workflows - -If you're managing promotions using [Medusa's workflows](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/medusa-workflows-reference/index.html.md) or the API routes that use them, you can specify rules for the promotion or its [application method](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/promotion/application-method/index.html.md). - -For example, if you're creating a promotion using the [createPromotionsWorkflow](https://docs.medusajs.com/resources/references/medusa-workflows/createPromotionsWorkflow/index.html.md): - -```ts -const { result } = await createPromotionsWorkflow(container) - .run({ - input: { - promotionsData: [{ - code: "10OFF", - type: "standard", - status: "active", - application_method: { - type: "percentage", - target_type: "items", - allocation: "across", - value: 10, - currency_code: "usd", - }, - rules: [ - { - attribute: "customer.group.id", - operator: "eq", - values: [ - "cusgrp_123" - ] - } - ] - }], - } - }) -``` - -In this example, the promotion is restricted to customers with the `cusgrp_123` customer group. - -### Using Promotion Module's Service - -For most use cases, it's recommended to use [workflows](#using-workflows) instead of directly using the module's service. - -If you're managing promotions using the Promotion Module's service, you can specify rules for the promotion or its [application method](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/promotion/application-method/index.html.md) in its methods. - -For example, if you're creating a promotion with the [createPromotions](https://docs.medusajs.com/resources/references/promotion/createPromotions/index.html.md) method: - -```ts -const promotions = await promotionModuleService.createPromotions([ - { - code: "50OFF", - type: "standard", - status: "active", - application_method: { - type: "percentage", - target_type: "items", - value: 50, - }, - rules: [ - { - attribute: "customer.group.id", - operator: "eq", - values: [ - "cusgrp_123" - ] - } - ] - }, -]) -``` - -In this example, the promotion is restricted to customers with the `cusgrp_123` customer group. - -### How is the Promotion Rule Applied? - -A promotion is applied on a resource if its attributes match the promotion's rules. - -For example, consider you have the following promotion with a rule that restricts the promotion to a specific customer: - -```json -{ - "code": "10OFF", - "type": "standard", - "status": "active", - "application_method": { - "type": "percentage", - "target_type": "items", - "allocation": "across", - "value": 10, - "currency_code": "usd" - }, - "rules": [ - { - "attribute": "customer_id", - "operator": "eq", - "values": [ - "cus_123" - ] - } - ] -} -``` - -When you try to apply this promotion on a cart, the cart's `customer_id` is compared to the promotion rule's value based on the specified operator. So, the promotion will only be applied if the cart's `customer_id` is equal to `cus_123`. - - -# Campaign - -In this document, you'll learn about campaigns. - -Refer to this [Medusa Admin User Guide](https://docs.medusajs.com/user-guide/promotions/campaigns/index.html.md) to learn how to manage campaigns using the dashboard. - -## What is a Campaign? - -A [Campaign](https://docs.medusajs.com/references/promotion/models/Campaign/index.html.md) combines promotions under the same conditions, such as start and end dates. - -![A diagram showcasing the relation between the Campaign and Promotion data models](https://res.cloudinary.com/dza7lstvk/image/upload/v1709899225/Medusa%20Resources/campagin-promotion_hh3qsi.jpg) - -*** - -## Campaign Limits - -Each campaign has a budget represented by the [CampaignBudget data model](https://docs.medusajs.com/references/promotion/models/CampaignBudget/index.html.md). The budget limits how many times the promotion can be used. - -There are two types of budgets: - -- `spend`: An amount that, when crossed, the promotion becomes unusable. For example, if the amount limit is set to `$100`, and the total amount of usage of this promotion crosses that threshold, the promotion can no longer be applied. -- `usage`: The number of times that a promotion can be used. For example, if the usage limit is set to `10`, the promotion can be used only 10 times by customers. After that, it can no longer be applied. - -![A diagram showcasing the relation between the Campaign and CampaignBudget data models](https://res.cloudinary.com/dza7lstvk/image/upload/v1709899463/Medusa%20Resources/campagin-budget_rvqlmi.jpg) - - -# Links between Promotion Module and Other Modules - -This document showcases the module links defined between the Promotion Module and other Commerce Modules. - -## Summary - -The Promotion Module has the following links to other modules: - -Read-only links are used to query data across modules, but the relations aren't stored in a pivot table in the database. - -|First Data Model|Second Data Model|Type|Description| -|---|---|---|---| -| in ||Stored - many-to-many|| -| in ||Read-only - has one|| -| in ||Stored - many-to-many|| - -*** - -## Cart Module - -A promotion can be applied on line items and shipping methods of a cart. Medusa defines a link between the `Cart` and `Promotion` data models. - -![A diagram showcasing an example of how data models from the Cart and Promotion modules are linked](https://res.cloudinary.com/dza7lstvk/image/upload/v1711538015/Medusa%20Resources/cart-promotion_kuh9vm.jpg) - -Medusa also defines a read-only link between the [Cart Module](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/cart/index.html.md)'s `LineItemAdjustment` data model and the `Promotion` data model. Because the link is read-only from the `LineItemAdjustment`'s side, you can only retrieve the promotion applied on a line item, and not the other way around. - -### Retrieve with Query - -To retrieve the carts that a promotion is applied on with [Query](https://docs.medusajs.com/docs/learn/fundamentals/module-links/query/index.html.md), pass `carts.*` in `fields`: - -To retrieve the promotion of a line item adjustment, pass `promotion.*` in `fields`. - -### query.graph - -```ts -const { data: promotions } = await query.graph({ - entity: "promotion", - fields: [ - "carts.*", - ], -}) - -// promotions[0].carts -``` - -### useQueryGraphStep - -```ts -import { useQueryGraphStep } from "@medusajs/medusa/core-flows" - -// ... - -const { data: promotions } = useQueryGraphStep({ - entity: "promotion", - fields: [ - "carts.*", - ], -}) - -// promotions[0].carts -``` - -### Manage with Link - -To manage the promotions of a cart, use [Link](https://docs.medusajs.com/docs/learn/fundamentals/module-links/link/index.html.md): - -### link.create - -```ts -import { Modules } from "@medusajs/framework/utils" - -// ... - -await link.create({ - [Modules.CART]: { - cart_id: "cart_123", - }, - [Modules.PROMOTION]: { - promotion_id: "promo_123", - }, -}) -``` - -### createRemoteLinkStep - -```ts -import { Modules } from "@medusajs/framework/utils" -import { createRemoteLinkStep } from "@medusajs/medusa/core-flows" - -// ... - -createRemoteLinkStep({ - [Modules.CART]: { - cart_id: "cart_123", - }, - [Modules.PROMOTION]: { - promotion_id: "promo_123", - }, -}) -``` - -*** - -## Order Module - -An order is associated with the promotion applied on it. Medusa defines a link between the `Order` and `Promotion` data models. - -![A diagram showcasing an example of how data models from the Order and Promotion modules are linked](https://res.cloudinary.com/dza7lstvk/image/upload/v1716555015/Medusa%20Resources/order-promotion_dgjzzd.jpg) - -### Retrieve with Query - -To retrieve the orders a promotion is applied on with [Query](https://docs.medusajs.com/docs/learn/fundamentals/module-links/query/index.html.md), pass `orders.*` in `fields`: - -### query.graph - -```ts -const { data: promotions } = await query.graph({ - entity: "promotion", - fields: [ - "orders.*", - ], -}) - -// promotions[0].orders -``` - -### useQueryGraphStep - -```ts -import { useQueryGraphStep } from "@medusajs/medusa/core-flows" - -// ... - -const { data: promotions } = useQueryGraphStep({ - entity: "promotion", - fields: [ - "orders.*", - ], -}) - -// promotions[0].orders -``` - -### Manage with Link - -To manage the promotion of an order, use [Link](https://docs.medusajs.com/docs/learn/fundamentals/module-links/link/index.html.md): - -### link.create - -```ts -import { Modules } from "@medusajs/framework/utils" - -// ... - -await link.create({ - [Modules.ORDER]: { - order_id: "order_123", - }, - [Modules.PROMOTION]: { - promotion_id: "promo_123", - }, -}) -``` - -### createRemoteLinkStep - -```ts -import { Modules } from "@medusajs/framework/utils" -import { createRemoteLinkStep } from "@medusajs/medusa/core-flows" - -// ... - -createRemoteLinkStep({ - [Modules.ORDER]: { - order_id: "order_123", - }, - [Modules.PROMOTION]: { - promotion_id: "promo_123", - }, -}) -``` - - -# Stock Location Concepts - -In this document, you’ll learn about the main concepts in the Stock Location Module. - -## Stock Location - -A stock location, represented by the `StockLocation` data model, represents a location where stock items are kept. For example, a warehouse. - -Medusa uses stock locations to provide inventory details, from the Inventory Module, per location. - -*** - -## StockLocationAddress - -The `StockLocationAddress` data model belongs to the `StockLocation` data model. It provides more detailed information of the location, such as country code or street address. - - # Links between Stock Location Module and Other Modules This document showcases the module links defined between the Stock Location Module and other Commerce Modules. @@ -28731,63 +28731,6 @@ createRemoteLinkStep({ ``` -# Links between Store Module and Other Modules - -This document showcases the module links defined between the Store Module and other Commerce Modules. - -## Summary - -The Store Module has the following links to other modules: - -Read-only links are used to query data across modules, but the relations aren't stored in a pivot table in the database. - -|First Data Model|Second Data Model|Type|Description| -|---|---|---|---| -|| in |Read-only - has many|| - -*** - -## Currency Module - -The Store Module has a `Currency` data model that stores the supported currencies of a store. However, these currencies don't hold all the details of a currency, such as its name or symbol. - -Instead, Medusa defines a read-only link between the [Currency Module](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/currency/index.html.md)'s `Currency` data model and the Store Module's `StoreCurrency` data model. This means you can retrieve the details of a store's supported currencies, but you don't manage the links in a pivot table in the database. The currencies of a store are determined by the `currency_code` of the [Currency](https://docs.medusajs.com/references/store/models/Currency/index.html.md) data model in the Store Module (not in the Currency Module). - -### Retrieve with Query - -To retrieve the details of a store's currencies with [Query](https://docs.medusajs.com/docs/learn/fundamentals/module-links/query/index.html.md), pass `supported_currencies.currency.*` in `fields`: - -### query.graph - -```ts -const { data: stores } = await query.graph({ - entity: "store", - fields: [ - "supported_currencies.currency.*", - ], -}) - -// stores[0].supported_currencies -``` - -### useQueryGraphStep - -```ts -import { useQueryGraphStep } from "@medusajs/medusa/core-flows" - -// ... - -const { data: stores } = useQueryGraphStep({ - entity: "store", - fields: [ - "supported_currencies.currency.*", - ], -}) - -// stores[0].supported_currencies -``` - - # Tax Module Options In this document, you'll learn about the options of the Tax Module. @@ -28961,6 +28904,63 @@ Tax regions can inherit settings and rules from a parent tax region. Each tax region has tax rules and a tax provider. +# Links between Store Module and Other Modules + +This document showcases the module links defined between the Store Module and other Commerce Modules. + +## Summary + +The Store Module has the following links to other modules: + +Read-only links are used to query data across modules, but the relations aren't stored in a pivot table in the database. + +|First Data Model|Second Data Model|Type|Description| +|---|---|---|---| +|| in |Read-only - has many|| + +*** + +## Currency Module + +The Store Module has a `Currency` data model that stores the supported currencies of a store. However, these currencies don't hold all the details of a currency, such as its name or symbol. + +Instead, Medusa defines a read-only link between the [Currency Module](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/currency/index.html.md)'s `Currency` data model and the Store Module's `StoreCurrency` data model. This means you can retrieve the details of a store's supported currencies, but you don't manage the links in a pivot table in the database. The currencies of a store are determined by the `currency_code` of the [Currency](https://docs.medusajs.com/references/store/models/Currency/index.html.md) data model in the Store Module (not in the Currency Module). + +### Retrieve with Query + +To retrieve the details of a store's currencies with [Query](https://docs.medusajs.com/docs/learn/fundamentals/module-links/query/index.html.md), pass `supported_currencies.currency.*` in `fields`: + +### query.graph + +```ts +const { data: stores } = await query.graph({ + entity: "store", + fields: [ + "supported_currencies.currency.*", + ], +}) + +// stores[0].supported_currencies +``` + +### useQueryGraphStep + +```ts +import { useQueryGraphStep } from "@medusajs/medusa/core-flows" + +// ... + +const { data: stores } = useQueryGraphStep({ + entity: "store", + fields: [ + "supported_currencies.currency.*", + ], +}) + +// stores[0].supported_currencies +``` + + # User Module Options In this document, you'll learn about the options of the User Module. @@ -29078,175 +29078,6 @@ if (!count) { ``` -# GitHub Auth Module Provider - -In this document, you’ll learn about the GitHub Auth Module Provider and how to install and use it in the Auth Module. - -The Github Auth Module Provider authenticates users with their GitHub account. - -Learn about the authentication flow in [this guide](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/auth/authentication-route/index.html.md). - -*** - -## Register the Github Auth Module Provider - -### Prerequisites - -- [Register GitHub App. When setting the Callback URL, set it to a URL in your frontend that later uses Medusa's callback route to validate the authentication.](https://docs.github.com/en/apps/creating-github-apps/setting-up-a-github-app/creating-a-github-app) -- [Retrieve the client ID and client secret of your GitHub App](https://docs.github.com/en/rest/authentication/authenticating-to-the-rest-api?apiVersion=2022-11-28#using-basic-authentication) - -Add the module to the array of providers passed to the Auth Module: - -```ts title="medusa-config.ts" -import { Modules, ContainerRegistrationKeys } from "@medusajs/framework/utils" - -// ... - -module.exports = defineConfig({ - // ... - modules: [ - { - resolve: "@medusajs/medusa/auth", - dependencies: [Modules.CACHE, ContainerRegistrationKeys.LOGGER], - options: { - providers: [ - // other providers... - { - resolve: "@medusajs/medusa/auth-github", - id: "github", - options: { - clientId: process.env.GITHUB_CLIENT_ID, - clientSecret: process.env.GITHUB_CLIENT_SECRET, - callbackUrl: process.env.GITHUB_CALLBACK_URL, - }, - }, - ], - }, - }, - ], -}) -``` - -### Environment Variables - -Make sure to add the necessary environment variables for the above options in `.env`: - -```plain -GITHUB_CLIENT_ID= -GITHUB_CLIENT_SECRET= -GITHUB_CALLBACK_URL= -``` - -### Module Options - -|Configuration|Description|Required| -|---|---|---|---|---| -|\`clientId\`|A string indicating the client ID of your GitHub app.|Yes| -|\`clientSecret\`|A string indicating the client secret of your GitHub app.|Yes| -|\`callbackUrl\`|A string indicating the URL to redirect to in your frontend after the user completes their authentication in GitHub.|Yes| - -*** - -## Override Callback URL During Authentication - -In many cases, you may have different callback URL for actor types. For example, you may redirect admin users to a different URL than customers after authentication. - -The [Authenticate or Login API Route](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/auth/authentication-route#login-route/index.html.md) can accept a `callback_url` body parameter to override the provider's `callbackUrl` option. Learn more in [this documentation](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/auth/authentication-route#login-route/index.html.md). - -*** - -## Examples - -- [How to implement third-party / social login in the storefront.](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/storefront-development/customers/third-party-login/index.html.md). - - -# Google Auth Module Provider - -In this document, you’ll learn about the Google Auth Module Provider and how to install and use it in the Auth Module. - -The Google Auth Module Provider authenticates users with their Google account. - -Learn about the authentication flow for third-party providers in [this guide](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/auth/authentication-route#2-third-party-service-authenticate-flow/index.html.md). - -*** - -## Register the Google Auth Module Provider - -### Prerequisites - -- [Create a project in Google Cloud.](https://cloud.google.com/resource-manager/docs/creating-managing-projects) -- [Create authorization credentials. When setting the Redirect Uri, set it to a URL in your frontend that later uses Medusa's callback route to validate the authentication.](https://developers.google.com/identity/protocols/oauth2/web-server#creatingcred) - -Add the module to the array of providers passed to the Auth Module: - -```ts title="medusa-config.ts" -import { Modules, ContainerRegistrationKeys } from "@medusajs/framework/utils" - -// ... - -module.exports = defineConfig({ - // ... - modules: [ - { - // ... - [Modules.AUTH]: { - resolve: "@medusajs/medusa/auth", - dependencies: [Modules.CACHE, ContainerRegistrationKeys.LOGGER], - options: { - providers: [ - // other providers... - { - resolve: "@medusajs/medusa/auth-google", - id: "google", - options: { - clientId: process.env.GOOGLE_CLIENT_ID, - clientSecret: process.env.GOOGLE_CLIENT_SECRET, - callbackUrl: process.env.GOOGLE_CALLBACK_URL, - }, - }, - ], - }, - }, - }, - ], -}) -``` - -### Environment Variables - -Make sure to add the necessary environment variables for the above options in `.env`: - -```plain -GOOGLE_CLIENT_ID= -GOOGLE_CLIENT_SECRET= -GOOGLE_CALLBACK_URL= -``` - -### Module Options - -|Configuration|Description|Required| -|---|---|---|---|---| -|\`clientId\`|A string indicating the |Yes| -|\`clientSecret\`|A string indicating the |Yes| -|\`callbackUrl\`|A string indicating the URL to redirect to in your frontend after the user completes their authentication in Google.|Yes| - -*** - -*** - -## Override Callback URL During Authentication - -In many cases, you may have different callback URL for actor types. For example, you may redirect admin users to a different URL than customers after authentication. - -The [Authenticate or Login API Route](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/auth/authentication-route#login-route/index.html.md) can accept a `callback_url` body parameter to override the provider's `callbackUrl` option. Learn more in [this documentation](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/auth/authentication-route#login-route/index.html.md). - -*** - -## Examples - -- [How to implement Google social login in the storefront](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/storefront-development/customers/third-party-login/index.html.md). - - # Emailpass Auth Module Provider In this document, you’ll learn about the Emailpass auth module provider and how to install and use it in the Auth Module. @@ -29499,6 +29330,175 @@ For the context of the product variant's calculated price, you pass an object to Each variant in the retrieved products has a `calculated_price` object. Learn more about its properties in [this Pricing Module guide](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/pricing/price-calculation#returned-price-object/index.html.md). +# GitHub Auth Module Provider + +In this document, you’ll learn about the GitHub Auth Module Provider and how to install and use it in the Auth Module. + +The Github Auth Module Provider authenticates users with their GitHub account. + +Learn about the authentication flow in [this guide](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/auth/authentication-route/index.html.md). + +*** + +## Register the Github Auth Module Provider + +### Prerequisites + +- [Register GitHub App. When setting the Callback URL, set it to a URL in your frontend that later uses Medusa's callback route to validate the authentication.](https://docs.github.com/en/apps/creating-github-apps/setting-up-a-github-app/creating-a-github-app) +- [Retrieve the client ID and client secret of your GitHub App](https://docs.github.com/en/rest/authentication/authenticating-to-the-rest-api?apiVersion=2022-11-28#using-basic-authentication) + +Add the module to the array of providers passed to the Auth Module: + +```ts title="medusa-config.ts" +import { Modules, ContainerRegistrationKeys } from "@medusajs/framework/utils" + +// ... + +module.exports = defineConfig({ + // ... + modules: [ + { + resolve: "@medusajs/medusa/auth", + dependencies: [Modules.CACHE, ContainerRegistrationKeys.LOGGER], + options: { + providers: [ + // other providers... + { + resolve: "@medusajs/medusa/auth-github", + id: "github", + options: { + clientId: process.env.GITHUB_CLIENT_ID, + clientSecret: process.env.GITHUB_CLIENT_SECRET, + callbackUrl: process.env.GITHUB_CALLBACK_URL, + }, + }, + ], + }, + }, + ], +}) +``` + +### Environment Variables + +Make sure to add the necessary environment variables for the above options in `.env`: + +```plain +GITHUB_CLIENT_ID= +GITHUB_CLIENT_SECRET= +GITHUB_CALLBACK_URL= +``` + +### Module Options + +|Configuration|Description|Required| +|---|---|---|---|---| +|\`clientId\`|A string indicating the client ID of your GitHub app.|Yes| +|\`clientSecret\`|A string indicating the client secret of your GitHub app.|Yes| +|\`callbackUrl\`|A string indicating the URL to redirect to in your frontend after the user completes their authentication in GitHub.|Yes| + +*** + +## Override Callback URL During Authentication + +In many cases, you may have different callback URL for actor types. For example, you may redirect admin users to a different URL than customers after authentication. + +The [Authenticate or Login API Route](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/auth/authentication-route#login-route/index.html.md) can accept a `callback_url` body parameter to override the provider's `callbackUrl` option. Learn more in [this documentation](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/auth/authentication-route#login-route/index.html.md). + +*** + +## Examples + +- [How to implement third-party / social login in the storefront.](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/storefront-development/customers/third-party-login/index.html.md). + + +# Google Auth Module Provider + +In this document, you’ll learn about the Google Auth Module Provider and how to install and use it in the Auth Module. + +The Google Auth Module Provider authenticates users with their Google account. + +Learn about the authentication flow for third-party providers in [this guide](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/auth/authentication-route#2-third-party-service-authenticate-flow/index.html.md). + +*** + +## Register the Google Auth Module Provider + +### Prerequisites + +- [Create a project in Google Cloud.](https://cloud.google.com/resource-manager/docs/creating-managing-projects) +- [Create authorization credentials. When setting the Redirect Uri, set it to a URL in your frontend that later uses Medusa's callback route to validate the authentication.](https://developers.google.com/identity/protocols/oauth2/web-server#creatingcred) + +Add the module to the array of providers passed to the Auth Module: + +```ts title="medusa-config.ts" +import { Modules, ContainerRegistrationKeys } from "@medusajs/framework/utils" + +// ... + +module.exports = defineConfig({ + // ... + modules: [ + { + // ... + [Modules.AUTH]: { + resolve: "@medusajs/medusa/auth", + dependencies: [Modules.CACHE, ContainerRegistrationKeys.LOGGER], + options: { + providers: [ + // other providers... + { + resolve: "@medusajs/medusa/auth-google", + id: "google", + options: { + clientId: process.env.GOOGLE_CLIENT_ID, + clientSecret: process.env.GOOGLE_CLIENT_SECRET, + callbackUrl: process.env.GOOGLE_CALLBACK_URL, + }, + }, + ], + }, + }, + }, + ], +}) +``` + +### Environment Variables + +Make sure to add the necessary environment variables for the above options in `.env`: + +```plain +GOOGLE_CLIENT_ID= +GOOGLE_CLIENT_SECRET= +GOOGLE_CALLBACK_URL= +``` + +### Module Options + +|Configuration|Description|Required| +|---|---|---|---|---| +|\`clientId\`|A string indicating the |Yes| +|\`clientSecret\`|A string indicating the |Yes| +|\`callbackUrl\`|A string indicating the URL to redirect to in your frontend after the user completes their authentication in Google.|Yes| + +*** + +*** + +## Override Callback URL During Authentication + +In many cases, you may have different callback URL for actor types. For example, you may redirect admin users to a different URL than customers after authentication. + +The [Authenticate or Login API Route](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/auth/authentication-route#login-route/index.html.md) can accept a `callback_url` body parameter to override the provider's `callbackUrl` option. Learn more in [this documentation](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/auth/authentication-route#login-route/index.html.md). + +*** + +## Examples + +- [How to implement Google social login in the storefront](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/storefront-development/customers/third-party-login/index.html.md). + + # Calculate Product Variant Price with Taxes In this document, you'll learn how to calculate a product variant's price with taxes. @@ -29686,229 +29686,236 @@ For each product variant, you: ## Workflows +- [generateResetPasswordTokenWorkflow](https://docs.medusajs.com/references/medusa-workflows/generateResetPasswordTokenWorkflow/index.html.md) - [createApiKeysWorkflow](https://docs.medusajs.com/references/medusa-workflows/createApiKeysWorkflow/index.html.md) - [deleteApiKeysWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteApiKeysWorkflow/index.html.md) - [linkSalesChannelsToApiKeyWorkflow](https://docs.medusajs.com/references/medusa-workflows/linkSalesChannelsToApiKeyWorkflow/index.html.md) - [revokeApiKeysWorkflow](https://docs.medusajs.com/references/medusa-workflows/revokeApiKeysWorkflow/index.html.md) - [updateApiKeysWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateApiKeysWorkflow/index.html.md) -- [generateResetPasswordTokenWorkflow](https://docs.medusajs.com/references/medusa-workflows/generateResetPasswordTokenWorkflow/index.html.md) - [addShippingMethodToCartWorkflow](https://docs.medusajs.com/references/medusa-workflows/addShippingMethodToCartWorkflow/index.html.md) -- [addToCartWorkflow](https://docs.medusajs.com/references/medusa-workflows/addToCartWorkflow/index.html.md) - [completeCartWorkflow](https://docs.medusajs.com/references/medusa-workflows/completeCartWorkflow/index.html.md) - [createCartCreditLinesWorkflow](https://docs.medusajs.com/references/medusa-workflows/createCartCreditLinesWorkflow/index.html.md) +- [addToCartWorkflow](https://docs.medusajs.com/references/medusa-workflows/addToCartWorkflow/index.html.md) - [confirmVariantInventoryWorkflow](https://docs.medusajs.com/references/medusa-workflows/confirmVariantInventoryWorkflow/index.html.md) -- [createPaymentCollectionForCartWorkflow](https://docs.medusajs.com/references/medusa-workflows/createPaymentCollectionForCartWorkflow/index.html.md) - [createCartWorkflow](https://docs.medusajs.com/references/medusa-workflows/createCartWorkflow/index.html.md) - [deleteCartCreditLinesWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteCartCreditLinesWorkflow/index.html.md) +- [createPaymentCollectionForCartWorkflow](https://docs.medusajs.com/references/medusa-workflows/createPaymentCollectionForCartWorkflow/index.html.md) - [listShippingOptionsForCartWithPricingWorkflow](https://docs.medusajs.com/references/medusa-workflows/listShippingOptionsForCartWithPricingWorkflow/index.html.md) - [listShippingOptionsForCartWorkflow](https://docs.medusajs.com/references/medusa-workflows/listShippingOptionsForCartWorkflow/index.html.md) -- [refreshCartItemsWorkflow](https://docs.medusajs.com/references/medusa-workflows/refreshCartItemsWorkflow/index.html.md) - [refreshCartShippingMethodsWorkflow](https://docs.medusajs.com/references/medusa-workflows/refreshCartShippingMethodsWorkflow/index.html.md) +- [refreshCartItemsWorkflow](https://docs.medusajs.com/references/medusa-workflows/refreshCartItemsWorkflow/index.html.md) - [refreshPaymentCollectionForCartWorkflow](https://docs.medusajs.com/references/medusa-workflows/refreshPaymentCollectionForCartWorkflow/index.html.md) -- [transferCartCustomerWorkflow](https://docs.medusajs.com/references/medusa-workflows/transferCartCustomerWorkflow/index.html.md) - [updateCartPromotionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateCartPromotionsWorkflow/index.html.md) - [updateCartWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateCartWorkflow/index.html.md) -- [updateTaxLinesWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateTaxLinesWorkflow/index.html.md) +- [transferCartCustomerWorkflow](https://docs.medusajs.com/references/medusa-workflows/transferCartCustomerWorkflow/index.html.md) - [updateLineItemInCartWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateLineItemInCartWorkflow/index.html.md) - [validateExistingPaymentCollectionStep](https://docs.medusajs.com/references/medusa-workflows/validateExistingPaymentCollectionStep/index.html.md) -- [createCustomerAccountWorkflow](https://docs.medusajs.com/references/medusa-workflows/createCustomerAccountWorkflow/index.html.md) +- [updateTaxLinesWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateTaxLinesWorkflow/index.html.md) - [createCustomerAddressesWorkflow](https://docs.medusajs.com/references/medusa-workflows/createCustomerAddressesWorkflow/index.html.md) - [createCustomersWorkflow](https://docs.medusajs.com/references/medusa-workflows/createCustomersWorkflow/index.html.md) -- [deleteCustomerAddressesWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteCustomerAddressesWorkflow/index.html.md) -- [removeCustomerAccountWorkflow](https://docs.medusajs.com/references/medusa-workflows/removeCustomerAccountWorkflow/index.html.md) - [deleteCustomersWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteCustomersWorkflow/index.html.md) -- [updateCustomerAddressesWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateCustomerAddressesWorkflow/index.html.md) +- [deleteCustomerAddressesWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteCustomerAddressesWorkflow/index.html.md) +- [createCustomerAccountWorkflow](https://docs.medusajs.com/references/medusa-workflows/createCustomerAccountWorkflow/index.html.md) +- [removeCustomerAccountWorkflow](https://docs.medusajs.com/references/medusa-workflows/removeCustomerAccountWorkflow/index.html.md) - [updateCustomersWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateCustomersWorkflow/index.html.md) -- [deleteFilesWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteFilesWorkflow/index.html.md) -- [uploadFilesWorkflow](https://docs.medusajs.com/references/medusa-workflows/uploadFilesWorkflow/index.html.md) -- [createDefaultsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createDefaultsWorkflow/index.html.md) +- [updateCustomerAddressesWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateCustomerAddressesWorkflow/index.html.md) - [createCustomerGroupsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createCustomerGroupsWorkflow/index.html.md) -- [linkCustomerGroupsToCustomerWorkflow](https://docs.medusajs.com/references/medusa-workflows/linkCustomerGroupsToCustomerWorkflow/index.html.md) -- [linkCustomersToCustomerGroupWorkflow](https://docs.medusajs.com/references/medusa-workflows/linkCustomersToCustomerGroupWorkflow/index.html.md) -- [updateCustomerGroupsWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateCustomerGroupsWorkflow/index.html.md) - [deleteCustomerGroupsWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteCustomerGroupsWorkflow/index.html.md) -- [calculateShippingOptionsPricesWorkflow](https://docs.medusajs.com/references/medusa-workflows/calculateShippingOptionsPricesWorkflow/index.html.md) -- [batchShippingOptionRulesWorkflow](https://docs.medusajs.com/references/medusa-workflows/batchShippingOptionRulesWorkflow/index.html.md) -- [cancelFulfillmentWorkflow](https://docs.medusajs.com/references/medusa-workflows/cancelFulfillmentWorkflow/index.html.md) -- [createFulfillmentWorkflow](https://docs.medusajs.com/references/medusa-workflows/createFulfillmentWorkflow/index.html.md) -- [createServiceZonesWorkflow](https://docs.medusajs.com/references/medusa-workflows/createServiceZonesWorkflow/index.html.md) -- [createReturnFulfillmentWorkflow](https://docs.medusajs.com/references/medusa-workflows/createReturnFulfillmentWorkflow/index.html.md) -- [createShippingOptionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createShippingOptionsWorkflow/index.html.md) -- [createShipmentWorkflow](https://docs.medusajs.com/references/medusa-workflows/createShipmentWorkflow/index.html.md) -- [deleteFulfillmentSetsWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteFulfillmentSetsWorkflow/index.html.md) -- [createShippingProfilesWorkflow](https://docs.medusajs.com/references/medusa-workflows/createShippingProfilesWorkflow/index.html.md) -- [deleteShippingOptionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteShippingOptionsWorkflow/index.html.md) -- [deleteServiceZonesWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteServiceZonesWorkflow/index.html.md) -- [updateFulfillmentWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateFulfillmentWorkflow/index.html.md) -- [markFulfillmentAsDeliveredWorkflow](https://docs.medusajs.com/references/medusa-workflows/markFulfillmentAsDeliveredWorkflow/index.html.md) -- [updateServiceZonesWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateServiceZonesWorkflow/index.html.md) -- [updateShippingOptionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateShippingOptionsWorkflow/index.html.md) -- [updateShippingProfilesWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateShippingProfilesWorkflow/index.html.md) -- [validateFulfillmentDeliverabilityStep](https://docs.medusajs.com/references/medusa-workflows/validateFulfillmentDeliverabilityStep/index.html.md) +- [linkCustomerGroupsToCustomerWorkflow](https://docs.medusajs.com/references/medusa-workflows/linkCustomerGroupsToCustomerWorkflow/index.html.md) +- [updateCustomerGroupsWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateCustomerGroupsWorkflow/index.html.md) +- [linkCustomersToCustomerGroupWorkflow](https://docs.medusajs.com/references/medusa-workflows/linkCustomersToCustomerGroupWorkflow/index.html.md) +- [createDefaultsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createDefaultsWorkflow/index.html.md) +- [uploadFilesWorkflow](https://docs.medusajs.com/references/medusa-workflows/uploadFilesWorkflow/index.html.md) +- [deleteFilesWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteFilesWorkflow/index.html.md) +- [batchLinksWorkflow](https://docs.medusajs.com/references/medusa-workflows/batchLinksWorkflow/index.html.md) +- [createLinksWorkflow](https://docs.medusajs.com/references/medusa-workflows/createLinksWorkflow/index.html.md) +- [dismissLinksWorkflow](https://docs.medusajs.com/references/medusa-workflows/dismissLinksWorkflow/index.html.md) +- [updateLinksWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateLinksWorkflow/index.html.md) - [batchInventoryItemLevelsWorkflow](https://docs.medusajs.com/references/medusa-workflows/batchInventoryItemLevelsWorkflow/index.html.md) -- [bulkCreateDeleteLevelsWorkflow](https://docs.medusajs.com/references/medusa-workflows/bulkCreateDeleteLevelsWorkflow/index.html.md) -- [createInventoryItemsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createInventoryItemsWorkflow/index.html.md) - [createInventoryLevelsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createInventoryLevelsWorkflow/index.html.md) - [deleteInventoryItemWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteInventoryItemWorkflow/index.html.md) -- [deleteInventoryLevelsWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteInventoryLevelsWorkflow/index.html.md) +- [createInventoryItemsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createInventoryItemsWorkflow/index.html.md) +- [bulkCreateDeleteLevelsWorkflow](https://docs.medusajs.com/references/medusa-workflows/bulkCreateDeleteLevelsWorkflow/index.html.md) - [updateInventoryItemsWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateInventoryItemsWorkflow/index.html.md) - [updateInventoryLevelsWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateInventoryLevelsWorkflow/index.html.md) +- [deleteInventoryLevelsWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteInventoryLevelsWorkflow/index.html.md) - [validateInventoryLevelsDelete](https://docs.medusajs.com/references/medusa-workflows/validateInventoryLevelsDelete/index.html.md) -- [createInvitesWorkflow](https://docs.medusajs.com/references/medusa-workflows/createInvitesWorkflow/index.html.md) -- [deleteInvitesWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteInvitesWorkflow/index.html.md) +- [calculateShippingOptionsPricesWorkflow](https://docs.medusajs.com/references/medusa-workflows/calculateShippingOptionsPricesWorkflow/index.html.md) +- [batchShippingOptionRulesWorkflow](https://docs.medusajs.com/references/medusa-workflows/batchShippingOptionRulesWorkflow/index.html.md) +- [createFulfillmentWorkflow](https://docs.medusajs.com/references/medusa-workflows/createFulfillmentWorkflow/index.html.md) +- [cancelFulfillmentWorkflow](https://docs.medusajs.com/references/medusa-workflows/cancelFulfillmentWorkflow/index.html.md) +- [createServiceZonesWorkflow](https://docs.medusajs.com/references/medusa-workflows/createServiceZonesWorkflow/index.html.md) +- [createReturnFulfillmentWorkflow](https://docs.medusajs.com/references/medusa-workflows/createReturnFulfillmentWorkflow/index.html.md) +- [createShipmentWorkflow](https://docs.medusajs.com/references/medusa-workflows/createShipmentWorkflow/index.html.md) +- [createShippingOptionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createShippingOptionsWorkflow/index.html.md) +- [createShippingProfilesWorkflow](https://docs.medusajs.com/references/medusa-workflows/createShippingProfilesWorkflow/index.html.md) +- [deleteFulfillmentSetsWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteFulfillmentSetsWorkflow/index.html.md) +- [deleteServiceZonesWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteServiceZonesWorkflow/index.html.md) +- [deleteShippingOptionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteShippingOptionsWorkflow/index.html.md) +- [markFulfillmentAsDeliveredWorkflow](https://docs.medusajs.com/references/medusa-workflows/markFulfillmentAsDeliveredWorkflow/index.html.md) +- [updateFulfillmentWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateFulfillmentWorkflow/index.html.md) +- [updateShippingOptionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateShippingOptionsWorkflow/index.html.md) +- [updateServiceZonesWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateServiceZonesWorkflow/index.html.md) +- [updateShippingProfilesWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateShippingProfilesWorkflow/index.html.md) +- [validateFulfillmentDeliverabilityStep](https://docs.medusajs.com/references/medusa-workflows/validateFulfillmentDeliverabilityStep/index.html.md) - [acceptInviteWorkflow](https://docs.medusajs.com/references/medusa-workflows/acceptInviteWorkflow/index.html.md) +- [createInvitesWorkflow](https://docs.medusajs.com/references/medusa-workflows/createInvitesWorkflow/index.html.md) - [refreshInviteTokensWorkflow](https://docs.medusajs.com/references/medusa-workflows/refreshInviteTokensWorkflow/index.html.md) +- [deleteInvitesWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteInvitesWorkflow/index.html.md) - [deleteLineItemsWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteLineItemsWorkflow/index.html.md) - [capturePaymentWorkflow](https://docs.medusajs.com/references/medusa-workflows/capturePaymentWorkflow/index.html.md) - [processPaymentWorkflow](https://docs.medusajs.com/references/medusa-workflows/processPaymentWorkflow/index.html.md) +- [refundPaymentWorkflow](https://docs.medusajs.com/references/medusa-workflows/refundPaymentWorkflow/index.html.md) - [refundPaymentsWorkflow](https://docs.medusajs.com/references/medusa-workflows/refundPaymentsWorkflow/index.html.md) - [validatePaymentsRefundStep](https://docs.medusajs.com/references/medusa-workflows/validatePaymentsRefundStep/index.html.md) -- [refundPaymentWorkflow](https://docs.medusajs.com/references/medusa-workflows/refundPaymentWorkflow/index.html.md) - [validateRefundStep](https://docs.medusajs.com/references/medusa-workflows/validateRefundStep/index.html.md) +- [createPricePreferencesWorkflow](https://docs.medusajs.com/references/medusa-workflows/createPricePreferencesWorkflow/index.html.md) +- [deletePricePreferencesWorkflow](https://docs.medusajs.com/references/medusa-workflows/deletePricePreferencesWorkflow/index.html.md) +- [updatePricePreferencesWorkflow](https://docs.medusajs.com/references/medusa-workflows/updatePricePreferencesWorkflow/index.html.md) +- [createRefundReasonsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createRefundReasonsWorkflow/index.html.md) +- [createPaymentSessionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createPaymentSessionsWorkflow/index.html.md) +- [deletePaymentSessionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/deletePaymentSessionsWorkflow/index.html.md) +- [deleteRefundReasonsWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteRefundReasonsWorkflow/index.html.md) +- [updateRefundReasonsWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateRefundReasonsWorkflow/index.html.md) - [batchPriceListPricesWorkflow](https://docs.medusajs.com/references/medusa-workflows/batchPriceListPricesWorkflow/index.html.md) - [createPriceListPricesWorkflow](https://docs.medusajs.com/references/medusa-workflows/createPriceListPricesWorkflow/index.html.md) - [createPriceListsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createPriceListsWorkflow/index.html.md) -- [removePriceListPricesWorkflow](https://docs.medusajs.com/references/medusa-workflows/removePriceListPricesWorkflow/index.html.md) - [deletePriceListsWorkflow](https://docs.medusajs.com/references/medusa-workflows/deletePriceListsWorkflow/index.html.md) +- [removePriceListPricesWorkflow](https://docs.medusajs.com/references/medusa-workflows/removePriceListPricesWorkflow/index.html.md) - [updatePriceListPricesWorkflow](https://docs.medusajs.com/references/medusa-workflows/updatePriceListPricesWorkflow/index.html.md) - [updatePriceListsWorkflow](https://docs.medusajs.com/references/medusa-workflows/updatePriceListsWorkflow/index.html.md) -- [createPaymentSessionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createPaymentSessionsWorkflow/index.html.md) -- [deletePaymentSessionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/deletePaymentSessionsWorkflow/index.html.md) -- [createRefundReasonsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createRefundReasonsWorkflow/index.html.md) -- [deleteRefundReasonsWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteRefundReasonsWorkflow/index.html.md) -- [updateRefundReasonsWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateRefundReasonsWorkflow/index.html.md) - [acceptOrderTransferValidationStep](https://docs.medusajs.com/references/medusa-workflows/acceptOrderTransferValidationStep/index.html.md) - [acceptOrderTransferWorkflow](https://docs.medusajs.com/references/medusa-workflows/acceptOrderTransferWorkflow/index.html.md) +- [addOrderLineItemsWorkflow](https://docs.medusajs.com/references/medusa-workflows/addOrderLineItemsWorkflow/index.html.md) - [archiveOrderWorkflow](https://docs.medusajs.com/references/medusa-workflows/archiveOrderWorkflow/index.html.md) - [beginClaimOrderValidationStep](https://docs.medusajs.com/references/medusa-workflows/beginClaimOrderValidationStep/index.html.md) - [beginClaimOrderWorkflow](https://docs.medusajs.com/references/medusa-workflows/beginClaimOrderWorkflow/index.html.md) -- [addOrderLineItemsWorkflow](https://docs.medusajs.com/references/medusa-workflows/addOrderLineItemsWorkflow/index.html.md) - [beginExchangeOrderWorkflow](https://docs.medusajs.com/references/medusa-workflows/beginExchangeOrderWorkflow/index.html.md) -- [beginOrderEditValidationStep](https://docs.medusajs.com/references/medusa-workflows/beginOrderEditValidationStep/index.html.md) - [beginOrderEditOrderWorkflow](https://docs.medusajs.com/references/medusa-workflows/beginOrderEditOrderWorkflow/index.html.md) - [beginOrderExchangeValidationStep](https://docs.medusajs.com/references/medusa-workflows/beginOrderExchangeValidationStep/index.html.md) +- [beginOrderEditValidationStep](https://docs.medusajs.com/references/medusa-workflows/beginOrderEditValidationStep/index.html.md) +- [beginReceiveReturnValidationStep](https://docs.medusajs.com/references/medusa-workflows/beginReceiveReturnValidationStep/index.html.md) - [beginReceiveReturnWorkflow](https://docs.medusajs.com/references/medusa-workflows/beginReceiveReturnWorkflow/index.html.md) - [beginReturnOrderValidationStep](https://docs.medusajs.com/references/medusa-workflows/beginReturnOrderValidationStep/index.html.md) -- [beginReceiveReturnValidationStep](https://docs.medusajs.com/references/medusa-workflows/beginReceiveReturnValidationStep/index.html.md) - [beginReturnOrderWorkflow](https://docs.medusajs.com/references/medusa-workflows/beginReturnOrderWorkflow/index.html.md) - [cancelBeginOrderClaimWorkflow](https://docs.medusajs.com/references/medusa-workflows/cancelBeginOrderClaimWorkflow/index.html.md) - [cancelBeginOrderClaimValidationStep](https://docs.medusajs.com/references/medusa-workflows/cancelBeginOrderClaimValidationStep/index.html.md) - [cancelBeginOrderEditValidationStep](https://docs.medusajs.com/references/medusa-workflows/cancelBeginOrderEditValidationStep/index.html.md) - [cancelBeginOrderEditWorkflow](https://docs.medusajs.com/references/medusa-workflows/cancelBeginOrderEditWorkflow/index.html.md) -- [cancelClaimValidateOrderStep](https://docs.medusajs.com/references/medusa-workflows/cancelClaimValidateOrderStep/index.html.md) -- [cancelBeginOrderExchangeWorkflow](https://docs.medusajs.com/references/medusa-workflows/cancelBeginOrderExchangeWorkflow/index.html.md) - [cancelBeginOrderExchangeValidationStep](https://docs.medusajs.com/references/medusa-workflows/cancelBeginOrderExchangeValidationStep/index.html.md) +- [cancelBeginOrderExchangeWorkflow](https://docs.medusajs.com/references/medusa-workflows/cancelBeginOrderExchangeWorkflow/index.html.md) - [cancelExchangeValidateOrder](https://docs.medusajs.com/references/medusa-workflows/cancelExchangeValidateOrder/index.html.md) -- [cancelOrderClaimWorkflow](https://docs.medusajs.com/references/medusa-workflows/cancelOrderClaimWorkflow/index.html.md) +- [cancelClaimValidateOrderStep](https://docs.medusajs.com/references/medusa-workflows/cancelClaimValidateOrderStep/index.html.md) - [cancelOrderChangeWorkflow](https://docs.medusajs.com/references/medusa-workflows/cancelOrderChangeWorkflow/index.html.md) +- [cancelOrderClaimWorkflow](https://docs.medusajs.com/references/medusa-workflows/cancelOrderClaimWorkflow/index.html.md) - [cancelOrderExchangeWorkflow](https://docs.medusajs.com/references/medusa-workflows/cancelOrderExchangeWorkflow/index.html.md) - [cancelOrderFulfillmentValidateOrder](https://docs.medusajs.com/references/medusa-workflows/cancelOrderFulfillmentValidateOrder/index.html.md) -- [cancelOrderTransferRequestWorkflow](https://docs.medusajs.com/references/medusa-workflows/cancelOrderTransferRequestWorkflow/index.html.md) - [cancelOrderFulfillmentWorkflow](https://docs.medusajs.com/references/medusa-workflows/cancelOrderFulfillmentWorkflow/index.html.md) -- [cancelReceiveReturnValidationStep](https://docs.medusajs.com/references/medusa-workflows/cancelReceiveReturnValidationStep/index.html.md) -- [cancelRequestReturnValidationStep](https://docs.medusajs.com/references/medusa-workflows/cancelRequestReturnValidationStep/index.html.md) +- [cancelOrderTransferRequestWorkflow](https://docs.medusajs.com/references/medusa-workflows/cancelOrderTransferRequestWorkflow/index.html.md) - [cancelOrderWorkflow](https://docs.medusajs.com/references/medusa-workflows/cancelOrderWorkflow/index.html.md) +- [cancelReceiveReturnValidationStep](https://docs.medusajs.com/references/medusa-workflows/cancelReceiveReturnValidationStep/index.html.md) - [cancelReturnReceiveWorkflow](https://docs.medusajs.com/references/medusa-workflows/cancelReturnReceiveWorkflow/index.html.md) +- [cancelRequestReturnValidationStep](https://docs.medusajs.com/references/medusa-workflows/cancelRequestReturnValidationStep/index.html.md) - [cancelReturnRequestWorkflow](https://docs.medusajs.com/references/medusa-workflows/cancelReturnRequestWorkflow/index.html.md) -- [cancelReturnWorkflow](https://docs.medusajs.com/references/medusa-workflows/cancelReturnWorkflow/index.html.md) - [cancelReturnValidateOrder](https://docs.medusajs.com/references/medusa-workflows/cancelReturnValidateOrder/index.html.md) +- [cancelReturnWorkflow](https://docs.medusajs.com/references/medusa-workflows/cancelReturnWorkflow/index.html.md) - [cancelTransferOrderRequestValidationStep](https://docs.medusajs.com/references/medusa-workflows/cancelTransferOrderRequestValidationStep/index.html.md) -- [cancelValidateOrder](https://docs.medusajs.com/references/medusa-workflows/cancelValidateOrder/index.html.md) - [completeOrderWorkflow](https://docs.medusajs.com/references/medusa-workflows/completeOrderWorkflow/index.html.md) +- [cancelValidateOrder](https://docs.medusajs.com/references/medusa-workflows/cancelValidateOrder/index.html.md) +- [confirmClaimRequestValidationStep](https://docs.medusajs.com/references/medusa-workflows/confirmClaimRequestValidationStep/index.html.md) - [confirmClaimRequestWorkflow](https://docs.medusajs.com/references/medusa-workflows/confirmClaimRequestWorkflow/index.html.md) - [confirmExchangeRequestValidationStep](https://docs.medusajs.com/references/medusa-workflows/confirmExchangeRequestValidationStep/index.html.md) -- [confirmClaimRequestValidationStep](https://docs.medusajs.com/references/medusa-workflows/confirmClaimRequestValidationStep/index.html.md) - [confirmExchangeRequestWorkflow](https://docs.medusajs.com/references/medusa-workflows/confirmExchangeRequestWorkflow/index.html.md) - [confirmOrderEditRequestValidationStep](https://docs.medusajs.com/references/medusa-workflows/confirmOrderEditRequestValidationStep/index.html.md) - [confirmOrderEditRequestWorkflow](https://docs.medusajs.com/references/medusa-workflows/confirmOrderEditRequestWorkflow/index.html.md) -- [confirmReturnReceiveWorkflow](https://docs.medusajs.com/references/medusa-workflows/confirmReturnReceiveWorkflow/index.html.md) - [confirmReceiveReturnValidationStep](https://docs.medusajs.com/references/medusa-workflows/confirmReceiveReturnValidationStep/index.html.md) -- [confirmReturnRequestValidationStep](https://docs.medusajs.com/references/medusa-workflows/confirmReturnRequestValidationStep/index.html.md) +- [confirmReturnReceiveWorkflow](https://docs.medusajs.com/references/medusa-workflows/confirmReturnReceiveWorkflow/index.html.md) - [confirmReturnRequestWorkflow](https://docs.medusajs.com/references/medusa-workflows/confirmReturnRequestWorkflow/index.html.md) - [createAndCompleteReturnOrderWorkflow](https://docs.medusajs.com/references/medusa-workflows/createAndCompleteReturnOrderWorkflow/index.html.md) -- [createClaimShippingMethodWorkflow](https://docs.medusajs.com/references/medusa-workflows/createClaimShippingMethodWorkflow/index.html.md) - [createClaimShippingMethodValidationStep](https://docs.medusajs.com/references/medusa-workflows/createClaimShippingMethodValidationStep/index.html.md) +- [createClaimShippingMethodWorkflow](https://docs.medusajs.com/references/medusa-workflows/createClaimShippingMethodWorkflow/index.html.md) - [createCompleteReturnValidationStep](https://docs.medusajs.com/references/medusa-workflows/createCompleteReturnValidationStep/index.html.md) - [createExchangeShippingMethodValidationStep](https://docs.medusajs.com/references/medusa-workflows/createExchangeShippingMethodValidationStep/index.html.md) -- [createExchangeShippingMethodWorkflow](https://docs.medusajs.com/references/medusa-workflows/createExchangeShippingMethodWorkflow/index.html.md) - [createFulfillmentValidateOrder](https://docs.medusajs.com/references/medusa-workflows/createFulfillmentValidateOrder/index.html.md) +- [createExchangeShippingMethodWorkflow](https://docs.medusajs.com/references/medusa-workflows/createExchangeShippingMethodWorkflow/index.html.md) - [createOrUpdateOrderPaymentCollectionWorkflow](https://docs.medusajs.com/references/medusa-workflows/createOrUpdateOrderPaymentCollectionWorkflow/index.html.md) +- [confirmReturnRequestValidationStep](https://docs.medusajs.com/references/medusa-workflows/confirmReturnRequestValidationStep/index.html.md) - [createOrderChangeActionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createOrderChangeActionsWorkflow/index.html.md) +- [createOrderEditShippingMethodValidationStep](https://docs.medusajs.com/references/medusa-workflows/createOrderEditShippingMethodValidationStep/index.html.md) - [createOrderChangeWorkflow](https://docs.medusajs.com/references/medusa-workflows/createOrderChangeWorkflow/index.html.md) - [createOrderEditShippingMethodWorkflow](https://docs.medusajs.com/references/medusa-workflows/createOrderEditShippingMethodWorkflow/index.html.md) -- [createOrderEditShippingMethodValidationStep](https://docs.medusajs.com/references/medusa-workflows/createOrderEditShippingMethodValidationStep/index.html.md) -- [createOrderPaymentCollectionWorkflow](https://docs.medusajs.com/references/medusa-workflows/createOrderPaymentCollectionWorkflow/index.html.md) - [createOrderFulfillmentWorkflow](https://docs.medusajs.com/references/medusa-workflows/createOrderFulfillmentWorkflow/index.html.md) +- [createOrderPaymentCollectionWorkflow](https://docs.medusajs.com/references/medusa-workflows/createOrderPaymentCollectionWorkflow/index.html.md) - [createOrderWorkflow](https://docs.medusajs.com/references/medusa-workflows/createOrderWorkflow/index.html.md) - [createOrderShipmentWorkflow](https://docs.medusajs.com/references/medusa-workflows/createOrderShipmentWorkflow/index.html.md) -- [createReturnShippingMethodValidationStep](https://docs.medusajs.com/references/medusa-workflows/createReturnShippingMethodValidationStep/index.html.md) - [createOrdersWorkflow](https://docs.medusajs.com/references/medusa-workflows/createOrdersWorkflow/index.html.md) +- [createReturnShippingMethodValidationStep](https://docs.medusajs.com/references/medusa-workflows/createReturnShippingMethodValidationStep/index.html.md) - [createReturnShippingMethodWorkflow](https://docs.medusajs.com/references/medusa-workflows/createReturnShippingMethodWorkflow/index.html.md) -- [declineOrderChangeWorkflow](https://docs.medusajs.com/references/medusa-workflows/declineOrderChangeWorkflow/index.html.md) - [createShipmentValidateOrder](https://docs.medusajs.com/references/medusa-workflows/createShipmentValidateOrder/index.html.md) -- [declineOrderTransferRequestWorkflow](https://docs.medusajs.com/references/medusa-workflows/declineOrderTransferRequestWorkflow/index.html.md) +- [declineOrderChangeWorkflow](https://docs.medusajs.com/references/medusa-workflows/declineOrderChangeWorkflow/index.html.md) - [declineTransferOrderRequestValidationStep](https://docs.medusajs.com/references/medusa-workflows/declineTransferOrderRequestValidationStep/index.html.md) +- [declineOrderTransferRequestWorkflow](https://docs.medusajs.com/references/medusa-workflows/declineOrderTransferRequestWorkflow/index.html.md) - [deleteOrderChangeActionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteOrderChangeActionsWorkflow/index.html.md) -- [deleteOrderPaymentCollections](https://docs.medusajs.com/references/medusa-workflows/deleteOrderPaymentCollections/index.html.md) - [deleteOrderChangeWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteOrderChangeWorkflow/index.html.md) - [dismissItemReturnRequestValidationStep](https://docs.medusajs.com/references/medusa-workflows/dismissItemReturnRequestValidationStep/index.html.md) +- [deleteOrderPaymentCollections](https://docs.medusajs.com/references/medusa-workflows/deleteOrderPaymentCollections/index.html.md) - [exchangeAddNewItemValidationStep](https://docs.medusajs.com/references/medusa-workflows/exchangeAddNewItemValidationStep/index.html.md) -- [exchangeRequestItemReturnValidationStep](https://docs.medusajs.com/references/medusa-workflows/exchangeRequestItemReturnValidationStep/index.html.md) - [dismissItemReturnRequestWorkflow](https://docs.medusajs.com/references/medusa-workflows/dismissItemReturnRequestWorkflow/index.html.md) +- [exchangeRequestItemReturnValidationStep](https://docs.medusajs.com/references/medusa-workflows/exchangeRequestItemReturnValidationStep/index.html.md) - [getOrderDetailWorkflow](https://docs.medusajs.com/references/medusa-workflows/getOrderDetailWorkflow/index.html.md) - [getOrdersListWorkflow](https://docs.medusajs.com/references/medusa-workflows/getOrdersListWorkflow/index.html.md) -- [markPaymentCollectionAsPaid](https://docs.medusajs.com/references/medusa-workflows/markPaymentCollectionAsPaid/index.html.md) - [markOrderFulfillmentAsDeliveredWorkflow](https://docs.medusajs.com/references/medusa-workflows/markOrderFulfillmentAsDeliveredWorkflow/index.html.md) - [orderClaimAddNewItemValidationStep](https://docs.medusajs.com/references/medusa-workflows/orderClaimAddNewItemValidationStep/index.html.md) -- [orderClaimItemValidationStep](https://docs.medusajs.com/references/medusa-workflows/orderClaimItemValidationStep/index.html.md) -- [orderClaimAddNewItemWorkflow](https://docs.medusajs.com/references/medusa-workflows/orderClaimAddNewItemWorkflow/index.html.md) +- [markPaymentCollectionAsPaid](https://docs.medusajs.com/references/medusa-workflows/markPaymentCollectionAsPaid/index.html.md) - [orderClaimItemWorkflow](https://docs.medusajs.com/references/medusa-workflows/orderClaimItemWorkflow/index.html.md) - [orderClaimRequestItemReturnValidationStep](https://docs.medusajs.com/references/medusa-workflows/orderClaimRequestItemReturnValidationStep/index.html.md) -- [orderEditAddNewItemValidationStep](https://docs.medusajs.com/references/medusa-workflows/orderEditAddNewItemValidationStep/index.html.md) - [orderClaimRequestItemReturnWorkflow](https://docs.medusajs.com/references/medusa-workflows/orderClaimRequestItemReturnWorkflow/index.html.md) +- [orderEditAddNewItemValidationStep](https://docs.medusajs.com/references/medusa-workflows/orderEditAddNewItemValidationStep/index.html.md) - [orderEditAddNewItemWorkflow](https://docs.medusajs.com/references/medusa-workflows/orderEditAddNewItemWorkflow/index.html.md) - [orderEditUpdateItemQuantityValidationStep](https://docs.medusajs.com/references/medusa-workflows/orderEditUpdateItemQuantityValidationStep/index.html.md) -- [orderExchangeRequestItemReturnWorkflow](https://docs.medusajs.com/references/medusa-workflows/orderExchangeRequestItemReturnWorkflow/index.html.md) -- [orderExchangeAddNewItemWorkflow](https://docs.medusajs.com/references/medusa-workflows/orderExchangeAddNewItemWorkflow/index.html.md) -- [orderFulfillmentDeliverablilityValidationStep](https://docs.medusajs.com/references/medusa-workflows/orderFulfillmentDeliverablilityValidationStep/index.html.md) - [orderEditUpdateItemQuantityWorkflow](https://docs.medusajs.com/references/medusa-workflows/orderEditUpdateItemQuantityWorkflow/index.html.md) -- [receiveCompleteReturnValidationStep](https://docs.medusajs.com/references/medusa-workflows/receiveCompleteReturnValidationStep/index.html.md) +- [orderExchangeRequestItemReturnWorkflow](https://docs.medusajs.com/references/medusa-workflows/orderExchangeRequestItemReturnWorkflow/index.html.md) +- [orderFulfillmentDeliverablilityValidationStep](https://docs.medusajs.com/references/medusa-workflows/orderFulfillmentDeliverablilityValidationStep/index.html.md) +- [orderClaimItemValidationStep](https://docs.medusajs.com/references/medusa-workflows/orderClaimItemValidationStep/index.html.md) +- [orderClaimAddNewItemWorkflow](https://docs.medusajs.com/references/medusa-workflows/orderClaimAddNewItemWorkflow/index.html.md) - [receiveAndCompleteReturnOrderWorkflow](https://docs.medusajs.com/references/medusa-workflows/receiveAndCompleteReturnOrderWorkflow/index.html.md) +- [receiveItemReturnRequestValidationStep](https://docs.medusajs.com/references/medusa-workflows/receiveItemReturnRequestValidationStep/index.html.md) +- [orderExchangeAddNewItemWorkflow](https://docs.medusajs.com/references/medusa-workflows/orderExchangeAddNewItemWorkflow/index.html.md) +- [receiveCompleteReturnValidationStep](https://docs.medusajs.com/references/medusa-workflows/receiveCompleteReturnValidationStep/index.html.md) - [receiveItemReturnRequestWorkflow](https://docs.medusajs.com/references/medusa-workflows/receiveItemReturnRequestWorkflow/index.html.md) - [removeAddItemClaimActionWorkflow](https://docs.medusajs.com/references/medusa-workflows/removeAddItemClaimActionWorkflow/index.html.md) - [removeClaimAddItemActionValidationStep](https://docs.medusajs.com/references/medusa-workflows/removeClaimAddItemActionValidationStep/index.html.md) -- [receiveItemReturnRequestValidationStep](https://docs.medusajs.com/references/medusa-workflows/receiveItemReturnRequestValidationStep/index.html.md) - [removeClaimItemActionValidationStep](https://docs.medusajs.com/references/medusa-workflows/removeClaimItemActionValidationStep/index.html.md) -- [removeClaimShippingMethodValidationStep](https://docs.medusajs.com/references/medusa-workflows/removeClaimShippingMethodValidationStep/index.html.md) - [removeClaimShippingMethodWorkflow](https://docs.medusajs.com/references/medusa-workflows/removeClaimShippingMethodWorkflow/index.html.md) -- [removeExchangeShippingMethodValidationStep](https://docs.medusajs.com/references/medusa-workflows/removeExchangeShippingMethodValidationStep/index.html.md) - [removeExchangeItemActionValidationStep](https://docs.medusajs.com/references/medusa-workflows/removeExchangeItemActionValidationStep/index.html.md) +- [removeClaimShippingMethodValidationStep](https://docs.medusajs.com/references/medusa-workflows/removeClaimShippingMethodValidationStep/index.html.md) +- [removeExchangeShippingMethodValidationStep](https://docs.medusajs.com/references/medusa-workflows/removeExchangeShippingMethodValidationStep/index.html.md) +- [removeExchangeShippingMethodWorkflow](https://docs.medusajs.com/references/medusa-workflows/removeExchangeShippingMethodWorkflow/index.html.md) - [removeItemClaimActionWorkflow](https://docs.medusajs.com/references/medusa-workflows/removeItemClaimActionWorkflow/index.html.md) - [removeItemOrderEditActionWorkflow](https://docs.medusajs.com/references/medusa-workflows/removeItemOrderEditActionWorkflow/index.html.md) +- [removeItemExchangeActionWorkflow](https://docs.medusajs.com/references/medusa-workflows/removeItemExchangeActionWorkflow/index.html.md) - [removeItemReceiveReturnActionValidationStep](https://docs.medusajs.com/references/medusa-workflows/removeItemReceiveReturnActionValidationStep/index.html.md) - [removeItemReceiveReturnActionWorkflow](https://docs.medusajs.com/references/medusa-workflows/removeItemReceiveReturnActionWorkflow/index.html.md) -- [removeItemExchangeActionWorkflow](https://docs.medusajs.com/references/medusa-workflows/removeItemExchangeActionWorkflow/index.html.md) -- [removeItemReturnActionWorkflow](https://docs.medusajs.com/references/medusa-workflows/removeItemReturnActionWorkflow/index.html.md) - [removeOrderEditItemActionValidationStep](https://docs.medusajs.com/references/medusa-workflows/removeOrderEditItemActionValidationStep/index.html.md) +- [removeItemReturnActionWorkflow](https://docs.medusajs.com/references/medusa-workflows/removeItemReturnActionWorkflow/index.html.md) - [removeOrderEditShippingMethodValidationStep](https://docs.medusajs.com/references/medusa-workflows/removeOrderEditShippingMethodValidationStep/index.html.md) - [removeOrderEditShippingMethodWorkflow](https://docs.medusajs.com/references/medusa-workflows/removeOrderEditShippingMethodWorkflow/index.html.md) -- [removeReturnItemActionValidationStep](https://docs.medusajs.com/references/medusa-workflows/removeReturnItemActionValidationStep/index.html.md) -- [removeExchangeShippingMethodWorkflow](https://docs.medusajs.com/references/medusa-workflows/removeExchangeShippingMethodWorkflow/index.html.md) - [removeReturnShippingMethodValidationStep](https://docs.medusajs.com/references/medusa-workflows/removeReturnShippingMethodValidationStep/index.html.md) -- [removeReturnShippingMethodWorkflow](https://docs.medusajs.com/references/medusa-workflows/removeReturnShippingMethodWorkflow/index.html.md) +- [removeReturnItemActionValidationStep](https://docs.medusajs.com/references/medusa-workflows/removeReturnItemActionValidationStep/index.html.md) - [requestItemReturnValidationStep](https://docs.medusajs.com/references/medusa-workflows/requestItemReturnValidationStep/index.html.md) +- [removeReturnShippingMethodWorkflow](https://docs.medusajs.com/references/medusa-workflows/removeReturnShippingMethodWorkflow/index.html.md) - [requestOrderEditRequestValidationStep](https://docs.medusajs.com/references/medusa-workflows/requestOrderEditRequestValidationStep/index.html.md) -- [requestOrderTransferValidationStep](https://docs.medusajs.com/references/medusa-workflows/requestOrderTransferValidationStep/index.html.md) - [requestItemReturnWorkflow](https://docs.medusajs.com/references/medusa-workflows/requestItemReturnWorkflow/index.html.md) - [requestOrderEditRequestWorkflow](https://docs.medusajs.com/references/medusa-workflows/requestOrderEditRequestWorkflow/index.html.md) +- [requestOrderTransferValidationStep](https://docs.medusajs.com/references/medusa-workflows/requestOrderTransferValidationStep/index.html.md) - [requestOrderTransferWorkflow](https://docs.medusajs.com/references/medusa-workflows/requestOrderTransferWorkflow/index.html.md) - [throwUnlessPaymentCollectionNotPaid](https://docs.medusajs.com/references/medusa-workflows/throwUnlessPaymentCollectionNotPaid/index.html.md) -- [updateClaimAddItemValidationStep](https://docs.medusajs.com/references/medusa-workflows/updateClaimAddItemValidationStep/index.html.md) - [throwUnlessStatusIsNotPaid](https://docs.medusajs.com/references/medusa-workflows/throwUnlessStatusIsNotPaid/index.html.md) -- [updateClaimItemValidationStep](https://docs.medusajs.com/references/medusa-workflows/updateClaimItemValidationStep/index.html.md) -- [updateClaimItemWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateClaimItemWorkflow/index.html.md) +- [updateClaimAddItemValidationStep](https://docs.medusajs.com/references/medusa-workflows/updateClaimAddItemValidationStep/index.html.md) - [updateClaimAddItemWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateClaimAddItemWorkflow/index.html.md) +- [updateClaimItemValidationStep](https://docs.medusajs.com/references/medusa-workflows/updateClaimItemValidationStep/index.html.md) - [updateClaimShippingMethodValidationStep](https://docs.medusajs.com/references/medusa-workflows/updateClaimShippingMethodValidationStep/index.html.md) +- [updateClaimItemWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateClaimItemWorkflow/index.html.md) - [updateClaimShippingMethodWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateClaimShippingMethodWorkflow/index.html.md) - [updateExchangeAddItemValidationStep](https://docs.medusajs.com/references/medusa-workflows/updateExchangeAddItemValidationStep/index.html.md) - [updateExchangeShippingMethodValidationStep](https://docs.medusajs.com/references/medusa-workflows/updateExchangeShippingMethodValidationStep/index.html.md) @@ -29916,233 +29923,219 @@ For each product variant, you: - [updateExchangeShippingMethodWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateExchangeShippingMethodWorkflow/index.html.md) - [updateOrderChangeActionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateOrderChangeActionsWorkflow/index.html.md) - [updateOrderChangesWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateOrderChangesWorkflow/index.html.md) -- [updateOrderEditAddItemWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateOrderEditAddItemWorkflow/index.html.md) - [updateOrderEditAddItemValidationStep](https://docs.medusajs.com/references/medusa-workflows/updateOrderEditAddItemValidationStep/index.html.md) +- [updateOrderEditAddItemWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateOrderEditAddItemWorkflow/index.html.md) - [updateOrderEditItemQuantityValidationStep](https://docs.medusajs.com/references/medusa-workflows/updateOrderEditItemQuantityValidationStep/index.html.md) +- [updateOrderEditItemQuantityWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateOrderEditItemQuantityWorkflow/index.html.md) - [updateOrderEditShippingMethodValidationStep](https://docs.medusajs.com/references/medusa-workflows/updateOrderEditShippingMethodValidationStep/index.html.md) - [updateOrderEditShippingMethodWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateOrderEditShippingMethodWorkflow/index.html.md) -- [updateOrderEditItemQuantityWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateOrderEditItemQuantityWorkflow/index.html.md) -- [updateOrderTaxLinesWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateOrderTaxLinesWorkflow/index.html.md) - [updateOrderValidationStep](https://docs.medusajs.com/references/medusa-workflows/updateOrderValidationStep/index.html.md) -- [updateOrderWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateOrderWorkflow/index.html.md) -- [updateReceiveItemReturnRequestWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateReceiveItemReturnRequestWorkflow/index.html.md) -- [updateRequestItemReturnValidationStep](https://docs.medusajs.com/references/medusa-workflows/updateRequestItemReturnValidationStep/index.html.md) +- [updateOrderTaxLinesWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateOrderTaxLinesWorkflow/index.html.md) - [updateReceiveItemReturnRequestValidationStep](https://docs.medusajs.com/references/medusa-workflows/updateReceiveItemReturnRequestValidationStep/index.html.md) +- [updateOrderWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateOrderWorkflow/index.html.md) +- [updateRequestItemReturnValidationStep](https://docs.medusajs.com/references/medusa-workflows/updateRequestItemReturnValidationStep/index.html.md) +- [updateReceiveItemReturnRequestWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateReceiveItemReturnRequestWorkflow/index.html.md) - [updateRequestItemReturnWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateRequestItemReturnWorkflow/index.html.md) - [updateReturnShippingMethodValidationStep](https://docs.medusajs.com/references/medusa-workflows/updateReturnShippingMethodValidationStep/index.html.md) - [updateReturnValidationStep](https://docs.medusajs.com/references/medusa-workflows/updateReturnValidationStep/index.html.md) -- [updateReturnShippingMethodWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateReturnShippingMethodWorkflow/index.html.md) - [updateReturnWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateReturnWorkflow/index.html.md) -- [createLinksWorkflow](https://docs.medusajs.com/references/medusa-workflows/createLinksWorkflow/index.html.md) -- [dismissLinksWorkflow](https://docs.medusajs.com/references/medusa-workflows/dismissLinksWorkflow/index.html.md) -- [updateLinksWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateLinksWorkflow/index.html.md) -- [batchLinksWorkflow](https://docs.medusajs.com/references/medusa-workflows/batchLinksWorkflow/index.html.md) -- [createPricePreferencesWorkflow](https://docs.medusajs.com/references/medusa-workflows/createPricePreferencesWorkflow/index.html.md) -- [updatePricePreferencesWorkflow](https://docs.medusajs.com/references/medusa-workflows/updatePricePreferencesWorkflow/index.html.md) -- [deletePricePreferencesWorkflow](https://docs.medusajs.com/references/medusa-workflows/deletePricePreferencesWorkflow/index.html.md) -- [batchLinkProductsToCollectionWorkflow](https://docs.medusajs.com/references/medusa-workflows/batchLinkProductsToCollectionWorkflow/index.html.md) -- [batchProductVariantsWorkflow](https://docs.medusajs.com/references/medusa-workflows/batchProductVariantsWorkflow/index.html.md) +- [updateReturnShippingMethodWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateReturnShippingMethodWorkflow/index.html.md) - [batchLinkProductsToCategoryWorkflow](https://docs.medusajs.com/references/medusa-workflows/batchLinkProductsToCategoryWorkflow/index.html.md) +- [batchProductVariantsWorkflow](https://docs.medusajs.com/references/medusa-workflows/batchProductVariantsWorkflow/index.html.md) +- [batchLinkProductsToCollectionWorkflow](https://docs.medusajs.com/references/medusa-workflows/batchLinkProductsToCollectionWorkflow/index.html.md) - [batchProductsWorkflow](https://docs.medusajs.com/references/medusa-workflows/batchProductsWorkflow/index.html.md) -- [createProductTagsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createProductTagsWorkflow/index.html.md) - [createCollectionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createCollectionsWorkflow/index.html.md) - [createProductOptionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createProductOptionsWorkflow/index.html.md) -- [createProductTypesWorkflow](https://docs.medusajs.com/references/medusa-workflows/createProductTypesWorkflow/index.html.md) +- [createProductTagsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createProductTagsWorkflow/index.html.md) - [createProductsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createProductsWorkflow/index.html.md) - [createProductVariantsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createProductVariantsWorkflow/index.html.md) +- [createProductTypesWorkflow](https://docs.medusajs.com/references/medusa-workflows/createProductTypesWorkflow/index.html.md) - [deleteCollectionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteCollectionsWorkflow/index.html.md) -- [deleteProductVariantsWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteProductVariantsWorkflow/index.html.md) - [deleteProductOptionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteProductOptionsWorkflow/index.html.md) -- [deleteProductsWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteProductsWorkflow/index.html.md) -- [deleteProductTypesWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteProductTypesWorkflow/index.html.md) - [deleteProductTagsWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteProductTagsWorkflow/index.html.md) -- [importProductsWorkflow](https://docs.medusajs.com/references/medusa-workflows/importProductsWorkflow/index.html.md) -- [updateCollectionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateCollectionsWorkflow/index.html.md) -- [updateProductOptionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateProductOptionsWorkflow/index.html.md) +- [deleteProductTypesWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteProductTypesWorkflow/index.html.md) +- [deleteProductVariantsWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteProductVariantsWorkflow/index.html.md) - [exportProductsWorkflow](https://docs.medusajs.com/references/medusa-workflows/exportProductsWorkflow/index.html.md) -- [updateProductVariantsWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateProductVariantsWorkflow/index.html.md) +- [deleteProductsWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteProductsWorkflow/index.html.md) +- [updateCollectionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateCollectionsWorkflow/index.html.md) +- [importProductsWorkflow](https://docs.medusajs.com/references/medusa-workflows/importProductsWorkflow/index.html.md) +- [updateProductOptionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateProductOptionsWorkflow/index.html.md) - [updateProductTagsWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateProductTagsWorkflow/index.html.md) -- [updateProductsWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateProductsWorkflow/index.html.md) - [updateProductTypesWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateProductTypesWorkflow/index.html.md) +- [updateProductVariantsWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateProductVariantsWorkflow/index.html.md) +- [updateProductsWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateProductsWorkflow/index.html.md) - [upsertVariantPricesWorkflow](https://docs.medusajs.com/references/medusa-workflows/upsertVariantPricesWorkflow/index.html.md) - [validateProductInputStep](https://docs.medusajs.com/references/medusa-workflows/validateProductInputStep/index.html.md) -- [createProductCategoriesWorkflow](https://docs.medusajs.com/references/medusa-workflows/createProductCategoriesWorkflow/index.html.md) -- [deleteProductCategoriesWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteProductCategoriesWorkflow/index.html.md) -- [updateProductCategoriesWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateProductCategoriesWorkflow/index.html.md) -- [batchPromotionRulesWorkflow](https://docs.medusajs.com/references/medusa-workflows/batchPromotionRulesWorkflow/index.html.md) -- [addOrRemoveCampaignPromotionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/addOrRemoveCampaignPromotionsWorkflow/index.html.md) -- [createCampaignsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createCampaignsWorkflow/index.html.md) -- [deleteCampaignsWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteCampaignsWorkflow/index.html.md) -- [createPromotionRulesWorkflow](https://docs.medusajs.com/references/medusa-workflows/createPromotionRulesWorkflow/index.html.md) -- [createPromotionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createPromotionsWorkflow/index.html.md) -- [deletePromotionRulesWorkflow](https://docs.medusajs.com/references/medusa-workflows/deletePromotionRulesWorkflow/index.html.md) -- [updateCampaignsWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateCampaignsWorkflow/index.html.md) -- [updatePromotionRulesWorkflow](https://docs.medusajs.com/references/medusa-workflows/updatePromotionRulesWorkflow/index.html.md) -- [deletePromotionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/deletePromotionsWorkflow/index.html.md) -- [updatePromotionsStatusWorkflow](https://docs.medusajs.com/references/medusa-workflows/updatePromotionsStatusWorkflow/index.html.md) -- [updatePromotionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/updatePromotionsWorkflow/index.html.md) -- [updatePromotionsValidationStep](https://docs.medusajs.com/references/medusa-workflows/updatePromotionsValidationStep/index.html.md) +- [createRegionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createRegionsWorkflow/index.html.md) - [deleteRegionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteRegionsWorkflow/index.html.md) - [updateRegionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateRegionsWorkflow/index.html.md) -- [createRegionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createRegionsWorkflow/index.html.md) +- [addOrRemoveCampaignPromotionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/addOrRemoveCampaignPromotionsWorkflow/index.html.md) +- [batchPromotionRulesWorkflow](https://docs.medusajs.com/references/medusa-workflows/batchPromotionRulesWorkflow/index.html.md) +- [createCampaignsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createCampaignsWorkflow/index.html.md) +- [createPromotionRulesWorkflow](https://docs.medusajs.com/references/medusa-workflows/createPromotionRulesWorkflow/index.html.md) +- [deleteCampaignsWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteCampaignsWorkflow/index.html.md) +- [createPromotionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createPromotionsWorkflow/index.html.md) +- [deletePromotionRulesWorkflow](https://docs.medusajs.com/references/medusa-workflows/deletePromotionRulesWorkflow/index.html.md) +- [deletePromotionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/deletePromotionsWorkflow/index.html.md) +- [updatePromotionRulesWorkflow](https://docs.medusajs.com/references/medusa-workflows/updatePromotionRulesWorkflow/index.html.md) +- [updateCampaignsWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateCampaignsWorkflow/index.html.md) +- [updatePromotionsStatusWorkflow](https://docs.medusajs.com/references/medusa-workflows/updatePromotionsStatusWorkflow/index.html.md) +- [updatePromotionsValidationStep](https://docs.medusajs.com/references/medusa-workflows/updatePromotionsValidationStep/index.html.md) +- [updatePromotionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/updatePromotionsWorkflow/index.html.md) +- [createProductCategoriesWorkflow](https://docs.medusajs.com/references/medusa-workflows/createProductCategoriesWorkflow/index.html.md) +- [updateProductCategoriesWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateProductCategoriesWorkflow/index.html.md) +- [deleteProductCategoriesWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteProductCategoriesWorkflow/index.html.md) - [createReservationsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createReservationsWorkflow/index.html.md) - [deleteReservationsByLineItemsWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteReservationsByLineItemsWorkflow/index.html.md) -- [deleteReservationsWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteReservationsWorkflow/index.html.md) - [updateReservationsWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateReservationsWorkflow/index.html.md) -- [deleteSalesChannelsWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteSalesChannelsWorkflow/index.html.md) -- [createSalesChannelsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createSalesChannelsWorkflow/index.html.md) -- [linkProductsToSalesChannelWorkflow](https://docs.medusajs.com/references/medusa-workflows/linkProductsToSalesChannelWorkflow/index.html.md) -- [updateSalesChannelsWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateSalesChannelsWorkflow/index.html.md) +- [deleteReservationsWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteReservationsWorkflow/index.html.md) - [createReturnReasonsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createReturnReasonsWorkflow/index.html.md) - [deleteReturnReasonsWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteReturnReasonsWorkflow/index.html.md) - [updateReturnReasonsWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateReturnReasonsWorkflow/index.html.md) - [deleteShippingProfileWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteShippingProfileWorkflow/index.html.md) - [validateStepShippingProfileDelete](https://docs.medusajs.com/references/medusa-workflows/validateStepShippingProfileDelete/index.html.md) +- [createSalesChannelsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createSalesChannelsWorkflow/index.html.md) +- [deleteSalesChannelsWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteSalesChannelsWorkflow/index.html.md) +- [linkProductsToSalesChannelWorkflow](https://docs.medusajs.com/references/medusa-workflows/linkProductsToSalesChannelWorkflow/index.html.md) +- [updateSalesChannelsWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateSalesChannelsWorkflow/index.html.md) - [createLocationFulfillmentSetWorkflow](https://docs.medusajs.com/references/medusa-workflows/createLocationFulfillmentSetWorkflow/index.html.md) - [createStockLocationsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createStockLocationsWorkflow/index.html.md) - [deleteStockLocationsWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteStockLocationsWorkflow/index.html.md) - [linkSalesChannelsToStockLocationWorkflow](https://docs.medusajs.com/references/medusa-workflows/linkSalesChannelsToStockLocationWorkflow/index.html.md) - [updateStockLocationsWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateStockLocationsWorkflow/index.html.md) +- [createUsersWorkflow](https://docs.medusajs.com/references/medusa-workflows/createUsersWorkflow/index.html.md) +- [deleteUsersWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteUsersWorkflow/index.html.md) +- [createUserAccountWorkflow](https://docs.medusajs.com/references/medusa-workflows/createUserAccountWorkflow/index.html.md) +- [removeUserAccountWorkflow](https://docs.medusajs.com/references/medusa-workflows/removeUserAccountWorkflow/index.html.md) +- [updateUsersWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateUsersWorkflow/index.html.md) - [createStoresWorkflow](https://docs.medusajs.com/references/medusa-workflows/createStoresWorkflow/index.html.md) -- [deleteStoresWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteStoresWorkflow/index.html.md) - [updateStoresWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateStoresWorkflow/index.html.md) +- [deleteStoresWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteStoresWorkflow/index.html.md) - [createTaxRateRulesWorkflow](https://docs.medusajs.com/references/medusa-workflows/createTaxRateRulesWorkflow/index.html.md) - [createTaxRatesWorkflow](https://docs.medusajs.com/references/medusa-workflows/createTaxRatesWorkflow/index.html.md) - [deleteTaxRatesWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteTaxRatesWorkflow/index.html.md) -- [createTaxRegionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createTaxRegionsWorkflow/index.html.md) - [deleteTaxRateRulesWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteTaxRateRulesWorkflow/index.html.md) +- [createTaxRegionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createTaxRegionsWorkflow/index.html.md) - [deleteTaxRegionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteTaxRegionsWorkflow/index.html.md) -- [maybeListTaxRateRuleIdsStep](https://docs.medusajs.com/references/medusa-workflows/maybeListTaxRateRuleIdsStep/index.html.md) - [updateTaxRatesWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateTaxRatesWorkflow/index.html.md) - [setTaxRateRulesWorkflow](https://docs.medusajs.com/references/medusa-workflows/setTaxRateRulesWorkflow/index.html.md) +- [maybeListTaxRateRuleIdsStep](https://docs.medusajs.com/references/medusa-workflows/maybeListTaxRateRuleIdsStep/index.html.md) - [updateTaxRegionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateTaxRegionsWorkflow/index.html.md) -- [createUserAccountWorkflow](https://docs.medusajs.com/references/medusa-workflows/createUserAccountWorkflow/index.html.md) -- [removeUserAccountWorkflow](https://docs.medusajs.com/references/medusa-workflows/removeUserAccountWorkflow/index.html.md) -- [createUsersWorkflow](https://docs.medusajs.com/references/medusa-workflows/createUsersWorkflow/index.html.md) -- [deleteUsersWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteUsersWorkflow/index.html.md) -- [updateUsersWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateUsersWorkflow/index.html.md) ## Steps -- [createApiKeysStep](https://docs.medusajs.com/references/medusa-workflows/steps/createApiKeysStep/index.html.md) -- [deleteApiKeysStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteApiKeysStep/index.html.md) -- [linkSalesChannelsToApiKeyStep](https://docs.medusajs.com/references/medusa-workflows/steps/linkSalesChannelsToApiKeyStep/index.html.md) -- [revokeApiKeysStep](https://docs.medusajs.com/references/medusa-workflows/steps/revokeApiKeysStep/index.html.md) -- [validateSalesChannelsExistStep](https://docs.medusajs.com/references/medusa-workflows/steps/validateSalesChannelsExistStep/index.html.md) -- [updateApiKeysStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateApiKeysStep/index.html.md) - [setAuthAppMetadataStep](https://docs.medusajs.com/references/medusa-workflows/steps/setAuthAppMetadataStep/index.html.md) -- [createRemoteLinkStep](https://docs.medusajs.com/references/medusa-workflows/steps/createRemoteLinkStep/index.html.md) -- [dismissRemoteLinkStep](https://docs.medusajs.com/references/medusa-workflows/steps/dismissRemoteLinkStep/index.html.md) -- [removeRemoteLinkStep](https://docs.medusajs.com/references/medusa-workflows/steps/removeRemoteLinkStep/index.html.md) -- [emitEventStep](https://docs.medusajs.com/references/medusa-workflows/steps/emitEventStep/index.html.md) -- [useQueryGraphStep](https://docs.medusajs.com/references/medusa-workflows/steps/useQueryGraphStep/index.html.md) -- [updateRemoteLinksStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateRemoteLinksStep/index.html.md) -- [useRemoteQueryStep](https://docs.medusajs.com/references/medusa-workflows/steps/useRemoteQueryStep/index.html.md) -- [validatePresenceOfStep](https://docs.medusajs.com/references/medusa-workflows/steps/validatePresenceOfStep/index.html.md) -- [createLineItemAdjustmentsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createLineItemAdjustmentsStep/index.html.md) +- [addShippingMethodToCartStep](https://docs.medusajs.com/references/medusa-workflows/steps/addShippingMethodToCartStep/index.html.md) - [confirmInventoryStep](https://docs.medusajs.com/references/medusa-workflows/steps/confirmInventoryStep/index.html.md) - [createCartsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createCartsStep/index.html.md) -- [addShippingMethodToCartStep](https://docs.medusajs.com/references/medusa-workflows/steps/addShippingMethodToCartStep/index.html.md) - [createLineItemsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createLineItemsStep/index.html.md) -- [createPaymentCollectionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createPaymentCollectionsStep/index.html.md) -- [findOneOrAnyRegionStep](https://docs.medusajs.com/references/medusa-workflows/steps/findOneOrAnyRegionStep/index.html.md) - [createShippingMethodAdjustmentsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createShippingMethodAdjustmentsStep/index.html.md) +- [createLineItemAdjustmentsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createLineItemAdjustmentsStep/index.html.md) +- [findOneOrAnyRegionStep](https://docs.medusajs.com/references/medusa-workflows/steps/findOneOrAnyRegionStep/index.html.md) - [findOrCreateCustomerStep](https://docs.medusajs.com/references/medusa-workflows/steps/findOrCreateCustomerStep/index.html.md) -- [findSalesChannelStep](https://docs.medusajs.com/references/medusa-workflows/steps/findSalesChannelStep/index.html.md) - [getActionsToComputeFromPromotionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/getActionsToComputeFromPromotionsStep/index.html.md) +- [getLineItemActionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/getLineItemActionsStep/index.html.md) - [getPromotionCodesToApply](https://docs.medusajs.com/references/medusa-workflows/steps/getPromotionCodesToApply/index.html.md) - [getVariantPriceSetsStep](https://docs.medusajs.com/references/medusa-workflows/steps/getVariantPriceSetsStep/index.html.md) -- [getLineItemActionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/getLineItemActionsStep/index.html.md) +- [createPaymentCollectionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createPaymentCollectionsStep/index.html.md) +- [findSalesChannelStep](https://docs.medusajs.com/references/medusa-workflows/steps/findSalesChannelStep/index.html.md) - [getVariantsStep](https://docs.medusajs.com/references/medusa-workflows/steps/getVariantsStep/index.html.md) -- [removeLineItemAdjustmentsStep](https://docs.medusajs.com/references/medusa-workflows/steps/removeLineItemAdjustmentsStep/index.html.md) -- [removeShippingMethodAdjustmentsStep](https://docs.medusajs.com/references/medusa-workflows/steps/removeShippingMethodAdjustmentsStep/index.html.md) - [prepareAdjustmentsFromPromotionActionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/prepareAdjustmentsFromPromotionActionsStep/index.html.md) - [removeShippingMethodFromCartStep](https://docs.medusajs.com/references/medusa-workflows/steps/removeShippingMethodFromCartStep/index.html.md) -- [setTaxLinesForItemsStep](https://docs.medusajs.com/references/medusa-workflows/steps/setTaxLinesForItemsStep/index.html.md) -- [retrieveCartStep](https://docs.medusajs.com/references/medusa-workflows/steps/retrieveCartStep/index.html.md) -- [updateCartPromotionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateCartPromotionsStep/index.html.md) - [reserveInventoryStep](https://docs.medusajs.com/references/medusa-workflows/steps/reserveInventoryStep/index.html.md) -- [updateLineItemsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateLineItemsStep/index.html.md) +- [retrieveCartStep](https://docs.medusajs.com/references/medusa-workflows/steps/retrieveCartStep/index.html.md) +- [removeShippingMethodAdjustmentsStep](https://docs.medusajs.com/references/medusa-workflows/steps/removeShippingMethodAdjustmentsStep/index.html.md) +- [setTaxLinesForItemsStep](https://docs.medusajs.com/references/medusa-workflows/steps/setTaxLinesForItemsStep/index.html.md) +- [removeLineItemAdjustmentsStep](https://docs.medusajs.com/references/medusa-workflows/steps/removeLineItemAdjustmentsStep/index.html.md) +- [updateCartPromotionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateCartPromotionsStep/index.html.md) - [updateCartsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateCartsStep/index.html.md) - [validateAndReturnShippingMethodsDataStep](https://docs.medusajs.com/references/medusa-workflows/steps/validateAndReturnShippingMethodsDataStep/index.html.md) -- [updateShippingMethodsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateShippingMethodsStep/index.html.md) - [validateCartPaymentsStep](https://docs.medusajs.com/references/medusa-workflows/steps/validateCartPaymentsStep/index.html.md) +- [updateLineItemsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateLineItemsStep/index.html.md) +- [updateShippingMethodsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateShippingMethodsStep/index.html.md) - [validateCartShippingOptionsPriceStep](https://docs.medusajs.com/references/medusa-workflows/steps/validateCartShippingOptionsPriceStep/index.html.md) - [validateCartShippingOptionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/validateCartShippingOptionsStep/index.html.md) - [validateShippingStep](https://docs.medusajs.com/references/medusa-workflows/steps/validateShippingStep/index.html.md) - [validateLineItemPricesStep](https://docs.medusajs.com/references/medusa-workflows/steps/validateLineItemPricesStep/index.html.md) - [validateVariantPricesStep](https://docs.medusajs.com/references/medusa-workflows/steps/validateVariantPricesStep/index.html.md) - [validateCartStep](https://docs.medusajs.com/references/medusa-workflows/steps/validateCartStep/index.html.md) -- [createCustomersStep](https://docs.medusajs.com/references/medusa-workflows/steps/createCustomersStep/index.html.md) -- [createCustomerAddressesStep](https://docs.medusajs.com/references/medusa-workflows/steps/createCustomerAddressesStep/index.html.md) -- [deleteCustomersStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteCustomersStep/index.html.md) -- [deleteCustomerAddressesStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteCustomerAddressesStep/index.html.md) -- [maybeUnsetDefaultShippingAddressesStep](https://docs.medusajs.com/references/medusa-workflows/steps/maybeUnsetDefaultShippingAddressesStep/index.html.md) -- [maybeUnsetDefaultBillingAddressesStep](https://docs.medusajs.com/references/medusa-workflows/steps/maybeUnsetDefaultBillingAddressesStep/index.html.md) -- [updateCustomerAddressesStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateCustomerAddressesStep/index.html.md) -- [updateCustomersStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateCustomersStep/index.html.md) -- [validateCustomerAccountCreation](https://docs.medusajs.com/references/medusa-workflows/steps/validateCustomerAccountCreation/index.html.md) +- [createApiKeysStep](https://docs.medusajs.com/references/medusa-workflows/steps/createApiKeysStep/index.html.md) +- [deleteApiKeysStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteApiKeysStep/index.html.md) +- [updateApiKeysStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateApiKeysStep/index.html.md) +- [linkSalesChannelsToApiKeyStep](https://docs.medusajs.com/references/medusa-workflows/steps/linkSalesChannelsToApiKeyStep/index.html.md) +- [validateSalesChannelsExistStep](https://docs.medusajs.com/references/medusa-workflows/steps/validateSalesChannelsExistStep/index.html.md) +- [revokeApiKeysStep](https://docs.medusajs.com/references/medusa-workflows/steps/revokeApiKeysStep/index.html.md) - [createCustomerGroupsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createCustomerGroupsStep/index.html.md) - [deleteCustomerGroupStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteCustomerGroupStep/index.html.md) - [linkCustomerGroupsToCustomerStep](https://docs.medusajs.com/references/medusa-workflows/steps/linkCustomerGroupsToCustomerStep/index.html.md) -- [linkCustomersToCustomerGroupStep](https://docs.medusajs.com/references/medusa-workflows/steps/linkCustomersToCustomerGroupStep/index.html.md) - [updateCustomerGroupsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateCustomerGroupsStep/index.html.md) -- [deleteFilesStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteFilesStep/index.html.md) -- [uploadFilesStep](https://docs.medusajs.com/references/medusa-workflows/steps/uploadFilesStep/index.html.md) +- [linkCustomersToCustomerGroupStep](https://docs.medusajs.com/references/medusa-workflows/steps/linkCustomersToCustomerGroupStep/index.html.md) - [createDefaultStoreStep](https://docs.medusajs.com/references/medusa-workflows/steps/createDefaultStoreStep/index.html.md) -- [calculateShippingOptionsPricesStep](https://docs.medusajs.com/references/medusa-workflows/steps/calculateShippingOptionsPricesStep/index.html.md) -- [buildPriceSet](https://docs.medusajs.com/references/medusa-workflows/steps/buildPriceSet/index.html.md) -- [cancelFulfillmentStep](https://docs.medusajs.com/references/medusa-workflows/steps/cancelFulfillmentStep/index.html.md) -- [createReturnFulfillmentStep](https://docs.medusajs.com/references/medusa-workflows/steps/createReturnFulfillmentStep/index.html.md) -- [createFulfillmentStep](https://docs.medusajs.com/references/medusa-workflows/steps/createFulfillmentStep/index.html.md) -- [createFulfillmentSets](https://docs.medusajs.com/references/medusa-workflows/steps/createFulfillmentSets/index.html.md) -- [createServiceZonesStep](https://docs.medusajs.com/references/medusa-workflows/steps/createServiceZonesStep/index.html.md) -- [createShippingOptionsPriceSetsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createShippingOptionsPriceSetsStep/index.html.md) -- [createShippingProfilesStep](https://docs.medusajs.com/references/medusa-workflows/steps/createShippingProfilesStep/index.html.md) -- [createShippingOptionRulesStep](https://docs.medusajs.com/references/medusa-workflows/steps/createShippingOptionRulesStep/index.html.md) -- [deleteFulfillmentSetsStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteFulfillmentSetsStep/index.html.md) -- [deleteShippingOptionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteShippingOptionsStep/index.html.md) -- [deleteShippingOptionRulesStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteShippingOptionRulesStep/index.html.md) -- [deleteServiceZonesStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteServiceZonesStep/index.html.md) -- [setShippingOptionsPricesStep](https://docs.medusajs.com/references/medusa-workflows/steps/setShippingOptionsPricesStep/index.html.md) -- [updateServiceZonesStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateServiceZonesStep/index.html.md) -- [updateFulfillmentStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateFulfillmentStep/index.html.md) -- [updateShippingOptionRulesStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateShippingOptionRulesStep/index.html.md) -- [upsertShippingOptionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/upsertShippingOptionsStep/index.html.md) -- [updateShippingProfilesStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateShippingProfilesStep/index.html.md) -- [validateShipmentStep](https://docs.medusajs.com/references/medusa-workflows/steps/validateShipmentStep/index.html.md) -- [validateShippingOptionPricesStep](https://docs.medusajs.com/references/medusa-workflows/steps/validateShippingOptionPricesStep/index.html.md) +- [createCustomersStep](https://docs.medusajs.com/references/medusa-workflows/steps/createCustomersStep/index.html.md) +- [deleteCustomerAddressesStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteCustomerAddressesStep/index.html.md) +- [createCustomerAddressesStep](https://docs.medusajs.com/references/medusa-workflows/steps/createCustomerAddressesStep/index.html.md) +- [maybeUnsetDefaultBillingAddressesStep](https://docs.medusajs.com/references/medusa-workflows/steps/maybeUnsetDefaultBillingAddressesStep/index.html.md) +- [maybeUnsetDefaultShippingAddressesStep](https://docs.medusajs.com/references/medusa-workflows/steps/maybeUnsetDefaultShippingAddressesStep/index.html.md) +- [deleteCustomersStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteCustomersStep/index.html.md) +- [updateCustomerAddressesStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateCustomerAddressesStep/index.html.md) +- [validateCustomerAccountCreation](https://docs.medusajs.com/references/medusa-workflows/steps/validateCustomerAccountCreation/index.html.md) +- [updateCustomersStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateCustomersStep/index.html.md) +- [uploadFilesStep](https://docs.medusajs.com/references/medusa-workflows/steps/uploadFilesStep/index.html.md) +- [deleteFilesStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteFilesStep/index.html.md) - [adjustInventoryLevelsStep](https://docs.medusajs.com/references/medusa-workflows/steps/adjustInventoryLevelsStep/index.html.md) +- [attachInventoryItemToVariants](https://docs.medusajs.com/references/medusa-workflows/steps/attachInventoryItemToVariants/index.html.md) - [createInventoryItemsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createInventoryItemsStep/index.html.md) - [createInventoryLevelsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createInventoryLevelsStep/index.html.md) -- [attachInventoryItemToVariants](https://docs.medusajs.com/references/medusa-workflows/steps/attachInventoryItemToVariants/index.html.md) -- [updateInventoryItemsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateInventoryItemsStep/index.html.md) -- [deleteInventoryItemStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteInventoryItemStep/index.html.md) - [deleteInventoryLevelsStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteInventoryLevelsStep/index.html.md) +- [deleteInventoryItemStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteInventoryItemStep/index.html.md) - [updateInventoryLevelsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateInventoryLevelsStep/index.html.md) -- [validateInventoryLocationsStep](https://docs.medusajs.com/references/medusa-workflows/steps/validateInventoryLocationsStep/index.html.md) - [validateInventoryDeleteStep](https://docs.medusajs.com/references/medusa-workflows/steps/validateInventoryDeleteStep/index.html.md) - [validateInventoryItemsForCreate](https://docs.medusajs.com/references/medusa-workflows/steps/validateInventoryItemsForCreate/index.html.md) -- [notifyOnFailureStep](https://docs.medusajs.com/references/medusa-workflows/steps/notifyOnFailureStep/index.html.md) -- [sendNotificationsStep](https://docs.medusajs.com/references/medusa-workflows/steps/sendNotificationsStep/index.html.md) -- [deleteInvitesStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteInvitesStep/index.html.md) -- [validateTokenStep](https://docs.medusajs.com/references/medusa-workflows/steps/validateTokenStep/index.html.md) +- [updateInventoryItemsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateInventoryItemsStep/index.html.md) +- [validateInventoryLocationsStep](https://docs.medusajs.com/references/medusa-workflows/steps/validateInventoryLocationsStep/index.html.md) +- [calculateShippingOptionsPricesStep](https://docs.medusajs.com/references/medusa-workflows/steps/calculateShippingOptionsPricesStep/index.html.md) +- [cancelFulfillmentStep](https://docs.medusajs.com/references/medusa-workflows/steps/cancelFulfillmentStep/index.html.md) +- [buildPriceSet](https://docs.medusajs.com/references/medusa-workflows/steps/buildPriceSet/index.html.md) +- [createFulfillmentStep](https://docs.medusajs.com/references/medusa-workflows/steps/createFulfillmentStep/index.html.md) +- [createFulfillmentSets](https://docs.medusajs.com/references/medusa-workflows/steps/createFulfillmentSets/index.html.md) +- [createShippingOptionRulesStep](https://docs.medusajs.com/references/medusa-workflows/steps/createShippingOptionRulesStep/index.html.md) +- [createShippingOptionsPriceSetsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createShippingOptionsPriceSetsStep/index.html.md) +- [createReturnFulfillmentStep](https://docs.medusajs.com/references/medusa-workflows/steps/createReturnFulfillmentStep/index.html.md) +- [createShippingProfilesStep](https://docs.medusajs.com/references/medusa-workflows/steps/createShippingProfilesStep/index.html.md) +- [createServiceZonesStep](https://docs.medusajs.com/references/medusa-workflows/steps/createServiceZonesStep/index.html.md) +- [deleteFulfillmentSetsStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteFulfillmentSetsStep/index.html.md) +- [deleteServiceZonesStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteServiceZonesStep/index.html.md) +- [deleteShippingOptionRulesStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteShippingOptionRulesStep/index.html.md) +- [setShippingOptionsPricesStep](https://docs.medusajs.com/references/medusa-workflows/steps/setShippingOptionsPricesStep/index.html.md) +- [updateFulfillmentStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateFulfillmentStep/index.html.md) +- [updateShippingOptionRulesStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateShippingOptionRulesStep/index.html.md) +- [updateServiceZonesStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateServiceZonesStep/index.html.md) +- [updateShippingProfilesStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateShippingProfilesStep/index.html.md) +- [upsertShippingOptionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/upsertShippingOptionsStep/index.html.md) +- [validateShipmentStep](https://docs.medusajs.com/references/medusa-workflows/steps/validateShipmentStep/index.html.md) +- [deleteShippingOptionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteShippingOptionsStep/index.html.md) +- [validateShippingOptionPricesStep](https://docs.medusajs.com/references/medusa-workflows/steps/validateShippingOptionPricesStep/index.html.md) - [createInviteStep](https://docs.medusajs.com/references/medusa-workflows/steps/createInviteStep/index.html.md) +- [deleteInvitesStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteInvitesStep/index.html.md) - [refreshInviteTokensStep](https://docs.medusajs.com/references/medusa-workflows/steps/refreshInviteTokensStep/index.html.md) +- [validateTokenStep](https://docs.medusajs.com/references/medusa-workflows/steps/validateTokenStep/index.html.md) +- [deleteLineItemsStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteLineItemsStep/index.html.md) +- [listLineItemsStep](https://docs.medusajs.com/references/medusa-workflows/steps/listLineItemsStep/index.html.md) +- [updateLineItemsStepWithSelector](https://docs.medusajs.com/references/medusa-workflows/steps/updateLineItemsStepWithSelector/index.html.md) - [addOrderTransactionStep](https://docs.medusajs.com/references/medusa-workflows/steps/addOrderTransactionStep/index.html.md) -- [cancelOrderClaimStep](https://docs.medusajs.com/references/medusa-workflows/steps/cancelOrderClaimStep/index.html.md) -- [cancelOrderExchangeStep](https://docs.medusajs.com/references/medusa-workflows/steps/cancelOrderExchangeStep/index.html.md) - [archiveOrdersStep](https://docs.medusajs.com/references/medusa-workflows/steps/archiveOrdersStep/index.html.md) +- [cancelOrderExchangeStep](https://docs.medusajs.com/references/medusa-workflows/steps/cancelOrderExchangeStep/index.html.md) - [cancelOrderChangeStep](https://docs.medusajs.com/references/medusa-workflows/steps/cancelOrderChangeStep/index.html.md) -- [cancelOrderReturnStep](https://docs.medusajs.com/references/medusa-workflows/steps/cancelOrderReturnStep/index.html.md) +- [cancelOrderClaimStep](https://docs.medusajs.com/references/medusa-workflows/steps/cancelOrderClaimStep/index.html.md) - [cancelOrderFulfillmentStep](https://docs.medusajs.com/references/medusa-workflows/steps/cancelOrderFulfillmentStep/index.html.md) - [cancelOrdersStep](https://docs.medusajs.com/references/medusa-workflows/steps/cancelOrdersStep/index.html.md) -- [completeOrdersStep](https://docs.medusajs.com/references/medusa-workflows/steps/completeOrdersStep/index.html.md) +- [cancelOrderReturnStep](https://docs.medusajs.com/references/medusa-workflows/steps/cancelOrderReturnStep/index.html.md) - [createCompleteReturnStep](https://docs.medusajs.com/references/medusa-workflows/steps/createCompleteReturnStep/index.html.md) - [createOrderChangeStep](https://docs.medusajs.com/references/medusa-workflows/steps/createOrderChangeStep/index.html.md) - [createOrderClaimItemsFromActionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createOrderClaimItemsFromActionsStep/index.html.md) - [createOrderClaimsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createOrderClaimsStep/index.html.md) +- [completeOrdersStep](https://docs.medusajs.com/references/medusa-workflows/steps/completeOrdersStep/index.html.md) - [createOrderExchangeItemsFromActionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createOrderExchangeItemsFromActionsStep/index.html.md) - [createOrderExchangesStep](https://docs.medusajs.com/references/medusa-workflows/steps/createOrderExchangesStep/index.html.md) - [createOrderLineItemsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createOrderLineItemsStep/index.html.md) @@ -30152,67 +30145,79 @@ For each product variant, you: - [deleteClaimsStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteClaimsStep/index.html.md) - [deleteExchangesStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteExchangesStep/index.html.md) - [deleteOrderChangeActionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteOrderChangeActionsStep/index.html.md) -- [deleteOrderShippingMethods](https://docs.medusajs.com/references/medusa-workflows/steps/deleteOrderShippingMethods/index.html.md) -- [deleteOrderLineItems](https://docs.medusajs.com/references/medusa-workflows/steps/deleteOrderLineItems/index.html.md) - [deleteOrderChangesStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteOrderChangesStep/index.html.md) - [deleteReturnsStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteReturnsStep/index.html.md) -- [registerOrderChangesStep](https://docs.medusajs.com/references/medusa-workflows/steps/registerOrderChangesStep/index.html.md) +- [deleteOrderShippingMethods](https://docs.medusajs.com/references/medusa-workflows/steps/deleteOrderShippingMethods/index.html.md) +- [deleteOrderLineItems](https://docs.medusajs.com/references/medusa-workflows/steps/deleteOrderLineItems/index.html.md) - [previewOrderChangeStep](https://docs.medusajs.com/references/medusa-workflows/steps/previewOrderChangeStep/index.html.md) - [registerOrderFulfillmentStep](https://docs.medusajs.com/references/medusa-workflows/steps/registerOrderFulfillmentStep/index.html.md) - [registerOrderShipmentStep](https://docs.medusajs.com/references/medusa-workflows/steps/registerOrderShipmentStep/index.html.md) +- [registerOrderChangesStep](https://docs.medusajs.com/references/medusa-workflows/steps/registerOrderChangesStep/index.html.md) - [setOrderTaxLinesForItemsStep](https://docs.medusajs.com/references/medusa-workflows/steps/setOrderTaxLinesForItemsStep/index.html.md) -- [updateOrderShippingMethodsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateOrderShippingMethodsStep/index.html.md) - [updateOrderChangeActionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateOrderChangeActionsStep/index.html.md) - [updateOrderChangesStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateOrderChangesStep/index.html.md) -- [updateReturnItemsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateReturnItemsStep/index.html.md) +- [updateOrderShippingMethodsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateOrderShippingMethodsStep/index.html.md) - [updateOrdersStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateOrdersStep/index.html.md) -- [listLineItemsStep](https://docs.medusajs.com/references/medusa-workflows/steps/listLineItemsStep/index.html.md) -- [deleteLineItemsStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteLineItemsStep/index.html.md) +- [updateReturnItemsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateReturnItemsStep/index.html.md) - [updateReturnsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateReturnsStep/index.html.md) -- [updateLineItemsStepWithSelector](https://docs.medusajs.com/references/medusa-workflows/steps/updateLineItemsStepWithSelector/index.html.md) +- [createPaymentAccountHolderStep](https://docs.medusajs.com/references/medusa-workflows/steps/createPaymentAccountHolderStep/index.html.md) +- [createRefundReasonStep](https://docs.medusajs.com/references/medusa-workflows/steps/createRefundReasonStep/index.html.md) +- [createPaymentSessionStep](https://docs.medusajs.com/references/medusa-workflows/steps/createPaymentSessionStep/index.html.md) +- [deletePaymentSessionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/deletePaymentSessionsStep/index.html.md) +- [updateRefundReasonsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateRefundReasonsStep/index.html.md) +- [deleteRefundReasonsStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteRefundReasonsStep/index.html.md) +- [updatePaymentCollectionStep](https://docs.medusajs.com/references/medusa-workflows/steps/updatePaymentCollectionStep/index.html.md) +- [validateDeletedPaymentSessionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/validateDeletedPaymentSessionsStep/index.html.md) +- [createPriceListPricesStep](https://docs.medusajs.com/references/medusa-workflows/steps/createPriceListPricesStep/index.html.md) +- [deletePriceListsStep](https://docs.medusajs.com/references/medusa-workflows/steps/deletePriceListsStep/index.html.md) +- [getExistingPriceListsPriceIdsStep](https://docs.medusajs.com/references/medusa-workflows/steps/getExistingPriceListsPriceIdsStep/index.html.md) +- [createPriceListsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createPriceListsStep/index.html.md) +- [updatePriceListPricesStep](https://docs.medusajs.com/references/medusa-workflows/steps/updatePriceListPricesStep/index.html.md) +- [updatePriceListsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updatePriceListsStep/index.html.md) +- [validatePriceListsStep](https://docs.medusajs.com/references/medusa-workflows/steps/validatePriceListsStep/index.html.md) +- [removePriceListPricesStep](https://docs.medusajs.com/references/medusa-workflows/steps/removePriceListPricesStep/index.html.md) +- [validateVariantPriceLinksStep](https://docs.medusajs.com/references/medusa-workflows/steps/validateVariantPriceLinksStep/index.html.md) +- [createRemoteLinkStep](https://docs.medusajs.com/references/medusa-workflows/steps/createRemoteLinkStep/index.html.md) +- [emitEventStep](https://docs.medusajs.com/references/medusa-workflows/steps/emitEventStep/index.html.md) +- [removeRemoteLinkStep](https://docs.medusajs.com/references/medusa-workflows/steps/removeRemoteLinkStep/index.html.md) +- [updateRemoteLinksStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateRemoteLinksStep/index.html.md) +- [dismissRemoteLinkStep](https://docs.medusajs.com/references/medusa-workflows/steps/dismissRemoteLinkStep/index.html.md) +- [useQueryGraphStep](https://docs.medusajs.com/references/medusa-workflows/steps/useQueryGraphStep/index.html.md) +- [useRemoteQueryStep](https://docs.medusajs.com/references/medusa-workflows/steps/useRemoteQueryStep/index.html.md) +- [validatePresenceOfStep](https://docs.medusajs.com/references/medusa-workflows/steps/validatePresenceOfStep/index.html.md) +- [notifyOnFailureStep](https://docs.medusajs.com/references/medusa-workflows/steps/notifyOnFailureStep/index.html.md) +- [sendNotificationsStep](https://docs.medusajs.com/references/medusa-workflows/steps/sendNotificationsStep/index.html.md) - [authorizePaymentSessionStep](https://docs.medusajs.com/references/medusa-workflows/steps/authorizePaymentSessionStep/index.html.md) - [cancelPaymentStep](https://docs.medusajs.com/references/medusa-workflows/steps/cancelPaymentStep/index.html.md) - [capturePaymentStep](https://docs.medusajs.com/references/medusa-workflows/steps/capturePaymentStep/index.html.md) -- [refundPaymentsStep](https://docs.medusajs.com/references/medusa-workflows/steps/refundPaymentsStep/index.html.md) - [refundPaymentStep](https://docs.medusajs.com/references/medusa-workflows/steps/refundPaymentStep/index.html.md) -- [createPaymentAccountHolderStep](https://docs.medusajs.com/references/medusa-workflows/steps/createPaymentAccountHolderStep/index.html.md) -- [deletePaymentSessionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/deletePaymentSessionsStep/index.html.md) -- [createPaymentSessionStep](https://docs.medusajs.com/references/medusa-workflows/steps/createPaymentSessionStep/index.html.md) -- [createRefundReasonStep](https://docs.medusajs.com/references/medusa-workflows/steps/createRefundReasonStep/index.html.md) -- [deleteRefundReasonsStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteRefundReasonsStep/index.html.md) -- [updatePaymentCollectionStep](https://docs.medusajs.com/references/medusa-workflows/steps/updatePaymentCollectionStep/index.html.md) -- [updateRefundReasonsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateRefundReasonsStep/index.html.md) -- [validateDeletedPaymentSessionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/validateDeletedPaymentSessionsStep/index.html.md) +- [refundPaymentsStep](https://docs.medusajs.com/references/medusa-workflows/steps/refundPaymentsStep/index.html.md) - [createPricePreferencesStep](https://docs.medusajs.com/references/medusa-workflows/steps/createPricePreferencesStep/index.html.md) - [createPriceSetsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createPriceSetsStep/index.html.md) - [deletePricePreferencesStep](https://docs.medusajs.com/references/medusa-workflows/steps/deletePricePreferencesStep/index.html.md) - [updatePricePreferencesAsArrayStep](https://docs.medusajs.com/references/medusa-workflows/steps/updatePricePreferencesAsArrayStep/index.html.md) -- [updatePriceSetsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updatePriceSetsStep/index.html.md) - [updatePricePreferencesStep](https://docs.medusajs.com/references/medusa-workflows/steps/updatePricePreferencesStep/index.html.md) -- [createPriceListPricesStep](https://docs.medusajs.com/references/medusa-workflows/steps/createPriceListPricesStep/index.html.md) -- [getExistingPriceListsPriceIdsStep](https://docs.medusajs.com/references/medusa-workflows/steps/getExistingPriceListsPriceIdsStep/index.html.md) -- [createPriceListsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createPriceListsStep/index.html.md) -- [deletePriceListsStep](https://docs.medusajs.com/references/medusa-workflows/steps/deletePriceListsStep/index.html.md) -- [removePriceListPricesStep](https://docs.medusajs.com/references/medusa-workflows/steps/removePriceListPricesStep/index.html.md) -- [updatePriceListPricesStep](https://docs.medusajs.com/references/medusa-workflows/steps/updatePriceListPricesStep/index.html.md) -- [updatePriceListsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updatePriceListsStep/index.html.md) -- [validatePriceListsStep](https://docs.medusajs.com/references/medusa-workflows/steps/validatePriceListsStep/index.html.md) -- [validateVariantPriceLinksStep](https://docs.medusajs.com/references/medusa-workflows/steps/validateVariantPriceLinksStep/index.html.md) -- [createProductCategoriesStep](https://docs.medusajs.com/references/medusa-workflows/steps/createProductCategoriesStep/index.html.md) -- [deleteProductCategoriesStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteProductCategoriesStep/index.html.md) -- [updateProductCategoriesStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateProductCategoriesStep/index.html.md) +- [updatePriceSetsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updatePriceSetsStep/index.html.md) +- [createRegionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createRegionsStep/index.html.md) +- [deleteRegionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteRegionsStep/index.html.md) +- [setRegionsPaymentProvidersStep](https://docs.medusajs.com/references/medusa-workflows/steps/setRegionsPaymentProvidersStep/index.html.md) +- [updateRegionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateRegionsStep/index.html.md) +- [createReservationsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createReservationsStep/index.html.md) +- [deleteReservationsStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteReservationsStep/index.html.md) +- [deleteReservationsByLineItemsStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteReservationsByLineItemsStep/index.html.md) +- [updateReservationsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateReservationsStep/index.html.md) - [batchLinkProductsToCategoryStep](https://docs.medusajs.com/references/medusa-workflows/steps/batchLinkProductsToCategoryStep/index.html.md) - [createCollectionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createCollectionsStep/index.html.md) - [batchLinkProductsToCollectionStep](https://docs.medusajs.com/references/medusa-workflows/steps/batchLinkProductsToCollectionStep/index.html.md) - [createProductOptionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createProductOptionsStep/index.html.md) - [createProductTagsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createProductTagsStep/index.html.md) - [createProductTypesStep](https://docs.medusajs.com/references/medusa-workflows/steps/createProductTypesStep/index.html.md) -- [createProductsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createProductsStep/index.html.md) - [createProductVariantsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createProductVariantsStep/index.html.md) +- [createProductsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createProductsStep/index.html.md) - [createVariantPricingLinkStep](https://docs.medusajs.com/references/medusa-workflows/steps/createVariantPricingLinkStep/index.html.md) - [deleteCollectionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteCollectionsStep/index.html.md) -- [deleteProductTagsStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteProductTagsStep/index.html.md) - [deleteProductOptionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteProductOptionsStep/index.html.md) +- [deleteProductTagsStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteProductTagsStep/index.html.md) - [deleteProductTypesStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteProductTypesStep/index.html.md) - [deleteProductVariantsStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteProductVariantsStep/index.html.md) - [generateProductCsvStep](https://docs.medusajs.com/references/medusa-workflows/steps/generateProductCsvStep/index.html.md) @@ -30221,64 +30226,59 @@ For each product variant, you: - [getProductsStep](https://docs.medusajs.com/references/medusa-workflows/steps/getProductsStep/index.html.md) - [getVariantAvailabilityStep](https://docs.medusajs.com/references/medusa-workflows/steps/getVariantAvailabilityStep/index.html.md) - [groupProductsForBatchStep](https://docs.medusajs.com/references/medusa-workflows/steps/groupProductsForBatchStep/index.html.md) +- [updateCollectionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateCollectionsStep/index.html.md) +- [updateProductOptionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateProductOptionsStep/index.html.md) - [parseProductCsvStep](https://docs.medusajs.com/references/medusa-workflows/steps/parseProductCsvStep/index.html.md) - [updateProductTagsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateProductTagsStep/index.html.md) -- [updateCollectionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateCollectionsStep/index.html.md) - [updateProductTypesStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateProductTypesStep/index.html.md) -- [updateProductOptionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateProductOptionsStep/index.html.md) - [updateProductVariantsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateProductVariantsStep/index.html.md) -- [updateProductsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateProductsStep/index.html.md) -- [waitConfirmationProductImportStep](https://docs.medusajs.com/references/medusa-workflows/steps/waitConfirmationProductImportStep/index.html.md) - [addCampaignPromotionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/addCampaignPromotionsStep/index.html.md) -- [addRulesToPromotionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/addRulesToPromotionsStep/index.html.md) +- [waitConfirmationProductImportStep](https://docs.medusajs.com/references/medusa-workflows/steps/waitConfirmationProductImportStep/index.html.md) +- [updateProductsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateProductsStep/index.html.md) - [createPromotionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createPromotionsStep/index.html.md) -- [createCampaignsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createCampaignsStep/index.html.md) +- [addRulesToPromotionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/addRulesToPromotionsStep/index.html.md) - [deleteCampaignsStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteCampaignsStep/index.html.md) -- [removeCampaignPromotionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/removeCampaignPromotionsStep/index.html.md) +- [createCampaignsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createCampaignsStep/index.html.md) - [deletePromotionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/deletePromotionsStep/index.html.md) -- [removeRulesFromPromotionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/removeRulesFromPromotionsStep/index.html.md) +- [removeCampaignPromotionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/removeCampaignPromotionsStep/index.html.md) - [updateCampaignsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateCampaignsStep/index.html.md) -- [updatePromotionRulesStep](https://docs.medusajs.com/references/medusa-workflows/steps/updatePromotionRulesStep/index.html.md) +- [removeRulesFromPromotionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/removeRulesFromPromotionsStep/index.html.md) - [updatePromotionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updatePromotionsStep/index.html.md) -- [createRegionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createRegionsStep/index.html.md) -- [deleteRegionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteRegionsStep/index.html.md) -- [updateRegionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateRegionsStep/index.html.md) -- [setRegionsPaymentProvidersStep](https://docs.medusajs.com/references/medusa-workflows/steps/setRegionsPaymentProvidersStep/index.html.md) -- [deleteReturnReasonStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteReturnReasonStep/index.html.md) +- [updatePromotionRulesStep](https://docs.medusajs.com/references/medusa-workflows/steps/updatePromotionRulesStep/index.html.md) +- [createProductCategoriesStep](https://docs.medusajs.com/references/medusa-workflows/steps/createProductCategoriesStep/index.html.md) +- [updateProductCategoriesStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateProductCategoriesStep/index.html.md) +- [deleteProductCategoriesStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteProductCategoriesStep/index.html.md) - [createReturnReasonsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createReturnReasonsStep/index.html.md) +- [deleteReturnReasonStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteReturnReasonStep/index.html.md) - [updateReturnReasonsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateReturnReasonsStep/index.html.md) -- [createReservationsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createReservationsStep/index.html.md) -- [deleteReservationsByLineItemsStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteReservationsByLineItemsStep/index.html.md) -- [updateReservationsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateReservationsStep/index.html.md) -- [deleteReservationsStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteReservationsStep/index.html.md) - [associateLocationsWithSalesChannelsStep](https://docs.medusajs.com/references/medusa-workflows/steps/associateLocationsWithSalesChannelsStep/index.html.md) - [associateProductsWithSalesChannelsStep](https://docs.medusajs.com/references/medusa-workflows/steps/associateProductsWithSalesChannelsStep/index.html.md) - [canDeleteSalesChannelsOrThrowStep](https://docs.medusajs.com/references/medusa-workflows/steps/canDeleteSalesChannelsOrThrowStep/index.html.md) - [createDefaultSalesChannelStep](https://docs.medusajs.com/references/medusa-workflows/steps/createDefaultSalesChannelStep/index.html.md) - [createSalesChannelsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createSalesChannelsStep/index.html.md) +- [deleteSalesChannelsStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteSalesChannelsStep/index.html.md) - [detachProductsFromSalesChannelsStep](https://docs.medusajs.com/references/medusa-workflows/steps/detachProductsFromSalesChannelsStep/index.html.md) - [detachLocationsFromSalesChannelsStep](https://docs.medusajs.com/references/medusa-workflows/steps/detachLocationsFromSalesChannelsStep/index.html.md) - [updateSalesChannelsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateSalesChannelsStep/index.html.md) -- [deleteSalesChannelsStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteSalesChannelsStep/index.html.md) -- [listShippingOptionsForContextStep](https://docs.medusajs.com/references/medusa-workflows/steps/listShippingOptionsForContextStep/index.html.md) -- [deleteShippingProfilesStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteShippingProfilesStep/index.html.md) -- [deleteStockLocationsStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteStockLocationsStep/index.html.md) - [createStockLocations](https://docs.medusajs.com/references/medusa-workflows/steps/createStockLocations/index.html.md) +- [deleteStockLocationsStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteStockLocationsStep/index.html.md) +- [listShippingOptionsForContextStep](https://docs.medusajs.com/references/medusa-workflows/steps/listShippingOptionsForContextStep/index.html.md) - [updateStockLocationsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateStockLocationsStep/index.html.md) -- [createStoresStep](https://docs.medusajs.com/references/medusa-workflows/steps/createStoresStep/index.html.md) -- [deleteStoresStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteStoresStep/index.html.md) -- [updateStoresStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateStoresStep/index.html.md) +- [deleteShippingProfilesStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteShippingProfilesStep/index.html.md) - [createTaxRateRulesStep](https://docs.medusajs.com/references/medusa-workflows/steps/createTaxRateRulesStep/index.html.md) - [createTaxRatesStep](https://docs.medusajs.com/references/medusa-workflows/steps/createTaxRatesStep/index.html.md) -- [createTaxRegionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createTaxRegionsStep/index.html.md) -- [deleteTaxRatesStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteTaxRatesStep/index.html.md) - [deleteTaxRateRulesStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteTaxRateRulesStep/index.html.md) +- [deleteTaxRatesStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteTaxRatesStep/index.html.md) +- [createTaxRegionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createTaxRegionsStep/index.html.md) - [deleteTaxRegionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteTaxRegionsStep/index.html.md) - [getItemTaxLinesStep](https://docs.medusajs.com/references/medusa-workflows/steps/getItemTaxLinesStep/index.html.md) -- [listTaxRateRuleIdsStep](https://docs.medusajs.com/references/medusa-workflows/steps/listTaxRateRuleIdsStep/index.html.md) - [listTaxRateIdsStep](https://docs.medusajs.com/references/medusa-workflows/steps/listTaxRateIdsStep/index.html.md) -- [updateTaxRegionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateTaxRegionsStep/index.html.md) +- [listTaxRateRuleIdsStep](https://docs.medusajs.com/references/medusa-workflows/steps/listTaxRateRuleIdsStep/index.html.md) - [updateTaxRatesStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateTaxRatesStep/index.html.md) +- [deleteStoresStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteStoresStep/index.html.md) +- [createStoresStep](https://docs.medusajs.com/references/medusa-workflows/steps/createStoresStep/index.html.md) +- [updateTaxRegionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateTaxRegionsStep/index.html.md) +- [updateStoresStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateStoresStep/index.html.md) - [createUsersStep](https://docs.medusajs.com/references/medusa-workflows/steps/createUsersStep/index.html.md) - [deleteUsersStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteUsersStep/index.html.md) - [updateUsersStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateUsersStep/index.html.md) @@ -30307,84 +30307,6 @@ npx medusa --help *** -# develop Command - Medusa CLI Reference - -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 \\`|Set host of the Medusa server.|\`localhost\`| -|\`-p \\`|Set port of the Medusa server.|\`9000\`| - - -# build Command - Medusa CLI Reference - -Create a standalone build of the Medusa application. - -This creates a build that: - -- Doesn't rely on the source TypeScript files. -- Can be copied to a production server reliably. - -The build is outputted to a new `.medusa/server` directory. - -```bash -npx medusa build -``` - -Refer to [this section](#run-built-medusa-application) for next steps. - -## Options - -|Option|Description| -|---|---|---| -|\`--admin-only\`|Whether to only build the admin to host it separately. If this option is not passed, the admin is built to the | - -*** - -## Run Built Medusa Application - -After running the `build` command, use the following step to run the built Medusa application: - -- Change to the `.medusa/server` directory and install the dependencies: - -```bash npm2yarn -cd .medusa/server && npm install -``` - -- When running the application locally, make sure to copy the `.env` file from the root project's directory. In production, use system environment variables instead. - -```bash npm2yarn -cp .env .medusa/server/.env.production -``` - -- In the system environment variables, set `NODE_ENV` to `production`: - -```bash -NODE_ENV=production -``` - -- Use the `start` command to run the application: - -```bash npm2yarn -cd .medusa/server && npm run start -``` - -*** - -## Build Medusa Admin - -By default, the Medusa Admin is built to the `.medusa/server/public/admin` directory. - -If you want a separate build to host the admin standalone, such as on Vercel, pass the `--admin-only` option as explained in the [Options](#options) section. This outputs the admin to the `.medusa/admin` directory instead. - - # db Commands - Medusa CLI Reference Commands starting with `db:` perform actions on the database. @@ -30505,6 +30427,130 @@ npx medusa db:sync-links |\`--execute-all\`|Skip prompts when syncing links and execute all (including unsafe) actions.|No|Prompts are shown for unsafe actions, by default.| +# develop Command - Medusa CLI Reference + +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 \\`|Set host of the Medusa server.|\`localhost\`| +|\`-p \\`|Set port of the Medusa server.|\`9000\`| + + +# new Command - Medusa CLI Reference + +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 URL of the starter repository to create the project from.|No|\`https://github.com/medusajs/medusa-starter-default\`| + +## Options + +|Option|Description| +|---|---|---| +|\`-y\`|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 | +|\`--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.| + + +# start Command - Medusa CLI Reference + +Start the Medusa application in production. + +```bash +npx medusa start +``` + +## Options + +|Option|Description|Default| +|---|---|---|---|---| +|\`-H \\`|Set host of the Medusa server.|\`localhost\`| +|\`-p \\`|Set port of the Medusa server.|\`9000\`| +|\`--cluster \\`|Start Medusa's Node.js server in |Cluster mode is disabled by default. If the option is passed but no number is passed, Medusa will try to consume all available CPU cores.| + + +# build Command - Medusa CLI Reference + +Create a standalone build of the Medusa application. + +This creates a build that: + +- Doesn't rely on the source TypeScript files. +- Can be copied to a production server reliably. + +The build is outputted to a new `.medusa/server` directory. + +```bash +npx medusa build +``` + +Refer to [this section](#run-built-medusa-application) for next steps. + +## Options + +|Option|Description| +|---|---|---| +|\`--admin-only\`|Whether to only build the admin to host it separately. If this option is not passed, the admin is built to the | + +*** + +## Run Built Medusa Application + +After running the `build` command, use the following step to run the built Medusa application: + +- Change to the `.medusa/server` directory and install the dependencies: + +```bash npm2yarn +cd .medusa/server && npm install +``` + +- When running the application locally, make sure to copy the `.env` file from the root project's directory. In production, use system environment variables instead. + +```bash npm2yarn +cp .env .medusa/server/.env.production +``` + +- In the system environment variables, set `NODE_ENV` to `production`: + +```bash +NODE_ENV=production +``` + +- Use the `start` command to run the application: + +```bash npm2yarn +cd .medusa/server && npm run start +``` + +*** + +## Build Medusa Admin + +By default, the Medusa Admin is built to the `.medusa/server/public/admin` directory. + +If you want a separate build to host the admin standalone, such as on Vercel, pass the `--admin-only` option as explained in the [Options](#options) section. This outputs the admin to the `.medusa/admin` directory instead. + + # plugin Commands - Medusa CLI Reference Commands starting with `plugin:` perform actions related to [plugin](https://docs.medusajs.com/docs/learn/fundamentals/plugins/index.html.md) development. @@ -30582,50 +30628,20 @@ npx medusa exec [file] [args...] |\`args\`|A list of arguments to pass to the function. These arguments are passed in the |No| -# new Command - Medusa CLI Reference +# telemetry Command - Medusa CLI Reference -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. +Enable or disable the collection of anonymous data usage. If no option is provided, the command enables the collection of anonymous data usage. ```bash -medusa new [ []] +npx medusa telemetry ``` -## Arguments - -|Argument|Description|Required|Default| -|---|---|---|---|---|---|---| -|\`dir\_name\`|The name of the directory to create the Medusa application in.|Yes|-| -|\`starter\_url\`|The URL of the starter repository to create the project from.|No|\`https://github.com/medusajs/medusa-starter-default\`| - -## Options +#### Options |Option|Description| |---|---|---| -|\`-y\`|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 | -|\`--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.| - - -# start Command - Medusa CLI Reference - -Start the Medusa application in production. - -```bash -npx medusa start -``` - -## Options - -|Option|Description|Default| -|---|---|---|---|---| -|\`-H \\`|Set host of the Medusa server.|\`localhost\`| -|\`-p \\`|Set port of the Medusa server.|\`9000\`| -|\`--cluster \\`|Start Medusa's Node.js server in |Cluster mode is disabled by default. If the option is passed but no number is passed, Medusa will try to consume all available CPU cores.| +|\`--enable\`|Enable telemetry (default).| +|\`--disable\`|Disable telemetry.| # user Command - Medusa CLI Reference @@ -30647,22 +30663,6 @@ npx medusa user --email [--password ] If ran successfully, you'll receive the invite token in the output.|No|\`false\`| -# telemetry Command - Medusa CLI Reference - -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.| - - # Medusa CLI Reference The Medusa CLI tool provides commands that facilitate your development. @@ -30686,68 +30686,6 @@ npx medusa --help *** -# build Command - Medusa CLI Reference - -Create a standalone build of the Medusa application. - -This creates a build that: - -- Doesn't rely on the source TypeScript files. -- Can be copied to a production server reliably. - -The build is outputted to a new `.medusa/server` directory. - -```bash -npx medusa build -``` - -Refer to [this section](#run-built-medusa-application) for next steps. - -## Options - -|Option|Description| -|---|---|---| -|\`--admin-only\`|Whether to only build the admin to host it separately. If this option is not passed, the admin is built to the | - -*** - -## Run Built Medusa Application - -After running the `build` command, use the following step to run the built Medusa application: - -- Change to the `.medusa/server` directory and install the dependencies: - -```bash npm2yarn -cd .medusa/server && npm install -``` - -- When running the application locally, make sure to copy the `.env` file from the root project's directory. In production, use system environment variables instead. - -```bash npm2yarn -cp .env .medusa/server/.env.production -``` - -- In the system environment variables, set `NODE_ENV` to `production`: - -```bash -NODE_ENV=production -``` - -- Use the `start` command to run the application: - -```bash npm2yarn -cd .medusa/server && npm run start -``` - -*** - -## Build Medusa Admin - -By default, the Medusa Admin is built to the `.medusa/server/public/admin` directory. - -If you want a separate build to host the admin standalone, such as on Vercel, pass the `--admin-only` option as explained in the [Options](#options) section. This outputs the admin to the `.medusa/admin` directory instead. - - # db Commands - Medusa CLI Reference Commands starting with `db:` perform actions on the database. @@ -30868,22 +30806,6 @@ npx medusa db:sync-links |\`--execute-all\`|Skip prompts when syncing links and execute all (including unsafe) actions.|No|Prompts are shown for unsafe actions, by default.| -# develop Command - Medusa CLI Reference - -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 \\`|Set host of the Medusa server.|\`localhost\`| -|\`-p \\`|Set port of the Medusa server.|\`9000\`| - - # exec Command - Medusa CLI Reference Run a custom CLI script. Learn more about it in [this guide](https://docs.medusajs.com/docs/learn/fundamentals/custom-cli-scripts/index.html.md). @@ -30900,6 +30822,84 @@ npx medusa exec [file] [args...] |\`args\`|A list of arguments to pass to the function. These arguments are passed in the |No| +# build Command - Medusa CLI Reference + +Create a standalone build of the Medusa application. + +This creates a build that: + +- Doesn't rely on the source TypeScript files. +- Can be copied to a production server reliably. + +The build is outputted to a new `.medusa/server` directory. + +```bash +npx medusa build +``` + +Refer to [this section](#run-built-medusa-application) for next steps. + +## Options + +|Option|Description| +|---|---|---| +|\`--admin-only\`|Whether to only build the admin to host it separately. If this option is not passed, the admin is built to the | + +*** + +## Run Built Medusa Application + +After running the `build` command, use the following step to run the built Medusa application: + +- Change to the `.medusa/server` directory and install the dependencies: + +```bash npm2yarn +cd .medusa/server && npm install +``` + +- When running the application locally, make sure to copy the `.env` file from the root project's directory. In production, use system environment variables instead. + +```bash npm2yarn +cp .env .medusa/server/.env.production +``` + +- In the system environment variables, set `NODE_ENV` to `production`: + +```bash +NODE_ENV=production +``` + +- Use the `start` command to run the application: + +```bash npm2yarn +cd .medusa/server && npm run start +``` + +*** + +## Build Medusa Admin + +By default, the Medusa Admin is built to the `.medusa/server/public/admin` directory. + +If you want a separate build to host the admin standalone, such as on Vercel, pass the `--admin-only` option as explained in the [Options](#options) section. This outputs the admin to the `.medusa/admin` directory instead. + + +# develop Command - Medusa CLI Reference + +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 \\`|Set host of the Medusa server.|\`localhost\`| +|\`-p \\`|Set port of the Medusa server.|\`9000\`| + + # new Command - Medusa CLI Reference 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. @@ -30990,23 +30990,6 @@ npx medusa plugin:build ``` -# start Command - Medusa CLI Reference - -Start the Medusa application in production. - -```bash -npx medusa start -``` - -## Options - -|Option|Description|Default| -|---|---|---|---|---| -|\`-H \\`|Set host of the Medusa server.|\`localhost\`| -|\`-p \\`|Set port of the Medusa server.|\`9000\`| -|\`--cluster \\`|Start Medusa's Node.js server in |Cluster mode is disabled by default. If the option is passed but no number is passed, Medusa will try to consume all available CPU cores.| - - # user Command - Medusa CLI Reference Create a new admin user. @@ -31026,6 +31009,23 @@ npx medusa user --email [--password ] If ran successfully, you'll receive the invite token in the output.|No|\`false\`| +# start Command - Medusa CLI Reference + +Start the Medusa application in production. + +```bash +npx medusa start +``` + +## Options + +|Option|Description|Default| +|---|---|---|---|---| +|\`-H \\`|Set host of the Medusa server.|\`localhost\`| +|\`-p \\`|Set port of the Medusa server.|\`9000\`| +|\`--cluster \\`|Start Medusa's Node.js server in |Cluster mode is disabled by default. If the option is passed but no number is passed, Medusa will try to consume all available CPU cores.| + + # telemetry Command - Medusa CLI Reference Enable or disable the collection of anonymous data usage. If no option is provided, the command enables the collection of anonymous data usage. @@ -43508,13 +43508,13 @@ To test out the loyalty points flow, you'll use the [Next.js Starter Storefront] So, run the following command in the Medusa application's directory to start the Medusa server: -```bash title="Medusa Application" +```bash npm2yarn badgeLabel="Medusa Application" badgeColor="green" npm run dev ``` Then, run the following command in the Next.js Starter Storefront's directory to start the Next.js server: -```bash title="Next.js Starter Storefront" +```bash npm2yarn badgeLabel="Storefront" badgeColor="blue" npm run dev ``` @@ -45772,1805 +45772,6 @@ If you're new to Medusa, check out the [main documentation](https://docs.medusaj To learn more about the commerce features that Medusa provides, check out Medusa's [Commerce Modules](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/index.html.md). -# How to Build Magento Data Migration Plugin - -In this tutorial, you'll learn how to build a [plugin](https://docs.medusajs.com/docs/learn/fundamentals/plugins/index.html.md) that migrates data, such as products, from Magento to Medusa. - -Magento is known for its customization capabilities. However, its monolithic architecture imposes limitations on business requirements, often forcing development teams to implement hacky workarounds. Over time, these customizations become challenging to maintain, especially as the business scales, leading to increased technical debt and slower feature delivery. - -Medusa's modular architecture allows you to build a custom digital commerce platform that meets your business requirements without the limitations of a monolithic system. By migrating from Magento to Medusa, you can take advantage of Medusa's modern technology stack to build a scalable and flexible commerce platform that grows with your business. - -By following this tutorial, you'll create a Medusa plugin that migrates data from a Magento server to a Medusa application in minimal time. You can re-use this plugin across multiple Medusa applications, allowing you to adopt Medusa across your projects. - -## Summary - -### Prerequisites - - - -This tutorial will teach you how to: - -- Install and set up a Medusa application project. -- Install and set up a Medusa plugin. -- Implement a Magento Module in the plugin to connect to Magento's APIs and retrieve products. - - This guide will only focus on migrating product data from Magento to Medusa. You can extend the implementation to migrate other data, such as customers, orders, and more. -- Trigger data migration from Magento to Medusa in a scheduled job. - -You can follow this tutorial whether you're new to Medusa or an advanced Medusa developer. - -![Diagram showcasing the flow of migrating data from Magento to Medusa](https://res.cloudinary.com/dza7lstvk/image/upload/v1739360550/Medusa%20Resources/magento-summary_hsewci.jpg) - -[Example Repository](https://github.com/medusajs/examples/tree/main/migrate-from-magento): Find the full code of the guide in this repository. The repository also includes additional features, such as triggering migrations from the Medusa Admin dashboard. - -*** - -## Step 1: Install a Medusa Application - -You'll first install a Medusa application that exposes core commerce features through REST APIs. You'll later install the Magento plugin in this application to test it out. - -### Prerequisites - -- [Node.js v20+](https://nodejs.org/en/download) -- [Git CLI tool](https://git-scm.com/downloads) -- [PostgreSQL](https://www.postgresql.org/download/) - -Start by installing the Medusa application on your machine with the following command: - -```bash -npx create-medusa-app@latest -``` - -You'll be asked for the project's name. You can also optionally choose to install the [Next.js starter storefront](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/nextjs-starter/index.html.md). - -Afterward, the installation process will start, which will install the Medusa application in a directory with your project's name. If you chose to install the Next.js starter, it'll be installed in a separate directory with the `{project-name}-storefront` name. - -The Medusa application is composed of a headless Node.js server and an admin dashboard. The storefront is installed or custom-built separately and connects to the Medusa application through its REST endpoints, called [API routes](https://docs.medusajs.com/docs/learn/fundamentals/api-routes/index.html.md). Refer to the [Medusa Architecture](https://docs.medusajs.com/docs/learn/introduction/architecture/index.html.md) documentation to learn more. - -Once the installation finishes successfully, the Medusa Admin dashboard will open with a form to create a new user. Enter the user's credentials and submit the form. Afterward, you can log in with the new user and explore the dashboard. - -Check out the [troubleshooting guides](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/troubleshooting/create-medusa-app-errors/index.html.md) for help. - -*** - -## Step 2: Install a Medusa Plugin Project - -A plugin is a package of reusable Medusa customizations that you can install in any Medusa application. You can add in the plugin [API Routes](https://docs.medusajs.com/docs/learn/fundamentals/api-routes/index.html.md), [Workflows](https://docs.medusajs.com/docs/learn/fundamentals/workflows/index.html.md), and other customizations, as you'll see in this guide. Afterward, you can test it out locally in a Medusa application, then publish it to npm to install and use it in any Medusa application. - -Refer to the [Plugins](https://docs.medusajs.com/docs/learn/fundamentals/plugins/index.html.md) documentation to learn more about plugins. - -A Medusa plugin is set up in a different project, giving you the flexibility in building and publishing it, while providing you with the tools to test it out locally in a Medusa application. - -To create a new Medusa plugin project, run the following command in a directory different than that of the Medusa application: - -```bash npm2yarn -npx create-medusa-app@latest medusa-plugin-magento --plugin -``` - -Where `medusa-plugin-magento` is the name of the plugin's directory and the name set in the plugin's `package.json`. So, if you wish to publish it to NPM later under a different name, you can change it here in the command or later in `package.json`. - -Once the installation process is done, a new directory named `medusa-plugin-magento` will be created with the plugin project files. - -![Directory structure of a plugin project](https://res.cloudinary.com/dza7lstvk/image/upload/v1737019441/Medusa%20Book/project-dir_q4xtri.jpg) - -*** - -## Step 3: Set up Plugin in Medusa Application - -Before you start your development, you'll set up the plugin in the Medusa application you installed in the first step. This will allow you to test the plugin during your development process. - -In the plugin's directory, run the following command to publish the plugin to the local package registry: - -```bash title="Plugin project" -npx medusa plugin:publish -``` - -This command uses [Yalc](https://github.com/wclr/yalc) under the hood to publish the plugin to a local package registry. The plugin is published locally under the name you specified in `package.json`. - -Next, you'll install the plugin in the Medusa application from the local registry. - -If you've installed your Medusa project before v2.3.1, you must install [yalc](https://github.com/wclr/yalc) as a development dependency first. - -Run the following command in the Medusa application's directory to install the plugin: - -```bash title="Medusa application" -npx medusa plugin:add medusa-plugin-magento -``` - -This command installs the plugin in the Medusa application from the local package registry. - -Next, register the plugin in the `medusa-config.ts` file of the Medusa application: - -```ts title="medusa-config.ts" -module.exports = defineConfig({ - // ... - plugins: [ - { - resolve: "medusa-plugin-magento", - options: { - // TODO add options - }, - }, - ], -}) -``` - -You add the plugin to the array of plugins. Later, you'll pass options useful to retrieve data from Magento. - -Finally, to ensure your plugin's changes are constantly published to the local registry, simplifying your testing process, keep the following command running in the plugin project during development: - -```bash title="Plugin project" -npx medusa plugin:develop -``` - -*** - -## Step 4: Implement Magento Module - -To connect to external applications in Medusa, you create a custom module. A module is a reusable package with functionalities related to a single feature or domain. Medusa integrates the module into your application without implications or side effects on your setup. - -In this step, you'll create a Magento Module in the Magento plugin that connects to a Magento server's REST APIs and retrieves data, such as products. - -Refer to the [Modules](https://docs.medusajs.com/docs/learn/fundamentals/modules/index.html.md) documentation to learn more about modules. - -### Create Module Directory - -A module is created under the `src/modules` directory of your plugin. So, create the directory `src/modules/magento`. - -![Diagram showcasing the module directory to create](https://res.cloudinary.com/dza7lstvk/image/upload/v1739272368/magento-1_ikev4x.jpg) - -### Create Module's Service - -You define a module's functionalities in a service. A service is a TypeScript or JavaScript class that the module exports. In the service's methods, you can connect to external systems or the database, which is useful if your module defines tables in the database. - -In this section, you'll create the Magento Module's service that connects to Magento's REST APIs and retrieves data. - -Start by creating the file `src/modules/magento/service.ts` in the plugin with the following content: - -![Diagram showcasing the service file to create](https://res.cloudinary.com/dza7lstvk/image/upload/v1739272483/magento-2_ajetpr.jpg) - -```ts title="src/modules/magento/service.ts" -type Options = { - baseUrl: string - storeCode?: string - username: string - password: string - migrationOptions?: { - imageBaseUrl?: string - } -} - -export default class MagentoModuleService { - private options: Options - - constructor({}, options: Options) { - this.options = { - ...options, - storeCode: options.storeCode || "default", - } - } -} -``` - -You create a `MagentoModuleService` that has an `options` property to store the module's options. These options include: - -- `baseUrl`: The base URL of the Magento server. -- `storeCode`: The store code of the Magento store, which is `default` by default. -- `username`: The username of a Magento admin user to authenticate with the Magento server. -- `password`: The password of the Magento admin user. -- `migrationOptions`: Additional options useful for migrating data, such as the base URL to use for product images. - -The service's constructor accepts as a first parameter the [Module Container](https://docs.medusajs.com/docs/learn/fundamentals/modules/container/index.html.md), which allows you to access resources available for the module. As a second parameter, it accepts the module's options. - -### Add Authentication Logic - -To authenticate with the Magento server, you'll add a method to the service that retrieves an access token from Magento using the username and password in the options. This access token is used in subsequent requests to the Magento server. - -First, add the following property to the `MagentoModuleService` class: - -```ts title="src/modules/magento/service.ts" -export default class MagentoModuleService { - private accessToken: { - token: string - expiresAt: Date - } - // ... -} -``` - -You add an `accessToken` property to store the access token and its expiration date. The access token Magento returns expires after four hours, so you store the expiration date to know when to refresh the token. - -Next, add the following `authenticate` method to the `MagentoModuleService` class: - -```ts title="src/modules/magento/service.ts" -import { MedusaError } from "@medusajs/framework/utils" - -export default class MagentoModuleService { - // ... - async authenticate() { - const response = await fetch(`${this.options.baseUrl}/rest/${this.options.storeCode}/V1/integration/admin/token`, { - method: "POST", - headers: { - "Content-Type": "application/json", - }, - body: JSON.stringify({ username: this.options.username, password: this.options.password }), - }) - - const token = await response.text() - - if (!response.ok) { - throw new MedusaError(MedusaError.Types.UNAUTHORIZED, `Failed to authenticate with Magento: ${token}`) - } - - this.accessToken = { - token: token.replaceAll("\"", ""), - expiresAt: new Date(Date.now() + 4 * 60 * 60 * 1000), // 4 hours in milliseconds - } - } -} -``` - -You create an `authenticate` method that sends a POST request to the Magento server's `/rest/{storeCode}/V1/integration/admin/token` endpoint, passing the username and password in the request body. - -If the request is successful, you store the access token and its expiration date in the `accessToken` property. If the request fails, you throw a `MedusaError` with the error message returned by Magento. - -Lastly, add an `isAccessTokenExpired` method that checks if the access token has expired: - -```ts title="src/modules/magento/service.ts" -export default class MagentoModuleService { - // ... - async isAccessTokenExpired(): Promise { - return !this.accessToken || this.accessToken.expiresAt < new Date() - } -} -``` - -In the `isAccessTokenExpired` method, you return a boolean indicating whether the access token has expired. You'll use this in later methods to check if you need to refresh the access token. - -### Retrieve Products from Magento - -Next, you'll add a method that retrieves products from Magento. Due to limitations in Magento's API that makes it difficult to differentiate between simple products that don't belong to a configurable product and those that do, you'll only retrieve configurable products and their children. You'll also retrieve the configurable attributes of the product, such as color and size. - -First, you'll add some types to represent a Magento product and its attributes. Create the file `src/modules/magento/types.ts` in the plugin with the following content: - -![Diagram showcasing the types file to create](https://res.cloudinary.com/dza7lstvk/image/upload/v1739346287/Medusa%20Resources/magento-3_fpghog.jpg) - -```ts title="src/modules/magento/types.ts" -export type MagentoProduct = { - id: number - sku: string - name: string - price: number - status: number - // not handling other types - type_id: "simple" | "configurable" - created_at: string - updated_at: string - extension_attributes: { - category_links: { - category_id: string - }[] - configurable_product_links?: number[] - configurable_product_options?: { - id: number - attribute_id: string - label: string - position: number - values: { - value_index: number - }[] - }[] - } - media_gallery_entries: { - id: number - media_type: string - label: string - position: number - disabled: boolean - types: string[] - file: string - }[] - custom_attributes: { - attribute_code: string - value: string - }[] - // added by module - children?: MagentoProduct[] -} - -export type MagentoAttribute = { - attribute_code: string - attribute_id: number - default_frontend_label: string - options: { - label: string - value: string - }[] -} - -export type MagentoPagination = { - search_criteria: { - filter_groups: [], - page_size: number - current_page: number - } - total_count: number -} - -export type MagentoPaginatedResponse = { - items: TData[] -} & MagentoPagination -``` - -You define the following types: - -- `MagentoProduct`: Represents a product in Magento. -- `MagentoAttribute`: Represents an attribute in Magento. -- `MagentoPagination`: Represents the pagination information returned by Magento's API. -- `MagentoPaginatedResponse`: Represents a paginated response from Magento's API for a specific item type, such as products. - -Next, add the `getProducts` method to the `MagentoModuleService` class: - -```ts title="src/modules/magento/service.ts" -export default class MagentoModuleService { - // ... - async getProducts(options?: { - currentPage?: number - pageSize?: number - }): Promise<{ - products: MagentoProduct[] - attributes: MagentoAttribute[] - pagination: MagentoPagination - }> { - const { currentPage = 1, pageSize = 100 } = options || {} - const getAccessToken = await this.isAccessTokenExpired() - if (getAccessToken) { - await this.authenticate() - } - - // TODO prepare query params - } -} -``` - -The `getProducts` method receives an optional `options` object with the `currentPage` and `pageSize` properties. So far, you check if the access token has expired and, if so, retrieve a new one using the `authenticate` method. - -Next, you'll prepare the query parameters to pass in the request that retrieves products. Replace the `TODO` with the following: - -```ts title="src/modules/magento/service.ts" -const searchQuery = new URLSearchParams() -// pass pagination parameters -searchQuery.append( - "searchCriteria[currentPage]", - currentPage?.toString() || "1" -) -searchQuery.append( - "searchCriteria[pageSize]", - pageSize?.toString() || "100" -) - -// retrieve only configurable products -searchQuery.append( - "searchCriteria[filter_groups][1][filters][0][field]", - "type_id" -) -searchQuery.append( - "searchCriteria[filter_groups][1][filters][0][value]", - "configurable" -) -searchQuery.append( - "searchCriteria[filter_groups][1][filters][0][condition_type]", - "in" -) - -// TODO send request to retrieve products -``` - -You create a `searchQuery` object to store the query parameters to pass in the request. Then, you add the pagination parameters and the filter to retrieve only configurable products. - -Next, you'll send the request to retrieve products from Magento. Replace the `TODO` with the following: - -```ts title="src/modules/magento/service.ts" -const { items: products, ...pagination }: MagentoPaginatedResponse = await fetch( - `${this.options.baseUrl}/rest/${this.options.storeCode}/V1/products?${searchQuery}`, - { - headers: { - "Authorization": `Bearer ${this.accessToken.token}`, - }, - } -).then((res) => res.json()) -.catch((err) => { - console.log(err) - throw new MedusaError( - MedusaError.Types.INVALID_DATA, - `Failed to get products from Magento: ${err.message}` - ) -}) - -// TODO prepare products -``` - -You send a `GET` request to the Magento server's `/rest/{storeCode}/V1/products` endpoint, passing the query parameters in the URL. You also pass the access token in the `Authorization` header. - -Next, you'll prepare the retrieved products by retrieving their children, configurable attributes, and modifying their image URLs. Replace the `TODO` with the following: - -```ts title="src/modules/magento/service.ts" -const attributeIds: string[] = [] - -await promiseAll( - products.map(async (product) => { - // retrieve its children - product.children = await fetch( - `${this.options.baseUrl}/rest/${this.options.storeCode}/V1/configurable-products/${product.sku}/children`, - { - headers: { - "Authorization": `Bearer ${this.accessToken.token}`, - }, - } - ).then((res) => res.json()) - .catch((err) => { - throw new MedusaError( - MedusaError.Types.INVALID_DATA, - `Failed to get product children from Magento: ${err.message}` - ) - }) - - product.media_gallery_entries = product.media_gallery_entries.map( - (entry) => ({ - ...entry, - file: `${this.options.migrationOptions?.imageBaseUrl}${entry.file}`, - } - )) - - attributeIds.push(...( - product.extension_attributes.configurable_product_options?.map( - (option) => option.attribute_id) || [] - ) - ) - }) -) - -// TODO retrieve attributes -``` - -You loop over the retrieved products and retrieve their children using the `/rest/{storeCode}/V1/configurable-products/{sku}/children` endpoint. You also modify the image URLs to use the base URL in the migration options, if provided. - -In addition, you store the IDs of the configurable products' attributes in the `attributeIds` array. You'll add a method that retrieves these attributes. - -Add the new method `getAttributes` to the `MagentoModuleService` class: - -```ts title="src/modules/magento/service.ts" -export default class MagentoModuleService { - // ... - async getAttributes({ - ids, - }: { - ids: string[] - }): Promise { - const getAccessToken = await this.isAccessTokenExpired() - if (getAccessToken) { - await this.authenticate() - } - - // filter by attribute IDs - const searchQuery = new URLSearchParams() - searchQuery.append( - "searchCriteria[filter_groups][0][filters][0][field]", - "attribute_id" - ) - searchQuery.append( - "searchCriteria[filter_groups][0][filters][0][value]", - ids.join(",") - ) - searchQuery.append( - "searchCriteria[filter_groups][0][filters][0][condition_type]", - "in" - ) - - const { - items: attributes, - }: MagentoPaginatedResponse = await fetch( - `${this.options.baseUrl}/rest/${this.options.storeCode}/V1/products/attributes?${searchQuery}`, - { - headers: { - "Authorization": `Bearer ${this.accessToken.token}`, - }, - } - ).then((res) => res.json()) - .catch((err) => { - throw new MedusaError( - MedusaError.Types.INVALID_DATA, - `Failed to get attributes from Magento: ${err.message}` - ) - }) - - return attributes - } -} -``` - -The `getAttributes` method receives an object with the `ids` property, which is an array of attribute IDs. You check if the access token has expired and, if so, retrieve a new one using the `authenticate` method. - -Next, you prepare the query parameters to pass in the request to retrieve attributes. You send a `GET` request to the Magento server's `/rest/{storeCode}/V1/products/attributes` endpoint, passing the query parameters in the URL. You also pass the access token in the `Authorization` header. - -Finally, you return the retrieved attributes. - -Now, go back to the `getProducts` method and replace the `TODO` with the following: - -```ts title="src/modules/magento/service.ts" -const attributes = await this.getAttributes({ ids: attributeIds }) - -return { products, attributes, pagination } -``` - -You retrieve the configurable products' attributes using the `getAttributes` method and return the products, attributes, and pagination information. - -You'll use this method in a later step to retrieve products from Magento. - -### Export Module Definition - -The final piece to a module is its definition, which you export in an `index.ts` file at its root directory. This definition tells Medusa the name of the module and its service. - -So, create the file `src/modules/magento/index.ts` with the following content: - -![Diagram showcasing the module definition file to create](https://res.cloudinary.com/dza7lstvk/image/upload/v1739348316/Medusa%20Resources/magento-4_bmepvh.jpg) - -```ts title="src/modules/magento/index.ts" -import { Module } from "@medusajs/framework/utils" -import MagentoModuleService from "./service" - -export const MAGENTO_MODULE = "magento" - -export default Module(MAGENTO_MODULE, { - service: MagentoModuleService, -}) -``` - -You use the `Module` function from the Modules SDK to create the module's definition. It accepts two parameters: - -1. The module's name, which is `magento`. -2. An object with a required property `service` indicating the module's service. - -You'll later use the module's service to retrieve products from Magento. - -### Pass Options to Plugin - -As mentioned earlier when you registered the plugin in the Medusa Application's `medusa-config.ts` file, you can pass options to the plugin. These options are then passed to the modules in the plugin. - -So, add the following options to the plugin's registration in the `medusa-config.ts` file of the Medusa application: - -```ts title="medusa-config.ts" -module.exports = defineConfig({ - // ... - plugins: [ - { - resolve: "medusa-plugin-magento", - options: { - baseUrl: process.env.MAGENTO_BASE_URL, - username: process.env.MAGENTO_USERNAME, - password: process.env.MAGENTO_PASSWORD, - migrationOptions: { - imageBaseUrl: process.env.MAGENTO_IMAGE_BASE_URL, - }, - }, - }, - ], -}) -``` - -You pass the options that you defined in the `MagentoModuleService`. Make sure to also set their environment variables in the `.env` file: - -```bash -MAGENTO_BASE_URL=https://magento.example.com -MAGENTO_USERNAME=admin -MAGENTO_PASSWORD=password -MAGENTO_IMAGE_BASE_URL=https://magento.example.com/pub/media/catalog/product -``` - -Where: - -- `MAGENTO_BASE_URL`: The base URL of the Magento server. It can also be a local URL, such as `http://localhost:8080`. -- `MAGENTO_USERNAME`: The username of a Magento admin user to authenticate with the Magento server. -- `MAGENTO_PASSWORD`: The password of the Magento admin user. -- `MAGENTO_IMAGE_BASE_URL`: The base URL to use for product images. Magento stores product images in the `pub/media/catalog/product` directory, so you can reference them directly or use a CDN URL. If the URLs of product images in the Medusa server already have a different base URL, you can omit this option. - -Medusa supports integrating third-party services, such as [S3](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/infrastructure-modules/file/s3/index.html.md), in a File Module Provider. Refer to the [File Module](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/infrastructure-modules/file/index.html.md) documentation to find other module providers and how to create a custom provider. - -You can now use the Magento Module to migrate data, which you'll do in the next steps. - -*** - -## Step 5: Build Product Migration Workflow - -In this section, you'll add the feature to migrate products from Magento to Medusa. To implement this feature, you'll use a workflow. - -A workflow is a series of queries and actions, called steps, that complete a task. You construct a workflow like you construct a function, but it's a special function that allows you to track its executions' progress, define roll-back logic, and configure other advanced features. Then, you execute the workflow from other customizations, such as in an API route or a scheduled job. - -By implementing the migration feature in a workflow, you ensure that the data remains consistent and that the migration process can be rolled back if an error occurs. - -Refer to the [Workflows](https://docs.medusajs.com/docs/learn/fundamentals/workflows/index.html.md) documentation to learn more about workflows. - -### Workflow Steps - -The workflow you'll create will have the following steps: - -- [getMagentoProductsStep](#getMagentoProductsStep): Retrieve products from Magento using the Magento Module. -- [useQueryGraphStep](https://docs.medusajs.com/references/helper-steps/useQueryGraphStep/index.html.md): Retrieve Medusa store details, which you'll need when creating the products. -- [useQueryGraphStep](https://docs.medusajs.com/references/helper-steps/useQueryGraphStep/index.html.md): Retrieve a shipping profile, which you'll associate the created products with. -- [useQueryGraphStep](https://docs.medusajs.com/references/helper-steps/useQueryGraphStep/index.html.md): Retrieve Magento products that are already in Medusa to update them, instead of creating them. -- [createProductsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createProductsWorkflow/index.html.md): Create products in the Medusa application. -- [updateProductsWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateProductsWorkflow/index.html.md): Update existing products in the Medusa application. - -You only need to implement the `getMagentoProductsStep` step, which retrieves the products from Magento. The other steps and workflows are provided by Medusa's `@medusajs/medusa/core-flows` package. - -### getMagentoProductsStep - -The first step of the workflow retrieves and returns the products from Magento. - -In your plugin, create the file `src/workflows/steps/get-magento-products.ts` with the following content: - -![Diagram showcasing the get-magento-products file to create](https://res.cloudinary.com/dza7lstvk/image/upload/v1739349590/Medusa%20Resources/magento-5_ueb4wn.jpg) - -```ts title="src/workflows/steps/get-magento-products.ts" -import { createStep, StepResponse } from "@medusajs/framework/workflows-sdk" -import { MAGENTO_MODULE } from "../../modules/magento" -import MagentoModuleService from "../../modules/magento/service" - -type GetMagentoProductsInput = { - currentPage: number - pageSize: number -} - -export const getMagentoProductsStep = createStep( - "get-magento-products", - async ({ currentPage, pageSize }: GetMagentoProductsInput, { container }) => { - const magentoModuleService: MagentoModuleService = - container.resolve(MAGENTO_MODULE) - - const response = await magentoModuleService.getProducts({ - currentPage, - pageSize, - }) - - return new StepResponse(response) - } -) -``` - -You create a step using `createStep` from the Workflows SDK. It accepts two parameters: - -1. The step's name, which is `get-magento-products`. -2. An async function that executes the step's logic. The function receives two parameters: - - The input data for the step, which in this case is the pagination parameters. - - An object holding the workflow's context, including the [Medusa Container](https://docs.medusajs.com/docslearn/fundamentals/medusa-container/index.html.md) that allows you to resolve Framework and commerce tools. - -In the step function, you resolve the Magento Module's service from the container, then use its `getProducts` method to retrieve the products from Magento. - -Steps that return data must return them in a `StepResponse` instance. The `StepResponse` constructor accepts as a parameter the data to return. - -### Create migrateProductsFromMagentoWorkflow - -You'll now create the workflow that migrates products from Magento using the step you created and steps from Medusa's `@medusajs/medusa/core-flows` package. - -In your plugin, create the file `src/workflows/migrate-products-from-magento.ts` with the following content: - -![Diagram showcasing the migrate-products-from-magento file to create](https://res.cloudinary.com/dza7lstvk/image/upload/v1739349820/Medusa%20Resources/magento-6_jjdaxj.jpg) - -```ts title="src/workflows/migrate-products-from-magento.ts" -import { - createWorkflow, transform, WorkflowResponse, -} from "@medusajs/framework/workflows-sdk" -import { - CreateProductWorkflowInputDTO, UpsertProductDTO, -} from "@medusajs/framework/types" -import { - createProductsWorkflow, - updateProductsWorkflow, - useQueryGraphStep, -} from "@medusajs/medusa/core-flows" -import { getMagentoProductsStep } from "./steps/get-magento-products" - -type MigrateProductsFromMagentoWorkflowInput = { - currentPage: number - pageSize: number -} - -export const migrateProductsFromMagentoWorkflowId = - "migrate-products-from-magento" - -export const migrateProductsFromMagentoWorkflow = createWorkflow( - { - name: migrateProductsFromMagentoWorkflowId, - retentionTime: 10000, - store: true, - }, - (input: MigrateProductsFromMagentoWorkflowInput) => { - const { pagination, products, attributes } = getMagentoProductsStep( - input - ) - // TODO prepare data to create and update products - } -) -``` - -You create a workflow using `createWorkflow` from the Workflows SDK. It accepts two parameters: - -1. An object with the workflow's configuration, including the name and whether to store the workflow's executions. You enable storing the workflow execution so that you can view it later in the Medusa Admin dashboard. -2. A worflow constructor function, which holds the workflow's implementation. The function receives the input data for the workflow, which is the pagination parameters. - -In the workflow constructor function, you use the `getMagentoProductsStep` step to retrieve the products from Magento, passing it the pagination parameters from the workflow's input. - -Next, you'll retrieve the Medusa store details and shipping profiles. These are necessary to prepare the data of the products to create or update. - -Replace the `TODO` in the workflow function with the following: - -```ts title="src/workflows/migrate-products-from-magento.ts" -const { data: stores } = useQueryGraphStep({ - entity: "store", - fields: ["supported_currencies.*", "default_sales_channel_id"], - pagination: { - take: 1, - skip: 0, - }, -}) - -const { data: shippingProfiles } = useQueryGraphStep({ - entity: "shipping_profile", - fields: ["id"], - pagination: { - take: 1, - skip: 0, - }, -}).config({ name: "get-shipping-profiles" }) - -// TODO retrieve existing products -``` - -You use the `useQueryGraphStep` step to retrieve the store details and shipping profiles. `useQueryGraphStep` is a Medusa step that wraps [Query](https://docs.medusajs.com/docs/learn/fundamentals/module-links/query/index.html.md), allowing you to use it in a workflow. Query is a tool that retrieves data across modules. - -Whe retrieving the store details, you specifically retrieve its supported currencies and default sales channel ID. You'll associate the products with the store's default sales channel, and set their variant prices in the supported currencies. You'll also associate the products with a shipping profile. - -Next, you'll retrieve products that were previously migrated from Magento to determine which products to create or update. Replace the `TODO` with the following: - -```ts title="src/workflows/migrate-products-from-magento.ts" -const externalIdFilters = transform({ - products, -}, (data) => { - return data.products.map((product) => product.id.toString()) -}) - -const { data: existingProducts } = useQueryGraphStep({ - entity: "product", - fields: ["id", "external_id", "variants.id", "variants.metadata"], - filters: { - external_id: externalIdFilters, - }, -}).config({ name: "get-existing-products" }) - -// TODO prepare products to create or update -``` - -Since the Medusa application creates an internal representation of the workflow's constructor function, you can't manipulate data directly, as variables have no value while creating the internal representation. - -Refer to the [Workflows](https://docs.medusajs.com/docs/learn/fundamentals/workflows/constructor-constraints/index.html.md) documentation to learn more about the workflow constructor function's constraints. - -Instead, you can manipulate data in a workflow's constructor function using `transform` from the Workflows SDK. `transform` is a function that accepts two parameters: - -- The data to transform, which in this case is the Magento products. -- A function that transforms the data. The function receives the data passed in the first parameter and returns the transformed data. - -In the transformation function, you return the IDs of the Magento products. Then, you use the `useQueryGraphStep` to retrieve products in the Medusa application that have an `external_id` property matching the IDs of the Magento products. You'll use this property to store the IDs of the products in Magento. - -Next, you'll prepare the data to create and update the products. Replace the `TODO` in the workflow function with the following: - -```ts title="src/workflows/migrate-products-from-magento.ts" highlights={prepareHighlights} -const { - productsToCreate, - productsToUpdate, -} = transform({ - products, - attributes, - stores, - shippingProfiles, - existingProducts, -}, (data) => { - const productsToCreate = new Map() - const productsToUpdate = new Map() - - data.products.forEach((magentoProduct) => { - const productData: CreateProductWorkflowInputDTO | UpsertProductDTO = { - title: magentoProduct.name, - description: magentoProduct.custom_attributes.find( - (attr) => attr.attribute_code === "description" - )?.value, - status: magentoProduct.status === 1 ? "published" : "draft", - handle: magentoProduct.custom_attributes.find( - (attr) => attr.attribute_code === "url_key" - )?.value, - external_id: magentoProduct.id.toString(), - thumbnail: magentoProduct.media_gallery_entries.find( - (entry) => entry.types.includes("thumbnail") - )?.file, - sales_channels: [{ - id: data.stores[0].default_sales_channel_id, - }], - shipping_profile_id: data.shippingProfiles[0].id, - } - const existingProduct = data.existingProducts.find((p) => p.external_id === productData.external_id) - - if (existingProduct) { - productData.id = existingProduct.id - } - - productData.options = magentoProduct.extension_attributes.configurable_product_options?.map((option) => { - const attribute = data.attributes.find((attr) => attr.attribute_id === parseInt(option.attribute_id)) - return { - title: option.label, - values: attribute?.options.filter((opt) => { - return option.values.find((v) => v.value_index === parseInt(opt.value)) - }).map((opt) => opt.label) || [], - } - }) || [] - - productData.variants = magentoProduct.children?.map((child) => { - const childOptions: Record = {} - - child.custom_attributes.forEach((attr) => { - const attrData = data.attributes.find((a) => a.attribute_code === attr.attribute_code) - if (!attrData) { - return - } - - childOptions[attrData.default_frontend_label] = attrData.options.find((opt) => opt.value === attr.value)?.label || "" - }) - - const variantExternalId = child.id.toString() - const existingVariant = existingProduct.variants.find((v) => v.metadata.external_id === variantExternalId) - - return { - title: child.name, - sku: child.sku, - options: childOptions, - prices: data.stores[0].supported_currencies.map(({ currency_code }) => { - return { - amount: child.price, - currency_code, - } - }), - metadata: { - external_id: variantExternalId, - }, - id: existingVariant?.id, - } - }) - - productData.images = magentoProduct.media_gallery_entries.filter((entry) => !entry.types.includes("thumbnail")).map((entry) => { - return { - url: entry.file, - metadata: { - external_id: entry.id.toString(), - }, - } - }) - - if (productData.id) { - productsToUpdate.set(existingProduct.id, productData) - } else { - productsToCreate.set(productData.external_id!, productData) - } - }) - - return { - productsToCreate: Array.from(productsToCreate.values()), - productsToUpdate: Array.from(productsToUpdate.values()), - } -}) - -// TODO create and update products -``` - -You use `transform` again to prepare the data to create and update the products in the Medusa application. For each Magento product, you map its equivalent Medusa product's data: - -- You set the product's general details, such as the title, description, status, handle, external ID, and thumbnail using the Magento product's data and custom attributes. -- You associate the product with the default sales channel and shipping profile retrieved previously. -- You map the Magento product's configurable product options to Medusa product options. In Medusa, a product's option has a label, such as "Color", and values, such as "Red". To map the option values, you use the attributes retrieved from Magento. -- You map the Magento product's children to Medusa product variants. For the variant options, you pass an object whose keys is the option's label, such as "Color", and values is the option's value, such as "Red". For the prices, you set the variant's price based on the Magento child's price for every supported currency in the Medusa store. Also, you set the Magento child product's ID in the Medusa variant's `metadata.external_id` property. -- You map the Magento product's media gallery entries to Medusa product images. You filter out the thumbnail image and set the URL and the Magento image's ID in the Medusa image's `metadata.external_id` property. - -In addition, you use the existing products retrieved in the previous step to determine whether a product should be created or updated. If there's an existing product whose `external_id` matches the ID of the magento product, you set the existing product's ID in the `id` property of the product to be updated. You also do the same for its variants. - -Finally, you return the products to create and update. - -The last steps of the workflow is to create and update the products. Replace the `TODO` in the workflow function with the following: - -```ts title="src/workflows/migrate-products-from-magento.ts" -createProductsWorkflow.runAsStep({ - input: { - products: productsToCreate, - }, -}) - -updateProductsWorkflow.runAsStep({ - input: { - products: productsToUpdate, - }, -}) - -return new WorkflowResponse(pagination) -``` - -You use the `createProductsWorkflow` and `updateProductsWorkflow` workflows from Medusa's `@medusajs/medusa/core-flows` package to create and update the products in the Medusa application. - -Workflows must return an instance of `WorkflowResponse`, passing as a parameter the data to return to the workflow's executor. This workflow returns the pagination parameters, allowing you to paginate the product migration process. - -You can now use this workflow to migrate products from Magento to Medusa. You'll learn how to use it in the next steps. - -*** - -## Step 6: Schedule Product Migration - -There are many ways to execute tasks asynchronously in Medusa, such as [scheduling a job](https://docs.medusajs.com/docs/learn/fundamentals/scheduled-jobs/index.html.md) or [handling emitted events](https://docs.medusajs.com/docs/learn/fundamentals/events-and-subscribers/index.html.md). - -In this guide, you'll learn how to schedule the product migration at a specified interval using a scheduled job. A scheduled job is an asynchronous function that the Medusa application runs at the interval you specify during the Medusa application's runtime. - -Refer to the [Scheduled Jobs](https://docs.medusajs.com/docs/learn/fundamentals/scheduled-jobs/index.html.md) documentation to learn more about scheduled jobs. - -To create a scheduled job, in your plugin, create the file `src/jobs/migrate-magento.ts` with the following content: - -![Diagram showcasing the migrate-magento file to create](https://res.cloudinary.com/dza7lstvk/image/upload/v1739358924/Medusa%20Resources/magento-7_rqoodo.jpg) - -```ts title="src/jobs/migrate-magento.ts" -import { MedusaContainer } from "@medusajs/framework/types" -import { migrateProductsFromMagentoWorkflow } from "../workflows" - -export default async function migrateMagentoJob( - container: MedusaContainer -) { - const logger = container.resolve("logger") - logger.info("Migrating products from Magento...") - - let currentPage = 0 - const pageSize = 100 - let totalCount = 0 - - do { - currentPage++ - - const { - result: pagination, - } = await migrateProductsFromMagentoWorkflow(container).run({ - input: { - currentPage, - pageSize, - }, - }) - - totalCount = pagination.total_count - } while (currentPage * pageSize < totalCount) - - logger.info("Finished migrating products from Magento") -} - -export const config = { - name: "migrate-magento-job", - schedule: "0 0 * * *", -} -``` - -A scheduled job file must export: - -- An asynchronous function that executes the job's logic. The function receives the [Medusa container](https://docs.medusajs.com/docs/learn/fundamentals/medusa-container/index.html.md) as a parameter. -- An object with the job's configuration, including the name and the schedule. The schedule is a cron job pattern as a string. - -In the job function, you resolve the [logger](https://docs.medusajs.com/docs/learn/debugging-and-testing/logging/index.html.md) from the container to log messages. Then, you paginate the product migration process by running the `migrateProductsFromMagentoWorkflow` workflow at each page until you've migrated all products. You use the pagination result returned by the workflow to determine whether there are more products to migrate. - -Based on the job's configurations, the Medusa application will run the job at midnight every day. - -### Test it Out - -To test out this scheduled job, first, change the configuration to run the job every minute: - -```ts title="src/jobs/migrate-magento.ts" -export const config = { - // ... - schedule: "* * * * *", -} -``` - -Then, make sure to run the `plugin:develop` command in the plugin if you haven't already: - -```bash -npx medusa plugin:develop -``` - -This ensures that the plugin's latest changes are reflected in the Medusa application. - -Finally, start the Medusa application that the plugin is installed in: - -```bash npm2yarn -npm run dev -``` - -After a minute, you'll see a message in the terminal indicating that the migration started: - -```plain title="Terminal" -info: Migrating products from Magento... -``` - -Once the migration is done, you'll see the following message: - -```plain title="Terminal" -info: Finished migrating products from Magento -``` - -To confirm that the products were migrated, open the Medusa Admin dashboard at `http://localhost:9000/app` and log in. Then, click on Products in the sidebar. You'll see your magento products in the list of products. - -![Click on products at the sidebar on the right, then view the products in the table in the middle.](https://res.cloudinary.com/dza7lstvk/image/upload/v1739359394/Medusa%20Resources/Screenshot_2025-02-12_at_1.22.44_PM_uva98i.png) - -*** - -## Next Steps - -You've now implemented the logic to migrate products from Magento to Medusa. You can re-use the plugin across Medusa applications. You can also expand on the plugin to: - -- Migrate other entities, such as orders, customers, and categories. Migrating other entities follows the same pattern as migrating products, using workflows and scheduled jobs. You only need to format the data to be migrated as needed. -- Allow triggering migrations from the Medusa Admin dashboard using [Admin Customizations](https://docs.medusajs.com/docs/learn/fundamentals/admin/index.html.md). This feature is available in the [Example Repository](https://github.com/medusajs/example-repository/tree/main/src/admin). - -If you're new to Medusa, check out the [main documentation](https://docs.medusajs.com/docs/learn/index.html.md), where you'll get a more in-depth learning of all the concepts you've used in this guide and more. - -To learn more about the commerce features that Medusa provides, check out Medusa's [Commerce Modules](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/index.html.md). - - -# Integrate Medusa with Resend (Email Notifications) - -In this guide, you'll learn how to integrate Medusa with Resend. - -When you install a Medusa application, you get a fully-fledged commerce platform with a Framework for customization. Medusa's architecture supports integrating third-party services, such as an email service, that allow you to build your unique requirements around core commerce flows. - -[Resend](https://resend.com/docs/introduction) is an email service with an intuitive developer experience to send emails from any application type, including Node.js servers. By integrating Resend with Medusa, you can build flows to send an email when a commerce operation is performed, such as when an order is placed. - -This guide will teach you how to: - -- Install and set up Medusa. -- Integrate Resend into Medusa for sending emails. -- Build a flow to send an email with Resend when a customer places an order. - -You can follow this guide whether you're new to Medusa or an advanced Medusa developer. - -[Example Repository](https://github.com/medusajs/examples/tree/main/resend-integration): Find the full code of the guide in this repository. - -*** - -## Step 1: Install a Medusa Application - -### Prerequisites - -- [Node.js v20+](https://nodejs.org/en/download) -- [Git CLI tool](https://git-scm.com/downloads) -- [PostgreSQL](https://www.postgresql.org/download/) - -Start by installing the Medusa application on your machine with the following command: - -```bash -npx create-medusa-app@latest -``` - -You'll first be asked for the project's name. Then, when you're asked whether you want to install the Next.js storefront, choose `Y` for yes. - -Afterwards, the installation process will start, which will install the Medusa application in a directory with your project's name, and the Next.js storefront in a directory with the `{project-name}-storefront` name. - -The Medusa application is composed of a headless Node.js server and an admin dashboard. The storefront is installed or custom-built separately and connects to the Medusa application through its REST endpoints, called [API routes](https://docs.medusajs.com/docs/learn/fundamentals/api-routes/index.html.md). Learn more about Medusa's architecture in [this documentation](https://docs.medusajs.com/docs/learn/introduction/architecture/index.html.md). - -Once the installation finishes successfully, the Medusa Admin dashboard will open with a form to create a new user. Enter the user's credential and submit the form. Afterwards, you can login with the new user and explore the dashboard. - -The Next.js storefront is also running at `http://localhost:8000`. - -Check out the [troubleshooting guides](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/troubleshooting/create-medusa-app-errors/index.html.md) for help. - -*** - -## Step 2: Prepare Resend Account - -If you don't have a Resend Account, create one on [their website](https://resend.com/emails). - -In addition, Resend allows you to send emails from the address `onboarding@resend.dev` only to your account's email, which is useful for development purposes. If you have a custom domain to send emails from, add it to your Resend account's domains: - -1. Go to Domains from the sidebar. -2. Click on Add Domain. - -![Click on Domains in the sidebar then on the Add Domain button in the middle of the page.](https://res.cloudinary.com/dza7lstvk/image/upload/v1732523238/Medusa%20Resources/Screenshot_2024-11-25_at_10.18.11_AM_pmqgtv.png) - -3\. In the form that opens, enter your domain name and select a region close to your users, then click Add. - -![A pop-up window with Domain and Region fields.](https://res.cloudinary.com/dza7lstvk/image/upload/v1732523280/Medusa%20Resources/Screenshot_2024-11-25_at_10.18.52_AM_sw2pr4.png) - -4\. In the domain's details page that opens, you'll find DNS records to add to your DNS provider. After you add them, click on Verify DNS Records. You can start sending emails from your custom domain once it's verified. - -The steps to add DNS records are different for each provider, so refer to your provider's documentation or knowledge base for more details. - -![The DNS records to add are in a table under the DNS Records section. Once added, click the Verify DNS Records button at the top right.](https://res.cloudinary.com/dza7lstvk/image/upload/v1732523394/Medusa%20Resources/Screenshot_2024-11-25_at_10.20.56_AM_ktvbse.png) - -You also need an API key to connect to your Resend account from Medusa, but you'll create that one in a later section. - -*** - -## Step 3: Install Resend Dependencies - -In this step, you'll install two packages useful for your Resend integration: - -1. `resend`, which is the Resend SDK: - -```bash npm2yarn -npm install resend -``` - -2\. [react-email](https://github.com/resend/react-email), which is a package created by Resend to create email templates with React: - -```bash npm2yarn -npm install @react-email/components -E -``` - -You'll use these packages in the next steps. - -*** - -## Step 4: Create Resend Module Provider - -To integrate third-party services into Medusa, you create a custom module. A module is a re-usable package with functionalities related to a single feature or domain. Medusa integrates the module into your application without implications or side effects on your setup. - -Medusa's Notification Module delegates sending notifications to other modules, called module providers. In this step, you'll create a Resend Module Provider that implements sending notifications through the email channel. In later steps, you'll send email notifications with Resend when an order is placed through this provider. - -Learn more about modules in [this documentation](https://docs.medusajs.com/docs/learn/fundamentals/modules/index.html.md). - -### Create Module Directory - -A module is created under the `src/modules` directory of your Medusa application. So, create the directory `src/modules/resend`. - -### Create Service - -You define a module's functionalities in a service. A service is a TypeScript or JavaScript class that the module exports. In the service's methods, you can connect to the database, which is useful if your module defines tables in the database, or connect to a third-party service. - -In this section, you'll create the Resend Module Provider's service and the methods necessary to send an email with Resend. - -Start by creating the file `src/modules/resend/service.ts` with the following content: - -```ts title="src/modules/resend/service.ts" highlights={serviceHighlights1} -import { - AbstractNotificationProviderService, -} from "@medusajs/framework/utils" -import { - Logger, -} from "@medusajs/framework/types" -import { - Resend, -} from "resend" - -type ResendOptions = { - api_key: string - from: string - html_templates?: Record -} - -class ResendNotificationProviderService extends AbstractNotificationProviderService { - static identifier = "notification-resend" - private resendClient: Resend - private options: ResendOptions - private logger: Logger - - // ... -} - -export default ResendNotificationProviderService -``` - -A Notification Module Provider's service must extend the `AbstractNotificationProviderService`. It has a `send` method that you'll implement soon. The service must also have an `identifier` static property, which is a unique identifier that the Medusa application will use to register the provider in the database. - -The `ResendNotificationProviderService` class also has the following properties: - -- `resendClient` of type `Resend` (from the Resend SDK you installed in the previous step) to send emails through Resend. -- `options` of type `ResendOptions`. Modules accept options through Medusa's configurations. This ensures that the module is reusable across applications and you don't use sensitive variables like API keys directly in your code. The options that the Resend Module Provider accepts are: - - `api_key`: The Resend API key. - - `from`: The email address to send the emails from. - - `html_templates`: An optional object to replace the default subject and template that the Resend Module uses. This is also useful to support custom emails in different Medusa application setups. -- `logger` property, which is an instance of Medusa's [Logger](https://docs.medusajs.com/docs/learn/debugging-and-testing/logging/index.html.md), to log messages. - -To send requests using the `resendClient`, you need to initialize it in the class's constructor. So, add the following constructor to `ResendNotificationProviderService`: - -```ts title="src/modules/resend/service.ts" -// ... - -type InjectedDependencies = { - logger: Logger -} - -class ResendNotificationProviderService extends AbstractNotificationProviderService { - // ... - constructor( - { logger }: InjectedDependencies, - options: ResendOptions - ) { - super() - this.resendClient = new Resend(options.api_key) - this.options = options - this.logger = logger - } -} -``` - -A module's service accepts two parameters: - -1. Dependencies resolved from the [Module's container](https://docs.medusajs.com/docs/learn/fundamentals/modules/container/index.html.md), which is the module's local registry that the Medusa application adds Framework tools to. In this service, you resolve the [Logger utility](https://docs.medusajs.com/docs/learn/debugging-and-testing/logging/index.html.md) from the module's container. -2. The module's options that are passed to the module in Medusa's configuration as you'll see in a later section. - -Using the API key passed in the module's options, you initialize the Resend client. You also set the `options` and `logger` properties. - -#### Validate Options Method - -A Notification Module Provider's service can implement a static `validateOptions` method that ensures the options passed to the module through Medusa's configurations are valid. - -So, add to the `ResendNotificationProviderService` the `validateOptions` method: - -```ts title="src/modules/resend/service.ts" -// other imports... -import { - // other imports... - MedusaError, -} from "@medusajs/framework/utils" - -// ... - -class ResendNotificationProviderService extends AbstractNotificationProviderService { - // ... - static validateOptions(options: Record) { - if (!options.api_key) { - throw new MedusaError( - MedusaError.Types.INVALID_DATA, - "Option `api_key` is required in the provider's options." - ) - } - if (!options.from) { - throw new MedusaError( - MedusaError.Types.INVALID_DATA, - "Option `from` is required in the provider's options." - ) - } - } -} -``` - -In the `validateOptions` method, you throw an error if the `api_key` or `from` options aren't passed to the module. To throw errors, you use `MedusaError` from the Modules SDK. This ensures errors follow Medusa's conventions and are displayed similar to Medusa's errors. - -#### Implement Template Methods - -Each email type has a different template and content. For example, order confirmation emails show the order's details, whereas customer confirmation emails show a greeting message to the customer. - -So, add two methods to the `ResendNotificationProviderService` class that retrieve the email template and subject of a specified template type: - -```ts title="src/modules/resend/service.ts" highlights={serviceHighlights2} -// imports and types... - -enum Templates { - ORDER_PLACED = "order-placed", -} - -const templates: {[key in Templates]?: (props: unknown) => React.ReactNode} = { - // TODO add templates -} - -class ResendNotificationProviderService extends AbstractNotificationProviderService { - // ... - getTemplate(template: Templates) { - if (this.options.html_templates?.[template]) { - return this.options.html_templates[template].content - } - const allowedTemplates = Object.keys(templates) - - if (!allowedTemplates.includes(template)) { - return null - } - - return templates[template] - } - - getTemplateSubject(template: Templates) { - if (this.options.html_templates?.[template]?.subject) { - return this.options.html_templates[template].subject - } - switch(template) { - case Templates.ORDER_PLACED: - return "Order Confirmation" - default: - return "New Email" - } - } -} -``` - -You first define a `Templates` enum, which holds the names of supported template types. You can add more template types to this enum later. You also define a `templates` variable that specifies the React template for each template type. You'll add templates to this variable later. - -In the `ResendNotificationProviderService` you add two methods: - -- `getTemplate`: Retrieve the template of a template type. If the `html_templates` option is set for the specified template type, you return its `content`'s value. Otherwise, you retrieve the template from the `templates` variable. -- `getTemplateSubject`: Retrieve the subject of a template type. If a `subject` is passed for the template type in the `html_templates`, you return its value. Otherwise, you return a subject based on the template type. - -You'll use these methods in the `send` method next. - -#### Implement Send Method - -In this section, you'll implement the `send` method of `ResendNotificationProviderService`. When you send a notification through the email channel later using the Notification Module, the Notification Module's service will use this `send` method under the hood to send the email with Resend. - -In the `send` method, you'll retrieve the template and subject of the email template, then send the email using the Resend client. - -Add the `send` method to the `ResendNotificationProviderService` class: - -```ts title="src/modules/resend/service.ts" highlights={serviceHighlights3} -// other imports... -import { - // ... - ProviderSendNotificationDTO, - ProviderSendNotificationResultsDTO, -} from "@medusajs/framework/types" -import { - // ... - CreateEmailOptions, -} from "resend" - -class ResendNotificationProviderService extends AbstractNotificationProviderService { - // ... - async send( - notification: ProviderSendNotificationDTO - ): Promise { - const template = this.getTemplate(notification.template as Templates) - - if (!template) { - this.logger.error(`Couldn't find an email template for ${notification.template}. The valid options are ${Object.values(Templates)}`) - return {} - } - - const emailOptions: CreateEmailOptions = { - from: this.options.from, - to: [notification.to], - subject: this.getTemplateSubject(notification.template as Templates), - html: "", - } - - if (typeof template === "string") { - emailOptions.html = template - } else { - emailOptions.react = template(notification.data) - delete emailOptions.html - } - - const { data, error } = await this.resendClient.emails.send(emailOptions) - - if (error) { - this.logger.error(`Failed to send email`, error) - return {} - } - - return { id: data.id } - } -} -``` - -The `send` method receives the notification details object as a parameter. Some of its properties include: - -- `to`: The address to send the notification to. -- `template`: The template type of the notification. -- `data`: The data useful for the email type. For example, when sending an order-confirmation email, `data` would hold the order's details. - -In the method, you retrieve the template and subject of the email using the methods you defined earlier. Then, you put together the data to pass to Resend, such as the email address to send the notification to and the email address to send from. Also, if the email's template is a string, it's passed as an HTML template. Otherwise, it's passed as a React template. - -Finally, you use the `emails.send` method of the Resend client to send the email. If an error occurs you log it in the terminal. Otherwise, you return the ID of the send email as received from Resend. Medusa uses this ID when creating the notification in its database. - -### Export Module Definition - -The `ResendNotificationProviderService` class now has the methods necessary to start sending emails. - -Next, you must export the module provider's definition, which lets Medusa know what module this provider belongs to and its service. - -Create the file `src/modules/resend/index.ts` with the following content: - -```ts title="src/modules/resend/index.ts" -import { - ModuleProvider, - Modules, -} from "@medusajs/framework/utils" -import ResendNotificationProviderService from "./service" - -export default ModuleProvider(Modules.NOTIFICATION, { - services: [ResendNotificationProviderService], -}) -``` - -You export the module provider's definition using `ModuleProvider` from the Modules SDK. It accepts as a first parameter the name of the module that this provider belongs to, which is the Notification Module. It also accepts as a second parameter an object having a `service` property indicating the provider's service. - -### Add Module to Configurations - -Finally, to register modules and module providers in Medusa, you must add them to Medusa's configurations. - -Medusa's configurations are set in the `medusa-config.ts` file, which is at the root directory of your Medusa application. The configuration object accepts a `modules` array, whose value is an array of modules to add to the application. - -Add the `modules` property to the exported configurations in `medusa-config.ts`: - -```ts title="medusa-config.ts" -module.exports = defineConfig({ - // ... - modules: [ - { - resolve: "@medusajs/medusa/notification", - options: { - providers: [ - { - resolve: "./src/modules/resend", - id: "resend", - options: { - channels: ["email"], - api_key: process.env.RESEND_API_KEY, - from: process.env.RESEND_FROM_EMAIL, - }, - }, - ], - }, - }, - ], -}) -``` - -In the `modules` array, you pass a module object having the following properties: - -- `resolve`: The NPM package of the Notification Module. Since the Resend Module is a Notification Module Provider, it'll be passed in the options of the Notification Module. -- `options`: An object of options to pass to the module. It has a `providers` property which is an array of module providers to register. Each module provider object has the following properties: - - `resolve`: The path to the module provider to register in the application. It can also be the name of an NPM package. - - `id`: A unique ID, which Medusa will use along with the `identifier` static property that you set earlier in the class to identify this module provider. - - `options`: An object of options to pass to the module provider. These are the options you expect and use in the module provider's service. You must also specify the `channels` option, which indicates the channels that this provider sends notifications through. - -Some of the module's options, such as the Resend API key, are set in environment variables. So, add the following environment variables to `.env`: - -```shell -RESEND_FROM_EMAIL=onboarding@resend.dev -RESEND_API_KEY= -``` - -Where: - -- `RESEND_FROM_EMAIL`: The email to send emails from. If you've configured the custom domain as explained in [Step 2](#step-2-prepare-resend-account), change this email to an email from your custom domain. Otherwise, you can use `onboarding@resend.dev` for development purposes. -- `RESEND_API_KEY` is the API key of your Resend account. To retrieve it: - - Go to API Keys in the sidebar. - - Click on the Create API Key button. - -![Click on the API keys in the sidebar, then click on the Create API Key button at the top right](https://res.cloudinary.com/dza7lstvk/image/upload/v1732535399/Medusa%20Resources/Screenshot_2024-11-25_at_10.22.25_AM_v4d09s.png) - -- In the form that opens, enter a name for the API key (for example, Medusa). You can keep its permissions to Full Access or change it to Sending Access. Once you're done, click Add. - -![The form to create an API key with fields for the API key's name, permissions, and domain](https://res.cloudinary.com/dza7lstvk/image/upload/v1732535464/Medusa%20Resources/Screenshot_2024-11-25_at_10.23.26_AM_g7gcuc.png) - -- A new pop-up will show with your API key hidden. Copy it before closing the pop-up, since you can't access the key again afterwards. Use its value for the `RESEND_API_KEY` environment variable. - -![Click the copy icon to copy the API key](https://res.cloudinary.com/dza7lstvk/image/upload/v1732535791/Medusa%20Resources/Screenshot_2024-11-25_at_10.23.43_AM_divins.png) - -Your Resend Module Provider is all set up. You'll test it out in a later section. - -*** - -## Step 5: Add Order Confirmation Template - -In this step, you'll add a React template for order confirmation emails. You'll create it using the [react-email](https://github.com/resend/react-email) package you installed earlier. You can follow the same steps for other email templates, such as for customer confirmation. - -Create the directory `src/modules/resend/emails` that will hold the email templates. Then, to add the template for order confirmation, create the file `src/modules/resend/emails/order-placed.tsx` with the following content: - -```tsx title="src/modules/resend/emails/order-placed.tsx" highlights={templateHighlights} -import { Text, Column, Container, Heading, Html, Img, Row, Section } from "@react-email/components" -import { BigNumberValue, OrderDTO } from "@medusajs/framework/types" - -type OrderPlacedEmailProps = { - order: OrderDTO -} - -function OrderPlacedEmailComponent({ order }: OrderPlacedEmailProps) { - const formatter = new Intl.NumberFormat([], { - style: "currency", - currencyDisplay: "narrowSymbol", - currency: order.currency_code, - }) - - const formatPrice = (price: BigNumberValue) => { - if (typeof price === "number") { - return formatter.format(price) - } - - if (typeof price === "string") { - return formatter.format(parseFloat(price)) - } - - return price?.toString() || "" - } - - return ( - - Thank you for your order - {order.email}'s Items - - {order.items.map((item) => { - return ( -
- - - {item.product_title} - - - - {item.product_title} - - {item.variant_title} - {formatPrice(item.total)} - - -
- ) - })} -
- - ) -} - -export const orderPlacedEmail = (props: OrderPlacedEmailProps) => ( - -) -``` - -You define the `OrderPlacedEmailComponent` which is a React email template that shows the order's details, such as items and their totals. The component accepts an `order` object as a prop. - -You also export an `orderPlacedEmail` function, which accepts props as an input and returns the `OrderPlacedEmailComponent` passing it the props. Because you can't use JSX syntax in `src/modules/resend/service.ts`, you'll import this function instead. - -Next, update the `templates` variable in `src/modules/resend/service.ts` to assign this template to the `order-placed` template type: - -```ts title="src/modules/resend/service.ts" -// other imports... -import { orderPlacedEmail } from "./emails/order-placed" - -const templates: {[key in Templates]?: (props: unknown) => React.ReactNode} = { - [Templates.ORDER_PLACED]: orderPlacedEmail, -} -``` - -The `ResendNotificationProviderService` will now use the `OrderPlacedEmailComponent` as the template of order confirmation emails. - -*** - -## Step 6: Send Email when Order is Placed - -Medusa has an event system that emits an event when a commerce operation is performed. You can then listen and handle that event in an asynchronous function called a subscriber. - -So, to send a confirmation email when a customer places an order, which is a commerce operation that Medusa already implements, you don't need to extend or hack your way into Medusa's implementation as you would do with other commerce platforms. - -Instead, you'll create a subscriber that listens to the `order.placed` event and sends an email when the event is emitted. - -Learn more about Medusa's event system in [this documentation](https://docs.medusajs.com/docs/learn/fundamentals/events-and-subscribers/index.html.md). - -### Send Order Confirmation Email Workflow - -To send the order confirmation email, you need to retrieve the order's details first, then use the Notification Module's service to send the email. To implement this flow, you'll create a workflow. - -A workflow is a series of queries and actions, called steps, that complete a task. You construct a workflow like you construct a function, but it's a special function that allows you to track its executions' progress, define roll-back logic, and configure other advanced features. Then, you execute the workflow from other customizations, such as in a subscriber. - -Learn more about workflows in [this documentation](https://docs.medusajs.com/docs/learn/fundamentals/workflows/index.html.md) - -#### Send Notification Step - -You'll start by implementing the step of the workflow that sends the notification. To do that, create the file `src/workflows/steps/send-notification.ts` with the following content: - -```ts title="src/workflows/steps/send-notification.ts" -import { Modules } from "@medusajs/framework/utils" -import { createStep, StepResponse } from "@medusajs/framework/workflows-sdk" -import { CreateNotificationDTO } from "@medusajs/framework/types" - -export const sendNotificationStep = createStep( - "send-notification", - async (data: CreateNotificationDTO[], { container }) => { - const notificationModuleService = container.resolve( - Modules.NOTIFICATION - ) - const notification = await notificationModuleService.createNotifications(data) - return new StepResponse(notification) - } -) -``` - -You define the `sendNotificationStep` using the `createStep` function that accepts two parameters: - -- A string indicating the step's unique name. -- The step's function definition as a second parameter. It accepts the step's input as a first parameter, and an object of options as a second. - -The `container` property in the second parameter is an instance of the [Medusa container](https://docs.medusajs.com/docs/learn/fundamentals/medusa-container/index.html.md), which is a registry of Framework and commerce tools, such as a module's service, that you can resolve to utilize their functionalities. - -The Medusa container is accessible by all customizations, such as workflows and subscribers, except for modules. Each module has its own container with Framework tools like the Logger utility. - -In the step function, you resolve the Notification Module's service, and use its `createNotifications` method, passing it the notification's data that the step receives as an input. - -The step returns an instance of `StepResponse`, which must be returned by any step. It accepts as a parameter the data to return to the workflow that executed this step. - -#### Workflow Implementation - -You'll now create the workflow that uses the `sendNotificationStep` to send the order confirmation email. - -Create the file `src/workflows/send-order-confirmation.ts` with the following content: - -```ts title="src/workflows/send-order-confirmation.ts" highlights={workflowHighlights} -import { - createWorkflow, - WorkflowResponse, -} from "@medusajs/framework/workflows-sdk" -import { useQueryGraphStep } from "@medusajs/medusa/core-flows" -import { sendNotificationStep } from "./steps/send-notification" - -type WorkflowInput = { - id: string -} - -export const sendOrderConfirmationWorkflow = createWorkflow( - "send-order-confirmation", - ({ id }: WorkflowInput) => { - // @ts-ignore - const { data: orders } = useQueryGraphStep({ - entity: "order", - fields: [ - "id", - "email", - "currency_code", - "total", - "items.*", - ], - filters: { - id, - }, - }) - - const notification = sendNotificationStep([{ - to: orders[0].email, - channel: "email", - template: "order-placed", - data: { - order: orders[0], - }, - }]) - - return new WorkflowResponse(notification) - } -) -``` - -You create a workflow using `createWorkflow` from the Workflows SDK. It accepts the workflow's unique name as a first parameter. - -It accepts as a second parameter a constructor function, which is the workflow's implementation. The workflow has the following steps: - -1. `useQueryGraphStep`, which is a step implemented by Medusa that uses [Query](https://docs.medusajs.com/docs/learn/fundamentals/module-links/query/index.html.md), a tool that allows you to retrieve data across modules. You use it to retrieve the order's details. -2. `sendNotificationStep` which is the step you implemented. You pass it an array with one object, which is the notification's details having following properties: - - `to`: The address to send the email to. You pass the customer's email that is stored in the order. - - `channel`: The channel to send the notification through, which is `email`. Since you specified `email` in the Resend Module Provider's `channel` option, the Notification Module will delegate the sending to the Resend Module Provider's service. - - `template`: The email's template type. You retrieve the template content in the `ResendNotificationProviderService`'s `send` method based on the template specified here. - - `data`: The data to pass to the email template, which is the order's details. - -A workflow's constructor function has some constraints in implementation. Learn more about them in [this documentation](https://docs.medusajs.com/docs/learn/fundamentals/workflows/constructor-constraints/index.html.md). - -You'll execute the workflow when you create the subscriber next. - -#### Add the Order Placed Subscriber - -Now that you have the workflow to send an order-confirmation email, you'll execute it in a subscriber that's executed whenever an order is placed. - -You create a subscriber in a TypeScript or JavaScript file under the `src/subscribers` directory. So, create the file `src/subscribers/order-placed.ts` with the following content: - -```ts title="src/subscribers/order-placed.ts" highlights={subscriberHighlights} -import type { - SubscriberArgs, - SubscriberConfig, -} from "@medusajs/framework" -import { sendOrderConfirmationWorkflow } from "../workflows/send-order-confirmation" - -export default async function orderPlacedHandler({ - event: { data }, - container, -}: SubscriberArgs<{ id: string }>) { - await sendOrderConfirmationWorkflow(container) - .run({ - input: { - id: data.id, - }, - }) -} - -export const config: SubscriberConfig = { - event: "order.placed", -} -``` - -A subscriber file exports: - -- An asynchronous function that's executed whenever the associated event is emitted, which is the `order.placed` event. -- A configuration object with an `event` property indicating the event the subscriber is listening to. - -The subscriber function accepts the event's details as a first paramter which has a `data` property that holds the data payload of the event. For example, Medusa emits the `order.placed` event with the order's ID in the data payload. The function also accepts as a second parameter the [Medusa container](https://docs.medusajs.com/docs/learn/fundamentals/medusa-container/index.html.md). - -In the function, you execute the `sendOrderConfirmationWorkflow` by invoking it, passing it the `container`, then using its `run` method. The `run` method accepts an object having an `input` property, which is the input to pass to the workflow. You pass the ID of the placed order as received in the event's data payload. - -This subscriber now runs whenever an order is placed. You'll see this in action in the next section. - -*** - -## Test it Out: Place an Order - -To test out the Resend integration, you'll place an order using the [Next.js storefront](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/nextjs-starter/index.html.md) that you installed as part of installing Medusa. - -Start your Medusa application first: - -```bash npm2yarn -npm run dev -``` - -Then, in the Next.js storefront's directory (which was installed in a directory outside of the Medusa application's directory with the name `{project-name}-storefront`, where `{project-name}` is the name of the Medusa application's directory), run the following command to start the storefront: - -```bash npm2yarn -npm run dev -``` - -Then, open the storefront in your browser at `http://localhost:8000` and: - -1. Go to Menu -> Store. - -![Choose Store from Menu](https://res.cloudinary.com/dza7lstvk/image/upload/v1732539139/Medusa%20Resources/Screenshot_2024-11-25_at_2.51.59_PM_fubiwj.png) - -2\. Click on a product, select its options, and add it to the cart. - -![Choose an option, such as size, then click on the Add to cart button](https://res.cloudinary.com/dza7lstvk/image/upload/v1732539227/Medusa%20Resources/Screenshot_2024-11-25_at_2.53.11_PM_iswcjy.png) - -3\. Click on Cart at the top right, then click Go to Cart. - -![Cart is at the top right. It opens a dropdown with a Go to Cart button](https://res.cloudinary.com/dza7lstvk/image/upload/v1732539354/Medusa%20Resources/Screenshot_2024-11-25_at_2.54.44_PM_b1pnlu.png) - -4\. On the cart's page, click on the "Go to checkout" button. - -![The Go to checkout button is at the right side of the page](https://res.cloudinary.com/dza7lstvk/image/upload/v1732539443/Medusa%20Resources/Screenshot_2024-11-25_at_2.56.27_PM_cvqshj.png) - -5\. On the checkout page, when entering the shipping address, make sure to set the email to your Resend account's email if you didn't set up a custom domain. - -![Enter your Resend account email if you didn't set up a custom domain](https://res.cloudinary.com/dza7lstvk/image/upload/v1732539536/Medusa%20Resources/Screenshot_2024-11-25_at_2.58.31_PM_wmlh60.png) - -6\. After entering the shipping address, choose a delivery and payment methods, then click the Place Order button. - -Once the order is placed, you'll find the following message logged in the Medusa application's terminal: - -```bash -info: Processing order.placed which has 1 subscribers -``` - -This indicates that the `order.placed` event was emitted and its subscriber, which you added in the previous step, is executed. - -If you check the inbox of the email address you specified in the shipping address, you'll find a new email with the order's details. - -![Example of order-confirmation email](https://res.cloudinary.com/dza7lstvk/image/upload/v1732551372/Medusa%20Resources/Screenshot_2024-11-25_at_6.15.59_PM_efyuoj.png) - -*** - -## Next Steps - -You've now integrated Medusa with Resend. You can add more templates for other emails, such as customer registration confirmation, user invites, and more. Check out the [Events Reference](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/events-reference/index.html.md) for a list of all events that the Medusa application emits. - -If you're new to Medusa, check out the [main documentation](https://docs.medusajs.com/docs/learn/index.html.md), where you'll get a more in-depth learning of all the concepts you've used in this guide and more. - -To learn more about the commerce features that Medusa provides, check out Medusa's [Commerce Modules](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/index.html.md). - - # Integrate Medusa with ShipStation (Fulfillment) In this guide, you'll learn how to integrate Medusa with ShipStation. @@ -48810,6 +47011,1054 @@ If you're new to Medusa, check out the [main documentation](https://docs.medusaj To learn more about the commerce features that Medusa provides, check out Medusa's [Commerce Modules](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/index.html.md). +# How to Build Magento Data Migration Plugin + +In this tutorial, you'll learn how to build a [plugin](https://docs.medusajs.com/docs/learn/fundamentals/plugins/index.html.md) that migrates data, such as products, from Magento to Medusa. + +Magento is known for its customization capabilities. However, its monolithic architecture imposes limitations on business requirements, often forcing development teams to implement hacky workarounds. Over time, these customizations become challenging to maintain, especially as the business scales, leading to increased technical debt and slower feature delivery. + +Medusa's modular architecture allows you to build a custom digital commerce platform that meets your business requirements without the limitations of a monolithic system. By migrating from Magento to Medusa, you can take advantage of Medusa's modern technology stack to build a scalable and flexible commerce platform that grows with your business. + +By following this tutorial, you'll create a Medusa plugin that migrates data from a Magento server to a Medusa application in minimal time. You can re-use this plugin across multiple Medusa applications, allowing you to adopt Medusa across your projects. + +## Summary + +### Prerequisites + + + +This tutorial will teach you how to: + +- Install and set up a Medusa application project. +- Install and set up a Medusa plugin. +- Implement a Magento Module in the plugin to connect to Magento's APIs and retrieve products. + - This guide will only focus on migrating product data from Magento to Medusa. You can extend the implementation to migrate other data, such as customers, orders, and more. +- Trigger data migration from Magento to Medusa in a scheduled job. + +You can follow this tutorial whether you're new to Medusa or an advanced Medusa developer. + +![Diagram showcasing the flow of migrating data from Magento to Medusa](https://res.cloudinary.com/dza7lstvk/image/upload/v1739360550/Medusa%20Resources/magento-summary_hsewci.jpg) + +[Example Repository](https://github.com/medusajs/examples/tree/main/migrate-from-magento): Find the full code of the guide in this repository. The repository also includes additional features, such as triggering migrations from the Medusa Admin dashboard. + +*** + +## Step 1: Install a Medusa Application + +You'll first install a Medusa application that exposes core commerce features through REST APIs. You'll later install the Magento plugin in this application to test it out. + +### Prerequisites + +- [Node.js v20+](https://nodejs.org/en/download) +- [Git CLI tool](https://git-scm.com/downloads) +- [PostgreSQL](https://www.postgresql.org/download/) + +Start by installing the Medusa application on your machine with the following command: + +```bash +npx create-medusa-app@latest +``` + +You'll be asked for the project's name. You can also optionally choose to install the [Next.js starter storefront](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/nextjs-starter/index.html.md). + +Afterward, the installation process will start, which will install the Medusa application in a directory with your project's name. If you chose to install the Next.js starter, it'll be installed in a separate directory with the `{project-name}-storefront` name. + +The Medusa application is composed of a headless Node.js server and an admin dashboard. The storefront is installed or custom-built separately and connects to the Medusa application through its REST endpoints, called [API routes](https://docs.medusajs.com/docs/learn/fundamentals/api-routes/index.html.md). Refer to the [Medusa Architecture](https://docs.medusajs.com/docs/learn/introduction/architecture/index.html.md) documentation to learn more. + +Once the installation finishes successfully, the Medusa Admin dashboard will open with a form to create a new user. Enter the user's credentials and submit the form. Afterward, you can log in with the new user and explore the dashboard. + +Check out the [troubleshooting guides](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/troubleshooting/create-medusa-app-errors/index.html.md) for help. + +*** + +## Step 2: Install a Medusa Plugin Project + +A plugin is a package of reusable Medusa customizations that you can install in any Medusa application. You can add in the plugin [API Routes](https://docs.medusajs.com/docs/learn/fundamentals/api-routes/index.html.md), [Workflows](https://docs.medusajs.com/docs/learn/fundamentals/workflows/index.html.md), and other customizations, as you'll see in this guide. Afterward, you can test it out locally in a Medusa application, then publish it to npm to install and use it in any Medusa application. + +Refer to the [Plugins](https://docs.medusajs.com/docs/learn/fundamentals/plugins/index.html.md) documentation to learn more about plugins. + +A Medusa plugin is set up in a different project, giving you the flexibility in building and publishing it, while providing you with the tools to test it out locally in a Medusa application. + +To create a new Medusa plugin project, run the following command in a directory different than that of the Medusa application: + +```bash npm2yarn +npx create-medusa-app@latest medusa-plugin-magento --plugin +``` + +Where `medusa-plugin-magento` is the name of the plugin's directory and the name set in the plugin's `package.json`. So, if you wish to publish it to NPM later under a different name, you can change it here in the command or later in `package.json`. + +Once the installation process is done, a new directory named `medusa-plugin-magento` will be created with the plugin project files. + +![Directory structure of a plugin project](https://res.cloudinary.com/dza7lstvk/image/upload/v1737019441/Medusa%20Book/project-dir_q4xtri.jpg) + +*** + +## Step 3: Set up Plugin in Medusa Application + +Before you start your development, you'll set up the plugin in the Medusa application you installed in the first step. This will allow you to test the plugin during your development process. + +In the plugin's directory, run the following command to publish the plugin to the local package registry: + +```bash title="Plugin project" +npx medusa plugin:publish +``` + +This command uses [Yalc](https://github.com/wclr/yalc) under the hood to publish the plugin to a local package registry. The plugin is published locally under the name you specified in `package.json`. + +Next, you'll install the plugin in the Medusa application from the local registry. + +If you've installed your Medusa project before v2.3.1, you must install [yalc](https://github.com/wclr/yalc) as a development dependency first. + +Run the following command in the Medusa application's directory to install the plugin: + +```bash title="Medusa application" +npx medusa plugin:add medusa-plugin-magento +``` + +This command installs the plugin in the Medusa application from the local package registry. + +Next, register the plugin in the `medusa-config.ts` file of the Medusa application: + +```ts title="medusa-config.ts" +module.exports = defineConfig({ + // ... + plugins: [ + { + resolve: "medusa-plugin-magento", + options: { + // TODO add options + }, + }, + ], +}) +``` + +You add the plugin to the array of plugins. Later, you'll pass options useful to retrieve data from Magento. + +Finally, to ensure your plugin's changes are constantly published to the local registry, simplifying your testing process, keep the following command running in the plugin project during development: + +```bash title="Plugin project" +npx medusa plugin:develop +``` + +*** + +## Step 4: Implement Magento Module + +To connect to external applications in Medusa, you create a custom module. A module is a reusable package with functionalities related to a single feature or domain. Medusa integrates the module into your application without implications or side effects on your setup. + +In this step, you'll create a Magento Module in the Magento plugin that connects to a Magento server's REST APIs and retrieves data, such as products. + +Refer to the [Modules](https://docs.medusajs.com/docs/learn/fundamentals/modules/index.html.md) documentation to learn more about modules. + +### Create Module Directory + +A module is created under the `src/modules` directory of your plugin. So, create the directory `src/modules/magento`. + +![Diagram showcasing the module directory to create](https://res.cloudinary.com/dza7lstvk/image/upload/v1739272368/magento-1_ikev4x.jpg) + +### Create Module's Service + +You define a module's functionalities in a service. A service is a TypeScript or JavaScript class that the module exports. In the service's methods, you can connect to external systems or the database, which is useful if your module defines tables in the database. + +In this section, you'll create the Magento Module's service that connects to Magento's REST APIs and retrieves data. + +Start by creating the file `src/modules/magento/service.ts` in the plugin with the following content: + +![Diagram showcasing the service file to create](https://res.cloudinary.com/dza7lstvk/image/upload/v1739272483/magento-2_ajetpr.jpg) + +```ts title="src/modules/magento/service.ts" +type Options = { + baseUrl: string + storeCode?: string + username: string + password: string + migrationOptions?: { + imageBaseUrl?: string + } +} + +export default class MagentoModuleService { + private options: Options + + constructor({}, options: Options) { + this.options = { + ...options, + storeCode: options.storeCode || "default", + } + } +} +``` + +You create a `MagentoModuleService` that has an `options` property to store the module's options. These options include: + +- `baseUrl`: The base URL of the Magento server. +- `storeCode`: The store code of the Magento store, which is `default` by default. +- `username`: The username of a Magento admin user to authenticate with the Magento server. +- `password`: The password of the Magento admin user. +- `migrationOptions`: Additional options useful for migrating data, such as the base URL to use for product images. + +The service's constructor accepts as a first parameter the [Module Container](https://docs.medusajs.com/docs/learn/fundamentals/modules/container/index.html.md), which allows you to access resources available for the module. As a second parameter, it accepts the module's options. + +### Add Authentication Logic + +To authenticate with the Magento server, you'll add a method to the service that retrieves an access token from Magento using the username and password in the options. This access token is used in subsequent requests to the Magento server. + +First, add the following property to the `MagentoModuleService` class: + +```ts title="src/modules/magento/service.ts" +export default class MagentoModuleService { + private accessToken: { + token: string + expiresAt: Date + } + // ... +} +``` + +You add an `accessToken` property to store the access token and its expiration date. The access token Magento returns expires after four hours, so you store the expiration date to know when to refresh the token. + +Next, add the following `authenticate` method to the `MagentoModuleService` class: + +```ts title="src/modules/magento/service.ts" +import { MedusaError } from "@medusajs/framework/utils" + +export default class MagentoModuleService { + // ... + async authenticate() { + const response = await fetch(`${this.options.baseUrl}/rest/${this.options.storeCode}/V1/integration/admin/token`, { + method: "POST", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify({ username: this.options.username, password: this.options.password }), + }) + + const token = await response.text() + + if (!response.ok) { + throw new MedusaError(MedusaError.Types.UNAUTHORIZED, `Failed to authenticate with Magento: ${token}`) + } + + this.accessToken = { + token: token.replaceAll("\"", ""), + expiresAt: new Date(Date.now() + 4 * 60 * 60 * 1000), // 4 hours in milliseconds + } + } +} +``` + +You create an `authenticate` method that sends a POST request to the Magento server's `/rest/{storeCode}/V1/integration/admin/token` endpoint, passing the username and password in the request body. + +If the request is successful, you store the access token and its expiration date in the `accessToken` property. If the request fails, you throw a `MedusaError` with the error message returned by Magento. + +Lastly, add an `isAccessTokenExpired` method that checks if the access token has expired: + +```ts title="src/modules/magento/service.ts" +export default class MagentoModuleService { + // ... + async isAccessTokenExpired(): Promise { + return !this.accessToken || this.accessToken.expiresAt < new Date() + } +} +``` + +In the `isAccessTokenExpired` method, you return a boolean indicating whether the access token has expired. You'll use this in later methods to check if you need to refresh the access token. + +### Retrieve Products from Magento + +Next, you'll add a method that retrieves products from Magento. Due to limitations in Magento's API that makes it difficult to differentiate between simple products that don't belong to a configurable product and those that do, you'll only retrieve configurable products and their children. You'll also retrieve the configurable attributes of the product, such as color and size. + +First, you'll add some types to represent a Magento product and its attributes. Create the file `src/modules/magento/types.ts` in the plugin with the following content: + +![Diagram showcasing the types file to create](https://res.cloudinary.com/dza7lstvk/image/upload/v1739346287/Medusa%20Resources/magento-3_fpghog.jpg) + +```ts title="src/modules/magento/types.ts" +export type MagentoProduct = { + id: number + sku: string + name: string + price: number + status: number + // not handling other types + type_id: "simple" | "configurable" + created_at: string + updated_at: string + extension_attributes: { + category_links: { + category_id: string + }[] + configurable_product_links?: number[] + configurable_product_options?: { + id: number + attribute_id: string + label: string + position: number + values: { + value_index: number + }[] + }[] + } + media_gallery_entries: { + id: number + media_type: string + label: string + position: number + disabled: boolean + types: string[] + file: string + }[] + custom_attributes: { + attribute_code: string + value: string + }[] + // added by module + children?: MagentoProduct[] +} + +export type MagentoAttribute = { + attribute_code: string + attribute_id: number + default_frontend_label: string + options: { + label: string + value: string + }[] +} + +export type MagentoPagination = { + search_criteria: { + filter_groups: [], + page_size: number + current_page: number + } + total_count: number +} + +export type MagentoPaginatedResponse = { + items: TData[] +} & MagentoPagination +``` + +You define the following types: + +- `MagentoProduct`: Represents a product in Magento. +- `MagentoAttribute`: Represents an attribute in Magento. +- `MagentoPagination`: Represents the pagination information returned by Magento's API. +- `MagentoPaginatedResponse`: Represents a paginated response from Magento's API for a specific item type, such as products. + +Next, add the `getProducts` method to the `MagentoModuleService` class: + +```ts title="src/modules/magento/service.ts" +export default class MagentoModuleService { + // ... + async getProducts(options?: { + currentPage?: number + pageSize?: number + }): Promise<{ + products: MagentoProduct[] + attributes: MagentoAttribute[] + pagination: MagentoPagination + }> { + const { currentPage = 1, pageSize = 100 } = options || {} + const getAccessToken = await this.isAccessTokenExpired() + if (getAccessToken) { + await this.authenticate() + } + + // TODO prepare query params + } +} +``` + +The `getProducts` method receives an optional `options` object with the `currentPage` and `pageSize` properties. So far, you check if the access token has expired and, if so, retrieve a new one using the `authenticate` method. + +Next, you'll prepare the query parameters to pass in the request that retrieves products. Replace the `TODO` with the following: + +```ts title="src/modules/magento/service.ts" +const searchQuery = new URLSearchParams() +// pass pagination parameters +searchQuery.append( + "searchCriteria[currentPage]", + currentPage?.toString() || "1" +) +searchQuery.append( + "searchCriteria[pageSize]", + pageSize?.toString() || "100" +) + +// retrieve only configurable products +searchQuery.append( + "searchCriteria[filter_groups][1][filters][0][field]", + "type_id" +) +searchQuery.append( + "searchCriteria[filter_groups][1][filters][0][value]", + "configurable" +) +searchQuery.append( + "searchCriteria[filter_groups][1][filters][0][condition_type]", + "in" +) + +// TODO send request to retrieve products +``` + +You create a `searchQuery` object to store the query parameters to pass in the request. Then, you add the pagination parameters and the filter to retrieve only configurable products. + +Next, you'll send the request to retrieve products from Magento. Replace the `TODO` with the following: + +```ts title="src/modules/magento/service.ts" +const { items: products, ...pagination }: MagentoPaginatedResponse = await fetch( + `${this.options.baseUrl}/rest/${this.options.storeCode}/V1/products?${searchQuery}`, + { + headers: { + "Authorization": `Bearer ${this.accessToken.token}`, + }, + } +).then((res) => res.json()) +.catch((err) => { + console.log(err) + throw new MedusaError( + MedusaError.Types.INVALID_DATA, + `Failed to get products from Magento: ${err.message}` + ) +}) + +// TODO prepare products +``` + +You send a `GET` request to the Magento server's `/rest/{storeCode}/V1/products` endpoint, passing the query parameters in the URL. You also pass the access token in the `Authorization` header. + +Next, you'll prepare the retrieved products by retrieving their children, configurable attributes, and modifying their image URLs. Replace the `TODO` with the following: + +```ts title="src/modules/magento/service.ts" +const attributeIds: string[] = [] + +await promiseAll( + products.map(async (product) => { + // retrieve its children + product.children = await fetch( + `${this.options.baseUrl}/rest/${this.options.storeCode}/V1/configurable-products/${product.sku}/children`, + { + headers: { + "Authorization": `Bearer ${this.accessToken.token}`, + }, + } + ).then((res) => res.json()) + .catch((err) => { + throw new MedusaError( + MedusaError.Types.INVALID_DATA, + `Failed to get product children from Magento: ${err.message}` + ) + }) + + product.media_gallery_entries = product.media_gallery_entries.map( + (entry) => ({ + ...entry, + file: `${this.options.migrationOptions?.imageBaseUrl}${entry.file}`, + } + )) + + attributeIds.push(...( + product.extension_attributes.configurable_product_options?.map( + (option) => option.attribute_id) || [] + ) + ) + }) +) + +// TODO retrieve attributes +``` + +You loop over the retrieved products and retrieve their children using the `/rest/{storeCode}/V1/configurable-products/{sku}/children` endpoint. You also modify the image URLs to use the base URL in the migration options, if provided. + +In addition, you store the IDs of the configurable products' attributes in the `attributeIds` array. You'll add a method that retrieves these attributes. + +Add the new method `getAttributes` to the `MagentoModuleService` class: + +```ts title="src/modules/magento/service.ts" +export default class MagentoModuleService { + // ... + async getAttributes({ + ids, + }: { + ids: string[] + }): Promise { + const getAccessToken = await this.isAccessTokenExpired() + if (getAccessToken) { + await this.authenticate() + } + + // filter by attribute IDs + const searchQuery = new URLSearchParams() + searchQuery.append( + "searchCriteria[filter_groups][0][filters][0][field]", + "attribute_id" + ) + searchQuery.append( + "searchCriteria[filter_groups][0][filters][0][value]", + ids.join(",") + ) + searchQuery.append( + "searchCriteria[filter_groups][0][filters][0][condition_type]", + "in" + ) + + const { + items: attributes, + }: MagentoPaginatedResponse = await fetch( + `${this.options.baseUrl}/rest/${this.options.storeCode}/V1/products/attributes?${searchQuery}`, + { + headers: { + "Authorization": `Bearer ${this.accessToken.token}`, + }, + } + ).then((res) => res.json()) + .catch((err) => { + throw new MedusaError( + MedusaError.Types.INVALID_DATA, + `Failed to get attributes from Magento: ${err.message}` + ) + }) + + return attributes + } +} +``` + +The `getAttributes` method receives an object with the `ids` property, which is an array of attribute IDs. You check if the access token has expired and, if so, retrieve a new one using the `authenticate` method. + +Next, you prepare the query parameters to pass in the request to retrieve attributes. You send a `GET` request to the Magento server's `/rest/{storeCode}/V1/products/attributes` endpoint, passing the query parameters in the URL. You also pass the access token in the `Authorization` header. + +Finally, you return the retrieved attributes. + +Now, go back to the `getProducts` method and replace the `TODO` with the following: + +```ts title="src/modules/magento/service.ts" +const attributes = await this.getAttributes({ ids: attributeIds }) + +return { products, attributes, pagination } +``` + +You retrieve the configurable products' attributes using the `getAttributes` method and return the products, attributes, and pagination information. + +You'll use this method in a later step to retrieve products from Magento. + +### Export Module Definition + +The final piece to a module is its definition, which you export in an `index.ts` file at its root directory. This definition tells Medusa the name of the module and its service. + +So, create the file `src/modules/magento/index.ts` with the following content: + +![Diagram showcasing the module definition file to create](https://res.cloudinary.com/dza7lstvk/image/upload/v1739348316/Medusa%20Resources/magento-4_bmepvh.jpg) + +```ts title="src/modules/magento/index.ts" +import { Module } from "@medusajs/framework/utils" +import MagentoModuleService from "./service" + +export const MAGENTO_MODULE = "magento" + +export default Module(MAGENTO_MODULE, { + service: MagentoModuleService, +}) +``` + +You use the `Module` function from the Modules SDK to create the module's definition. It accepts two parameters: + +1. The module's name, which is `magento`. +2. An object with a required property `service` indicating the module's service. + +You'll later use the module's service to retrieve products from Magento. + +### Pass Options to Plugin + +As mentioned earlier when you registered the plugin in the Medusa Application's `medusa-config.ts` file, you can pass options to the plugin. These options are then passed to the modules in the plugin. + +So, add the following options to the plugin's registration in the `medusa-config.ts` file of the Medusa application: + +```ts title="medusa-config.ts" +module.exports = defineConfig({ + // ... + plugins: [ + { + resolve: "medusa-plugin-magento", + options: { + baseUrl: process.env.MAGENTO_BASE_URL, + username: process.env.MAGENTO_USERNAME, + password: process.env.MAGENTO_PASSWORD, + migrationOptions: { + imageBaseUrl: process.env.MAGENTO_IMAGE_BASE_URL, + }, + }, + }, + ], +}) +``` + +You pass the options that you defined in the `MagentoModuleService`. Make sure to also set their environment variables in the `.env` file: + +```bash +MAGENTO_BASE_URL=https://magento.example.com +MAGENTO_USERNAME=admin +MAGENTO_PASSWORD=password +MAGENTO_IMAGE_BASE_URL=https://magento.example.com/pub/media/catalog/product +``` + +Where: + +- `MAGENTO_BASE_URL`: The base URL of the Magento server. It can also be a local URL, such as `http://localhost:8080`. +- `MAGENTO_USERNAME`: The username of a Magento admin user to authenticate with the Magento server. +- `MAGENTO_PASSWORD`: The password of the Magento admin user. +- `MAGENTO_IMAGE_BASE_URL`: The base URL to use for product images. Magento stores product images in the `pub/media/catalog/product` directory, so you can reference them directly or use a CDN URL. If the URLs of product images in the Medusa server already have a different base URL, you can omit this option. + +Medusa supports integrating third-party services, such as [S3](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/infrastructure-modules/file/s3/index.html.md), in a File Module Provider. Refer to the [File Module](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/infrastructure-modules/file/index.html.md) documentation to find other module providers and how to create a custom provider. + +You can now use the Magento Module to migrate data, which you'll do in the next steps. + +*** + +## Step 5: Build Product Migration Workflow + +In this section, you'll add the feature to migrate products from Magento to Medusa. To implement this feature, you'll use a workflow. + +A workflow is a series of queries and actions, called steps, that complete a task. You construct a workflow like you construct a function, but it's a special function that allows you to track its executions' progress, define roll-back logic, and configure other advanced features. Then, you execute the workflow from other customizations, such as in an API route or a scheduled job. + +By implementing the migration feature in a workflow, you ensure that the data remains consistent and that the migration process can be rolled back if an error occurs. + +Refer to the [Workflows](https://docs.medusajs.com/docs/learn/fundamentals/workflows/index.html.md) documentation to learn more about workflows. + +### Workflow Steps + +The workflow you'll create will have the following steps: + +- [getMagentoProductsStep](#getMagentoProductsStep): Retrieve products from Magento using the Magento Module. +- [useQueryGraphStep](https://docs.medusajs.com/references/helper-steps/useQueryGraphStep/index.html.md): Retrieve Medusa store details, which you'll need when creating the products. +- [useQueryGraphStep](https://docs.medusajs.com/references/helper-steps/useQueryGraphStep/index.html.md): Retrieve a shipping profile, which you'll associate the created products with. +- [useQueryGraphStep](https://docs.medusajs.com/references/helper-steps/useQueryGraphStep/index.html.md): Retrieve Magento products that are already in Medusa to update them, instead of creating them. +- [createProductsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createProductsWorkflow/index.html.md): Create products in the Medusa application. +- [updateProductsWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateProductsWorkflow/index.html.md): Update existing products in the Medusa application. + +You only need to implement the `getMagentoProductsStep` step, which retrieves the products from Magento. The other steps and workflows are provided by Medusa's `@medusajs/medusa/core-flows` package. + +### getMagentoProductsStep + +The first step of the workflow retrieves and returns the products from Magento. + +In your plugin, create the file `src/workflows/steps/get-magento-products.ts` with the following content: + +![Diagram showcasing the get-magento-products file to create](https://res.cloudinary.com/dza7lstvk/image/upload/v1739349590/Medusa%20Resources/magento-5_ueb4wn.jpg) + +```ts title="src/workflows/steps/get-magento-products.ts" +import { createStep, StepResponse } from "@medusajs/framework/workflows-sdk" +import { MAGENTO_MODULE } from "../../modules/magento" +import MagentoModuleService from "../../modules/magento/service" + +type GetMagentoProductsInput = { + currentPage: number + pageSize: number +} + +export const getMagentoProductsStep = createStep( + "get-magento-products", + async ({ currentPage, pageSize }: GetMagentoProductsInput, { container }) => { + const magentoModuleService: MagentoModuleService = + container.resolve(MAGENTO_MODULE) + + const response = await magentoModuleService.getProducts({ + currentPage, + pageSize, + }) + + return new StepResponse(response) + } +) +``` + +You create a step using `createStep` from the Workflows SDK. It accepts two parameters: + +1. The step's name, which is `get-magento-products`. +2. An async function that executes the step's logic. The function receives two parameters: + - The input data for the step, which in this case is the pagination parameters. + - An object holding the workflow's context, including the [Medusa Container](https://docs.medusajs.com/docslearn/fundamentals/medusa-container/index.html.md) that allows you to resolve Framework and commerce tools. + +In the step function, you resolve the Magento Module's service from the container, then use its `getProducts` method to retrieve the products from Magento. + +Steps that return data must return them in a `StepResponse` instance. The `StepResponse` constructor accepts as a parameter the data to return. + +### Create migrateProductsFromMagentoWorkflow + +You'll now create the workflow that migrates products from Magento using the step you created and steps from Medusa's `@medusajs/medusa/core-flows` package. + +In your plugin, create the file `src/workflows/migrate-products-from-magento.ts` with the following content: + +![Diagram showcasing the migrate-products-from-magento file to create](https://res.cloudinary.com/dza7lstvk/image/upload/v1739349820/Medusa%20Resources/magento-6_jjdaxj.jpg) + +```ts title="src/workflows/migrate-products-from-magento.ts" +import { + createWorkflow, transform, WorkflowResponse, +} from "@medusajs/framework/workflows-sdk" +import { + CreateProductWorkflowInputDTO, UpsertProductDTO, +} from "@medusajs/framework/types" +import { + createProductsWorkflow, + updateProductsWorkflow, + useQueryGraphStep, +} from "@medusajs/medusa/core-flows" +import { getMagentoProductsStep } from "./steps/get-magento-products" + +type MigrateProductsFromMagentoWorkflowInput = { + currentPage: number + pageSize: number +} + +export const migrateProductsFromMagentoWorkflowId = + "migrate-products-from-magento" + +export const migrateProductsFromMagentoWorkflow = createWorkflow( + { + name: migrateProductsFromMagentoWorkflowId, + retentionTime: 10000, + store: true, + }, + (input: MigrateProductsFromMagentoWorkflowInput) => { + const { pagination, products, attributes } = getMagentoProductsStep( + input + ) + // TODO prepare data to create and update products + } +) +``` + +You create a workflow using `createWorkflow` from the Workflows SDK. It accepts two parameters: + +1. An object with the workflow's configuration, including the name and whether to store the workflow's executions. You enable storing the workflow execution so that you can view it later in the Medusa Admin dashboard. +2. A worflow constructor function, which holds the workflow's implementation. The function receives the input data for the workflow, which is the pagination parameters. + +In the workflow constructor function, you use the `getMagentoProductsStep` step to retrieve the products from Magento, passing it the pagination parameters from the workflow's input. + +Next, you'll retrieve the Medusa store details and shipping profiles. These are necessary to prepare the data of the products to create or update. + +Replace the `TODO` in the workflow function with the following: + +```ts title="src/workflows/migrate-products-from-magento.ts" +const { data: stores } = useQueryGraphStep({ + entity: "store", + fields: ["supported_currencies.*", "default_sales_channel_id"], + pagination: { + take: 1, + skip: 0, + }, +}) + +const { data: shippingProfiles } = useQueryGraphStep({ + entity: "shipping_profile", + fields: ["id"], + pagination: { + take: 1, + skip: 0, + }, +}).config({ name: "get-shipping-profiles" }) + +// TODO retrieve existing products +``` + +You use the `useQueryGraphStep` step to retrieve the store details and shipping profiles. `useQueryGraphStep` is a Medusa step that wraps [Query](https://docs.medusajs.com/docs/learn/fundamentals/module-links/query/index.html.md), allowing you to use it in a workflow. Query is a tool that retrieves data across modules. + +Whe retrieving the store details, you specifically retrieve its supported currencies and default sales channel ID. You'll associate the products with the store's default sales channel, and set their variant prices in the supported currencies. You'll also associate the products with a shipping profile. + +Next, you'll retrieve products that were previously migrated from Magento to determine which products to create or update. Replace the `TODO` with the following: + +```ts title="src/workflows/migrate-products-from-magento.ts" +const externalIdFilters = transform({ + products, +}, (data) => { + return data.products.map((product) => product.id.toString()) +}) + +const { data: existingProducts } = useQueryGraphStep({ + entity: "product", + fields: ["id", "external_id", "variants.id", "variants.metadata"], + filters: { + external_id: externalIdFilters, + }, +}).config({ name: "get-existing-products" }) + +// TODO prepare products to create or update +``` + +Since the Medusa application creates an internal representation of the workflow's constructor function, you can't manipulate data directly, as variables have no value while creating the internal representation. + +Refer to the [Workflows](https://docs.medusajs.com/docs/learn/fundamentals/workflows/constructor-constraints/index.html.md) documentation to learn more about the workflow constructor function's constraints. + +Instead, you can manipulate data in a workflow's constructor function using `transform` from the Workflows SDK. `transform` is a function that accepts two parameters: + +- The data to transform, which in this case is the Magento products. +- A function that transforms the data. The function receives the data passed in the first parameter and returns the transformed data. + +In the transformation function, you return the IDs of the Magento products. Then, you use the `useQueryGraphStep` to retrieve products in the Medusa application that have an `external_id` property matching the IDs of the Magento products. You'll use this property to store the IDs of the products in Magento. + +Next, you'll prepare the data to create and update the products. Replace the `TODO` in the workflow function with the following: + +```ts title="src/workflows/migrate-products-from-magento.ts" highlights={prepareHighlights} +const { + productsToCreate, + productsToUpdate, +} = transform({ + products, + attributes, + stores, + shippingProfiles, + existingProducts, +}, (data) => { + const productsToCreate = new Map() + const productsToUpdate = new Map() + + data.products.forEach((magentoProduct) => { + const productData: CreateProductWorkflowInputDTO | UpsertProductDTO = { + title: magentoProduct.name, + description: magentoProduct.custom_attributes.find( + (attr) => attr.attribute_code === "description" + )?.value, + status: magentoProduct.status === 1 ? "published" : "draft", + handle: magentoProduct.custom_attributes.find( + (attr) => attr.attribute_code === "url_key" + )?.value, + external_id: magentoProduct.id.toString(), + thumbnail: magentoProduct.media_gallery_entries.find( + (entry) => entry.types.includes("thumbnail") + )?.file, + sales_channels: [{ + id: data.stores[0].default_sales_channel_id, + }], + shipping_profile_id: data.shippingProfiles[0].id, + } + const existingProduct = data.existingProducts.find((p) => p.external_id === productData.external_id) + + if (existingProduct) { + productData.id = existingProduct.id + } + + productData.options = magentoProduct.extension_attributes.configurable_product_options?.map((option) => { + const attribute = data.attributes.find((attr) => attr.attribute_id === parseInt(option.attribute_id)) + return { + title: option.label, + values: attribute?.options.filter((opt) => { + return option.values.find((v) => v.value_index === parseInt(opt.value)) + }).map((opt) => opt.label) || [], + } + }) || [] + + productData.variants = magentoProduct.children?.map((child) => { + const childOptions: Record = {} + + child.custom_attributes.forEach((attr) => { + const attrData = data.attributes.find((a) => a.attribute_code === attr.attribute_code) + if (!attrData) { + return + } + + childOptions[attrData.default_frontend_label] = attrData.options.find((opt) => opt.value === attr.value)?.label || "" + }) + + const variantExternalId = child.id.toString() + const existingVariant = existingProduct.variants.find((v) => v.metadata.external_id === variantExternalId) + + return { + title: child.name, + sku: child.sku, + options: childOptions, + prices: data.stores[0].supported_currencies.map(({ currency_code }) => { + return { + amount: child.price, + currency_code, + } + }), + metadata: { + external_id: variantExternalId, + }, + id: existingVariant?.id, + } + }) + + productData.images = magentoProduct.media_gallery_entries.filter((entry) => !entry.types.includes("thumbnail")).map((entry) => { + return { + url: entry.file, + metadata: { + external_id: entry.id.toString(), + }, + } + }) + + if (productData.id) { + productsToUpdate.set(existingProduct.id, productData) + } else { + productsToCreate.set(productData.external_id!, productData) + } + }) + + return { + productsToCreate: Array.from(productsToCreate.values()), + productsToUpdate: Array.from(productsToUpdate.values()), + } +}) + +// TODO create and update products +``` + +You use `transform` again to prepare the data to create and update the products in the Medusa application. For each Magento product, you map its equivalent Medusa product's data: + +- You set the product's general details, such as the title, description, status, handle, external ID, and thumbnail using the Magento product's data and custom attributes. +- You associate the product with the default sales channel and shipping profile retrieved previously. +- You map the Magento product's configurable product options to Medusa product options. In Medusa, a product's option has a label, such as "Color", and values, such as "Red". To map the option values, you use the attributes retrieved from Magento. +- You map the Magento product's children to Medusa product variants. For the variant options, you pass an object whose keys is the option's label, such as "Color", and values is the option's value, such as "Red". For the prices, you set the variant's price based on the Magento child's price for every supported currency in the Medusa store. Also, you set the Magento child product's ID in the Medusa variant's `metadata.external_id` property. +- You map the Magento product's media gallery entries to Medusa product images. You filter out the thumbnail image and set the URL and the Magento image's ID in the Medusa image's `metadata.external_id` property. + +In addition, you use the existing products retrieved in the previous step to determine whether a product should be created or updated. If there's an existing product whose `external_id` matches the ID of the magento product, you set the existing product's ID in the `id` property of the product to be updated. You also do the same for its variants. + +Finally, you return the products to create and update. + +The last steps of the workflow is to create and update the products. Replace the `TODO` in the workflow function with the following: + +```ts title="src/workflows/migrate-products-from-magento.ts" +createProductsWorkflow.runAsStep({ + input: { + products: productsToCreate, + }, +}) + +updateProductsWorkflow.runAsStep({ + input: { + products: productsToUpdate, + }, +}) + +return new WorkflowResponse(pagination) +``` + +You use the `createProductsWorkflow` and `updateProductsWorkflow` workflows from Medusa's `@medusajs/medusa/core-flows` package to create and update the products in the Medusa application. + +Workflows must return an instance of `WorkflowResponse`, passing as a parameter the data to return to the workflow's executor. This workflow returns the pagination parameters, allowing you to paginate the product migration process. + +You can now use this workflow to migrate products from Magento to Medusa. You'll learn how to use it in the next steps. + +*** + +## Step 6: Schedule Product Migration + +There are many ways to execute tasks asynchronously in Medusa, such as [scheduling a job](https://docs.medusajs.com/docs/learn/fundamentals/scheduled-jobs/index.html.md) or [handling emitted events](https://docs.medusajs.com/docs/learn/fundamentals/events-and-subscribers/index.html.md). + +In this guide, you'll learn how to schedule the product migration at a specified interval using a scheduled job. A scheduled job is an asynchronous function that the Medusa application runs at the interval you specify during the Medusa application's runtime. + +Refer to the [Scheduled Jobs](https://docs.medusajs.com/docs/learn/fundamentals/scheduled-jobs/index.html.md) documentation to learn more about scheduled jobs. + +To create a scheduled job, in your plugin, create the file `src/jobs/migrate-magento.ts` with the following content: + +![Diagram showcasing the migrate-magento file to create](https://res.cloudinary.com/dza7lstvk/image/upload/v1739358924/Medusa%20Resources/magento-7_rqoodo.jpg) + +```ts title="src/jobs/migrate-magento.ts" +import { MedusaContainer } from "@medusajs/framework/types" +import { migrateProductsFromMagentoWorkflow } from "../workflows" + +export default async function migrateMagentoJob( + container: MedusaContainer +) { + const logger = container.resolve("logger") + logger.info("Migrating products from Magento...") + + let currentPage = 0 + const pageSize = 100 + let totalCount = 0 + + do { + currentPage++ + + const { + result: pagination, + } = await migrateProductsFromMagentoWorkflow(container).run({ + input: { + currentPage, + pageSize, + }, + }) + + totalCount = pagination.total_count + } while (currentPage * pageSize < totalCount) + + logger.info("Finished migrating products from Magento") +} + +export const config = { + name: "migrate-magento-job", + schedule: "0 0 * * *", +} +``` + +A scheduled job file must export: + +- An asynchronous function that executes the job's logic. The function receives the [Medusa container](https://docs.medusajs.com/docs/learn/fundamentals/medusa-container/index.html.md) as a parameter. +- An object with the job's configuration, including the name and the schedule. The schedule is a cron job pattern as a string. + +In the job function, you resolve the [logger](https://docs.medusajs.com/docs/learn/debugging-and-testing/logging/index.html.md) from the container to log messages. Then, you paginate the product migration process by running the `migrateProductsFromMagentoWorkflow` workflow at each page until you've migrated all products. You use the pagination result returned by the workflow to determine whether there are more products to migrate. + +Based on the job's configurations, the Medusa application will run the job at midnight every day. + +### Test it Out + +To test out this scheduled job, first, change the configuration to run the job every minute: + +```ts title="src/jobs/migrate-magento.ts" +export const config = { + // ... + schedule: "* * * * *", +} +``` + +Then, make sure to run the `plugin:develop` command in the plugin if you haven't already: + +```bash +npx medusa plugin:develop +``` + +This ensures that the plugin's latest changes are reflected in the Medusa application. + +Finally, start the Medusa application that the plugin is installed in: + +```bash npm2yarn +npm run dev +``` + +After a minute, you'll see a message in the terminal indicating that the migration started: + +```plain title="Terminal" +info: Migrating products from Magento... +``` + +Once the migration is done, you'll see the following message: + +```plain title="Terminal" +info: Finished migrating products from Magento +``` + +To confirm that the products were migrated, open the Medusa Admin dashboard at `http://localhost:9000/app` and log in. Then, click on Products in the sidebar. You'll see your magento products in the list of products. + +![Click on products at the sidebar on the right, then view the products in the table in the middle.](https://res.cloudinary.com/dza7lstvk/image/upload/v1739359394/Medusa%20Resources/Screenshot_2025-02-12_at_1.22.44_PM_uva98i.png) + +*** + +## Next Steps + +You've now implemented the logic to migrate products from Magento to Medusa. You can re-use the plugin across Medusa applications. You can also expand on the plugin to: + +- Migrate other entities, such as orders, customers, and categories. Migrating other entities follows the same pattern as migrating products, using workflows and scheduled jobs. You only need to format the data to be migrated as needed. +- Allow triggering migrations from the Medusa Admin dashboard using [Admin Customizations](https://docs.medusajs.com/docs/learn/fundamentals/admin/index.html.md). This feature is available in the [Example Repository](https://github.com/medusajs/example-repository/tree/main/src/admin). + +If you're new to Medusa, check out the [main documentation](https://docs.medusajs.com/docs/learn/index.html.md), where you'll get a more in-depth learning of all the concepts you've used in this guide and more. + +To learn more about the commerce features that Medusa provides, check out Medusa's [Commerce Modules](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/index.html.md). + + # Integrate Medusa with Sanity (CMS) In this guide, you'll learn how to integrate Medusa with Sanity. @@ -50624,6 +49873,757 @@ If you're new to Medusa, check out the [main documentation](https://docs.medusaj To learn more about the commerce features that Medusa provides, check out Medusa's [Commerce Modules](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/index.html.md). +# Integrate Medusa with Resend (Email Notifications) + +In this guide, you'll learn how to integrate Medusa with Resend. + +When you install a Medusa application, you get a fully-fledged commerce platform with a Framework for customization. Medusa's architecture supports integrating third-party services, such as an email service, that allow you to build your unique requirements around core commerce flows. + +[Resend](https://resend.com/docs/introduction) is an email service with an intuitive developer experience to send emails from any application type, including Node.js servers. By integrating Resend with Medusa, you can build flows to send an email when a commerce operation is performed, such as when an order is placed. + +This guide will teach you how to: + +- Install and set up Medusa. +- Integrate Resend into Medusa for sending emails. +- Build a flow to send an email with Resend when a customer places an order. + +You can follow this guide whether you're new to Medusa or an advanced Medusa developer. + +[Example Repository](https://github.com/medusajs/examples/tree/main/resend-integration): Find the full code of the guide in this repository. + +*** + +## Step 1: Install a Medusa Application + +### Prerequisites + +- [Node.js v20+](https://nodejs.org/en/download) +- [Git CLI tool](https://git-scm.com/downloads) +- [PostgreSQL](https://www.postgresql.org/download/) + +Start by installing the Medusa application on your machine with the following command: + +```bash +npx create-medusa-app@latest +``` + +You'll first be asked for the project's name. Then, when you're asked whether you want to install the Next.js storefront, choose `Y` for yes. + +Afterwards, the installation process will start, which will install the Medusa application in a directory with your project's name, and the Next.js storefront in a directory with the `{project-name}-storefront` name. + +The Medusa application is composed of a headless Node.js server and an admin dashboard. The storefront is installed or custom-built separately and connects to the Medusa application through its REST endpoints, called [API routes](https://docs.medusajs.com/docs/learn/fundamentals/api-routes/index.html.md). Learn more about Medusa's architecture in [this documentation](https://docs.medusajs.com/docs/learn/introduction/architecture/index.html.md). + +Once the installation finishes successfully, the Medusa Admin dashboard will open with a form to create a new user. Enter the user's credential and submit the form. Afterwards, you can login with the new user and explore the dashboard. + +The Next.js storefront is also running at `http://localhost:8000`. + +Check out the [troubleshooting guides](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/troubleshooting/create-medusa-app-errors/index.html.md) for help. + +*** + +## Step 2: Prepare Resend Account + +If you don't have a Resend Account, create one on [their website](https://resend.com/emails). + +In addition, Resend allows you to send emails from the address `onboarding@resend.dev` only to your account's email, which is useful for development purposes. If you have a custom domain to send emails from, add it to your Resend account's domains: + +1. Go to Domains from the sidebar. +2. Click on Add Domain. + +![Click on Domains in the sidebar then on the Add Domain button in the middle of the page.](https://res.cloudinary.com/dza7lstvk/image/upload/v1732523238/Medusa%20Resources/Screenshot_2024-11-25_at_10.18.11_AM_pmqgtv.png) + +3\. In the form that opens, enter your domain name and select a region close to your users, then click Add. + +![A pop-up window with Domain and Region fields.](https://res.cloudinary.com/dza7lstvk/image/upload/v1732523280/Medusa%20Resources/Screenshot_2024-11-25_at_10.18.52_AM_sw2pr4.png) + +4\. In the domain's details page that opens, you'll find DNS records to add to your DNS provider. After you add them, click on Verify DNS Records. You can start sending emails from your custom domain once it's verified. + +The steps to add DNS records are different for each provider, so refer to your provider's documentation or knowledge base for more details. + +![The DNS records to add are in a table under the DNS Records section. Once added, click the Verify DNS Records button at the top right.](https://res.cloudinary.com/dza7lstvk/image/upload/v1732523394/Medusa%20Resources/Screenshot_2024-11-25_at_10.20.56_AM_ktvbse.png) + +You also need an API key to connect to your Resend account from Medusa, but you'll create that one in a later section. + +*** + +## Step 3: Install Resend Dependencies + +In this step, you'll install two packages useful for your Resend integration: + +1. `resend`, which is the Resend SDK: + +```bash npm2yarn +npm install resend +``` + +2\. [react-email](https://github.com/resend/react-email), which is a package created by Resend to create email templates with React: + +```bash npm2yarn +npm install @react-email/components -E +``` + +You'll use these packages in the next steps. + +*** + +## Step 4: Create Resend Module Provider + +To integrate third-party services into Medusa, you create a custom module. A module is a re-usable package with functionalities related to a single feature or domain. Medusa integrates the module into your application without implications or side effects on your setup. + +Medusa's Notification Module delegates sending notifications to other modules, called module providers. In this step, you'll create a Resend Module Provider that implements sending notifications through the email channel. In later steps, you'll send email notifications with Resend when an order is placed through this provider. + +Learn more about modules in [this documentation](https://docs.medusajs.com/docs/learn/fundamentals/modules/index.html.md). + +### Create Module Directory + +A module is created under the `src/modules` directory of your Medusa application. So, create the directory `src/modules/resend`. + +### Create Service + +You define a module's functionalities in a service. A service is a TypeScript or JavaScript class that the module exports. In the service's methods, you can connect to the database, which is useful if your module defines tables in the database, or connect to a third-party service. + +In this section, you'll create the Resend Module Provider's service and the methods necessary to send an email with Resend. + +Start by creating the file `src/modules/resend/service.ts` with the following content: + +```ts title="src/modules/resend/service.ts" highlights={serviceHighlights1} +import { + AbstractNotificationProviderService, +} from "@medusajs/framework/utils" +import { + Logger, +} from "@medusajs/framework/types" +import { + Resend, +} from "resend" + +type ResendOptions = { + api_key: string + from: string + html_templates?: Record +} + +class ResendNotificationProviderService extends AbstractNotificationProviderService { + static identifier = "notification-resend" + private resendClient: Resend + private options: ResendOptions + private logger: Logger + + // ... +} + +export default ResendNotificationProviderService +``` + +A Notification Module Provider's service must extend the `AbstractNotificationProviderService`. It has a `send` method that you'll implement soon. The service must also have an `identifier` static property, which is a unique identifier that the Medusa application will use to register the provider in the database. + +The `ResendNotificationProviderService` class also has the following properties: + +- `resendClient` of type `Resend` (from the Resend SDK you installed in the previous step) to send emails through Resend. +- `options` of type `ResendOptions`. Modules accept options through Medusa's configurations. This ensures that the module is reusable across applications and you don't use sensitive variables like API keys directly in your code. The options that the Resend Module Provider accepts are: + - `api_key`: The Resend API key. + - `from`: The email address to send the emails from. + - `html_templates`: An optional object to replace the default subject and template that the Resend Module uses. This is also useful to support custom emails in different Medusa application setups. +- `logger` property, which is an instance of Medusa's [Logger](https://docs.medusajs.com/docs/learn/debugging-and-testing/logging/index.html.md), to log messages. + +To send requests using the `resendClient`, you need to initialize it in the class's constructor. So, add the following constructor to `ResendNotificationProviderService`: + +```ts title="src/modules/resend/service.ts" +// ... + +type InjectedDependencies = { + logger: Logger +} + +class ResendNotificationProviderService extends AbstractNotificationProviderService { + // ... + constructor( + { logger }: InjectedDependencies, + options: ResendOptions + ) { + super() + this.resendClient = new Resend(options.api_key) + this.options = options + this.logger = logger + } +} +``` + +A module's service accepts two parameters: + +1. Dependencies resolved from the [Module's container](https://docs.medusajs.com/docs/learn/fundamentals/modules/container/index.html.md), which is the module's local registry that the Medusa application adds Framework tools to. In this service, you resolve the [Logger utility](https://docs.medusajs.com/docs/learn/debugging-and-testing/logging/index.html.md) from the module's container. +2. The module's options that are passed to the module in Medusa's configuration as you'll see in a later section. + +Using the API key passed in the module's options, you initialize the Resend client. You also set the `options` and `logger` properties. + +#### Validate Options Method + +A Notification Module Provider's service can implement a static `validateOptions` method that ensures the options passed to the module through Medusa's configurations are valid. + +So, add to the `ResendNotificationProviderService` the `validateOptions` method: + +```ts title="src/modules/resend/service.ts" +// other imports... +import { + // other imports... + MedusaError, +} from "@medusajs/framework/utils" + +// ... + +class ResendNotificationProviderService extends AbstractNotificationProviderService { + // ... + static validateOptions(options: Record) { + if (!options.api_key) { + throw new MedusaError( + MedusaError.Types.INVALID_DATA, + "Option `api_key` is required in the provider's options." + ) + } + if (!options.from) { + throw new MedusaError( + MedusaError.Types.INVALID_DATA, + "Option `from` is required in the provider's options." + ) + } + } +} +``` + +In the `validateOptions` method, you throw an error if the `api_key` or `from` options aren't passed to the module. To throw errors, you use `MedusaError` from the Modules SDK. This ensures errors follow Medusa's conventions and are displayed similar to Medusa's errors. + +#### Implement Template Methods + +Each email type has a different template and content. For example, order confirmation emails show the order's details, whereas customer confirmation emails show a greeting message to the customer. + +So, add two methods to the `ResendNotificationProviderService` class that retrieve the email template and subject of a specified template type: + +```ts title="src/modules/resend/service.ts" highlights={serviceHighlights2} +// imports and types... + +enum Templates { + ORDER_PLACED = "order-placed", +} + +const templates: {[key in Templates]?: (props: unknown) => React.ReactNode} = { + // TODO add templates +} + +class ResendNotificationProviderService extends AbstractNotificationProviderService { + // ... + getTemplate(template: Templates) { + if (this.options.html_templates?.[template]) { + return this.options.html_templates[template].content + } + const allowedTemplates = Object.keys(templates) + + if (!allowedTemplates.includes(template)) { + return null + } + + return templates[template] + } + + getTemplateSubject(template: Templates) { + if (this.options.html_templates?.[template]?.subject) { + return this.options.html_templates[template].subject + } + switch(template) { + case Templates.ORDER_PLACED: + return "Order Confirmation" + default: + return "New Email" + } + } +} +``` + +You first define a `Templates` enum, which holds the names of supported template types. You can add more template types to this enum later. You also define a `templates` variable that specifies the React template for each template type. You'll add templates to this variable later. + +In the `ResendNotificationProviderService` you add two methods: + +- `getTemplate`: Retrieve the template of a template type. If the `html_templates` option is set for the specified template type, you return its `content`'s value. Otherwise, you retrieve the template from the `templates` variable. +- `getTemplateSubject`: Retrieve the subject of a template type. If a `subject` is passed for the template type in the `html_templates`, you return its value. Otherwise, you return a subject based on the template type. + +You'll use these methods in the `send` method next. + +#### Implement Send Method + +In this section, you'll implement the `send` method of `ResendNotificationProviderService`. When you send a notification through the email channel later using the Notification Module, the Notification Module's service will use this `send` method under the hood to send the email with Resend. + +In the `send` method, you'll retrieve the template and subject of the email template, then send the email using the Resend client. + +Add the `send` method to the `ResendNotificationProviderService` class: + +```ts title="src/modules/resend/service.ts" highlights={serviceHighlights3} +// other imports... +import { + // ... + ProviderSendNotificationDTO, + ProviderSendNotificationResultsDTO, +} from "@medusajs/framework/types" +import { + // ... + CreateEmailOptions, +} from "resend" + +class ResendNotificationProviderService extends AbstractNotificationProviderService { + // ... + async send( + notification: ProviderSendNotificationDTO + ): Promise { + const template = this.getTemplate(notification.template as Templates) + + if (!template) { + this.logger.error(`Couldn't find an email template for ${notification.template}. The valid options are ${Object.values(Templates)}`) + return {} + } + + const emailOptions: CreateEmailOptions = { + from: this.options.from, + to: [notification.to], + subject: this.getTemplateSubject(notification.template as Templates), + html: "", + } + + if (typeof template === "string") { + emailOptions.html = template + } else { + emailOptions.react = template(notification.data) + delete emailOptions.html + } + + const { data, error } = await this.resendClient.emails.send(emailOptions) + + if (error) { + this.logger.error(`Failed to send email`, error) + return {} + } + + return { id: data.id } + } +} +``` + +The `send` method receives the notification details object as a parameter. Some of its properties include: + +- `to`: The address to send the notification to. +- `template`: The template type of the notification. +- `data`: The data useful for the email type. For example, when sending an order-confirmation email, `data` would hold the order's details. + +In the method, you retrieve the template and subject of the email using the methods you defined earlier. Then, you put together the data to pass to Resend, such as the email address to send the notification to and the email address to send from. Also, if the email's template is a string, it's passed as an HTML template. Otherwise, it's passed as a React template. + +Finally, you use the `emails.send` method of the Resend client to send the email. If an error occurs you log it in the terminal. Otherwise, you return the ID of the send email as received from Resend. Medusa uses this ID when creating the notification in its database. + +### Export Module Definition + +The `ResendNotificationProviderService` class now has the methods necessary to start sending emails. + +Next, you must export the module provider's definition, which lets Medusa know what module this provider belongs to and its service. + +Create the file `src/modules/resend/index.ts` with the following content: + +```ts title="src/modules/resend/index.ts" +import { + ModuleProvider, + Modules, +} from "@medusajs/framework/utils" +import ResendNotificationProviderService from "./service" + +export default ModuleProvider(Modules.NOTIFICATION, { + services: [ResendNotificationProviderService], +}) +``` + +You export the module provider's definition using `ModuleProvider` from the Modules SDK. It accepts as a first parameter the name of the module that this provider belongs to, which is the Notification Module. It also accepts as a second parameter an object having a `service` property indicating the provider's service. + +### Add Module to Configurations + +Finally, to register modules and module providers in Medusa, you must add them to Medusa's configurations. + +Medusa's configurations are set in the `medusa-config.ts` file, which is at the root directory of your Medusa application. The configuration object accepts a `modules` array, whose value is an array of modules to add to the application. + +Add the `modules` property to the exported configurations in `medusa-config.ts`: + +```ts title="medusa-config.ts" +module.exports = defineConfig({ + // ... + modules: [ + { + resolve: "@medusajs/medusa/notification", + options: { + providers: [ + { + resolve: "./src/modules/resend", + id: "resend", + options: { + channels: ["email"], + api_key: process.env.RESEND_API_KEY, + from: process.env.RESEND_FROM_EMAIL, + }, + }, + ], + }, + }, + ], +}) +``` + +In the `modules` array, you pass a module object having the following properties: + +- `resolve`: The NPM package of the Notification Module. Since the Resend Module is a Notification Module Provider, it'll be passed in the options of the Notification Module. +- `options`: An object of options to pass to the module. It has a `providers` property which is an array of module providers to register. Each module provider object has the following properties: + - `resolve`: The path to the module provider to register in the application. It can also be the name of an NPM package. + - `id`: A unique ID, which Medusa will use along with the `identifier` static property that you set earlier in the class to identify this module provider. + - `options`: An object of options to pass to the module provider. These are the options you expect and use in the module provider's service. You must also specify the `channels` option, which indicates the channels that this provider sends notifications through. + +Some of the module's options, such as the Resend API key, are set in environment variables. So, add the following environment variables to `.env`: + +```shell +RESEND_FROM_EMAIL=onboarding@resend.dev +RESEND_API_KEY= +``` + +Where: + +- `RESEND_FROM_EMAIL`: The email to send emails from. If you've configured the custom domain as explained in [Step 2](#step-2-prepare-resend-account), change this email to an email from your custom domain. Otherwise, you can use `onboarding@resend.dev` for development purposes. +- `RESEND_API_KEY` is the API key of your Resend account. To retrieve it: + - Go to API Keys in the sidebar. + - Click on the Create API Key button. + +![Click on the API keys in the sidebar, then click on the Create API Key button at the top right](https://res.cloudinary.com/dza7lstvk/image/upload/v1732535399/Medusa%20Resources/Screenshot_2024-11-25_at_10.22.25_AM_v4d09s.png) + +- In the form that opens, enter a name for the API key (for example, Medusa). You can keep its permissions to Full Access or change it to Sending Access. Once you're done, click Add. + +![The form to create an API key with fields for the API key's name, permissions, and domain](https://res.cloudinary.com/dza7lstvk/image/upload/v1732535464/Medusa%20Resources/Screenshot_2024-11-25_at_10.23.26_AM_g7gcuc.png) + +- A new pop-up will show with your API key hidden. Copy it before closing the pop-up, since you can't access the key again afterwards. Use its value for the `RESEND_API_KEY` environment variable. + +![Click the copy icon to copy the API key](https://res.cloudinary.com/dza7lstvk/image/upload/v1732535791/Medusa%20Resources/Screenshot_2024-11-25_at_10.23.43_AM_divins.png) + +Your Resend Module Provider is all set up. You'll test it out in a later section. + +*** + +## Step 5: Add Order Confirmation Template + +In this step, you'll add a React template for order confirmation emails. You'll create it using the [react-email](https://github.com/resend/react-email) package you installed earlier. You can follow the same steps for other email templates, such as for customer confirmation. + +Create the directory `src/modules/resend/emails` that will hold the email templates. Then, to add the template for order confirmation, create the file `src/modules/resend/emails/order-placed.tsx` with the following content: + +```tsx title="src/modules/resend/emails/order-placed.tsx" highlights={templateHighlights} +import { Text, Column, Container, Heading, Html, Img, Row, Section } from "@react-email/components" +import { BigNumberValue, OrderDTO } from "@medusajs/framework/types" + +type OrderPlacedEmailProps = { + order: OrderDTO +} + +function OrderPlacedEmailComponent({ order }: OrderPlacedEmailProps) { + const formatter = new Intl.NumberFormat([], { + style: "currency", + currencyDisplay: "narrowSymbol", + currency: order.currency_code, + }) + + const formatPrice = (price: BigNumberValue) => { + if (typeof price === "number") { + return formatter.format(price) + } + + if (typeof price === "string") { + return formatter.format(parseFloat(price)) + } + + return price?.toString() || "" + } + + return ( + + Thank you for your order + {order.email}'s Items + + {order.items.map((item) => { + return ( +
+ + + {item.product_title} + + + + {item.product_title} + + {item.variant_title} + {formatPrice(item.total)} + + +
+ ) + })} +
+ + ) +} + +export const orderPlacedEmail = (props: OrderPlacedEmailProps) => ( + +) +``` + +You define the `OrderPlacedEmailComponent` which is a React email template that shows the order's details, such as items and their totals. The component accepts an `order` object as a prop. + +You also export an `orderPlacedEmail` function, which accepts props as an input and returns the `OrderPlacedEmailComponent` passing it the props. Because you can't use JSX syntax in `src/modules/resend/service.ts`, you'll import this function instead. + +Next, update the `templates` variable in `src/modules/resend/service.ts` to assign this template to the `order-placed` template type: + +```ts title="src/modules/resend/service.ts" +// other imports... +import { orderPlacedEmail } from "./emails/order-placed" + +const templates: {[key in Templates]?: (props: unknown) => React.ReactNode} = { + [Templates.ORDER_PLACED]: orderPlacedEmail, +} +``` + +The `ResendNotificationProviderService` will now use the `OrderPlacedEmailComponent` as the template of order confirmation emails. + +*** + +## Step 6: Send Email when Order is Placed + +Medusa has an event system that emits an event when a commerce operation is performed. You can then listen and handle that event in an asynchronous function called a subscriber. + +So, to send a confirmation email when a customer places an order, which is a commerce operation that Medusa already implements, you don't need to extend or hack your way into Medusa's implementation as you would do with other commerce platforms. + +Instead, you'll create a subscriber that listens to the `order.placed` event and sends an email when the event is emitted. + +Learn more about Medusa's event system in [this documentation](https://docs.medusajs.com/docs/learn/fundamentals/events-and-subscribers/index.html.md). + +### Send Order Confirmation Email Workflow + +To send the order confirmation email, you need to retrieve the order's details first, then use the Notification Module's service to send the email. To implement this flow, you'll create a workflow. + +A workflow is a series of queries and actions, called steps, that complete a task. You construct a workflow like you construct a function, but it's a special function that allows you to track its executions' progress, define roll-back logic, and configure other advanced features. Then, you execute the workflow from other customizations, such as in a subscriber. + +Learn more about workflows in [this documentation](https://docs.medusajs.com/docs/learn/fundamentals/workflows/index.html.md) + +#### Send Notification Step + +You'll start by implementing the step of the workflow that sends the notification. To do that, create the file `src/workflows/steps/send-notification.ts` with the following content: + +```ts title="src/workflows/steps/send-notification.ts" +import { Modules } from "@medusajs/framework/utils" +import { createStep, StepResponse } from "@medusajs/framework/workflows-sdk" +import { CreateNotificationDTO } from "@medusajs/framework/types" + +export const sendNotificationStep = createStep( + "send-notification", + async (data: CreateNotificationDTO[], { container }) => { + const notificationModuleService = container.resolve( + Modules.NOTIFICATION + ) + const notification = await notificationModuleService.createNotifications(data) + return new StepResponse(notification) + } +) +``` + +You define the `sendNotificationStep` using the `createStep` function that accepts two parameters: + +- A string indicating the step's unique name. +- The step's function definition as a second parameter. It accepts the step's input as a first parameter, and an object of options as a second. + +The `container` property in the second parameter is an instance of the [Medusa container](https://docs.medusajs.com/docs/learn/fundamentals/medusa-container/index.html.md), which is a registry of Framework and commerce tools, such as a module's service, that you can resolve to utilize their functionalities. + +The Medusa container is accessible by all customizations, such as workflows and subscribers, except for modules. Each module has its own container with Framework tools like the Logger utility. + +In the step function, you resolve the Notification Module's service, and use its `createNotifications` method, passing it the notification's data that the step receives as an input. + +The step returns an instance of `StepResponse`, which must be returned by any step. It accepts as a parameter the data to return to the workflow that executed this step. + +#### Workflow Implementation + +You'll now create the workflow that uses the `sendNotificationStep` to send the order confirmation email. + +Create the file `src/workflows/send-order-confirmation.ts` with the following content: + +```ts title="src/workflows/send-order-confirmation.ts" highlights={workflowHighlights} +import { + createWorkflow, + WorkflowResponse, +} from "@medusajs/framework/workflows-sdk" +import { useQueryGraphStep } from "@medusajs/medusa/core-flows" +import { sendNotificationStep } from "./steps/send-notification" + +type WorkflowInput = { + id: string +} + +export const sendOrderConfirmationWorkflow = createWorkflow( + "send-order-confirmation", + ({ id }: WorkflowInput) => { + // @ts-ignore + const { data: orders } = useQueryGraphStep({ + entity: "order", + fields: [ + "id", + "email", + "currency_code", + "total", + "items.*", + ], + filters: { + id, + }, + }) + + const notification = sendNotificationStep([{ + to: orders[0].email, + channel: "email", + template: "order-placed", + data: { + order: orders[0], + }, + }]) + + return new WorkflowResponse(notification) + } +) +``` + +You create a workflow using `createWorkflow` from the Workflows SDK. It accepts the workflow's unique name as a first parameter. + +It accepts as a second parameter a constructor function, which is the workflow's implementation. The workflow has the following steps: + +1. `useQueryGraphStep`, which is a step implemented by Medusa that uses [Query](https://docs.medusajs.com/docs/learn/fundamentals/module-links/query/index.html.md), a tool that allows you to retrieve data across modules. You use it to retrieve the order's details. +2. `sendNotificationStep` which is the step you implemented. You pass it an array with one object, which is the notification's details having following properties: + - `to`: The address to send the email to. You pass the customer's email that is stored in the order. + - `channel`: The channel to send the notification through, which is `email`. Since you specified `email` in the Resend Module Provider's `channel` option, the Notification Module will delegate the sending to the Resend Module Provider's service. + - `template`: The email's template type. You retrieve the template content in the `ResendNotificationProviderService`'s `send` method based on the template specified here. + - `data`: The data to pass to the email template, which is the order's details. + +A workflow's constructor function has some constraints in implementation. Learn more about them in [this documentation](https://docs.medusajs.com/docs/learn/fundamentals/workflows/constructor-constraints/index.html.md). + +You'll execute the workflow when you create the subscriber next. + +#### Add the Order Placed Subscriber + +Now that you have the workflow to send an order-confirmation email, you'll execute it in a subscriber that's executed whenever an order is placed. + +You create a subscriber in a TypeScript or JavaScript file under the `src/subscribers` directory. So, create the file `src/subscribers/order-placed.ts` with the following content: + +```ts title="src/subscribers/order-placed.ts" highlights={subscriberHighlights} +import type { + SubscriberArgs, + SubscriberConfig, +} from "@medusajs/framework" +import { sendOrderConfirmationWorkflow } from "../workflows/send-order-confirmation" + +export default async function orderPlacedHandler({ + event: { data }, + container, +}: SubscriberArgs<{ id: string }>) { + await sendOrderConfirmationWorkflow(container) + .run({ + input: { + id: data.id, + }, + }) +} + +export const config: SubscriberConfig = { + event: "order.placed", +} +``` + +A subscriber file exports: + +- An asynchronous function that's executed whenever the associated event is emitted, which is the `order.placed` event. +- A configuration object with an `event` property indicating the event the subscriber is listening to. + +The subscriber function accepts the event's details as a first paramter which has a `data` property that holds the data payload of the event. For example, Medusa emits the `order.placed` event with the order's ID in the data payload. The function also accepts as a second parameter the [Medusa container](https://docs.medusajs.com/docs/learn/fundamentals/medusa-container/index.html.md). + +In the function, you execute the `sendOrderConfirmationWorkflow` by invoking it, passing it the `container`, then using its `run` method. The `run` method accepts an object having an `input` property, which is the input to pass to the workflow. You pass the ID of the placed order as received in the event's data payload. + +This subscriber now runs whenever an order is placed. You'll see this in action in the next section. + +*** + +## Test it Out: Place an Order + +To test out the Resend integration, you'll place an order using the [Next.js storefront](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/nextjs-starter/index.html.md) that you installed as part of installing Medusa. + +Start your Medusa application first: + +```bash npm2yarn +npm run dev +``` + +Then, in the Next.js storefront's directory (which was installed in a directory outside of the Medusa application's directory with the name `{project-name}-storefront`, where `{project-name}` is the name of the Medusa application's directory), run the following command to start the storefront: + +```bash npm2yarn +npm run dev +``` + +Then, open the storefront in your browser at `http://localhost:8000` and: + +1. Go to Menu -> Store. + +![Choose Store from Menu](https://res.cloudinary.com/dza7lstvk/image/upload/v1732539139/Medusa%20Resources/Screenshot_2024-11-25_at_2.51.59_PM_fubiwj.png) + +2\. Click on a product, select its options, and add it to the cart. + +![Choose an option, such as size, then click on the Add to cart button](https://res.cloudinary.com/dza7lstvk/image/upload/v1732539227/Medusa%20Resources/Screenshot_2024-11-25_at_2.53.11_PM_iswcjy.png) + +3\. Click on Cart at the top right, then click Go to Cart. + +![Cart is at the top right. It opens a dropdown with a Go to Cart button](https://res.cloudinary.com/dza7lstvk/image/upload/v1732539354/Medusa%20Resources/Screenshot_2024-11-25_at_2.54.44_PM_b1pnlu.png) + +4\. On the cart's page, click on the "Go to checkout" button. + +![The Go to checkout button is at the right side of the page](https://res.cloudinary.com/dza7lstvk/image/upload/v1732539443/Medusa%20Resources/Screenshot_2024-11-25_at_2.56.27_PM_cvqshj.png) + +5\. On the checkout page, when entering the shipping address, make sure to set the email to your Resend account's email if you didn't set up a custom domain. + +![Enter your Resend account email if you didn't set up a custom domain](https://res.cloudinary.com/dza7lstvk/image/upload/v1732539536/Medusa%20Resources/Screenshot_2024-11-25_at_2.58.31_PM_wmlh60.png) + +6\. After entering the shipping address, choose a delivery and payment methods, then click the Place Order button. + +Once the order is placed, you'll find the following message logged in the Medusa application's terminal: + +```bash +info: Processing order.placed which has 1 subscribers +``` + +This indicates that the `order.placed` event was emitted and its subscriber, which you added in the previous step, is executed. + +If you check the inbox of the email address you specified in the shipping address, you'll find a new email with the order's details. + +![Example of order-confirmation email](https://res.cloudinary.com/dza7lstvk/image/upload/v1732551372/Medusa%20Resources/Screenshot_2024-11-25_at_6.15.59_PM_efyuoj.png) + +*** + +## Next Steps + +You've now integrated Medusa with Resend. You can add more templates for other emails, such as customer registration confirmation, user invites, and more. Check out the [Events Reference](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/events-reference/index.html.md) for a list of all events that the Medusa application emits. + +If you're new to Medusa, check out the [main documentation](https://docs.medusajs.com/docs/learn/index.html.md), where you'll get a more in-depth learning of all the concepts you've used in this guide and more. + +To learn more about the commerce features that Medusa provides, check out Medusa's [Commerce Modules](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/index.html.md). + + # How to Build a Wishlist Plugin In this guide, you'll learn how to build a wishlist [plugin](https://docs.medusajs.com/docs/learn/fundamentals/plugins/index.html.md) in Medusa. @@ -52058,7 +52058,7 @@ In this step, you'll add the functionality to allow customers to share their wis To create the token and decode it later, you'll use the [jsonwebtoken](https://www.npmjs.com/package/jsonwebtoken) package. So, run the following command in the plugin project to install the package: -```bash npm2yarn title="Plugin project" +```bash npm2yarn badgeLabel="Plugin project" badgeColor="orange" npm install jsonwebtoken ``` @@ -52461,19 +52461,23 @@ To learn more about the commerce features that Medusa provides, check out Medusa ## JS SDK Admin -- [create](https://docs.medusajs.com/references/js_sdk/admin/Campaign/methods/js_sdk.admin.Campaign.create/index.html.md) -- [batchPromotions](https://docs.medusajs.com/references/js_sdk/admin/Campaign/methods/js_sdk.admin.Campaign.batchPromotions/index.html.md) +- [batchSalesChannels](https://docs.medusajs.com/references/js_sdk/admin/ApiKey/methods/js_sdk.admin.ApiKey.batchSalesChannels/index.html.md) +- [create](https://docs.medusajs.com/references/js_sdk/admin/ApiKey/methods/js_sdk.admin.ApiKey.create/index.html.md) +- [delete](https://docs.medusajs.com/references/js_sdk/admin/ApiKey/methods/js_sdk.admin.ApiKey.delete/index.html.md) +- [revoke](https://docs.medusajs.com/references/js_sdk/admin/ApiKey/methods/js_sdk.admin.ApiKey.revoke/index.html.md) +- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/ApiKey/methods/js_sdk.admin.ApiKey.retrieve/index.html.md) +- [list](https://docs.medusajs.com/references/js_sdk/admin/ApiKey/methods/js_sdk.admin.ApiKey.list/index.html.md) - [delete](https://docs.medusajs.com/references/js_sdk/admin/Campaign/methods/js_sdk.admin.Campaign.delete/index.html.md) +- [create](https://docs.medusajs.com/references/js_sdk/admin/Campaign/methods/js_sdk.admin.Campaign.create/index.html.md) - [list](https://docs.medusajs.com/references/js_sdk/admin/Campaign/methods/js_sdk.admin.Campaign.list/index.html.md) +- [update](https://docs.medusajs.com/references/js_sdk/admin/ApiKey/methods/js_sdk.admin.ApiKey.update/index.html.md) - [update](https://docs.medusajs.com/references/js_sdk/admin/Campaign/methods/js_sdk.admin.Campaign.update/index.html.md) +- [batchPromotions](https://docs.medusajs.com/references/js_sdk/admin/Campaign/methods/js_sdk.admin.Campaign.batchPromotions/index.html.md) - [retrieve](https://docs.medusajs.com/references/js_sdk/admin/Campaign/methods/js_sdk.admin.Campaign.retrieve/index.html.md) -- [list](https://docs.medusajs.com/references/js_sdk/admin/Currency/methods/js_sdk.admin.Currency.list/index.html.md) -- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/Currency/methods/js_sdk.admin.Currency.retrieve/index.html.md) -- [clearToken\_](https://docs.medusajs.com/references/js_sdk/admin/Client/methods/js_sdk.admin.Client.clearToken_/index.html.md) -- [clearToken](https://docs.medusajs.com/references/js_sdk/admin/Client/methods/js_sdk.admin.Client.clearToken/index.html.md) -- [fetchStream](https://docs.medusajs.com/references/js_sdk/admin/Client/methods/js_sdk.admin.Client.fetchStream/index.html.md) - [fetch](https://docs.medusajs.com/references/js_sdk/admin/Client/methods/js_sdk.admin.Client.fetch/index.html.md) -- [getApiKeyHeader\_](https://docs.medusajs.com/references/js_sdk/admin/Client/methods/js_sdk.admin.Client.getApiKeyHeader_/index.html.md) +- [clearToken\_](https://docs.medusajs.com/references/js_sdk/admin/Client/methods/js_sdk.admin.Client.clearToken_/index.html.md) +- [fetchStream](https://docs.medusajs.com/references/js_sdk/admin/Client/methods/js_sdk.admin.Client.fetchStream/index.html.md) +- [clearToken](https://docs.medusajs.com/references/js_sdk/admin/Client/methods/js_sdk.admin.Client.clearToken/index.html.md) - [getJwtHeader\_](https://docs.medusajs.com/references/js_sdk/admin/Client/methods/js_sdk.admin.Client.getJwtHeader_/index.html.md) - [getPublishableKeyHeader\_](https://docs.medusajs.com/references/js_sdk/admin/Client/methods/js_sdk.admin.Client.getPublishableKeyHeader_/index.html.md) - [getTokenStorageInfo\_](https://docs.medusajs.com/references/js_sdk/admin/Client/methods/js_sdk.admin.Client.getTokenStorageInfo_/index.html.md) @@ -52482,84 +52486,82 @@ To learn more about the commerce features that Medusa provides, check out Medusa - [setToken](https://docs.medusajs.com/references/js_sdk/admin/Client/methods/js_sdk.admin.Client.setToken/index.html.md) - [throwError\_](https://docs.medusajs.com/references/js_sdk/admin/Client/methods/js_sdk.admin.Client.throwError_/index.html.md) - [setToken\_](https://docs.medusajs.com/references/js_sdk/admin/Client/methods/js_sdk.admin.Client.setToken_/index.html.md) -- [batchSalesChannels](https://docs.medusajs.com/references/js_sdk/admin/ApiKey/methods/js_sdk.admin.ApiKey.batchSalesChannels/index.html.md) -- [create](https://docs.medusajs.com/references/js_sdk/admin/ApiKey/methods/js_sdk.admin.ApiKey.create/index.html.md) -- [delete](https://docs.medusajs.com/references/js_sdk/admin/ApiKey/methods/js_sdk.admin.ApiKey.delete/index.html.md) -- [list](https://docs.medusajs.com/references/js_sdk/admin/ApiKey/methods/js_sdk.admin.ApiKey.list/index.html.md) -- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/ApiKey/methods/js_sdk.admin.ApiKey.retrieve/index.html.md) -- [revoke](https://docs.medusajs.com/references/js_sdk/admin/ApiKey/methods/js_sdk.admin.ApiKey.revoke/index.html.md) -- [update](https://docs.medusajs.com/references/js_sdk/admin/ApiKey/methods/js_sdk.admin.ApiKey.update/index.html.md) -- [create](https://docs.medusajs.com/references/js_sdk/admin/Customer/methods/js_sdk.admin.Customer.create/index.html.md) -- [batchCustomerGroups](https://docs.medusajs.com/references/js_sdk/admin/Customer/methods/js_sdk.admin.Customer.batchCustomerGroups/index.html.md) -- [createAddress](https://docs.medusajs.com/references/js_sdk/admin/Customer/methods/js_sdk.admin.Customer.createAddress/index.html.md) -- [delete](https://docs.medusajs.com/references/js_sdk/admin/Customer/methods/js_sdk.admin.Customer.delete/index.html.md) -- [list](https://docs.medusajs.com/references/js_sdk/admin/Customer/methods/js_sdk.admin.Customer.list/index.html.md) -- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/Customer/methods/js_sdk.admin.Customer.retrieve/index.html.md) -- [deleteAddress](https://docs.medusajs.com/references/js_sdk/admin/Customer/methods/js_sdk.admin.Customer.deleteAddress/index.html.md) -- [retrieveAddress](https://docs.medusajs.com/references/js_sdk/admin/Customer/methods/js_sdk.admin.Customer.retrieveAddress/index.html.md) -- [update](https://docs.medusajs.com/references/js_sdk/admin/Customer/methods/js_sdk.admin.Customer.update/index.html.md) -- [updateAddress](https://docs.medusajs.com/references/js_sdk/admin/Customer/methods/js_sdk.admin.Customer.updateAddress/index.html.md) -- [removeItem](https://docs.medusajs.com/references/js_sdk/admin/CustomStorage/methods/js_sdk.admin.CustomStorage.removeItem/index.html.md) -- [getItem](https://docs.medusajs.com/references/js_sdk/admin/CustomStorage/methods/js_sdk.admin.CustomStorage.getItem/index.html.md) -- [listAddresses](https://docs.medusajs.com/references/js_sdk/admin/Customer/methods/js_sdk.admin.Customer.listAddresses/index.html.md) -- [setItem](https://docs.medusajs.com/references/js_sdk/admin/CustomStorage/methods/js_sdk.admin.CustomStorage.setItem/index.html.md) -- [batchCustomers](https://docs.medusajs.com/references/js_sdk/admin/CustomerGroup/methods/js_sdk.admin.CustomerGroup.batchCustomers/index.html.md) -- [list](https://docs.medusajs.com/references/js_sdk/admin/CustomerGroup/methods/js_sdk.admin.CustomerGroup.list/index.html.md) -- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/CustomerGroup/methods/js_sdk.admin.CustomerGroup.retrieve/index.html.md) -- [create](https://docs.medusajs.com/references/js_sdk/admin/CustomerGroup/methods/js_sdk.admin.CustomerGroup.create/index.html.md) -- [delete](https://docs.medusajs.com/references/js_sdk/admin/CustomerGroup/methods/js_sdk.admin.CustomerGroup.delete/index.html.md) -- [update](https://docs.medusajs.com/references/js_sdk/admin/CustomerGroup/methods/js_sdk.admin.CustomerGroup.update/index.html.md) -- [addShippingMethod](https://docs.medusajs.com/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.addShippingMethod/index.html.md) -- [beginEdit](https://docs.medusajs.com/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.beginEdit/index.html.md) -- [addItems](https://docs.medusajs.com/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.addItems/index.html.md) -- [addPromotions](https://docs.medusajs.com/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.addPromotions/index.html.md) -- [cancelEdit](https://docs.medusajs.com/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.cancelEdit/index.html.md) -- [convertToOrder](https://docs.medusajs.com/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.convertToOrder/index.html.md) -- [confirmEdit](https://docs.medusajs.com/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.confirmEdit/index.html.md) -- [list](https://docs.medusajs.com/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.list/index.html.md) -- [removeActionItem](https://docs.medusajs.com/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.removeActionItem/index.html.md) -- [removeActionShippingMethod](https://docs.medusajs.com/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.removeActionShippingMethod/index.html.md) -- [requestEdit](https://docs.medusajs.com/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.requestEdit/index.html.md) -- [removePromotions](https://docs.medusajs.com/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.removePromotions/index.html.md) -- [create](https://docs.medusajs.com/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.create/index.html.md) -- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.retrieve/index.html.md) -- [updateActionShippingMethod](https://docs.medusajs.com/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.updateActionShippingMethod/index.html.md) -- [updateActionItem](https://docs.medusajs.com/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.updateActionItem/index.html.md) -- [update](https://docs.medusajs.com/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.update/index.html.md) -- [updateItem](https://docs.medusajs.com/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.updateItem/index.html.md) -- [updateShippingMethod](https://docs.medusajs.com/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.updateShippingMethod/index.html.md) -- [list](https://docs.medusajs.com/references/js_sdk/admin/FulfillmentProvider/methods/js_sdk.admin.FulfillmentProvider.list/index.html.md) -- [listFulfillmentOptions](https://docs.medusajs.com/references/js_sdk/admin/FulfillmentProvider/methods/js_sdk.admin.FulfillmentProvider.listFulfillmentOptions/index.html.md) -- [addInboundItems](https://docs.medusajs.com/references/js_sdk/admin/Claim/methods/js_sdk.admin.Claim.addInboundItems/index.html.md) +- [getApiKeyHeader\_](https://docs.medusajs.com/references/js_sdk/admin/Client/methods/js_sdk.admin.Client.getApiKeyHeader_/index.html.md) +- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/Currency/methods/js_sdk.admin.Currency.retrieve/index.html.md) +- [list](https://docs.medusajs.com/references/js_sdk/admin/Currency/methods/js_sdk.admin.Currency.list/index.html.md) - [addInboundShipping](https://docs.medusajs.com/references/js_sdk/admin/Claim/methods/js_sdk.admin.Claim.addInboundShipping/index.html.md) -- [addOutboundItems](https://docs.medusajs.com/references/js_sdk/admin/Claim/methods/js_sdk.admin.Claim.addOutboundItems/index.html.md) +- [addInboundItems](https://docs.medusajs.com/references/js_sdk/admin/Claim/methods/js_sdk.admin.Claim.addInboundItems/index.html.md) - [addItems](https://docs.medusajs.com/references/js_sdk/admin/Claim/methods/js_sdk.admin.Claim.addItems/index.html.md) +- [addOutboundItems](https://docs.medusajs.com/references/js_sdk/admin/Claim/methods/js_sdk.admin.Claim.addOutboundItems/index.html.md) - [cancel](https://docs.medusajs.com/references/js_sdk/admin/Claim/methods/js_sdk.admin.Claim.cancel/index.html.md) -- [cancelRequest](https://docs.medusajs.com/references/js_sdk/admin/Claim/methods/js_sdk.admin.Claim.cancelRequest/index.html.md) -- [create](https://docs.medusajs.com/references/js_sdk/admin/Claim/methods/js_sdk.admin.Claim.create/index.html.md) -- [deleteInboundShipping](https://docs.medusajs.com/references/js_sdk/admin/Claim/methods/js_sdk.admin.Claim.deleteInboundShipping/index.html.md) -- [deleteOutboundShipping](https://docs.medusajs.com/references/js_sdk/admin/Claim/methods/js_sdk.admin.Claim.deleteOutboundShipping/index.html.md) - [addOutboundShipping](https://docs.medusajs.com/references/js_sdk/admin/Claim/methods/js_sdk.admin.Claim.addOutboundShipping/index.html.md) -- [removeItem](https://docs.medusajs.com/references/js_sdk/admin/Claim/methods/js_sdk.admin.Claim.removeItem/index.html.md) -- [removeInboundItem](https://docs.medusajs.com/references/js_sdk/admin/Claim/methods/js_sdk.admin.Claim.removeInboundItem/index.html.md) -- [removeOutboundItem](https://docs.medusajs.com/references/js_sdk/admin/Claim/methods/js_sdk.admin.Claim.removeOutboundItem/index.html.md) +- [create](https://docs.medusajs.com/references/js_sdk/admin/Claim/methods/js_sdk.admin.Claim.create/index.html.md) +- [cancelRequest](https://docs.medusajs.com/references/js_sdk/admin/Claim/methods/js_sdk.admin.Claim.cancelRequest/index.html.md) +- [deleteOutboundShipping](https://docs.medusajs.com/references/js_sdk/admin/Claim/methods/js_sdk.admin.Claim.deleteOutboundShipping/index.html.md) +- [deleteInboundShipping](https://docs.medusajs.com/references/js_sdk/admin/Claim/methods/js_sdk.admin.Claim.deleteInboundShipping/index.html.md) - [list](https://docs.medusajs.com/references/js_sdk/admin/Claim/methods/js_sdk.admin.Claim.list/index.html.md) +- [removeInboundItem](https://docs.medusajs.com/references/js_sdk/admin/Claim/methods/js_sdk.admin.Claim.removeInboundItem/index.html.md) - [request](https://docs.medusajs.com/references/js_sdk/admin/Claim/methods/js_sdk.admin.Claim.request/index.html.md) +- [removeOutboundItem](https://docs.medusajs.com/references/js_sdk/admin/Claim/methods/js_sdk.admin.Claim.removeOutboundItem/index.html.md) - [retrieve](https://docs.medusajs.com/references/js_sdk/admin/Claim/methods/js_sdk.admin.Claim.retrieve/index.html.md) - [updateInboundItem](https://docs.medusajs.com/references/js_sdk/admin/Claim/methods/js_sdk.admin.Claim.updateInboundItem/index.html.md) - [updateItem](https://docs.medusajs.com/references/js_sdk/admin/Claim/methods/js_sdk.admin.Claim.updateItem/index.html.md) +- [updateInboundShipping](https://docs.medusajs.com/references/js_sdk/admin/Claim/methods/js_sdk.admin.Claim.updateInboundShipping/index.html.md) - [updateOutboundItem](https://docs.medusajs.com/references/js_sdk/admin/Claim/methods/js_sdk.admin.Claim.updateOutboundItem/index.html.md) - [updateOutboundShipping](https://docs.medusajs.com/references/js_sdk/admin/Claim/methods/js_sdk.admin.Claim.updateOutboundShipping/index.html.md) +- [removeItem](https://docs.medusajs.com/references/js_sdk/admin/Claim/methods/js_sdk.admin.Claim.removeItem/index.html.md) +- [addItems](https://docs.medusajs.com/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.addItems/index.html.md) +- [addPromotions](https://docs.medusajs.com/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.addPromotions/index.html.md) +- [cancelEdit](https://docs.medusajs.com/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.cancelEdit/index.html.md) +- [beginEdit](https://docs.medusajs.com/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.beginEdit/index.html.md) +- [addShippingMethod](https://docs.medusajs.com/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.addShippingMethod/index.html.md) +- [confirmEdit](https://docs.medusajs.com/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.confirmEdit/index.html.md) +- [create](https://docs.medusajs.com/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.create/index.html.md) +- [convertToOrder](https://docs.medusajs.com/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.convertToOrder/index.html.md) +- [list](https://docs.medusajs.com/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.list/index.html.md) +- [removeActionItem](https://docs.medusajs.com/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.removeActionItem/index.html.md) +- [removePromotions](https://docs.medusajs.com/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.removePromotions/index.html.md) +- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.retrieve/index.html.md) +- [removeActionShippingMethod](https://docs.medusajs.com/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.removeActionShippingMethod/index.html.md) +- [requestEdit](https://docs.medusajs.com/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.requestEdit/index.html.md) +- [removeShippingMethod](https://docs.medusajs.com/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.removeShippingMethod/index.html.md) +- [updateActionItem](https://docs.medusajs.com/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.updateActionItem/index.html.md) +- [update](https://docs.medusajs.com/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.update/index.html.md) +- [updateActionShippingMethod](https://docs.medusajs.com/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.updateActionShippingMethod/index.html.md) +- [updateItem](https://docs.medusajs.com/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.updateItem/index.html.md) +- [updateShippingMethod](https://docs.medusajs.com/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.updateShippingMethod/index.html.md) +- [batchCustomers](https://docs.medusajs.com/references/js_sdk/admin/CustomerGroup/methods/js_sdk.admin.CustomerGroup.batchCustomers/index.html.md) +- [create](https://docs.medusajs.com/references/js_sdk/admin/CustomerGroup/methods/js_sdk.admin.CustomerGroup.create/index.html.md) +- [delete](https://docs.medusajs.com/references/js_sdk/admin/CustomerGroup/methods/js_sdk.admin.CustomerGroup.delete/index.html.md) +- [list](https://docs.medusajs.com/references/js_sdk/admin/CustomerGroup/methods/js_sdk.admin.CustomerGroup.list/index.html.md) +- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/CustomerGroup/methods/js_sdk.admin.CustomerGroup.retrieve/index.html.md) +- [update](https://docs.medusajs.com/references/js_sdk/admin/CustomerGroup/methods/js_sdk.admin.CustomerGroup.update/index.html.md) +- [addInboundItems](https://docs.medusajs.com/references/js_sdk/admin/Exchange/methods/js_sdk.admin.Exchange.addInboundItems/index.html.md) +- [addInboundShipping](https://docs.medusajs.com/references/js_sdk/admin/Exchange/methods/js_sdk.admin.Exchange.addInboundShipping/index.html.md) +- [addOutboundItems](https://docs.medusajs.com/references/js_sdk/admin/Exchange/methods/js_sdk.admin.Exchange.addOutboundItems/index.html.md) +- [cancelRequest](https://docs.medusajs.com/references/js_sdk/admin/Exchange/methods/js_sdk.admin.Exchange.cancelRequest/index.html.md) +- [addOutboundShipping](https://docs.medusajs.com/references/js_sdk/admin/Exchange/methods/js_sdk.admin.Exchange.addOutboundShipping/index.html.md) +- [cancel](https://docs.medusajs.com/references/js_sdk/admin/Exchange/methods/js_sdk.admin.Exchange.cancel/index.html.md) +- [create](https://docs.medusajs.com/references/js_sdk/admin/Exchange/methods/js_sdk.admin.Exchange.create/index.html.md) +- [deleteOutboundShipping](https://docs.medusajs.com/references/js_sdk/admin/Exchange/methods/js_sdk.admin.Exchange.deleteOutboundShipping/index.html.md) +- [list](https://docs.medusajs.com/references/js_sdk/admin/Exchange/methods/js_sdk.admin.Exchange.list/index.html.md) +- [deleteInboundShipping](https://docs.medusajs.com/references/js_sdk/admin/Exchange/methods/js_sdk.admin.Exchange.deleteInboundShipping/index.html.md) +- [removeInboundItem](https://docs.medusajs.com/references/js_sdk/admin/Exchange/methods/js_sdk.admin.Exchange.removeInboundItem/index.html.md) +- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/Exchange/methods/js_sdk.admin.Exchange.retrieve/index.html.md) +- [removeOutboundItem](https://docs.medusajs.com/references/js_sdk/admin/Exchange/methods/js_sdk.admin.Exchange.removeOutboundItem/index.html.md) +- [request](https://docs.medusajs.com/references/js_sdk/admin/Exchange/methods/js_sdk.admin.Exchange.request/index.html.md) +- [updateInboundItem](https://docs.medusajs.com/references/js_sdk/admin/Exchange/methods/js_sdk.admin.Exchange.updateInboundItem/index.html.md) +- [updateInboundShipping](https://docs.medusajs.com/references/js_sdk/admin/Exchange/methods/js_sdk.admin.Exchange.updateInboundShipping/index.html.md) +- [updateOutboundItem](https://docs.medusajs.com/references/js_sdk/admin/Exchange/methods/js_sdk.admin.Exchange.updateOutboundItem/index.html.md) +- [setItem](https://docs.medusajs.com/references/js_sdk/admin/CustomStorage/methods/js_sdk.admin.CustomStorage.setItem/index.html.md) +- [removeItem](https://docs.medusajs.com/references/js_sdk/admin/CustomStorage/methods/js_sdk.admin.CustomStorage.removeItem/index.html.md) +- [getItem](https://docs.medusajs.com/references/js_sdk/admin/CustomStorage/methods/js_sdk.admin.CustomStorage.getItem/index.html.md) +- [updateOutboundShipping](https://docs.medusajs.com/references/js_sdk/admin/Exchange/methods/js_sdk.admin.Exchange.updateOutboundShipping/index.html.md) - [cancel](https://docs.medusajs.com/references/js_sdk/admin/Fulfillment/methods/js_sdk.admin.Fulfillment.cancel/index.html.md) -- [updateInboundShipping](https://docs.medusajs.com/references/js_sdk/admin/Claim/methods/js_sdk.admin.Claim.updateInboundShipping/index.html.md) - [create](https://docs.medusajs.com/references/js_sdk/admin/Fulfillment/methods/js_sdk.admin.Fulfillment.create/index.html.md) - [createShipment](https://docs.medusajs.com/references/js_sdk/admin/Fulfillment/methods/js_sdk.admin.Fulfillment.createShipment/index.html.md) -- [accept](https://docs.medusajs.com/references/js_sdk/admin/Invite/methods/js_sdk.admin.Invite.accept/index.html.md) -- [create](https://docs.medusajs.com/references/js_sdk/admin/Invite/methods/js_sdk.admin.Invite.create/index.html.md) -- [delete](https://docs.medusajs.com/references/js_sdk/admin/Invite/methods/js_sdk.admin.Invite.delete/index.html.md) -- [list](https://docs.medusajs.com/references/js_sdk/admin/Invite/methods/js_sdk.admin.Invite.list/index.html.md) -- [resend](https://docs.medusajs.com/references/js_sdk/admin/Invite/methods/js_sdk.admin.Invite.resend/index.html.md) -- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/Invite/methods/js_sdk.admin.Invite.retrieve/index.html.md) +- [list](https://docs.medusajs.com/references/js_sdk/admin/FulfillmentProvider/methods/js_sdk.admin.FulfillmentProvider.list/index.html.md) +- [listFulfillmentOptions](https://docs.medusajs.com/references/js_sdk/admin/FulfillmentProvider/methods/js_sdk.admin.FulfillmentProvider.listFulfillmentOptions/index.html.md) - [batchInventoryItemLocationLevels](https://docs.medusajs.com/references/js_sdk/admin/InventoryItem/methods/js_sdk.admin.InventoryItem.batchInventoryItemLocationLevels/index.html.md) - [batchInventoryItemsLocationLevels](https://docs.medusajs.com/references/js_sdk/admin/InventoryItem/methods/js_sdk.admin.InventoryItem.batchInventoryItemsLocationLevels/index.html.md) - [batchUpdateLevels](https://docs.medusajs.com/references/js_sdk/admin/InventoryItem/methods/js_sdk.admin.InventoryItem.batchUpdateLevels/index.html.md) @@ -52567,48 +52569,24 @@ To learn more about the commerce features that Medusa provides, check out Medusa - [deleteLevel](https://docs.medusajs.com/references/js_sdk/admin/InventoryItem/methods/js_sdk.admin.InventoryItem.deleteLevel/index.html.md) - [list](https://docs.medusajs.com/references/js_sdk/admin/InventoryItem/methods/js_sdk.admin.InventoryItem.list/index.html.md) - [listLevels](https://docs.medusajs.com/references/js_sdk/admin/InventoryItem/methods/js_sdk.admin.InventoryItem.listLevels/index.html.md) -- [create](https://docs.medusajs.com/references/js_sdk/admin/InventoryItem/methods/js_sdk.admin.InventoryItem.create/index.html.md) - [update](https://docs.medusajs.com/references/js_sdk/admin/InventoryItem/methods/js_sdk.admin.InventoryItem.update/index.html.md) -- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/InventoryItem/methods/js_sdk.admin.InventoryItem.retrieve/index.html.md) +- [create](https://docs.medusajs.com/references/js_sdk/admin/InventoryItem/methods/js_sdk.admin.InventoryItem.create/index.html.md) - [updateLevel](https://docs.medusajs.com/references/js_sdk/admin/InventoryItem/methods/js_sdk.admin.InventoryItem.updateLevel/index.html.md) -- [addInboundShipping](https://docs.medusajs.com/references/js_sdk/admin/Exchange/methods/js_sdk.admin.Exchange.addInboundShipping/index.html.md) -- [addOutboundItems](https://docs.medusajs.com/references/js_sdk/admin/Exchange/methods/js_sdk.admin.Exchange.addOutboundItems/index.html.md) -- [addInboundItems](https://docs.medusajs.com/references/js_sdk/admin/Exchange/methods/js_sdk.admin.Exchange.addInboundItems/index.html.md) -- [addOutboundShipping](https://docs.medusajs.com/references/js_sdk/admin/Exchange/methods/js_sdk.admin.Exchange.addOutboundShipping/index.html.md) -- [cancel](https://docs.medusajs.com/references/js_sdk/admin/Exchange/methods/js_sdk.admin.Exchange.cancel/index.html.md) -- [cancelRequest](https://docs.medusajs.com/references/js_sdk/admin/Exchange/methods/js_sdk.admin.Exchange.cancelRequest/index.html.md) -- [deleteInboundShipping](https://docs.medusajs.com/references/js_sdk/admin/Exchange/methods/js_sdk.admin.Exchange.deleteInboundShipping/index.html.md) -- [deleteOutboundShipping](https://docs.medusajs.com/references/js_sdk/admin/Exchange/methods/js_sdk.admin.Exchange.deleteOutboundShipping/index.html.md) -- [removeInboundItem](https://docs.medusajs.com/references/js_sdk/admin/Exchange/methods/js_sdk.admin.Exchange.removeInboundItem/index.html.md) -- [list](https://docs.medusajs.com/references/js_sdk/admin/Exchange/methods/js_sdk.admin.Exchange.list/index.html.md) -- [request](https://docs.medusajs.com/references/js_sdk/admin/Exchange/methods/js_sdk.admin.Exchange.request/index.html.md) -- [create](https://docs.medusajs.com/references/js_sdk/admin/Exchange/methods/js_sdk.admin.Exchange.create/index.html.md) -- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/Exchange/methods/js_sdk.admin.Exchange.retrieve/index.html.md) -- [updateInboundItem](https://docs.medusajs.com/references/js_sdk/admin/Exchange/methods/js_sdk.admin.Exchange.updateInboundItem/index.html.md) -- [removeOutboundItem](https://docs.medusajs.com/references/js_sdk/admin/Exchange/methods/js_sdk.admin.Exchange.removeOutboundItem/index.html.md) -- [updateOutboundShipping](https://docs.medusajs.com/references/js_sdk/admin/Exchange/methods/js_sdk.admin.Exchange.updateOutboundShipping/index.html.md) -- [updateOutboundItem](https://docs.medusajs.com/references/js_sdk/admin/Exchange/methods/js_sdk.admin.Exchange.updateOutboundItem/index.html.md) -- [addItems](https://docs.medusajs.com/references/js_sdk/admin/OrderEdit/methods/js_sdk.admin.OrderEdit.addItems/index.html.md) -- [cancelRequest](https://docs.medusajs.com/references/js_sdk/admin/OrderEdit/methods/js_sdk.admin.OrderEdit.cancelRequest/index.html.md) -- [updateInboundShipping](https://docs.medusajs.com/references/js_sdk/admin/Exchange/methods/js_sdk.admin.Exchange.updateInboundShipping/index.html.md) -- [confirm](https://docs.medusajs.com/references/js_sdk/admin/OrderEdit/methods/js_sdk.admin.OrderEdit.confirm/index.html.md) -- [removeAddedItem](https://docs.medusajs.com/references/js_sdk/admin/OrderEdit/methods/js_sdk.admin.OrderEdit.removeAddedItem/index.html.md) -- [initiateRequest](https://docs.medusajs.com/references/js_sdk/admin/OrderEdit/methods/js_sdk.admin.OrderEdit.initiateRequest/index.html.md) -- [updateAddedItem](https://docs.medusajs.com/references/js_sdk/admin/OrderEdit/methods/js_sdk.admin.OrderEdit.updateAddedItem/index.html.md) -- [updateOriginalItem](https://docs.medusajs.com/references/js_sdk/admin/OrderEdit/methods/js_sdk.admin.OrderEdit.updateOriginalItem/index.html.md) +- [accept](https://docs.medusajs.com/references/js_sdk/admin/Invite/methods/js_sdk.admin.Invite.accept/index.html.md) +- [create](https://docs.medusajs.com/references/js_sdk/admin/Invite/methods/js_sdk.admin.Invite.create/index.html.md) +- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/InventoryItem/methods/js_sdk.admin.InventoryItem.retrieve/index.html.md) +- [delete](https://docs.medusajs.com/references/js_sdk/admin/Invite/methods/js_sdk.admin.Invite.delete/index.html.md) +- [list](https://docs.medusajs.com/references/js_sdk/admin/Invite/methods/js_sdk.admin.Invite.list/index.html.md) +- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/Invite/methods/js_sdk.admin.Invite.retrieve/index.html.md) +- [resend](https://docs.medusajs.com/references/js_sdk/admin/Invite/methods/js_sdk.admin.Invite.resend/index.html.md) - [list](https://docs.medusajs.com/references/js_sdk/admin/Notification/methods/js_sdk.admin.Notification.list/index.html.md) - [retrieve](https://docs.medusajs.com/references/js_sdk/admin/Notification/methods/js_sdk.admin.Notification.retrieve/index.html.md) -- [request](https://docs.medusajs.com/references/js_sdk/admin/OrderEdit/methods/js_sdk.admin.OrderEdit.request/index.html.md) -- [createServiceZone](https://docs.medusajs.com/references/js_sdk/admin/FulfillmentSet/methods/js_sdk.admin.FulfillmentSet.createServiceZone/index.html.md) -- [delete](https://docs.medusajs.com/references/js_sdk/admin/FulfillmentSet/methods/js_sdk.admin.FulfillmentSet.delete/index.html.md) -- [retrieveServiceZone](https://docs.medusajs.com/references/js_sdk/admin/FulfillmentSet/methods/js_sdk.admin.FulfillmentSet.retrieveServiceZone/index.html.md) -- [updateServiceZone](https://docs.medusajs.com/references/js_sdk/admin/FulfillmentSet/methods/js_sdk.admin.FulfillmentSet.updateServiceZone/index.html.md) -- [deleteServiceZone](https://docs.medusajs.com/references/js_sdk/admin/FulfillmentSet/methods/js_sdk.admin.FulfillmentSet.deleteServiceZone/index.html.md) - [cancel](https://docs.medusajs.com/references/js_sdk/admin/Order/methods/js_sdk.admin.Order.cancel/index.html.md) +- [createCreditLine](https://docs.medusajs.com/references/js_sdk/admin/Order/methods/js_sdk.admin.Order.createCreditLine/index.html.md) - [cancelFulfillment](https://docs.medusajs.com/references/js_sdk/admin/Order/methods/js_sdk.admin.Order.cancelFulfillment/index.html.md) -- [createFulfillment](https://docs.medusajs.com/references/js_sdk/admin/Order/methods/js_sdk.admin.Order.createFulfillment/index.html.md) - [cancelTransfer](https://docs.medusajs.com/references/js_sdk/admin/Order/methods/js_sdk.admin.Order.cancelTransfer/index.html.md) - [createShipment](https://docs.medusajs.com/references/js_sdk/admin/Order/methods/js_sdk.admin.Order.createShipment/index.html.md) +- [createFulfillment](https://docs.medusajs.com/references/js_sdk/admin/Order/methods/js_sdk.admin.Order.createFulfillment/index.html.md) - [listChanges](https://docs.medusajs.com/references/js_sdk/admin/Order/methods/js_sdk.admin.Order.listChanges/index.html.md) - [list](https://docs.medusajs.com/references/js_sdk/admin/Order/methods/js_sdk.admin.Order.list/index.html.md) - [listLineItems](https://docs.medusajs.com/references/js_sdk/admin/Order/methods/js_sdk.admin.Order.listLineItems/index.html.md) @@ -52617,193 +52595,216 @@ To learn more about the commerce features that Medusa provides, check out Medusa - [retrievePreview](https://docs.medusajs.com/references/js_sdk/admin/Order/methods/js_sdk.admin.Order.retrievePreview/index.html.md) - [retrieve](https://docs.medusajs.com/references/js_sdk/admin/Order/methods/js_sdk.admin.Order.retrieve/index.html.md) - [update](https://docs.medusajs.com/references/js_sdk/admin/Order/methods/js_sdk.admin.Order.update/index.html.md) -- [createCreditLine](https://docs.medusajs.com/references/js_sdk/admin/Order/methods/js_sdk.admin.Order.createCreditLine/index.html.md) -- [create](https://docs.medusajs.com/references/js_sdk/admin/PaymentCollection/methods/js_sdk.admin.PaymentCollection.create/index.html.md) -- [delete](https://docs.medusajs.com/references/js_sdk/admin/PaymentCollection/methods/js_sdk.admin.PaymentCollection.delete/index.html.md) -- [markAsPaid](https://docs.medusajs.com/references/js_sdk/admin/PaymentCollection/methods/js_sdk.admin.PaymentCollection.markAsPaid/index.html.md) -- [batchPrices](https://docs.medusajs.com/references/js_sdk/admin/PriceList/methods/js_sdk.admin.PriceList.batchPrices/index.html.md) -- [create](https://docs.medusajs.com/references/js_sdk/admin/PriceList/methods/js_sdk.admin.PriceList.create/index.html.md) -- [delete](https://docs.medusajs.com/references/js_sdk/admin/PriceList/methods/js_sdk.admin.PriceList.delete/index.html.md) -- [list](https://docs.medusajs.com/references/js_sdk/admin/PriceList/methods/js_sdk.admin.PriceList.list/index.html.md) -- [linkProducts](https://docs.medusajs.com/references/js_sdk/admin/PriceList/methods/js_sdk.admin.PriceList.linkProducts/index.html.md) -- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/PriceList/methods/js_sdk.admin.PriceList.retrieve/index.html.md) -- [update](https://docs.medusajs.com/references/js_sdk/admin/PriceList/methods/js_sdk.admin.PriceList.update/index.html.md) +- [cancelRequest](https://docs.medusajs.com/references/js_sdk/admin/OrderEdit/methods/js_sdk.admin.OrderEdit.cancelRequest/index.html.md) +- [confirm](https://docs.medusajs.com/references/js_sdk/admin/OrderEdit/methods/js_sdk.admin.OrderEdit.confirm/index.html.md) +- [addItems](https://docs.medusajs.com/references/js_sdk/admin/OrderEdit/methods/js_sdk.admin.OrderEdit.addItems/index.html.md) +- [initiateRequest](https://docs.medusajs.com/references/js_sdk/admin/OrderEdit/methods/js_sdk.admin.OrderEdit.initiateRequest/index.html.md) +- [removeAddedItem](https://docs.medusajs.com/references/js_sdk/admin/OrderEdit/methods/js_sdk.admin.OrderEdit.removeAddedItem/index.html.md) +- [request](https://docs.medusajs.com/references/js_sdk/admin/OrderEdit/methods/js_sdk.admin.OrderEdit.request/index.html.md) +- [updateAddedItem](https://docs.medusajs.com/references/js_sdk/admin/OrderEdit/methods/js_sdk.admin.OrderEdit.updateAddedItem/index.html.md) +- [updateOriginalItem](https://docs.medusajs.com/references/js_sdk/admin/OrderEdit/methods/js_sdk.admin.OrderEdit.updateOriginalItem/index.html.md) +- [create](https://docs.medusajs.com/references/js_sdk/admin/Customer/methods/js_sdk.admin.Customer.create/index.html.md) +- [batchCustomerGroups](https://docs.medusajs.com/references/js_sdk/admin/Customer/methods/js_sdk.admin.Customer.batchCustomerGroups/index.html.md) +- [delete](https://docs.medusajs.com/references/js_sdk/admin/Customer/methods/js_sdk.admin.Customer.delete/index.html.md) +- [createAddress](https://docs.medusajs.com/references/js_sdk/admin/Customer/methods/js_sdk.admin.Customer.createAddress/index.html.md) +- [deleteAddress](https://docs.medusajs.com/references/js_sdk/admin/Customer/methods/js_sdk.admin.Customer.deleteAddress/index.html.md) +- [list](https://docs.medusajs.com/references/js_sdk/admin/Customer/methods/js_sdk.admin.Customer.list/index.html.md) +- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/Customer/methods/js_sdk.admin.Customer.retrieve/index.html.md) +- [listAddresses](https://docs.medusajs.com/references/js_sdk/admin/Customer/methods/js_sdk.admin.Customer.listAddresses/index.html.md) +- [retrieveAddress](https://docs.medusajs.com/references/js_sdk/admin/Customer/methods/js_sdk.admin.Customer.retrieveAddress/index.html.md) +- [updateAddress](https://docs.medusajs.com/references/js_sdk/admin/Customer/methods/js_sdk.admin.Customer.updateAddress/index.html.md) +- [update](https://docs.medusajs.com/references/js_sdk/admin/Customer/methods/js_sdk.admin.Customer.update/index.html.md) +- [list](https://docs.medusajs.com/references/js_sdk/admin/Payment/methods/js_sdk.admin.Payment.list/index.html.md) +- [capture](https://docs.medusajs.com/references/js_sdk/admin/Payment/methods/js_sdk.admin.Payment.capture/index.html.md) +- [listPaymentProviders](https://docs.medusajs.com/references/js_sdk/admin/Payment/methods/js_sdk.admin.Payment.listPaymentProviders/index.html.md) +- [refund](https://docs.medusajs.com/references/js_sdk/admin/Payment/methods/js_sdk.admin.Payment.refund/index.html.md) - [list](https://docs.medusajs.com/references/js_sdk/admin/Plugin/methods/js_sdk.admin.Plugin.list/index.html.md) +- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/Payment/methods/js_sdk.admin.Payment.retrieve/index.html.md) +- [create](https://docs.medusajs.com/references/js_sdk/admin/PaymentCollection/methods/js_sdk.admin.PaymentCollection.create/index.html.md) +- [markAsPaid](https://docs.medusajs.com/references/js_sdk/admin/PaymentCollection/methods/js_sdk.admin.PaymentCollection.markAsPaid/index.html.md) +- [delete](https://docs.medusajs.com/references/js_sdk/admin/PaymentCollection/methods/js_sdk.admin.PaymentCollection.delete/index.html.md) +- [createServiceZone](https://docs.medusajs.com/references/js_sdk/admin/FulfillmentSet/methods/js_sdk.admin.FulfillmentSet.createServiceZone/index.html.md) +- [retrieveServiceZone](https://docs.medusajs.com/references/js_sdk/admin/FulfillmentSet/methods/js_sdk.admin.FulfillmentSet.retrieveServiceZone/index.html.md) +- [deleteServiceZone](https://docs.medusajs.com/references/js_sdk/admin/FulfillmentSet/methods/js_sdk.admin.FulfillmentSet.deleteServiceZone/index.html.md) +- [delete](https://docs.medusajs.com/references/js_sdk/admin/FulfillmentSet/methods/js_sdk.admin.FulfillmentSet.delete/index.html.md) +- [updateServiceZone](https://docs.medusajs.com/references/js_sdk/admin/FulfillmentSet/methods/js_sdk.admin.FulfillmentSet.updateServiceZone/index.html.md) - [create](https://docs.medusajs.com/references/js_sdk/admin/PricePreference/methods/js_sdk.admin.PricePreference.create/index.html.md) +- [list](https://docs.medusajs.com/references/js_sdk/admin/PricePreference/methods/js_sdk.admin.PricePreference.list/index.html.md) - [delete](https://docs.medusajs.com/references/js_sdk/admin/PricePreference/methods/js_sdk.admin.PricePreference.delete/index.html.md) - [retrieve](https://docs.medusajs.com/references/js_sdk/admin/PricePreference/methods/js_sdk.admin.PricePreference.retrieve/index.html.md) -- [list](https://docs.medusajs.com/references/js_sdk/admin/PricePreference/methods/js_sdk.admin.PricePreference.list/index.html.md) - [update](https://docs.medusajs.com/references/js_sdk/admin/PricePreference/methods/js_sdk.admin.PricePreference.update/index.html.md) -- [delete](https://docs.medusajs.com/references/js_sdk/admin/ProductCategory/methods/js_sdk.admin.ProductCategory.delete/index.html.md) -- [list](https://docs.medusajs.com/references/js_sdk/admin/ProductCategory/methods/js_sdk.admin.ProductCategory.list/index.html.md) -- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/ProductCategory/methods/js_sdk.admin.ProductCategory.retrieve/index.html.md) -- [updateProducts](https://docs.medusajs.com/references/js_sdk/admin/ProductCategory/methods/js_sdk.admin.ProductCategory.updateProducts/index.html.md) -- [batch](https://docs.medusajs.com/references/js_sdk/admin/Product/methods/js_sdk.admin.Product.batch/index.html.md) -- [create](https://docs.medusajs.com/references/js_sdk/admin/ProductCategory/methods/js_sdk.admin.ProductCategory.create/index.html.md) -- [update](https://docs.medusajs.com/references/js_sdk/admin/ProductCategory/methods/js_sdk.admin.ProductCategory.update/index.html.md) - [batchVariantInventoryItems](https://docs.medusajs.com/references/js_sdk/admin/Product/methods/js_sdk.admin.Product.batchVariantInventoryItems/index.html.md) +- [batch](https://docs.medusajs.com/references/js_sdk/admin/Product/methods/js_sdk.admin.Product.batch/index.html.md) - [batchVariants](https://docs.medusajs.com/references/js_sdk/admin/Product/methods/js_sdk.admin.Product.batchVariants/index.html.md) - [confirmImport](https://docs.medusajs.com/references/js_sdk/admin/Product/methods/js_sdk.admin.Product.confirmImport/index.html.md) - [createOption](https://docs.medusajs.com/references/js_sdk/admin/Product/methods/js_sdk.admin.Product.createOption/index.html.md) -- [delete](https://docs.medusajs.com/references/js_sdk/admin/Product/methods/js_sdk.admin.Product.delete/index.html.md) -- [createVariant](https://docs.medusajs.com/references/js_sdk/admin/Product/methods/js_sdk.admin.Product.createVariant/index.html.md) - [create](https://docs.medusajs.com/references/js_sdk/admin/Product/methods/js_sdk.admin.Product.create/index.html.md) -- [deleteOption](https://docs.medusajs.com/references/js_sdk/admin/Product/methods/js_sdk.admin.Product.deleteOption/index.html.md) -- [export](https://docs.medusajs.com/references/js_sdk/admin/Product/methods/js_sdk.admin.Product.export/index.html.md) +- [createVariant](https://docs.medusajs.com/references/js_sdk/admin/Product/methods/js_sdk.admin.Product.createVariant/index.html.md) - [deleteVariant](https://docs.medusajs.com/references/js_sdk/admin/Product/methods/js_sdk.admin.Product.deleteVariant/index.html.md) -- [import](https://docs.medusajs.com/references/js_sdk/admin/Product/methods/js_sdk.admin.Product.import/index.html.md) +- [deleteOption](https://docs.medusajs.com/references/js_sdk/admin/Product/methods/js_sdk.admin.Product.deleteOption/index.html.md) +- [delete](https://docs.medusajs.com/references/js_sdk/admin/Product/methods/js_sdk.admin.Product.delete/index.html.md) - [list](https://docs.medusajs.com/references/js_sdk/admin/Product/methods/js_sdk.admin.Product.list/index.html.md) -- [listVariants](https://docs.medusajs.com/references/js_sdk/admin/Product/methods/js_sdk.admin.Product.listVariants/index.html.md) -- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/Product/methods/js_sdk.admin.Product.retrieve/index.html.md) +- [import](https://docs.medusajs.com/references/js_sdk/admin/Product/methods/js_sdk.admin.Product.import/index.html.md) +- [export](https://docs.medusajs.com/references/js_sdk/admin/Product/methods/js_sdk.admin.Product.export/index.html.md) - [listOptions](https://docs.medusajs.com/references/js_sdk/admin/Product/methods/js_sdk.admin.Product.listOptions/index.html.md) - [retrieveOption](https://docs.medusajs.com/references/js_sdk/admin/Product/methods/js_sdk.admin.Product.retrieveOption/index.html.md) - [retrieveVariant](https://docs.medusajs.com/references/js_sdk/admin/Product/methods/js_sdk.admin.Product.retrieveVariant/index.html.md) -- [update](https://docs.medusajs.com/references/js_sdk/admin/Product/methods/js_sdk.admin.Product.update/index.html.md) +- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/Product/methods/js_sdk.admin.Product.retrieve/index.html.md) +- [listVariants](https://docs.medusajs.com/references/js_sdk/admin/Product/methods/js_sdk.admin.Product.listVariants/index.html.md) - [updateOption](https://docs.medusajs.com/references/js_sdk/admin/Product/methods/js_sdk.admin.Product.updateOption/index.html.md) +- [update](https://docs.medusajs.com/references/js_sdk/admin/Product/methods/js_sdk.admin.Product.update/index.html.md) - [updateVariant](https://docs.medusajs.com/references/js_sdk/admin/Product/methods/js_sdk.admin.Product.updateVariant/index.html.md) +- [batchPrices](https://docs.medusajs.com/references/js_sdk/admin/PriceList/methods/js_sdk.admin.PriceList.batchPrices/index.html.md) +- [create](https://docs.medusajs.com/references/js_sdk/admin/PriceList/methods/js_sdk.admin.PriceList.create/index.html.md) +- [list](https://docs.medusajs.com/references/js_sdk/admin/PriceList/methods/js_sdk.admin.PriceList.list/index.html.md) +- [delete](https://docs.medusajs.com/references/js_sdk/admin/PriceList/methods/js_sdk.admin.PriceList.delete/index.html.md) +- [linkProducts](https://docs.medusajs.com/references/js_sdk/admin/PriceList/methods/js_sdk.admin.PriceList.linkProducts/index.html.md) +- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/PriceList/methods/js_sdk.admin.PriceList.retrieve/index.html.md) +- [create](https://docs.medusajs.com/references/js_sdk/admin/ProductCategory/methods/js_sdk.admin.ProductCategory.create/index.html.md) +- [delete](https://docs.medusajs.com/references/js_sdk/admin/ProductCategory/methods/js_sdk.admin.ProductCategory.delete/index.html.md) +- [update](https://docs.medusajs.com/references/js_sdk/admin/PriceList/methods/js_sdk.admin.PriceList.update/index.html.md) +- [list](https://docs.medusajs.com/references/js_sdk/admin/ProductCategory/methods/js_sdk.admin.ProductCategory.list/index.html.md) +- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/ProductCategory/methods/js_sdk.admin.ProductCategory.retrieve/index.html.md) +- [updateProducts](https://docs.medusajs.com/references/js_sdk/admin/ProductCategory/methods/js_sdk.admin.ProductCategory.updateProducts/index.html.md) +- [update](https://docs.medusajs.com/references/js_sdk/admin/ProductCategory/methods/js_sdk.admin.ProductCategory.update/index.html.md) - [create](https://docs.medusajs.com/references/js_sdk/admin/ProductCollection/methods/js_sdk.admin.ProductCollection.create/index.html.md) +- [list](https://docs.medusajs.com/references/js_sdk/admin/ProductCollection/methods/js_sdk.admin.ProductCollection.list/index.html.md) - [delete](https://docs.medusajs.com/references/js_sdk/admin/ProductCollection/methods/js_sdk.admin.ProductCollection.delete/index.html.md) - [retrieve](https://docs.medusajs.com/references/js_sdk/admin/ProductCollection/methods/js_sdk.admin.ProductCollection.retrieve/index.html.md) -- [list](https://docs.medusajs.com/references/js_sdk/admin/ProductCollection/methods/js_sdk.admin.ProductCollection.list/index.html.md) -- [update](https://docs.medusajs.com/references/js_sdk/admin/ProductCollection/methods/js_sdk.admin.ProductCollection.update/index.html.md) - [updateProducts](https://docs.medusajs.com/references/js_sdk/admin/ProductCollection/methods/js_sdk.admin.ProductCollection.updateProducts/index.html.md) -- [capture](https://docs.medusajs.com/references/js_sdk/admin/Payment/methods/js_sdk.admin.Payment.capture/index.html.md) -- [listPaymentProviders](https://docs.medusajs.com/references/js_sdk/admin/Payment/methods/js_sdk.admin.Payment.listPaymentProviders/index.html.md) -- [list](https://docs.medusajs.com/references/js_sdk/admin/Payment/methods/js_sdk.admin.Payment.list/index.html.md) -- [refund](https://docs.medusajs.com/references/js_sdk/admin/Payment/methods/js_sdk.admin.Payment.refund/index.html.md) -- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/Payment/methods/js_sdk.admin.Payment.retrieve/index.html.md) -- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/ProductTag/methods/js_sdk.admin.ProductTag.retrieve/index.html.md) -- [create](https://docs.medusajs.com/references/js_sdk/admin/ProductTag/methods/js_sdk.admin.ProductTag.create/index.html.md) -- [delete](https://docs.medusajs.com/references/js_sdk/admin/ProductTag/methods/js_sdk.admin.ProductTag.delete/index.html.md) -- [list](https://docs.medusajs.com/references/js_sdk/admin/ProductTag/methods/js_sdk.admin.ProductTag.list/index.html.md) -- [update](https://docs.medusajs.com/references/js_sdk/admin/ProductTag/methods/js_sdk.admin.ProductTag.update/index.html.md) -- [list](https://docs.medusajs.com/references/js_sdk/admin/ProductVariant/methods/js_sdk.admin.ProductVariant.list/index.html.md) -- [list](https://docs.medusajs.com/references/js_sdk/admin/RefundReason/methods/js_sdk.admin.RefundReason.list/index.html.md) -- [delete](https://docs.medusajs.com/references/js_sdk/admin/Region/methods/js_sdk.admin.Region.delete/index.html.md) -- [list](https://docs.medusajs.com/references/js_sdk/admin/Region/methods/js_sdk.admin.Region.list/index.html.md) -- [create](https://docs.medusajs.com/references/js_sdk/admin/Region/methods/js_sdk.admin.Region.create/index.html.md) -- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/Region/methods/js_sdk.admin.Region.retrieve/index.html.md) -- [update](https://docs.medusajs.com/references/js_sdk/admin/Region/methods/js_sdk.admin.Region.update/index.html.md) -- [create](https://docs.medusajs.com/references/js_sdk/admin/Reservation/methods/js_sdk.admin.Reservation.create/index.html.md) -- [delete](https://docs.medusajs.com/references/js_sdk/admin/Reservation/methods/js_sdk.admin.Reservation.delete/index.html.md) -- [list](https://docs.medusajs.com/references/js_sdk/admin/Reservation/methods/js_sdk.admin.Reservation.list/index.html.md) -- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/Reservation/methods/js_sdk.admin.Reservation.retrieve/index.html.md) -- [update](https://docs.medusajs.com/references/js_sdk/admin/Reservation/methods/js_sdk.admin.Reservation.update/index.html.md) +- [update](https://docs.medusajs.com/references/js_sdk/admin/ProductCollection/methods/js_sdk.admin.ProductCollection.update/index.html.md) +- [create](https://docs.medusajs.com/references/js_sdk/admin/Promotion/methods/js_sdk.admin.Promotion.create/index.html.md) +- [addRules](https://docs.medusajs.com/references/js_sdk/admin/Promotion/methods/js_sdk.admin.Promotion.addRules/index.html.md) +- [delete](https://docs.medusajs.com/references/js_sdk/admin/Promotion/methods/js_sdk.admin.Promotion.delete/index.html.md) +- [listRuleAttributes](https://docs.medusajs.com/references/js_sdk/admin/Promotion/methods/js_sdk.admin.Promotion.listRuleAttributes/index.html.md) +- [listRuleValues](https://docs.medusajs.com/references/js_sdk/admin/Promotion/methods/js_sdk.admin.Promotion.listRuleValues/index.html.md) +- [list](https://docs.medusajs.com/references/js_sdk/admin/Promotion/methods/js_sdk.admin.Promotion.list/index.html.md) +- [listRules](https://docs.medusajs.com/references/js_sdk/admin/Promotion/methods/js_sdk.admin.Promotion.listRules/index.html.md) +- [update](https://docs.medusajs.com/references/js_sdk/admin/Promotion/methods/js_sdk.admin.Promotion.update/index.html.md) +- [removeRules](https://docs.medusajs.com/references/js_sdk/admin/Promotion/methods/js_sdk.admin.Promotion.removeRules/index.html.md) +- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/Promotion/methods/js_sdk.admin.Promotion.retrieve/index.html.md) +- [updateRules](https://docs.medusajs.com/references/js_sdk/admin/Promotion/methods/js_sdk.admin.Promotion.updateRules/index.html.md) +- [delete](https://docs.medusajs.com/references/js_sdk/admin/ProductType/methods/js_sdk.admin.ProductType.delete/index.html.md) - [create](https://docs.medusajs.com/references/js_sdk/admin/ProductType/methods/js_sdk.admin.ProductType.create/index.html.md) - [list](https://docs.medusajs.com/references/js_sdk/admin/ProductType/methods/js_sdk.admin.ProductType.list/index.html.md) -- [delete](https://docs.medusajs.com/references/js_sdk/admin/ProductType/methods/js_sdk.admin.ProductType.delete/index.html.md) - [retrieve](https://docs.medusajs.com/references/js_sdk/admin/ProductType/methods/js_sdk.admin.ProductType.retrieve/index.html.md) - [update](https://docs.medusajs.com/references/js_sdk/admin/ProductType/methods/js_sdk.admin.ProductType.update/index.html.md) +- [list](https://docs.medusajs.com/references/js_sdk/admin/ProductVariant/methods/js_sdk.admin.ProductVariant.list/index.html.md) +- [list](https://docs.medusajs.com/references/js_sdk/admin/RefundReason/methods/js_sdk.admin.RefundReason.list/index.html.md) +- [create](https://docs.medusajs.com/references/js_sdk/admin/Region/methods/js_sdk.admin.Region.create/index.html.md) +- [delete](https://docs.medusajs.com/references/js_sdk/admin/Region/methods/js_sdk.admin.Region.delete/index.html.md) +- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/Region/methods/js_sdk.admin.Region.retrieve/index.html.md) +- [list](https://docs.medusajs.com/references/js_sdk/admin/Region/methods/js_sdk.admin.Region.list/index.html.md) +- [update](https://docs.medusajs.com/references/js_sdk/admin/Region/methods/js_sdk.admin.Region.update/index.html.md) +- [delete](https://docs.medusajs.com/references/js_sdk/admin/Reservation/methods/js_sdk.admin.Reservation.delete/index.html.md) +- [create](https://docs.medusajs.com/references/js_sdk/admin/Reservation/methods/js_sdk.admin.Reservation.create/index.html.md) +- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/Reservation/methods/js_sdk.admin.Reservation.retrieve/index.html.md) +- [update](https://docs.medusajs.com/references/js_sdk/admin/Reservation/methods/js_sdk.admin.Reservation.update/index.html.md) +- [list](https://docs.medusajs.com/references/js_sdk/admin/Reservation/methods/js_sdk.admin.Reservation.list/index.html.md) - [addReturnShipping](https://docs.medusajs.com/references/js_sdk/admin/Return/methods/js_sdk.admin.Return.addReturnShipping/index.html.md) -- [addReturnItem](https://docs.medusajs.com/references/js_sdk/admin/Return/methods/js_sdk.admin.Return.addReturnItem/index.html.md) - [cancel](https://docs.medusajs.com/references/js_sdk/admin/Return/methods/js_sdk.admin.Return.cancel/index.html.md) +- [addReturnItem](https://docs.medusajs.com/references/js_sdk/admin/Return/methods/js_sdk.admin.Return.addReturnItem/index.html.md) +- [cancelRequest](https://docs.medusajs.com/references/js_sdk/admin/Return/methods/js_sdk.admin.Return.cancelRequest/index.html.md) - [cancelReceive](https://docs.medusajs.com/references/js_sdk/admin/Return/methods/js_sdk.admin.Return.cancelReceive/index.html.md) - [confirmReceive](https://docs.medusajs.com/references/js_sdk/admin/Return/methods/js_sdk.admin.Return.confirmReceive/index.html.md) - [confirmRequest](https://docs.medusajs.com/references/js_sdk/admin/Return/methods/js_sdk.admin.Return.confirmRequest/index.html.md) -- [cancelRequest](https://docs.medusajs.com/references/js_sdk/admin/Return/methods/js_sdk.admin.Return.cancelRequest/index.html.md) - [deleteReturnShipping](https://docs.medusajs.com/references/js_sdk/admin/Return/methods/js_sdk.admin.Return.deleteReturnShipping/index.html.md) - [dismissItems](https://docs.medusajs.com/references/js_sdk/admin/Return/methods/js_sdk.admin.Return.dismissItems/index.html.md) +- [initiateRequest](https://docs.medusajs.com/references/js_sdk/admin/Return/methods/js_sdk.admin.Return.initiateRequest/index.html.md) - [initiateReceive](https://docs.medusajs.com/references/js_sdk/admin/Return/methods/js_sdk.admin.Return.initiateReceive/index.html.md) - [list](https://docs.medusajs.com/references/js_sdk/admin/Return/methods/js_sdk.admin.Return.list/index.html.md) -- [initiateRequest](https://docs.medusajs.com/references/js_sdk/admin/Return/methods/js_sdk.admin.Return.initiateRequest/index.html.md) - [receiveItems](https://docs.medusajs.com/references/js_sdk/admin/Return/methods/js_sdk.admin.Return.receiveItems/index.html.md) - [removeDismissItem](https://docs.medusajs.com/references/js_sdk/admin/Return/methods/js_sdk.admin.Return.removeDismissItem/index.html.md) -- [removeReturnItem](https://docs.medusajs.com/references/js_sdk/admin/Return/methods/js_sdk.admin.Return.removeReturnItem/index.html.md) - [removeReceiveItem](https://docs.medusajs.com/references/js_sdk/admin/Return/methods/js_sdk.admin.Return.removeReceiveItem/index.html.md) +- [removeReturnItem](https://docs.medusajs.com/references/js_sdk/admin/Return/methods/js_sdk.admin.Return.removeReturnItem/index.html.md) - [retrieve](https://docs.medusajs.com/references/js_sdk/admin/Return/methods/js_sdk.admin.Return.retrieve/index.html.md) -- [updateReceiveItem](https://docs.medusajs.com/references/js_sdk/admin/Return/methods/js_sdk.admin.Return.updateReceiveItem/index.html.md) -- [updateRequest](https://docs.medusajs.com/references/js_sdk/admin/Return/methods/js_sdk.admin.Return.updateRequest/index.html.md) -- [updateReturnItem](https://docs.medusajs.com/references/js_sdk/admin/Return/methods/js_sdk.admin.Return.updateReturnItem/index.html.md) - [updateDismissItem](https://docs.medusajs.com/references/js_sdk/admin/Return/methods/js_sdk.admin.Return.updateDismissItem/index.html.md) +- [updateReceiveItem](https://docs.medusajs.com/references/js_sdk/admin/Return/methods/js_sdk.admin.Return.updateReceiveItem/index.html.md) +- [updateReturnItem](https://docs.medusajs.com/references/js_sdk/admin/Return/methods/js_sdk.admin.Return.updateReturnItem/index.html.md) +- [updateRequest](https://docs.medusajs.com/references/js_sdk/admin/Return/methods/js_sdk.admin.Return.updateRequest/index.html.md) - [updateReturnShipping](https://docs.medusajs.com/references/js_sdk/admin/Return/methods/js_sdk.admin.Return.updateReturnShipping/index.html.md) -- [create](https://docs.medusajs.com/references/js_sdk/admin/ShippingProfile/methods/js_sdk.admin.ShippingProfile.create/index.html.md) -- [delete](https://docs.medusajs.com/references/js_sdk/admin/ShippingProfile/methods/js_sdk.admin.ShippingProfile.delete/index.html.md) -- [list](https://docs.medusajs.com/references/js_sdk/admin/ShippingProfile/methods/js_sdk.admin.ShippingProfile.list/index.html.md) -- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/ShippingProfile/methods/js_sdk.admin.ShippingProfile.retrieve/index.html.md) -- [update](https://docs.medusajs.com/references/js_sdk/admin/ShippingProfile/methods/js_sdk.admin.ShippingProfile.update/index.html.md) -- [batchProducts](https://docs.medusajs.com/references/js_sdk/admin/SalesChannel/methods/js_sdk.admin.SalesChannel.batchProducts/index.html.md) -- [create](https://docs.medusajs.com/references/js_sdk/admin/SalesChannel/methods/js_sdk.admin.SalesChannel.create/index.html.md) -- [delete](https://docs.medusajs.com/references/js_sdk/admin/SalesChannel/methods/js_sdk.admin.SalesChannel.delete/index.html.md) -- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/SalesChannel/methods/js_sdk.admin.SalesChannel.retrieve/index.html.md) -- [list](https://docs.medusajs.com/references/js_sdk/admin/SalesChannel/methods/js_sdk.admin.SalesChannel.list/index.html.md) -- [create](https://docs.medusajs.com/references/js_sdk/admin/StockLocation/methods/js_sdk.admin.StockLocation.create/index.html.md) -- [update](https://docs.medusajs.com/references/js_sdk/admin/SalesChannel/methods/js_sdk.admin.SalesChannel.update/index.html.md) -- [createFulfillmentSet](https://docs.medusajs.com/references/js_sdk/admin/StockLocation/methods/js_sdk.admin.StockLocation.createFulfillmentSet/index.html.md) -- [delete](https://docs.medusajs.com/references/js_sdk/admin/StockLocation/methods/js_sdk.admin.StockLocation.delete/index.html.md) -- [updateProducts](https://docs.medusajs.com/references/js_sdk/admin/SalesChannel/methods/js_sdk.admin.SalesChannel.updateProducts/index.html.md) -- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/StockLocation/methods/js_sdk.admin.StockLocation.retrieve/index.html.md) -- [update](https://docs.medusajs.com/references/js_sdk/admin/StockLocation/methods/js_sdk.admin.StockLocation.update/index.html.md) -- [list](https://docs.medusajs.com/references/js_sdk/admin/StockLocation/methods/js_sdk.admin.StockLocation.list/index.html.md) -- [updateSalesChannels](https://docs.medusajs.com/references/js_sdk/admin/StockLocation/methods/js_sdk.admin.StockLocation.updateSalesChannels/index.html.md) - [create](https://docs.medusajs.com/references/js_sdk/admin/ReturnReason/methods/js_sdk.admin.ReturnReason.create/index.html.md) - [list](https://docs.medusajs.com/references/js_sdk/admin/ReturnReason/methods/js_sdk.admin.ReturnReason.list/index.html.md) -- [updateFulfillmentProviders](https://docs.medusajs.com/references/js_sdk/admin/StockLocation/methods/js_sdk.admin.StockLocation.updateFulfillmentProviders/index.html.md) -- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/ReturnReason/methods/js_sdk.admin.ReturnReason.retrieve/index.html.md) - [delete](https://docs.medusajs.com/references/js_sdk/admin/ReturnReason/methods/js_sdk.admin.ReturnReason.delete/index.html.md) +- [batchProducts](https://docs.medusajs.com/references/js_sdk/admin/SalesChannel/methods/js_sdk.admin.SalesChannel.batchProducts/index.html.md) - [update](https://docs.medusajs.com/references/js_sdk/admin/ReturnReason/methods/js_sdk.admin.ReturnReason.update/index.html.md) -- [delete](https://docs.medusajs.com/references/js_sdk/admin/ShippingOption/methods/js_sdk.admin.ShippingOption.delete/index.html.md) -- [create](https://docs.medusajs.com/references/js_sdk/admin/ShippingOption/methods/js_sdk.admin.ShippingOption.create/index.html.md) -- [list](https://docs.medusajs.com/references/js_sdk/admin/ShippingOption/methods/js_sdk.admin.ShippingOption.list/index.html.md) -- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/ShippingOption/methods/js_sdk.admin.ShippingOption.retrieve/index.html.md) -- [update](https://docs.medusajs.com/references/js_sdk/admin/ShippingOption/methods/js_sdk.admin.ShippingOption.update/index.html.md) -- [updateRules](https://docs.medusajs.com/references/js_sdk/admin/ShippingOption/methods/js_sdk.admin.ShippingOption.updateRules/index.html.md) -- [create](https://docs.medusajs.com/references/js_sdk/admin/TaxRate/methods/js_sdk.admin.TaxRate.create/index.html.md) -- [list](https://docs.medusajs.com/references/js_sdk/admin/TaxRate/methods/js_sdk.admin.TaxRate.list/index.html.md) -- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/TaxRate/methods/js_sdk.admin.TaxRate.retrieve/index.html.md) -- [delete](https://docs.medusajs.com/references/js_sdk/admin/TaxRate/methods/js_sdk.admin.TaxRate.delete/index.html.md) -- [update](https://docs.medusajs.com/references/js_sdk/admin/TaxRate/methods/js_sdk.admin.TaxRate.update/index.html.md) -- [create](https://docs.medusajs.com/references/js_sdk/admin/TaxRegion/methods/js_sdk.admin.TaxRegion.create/index.html.md) -- [delete](https://docs.medusajs.com/references/js_sdk/admin/TaxRegion/methods/js_sdk.admin.TaxRegion.delete/index.html.md) -- [list](https://docs.medusajs.com/references/js_sdk/admin/TaxRegion/methods/js_sdk.admin.TaxRegion.list/index.html.md) -- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/TaxRegion/methods/js_sdk.admin.TaxRegion.retrieve/index.html.md) -- [create](https://docs.medusajs.com/references/js_sdk/admin/Upload/methods/js_sdk.admin.Upload.create/index.html.md) -- [delete](https://docs.medusajs.com/references/js_sdk/admin/Upload/methods/js_sdk.admin.Upload.delete/index.html.md) -- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/Upload/methods/js_sdk.admin.Upload.retrieve/index.html.md) -- [delete](https://docs.medusajs.com/references/js_sdk/admin/User/methods/js_sdk.admin.User.delete/index.html.md) -- [list](https://docs.medusajs.com/references/js_sdk/admin/User/methods/js_sdk.admin.User.list/index.html.md) -- [me](https://docs.medusajs.com/references/js_sdk/admin/User/methods/js_sdk.admin.User.me/index.html.md) -- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/User/methods/js_sdk.admin.User.retrieve/index.html.md) -- [update](https://docs.medusajs.com/references/js_sdk/admin/User/methods/js_sdk.admin.User.update/index.html.md) +- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/ReturnReason/methods/js_sdk.admin.ReturnReason.retrieve/index.html.md) +- [delete](https://docs.medusajs.com/references/js_sdk/admin/SalesChannel/methods/js_sdk.admin.SalesChannel.delete/index.html.md) +- [create](https://docs.medusajs.com/references/js_sdk/admin/SalesChannel/methods/js_sdk.admin.SalesChannel.create/index.html.md) +- [list](https://docs.medusajs.com/references/js_sdk/admin/SalesChannel/methods/js_sdk.admin.SalesChannel.list/index.html.md) +- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/SalesChannel/methods/js_sdk.admin.SalesChannel.retrieve/index.html.md) +- [update](https://docs.medusajs.com/references/js_sdk/admin/SalesChannel/methods/js_sdk.admin.SalesChannel.update/index.html.md) +- [updateProducts](https://docs.medusajs.com/references/js_sdk/admin/SalesChannel/methods/js_sdk.admin.SalesChannel.updateProducts/index.html.md) +- [create](https://docs.medusajs.com/references/js_sdk/admin/ProductTag/methods/js_sdk.admin.ProductTag.create/index.html.md) +- [delete](https://docs.medusajs.com/references/js_sdk/admin/ProductTag/methods/js_sdk.admin.ProductTag.delete/index.html.md) +- [list](https://docs.medusajs.com/references/js_sdk/admin/ProductTag/methods/js_sdk.admin.ProductTag.list/index.html.md) +- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/ProductTag/methods/js_sdk.admin.ProductTag.retrieve/index.html.md) +- [update](https://docs.medusajs.com/references/js_sdk/admin/ProductTag/methods/js_sdk.admin.ProductTag.update/index.html.md) - [list](https://docs.medusajs.com/references/js_sdk/admin/Store/methods/js_sdk.admin.Store.list/index.html.md) - [update](https://docs.medusajs.com/references/js_sdk/admin/Store/methods/js_sdk.admin.Store.update/index.html.md) -- [list](https://docs.medusajs.com/references/js_sdk/admin/WorkflowExecution/methods/js_sdk.admin.WorkflowExecution.list/index.html.md) -- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/WorkflowExecution/methods/js_sdk.admin.WorkflowExecution.retrieve/index.html.md) - [retrieve](https://docs.medusajs.com/references/js_sdk/admin/Store/methods/js_sdk.admin.Store.retrieve/index.html.md) -- [addRules](https://docs.medusajs.com/references/js_sdk/admin/Promotion/methods/js_sdk.admin.Promotion.addRules/index.html.md) -- [create](https://docs.medusajs.com/references/js_sdk/admin/Promotion/methods/js_sdk.admin.Promotion.create/index.html.md) -- [delete](https://docs.medusajs.com/references/js_sdk/admin/Promotion/methods/js_sdk.admin.Promotion.delete/index.html.md) -- [list](https://docs.medusajs.com/references/js_sdk/admin/Promotion/methods/js_sdk.admin.Promotion.list/index.html.md) -- [listRuleAttributes](https://docs.medusajs.com/references/js_sdk/admin/Promotion/methods/js_sdk.admin.Promotion.listRuleAttributes/index.html.md) -- [listRuleValues](https://docs.medusajs.com/references/js_sdk/admin/Promotion/methods/js_sdk.admin.Promotion.listRuleValues/index.html.md) -- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/Promotion/methods/js_sdk.admin.Promotion.retrieve/index.html.md) -- [removeRules](https://docs.medusajs.com/references/js_sdk/admin/Promotion/methods/js_sdk.admin.Promotion.removeRules/index.html.md) -- [listRules](https://docs.medusajs.com/references/js_sdk/admin/Promotion/methods/js_sdk.admin.Promotion.listRules/index.html.md) -- [update](https://docs.medusajs.com/references/js_sdk/admin/Promotion/methods/js_sdk.admin.Promotion.update/index.html.md) -- [updateRules](https://docs.medusajs.com/references/js_sdk/admin/Promotion/methods/js_sdk.admin.Promotion.updateRules/index.html.md) +- [create](https://docs.medusajs.com/references/js_sdk/admin/ShippingOption/methods/js_sdk.admin.ShippingOption.create/index.html.md) +- [delete](https://docs.medusajs.com/references/js_sdk/admin/ShippingOption/methods/js_sdk.admin.ShippingOption.delete/index.html.md) +- [update](https://docs.medusajs.com/references/js_sdk/admin/ShippingOption/methods/js_sdk.admin.ShippingOption.update/index.html.md) +- [updateRules](https://docs.medusajs.com/references/js_sdk/admin/ShippingOption/methods/js_sdk.admin.ShippingOption.updateRules/index.html.md) +- [list](https://docs.medusajs.com/references/js_sdk/admin/ShippingOption/methods/js_sdk.admin.ShippingOption.list/index.html.md) +- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/ShippingOption/methods/js_sdk.admin.ShippingOption.retrieve/index.html.md) +- [list](https://docs.medusajs.com/references/js_sdk/admin/ShippingProfile/methods/js_sdk.admin.ShippingProfile.list/index.html.md) +- [create](https://docs.medusajs.com/references/js_sdk/admin/ShippingProfile/methods/js_sdk.admin.ShippingProfile.create/index.html.md) +- [update](https://docs.medusajs.com/references/js_sdk/admin/ShippingProfile/methods/js_sdk.admin.ShippingProfile.update/index.html.md) +- [delete](https://docs.medusajs.com/references/js_sdk/admin/ShippingProfile/methods/js_sdk.admin.ShippingProfile.delete/index.html.md) +- [create](https://docs.medusajs.com/references/js_sdk/admin/StockLocation/methods/js_sdk.admin.StockLocation.create/index.html.md) +- [createFulfillmentSet](https://docs.medusajs.com/references/js_sdk/admin/StockLocation/methods/js_sdk.admin.StockLocation.createFulfillmentSet/index.html.md) +- [delete](https://docs.medusajs.com/references/js_sdk/admin/StockLocation/methods/js_sdk.admin.StockLocation.delete/index.html.md) +- [list](https://docs.medusajs.com/references/js_sdk/admin/StockLocation/methods/js_sdk.admin.StockLocation.list/index.html.md) +- [update](https://docs.medusajs.com/references/js_sdk/admin/StockLocation/methods/js_sdk.admin.StockLocation.update/index.html.md) +- [updateFulfillmentProviders](https://docs.medusajs.com/references/js_sdk/admin/StockLocation/methods/js_sdk.admin.StockLocation.updateFulfillmentProviders/index.html.md) +- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/StockLocation/methods/js_sdk.admin.StockLocation.retrieve/index.html.md) +- [updateSalesChannels](https://docs.medusajs.com/references/js_sdk/admin/StockLocation/methods/js_sdk.admin.StockLocation.updateSalesChannels/index.html.md) +- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/ShippingProfile/methods/js_sdk.admin.ShippingProfile.retrieve/index.html.md) +- [create](https://docs.medusajs.com/references/js_sdk/admin/TaxRate/methods/js_sdk.admin.TaxRate.create/index.html.md) +- [list](https://docs.medusajs.com/references/js_sdk/admin/TaxRate/methods/js_sdk.admin.TaxRate.list/index.html.md) +- [delete](https://docs.medusajs.com/references/js_sdk/admin/TaxRate/methods/js_sdk.admin.TaxRate.delete/index.html.md) +- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/TaxRate/methods/js_sdk.admin.TaxRate.retrieve/index.html.md) +- [update](https://docs.medusajs.com/references/js_sdk/admin/TaxRate/methods/js_sdk.admin.TaxRate.update/index.html.md) +- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/WorkflowExecution/methods/js_sdk.admin.WorkflowExecution.retrieve/index.html.md) +- [list](https://docs.medusajs.com/references/js_sdk/admin/WorkflowExecution/methods/js_sdk.admin.WorkflowExecution.list/index.html.md) +- [create](https://docs.medusajs.com/references/js_sdk/admin/TaxRegion/methods/js_sdk.admin.TaxRegion.create/index.html.md) +- [delete](https://docs.medusajs.com/references/js_sdk/admin/TaxRegion/methods/js_sdk.admin.TaxRegion.delete/index.html.md) +- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/TaxRegion/methods/js_sdk.admin.TaxRegion.retrieve/index.html.md) +- [list](https://docs.medusajs.com/references/js_sdk/admin/User/methods/js_sdk.admin.User.list/index.html.md) +- [delete](https://docs.medusajs.com/references/js_sdk/admin/User/methods/js_sdk.admin.User.delete/index.html.md) +- [me](https://docs.medusajs.com/references/js_sdk/admin/User/methods/js_sdk.admin.User.me/index.html.md) +- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/User/methods/js_sdk.admin.User.retrieve/index.html.md) +- [list](https://docs.medusajs.com/references/js_sdk/admin/TaxRegion/methods/js_sdk.admin.TaxRegion.list/index.html.md) +- [update](https://docs.medusajs.com/references/js_sdk/admin/User/methods/js_sdk.admin.User.update/index.html.md) +- [delete](https://docs.medusajs.com/references/js_sdk/admin/Upload/methods/js_sdk.admin.Upload.delete/index.html.md) +- [create](https://docs.medusajs.com/references/js_sdk/admin/Upload/methods/js_sdk.admin.Upload.create/index.html.md) +- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/Upload/methods/js_sdk.admin.Upload.retrieve/index.html.md) ## JS SDK Auth - [callback](https://docs.medusajs.com/references/js-sdk/auth/callback/index.html.md) - [login](https://docs.medusajs.com/references/js-sdk/auth/login/index.html.md) -- [register](https://docs.medusajs.com/references/js-sdk/auth/register/index.html.md) -- [resetPassword](https://docs.medusajs.com/references/js-sdk/auth/resetPassword/index.html.md) - [logout](https://docs.medusajs.com/references/js-sdk/auth/logout/index.html.md) - [refresh](https://docs.medusajs.com/references/js-sdk/auth/refresh/index.html.md) +- [register](https://docs.medusajs.com/references/js-sdk/auth/register/index.html.md) +- [resetPassword](https://docs.medusajs.com/references/js-sdk/auth/resetPassword/index.html.md) - [updateProvider](https://docs.medusajs.com/references/js-sdk/auth/updateProvider/index.html.md) ## JS SDK Store - [cart](https://docs.medusajs.com/references/js-sdk/store/cart/index.html.md) -- [category](https://docs.medusajs.com/references/js-sdk/store/category/index.html.md) -- [collection](https://docs.medusajs.com/references/js-sdk/store/collection/index.html.md) - [customer](https://docs.medusajs.com/references/js-sdk/store/customer/index.html.md) +- [collection](https://docs.medusajs.com/references/js-sdk/store/collection/index.html.md) - [fulfillment](https://docs.medusajs.com/references/js-sdk/store/fulfillment/index.html.md) - [order](https://docs.medusajs.com/references/js-sdk/store/order/index.html.md) -- [product](https://docs.medusajs.com/references/js-sdk/store/product/index.html.md) - [payment](https://docs.medusajs.com/references/js-sdk/store/payment/index.html.md) +- [product](https://docs.medusajs.com/references/js-sdk/store/product/index.html.md) - [region](https://docs.medusajs.com/references/js-sdk/store/region/index.html.md) +- [category](https://docs.medusajs.com/references/js-sdk/store/category/index.html.md) # Configure Medusa Backend @@ -53071,21 +53072,6 @@ module.exports = defineConfig({ }) ``` -#### Properties - -- name: (\`string\`) The name of the session ID cookie to set in the response (and read from in the request). The default value is \`connect.sid\`. - Refer to \[express-session’s documentation]\(https://www.npmjs.com/package/express-session#name) for more details. -- resave: (\`boolean\`) Whether the session should be saved back to the session store, even if the session was never modified during the request. The default value is \`true\`. - Refer to \[express-session’s documentation]\(https://www.npmjs.com/package/express-session#resave) for more details. -- rolling: (\`boolean\`) Whether the session identifier cookie should be force-set on every response. The default value is \`false\`. - Refer to \[express-session’s documentation]\(https://www.npmjs.com/package/express-session#rolling) for more details. -- saveUninitialized: (\`boolean\`) Whether a session that is "uninitialized" is forced to be saved to the store. The default value is \`true\`. - Refer to \[express-session’s documentation]\(https://www.npmjs.com/package/express-session#saveUninitialized) for more details. -- secret: (\`string\`) The secret to sign the session ID cookie. By default, the value of \`http.cookieSecret\` is used. - Refer to \[express-session’s documentation]\(https://www.npmjs.com/package/express-session#secret) for details. -- ttl: (\`number\`) Used when calculating the \`Expires\` \`Set-Cookie\` attribute of cookies. By default, its value is \`10 \* 60 \* 60 \* 1000\`. - Refer to \[express-session’s documentation]\(https://www.npmjs.com/package/express-session#cookiemaxage) for details. - ### workerMode Configure the application's worker mode. @@ -53471,66 +53457,6 @@ These layout components allow you to set the layout of your [UI routes](https:// These components allow you to use common Medusa Admin components in your custom UI routes and widgets. -# Single Column Layout - Admin Components - -The Medusa Admin has pages with a single column of content. - -This doesn't include the sidebar, only the main content. - -![An example of an admin page with a single column](https://res.cloudinary.com/dza7lstvk/image/upload/v1728286605/Medusa%20Resources/single-column.png) - -To create a layout that you can use in UI routes to support one column of content, create the component `src/admin/layouts/single-column.tsx` with the following content: - -```tsx title="src/admin/layouts/single-column.tsx" -export type SingleColumnLayoutProps = { - children: React.ReactNode -} - -export const SingleColumnLayout = ({ children }: SingleColumnLayoutProps) => { - return ( -
- {children} -
- ) -} -``` - -The `SingleColumnLayout` accepts the content in the `children` props. - -*** - -## Example - -Use the `SingleColumnLayout` component in your UI routes that have a single column. For example: - -```tsx title="src/admin/routes/custom/page.tsx" highlights={[["9"]]} -import { defineRouteConfig } from "@medusajs/admin-sdk" -import { ChatBubbleLeftRight } from "@medusajs/icons" -import { Container } from "../../components/container" -import { SingleColumnLayout } from "../../layouts/single-column" -import { Header } from "../../components/header" - -const CustomPage = () => { - return ( - - -
- - - ) -} - -export const config = defineRouteConfig({ - label: "Custom", - icon: ChatBubbleLeftRight, -}) - -export default CustomPage -``` - -This UI route also uses a [Container](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/admin-components/components/container/index.html.md) and a [Header]() custom components. - - # Two Column Layout - Admin Components The Medusa Admin has pages with two columns of content. @@ -53610,6 +53536,291 @@ export default CustomPage This UI route also uses [Container](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/admin-components/components/container/index.html.md) and [Header]() custom components. +# Single Column Layout - Admin Components + +The Medusa Admin has pages with a single column of content. + +This doesn't include the sidebar, only the main content. + +![An example of an admin page with a single column](https://res.cloudinary.com/dza7lstvk/image/upload/v1728286605/Medusa%20Resources/single-column.png) + +To create a layout that you can use in UI routes to support one column of content, create the component `src/admin/layouts/single-column.tsx` with the following content: + +```tsx title="src/admin/layouts/single-column.tsx" +export type SingleColumnLayoutProps = { + children: React.ReactNode +} + +export const SingleColumnLayout = ({ children }: SingleColumnLayoutProps) => { + return ( +
+ {children} +
+ ) +} +``` + +The `SingleColumnLayout` accepts the content in the `children` props. + +*** + +## Example + +Use the `SingleColumnLayout` component in your UI routes that have a single column. For example: + +```tsx title="src/admin/routes/custom/page.tsx" highlights={[["9"]]} +import { defineRouteConfig } from "@medusajs/admin-sdk" +import { ChatBubbleLeftRight } from "@medusajs/icons" +import { Container } from "../../components/container" +import { SingleColumnLayout } from "../../layouts/single-column" +import { Header } from "../../components/header" + +const CustomPage = () => { + return ( + + +
+ + + ) +} + +export const config = defineRouteConfig({ + label: "Custom", + icon: ChatBubbleLeftRight, +}) + +export default CustomPage +``` + +This UI route also uses a [Container](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/admin-components/components/container/index.html.md) and a [Header]() custom components. + + +# Action Menu - Admin Components + +The Medusa Admin often provides additional actions in a dropdown shown when users click a three-dot icon. + +![Example of an action menu in the Medusa Admin](https://res.cloudinary.com/dza7lstvk/image/upload/v1728291319/Medusa%20Resources/action-menu_jnus6k.png) + +To create a component that shows this menu in your customizations, create the file `src/admin/components/action-menu.tsx` with the following content: + +```tsx title="src/admin/components/action-menu.tsx" +import { + DropdownMenu, + IconButton, + clx, +} from "@medusajs/ui" +import { EllipsisHorizontal } from "@medusajs/icons" +import { Link } from "react-router-dom" + +export type Action = { + icon: React.ReactNode + label: string + disabled?: boolean +} & ( + | { + to: string + onClick?: never + } + | { + onClick: () => void + to?: never + } +) + +export type ActionGroup = { + actions: Action[] +} + +export type ActionMenuProps = { + groups: ActionGroup[] +} + +export const ActionMenu = ({ groups }: ActionMenuProps) => { + return ( + + + + + + + + {groups.map((group, index) => { + if (!group.actions.length) { + return null + } + + const isLast = index === groups.length - 1 + + return ( + + {group.actions.map((action, index) => { + if (action.onClick) { + return ( + { + e.stopPropagation() + action.onClick() + }} + className={clx( + "[&_svg]:text-ui-fg-subtle flex items-center gap-x-2", + { + "[&_svg]:text-ui-fg-disabled": action.disabled, + } + )} + > + {action.icon} + {action.label} + + ) + } + + return ( +
+ + e.stopPropagation()}> + {action.icon} + {action.label} + + +
+ ) + })} + {!isLast && } +
+ ) + })} +
+
+ ) +} +``` + +The `ActionMenu` component shows a three-dots icon (or `EllipsisHorizontal`) from the [Medusa Icons package](https://docs.medusajs.com/ui/icons/overview/index.html.md) in a button. + +When the button is clicked, a dropdown menu is shown with the actions passed in the props. + +The component accepts the following props: + +- groups: (\`object\[]\`) Groups of actions to be shown in the dropdown. Each group is separated by a divider. + + - actions: (\`object\[]\`) Actions in the group. + + - icon: (\`React.ReactNode\`) + + - label: (\`string\`) The action's text. + + - disabled: (\`boolean\`) Whether the action is shown as disabled. + + - \`to\`: (\`string\`) The link to take the user to when they click the action. This is required if \`onClick\` isn't provided. + + - \`onClick\`: (\`() => void\`) The function to execute when the action is clicked. This is required if \`to\` isn't provided. + +*** + +## Example + +Use the `ActionMenu` component in any widget or UI route. + +For example, create the widget `src/admin/widgets/product-widget.tsx` with the following content: + +```tsx title="src/admin/widgets/product-widget.tsx" +import { defineWidgetConfig } from "@medusajs/admin-sdk" +import { Pencil } from "@medusajs/icons" +import { Container } from "../components/container" +import { ActionMenu } from "../components/action-menu" + +const ProductWidget = () => { + return ( + + , + label: "Edit", + onClick: () => { + alert("You clicked the edit action!") + }, + }, + ], + }, + ]} /> + + ) +} + +export const config = defineWidgetConfig({ + zone: "product.details.before", +}) + +export default ProductWidget +``` + +This widget also uses a [Container](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/admin-components/components/container/index.html.md) custom component. + +### Use in Header + +You can also use the action menu in the [Header](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/admin-components/components/header/index.html.md) component as part of its actions. + +For example: + +```tsx title="src/admin/widgets/product-widget.tsx" +import { defineWidgetConfig } from "@medusajs/admin-sdk" +import { Pencil } from "@medusajs/icons" +import { Container } from "../components/container" +import { Header } from "../components/header" + +const ProductWidget = () => { + return ( + +
, + label: "Edit", + onClick: () => { + alert("You clicked the edit action!") + }, + }, + ], + }, + ], + }, + }, + ]} + /> + + ) +} + +export const config = defineWidgetConfig({ + zone: "product.details.before", +}) + +export default ProductWidget +``` + + # Data Table - Admin Components This component is available after [Medusa v2.4.0+](https://github.com/medusajs/medusa/releases/tag/v2.4.0). @@ -54156,231 +54367,6 @@ export default ProductWidget This widget also uses a [Header](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/admin-components/components/header/index.html.md) custom component. -# Action Menu - Admin Components - -The Medusa Admin often provides additional actions in a dropdown shown when users click a three-dot icon. - -![Example of an action menu in the Medusa Admin](https://res.cloudinary.com/dza7lstvk/image/upload/v1728291319/Medusa%20Resources/action-menu_jnus6k.png) - -To create a component that shows this menu in your customizations, create the file `src/admin/components/action-menu.tsx` with the following content: - -```tsx title="src/admin/components/action-menu.tsx" -import { - DropdownMenu, - IconButton, - clx, -} from "@medusajs/ui" -import { EllipsisHorizontal } from "@medusajs/icons" -import { Link } from "react-router-dom" - -export type Action = { - icon: React.ReactNode - label: string - disabled?: boolean -} & ( - | { - to: string - onClick?: never - } - | { - onClick: () => void - to?: never - } -) - -export type ActionGroup = { - actions: Action[] -} - -export type ActionMenuProps = { - groups: ActionGroup[] -} - -export const ActionMenu = ({ groups }: ActionMenuProps) => { - return ( - - - - - - - - {groups.map((group, index) => { - if (!group.actions.length) { - return null - } - - const isLast = index === groups.length - 1 - - return ( - - {group.actions.map((action, index) => { - if (action.onClick) { - return ( - { - e.stopPropagation() - action.onClick() - }} - className={clx( - "[&_svg]:text-ui-fg-subtle flex items-center gap-x-2", - { - "[&_svg]:text-ui-fg-disabled": action.disabled, - } - )} - > - {action.icon} - {action.label} - - ) - } - - return ( -
- - e.stopPropagation()}> - {action.icon} - {action.label} - - -
- ) - })} - {!isLast && } -
- ) - })} -
-
- ) -} -``` - -The `ActionMenu` component shows a three-dots icon (or `EllipsisHorizontal`) from the [Medusa Icons package](https://docs.medusajs.com/ui/icons/overview/index.html.md) in a button. - -When the button is clicked, a dropdown menu is shown with the actions passed in the props. - -The component accepts the following props: - -- groups: (\`object\[]\`) Groups of actions to be shown in the dropdown. Each group is separated by a divider. - - - actions: (\`object\[]\`) Actions in the group. - - - icon: (\`React.ReactNode\`) - - - label: (\`string\`) The action's text. - - - disabled: (\`boolean\`) Whether the action is shown as disabled. - - - \`to\`: (\`string\`) The link to take the user to when they click the action. This is required if \`onClick\` isn't provided. - - - \`onClick\`: (\`() => void\`) The function to execute when the action is clicked. This is required if \`to\` isn't provided. - -*** - -## Example - -Use the `ActionMenu` component in any widget or UI route. - -For example, create the widget `src/admin/widgets/product-widget.tsx` with the following content: - -```tsx title="src/admin/widgets/product-widget.tsx" -import { defineWidgetConfig } from "@medusajs/admin-sdk" -import { Pencil } from "@medusajs/icons" -import { Container } from "../components/container" -import { ActionMenu } from "../components/action-menu" - -const ProductWidget = () => { - return ( - - , - label: "Edit", - onClick: () => { - alert("You clicked the edit action!") - }, - }, - ], - }, - ]} /> - - ) -} - -export const config = defineWidgetConfig({ - zone: "product.details.before", -}) - -export default ProductWidget -``` - -This widget also uses a [Container](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/admin-components/components/container/index.html.md) custom component. - -### Use in Header - -You can also use the action menu in the [Header](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/admin-components/components/header/index.html.md) component as part of its actions. - -For example: - -```tsx title="src/admin/widgets/product-widget.tsx" -import { defineWidgetConfig } from "@medusajs/admin-sdk" -import { Pencil } from "@medusajs/icons" -import { Container } from "../components/container" -import { Header } from "../components/header" - -const ProductWidget = () => { - return ( - -
, - label: "Edit", - onClick: () => { - alert("You clicked the edit action!") - }, - }, - ], - }, - ], - }, - }, - ]} - /> - - ) -} - -export const config = defineWidgetConfig({ - zone: "product.details.before", -}) - -export default ProductWidget -``` - - # Header - Admin Components Each section in the Medusa Admin has a header with a title, and optionally a subtitle with buttons to perform an action. @@ -55100,6 +55086,326 @@ This component uses the [Container](https://docs.medusajs.com/Users/shahednasser It will add at the top of a product's details page a new section, and in its header you'll find an "Edit Item" button. If you click on it, it will open the drawer with your form. +# JSON View - Admin Components + +Detail pages in the Medusa Admin show a JSON section to view the current page's details in JSON format. + +![Example of a JSON section in the admin](https://res.cloudinary.com/dza7lstvk/image/upload/v1728295129/Medusa%20Resources/json_dtbsgm.png) + +To create a component that shows a JSON section in your customizations, create the file `src/admin/components/json-view-section.tsx` with the following content: + +```tsx title="src/admin/components/json-view-section.tsx" +import { + ArrowUpRightOnBox, + Check, + SquareTwoStack, + TriangleDownMini, + XMarkMini, +} from "@medusajs/icons" +import { + Badge, + Container, + Drawer, + Heading, + IconButton, + Kbd, +} from "@medusajs/ui" +import Primitive from "@uiw/react-json-view" +import { CSSProperties, MouseEvent, Suspense, useState } from "react" + +type JsonViewSectionProps = { + data: object + title?: string +} + +export const JsonViewSection = ({ data }: JsonViewSectionProps) => { + const numberOfKeys = Object.keys(data).length + + return ( + +
+ JSON + + {numberOfKeys} keys + +
+ + + + + + + +
+
+ + + + {numberOfKeys} + + + +
+
+ + esc + + + + + + +
+
+ +
+
} + > + + } /> + ( + null + )} + /> + ( + undefined + )} + /> + { + return ( + + {Object.keys(value as object).length} items + + ) + }} + /> + + + + + : + + { + return + }} + /> + + + +
+
+
+
+ ) +} + +type CopiedProps = { + style?: CSSProperties + value: object | undefined +} + +const Copied = ({ style, value }: CopiedProps) => { + const [copied, setCopied] = useState(false) + + const handler = (e: MouseEvent) => { + e.stopPropagation() + setCopied(true) + + if (typeof value === "string") { + navigator.clipboard.writeText(value) + } else { + const json = JSON.stringify(value, null, 2) + navigator.clipboard.writeText(json) + } + + setTimeout(() => { + setCopied(false) + }, 2000) + } + + const styl = { whiteSpace: "nowrap", width: "20px" } + + if (copied) { + return ( + + + + ) + } + + return ( + + + + ) +} +``` + +The `JsonViewSection` component shows a section with the "JSON" title and a button to show the data as JSON in a drawer or side window. + +The `JsonViewSection` accepts a `data` prop, which is the data to show as a JSON object in the drawer. + +*** + +## Example + +Use the `JsonViewSection` component in any widget or UI route. + +For example, create the widget `src/admin/widgets/product-widget.tsx` with the following content: + +```tsx title="src/admin/widgets/product-widget.tsx" +import { defineWidgetConfig } from "@medusajs/admin-sdk" +import { JsonViewSection } from "../components/json-view-section" + +const ProductWidget = () => { + return +} + +export const config = defineWidgetConfig({ + zone: "product.details.before", +}) + +export default ProductWidget +``` + +This shows the JSON section at the top of the product page, passing it the object `{ name: "John" }`. + + +# Section Row - Admin Components + +The Medusa Admin often shows information in rows of label-values, such as when showing a product's details. + +![Example of a section row in the Medusa Admin](https://res.cloudinary.com/dza7lstvk/image/upload/v1728292781/Medusa%20Resources/section-row_kknbnw.png) + +To create a component that shows information in the same structure, create the file `src/admin/components/section-row.tsx` with the following content: + +```tsx title="src/admin/components/section-row.tsx" +import { Text, clx } from "@medusajs/ui" + +export type SectionRowProps = { + title: string + value?: React.ReactNode | string | null + actions?: React.ReactNode +} + +export const SectionRow = ({ title, value, actions }: SectionRowProps) => { + const isValueString = typeof value === "string" || !value + + return ( +
+ + {title} + + + {isValueString ? ( + + {value ?? "-"} + + ) : ( +
{value}
+ )} + + {actions &&
{actions}
} +
+ ) +} +``` + +The `SectionRow` component shows a title and a value in the same row. + +It accepts the following props: + +- title: (\`string\`) The title to show on the left side. +- value: (\`React.ReactNode\` \\| \`string\` \\| \`null\`) The value to show on the right side. +- actions: (\`React.ReactNode\`) The actions to show at the end of the row. + +*** + +## Example + +Use the `SectionRow` component in any widget or UI route. + +For example, create the widget `src/admin/widgets/product-widget.tsx` with the following content: + +```tsx title="src/admin/widgets/product-widget.tsx" +import { defineWidgetConfig } from "@medusajs/admin-sdk" +import { Container } from "../components/container" +import { Header } from "../components/header" +import { SectionRow } from "../components/section-row" + +const ProductWidget = () => { + return ( + +
+ + + ) +} + +export const config = defineWidgetConfig({ + zone: "product.details.before", +}) + +export default ProductWidget +``` + +This widget also uses the [Container](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/admin-components/components/container/index.html.md) and [Header](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/admin-components/components/header/index.html.md) custom component. + + # Table - Admin Components If you're using [Medusa v2.4.0+](https://github.com/medusajs/medusa/releases/tag/v2.4.0), it's recommended to use the [Data Table](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/admin-components/components/data-table/index.html.md) component instead as it provides features for sorting, filtering, pagination, and more with a simpler API. @@ -55390,326 +55696,6 @@ If `data` isn't `undefined`, you display the `Table` component passing it the fo To test it out, log into the Medusa Admin and open `http://localhost:9000/app/custom`. You'll find a table of products with pagination. -# Section Row - Admin Components - -The Medusa Admin often shows information in rows of label-values, such as when showing a product's details. - -![Example of a section row in the Medusa Admin](https://res.cloudinary.com/dza7lstvk/image/upload/v1728292781/Medusa%20Resources/section-row_kknbnw.png) - -To create a component that shows information in the same structure, create the file `src/admin/components/section-row.tsx` with the following content: - -```tsx title="src/admin/components/section-row.tsx" -import { Text, clx } from "@medusajs/ui" - -export type SectionRowProps = { - title: string - value?: React.ReactNode | string | null - actions?: React.ReactNode -} - -export const SectionRow = ({ title, value, actions }: SectionRowProps) => { - const isValueString = typeof value === "string" || !value - - return ( -
- - {title} - - - {isValueString ? ( - - {value ?? "-"} - - ) : ( -
{value}
- )} - - {actions &&
{actions}
} -
- ) -} -``` - -The `SectionRow` component shows a title and a value in the same row. - -It accepts the following props: - -- title: (\`string\`) The title to show on the left side. -- value: (\`React.ReactNode\` \\| \`string\` \\| \`null\`) The value to show on the right side. -- actions: (\`React.ReactNode\`) The actions to show at the end of the row. - -*** - -## Example - -Use the `SectionRow` component in any widget or UI route. - -For example, create the widget `src/admin/widgets/product-widget.tsx` with the following content: - -```tsx title="src/admin/widgets/product-widget.tsx" -import { defineWidgetConfig } from "@medusajs/admin-sdk" -import { Container } from "../components/container" -import { Header } from "../components/header" -import { SectionRow } from "../components/section-row" - -const ProductWidget = () => { - return ( - -
- - - ) -} - -export const config = defineWidgetConfig({ - zone: "product.details.before", -}) - -export default ProductWidget -``` - -This widget also uses the [Container](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/admin-components/components/container/index.html.md) and [Header](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/admin-components/components/header/index.html.md) custom component. - - -# JSON View - Admin Components - -Detail pages in the Medusa Admin show a JSON section to view the current page's details in JSON format. - -![Example of a JSON section in the admin](https://res.cloudinary.com/dza7lstvk/image/upload/v1728295129/Medusa%20Resources/json_dtbsgm.png) - -To create a component that shows a JSON section in your customizations, create the file `src/admin/components/json-view-section.tsx` with the following content: - -```tsx title="src/admin/components/json-view-section.tsx" -import { - ArrowUpRightOnBox, - Check, - SquareTwoStack, - TriangleDownMini, - XMarkMini, -} from "@medusajs/icons" -import { - Badge, - Container, - Drawer, - Heading, - IconButton, - Kbd, -} from "@medusajs/ui" -import Primitive from "@uiw/react-json-view" -import { CSSProperties, MouseEvent, Suspense, useState } from "react" - -type JsonViewSectionProps = { - data: object - title?: string -} - -export const JsonViewSection = ({ data }: JsonViewSectionProps) => { - const numberOfKeys = Object.keys(data).length - - return ( - -
- JSON - - {numberOfKeys} keys - -
- - - - - - - -
-
- - - - {numberOfKeys} - - - -
-
- - esc - - - - - - -
-
- -
-
} - > - - } /> - ( - null - )} - /> - ( - undefined - )} - /> - { - return ( - - {Object.keys(value as object).length} items - - ) - }} - /> - - - - - : - - { - return - }} - /> - - - -
-
-
-
- ) -} - -type CopiedProps = { - style?: CSSProperties - value: object | undefined -} - -const Copied = ({ style, value }: CopiedProps) => { - const [copied, setCopied] = useState(false) - - const handler = (e: MouseEvent) => { - e.stopPropagation() - setCopied(true) - - if (typeof value === "string") { - navigator.clipboard.writeText(value) - } else { - const json = JSON.stringify(value, null, 2) - navigator.clipboard.writeText(json) - } - - setTimeout(() => { - setCopied(false) - }, 2000) - } - - const styl = { whiteSpace: "nowrap", width: "20px" } - - if (copied) { - return ( - - - - ) - } - - return ( - - - - ) -} -``` - -The `JsonViewSection` component shows a section with the "JSON" title and a button to show the data as JSON in a drawer or side window. - -The `JsonViewSection` accepts a `data` prop, which is the data to show as a JSON object in the drawer. - -*** - -## Example - -Use the `JsonViewSection` component in any widget or UI route. - -For example, create the widget `src/admin/widgets/product-widget.tsx` with the following content: - -```tsx title="src/admin/widgets/product-widget.tsx" -import { defineWidgetConfig } from "@medusajs/admin-sdk" -import { JsonViewSection } from "../components/json-view-section" - -const ProductWidget = () => { - return -} - -export const config = defineWidgetConfig({ - zone: "product.details.before", -}) - -export default ProductWidget -``` - -This shows the JSON section at the top of the product page, passing it the object `{ name: "John" }`. - - # Service Factory Reference This section of the documentation provides a reference of the methods generated for services extending the service factory (`MedusaService`), and how to use them. @@ -55737,84 +55723,6 @@ Some examples of method names: The reference uses only the operation name to refer to the method. -# delete Method - Service Factory Reference - -This method deletes one or more records. - -## Delete One Record - -```ts -await postModuleService.deletePosts("123") -``` - -To delete one record, pass its ID as a parameter of the method. - -*** - -## Delete Multiple Records - -```ts -await postModuleService.deletePosts([ - "123", - "321", -]) -``` - -To delete multiple records, pass an array of IDs as a parameter of the method. - -*** - -## Delete Records Matching Filters - -```ts -await postModuleService.deletePosts({ - name: "My Post", -}) -``` - -To delete records matching a set of filters, pass an object of filters as a parameter. - -Learn more about accepted filters in [this documentation](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/service-factory-reference/tips/filtering/index.html.md). - - -# create Method - Service Factory Reference - -This method creates one or more records of the data model. - -## Create One Record - -```ts -const post = await postModuleService.createPosts({ - name: "My Post", - published_at: new Date(), - metadata: { - external_id: "1234", - }, -}) -``` - -If an object is passed of the method, an object of the created record is also returned. - -*** - -## Create Multiple Records - -```ts -const posts = await postModuleService.createPosts([ - { - name: "My Post", - published_at: new Date(), - }, - { - name: "My Other Post", - published_at: new Date(), - }, -]) -``` - -If an array is passed of the method, an array of the created records is also returned. - - # list Method - Service Factory Reference This method retrieves a list of records. @@ -55933,92 +55841,43 @@ To sort records by one or more properties, pass to the second object parameter t The method returns an array of the first `15` records matching the filters. -# restore Method - Service Factory Reference +# create Method - Service Factory Reference -This method restores one or more records of the data model that were [soft-deleted](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/service-factory-reference/methods/soft-delete/index.html.md). +This method creates one or more records of the data model. -## Restore One Record +## Create One Record ```ts -const restoredPosts = await postModuleService.restorePosts("123") -``` - -### Parameters - -To restore one record, pass its ID as a parameter of the method. - -### Returns - -The method returns an object, whose keys are of the format `{camel_case_data_model_name}_id`, and their values are arrays of restored records' IDs. - -For example, the returned object of the above example is: - -```ts -restoredPosts = { - post_id: ["123"], -} -``` - -*** - -## Restore Multiple Records - -```ts -const restoredPosts = await postModuleService.restorePosts([ - "123", - "321", -]) -``` - -### Parameters - -To restore multiple records, pass an array of IDs as a parameter of the method. - -### Returns - -The method returns an object, whose keys are of the format `{camel_case_data_model_name}_id`, and their values are arrays of restored records' IDs. - -For example, the returned object of the above example is: - -```ts -restoredPosts = { - post_id: [ - "123", - "321", - ], -} -``` - -*** - -## Restore Records Matching Filters - -```ts -const restoredPosts = await postModuleService.restorePosts({ +const post = await postModuleService.createPosts({ name: "My Post", + published_at: new Date(), + metadata: { + external_id: "1234", + }, }) ``` -### Parameters +If an object is passed of the method, an object of the created record is also returned. -To restore records matching a set of filters, pass an object of fitlers as a parameter of the method. +*** -Learn more about accepted filters in [this documentation](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/service-factory-reference/tips/filtering/index.html.md). - -### Returns - -The method returns an object, whose keys are of the format `{camel_case_data_model_name}_id`, and their values are arrays of restored records' IDs. - -For example, the returned object of the above example is: +## Create Multiple Records ```ts -restoredPosts = { - post_id: [ - "123", - ], -} +const posts = await postModuleService.createPosts([ + { + name: "My Post", + published_at: new Date(), + }, + { + name: "My Other Post", + published_at: new Date(), + }, +]) ``` +If an array is passed of the method, an array of the created records is also returned. + # listAndCount Method - Service Factory Reference @@ -56156,6 +56015,46 @@ The method returns an array with two items: 2. The second is the total count of records. +# delete Method - Service Factory Reference + +This method deletes one or more records. + +## Delete One Record + +```ts +await postModuleService.deletePosts("123") +``` + +To delete one record, pass its ID as a parameter of the method. + +*** + +## Delete Multiple Records + +```ts +await postModuleService.deletePosts([ + "123", + "321", +]) +``` + +To delete multiple records, pass an array of IDs as a parameter of the method. + +*** + +## Delete Records Matching Filters + +```ts +await postModuleService.deletePosts({ + name: "My Post", +}) +``` + +To delete records matching a set of filters, pass an object of filters as a parameter. + +Learn more about accepted filters in [this documentation](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/service-factory-reference/tips/filtering/index.html.md). + + # retrieve Method - Service Factory Reference This method retrieves one record of the data model by its ID. @@ -56213,6 +56112,93 @@ By default, all of the record's properties are retrieved. To select specific one The method returns the record as an object. +# restore Method - Service Factory Reference + +This method restores one or more records of the data model that were [soft-deleted](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/service-factory-reference/methods/soft-delete/index.html.md). + +## Restore One Record + +```ts +const restoredPosts = await postModuleService.restorePosts("123") +``` + +### Parameters + +To restore one record, pass its ID as a parameter of the method. + +### Returns + +The method returns an object, whose keys are of the format `{camel_case_data_model_name}_id`, and their values are arrays of restored records' IDs. + +For example, the returned object of the above example is: + +```ts +restoredPosts = { + post_id: ["123"], +} +``` + +*** + +## Restore Multiple Records + +```ts +const restoredPosts = await postModuleService.restorePosts([ + "123", + "321", +]) +``` + +### Parameters + +To restore multiple records, pass an array of IDs as a parameter of the method. + +### Returns + +The method returns an object, whose keys are of the format `{camel_case_data_model_name}_id`, and their values are arrays of restored records' IDs. + +For example, the returned object of the above example is: + +```ts +restoredPosts = { + post_id: [ + "123", + "321", + ], +} +``` + +*** + +## Restore Records Matching Filters + +```ts +const restoredPosts = await postModuleService.restorePosts({ + name: "My Post", +}) +``` + +### Parameters + +To restore records matching a set of filters, pass an object of fitlers as a parameter of the method. + +Learn more about accepted filters in [this documentation](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/service-factory-reference/tips/filtering/index.html.md). + +### Returns + +The method returns an object, whose keys are of the format `{camel_case_data_model_name}_id`, and their values are arrays of restored records' IDs. + +For example, the returned object of the above example is: + +```ts +restoredPosts = { + post_id: [ + "123", + ], +} +``` + + # softDelete Method - Service Factory Reference This method soft deletes one or more records of the data model. @@ -57139,6 +57125,125 @@ How to install and setup Medusa UI. +# Medusa Admin Extension + +How to install and use Medusa UI for building Admin extensions. + +## Installation + +*** + +The `@medusajs/ui` package is a already installed as a dependency of the `@medusajs/admin` package. Due to this you can simply import the package and use it in your local Admin extensions. + +If you are building a Admin extension as part of a Medusa plugin, you can install the package as a dependency of your plugin. + +```bash +npm install @medusajs/ui +``` + +## Configuration + +*** + +The configuration of the UI package is handled by the `@medusajs/admin` package. Therefore, you do not need to any additional configuration to use the UI package in your Admin extensions. + + +# Standalone Project + +How to install and use Medusa UI in a standalone project. + +## Installation + +*** + +Medusa UI is a React UI library and while it's intended for usage within Medusa projects, it can also be used in any React project. + +### Install Medusa UI + +Install the React UI library with the following command: + +```bash +npm install @medusajs/ui +``` + +### Configuring Tailwind CSS + +The components are styled using Tailwind CSS, and in order to use them, you will need to install Tailwind CSS in your project as well. +For more information on how to install Tailwind CSS, please refer to the [Tailwind CSS documentation](https://tailwindcss.com/docs/installation). + +All of the classes used for Medusa UI are shipped as a Tailwind CSS customization. +You can install it with the following command: + +```bash +npm install @medusajs/ui-preset +``` + +After you have installed Tailwind CSS and the Medusa UI preset, you need to add the following to your `tailwind.config.js`file: + +```tsx +module.exports = { + presets: [require("@medusajs/ui-preset")], + // ... +} +``` + +In order for the styles to be applied correctly to the components, you will also need to ensure that +`@medusajs/ui` is included in the content field of your `tailwind.config.js` file: + +```tsx +module.exports = { + content: [ + // ... + "./node_modules/@medusajs/ui/dist/**/*.{js,jsx,ts,tsx}", + ], + // ... +} +``` + +If you are working within a monorepo, you may need to add the path to the `@medusajs/ui` package in your `tailwind.config.js` like so: + +```tsx +const path = require("path") + +const uiPath = path.resolve( + require.resolve("@medusajs/ui"), + "../..", + "\*_/_.{js,jsx,ts,tsx}" +) + +module.exports = { + content: [ + // ... + uiPath, + ], + // ... +} + +``` + +## Start building + +*** + +You are now ready to start building your application with Medusa UI. You can import the components like so: + +```tsx +import { Button, Drawer } from "@medusajs/ui" +``` + +## Updating UI Packages + +*** + +Medusa's design-system packages, including `@medusajs/ui`, `@medusajs/ui-preset`, and `@medusajs/ui-icons`, are versioned independently. However, they're still part of the latest Medusa release. So, you can browse the [release notes](https://github.com/medusajs/medusa/releases) to see if there are any breaking changes to these packages. + +To update these packages, update their version in your `package.json` file and re-install dependencies. For example: + +```bash +npm install @medusajs/ui +``` + + # Alert A component for displaying important messages. @@ -57904,6 +58009,7 @@ const snippets = [ label: "Medusa JS SDK", language: "jsx", code: `// Install the JS SDK in your storefront project: @medusajs/js-sdk\n\nimport Medusa from "@medusajs/js-sdk"\n\nconst medusa = new Medusa({\n baseUrl: import.meta.env.NEXT_PUBLIC_BACKEND_URL || "/",\n publishableKey: process.env.NEXT_PUBLIC_MEDUSA_PAK\n})\nconst { product } = await medusa.store.products.retrieve("prod_123")\nconsole.log(product.id)`, + hideLineNumbers: true, }, ] @@ -57924,6 +58030,37 @@ export default function CodeBlockNoLines() { ``` +### No Copy Button + +```tsx +import { CodeBlock, Label } from "@medusajs/ui" + +const snippets = [ + { + label: "Medusa JS SDK", + language: "jsx", + code: `// Install the JS SDK in your storefront project: @medusajs/js-sdk\n\nimport Medusa from "@medusajs/js-sdk"\n\nconst medusa = new Medusa({\n baseUrl: import.meta.env.NEXT_PUBLIC_BACKEND_URL || "/",\n publishableKey: process.env.NEXT_PUBLIC_MEDUSA_PAK\n})\nconst { product } = await medusa.store.products.retrieve("prod_123")\nconsole.log(product.id)`, + hideCopy: true, + }, +] + +export default function CodeBlockNoCopy() { + return ( +
+ + + + + + + + +
+ ) +} + +``` + # Command Bar @@ -63528,125 +63665,6 @@ If you're using the `Tooltip` component in a project other than the Medusa Admin - disableHoverableContent: (boolean) When \`true\`, trying to hover the content will result in the tooltip closing as the pointer leaves the trigger. -# Medusa Admin Extension - -How to install and use Medusa UI for building Admin extensions. - -## Installation - -*** - -The `@medusajs/ui` package is a already installed as a dependency of the `@medusajs/admin` package. Due to this you can simply import the package and use it in your local Admin extensions. - -If you are building a Admin extension as part of a Medusa plugin, you can install the package as a dependency of your plugin. - -```bash -npm install @medusajs/ui -``` - -## Configuration - -*** - -The configuration of the UI package is handled by the `@medusajs/admin` package. Therefore, you do not need to any additional configuration to use the UI package in your Admin extensions. - - -# Standalone Project - -How to install and use Medusa UI in a standalone project. - -## Installation - -*** - -Medusa UI is a React UI library and while it's intended for usage within Medusa projects, it can also be used in any React project. - -### Install Medusa UI - -Install the React UI library with the following command: - -```bash -npm install @medusajs/ui -``` - -### Configuring Tailwind CSS - -The components are styled using Tailwind CSS, and in order to use them, you will need to install Tailwind CSS in your project as well. -For more information on how to install Tailwind CSS, please refer to the [Tailwind CSS documentation](https://tailwindcss.com/docs/installation). - -All of the classes used for Medusa UI are shipped as a Tailwind CSS customization. -You can install it with the following command: - -```bash -npm install @medusajs/ui-preset -``` - -After you have installed Tailwind CSS and the Medusa UI preset, you need to add the following to your `tailwind.config.js`file: - -```tsx -module.exports = { - presets: [require("@medusajs/ui-preset")], - // ... -} -``` - -In order for the styles to be applied correctly to the components, you will also need to ensure that -`@medusajs/ui` is included in the content field of your `tailwind.config.js` file: - -```tsx -module.exports = { - content: [ - // ... - "./node_modules/@medusajs/ui/dist/**/*.{js,jsx,ts,tsx}", - ], - // ... -} -``` - -If you are working within a monorepo, you may need to add the path to the `@medusajs/ui` package in your `tailwind.config.js` like so: - -```tsx -const path = require("path") - -const uiPath = path.resolve( - require.resolve("@medusajs/ui"), - "../..", - "\*_/_.{js,jsx,ts,tsx}" -) - -module.exports = { - content: [ - // ... - uiPath, - ], - // ... -} - -``` - -## Start building - -*** - -You are now ready to start building your application with Medusa UI. You can import the components like so: - -```tsx -import { Button, Drawer } from "@medusajs/ui" -``` - -## Updating UI Packages - -*** - -Medusa's design-system packages, including `@medusajs/ui`, `@medusajs/ui-preset`, and `@medusajs/ui-icons`, are versioned independently. However, they're still part of the latest Medusa release. So, you can browse the [release notes](https://github.com/medusajs/medusa/releases) to see if there are any breaking changes to these packages. - -To update these packages, update their version in your `package.json` file and re-install dependencies. For example: - -```bash -npm install @medusajs/ui -``` - - # clx Utility function for working with classNames. diff --git a/www/apps/resources/references/js_sdk/admin/Admin/properties/js_sdk.admin.Admin.draftOrder/page.mdx b/www/apps/resources/references/js_sdk/admin/Admin/properties/js_sdk.admin.Admin.draftOrder/page.mdx index d0a8ea5c3d..cf4aeed935 100644 --- a/www/apps/resources/references/js_sdk/admin/Admin/properties/js_sdk.admin.Admin.draftOrder/page.mdx +++ b/www/apps/resources/references/js_sdk/admin/Admin/properties/js_sdk.admin.Admin.draftOrder/page.mdx @@ -137,7 +137,7 @@ sdk.admin.draftOrder.create({ ### Returns -`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="create"/> +`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="create"/> ___ @@ -163,14 +163,14 @@ sdk.admin.draftOrder.update("order_123", { ### Returns -`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="update"/> +`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="update"/> ___ ## convertToOrder This method converts a draft order to an order. It sends a request to the -[Convert Draft Order to Order](https://docs.medusajs.com/api/admin#draft-orders\_postdraftordersidconvert-to-order) API route. +[Convert Draft Order to Order](https://docs.medusajs.com/api/admin#draft-orders\_postdraftordersidconverttoorder) API route. ### Example @@ -187,14 +187,14 @@ sdk.admin.draftOrder.convertToOrder("order_123") ### Returns -`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="convertToOrder"/> +`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="convertToOrder"/> ___ ## addItems This method adds items to a draft order. It sends a request to the -[Add Draft Order Items](https://docs.medusajs.com/api/admin#draft-orders\_postordereditsiditems) API route. +[Add Draft Order Items](https://docs.medusajs.com/api/admin#draft-orders\_postdraftordersidedititems) API route. ### Example @@ -218,14 +218,14 @@ sdk.admin.draftOrder.addItems("order_123", { ### Returns -`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="addItems"/> +`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="addItems"/> ___ ## updateActionItem This method updates an item that is part of an action in a draft order. It sends a request to the -[Update Draft Order Item](https://docs.medusajs.com/api/admin#draft-orders\_postordereditsiditemsaction\_id) API route. +[Update Draft Order Item](https://docs.medusajs.com/api/admin#draft-orders\_postdraftordersidedititemsaction\_id) API route. ### Example @@ -244,14 +244,14 @@ sdk.admin.draftOrder.updateActionItem("order_123", "action_123", { ### Returns -`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateActionItem"/> +`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateActionItem"/> ___ ## removeActionItem This method removes an item that is part of an action in a draft order. It sends a request to the -[Remove Draft Order Item](https://docs.medusajs.com/api/admin#draft-orders\_deleteordereditsiditemsaction\_id) API route. +[Remove Draft Order Item](https://docs.medusajs.com/api/admin#draft-orders\_deletedraftordersidedititemsaction\_id) API route. ### Example @@ -268,14 +268,14 @@ sdk.admin.draftOrder.removeActionItem("order_123", "action_123") ### Returns -`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="removeActionItem"/> +`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="removeActionItem"/> ___ ## updateItem This method updates an item in a draft order. It sends a request to the -[Update Draft Order Item](https://docs.medusajs.com/api/admin#draft-orders\_postordereditsiditemsitem\_id) API route. +[Update Draft Order Item](https://docs.medusajs.com/api/admin#draft-orders\_postdraftordersidedititemsitemitem\_id) API route. ### Example @@ -301,7 +301,7 @@ ___ ## addPromotions This method adds promotions to a draft order. It sends a request to the -[Add Draft Order Promotions](https://docs.medusajs.com/api/admin#draft-orders\_postordereditsidpromotions) API route. +[Add Draft Order Promotions](https://docs.medusajs.com/api/admin#draft-orders\_postdraftordersideditpromotions) API route. ### Example @@ -320,14 +320,14 @@ sdk.admin.draftOrder.addPromotions("order_123", { ### Returns -`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="addPromotions"/> +`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="addPromotions"/> ___ ## removePromotions This method removes promotions from a draft order. It sends a request to the -[Remove Draft Order Promotions](https://docs.medusajs.com/api/admin#draft-orders\_deleteordereditsidpromotions) API route. +[Remove Draft Order Promotions](https://docs.medusajs.com/api/admin#draft-orders\_deletedraftordersideditpromotions) API route. ### Example @@ -343,14 +343,14 @@ sdk.admin.draftOrder.removePromotions("order_123", { ### Returns -`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="removePromotions"/> +`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="removePromotions"/> ___ ## addShippingMethod This method adds a shipping method to a draft order. It sends a request to the -[Add Draft Order Shipping Method](https://docs.medusajs.com/api/admin#draft-orders\_postordereditsidshipping-methods) API route. +[Add Draft Order Shipping Method](https://docs.medusajs.com/api/admin#draft-orders\_postdraftordersideditshippingmethods) API route. ### Example @@ -369,14 +369,14 @@ sdk.admin.draftOrder.addShippingMethod("order_123", { ### Returns -`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="addShippingMethod"/> +`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="addShippingMethod"/> ___ ## updateActionShippingMethod This method updates a shipping method in a draft order. It sends a request to the -[Update Draft Order Shipping Method](https://docs.medusajs.com/api/admin#draft-orders\_postordereditsidshipping-methodsaction\_id) API route. +[Update Draft Order Shipping Method](https://docs.medusajs.com/api/admin#draft-orders\_postdraftordersideditshippingmethodsaction\_id) API route. ### Example @@ -395,14 +395,14 @@ sdk.admin.draftOrder.updateShippingMethod("order_123", "action_123", { ### Returns -`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateActionShippingMethod"/> +`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateActionShippingMethod"/> ___ ## removeActionShippingMethod This method removes a shipping method from a draft order. It sends a request to the -[Remove Draft Order Shipping Method](https://docs.medusajs.com/api/admin#draft-orders\_deleteordereditsidshipping-methodsaction\_id) API route. +[Remove Draft Order Shipping Method](https://docs.medusajs.com/api/admin#draft-orders\_deletedraftordersideditshippingmethodsaction\_id) API route. ### Example @@ -419,26 +419,41 @@ sdk.admin.draftOrder.removeShippingMethod("order_123", "action_123") ### Returns -`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="removeActionShippingMethod"/> +`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="removeActionShippingMethod"/> ___ ## removeShippingMethod +This method removes a shipping method from an edited draft order. It sends a request to the +[Remove Draft Order Shipping Method](https://docs.medusajs.com/api/admin#draft-orders\_deletedraftordersideditshippingmethodsmethodmethod\_id) API route. + +### Example + +```ts +sdk.admin.draftOrder.removeShippingMethod( + "order_123", + "shipping_method_123" +) +.then(({ draft_order_preview }) => { + console.log(draft_order_preview) +}) +``` + ### Parameters - + ### Returns -`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="removeShippingMethod"/> +`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="removeShippingMethod"/> ___ ## updateShippingMethod This method updates a shipping method in a draft order. It sends a request to the -[Update Draft Order Shipping Method](https://docs.medusajs.com/api/admin#draft-orders\_postordereditsidshipping-methodsaction\_id) API route. +[Update Draft Order Shipping Method](https://docs.medusajs.com/api/admin#draft-orders\_postdraftordersideditshippingmethodsmethodmethod\_id) API route. ### Example @@ -464,7 +479,7 @@ ___ ## beginEdit This method begins an edit to a draft order. It sends a request to the -[Begin Draft Order Edit](https://docs.medusajs.com/api/admin#draft-orders\_postordereditsid) API route. +[Begin Draft Order Edit](https://docs.medusajs.com/api/admin#draft-orders\_postdraftordersidedit) API route. ### Example @@ -481,14 +496,14 @@ sdk.admin.draftOrder.beginEdit("order_123") ### Returns -`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="beginEdit"/> +`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="beginEdit"/> ___ ## cancelEdit This method cancels an edit to a draft order. It sends a request to the -[Cancel Draft Order Edit](https://docs.medusajs.com/api/admin#draft-orders\_deleteordereditsid) API route. +[Cancel Draft Order Edit](https://docs.medusajs.com/api/admin#draft-orders\_deletedraftordersidedit) API route. ### Example @@ -505,14 +520,14 @@ sdk.admin.draftOrder.cancelEdit("order_123") ### Returns - + ___ ## requestEdit This method requests an edit to a draft order. It sends a request to the -[Request Draft Order Edit](https://docs.medusajs.com/api/admin#draft-orders\_postordereditsidrequest) API route. +[Request Draft Order Edit](https://docs.medusajs.com/api/admin#draft-orders\_postdraftordersideditrequest) API route. ### Example @@ -529,14 +544,14 @@ sdk.admin.draftOrder.requestEdit("order_123") ### Returns -`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="requestEdit"/> +`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="requestEdit"/> ___ ## confirmEdit This method confirms an edit to a draft order. It sends a request to the -[Confirm Draft Order Edit](https://docs.medusajs.com/api/admin#draft-orders\_postordereditsidconfirm) API route. +[Confirm Draft Order Edit](https://docs.medusajs.com/api/admin#draft-orders\_postdraftordersideditconfirm) API route. ### Example @@ -553,4 +568,4 @@ sdk.admin.draftOrder.confirmEdit("order_123") ### Returns -`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="confirmEdit"/> +`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="confirmEdit"/> diff --git a/www/apps/resources/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.addItems/page.mdx b/www/apps/resources/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.addItems/page.mdx index 23ce91b1cb..53c48029c1 100644 --- a/www/apps/resources/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.addItems/page.mdx +++ b/www/apps/resources/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.addItems/page.mdx @@ -3,7 +3,7 @@ import { TypeList } from "docs-ui" # addItems This method adds items to a draft order. It sends a request to the -[Add Draft Order Items](https://docs.medusajs.com/api/admin#draft-orders\_postordereditsiditems) API route. +[Add Draft Order Items](https://docs.medusajs.com/api/admin#draft-orders\_postdraftordersidedititems) API route. ## Example @@ -27,4 +27,4 @@ sdk.admin.draftOrder.addItems("order_123", { ## Returns -`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="addItems"/> +`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="addItems"/> diff --git a/www/apps/resources/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.addPromotions/page.mdx b/www/apps/resources/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.addPromotions/page.mdx index 64f6148c22..3c52dd51a3 100644 --- a/www/apps/resources/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.addPromotions/page.mdx +++ b/www/apps/resources/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.addPromotions/page.mdx @@ -3,7 +3,7 @@ import { TypeList } from "docs-ui" # addPromotions This method adds promotions to a draft order. It sends a request to the -[Add Draft Order Promotions](https://docs.medusajs.com/api/admin#draft-orders\_postordereditsidpromotions) API route. +[Add Draft Order Promotions](https://docs.medusajs.com/api/admin#draft-orders\_postdraftordersideditpromotions) API route. ## Example @@ -22,4 +22,4 @@ sdk.admin.draftOrder.addPromotions("order_123", { ## Returns -`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="addPromotions"/> +`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="addPromotions"/> diff --git a/www/apps/resources/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.addShippingMethod/page.mdx b/www/apps/resources/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.addShippingMethod/page.mdx index a0ec38690e..f84c27b6f8 100644 --- a/www/apps/resources/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.addShippingMethod/page.mdx +++ b/www/apps/resources/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.addShippingMethod/page.mdx @@ -3,7 +3,7 @@ import { TypeList } from "docs-ui" # addShippingMethod This method adds a shipping method to a draft order. It sends a request to the -[Add Draft Order Shipping Method](https://docs.medusajs.com/api/admin#draft-orders\_postordereditsidshipping-methods) API route. +[Add Draft Order Shipping Method](https://docs.medusajs.com/api/admin#draft-orders\_postdraftordersideditshippingmethods) API route. ## Example @@ -22,4 +22,4 @@ sdk.admin.draftOrder.addShippingMethod("order_123", { ## Returns -`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="addShippingMethod"/> +`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="addShippingMethod"/> diff --git a/www/apps/resources/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.beginEdit/page.mdx b/www/apps/resources/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.beginEdit/page.mdx index 9068368430..32568bd75f 100644 --- a/www/apps/resources/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.beginEdit/page.mdx +++ b/www/apps/resources/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.beginEdit/page.mdx @@ -3,7 +3,7 @@ import { TypeList } from "docs-ui" # beginEdit This method begins an edit to a draft order. It sends a request to the -[Begin Draft Order Edit](https://docs.medusajs.com/api/admin#draft-orders\_postordereditsid) API route. +[Begin Draft Order Edit](https://docs.medusajs.com/api/admin#draft-orders\_postdraftordersidedit) API route. ## Example @@ -20,4 +20,4 @@ sdk.admin.draftOrder.beginEdit("order_123") ## Returns -`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="beginEdit"/> +`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="beginEdit"/> diff --git a/www/apps/resources/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.cancelEdit/page.mdx b/www/apps/resources/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.cancelEdit/page.mdx index 3a54df1d97..6d768788ee 100644 --- a/www/apps/resources/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.cancelEdit/page.mdx +++ b/www/apps/resources/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.cancelEdit/page.mdx @@ -3,7 +3,7 @@ import { TypeList } from "docs-ui" # cancelEdit This method cancels an edit to a draft order. It sends a request to the -[Cancel Draft Order Edit](https://docs.medusajs.com/api/admin#draft-orders\_deleteordereditsid) API route. +[Cancel Draft Order Edit](https://docs.medusajs.com/api/admin#draft-orders\_deletedraftordersidedit) API route. ## Example @@ -20,4 +20,4 @@ sdk.admin.draftOrder.cancelEdit("order_123") ## Returns - + diff --git a/www/apps/resources/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.confirmEdit/page.mdx b/www/apps/resources/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.confirmEdit/page.mdx index daf91b2ee7..901d0aaa08 100644 --- a/www/apps/resources/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.confirmEdit/page.mdx +++ b/www/apps/resources/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.confirmEdit/page.mdx @@ -3,7 +3,7 @@ import { TypeList } from "docs-ui" # confirmEdit This method confirms an edit to a draft order. It sends a request to the -[Confirm Draft Order Edit](https://docs.medusajs.com/api/admin#draft-orders\_postordereditsidconfirm) API route. +[Confirm Draft Order Edit](https://docs.medusajs.com/api/admin#draft-orders\_postdraftordersideditconfirm) API route. ## Example @@ -20,4 +20,4 @@ sdk.admin.draftOrder.confirmEdit("order_123") ## Returns -`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="confirmEdit"/> +`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="confirmEdit"/> diff --git a/www/apps/resources/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.convertToOrder/page.mdx b/www/apps/resources/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.convertToOrder/page.mdx index 4d4a11eb11..75543b2a2d 100644 --- a/www/apps/resources/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.convertToOrder/page.mdx +++ b/www/apps/resources/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.convertToOrder/page.mdx @@ -3,7 +3,7 @@ import { TypeList } from "docs-ui" # convertToOrder This method converts a draft order to an order. It sends a request to the -[Convert Draft Order to Order](https://docs.medusajs.com/api/admin#draft-orders\_postdraftordersidconvert-to-order) API route. +[Convert Draft Order to Order](https://docs.medusajs.com/api/admin#draft-orders\_postdraftordersidconverttoorder) API route. ## Example @@ -20,4 +20,4 @@ sdk.admin.draftOrder.convertToOrder("order_123") ## Returns -`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="convertToOrder"/> +`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="convertToOrder"/> diff --git a/www/apps/resources/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.create/page.mdx b/www/apps/resources/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.create/page.mdx index b245ac9951..4a456f7445 100644 --- a/www/apps/resources/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.create/page.mdx +++ b/www/apps/resources/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.create/page.mdx @@ -30,4 +30,4 @@ sdk.admin.draftOrder.create({ ## Returns -`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="create"/> +`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="create"/> diff --git a/www/apps/resources/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.removeActionItem/page.mdx b/www/apps/resources/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.removeActionItem/page.mdx index 977f75151a..710def8b2f 100644 --- a/www/apps/resources/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.removeActionItem/page.mdx +++ b/www/apps/resources/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.removeActionItem/page.mdx @@ -3,7 +3,7 @@ import { TypeList } from "docs-ui" # removeActionItem This method removes an item that is part of an action in a draft order. It sends a request to the -[Remove Draft Order Item](https://docs.medusajs.com/api/admin#draft-orders\_deleteordereditsiditemsaction\_id) API route. +[Remove Draft Order Item](https://docs.medusajs.com/api/admin#draft-orders\_deletedraftordersidedititemsaction\_id) API route. ## Example @@ -20,4 +20,4 @@ sdk.admin.draftOrder.removeActionItem("order_123", "action_123") ## Returns -`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="removeActionItem"/> +`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="removeActionItem"/> diff --git a/www/apps/resources/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.removeActionShippingMethod/page.mdx b/www/apps/resources/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.removeActionShippingMethod/page.mdx index d6cfa3273e..5fe31adda7 100644 --- a/www/apps/resources/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.removeActionShippingMethod/page.mdx +++ b/www/apps/resources/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.removeActionShippingMethod/page.mdx @@ -3,7 +3,7 @@ import { TypeList } from "docs-ui" # removeActionShippingMethod This method removes a shipping method from a draft order. It sends a request to the -[Remove Draft Order Shipping Method](https://docs.medusajs.com/api/admin#draft-orders\_deleteordereditsidshipping-methodsaction\_id) API route. +[Remove Draft Order Shipping Method](https://docs.medusajs.com/api/admin#draft-orders\_deletedraftordersideditshippingmethodsaction\_id) API route. ## Example @@ -20,4 +20,4 @@ sdk.admin.draftOrder.removeShippingMethod("order_123", "action_123") ## Returns -`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="removeActionShippingMethod"/> +`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="removeActionShippingMethod"/> diff --git a/www/apps/resources/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.removePromotions/page.mdx b/www/apps/resources/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.removePromotions/page.mdx index 11ad4f27b7..4c16b876a7 100644 --- a/www/apps/resources/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.removePromotions/page.mdx +++ b/www/apps/resources/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.removePromotions/page.mdx @@ -3,7 +3,7 @@ import { TypeList } from "docs-ui" # removePromotions This method removes promotions from a draft order. It sends a request to the -[Remove Draft Order Promotions](https://docs.medusajs.com/api/admin#draft-orders\_deleteordereditsidpromotions) API route. +[Remove Draft Order Promotions](https://docs.medusajs.com/api/admin#draft-orders\_deletedraftordersideditpromotions) API route. ## Example @@ -19,4 +19,4 @@ sdk.admin.draftOrder.removePromotions("order_123", { ## Returns -`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="removePromotions"/> +`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="removePromotions"/> diff --git a/www/apps/resources/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.removeShippingMethod/page.mdx b/www/apps/resources/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.removeShippingMethod/page.mdx index af2b61cfbc..45334f3adb 100644 --- a/www/apps/resources/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.removeShippingMethod/page.mdx +++ b/www/apps/resources/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.removeShippingMethod/page.mdx @@ -2,10 +2,25 @@ import { TypeList } from "docs-ui" # removeShippingMethod +This method removes a shipping method from an edited draft order. It sends a request to the +[Remove Draft Order Shipping Method](https://docs.medusajs.com/api/admin#draft-orders\_deletedraftordersideditshippingmethodsmethodmethod\_id) API route. + +## Example + +```ts +sdk.admin.draftOrder.removeShippingMethod( + "order_123", + "shipping_method_123" +) +.then(({ draft_order_preview }) => { + console.log(draft_order_preview) +}) +``` + ## Parameters - + ## Returns -`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="removeShippingMethod"/> +`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="removeShippingMethod"/> diff --git a/www/apps/resources/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.requestEdit/page.mdx b/www/apps/resources/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.requestEdit/page.mdx index 32042db1be..4e395fc09d 100644 --- a/www/apps/resources/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.requestEdit/page.mdx +++ b/www/apps/resources/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.requestEdit/page.mdx @@ -3,7 +3,7 @@ import { TypeList } from "docs-ui" # requestEdit This method requests an edit to a draft order. It sends a request to the -[Request Draft Order Edit](https://docs.medusajs.com/api/admin#draft-orders\_postordereditsidrequest) API route. +[Request Draft Order Edit](https://docs.medusajs.com/api/admin#draft-orders\_postdraftordersideditrequest) API route. ## Example @@ -20,4 +20,4 @@ sdk.admin.draftOrder.requestEdit("order_123") ## Returns -`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="requestEdit"/> +`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="requestEdit"/> diff --git a/www/apps/resources/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.update/page.mdx b/www/apps/resources/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.update/page.mdx index 84a383d6ba..606399465f 100644 --- a/www/apps/resources/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.update/page.mdx +++ b/www/apps/resources/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.update/page.mdx @@ -22,4 +22,4 @@ sdk.admin.draftOrder.update("order_123", { ## Returns -`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="update"/> +`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="update"/> diff --git a/www/apps/resources/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.updateActionItem/page.mdx b/www/apps/resources/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.updateActionItem/page.mdx index 1d903ae230..03d4f8789b 100644 --- a/www/apps/resources/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.updateActionItem/page.mdx +++ b/www/apps/resources/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.updateActionItem/page.mdx @@ -3,7 +3,7 @@ import { TypeList } from "docs-ui" # updateActionItem This method updates an item that is part of an action in a draft order. It sends a request to the -[Update Draft Order Item](https://docs.medusajs.com/api/admin#draft-orders\_postordereditsiditemsaction\_id) API route. +[Update Draft Order Item](https://docs.medusajs.com/api/admin#draft-orders\_postdraftordersidedititemsaction\_id) API route. ## Example @@ -22,4 +22,4 @@ sdk.admin.draftOrder.updateActionItem("order_123", "action_123", { ## Returns -`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateActionItem"/> +`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateActionItem"/> diff --git a/www/apps/resources/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.updateActionShippingMethod/page.mdx b/www/apps/resources/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.updateActionShippingMethod/page.mdx index 7983cec72d..59b8c26d7f 100644 --- a/www/apps/resources/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.updateActionShippingMethod/page.mdx +++ b/www/apps/resources/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.updateActionShippingMethod/page.mdx @@ -3,7 +3,7 @@ import { TypeList } from "docs-ui" # updateActionShippingMethod This method updates a shipping method in a draft order. It sends a request to the -[Update Draft Order Shipping Method](https://docs.medusajs.com/api/admin#draft-orders\_postordereditsidshipping-methodsaction\_id) API route. +[Update Draft Order Shipping Method](https://docs.medusajs.com/api/admin#draft-orders\_postdraftordersideditshippingmethodsaction\_id) API route. ## Example @@ -22,4 +22,4 @@ sdk.admin.draftOrder.updateShippingMethod("order_123", "action_123", { ## Returns -`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateActionShippingMethod"/> +`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateActionShippingMethod"/> diff --git a/www/apps/resources/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.updateItem/page.mdx b/www/apps/resources/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.updateItem/page.mdx index 9799726188..e38e0bec61 100644 --- a/www/apps/resources/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.updateItem/page.mdx +++ b/www/apps/resources/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.updateItem/page.mdx @@ -3,7 +3,7 @@ import { TypeList } from "docs-ui" # updateItem This method updates an item in a draft order. It sends a request to the -[Update Draft Order Item](https://docs.medusajs.com/api/admin#draft-orders\_postordereditsiditemsitem\_id) API route. +[Update Draft Order Item](https://docs.medusajs.com/api/admin#draft-orders\_postdraftordersidedititemsitemitem\_id) API route. ## Example diff --git a/www/apps/resources/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.updateShippingMethod/page.mdx b/www/apps/resources/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.updateShippingMethod/page.mdx index 2017d5e008..03d14db86b 100644 --- a/www/apps/resources/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.updateShippingMethod/page.mdx +++ b/www/apps/resources/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.updateShippingMethod/page.mdx @@ -3,7 +3,7 @@ import { TypeList } from "docs-ui" # updateShippingMethod This method updates a shipping method in a draft order. It sends a request to the -[Update Draft Order Shipping Method](https://docs.medusajs.com/api/admin#draft-orders\_postordereditsidshipping-methodsaction\_id) API route. +[Update Draft Order Shipping Method](https://docs.medusajs.com/api/admin#draft-orders\_postdraftordersideditshippingmethodsmethodmethod\_id) API route. ## Example diff --git a/www/utils/generated/typedoc-json-output/js-sdk.json b/www/utils/generated/typedoc-json-output/js-sdk.json index 4fc3898a77..9b6bf634ec 100644 --- a/www/utils/generated/typedoc-json-output/js-sdk.json +++ b/www/utils/generated/typedoc-json-output/js-sdk.json @@ -1,26 +1,26 @@ { - "id": 41069, + "id": 0, "name": "js-sdk", "variant": "project", "kind": 1, "flags": {}, "children": [ { - "id": 41070, + "id": 1, "name": "admin", "variant": "declaration", "kind": 2, "flags": {}, "children": [ { - "id": 42969, + "id": 1900, "name": "ApiKey", "variant": "declaration", "kind": 128, "flags": {}, "children": [ { - "id": 42973, + "id": 1904, "name": "client", "variant": "declaration", "kind": 1024, @@ -35,34 +35,34 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/api-key.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/api-key.ts", "line": 9, "character": 10 } ], "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } }, { - "id": 42970, + "id": 1901, "name": "constructor", "variant": "declaration", "kind": 512, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/api-key.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/api-key.ts", "line": 13, "character": 2 } ], "signatures": [ { - "id": 42971, + "id": 1902, "name": "ApiKey", "variant": "signature", "kind": 16384, @@ -75,21 +75,21 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/api-key.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/api-key.ts", "line": 13, "character": 2 } ], "parameters": [ { - "id": 42972, + "id": 1903, "name": "client", "variant": "param", "kind": 32768, "flags": {}, "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } @@ -97,7 +97,7 @@ ], "type": { "type": "reference", - "target": 42969, + "target": 1900, "name": "ApiKey", "package": "@medusajs/js-sdk" } @@ -105,21 +105,21 @@ ] }, { - "id": 42974, + "id": 1905, "name": "list", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/api-key.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/api-key.ts", "line": 63, "character": 8 } ], "signatures": [ { - "id": 42975, + "id": 1906, "name": "list", "variant": "signature", "kind": 4096, @@ -210,14 +210,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/api-key.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/api-key.ts", "line": 63, "character": 8 } ], "parameters": [ { - "id": 42976, + "id": 1907, "name": "queryParams", "variant": "param", "kind": 32768, @@ -243,7 +243,7 @@ } }, { - "id": 42977, + "id": 1908, "name": "headers", "variant": "param", "kind": 32768, @@ -260,7 +260,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -290,21 +290,21 @@ ] }, { - "id": 42978, + "id": 1909, "name": "create", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/api-key.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/api-key.ts", "line": 93, "character": 8 } ], "signatures": [ { - "id": 42979, + "id": 1910, "name": "create", "variant": "signature", "kind": 4096, @@ -339,14 +339,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/api-key.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/api-key.ts", "line": 93, "character": 8 } ], "parameters": [ { - "id": 42980, + "id": 1911, "name": "body", "variant": "param", "kind": 32768, @@ -370,7 +370,7 @@ } }, { - "id": 42981, + "id": 1912, "name": "query", "variant": "param", "kind": 32768, @@ -396,7 +396,7 @@ } }, { - "id": 42982, + "id": 1913, "name": "headers", "variant": "param", "kind": 32768, @@ -413,7 +413,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -443,21 +443,21 @@ ] }, { - "id": 42983, + "id": 1914, "name": "revoke", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/api-key.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/api-key.ts", "line": 123, "character": 8 } ], "signatures": [ { - "id": 42984, + "id": 1915, "name": "revoke", "variant": "signature", "kind": 4096, @@ -492,14 +492,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/api-key.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/api-key.ts", "line": 123, "character": 8 } ], "parameters": [ { - "id": 42985, + "id": 1916, "name": "id", "variant": "param", "kind": 32768, @@ -518,7 +518,7 @@ } }, { - "id": 42986, + "id": 1917, "name": "headers", "variant": "param", "kind": 32768, @@ -535,7 +535,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -565,21 +565,21 @@ ] }, { - "id": 42987, + "id": 1918, "name": "retrieve", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/api-key.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/api-key.ts", "line": 147, "character": 8 } ], "signatures": [ { - "id": 42988, + "id": 1919, "name": "retrieve", "variant": "signature", "kind": 4096, @@ -614,14 +614,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/api-key.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/api-key.ts", "line": 147, "character": 8 } ], "parameters": [ { - "id": 42989, + "id": 1920, "name": "id", "variant": "param", "kind": 32768, @@ -640,7 +640,7 @@ } }, { - "id": 42990, + "id": 1921, "name": "headers", "variant": "param", "kind": 32768, @@ -657,7 +657,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -687,21 +687,21 @@ ] }, { - "id": 42991, + "id": 1922, "name": "update", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/api-key.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/api-key.ts", "line": 174, "character": 8 } ], "signatures": [ { - "id": 42992, + "id": 1923, "name": "update", "variant": "signature", "kind": 4096, @@ -736,14 +736,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/api-key.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/api-key.ts", "line": 174, "character": 8 } ], "parameters": [ { - "id": 42993, + "id": 1924, "name": "id", "variant": "param", "kind": 32768, @@ -762,7 +762,7 @@ } }, { - "id": 42994, + "id": 1925, "name": "body", "variant": "param", "kind": 32768, @@ -786,7 +786,7 @@ } }, { - "id": 42995, + "id": 1926, "name": "query", "variant": "param", "kind": 32768, @@ -812,7 +812,7 @@ } }, { - "id": 42996, + "id": 1927, "name": "headers", "variant": "param", "kind": 32768, @@ -829,7 +829,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -859,21 +859,21 @@ ] }, { - "id": 42997, + "id": 1928, "name": "delete", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/api-key.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/api-key.ts", "line": 205, "character": 8 } ], "signatures": [ { - "id": 42998, + "id": 1929, "name": "delete", "variant": "signature", "kind": 4096, @@ -908,14 +908,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/api-key.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/api-key.ts", "line": 205, "character": 8 } ], "parameters": [ { - "id": 42999, + "id": 1930, "name": "id", "variant": "param", "kind": 32768, @@ -934,7 +934,7 @@ } }, { - "id": 43000, + "id": 1931, "name": "headers", "variant": "param", "kind": 32768, @@ -951,7 +951,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -981,21 +981,21 @@ ] }, { - "id": 43001, + "id": 1932, "name": "batchSalesChannels", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/api-key.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/api-key.ts", "line": 234, "character": 8 } ], "signatures": [ { - "id": 43002, + "id": 1933, "name": "batchSalesChannels", "variant": "signature", "kind": 4096, @@ -1030,14 +1030,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/api-key.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/api-key.ts", "line": 234, "character": 8 } ], "parameters": [ { - "id": 43003, + "id": 1934, "name": "id", "variant": "param", "kind": 32768, @@ -1056,7 +1056,7 @@ } }, { - "id": 43004, + "id": 1935, "name": "body", "variant": "param", "kind": 32768, @@ -1080,7 +1080,7 @@ } }, { - "id": 43005, + "id": 1936, "name": "headers", "variant": "param", "kind": 32768, @@ -1097,7 +1097,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -1131,45 +1131,45 @@ { "title": "Constructors", "children": [ - 42970 + 1901 ] }, { "title": "Properties", "children": [ - 42973 + 1904 ] }, { "title": "Methods", "children": [ - 42974, - 42978, - 42983, - 42987, - 42991, - 42997, - 43001 + 1905, + 1909, + 1914, + 1918, + 1922, + 1928, + 1932 ] } ], "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/api-key.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/api-key.ts", "line": 5, "character": 13 } ] }, { - "id": 43144, + "id": 2075, "name": "Campaign", "variant": "declaration", "kind": 128, "flags": {}, "children": [ { - "id": 43148, + "id": 2079, "name": "client", "variant": "declaration", "kind": 1024, @@ -1184,34 +1184,34 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/campaign.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/campaign.ts", "line": 9, "character": 10 } ], "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } }, { - "id": 43145, + "id": 2076, "name": "constructor", "variant": "declaration", "kind": 512, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/campaign.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/campaign.ts", "line": 13, "character": 2 } ], "signatures": [ { - "id": 43146, + "id": 2077, "name": "Campaign", "variant": "signature", "kind": 16384, @@ -1224,21 +1224,21 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/campaign.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/campaign.ts", "line": 13, "character": 2 } ], "parameters": [ { - "id": 43147, + "id": 2078, "name": "client", "variant": "param", "kind": 32768, "flags": {}, "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } @@ -1246,7 +1246,7 @@ ], "type": { "type": "reference", - "target": 43144, + "target": 2075, "name": "Campaign", "package": "@medusajs/js-sdk" } @@ -1254,21 +1254,21 @@ ] }, { - "id": 43149, + "id": 2080, "name": "retrieve", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/campaign.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/campaign.ts", "line": 49, "character": 8 } ], "signatures": [ { - "id": 43150, + "id": 2081, "name": "retrieve", "variant": "signature", "kind": 4096, @@ -1327,14 +1327,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/campaign.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/campaign.ts", "line": 49, "character": 8 } ], "parameters": [ { - "id": 43151, + "id": 2082, "name": "id", "variant": "param", "kind": 32768, @@ -1353,7 +1353,7 @@ } }, { - "id": 43152, + "id": 2083, "name": "query", "variant": "param", "kind": 32768, @@ -1379,7 +1379,7 @@ } }, { - "id": 43153, + "id": 2084, "name": "headers", "variant": "param", "kind": 32768, @@ -1396,7 +1396,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -1426,21 +1426,21 @@ ] }, { - "id": 43154, + "id": 2085, "name": "list", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/campaign.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/campaign.ts", "line": 109, "character": 8 } ], "signatures": [ { - "id": 43155, + "id": 2086, "name": "list", "variant": "signature", "kind": 4096, @@ -1531,14 +1531,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/campaign.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/campaign.ts", "line": 109, "character": 8 } ], "parameters": [ { - "id": 43156, + "id": 2087, "name": "query", "variant": "param", "kind": 32768, @@ -1564,7 +1564,7 @@ } }, { - "id": 43157, + "id": 2088, "name": "headers", "variant": "param", "kind": 32768, @@ -1581,7 +1581,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -1611,21 +1611,21 @@ ] }, { - "id": 43158, + "id": 2089, "name": "create", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/campaign.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/campaign.ts", "line": 138, "character": 8 } ], "signatures": [ { - "id": 43159, + "id": 2090, "name": "create", "variant": "signature", "kind": 4096, @@ -1660,14 +1660,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/campaign.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/campaign.ts", "line": 138, "character": 8 } ], "parameters": [ { - "id": 43160, + "id": 2091, "name": "payload", "variant": "param", "kind": 32768, @@ -1691,7 +1691,7 @@ } }, { - "id": 43161, + "id": 2092, "name": "headers", "variant": "param", "kind": 32768, @@ -1708,7 +1708,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -1738,21 +1738,21 @@ ] }, { - "id": 43162, + "id": 2093, "name": "update", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/campaign.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/campaign.ts", "line": 169, "character": 8 } ], "signatures": [ { - "id": 43163, + "id": 2094, "name": "update", "variant": "signature", "kind": 4096, @@ -1787,14 +1787,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/campaign.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/campaign.ts", "line": 169, "character": 8 } ], "parameters": [ { - "id": 43164, + "id": 2095, "name": "id", "variant": "param", "kind": 32768, @@ -1813,7 +1813,7 @@ } }, { - "id": 43165, + "id": 2096, "name": "payload", "variant": "param", "kind": 32768, @@ -1837,7 +1837,7 @@ } }, { - "id": 43166, + "id": 2097, "name": "headers", "variant": "param", "kind": 32768, @@ -1854,7 +1854,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -1884,21 +1884,21 @@ ] }, { - "id": 43167, + "id": 2098, "name": "delete", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/campaign.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/campaign.ts", "line": 198, "character": 8 } ], "signatures": [ { - "id": 43168, + "id": 2099, "name": "delete", "variant": "signature", "kind": 4096, @@ -1933,14 +1933,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/campaign.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/campaign.ts", "line": 198, "character": 8 } ], "parameters": [ { - "id": 43169, + "id": 2100, "name": "id", "variant": "param", "kind": 32768, @@ -1959,7 +1959,7 @@ } }, { - "id": 43170, + "id": 2101, "name": "headers", "variant": "param", "kind": 32768, @@ -1976,7 +1976,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -2012,21 +2012,21 @@ ] }, { - "id": 43171, + "id": 2102, "name": "batchPromotions", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/campaign.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/campaign.ts", "line": 227, "character": 8 } ], "signatures": [ { - "id": 43172, + "id": 2103, "name": "batchPromotions", "variant": "signature", "kind": 4096, @@ -2061,14 +2061,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/campaign.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/campaign.ts", "line": 227, "character": 8 } ], "parameters": [ { - "id": 43173, + "id": 2104, "name": "id", "variant": "param", "kind": 32768, @@ -2087,7 +2087,7 @@ } }, { - "id": 43174, + "id": 2105, "name": "payload", "variant": "param", "kind": 32768, @@ -2111,7 +2111,7 @@ } }, { - "id": 43175, + "id": 2106, "name": "headers", "variant": "param", "kind": 32768, @@ -2128,7 +2128,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -2162,44 +2162,44 @@ { "title": "Constructors", "children": [ - 43145 + 2076 ] }, { "title": "Properties", "children": [ - 43148 + 2079 ] }, { "title": "Methods", "children": [ - 43149, - 43154, - 43158, - 43162, - 43167, - 43171 + 2080, + 2085, + 2089, + 2093, + 2098, + 2102 ] } ], "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/campaign.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/campaign.ts", "line": 5, "character": 13 } ] }, { - "id": 42517, + "id": 1448, "name": "Claim", "variant": "declaration", "kind": 128, "flags": {}, "children": [ { - "id": 42521, + "id": 1452, "name": "client", "variant": "declaration", "kind": 1024, @@ -2214,34 +2214,34 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/claim.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/claim.ts", "line": 10, "character": 10 } ], "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } }, { - "id": 42518, + "id": 1449, "name": "constructor", "variant": "declaration", "kind": 512, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/claim.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/claim.ts", "line": 14, "character": 2 } ], "signatures": [ { - "id": 42519, + "id": 1450, "name": "Claim", "variant": "signature", "kind": 16384, @@ -2254,21 +2254,21 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/claim.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/claim.ts", "line": 14, "character": 2 } ], "parameters": [ { - "id": 42520, + "id": 1451, "name": "client", "variant": "param", "kind": 32768, "flags": {}, "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } @@ -2276,7 +2276,7 @@ ], "type": { "type": "reference", - "target": 42517, + "target": 1448, "name": "Claim", "package": "@medusajs/js-sdk" } @@ -2284,21 +2284,21 @@ ] }, { - "id": 42522, + "id": 1453, "name": "list", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/claim.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/claim.ts", "line": 64, "character": 8 } ], "signatures": [ { - "id": 42523, + "id": 1454, "name": "list", "variant": "signature", "kind": 4096, @@ -2389,14 +2389,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/claim.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/claim.ts", "line": 64, "character": 8 } ], "parameters": [ { - "id": 42524, + "id": 1455, "name": "query", "variant": "param", "kind": 32768, @@ -2422,7 +2422,7 @@ } }, { - "id": 42525, + "id": 1456, "name": "headers", "variant": "param", "kind": 32768, @@ -2439,7 +2439,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -2469,21 +2469,21 @@ ] }, { - "id": 42526, + "id": 1457, "name": "retrieve", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/claim.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/claim.ts", "line": 106, "character": 8 } ], "signatures": [ { - "id": 42527, + "id": 1458, "name": "retrieve", "variant": "signature", "kind": 4096, @@ -2542,14 +2542,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/claim.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/claim.ts", "line": 106, "character": 8 } ], "parameters": [ { - "id": 42528, + "id": 1459, "name": "id", "variant": "param", "kind": 32768, @@ -2568,7 +2568,7 @@ } }, { - "id": 42529, + "id": 1460, "name": "query", "variant": "param", "kind": 32768, @@ -2594,7 +2594,7 @@ } }, { - "id": 42530, + "id": 1461, "name": "headers", "variant": "param", "kind": 32768, @@ -2611,7 +2611,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -2641,21 +2641,21 @@ ] }, { - "id": 42531, + "id": 1462, "name": "create", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/claim.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/claim.ts", "line": 138, "character": 8 } ], "signatures": [ { - "id": 42532, + "id": 1463, "name": "create", "variant": "signature", "kind": 4096, @@ -2690,14 +2690,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/claim.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/claim.ts", "line": 138, "character": 8 } ], "parameters": [ { - "id": 42533, + "id": 1464, "name": "body", "variant": "param", "kind": 32768, @@ -2721,7 +2721,7 @@ } }, { - "id": 42534, + "id": 1465, "name": "query", "variant": "param", "kind": 32768, @@ -2747,7 +2747,7 @@ } }, { - "id": 42535, + "id": 1466, "name": "headers", "variant": "param", "kind": 32768, @@ -2764,7 +2764,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -2794,21 +2794,21 @@ ] }, { - "id": 42536, + "id": 1467, "name": "cancel", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/claim.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/claim.ts", "line": 169, "character": 8 } ], "signatures": [ { - "id": 42537, + "id": 1468, "name": "cancel", "variant": "signature", "kind": 4096, @@ -2843,14 +2843,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/claim.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/claim.ts", "line": 169, "character": 8 } ], "parameters": [ { - "id": 42538, + "id": 1469, "name": "id", "variant": "param", "kind": 32768, @@ -2869,7 +2869,7 @@ } }, { - "id": 42539, + "id": 1470, "name": "query", "variant": "param", "kind": 32768, @@ -2895,7 +2895,7 @@ } }, { - "id": 42540, + "id": 1471, "name": "headers", "variant": "param", "kind": 32768, @@ -2912,7 +2912,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -2942,21 +2942,21 @@ ] }, { - "id": 42541, + "id": 1472, "name": "addItems", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/claim.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/claim.ts", "line": 207, "character": 8 } ], "signatures": [ { - "id": 42542, + "id": 1473, "name": "addItems", "variant": "signature", "kind": 4096, @@ -2991,14 +2991,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/claim.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/claim.ts", "line": 207, "character": 8 } ], "parameters": [ { - "id": 42543, + "id": 1474, "name": "id", "variant": "param", "kind": 32768, @@ -3017,7 +3017,7 @@ } }, { - "id": 42544, + "id": 1475, "name": "body", "variant": "param", "kind": 32768, @@ -3041,7 +3041,7 @@ } }, { - "id": 42545, + "id": 1476, "name": "query", "variant": "param", "kind": 32768, @@ -3067,7 +3067,7 @@ } }, { - "id": 42546, + "id": 1477, "name": "headers", "variant": "param", "kind": 32768, @@ -3084,7 +3084,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -3114,21 +3114,21 @@ ] }, { - "id": 42547, + "id": 1478, "name": "updateItem", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/claim.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/claim.ts", "line": 250, "character": 8 } ], "signatures": [ { - "id": 42548, + "id": 1479, "name": "updateItem", "variant": "signature", "kind": 4096, @@ -3195,14 +3195,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/claim.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/claim.ts", "line": 250, "character": 8 } ], "parameters": [ { - "id": 42549, + "id": 1480, "name": "id", "variant": "param", "kind": 32768, @@ -3221,7 +3221,7 @@ } }, { - "id": 42550, + "id": 1481, "name": "actionId", "variant": "param", "kind": 32768, @@ -3248,7 +3248,7 @@ } }, { - "id": 42551, + "id": 1482, "name": "body", "variant": "param", "kind": 32768, @@ -3272,7 +3272,7 @@ } }, { - "id": 42552, + "id": 1483, "name": "query", "variant": "param", "kind": 32768, @@ -3298,7 +3298,7 @@ } }, { - "id": 42553, + "id": 1484, "name": "headers", "variant": "param", "kind": 32768, @@ -3315,7 +3315,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -3345,21 +3345,21 @@ ] }, { - "id": 42554, + "id": 1485, "name": "removeItem", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/claim.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/claim.ts", "line": 291, "character": 8 } ], "signatures": [ { - "id": 42555, + "id": 1486, "name": "removeItem", "variant": "signature", "kind": 4096, @@ -3426,14 +3426,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/claim.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/claim.ts", "line": 291, "character": 8 } ], "parameters": [ { - "id": 42556, + "id": 1487, "name": "id", "variant": "param", "kind": 32768, @@ -3452,7 +3452,7 @@ } }, { - "id": 42557, + "id": 1488, "name": "actionId", "variant": "param", "kind": 32768, @@ -3479,7 +3479,7 @@ } }, { - "id": 42558, + "id": 1489, "name": "query", "variant": "param", "kind": 32768, @@ -3505,7 +3505,7 @@ } }, { - "id": 42559, + "id": 1490, "name": "headers", "variant": "param", "kind": 32768, @@ -3522,7 +3522,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -3552,21 +3552,21 @@ ] }, { - "id": 42560, + "id": 1491, "name": "addInboundItems", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/claim.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/claim.ts", "line": 335, "character": 8 } ], "signatures": [ { - "id": 42561, + "id": 1492, "name": "addInboundItems", "variant": "signature", "kind": 4096, @@ -3609,14 +3609,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/claim.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/claim.ts", "line": 335, "character": 8 } ], "parameters": [ { - "id": 42562, + "id": 1493, "name": "id", "variant": "param", "kind": 32768, @@ -3635,7 +3635,7 @@ } }, { - "id": 42563, + "id": 1494, "name": "body", "variant": "param", "kind": 32768, @@ -3659,7 +3659,7 @@ } }, { - "id": 42564, + "id": 1495, "name": "query", "variant": "param", "kind": 32768, @@ -3685,7 +3685,7 @@ } }, { - "id": 42565, + "id": 1496, "name": "headers", "variant": "param", "kind": 32768, @@ -3702,7 +3702,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -3732,21 +3732,21 @@ ] }, { - "id": 42566, + "id": 1497, "name": "updateInboundItem", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/claim.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/claim.ts", "line": 379, "character": 8 } ], "signatures": [ { - "id": 42567, + "id": 1498, "name": "updateInboundItem", "variant": "signature", "kind": 4096, @@ -3813,14 +3813,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/claim.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/claim.ts", "line": 379, "character": 8 } ], "parameters": [ { - "id": 42568, + "id": 1499, "name": "id", "variant": "param", "kind": 32768, @@ -3839,7 +3839,7 @@ } }, { - "id": 42569, + "id": 1500, "name": "actionId", "variant": "param", "kind": 32768, @@ -3866,7 +3866,7 @@ } }, { - "id": 42570, + "id": 1501, "name": "body", "variant": "param", "kind": 32768, @@ -3890,7 +3890,7 @@ } }, { - "id": 42571, + "id": 1502, "name": "query", "variant": "param", "kind": 32768, @@ -3916,7 +3916,7 @@ } }, { - "id": 42572, + "id": 1503, "name": "headers", "variant": "param", "kind": 32768, @@ -3933,7 +3933,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -3963,21 +3963,21 @@ ] }, { - "id": 42573, + "id": 1504, "name": "removeInboundItem", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/claim.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/claim.ts", "line": 420, "character": 8 } ], "signatures": [ { - "id": 42574, + "id": 1505, "name": "removeInboundItem", "variant": "signature", "kind": 4096, @@ -4044,14 +4044,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/claim.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/claim.ts", "line": 420, "character": 8 } ], "parameters": [ { - "id": 42575, + "id": 1506, "name": "id", "variant": "param", "kind": 32768, @@ -4070,7 +4070,7 @@ } }, { - "id": 42576, + "id": 1507, "name": "actionId", "variant": "param", "kind": 32768, @@ -4097,7 +4097,7 @@ } }, { - "id": 42577, + "id": 1508, "name": "query", "variant": "param", "kind": 32768, @@ -4123,7 +4123,7 @@ } }, { - "id": 42578, + "id": 1509, "name": "headers", "variant": "param", "kind": 32768, @@ -4140,7 +4140,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -4170,21 +4170,21 @@ ] }, { - "id": 42579, + "id": 1510, "name": "addInboundShipping", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/claim.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/claim.ts", "line": 461, "character": 8 } ], "signatures": [ { - "id": 42580, + "id": 1511, "name": "addInboundShipping", "variant": "signature", "kind": 4096, @@ -4227,14 +4227,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/claim.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/claim.ts", "line": 461, "character": 8 } ], "parameters": [ { - "id": 42581, + "id": 1512, "name": "id", "variant": "param", "kind": 32768, @@ -4253,7 +4253,7 @@ } }, { - "id": 42582, + "id": 1513, "name": "body", "variant": "param", "kind": 32768, @@ -4277,7 +4277,7 @@ } }, { - "id": 42583, + "id": 1514, "name": "query", "variant": "param", "kind": 32768, @@ -4303,7 +4303,7 @@ } }, { - "id": 42584, + "id": 1515, "name": "headers", "variant": "param", "kind": 32768, @@ -4320,7 +4320,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -4350,21 +4350,21 @@ ] }, { - "id": 42585, + "id": 1516, "name": "updateInboundShipping", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/claim.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/claim.ts", "line": 505, "character": 8 } ], "signatures": [ { - "id": 42586, + "id": 1517, "name": "updateInboundShipping", "variant": "signature", "kind": 4096, @@ -4431,14 +4431,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/claim.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/claim.ts", "line": 505, "character": 8 } ], "parameters": [ { - "id": 42587, + "id": 1518, "name": "id", "variant": "param", "kind": 32768, @@ -4457,7 +4457,7 @@ } }, { - "id": 42588, + "id": 1519, "name": "actionId", "variant": "param", "kind": 32768, @@ -4484,7 +4484,7 @@ } }, { - "id": 42589, + "id": 1520, "name": "body", "variant": "param", "kind": 32768, @@ -4508,7 +4508,7 @@ } }, { - "id": 42590, + "id": 1521, "name": "query", "variant": "param", "kind": 32768, @@ -4534,7 +4534,7 @@ } }, { - "id": 42591, + "id": 1522, "name": "headers", "variant": "param", "kind": 32768, @@ -4551,7 +4551,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -4581,21 +4581,21 @@ ] }, { - "id": 42592, + "id": 1523, "name": "deleteInboundShipping", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/claim.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/claim.ts", "line": 546, "character": 8 } ], "signatures": [ { - "id": 42593, + "id": 1524, "name": "deleteInboundShipping", "variant": "signature", "kind": 4096, @@ -4662,14 +4662,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/claim.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/claim.ts", "line": 546, "character": 8 } ], "parameters": [ { - "id": 42594, + "id": 1525, "name": "id", "variant": "param", "kind": 32768, @@ -4688,7 +4688,7 @@ } }, { - "id": 42595, + "id": 1526, "name": "actionId", "variant": "param", "kind": 32768, @@ -4715,7 +4715,7 @@ } }, { - "id": 42596, + "id": 1527, "name": "query", "variant": "param", "kind": 32768, @@ -4741,7 +4741,7 @@ } }, { - "id": 42597, + "id": 1528, "name": "headers", "variant": "param", "kind": 32768, @@ -4758,7 +4758,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -4788,21 +4788,21 @@ ] }, { - "id": 42598, + "id": 1529, "name": "addOutboundItems", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/claim.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/claim.ts", "line": 587, "character": 8 } ], "signatures": [ { - "id": 42599, + "id": 1530, "name": "addOutboundItems", "variant": "signature", "kind": 4096, @@ -4845,14 +4845,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/claim.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/claim.ts", "line": 587, "character": 8 } ], "parameters": [ { - "id": 42600, + "id": 1531, "name": "id", "variant": "param", "kind": 32768, @@ -4871,7 +4871,7 @@ } }, { - "id": 42601, + "id": 1532, "name": "body", "variant": "param", "kind": 32768, @@ -4895,7 +4895,7 @@ } }, { - "id": 42602, + "id": 1533, "name": "query", "variant": "param", "kind": 32768, @@ -4921,7 +4921,7 @@ } }, { - "id": 42603, + "id": 1534, "name": "headers", "variant": "param", "kind": 32768, @@ -4938,7 +4938,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -4968,21 +4968,21 @@ ] }, { - "id": 42604, + "id": 1535, "name": "updateOutboundItem", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/claim.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/claim.ts", "line": 631, "character": 8 } ], "signatures": [ { - "id": 42605, + "id": 1536, "name": "updateOutboundItem", "variant": "signature", "kind": 4096, @@ -5049,14 +5049,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/claim.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/claim.ts", "line": 631, "character": 8 } ], "parameters": [ { - "id": 42606, + "id": 1537, "name": "id", "variant": "param", "kind": 32768, @@ -5075,7 +5075,7 @@ } }, { - "id": 42607, + "id": 1538, "name": "actionId", "variant": "param", "kind": 32768, @@ -5102,7 +5102,7 @@ } }, { - "id": 42608, + "id": 1539, "name": "body", "variant": "param", "kind": 32768, @@ -5126,7 +5126,7 @@ } }, { - "id": 42609, + "id": 1540, "name": "query", "variant": "param", "kind": 32768, @@ -5152,7 +5152,7 @@ } }, { - "id": 42610, + "id": 1541, "name": "headers", "variant": "param", "kind": 32768, @@ -5169,7 +5169,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -5199,21 +5199,21 @@ ] }, { - "id": 42611, + "id": 1542, "name": "removeOutboundItem", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/claim.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/claim.ts", "line": 672, "character": 8 } ], "signatures": [ { - "id": 42612, + "id": 1543, "name": "removeOutboundItem", "variant": "signature", "kind": 4096, @@ -5280,14 +5280,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/claim.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/claim.ts", "line": 672, "character": 8 } ], "parameters": [ { - "id": 42613, + "id": 1544, "name": "id", "variant": "param", "kind": 32768, @@ -5306,7 +5306,7 @@ } }, { - "id": 42614, + "id": 1545, "name": "actionId", "variant": "param", "kind": 32768, @@ -5333,7 +5333,7 @@ } }, { - "id": 42615, + "id": 1546, "name": "query", "variant": "param", "kind": 32768, @@ -5359,7 +5359,7 @@ } }, { - "id": 42616, + "id": 1547, "name": "headers", "variant": "param", "kind": 32768, @@ -5376,7 +5376,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -5406,21 +5406,21 @@ ] }, { - "id": 42617, + "id": 1548, "name": "addOutboundShipping", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/claim.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/claim.ts", "line": 714, "character": 8 } ], "signatures": [ { - "id": 42618, + "id": 1549, "name": "addOutboundShipping", "variant": "signature", "kind": 4096, @@ -5463,14 +5463,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/claim.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/claim.ts", "line": 714, "character": 8 } ], "parameters": [ { - "id": 42619, + "id": 1550, "name": "id", "variant": "param", "kind": 32768, @@ -5489,7 +5489,7 @@ } }, { - "id": 42620, + "id": 1551, "name": "body", "variant": "param", "kind": 32768, @@ -5513,7 +5513,7 @@ } }, { - "id": 42621, + "id": 1552, "name": "query", "variant": "param", "kind": 32768, @@ -5539,7 +5539,7 @@ } }, { - "id": 42622, + "id": 1553, "name": "headers", "variant": "param", "kind": 32768, @@ -5556,7 +5556,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -5586,21 +5586,21 @@ ] }, { - "id": 42623, + "id": 1554, "name": "updateOutboundShipping", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/claim.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/claim.ts", "line": 758, "character": 8 } ], "signatures": [ { - "id": 42624, + "id": 1555, "name": "updateOutboundShipping", "variant": "signature", "kind": 4096, @@ -5667,14 +5667,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/claim.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/claim.ts", "line": 758, "character": 8 } ], "parameters": [ { - "id": 42625, + "id": 1556, "name": "id", "variant": "param", "kind": 32768, @@ -5693,7 +5693,7 @@ } }, { - "id": 42626, + "id": 1557, "name": "actionId", "variant": "param", "kind": 32768, @@ -5720,7 +5720,7 @@ } }, { - "id": 42627, + "id": 1558, "name": "body", "variant": "param", "kind": 32768, @@ -5744,7 +5744,7 @@ } }, { - "id": 42628, + "id": 1559, "name": "query", "variant": "param", "kind": 32768, @@ -5770,7 +5770,7 @@ } }, { - "id": 42629, + "id": 1560, "name": "headers", "variant": "param", "kind": 32768, @@ -5787,7 +5787,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -5817,21 +5817,21 @@ ] }, { - "id": 42630, + "id": 1561, "name": "deleteOutboundShipping", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/claim.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/claim.ts", "line": 797, "character": 8 } ], "signatures": [ { - "id": 42631, + "id": 1562, "name": "deleteOutboundShipping", "variant": "signature", "kind": 4096, @@ -5898,14 +5898,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/claim.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/claim.ts", "line": 797, "character": 8 } ], "parameters": [ { - "id": 42632, + "id": 1563, "name": "id", "variant": "param", "kind": 32768, @@ -5924,7 +5924,7 @@ } }, { - "id": 42633, + "id": 1564, "name": "actionId", "variant": "param", "kind": 32768, @@ -5951,7 +5951,7 @@ } }, { - "id": 42634, + "id": 1565, "name": "query", "variant": "param", "kind": 32768, @@ -5977,7 +5977,7 @@ } }, { - "id": 42635, + "id": 1566, "name": "headers", "variant": "param", "kind": 32768, @@ -5994,7 +5994,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -6024,21 +6024,21 @@ ] }, { - "id": 42636, + "id": 1567, "name": "request", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/claim.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/claim.ts", "line": 833, "character": 8 } ], "signatures": [ { - "id": 42637, + "id": 1568, "name": "request", "variant": "signature", "kind": 4096, @@ -6073,14 +6073,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/claim.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/claim.ts", "line": 833, "character": 8 } ], "parameters": [ { - "id": 42638, + "id": 1569, "name": "id", "variant": "param", "kind": 32768, @@ -6099,7 +6099,7 @@ } }, { - "id": 42639, + "id": 1570, "name": "body", "variant": "param", "kind": 32768, @@ -6123,7 +6123,7 @@ } }, { - "id": 42640, + "id": 1571, "name": "query", "variant": "param", "kind": 32768, @@ -6149,7 +6149,7 @@ } }, { - "id": 42641, + "id": 1572, "name": "headers", "variant": "param", "kind": 32768, @@ -6166,7 +6166,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -6196,21 +6196,21 @@ ] }, { - "id": 42642, + "id": 1573, "name": "cancelRequest", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/claim.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/claim.ts", "line": 868, "character": 8 } ], "signatures": [ { - "id": 42643, + "id": 1574, "name": "cancelRequest", "variant": "signature", "kind": 4096, @@ -6245,14 +6245,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/claim.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/claim.ts", "line": 868, "character": 8 } ], "parameters": [ { - "id": 42644, + "id": 1575, "name": "id", "variant": "param", "kind": 32768, @@ -6271,7 +6271,7 @@ } }, { - "id": 42645, + "id": 1576, "name": "query", "variant": "param", "kind": 32768, @@ -6297,7 +6297,7 @@ } }, { - "id": 42646, + "id": 1577, "name": "headers", "variant": "param", "kind": 32768, @@ -6314,7 +6314,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -6348,59 +6348,59 @@ { "title": "Constructors", "children": [ - 42518 + 1449 ] }, { "title": "Properties", "children": [ - 42521 + 1452 ] }, { "title": "Methods", "children": [ - 42522, - 42526, - 42531, - 42536, - 42541, - 42547, - 42554, - 42560, - 42566, - 42573, - 42579, - 42585, - 42592, - 42598, - 42604, - 42611, - 42617, - 42623, - 42630, - 42636, - 42642 + 1453, + 1457, + 1462, + 1467, + 1472, + 1478, + 1485, + 1491, + 1497, + 1504, + 1510, + 1516, + 1523, + 1529, + 1535, + 1542, + 1548, + 1554, + 1561, + 1567, + 1573 ] } ], "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/claim.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/claim.ts", "line": 6, "character": 13 } ] }, { - "id": 42887, + "id": 1818, "name": "Currency", "variant": "declaration", "kind": 128, "flags": {}, "children": [ { - "id": 42891, + "id": 1822, "name": "client", "variant": "declaration", "kind": 1024, @@ -6415,34 +6415,34 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/currency.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/currency.ts", "line": 9, "character": 10 } ], "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } }, { - "id": 42888, + "id": 1819, "name": "constructor", "variant": "declaration", "kind": 512, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/currency.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/currency.ts", "line": 13, "character": 2 } ], "signatures": [ { - "id": 42889, + "id": 1820, "name": "Currency", "variant": "signature", "kind": 16384, @@ -6455,21 +6455,21 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/currency.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/currency.ts", "line": 13, "character": 2 } ], "parameters": [ { - "id": 42890, + "id": 1821, "name": "client", "variant": "param", "kind": 32768, "flags": {}, "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } @@ -6477,7 +6477,7 @@ ], "type": { "type": "reference", - "target": 42887, + "target": 1818, "name": "Currency", "package": "@medusajs/js-sdk" } @@ -6485,21 +6485,21 @@ ] }, { - "id": 42892, + "id": 1823, "name": "list", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/currency.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/currency.ts", "line": 64, "character": 8 } ], "signatures": [ { - "id": 42893, + "id": 1824, "name": "list", "variant": "signature", "kind": 4096, @@ -6590,14 +6590,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/currency.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/currency.ts", "line": 64, "character": 8 } ], "parameters": [ { - "id": 42894, + "id": 1825, "name": "query", "variant": "param", "kind": 32768, @@ -6623,7 +6623,7 @@ } }, { - "id": 42895, + "id": 1826, "name": "headers", "variant": "param", "kind": 32768, @@ -6640,7 +6640,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -6670,21 +6670,21 @@ ] }, { - "id": 42896, + "id": 1827, "name": "retrieve", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/currency.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/currency.ts", "line": 109, "character": 8 } ], "signatures": [ { - "id": 42897, + "id": 1828, "name": "retrieve", "variant": "signature", "kind": 4096, @@ -6743,14 +6743,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/currency.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/currency.ts", "line": 109, "character": 8 } ], "parameters": [ { - "id": 42898, + "id": 1829, "name": "code", "variant": "param", "kind": 32768, @@ -6769,7 +6769,7 @@ } }, { - "id": 42899, + "id": 1830, "name": "query", "variant": "param", "kind": 32768, @@ -6795,7 +6795,7 @@ } }, { - "id": 42900, + "id": 1831, "name": "headers", "variant": "param", "kind": 32768, @@ -6812,7 +6812,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -6846,40 +6846,40 @@ { "title": "Constructors", "children": [ - 42888 + 1819 ] }, { "title": "Properties", "children": [ - 42891 + 1822 ] }, { "title": "Methods", "children": [ - 42892, - 42896 + 1823, + 1827 ] } ], "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/currency.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/currency.ts", "line": 5, "character": 13 } ] }, { - "id": 43048, + "id": 1979, "name": "CustomerGroup", "variant": "declaration", "kind": 128, "flags": {}, "children": [ { - "id": 43052, + "id": 1983, "name": "client", "variant": "declaration", "kind": 1024, @@ -6894,34 +6894,34 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/customer-group.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/customer-group.ts", "line": 9, "character": 10 } ], "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } }, { - "id": 43049, + "id": 1980, "name": "constructor", "variant": "declaration", "kind": 512, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/customer-group.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/customer-group.ts", "line": 13, "character": 2 } ], "signatures": [ { - "id": 43050, + "id": 1981, "name": "CustomerGroup", "variant": "signature", "kind": 16384, @@ -6934,21 +6934,21 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/customer-group.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/customer-group.ts", "line": 13, "character": 2 } ], "parameters": [ { - "id": 43051, + "id": 1982, "name": "client", "variant": "param", "kind": 32768, "flags": {}, "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } @@ -6956,7 +6956,7 @@ ], "type": { "type": "reference", - "target": 43048, + "target": 1979, "name": "CustomerGroup", "package": "@medusajs/js-sdk" } @@ -6964,21 +6964,21 @@ ] }, { - "id": 43053, + "id": 1984, "name": "retrieve", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/customer-group.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/customer-group.ts", "line": 49, "character": 8 } ], "signatures": [ { - "id": 43054, + "id": 1985, "name": "retrieve", "variant": "signature", "kind": 4096, @@ -7037,14 +7037,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/customer-group.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/customer-group.ts", "line": 49, "character": 8 } ], "parameters": [ { - "id": 43055, + "id": 1986, "name": "id", "variant": "param", "kind": 32768, @@ -7063,7 +7063,7 @@ } }, { - "id": 43056, + "id": 1987, "name": "query", "variant": "param", "kind": 32768, @@ -7089,7 +7089,7 @@ } }, { - "id": 43057, + "id": 1988, "name": "headers", "variant": "param", "kind": 32768, @@ -7106,7 +7106,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -7136,21 +7136,21 @@ ] }, { - "id": 43058, + "id": 1989, "name": "list", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/customer-group.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/customer-group.ts", "line": 111, "character": 8 } ], "signatures": [ { - "id": 43059, + "id": 1990, "name": "list", "variant": "signature", "kind": 4096, @@ -7241,14 +7241,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/customer-group.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/customer-group.ts", "line": 111, "character": 8 } ], "parameters": [ { - "id": 43060, + "id": 1991, "name": "query", "variant": "param", "kind": 32768, @@ -7274,7 +7274,7 @@ } }, { - "id": 43061, + "id": 1992, "name": "headers", "variant": "param", "kind": 32768, @@ -7291,7 +7291,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -7321,21 +7321,21 @@ ] }, { - "id": 43062, + "id": 1993, "name": "create", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/customer-group.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/customer-group.ts", "line": 143, "character": 8 } ], "signatures": [ { - "id": 43063, + "id": 1994, "name": "create", "variant": "signature", "kind": 4096, @@ -7370,14 +7370,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/customer-group.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/customer-group.ts", "line": 143, "character": 8 } ], "parameters": [ { - "id": 43064, + "id": 1995, "name": "body", "variant": "param", "kind": 32768, @@ -7401,7 +7401,7 @@ } }, { - "id": 43065, + "id": 1996, "name": "query", "variant": "param", "kind": 32768, @@ -7427,7 +7427,7 @@ } }, { - "id": 43066, + "id": 1997, "name": "headers", "variant": "param", "kind": 32768, @@ -7444,7 +7444,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -7474,21 +7474,21 @@ ] }, { - "id": 43067, + "id": 1998, "name": "update", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/customer-group.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/customer-group.ts", "line": 178, "character": 8 } ], "signatures": [ { - "id": 43068, + "id": 1999, "name": "update", "variant": "signature", "kind": 4096, @@ -7523,14 +7523,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/customer-group.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/customer-group.ts", "line": 178, "character": 8 } ], "parameters": [ { - "id": 43069, + "id": 2000, "name": "id", "variant": "param", "kind": 32768, @@ -7549,7 +7549,7 @@ } }, { - "id": 43070, + "id": 2001, "name": "body", "variant": "param", "kind": 32768, @@ -7573,7 +7573,7 @@ } }, { - "id": 43071, + "id": 2002, "name": "query", "variant": "param", "kind": 32768, @@ -7599,7 +7599,7 @@ } }, { - "id": 43072, + "id": 2003, "name": "headers", "variant": "param", "kind": 32768, @@ -7616,7 +7616,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -7646,21 +7646,21 @@ ] }, { - "id": 43073, + "id": 2004, "name": "delete", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/customer-group.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/customer-group.ts", "line": 210, "character": 8 } ], "signatures": [ { - "id": 43074, + "id": 2005, "name": "delete", "variant": "signature", "kind": 4096, @@ -7695,14 +7695,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/customer-group.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/customer-group.ts", "line": 210, "character": 8 } ], "parameters": [ { - "id": 43075, + "id": 2006, "name": "id", "variant": "param", "kind": 32768, @@ -7721,7 +7721,7 @@ } }, { - "id": 43076, + "id": 2007, "name": "headers", "variant": "param", "kind": 32768, @@ -7738,7 +7738,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -7768,21 +7768,21 @@ ] }, { - "id": 43077, + "id": 2008, "name": "batchCustomers", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/customer-group.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/customer-group.ts", "line": 239, "character": 8 } ], "signatures": [ { - "id": 43078, + "id": 2009, "name": "batchCustomers", "variant": "signature", "kind": 4096, @@ -7817,14 +7817,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/customer-group.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/customer-group.ts", "line": 239, "character": 8 } ], "parameters": [ { - "id": 43079, + "id": 2010, "name": "id", "variant": "param", "kind": 32768, @@ -7843,7 +7843,7 @@ } }, { - "id": 43080, + "id": 2011, "name": "body", "variant": "param", "kind": 32768, @@ -7867,7 +7867,7 @@ } }, { - "id": 43081, + "id": 2012, "name": "headers", "variant": "param", "kind": 32768, @@ -7884,7 +7884,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -7918,44 +7918,44 @@ { "title": "Constructors", "children": [ - 43049 + 1980 ] }, { "title": "Properties", "children": [ - 43052 + 1983 ] }, { "title": "Methods", "children": [ - 43053, - 43058, - 43062, - 43067, - 43073, - 43077 + 1984, + 1989, + 1993, + 1998, + 2004, + 2008 ] } ], "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/customer-group.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/customer-group.ts", "line": 5, "character": 13 } ] }, { - "id": 41434, + "id": 365, "name": "Customer", "variant": "declaration", "kind": 128, "flags": {}, "children": [ { - "id": 41438, + "id": 369, "name": "client", "variant": "declaration", "kind": 1024, @@ -7970,34 +7970,34 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/customer.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/customer.ts", "line": 9, "character": 10 } ], "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } }, { - "id": 41435, + "id": 366, "name": "constructor", "variant": "declaration", "kind": 512, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/customer.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/customer.ts", "line": 13, "character": 2 } ], "signatures": [ { - "id": 41436, + "id": 367, "name": "Customer", "variant": "signature", "kind": 16384, @@ -8010,21 +8010,21 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/customer.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/customer.ts", "line": 13, "character": 2 } ], "parameters": [ { - "id": 41437, + "id": 368, "name": "client", "variant": "param", "kind": 32768, "flags": {}, "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } @@ -8032,7 +8032,7 @@ ], "type": { "type": "reference", - "target": 41434, + "target": 365, "name": "Customer", "package": "@medusajs/js-sdk" } @@ -8040,21 +8040,21 @@ ] }, { - "id": 41439, + "id": 370, "name": "create", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/customer.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/customer.ts", "line": 34, "character": 8 } ], "signatures": [ { - "id": 41440, + "id": 371, "name": "create", "variant": "signature", "kind": 4096, @@ -8089,14 +8089,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/customer.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/customer.ts", "line": 34, "character": 8 } ], "parameters": [ { - "id": 41441, + "id": 372, "name": "body", "variant": "param", "kind": 32768, @@ -8120,7 +8120,7 @@ } }, { - "id": 41442, + "id": 373, "name": "query", "variant": "param", "kind": 32768, @@ -8146,7 +8146,7 @@ } }, { - "id": 41443, + "id": 374, "name": "headers", "variant": "param", "kind": 32768, @@ -8163,7 +8163,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -8193,21 +8193,21 @@ ] }, { - "id": 41444, + "id": 375, "name": "update", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/customer.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/customer.ts", "line": 68, "character": 8 } ], "signatures": [ { - "id": 41445, + "id": 376, "name": "update", "variant": "signature", "kind": 4096, @@ -8242,14 +8242,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/customer.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/customer.ts", "line": 68, "character": 8 } ], "parameters": [ { - "id": 41446, + "id": 377, "name": "id", "variant": "param", "kind": 32768, @@ -8268,7 +8268,7 @@ } }, { - "id": 41447, + "id": 378, "name": "body", "variant": "param", "kind": 32768, @@ -8292,7 +8292,7 @@ } }, { - "id": 41448, + "id": 379, "name": "query", "variant": "param", "kind": 32768, @@ -8318,7 +8318,7 @@ } }, { - "id": 41449, + "id": 380, "name": "headers", "variant": "param", "kind": 32768, @@ -8335,7 +8335,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -8365,21 +8365,21 @@ ] }, { - "id": 41450, + "id": 381, "name": "list", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/customer.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/customer.ts", "line": 132, "character": 8 } ], "signatures": [ { - "id": 41451, + "id": 382, "name": "list", "variant": "signature", "kind": 4096, @@ -8470,14 +8470,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/customer.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/customer.ts", "line": 132, "character": 8 } ], "parameters": [ { - "id": 41452, + "id": 383, "name": "queryParams", "variant": "param", "kind": 32768, @@ -8503,7 +8503,7 @@ } }, { - "id": 41453, + "id": 384, "name": "headers", "variant": "param", "kind": 32768, @@ -8520,7 +8520,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -8550,21 +8550,21 @@ ] }, { - "id": 41454, + "id": 385, "name": "retrieve", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/customer.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/customer.ts", "line": 178, "character": 8 } ], "signatures": [ { - "id": 41455, + "id": 386, "name": "retrieve", "variant": "signature", "kind": 4096, @@ -8623,14 +8623,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/customer.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/customer.ts", "line": 178, "character": 8 } ], "parameters": [ { - "id": 41456, + "id": 387, "name": "id", "variant": "param", "kind": 32768, @@ -8649,7 +8649,7 @@ } }, { - "id": 41457, + "id": 388, "name": "query", "variant": "param", "kind": 32768, @@ -8675,7 +8675,7 @@ } }, { - "id": 41458, + "id": 389, "name": "headers", "variant": "param", "kind": 32768, @@ -8692,7 +8692,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -8722,21 +8722,21 @@ ] }, { - "id": 41459, + "id": 390, "name": "delete", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/customer.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/customer.ts", "line": 203, "character": 8 } ], "signatures": [ { - "id": 41460, + "id": 391, "name": "delete", "variant": "signature", "kind": 4096, @@ -8771,14 +8771,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/customer.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/customer.ts", "line": 203, "character": 8 } ], "parameters": [ { - "id": 41461, + "id": 392, "name": "id", "variant": "param", "kind": 32768, @@ -8797,7 +8797,7 @@ } }, { - "id": 41462, + "id": 393, "name": "headers", "variant": "param", "kind": 32768, @@ -8814,7 +8814,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -8844,21 +8844,21 @@ ] }, { - "id": 41463, + "id": 394, "name": "batchCustomerGroups", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/customer.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/customer.ts", "line": 232, "character": 8 } ], "signatures": [ { - "id": 41464, + "id": 395, "name": "batchCustomerGroups", "variant": "signature", "kind": 4096, @@ -8893,14 +8893,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/customer.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/customer.ts", "line": 232, "character": 8 } ], "parameters": [ { - "id": 41465, + "id": 396, "name": "id", "variant": "param", "kind": 32768, @@ -8919,7 +8919,7 @@ } }, { - "id": 41466, + "id": 397, "name": "body", "variant": "param", "kind": 32768, @@ -8943,7 +8943,7 @@ } }, { - "id": 41467, + "id": 398, "name": "headers", "variant": "param", "kind": 32768, @@ -8960,7 +8960,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -8990,21 +8990,21 @@ ] }, { - "id": 41468, + "id": 399, "name": "createAddress", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/customer.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/customer.ts", "line": 268, "character": 8 } ], "signatures": [ { - "id": 41469, + "id": 400, "name": "createAddress", "variant": "signature", "kind": 4096, @@ -9039,14 +9039,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/customer.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/customer.ts", "line": 268, "character": 8 } ], "parameters": [ { - "id": 41470, + "id": 401, "name": "id", "variant": "param", "kind": 32768, @@ -9065,7 +9065,7 @@ } }, { - "id": 41471, + "id": 402, "name": "body", "variant": "param", "kind": 32768, @@ -9089,7 +9089,7 @@ } }, { - "id": 41472, + "id": 403, "name": "headers", "variant": "param", "kind": 32768, @@ -9106,7 +9106,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -9136,21 +9136,21 @@ ] }, { - "id": 41473, + "id": 404, "name": "updateAddress", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/customer.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/customer.ts", "line": 305, "character": 8 } ], "signatures": [ { - "id": 41474, + "id": 405, "name": "updateAddress", "variant": "signature", "kind": 4096, @@ -9185,14 +9185,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/customer.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/customer.ts", "line": 305, "character": 8 } ], "parameters": [ { - "id": 41475, + "id": 406, "name": "id", "variant": "param", "kind": 32768, @@ -9211,7 +9211,7 @@ } }, { - "id": 41476, + "id": 407, "name": "addressId", "variant": "param", "kind": 32768, @@ -9230,7 +9230,7 @@ } }, { - "id": 41477, + "id": 408, "name": "body", "variant": "param", "kind": 32768, @@ -9254,7 +9254,7 @@ } }, { - "id": 41478, + "id": 409, "name": "headers", "variant": "param", "kind": 32768, @@ -9271,7 +9271,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -9301,21 +9301,21 @@ ] }, { - "id": 41479, + "id": 410, "name": "deleteAddress", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/customer.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/customer.ts", "line": 337, "character": 8 } ], "signatures": [ { - "id": 41480, + "id": 411, "name": "deleteAddress", "variant": "signature", "kind": 4096, @@ -9350,14 +9350,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/customer.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/customer.ts", "line": 337, "character": 8 } ], "parameters": [ { - "id": 41481, + "id": 412, "name": "id", "variant": "param", "kind": 32768, @@ -9376,7 +9376,7 @@ } }, { - "id": 41482, + "id": 413, "name": "addressId", "variant": "param", "kind": 32768, @@ -9395,7 +9395,7 @@ } }, { - "id": 41483, + "id": 414, "name": "headers", "variant": "param", "kind": 32768, @@ -9412,7 +9412,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -9442,21 +9442,21 @@ ] }, { - "id": 41484, + "id": 415, "name": "retrieveAddress", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/customer.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/customer.ts", "line": 363, "character": 8 } ], "signatures": [ { - "id": 41485, + "id": 416, "name": "retrieveAddress", "variant": "signature", "kind": 4096, @@ -9491,14 +9491,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/customer.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/customer.ts", "line": 363, "character": 8 } ], "parameters": [ { - "id": 41486, + "id": 417, "name": "id", "variant": "param", "kind": 32768, @@ -9517,7 +9517,7 @@ } }, { - "id": 41487, + "id": 418, "name": "addressId", "variant": "param", "kind": 32768, @@ -9536,7 +9536,7 @@ } }, { - "id": 41488, + "id": 419, "name": "headers", "variant": "param", "kind": 32768, @@ -9553,7 +9553,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -9583,21 +9583,21 @@ ] }, { - "id": 41489, + "id": 420, "name": "listAddresses", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/customer.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/customer.ts", "line": 391, "character": 8 } ], "signatures": [ { - "id": 41490, + "id": 421, "name": "listAddresses", "variant": "signature", "kind": 4096, @@ -9632,14 +9632,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/customer.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/customer.ts", "line": 391, "character": 8 } ], "parameters": [ { - "id": 41491, + "id": 422, "name": "id", "variant": "param", "kind": 32768, @@ -9658,7 +9658,7 @@ } }, { - "id": 41492, + "id": 423, "name": "headers", "variant": "param", "kind": 32768, @@ -9675,7 +9675,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -9709,49 +9709,49 @@ { "title": "Constructors", "children": [ - 41435 + 366 ] }, { "title": "Properties", "children": [ - 41438 + 369 ] }, { "title": "Methods", "children": [ - 41439, - 41444, - 41450, - 41454, - 41459, - 41463, - 41468, - 41473, - 41479, - 41484, - 41489 + 370, + 375, + 381, + 385, + 390, + 394, + 399, + 404, + 410, + 415, + 420 ] } ], "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/customer.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/customer.ts", "line": 5, "character": 13 } ] }, { - "id": 42227, + "id": 1158, "name": "DraftOrder", "variant": "declaration", "kind": 128, "flags": {}, "children": [ { - "id": 42231, + "id": 1162, "name": "client", "variant": "declaration", "kind": 1024, @@ -9766,34 +9766,34 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/draft-order.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/draft-order.ts", "line": 10, "character": 10 } ], "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } }, { - "id": 42228, + "id": 1159, "name": "constructor", "variant": "declaration", "kind": 512, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/draft-order.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/draft-order.ts", "line": 14, "character": 2 } ], "signatures": [ { - "id": 42229, + "id": 1160, "name": "DraftOrder", "variant": "signature", "kind": 16384, @@ -9806,21 +9806,21 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/draft-order.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/draft-order.ts", "line": 14, "character": 2 } ], "parameters": [ { - "id": 42230, + "id": 1161, "name": "client", "variant": "param", "kind": 32768, "flags": {}, "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } @@ -9828,7 +9828,7 @@ ], "type": { "type": "reference", - "target": 42227, + "target": 1158, "name": "DraftOrder", "package": "@medusajs/js-sdk" } @@ -9836,21 +9836,21 @@ ] }, { - "id": 42232, + "id": 1163, "name": "retrieve", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/draft-order.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/draft-order.ts", "line": 51, "character": 8 } ], "signatures": [ { - "id": 42233, + "id": 1164, "name": "retrieve", "variant": "signature", "kind": 4096, @@ -9909,14 +9909,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/draft-order.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/draft-order.ts", "line": 51, "character": 8 } ], "parameters": [ { - "id": 42234, + "id": 1165, "name": "id", "variant": "param", "kind": 32768, @@ -9935,7 +9935,7 @@ } }, { - "id": 42235, + "id": 1166, "name": "query", "variant": "param", "kind": 32768, @@ -9961,7 +9961,7 @@ } }, { - "id": 42236, + "id": 1167, "name": "headers", "variant": "param", "kind": 32768, @@ -9978,7 +9978,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -10008,21 +10008,21 @@ ] }, { - "id": 42237, + "id": 1168, "name": "list", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/draft-order.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/draft-order.ts", "line": 111, "character": 8 } ], "signatures": [ { - "id": 42238, + "id": 1169, "name": "list", "variant": "signature", "kind": 4096, @@ -10113,14 +10113,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/draft-order.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/draft-order.ts", "line": 111, "character": 8 } ], "parameters": [ { - "id": 42239, + "id": 1170, "name": "queryParams", "variant": "param", "kind": 32768, @@ -10146,7 +10146,7 @@ } }, { - "id": 42240, + "id": 1171, "name": "headers", "variant": "param", "kind": 32768, @@ -10163,7 +10163,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -10193,21 +10193,21 @@ ] }, { - "id": 42241, + "id": 1172, "name": "create", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/draft-order.ts", - "line": 148, + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/draft-order.ts", + "line": 149, "character": 8 } ], "signatures": [ { - "id": 42242, + "id": 1173, "name": "create", "variant": "signature", "kind": 4096, @@ -10220,6 +10220,15 @@ } ], "blockTags": [ + { + "tag": "@returns", + "content": [ + { + "kind": "text", + "text": "The draft order's details." + } + ] + }, { "tag": "@example", "content": [ @@ -10233,14 +10242,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/draft-order.ts", - "line": 148, + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/draft-order.ts", + "line": 149, "character": 8 } ], "parameters": [ { - "id": 42243, + "id": 1174, "name": "body", "variant": "param", "kind": 32768, @@ -10264,7 +10273,7 @@ } }, { - "id": 42244, + "id": 1175, "name": "query", "variant": "param", "kind": 32768, @@ -10290,7 +10299,7 @@ } }, { - "id": 42245, + "id": 1176, "name": "headers", "variant": "param", "kind": 32768, @@ -10307,7 +10316,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -10337,21 +10346,21 @@ ] }, { - "id": 42246, + "id": 1177, "name": "update", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/draft-order.ts", - "line": 181, + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/draft-order.ts", + "line": 183, "character": 8 } ], "signatures": [ { - "id": 42247, + "id": 1178, "name": "update", "variant": "signature", "kind": 4096, @@ -10364,6 +10373,15 @@ } ], "blockTags": [ + { + "tag": "@returns", + "content": [ + { + "kind": "text", + "text": "The draft order's details." + } + ] + }, { "tag": "@example", "content": [ @@ -10377,14 +10395,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/draft-order.ts", - "line": 181, + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/draft-order.ts", + "line": 183, "character": 8 } ], "parameters": [ { - "id": 42248, + "id": 1179, "name": "id", "variant": "param", "kind": 32768, @@ -10403,7 +10421,7 @@ } }, { - "id": 42249, + "id": 1180, "name": "body", "variant": "param", "kind": 32768, @@ -10427,7 +10445,7 @@ } }, { - "id": 42250, + "id": 1181, "name": "query", "variant": "param", "kind": 32768, @@ -10453,7 +10471,7 @@ } }, { - "id": 42251, + "id": 1182, "name": "headers", "variant": "param", "kind": 32768, @@ -10470,7 +10488,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -10500,21 +10518,21 @@ ] }, { - "id": 42252, + "id": 1183, "name": "convertToOrder", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/draft-order.ts", - "line": 212, + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/draft-order.ts", + "line": 215, "character": 8 } ], "signatures": [ { - "id": 42253, + "id": 1184, "name": "convertToOrder", "variant": "signature", "kind": 4096, @@ -10523,10 +10541,19 @@ "summary": [ { "kind": "text", - "text": "This method converts a draft order to an order. It sends a request to the\n[Convert Draft Order to Order](https://docs.medusajs.com/api/admin#draft-orders_postdraftordersidconvert-to-order) API route." + "text": "This method converts a draft order to an order. It sends a request to the\n[Convert Draft Order to Order](https://docs.medusajs.com/api/admin#draft-orders_postdraftordersidconverttoorder) API route." } ], "blockTags": [ + { + "tag": "@returns", + "content": [ + { + "kind": "text", + "text": "The order's details." + } + ] + }, { "tag": "@example", "content": [ @@ -10540,14 +10567,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/draft-order.ts", - "line": 212, + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/draft-order.ts", + "line": 215, "character": 8 } ], "parameters": [ { - "id": 42254, + "id": 1185, "name": "id", "variant": "param", "kind": 32768, @@ -10566,7 +10593,7 @@ } }, { - "id": 42255, + "id": 1186, "name": "query", "variant": "param", "kind": 32768, @@ -10592,7 +10619,7 @@ } }, { - "id": 42256, + "id": 1187, "name": "headers", "variant": "param", "kind": 32768, @@ -10609,7 +10636,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -10639,21 +10666,21 @@ ] }, { - "id": 42257, + "id": 1188, "name": "addItems", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/draft-order.ts", - "line": 248, + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/draft-order.ts", + "line": 252, "character": 8 } ], "signatures": [ { - "id": 42258, + "id": 1189, "name": "addItems", "variant": "signature", "kind": 4096, @@ -10662,10 +10689,19 @@ "summary": [ { "kind": "text", - "text": "This method adds items to a draft order. It sends a request to the\n[Add Draft Order Items](https://docs.medusajs.com/api/admin#draft-orders_postordereditsiditems) API route." + "text": "This method adds items to a draft order. It sends a request to the\n[Add Draft Order Items](https://docs.medusajs.com/api/admin#draft-orders_postdraftordersidedititems) API route." } ], "blockTags": [ + { + "tag": "@returns", + "content": [ + { + "kind": "text", + "text": "The draft order preview's details." + } + ] + }, { "tag": "@example", "content": [ @@ -10679,14 +10715,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/draft-order.ts", - "line": 248, + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/draft-order.ts", + "line": 252, "character": 8 } ], "parameters": [ { - "id": 42259, + "id": 1190, "name": "id", "variant": "param", "kind": 32768, @@ -10705,7 +10741,7 @@ } }, { - "id": 42260, + "id": 1191, "name": "body", "variant": "param", "kind": 32768, @@ -10729,7 +10765,7 @@ } }, { - "id": 42261, + "id": 1192, "name": "headers", "variant": "param", "kind": 32768, @@ -10746,7 +10782,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -10776,21 +10812,21 @@ ] }, { - "id": 42262, + "id": 1193, "name": "updateActionItem", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/draft-order.ts", - "line": 280, + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/draft-order.ts", + "line": 285, "character": 8 } ], "signatures": [ { - "id": 42263, + "id": 1194, "name": "updateActionItem", "variant": "signature", "kind": 4096, @@ -10799,10 +10835,19 @@ "summary": [ { "kind": "text", - "text": "This method updates an item that is part of an action in a draft order. It sends a request to the\n[Update Draft Order Item](https://docs.medusajs.com/api/admin#draft-orders_postordereditsiditemsaction_id) API route." + "text": "This method updates an item that is part of an action in a draft order. It sends a request to the\n[Update Draft Order Item](https://docs.medusajs.com/api/admin#draft-orders_postdraftordersidedititemsaction_id) API route." } ], "blockTags": [ + { + "tag": "@returns", + "content": [ + { + "kind": "text", + "text": "The draft order preview's details." + } + ] + }, { "tag": "@example", "content": [ @@ -10816,14 +10861,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/draft-order.ts", - "line": 280, + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/draft-order.ts", + "line": 285, "character": 8 } ], "parameters": [ { - "id": 42264, + "id": 1195, "name": "id", "variant": "param", "kind": 32768, @@ -10842,7 +10887,7 @@ } }, { - "id": 42265, + "id": 1196, "name": "actionId", "variant": "param", "kind": 32768, @@ -10861,7 +10906,7 @@ } }, { - "id": 42266, + "id": 1197, "name": "body", "variant": "param", "kind": 32768, @@ -10885,7 +10930,7 @@ } }, { - "id": 42267, + "id": 1198, "name": "headers", "variant": "param", "kind": 32768, @@ -10902,7 +10947,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -10932,21 +10977,21 @@ ] }, { - "id": 42268, + "id": 1199, "name": "removeActionItem", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/draft-order.ts", - "line": 310, + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/draft-order.ts", + "line": 316, "character": 8 } ], "signatures": [ { - "id": 42269, + "id": 1200, "name": "removeActionItem", "variant": "signature", "kind": 4096, @@ -10955,10 +11000,19 @@ "summary": [ { "kind": "text", - "text": "This method removes an item that is part of an action in a draft order. It sends a request to the\n[Remove Draft Order Item](https://docs.medusajs.com/api/admin#draft-orders_deleteordereditsiditemsaction_id) API route." + "text": "This method removes an item that is part of an action in a draft order. It sends a request to the\n[Remove Draft Order Item](https://docs.medusajs.com/api/admin#draft-orders_deletedraftordersidedititemsaction_id) API route." } ], "blockTags": [ + { + "tag": "@returns", + "content": [ + { + "kind": "text", + "text": "The draft order preview's details." + } + ] + }, { "tag": "@example", "content": [ @@ -10972,14 +11026,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/draft-order.ts", - "line": 310, + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/draft-order.ts", + "line": 316, "character": 8 } ], "parameters": [ { - "id": 42270, + "id": 1201, "name": "id", "variant": "param", "kind": 32768, @@ -10998,7 +11052,7 @@ } }, { - "id": 42271, + "id": 1202, "name": "actionId", "variant": "param", "kind": 32768, @@ -11017,7 +11071,7 @@ } }, { - "id": 42272, + "id": 1203, "name": "headers", "variant": "param", "kind": 32768, @@ -11034,7 +11088,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -11064,21 +11118,21 @@ ] }, { - "id": 42273, + "id": 1204, "name": "updateItem", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/draft-order.ts", - "line": 342, + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/draft-order.ts", + "line": 348, "character": 8 } ], "signatures": [ { - "id": 42274, + "id": 1205, "name": "updateItem", "variant": "signature", "kind": 4096, @@ -11087,7 +11141,7 @@ "summary": [ { "kind": "text", - "text": "This method updates an item in a draft order. It sends a request to the\n[Update Draft Order Item](https://docs.medusajs.com/api/admin#draft-orders_postordereditsiditemsitem_id) API route." + "text": "This method updates an item in a draft order. It sends a request to the\n[Update Draft Order Item](https://docs.medusajs.com/api/admin#draft-orders_postdraftordersidedititemsitemitem_id) API route." } ], "blockTags": [ @@ -11113,14 +11167,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/draft-order.ts", - "line": 342, + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/draft-order.ts", + "line": 348, "character": 8 } ], "parameters": [ { - "id": 42275, + "id": 1206, "name": "id", "variant": "param", "kind": 32768, @@ -11139,7 +11193,7 @@ } }, { - "id": 42276, + "id": 1207, "name": "itemId", "variant": "param", "kind": 32768, @@ -11158,7 +11212,7 @@ } }, { - "id": 42277, + "id": 1208, "name": "body", "variant": "param", "kind": 32768, @@ -11182,7 +11236,7 @@ } }, { - "id": 42278, + "id": 1209, "name": "headers", "variant": "param", "kind": 32768, @@ -11199,7 +11253,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -11229,21 +11283,21 @@ ] }, { - "id": 42279, + "id": 1210, "name": "addPromotions", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/draft-order.ts", - "line": 374, + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/draft-order.ts", + "line": 381, "character": 8 } ], "signatures": [ { - "id": 42280, + "id": 1211, "name": "addPromotions", "variant": "signature", "kind": 4096, @@ -11252,10 +11306,19 @@ "summary": [ { "kind": "text", - "text": "This method adds promotions to a draft order. It sends a request to the\n[Add Draft Order Promotions](https://docs.medusajs.com/api/admin#draft-orders_postordereditsidpromotions) API route." + "text": "This method adds promotions to a draft order. It sends a request to the\n[Add Draft Order Promotions](https://docs.medusajs.com/api/admin#draft-orders_postdraftordersideditpromotions) API route." } ], "blockTags": [ + { + "tag": "@returns", + "content": [ + { + "kind": "text", + "text": "The draft order preview's details." + } + ] + }, { "tag": "@example", "content": [ @@ -11269,14 +11332,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/draft-order.ts", - "line": 374, + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/draft-order.ts", + "line": 381, "character": 8 } ], "parameters": [ { - "id": 42281, + "id": 1212, "name": "id", "variant": "param", "kind": 32768, @@ -11295,7 +11358,7 @@ } }, { - "id": 42282, + "id": 1213, "name": "body", "variant": "param", "kind": 32768, @@ -11319,7 +11382,7 @@ } }, { - "id": 42283, + "id": 1214, "name": "headers", "variant": "param", "kind": 32768, @@ -11336,7 +11399,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -11366,21 +11429,21 @@ ] }, { - "id": 42284, + "id": 1215, "name": "removePromotions", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/draft-order.ts", - "line": 402, + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/draft-order.ts", + "line": 410, "character": 8 } ], "signatures": [ { - "id": 42285, + "id": 1216, "name": "removePromotions", "variant": "signature", "kind": 4096, @@ -11389,10 +11452,19 @@ "summary": [ { "kind": "text", - "text": "This method removes promotions from a draft order. It sends a request to the\n[Remove Draft Order Promotions](https://docs.medusajs.com/api/admin#draft-orders_deleteordereditsidpromotions) API route." + "text": "This method removes promotions from a draft order. It sends a request to the\n[Remove Draft Order Promotions](https://docs.medusajs.com/api/admin#draft-orders_deletedraftordersideditpromotions) API route." } ], "blockTags": [ + { + "tag": "@returns", + "content": [ + { + "kind": "text", + "text": "The draft order preview's details." + } + ] + }, { "tag": "@example", "content": [ @@ -11406,14 +11478,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/draft-order.ts", - "line": 402, + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/draft-order.ts", + "line": 410, "character": 8 } ], "parameters": [ { - "id": 42286, + "id": 1217, "name": "id", "variant": "param", "kind": 32768, @@ -11432,7 +11504,7 @@ } }, { - "id": 42287, + "id": 1218, "name": "body", "variant": "param", "kind": 32768, @@ -11456,7 +11528,7 @@ } }, { - "id": 42288, + "id": 1219, "name": "headers", "variant": "param", "kind": 32768, @@ -11473,7 +11545,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -11503,21 +11575,21 @@ ] }, { - "id": 42289, + "id": 1220, "name": "addShippingMethod", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/draft-order.ts", - "line": 433, + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/draft-order.ts", + "line": 442, "character": 8 } ], "signatures": [ { - "id": 42290, + "id": 1221, "name": "addShippingMethod", "variant": "signature", "kind": 4096, @@ -11526,10 +11598,19 @@ "summary": [ { "kind": "text", - "text": "This method adds a shipping method to a draft order. It sends a request to the\n[Add Draft Order Shipping Method](https://docs.medusajs.com/api/admin#draft-orders_postordereditsidshipping-methods) API route." + "text": "This method adds a shipping method to a draft order. It sends a request to the\n[Add Draft Order Shipping Method](https://docs.medusajs.com/api/admin#draft-orders_postdraftordersideditshippingmethods) API route." } ], "blockTags": [ + { + "tag": "@returns", + "content": [ + { + "kind": "text", + "text": "The draft order preview's details." + } + ] + }, { "tag": "@example", "content": [ @@ -11543,14 +11624,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/draft-order.ts", - "line": 433, + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/draft-order.ts", + "line": 442, "character": 8 } ], "parameters": [ { - "id": 42291, + "id": 1222, "name": "id", "variant": "param", "kind": 32768, @@ -11569,7 +11650,7 @@ } }, { - "id": 42292, + "id": 1223, "name": "body", "variant": "param", "kind": 32768, @@ -11593,7 +11674,7 @@ } }, { - "id": 42293, + "id": 1224, "name": "headers", "variant": "param", "kind": 32768, @@ -11610,7 +11691,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -11640,21 +11721,21 @@ ] }, { - "id": 42294, + "id": 1225, "name": "updateActionShippingMethod", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/draft-order.ts", - "line": 465, + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/draft-order.ts", + "line": 475, "character": 8 } ], "signatures": [ { - "id": 42295, + "id": 1226, "name": "updateActionShippingMethod", "variant": "signature", "kind": 4096, @@ -11663,10 +11744,19 @@ "summary": [ { "kind": "text", - "text": "This method updates a shipping method in a draft order. It sends a request to the\n[Update Draft Order Shipping Method](https://docs.medusajs.com/api/admin#draft-orders_postordereditsidshipping-methodsaction_id) API route." + "text": "This method updates a shipping method in a draft order. It sends a request to the\n[Update Draft Order Shipping Method](https://docs.medusajs.com/api/admin#draft-orders_postdraftordersideditshippingmethodsaction_id) API route." } ], "blockTags": [ + { + "tag": "@returns", + "content": [ + { + "kind": "text", + "text": "The draft order preview's details." + } + ] + }, { "tag": "@example", "content": [ @@ -11680,14 +11770,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/draft-order.ts", - "line": 465, + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/draft-order.ts", + "line": 475, "character": 8 } ], "parameters": [ { - "id": 42296, + "id": 1227, "name": "id", "variant": "param", "kind": 32768, @@ -11706,7 +11796,7 @@ } }, { - "id": 42297, + "id": 1228, "name": "actionId", "variant": "param", "kind": 32768, @@ -11725,7 +11815,7 @@ } }, { - "id": 42298, + "id": 1229, "name": "body", "variant": "param", "kind": 32768, @@ -11749,7 +11839,7 @@ } }, { - "id": 42299, + "id": 1230, "name": "headers", "variant": "param", "kind": 32768, @@ -11766,7 +11856,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -11796,21 +11886,21 @@ ] }, { - "id": 42300, + "id": 1231, "name": "removeActionShippingMethod", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/draft-order.ts", - "line": 495, + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/draft-order.ts", + "line": 506, "character": 8 } ], "signatures": [ { - "id": 42301, + "id": 1232, "name": "removeActionShippingMethod", "variant": "signature", "kind": 4096, @@ -11819,10 +11909,19 @@ "summary": [ { "kind": "text", - "text": "This method removes a shipping method from a draft order. It sends a request to the\n[Remove Draft Order Shipping Method](https://docs.medusajs.com/api/admin#draft-orders_deleteordereditsidshipping-methodsaction_id) API route." + "text": "This method removes a shipping method from a draft order. It sends a request to the\n[Remove Draft Order Shipping Method](https://docs.medusajs.com/api/admin#draft-orders_deletedraftordersideditshippingmethodsaction_id) API route." } ], "blockTags": [ + { + "tag": "@returns", + "content": [ + { + "kind": "text", + "text": "The draft order preview's details." + } + ] + }, { "tag": "@example", "content": [ @@ -11836,14 +11935,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/draft-order.ts", - "line": 495, + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/draft-order.ts", + "line": 506, "character": 8 } ], "parameters": [ { - "id": 42302, + "id": 1233, "name": "id", "variant": "param", "kind": 32768, @@ -11862,7 +11961,7 @@ } }, { - "id": 42303, + "id": 1234, "name": "actionId", "variant": "param", "kind": 32768, @@ -11881,7 +11980,7 @@ } }, { - "id": 42304, + "id": 1235, "name": "headers", "variant": "param", "kind": 32768, @@ -11898,7 +11997,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -11928,66 +12027,118 @@ ] }, { - "id": 42305, + "id": 1236, "name": "removeShippingMethod", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/draft-order.ts", - "line": 509, + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/draft-order.ts", + "line": 538, "character": 8 } ], "signatures": [ { - "id": 42306, + "id": 1237, "name": "removeShippingMethod", "variant": "signature", "kind": 4096, "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "This method removes a shipping method from an edited draft order. It sends a request to the\n[Remove Draft Order Shipping Method](https://docs.medusajs.com/api/admin#draft-orders_deletedraftordersideditshippingmethodsmethodmethod_id) API route." + } + ], + "blockTags": [ + { + "tag": "@returns", + "content": [ + { + "kind": "text", + "text": "The draft order preview's details." + } + ] + }, + { + "tag": "@example", + "content": [ + { + "kind": "code", + "text": "```ts\nsdk.admin.draftOrder.removeShippingMethod(\n \"order_123\", \n \"shipping_method_123\"\n)\n.then(({ draft_order_preview }) => {\n console.log(draft_order_preview)\n})\n```" + } + ] + } + ] + }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/draft-order.ts", - "line": 509, + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/draft-order.ts", + "line": 538, "character": 8 } ], "parameters": [ { - "id": 42307, + "id": 1238, "name": "id", "variant": "param", "kind": 32768, "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The draft order's ID." + } + ] + }, "type": { "type": "intrinsic", "name": "string" } }, { - "id": 42308, + "id": 1239, "name": "shippingMethodId", "variant": "param", "kind": 32768, "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The shipping method's ID." + } + ] + }, "type": { "type": "intrinsic", "name": "string" } }, { - "id": 42309, + "id": 1240, "name": "headers", "variant": "param", "kind": 32768, "flags": { "isOptional": true }, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Headers to pass in the request." + } + ] + }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -12017,21 +12168,21 @@ ] }, { - "id": 42310, + "id": 1241, "name": "updateShippingMethod", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/draft-order.ts", - "line": 541, + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/draft-order.ts", + "line": 570, "character": 8 } ], "signatures": [ { - "id": 42311, + "id": 1242, "name": "updateShippingMethod", "variant": "signature", "kind": 4096, @@ -12040,7 +12191,7 @@ "summary": [ { "kind": "text", - "text": "This method updates a shipping method in a draft order. It sends a request to the\n[Update Draft Order Shipping Method](https://docs.medusajs.com/api/admin#draft-orders_postordereditsidshipping-methodsaction_id) API route." + "text": "This method updates a shipping method in a draft order. It sends a request to the\n[Update Draft Order Shipping Method](https://docs.medusajs.com/api/admin#draft-orders_postdraftordersideditshippingmethodsmethodmethod_id) API route." } ], "blockTags": [ @@ -12066,14 +12217,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/draft-order.ts", - "line": 541, + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/draft-order.ts", + "line": 570, "character": 8 } ], "parameters": [ { - "id": 42312, + "id": 1243, "name": "id", "variant": "param", "kind": 32768, @@ -12092,7 +12243,7 @@ } }, { - "id": 42313, + "id": 1244, "name": "methodId", "variant": "param", "kind": 32768, @@ -12111,7 +12262,7 @@ } }, { - "id": 42314, + "id": 1245, "name": "body", "variant": "param", "kind": 32768, @@ -12135,7 +12286,7 @@ } }, { - "id": 42315, + "id": 1246, "name": "headers", "variant": "param", "kind": 32768, @@ -12152,7 +12303,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -12182,21 +12333,21 @@ ] }, { - "id": 42316, + "id": 1247, "name": "beginEdit", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/draft-order.ts", - "line": 569, + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/draft-order.ts", + "line": 598, "character": 8 } ], "signatures": [ { - "id": 42317, + "id": 1248, "name": "beginEdit", "variant": "signature", "kind": 4096, @@ -12205,7 +12356,7 @@ "summary": [ { "kind": "text", - "text": "This method begins an edit to a draft order. It sends a request to the\n[Begin Draft Order Edit](https://docs.medusajs.com/api/admin#draft-orders_postordereditsid) API route." + "text": "This method begins an edit to a draft order. It sends a request to the\n[Begin Draft Order Edit](https://docs.medusajs.com/api/admin#draft-orders_postdraftordersidedit) API route." } ], "blockTags": [ @@ -12222,14 +12373,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/draft-order.ts", - "line": 569, + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/draft-order.ts", + "line": 598, "character": 8 } ], "parameters": [ { - "id": 42318, + "id": 1249, "name": "id", "variant": "param", "kind": 32768, @@ -12248,7 +12399,7 @@ } }, { - "id": 42319, + "id": 1250, "name": "headers", "variant": "param", "kind": 32768, @@ -12265,7 +12416,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -12295,21 +12446,21 @@ ] }, { - "id": 42320, + "id": 1251, "name": "cancelEdit", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/draft-order.ts", - "line": 592, + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/draft-order.ts", + "line": 622, "character": 8 } ], "signatures": [ { - "id": 42321, + "id": 1252, "name": "cancelEdit", "variant": "signature", "kind": 4096, @@ -12318,10 +12469,19 @@ "summary": [ { "kind": "text", - "text": "This method cancels an edit to a draft order. It sends a request to the\n[Cancel Draft Order Edit](https://docs.medusajs.com/api/admin#draft-orders_deleteordereditsid) API route." + "text": "This method cancels an edit to a draft order. It sends a request to the\n[Cancel Draft Order Edit](https://docs.medusajs.com/api/admin#draft-orders_deletedraftordersidedit) API route." } ], "blockTags": [ + { + "tag": "@returns", + "content": [ + { + "kind": "text", + "text": "The cancelation's details." + } + ] + }, { "tag": "@example", "content": [ @@ -12335,14 +12495,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/draft-order.ts", - "line": 592, + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/draft-order.ts", + "line": 622, "character": 8 } ], "parameters": [ { - "id": 42322, + "id": 1253, "name": "id", "variant": "param", "kind": 32768, @@ -12361,7 +12521,7 @@ } }, { - "id": 42323, + "id": 1254, "name": "headers", "variant": "param", "kind": 32768, @@ -12378,7 +12538,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -12414,21 +12574,21 @@ ] }, { - "id": 42324, + "id": 1255, "name": "requestEdit", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/draft-order.ts", - "line": 614, + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/draft-order.ts", + "line": 645, "character": 8 } ], "signatures": [ { - "id": 42325, + "id": 1256, "name": "requestEdit", "variant": "signature", "kind": 4096, @@ -12437,10 +12597,19 @@ "summary": [ { "kind": "text", - "text": "This method requests an edit to a draft order. It sends a request to the\n[Request Draft Order Edit](https://docs.medusajs.com/api/admin#draft-orders_postordereditsidrequest) API route." + "text": "This method requests an edit to a draft order. It sends a request to the\n[Request Draft Order Edit](https://docs.medusajs.com/api/admin#draft-orders_postdraftordersideditrequest) API route." } ], "blockTags": [ + { + "tag": "@returns", + "content": [ + { + "kind": "text", + "text": "The draft order preview's details." + } + ] + }, { "tag": "@example", "content": [ @@ -12454,14 +12623,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/draft-order.ts", - "line": 614, + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/draft-order.ts", + "line": 645, "character": 8 } ], "parameters": [ { - "id": 42326, + "id": 1257, "name": "id", "variant": "param", "kind": 32768, @@ -12480,7 +12649,7 @@ } }, { - "id": 42327, + "id": 1258, "name": "headers", "variant": "param", "kind": 32768, @@ -12497,7 +12666,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -12527,21 +12696,21 @@ ] }, { - "id": 42328, + "id": 1259, "name": "confirmEdit", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/draft-order.ts", - "line": 637, + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/draft-order.ts", + "line": 669, "character": 8 } ], "signatures": [ { - "id": 42329, + "id": 1260, "name": "confirmEdit", "variant": "signature", "kind": 4096, @@ -12550,10 +12719,19 @@ "summary": [ { "kind": "text", - "text": "This method confirms an edit to a draft order. It sends a request to the\n[Confirm Draft Order Edit](https://docs.medusajs.com/api/admin#draft-orders_postordereditsidconfirm) API route." + "text": "This method confirms an edit to a draft order. It sends a request to the\n[Confirm Draft Order Edit](https://docs.medusajs.com/api/admin#draft-orders_postdraftordersideditconfirm) API route." } ], "blockTags": [ + { + "tag": "@returns", + "content": [ + { + "kind": "text", + "text": "The draft order preview's details." + } + ] + }, { "tag": "@example", "content": [ @@ -12567,14 +12745,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/draft-order.ts", - "line": 637, + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/draft-order.ts", + "line": 669, "character": 8 } ], "parameters": [ { - "id": 42330, + "id": 1261, "name": "id", "variant": "param", "kind": 32768, @@ -12593,7 +12771,7 @@ } }, { - "id": 42331, + "id": 1262, "name": "headers", "variant": "param", "kind": 32768, @@ -12610,7 +12788,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -12644,58 +12822,58 @@ { "title": "Constructors", "children": [ - 42228 + 1159 ] }, { "title": "Properties", "children": [ - 42231 + 1162 ] }, { "title": "Methods", "children": [ - 42232, - 42237, - 42241, - 42246, - 42252, - 42257, - 42262, - 42268, - 42273, - 42279, - 42284, - 42289, - 42294, - 42300, - 42305, - 42310, - 42316, - 42320, - 42324, - 42328 + 1163, + 1168, + 1172, + 1177, + 1183, + 1188, + 1193, + 1199, + 1204, + 1210, + 1215, + 1220, + 1225, + 1231, + 1236, + 1241, + 1247, + 1251, + 1255, + 1259 ] } ], "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/draft-order.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/draft-order.ts", "line": 6, "character": 13 } ] }, { - "id": 42647, + "id": 1578, "name": "Exchange", "variant": "declaration", "kind": 128, "flags": {}, "children": [ { - "id": 42651, + "id": 1582, "name": "client", "variant": "declaration", "kind": 1024, @@ -12710,34 +12888,34 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/exchange.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/exchange.ts", "line": 10, "character": 10 } ], "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } }, { - "id": 42648, + "id": 1579, "name": "constructor", "variant": "declaration", "kind": 512, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/exchange.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/exchange.ts", "line": 14, "character": 2 } ], "signatures": [ { - "id": 42649, + "id": 1580, "name": "Exchange", "variant": "signature", "kind": 16384, @@ -12750,21 +12928,21 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/exchange.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/exchange.ts", "line": 14, "character": 2 } ], "parameters": [ { - "id": 42650, + "id": 1581, "name": "client", "variant": "param", "kind": 32768, "flags": {}, "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } @@ -12772,7 +12950,7 @@ ], "type": { "type": "reference", - "target": 42647, + "target": 1578, "name": "Exchange", "package": "@medusajs/js-sdk" } @@ -12780,21 +12958,21 @@ ] }, { - "id": 42652, + "id": 1583, "name": "list", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/exchange.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/exchange.ts", "line": 65, "character": 8 } ], "signatures": [ { - "id": 42653, + "id": 1584, "name": "list", "variant": "signature", "kind": 4096, @@ -12885,14 +13063,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/exchange.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/exchange.ts", "line": 65, "character": 8 } ], "parameters": [ { - "id": 42654, + "id": 1585, "name": "query", "variant": "param", "kind": 32768, @@ -12918,7 +13096,7 @@ } }, { - "id": 42655, + "id": 1586, "name": "headers", "variant": "param", "kind": 32768, @@ -12935,7 +13113,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -12965,21 +13143,21 @@ ] }, { - "id": 42656, + "id": 1587, "name": "retrieve", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/exchange.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/exchange.ts", "line": 111, "character": 8 } ], "signatures": [ { - "id": 42657, + "id": 1588, "name": "retrieve", "variant": "signature", "kind": 4096, @@ -13038,14 +13216,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/exchange.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/exchange.ts", "line": 111, "character": 8 } ], "parameters": [ { - "id": 42658, + "id": 1589, "name": "id", "variant": "param", "kind": 32768, @@ -13064,7 +13242,7 @@ } }, { - "id": 42659, + "id": 1590, "name": "query", "variant": "param", "kind": 32768, @@ -13090,7 +13268,7 @@ } }, { - "id": 42660, + "id": 1591, "name": "headers", "variant": "param", "kind": 32768, @@ -13107,7 +13285,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -13137,21 +13315,21 @@ ] }, { - "id": 42661, + "id": 1592, "name": "create", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/exchange.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/exchange.ts", "line": 142, "character": 8 } ], "signatures": [ { - "id": 42662, + "id": 1593, "name": "create", "variant": "signature", "kind": 4096, @@ -13186,14 +13364,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/exchange.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/exchange.ts", "line": 142, "character": 8 } ], "parameters": [ { - "id": 42663, + "id": 1594, "name": "body", "variant": "param", "kind": 32768, @@ -13217,7 +13395,7 @@ } }, { - "id": 42664, + "id": 1595, "name": "query", "variant": "param", "kind": 32768, @@ -13243,7 +13421,7 @@ } }, { - "id": 42665, + "id": 1596, "name": "headers", "variant": "param", "kind": 32768, @@ -13260,7 +13438,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -13290,21 +13468,21 @@ ] }, { - "id": 42666, + "id": 1597, "name": "cancel", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/exchange.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/exchange.ts", "line": 173, "character": 8 } ], "signatures": [ { - "id": 42667, + "id": 1598, "name": "cancel", "variant": "signature", "kind": 4096, @@ -13339,14 +13517,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/exchange.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/exchange.ts", "line": 173, "character": 8 } ], "parameters": [ { - "id": 42668, + "id": 1599, "name": "id", "variant": "param", "kind": 32768, @@ -13365,7 +13543,7 @@ } }, { - "id": 42669, + "id": 1600, "name": "query", "variant": "param", "kind": 32768, @@ -13391,7 +13569,7 @@ } }, { - "id": 42670, + "id": 1601, "name": "headers", "variant": "param", "kind": 32768, @@ -13408,7 +13586,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -13438,21 +13616,21 @@ ] }, { - "id": 42671, + "id": 1602, "name": "addInboundItems", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/exchange.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/exchange.ts", "line": 212, "character": 8 } ], "signatures": [ { - "id": 42672, + "id": 1603, "name": "addInboundItems", "variant": "signature", "kind": 4096, @@ -13495,14 +13673,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/exchange.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/exchange.ts", "line": 212, "character": 8 } ], "parameters": [ { - "id": 42673, + "id": 1604, "name": "id", "variant": "param", "kind": 32768, @@ -13521,7 +13699,7 @@ } }, { - "id": 42674, + "id": 1605, "name": "body", "variant": "param", "kind": 32768, @@ -13545,7 +13723,7 @@ } }, { - "id": 42675, + "id": 1606, "name": "query", "variant": "param", "kind": 32768, @@ -13571,7 +13749,7 @@ } }, { - "id": 42676, + "id": 1607, "name": "headers", "variant": "param", "kind": 32768, @@ -13588,7 +13766,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -13618,21 +13796,21 @@ ] }, { - "id": 42677, + "id": 1608, "name": "updateInboundItem", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/exchange.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/exchange.ts", "line": 258, "character": 8 } ], "signatures": [ { - "id": 42678, + "id": 1609, "name": "updateInboundItem", "variant": "signature", "kind": 4096, @@ -13699,14 +13877,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/exchange.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/exchange.ts", "line": 258, "character": 8 } ], "parameters": [ { - "id": 42679, + "id": 1610, "name": "id", "variant": "param", "kind": 32768, @@ -13725,7 +13903,7 @@ } }, { - "id": 42680, + "id": 1611, "name": "actionId", "variant": "param", "kind": 32768, @@ -13752,7 +13930,7 @@ } }, { - "id": 42681, + "id": 1612, "name": "body", "variant": "param", "kind": 32768, @@ -13776,7 +13954,7 @@ } }, { - "id": 42682, + "id": 1613, "name": "query", "variant": "param", "kind": 32768, @@ -13802,7 +13980,7 @@ } }, { - "id": 42683, + "id": 1614, "name": "headers", "variant": "param", "kind": 32768, @@ -13819,7 +13997,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -13849,21 +14027,21 @@ ] }, { - "id": 42684, + "id": 1615, "name": "removeInboundItem", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/exchange.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/exchange.ts", "line": 301, "character": 8 } ], "signatures": [ { - "id": 42685, + "id": 1616, "name": "removeInboundItem", "variant": "signature", "kind": 4096, @@ -13930,14 +14108,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/exchange.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/exchange.ts", "line": 301, "character": 8 } ], "parameters": [ { - "id": 42686, + "id": 1617, "name": "id", "variant": "param", "kind": 32768, @@ -13956,7 +14134,7 @@ } }, { - "id": 42687, + "id": 1618, "name": "actionId", "variant": "param", "kind": 32768, @@ -13983,7 +14161,7 @@ } }, { - "id": 42688, + "id": 1619, "name": "query", "variant": "param", "kind": 32768, @@ -14009,7 +14187,7 @@ } }, { - "id": 42689, + "id": 1620, "name": "headers", "variant": "param", "kind": 32768, @@ -14026,7 +14204,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -14056,21 +14234,21 @@ ] }, { - "id": 42690, + "id": 1621, "name": "addInboundShipping", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/exchange.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/exchange.ts", "line": 341, "character": 8 } ], "signatures": [ { - "id": 42691, + "id": 1622, "name": "addInboundShipping", "variant": "signature", "kind": 4096, @@ -14113,14 +14291,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/exchange.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/exchange.ts", "line": 341, "character": 8 } ], "parameters": [ { - "id": 42692, + "id": 1623, "name": "id", "variant": "param", "kind": 32768, @@ -14139,7 +14317,7 @@ } }, { - "id": 42693, + "id": 1624, "name": "body", "variant": "param", "kind": 32768, @@ -14163,7 +14341,7 @@ } }, { - "id": 42694, + "id": 1625, "name": "query", "variant": "param", "kind": 32768, @@ -14189,7 +14367,7 @@ } }, { - "id": 42695, + "id": 1626, "name": "headers", "variant": "param", "kind": 32768, @@ -14206,7 +14384,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -14236,21 +14414,21 @@ ] }, { - "id": 42696, + "id": 1627, "name": "updateInboundShipping", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/exchange.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/exchange.ts", "line": 387, "character": 8 } ], "signatures": [ { - "id": 42697, + "id": 1628, "name": "updateInboundShipping", "variant": "signature", "kind": 4096, @@ -14317,14 +14495,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/exchange.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/exchange.ts", "line": 387, "character": 8 } ], "parameters": [ { - "id": 42698, + "id": 1629, "name": "id", "variant": "param", "kind": 32768, @@ -14343,7 +14521,7 @@ } }, { - "id": 42699, + "id": 1630, "name": "actionId", "variant": "param", "kind": 32768, @@ -14370,7 +14548,7 @@ } }, { - "id": 42700, + "id": 1631, "name": "body", "variant": "param", "kind": 32768, @@ -14394,7 +14572,7 @@ } }, { - "id": 42701, + "id": 1632, "name": "query", "variant": "param", "kind": 32768, @@ -14420,7 +14598,7 @@ } }, { - "id": 42702, + "id": 1633, "name": "headers", "variant": "param", "kind": 32768, @@ -14437,7 +14615,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -14467,21 +14645,21 @@ ] }, { - "id": 42703, + "id": 1634, "name": "deleteInboundShipping", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/exchange.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/exchange.ts", "line": 430, "character": 8 } ], "signatures": [ { - "id": 42704, + "id": 1635, "name": "deleteInboundShipping", "variant": "signature", "kind": 4096, @@ -14548,14 +14726,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/exchange.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/exchange.ts", "line": 430, "character": 8 } ], "parameters": [ { - "id": 42705, + "id": 1636, "name": "id", "variant": "param", "kind": 32768, @@ -14574,7 +14752,7 @@ } }, { - "id": 42706, + "id": 1637, "name": "actionId", "variant": "param", "kind": 32768, @@ -14601,7 +14779,7 @@ } }, { - "id": 42707, + "id": 1638, "name": "query", "variant": "param", "kind": 32768, @@ -14627,7 +14805,7 @@ } }, { - "id": 42708, + "id": 1639, "name": "headers", "variant": "param", "kind": 32768, @@ -14644,7 +14822,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -14674,21 +14852,21 @@ ] }, { - "id": 42709, + "id": 1640, "name": "addOutboundItems", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/exchange.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/exchange.ts", "line": 470, "character": 8 } ], "signatures": [ { - "id": 42710, + "id": 1641, "name": "addOutboundItems", "variant": "signature", "kind": 4096, @@ -14731,14 +14909,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/exchange.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/exchange.ts", "line": 470, "character": 8 } ], "parameters": [ { - "id": 42711, + "id": 1642, "name": "id", "variant": "param", "kind": 32768, @@ -14757,7 +14935,7 @@ } }, { - "id": 42712, + "id": 1643, "name": "body", "variant": "param", "kind": 32768, @@ -14781,7 +14959,7 @@ } }, { - "id": 42713, + "id": 1644, "name": "query", "variant": "param", "kind": 32768, @@ -14807,7 +14985,7 @@ } }, { - "id": 42714, + "id": 1645, "name": "headers", "variant": "param", "kind": 32768, @@ -14824,7 +15002,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -14854,21 +15032,21 @@ ] }, { - "id": 42715, + "id": 1646, "name": "updateOutboundItem", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/exchange.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/exchange.ts", "line": 516, "character": 8 } ], "signatures": [ { - "id": 42716, + "id": 1647, "name": "updateOutboundItem", "variant": "signature", "kind": 4096, @@ -14935,14 +15113,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/exchange.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/exchange.ts", "line": 516, "character": 8 } ], "parameters": [ { - "id": 42717, + "id": 1648, "name": "id", "variant": "param", "kind": 32768, @@ -14961,7 +15139,7 @@ } }, { - "id": 42718, + "id": 1649, "name": "actionId", "variant": "param", "kind": 32768, @@ -14988,7 +15166,7 @@ } }, { - "id": 42719, + "id": 1650, "name": "body", "variant": "param", "kind": 32768, @@ -15012,7 +15190,7 @@ } }, { - "id": 42720, + "id": 1651, "name": "query", "variant": "param", "kind": 32768, @@ -15038,7 +15216,7 @@ } }, { - "id": 42721, + "id": 1652, "name": "headers", "variant": "param", "kind": 32768, @@ -15055,7 +15233,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -15085,21 +15263,21 @@ ] }, { - "id": 42722, + "id": 1653, "name": "removeOutboundItem", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/exchange.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/exchange.ts", "line": 559, "character": 8 } ], "signatures": [ { - "id": 42723, + "id": 1654, "name": "removeOutboundItem", "variant": "signature", "kind": 4096, @@ -15166,14 +15344,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/exchange.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/exchange.ts", "line": 559, "character": 8 } ], "parameters": [ { - "id": 42724, + "id": 1655, "name": "id", "variant": "param", "kind": 32768, @@ -15192,7 +15370,7 @@ } }, { - "id": 42725, + "id": 1656, "name": "actionId", "variant": "param", "kind": 32768, @@ -15219,7 +15397,7 @@ } }, { - "id": 42726, + "id": 1657, "name": "query", "variant": "param", "kind": 32768, @@ -15245,7 +15423,7 @@ } }, { - "id": 42727, + "id": 1658, "name": "headers", "variant": "param", "kind": 32768, @@ -15262,7 +15440,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -15292,21 +15470,21 @@ ] }, { - "id": 42728, + "id": 1659, "name": "addOutboundShipping", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/exchange.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/exchange.ts", "line": 596, "character": 8 } ], "signatures": [ { - "id": 42729, + "id": 1660, "name": "addOutboundShipping", "variant": "signature", "kind": 4096, @@ -15349,14 +15527,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/exchange.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/exchange.ts", "line": 596, "character": 8 } ], "parameters": [ { - "id": 42730, + "id": 1661, "name": "id", "variant": "param", "kind": 32768, @@ -15375,7 +15553,7 @@ } }, { - "id": 42731, + "id": 1662, "name": "body", "variant": "param", "kind": 32768, @@ -15399,7 +15577,7 @@ } }, { - "id": 42732, + "id": 1663, "name": "query", "variant": "param", "kind": 32768, @@ -15425,7 +15603,7 @@ } }, { - "id": 42733, + "id": 1664, "name": "headers", "variant": "param", "kind": 32768, @@ -15442,7 +15620,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -15472,21 +15650,21 @@ ] }, { - "id": 42734, + "id": 1665, "name": "updateOutboundShipping", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/exchange.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/exchange.ts", "line": 642, "character": 8 } ], "signatures": [ { - "id": 42735, + "id": 1666, "name": "updateOutboundShipping", "variant": "signature", "kind": 4096, @@ -15553,14 +15731,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/exchange.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/exchange.ts", "line": 642, "character": 8 } ], "parameters": [ { - "id": 42736, + "id": 1667, "name": "id", "variant": "param", "kind": 32768, @@ -15579,7 +15757,7 @@ } }, { - "id": 42737, + "id": 1668, "name": "actionId", "variant": "param", "kind": 32768, @@ -15606,7 +15784,7 @@ } }, { - "id": 42738, + "id": 1669, "name": "body", "variant": "param", "kind": 32768, @@ -15630,7 +15808,7 @@ } }, { - "id": 42739, + "id": 1670, "name": "query", "variant": "param", "kind": 32768, @@ -15656,7 +15834,7 @@ } }, { - "id": 42740, + "id": 1671, "name": "headers", "variant": "param", "kind": 32768, @@ -15673,7 +15851,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -15703,21 +15881,21 @@ ] }, { - "id": 42741, + "id": 1672, "name": "deleteOutboundShipping", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/exchange.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/exchange.ts", "line": 685, "character": 8 } ], "signatures": [ { - "id": 42742, + "id": 1673, "name": "deleteOutboundShipping", "variant": "signature", "kind": 4096, @@ -15784,14 +15962,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/exchange.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/exchange.ts", "line": 685, "character": 8 } ], "parameters": [ { - "id": 42743, + "id": 1674, "name": "id", "variant": "param", "kind": 32768, @@ -15810,7 +15988,7 @@ } }, { - "id": 42744, + "id": 1675, "name": "actionId", "variant": "param", "kind": 32768, @@ -15837,7 +16015,7 @@ } }, { - "id": 42745, + "id": 1676, "name": "query", "variant": "param", "kind": 32768, @@ -15863,7 +16041,7 @@ } }, { - "id": 42746, + "id": 1677, "name": "headers", "variant": "param", "kind": 32768, @@ -15880,7 +16058,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -15910,21 +16088,21 @@ ] }, { - "id": 42747, + "id": 1678, "name": "request", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/exchange.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/exchange.ts", "line": 719, "character": 8 } ], "signatures": [ { - "id": 42748, + "id": 1679, "name": "request", "variant": "signature", "kind": 4096, @@ -15959,14 +16137,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/exchange.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/exchange.ts", "line": 719, "character": 8 } ], "parameters": [ { - "id": 42749, + "id": 1680, "name": "id", "variant": "param", "kind": 32768, @@ -15985,7 +16163,7 @@ } }, { - "id": 42750, + "id": 1681, "name": "body", "variant": "param", "kind": 32768, @@ -16009,7 +16187,7 @@ } }, { - "id": 42751, + "id": 1682, "name": "query", "variant": "param", "kind": 32768, @@ -16035,7 +16213,7 @@ } }, { - "id": 42752, + "id": 1683, "name": "headers", "variant": "param", "kind": 32768, @@ -16052,7 +16230,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -16082,21 +16260,21 @@ ] }, { - "id": 42753, + "id": 1684, "name": "cancelRequest", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/exchange.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/exchange.ts", "line": 752, "character": 8 } ], "signatures": [ { - "id": 42754, + "id": 1685, "name": "cancelRequest", "variant": "signature", "kind": 4096, @@ -16131,14 +16309,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/exchange.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/exchange.ts", "line": 752, "character": 8 } ], "parameters": [ { - "id": 42755, + "id": 1686, "name": "id", "variant": "param", "kind": 32768, @@ -16157,7 +16335,7 @@ } }, { - "id": 42756, + "id": 1687, "name": "query", "variant": "param", "kind": 32768, @@ -16183,7 +16361,7 @@ } }, { - "id": 42757, + "id": 1688, "name": "headers", "variant": "param", "kind": 32768, @@ -16200,7 +16378,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -16234,56 +16412,56 @@ { "title": "Constructors", "children": [ - 42648 + 1579 ] }, { "title": "Properties", "children": [ - 42651 + 1582 ] }, { "title": "Methods", "children": [ - 42652, - 42656, - 42661, - 42666, - 42671, - 42677, - 42684, - 42690, - 42696, - 42703, - 42709, - 42715, - 42722, - 42728, - 42734, - 42741, - 42747, - 42753 + 1583, + 1587, + 1592, + 1597, + 1602, + 1608, + 1615, + 1621, + 1627, + 1634, + 1640, + 1646, + 1653, + 1659, + 1665, + 1672, + 1678, + 1684 ] } ], "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/exchange.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/exchange.ts", "line": 6, "character": 13 } ] }, { - "id": 41998, + "id": 929, "name": "FulfillmentProvider", "variant": "declaration", "kind": 128, "flags": {}, "children": [ { - "id": 42002, + "id": 933, "name": "client", "variant": "declaration", "kind": 1024, @@ -16298,34 +16476,34 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/fulfillment-provider.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/fulfillment-provider.ts", "line": 9, "character": 10 } ], "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } }, { - "id": 41999, + "id": 930, "name": "constructor", "variant": "declaration", "kind": 512, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/fulfillment-provider.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/fulfillment-provider.ts", "line": 13, "character": 2 } ], "signatures": [ { - "id": 42000, + "id": 931, "name": "FulfillmentProvider", "variant": "signature", "kind": 16384, @@ -16338,21 +16516,21 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/fulfillment-provider.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/fulfillment-provider.ts", "line": 13, "character": 2 } ], "parameters": [ { - "id": 42001, + "id": 932, "name": "client", "variant": "param", "kind": 32768, "flags": {}, "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } @@ -16360,7 +16538,7 @@ ], "type": { "type": "reference", - "target": 41998, + "target": 929, "name": "FulfillmentProvider", "package": "@medusajs/js-sdk" } @@ -16368,21 +16546,21 @@ ] }, { - "id": 42003, + "id": 934, "name": "list", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/fulfillment-provider.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/fulfillment-provider.ts", "line": 64, "character": 8 } ], "signatures": [ { - "id": 42004, + "id": 935, "name": "list", "variant": "signature", "kind": 4096, @@ -16473,14 +16651,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/fulfillment-provider.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/fulfillment-provider.ts", "line": 64, "character": 8 } ], "parameters": [ { - "id": 42005, + "id": 936, "name": "query", "variant": "param", "kind": 32768, @@ -16506,7 +16684,7 @@ } }, { - "id": 42006, + "id": 937, "name": "headers", "variant": "param", "kind": 32768, @@ -16523,7 +16701,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -16553,21 +16731,21 @@ ] }, { - "id": 42007, + "id": 938, "name": "listFulfillmentOptions", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/fulfillment-provider.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/fulfillment-provider.ts", "line": 93, "character": 8 } ], "signatures": [ { - "id": 42008, + "id": 939, "name": "listFulfillmentOptions", "variant": "signature", "kind": 4096, @@ -16602,14 +16780,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/fulfillment-provider.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/fulfillment-provider.ts", "line": 93, "character": 8 } ], "parameters": [ { - "id": 42009, + "id": 940, "name": "id", "variant": "param", "kind": 32768, @@ -16628,7 +16806,7 @@ } }, { - "id": 42010, + "id": 941, "name": "headers", "variant": "param", "kind": 32768, @@ -16645,7 +16823,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -16679,40 +16857,40 @@ { "title": "Constructors", "children": [ - 41999 + 930 ] }, { "title": "Properties", "children": [ - 42002 + 933 ] }, { "title": "Methods", "children": [ - 42003, - 42007 + 934, + 938 ] } ], "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/fulfillment-provider.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/fulfillment-provider.ts", "line": 5, "character": 13 } ] }, { - "id": 41944, + "id": 875, "name": "FulfillmentSet", "variant": "declaration", "kind": 128, "flags": {}, "children": [ { - "id": 41948, + "id": 879, "name": "client", "variant": "declaration", "kind": 1024, @@ -16727,34 +16905,34 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/fulfillment-set.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/fulfillment-set.ts", "line": 9, "character": 10 } ], "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } }, { - "id": 41945, + "id": 876, "name": "constructor", "variant": "declaration", "kind": 512, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/fulfillment-set.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/fulfillment-set.ts", "line": 13, "character": 2 } ], "signatures": [ { - "id": 41946, + "id": 877, "name": "FulfillmentSet", "variant": "signature", "kind": 16384, @@ -16767,21 +16945,21 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/fulfillment-set.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/fulfillment-set.ts", "line": 13, "character": 2 } ], "parameters": [ { - "id": 41947, + "id": 878, "name": "client", "variant": "param", "kind": 32768, "flags": {}, "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } @@ -16789,7 +16967,7 @@ ], "type": { "type": "reference", - "target": 41944, + "target": 875, "name": "FulfillmentSet", "package": "@medusajs/js-sdk" } @@ -16797,21 +16975,21 @@ ] }, { - "id": 41949, + "id": 880, "name": "delete", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/fulfillment-set.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/fulfillment-set.ts", "line": 32, "character": 8 } ], "signatures": [ { - "id": 41950, + "id": 881, "name": "delete", "variant": "signature", "kind": 4096, @@ -16846,14 +17024,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/fulfillment-set.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/fulfillment-set.ts", "line": 32, "character": 8 } ], "parameters": [ { - "id": 41951, + "id": 882, "name": "id", "variant": "param", "kind": 32768, @@ -16872,7 +17050,7 @@ } }, { - "id": 41952, + "id": 883, "name": "headers", "variant": "param", "kind": 32768, @@ -16889,7 +17067,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -16919,21 +17097,21 @@ ] }, { - "id": 41953, + "id": 884, "name": "createServiceZone", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/fulfillment-set.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/fulfillment-set.ts", "line": 65, "character": 8 } ], "signatures": [ { - "id": 41954, + "id": 885, "name": "createServiceZone", "variant": "signature", "kind": 4096, @@ -16968,14 +17146,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/fulfillment-set.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/fulfillment-set.ts", "line": 65, "character": 8 } ], "parameters": [ { - "id": 41955, + "id": 886, "name": "id", "variant": "param", "kind": 32768, @@ -16994,7 +17172,7 @@ } }, { - "id": 41956, + "id": 887, "name": "body", "variant": "param", "kind": 32768, @@ -17018,7 +17196,7 @@ } }, { - "id": 41957, + "id": 888, "name": "query", "variant": "param", "kind": 32768, @@ -17044,7 +17222,7 @@ } }, { - "id": 41958, + "id": 889, "name": "headers", "variant": "param", "kind": 32768, @@ -17061,7 +17239,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -17091,21 +17269,21 @@ ] }, { - "id": 41959, + "id": 890, "name": "retrieveServiceZone", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/fulfillment-set.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/fulfillment-set.ts", "line": 123, "character": 8 } ], "signatures": [ { - "id": 41960, + "id": 891, "name": "retrieveServiceZone", "variant": "signature", "kind": 4096, @@ -17164,14 +17342,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/fulfillment-set.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/fulfillment-set.ts", "line": 123, "character": 8 } ], "parameters": [ { - "id": 41961, + "id": 892, "name": "fulfillmentSetId", "variant": "param", "kind": 32768, @@ -17190,7 +17368,7 @@ } }, { - "id": 41962, + "id": 893, "name": "serviceZoneId", "variant": "param", "kind": 32768, @@ -17209,7 +17387,7 @@ } }, { - "id": 41963, + "id": 894, "name": "query", "variant": "param", "kind": 32768, @@ -17235,7 +17413,7 @@ } }, { - "id": 41964, + "id": 895, "name": "headers", "variant": "param", "kind": 32768, @@ -17252,7 +17430,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -17282,21 +17460,21 @@ ] }, { - "id": 41965, + "id": 896, "name": "updateServiceZone", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/fulfillment-set.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/fulfillment-set.ts", "line": 163, "character": 8 } ], "signatures": [ { - "id": 41966, + "id": 897, "name": "updateServiceZone", "variant": "signature", "kind": 4096, @@ -17331,14 +17509,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/fulfillment-set.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/fulfillment-set.ts", "line": 163, "character": 8 } ], "parameters": [ { - "id": 41967, + "id": 898, "name": "fulfillmentSetId", "variant": "param", "kind": 32768, @@ -17357,7 +17535,7 @@ } }, { - "id": 41968, + "id": 899, "name": "serviceZoneId", "variant": "param", "kind": 32768, @@ -17376,7 +17554,7 @@ } }, { - "id": 41969, + "id": 900, "name": "body", "variant": "param", "kind": 32768, @@ -17400,7 +17578,7 @@ } }, { - "id": 41970, + "id": 901, "name": "query", "variant": "param", "kind": 32768, @@ -17426,7 +17604,7 @@ } }, { - "id": 41971, + "id": 902, "name": "headers", "variant": "param", "kind": 32768, @@ -17443,7 +17621,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -17473,21 +17651,21 @@ ] }, { - "id": 41972, + "id": 903, "name": "deleteServiceZone", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/fulfillment-set.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/fulfillment-set.ts", "line": 200, "character": 8 } ], "signatures": [ { - "id": 41973, + "id": 904, "name": "deleteServiceZone", "variant": "signature", "kind": 4096, @@ -17522,14 +17700,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/fulfillment-set.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/fulfillment-set.ts", "line": 200, "character": 8 } ], "parameters": [ { - "id": 41974, + "id": 905, "name": "fulfillmentSetId", "variant": "param", "kind": 32768, @@ -17548,7 +17726,7 @@ } }, { - "id": 41975, + "id": 906, "name": "serviceZoneId", "variant": "param", "kind": 32768, @@ -17567,7 +17745,7 @@ } }, { - "id": 41976, + "id": 907, "name": "headers", "variant": "param", "kind": 32768, @@ -17584,7 +17762,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -17618,43 +17796,43 @@ { "title": "Constructors", "children": [ - 41945 + 876 ] }, { "title": "Properties", "children": [ - 41948 + 879 ] }, { "title": "Methods", "children": [ - 41949, - 41953, - 41959, - 41965, - 41972 + 880, + 884, + 890, + 896, + 903 ] } ], "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/fulfillment-set.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/fulfillment-set.ts", "line": 5, "character": 13 } ] }, { - "id": 41977, + "id": 908, "name": "Fulfillment", "variant": "declaration", "kind": 128, "flags": {}, "children": [ { - "id": 41981, + "id": 912, "name": "client", "variant": "declaration", "kind": 1024, @@ -17669,34 +17847,34 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/fulfillment.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/fulfillment.ts", "line": 9, "character": 10 } ], "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } }, { - "id": 41978, + "id": 909, "name": "constructor", "variant": "declaration", "kind": 512, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/fulfillment.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/fulfillment.ts", "line": 13, "character": 2 } ], "signatures": [ { - "id": 41979, + "id": 910, "name": "Fulfillment", "variant": "signature", "kind": 16384, @@ -17709,21 +17887,21 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/fulfillment.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/fulfillment.ts", "line": 13, "character": 2 } ], "parameters": [ { - "id": 41980, + "id": 911, "name": "client", "variant": "param", "kind": 32768, "flags": {}, "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } @@ -17731,7 +17909,7 @@ ], "type": { "type": "reference", - "target": 41977, + "target": 908, "name": "Fulfillment", "package": "@medusajs/js-sdk" } @@ -17739,21 +17917,21 @@ ] }, { - "id": 41982, + "id": 913, "name": "create", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/fulfillment.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/fulfillment.ts", "line": 50, "character": 8 } ], "signatures": [ { - "id": 41983, + "id": 914, "name": "create", "variant": "signature", "kind": 4096, @@ -17788,14 +17966,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/fulfillment.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/fulfillment.ts", "line": 50, "character": 8 } ], "parameters": [ { - "id": 41984, + "id": 915, "name": "body", "variant": "param", "kind": 32768, @@ -17819,7 +17997,7 @@ } }, { - "id": 41985, + "id": 916, "name": "query", "variant": "param", "kind": 32768, @@ -17845,7 +18023,7 @@ } }, { - "id": 41986, + "id": 917, "name": "headers", "variant": "param", "kind": 32768, @@ -17862,7 +18040,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -17892,21 +18070,21 @@ ] }, { - "id": 41987, + "id": 918, "name": "cancel", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/fulfillment.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/fulfillment.ts", "line": 82, "character": 8 } ], "signatures": [ { - "id": 41988, + "id": 919, "name": "cancel", "variant": "signature", "kind": 4096, @@ -17941,14 +18119,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/fulfillment.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/fulfillment.ts", "line": 82, "character": 8 } ], "parameters": [ { - "id": 41989, + "id": 920, "name": "id", "variant": "param", "kind": 32768, @@ -17967,7 +18145,7 @@ } }, { - "id": 41990, + "id": 921, "name": "query", "variant": "param", "kind": 32768, @@ -17993,7 +18171,7 @@ } }, { - "id": 41991, + "id": 922, "name": "headers", "variant": "param", "kind": 32768, @@ -18010,7 +18188,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -18040,21 +18218,21 @@ ] }, { - "id": 41992, + "id": 923, "name": "createShipment", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/fulfillment.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/fulfillment.ts", "line": 123, "character": 8 } ], "signatures": [ { - "id": 41993, + "id": 924, "name": "createShipment", "variant": "signature", "kind": 4096, @@ -18089,14 +18267,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/fulfillment.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/fulfillment.ts", "line": 123, "character": 8 } ], "parameters": [ { - "id": 41994, + "id": 925, "name": "id", "variant": "param", "kind": 32768, @@ -18115,7 +18293,7 @@ } }, { - "id": 41995, + "id": 926, "name": "body", "variant": "param", "kind": 32768, @@ -18139,7 +18317,7 @@ } }, { - "id": 41996, + "id": 927, "name": "query", "variant": "param", "kind": 32768, @@ -18165,7 +18343,7 @@ } }, { - "id": 41997, + "id": 928, "name": "headers", "variant": "param", "kind": 32768, @@ -18182,7 +18360,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -18216,41 +18394,41 @@ { "title": "Constructors", "children": [ - 41978 + 909 ] }, { "title": "Properties", "children": [ - 41981 + 912 ] }, { "title": "Methods", "children": [ - 41982, - 41987, - 41992 + 913, + 918, + 923 ] } ], "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/fulfillment.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/fulfillment.ts", "line": 5, "character": 13 } ] }, { - "id": 41071, + "id": 2, "name": "Admin", "variant": "declaration", "kind": 128, "flags": {}, "children": [ { - "id": 41075, + "id": 6, "name": "invite", "variant": "declaration", "kind": 1024, @@ -18276,18 +18454,18 @@ "fileName": "admin/index.ts", "line": 50, "character": 9, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/admin/index.ts#L50" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/admin/index.ts#L50" } ], "type": { "type": "reference", - "target": 41400, + "target": 331, "name": "Invite", "package": "@medusajs/js-sdk" } }, { - "id": 41076, + "id": 7, "name": "customer", "variant": "declaration", "kind": 1024, @@ -18313,18 +18491,18 @@ "fileName": "admin/index.ts", "line": 54, "character": 9, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/admin/index.ts#L54" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/admin/index.ts#L54" } ], "type": { "type": "reference", - "target": 41434, + "target": 365, "name": "Customer", "package": "@medusajs/js-sdk" } }, { - "id": 41077, + "id": 8, "name": "productCollection", "variant": "declaration", "kind": 1024, @@ -18350,18 +18528,18 @@ "fileName": "admin/index.ts", "line": 58, "character": 9, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/admin/index.ts#L58" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/admin/index.ts#L58" } ], "type": { "type": "reference", - "target": 41493, + "target": 424, "name": "ProductCollection", "package": "@medusajs/js-sdk" } }, { - "id": 41078, + "id": 9, "name": "productCategory", "variant": "declaration", "kind": 1024, @@ -18387,18 +18565,18 @@ "fileName": "admin/index.ts", "line": 62, "character": 9, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/admin/index.ts#L62" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/admin/index.ts#L62" } ], "type": { "type": "reference", - "target": 41527, + "target": 458, "name": "ProductCategory", "package": "@medusajs/js-sdk" } }, { - "id": 41079, + "id": 10, "name": "priceList", "variant": "declaration", "kind": 1024, @@ -18424,18 +18602,18 @@ "fileName": "admin/index.ts", "line": 66, "character": 9, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/admin/index.ts#L66" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/admin/index.ts#L66" } ], "type": { "type": "reference", - "target": 41562, + "target": 493, "name": "PriceList", "package": "@medusajs/js-sdk" } }, { - "id": 41080, + "id": 11, "name": "pricePreference", "variant": "declaration", "kind": 1024, @@ -18461,18 +18639,18 @@ "fileName": "admin/index.ts", "line": 70, "character": 9, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/admin/index.ts#L70" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/admin/index.ts#L70" } ], "type": { "type": "reference", - "target": 41603, + "target": 534, "name": "PricePreference", "package": "@medusajs/js-sdk" } }, { - "id": 41081, + "id": 12, "name": "product", "variant": "declaration", "kind": 1024, @@ -18498,18 +18676,18 @@ "fileName": "admin/index.ts", "line": 74, "character": 9, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/admin/index.ts#L74" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/admin/index.ts#L74" } ], "type": { "type": "reference", - "target": 41632, + "target": 563, "name": "Product", "package": "@medusajs/js-sdk" } }, { - "id": 41082, + "id": 13, "name": "productType", "variant": "declaration", "kind": 1024, @@ -18535,18 +18713,18 @@ "fileName": "admin/index.ts", "line": 78, "character": 9, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/admin/index.ts#L78" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/admin/index.ts#L78" } ], "type": { "type": "reference", - "target": 41754, + "target": 685, "name": "ProductType", "package": "@medusajs/js-sdk" } }, { - "id": 41083, + "id": 14, "name": "upload", "variant": "declaration", "kind": 1024, @@ -18572,18 +18750,18 @@ "fileName": "admin/index.ts", "line": 82, "character": 9, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/admin/index.ts#L82" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/admin/index.ts#L82" } ], "type": { "type": "reference", - "target": 41783, + "target": 714, "name": "Upload", "package": "@medusajs/js-sdk" } }, { - "id": 41084, + "id": 15, "name": "region", "variant": "declaration", "kind": 1024, @@ -18609,18 +18787,18 @@ "fileName": "admin/index.ts", "line": 86, "character": 9, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/admin/index.ts#L86" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/admin/index.ts#L86" } ], "type": { "type": "reference", - "target": 41802, + "target": 733, "name": "Region", "package": "@medusajs/js-sdk" } }, { - "id": 41085, + "id": 16, "name": "returnReason", "variant": "declaration", "kind": 1024, @@ -18646,18 +18824,18 @@ "fileName": "admin/index.ts", "line": 90, "character": 9, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/admin/index.ts#L90" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/admin/index.ts#L90" } ], "type": { "type": "reference", - "target": 41831, + "target": 762, "name": "ReturnReason", "package": "@medusajs/js-sdk" } }, { - "id": 41086, + "id": 17, "name": "stockLocation", "variant": "declaration", "kind": 1024, @@ -18683,18 +18861,18 @@ "fileName": "admin/index.ts", "line": 94, "character": 9, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/admin/index.ts#L94" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/admin/index.ts#L94" } ], "type": { "type": "reference", - "target": 41861, + "target": 792, "name": "StockLocation", "package": "@medusajs/js-sdk" } }, { - "id": 41087, + "id": 18, "name": "salesChannel", "variant": "declaration", "kind": 1024, @@ -18720,18 +18898,18 @@ "fileName": "admin/index.ts", "line": 98, "character": 9, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/admin/index.ts#L98" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/admin/index.ts#L98" } ], "type": { "type": "reference", - "target": 41905, + "target": 836, "name": "SalesChannel", "package": "@medusajs/js-sdk" } }, { - "id": 41088, + "id": 19, "name": "fulfillmentSet", "variant": "declaration", "kind": 1024, @@ -18757,18 +18935,18 @@ "fileName": "admin/index.ts", "line": 102, "character": 9, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/admin/index.ts#L102" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/admin/index.ts#L102" } ], "type": { "type": "reference", - "target": 41944, + "target": 875, "name": "FulfillmentSet", "package": "@medusajs/js-sdk" } }, { - "id": 41089, + "id": 20, "name": "fulfillment", "variant": "declaration", "kind": 1024, @@ -18794,18 +18972,18 @@ "fileName": "admin/index.ts", "line": 106, "character": 9, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/admin/index.ts#L106" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/admin/index.ts#L106" } ], "type": { "type": "reference", - "target": 41977, + "target": 908, "name": "Fulfillment", "package": "@medusajs/js-sdk" } }, { - "id": 41090, + "id": 21, "name": "fulfillmentProvider", "variant": "declaration", "kind": 1024, @@ -18831,18 +19009,18 @@ "fileName": "admin/index.ts", "line": 110, "character": 9, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/admin/index.ts#L110" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/admin/index.ts#L110" } ], "type": { "type": "reference", - "target": 41998, + "target": 929, "name": "FulfillmentProvider", "package": "@medusajs/js-sdk" } }, { - "id": 41091, + "id": 22, "name": "shippingOption", "variant": "declaration", "kind": 1024, @@ -18868,18 +19046,18 @@ "fileName": "admin/index.ts", "line": 114, "character": 9, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/admin/index.ts#L114" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/admin/index.ts#L114" } ], "type": { "type": "reference", - "target": 42011, + "target": 942, "name": "ShippingOption", "package": "@medusajs/js-sdk" } }, { - "id": 41092, + "id": 23, "name": "shippingProfile", "variant": "declaration", "kind": 1024, @@ -18905,18 +19083,18 @@ "fileName": "admin/index.ts", "line": 118, "character": 9, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/admin/index.ts#L118" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/admin/index.ts#L118" } ], "type": { "type": "reference", - "target": 42045, + "target": 976, "name": "ShippingProfile", "package": "@medusajs/js-sdk" } }, { - "id": 41093, + "id": 24, "name": "inventoryItem", "variant": "declaration", "kind": 1024, @@ -18942,18 +19120,18 @@ "fileName": "admin/index.ts", "line": 122, "character": 9, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/admin/index.ts#L122" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/admin/index.ts#L122" } ], "type": { "type": "reference", - "target": 42074, + "target": 1005, "name": "InventoryItem", "package": "@medusajs/js-sdk" } }, { - "id": 41094, + "id": 25, "name": "notification", "variant": "declaration", "kind": 1024, @@ -18979,18 +19157,18 @@ "fileName": "admin/index.ts", "line": 126, "character": 9, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/admin/index.ts#L126" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/admin/index.ts#L126" } ], "type": { "type": "reference", - "target": 42135, + "target": 1066, "name": "Notification", "package": "@medusajs/js-sdk" } }, { - "id": 41095, + "id": 26, "name": "order", "variant": "declaration", "kind": 1024, @@ -19016,18 +19194,18 @@ "fileName": "admin/index.ts", "line": 130, "character": 9, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/admin/index.ts#L130" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/admin/index.ts#L130" } ], "type": { "type": "reference", - "target": 42149, + "target": 1080, "name": "Order", "package": "@medusajs/js-sdk" } }, { - "id": 41096, + "id": 27, "name": "draftOrder", "variant": "declaration", "kind": 1024, @@ -19053,18 +19231,18 @@ "fileName": "admin/index.ts", "line": 134, "character": 9, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/admin/index.ts#L134" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/admin/index.ts#L134" } ], "type": { "type": "reference", - "target": 42227, + "target": 1158, "name": "DraftOrder", "package": "@medusajs/js-sdk" } }, { - "id": 41097, + "id": 28, "name": "orderEdit", "variant": "declaration", "kind": 1024, @@ -19090,18 +19268,18 @@ "fileName": "admin/index.ts", "line": 138, "character": 9, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/admin/index.ts#L138" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/admin/index.ts#L138" } ], "type": { "type": "reference", - "target": 42332, + "target": 1263, "name": "OrderEdit", "package": "@medusajs/js-sdk" } }, { - "id": 41098, + "id": 29, "name": "return", "variant": "declaration", "kind": 1024, @@ -19127,18 +19305,18 @@ "fileName": "admin/index.ts", "line": 142, "character": 9, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/admin/index.ts#L142" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/admin/index.ts#L142" } ], "type": { "type": "reference", - "target": 42383, + "target": 1314, "name": "Return", "package": "@medusajs/js-sdk" } }, { - "id": 41099, + "id": 30, "name": "claim", "variant": "declaration", "kind": 1024, @@ -19164,18 +19342,18 @@ "fileName": "admin/index.ts", "line": 146, "character": 9, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/admin/index.ts#L146" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/admin/index.ts#L146" } ], "type": { "type": "reference", - "target": 42517, + "target": 1448, "name": "Claim", "package": "@medusajs/js-sdk" } }, { - "id": 41100, + "id": 31, "name": "exchange", "variant": "declaration", "kind": 1024, @@ -19201,18 +19379,18 @@ "fileName": "admin/index.ts", "line": 150, "character": 9, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/admin/index.ts#L150" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/admin/index.ts#L150" } ], "type": { "type": "reference", - "target": 42647, + "target": 1578, "name": "Exchange", "package": "@medusajs/js-sdk" } }, { - "id": 41101, + "id": 32, "name": "taxRate", "variant": "declaration", "kind": 1024, @@ -19238,18 +19416,18 @@ "fileName": "admin/index.ts", "line": 154, "character": 9, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/admin/index.ts#L154" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/admin/index.ts#L154" } ], "type": { "type": "reference", - "target": 42758, + "target": 1689, "name": "TaxRate", "package": "@medusajs/js-sdk" } }, { - "id": 41102, + "id": 33, "name": "taxRegion", "variant": "declaration", "kind": 1024, @@ -19275,18 +19453,18 @@ "fileName": "admin/index.ts", "line": 158, "character": 9, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/admin/index.ts#L158" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/admin/index.ts#L158" } ], "type": { "type": "reference", - "target": 42787, + "target": 1718, "name": "TaxRegion", "package": "@medusajs/js-sdk" } }, { - "id": 41103, + "id": 34, "name": "store", "variant": "declaration", "kind": 1024, @@ -19312,18 +19490,18 @@ "fileName": "admin/index.ts", "line": 162, "character": 9, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/admin/index.ts#L162" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/admin/index.ts#L162" } ], "type": { "type": "reference", - "target": 42810, + "target": 1741, "name": "Store", "package": "@medusajs/js-sdk" } }, { - "id": 41104, + "id": 35, "name": "productTag", "variant": "declaration", "kind": 1024, @@ -19349,18 +19527,18 @@ "fileName": "admin/index.ts", "line": 166, "character": 9, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/admin/index.ts#L166" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/admin/index.ts#L166" } ], "type": { "type": "reference", - "target": 42830, + "target": 1761, "name": "ProductTag", "package": "@medusajs/js-sdk" } }, { - "id": 41105, + "id": 36, "name": "user", "variant": "declaration", "kind": 1024, @@ -19386,18 +19564,18 @@ "fileName": "admin/index.ts", "line": 170, "character": 9, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/admin/index.ts#L170" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/admin/index.ts#L170" } ], "type": { "type": "reference", - "target": 42859, + "target": 1790, "name": "User", "package": "@medusajs/js-sdk" } }, { - "id": 41106, + "id": 37, "name": "currency", "variant": "declaration", "kind": 1024, @@ -19423,18 +19601,18 @@ "fileName": "admin/index.ts", "line": 174, "character": 9, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/admin/index.ts#L174" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/admin/index.ts#L174" } ], "type": { "type": "reference", - "target": 42887, + "target": 1818, "name": "Currency", "package": "@medusajs/js-sdk" } }, { - "id": 41107, + "id": 38, "name": "payment", "variant": "declaration", "kind": 1024, @@ -19460,18 +19638,18 @@ "fileName": "admin/index.ts", "line": 178, "character": 9, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/admin/index.ts#L178" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/admin/index.ts#L178" } ], "type": { "type": "reference", - "target": 42901, + "target": 1832, "name": "Payment", "package": "@medusajs/js-sdk" } }, { - "id": 41108, + "id": 39, "name": "productVariant", "variant": "declaration", "kind": 1024, @@ -19497,18 +19675,18 @@ "fileName": "admin/index.ts", "line": 182, "character": 9, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/admin/index.ts#L182" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/admin/index.ts#L182" } ], "type": { "type": "reference", - "target": 42931, + "target": 1862, "name": "ProductVariant", "package": "@medusajs/js-sdk" } }, { - "id": 41109, + "id": 40, "name": "refundReason", "variant": "declaration", "kind": 1024, @@ -19534,18 +19712,18 @@ "fileName": "admin/index.ts", "line": 186, "character": 9, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/admin/index.ts#L186" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/admin/index.ts#L186" } ], "type": { "type": "reference", - "target": 42940, + "target": 1871, "name": "RefundReason", "package": "@medusajs/js-sdk" } }, { - "id": 41110, + "id": 41, "name": "paymentCollection", "variant": "declaration", "kind": 1024, @@ -19571,18 +19749,18 @@ "fileName": "admin/index.ts", "line": 190, "character": 9, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/admin/index.ts#L190" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/admin/index.ts#L190" } ], "type": { "type": "reference", - "target": 42949, + "target": 1880, "name": "PaymentCollection", "package": "@medusajs/js-sdk" } }, { - "id": 41111, + "id": 42, "name": "apiKey", "variant": "declaration", "kind": 1024, @@ -19608,18 +19786,18 @@ "fileName": "admin/index.ts", "line": 194, "character": 9, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/admin/index.ts#L194" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/admin/index.ts#L194" } ], "type": { "type": "reference", - "target": 42969, + "target": 1900, "name": "ApiKey", "package": "@medusajs/js-sdk" } }, { - "id": 41112, + "id": 43, "name": "workflowExecution", "variant": "declaration", "kind": 1024, @@ -19645,18 +19823,18 @@ "fileName": "admin/index.ts", "line": 198, "character": 9, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/admin/index.ts#L198" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/admin/index.ts#L198" } ], "type": { "type": "reference", - "target": 43006, + "target": 1937, "name": "WorkflowExecution", "package": "@medusajs/js-sdk" } }, { - "id": 41113, + "id": 44, "name": "reservation", "variant": "declaration", "kind": 1024, @@ -19682,18 +19860,18 @@ "fileName": "admin/index.ts", "line": 202, "character": 9, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/admin/index.ts#L202" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/admin/index.ts#L202" } ], "type": { "type": "reference", - "target": 43019, + "target": 1950, "name": "Reservation", "package": "@medusajs/js-sdk" } }, { - "id": 41114, + "id": 45, "name": "customerGroup", "variant": "declaration", "kind": 1024, @@ -19719,18 +19897,18 @@ "fileName": "admin/index.ts", "line": 206, "character": 9, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/admin/index.ts#L206" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/admin/index.ts#L206" } ], "type": { "type": "reference", - "target": 43048, + "target": 1979, "name": "CustomerGroup", "package": "@medusajs/js-sdk" } }, { - "id": 41115, + "id": 46, "name": "promotion", "variant": "declaration", "kind": 1024, @@ -19756,18 +19934,18 @@ "fileName": "admin/index.ts", "line": 210, "character": 9, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/admin/index.ts#L210" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/admin/index.ts#L210" } ], "type": { "type": "reference", - "target": 43082, + "target": 2013, "name": "Promotion", "package": "@medusajs/js-sdk" } }, { - "id": 41116, + "id": 47, "name": "campaign", "variant": "declaration", "kind": 1024, @@ -19793,18 +19971,18 @@ "fileName": "admin/index.ts", "line": 214, "character": 9, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/admin/index.ts#L214" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/admin/index.ts#L214" } ], "type": { "type": "reference", - "target": 43144, + "target": 2075, "name": "Campaign", "package": "@medusajs/js-sdk" } }, { - "id": 41117, + "id": 48, "name": "plugin", "variant": "declaration", "kind": 1024, @@ -19830,18 +20008,18 @@ "fileName": "admin/index.ts", "line": 218, "character": 9, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/admin/index.ts#L218" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/admin/index.ts#L218" } ], "type": { "type": "reference", - "target": 43176, + "target": 2107, "name": "Plugin", "package": "@medusajs/js-sdk" } }, { - "id": 41072, + "id": 3, "name": "constructor", "variant": "declaration", "kind": 512, @@ -19851,12 +20029,12 @@ "fileName": "admin/index.ts", "line": 220, "character": 2, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/admin/index.ts#L220" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/admin/index.ts#L220" } ], "signatures": [ { - "id": 41073, + "id": 4, "name": "Admin", "variant": "signature", "kind": 16384, @@ -19866,19 +20044,19 @@ "fileName": "admin/index.ts", "line": 220, "character": 2, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/admin/index.ts#L220" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/admin/index.ts#L220" } ], "parameters": [ { - "id": 41074, + "id": 5, "name": "client", "variant": "param", "kind": 32768, "flags": {}, "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } @@ -19886,7 +20064,7 @@ ], "type": { "type": "reference", - "target": 41071, + "target": 2, "name": "Admin", "package": "@medusajs/js-sdk" } @@ -19898,55 +20076,55 @@ { "title": "Constructors", "children": [ - 41072 + 3 ] }, { "title": "Properties", "children": [ - 41075, - 41076, - 41077, - 41078, - 41079, - 41080, - 41081, - 41082, - 41083, - 41084, - 41085, - 41086, - 41087, - 41088, - 41089, - 41090, - 41091, - 41092, - 41093, - 41094, - 41095, - 41096, - 41097, - 41098, - 41099, - 41100, - 41101, - 41102, - 41103, - 41104, - 41105, - 41106, - 41107, - 41108, - 41109, - 41110, - 41111, - 41112, - 41113, - 41114, - 41115, - 41116, - 41117 + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48 ] } ], @@ -19955,19 +20133,19 @@ "fileName": "admin/index.ts", "line": 46, "character": 13, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/admin/index.ts#L46" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/admin/index.ts#L46" } ] }, { - "id": 42074, + "id": 1005, "name": "InventoryItem", "variant": "declaration", "kind": 128, "flags": {}, "children": [ { - "id": 42078, + "id": 1009, "name": "client", "variant": "declaration", "kind": 1024, @@ -19982,34 +20160,34 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/inventory-item.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/inventory-item.ts", "line": 9, "character": 10 } ], "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } }, { - "id": 42075, + "id": 1006, "name": "constructor", "variant": "declaration", "kind": 512, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/inventory-item.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/inventory-item.ts", "line": 13, "character": 2 } ], "signatures": [ { - "id": 42076, + "id": 1007, "name": "InventoryItem", "variant": "signature", "kind": 16384, @@ -20022,21 +20200,21 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/inventory-item.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/inventory-item.ts", "line": 13, "character": 2 } ], "parameters": [ { - "id": 42077, + "id": 1008, "name": "client", "variant": "param", "kind": 32768, "flags": {}, "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } @@ -20044,7 +20222,7 @@ ], "type": { "type": "reference", - "target": 42074, + "target": 1005, "name": "InventoryItem", "package": "@medusajs/js-sdk" } @@ -20052,21 +20230,21 @@ ] }, { - "id": 42079, + "id": 1010, "name": "create", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/inventory-item.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/inventory-item.ts", "line": 35, "character": 8 } ], "signatures": [ { - "id": 42080, + "id": 1011, "name": "create", "variant": "signature", "kind": 4096, @@ -20101,14 +20279,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/inventory-item.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/inventory-item.ts", "line": 35, "character": 8 } ], "parameters": [ { - "id": 42081, + "id": 1012, "name": "body", "variant": "param", "kind": 32768, @@ -20132,7 +20310,7 @@ } }, { - "id": 42082, + "id": 1013, "name": "query", "variant": "param", "kind": 32768, @@ -20158,7 +20336,7 @@ } }, { - "id": 42083, + "id": 1014, "name": "headers", "variant": "param", "kind": 32768, @@ -20175,7 +20353,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -20205,21 +20383,21 @@ ] }, { - "id": 42084, + "id": 1015, "name": "update", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/inventory-item.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/inventory-item.ts", "line": 70, "character": 8 } ], "signatures": [ { - "id": 42085, + "id": 1016, "name": "update", "variant": "signature", "kind": 4096, @@ -20254,14 +20432,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/inventory-item.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/inventory-item.ts", "line": 70, "character": 8 } ], "parameters": [ { - "id": 42086, + "id": 1017, "name": "id", "variant": "param", "kind": 32768, @@ -20280,7 +20458,7 @@ } }, { - "id": 42087, + "id": 1018, "name": "body", "variant": "param", "kind": 32768, @@ -20304,7 +20482,7 @@ } }, { - "id": 42088, + "id": 1019, "name": "query", "variant": "param", "kind": 32768, @@ -20330,7 +20508,7 @@ } }, { - "id": 42089, + "id": 1020, "name": "headers", "variant": "param", "kind": 32768, @@ -20347,7 +20525,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -20377,21 +20555,21 @@ ] }, { - "id": 42090, + "id": 1021, "name": "list", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/inventory-item.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/inventory-item.ts", "line": 134, "character": 8 } ], "signatures": [ { - "id": 42091, + "id": 1022, "name": "list", "variant": "signature", "kind": 4096, @@ -20482,14 +20660,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/inventory-item.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/inventory-item.ts", "line": 134, "character": 8 } ], "parameters": [ { - "id": 42092, + "id": 1023, "name": "query", "variant": "param", "kind": 32768, @@ -20515,7 +20693,7 @@ } }, { - "id": 42093, + "id": 1024, "name": "headers", "variant": "param", "kind": 32768, @@ -20532,7 +20710,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -20562,21 +20740,21 @@ ] }, { - "id": 42094, + "id": 1025, "name": "retrieve", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/inventory-item.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/inventory-item.ts", "line": 179, "character": 8 } ], "signatures": [ { - "id": 42095, + "id": 1026, "name": "retrieve", "variant": "signature", "kind": 4096, @@ -20635,14 +20813,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/inventory-item.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/inventory-item.ts", "line": 179, "character": 8 } ], "parameters": [ { - "id": 42096, + "id": 1027, "name": "id", "variant": "param", "kind": 32768, @@ -20661,7 +20839,7 @@ } }, { - "id": 42097, + "id": 1028, "name": "query", "variant": "param", "kind": 32768, @@ -20687,7 +20865,7 @@ } }, { - "id": 42098, + "id": 1029, "name": "headers", "variant": "param", "kind": 32768, @@ -20704,7 +20882,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -20734,21 +20912,21 @@ ] }, { - "id": 42099, + "id": 1030, "name": "delete", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/inventory-item.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/inventory-item.ts", "line": 204, "character": 8 } ], "signatures": [ { - "id": 42100, + "id": 1031, "name": "delete", "variant": "signature", "kind": 4096, @@ -20783,14 +20961,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/inventory-item.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/inventory-item.ts", "line": 204, "character": 8 } ], "parameters": [ { - "id": 42101, + "id": 1032, "name": "id", "variant": "param", "kind": 32768, @@ -20809,7 +20987,7 @@ } }, { - "id": 42102, + "id": 1033, "name": "headers", "variant": "param", "kind": 32768, @@ -20826,7 +21004,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -20856,21 +21034,21 @@ ] }, { - "id": 42103, + "id": 1034, "name": "listLevels", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/inventory-item.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/inventory-item.ts", "line": 262, "character": 8 } ], "signatures": [ { - "id": 42104, + "id": 1035, "name": "listLevels", "variant": "signature", "kind": 4096, @@ -20961,14 +21139,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/inventory-item.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/inventory-item.ts", "line": 262, "character": 8 } ], "parameters": [ { - "id": 42105, + "id": 1036, "name": "id", "variant": "param", "kind": 32768, @@ -20987,7 +21165,7 @@ } }, { - "id": 42106, + "id": 1037, "name": "query", "variant": "param", "kind": 32768, @@ -21013,7 +21191,7 @@ } }, { - "id": 42107, + "id": 1038, "name": "headers", "variant": "param", "kind": 32768, @@ -21030,7 +21208,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -21060,21 +21238,21 @@ ] }, { - "id": 42108, + "id": 1039, "name": "updateLevel", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/inventory-item.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/inventory-item.ts", "line": 303, "character": 8 } ], "signatures": [ { - "id": 42109, + "id": 1040, "name": "updateLevel", "variant": "signature", "kind": 4096, @@ -21109,14 +21287,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/inventory-item.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/inventory-item.ts", "line": 303, "character": 8 } ], "parameters": [ { - "id": 42110, + "id": 1041, "name": "id", "variant": "param", "kind": 32768, @@ -21135,7 +21313,7 @@ } }, { - "id": 42111, + "id": 1042, "name": "locationId", "variant": "param", "kind": 32768, @@ -21154,7 +21332,7 @@ } }, { - "id": 42112, + "id": 1043, "name": "body", "variant": "param", "kind": 32768, @@ -21178,7 +21356,7 @@ } }, { - "id": 42113, + "id": 1044, "name": "query", "variant": "param", "kind": 32768, @@ -21204,7 +21382,7 @@ } }, { - "id": 42114, + "id": 1045, "name": "headers", "variant": "param", "kind": 32768, @@ -21221,7 +21399,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -21251,21 +21429,21 @@ ] }, { - "id": 42115, + "id": 1046, "name": "deleteLevel", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/inventory-item.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/inventory-item.ts", "line": 343, "character": 8 } ], "signatures": [ { - "id": 42116, + "id": 1047, "name": "deleteLevel", "variant": "signature", "kind": 4096, @@ -21300,14 +21478,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/inventory-item.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/inventory-item.ts", "line": 343, "character": 8 } ], "parameters": [ { - "id": 42117, + "id": 1048, "name": "id", "variant": "param", "kind": 32768, @@ -21326,7 +21504,7 @@ } }, { - "id": 42118, + "id": 1049, "name": "locationId", "variant": "param", "kind": 32768, @@ -21345,7 +21523,7 @@ } }, { - "id": 42119, + "id": 1050, "name": "headers", "variant": "param", "kind": 32768, @@ -21362,7 +21540,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -21392,21 +21570,21 @@ ] }, { - "id": 42120, + "id": 1051, "name": "batchUpdateLevels", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/inventory-item.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/inventory-item.ts", "line": 378, "character": 8 } ], "signatures": [ { - "id": 42121, + "id": 1052, "name": "batchUpdateLevels", "variant": "signature", "kind": 4096, @@ -21458,14 +21636,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/inventory-item.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/inventory-item.ts", "line": 378, "character": 8 } ], "parameters": [ { - "id": 42122, + "id": 1053, "name": "id", "variant": "param", "kind": 32768, @@ -21484,7 +21662,7 @@ } }, { - "id": 42123, + "id": 1054, "name": "body", "variant": "param", "kind": 32768, @@ -21508,7 +21686,7 @@ } }, { - "id": 42124, + "id": 1055, "name": "query", "variant": "param", "kind": 32768, @@ -21534,7 +21712,7 @@ } }, { - "id": 42125, + "id": 1056, "name": "headers", "variant": "param", "kind": 32768, @@ -21551,7 +21729,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -21581,21 +21759,21 @@ ] }, { - "id": 42126, + "id": 1057, "name": "batchInventoryItemLocationLevels", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/inventory-item.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/inventory-item.ts", "line": 417, "character": 8 } ], "signatures": [ { - "id": 42127, + "id": 1058, "name": "batchInventoryItemLocationLevels", "variant": "signature", "kind": 4096, @@ -21630,14 +21808,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/inventory-item.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/inventory-item.ts", "line": 417, "character": 8 } ], "parameters": [ { - "id": 42128, + "id": 1059, "name": "id", "variant": "param", "kind": 32768, @@ -21656,7 +21834,7 @@ } }, { - "id": 42129, + "id": 1060, "name": "body", "variant": "param", "kind": 32768, @@ -21688,7 +21866,7 @@ } }, { - "id": 42130, + "id": 1061, "name": "headers", "variant": "param", "kind": 32768, @@ -21705,7 +21883,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -21735,21 +21913,21 @@ ] }, { - "id": 42131, + "id": 1062, "name": "batchInventoryItemsLocationLevels", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/inventory-item.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/inventory-item.ts", "line": 452, "character": 8 } ], "signatures": [ { - "id": 42132, + "id": 1063, "name": "batchInventoryItemsLocationLevels", "variant": "signature", "kind": 4096, @@ -21784,14 +21962,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/inventory-item.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/inventory-item.ts", "line": 452, "character": 8 } ], "parameters": [ { - "id": 42133, + "id": 1064, "name": "body", "variant": "param", "kind": 32768, @@ -21823,7 +22001,7 @@ } }, { - "id": 42134, + "id": 1065, "name": "headers", "variant": "param", "kind": 32768, @@ -21840,7 +22018,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -21874,49 +22052,49 @@ { "title": "Constructors", "children": [ - 42075 + 1006 ] }, { "title": "Properties", "children": [ - 42078 + 1009 ] }, { "title": "Methods", "children": [ - 42079, - 42084, - 42090, - 42094, - 42099, - 42103, - 42108, - 42115, - 42120, - 42126, - 42131 + 1010, + 1015, + 1021, + 1025, + 1030, + 1034, + 1039, + 1046, + 1051, + 1057, + 1062 ] } ], "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/inventory-item.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/inventory-item.ts", "line": 5, "character": 13 } ] }, { - "id": 41400, + "id": 331, "name": "Invite", "variant": "declaration", "kind": 128, "flags": {}, "children": [ { - "id": 41404, + "id": 335, "name": "client", "variant": "declaration", "kind": 1024, @@ -21931,34 +22109,34 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/invite.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/invite.ts", "line": 13, "character": 10 } ], "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } }, { - "id": 41401, + "id": 332, "name": "constructor", "variant": "declaration", "kind": 512, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/invite.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/invite.ts", "line": 17, "character": 2 } ], "signatures": [ { - "id": 41402, + "id": 333, "name": "Invite", "variant": "signature", "kind": 16384, @@ -21971,21 +22149,21 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/invite.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/invite.ts", "line": 17, "character": 2 } ], "parameters": [ { - "id": 41403, + "id": 334, "name": "client", "variant": "param", "kind": 32768, "flags": {}, "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } @@ -21993,7 +22171,7 @@ ], "type": { "type": "reference", - "target": 41400, + "target": 331, "name": "Invite", "package": "@medusajs/js-sdk" } @@ -22001,21 +22179,21 @@ ] }, { - "id": 41405, + "id": 336, "name": "accept", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/invite.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/invite.ts", "line": 50, "character": 8 } ], "signatures": [ { - "id": 41406, + "id": 337, "name": "accept", "variant": "signature", "kind": 4096, @@ -22059,14 +22237,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/invite.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/invite.ts", "line": 50, "character": 8 } ], "parameters": [ { - "id": 41407, + "id": 338, "name": "input", "variant": "param", "kind": 32768, @@ -22094,14 +22272,14 @@ { "type": "reflection", "declaration": { - "id": 41408, + "id": 339, "name": "__type", "variant": "declaration", "kind": 65536, "flags": {}, "children": [ { - "id": 41409, + "id": 340, "name": "invite_token", "variant": "declaration", "kind": 1024, @@ -22116,7 +22294,7 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/invite.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/invite.ts", "line": 55, "character": 6 } @@ -22131,13 +22309,13 @@ { "title": "Properties", "children": [ - 41409 + 340 ] } ], "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/invite.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/invite.ts", "line": 51, "character": 41 } @@ -22148,7 +22326,7 @@ } }, { - "id": 41410, + "id": 341, "name": "query", "variant": "param", "kind": 32768, @@ -22174,7 +22352,7 @@ } }, { - "id": 41411, + "id": 342, "name": "headers", "variant": "param", "kind": 32768, @@ -22191,7 +22369,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -22221,21 +22399,21 @@ ] }, { - "id": 41412, + "id": 343, "name": "create", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/invite.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/invite.ts", "line": 90, "character": 8 } ], "signatures": [ { - "id": 41413, + "id": 344, "name": "create", "variant": "signature", "kind": 4096, @@ -22270,14 +22448,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/invite.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/invite.ts", "line": 90, "character": 8 } ], "parameters": [ { - "id": 41414, + "id": 345, "name": "body", "variant": "param", "kind": 32768, @@ -22301,7 +22479,7 @@ } }, { - "id": 41415, + "id": 346, "name": "query", "variant": "param", "kind": 32768, @@ -22327,7 +22505,7 @@ } }, { - "id": 41416, + "id": 347, "name": "headers", "variant": "param", "kind": 32768, @@ -22344,7 +22522,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -22374,21 +22552,21 @@ ] }, { - "id": 41417, + "id": 348, "name": "retrieve", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/invite.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/invite.ts", "line": 139, "character": 8 } ], "signatures": [ { - "id": 41418, + "id": 349, "name": "retrieve", "variant": "signature", "kind": 4096, @@ -22447,14 +22625,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/invite.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/invite.ts", "line": 139, "character": 8 } ], "parameters": [ { - "id": 41419, + "id": 350, "name": "id", "variant": "param", "kind": 32768, @@ -22473,7 +22651,7 @@ } }, { - "id": 41420, + "id": 351, "name": "query", "variant": "param", "kind": 32768, @@ -22499,7 +22677,7 @@ } }, { - "id": 41421, + "id": 352, "name": "headers", "variant": "param", "kind": 32768, @@ -22516,7 +22694,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -22546,21 +22724,21 @@ ] }, { - "id": 41422, + "id": 353, "name": "list", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/invite.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/invite.ts", "line": 196, "character": 8 } ], "signatures": [ { - "id": 41423, + "id": 354, "name": "list", "variant": "signature", "kind": 4096, @@ -22651,14 +22829,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/invite.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/invite.ts", "line": 196, "character": 8 } ], "parameters": [ { - "id": 41424, + "id": 355, "name": "queryParams", "variant": "param", "kind": 32768, @@ -22684,7 +22862,7 @@ } }, { - "id": 41425, + "id": 356, "name": "headers", "variant": "param", "kind": 32768, @@ -22701,7 +22879,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -22731,21 +22909,21 @@ ] }, { - "id": 41426, + "id": 357, "name": "resend", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/invite.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/invite.ts", "line": 220, "character": 8 } ], "signatures": [ { - "id": 41427, + "id": 358, "name": "resend", "variant": "signature", "kind": 4096, @@ -22780,14 +22958,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/invite.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/invite.ts", "line": 220, "character": 8 } ], "parameters": [ { - "id": 41428, + "id": 359, "name": "id", "variant": "param", "kind": 32768, @@ -22806,7 +22984,7 @@ } }, { - "id": 41429, + "id": 360, "name": "headers", "variant": "param", "kind": 32768, @@ -22823,7 +23001,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -22853,21 +23031,21 @@ ] }, { - "id": 41430, + "id": 361, "name": "delete", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/invite.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/invite.ts", "line": 245, "character": 8 } ], "signatures": [ { - "id": 41431, + "id": 362, "name": "delete", "variant": "signature", "kind": 4096, @@ -22902,14 +23080,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/invite.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/invite.ts", "line": 245, "character": 8 } ], "parameters": [ { - "id": 41432, + "id": 363, "name": "id", "variant": "param", "kind": 32768, @@ -22928,7 +23106,7 @@ } }, { - "id": 41433, + "id": 364, "name": "headers", "variant": "param", "kind": 32768, @@ -22945,7 +23123,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -22979,44 +23157,44 @@ { "title": "Constructors", "children": [ - 41401 + 332 ] }, { "title": "Properties", "children": [ - 41404 + 335 ] }, { "title": "Methods", "children": [ - 41405, - 41412, - 41417, - 41422, - 41426, - 41430 + 336, + 343, + 348, + 353, + 357, + 361 ] } ], "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/invite.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/invite.ts", "line": 9, "character": 13 } ] }, { - "id": 42135, + "id": 1066, "name": "Notification", "variant": "declaration", "kind": 128, "flags": {}, "children": [ { - "id": 42139, + "id": 1070, "name": "client", "variant": "declaration", "kind": 1024, @@ -23031,34 +23209,34 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/notification.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/notification.ts", "line": 9, "character": 10 } ], "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } }, { - "id": 42136, + "id": 1067, "name": "constructor", "variant": "declaration", "kind": 512, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/notification.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/notification.ts", "line": 13, "character": 2 } ], "signatures": [ { - "id": 42137, + "id": 1068, "name": "Notification", "variant": "signature", "kind": 16384, @@ -23071,21 +23249,21 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/notification.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/notification.ts", "line": 13, "character": 2 } ], "parameters": [ { - "id": 42138, + "id": 1069, "name": "client", "variant": "param", "kind": 32768, "flags": {}, "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } @@ -23093,7 +23271,7 @@ ], "type": { "type": "reference", - "target": 42135, + "target": 1066, "name": "Notification", "package": "@medusajs/js-sdk" } @@ -23101,21 +23279,21 @@ ] }, { - "id": 42140, + "id": 1071, "name": "retrieve", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/notification.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/notification.ts", "line": 50, "character": 8 } ], "signatures": [ { - "id": 42141, + "id": 1072, "name": "retrieve", "variant": "signature", "kind": 4096, @@ -23174,14 +23352,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/notification.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/notification.ts", "line": 50, "character": 8 } ], "parameters": [ { - "id": 42142, + "id": 1073, "name": "id", "variant": "param", "kind": 32768, @@ -23200,7 +23378,7 @@ } }, { - "id": 42143, + "id": 1074, "name": "query", "variant": "param", "kind": 32768, @@ -23226,7 +23404,7 @@ } }, { - "id": 42144, + "id": 1075, "name": "headers", "variant": "param", "kind": 32768, @@ -23243,7 +23421,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -23273,21 +23451,21 @@ ] }, { - "id": 42145, + "id": 1076, "name": "list", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/notification.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/notification.ts", "line": 112, "character": 8 } ], "signatures": [ { - "id": 42146, + "id": 1077, "name": "list", "variant": "signature", "kind": 4096, @@ -23378,14 +23556,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/notification.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/notification.ts", "line": 112, "character": 8 } ], "parameters": [ { - "id": 42147, + "id": 1078, "name": "query", "variant": "param", "kind": 32768, @@ -23411,7 +23589,7 @@ } }, { - "id": 42148, + "id": 1079, "name": "headers", "variant": "param", "kind": 32768, @@ -23428,7 +23606,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -23462,40 +23640,40 @@ { "title": "Constructors", "children": [ - 42136 + 1067 ] }, { "title": "Properties", "children": [ - 42139 + 1070 ] }, { "title": "Methods", "children": [ - 42140, - 42145 + 1071, + 1076 ] } ], "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/notification.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/notification.ts", "line": 5, "character": 13 } ] }, { - "id": 42332, + "id": 1263, "name": "OrderEdit", "variant": "declaration", "kind": 128, "flags": {}, "children": [ { - "id": 42336, + "id": 1267, "name": "client", "variant": "declaration", "kind": 1024, @@ -23510,34 +23688,34 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/order-edit.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/order-edit.ts", "line": 9, "character": 10 } ], "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } }, { - "id": 42333, + "id": 1264, "name": "constructor", "variant": "declaration", "kind": 512, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/order-edit.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/order-edit.ts", "line": 13, "character": 2 } ], "signatures": [ { - "id": 42334, + "id": 1265, "name": "OrderEdit", "variant": "signature", "kind": 16384, @@ -23550,21 +23728,21 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/order-edit.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/order-edit.ts", "line": 13, "character": 2 } ], "parameters": [ { - "id": 42335, + "id": 1266, "name": "client", "variant": "param", "kind": 32768, "flags": {}, "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } @@ -23572,7 +23750,7 @@ ], "type": { "type": "reference", - "target": 42332, + "target": 1263, "name": "OrderEdit", "package": "@medusajs/js-sdk" } @@ -23580,21 +23758,21 @@ ] }, { - "id": 42337, + "id": 1268, "name": "initiateRequest", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/order-edit.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/order-edit.ts", "line": 35, "character": 8 } ], "signatures": [ { - "id": 42338, + "id": 1269, "name": "initiateRequest", "variant": "signature", "kind": 4096, @@ -23629,14 +23807,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/order-edit.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/order-edit.ts", "line": 35, "character": 8 } ], "parameters": [ { - "id": 42339, + "id": 1270, "name": "body", "variant": "param", "kind": 32768, @@ -23660,7 +23838,7 @@ } }, { - "id": 42340, + "id": 1271, "name": "query", "variant": "param", "kind": 32768, @@ -23686,7 +23864,7 @@ } }, { - "id": 42341, + "id": 1272, "name": "headers", "variant": "param", "kind": 32768, @@ -23703,7 +23881,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -23733,21 +23911,21 @@ ] }, { - "id": 42342, + "id": 1273, "name": "request", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/order-edit.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/order-edit.ts", "line": 67, "character": 8 } ], "signatures": [ { - "id": 42343, + "id": 1274, "name": "request", "variant": "signature", "kind": 4096, @@ -23782,14 +23960,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/order-edit.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/order-edit.ts", "line": 67, "character": 8 } ], "parameters": [ { - "id": 42344, + "id": 1275, "name": "id", "variant": "param", "kind": 32768, @@ -23808,7 +23986,7 @@ } }, { - "id": 42345, + "id": 1276, "name": "query", "variant": "param", "kind": 32768, @@ -23834,7 +24012,7 @@ } }, { - "id": 42346, + "id": 1277, "name": "headers", "variant": "param", "kind": 32768, @@ -23851,7 +24029,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -23881,21 +24059,21 @@ ] }, { - "id": 42347, + "id": 1278, "name": "confirm", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/order-edit.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/order-edit.ts", "line": 98, "character": 8 } ], "signatures": [ { - "id": 42348, + "id": 1279, "name": "confirm", "variant": "signature", "kind": 4096, @@ -23930,14 +24108,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/order-edit.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/order-edit.ts", "line": 98, "character": 8 } ], "parameters": [ { - "id": 42349, + "id": 1280, "name": "id", "variant": "param", "kind": 32768, @@ -23956,7 +24134,7 @@ } }, { - "id": 42350, + "id": 1281, "name": "query", "variant": "param", "kind": 32768, @@ -23982,7 +24160,7 @@ } }, { - "id": 42351, + "id": 1282, "name": "headers", "variant": "param", "kind": 32768, @@ -23999,7 +24177,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -24029,21 +24207,21 @@ ] }, { - "id": 42352, + "id": 1283, "name": "cancelRequest", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/order-edit.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/order-edit.ts", "line": 129, "character": 8 } ], "signatures": [ { - "id": 42353, + "id": 1284, "name": "cancelRequest", "variant": "signature", "kind": 4096, @@ -24078,14 +24256,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/order-edit.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/order-edit.ts", "line": 129, "character": 8 } ], "parameters": [ { - "id": 42354, + "id": 1285, "name": "id", "variant": "param", "kind": 32768, @@ -24104,7 +24282,7 @@ } }, { - "id": 42355, + "id": 1286, "name": "query", "variant": "param", "kind": 32768, @@ -24130,7 +24308,7 @@ } }, { - "id": 42356, + "id": 1287, "name": "headers", "variant": "param", "kind": 32768, @@ -24147,7 +24325,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -24177,21 +24355,21 @@ ] }, { - "id": 42357, + "id": 1288, "name": "addItems", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/order-edit.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/order-edit.ts", "line": 169, "character": 8 } ], "signatures": [ { - "id": 42358, + "id": 1289, "name": "addItems", "variant": "signature", "kind": 4096, @@ -24234,14 +24412,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/order-edit.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/order-edit.ts", "line": 169, "character": 8 } ], "parameters": [ { - "id": 42359, + "id": 1290, "name": "id", "variant": "param", "kind": 32768, @@ -24260,7 +24438,7 @@ } }, { - "id": 42360, + "id": 1291, "name": "body", "variant": "param", "kind": 32768, @@ -24284,7 +24462,7 @@ } }, { - "id": 42361, + "id": 1292, "name": "query", "variant": "param", "kind": 32768, @@ -24310,7 +24488,7 @@ } }, { - "id": 42362, + "id": 1293, "name": "headers", "variant": "param", "kind": 32768, @@ -24327,7 +24505,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -24357,21 +24535,21 @@ ] }, { - "id": 42363, + "id": 1294, "name": "updateOriginalItem", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/order-edit.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/order-edit.ts", "line": 210, "character": 8 } ], "signatures": [ { - "id": 42364, + "id": 1295, "name": "updateOriginalItem", "variant": "signature", "kind": 4096, @@ -24406,14 +24584,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/order-edit.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/order-edit.ts", "line": 210, "character": 8 } ], "parameters": [ { - "id": 42365, + "id": 1296, "name": "id", "variant": "param", "kind": 32768, @@ -24432,7 +24610,7 @@ } }, { - "id": 42366, + "id": 1297, "name": "itemId", "variant": "param", "kind": 32768, @@ -24451,7 +24629,7 @@ } }, { - "id": 42367, + "id": 1298, "name": "body", "variant": "param", "kind": 32768, @@ -24475,7 +24653,7 @@ } }, { - "id": 42368, + "id": 1299, "name": "query", "variant": "param", "kind": 32768, @@ -24501,7 +24679,7 @@ } }, { - "id": 42369, + "id": 1300, "name": "headers", "variant": "param", "kind": 32768, @@ -24518,7 +24696,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -24548,21 +24726,21 @@ ] }, { - "id": 42370, + "id": 1301, "name": "updateAddedItem", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/order-edit.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/order-edit.ts", "line": 257, "character": 8 } ], "signatures": [ { - "id": 42371, + "id": 1302, "name": "updateAddedItem", "variant": "signature", "kind": 4096, @@ -24629,14 +24807,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/order-edit.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/order-edit.ts", "line": 257, "character": 8 } ], "parameters": [ { - "id": 42372, + "id": 1303, "name": "id", "variant": "param", "kind": 32768, @@ -24655,7 +24833,7 @@ } }, { - "id": 42373, + "id": 1304, "name": "actionId", "variant": "param", "kind": 32768, @@ -24682,7 +24860,7 @@ } }, { - "id": 42374, + "id": 1305, "name": "body", "variant": "param", "kind": 32768, @@ -24706,7 +24884,7 @@ } }, { - "id": 42375, + "id": 1306, "name": "query", "variant": "param", "kind": 32768, @@ -24732,7 +24910,7 @@ } }, { - "id": 42376, + "id": 1307, "name": "headers", "variant": "param", "kind": 32768, @@ -24749,7 +24927,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -24779,21 +24957,21 @@ ] }, { - "id": 42377, + "id": 1308, "name": "removeAddedItem", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/order-edit.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/order-edit.ts", "line": 296, "character": 8 } ], "signatures": [ { - "id": 42378, + "id": 1309, "name": "removeAddedItem", "variant": "signature", "kind": 4096, @@ -24860,14 +25038,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/order-edit.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/order-edit.ts", "line": 296, "character": 8 } ], "parameters": [ { - "id": 42379, + "id": 1310, "name": "id", "variant": "param", "kind": 32768, @@ -24886,7 +25064,7 @@ } }, { - "id": 42380, + "id": 1311, "name": "actionId", "variant": "param", "kind": 32768, @@ -24913,7 +25091,7 @@ } }, { - "id": 42381, + "id": 1312, "name": "query", "variant": "param", "kind": 32768, @@ -24939,7 +25117,7 @@ } }, { - "id": 42382, + "id": 1313, "name": "headers", "variant": "param", "kind": 32768, @@ -24956,7 +25134,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -24990,46 +25168,46 @@ { "title": "Constructors", "children": [ - 42333 + 1264 ] }, { "title": "Properties", "children": [ - 42336 + 1267 ] }, { "title": "Methods", "children": [ - 42337, - 42342, - 42347, - 42352, - 42357, - 42363, - 42370, - 42377 + 1268, + 1273, + 1278, + 1283, + 1288, + 1294, + 1301, + 1308 ] } ], "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/order-edit.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/order-edit.ts", "line": 5, "character": 13 } ] }, { - "id": 42149, + "id": 1080, "name": "Order", "variant": "declaration", "kind": 128, "flags": {}, "children": [ { - "id": 42153, + "id": 1084, "name": "client", "variant": "declaration", "kind": 1024, @@ -25044,34 +25222,34 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/order.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/order.ts", "line": 17, "character": 10 } ], "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } }, { - "id": 42150, + "id": 1081, "name": "constructor", "variant": "declaration", "kind": 512, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/order.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/order.ts", "line": 21, "character": 2 } ], "signatures": [ { - "id": 42151, + "id": 1082, "name": "Order", "variant": "signature", "kind": 16384, @@ -25084,21 +25262,21 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/order.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/order.ts", "line": 21, "character": 2 } ], "parameters": [ { - "id": 42152, + "id": 1083, "name": "client", "variant": "param", "kind": 32768, "flags": {}, "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } @@ -25106,7 +25284,7 @@ ], "type": { "type": "reference", - "target": 42149, + "target": 1080, "name": "Order", "package": "@medusajs/js-sdk" } @@ -25114,21 +25292,21 @@ ] }, { - "id": 42154, + "id": 1085, "name": "retrieve", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/order.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/order.ts", "line": 58, "character": 8 } ], "signatures": [ { - "id": 42155, + "id": 1086, "name": "retrieve", "variant": "signature", "kind": 4096, @@ -25187,14 +25365,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/order.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/order.ts", "line": 58, "character": 8 } ], "parameters": [ { - "id": 42156, + "id": 1087, "name": "id", "variant": "param", "kind": 32768, @@ -25213,7 +25391,7 @@ } }, { - "id": 42157, + "id": 1088, "name": "query", "variant": "param", "kind": 32768, @@ -25239,7 +25417,7 @@ } }, { - "id": 42158, + "id": 1089, "name": "headers", "variant": "param", "kind": 32768, @@ -25256,7 +25434,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -25286,21 +25464,21 @@ ] }, { - "id": 42159, + "id": 1090, "name": "update", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/order.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/order.ts", "line": 94, "character": 8 } ], "signatures": [ { - "id": 42160, + "id": 1091, "name": "update", "variant": "signature", "kind": 4096, @@ -25335,14 +25513,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/order.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/order.ts", "line": 94, "character": 8 } ], "parameters": [ { - "id": 42161, + "id": 1092, "name": "id", "variant": "param", "kind": 32768, @@ -25361,7 +25539,7 @@ } }, { - "id": 42162, + "id": 1093, "name": "body", "variant": "param", "kind": 32768, @@ -25385,7 +25563,7 @@ } }, { - "id": 42163, + "id": 1094, "name": "headers", "variant": "param", "kind": 32768, @@ -25402,7 +25580,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -25432,21 +25610,21 @@ ] }, { - "id": 42164, + "id": 1095, "name": "retrievePreview", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/order.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/order.ts", "line": 124, "character": 8 } ], "signatures": [ { - "id": 42165, + "id": 1096, "name": "retrievePreview", "variant": "signature", "kind": 4096, @@ -25481,14 +25659,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/order.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/order.ts", "line": 124, "character": 8 } ], "parameters": [ { - "id": 42166, + "id": 1097, "name": "id", "variant": "param", "kind": 32768, @@ -25507,7 +25685,7 @@ } }, { - "id": 42167, + "id": 1098, "name": "query", "variant": "param", "kind": 32768, @@ -25533,7 +25711,7 @@ } }, { - "id": 42168, + "id": 1099, "name": "headers", "variant": "param", "kind": 32768, @@ -25550,7 +25728,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -25580,21 +25758,21 @@ ] }, { - "id": 42169, + "id": 1100, "name": "list", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/order.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/order.ts", "line": 184, "character": 8 } ], "signatures": [ { - "id": 42170, + "id": 1101, "name": "list", "variant": "signature", "kind": 4096, @@ -25685,14 +25863,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/order.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/order.ts", "line": 184, "character": 8 } ], "parameters": [ { - "id": 42171, + "id": 1102, "name": "queryParams", "variant": "param", "kind": 32768, @@ -25718,7 +25896,7 @@ } }, { - "id": 42172, + "id": 1103, "name": "headers", "variant": "param", "kind": 32768, @@ -25735,7 +25913,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -25765,21 +25943,21 @@ ] }, { - "id": 42173, + "id": 1104, "name": "cancel", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/order.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/order.ts", "line": 212, "character": 8 } ], "signatures": [ { - "id": 42174, + "id": 1105, "name": "cancel", "variant": "signature", "kind": 4096, @@ -25814,14 +25992,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/order.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/order.ts", "line": 212, "character": 8 } ], "parameters": [ { - "id": 42175, + "id": 1106, "name": "id", "variant": "param", "kind": 32768, @@ -25840,7 +26018,7 @@ } }, { - "id": 42176, + "id": 1107, "name": "headers", "variant": "param", "kind": 32768, @@ -25857,7 +26035,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -25887,21 +26065,21 @@ ] }, { - "id": 42177, + "id": 1108, "name": "requestTransfer", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/order.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/order.ts", "line": 241, "character": 8 } ], "signatures": [ { - "id": 42178, + "id": 1109, "name": "requestTransfer", "variant": "signature", "kind": 4096, @@ -25936,14 +26114,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/order.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/order.ts", "line": 241, "character": 8 } ], "parameters": [ { - "id": 42179, + "id": 1110, "name": "id", "variant": "param", "kind": 32768, @@ -25962,7 +26140,7 @@ } }, { - "id": 42180, + "id": 1111, "name": "body", "variant": "param", "kind": 32768, @@ -25986,7 +26164,7 @@ } }, { - "id": 42181, + "id": 1112, "name": "headers", "variant": "param", "kind": 32768, @@ -26003,7 +26181,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -26033,21 +26211,21 @@ ] }, { - "id": 42182, + "id": 1113, "name": "cancelTransfer", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/order.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/order.ts", "line": 271, "character": 8 } ], "signatures": [ { - "id": 42183, + "id": 1114, "name": "cancelTransfer", "variant": "signature", "kind": 4096, @@ -26082,14 +26260,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/order.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/order.ts", "line": 271, "character": 8 } ], "parameters": [ { - "id": 42184, + "id": 1115, "name": "id", "variant": "param", "kind": 32768, @@ -26108,7 +26286,7 @@ } }, { - "id": 42185, + "id": 1116, "name": "headers", "variant": "param", "kind": 32768, @@ -26125,7 +26303,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -26155,21 +26333,21 @@ ] }, { - "id": 42186, + "id": 1117, "name": "createFulfillment", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/order.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/order.ts", "line": 305, "character": 8 } ], "signatures": [ { - "id": 42187, + "id": 1118, "name": "createFulfillment", "variant": "signature", "kind": 4096, @@ -26204,14 +26382,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/order.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/order.ts", "line": 305, "character": 8 } ], "parameters": [ { - "id": 42188, + "id": 1119, "name": "id", "variant": "param", "kind": 32768, @@ -26230,7 +26408,7 @@ } }, { - "id": 42189, + "id": 1120, "name": "body", "variant": "param", "kind": 32768, @@ -26254,7 +26432,7 @@ } }, { - "id": 42190, + "id": 1121, "name": "query", "variant": "param", "kind": 32768, @@ -26280,7 +26458,7 @@ } }, { - "id": 42191, + "id": 1122, "name": "headers", "variant": "param", "kind": 32768, @@ -26297,7 +26475,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -26327,21 +26505,21 @@ ] }, { - "id": 42192, + "id": 1123, "name": "cancelFulfillment", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/order.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/order.ts", "line": 345, "character": 8 } ], "signatures": [ { - "id": 42193, + "id": 1124, "name": "cancelFulfillment", "variant": "signature", "kind": 4096, @@ -26376,14 +26554,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/order.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/order.ts", "line": 345, "character": 8 } ], "parameters": [ { - "id": 42194, + "id": 1125, "name": "id", "variant": "param", "kind": 32768, @@ -26402,7 +26580,7 @@ } }, { - "id": 42195, + "id": 1126, "name": "fulfillmentId", "variant": "param", "kind": 32768, @@ -26421,7 +26599,7 @@ } }, { - "id": 42196, + "id": 1127, "name": "body", "variant": "param", "kind": 32768, @@ -26445,7 +26623,7 @@ } }, { - "id": 42197, + "id": 1128, "name": "headers", "variant": "param", "kind": 32768, @@ -26462,7 +26640,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -26492,21 +26670,21 @@ ] }, { - "id": 42198, + "id": 1129, "name": "createShipment", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/order.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/order.ts", "line": 390, "character": 8 } ], "signatures": [ { - "id": 42199, + "id": 1130, "name": "createShipment", "variant": "signature", "kind": 4096, @@ -26541,14 +26719,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/order.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/order.ts", "line": 390, "character": 8 } ], "parameters": [ { - "id": 42200, + "id": 1131, "name": "id", "variant": "param", "kind": 32768, @@ -26567,7 +26745,7 @@ } }, { - "id": 42201, + "id": 1132, "name": "fulfillmentId", "variant": "param", "kind": 32768, @@ -26586,7 +26764,7 @@ } }, { - "id": 42202, + "id": 1133, "name": "body", "variant": "param", "kind": 32768, @@ -26610,7 +26788,7 @@ } }, { - "id": 42203, + "id": 1134, "name": "query", "variant": "param", "kind": 32768, @@ -26636,7 +26814,7 @@ } }, { - "id": 42204, + "id": 1135, "name": "headers", "variant": "param", "kind": 32768, @@ -26653,7 +26831,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -26683,21 +26861,21 @@ ] }, { - "id": 42205, + "id": 1136, "name": "markAsDelivered", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/order.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/order.ts", "line": 428, "character": 8 } ], "signatures": [ { - "id": 42206, + "id": 1137, "name": "markAsDelivered", "variant": "signature", "kind": 4096, @@ -26732,14 +26910,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/order.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/order.ts", "line": 428, "character": 8 } ], "parameters": [ { - "id": 42207, + "id": 1138, "name": "id", "variant": "param", "kind": 32768, @@ -26758,7 +26936,7 @@ } }, { - "id": 42208, + "id": 1139, "name": "fulfillmentId", "variant": "param", "kind": 32768, @@ -26777,7 +26955,7 @@ } }, { - "id": 42209, + "id": 1140, "name": "query", "variant": "param", "kind": 32768, @@ -26803,7 +26981,7 @@ } }, { - "id": 42210, + "id": 1141, "name": "headers", "variant": "param", "kind": 32768, @@ -26820,7 +26998,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -26850,21 +27028,21 @@ ] }, { - "id": 42211, + "id": 1142, "name": "listChanges", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/order.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/order.ts", "line": 461, "character": 8 } ], "signatures": [ { - "id": 42212, + "id": 1143, "name": "listChanges", "variant": "signature", "kind": 4096, @@ -26899,14 +27077,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/order.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/order.ts", "line": 461, "character": 8 } ], "parameters": [ { - "id": 42213, + "id": 1144, "name": "id", "variant": "param", "kind": 32768, @@ -26925,7 +27103,7 @@ } }, { - "id": 42214, + "id": 1145, "name": "queryParams", "variant": "param", "kind": 32768, @@ -26965,7 +27143,7 @@ } }, { - "id": 42215, + "id": 1146, "name": "headers", "variant": "param", "kind": 32768, @@ -26982,7 +27160,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -27023,21 +27201,21 @@ ] }, { - "id": 42216, + "id": 1147, "name": "listLineItems", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/order.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/order.ts", "line": 490, "character": 8 } ], "signatures": [ { - "id": 42217, + "id": 1148, "name": "listLineItems", "variant": "signature", "kind": 4096, @@ -27072,14 +27250,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/order.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/order.ts", "line": 490, "character": 8 } ], "parameters": [ { - "id": 42218, + "id": 1149, "name": "id", "variant": "param", "kind": 32768, @@ -27098,7 +27276,7 @@ } }, { - "id": 42219, + "id": 1150, "name": "queryParams", "variant": "param", "kind": 32768, @@ -27138,7 +27316,7 @@ } }, { - "id": 42220, + "id": 1151, "name": "headers", "variant": "param", "kind": 32768, @@ -27155,7 +27333,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -27185,21 +27363,21 @@ ] }, { - "id": 42221, + "id": 1152, "name": "createCreditLine", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/order.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/order.ts", "line": 527, "character": 8 } ], "signatures": [ { - "id": 42222, + "id": 1153, "name": "createCreditLine", "variant": "signature", "kind": 4096, @@ -27234,14 +27412,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/order.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/order.ts", "line": 527, "character": 8 } ], "parameters": [ { - "id": 42223, + "id": 1154, "name": "orderId", "variant": "param", "kind": 32768, @@ -27260,7 +27438,7 @@ } }, { - "id": 42224, + "id": 1155, "name": "body", "variant": "param", "kind": 32768, @@ -27299,7 +27477,7 @@ } }, { - "id": 42225, + "id": 1156, "name": "query", "variant": "param", "kind": 32768, @@ -27325,7 +27503,7 @@ } }, { - "id": 42226, + "id": 1157, "name": "headers", "variant": "param", "kind": 32768, @@ -27342,7 +27520,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -27376,52 +27554,52 @@ { "title": "Constructors", "children": [ - 42150 + 1081 ] }, { "title": "Properties", "children": [ - 42153 + 1084 ] }, { "title": "Methods", "children": [ - 42154, - 42159, - 42164, - 42169, - 42173, - 42177, - 42182, - 42186, - 42192, - 42198, - 42205, - 42211, - 42216, - 42221 + 1085, + 1090, + 1095, + 1100, + 1104, + 1108, + 1113, + 1117, + 1123, + 1129, + 1136, + 1142, + 1147, + 1152 ] } ], "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/order.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/order.ts", "line": 13, "character": 13 } ] }, { - "id": 42949, + "id": 1880, "name": "PaymentCollection", "variant": "declaration", "kind": 128, "flags": {}, "children": [ { - "id": 42953, + "id": 1884, "name": "client", "variant": "declaration", "kind": 1024, @@ -27436,34 +27614,34 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/payment-collection.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/payment-collection.ts", "line": 9, "character": 10 } ], "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } }, { - "id": 42950, + "id": 1881, "name": "constructor", "variant": "declaration", "kind": 512, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/payment-collection.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/payment-collection.ts", "line": 13, "character": 2 } ], "signatures": [ { - "id": 42951, + "id": 1882, "name": "PaymentCollection", "variant": "signature", "kind": 16384, @@ -27476,21 +27654,21 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/payment-collection.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/payment-collection.ts", "line": 13, "character": 2 } ], "parameters": [ { - "id": 42952, + "id": 1883, "name": "client", "variant": "param", "kind": 32768, "flags": {}, "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } @@ -27498,7 +27676,7 @@ ], "type": { "type": "reference", - "target": 42949, + "target": 1880, "name": "PaymentCollection", "package": "@medusajs/js-sdk" } @@ -27506,21 +27684,21 @@ ] }, { - "id": 42954, + "id": 1885, "name": "create", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/payment-collection.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/payment-collection.ts", "line": 35, "character": 8 } ], "signatures": [ { - "id": 42955, + "id": 1886, "name": "create", "variant": "signature", "kind": 4096, @@ -27555,14 +27733,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/payment-collection.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/payment-collection.ts", "line": 35, "character": 8 } ], "parameters": [ { - "id": 42956, + "id": 1887, "name": "body", "variant": "param", "kind": 32768, @@ -27586,7 +27764,7 @@ } }, { - "id": 42957, + "id": 1888, "name": "query", "variant": "param", "kind": 32768, @@ -27612,7 +27790,7 @@ } }, { - "id": 42958, + "id": 1889, "name": "headers", "variant": "param", "kind": 32768, @@ -27629,7 +27807,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -27659,21 +27837,21 @@ ] }, { - "id": 42959, + "id": 1890, "name": "delete", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/payment-collection.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/payment-collection.ts", "line": 66, "character": 8 } ], "signatures": [ { - "id": 42960, + "id": 1891, "name": "delete", "variant": "signature", "kind": 4096, @@ -27708,14 +27886,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/payment-collection.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/payment-collection.ts", "line": 66, "character": 8 } ], "parameters": [ { - "id": 42961, + "id": 1892, "name": "id", "variant": "param", "kind": 32768, @@ -27734,7 +27912,7 @@ } }, { - "id": 42962, + "id": 1893, "name": "headers", "variant": "param", "kind": 32768, @@ -27751,7 +27929,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -27781,21 +27959,21 @@ ] }, { - "id": 42963, + "id": 1894, "name": "markAsPaid", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/payment-collection.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/payment-collection.ts", "line": 98, "character": 8 } ], "signatures": [ { - "id": 42964, + "id": 1895, "name": "markAsPaid", "variant": "signature", "kind": 4096, @@ -27830,14 +28008,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/payment-collection.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/payment-collection.ts", "line": 98, "character": 8 } ], "parameters": [ { - "id": 42965, + "id": 1896, "name": "id", "variant": "param", "kind": 32768, @@ -27856,7 +28034,7 @@ } }, { - "id": 42966, + "id": 1897, "name": "body", "variant": "param", "kind": 32768, @@ -27880,7 +28058,7 @@ } }, { - "id": 42967, + "id": 1898, "name": "query", "variant": "param", "kind": 32768, @@ -27906,7 +28084,7 @@ } }, { - "id": 42968, + "id": 1899, "name": "headers", "variant": "param", "kind": 32768, @@ -27923,7 +28101,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -27957,41 +28135,41 @@ { "title": "Constructors", "children": [ - 42950 + 1881 ] }, { "title": "Properties", "children": [ - 42953 + 1884 ] }, { "title": "Methods", "children": [ - 42954, - 42959, - 42963 + 1885, + 1890, + 1894 ] } ], "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/payment-collection.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/payment-collection.ts", "line": 5, "character": 13 } ] }, { - "id": 42901, + "id": 1832, "name": "Payment", "variant": "declaration", "kind": 128, "flags": {}, "children": [ { - "id": 42905, + "id": 1836, "name": "client", "variant": "declaration", "kind": 1024, @@ -28006,34 +28184,34 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/payment.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/payment.ts", "line": 9, "character": 10 } ], "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } }, { - "id": 42902, + "id": 1833, "name": "constructor", "variant": "declaration", "kind": 512, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/payment.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/payment.ts", "line": 13, "character": 2 } ], "signatures": [ { - "id": 42903, + "id": 1834, "name": "Payment", "variant": "signature", "kind": 16384, @@ -28046,21 +28224,21 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/payment.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/payment.ts", "line": 13, "character": 2 } ], "parameters": [ { - "id": 42904, + "id": 1835, "name": "client", "variant": "param", "kind": 32768, "flags": {}, "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } @@ -28068,7 +28246,7 @@ ], "type": { "type": "reference", - "target": 42901, + "target": 1832, "name": "Payment", "package": "@medusajs/js-sdk" } @@ -28076,21 +28254,21 @@ ] }, { - "id": 42906, + "id": 1837, "name": "list", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/payment.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/payment.ts", "line": 63, "character": 8 } ], "signatures": [ { - "id": 42907, + "id": 1838, "name": "list", "variant": "signature", "kind": 4096, @@ -28181,14 +28359,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/payment.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/payment.ts", "line": 63, "character": 8 } ], "parameters": [ { - "id": 42908, + "id": 1839, "name": "query", "variant": "param", "kind": 32768, @@ -28214,7 +28392,7 @@ } }, { - "id": 42909, + "id": 1840, "name": "headers", "variant": "param", "kind": 32768, @@ -28231,7 +28409,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -28261,21 +28439,21 @@ ] }, { - "id": 42910, + "id": 1841, "name": "listPaymentProviders", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/payment.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/payment.ts", "line": 119, "character": 8 } ], "signatures": [ { - "id": 42911, + "id": 1842, "name": "listPaymentProviders", "variant": "signature", "kind": 4096, @@ -28366,14 +28544,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/payment.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/payment.ts", "line": 119, "character": 8 } ], "parameters": [ { - "id": 42912, + "id": 1843, "name": "query", "variant": "param", "kind": 32768, @@ -28399,7 +28577,7 @@ } }, { - "id": 42913, + "id": 1844, "name": "headers", "variant": "param", "kind": 32768, @@ -28416,7 +28594,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -28446,21 +28624,21 @@ ] }, { - "id": 42914, + "id": 1845, "name": "retrieve", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/payment.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/payment.ts", "line": 165, "character": 8 } ], "signatures": [ { - "id": 42915, + "id": 1846, "name": "retrieve", "variant": "signature", "kind": 4096, @@ -28519,14 +28697,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/payment.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/payment.ts", "line": 165, "character": 8 } ], "parameters": [ { - "id": 42916, + "id": 1847, "name": "id", "variant": "param", "kind": 32768, @@ -28545,7 +28723,7 @@ } }, { - "id": 42917, + "id": 1848, "name": "query", "variant": "param", "kind": 32768, @@ -28571,7 +28749,7 @@ } }, { - "id": 42918, + "id": 1849, "name": "headers", "variant": "param", "kind": 32768, @@ -28588,7 +28766,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -28618,21 +28796,21 @@ ] }, { - "id": 42919, + "id": 1850, "name": "capture", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/payment.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/payment.ts", "line": 197, "character": 8 } ], "signatures": [ { - "id": 42920, + "id": 1851, "name": "capture", "variant": "signature", "kind": 4096, @@ -28675,14 +28853,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/payment.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/payment.ts", "line": 197, "character": 8 } ], "parameters": [ { - "id": 42921, + "id": 1852, "name": "id", "variant": "param", "kind": 32768, @@ -28701,7 +28879,7 @@ } }, { - "id": 42922, + "id": 1853, "name": "body", "variant": "param", "kind": 32768, @@ -28725,7 +28903,7 @@ } }, { - "id": 42923, + "id": 1854, "name": "query", "variant": "param", "kind": 32768, @@ -28751,7 +28929,7 @@ } }, { - "id": 42924, + "id": 1855, "name": "headers", "variant": "param", "kind": 32768, @@ -28768,7 +28946,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -28798,21 +28976,21 @@ ] }, { - "id": 42925, + "id": 1856, "name": "refund", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/payment.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/payment.ts", "line": 232, "character": 8 } ], "signatures": [ { - "id": 42926, + "id": 1857, "name": "refund", "variant": "signature", "kind": 4096, @@ -28855,14 +29033,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/payment.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/payment.ts", "line": 232, "character": 8 } ], "parameters": [ { - "id": 42927, + "id": 1858, "name": "id", "variant": "param", "kind": 32768, @@ -28881,7 +29059,7 @@ } }, { - "id": 42928, + "id": 1859, "name": "body", "variant": "param", "kind": 32768, @@ -28905,7 +29083,7 @@ } }, { - "id": 42929, + "id": 1860, "name": "query", "variant": "param", "kind": 32768, @@ -28931,7 +29109,7 @@ } }, { - "id": 42930, + "id": 1861, "name": "headers", "variant": "param", "kind": 32768, @@ -28948,7 +29126,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -28982,43 +29160,43 @@ { "title": "Constructors", "children": [ - 42902 + 1833 ] }, { "title": "Properties", "children": [ - 42905 + 1836 ] }, { "title": "Methods", "children": [ - 42906, - 42910, - 42914, - 42919, - 42925 + 1837, + 1841, + 1845, + 1850, + 1856 ] } ], "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/payment.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/payment.ts", "line": 5, "character": 13 } ] }, { - "id": 43176, + "id": 2107, "name": "Plugin", "variant": "declaration", "kind": 128, "flags": {}, "children": [ { - "id": 43180, + "id": 2111, "name": "client", "variant": "declaration", "kind": 1024, @@ -29033,34 +29211,34 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/plugin.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/plugin.ts", "line": 9, "character": 10 } ], "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } }, { - "id": 43177, + "id": 2108, "name": "constructor", "variant": "declaration", "kind": 512, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/plugin.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/plugin.ts", "line": 14, "character": 2 } ], "signatures": [ { - "id": 43178, + "id": 2109, "name": "Plugin", "variant": "signature", "kind": 16384, @@ -29073,21 +29251,21 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/plugin.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/plugin.ts", "line": 14, "character": 2 } ], "parameters": [ { - "id": 43179, + "id": 2110, "name": "client", "variant": "param", "kind": 32768, "flags": {}, "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } @@ -29095,7 +29273,7 @@ ], "type": { "type": "reference", - "target": 43176, + "target": 2107, "name": "Plugin", "package": "@medusajs/js-sdk" } @@ -29103,21 +29281,21 @@ ] }, { - "id": 43181, + "id": 2112, "name": "list", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/plugin.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/plugin.ts", "line": 30, "character": 8 } ], "signatures": [ { - "id": 43182, + "id": 2113, "name": "list", "variant": "signature", "kind": 4096, @@ -29152,14 +29330,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/plugin.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/plugin.ts", "line": 30, "character": 8 } ], "parameters": [ { - "id": 43183, + "id": 2114, "name": "headers", "variant": "param", "kind": 32768, @@ -29176,7 +29354,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -29210,39 +29388,39 @@ { "title": "Constructors", "children": [ - 43177 + 2108 ] }, { "title": "Properties", "children": [ - 43180 + 2111 ] }, { "title": "Methods", "children": [ - 43181 + 2112 ] } ], "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/plugin.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/plugin.ts", "line": 5, "character": 13 } ] }, { - "id": 41562, + "id": 493, "name": "PriceList", "variant": "declaration", "kind": 128, "flags": {}, "children": [ { - "id": 41566, + "id": 497, "name": "client", "variant": "declaration", "kind": 1024, @@ -29257,34 +29435,34 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/price-list.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/price-list.ts", "line": 9, "character": 10 } ], "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } }, { - "id": 41563, + "id": 494, "name": "constructor", "variant": "declaration", "kind": 512, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/price-list.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/price-list.ts", "line": 14, "character": 2 } ], "signatures": [ { - "id": 41564, + "id": 495, "name": "PriceList", "variant": "signature", "kind": 16384, @@ -29297,21 +29475,21 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/price-list.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/price-list.ts", "line": 14, "character": 2 } ], "parameters": [ { - "id": 41565, + "id": 496, "name": "client", "variant": "param", "kind": 32768, "flags": {}, "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } @@ -29319,7 +29497,7 @@ ], "type": { "type": "reference", - "target": 41562, + "target": 493, "name": "PriceList", "package": "@medusajs/js-sdk" } @@ -29327,21 +29505,21 @@ ] }, { - "id": 41567, + "id": 498, "name": "retrieve", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/price-list.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/price-list.ts", "line": 51, "character": 8 } ], "signatures": [ { - "id": 41568, + "id": 499, "name": "retrieve", "variant": "signature", "kind": 4096, @@ -29400,14 +29578,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/price-list.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/price-list.ts", "line": 51, "character": 8 } ], "parameters": [ { - "id": 41569, + "id": 500, "name": "id", "variant": "param", "kind": 32768, @@ -29426,7 +29604,7 @@ } }, { - "id": 41570, + "id": 501, "name": "query", "variant": "param", "kind": 32768, @@ -29452,7 +29630,7 @@ } }, { - "id": 41571, + "id": 502, "name": "headers", "variant": "param", "kind": 32768, @@ -29469,7 +29647,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -29499,21 +29677,21 @@ ] }, { - "id": 41572, + "id": 503, "name": "list", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/price-list.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/price-list.ts", "line": 112, "character": 8 } ], "signatures": [ { - "id": 41573, + "id": 504, "name": "list", "variant": "signature", "kind": 4096, @@ -29604,14 +29782,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/price-list.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/price-list.ts", "line": 112, "character": 8 } ], "parameters": [ { - "id": 41574, + "id": 505, "name": "query", "variant": "param", "kind": 32768, @@ -29637,7 +29815,7 @@ } }, { - "id": 41575, + "id": 506, "name": "headers", "variant": "param", "kind": 32768, @@ -29654,7 +29832,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -29684,21 +29862,21 @@ ] }, { - "id": 41576, + "id": 507, "name": "create", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/price-list.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/price-list.ts", "line": 156, "character": 8 } ], "signatures": [ { - "id": 41577, + "id": 508, "name": "create", "variant": "signature", "kind": 4096, @@ -29733,14 +29911,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/price-list.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/price-list.ts", "line": 156, "character": 8 } ], "parameters": [ { - "id": 41578, + "id": 509, "name": "body", "variant": "param", "kind": 32768, @@ -29764,7 +29942,7 @@ } }, { - "id": 41579, + "id": 510, "name": "query", "variant": "param", "kind": 32768, @@ -29790,7 +29968,7 @@ } }, { - "id": 41580, + "id": 511, "name": "headers", "variant": "param", "kind": 32768, @@ -29807,7 +29985,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -29837,21 +30015,21 @@ ] }, { - "id": 41581, + "id": 512, "name": "update", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/price-list.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/price-list.ts", "line": 191, "character": 8 } ], "signatures": [ { - "id": 41582, + "id": 513, "name": "update", "variant": "signature", "kind": 4096, @@ -29886,14 +30064,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/price-list.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/price-list.ts", "line": 191, "character": 8 } ], "parameters": [ { - "id": 41583, + "id": 514, "name": "id", "variant": "param", "kind": 32768, @@ -29912,7 +30090,7 @@ } }, { - "id": 41584, + "id": 515, "name": "body", "variant": "param", "kind": 32768, @@ -29936,7 +30114,7 @@ } }, { - "id": 41585, + "id": 516, "name": "query", "variant": "param", "kind": 32768, @@ -29962,7 +30140,7 @@ } }, { - "id": 41586, + "id": 517, "name": "headers", "variant": "param", "kind": 32768, @@ -29979,7 +30157,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -30009,21 +30187,21 @@ ] }, { - "id": 41587, + "id": 518, "name": "delete", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/price-list.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/price-list.ts", "line": 223, "character": 8 } ], "signatures": [ { - "id": 41588, + "id": 519, "name": "delete", "variant": "signature", "kind": 4096, @@ -30058,14 +30236,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/price-list.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/price-list.ts", "line": 223, "character": 8 } ], "parameters": [ { - "id": 41589, + "id": 520, "name": "id", "variant": "param", "kind": 32768, @@ -30084,7 +30262,7 @@ } }, { - "id": 41590, + "id": 521, "name": "headers", "variant": "param", "kind": 32768, @@ -30101,7 +30279,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -30131,21 +30309,21 @@ ] }, { - "id": 41591, + "id": 522, "name": "batchPrices", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/price-list.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/price-list.ts", "line": 265, "character": 8 } ], "signatures": [ { - "id": 41592, + "id": 523, "name": "batchPrices", "variant": "signature", "kind": 4096, @@ -30180,14 +30358,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/price-list.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/price-list.ts", "line": 265, "character": 8 } ], "parameters": [ { - "id": 41593, + "id": 524, "name": "id", "variant": "param", "kind": 32768, @@ -30206,7 +30384,7 @@ } }, { - "id": 41594, + "id": 525, "name": "body", "variant": "param", "kind": 32768, @@ -30230,7 +30408,7 @@ } }, { - "id": 41595, + "id": 526, "name": "query", "variant": "param", "kind": 32768, @@ -30256,7 +30434,7 @@ } }, { - "id": 41596, + "id": 527, "name": "headers", "variant": "param", "kind": 32768, @@ -30273,7 +30451,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -30303,21 +30481,21 @@ ] }, { - "id": 41597, + "id": 528, "name": "linkProducts", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/price-list.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/price-list.ts", "line": 301, "character": 8 } ], "signatures": [ { - "id": 41598, + "id": 529, "name": "linkProducts", "variant": "signature", "kind": 4096, @@ -30352,14 +30530,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/price-list.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/price-list.ts", "line": 301, "character": 8 } ], "parameters": [ { - "id": 41599, + "id": 530, "name": "id", "variant": "param", "kind": 32768, @@ -30378,7 +30556,7 @@ } }, { - "id": 41600, + "id": 531, "name": "body", "variant": "param", "kind": 32768, @@ -30402,7 +30580,7 @@ } }, { - "id": 41601, + "id": 532, "name": "query", "variant": "param", "kind": 32768, @@ -30428,7 +30606,7 @@ } }, { - "id": 41602, + "id": 533, "name": "headers", "variant": "param", "kind": 32768, @@ -30445,7 +30623,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -30479,45 +30657,45 @@ { "title": "Constructors", "children": [ - 41563 + 494 ] }, { "title": "Properties", "children": [ - 41566 + 497 ] }, { "title": "Methods", "children": [ - 41567, - 41572, - 41576, - 41581, - 41587, - 41591, - 41597 + 498, + 503, + 507, + 512, + 518, + 522, + 528 ] } ], "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/price-list.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/price-list.ts", "line": 5, "character": 13 } ] }, { - "id": 41603, + "id": 534, "name": "PricePreference", "variant": "declaration", "kind": 128, "flags": {}, "children": [ { - "id": 41607, + "id": 538, "name": "client", "variant": "declaration", "kind": 1024, @@ -30532,34 +30710,34 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/price-preference.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/price-preference.ts", "line": 9, "character": 10 } ], "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } }, { - "id": 41604, + "id": 535, "name": "constructor", "variant": "declaration", "kind": 512, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/price-preference.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/price-preference.ts", "line": 14, "character": 2 } ], "signatures": [ { - "id": 41605, + "id": 536, "name": "PricePreference", "variant": "signature", "kind": 16384, @@ -30572,21 +30750,21 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/price-preference.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/price-preference.ts", "line": 14, "character": 2 } ], "parameters": [ { - "id": 41606, + "id": 537, "name": "client", "variant": "param", "kind": 32768, "flags": {}, "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } @@ -30594,7 +30772,7 @@ ], "type": { "type": "reference", - "target": 41603, + "target": 534, "name": "PricePreference", "package": "@medusajs/js-sdk" } @@ -30602,21 +30780,21 @@ ] }, { - "id": 41608, + "id": 539, "name": "retrieve", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/price-preference.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/price-preference.ts", "line": 51, "character": 8 } ], "signatures": [ { - "id": 41609, + "id": 540, "name": "retrieve", "variant": "signature", "kind": 4096, @@ -30675,14 +30853,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/price-preference.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/price-preference.ts", "line": 51, "character": 8 } ], "parameters": [ { - "id": 41610, + "id": 541, "name": "id", "variant": "param", "kind": 32768, @@ -30701,7 +30879,7 @@ } }, { - "id": 41611, + "id": 542, "name": "query", "variant": "param", "kind": 32768, @@ -30727,7 +30905,7 @@ } }, { - "id": 41612, + "id": 543, "name": "headers", "variant": "param", "kind": 32768, @@ -30744,7 +30922,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -30774,21 +30952,21 @@ ] }, { - "id": 41613, + "id": 544, "name": "list", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/price-preference.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/price-preference.ts", "line": 112, "character": 8 } ], "signatures": [ { - "id": 41614, + "id": 545, "name": "list", "variant": "signature", "kind": 4096, @@ -30879,14 +31057,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/price-preference.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/price-preference.ts", "line": 112, "character": 8 } ], "parameters": [ { - "id": 41615, + "id": 546, "name": "query", "variant": "param", "kind": 32768, @@ -30912,7 +31090,7 @@ } }, { - "id": 41616, + "id": 547, "name": "headers", "variant": "param", "kind": 32768, @@ -30929,7 +31107,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -30959,21 +31137,21 @@ ] }, { - "id": 41617, + "id": 548, "name": "create", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/price-preference.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/price-preference.ts", "line": 146, "character": 8 } ], "signatures": [ { - "id": 41618, + "id": 549, "name": "create", "variant": "signature", "kind": 4096, @@ -31008,14 +31186,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/price-preference.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/price-preference.ts", "line": 146, "character": 8 } ], "parameters": [ { - "id": 41619, + "id": 550, "name": "body", "variant": "param", "kind": 32768, @@ -31039,7 +31217,7 @@ } }, { - "id": 41620, + "id": 551, "name": "query", "variant": "param", "kind": 32768, @@ -31065,7 +31243,7 @@ } }, { - "id": 41621, + "id": 552, "name": "headers", "variant": "param", "kind": 32768, @@ -31082,7 +31260,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -31112,21 +31290,21 @@ ] }, { - "id": 41622, + "id": 553, "name": "update", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/price-preference.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/price-preference.ts", "line": 181, "character": 8 } ], "signatures": [ { - "id": 41623, + "id": 554, "name": "update", "variant": "signature", "kind": 4096, @@ -31161,14 +31339,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/price-preference.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/price-preference.ts", "line": 181, "character": 8 } ], "parameters": [ { - "id": 41624, + "id": 555, "name": "id", "variant": "param", "kind": 32768, @@ -31187,7 +31365,7 @@ } }, { - "id": 41625, + "id": 556, "name": "body", "variant": "param", "kind": 32768, @@ -31211,7 +31389,7 @@ } }, { - "id": 41626, + "id": 557, "name": "query", "variant": "param", "kind": 32768, @@ -31237,7 +31415,7 @@ } }, { - "id": 41627, + "id": 558, "name": "headers", "variant": "param", "kind": 32768, @@ -31254,7 +31432,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -31284,21 +31462,21 @@ ] }, { - "id": 41628, + "id": 559, "name": "delete", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/price-preference.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/price-preference.ts", "line": 213, "character": 8 } ], "signatures": [ { - "id": 41629, + "id": 560, "name": "delete", "variant": "signature", "kind": 4096, @@ -31333,14 +31511,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/price-preference.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/price-preference.ts", "line": 213, "character": 8 } ], "parameters": [ { - "id": 41630, + "id": 561, "name": "id", "variant": "param", "kind": 32768, @@ -31359,7 +31537,7 @@ } }, { - "id": 41631, + "id": 562, "name": "headers", "variant": "param", "kind": 32768, @@ -31376,7 +31554,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -31410,43 +31588,43 @@ { "title": "Constructors", "children": [ - 41604 + 535 ] }, { "title": "Properties", "children": [ - 41607 + 538 ] }, { "title": "Methods", "children": [ - 41608, - 41613, - 41617, - 41622, - 41628 + 539, + 544, + 548, + 553, + 559 ] } ], "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/price-preference.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/price-preference.ts", "line": 5, "character": 13 } ] }, { - "id": 41527, + "id": 458, "name": "ProductCategory", "variant": "declaration", "kind": 128, "flags": {}, "children": [ { - "id": 41531, + "id": 462, "name": "client", "variant": "declaration", "kind": 1024, @@ -31461,34 +31639,34 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product-category.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product-category.ts", "line": 9, "character": 10 } ], "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } }, { - "id": 41528, + "id": 459, "name": "constructor", "variant": "declaration", "kind": 512, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product-category.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product-category.ts", "line": 13, "character": 2 } ], "signatures": [ { - "id": 41529, + "id": 460, "name": "ProductCategory", "variant": "signature", "kind": 16384, @@ -31501,21 +31679,21 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product-category.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product-category.ts", "line": 13, "character": 2 } ], "parameters": [ { - "id": 41530, + "id": 461, "name": "client", "variant": "param", "kind": 32768, "flags": {}, "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } @@ -31523,7 +31701,7 @@ ], "type": { "type": "reference", - "target": 41527, + "target": 458, "name": "ProductCategory", "package": "@medusajs/js-sdk" } @@ -31531,21 +31709,21 @@ ] }, { - "id": 41532, + "id": 463, "name": "create", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product-category.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product-category.ts", "line": 35, "character": 8 } ], "signatures": [ { - "id": 41533, + "id": 464, "name": "create", "variant": "signature", "kind": 4096, @@ -31580,14 +31758,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product-category.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product-category.ts", "line": 35, "character": 8 } ], "parameters": [ { - "id": 41534, + "id": 465, "name": "body", "variant": "param", "kind": 32768, @@ -31611,7 +31789,7 @@ } }, { - "id": 41535, + "id": 466, "name": "query", "variant": "param", "kind": 32768, @@ -31637,7 +31815,7 @@ } }, { - "id": 41536, + "id": 467, "name": "headers", "variant": "param", "kind": 32768, @@ -31654,7 +31832,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -31684,21 +31862,21 @@ ] }, { - "id": 41537, + "id": 468, "name": "update", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product-category.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product-category.ts", "line": 70, "character": 8 } ], "signatures": [ { - "id": 41538, + "id": 469, "name": "update", "variant": "signature", "kind": 4096, @@ -31733,14 +31911,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product-category.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product-category.ts", "line": 70, "character": 8 } ], "parameters": [ { - "id": 41539, + "id": 470, "name": "id", "variant": "param", "kind": 32768, @@ -31759,7 +31937,7 @@ } }, { - "id": 41540, + "id": 471, "name": "body", "variant": "param", "kind": 32768, @@ -31783,7 +31961,7 @@ } }, { - "id": 41541, + "id": 472, "name": "query", "variant": "param", "kind": 32768, @@ -31809,7 +31987,7 @@ } }, { - "id": 41542, + "id": 473, "name": "headers", "variant": "param", "kind": 32768, @@ -31826,7 +32004,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -31856,21 +32034,21 @@ ] }, { - "id": 41543, + "id": 474, "name": "list", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product-category.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product-category.ts", "line": 133, "character": 8 } ], "signatures": [ { - "id": 41544, + "id": 475, "name": "list", "variant": "signature", "kind": 4096, @@ -31961,14 +32139,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product-category.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product-category.ts", "line": 133, "character": 8 } ], "parameters": [ { - "id": 41545, + "id": 476, "name": "query", "variant": "param", "kind": 32768, @@ -31994,7 +32172,7 @@ } }, { - "id": 41546, + "id": 477, "name": "headers", "variant": "param", "kind": 32768, @@ -32011,7 +32189,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -32041,21 +32219,21 @@ ] }, { - "id": 41547, + "id": 478, "name": "retrieve", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product-category.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product-category.ts", "line": 178, "character": 8 } ], "signatures": [ { - "id": 41548, + "id": 479, "name": "retrieve", "variant": "signature", "kind": 4096, @@ -32114,14 +32292,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product-category.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product-category.ts", "line": 178, "character": 8 } ], "parameters": [ { - "id": 41549, + "id": 480, "name": "id", "variant": "param", "kind": 32768, @@ -32140,7 +32318,7 @@ } }, { - "id": 41550, + "id": 481, "name": "query", "variant": "param", "kind": 32768, @@ -32166,7 +32344,7 @@ } }, { - "id": 41551, + "id": 482, "name": "headers", "variant": "param", "kind": 32768, @@ -32183,7 +32361,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -32213,21 +32391,21 @@ ] }, { - "id": 41552, + "id": 483, "name": "delete", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product-category.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product-category.ts", "line": 207, "character": 8 } ], "signatures": [ { - "id": 41553, + "id": 484, "name": "delete", "variant": "signature", "kind": 4096, @@ -32262,14 +32440,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product-category.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product-category.ts", "line": 207, "character": 8 } ], "parameters": [ { - "id": 41554, + "id": 485, "name": "id", "variant": "param", "kind": 32768, @@ -32288,7 +32466,7 @@ } }, { - "id": 41555, + "id": 486, "name": "headers", "variant": "param", "kind": 32768, @@ -32305,7 +32483,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -32335,21 +32513,21 @@ ] }, { - "id": 41556, + "id": 487, "name": "updateProducts", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product-category.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product-category.ts", "line": 237, "character": 8 } ], "signatures": [ { - "id": 41557, + "id": 488, "name": "updateProducts", "variant": "signature", "kind": 4096, @@ -32384,14 +32562,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product-category.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product-category.ts", "line": 237, "character": 8 } ], "parameters": [ { - "id": 41558, + "id": 489, "name": "id", "variant": "param", "kind": 32768, @@ -32410,7 +32588,7 @@ } }, { - "id": 41559, + "id": 490, "name": "body", "variant": "param", "kind": 32768, @@ -32434,7 +32612,7 @@ } }, { - "id": 41560, + "id": 491, "name": "query", "variant": "param", "kind": 32768, @@ -32460,7 +32638,7 @@ } }, { - "id": 41561, + "id": 492, "name": "headers", "variant": "param", "kind": 32768, @@ -32477,7 +32655,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -32511,44 +32689,44 @@ { "title": "Constructors", "children": [ - 41528 + 459 ] }, { "title": "Properties", "children": [ - 41531 + 462 ] }, { "title": "Methods", "children": [ - 41532, - 41537, - 41543, - 41547, - 41552, - 41556 + 463, + 468, + 474, + 478, + 483, + 487 ] } ], "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product-category.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product-category.ts", "line": 5, "character": 13 } ] }, { - "id": 41493, + "id": 424, "name": "ProductCollection", "variant": "declaration", "kind": 128, "flags": {}, "children": [ { - "id": 41497, + "id": 428, "name": "client", "variant": "declaration", "kind": 1024, @@ -32563,34 +32741,34 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product-collection.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product-collection.ts", "line": 9, "character": 10 } ], "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } }, { - "id": 41494, + "id": 425, "name": "constructor", "variant": "declaration", "kind": 512, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product-collection.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product-collection.ts", "line": 13, "character": 2 } ], "signatures": [ { - "id": 41495, + "id": 426, "name": "ProductCollection", "variant": "signature", "kind": 16384, @@ -32603,21 +32781,21 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product-collection.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product-collection.ts", "line": 13, "character": 2 } ], "parameters": [ { - "id": 41496, + "id": 427, "name": "client", "variant": "param", "kind": 32768, "flags": {}, "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } @@ -32625,7 +32803,7 @@ ], "type": { "type": "reference", - "target": 41493, + "target": 424, "name": "ProductCollection", "package": "@medusajs/js-sdk" } @@ -32633,21 +32811,21 @@ ] }, { - "id": 41498, + "id": 429, "name": "create", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product-collection.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product-collection.ts", "line": 35, "character": 8 } ], "signatures": [ { - "id": 41499, + "id": 430, "name": "create", "variant": "signature", "kind": 4096, @@ -32682,14 +32860,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product-collection.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product-collection.ts", "line": 35, "character": 8 } ], "parameters": [ { - "id": 41500, + "id": 431, "name": "body", "variant": "param", "kind": 32768, @@ -32713,7 +32891,7 @@ } }, { - "id": 41501, + "id": 432, "name": "query", "variant": "param", "kind": 32768, @@ -32739,7 +32917,7 @@ } }, { - "id": 41502, + "id": 433, "name": "headers", "variant": "param", "kind": 32768, @@ -32756,7 +32934,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -32786,21 +32964,21 @@ ] }, { - "id": 41503, + "id": 434, "name": "update", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product-collection.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product-collection.ts", "line": 70, "character": 8 } ], "signatures": [ { - "id": 41504, + "id": 435, "name": "update", "variant": "signature", "kind": 4096, @@ -32835,14 +33013,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product-collection.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product-collection.ts", "line": 70, "character": 8 } ], "parameters": [ { - "id": 41505, + "id": 436, "name": "id", "variant": "param", "kind": 32768, @@ -32861,7 +33039,7 @@ } }, { - "id": 41506, + "id": 437, "name": "body", "variant": "param", "kind": 32768, @@ -32885,7 +33063,7 @@ } }, { - "id": 41507, + "id": 438, "name": "query", "variant": "param", "kind": 32768, @@ -32911,7 +33089,7 @@ } }, { - "id": 41508, + "id": 439, "name": "headers", "variant": "param", "kind": 32768, @@ -32928,7 +33106,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -32958,21 +33136,21 @@ ] }, { - "id": 41509, + "id": 440, "name": "list", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product-collection.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product-collection.ts", "line": 133, "character": 8 } ], "signatures": [ { - "id": 41510, + "id": 441, "name": "list", "variant": "signature", "kind": 4096, @@ -33063,14 +33241,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product-collection.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product-collection.ts", "line": 133, "character": 8 } ], "parameters": [ { - "id": 41511, + "id": 442, "name": "queryParams", "variant": "param", "kind": 32768, @@ -33096,7 +33274,7 @@ } }, { - "id": 41512, + "id": 443, "name": "headers", "variant": "param", "kind": 32768, @@ -33113,7 +33291,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -33143,21 +33321,21 @@ ] }, { - "id": 41513, + "id": 444, "name": "retrieve", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product-collection.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product-collection.ts", "line": 178, "character": 8 } ], "signatures": [ { - "id": 41514, + "id": 445, "name": "retrieve", "variant": "signature", "kind": 4096, @@ -33216,14 +33394,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product-collection.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product-collection.ts", "line": 178, "character": 8 } ], "parameters": [ { - "id": 41515, + "id": 446, "name": "id", "variant": "param", "kind": 32768, @@ -33242,7 +33420,7 @@ } }, { - "id": 41516, + "id": 447, "name": "query", "variant": "param", "kind": 32768, @@ -33268,7 +33446,7 @@ } }, { - "id": 41517, + "id": 448, "name": "headers", "variant": "param", "kind": 32768, @@ -33285,7 +33463,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -33315,21 +33493,21 @@ ] }, { - "id": 41518, + "id": 449, "name": "delete", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product-collection.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product-collection.ts", "line": 207, "character": 8 } ], "signatures": [ { - "id": 41519, + "id": 450, "name": "delete", "variant": "signature", "kind": 4096, @@ -33364,14 +33542,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product-collection.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product-collection.ts", "line": 207, "character": 8 } ], "parameters": [ { - "id": 41520, + "id": 451, "name": "id", "variant": "param", "kind": 32768, @@ -33390,7 +33568,7 @@ } }, { - "id": 41521, + "id": 452, "name": "headers", "variant": "param", "kind": 32768, @@ -33407,7 +33585,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -33437,21 +33615,21 @@ ] }, { - "id": 41522, + "id": 453, "name": "updateProducts", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product-collection.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product-collection.ts", "line": 236, "character": 8 } ], "signatures": [ { - "id": 41523, + "id": 454, "name": "updateProducts", "variant": "signature", "kind": 4096, @@ -33486,14 +33664,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product-collection.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product-collection.ts", "line": 236, "character": 8 } ], "parameters": [ { - "id": 41524, + "id": 455, "name": "id", "variant": "param", "kind": 32768, @@ -33512,7 +33690,7 @@ } }, { - "id": 41525, + "id": 456, "name": "body", "variant": "param", "kind": 32768, @@ -33536,7 +33714,7 @@ } }, { - "id": 41526, + "id": 457, "name": "headers", "variant": "param", "kind": 32768, @@ -33553,7 +33731,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -33587,44 +33765,44 @@ { "title": "Constructors", "children": [ - 41494 + 425 ] }, { "title": "Properties", "children": [ - 41497 + 428 ] }, { "title": "Methods", "children": [ - 41498, - 41503, - 41509, - 41513, - 41518, - 41522 + 429, + 434, + 440, + 444, + 449, + 453 ] } ], "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product-collection.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product-collection.ts", "line": 5, "character": 13 } ] }, { - "id": 42830, + "id": 1761, "name": "ProductTag", "variant": "declaration", "kind": 128, "flags": {}, "children": [ { - "id": 42834, + "id": 1765, "name": "client", "variant": "declaration", "kind": 1024, @@ -33639,34 +33817,34 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product-tag.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product-tag.ts", "line": 9, "character": 10 } ], "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } }, { - "id": 42831, + "id": 1762, "name": "constructor", "variant": "declaration", "kind": 512, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product-tag.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product-tag.ts", "line": 13, "character": 2 } ], "signatures": [ { - "id": 42832, + "id": 1763, "name": "ProductTag", "variant": "signature", "kind": 16384, @@ -33679,21 +33857,21 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product-tag.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product-tag.ts", "line": 13, "character": 2 } ], "parameters": [ { - "id": 42833, + "id": 1764, "name": "client", "variant": "param", "kind": 32768, "flags": {}, "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } @@ -33701,7 +33879,7 @@ ], "type": { "type": "reference", - "target": 42830, + "target": 1761, "name": "ProductTag", "package": "@medusajs/js-sdk" } @@ -33709,21 +33887,21 @@ ] }, { - "id": 42835, + "id": 1766, "name": "create", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product-tag.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product-tag.ts", "line": 35, "character": 8 } ], "signatures": [ { - "id": 42836, + "id": 1767, "name": "create", "variant": "signature", "kind": 4096, @@ -33758,14 +33936,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product-tag.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product-tag.ts", "line": 35, "character": 8 } ], "parameters": [ { - "id": 42837, + "id": 1768, "name": "body", "variant": "param", "kind": 32768, @@ -33789,7 +33967,7 @@ } }, { - "id": 42838, + "id": 1769, "name": "query", "variant": "param", "kind": 32768, @@ -33815,7 +33993,7 @@ } }, { - "id": 42839, + "id": 1770, "name": "headers", "variant": "param", "kind": 32768, @@ -33832,7 +34010,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -33862,21 +34040,21 @@ ] }, { - "id": 42840, + "id": 1771, "name": "update", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product-tag.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product-tag.ts", "line": 70, "character": 8 } ], "signatures": [ { - "id": 42841, + "id": 1772, "name": "update", "variant": "signature", "kind": 4096, @@ -33911,14 +34089,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product-tag.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product-tag.ts", "line": 70, "character": 8 } ], "parameters": [ { - "id": 42842, + "id": 1773, "name": "id", "variant": "param", "kind": 32768, @@ -33937,7 +34115,7 @@ } }, { - "id": 42843, + "id": 1774, "name": "body", "variant": "param", "kind": 32768, @@ -33961,7 +34139,7 @@ } }, { - "id": 42844, + "id": 1775, "name": "query", "variant": "param", "kind": 32768, @@ -33987,7 +34165,7 @@ } }, { - "id": 42845, + "id": 1776, "name": "headers", "variant": "param", "kind": 32768, @@ -34004,7 +34182,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -34034,21 +34212,21 @@ ] }, { - "id": 42846, + "id": 1777, "name": "list", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product-tag.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product-tag.ts", "line": 133, "character": 8 } ], "signatures": [ { - "id": 42847, + "id": 1778, "name": "list", "variant": "signature", "kind": 4096, @@ -34139,14 +34317,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product-tag.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product-tag.ts", "line": 133, "character": 8 } ], "parameters": [ { - "id": 42848, + "id": 1779, "name": "query", "variant": "param", "kind": 32768, @@ -34172,7 +34350,7 @@ } }, { - "id": 42849, + "id": 1780, "name": "headers", "variant": "param", "kind": 32768, @@ -34189,7 +34367,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -34219,21 +34397,21 @@ ] }, { - "id": 42850, + "id": 1781, "name": "retrieve", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product-tag.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product-tag.ts", "line": 178, "character": 8 } ], "signatures": [ { - "id": 42851, + "id": 1782, "name": "retrieve", "variant": "signature", "kind": 4096, @@ -34292,14 +34470,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product-tag.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product-tag.ts", "line": 178, "character": 8 } ], "parameters": [ { - "id": 42852, + "id": 1783, "name": "id", "variant": "param", "kind": 32768, @@ -34318,7 +34496,7 @@ } }, { - "id": 42853, + "id": 1784, "name": "query", "variant": "param", "kind": 32768, @@ -34344,7 +34522,7 @@ } }, { - "id": 42854, + "id": 1785, "name": "headers", "variant": "param", "kind": 32768, @@ -34361,7 +34539,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -34391,21 +34569,21 @@ ] }, { - "id": 42855, + "id": 1786, "name": "delete", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product-tag.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product-tag.ts", "line": 207, "character": 8 } ], "signatures": [ { - "id": 42856, + "id": 1787, "name": "delete", "variant": "signature", "kind": 4096, @@ -34440,14 +34618,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product-tag.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product-tag.ts", "line": 207, "character": 8 } ], "parameters": [ { - "id": 42857, + "id": 1788, "name": "id", "variant": "param", "kind": 32768, @@ -34466,7 +34644,7 @@ } }, { - "id": 42858, + "id": 1789, "name": "headers", "variant": "param", "kind": 32768, @@ -34483,7 +34661,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -34517,43 +34695,43 @@ { "title": "Constructors", "children": [ - 42831 + 1762 ] }, { "title": "Properties", "children": [ - 42834 + 1765 ] }, { "title": "Methods", "children": [ - 42835, - 42840, - 42846, - 42850, - 42855 + 1766, + 1771, + 1777, + 1781, + 1786 ] } ], "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product-tag.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product-tag.ts", "line": 5, "character": 13 } ] }, { - "id": 41754, + "id": 685, "name": "ProductType", "variant": "declaration", "kind": 128, "flags": {}, "children": [ { - "id": 41758, + "id": 689, "name": "client", "variant": "declaration", "kind": 1024, @@ -34568,34 +34746,34 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product-type.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product-type.ts", "line": 9, "character": 10 } ], "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } }, { - "id": 41755, + "id": 686, "name": "constructor", "variant": "declaration", "kind": 512, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product-type.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product-type.ts", "line": 13, "character": 2 } ], "signatures": [ { - "id": 41756, + "id": 687, "name": "ProductType", "variant": "signature", "kind": 16384, @@ -34608,21 +34786,21 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product-type.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product-type.ts", "line": 13, "character": 2 } ], "parameters": [ { - "id": 41757, + "id": 688, "name": "client", "variant": "param", "kind": 32768, "flags": {}, "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } @@ -34630,7 +34808,7 @@ ], "type": { "type": "reference", - "target": 41754, + "target": 685, "name": "ProductType", "package": "@medusajs/js-sdk" } @@ -34638,21 +34816,21 @@ ] }, { - "id": 41759, + "id": 690, "name": "create", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product-type.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product-type.ts", "line": 35, "character": 8 } ], "signatures": [ { - "id": 41760, + "id": 691, "name": "create", "variant": "signature", "kind": 4096, @@ -34687,14 +34865,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product-type.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product-type.ts", "line": 35, "character": 8 } ], "parameters": [ { - "id": 41761, + "id": 692, "name": "body", "variant": "param", "kind": 32768, @@ -34718,7 +34896,7 @@ } }, { - "id": 41762, + "id": 693, "name": "query", "variant": "param", "kind": 32768, @@ -34744,7 +34922,7 @@ } }, { - "id": 41763, + "id": 694, "name": "headers", "variant": "param", "kind": 32768, @@ -34761,7 +34939,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -34791,21 +34969,21 @@ ] }, { - "id": 41764, + "id": 695, "name": "update", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product-type.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product-type.ts", "line": 70, "character": 8 } ], "signatures": [ { - "id": 41765, + "id": 696, "name": "update", "variant": "signature", "kind": 4096, @@ -34840,14 +35018,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product-type.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product-type.ts", "line": 70, "character": 8 } ], "parameters": [ { - "id": 41766, + "id": 697, "name": "id", "variant": "param", "kind": 32768, @@ -34866,7 +35044,7 @@ } }, { - "id": 41767, + "id": 698, "name": "body", "variant": "param", "kind": 32768, @@ -34890,7 +35068,7 @@ } }, { - "id": 41768, + "id": 699, "name": "query", "variant": "param", "kind": 32768, @@ -34916,7 +35094,7 @@ } }, { - "id": 41769, + "id": 700, "name": "headers", "variant": "param", "kind": 32768, @@ -34933,7 +35111,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -34963,21 +35141,21 @@ ] }, { - "id": 41770, + "id": 701, "name": "list", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product-type.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product-type.ts", "line": 133, "character": 8 } ], "signatures": [ { - "id": 41771, + "id": 702, "name": "list", "variant": "signature", "kind": 4096, @@ -35068,14 +35246,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product-type.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product-type.ts", "line": 133, "character": 8 } ], "parameters": [ { - "id": 41772, + "id": 703, "name": "query", "variant": "param", "kind": 32768, @@ -35101,7 +35279,7 @@ } }, { - "id": 41773, + "id": 704, "name": "headers", "variant": "param", "kind": 32768, @@ -35118,7 +35296,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -35148,21 +35326,21 @@ ] }, { - "id": 41774, + "id": 705, "name": "retrieve", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product-type.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product-type.ts", "line": 179, "character": 8 } ], "signatures": [ { - "id": 41775, + "id": 706, "name": "retrieve", "variant": "signature", "kind": 4096, @@ -35221,14 +35399,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product-type.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product-type.ts", "line": 179, "character": 8 } ], "parameters": [ { - "id": 41776, + "id": 707, "name": "id", "variant": "param", "kind": 32768, @@ -35247,7 +35425,7 @@ } }, { - "id": 41777, + "id": 708, "name": "query", "variant": "param", "kind": 32768, @@ -35273,7 +35451,7 @@ } }, { - "id": 41778, + "id": 709, "name": "headers", "variant": "param", "kind": 32768, @@ -35290,7 +35468,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -35320,21 +35498,21 @@ ] }, { - "id": 41779, + "id": 710, "name": "delete", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product-type.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product-type.ts", "line": 208, "character": 8 } ], "signatures": [ { - "id": 41780, + "id": 711, "name": "delete", "variant": "signature", "kind": 4096, @@ -35369,14 +35547,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product-type.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product-type.ts", "line": 208, "character": 8 } ], "parameters": [ { - "id": 41781, + "id": 712, "name": "id", "variant": "param", "kind": 32768, @@ -35395,7 +35573,7 @@ } }, { - "id": 41782, + "id": 713, "name": "headers", "variant": "param", "kind": 32768, @@ -35412,7 +35590,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -35446,43 +35624,43 @@ { "title": "Constructors", "children": [ - 41755 + 686 ] }, { "title": "Properties", "children": [ - 41758 + 689 ] }, { "title": "Methods", "children": [ - 41759, - 41764, - 41770, - 41774, - 41779 + 690, + 695, + 701, + 705, + 710 ] } ], "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product-type.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product-type.ts", "line": 5, "character": 13 } ] }, { - "id": 42931, + "id": 1862, "name": "ProductVariant", "variant": "declaration", "kind": 128, "flags": {}, "children": [ { - "id": 42935, + "id": 1866, "name": "client", "variant": "declaration", "kind": 1024, @@ -35497,34 +35675,34 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product-variant.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product-variant.ts", "line": 9, "character": 10 } ], "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } }, { - "id": 42932, + "id": 1863, "name": "constructor", "variant": "declaration", "kind": 512, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product-variant.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product-variant.ts", "line": 13, "character": 2 } ], "signatures": [ { - "id": 42933, + "id": 1864, "name": "ProductVariant", "variant": "signature", "kind": 16384, @@ -35537,21 +35715,21 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product-variant.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product-variant.ts", "line": 13, "character": 2 } ], "parameters": [ { - "id": 42934, + "id": 1865, "name": "client", "variant": "param", "kind": 32768, "flags": {}, "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } @@ -35559,7 +35737,7 @@ ], "type": { "type": "reference", - "target": 42931, + "target": 1862, "name": "ProductVariant", "package": "@medusajs/js-sdk" } @@ -35567,21 +35745,21 @@ ] }, { - "id": 42936, + "id": 1867, "name": "list", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product-variant.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product-variant.ts", "line": 64, "character": 8 } ], "signatures": [ { - "id": 42937, + "id": 1868, "name": "list", "variant": "signature", "kind": 4096, @@ -35672,14 +35850,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product-variant.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product-variant.ts", "line": 64, "character": 8 } ], "parameters": [ { - "id": 42938, + "id": 1869, "name": "query", "variant": "param", "kind": 32768, @@ -35705,7 +35883,7 @@ } }, { - "id": 42939, + "id": 1870, "name": "headers", "variant": "param", "kind": 32768, @@ -35722,7 +35900,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -35756,39 +35934,39 @@ { "title": "Constructors", "children": [ - 42932 + 1863 ] }, { "title": "Properties", "children": [ - 42935 + 1866 ] }, { "title": "Methods", "children": [ - 42936 + 1867 ] } ], "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product-variant.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product-variant.ts", "line": 5, "character": 13 } ] }, { - "id": 41632, + "id": 563, "name": "Product", "variant": "declaration", "kind": 128, "flags": {}, "children": [ { - "id": 41636, + "id": 567, "name": "client", "variant": "declaration", "kind": 1024, @@ -35803,34 +35981,34 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product.ts", "line": 9, "character": 10 } ], "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } }, { - "id": 41633, + "id": 564, "name": "constructor", "variant": "declaration", "kind": 512, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product.ts", "line": 13, "character": 2 } ], "signatures": [ { - "id": 41634, + "id": 565, "name": "Product", "variant": "signature", "kind": 16384, @@ -35843,21 +36021,21 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product.ts", "line": 13, "character": 2 } ], "parameters": [ { - "id": 41635, + "id": 566, "name": "client", "variant": "param", "kind": 32768, "flags": {}, "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } @@ -35865,7 +36043,7 @@ ], "type": { "type": "reference", - "target": 41632, + "target": 563, "name": "Product", "package": "@medusajs/js-sdk" } @@ -35873,21 +36051,21 @@ ] }, { - "id": 41637, + "id": 568, "name": "import", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product.ts", "line": 38, "character": 8 } ], "signatures": [ { - "id": 41638, + "id": 569, "name": "import", "variant": "signature", "kind": 4096, @@ -35902,7 +36080,7 @@ "kind": "inline-tag", "tag": "@link", "text": "confirmImport", - "target": 41643 + "target": 574 }, { "kind": "text", @@ -35932,14 +36110,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product.ts", "line": 38, "character": 8 } ], "parameters": [ { - "id": 41639, + "id": 570, "name": "body", "variant": "param", "kind": 32768, @@ -35963,7 +36141,7 @@ } }, { - "id": 41640, + "id": 571, "name": "query", "variant": "param", "kind": 32768, @@ -35981,7 +36159,7 @@ "type": { "type": "reflection", "declaration": { - "id": 41641, + "id": 572, "name": "__type", "variant": "declaration", "kind": 65536, @@ -35990,7 +36168,7 @@ } }, { - "id": 41642, + "id": 573, "name": "headers", "variant": "param", "kind": 32768, @@ -36007,7 +36185,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -36037,21 +36215,21 @@ ] }, { - "id": 41643, + "id": 574, "name": "confirmImport", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product.ts", "line": 78, "character": 8 } ], "signatures": [ { - "id": 41644, + "id": 575, "name": "confirmImport", "variant": "signature", "kind": 4096, @@ -36066,7 +36244,7 @@ "kind": "inline-tag", "tag": "@link", "text": "import", - "target": 41637 + "target": 568 }, { "kind": "text", @@ -36087,14 +36265,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product.ts", "line": 78, "character": 8 } ], "parameters": [ { - "id": 41645, + "id": 576, "name": "transactionId", "variant": "param", "kind": 32768, @@ -36113,7 +36291,7 @@ } }, { - "id": 41646, + "id": 577, "name": "query", "variant": "param", "kind": 32768, @@ -36131,7 +36309,7 @@ "type": { "type": "reflection", "declaration": { - "id": 41647, + "id": 578, "name": "__type", "variant": "declaration", "kind": 65536, @@ -36140,7 +36318,7 @@ } }, { - "id": 41648, + "id": 579, "name": "headers", "variant": "param", "kind": 32768, @@ -36157,7 +36335,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -36173,7 +36351,7 @@ { "type": "reflection", "declaration": { - "id": 41649, + "id": 580, "name": "__type", "variant": "declaration", "kind": 65536, @@ -36188,21 +36366,21 @@ ] }, { - "id": 41650, + "id": 581, "name": "export", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product.ts", "line": 119, "character": 8 } ], "signatures": [ { - "id": 41651, + "id": 582, "name": "export", "variant": "signature", "kind": 4096, @@ -36261,14 +36439,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product.ts", "line": 119, "character": 8 } ], "parameters": [ { - "id": 41652, + "id": 583, "name": "body", "variant": "param", "kind": 32768, @@ -36292,7 +36470,7 @@ } }, { - "id": 41653, + "id": 584, "name": "query", "variant": "param", "kind": 32768, @@ -36318,7 +36496,7 @@ } }, { - "id": 41654, + "id": 585, "name": "headers", "variant": "param", "kind": 32768, @@ -36335,7 +36513,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -36365,21 +36543,21 @@ ] }, { - "id": 41655, + "id": 586, "name": "batch", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product.ts", "line": 175, "character": 8 } ], "signatures": [ { - "id": 41656, + "id": 587, "name": "batch", "variant": "signature", "kind": 4096, @@ -36414,14 +36592,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product.ts", "line": 175, "character": 8 } ], "parameters": [ { - "id": 41657, + "id": 588, "name": "body", "variant": "param", "kind": 32768, @@ -36445,7 +36623,7 @@ } }, { - "id": 41658, + "id": 589, "name": "query", "variant": "param", "kind": 32768, @@ -36471,7 +36649,7 @@ } }, { - "id": 41659, + "id": 590, "name": "headers", "variant": "param", "kind": 32768, @@ -36488,7 +36666,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -36518,21 +36696,21 @@ ] }, { - "id": 41660, + "id": 591, "name": "create", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product.ts", "line": 223, "character": 8 } ], "signatures": [ { - "id": 41661, + "id": 592, "name": "create", "variant": "signature", "kind": 4096, @@ -36567,14 +36745,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product.ts", "line": 223, "character": 8 } ], "parameters": [ { - "id": 41662, + "id": 593, "name": "body", "variant": "param", "kind": 32768, @@ -36598,7 +36776,7 @@ } }, { - "id": 41663, + "id": 594, "name": "query", "variant": "param", "kind": 32768, @@ -36624,7 +36802,7 @@ } }, { - "id": 41664, + "id": 595, "name": "headers", "variant": "param", "kind": 32768, @@ -36641,7 +36819,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -36671,21 +36849,21 @@ ] }, { - "id": 41665, + "id": 596, "name": "update", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product.ts", "line": 258, "character": 8 } ], "signatures": [ { - "id": 41666, + "id": 597, "name": "update", "variant": "signature", "kind": 4096, @@ -36720,14 +36898,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product.ts", "line": 258, "character": 8 } ], "parameters": [ { - "id": 41667, + "id": 598, "name": "id", "variant": "param", "kind": 32768, @@ -36746,7 +36924,7 @@ } }, { - "id": 41668, + "id": 599, "name": "body", "variant": "param", "kind": 32768, @@ -36770,7 +36948,7 @@ } }, { - "id": 41669, + "id": 600, "name": "query", "variant": "param", "kind": 32768, @@ -36796,7 +36974,7 @@ } }, { - "id": 41670, + "id": 601, "name": "headers", "variant": "param", "kind": 32768, @@ -36813,7 +36991,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -36843,21 +37021,21 @@ ] }, { - "id": 41671, + "id": 602, "name": "list", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product.ts", "line": 321, "character": 8 } ], "signatures": [ { - "id": 41672, + "id": 603, "name": "list", "variant": "signature", "kind": 4096, @@ -36948,14 +37126,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product.ts", "line": 321, "character": 8 } ], "parameters": [ { - "id": 41673, + "id": 604, "name": "queryParams", "variant": "param", "kind": 32768, @@ -36981,7 +37159,7 @@ } }, { - "id": 41674, + "id": 605, "name": "headers", "variant": "param", "kind": 32768, @@ -36998,7 +37176,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -37028,21 +37206,21 @@ ] }, { - "id": 41675, + "id": 606, "name": "retrieve", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product.ts", "line": 367, "character": 8 } ], "signatures": [ { - "id": 41676, + "id": 607, "name": "retrieve", "variant": "signature", "kind": 4096, @@ -37101,14 +37279,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product.ts", "line": 367, "character": 8 } ], "parameters": [ { - "id": 41677, + "id": 608, "name": "id", "variant": "param", "kind": 32768, @@ -37127,7 +37305,7 @@ } }, { - "id": 41678, + "id": 609, "name": "query", "variant": "param", "kind": 32768, @@ -37153,7 +37331,7 @@ } }, { - "id": 41679, + "id": 610, "name": "headers", "variant": "param", "kind": 32768, @@ -37170,7 +37348,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -37200,21 +37378,21 @@ ] }, { - "id": 41680, + "id": 611, "name": "delete", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product.ts", "line": 392, "character": 8 } ], "signatures": [ { - "id": 41681, + "id": 612, "name": "delete", "variant": "signature", "kind": 4096, @@ -37249,14 +37427,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product.ts", "line": 392, "character": 8 } ], "parameters": [ { - "id": 41682, + "id": 613, "name": "id", "variant": "param", "kind": 32768, @@ -37275,7 +37453,7 @@ } }, { - "id": 41683, + "id": 614, "name": "headers", "variant": "param", "kind": 32768, @@ -37292,7 +37470,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -37322,21 +37500,21 @@ ] }, { - "id": 41684, + "id": 615, "name": "batchVariants", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product.ts", "line": 436, "character": 8 } ], "signatures": [ { - "id": 41685, + "id": 616, "name": "batchVariants", "variant": "signature", "kind": 4096, @@ -37371,14 +37549,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product.ts", "line": 436, "character": 8 } ], "parameters": [ { - "id": 41686, + "id": 617, "name": "productId", "variant": "param", "kind": 32768, @@ -37397,7 +37575,7 @@ } }, { - "id": 41687, + "id": 618, "name": "body", "variant": "param", "kind": 32768, @@ -37421,7 +37599,7 @@ } }, { - "id": 41688, + "id": 619, "name": "query", "variant": "param", "kind": 32768, @@ -37447,7 +37625,7 @@ } }, { - "id": 41689, + "id": 620, "name": "headers", "variant": "param", "kind": 32768, @@ -37464,7 +37642,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -37494,21 +37672,21 @@ ] }, { - "id": 41690, + "id": 621, "name": "createVariant", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product.ts", "line": 481, "character": 8 } ], "signatures": [ { - "id": 41691, + "id": 622, "name": "createVariant", "variant": "signature", "kind": 4096, @@ -37543,14 +37721,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product.ts", "line": 481, "character": 8 } ], "parameters": [ { - "id": 41692, + "id": 623, "name": "productId", "variant": "param", "kind": 32768, @@ -37569,7 +37747,7 @@ } }, { - "id": 41693, + "id": 624, "name": "body", "variant": "param", "kind": 32768, @@ -37593,7 +37771,7 @@ } }, { - "id": 41694, + "id": 625, "name": "query", "variant": "param", "kind": 32768, @@ -37619,7 +37797,7 @@ } }, { - "id": 41695, + "id": 626, "name": "headers", "variant": "param", "kind": 32768, @@ -37636,7 +37814,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -37666,21 +37844,21 @@ ] }, { - "id": 41696, + "id": 627, "name": "updateVariant", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product.ts", "line": 522, "character": 8 } ], "signatures": [ { - "id": 41697, + "id": 628, "name": "updateVariant", "variant": "signature", "kind": 4096, @@ -37715,14 +37893,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product.ts", "line": 522, "character": 8 } ], "parameters": [ { - "id": 41698, + "id": 629, "name": "productId", "variant": "param", "kind": 32768, @@ -37741,7 +37919,7 @@ } }, { - "id": 41699, + "id": 630, "name": "id", "variant": "param", "kind": 32768, @@ -37760,7 +37938,7 @@ } }, { - "id": 41700, + "id": 631, "name": "body", "variant": "param", "kind": 32768, @@ -37784,7 +37962,7 @@ } }, { - "id": 41701, + "id": 632, "name": "query", "variant": "param", "kind": 32768, @@ -37810,7 +37988,7 @@ } }, { - "id": 41702, + "id": 633, "name": "headers", "variant": "param", "kind": 32768, @@ -37827,7 +38005,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -37857,21 +38035,21 @@ ] }, { - "id": 41703, + "id": 634, "name": "listVariants", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product.ts", "line": 587, "character": 8 } ], "signatures": [ { - "id": 41704, + "id": 635, "name": "listVariants", "variant": "signature", "kind": 4096, @@ -37962,14 +38140,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product.ts", "line": 587, "character": 8 } ], "parameters": [ { - "id": 41705, + "id": 636, "name": "productId", "variant": "param", "kind": 32768, @@ -37988,7 +38166,7 @@ } }, { - "id": 41706, + "id": 637, "name": "query", "variant": "param", "kind": 32768, @@ -38014,7 +38192,7 @@ } }, { - "id": 41707, + "id": 638, "name": "headers", "variant": "param", "kind": 32768, @@ -38031,7 +38209,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -38061,21 +38239,21 @@ ] }, { - "id": 41708, + "id": 639, "name": "retrieveVariant", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product.ts", "line": 642, "character": 8 } ], "signatures": [ { - "id": 41709, + "id": 640, "name": "retrieveVariant", "variant": "signature", "kind": 4096, @@ -38134,14 +38312,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product.ts", "line": 642, "character": 8 } ], "parameters": [ { - "id": 41710, + "id": 641, "name": "productId", "variant": "param", "kind": 32768, @@ -38160,7 +38338,7 @@ } }, { - "id": 41711, + "id": 642, "name": "id", "variant": "param", "kind": 32768, @@ -38179,7 +38357,7 @@ } }, { - "id": 41712, + "id": 643, "name": "query", "variant": "param", "kind": 32768, @@ -38205,7 +38383,7 @@ } }, { - "id": 41713, + "id": 644, "name": "headers", "variant": "param", "kind": 32768, @@ -38222,7 +38400,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -38252,21 +38430,21 @@ ] }, { - "id": 41714, + "id": 645, "name": "deleteVariant", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product.ts", "line": 673, "character": 8 } ], "signatures": [ { - "id": 41715, + "id": 646, "name": "deleteVariant", "variant": "signature", "kind": 4096, @@ -38301,14 +38479,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product.ts", "line": 673, "character": 8 } ], "parameters": [ { - "id": 41716, + "id": 647, "name": "productId", "variant": "param", "kind": 32768, @@ -38327,7 +38505,7 @@ } }, { - "id": 41717, + "id": 648, "name": "id", "variant": "param", "kind": 32768, @@ -38346,7 +38524,7 @@ } }, { - "id": 41718, + "id": 649, "name": "headers", "variant": "param", "kind": 32768, @@ -38363,7 +38541,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -38393,21 +38571,21 @@ ] }, { - "id": 41719, + "id": 650, "name": "batchVariantInventoryItems", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product.ts", "line": 727, "character": 8 } ], "signatures": [ { - "id": 41720, + "id": 651, "name": "batchVariantInventoryItems", "variant": "signature", "kind": 4096, @@ -38442,14 +38620,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product.ts", "line": 727, "character": 8 } ], "parameters": [ { - "id": 41721, + "id": 652, "name": "productId", "variant": "param", "kind": 32768, @@ -38468,7 +38646,7 @@ } }, { - "id": 41722, + "id": 653, "name": "body", "variant": "param", "kind": 32768, @@ -38492,7 +38670,7 @@ } }, { - "id": 41723, + "id": 654, "name": "query", "variant": "param", "kind": 32768, @@ -38518,7 +38696,7 @@ } }, { - "id": 41724, + "id": 655, "name": "headers", "variant": "param", "kind": 32768, @@ -38535,7 +38713,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -38565,21 +38743,21 @@ ] }, { - "id": 41725, + "id": 656, "name": "createOption", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product.ts", "line": 767, "character": 8 } ], "signatures": [ { - "id": 41726, + "id": 657, "name": "createOption", "variant": "signature", "kind": 4096, @@ -38614,14 +38792,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product.ts", "line": 767, "character": 8 } ], "parameters": [ { - "id": 41727, + "id": 658, "name": "productId", "variant": "param", "kind": 32768, @@ -38640,7 +38818,7 @@ } }, { - "id": 41728, + "id": 659, "name": "body", "variant": "param", "kind": 32768, @@ -38664,7 +38842,7 @@ } }, { - "id": 41729, + "id": 660, "name": "query", "variant": "param", "kind": 32768, @@ -38690,7 +38868,7 @@ } }, { - "id": 41730, + "id": 661, "name": "headers", "variant": "param", "kind": 32768, @@ -38707,7 +38885,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -38737,21 +38915,21 @@ ] }, { - "id": 41731, + "id": 662, "name": "updateOption", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product.ts", "line": 808, "character": 8 } ], "signatures": [ { - "id": 41732, + "id": 663, "name": "updateOption", "variant": "signature", "kind": 4096, @@ -38786,14 +38964,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product.ts", "line": 808, "character": 8 } ], "parameters": [ { - "id": 41733, + "id": 664, "name": "productId", "variant": "param", "kind": 32768, @@ -38812,7 +38990,7 @@ } }, { - "id": 41734, + "id": 665, "name": "id", "variant": "param", "kind": 32768, @@ -38831,7 +39009,7 @@ } }, { - "id": 41735, + "id": 666, "name": "body", "variant": "param", "kind": 32768, @@ -38855,7 +39033,7 @@ } }, { - "id": 41736, + "id": 667, "name": "query", "variant": "param", "kind": 32768, @@ -38881,7 +39059,7 @@ } }, { - "id": 41737, + "id": 668, "name": "headers", "variant": "param", "kind": 32768, @@ -38898,7 +39076,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -38928,21 +39106,21 @@ ] }, { - "id": 41738, + "id": 669, "name": "listOptions", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product.ts", "line": 873, "character": 8 } ], "signatures": [ { - "id": 41739, + "id": 670, "name": "listOptions", "variant": "signature", "kind": 4096, @@ -39033,14 +39211,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product.ts", "line": 873, "character": 8 } ], "parameters": [ { - "id": 41740, + "id": 671, "name": "productId", "variant": "param", "kind": 32768, @@ -39059,7 +39237,7 @@ } }, { - "id": 41741, + "id": 672, "name": "query", "variant": "param", "kind": 32768, @@ -39085,7 +39263,7 @@ } }, { - "id": 41742, + "id": 673, "name": "headers", "variant": "param", "kind": 32768, @@ -39102,7 +39280,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -39132,21 +39310,21 @@ ] }, { - "id": 41743, + "id": 674, "name": "retrieveOption", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product.ts", "line": 928, "character": 8 } ], "signatures": [ { - "id": 41744, + "id": 675, "name": "retrieveOption", "variant": "signature", "kind": 4096, @@ -39205,14 +39383,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product.ts", "line": 928, "character": 8 } ], "parameters": [ { - "id": 41745, + "id": 676, "name": "productId", "variant": "param", "kind": 32768, @@ -39231,7 +39409,7 @@ } }, { - "id": 41746, + "id": 677, "name": "id", "variant": "param", "kind": 32768, @@ -39250,7 +39428,7 @@ } }, { - "id": 41747, + "id": 678, "name": "query", "variant": "param", "kind": 32768, @@ -39276,7 +39454,7 @@ } }, { - "id": 41748, + "id": 679, "name": "headers", "variant": "param", "kind": 32768, @@ -39293,7 +39471,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -39323,21 +39501,21 @@ ] }, { - "id": 41749, + "id": 680, "name": "deleteOption", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product.ts", "line": 959, "character": 8 } ], "signatures": [ { - "id": 41750, + "id": 681, "name": "deleteOption", "variant": "signature", "kind": 4096, @@ -39372,14 +39550,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product.ts", "line": 959, "character": 8 } ], "parameters": [ { - "id": 41751, + "id": 682, "name": "productId", "variant": "param", "kind": 32768, @@ -39398,7 +39576,7 @@ } }, { - "id": 41752, + "id": 683, "name": "id", "variant": "param", "kind": 32768, @@ -39417,7 +39595,7 @@ } }, { - "id": 41753, + "id": 684, "name": "headers", "variant": "param", "kind": 32768, @@ -39434,7 +39612,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -39468,59 +39646,59 @@ { "title": "Constructors", "children": [ - 41633 + 564 ] }, { "title": "Properties", "children": [ - 41636 + 567 ] }, { "title": "Methods", "children": [ - 41637, - 41643, - 41650, - 41655, - 41660, - 41665, - 41671, - 41675, - 41680, - 41684, - 41690, - 41696, - 41703, - 41708, - 41714, - 41719, - 41725, - 41731, - 41738, - 41743, - 41749 + 568, + 574, + 581, + 586, + 591, + 596, + 602, + 606, + 611, + 615, + 621, + 627, + 634, + 639, + 645, + 650, + 656, + 662, + 669, + 674, + 680 ] } ], "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/product.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/product.ts", "line": 5, "character": 13 } ] }, { - "id": 43082, + "id": 2013, "name": "Promotion", "variant": "declaration", "kind": 128, "flags": {}, "children": [ { - "id": 43086, + "id": 2017, "name": "client", "variant": "declaration", "kind": 1024, @@ -39535,34 +39713,34 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/promotion.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/promotion.ts", "line": 9, "character": 10 } ], "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } }, { - "id": 43083, + "id": 2014, "name": "constructor", "variant": "declaration", "kind": 512, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/promotion.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/promotion.ts", "line": 13, "character": 2 } ], "signatures": [ { - "id": 43084, + "id": 2015, "name": "Promotion", "variant": "signature", "kind": 16384, @@ -39575,21 +39753,21 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/promotion.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/promotion.ts", "line": 13, "character": 2 } ], "parameters": [ { - "id": 43085, + "id": 2016, "name": "client", "variant": "param", "kind": 32768, "flags": {}, "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } @@ -39597,7 +39775,7 @@ ], "type": { "type": "reference", - "target": 43082, + "target": 2013, "name": "Promotion", "package": "@medusajs/js-sdk" } @@ -39605,21 +39783,21 @@ ] }, { - "id": 43087, + "id": 2018, "name": "retrieve", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/promotion.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/promotion.ts", "line": 50, "character": 8 } ], "signatures": [ { - "id": 43088, + "id": 2019, "name": "retrieve", "variant": "signature", "kind": 4096, @@ -39678,14 +39856,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/promotion.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/promotion.ts", "line": 50, "character": 8 } ], "parameters": [ { - "id": 43089, + "id": 2020, "name": "id", "variant": "param", "kind": 32768, @@ -39704,7 +39882,7 @@ } }, { - "id": 43090, + "id": 2021, "name": "query", "variant": "param", "kind": 32768, @@ -39730,7 +39908,7 @@ } }, { - "id": 43091, + "id": 2022, "name": "headers", "variant": "param", "kind": 32768, @@ -39747,7 +39925,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -39777,21 +39955,21 @@ ] }, { - "id": 43092, + "id": 2023, "name": "list", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/promotion.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/promotion.ts", "line": 111, "character": 8 } ], "signatures": [ { - "id": 43093, + "id": 2024, "name": "list", "variant": "signature", "kind": 4096, @@ -39882,14 +40060,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/promotion.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/promotion.ts", "line": 111, "character": 8 } ], "parameters": [ { - "id": 43094, + "id": 2025, "name": "query", "variant": "param", "kind": 32768, @@ -39915,7 +40093,7 @@ } }, { - "id": 43095, + "id": 2026, "name": "headers", "variant": "param", "kind": 32768, @@ -39932,7 +40110,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -39962,21 +40140,21 @@ ] }, { - "id": 43096, + "id": 2027, "name": "create", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/promotion.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/promotion.ts", "line": 145, "character": 8 } ], "signatures": [ { - "id": 43097, + "id": 2028, "name": "create", "variant": "signature", "kind": 4096, @@ -40011,14 +40189,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/promotion.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/promotion.ts", "line": 145, "character": 8 } ], "parameters": [ { - "id": 43098, + "id": 2029, "name": "payload", "variant": "param", "kind": 32768, @@ -40042,7 +40220,7 @@ } }, { - "id": 43099, + "id": 2030, "name": "headers", "variant": "param", "kind": 32768, @@ -40059,7 +40237,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -40089,21 +40267,21 @@ ] }, { - "id": 43100, + "id": 2031, "name": "update", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/promotion.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/promotion.ts", "line": 177, "character": 8 } ], "signatures": [ { - "id": 43101, + "id": 2032, "name": "update", "variant": "signature", "kind": 4096, @@ -40138,14 +40316,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/promotion.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/promotion.ts", "line": 177, "character": 8 } ], "parameters": [ { - "id": 43102, + "id": 2033, "name": "id", "variant": "param", "kind": 32768, @@ -40164,7 +40342,7 @@ } }, { - "id": 43103, + "id": 2034, "name": "payload", "variant": "param", "kind": 32768, @@ -40188,7 +40366,7 @@ } }, { - "id": 43104, + "id": 2035, "name": "headers", "variant": "param", "kind": 32768, @@ -40205,7 +40383,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -40235,21 +40413,21 @@ ] }, { - "id": 43105, + "id": 2036, "name": "delete", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/promotion.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/promotion.ts", "line": 207, "character": 8 } ], "signatures": [ { - "id": 43106, + "id": 2037, "name": "delete", "variant": "signature", "kind": 4096, @@ -40284,14 +40462,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/promotion.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/promotion.ts", "line": 207, "character": 8 } ], "parameters": [ { - "id": 43107, + "id": 2038, "name": "id", "variant": "param", "kind": 32768, @@ -40310,7 +40488,7 @@ } }, { - "id": 43108, + "id": 2039, "name": "headers", "variant": "param", "kind": 32768, @@ -40327,7 +40505,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -40363,21 +40541,21 @@ ] }, { - "id": 43109, + "id": 2040, "name": "addRules", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/promotion.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/promotion.ts", "line": 249, "character": 8 } ], "signatures": [ { - "id": 43110, + "id": 2041, "name": "addRules", "variant": "signature", "kind": 4096, @@ -40460,14 +40638,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/promotion.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/promotion.ts", "line": 249, "character": 8 } ], "parameters": [ { - "id": 43111, + "id": 2042, "name": "id", "variant": "param", "kind": 32768, @@ -40486,7 +40664,7 @@ } }, { - "id": 43112, + "id": 2043, "name": "ruleType", "variant": "param", "kind": 32768, @@ -40505,7 +40683,7 @@ } }, { - "id": 43113, + "id": 2044, "name": "payload", "variant": "param", "kind": 32768, @@ -40529,7 +40707,7 @@ } }, { - "id": 43114, + "id": 2045, "name": "headers", "variant": "param", "kind": 32768, @@ -40546,7 +40724,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -40576,21 +40754,21 @@ ] }, { - "id": 43115, + "id": 2046, "name": "updateRules", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/promotion.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/promotion.ts", "line": 296, "character": 8 } ], "signatures": [ { - "id": 43116, + "id": 2047, "name": "updateRules", "variant": "signature", "kind": 4096, @@ -40673,14 +40851,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/promotion.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/promotion.ts", "line": 296, "character": 8 } ], "parameters": [ { - "id": 43117, + "id": 2048, "name": "id", "variant": "param", "kind": 32768, @@ -40699,7 +40877,7 @@ } }, { - "id": 43118, + "id": 2049, "name": "ruleType", "variant": "param", "kind": 32768, @@ -40718,7 +40896,7 @@ } }, { - "id": 43119, + "id": 2050, "name": "payload", "variant": "param", "kind": 32768, @@ -40742,7 +40920,7 @@ } }, { - "id": 43120, + "id": 2051, "name": "headers", "variant": "param", "kind": 32768, @@ -40759,7 +40937,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -40789,21 +40967,21 @@ ] }, { - "id": 43121, + "id": 2052, "name": "removeRules", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/promotion.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/promotion.ts", "line": 338, "character": 8 } ], "signatures": [ { - "id": 43122, + "id": 2053, "name": "removeRules", "variant": "signature", "kind": 4096, @@ -40886,14 +41064,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/promotion.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/promotion.ts", "line": 338, "character": 8 } ], "parameters": [ { - "id": 43123, + "id": 2054, "name": "id", "variant": "param", "kind": 32768, @@ -40912,7 +41090,7 @@ } }, { - "id": 43124, + "id": 2055, "name": "ruleType", "variant": "param", "kind": 32768, @@ -40931,7 +41109,7 @@ } }, { - "id": 43125, + "id": 2056, "name": "payload", "variant": "param", "kind": 32768, @@ -40955,7 +41133,7 @@ } }, { - "id": 43126, + "id": 2057, "name": "headers", "variant": "param", "kind": 32768, @@ -40972,7 +41150,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -41002,21 +41180,21 @@ ] }, { - "id": 43127, + "id": 2058, "name": "listRules", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/promotion.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/promotion.ts", "line": 374, "character": 8 } ], "signatures": [ { - "id": 43128, + "id": 2059, "name": "listRules", "variant": "signature", "kind": 4096, @@ -41051,14 +41229,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/promotion.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/promotion.ts", "line": 374, "character": 8 } ], "parameters": [ { - "id": 43129, + "id": 2060, "name": "id", "variant": "param", "kind": 32768, @@ -41086,7 +41264,7 @@ } }, { - "id": 43130, + "id": 2061, "name": "ruleType", "variant": "param", "kind": 32768, @@ -41129,7 +41307,7 @@ } }, { - "id": 43131, + "id": 2062, "name": "query", "variant": "param", "kind": 32768, @@ -41155,7 +41333,7 @@ } }, { - "id": 43132, + "id": 2063, "name": "headers", "variant": "param", "kind": 32768, @@ -41172,7 +41350,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -41202,21 +41380,21 @@ ] }, { - "id": 43133, + "id": 2064, "name": "listRuleAttributes", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/promotion.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/promotion.ts", "line": 411, "character": 8 } ], "signatures": [ { - "id": 43134, + "id": 2065, "name": "listRuleAttributes", "variant": "signature", "kind": 4096, @@ -41299,14 +41477,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/promotion.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/promotion.ts", "line": 411, "character": 8 } ], "parameters": [ { - "id": 43135, + "id": 2066, "name": "ruleType", "variant": "param", "kind": 32768, @@ -41349,7 +41527,7 @@ } }, { - "id": 43136, + "id": 2067, "name": "promotionType", "variant": "param", "kind": 32768, @@ -41386,7 +41564,7 @@ } }, { - "id": 43137, + "id": 2068, "name": "headers", "variant": "param", "kind": 32768, @@ -41403,7 +41581,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -41433,21 +41611,21 @@ ] }, { - "id": 43138, + "id": 2069, "name": "listRuleValues", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/promotion.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/promotion.ts", "line": 446, "character": 8 } ], "signatures": [ { - "id": 43139, + "id": 2070, "name": "listRuleValues", "variant": "signature", "kind": 4096, @@ -41498,14 +41676,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/promotion.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/promotion.ts", "line": 446, "character": 8 } ], "parameters": [ { - "id": 43140, + "id": 2071, "name": "ruleType", "variant": "param", "kind": 32768, @@ -41548,7 +41726,7 @@ } }, { - "id": 43141, + "id": 2072, "name": "ruleValue", "variant": "param", "kind": 32768, @@ -41567,7 +41745,7 @@ } }, { - "id": 43142, + "id": 2073, "name": "query", "variant": "param", "kind": 32768, @@ -41593,7 +41771,7 @@ } }, { - "id": 43143, + "id": 2074, "name": "headers", "variant": "param", "kind": 32768, @@ -41610,7 +41788,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -41644,49 +41822,49 @@ { "title": "Constructors", "children": [ - 43083 + 2014 ] }, { "title": "Properties", "children": [ - 43086 + 2017 ] }, { "title": "Methods", "children": [ - 43087, - 43092, - 43096, - 43100, - 43105, - 43109, - 43115, - 43121, - 43127, - 43133, - 43138 + 2018, + 2023, + 2027, + 2031, + 2036, + 2040, + 2046, + 2052, + 2058, + 2064, + 2069 ] } ], "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/promotion.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/promotion.ts", "line": 5, "character": 13 } ] }, { - "id": 42940, + "id": 1871, "name": "RefundReason", "variant": "declaration", "kind": 128, "flags": {}, "children": [ { - "id": 42944, + "id": 1875, "name": "client", "variant": "declaration", "kind": 1024, @@ -41701,34 +41879,34 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/refund-reasons.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/refund-reasons.ts", "line": 9, "character": 10 } ], "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } }, { - "id": 42941, + "id": 1872, "name": "constructor", "variant": "declaration", "kind": 512, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/refund-reasons.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/refund-reasons.ts", "line": 13, "character": 2 } ], "signatures": [ { - "id": 42942, + "id": 1873, "name": "RefundReason", "variant": "signature", "kind": 16384, @@ -41741,21 +41919,21 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/refund-reasons.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/refund-reasons.ts", "line": 13, "character": 2 } ], "parameters": [ { - "id": 42943, + "id": 1874, "name": "client", "variant": "param", "kind": 32768, "flags": {}, "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } @@ -41763,7 +41941,7 @@ ], "type": { "type": "reference", - "target": 42940, + "target": 1871, "name": "RefundReason", "package": "@medusajs/js-sdk" } @@ -41771,21 +41949,21 @@ ] }, { - "id": 42945, + "id": 1876, "name": "list", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/refund-reasons.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/refund-reasons.ts", "line": 65, "character": 8 } ], "signatures": [ { - "id": 42946, + "id": 1877, "name": "list", "variant": "signature", "kind": 4096, @@ -41876,14 +42054,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/refund-reasons.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/refund-reasons.ts", "line": 65, "character": 8 } ], "parameters": [ { - "id": 42947, + "id": 1878, "name": "query", "variant": "param", "kind": 32768, @@ -41909,7 +42087,7 @@ } }, { - "id": 42948, + "id": 1879, "name": "headers", "variant": "param", "kind": 32768, @@ -41926,7 +42104,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -41960,39 +42138,39 @@ { "title": "Constructors", "children": [ - 42941 + 1872 ] }, { "title": "Properties", "children": [ - 42944 + 1875 ] }, { "title": "Methods", "children": [ - 42945 + 1876 ] } ], "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/refund-reasons.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/refund-reasons.ts", "line": 5, "character": 13 } ] }, { - "id": 41802, + "id": 733, "name": "Region", "variant": "declaration", "kind": 128, "flags": {}, "children": [ { - "id": 41806, + "id": 737, "name": "client", "variant": "declaration", "kind": 1024, @@ -42007,34 +42185,34 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/region.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/region.ts", "line": 13, "character": 10 } ], "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } }, { - "id": 41803, + "id": 734, "name": "constructor", "variant": "declaration", "kind": 512, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/region.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/region.ts", "line": 17, "character": 2 } ], "signatures": [ { - "id": 41804, + "id": 735, "name": "Region", "variant": "signature", "kind": 16384, @@ -42047,21 +42225,21 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/region.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/region.ts", "line": 17, "character": 2 } ], "parameters": [ { - "id": 41805, + "id": 736, "name": "client", "variant": "param", "kind": 32768, "flags": {}, "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } @@ -42069,7 +42247,7 @@ ], "type": { "type": "reference", - "target": 41802, + "target": 733, "name": "Region", "package": "@medusajs/js-sdk" } @@ -42077,21 +42255,21 @@ ] }, { - "id": 41807, + "id": 738, "name": "create", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/region.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/region.ts", "line": 40, "character": 8 } ], "signatures": [ { - "id": 41808, + "id": 739, "name": "create", "variant": "signature", "kind": 4096, @@ -42126,14 +42304,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/region.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/region.ts", "line": 40, "character": 8 } ], "parameters": [ { - "id": 41809, + "id": 740, "name": "body", "variant": "param", "kind": 32768, @@ -42157,7 +42335,7 @@ } }, { - "id": 41810, + "id": 741, "name": "query", "variant": "param", "kind": 32768, @@ -42183,7 +42361,7 @@ } }, { - "id": 41811, + "id": 742, "name": "headers", "variant": "param", "kind": 32768, @@ -42200,7 +42378,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -42230,21 +42408,21 @@ ] }, { - "id": 41812, + "id": 743, "name": "update", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/region.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/region.ts", "line": 75, "character": 8 } ], "signatures": [ { - "id": 41813, + "id": 744, "name": "update", "variant": "signature", "kind": 4096, @@ -42279,14 +42457,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/region.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/region.ts", "line": 75, "character": 8 } ], "parameters": [ { - "id": 41814, + "id": 745, "name": "id", "variant": "param", "kind": 32768, @@ -42305,7 +42483,7 @@ } }, { - "id": 41815, + "id": 746, "name": "body", "variant": "param", "kind": 32768, @@ -42329,7 +42507,7 @@ } }, { - "id": 41816, + "id": 747, "name": "query", "variant": "param", "kind": 32768, @@ -42355,7 +42533,7 @@ } }, { - "id": 41817, + "id": 748, "name": "headers", "variant": "param", "kind": 32768, @@ -42372,7 +42550,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -42402,21 +42580,21 @@ ] }, { - "id": 41818, + "id": 749, "name": "list", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/region.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/region.ts", "line": 139, "character": 8 } ], "signatures": [ { - "id": 41819, + "id": 750, "name": "list", "variant": "signature", "kind": 4096, @@ -42507,14 +42685,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/region.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/region.ts", "line": 139, "character": 8 } ], "parameters": [ { - "id": 41820, + "id": 751, "name": "queryParams", "variant": "param", "kind": 32768, @@ -42554,7 +42732,7 @@ } }, { - "id": 41821, + "id": 752, "name": "headers", "variant": "param", "kind": 32768, @@ -42571,7 +42749,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -42601,21 +42779,21 @@ ] }, { - "id": 41822, + "id": 753, "name": "retrieve", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/region.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/region.ts", "line": 185, "character": 8 } ], "signatures": [ { - "id": 41823, + "id": 754, "name": "retrieve", "variant": "signature", "kind": 4096, @@ -42674,14 +42852,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/region.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/region.ts", "line": 185, "character": 8 } ], "parameters": [ { - "id": 41824, + "id": 755, "name": "id", "variant": "param", "kind": 32768, @@ -42700,7 +42878,7 @@ } }, { - "id": 41825, + "id": 756, "name": "query", "variant": "param", "kind": 32768, @@ -42726,7 +42904,7 @@ } }, { - "id": 41826, + "id": 757, "name": "headers", "variant": "param", "kind": 32768, @@ -42743,7 +42921,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -42773,21 +42951,21 @@ ] }, { - "id": 41827, + "id": 758, "name": "delete", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/region.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/region.ts", "line": 210, "character": 8 } ], "signatures": [ { - "id": 41828, + "id": 759, "name": "delete", "variant": "signature", "kind": 4096, @@ -42822,14 +43000,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/region.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/region.ts", "line": 210, "character": 8 } ], "parameters": [ { - "id": 41829, + "id": 760, "name": "id", "variant": "param", "kind": 32768, @@ -42848,7 +43026,7 @@ } }, { - "id": 41830, + "id": 761, "name": "headers", "variant": "param", "kind": 32768, @@ -42865,7 +43043,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -42899,43 +43077,43 @@ { "title": "Constructors", "children": [ - 41803 + 734 ] }, { "title": "Properties", "children": [ - 41806 + 737 ] }, { "title": "Methods", "children": [ - 41807, - 41812, - 41818, - 41822, - 41827 + 738, + 743, + 749, + 753, + 758 ] } ], "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/region.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/region.ts", "line": 9, "character": 13 } ] }, { - "id": 43019, + "id": 1950, "name": "Reservation", "variant": "declaration", "kind": 128, "flags": {}, "children": [ { - "id": 43023, + "id": 1954, "name": "client", "variant": "declaration", "kind": 1024, @@ -42950,34 +43128,34 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/reservation.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/reservation.ts", "line": 9, "character": 10 } ], "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } }, { - "id": 43020, + "id": 1951, "name": "constructor", "variant": "declaration", "kind": 512, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/reservation.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/reservation.ts", "line": 13, "character": 2 } ], "signatures": [ { - "id": 43021, + "id": 1952, "name": "Reservation", "variant": "signature", "kind": 16384, @@ -42990,21 +43168,21 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/reservation.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/reservation.ts", "line": 13, "character": 2 } ], "parameters": [ { - "id": 43022, + "id": 1953, "name": "client", "variant": "param", "kind": 32768, "flags": {}, "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } @@ -43012,7 +43190,7 @@ ], "type": { "type": "reference", - "target": 43019, + "target": 1950, "name": "Reservation", "package": "@medusajs/js-sdk" } @@ -43020,21 +43198,21 @@ ] }, { - "id": 43024, + "id": 1955, "name": "retrieve", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/reservation.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/reservation.ts", "line": 50, "character": 8 } ], "signatures": [ { - "id": 43025, + "id": 1956, "name": "retrieve", "variant": "signature", "kind": 4096, @@ -43093,14 +43271,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/reservation.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/reservation.ts", "line": 50, "character": 8 } ], "parameters": [ { - "id": 43026, + "id": 1957, "name": "id", "variant": "param", "kind": 32768, @@ -43119,7 +43297,7 @@ } }, { - "id": 43027, + "id": 1958, "name": "query", "variant": "param", "kind": 32768, @@ -43145,7 +43323,7 @@ } }, { - "id": 43028, + "id": 1959, "name": "headers", "variant": "param", "kind": 32768, @@ -43162,7 +43340,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -43192,21 +43370,21 @@ ] }, { - "id": 43029, + "id": 1960, "name": "list", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/reservation.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/reservation.ts", "line": 112, "character": 8 } ], "signatures": [ { - "id": 43030, + "id": 1961, "name": "list", "variant": "signature", "kind": 4096, @@ -43297,14 +43475,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/reservation.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/reservation.ts", "line": 112, "character": 8 } ], "parameters": [ { - "id": 43031, + "id": 1962, "name": "query", "variant": "param", "kind": 32768, @@ -43330,7 +43508,7 @@ } }, { - "id": 43032, + "id": 1963, "name": "headers", "variant": "param", "kind": 32768, @@ -43347,7 +43525,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -43377,21 +43555,21 @@ ] }, { - "id": 43033, + "id": 1964, "name": "create", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/reservation.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/reservation.ts", "line": 146, "character": 8 } ], "signatures": [ { - "id": 43034, + "id": 1965, "name": "create", "variant": "signature", "kind": 4096, @@ -43426,14 +43604,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/reservation.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/reservation.ts", "line": 146, "character": 8 } ], "parameters": [ { - "id": 43035, + "id": 1966, "name": "body", "variant": "param", "kind": 32768, @@ -43457,7 +43635,7 @@ } }, { - "id": 43036, + "id": 1967, "name": "query", "variant": "param", "kind": 32768, @@ -43483,7 +43661,7 @@ } }, { - "id": 43037, + "id": 1968, "name": "headers", "variant": "param", "kind": 32768, @@ -43500,7 +43678,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -43530,21 +43708,21 @@ ] }, { - "id": 43038, + "id": 1969, "name": "update", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/reservation.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/reservation.ts", "line": 181, "character": 8 } ], "signatures": [ { - "id": 43039, + "id": 1970, "name": "update", "variant": "signature", "kind": 4096, @@ -43579,14 +43757,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/reservation.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/reservation.ts", "line": 181, "character": 8 } ], "parameters": [ { - "id": 43040, + "id": 1971, "name": "id", "variant": "param", "kind": 32768, @@ -43605,7 +43783,7 @@ } }, { - "id": 43041, + "id": 1972, "name": "body", "variant": "param", "kind": 32768, @@ -43629,7 +43807,7 @@ } }, { - "id": 43042, + "id": 1973, "name": "query", "variant": "param", "kind": 32768, @@ -43655,7 +43833,7 @@ } }, { - "id": 43043, + "id": 1974, "name": "headers", "variant": "param", "kind": 32768, @@ -43672,7 +43850,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -43702,21 +43880,21 @@ ] }, { - "id": 43044, + "id": 1975, "name": "delete", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/reservation.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/reservation.ts", "line": 213, "character": 8 } ], "signatures": [ { - "id": 43045, + "id": 1976, "name": "delete", "variant": "signature", "kind": 4096, @@ -43751,14 +43929,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/reservation.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/reservation.ts", "line": 213, "character": 8 } ], "parameters": [ { - "id": 43046, + "id": 1977, "name": "id", "variant": "param", "kind": 32768, @@ -43777,7 +43955,7 @@ } }, { - "id": 43047, + "id": 1978, "name": "headers", "variant": "param", "kind": 32768, @@ -43794,7 +43972,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -43828,43 +44006,43 @@ { "title": "Constructors", "children": [ - 43020 + 1951 ] }, { "title": "Properties", "children": [ - 43023 + 1954 ] }, { "title": "Methods", "children": [ - 43024, - 43029, - 43033, - 43038, - 43044 + 1955, + 1960, + 1964, + 1969, + 1975 ] } ], "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/reservation.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/reservation.ts", "line": 5, "character": 6 } ] }, { - "id": 41831, + "id": 762, "name": "ReturnReason", "variant": "declaration", "kind": 128, "flags": {}, "children": [ { - "id": 41835, + "id": 766, "name": "client", "variant": "declaration", "kind": 1024, @@ -43879,34 +44057,34 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/return-reason.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/return-reason.ts", "line": 10, "character": 10 } ], "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } }, { - "id": 41832, + "id": 763, "name": "constructor", "variant": "declaration", "kind": 512, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/return-reason.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/return-reason.ts", "line": 14, "character": 2 } ], "signatures": [ { - "id": 41833, + "id": 764, "name": "ReturnReason", "variant": "signature", "kind": 16384, @@ -43919,21 +44097,21 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/return-reason.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/return-reason.ts", "line": 14, "character": 2 } ], "parameters": [ { - "id": 41834, + "id": 765, "name": "client", "variant": "param", "kind": 32768, "flags": {}, "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } @@ -43941,7 +44119,7 @@ ], "type": { "type": "reference", - "target": 41831, + "target": 762, "name": "ReturnReason", "package": "@medusajs/js-sdk" } @@ -43949,21 +44127,21 @@ ] }, { - "id": 41836, + "id": 767, "name": "list", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/return-reason.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/return-reason.ts", "line": 65, "character": 8 } ], "signatures": [ { - "id": 41837, + "id": 768, "name": "list", "variant": "signature", "kind": 4096, @@ -44054,14 +44232,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/return-reason.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/return-reason.ts", "line": 65, "character": 8 } ], "parameters": [ { - "id": 41838, + "id": 769, "name": "query", "variant": "param", "kind": 32768, @@ -44087,7 +44265,7 @@ } }, { - "id": 41839, + "id": 770, "name": "headers", "variant": "param", "kind": 32768, @@ -44104,7 +44282,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -44134,21 +44312,21 @@ ] }, { - "id": 41840, + "id": 771, "name": "retrieve", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/return-reason.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/return-reason.ts", "line": 111, "character": 8 } ], "signatures": [ { - "id": 41841, + "id": 772, "name": "retrieve", "variant": "signature", "kind": 4096, @@ -44207,14 +44385,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/return-reason.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/return-reason.ts", "line": 111, "character": 8 } ], "parameters": [ { - "id": 41842, + "id": 773, "name": "id", "variant": "param", "kind": 32768, @@ -44233,7 +44411,7 @@ } }, { - "id": 41843, + "id": 774, "name": "query", "variant": "param", "kind": 32768, @@ -44259,7 +44437,7 @@ } }, { - "id": 41844, + "id": 775, "name": "headers", "variant": "param", "kind": 32768, @@ -44276,7 +44454,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -44306,21 +44484,21 @@ ] }, { - "id": 41845, + "id": 776, "name": "create", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/return-reason.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/return-reason.ts", "line": 144, "character": 8 } ], "signatures": [ { - "id": 41846, + "id": 777, "name": "create", "variant": "signature", "kind": 4096, @@ -44355,14 +44533,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/return-reason.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/return-reason.ts", "line": 144, "character": 8 } ], "parameters": [ { - "id": 41847, + "id": 778, "name": "body", "variant": "param", "kind": 32768, @@ -44386,7 +44564,7 @@ } }, { - "id": 41848, + "id": 779, "name": "query", "variant": "param", "kind": 32768, @@ -44412,7 +44590,7 @@ } }, { - "id": 41849, + "id": 780, "name": "headers", "variant": "param", "kind": 32768, @@ -44429,7 +44607,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -44459,21 +44637,21 @@ ] }, { - "id": 41850, + "id": 781, "name": "update", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/return-reason.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/return-reason.ts", "line": 180, "character": 8 } ], "signatures": [ { - "id": 41851, + "id": 782, "name": "update", "variant": "signature", "kind": 4096, @@ -44508,14 +44686,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/return-reason.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/return-reason.ts", "line": 180, "character": 8 } ], "parameters": [ { - "id": 41852, + "id": 783, "name": "id", "variant": "param", "kind": 32768, @@ -44534,7 +44712,7 @@ } }, { - "id": 41853, + "id": 784, "name": "body", "variant": "param", "kind": 32768, @@ -44558,7 +44736,7 @@ } }, { - "id": 41854, + "id": 785, "name": "query", "variant": "param", "kind": 32768, @@ -44584,7 +44762,7 @@ } }, { - "id": 41855, + "id": 786, "name": "headers", "variant": "param", "kind": 32768, @@ -44601,7 +44779,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -44631,21 +44809,21 @@ ] }, { - "id": 41856, + "id": 787, "name": "delete", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/return-reason.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/return-reason.ts", "line": 213, "character": 8 } ], "signatures": [ { - "id": 41857, + "id": 788, "name": "delete", "variant": "signature", "kind": 4096, @@ -44680,14 +44858,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/return-reason.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/return-reason.ts", "line": 213, "character": 8 } ], "parameters": [ { - "id": 41858, + "id": 789, "name": "id", "variant": "param", "kind": 32768, @@ -44706,7 +44884,7 @@ } }, { - "id": 41859, + "id": 790, "name": "query", "variant": "param", "kind": 32768, @@ -44732,7 +44910,7 @@ } }, { - "id": 41860, + "id": 791, "name": "headers", "variant": "param", "kind": 32768, @@ -44749,7 +44927,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -44783,43 +44961,43 @@ { "title": "Constructors", "children": [ - 41832 + 763 ] }, { "title": "Properties", "children": [ - 41835 + 766 ] }, { "title": "Methods", "children": [ - 41836, - 41840, - 41845, - 41850, - 41856 + 767, + 771, + 776, + 781, + 787 ] } ], "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/return-reason.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/return-reason.ts", "line": 6, "character": 13 } ] }, { - "id": 42383, + "id": 1314, "name": "Return", "variant": "declaration", "kind": 128, "flags": {}, "children": [ { - "id": 42387, + "id": 1318, "name": "client", "variant": "declaration", "kind": 1024, @@ -44834,34 +45012,34 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/return.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/return.ts", "line": 10, "character": 10 } ], "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } }, { - "id": 42384, + "id": 1315, "name": "constructor", "variant": "declaration", "kind": 512, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/return.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/return.ts", "line": 14, "character": 2 } ], "signatures": [ { - "id": 42385, + "id": 1316, "name": "Return", "variant": "signature", "kind": 16384, @@ -44874,21 +45052,21 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/return.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/return.ts", "line": 14, "character": 2 } ], "parameters": [ { - "id": 42386, + "id": 1317, "name": "client", "variant": "param", "kind": 32768, "flags": {}, "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } @@ -44896,7 +45074,7 @@ ], "type": { "type": "reference", - "target": 42383, + "target": 1314, "name": "Return", "package": "@medusajs/js-sdk" } @@ -44904,21 +45082,21 @@ ] }, { - "id": 42388, + "id": 1319, "name": "list", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/return.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/return.ts", "line": 65, "character": 8 } ], "signatures": [ { - "id": 42389, + "id": 1320, "name": "list", "variant": "signature", "kind": 4096, @@ -45009,14 +45187,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/return.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/return.ts", "line": 65, "character": 8 } ], "parameters": [ { - "id": 42390, + "id": 1321, "name": "query", "variant": "param", "kind": 32768, @@ -45042,7 +45220,7 @@ } }, { - "id": 42391, + "id": 1322, "name": "headers", "variant": "param", "kind": 32768, @@ -45059,7 +45237,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -45089,21 +45267,21 @@ ] }, { - "id": 42392, + "id": 1323, "name": "retrieve", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/return.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/return.ts", "line": 108, "character": 8 } ], "signatures": [ { - "id": 42393, + "id": 1324, "name": "retrieve", "variant": "signature", "kind": 4096, @@ -45162,14 +45340,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/return.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/return.ts", "line": 108, "character": 8 } ], "parameters": [ { - "id": 42394, + "id": 1325, "name": "id", "variant": "param", "kind": 32768, @@ -45188,7 +45366,7 @@ } }, { - "id": 42395, + "id": 1326, "name": "query", "variant": "param", "kind": 32768, @@ -45214,7 +45392,7 @@ } }, { - "id": 42396, + "id": 1327, "name": "headers", "variant": "param", "kind": 32768, @@ -45231,7 +45409,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -45261,21 +45439,21 @@ ] }, { - "id": 42397, + "id": 1328, "name": "initiateRequest", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/return.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/return.ts", "line": 136, "character": 8 } ], "signatures": [ { - "id": 42398, + "id": 1329, "name": "initiateRequest", "variant": "signature", "kind": 4096, @@ -45310,14 +45488,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/return.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/return.ts", "line": 136, "character": 8 } ], "parameters": [ { - "id": 42399, + "id": 1330, "name": "body", "variant": "param", "kind": 32768, @@ -45341,7 +45519,7 @@ } }, { - "id": 42400, + "id": 1331, "name": "query", "variant": "param", "kind": 32768, @@ -45367,7 +45545,7 @@ } }, { - "id": 42401, + "id": 1332, "name": "headers", "variant": "param", "kind": 32768, @@ -45384,7 +45562,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -45414,21 +45592,21 @@ ] }, { - "id": 42402, + "id": 1333, "name": "cancel", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/return.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/return.ts", "line": 168, "character": 8 } ], "signatures": [ { - "id": 42403, + "id": 1334, "name": "cancel", "variant": "signature", "kind": 4096, @@ -45463,14 +45641,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/return.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/return.ts", "line": 168, "character": 8 } ], "parameters": [ { - "id": 42404, + "id": 1335, "name": "id", "variant": "param", "kind": 32768, @@ -45489,7 +45667,7 @@ } }, { - "id": 42405, + "id": 1336, "name": "query", "variant": "param", "kind": 32768, @@ -45515,7 +45693,7 @@ } }, { - "id": 42406, + "id": 1337, "name": "headers", "variant": "param", "kind": 32768, @@ -45532,7 +45710,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -45562,21 +45740,21 @@ ] }, { - "id": 42407, + "id": 1338, "name": "cancelRequest", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/return.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/return.ts", "line": 199, "character": 8 } ], "signatures": [ { - "id": 42408, + "id": 1339, "name": "cancelRequest", "variant": "signature", "kind": 4096, @@ -45611,14 +45789,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/return.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/return.ts", "line": 199, "character": 8 } ], "parameters": [ { - "id": 42409, + "id": 1340, "name": "id", "variant": "param", "kind": 32768, @@ -45637,7 +45815,7 @@ } }, { - "id": 42410, + "id": 1341, "name": "query", "variant": "param", "kind": 32768, @@ -45663,7 +45841,7 @@ } }, { - "id": 42411, + "id": 1342, "name": "headers", "variant": "param", "kind": 32768, @@ -45680,7 +45858,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -45710,21 +45888,21 @@ ] }, { - "id": 42412, + "id": 1343, "name": "addReturnItem", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/return.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/return.ts", "line": 234, "character": 8 } ], "signatures": [ { - "id": 42413, + "id": 1344, "name": "addReturnItem", "variant": "signature", "kind": 4096, @@ -45759,14 +45937,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/return.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/return.ts", "line": 234, "character": 8 } ], "parameters": [ { - "id": 42414, + "id": 1345, "name": "id", "variant": "param", "kind": 32768, @@ -45785,7 +45963,7 @@ } }, { - "id": 42415, + "id": 1346, "name": "body", "variant": "param", "kind": 32768, @@ -45809,7 +45987,7 @@ } }, { - "id": 42416, + "id": 1347, "name": "query", "variant": "param", "kind": 32768, @@ -45835,7 +46013,7 @@ } }, { - "id": 42417, + "id": 1348, "name": "headers", "variant": "param", "kind": 32768, @@ -45852,7 +46030,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -45882,21 +46060,21 @@ ] }, { - "id": 42418, + "id": 1349, "name": "updateReturnItem", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/return.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/return.ts", "line": 276, "character": 8 } ], "signatures": [ { - "id": 42419, + "id": 1350, "name": "updateReturnItem", "variant": "signature", "kind": 4096, @@ -45979,14 +46157,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/return.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/return.ts", "line": 276, "character": 8 } ], "parameters": [ { - "id": 42420, + "id": 1351, "name": "id", "variant": "param", "kind": 32768, @@ -46005,7 +46183,7 @@ } }, { - "id": 42421, + "id": 1352, "name": "actionId", "variant": "param", "kind": 32768, @@ -46032,7 +46210,7 @@ } }, { - "id": 42422, + "id": 1353, "name": "body", "variant": "param", "kind": 32768, @@ -46056,7 +46234,7 @@ } }, { - "id": 42423, + "id": 1354, "name": "query", "variant": "param", "kind": 32768, @@ -46082,7 +46260,7 @@ } }, { - "id": 42424, + "id": 1355, "name": "headers", "variant": "param", "kind": 32768, @@ -46099,7 +46277,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -46129,21 +46307,21 @@ ] }, { - "id": 42425, + "id": 1356, "name": "removeReturnItem", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/return.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/return.ts", "line": 317, "character": 8 } ], "signatures": [ { - "id": 42426, + "id": 1357, "name": "removeReturnItem", "variant": "signature", "kind": 4096, @@ -46226,14 +46404,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/return.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/return.ts", "line": 317, "character": 8 } ], "parameters": [ { - "id": 42427, + "id": 1358, "name": "id", "variant": "param", "kind": 32768, @@ -46252,7 +46430,7 @@ } }, { - "id": 42428, + "id": 1359, "name": "actionId", "variant": "param", "kind": 32768, @@ -46279,7 +46457,7 @@ } }, { - "id": 42429, + "id": 1360, "name": "query", "variant": "param", "kind": 32768, @@ -46305,7 +46483,7 @@ } }, { - "id": 42430, + "id": 1361, "name": "headers", "variant": "param", "kind": 32768, @@ -46322,7 +46500,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -46352,21 +46530,21 @@ ] }, { - "id": 42431, + "id": 1362, "name": "addReturnShipping", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/return.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/return.ts", "line": 352, "character": 8 } ], "signatures": [ { - "id": 42432, + "id": 1363, "name": "addReturnShipping", "variant": "signature", "kind": 4096, @@ -46401,14 +46579,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/return.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/return.ts", "line": 352, "character": 8 } ], "parameters": [ { - "id": 42433, + "id": 1364, "name": "id", "variant": "param", "kind": 32768, @@ -46427,7 +46605,7 @@ } }, { - "id": 42434, + "id": 1365, "name": "body", "variant": "param", "kind": 32768, @@ -46451,7 +46629,7 @@ } }, { - "id": 42435, + "id": 1366, "name": "query", "variant": "param", "kind": 32768, @@ -46477,7 +46655,7 @@ } }, { - "id": 42436, + "id": 1367, "name": "headers", "variant": "param", "kind": 32768, @@ -46494,7 +46672,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -46524,21 +46702,21 @@ ] }, { - "id": 42437, + "id": 1368, "name": "updateReturnShipping", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/return.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/return.ts", "line": 397, "character": 8 } ], "signatures": [ { - "id": 42438, + "id": 1369, "name": "updateReturnShipping", "variant": "signature", "kind": 4096, @@ -46621,14 +46799,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/return.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/return.ts", "line": 397, "character": 8 } ], "parameters": [ { - "id": 42439, + "id": 1370, "name": "id", "variant": "param", "kind": 32768, @@ -46647,7 +46825,7 @@ } }, { - "id": 42440, + "id": 1371, "name": "actionId", "variant": "param", "kind": 32768, @@ -46674,7 +46852,7 @@ } }, { - "id": 42441, + "id": 1372, "name": "body", "variant": "param", "kind": 32768, @@ -46698,7 +46876,7 @@ } }, { - "id": 42442, + "id": 1373, "name": "query", "variant": "param", "kind": 32768, @@ -46724,7 +46902,7 @@ } }, { - "id": 42443, + "id": 1374, "name": "headers", "variant": "param", "kind": 32768, @@ -46741,7 +46919,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -46771,21 +46949,21 @@ ] }, { - "id": 42444, + "id": 1375, "name": "deleteReturnShipping", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/return.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/return.ts", "line": 440, "character": 8 } ], "signatures": [ { - "id": 42445, + "id": 1376, "name": "deleteReturnShipping", "variant": "signature", "kind": 4096, @@ -46868,14 +47046,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/return.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/return.ts", "line": 440, "character": 8 } ], "parameters": [ { - "id": 42446, + "id": 1377, "name": "id", "variant": "param", "kind": 32768, @@ -46894,7 +47072,7 @@ } }, { - "id": 42447, + "id": 1378, "name": "actionId", "variant": "param", "kind": 32768, @@ -46921,7 +47099,7 @@ } }, { - "id": 42448, + "id": 1379, "name": "query", "variant": "param", "kind": 32768, @@ -46947,7 +47125,7 @@ } }, { - "id": 42449, + "id": 1380, "name": "headers", "variant": "param", "kind": 32768, @@ -46964,7 +47142,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -46994,21 +47172,21 @@ ] }, { - "id": 42450, + "id": 1381, "name": "updateRequest", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/return.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/return.ts", "line": 475, "character": 8 } ], "signatures": [ { - "id": 42451, + "id": 1382, "name": "updateRequest", "variant": "signature", "kind": 4096, @@ -47043,14 +47221,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/return.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/return.ts", "line": 475, "character": 8 } ], "parameters": [ { - "id": 42452, + "id": 1383, "name": "id", "variant": "param", "kind": 32768, @@ -47069,7 +47247,7 @@ } }, { - "id": 42453, + "id": 1384, "name": "body", "variant": "param", "kind": 32768, @@ -47093,7 +47271,7 @@ } }, { - "id": 42454, + "id": 1385, "name": "query", "variant": "param", "kind": 32768, @@ -47119,7 +47297,7 @@ } }, { - "id": 42455, + "id": 1386, "name": "headers", "variant": "param", "kind": 32768, @@ -47136,7 +47314,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -47166,21 +47344,21 @@ ] }, { - "id": 42456, + "id": 1387, "name": "confirmRequest", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/return.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/return.ts", "line": 516, "character": 8 } ], "signatures": [ { - "id": 42457, + "id": 1388, "name": "confirmRequest", "variant": "signature", "kind": 4096, @@ -47215,14 +47393,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/return.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/return.ts", "line": 516, "character": 8 } ], "parameters": [ { - "id": 42458, + "id": 1389, "name": "id", "variant": "param", "kind": 32768, @@ -47241,7 +47419,7 @@ } }, { - "id": 42459, + "id": 1390, "name": "body", "variant": "param", "kind": 32768, @@ -47265,7 +47443,7 @@ } }, { - "id": 42460, + "id": 1391, "name": "query", "variant": "param", "kind": 32768, @@ -47291,7 +47469,7 @@ } }, { - "id": 42461, + "id": 1392, "name": "headers", "variant": "param", "kind": 32768, @@ -47308,7 +47486,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -47338,21 +47516,21 @@ ] }, { - "id": 42462, + "id": 1393, "name": "initiateReceive", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/return.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/return.ts", "line": 552, "character": 8 } ], "signatures": [ { - "id": 42463, + "id": 1394, "name": "initiateReceive", "variant": "signature", "kind": 4096, @@ -47387,14 +47565,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/return.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/return.ts", "line": 552, "character": 8 } ], "parameters": [ { - "id": 42464, + "id": 1395, "name": "id", "variant": "param", "kind": 32768, @@ -47413,7 +47591,7 @@ } }, { - "id": 42465, + "id": 1396, "name": "body", "variant": "param", "kind": 32768, @@ -47437,7 +47615,7 @@ } }, { - "id": 42466, + "id": 1397, "name": "query", "variant": "param", "kind": 32768, @@ -47463,7 +47641,7 @@ } }, { - "id": 42467, + "id": 1398, "name": "headers", "variant": "param", "kind": 32768, @@ -47480,7 +47658,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -47510,21 +47688,21 @@ ] }, { - "id": 42468, + "id": 1399, "name": "receiveItems", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/return.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/return.ts", "line": 592, "character": 8 } ], "signatures": [ { - "id": 42469, + "id": 1400, "name": "receiveItems", "variant": "signature", "kind": 4096, @@ -47567,14 +47745,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/return.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/return.ts", "line": 592, "character": 8 } ], "parameters": [ { - "id": 42470, + "id": 1401, "name": "id", "variant": "param", "kind": 32768, @@ -47593,7 +47771,7 @@ } }, { - "id": 42471, + "id": 1402, "name": "body", "variant": "param", "kind": 32768, @@ -47617,7 +47795,7 @@ } }, { - "id": 42472, + "id": 1403, "name": "query", "variant": "param", "kind": 32768, @@ -47643,7 +47821,7 @@ } }, { - "id": 42473, + "id": 1404, "name": "headers", "variant": "param", "kind": 32768, @@ -47660,7 +47838,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -47690,21 +47868,21 @@ ] }, { - "id": 42474, + "id": 1405, "name": "updateReceiveItem", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/return.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/return.ts", "line": 637, "character": 8 } ], "signatures": [ { - "id": 42475, + "id": 1406, "name": "updateReceiveItem", "variant": "signature", "kind": 4096, @@ -47787,14 +47965,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/return.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/return.ts", "line": 637, "character": 8 } ], "parameters": [ { - "id": 42476, + "id": 1407, "name": "id", "variant": "param", "kind": 32768, @@ -47813,7 +47991,7 @@ } }, { - "id": 42477, + "id": 1408, "name": "actionId", "variant": "param", "kind": 32768, @@ -47840,7 +48018,7 @@ } }, { - "id": 42478, + "id": 1409, "name": "body", "variant": "param", "kind": 32768, @@ -47864,7 +48042,7 @@ } }, { - "id": 42479, + "id": 1410, "name": "query", "variant": "param", "kind": 32768, @@ -47890,7 +48068,7 @@ } }, { - "id": 42480, + "id": 1411, "name": "headers", "variant": "param", "kind": 32768, @@ -47907,7 +48085,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -47937,21 +48115,21 @@ ] }, { - "id": 42481, + "id": 1412, "name": "removeReceiveItem", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/return.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/return.ts", "line": 680, "character": 8 } ], "signatures": [ { - "id": 42482, + "id": 1413, "name": "removeReceiveItem", "variant": "signature", "kind": 4096, @@ -48034,14 +48212,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/return.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/return.ts", "line": 680, "character": 8 } ], "parameters": [ { - "id": 42483, + "id": 1414, "name": "id", "variant": "param", "kind": 32768, @@ -48060,7 +48238,7 @@ } }, { - "id": 42484, + "id": 1415, "name": "actionId", "variant": "param", "kind": 32768, @@ -48087,7 +48265,7 @@ } }, { - "id": 42485, + "id": 1416, "name": "query", "variant": "param", "kind": 32768, @@ -48113,7 +48291,7 @@ } }, { - "id": 42486, + "id": 1417, "name": "headers", "variant": "param", "kind": 32768, @@ -48130,7 +48308,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -48160,21 +48338,21 @@ ] }, { - "id": 42487, + "id": 1418, "name": "dismissItems", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/return.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/return.ts", "line": 722, "character": 8 } ], "signatures": [ { - "id": 42488, + "id": 1419, "name": "dismissItems", "variant": "signature", "kind": 4096, @@ -48217,14 +48395,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/return.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/return.ts", "line": 722, "character": 8 } ], "parameters": [ { - "id": 42489, + "id": 1420, "name": "id", "variant": "param", "kind": 32768, @@ -48243,7 +48421,7 @@ } }, { - "id": 42490, + "id": 1421, "name": "body", "variant": "param", "kind": 32768, @@ -48267,7 +48445,7 @@ } }, { - "id": 42491, + "id": 1422, "name": "query", "variant": "param", "kind": 32768, @@ -48293,7 +48471,7 @@ } }, { - "id": 42492, + "id": 1423, "name": "headers", "variant": "param", "kind": 32768, @@ -48310,7 +48488,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -48340,21 +48518,21 @@ ] }, { - "id": 42493, + "id": 1424, "name": "updateDismissItem", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/return.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/return.ts", "line": 767, "character": 8 } ], "signatures": [ { - "id": 42494, + "id": 1425, "name": "updateDismissItem", "variant": "signature", "kind": 4096, @@ -48437,14 +48615,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/return.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/return.ts", "line": 767, "character": 8 } ], "parameters": [ { - "id": 42495, + "id": 1426, "name": "id", "variant": "param", "kind": 32768, @@ -48463,7 +48641,7 @@ } }, { - "id": 42496, + "id": 1427, "name": "actionId", "variant": "param", "kind": 32768, @@ -48490,7 +48668,7 @@ } }, { - "id": 42497, + "id": 1428, "name": "body", "variant": "param", "kind": 32768, @@ -48514,7 +48692,7 @@ } }, { - "id": 42498, + "id": 1429, "name": "query", "variant": "param", "kind": 32768, @@ -48540,7 +48718,7 @@ } }, { - "id": 42499, + "id": 1430, "name": "headers", "variant": "param", "kind": 32768, @@ -48557,7 +48735,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -48587,21 +48765,21 @@ ] }, { - "id": 42500, + "id": 1431, "name": "removeDismissItem", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/return.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/return.ts", "line": 810, "character": 8 } ], "signatures": [ { - "id": 42501, + "id": 1432, "name": "removeDismissItem", "variant": "signature", "kind": 4096, @@ -48684,14 +48862,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/return.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/return.ts", "line": 810, "character": 8 } ], "parameters": [ { - "id": 42502, + "id": 1433, "name": "id", "variant": "param", "kind": 32768, @@ -48710,7 +48888,7 @@ } }, { - "id": 42503, + "id": 1434, "name": "actionId", "variant": "param", "kind": 32768, @@ -48737,7 +48915,7 @@ } }, { - "id": 42504, + "id": 1435, "name": "query", "variant": "param", "kind": 32768, @@ -48763,7 +48941,7 @@ } }, { - "id": 42505, + "id": 1436, "name": "headers", "variant": "param", "kind": 32768, @@ -48780,7 +48958,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -48810,21 +48988,21 @@ ] }, { - "id": 42506, + "id": 1437, "name": "confirmReceive", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/return.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/return.ts", "line": 845, "character": 8 } ], "signatures": [ { - "id": 42507, + "id": 1438, "name": "confirmReceive", "variant": "signature", "kind": 4096, @@ -48859,14 +49037,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/return.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/return.ts", "line": 845, "character": 8 } ], "parameters": [ { - "id": 42508, + "id": 1439, "name": "id", "variant": "param", "kind": 32768, @@ -48885,7 +49063,7 @@ } }, { - "id": 42509, + "id": 1440, "name": "body", "variant": "param", "kind": 32768, @@ -48909,7 +49087,7 @@ } }, { - "id": 42510, + "id": 1441, "name": "query", "variant": "param", "kind": 32768, @@ -48935,7 +49113,7 @@ } }, { - "id": 42511, + "id": 1442, "name": "headers", "variant": "param", "kind": 32768, @@ -48952,7 +49130,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -48982,21 +49160,21 @@ ] }, { - "id": 42512, + "id": 1443, "name": "cancelReceive", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/return.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/return.ts", "line": 878, "character": 8 } ], "signatures": [ { - "id": 42513, + "id": 1444, "name": "cancelReceive", "variant": "signature", "kind": 4096, @@ -49031,14 +49209,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/return.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/return.ts", "line": 878, "character": 8 } ], "parameters": [ { - "id": 42514, + "id": 1445, "name": "id", "variant": "param", "kind": 32768, @@ -49057,7 +49235,7 @@ } }, { - "id": 42515, + "id": 1446, "name": "query", "variant": "param", "kind": 32768, @@ -49083,7 +49261,7 @@ } }, { - "id": 42516, + "id": 1447, "name": "headers", "variant": "param", "kind": 32768, @@ -49100,7 +49278,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -49134,60 +49312,60 @@ { "title": "Constructors", "children": [ - 42384 + 1315 ] }, { "title": "Properties", "children": [ - 42387 + 1318 ] }, { "title": "Methods", "children": [ - 42388, - 42392, - 42397, - 42402, - 42407, - 42412, - 42418, - 42425, - 42431, - 42437, - 42444, - 42450, - 42456, - 42462, - 42468, - 42474, - 42481, - 42487, - 42493, - 42500, - 42506, - 42512 + 1319, + 1323, + 1328, + 1333, + 1338, + 1343, + 1349, + 1356, + 1362, + 1368, + 1375, + 1381, + 1387, + 1393, + 1399, + 1405, + 1412, + 1418, + 1424, + 1431, + 1437, + 1443 ] } ], "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/return.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/return.ts", "line": 6, "character": 13 } ] }, { - "id": 41905, + "id": 836, "name": "SalesChannel", "variant": "declaration", "kind": 128, "flags": {}, "children": [ { - "id": 41909, + "id": 840, "name": "client", "variant": "declaration", "kind": 1024, @@ -49202,34 +49380,34 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/sales-channel.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/sales-channel.ts", "line": 9, "character": 10 } ], "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } }, { - "id": 41906, + "id": 837, "name": "constructor", "variant": "declaration", "kind": 512, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/sales-channel.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/sales-channel.ts", "line": 13, "character": 2 } ], "signatures": [ { - "id": 41907, + "id": 838, "name": "SalesChannel", "variant": "signature", "kind": 16384, @@ -49242,21 +49420,21 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/sales-channel.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/sales-channel.ts", "line": 13, "character": 2 } ], "parameters": [ { - "id": 41908, + "id": 839, "name": "client", "variant": "param", "kind": 32768, "flags": {}, "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } @@ -49264,7 +49442,7 @@ ], "type": { "type": "reference", - "target": 41905, + "target": 836, "name": "SalesChannel", "package": "@medusajs/js-sdk" } @@ -49272,21 +49450,21 @@ ] }, { - "id": 41910, + "id": 841, "name": "create", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/sales-channel.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/sales-channel.ts", "line": 35, "character": 8 } ], "signatures": [ { - "id": 41911, + "id": 842, "name": "create", "variant": "signature", "kind": 4096, @@ -49321,14 +49499,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/sales-channel.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/sales-channel.ts", "line": 35, "character": 8 } ], "parameters": [ { - "id": 41912, + "id": 843, "name": "body", "variant": "param", "kind": 32768, @@ -49352,7 +49530,7 @@ } }, { - "id": 41913, + "id": 844, "name": "query", "variant": "param", "kind": 32768, @@ -49378,7 +49556,7 @@ } }, { - "id": 41914, + "id": 845, "name": "headers", "variant": "param", "kind": 32768, @@ -49395,7 +49573,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -49425,21 +49603,21 @@ ] }, { - "id": 41915, + "id": 846, "name": "update", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/sales-channel.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/sales-channel.ts", "line": 73, "character": 8 } ], "signatures": [ { - "id": 41916, + "id": 847, "name": "update", "variant": "signature", "kind": 4096, @@ -49474,14 +49652,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/sales-channel.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/sales-channel.ts", "line": 73, "character": 8 } ], "parameters": [ { - "id": 41917, + "id": 848, "name": "id", "variant": "param", "kind": 32768, @@ -49500,7 +49678,7 @@ } }, { - "id": 41918, + "id": 849, "name": "body", "variant": "param", "kind": 32768, @@ -49524,7 +49702,7 @@ } }, { - "id": 41919, + "id": 850, "name": "query", "variant": "param", "kind": 32768, @@ -49550,7 +49728,7 @@ } }, { - "id": 41920, + "id": 851, "name": "headers", "variant": "param", "kind": 32768, @@ -49567,7 +49745,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -49597,21 +49775,21 @@ ] }, { - "id": 41921, + "id": 852, "name": "delete", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/sales-channel.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/sales-channel.ts", "line": 105, "character": 8 } ], "signatures": [ { - "id": 41922, + "id": 853, "name": "delete", "variant": "signature", "kind": 4096, @@ -49646,14 +49824,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/sales-channel.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/sales-channel.ts", "line": 105, "character": 8 } ], "parameters": [ { - "id": 41923, + "id": 854, "name": "id", "variant": "param", "kind": 32768, @@ -49672,7 +49850,7 @@ } }, { - "id": 41924, + "id": 855, "name": "headers", "variant": "param", "kind": 32768, @@ -49689,7 +49867,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -49719,21 +49897,21 @@ ] }, { - "id": 41925, + "id": 856, "name": "retrieve", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/sales-channel.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/sales-channel.ts", "line": 148, "character": 8 } ], "signatures": [ { - "id": 41926, + "id": 857, "name": "retrieve", "variant": "signature", "kind": 4096, @@ -49792,14 +49970,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/sales-channel.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/sales-channel.ts", "line": 148, "character": 8 } ], "parameters": [ { - "id": 41927, + "id": 858, "name": "id", "variant": "param", "kind": 32768, @@ -49818,7 +49996,7 @@ } }, { - "id": 41928, + "id": 859, "name": "query", "variant": "param", "kind": 32768, @@ -49844,7 +50022,7 @@ } }, { - "id": 41929, + "id": 860, "name": "headers", "variant": "param", "kind": 32768, @@ -49861,7 +50039,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -49891,21 +50069,21 @@ ] }, { - "id": 41930, + "id": 861, "name": "list", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/sales-channel.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/sales-channel.ts", "line": 210, "character": 8 } ], "signatures": [ { - "id": 41931, + "id": 862, "name": "list", "variant": "signature", "kind": 4096, @@ -49996,14 +50174,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/sales-channel.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/sales-channel.ts", "line": 210, "character": 8 } ], "parameters": [ { - "id": 41932, + "id": 863, "name": "query", "variant": "param", "kind": 32768, @@ -50029,7 +50207,7 @@ } }, { - "id": 41933, + "id": 864, "name": "headers", "variant": "param", "kind": 32768, @@ -50046,7 +50224,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -50076,21 +50254,21 @@ ] }, { - "id": 41934, + "id": 865, "name": "updateProducts", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/sales-channel.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/sales-channel.ts", "line": 245, "character": 8 } ], "signatures": [ { - "id": 41935, + "id": 866, "name": "updateProducts", "variant": "signature", "kind": 4096, @@ -50132,7 +50310,7 @@ "kind": "inline-tag", "tag": "@link", "text": "batchProducts", - "target": 41939 + "target": 870 }, { "kind": "text", @@ -50144,14 +50322,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/sales-channel.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/sales-channel.ts", "line": 245, "character": 8 } ], "parameters": [ { - "id": 41936, + "id": 867, "name": "id", "variant": "param", "kind": 32768, @@ -50170,7 +50348,7 @@ } }, { - "id": 41937, + "id": 868, "name": "body", "variant": "param", "kind": 32768, @@ -50194,7 +50372,7 @@ } }, { - "id": 41938, + "id": 869, "name": "headers", "variant": "param", "kind": 32768, @@ -50211,7 +50389,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -50241,21 +50419,21 @@ ] }, { - "id": 41939, + "id": 870, "name": "batchProducts", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/sales-channel.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/sales-channel.ts", "line": 279, "character": 8 } ], "signatures": [ { - "id": 41940, + "id": 871, "name": "batchProducts", "variant": "signature", "kind": 4096, @@ -50290,14 +50468,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/sales-channel.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/sales-channel.ts", "line": 279, "character": 8 } ], "parameters": [ { - "id": 41941, + "id": 872, "name": "id", "variant": "param", "kind": 32768, @@ -50316,7 +50494,7 @@ } }, { - "id": 41942, + "id": 873, "name": "body", "variant": "param", "kind": 32768, @@ -50340,7 +50518,7 @@ } }, { - "id": 41943, + "id": 874, "name": "headers", "variant": "param", "kind": 32768, @@ -50357,7 +50535,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -50391,45 +50569,45 @@ { "title": "Constructors", "children": [ - 41906 + 837 ] }, { "title": "Properties", "children": [ - 41909 + 840 ] }, { "title": "Methods", "children": [ - 41910, - 41915, - 41921, - 41925, - 41930, - 41934, - 41939 + 841, + 846, + 852, + 856, + 861, + 865, + 870 ] } ], "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/sales-channel.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/sales-channel.ts", "line": 5, "character": 13 } ] }, { - "id": 42011, + "id": 942, "name": "ShippingOption", "variant": "declaration", "kind": 128, "flags": {}, "children": [ { - "id": 42015, + "id": 946, "name": "client", "variant": "declaration", "kind": 1024, @@ -50444,34 +50622,34 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/shipping-option.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/shipping-option.ts", "line": 9, "character": 10 } ], "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } }, { - "id": 42012, + "id": 943, "name": "constructor", "variant": "declaration", "kind": 512, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/shipping-option.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/shipping-option.ts", "line": 13, "character": 2 } ], "signatures": [ { - "id": 42013, + "id": 944, "name": "ShippingOption", "variant": "signature", "kind": 16384, @@ -50484,21 +50662,21 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/shipping-option.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/shipping-option.ts", "line": 13, "character": 2 } ], "parameters": [ { - "id": 42014, + "id": 945, "name": "client", "variant": "param", "kind": 32768, "flags": {}, "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } @@ -50506,7 +50684,7 @@ ], "type": { "type": "reference", - "target": 42011, + "target": 942, "name": "ShippingOption", "package": "@medusajs/js-sdk" } @@ -50514,21 +50692,21 @@ ] }, { - "id": 42016, + "id": 947, "name": "create", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/shipping-option.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/shipping-option.ts", "line": 35, "character": 8 } ], "signatures": [ { - "id": 42017, + "id": 948, "name": "create", "variant": "signature", "kind": 4096, @@ -50563,14 +50741,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/shipping-option.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/shipping-option.ts", "line": 35, "character": 8 } ], "parameters": [ { - "id": 42018, + "id": 949, "name": "body", "variant": "param", "kind": 32768, @@ -50594,7 +50772,7 @@ } }, { - "id": 42019, + "id": 950, "name": "query", "variant": "param", "kind": 32768, @@ -50620,7 +50798,7 @@ } }, { - "id": 42020, + "id": 951, "name": "headers", "variant": "param", "kind": 32768, @@ -50637,7 +50815,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -50667,21 +50845,21 @@ ] }, { - "id": 42021, + "id": 952, "name": "retrieve", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/shipping-option.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/shipping-option.ts", "line": 84, "character": 8 } ], "signatures": [ { - "id": 42022, + "id": 953, "name": "retrieve", "variant": "signature", "kind": 4096, @@ -50740,14 +50918,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/shipping-option.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/shipping-option.ts", "line": 84, "character": 8 } ], "parameters": [ { - "id": 42023, + "id": 954, "name": "id", "variant": "param", "kind": 32768, @@ -50766,7 +50944,7 @@ } }, { - "id": 42024, + "id": 955, "name": "query", "variant": "param", "kind": 32768, @@ -50792,7 +50970,7 @@ } }, { - "id": 42025, + "id": 956, "name": "headers", "variant": "param", "kind": 32768, @@ -50809,7 +50987,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -50839,21 +51017,21 @@ ] }, { - "id": 42026, + "id": 957, "name": "update", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/shipping-option.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/shipping-option.ts", "line": 118, "character": 8 } ], "signatures": [ { - "id": 42027, + "id": 958, "name": "update", "variant": "signature", "kind": 4096, @@ -50888,14 +51066,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/shipping-option.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/shipping-option.ts", "line": 118, "character": 8 } ], "parameters": [ { - "id": 42028, + "id": 959, "name": "id", "variant": "param", "kind": 32768, @@ -50914,7 +51092,7 @@ } }, { - "id": 42029, + "id": 960, "name": "body", "variant": "param", "kind": 32768, @@ -50938,7 +51116,7 @@ } }, { - "id": 42030, + "id": 961, "name": "query", "variant": "param", "kind": 32768, @@ -50964,7 +51142,7 @@ } }, { - "id": 42031, + "id": 962, "name": "headers", "variant": "param", "kind": 32768, @@ -50981,7 +51159,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -51011,21 +51189,21 @@ ] }, { - "id": 42032, + "id": 963, "name": "delete", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/shipping-option.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/shipping-option.ts", "line": 150, "character": 8 } ], "signatures": [ { - "id": 42033, + "id": 964, "name": "delete", "variant": "signature", "kind": 4096, @@ -51060,14 +51238,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/shipping-option.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/shipping-option.ts", "line": 150, "character": 8 } ], "parameters": [ { - "id": 42034, + "id": 965, "name": "id", "variant": "param", "kind": 32768, @@ -51086,7 +51264,7 @@ } }, { - "id": 42035, + "id": 966, "name": "headers", "variant": "param", "kind": 32768, @@ -51103,7 +51281,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -51133,21 +51311,21 @@ ] }, { - "id": 42036, + "id": 967, "name": "list", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/shipping-option.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/shipping-option.ts", "line": 207, "character": 8 } ], "signatures": [ { - "id": 42037, + "id": 968, "name": "list", "variant": "signature", "kind": 4096, @@ -51238,14 +51416,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/shipping-option.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/shipping-option.ts", "line": 207, "character": 8 } ], "parameters": [ { - "id": 42038, + "id": 969, "name": "query", "variant": "param", "kind": 32768, @@ -51271,7 +51449,7 @@ } }, { - "id": 42039, + "id": 970, "name": "headers", "variant": "param", "kind": 32768, @@ -51288,7 +51466,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -51318,21 +51496,21 @@ ] }, { - "id": 42040, + "id": 971, "name": "updateRules", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/shipping-option.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/shipping-option.ts", "line": 239, "character": 8 } ], "signatures": [ { - "id": 42041, + "id": 972, "name": "updateRules", "variant": "signature", "kind": 4096, @@ -51367,14 +51545,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/shipping-option.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/shipping-option.ts", "line": 239, "character": 8 } ], "parameters": [ { - "id": 42042, + "id": 973, "name": "id", "variant": "param", "kind": 32768, @@ -51393,7 +51571,7 @@ } }, { - "id": 42043, + "id": 974, "name": "body", "variant": "param", "kind": 32768, @@ -51417,7 +51595,7 @@ } }, { - "id": 42044, + "id": 975, "name": "headers", "variant": "param", "kind": 32768, @@ -51434,7 +51612,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -51468,44 +51646,44 @@ { "title": "Constructors", "children": [ - 42012 + 943 ] }, { "title": "Properties", "children": [ - 42015 + 946 ] }, { "title": "Methods", "children": [ - 42016, - 42021, - 42026, - 42032, - 42036, - 42040 + 947, + 952, + 957, + 963, + 967, + 971 ] } ], "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/shipping-option.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/shipping-option.ts", "line": 5, "character": 13 } ] }, { - "id": 42045, + "id": 976, "name": "ShippingProfile", "variant": "declaration", "kind": 128, "flags": {}, "children": [ { - "id": 42049, + "id": 980, "name": "client", "variant": "declaration", "kind": 1024, @@ -51520,34 +51698,34 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/shipping-profile.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/shipping-profile.ts", "line": 9, "character": 10 } ], "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } }, { - "id": 42046, + "id": 977, "name": "constructor", "variant": "declaration", "kind": 512, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/shipping-profile.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/shipping-profile.ts", "line": 13, "character": 2 } ], "signatures": [ { - "id": 42047, + "id": 978, "name": "ShippingProfile", "variant": "signature", "kind": 16384, @@ -51560,21 +51738,21 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/shipping-profile.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/shipping-profile.ts", "line": 13, "character": 2 } ], "parameters": [ { - "id": 42048, + "id": 979, "name": "client", "variant": "param", "kind": 32768, "flags": {}, "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } @@ -51582,7 +51760,7 @@ ], "type": { "type": "reference", - "target": 42045, + "target": 976, "name": "ShippingProfile", "package": "@medusajs/js-sdk" } @@ -51590,21 +51768,21 @@ ] }, { - "id": 42050, + "id": 981, "name": "create", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/shipping-profile.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/shipping-profile.ts", "line": 35, "character": 8 } ], "signatures": [ { - "id": 42051, + "id": 982, "name": "create", "variant": "signature", "kind": 4096, @@ -51639,14 +51817,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/shipping-profile.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/shipping-profile.ts", "line": 35, "character": 8 } ], "parameters": [ { - "id": 42052, + "id": 983, "name": "body", "variant": "param", "kind": 32768, @@ -51670,7 +51848,7 @@ } }, { - "id": 42053, + "id": 984, "name": "query", "variant": "param", "kind": 32768, @@ -51696,7 +51874,7 @@ } }, { - "id": 42054, + "id": 985, "name": "headers", "variant": "param", "kind": 32768, @@ -51713,7 +51891,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -51743,21 +51921,21 @@ ] }, { - "id": 42055, + "id": 986, "name": "update", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/shipping-profile.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/shipping-profile.ts", "line": 70, "character": 8 } ], "signatures": [ { - "id": 42056, + "id": 987, "name": "update", "variant": "signature", "kind": 4096, @@ -51792,14 +51970,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/shipping-profile.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/shipping-profile.ts", "line": 70, "character": 8 } ], "parameters": [ { - "id": 42057, + "id": 988, "name": "id", "variant": "param", "kind": 32768, @@ -51818,7 +51996,7 @@ } }, { - "id": 42058, + "id": 989, "name": "body", "variant": "param", "kind": 32768, @@ -51842,7 +52020,7 @@ } }, { - "id": 42059, + "id": 990, "name": "query", "variant": "param", "kind": 32768, @@ -51868,7 +52046,7 @@ } }, { - "id": 42060, + "id": 991, "name": "headers", "variant": "param", "kind": 32768, @@ -51885,7 +52063,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -51915,21 +52093,21 @@ ] }, { - "id": 42061, + "id": 992, "name": "delete", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/shipping-profile.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/shipping-profile.ts", "line": 102, "character": 8 } ], "signatures": [ { - "id": 42062, + "id": 993, "name": "delete", "variant": "signature", "kind": 4096, @@ -51964,14 +52142,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/shipping-profile.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/shipping-profile.ts", "line": 102, "character": 8 } ], "parameters": [ { - "id": 42063, + "id": 994, "name": "id", "variant": "param", "kind": 32768, @@ -51990,7 +52168,7 @@ } }, { - "id": 42064, + "id": 995, "name": "headers", "variant": "param", "kind": 32768, @@ -52007,7 +52185,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -52037,21 +52215,21 @@ ] }, { - "id": 42065, + "id": 996, "name": "list", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/shipping-profile.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/shipping-profile.ts", "line": 159, "character": 8 } ], "signatures": [ { - "id": 42066, + "id": 997, "name": "list", "variant": "signature", "kind": 4096, @@ -52142,14 +52320,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/shipping-profile.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/shipping-profile.ts", "line": 159, "character": 8 } ], "parameters": [ { - "id": 42067, + "id": 998, "name": "query", "variant": "param", "kind": 32768, @@ -52175,7 +52353,7 @@ } }, { - "id": 42068, + "id": 999, "name": "headers", "variant": "param", "kind": 32768, @@ -52192,7 +52370,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -52222,21 +52400,21 @@ ] }, { - "id": 42069, + "id": 1000, "name": "retrieve", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/shipping-profile.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/shipping-profile.ts", "line": 206, "character": 8 } ], "signatures": [ { - "id": 42070, + "id": 1001, "name": "retrieve", "variant": "signature", "kind": 4096, @@ -52295,14 +52473,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/shipping-profile.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/shipping-profile.ts", "line": 206, "character": 8 } ], "parameters": [ { - "id": 42071, + "id": 1002, "name": "id", "variant": "param", "kind": 32768, @@ -52321,7 +52499,7 @@ } }, { - "id": 42072, + "id": 1003, "name": "query", "variant": "param", "kind": 32768, @@ -52347,7 +52525,7 @@ } }, { - "id": 42073, + "id": 1004, "name": "headers", "variant": "param", "kind": 32768, @@ -52364,7 +52542,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -52398,43 +52576,43 @@ { "title": "Constructors", "children": [ - 42046 + 977 ] }, { "title": "Properties", "children": [ - 42049 + 980 ] }, { "title": "Methods", "children": [ - 42050, - 42055, - 42061, - 42065, - 42069 + 981, + 986, + 992, + 996, + 1000 ] } ], "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/shipping-profile.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/shipping-profile.ts", "line": 5, "character": 13 } ] }, { - "id": 41861, + "id": 792, "name": "StockLocation", "variant": "declaration", "kind": 128, "flags": {}, "children": [ { - "id": 41865, + "id": 796, "name": "client", "variant": "declaration", "kind": 1024, @@ -52449,34 +52627,34 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/stock-location.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/stock-location.ts", "line": 9, "character": 10 } ], "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } }, { - "id": 41862, + "id": 793, "name": "constructor", "variant": "declaration", "kind": 512, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/stock-location.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/stock-location.ts", "line": 13, "character": 2 } ], "signatures": [ { - "id": 41863, + "id": 794, "name": "StockLocation", "variant": "signature", "kind": 16384, @@ -52489,21 +52667,21 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/stock-location.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/stock-location.ts", "line": 13, "character": 2 } ], "parameters": [ { - "id": 41864, + "id": 795, "name": "client", "variant": "param", "kind": 32768, "flags": {}, "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } @@ -52511,7 +52689,7 @@ ], "type": { "type": "reference", - "target": 41861, + "target": 792, "name": "StockLocation", "package": "@medusajs/js-sdk" } @@ -52519,21 +52697,21 @@ ] }, { - "id": 41866, + "id": 797, "name": "create", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/stock-location.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/stock-location.ts", "line": 36, "character": 8 } ], "signatures": [ { - "id": 41867, + "id": 798, "name": "create", "variant": "signature", "kind": 4096, @@ -52568,14 +52746,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/stock-location.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/stock-location.ts", "line": 36, "character": 8 } ], "parameters": [ { - "id": 41868, + "id": 799, "name": "body", "variant": "param", "kind": 32768, @@ -52599,7 +52777,7 @@ } }, { - "id": 41869, + "id": 800, "name": "query", "variant": "param", "kind": 32768, @@ -52625,7 +52803,7 @@ } }, { - "id": 41870, + "id": 801, "name": "headers", "variant": "param", "kind": 32768, @@ -52642,7 +52820,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -52672,21 +52850,21 @@ ] }, { - "id": 41871, + "id": 802, "name": "update", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/stock-location.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/stock-location.ts", "line": 71, "character": 8 } ], "signatures": [ { - "id": 41872, + "id": 803, "name": "update", "variant": "signature", "kind": 4096, @@ -52721,14 +52899,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/stock-location.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/stock-location.ts", "line": 71, "character": 8 } ], "parameters": [ { - "id": 41873, + "id": 804, "name": "id", "variant": "param", "kind": 32768, @@ -52747,7 +52925,7 @@ } }, { - "id": 41874, + "id": 805, "name": "body", "variant": "param", "kind": 32768, @@ -52771,7 +52949,7 @@ } }, { - "id": 41875, + "id": 806, "name": "query", "variant": "param", "kind": 32768, @@ -52797,7 +52975,7 @@ } }, { - "id": 41876, + "id": 807, "name": "headers", "variant": "param", "kind": 32768, @@ -52814,7 +52992,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -52844,21 +53022,21 @@ ] }, { - "id": 41877, + "id": 808, "name": "delete", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/stock-location.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/stock-location.ts", "line": 103, "character": 8 } ], "signatures": [ { - "id": 41878, + "id": 809, "name": "delete", "variant": "signature", "kind": 4096, @@ -52893,14 +53071,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/stock-location.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/stock-location.ts", "line": 103, "character": 8 } ], "parameters": [ { - "id": 41879, + "id": 810, "name": "id", "variant": "param", "kind": 32768, @@ -52919,7 +53097,7 @@ } }, { - "id": 41880, + "id": 811, "name": "headers", "variant": "param", "kind": 32768, @@ -52936,7 +53114,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -52966,21 +53144,21 @@ ] }, { - "id": 41881, + "id": 812, "name": "retrieve", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/stock-location.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/stock-location.ts", "line": 146, "character": 8 } ], "signatures": [ { - "id": 41882, + "id": 813, "name": "retrieve", "variant": "signature", "kind": 4096, @@ -53039,14 +53217,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/stock-location.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/stock-location.ts", "line": 146, "character": 8 } ], "parameters": [ { - "id": 41883, + "id": 814, "name": "id", "variant": "param", "kind": 32768, @@ -53065,7 +53243,7 @@ } }, { - "id": 41884, + "id": 815, "name": "query", "variant": "param", "kind": 32768, @@ -53091,7 +53269,7 @@ } }, { - "id": 41885, + "id": 816, "name": "headers", "variant": "param", "kind": 32768, @@ -53108,7 +53286,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -53138,21 +53316,21 @@ ] }, { - "id": 41886, + "id": 817, "name": "list", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/stock-location.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/stock-location.ts", "line": 204, "character": 8 } ], "signatures": [ { - "id": 41887, + "id": 818, "name": "list", "variant": "signature", "kind": 4096, @@ -53243,14 +53421,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/stock-location.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/stock-location.ts", "line": 204, "character": 8 } ], "parameters": [ { - "id": 41888, + "id": 819, "name": "query", "variant": "param", "kind": 32768, @@ -53276,7 +53454,7 @@ } }, { - "id": 41889, + "id": 820, "name": "headers", "variant": "param", "kind": 32768, @@ -53293,7 +53471,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -53323,21 +53501,21 @@ ] }, { - "id": 41890, + "id": 821, "name": "updateSalesChannels", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/stock-location.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/stock-location.ts", "line": 237, "character": 8 } ], "signatures": [ { - "id": 41891, + "id": 822, "name": "updateSalesChannels", "variant": "signature", "kind": 4096, @@ -53372,14 +53550,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/stock-location.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/stock-location.ts", "line": 237, "character": 8 } ], "parameters": [ { - "id": 41892, + "id": 823, "name": "id", "variant": "param", "kind": 32768, @@ -53398,7 +53576,7 @@ } }, { - "id": 41893, + "id": 824, "name": "body", "variant": "param", "kind": 32768, @@ -53422,7 +53600,7 @@ } }, { - "id": 41894, + "id": 825, "name": "headers", "variant": "param", "kind": 32768, @@ -53439,7 +53617,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -53469,21 +53647,21 @@ ] }, { - "id": 41895, + "id": 826, "name": "createFulfillmentSet", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/stock-location.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/stock-location.ts", "line": 271, "character": 8 } ], "signatures": [ { - "id": 41896, + "id": 827, "name": "createFulfillmentSet", "variant": "signature", "kind": 4096, @@ -53518,14 +53696,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/stock-location.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/stock-location.ts", "line": 271, "character": 8 } ], "parameters": [ { - "id": 41897, + "id": 828, "name": "id", "variant": "param", "kind": 32768, @@ -53544,7 +53722,7 @@ } }, { - "id": 41898, + "id": 829, "name": "body", "variant": "param", "kind": 32768, @@ -53568,7 +53746,7 @@ } }, { - "id": 41899, + "id": 830, "name": "headers", "variant": "param", "kind": 32768, @@ -53585,7 +53763,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -53615,21 +53793,21 @@ ] }, { - "id": 41900, + "id": 831, "name": "updateFulfillmentProviders", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/stock-location.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/stock-location.ts", "line": 305, "character": 8 } ], "signatures": [ { - "id": 41901, + "id": 832, "name": "updateFulfillmentProviders", "variant": "signature", "kind": 4096, @@ -53664,14 +53842,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/stock-location.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/stock-location.ts", "line": 305, "character": 8 } ], "parameters": [ { - "id": 41902, + "id": 833, "name": "id", "variant": "param", "kind": 32768, @@ -53690,7 +53868,7 @@ } }, { - "id": 41903, + "id": 834, "name": "body", "variant": "param", "kind": 32768, @@ -53714,7 +53892,7 @@ } }, { - "id": 41904, + "id": 835, "name": "headers", "variant": "param", "kind": 32768, @@ -53731,7 +53909,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -53765,46 +53943,46 @@ { "title": "Constructors", "children": [ - 41862 + 793 ] }, { "title": "Properties", "children": [ - 41865 + 796 ] }, { "title": "Methods", "children": [ - 41866, - 41871, - 41877, - 41881, - 41886, - 41890, - 41895, - 41900 + 797, + 802, + 808, + 812, + 817, + 821, + 826, + 831 ] } ], "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/stock-location.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/stock-location.ts", "line": 5, "character": 13 } ] }, { - "id": 42810, + "id": 1741, "name": "Store", "variant": "declaration", "kind": 128, "flags": {}, "children": [ { - "id": 42814, + "id": 1745, "name": "client", "variant": "declaration", "kind": 1024, @@ -53819,34 +53997,34 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/store.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/store.ts", "line": 9, "character": 10 } ], "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } }, { - "id": 42811, + "id": 1742, "name": "constructor", "variant": "declaration", "kind": 512, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/store.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/store.ts", "line": 13, "character": 2 } ], "signatures": [ { - "id": 42812, + "id": 1743, "name": "Store", "variant": "signature", "kind": 16384, @@ -53859,21 +54037,21 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/store.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/store.ts", "line": 13, "character": 2 } ], "parameters": [ { - "id": 42813, + "id": 1744, "name": "client", "variant": "param", "kind": 32768, "flags": {}, "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } @@ -53881,7 +54059,7 @@ ], "type": { "type": "reference", - "target": 42810, + "target": 1741, "name": "Store", "package": "@medusajs/js-sdk" } @@ -53889,21 +54067,21 @@ ] }, { - "id": 42815, + "id": 1746, "name": "retrieve", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/store.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/store.ts", "line": 50, "character": 8 } ], "signatures": [ { - "id": 42816, + "id": 1747, "name": "retrieve", "variant": "signature", "kind": 4096, @@ -53962,14 +54140,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/store.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/store.ts", "line": 50, "character": 8 } ], "parameters": [ { - "id": 42817, + "id": 1748, "name": "id", "variant": "param", "kind": 32768, @@ -53988,7 +54166,7 @@ } }, { - "id": 42818, + "id": 1749, "name": "query", "variant": "param", "kind": 32768, @@ -54014,7 +54192,7 @@ } }, { - "id": 42819, + "id": 1750, "name": "headers", "variant": "param", "kind": 32768, @@ -54031,7 +54209,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -54061,21 +54239,21 @@ ] }, { - "id": 42820, + "id": 1751, "name": "list", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/store.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/store.ts", "line": 112, "character": 8 } ], "signatures": [ { - "id": 42821, + "id": 1752, "name": "list", "variant": "signature", "kind": 4096, @@ -54166,14 +54344,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/store.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/store.ts", "line": 112, "character": 8 } ], "parameters": [ { - "id": 42822, + "id": 1753, "name": "query", "variant": "param", "kind": 32768, @@ -54199,7 +54377,7 @@ } }, { - "id": 42823, + "id": 1754, "name": "headers", "variant": "param", "kind": 32768, @@ -54216,7 +54394,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -54246,21 +54424,21 @@ ] }, { - "id": 42824, + "id": 1755, "name": "update", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/store.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/store.ts", "line": 142, "character": 8 } ], "signatures": [ { - "id": 42825, + "id": 1756, "name": "update", "variant": "signature", "kind": 4096, @@ -54295,14 +54473,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/store.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/store.ts", "line": 142, "character": 8 } ], "parameters": [ { - "id": 42826, + "id": 1757, "name": "id", "variant": "param", "kind": 32768, @@ -54321,7 +54499,7 @@ } }, { - "id": 42827, + "id": 1758, "name": "body", "variant": "param", "kind": 32768, @@ -54345,7 +54523,7 @@ } }, { - "id": 42828, + "id": 1759, "name": "query", "variant": "param", "kind": 32768, @@ -54371,7 +54549,7 @@ } }, { - "id": 42829, + "id": 1760, "name": "headers", "variant": "param", "kind": 32768, @@ -54388,7 +54566,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -54422,41 +54600,41 @@ { "title": "Constructors", "children": [ - 42811 + 1742 ] }, { "title": "Properties", "children": [ - 42814 + 1745 ] }, { "title": "Methods", "children": [ - 42815, - 42820, - 42824 + 1746, + 1751, + 1755 ] } ], "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/store.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/store.ts", "line": 5, "character": 13 } ] }, { - "id": 42758, + "id": 1689, "name": "TaxRate", "variant": "declaration", "kind": 128, "flags": {}, "children": [ { - "id": 42762, + "id": 1693, "name": "client", "variant": "declaration", "kind": 1024, @@ -54471,34 +54649,34 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/tax-rate.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/tax-rate.ts", "line": 11, "character": 10 } ], "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } }, { - "id": 42759, + "id": 1690, "name": "constructor", "variant": "declaration", "kind": 512, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/tax-rate.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/tax-rate.ts", "line": 15, "character": 2 } ], "signatures": [ { - "id": 42760, + "id": 1691, "name": "TaxRate", "variant": "signature", "kind": 16384, @@ -54511,21 +54689,21 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/tax-rate.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/tax-rate.ts", "line": 15, "character": 2 } ], "parameters": [ { - "id": 42761, + "id": 1692, "name": "client", "variant": "param", "kind": 32768, "flags": {}, "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } @@ -54533,7 +54711,7 @@ ], "type": { "type": "reference", - "target": 42758, + "target": 1689, "name": "TaxRate", "package": "@medusajs/js-sdk" } @@ -54541,21 +54719,21 @@ ] }, { - "id": 42763, + "id": 1694, "name": "create", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/tax-rate.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/tax-rate.ts", "line": 40, "character": 8 } ], "signatures": [ { - "id": 42764, + "id": 1695, "name": "create", "variant": "signature", "kind": 4096, @@ -54590,14 +54768,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/tax-rate.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/tax-rate.ts", "line": 40, "character": 8 } ], "parameters": [ { - "id": 42765, + "id": 1696, "name": "body", "variant": "param", "kind": 32768, @@ -54621,7 +54799,7 @@ } }, { - "id": 42766, + "id": 1697, "name": "query", "variant": "param", "kind": 32768, @@ -54647,7 +54825,7 @@ } }, { - "id": 42767, + "id": 1698, "name": "headers", "variant": "param", "kind": 32768, @@ -54664,7 +54842,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -54694,21 +54872,21 @@ ] }, { - "id": 42768, + "id": 1699, "name": "update", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/tax-rate.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/tax-rate.ts", "line": 73, "character": 8 } ], "signatures": [ { - "id": 42769, + "id": 1700, "name": "update", "variant": "signature", "kind": 4096, @@ -54743,14 +54921,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/tax-rate.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/tax-rate.ts", "line": 73, "character": 8 } ], "parameters": [ { - "id": 42770, + "id": 1701, "name": "id", "variant": "param", "kind": 32768, @@ -54769,7 +54947,7 @@ } }, { - "id": 42771, + "id": 1702, "name": "body", "variant": "param", "kind": 32768, @@ -54793,7 +54971,7 @@ } }, { - "id": 42772, + "id": 1703, "name": "query", "variant": "param", "kind": 32768, @@ -54819,7 +54997,7 @@ } }, { - "id": 42773, + "id": 1704, "name": "headers", "variant": "param", "kind": 32768, @@ -54836,7 +55014,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -54866,21 +55044,21 @@ ] }, { - "id": 42774, + "id": 1705, "name": "delete", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/tax-rate.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/tax-rate.ts", "line": 105, "character": 8 } ], "signatures": [ { - "id": 42775, + "id": 1706, "name": "delete", "variant": "signature", "kind": 4096, @@ -54915,14 +55093,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/tax-rate.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/tax-rate.ts", "line": 105, "character": 8 } ], "parameters": [ { - "id": 42776, + "id": 1707, "name": "id", "variant": "param", "kind": 32768, @@ -54941,7 +55119,7 @@ } }, { - "id": 42777, + "id": 1708, "name": "headers", "variant": "param", "kind": 32768, @@ -54958,7 +55136,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -54988,21 +55166,21 @@ ] }, { - "id": 42778, + "id": 1709, "name": "retrieve", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/tax-rate.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/tax-rate.ts", "line": 148, "character": 8 } ], "signatures": [ { - "id": 42779, + "id": 1710, "name": "retrieve", "variant": "signature", "kind": 4096, @@ -55061,14 +55239,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/tax-rate.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/tax-rate.ts", "line": 148, "character": 8 } ], "parameters": [ { - "id": 42780, + "id": 1711, "name": "id", "variant": "param", "kind": 32768, @@ -55087,7 +55265,7 @@ } }, { - "id": 42781, + "id": 1712, "name": "query", "variant": "param", "kind": 32768, @@ -55113,7 +55291,7 @@ } }, { - "id": 42782, + "id": 1713, "name": "headers", "variant": "param", "kind": 32768, @@ -55130,7 +55308,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -55160,21 +55338,21 @@ ] }, { - "id": 42783, + "id": 1714, "name": "list", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/tax-rate.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/tax-rate.ts", "line": 210, "character": 8 } ], "signatures": [ { - "id": 42784, + "id": 1715, "name": "list", "variant": "signature", "kind": 4096, @@ -55265,14 +55443,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/tax-rate.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/tax-rate.ts", "line": 210, "character": 8 } ], "parameters": [ { - "id": 42785, + "id": 1716, "name": "query", "variant": "param", "kind": 32768, @@ -55298,7 +55476,7 @@ } }, { - "id": 42786, + "id": 1717, "name": "headers", "variant": "param", "kind": 32768, @@ -55315,7 +55493,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -55349,43 +55527,43 @@ { "title": "Constructors", "children": [ - 42759 + 1690 ] }, { "title": "Properties", "children": [ - 42762 + 1693 ] }, { "title": "Methods", "children": [ - 42763, - 42768, - 42774, - 42778, - 42783 + 1694, + 1699, + 1705, + 1709, + 1714 ] } ], "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/tax-rate.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/tax-rate.ts", "line": 7, "character": 13 } ] }, { - "id": 42787, + "id": 1718, "name": "TaxRegion", "variant": "declaration", "kind": 128, "flags": {}, "children": [ { - "id": 42791, + "id": 1722, "name": "client", "variant": "declaration", "kind": 1024, @@ -55400,34 +55578,34 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/tax-region.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/tax-region.ts", "line": 16, "character": 10 } ], "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } }, { - "id": 42788, + "id": 1719, "name": "constructor", "variant": "declaration", "kind": 512, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/tax-region.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/tax-region.ts", "line": 20, "character": 2 } ], "signatures": [ { - "id": 42789, + "id": 1720, "name": "TaxRegion", "variant": "signature", "kind": 16384, @@ -55440,21 +55618,21 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/tax-region.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/tax-region.ts", "line": 20, "character": 2 } ], "parameters": [ { - "id": 42790, + "id": 1721, "name": "client", "variant": "param", "kind": 32768, "flags": {}, "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } @@ -55462,7 +55640,7 @@ ], "type": { "type": "reference", - "target": 42787, + "target": 1718, "name": "TaxRegion", "package": "@medusajs/js-sdk" } @@ -55470,21 +55648,21 @@ ] }, { - "id": 42792, + "id": 1723, "name": "create", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/tax-region.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/tax-region.ts", "line": 49, "character": 8 } ], "signatures": [ { - "id": 42793, + "id": 1724, "name": "create", "variant": "signature", "kind": 4096, @@ -55519,14 +55697,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/tax-region.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/tax-region.ts", "line": 49, "character": 8 } ], "parameters": [ { - "id": 42794, + "id": 1725, "name": "body", "variant": "param", "kind": 32768, @@ -55550,7 +55728,7 @@ } }, { - "id": 42795, + "id": 1726, "name": "query", "variant": "param", "kind": 32768, @@ -55576,7 +55754,7 @@ } }, { - "id": 42796, + "id": 1727, "name": "headers", "variant": "param", "kind": 32768, @@ -55593,7 +55771,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -55623,21 +55801,21 @@ ] }, { - "id": 42797, + "id": 1728, "name": "delete", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/tax-region.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/tax-region.ts", "line": 80, "character": 8 } ], "signatures": [ { - "id": 42798, + "id": 1729, "name": "delete", "variant": "signature", "kind": 4096, @@ -55672,14 +55850,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/tax-region.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/tax-region.ts", "line": 80, "character": 8 } ], "parameters": [ { - "id": 42799, + "id": 1730, "name": "id", "variant": "param", "kind": 32768, @@ -55698,7 +55876,7 @@ } }, { - "id": 42800, + "id": 1731, "name": "headers", "variant": "param", "kind": 32768, @@ -55715,7 +55893,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -55745,21 +55923,21 @@ ] }, { - "id": 42801, + "id": 1732, "name": "retrieve", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/tax-region.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/tax-region.ts", "line": 123, "character": 8 } ], "signatures": [ { - "id": 42802, + "id": 1733, "name": "retrieve", "variant": "signature", "kind": 4096, @@ -55818,14 +55996,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/tax-region.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/tax-region.ts", "line": 123, "character": 8 } ], "parameters": [ { - "id": 42803, + "id": 1734, "name": "id", "variant": "param", "kind": 32768, @@ -55844,7 +56022,7 @@ } }, { - "id": 42804, + "id": 1735, "name": "query", "variant": "param", "kind": 32768, @@ -55870,7 +56048,7 @@ } }, { - "id": 42805, + "id": 1736, "name": "headers", "variant": "param", "kind": 32768, @@ -55887,7 +56065,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -55917,21 +56095,21 @@ ] }, { - "id": 42806, + "id": 1737, "name": "list", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/tax-region.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/tax-region.ts", "line": 185, "character": 8 } ], "signatures": [ { - "id": 42807, + "id": 1738, "name": "list", "variant": "signature", "kind": 4096, @@ -56022,14 +56200,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/tax-region.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/tax-region.ts", "line": 185, "character": 8 } ], "parameters": [ { - "id": 42808, + "id": 1739, "name": "query", "variant": "param", "kind": 32768, @@ -56055,7 +56233,7 @@ } }, { - "id": 42809, + "id": 1740, "name": "headers", "variant": "param", "kind": 32768, @@ -56072,7 +56250,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -56106,42 +56284,42 @@ { "title": "Constructors", "children": [ - 42788 + 1719 ] }, { "title": "Properties", "children": [ - 42791 + 1722 ] }, { "title": "Methods", "children": [ - 42792, - 42797, - 42801, - 42806 + 1723, + 1728, + 1732, + 1737 ] } ], "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/tax-region.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/tax-region.ts", "line": 12, "character": 13 } ] }, { - "id": 41783, + "id": 714, "name": "Upload", "variant": "declaration", "kind": 128, "flags": {}, "children": [ { - "id": 41787, + "id": 718, "name": "client", "variant": "declaration", "kind": 1024, @@ -56156,34 +56334,34 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/upload.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/upload.ts", "line": 9, "character": 10 } ], "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } }, { - "id": 41784, + "id": 715, "name": "constructor", "variant": "declaration", "kind": 512, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/upload.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/upload.ts", "line": 13, "character": 2 } ], "signatures": [ { - "id": 41785, + "id": 716, "name": "Upload", "variant": "signature", "kind": 16384, @@ -56196,21 +56374,21 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/upload.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/upload.ts", "line": 13, "character": 2 } ], "parameters": [ { - "id": 41786, + "id": 717, "name": "client", "variant": "param", "kind": 32768, "flags": {}, "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } @@ -56218,7 +56396,7 @@ ], "type": { "type": "reference", - "target": 41783, + "target": 714, "name": "Upload", "package": "@medusajs/js-sdk" } @@ -56226,21 +56404,21 @@ ] }, { - "id": 41788, + "id": 719, "name": "create", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/upload.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/upload.ts", "line": 49, "character": 8 } ], "signatures": [ { - "id": 41789, + "id": 720, "name": "create", "variant": "signature", "kind": 4096, @@ -56275,14 +56453,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/upload.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/upload.ts", "line": 49, "character": 8 } ], "parameters": [ { - "id": 41790, + "id": 721, "name": "body", "variant": "param", "kind": 32768, @@ -56306,7 +56484,7 @@ } }, { - "id": 41791, + "id": 722, "name": "query", "variant": "param", "kind": 32768, @@ -56332,7 +56510,7 @@ } }, { - "id": 41792, + "id": 723, "name": "headers", "variant": "param", "kind": 32768, @@ -56349,7 +56527,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -56379,21 +56557,21 @@ ] }, { - "id": 41793, + "id": 724, "name": "retrieve", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/upload.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/upload.ts", "line": 104, "character": 8 } ], "signatures": [ { - "id": 41794, + "id": 725, "name": "retrieve", "variant": "signature", "kind": 4096, @@ -56428,14 +56606,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/upload.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/upload.ts", "line": 104, "character": 8 } ], "parameters": [ { - "id": 41795, + "id": 726, "name": "id", "variant": "param", "kind": 32768, @@ -56454,7 +56632,7 @@ } }, { - "id": 41796, + "id": 727, "name": "query", "variant": "param", "kind": 32768, @@ -56480,7 +56658,7 @@ } }, { - "id": 41797, + "id": 728, "name": "headers", "variant": "param", "kind": 32768, @@ -56497,7 +56675,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -56527,21 +56705,21 @@ ] }, { - "id": 41798, + "id": 729, "name": "delete", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/upload.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/upload.ts", "line": 129, "character": 8 } ], "signatures": [ { - "id": 41799, + "id": 730, "name": "delete", "variant": "signature", "kind": 4096, @@ -56576,14 +56754,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/upload.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/upload.ts", "line": 129, "character": 8 } ], "parameters": [ { - "id": 41800, + "id": 731, "name": "id", "variant": "param", "kind": 32768, @@ -56602,7 +56780,7 @@ } }, { - "id": 41801, + "id": 732, "name": "headers", "variant": "param", "kind": 32768, @@ -56619,7 +56797,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -56653,41 +56831,41 @@ { "title": "Constructors", "children": [ - 41784 + 715 ] }, { "title": "Properties", "children": [ - 41787 + 718 ] }, { "title": "Methods", "children": [ - 41788, - 41793, - 41798 + 719, + 724, + 729 ] } ], "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/upload.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/upload.ts", "line": 5, "character": 13 } ] }, { - "id": 42859, + "id": 1790, "name": "User", "variant": "declaration", "kind": 128, "flags": {}, "children": [ { - "id": 42863, + "id": 1794, "name": "client", "variant": "declaration", "kind": 1024, @@ -56702,34 +56880,34 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/user.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/user.ts", "line": 9, "character": 10 } ], "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } }, { - "id": 42860, + "id": 1791, "name": "constructor", "variant": "declaration", "kind": 512, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/user.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/user.ts", "line": 13, "character": 2 } ], "signatures": [ { - "id": 42861, + "id": 1792, "name": "User", "variant": "signature", "kind": 16384, @@ -56742,21 +56920,21 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/user.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/user.ts", "line": 13, "character": 2 } ], "parameters": [ { - "id": 42862, + "id": 1793, "name": "client", "variant": "param", "kind": 32768, "flags": {}, "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } @@ -56764,7 +56942,7 @@ ], "type": { "type": "reference", - "target": 42859, + "target": 1790, "name": "User", "package": "@medusajs/js-sdk" } @@ -56772,21 +56950,21 @@ ] }, { - "id": 42864, + "id": 1795, "name": "update", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/user.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/user.ts", "line": 37, "character": 8 } ], "signatures": [ { - "id": 42865, + "id": 1796, "name": "update", "variant": "signature", "kind": 4096, @@ -56821,14 +56999,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/user.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/user.ts", "line": 37, "character": 8 } ], "parameters": [ { - "id": 42866, + "id": 1797, "name": "id", "variant": "param", "kind": 32768, @@ -56847,7 +57025,7 @@ } }, { - "id": 42867, + "id": 1798, "name": "body", "variant": "param", "kind": 32768, @@ -56871,7 +57049,7 @@ } }, { - "id": 42868, + "id": 1799, "name": "query", "variant": "param", "kind": 32768, @@ -56897,7 +57075,7 @@ } }, { - "id": 42869, + "id": 1800, "name": "headers", "variant": "param", "kind": 32768, @@ -56914,7 +57092,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -56944,21 +57122,21 @@ ] }, { - "id": 42870, + "id": 1801, "name": "list", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/user.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/user.ts", "line": 101, "character": 8 } ], "signatures": [ { - "id": 42871, + "id": 1802, "name": "list", "variant": "signature", "kind": 4096, @@ -57049,14 +57227,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/user.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/user.ts", "line": 101, "character": 8 } ], "parameters": [ { - "id": 42872, + "id": 1803, "name": "queryParams", "variant": "param", "kind": 32768, @@ -57082,7 +57260,7 @@ } }, { - "id": 42873, + "id": 1804, "name": "headers", "variant": "param", "kind": 32768, @@ -57099,7 +57277,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -57129,21 +57307,21 @@ ] }, { - "id": 42874, + "id": 1805, "name": "retrieve", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/user.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/user.ts", "line": 144, "character": 8 } ], "signatures": [ { - "id": 42875, + "id": 1806, "name": "retrieve", "variant": "signature", "kind": 4096, @@ -57202,14 +57380,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/user.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/user.ts", "line": 144, "character": 8 } ], "parameters": [ { - "id": 42876, + "id": 1807, "name": "id", "variant": "param", "kind": 32768, @@ -57228,7 +57406,7 @@ } }, { - "id": 42877, + "id": 1808, "name": "query", "variant": "param", "kind": 32768, @@ -57254,7 +57432,7 @@ } }, { - "id": 42878, + "id": 1809, "name": "headers", "variant": "param", "kind": 32768, @@ -57271,7 +57449,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -57301,21 +57479,21 @@ ] }, { - "id": 42879, + "id": 1810, "name": "delete", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/user.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/user.ts", "line": 173, "character": 8 } ], "signatures": [ { - "id": 42880, + "id": 1811, "name": "delete", "variant": "signature", "kind": 4096, @@ -57350,14 +57528,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/user.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/user.ts", "line": 173, "character": 8 } ], "parameters": [ { - "id": 42881, + "id": 1812, "name": "id", "variant": "param", "kind": 32768, @@ -57376,7 +57554,7 @@ } }, { - "id": 42882, + "id": 1813, "name": "headers", "variant": "param", "kind": 32768, @@ -57393,7 +57571,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -57423,21 +57601,21 @@ ] }, { - "id": 42883, + "id": 1814, "name": "me", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/user.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/user.ts", "line": 215, "character": 8 } ], "signatures": [ { - "id": 42884, + "id": 1815, "name": "me", "variant": "signature", "kind": 4096, @@ -57496,14 +57674,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/user.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/user.ts", "line": 215, "character": 8 } ], "parameters": [ { - "id": 42885, + "id": 1816, "name": "query", "variant": "param", "kind": 32768, @@ -57529,7 +57707,7 @@ } }, { - "id": 42886, + "id": 1817, "name": "headers", "variant": "param", "kind": 32768, @@ -57546,7 +57724,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -57580,43 +57758,43 @@ { "title": "Constructors", "children": [ - 42860 + 1791 ] }, { "title": "Properties", "children": [ - 42863 + 1794 ] }, { "title": "Methods", "children": [ - 42864, - 42870, - 42874, - 42879, - 42883 + 1795, + 1801, + 1805, + 1810, + 1814 ] } ], "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/user.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/user.ts", "line": 5, "character": 13 } ] }, { - "id": 43006, + "id": 1937, "name": "WorkflowExecution", "variant": "declaration", "kind": 128, "flags": {}, "children": [ { - "id": 43010, + "id": 1941, "name": "client", "variant": "declaration", "kind": 1024, @@ -57631,34 +57809,34 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/workflow-execution.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/workflow-execution.ts", "line": 9, "character": 10 } ], "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } }, { - "id": 43007, + "id": 1938, "name": "constructor", "variant": "declaration", "kind": 512, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/workflow-execution.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/workflow-execution.ts", "line": 13, "character": 2 } ], "signatures": [ { - "id": 43008, + "id": 1939, "name": "WorkflowExecution", "variant": "signature", "kind": 16384, @@ -57671,21 +57849,21 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/workflow-execution.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/workflow-execution.ts", "line": 13, "character": 2 } ], "parameters": [ { - "id": 43009, + "id": 1940, "name": "client", "variant": "param", "kind": 32768, "flags": {}, "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } @@ -57693,7 +57871,7 @@ ], "type": { "type": "reference", - "target": 43006, + "target": 1937, "name": "WorkflowExecution", "package": "@medusajs/js-sdk" } @@ -57701,21 +57879,21 @@ ] }, { - "id": 43011, + "id": 1942, "name": "list", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/workflow-execution.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/workflow-execution.ts", "line": 64, "character": 8 } ], "signatures": [ { - "id": 43012, + "id": 1943, "name": "list", "variant": "signature", "kind": 4096, @@ -57806,14 +57984,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/workflow-execution.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/workflow-execution.ts", "line": 64, "character": 8 } ], "parameters": [ { - "id": 43013, + "id": 1944, "name": "queryParams", "variant": "param", "kind": 32768, @@ -57839,7 +58017,7 @@ } }, { - "id": 43014, + "id": 1945, "name": "headers", "variant": "param", "kind": 32768, @@ -57856,7 +58034,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -57886,21 +58064,21 @@ ] }, { - "id": 43015, + "id": 1946, "name": "retrieve", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/workflow-execution.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/workflow-execution.ts", "line": 92, "character": 8 } ], "signatures": [ { - "id": 43016, + "id": 1947, "name": "retrieve", "variant": "signature", "kind": 4096, @@ -57935,14 +58113,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/workflow-execution.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/workflow-execution.ts", "line": 92, "character": 8 } ], "parameters": [ { - "id": 43017, + "id": 1948, "name": "id", "variant": "param", "kind": 32768, @@ -57961,7 +58139,7 @@ } }, { - "id": 43018, + "id": 1949, "name": "headers", "variant": "param", "kind": 32768, @@ -57978,7 +58156,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -58012,40 +58190,40 @@ { "title": "Constructors", "children": [ - 43007 + 1938 ] }, { "title": "Properties", "children": [ - 43010 + 1941 ] }, { "title": "Methods", "children": [ - 43011, - 43015 + 1942, + 1946 ] } ], "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/admin/workflow-execution.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/admin/workflow-execution.ts", "line": 5, "character": 13 } ] }, { - "id": 43184, + "id": 2115, "name": "Client", "variant": "declaration", "kind": 128, "flags": {}, "children": [ { - "id": 43188, + "id": 2119, "name": "fetch_", "variant": "declaration", "kind": 1024, @@ -58054,20 +58232,20 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/client.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/client.ts", "line": 108, "character": 9 } ], "type": { "type": "reference", - "target": 43257, + "target": 2188, "name": "ClientFetch", "package": "@medusajs/js-sdk" } }, { - "id": 43189, + "id": 2120, "name": "config", "variant": "declaration", "kind": 1024, @@ -58076,20 +58254,20 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/client.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/client.ts", "line": 109, "character": 10 } ], "type": { "type": "reference", - "target": 43242, + "target": 2173, "name": "Config", "package": "@medusajs/js-sdk" } }, { - "id": 43190, + "id": 2121, "name": "logger", "variant": "declaration", "kind": 1024, @@ -58098,20 +58276,20 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/client.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/client.ts", "line": 110, "character": 10 } ], "type": { "type": "reference", - "target": 43262, + "target": 2193, "name": "Logger", "package": "@medusajs/js-sdk" } }, { - "id": 43191, + "id": 2122, "name": "DEFAULT_JWT_STORAGE_KEY", "variant": "declaration", "kind": 1024, @@ -58120,7 +58298,7 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/client.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/client.ts", "line": 112, "character": 10 } @@ -58132,7 +58310,7 @@ "defaultValue": "\"medusa_auth_token\"" }, { - "id": 43192, + "id": 2123, "name": "token", "variant": "declaration", "kind": 1024, @@ -58141,7 +58319,7 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/client.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/client.ts", "line": 113, "character": 10 } @@ -58153,42 +58331,42 @@ "defaultValue": "\"\"" }, { - "id": 43185, + "id": 2116, "name": "constructor", "variant": "declaration", "kind": 512, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/client.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/client.ts", "line": 115, "character": 2 } ], "signatures": [ { - "id": 43186, + "id": 2117, "name": "Client", "variant": "signature", "kind": 16384, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/client.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/client.ts", "line": 115, "character": 2 } ], "parameters": [ { - "id": 43187, + "id": 2118, "name": "config", "variant": "param", "kind": 32768, "flags": {}, "type": { "type": "reference", - "target": 43242, + "target": 2173, "name": "Config", "package": "@medusajs/js-sdk" } @@ -58196,7 +58374,7 @@ ], "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } @@ -58204,21 +58382,21 @@ ] }, { - "id": 43193, + "id": 2124, "name": "fetch", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/client.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/client.ts", "line": 144, "character": 2 } ], "signatures": [ { - "id": 43194, + "id": 2125, "name": "fetch", "variant": "signature", "kind": 4096, @@ -58312,14 +58490,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/client.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/client.ts", "line": 144, "character": 2 } ], "typeParameters": [ { - "id": 43195, + "id": 2126, "name": "T", "variant": "typeParam", "kind": 131072, @@ -58332,7 +58510,7 @@ ], "parameters": [ { - "id": 43196, + "id": 2127, "name": "input", "variant": "param", "kind": 32768, @@ -58366,7 +58544,7 @@ } }, { - "id": 43197, + "id": 2128, "name": "init", "variant": "param", "kind": 32768, @@ -58375,7 +58553,7 @@ }, "type": { "type": "reference", - "target": 43280, + "target": 2211, "name": "FetchArgs", "package": "@medusajs/js-sdk" } @@ -58390,7 +58568,7 @@ "typeArguments": [ { "type": "reference", - "target": 43195, + "target": 2126, "name": "T", "package": "@medusajs/js-sdk", "refersToTypeParameter": true @@ -58403,21 +58581,21 @@ ] }, { - "id": 43198, + "id": 2129, "name": "fetchStream", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/client.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/client.ts", "line": 158, "character": 8 } ], "signatures": [ { - "id": 43199, + "id": 2130, "name": "fetchStream", "variant": "signature", "kind": 4096, @@ -58471,14 +58649,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/client.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/client.ts", "line": 158, "character": 8 } ], "parameters": [ { - "id": 43200, + "id": 2131, "name": "input", "variant": "param", "kind": 32768, @@ -58512,7 +58690,7 @@ } }, { - "id": 43201, + "id": 2132, "name": "init", "variant": "param", "kind": 32768, @@ -58521,7 +58699,7 @@ }, "type": { "type": "reference", - "target": 43280, + "target": 2211, "name": "FetchArgs", "package": "@medusajs/js-sdk" } @@ -58536,7 +58714,7 @@ "typeArguments": [ { "type": "reference", - "target": 43285, + "target": 2216, "name": "FetchStreamResponse", "package": "@medusajs/js-sdk" } @@ -58548,35 +58726,35 @@ ] }, { - "id": 43202, + "id": 2133, "name": "setToken", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/client.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/client.ts", "line": 178, "character": 8 } ], "signatures": [ { - "id": 43203, + "id": 2134, "name": "setToken", "variant": "signature", "kind": 4096, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/client.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/client.ts", "line": 178, "character": 8 } ], "parameters": [ { - "id": 43204, + "id": 2135, "name": "token", "variant": "param", "kind": 32768, @@ -58606,28 +58784,28 @@ ] }, { - "id": 43205, + "id": 2136, "name": "clearToken", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/client.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/client.ts", "line": 182, "character": 8 } ], "signatures": [ { - "id": 43206, + "id": 2137, "name": "clearToken", "variant": "signature", "kind": 4096, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/client.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/client.ts", "line": 182, "character": 8 } @@ -58651,7 +58829,7 @@ ] }, { - "id": 43207, + "id": 2138, "name": "clearToken_", "variant": "declaration", "kind": 2048, @@ -58660,21 +58838,21 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/client.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/client.ts", "line": 186, "character": 18 } ], "signatures": [ { - "id": 43208, + "id": 2139, "name": "clearToken_", "variant": "signature", "kind": 4096, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/client.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/client.ts", "line": 186, "character": 18 } @@ -58698,7 +58876,7 @@ ] }, { - "id": 43209, + "id": 2140, "name": "initClient", "variant": "declaration", "kind": 2048, @@ -58707,28 +58885,28 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/client.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/client.ts", "line": 208, "character": 12 } ], "signatures": [ { - "id": 43210, + "id": 2141, "name": "initClient", "variant": "signature", "kind": 4096, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/client.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/client.ts", "line": 208, "character": 12 } ], "type": { "type": "reference", - "target": 43257, + "target": 2188, "name": "ClientFetch", "package": "@medusajs/js-sdk" } @@ -58736,7 +58914,7 @@ ] }, { - "id": 43211, + "id": 2142, "name": "getApiKeyHeader_", "variant": "declaration", "kind": 2048, @@ -58745,21 +58923,21 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/client.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/client.ts", "line": 271, "character": 12 } ], "signatures": [ { - "id": 43212, + "id": 2143, "name": "getApiKeyHeader_", "variant": "signature", "kind": 4096, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/client.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/client.ts", "line": 271, "character": 31 } @@ -58770,7 +58948,7 @@ { "type": "reflection", "declaration": { - "id": 43213, + "id": 2144, "name": "__type", "variant": "declaration", "kind": 65536, @@ -58780,21 +58958,21 @@ { "type": "reflection", "declaration": { - "id": 43214, + "id": 2145, "name": "__type", "variant": "declaration", "kind": 65536, "flags": {}, "children": [ { - "id": 43215, + "id": 2146, "name": "Authorization", "variant": "declaration", "kind": 1024, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/client.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/client.ts", "line": 271, "character": 37 } @@ -58809,13 +58987,13 @@ { "title": "Properties", "children": [ - 43215 + 2146 ] } ], "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/client.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/client.ts", "line": 271, "character": 35 } @@ -58828,7 +59006,7 @@ ] }, { - "id": 43216, + "id": 2147, "name": "getPublishableKeyHeader_", "variant": "declaration", "kind": 2048, @@ -58837,21 +59015,21 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/client.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/client.ts", "line": 277, "character": 12 } ], "signatures": [ { - "id": 43217, + "id": 2148, "name": "getPublishableKeyHeader_", "variant": "signature", "kind": 4096, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/client.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/client.ts", "line": 277, "character": 39 } @@ -58862,7 +59040,7 @@ { "type": "reflection", "declaration": { - "id": 43218, + "id": 2149, "name": "__type", "variant": "declaration", "kind": 65536, @@ -58872,21 +59050,21 @@ { "type": "reflection", "declaration": { - "id": 43219, + "id": 2150, "name": "__type", "variant": "declaration", "kind": 65536, "flags": {}, "children": [ { - "id": 43220, + "id": 2151, "name": "x-publishable-api-key", "variant": "declaration", "kind": 1024, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/client.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/client.ts", "line": 278, "character": 8 } @@ -58901,13 +59079,13 @@ { "title": "Properties", "children": [ - 43220 + 2151 ] } ], "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/client.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/client.ts", "line": 278, "character": 6 } @@ -58920,7 +59098,7 @@ ] }, { - "id": 43221, + "id": 2152, "name": "getJwtHeader_", "variant": "declaration", "kind": 2048, @@ -58929,21 +59107,21 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/client.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/client.ts", "line": 285, "character": 18 } ], "signatures": [ { - "id": 43222, + "id": 2153, "name": "getJwtHeader_", "variant": "signature", "kind": 4096, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/client.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/client.ts", "line": 285, "character": 18 } @@ -58961,7 +59139,7 @@ { "type": "reflection", "declaration": { - "id": 43223, + "id": 2154, "name": "__type", "variant": "declaration", "kind": 65536, @@ -58971,21 +59149,21 @@ { "type": "reflection", "declaration": { - "id": 43224, + "id": 2155, "name": "__type", "variant": "declaration", "kind": 65536, "flags": {}, "children": [ { - "id": 43225, + "id": 2156, "name": "Authorization", "variant": "declaration", "kind": 1024, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/client.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/client.ts", "line": 285, "character": 45 } @@ -59000,13 +59178,13 @@ { "title": "Properties", "children": [ - 43225 + 2156 ] } ], "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/client.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/client.ts", "line": 285, "character": 43 } @@ -59023,7 +59201,7 @@ ] }, { - "id": 43226, + "id": 2157, "name": "setToken_", "variant": "declaration", "kind": 2048, @@ -59032,28 +59210,28 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/client.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/client.ts", "line": 295, "character": 18 } ], "signatures": [ { - "id": 43227, + "id": 2158, "name": "setToken_", "variant": "signature", "kind": 4096, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/client.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/client.ts", "line": 295, "character": 18 } ], "parameters": [ { - "id": 43228, + "id": 2159, "name": "token", "variant": "param", "kind": 32768, @@ -59083,7 +59261,7 @@ ] }, { - "id": 43229, + "id": 2160, "name": "getToken_", "variant": "declaration", "kind": 2048, @@ -59092,21 +59270,21 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/client.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/client.ts", "line": 317, "character": 18 } ], "signatures": [ { - "id": 43230, + "id": 2161, "name": "getToken_", "variant": "signature", "kind": 4096, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/client.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/client.ts", "line": 317, "character": 18 } @@ -59143,7 +59321,7 @@ ] }, { - "id": 43231, + "id": 2162, "name": "getTokenStorageInfo_", "variant": "declaration", "kind": 2048, @@ -59152,21 +59330,21 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/client.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/client.ts", "line": 337, "character": 12 } ], "signatures": [ { - "id": 43232, + "id": 2163, "name": "getTokenStorageInfo_", "variant": "signature", "kind": 4096, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/client.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/client.ts", "line": 337, "character": 35 } @@ -59174,21 +59352,21 @@ "type": { "type": "reflection", "declaration": { - "id": 43233, + "id": 2164, "name": "__type", "variant": "declaration", "kind": 65536, "flags": {}, "children": [ { - "id": 43234, + "id": 2165, "name": "storageMethod", "variant": "declaration", "kind": 1024, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/client.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/client.ts", "line": 359, "character": 6 } @@ -59220,14 +59398,14 @@ } }, { - "id": 43235, + "id": 2166, "name": "storageKey", "variant": "declaration", "kind": 1024, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/client.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/client.ts", "line": 360, "character": 6 } @@ -59242,14 +59420,14 @@ { "title": "Properties", "children": [ - 43234, - 43235 + 2165, + 2166 ] } ], "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/client.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/client.ts", "line": 358, "character": 11 } @@ -59260,7 +59438,7 @@ ] }, { - "id": 43236, + "id": 2167, "name": "throwError_", "variant": "declaration", "kind": 2048, @@ -59269,28 +59447,28 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/client.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/client.ts", "line": 364, "character": 12 } ], "signatures": [ { - "id": 43237, + "id": 2168, "name": "throwError_", "variant": "signature", "kind": 4096, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/client.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/client.ts", "line": 364, "character": 12 } ], "parameters": [ { - "id": 43238, + "id": 2169, "name": "message", "variant": "param", "kind": 32768, @@ -59313,55 +59491,55 @@ { "title": "Constructors", "children": [ - 43185 + 2116 ] }, { "title": "Properties", "children": [ - 43188, - 43189, - 43190, - 43191, - 43192 + 2119, + 2120, + 2121, + 2122, + 2123 ] }, { "title": "Methods", "children": [ - 43193, - 43198, - 43202, - 43205, - 43207, - 43209, - 43211, - 43216, - 43221, - 43226, - 43229, - 43231, - 43236 + 2124, + 2129, + 2133, + 2136, + 2138, + 2140, + 2142, + 2147, + 2152, + 2157, + 2160, + 2162, + 2167 ] } ], "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/client.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/client.ts", "line": 107, "character": 13 } ] }, { - "id": 43262, + "id": 2193, "name": "Logger", "variant": "declaration", "kind": 2097152, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/types.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/types.ts", "line": 1, "character": 12 } @@ -59369,21 +59547,21 @@ "type": { "type": "reflection", "declaration": { - "id": 43263, + "id": 2194, "name": "__type", "variant": "declaration", "kind": 65536, "flags": {}, "children": [ { - "id": 43264, + "id": 2195, "name": "error", "variant": "declaration", "kind": 1024, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/types.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/types.ts", "line": 2, "character": 2 } @@ -59391,28 +59569,28 @@ "type": { "type": "reflection", "declaration": { - "id": 43265, + "id": 2196, "name": "__type", "variant": "declaration", "kind": 65536, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/types.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/types.ts", "line": 2, "character": 9 } ], "signatures": [ { - "id": 43266, + "id": 2197, "name": "__type", "variant": "signature", "kind": 4096, "flags": {}, "parameters": [ { - "id": 43267, + "id": 2198, "name": "messages", "variant": "param", "kind": 32768, @@ -59438,14 +59616,14 @@ } }, { - "id": 43268, + "id": 2199, "name": "warn", "variant": "declaration", "kind": 1024, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/types.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/types.ts", "line": 3, "character": 2 } @@ -59453,28 +59631,28 @@ "type": { "type": "reflection", "declaration": { - "id": 43269, + "id": 2200, "name": "__type", "variant": "declaration", "kind": 65536, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/types.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/types.ts", "line": 3, "character": 8 } ], "signatures": [ { - "id": 43270, + "id": 2201, "name": "__type", "variant": "signature", "kind": 4096, "flags": {}, "parameters": [ { - "id": 43271, + "id": 2202, "name": "messages", "variant": "param", "kind": 32768, @@ -59500,14 +59678,14 @@ } }, { - "id": 43272, + "id": 2203, "name": "info", "variant": "declaration", "kind": 1024, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/types.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/types.ts", "line": 4, "character": 2 } @@ -59515,28 +59693,28 @@ "type": { "type": "reflection", "declaration": { - "id": 43273, + "id": 2204, "name": "__type", "variant": "declaration", "kind": 65536, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/types.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/types.ts", "line": 4, "character": 8 } ], "signatures": [ { - "id": 43274, + "id": 2205, "name": "__type", "variant": "signature", "kind": 4096, "flags": {}, "parameters": [ { - "id": 43275, + "id": 2206, "name": "messages", "variant": "param", "kind": 32768, @@ -59562,14 +59740,14 @@ } }, { - "id": 43276, + "id": 2207, "name": "debug", "variant": "declaration", "kind": 1024, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/types.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/types.ts", "line": 5, "character": 2 } @@ -59577,28 +59755,28 @@ "type": { "type": "reflection", "declaration": { - "id": 43277, + "id": 2208, "name": "__type", "variant": "declaration", "kind": 65536, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/types.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/types.ts", "line": 5, "character": 9 } ], "signatures": [ { - "id": 43278, + "id": 2209, "name": "__type", "variant": "signature", "kind": 4096, "flags": {}, "parameters": [ { - "id": 43279, + "id": 2210, "name": "messages", "variant": "param", "kind": 32768, @@ -59628,16 +59806,16 @@ { "title": "Properties", "children": [ - 43264, - 43268, - 43272, - 43276 + 2195, + 2199, + 2203, + 2207 ] } ], "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/types.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/types.ts", "line": 1, "character": 21 } @@ -59646,14 +59824,14 @@ } }, { - "id": 43242, + "id": 2173, "name": "Config", "variant": "declaration", "kind": 2097152, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/types.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/types.ts", "line": 8, "character": 12 } @@ -59661,21 +59839,21 @@ "type": { "type": "reflection", "declaration": { - "id": 43243, + "id": 2174, "name": "__type", "variant": "declaration", "kind": 65536, "flags": {}, "children": [ { - "id": 43244, + "id": 2175, "name": "baseUrl", "variant": "declaration", "kind": 1024, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/types.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/types.ts", "line": 9, "character": 2 } @@ -59686,7 +59864,7 @@ } }, { - "id": 43245, + "id": 2176, "name": "globalHeaders", "variant": "declaration", "kind": 1024, @@ -59695,20 +59873,20 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/types.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/types.ts", "line": 10, "character": 2 } ], "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } }, { - "id": 43246, + "id": 2177, "name": "publishableKey", "variant": "declaration", "kind": 1024, @@ -59717,7 +59895,7 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/types.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/types.ts", "line": 11, "character": 2 } @@ -59728,7 +59906,7 @@ } }, { - "id": 43247, + "id": 2178, "name": "apiKey", "variant": "declaration", "kind": 1024, @@ -59737,7 +59915,7 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/types.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/types.ts", "line": 12, "character": 2 } @@ -59748,7 +59926,7 @@ } }, { - "id": 43248, + "id": 2179, "name": "auth", "variant": "declaration", "kind": 1024, @@ -59757,7 +59935,7 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/types.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/types.ts", "line": 13, "character": 2 } @@ -59765,14 +59943,14 @@ "type": { "type": "reflection", "declaration": { - "id": 43249, + "id": 2180, "name": "__type", "variant": "declaration", "kind": 65536, "flags": {}, "children": [ { - "id": 43250, + "id": 2181, "name": "type", "variant": "declaration", "kind": 1024, @@ -59781,7 +59959,7 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/types.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/types.ts", "line": 14, "character": 4 } @@ -59801,7 +59979,7 @@ } }, { - "id": 43251, + "id": 2182, "name": "jwtTokenStorageKey", "variant": "declaration", "kind": 1024, @@ -59810,7 +59988,7 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/types.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/types.ts", "line": 15, "character": 4 } @@ -59821,7 +59999,7 @@ } }, { - "id": 43252, + "id": 2183, "name": "jwtTokenStorageMethod", "variant": "declaration", "kind": 1024, @@ -59830,7 +60008,7 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/types.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/types.ts", "line": 16, "character": 4 } @@ -59862,7 +60040,7 @@ } }, { - "id": 43253, + "id": 2184, "name": "fetchCredentials", "variant": "declaration", "kind": 1024, @@ -59871,7 +60049,7 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/types.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/types.ts", "line": 17, "character": 4 } @@ -59895,7 +60073,7 @@ } }, { - "id": 43254, + "id": 2185, "name": "storage", "variant": "declaration", "kind": 1024, @@ -59904,14 +60082,14 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/types.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/types.ts", "line": 18, "character": 4 } ], "type": { "type": "reference", - "target": 43290, + "target": 2221, "name": "CustomStorage", "package": "@medusajs/js-sdk" } @@ -59921,17 +60099,17 @@ { "title": "Properties", "children": [ - 43250, - 43251, - 43252, - 43253, - 43254 + 2181, + 2182, + 2183, + 2184, + 2185 ] } ], "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/types.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/types.ts", "line": 13, "character": 9 } @@ -59940,7 +60118,7 @@ } }, { - "id": 43255, + "id": 2186, "name": "logger", "variant": "declaration", "kind": 1024, @@ -59949,20 +60127,20 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/types.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/types.ts", "line": 20, "character": 2 } ], "type": { "type": "reference", - "target": 43262, + "target": 2193, "name": "Logger", "package": "@medusajs/js-sdk" } }, { - "id": 43256, + "id": 2187, "name": "debug", "variant": "declaration", "kind": 1024, @@ -59971,7 +60149,7 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/types.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/types.ts", "line": 21, "character": 2 } @@ -59986,19 +60164,19 @@ { "title": "Properties", "children": [ - 43244, - 43245, - 43246, - 43247, - 43248, - 43255, - 43256 + 2175, + 2176, + 2177, + 2178, + 2179, + 2186, + 2187 ] } ], "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/types.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/types.ts", "line": 8, "character": 21 } @@ -60007,21 +60185,21 @@ } }, { - "id": 43308, + "id": 2239, "name": "Awaitable", "variant": "declaration", "kind": 2097152, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/types.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/types.ts", "line": 24, "character": 12 } ], "typeParameters": [ { - "id": 43309, + "id": 2240, "name": "T", "variant": "typeParam", "kind": 131072, @@ -60033,7 +60211,7 @@ "types": [ { "type": "reference", - "target": 43309, + "target": 2240, "name": "T", "package": "@medusajs/js-sdk", "refersToTypeParameter": true @@ -60047,7 +60225,7 @@ "typeArguments": [ { "type": "reference", - "target": 43309, + "target": 2240, "name": "T", "package": "@medusajs/js-sdk", "refersToTypeParameter": true @@ -60060,42 +60238,42 @@ } }, { - "id": 43290, + "id": 2221, "name": "CustomStorage", "variant": "declaration", "kind": 256, "flags": {}, "children": [ { - "id": 43291, + "id": 2222, "name": "getItem", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/types.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/types.ts", "line": 27, "character": 2 } ], "signatures": [ { - "id": 43292, + "id": 2223, "name": "getItem", "variant": "signature", "kind": 4096, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/types.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/types.ts", "line": 27, "character": 2 } ], "parameters": [ { - "id": 43293, + "id": 2224, "name": "key", "variant": "param", "kind": 32768, @@ -60108,7 +60286,7 @@ ], "type": { "type": "reference", - "target": 43308, + "target": 2239, "typeArguments": [ { "type": "union", @@ -60131,35 +60309,35 @@ ] }, { - "id": 43294, + "id": 2225, "name": "setItem", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/types.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/types.ts", "line": 28, "character": 2 } ], "signatures": [ { - "id": 43295, + "id": 2226, "name": "setItem", "variant": "signature", "kind": 4096, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/types.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/types.ts", "line": 28, "character": 2 } ], "parameters": [ { - "id": 43296, + "id": 2227, "name": "key", "variant": "param", "kind": 32768, @@ -60170,7 +60348,7 @@ } }, { - "id": 43297, + "id": 2228, "name": "value", "variant": "param", "kind": 32768, @@ -60183,7 +60361,7 @@ ], "type": { "type": "reference", - "target": 43308, + "target": 2239, "typeArguments": [ { "type": "intrinsic", @@ -60197,35 +60375,35 @@ ] }, { - "id": 43298, + "id": 2229, "name": "removeItem", "variant": "declaration", "kind": 2048, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/types.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/types.ts", "line": 29, "character": 2 } ], "signatures": [ { - "id": 43299, + "id": 2230, "name": "removeItem", "variant": "signature", "kind": 4096, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/types.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/types.ts", "line": 29, "character": 2 } ], "parameters": [ { - "id": 43300, + "id": 2231, "name": "key", "variant": "param", "kind": 32768, @@ -60238,7 +60416,7 @@ ], "type": { "type": "reference", - "target": 43308, + "target": 2239, "typeArguments": [ { "type": "intrinsic", @@ -60256,29 +60434,29 @@ { "title": "Methods", "children": [ - 43291, - 43294, - 43298 + 2222, + 2225, + 2229 ] } ], "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/types.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/types.ts", "line": 26, "character": 17 } ] }, { - "id": 43310, + "id": 2241, "name": "FetchParams", "variant": "declaration", "kind": 2097152, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/types.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/types.ts", "line": 32, "character": 12 } @@ -60309,14 +60487,14 @@ } }, { - "id": 43239, + "id": 2170, "name": "ClientHeaders", "variant": "declaration", "kind": 2097152, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/types.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/types.ts", "line": 34, "character": 12 } @@ -60346,14 +60524,14 @@ { "type": "reflection", "declaration": { - "id": 43240, + "id": 2171, "name": "__type", "variant": "declaration", "kind": 65536, "flags": {}, "children": [ { - "id": 43241, + "id": 2172, "name": "tags", "variant": "declaration", "kind": 1024, @@ -60368,7 +60546,7 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/types.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/types.ts", "line": 44, "character": 6 } @@ -60386,13 +60564,13 @@ { "title": "Properties", "children": [ - 43241 + 2172 ] } ], "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/types.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/types.ts", "line": 38, "character": 4 } @@ -60407,14 +60585,14 @@ } }, { - "id": 43301, + "id": 2232, "name": "FetchInput", "variant": "declaration", "kind": 2097152, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/types.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/types.ts", "line": 48, "character": 12 } @@ -60427,21 +60605,21 @@ }, "objectType": { "type": "reference", - "target": 43310, + "target": 2241, "name": "FetchParams", "package": "@medusajs/js-sdk" } } }, { - "id": 43280, + "id": 2211, "name": "FetchArgs", "variant": "declaration", "kind": 2097152, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/types.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/types.ts", "line": 50, "character": 12 } @@ -60485,14 +60663,14 @@ { "type": "reflection", "declaration": { - "id": 43281, + "id": 2212, "name": "__type", "variant": "declaration", "kind": 65536, "flags": {}, "children": [ { - "id": 43282, + "id": 2213, "name": "query", "variant": "declaration", "kind": 1024, @@ -60501,7 +60679,7 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/types.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/types.ts", "line": 51, "character": 2 } @@ -60527,7 +60705,7 @@ } }, { - "id": 43283, + "id": 2214, "name": "headers", "variant": "declaration", "kind": 1024, @@ -60536,20 +60714,20 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/types.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/types.ts", "line": 52, "character": 2 } ], "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } }, { - "id": 43284, + "id": 2215, "name": "body", "variant": "declaration", "kind": 1024, @@ -60558,7 +60736,7 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/types.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/types.ts", "line": 53, "character": 2 } @@ -60609,15 +60787,15 @@ { "title": "Properties", "children": [ - 43282, - 43283, - 43284 + 2213, + 2214, + 2215 ] } ], "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/types.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/types.ts", "line": 50, "character": 64 } @@ -60628,14 +60806,14 @@ } }, { - "id": 43257, + "id": 2188, "name": "ClientFetch", "variant": "declaration", "kind": 2097152, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/types.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/types.ts", "line": 56, "character": 12 } @@ -60643,41 +60821,41 @@ "type": { "type": "reflection", "declaration": { - "id": 43258, + "id": 2189, "name": "__type", "variant": "declaration", "kind": 65536, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/types.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/types.ts", "line": 56, "character": 26 } ], "signatures": [ { - "id": 43259, + "id": 2190, "name": "__type", "variant": "signature", "kind": 4096, "flags": {}, "parameters": [ { - "id": 43260, + "id": 2191, "name": "input", "variant": "param", "kind": 32768, "flags": {}, "type": { "type": "reference", - "target": 43301, + "target": 2232, "name": "FetchInput", "package": "@medusajs/js-sdk" } }, { - "id": 43261, + "id": 2192, "name": "init", "variant": "param", "kind": 32768, @@ -60686,7 +60864,7 @@ }, "type": { "type": "reference", - "target": 43280, + "target": 2211, "name": "FetchArgs", "package": "@medusajs/js-sdk" } @@ -60718,14 +60896,14 @@ } }, { - "id": 43302, + "id": 2233, "name": "ServerSentEventMessage", "variant": "declaration", "kind": 256, "flags": {}, "children": [ { - "id": 43303, + "id": 2234, "name": "comment", "variant": "declaration", "kind": 1024, @@ -60742,7 +60920,7 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/types.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/types.ts", "line": 64, "character": 2 } @@ -60753,7 +60931,7 @@ } }, { - "id": 43304, + "id": 2235, "name": "event", "variant": "declaration", "kind": 1024, @@ -60770,7 +60948,7 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/types.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/types.ts", "line": 66, "character": 2 } @@ -60781,7 +60959,7 @@ } }, { - "id": 43305, + "id": 2236, "name": "data", "variant": "declaration", "kind": 1024, @@ -60798,7 +60976,7 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/types.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/types.ts", "line": 68, "character": 2 } @@ -60809,7 +60987,7 @@ } }, { - "id": 43306, + "id": 2237, "name": "id", "variant": "declaration", "kind": 1024, @@ -60839,7 +61017,7 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/types.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/types.ts", "line": 70, "character": 2 } @@ -60859,7 +61037,7 @@ } }, { - "id": 43307, + "id": 2238, "name": "retry", "variant": "declaration", "kind": 1024, @@ -60876,7 +61054,7 @@ }, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/types.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/types.ts", "line": 72, "character": 2 } @@ -60891,38 +61069,38 @@ { "title": "Properties", "children": [ - 43303, - 43304, - 43305, - 43306, - 43307 + 2234, + 2235, + 2236, + 2237, + 2238 ] } ], "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/types.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/types.ts", "line": 62, "character": 17 } ] }, { - "id": 43285, + "id": 2216, "name": "FetchStreamResponse", "variant": "declaration", "kind": 256, "flags": {}, "children": [ { - "id": 43286, + "id": 2217, "name": "stream", "variant": "declaration", "kind": 1024, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/types.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/types.ts", "line": 76, "character": 2 } @@ -60943,7 +61121,7 @@ "typeArguments": [ { "type": "reference", - "target": 43302, + "target": 2233, "name": "ServerSentEventMessage", "package": "@medusajs/js-sdk" }, @@ -60963,14 +61141,14 @@ } }, { - "id": 43287, + "id": 2218, "name": "abort", "variant": "declaration", "kind": 1024, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/types.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/types.ts", "line": 77, "character": 2 } @@ -60978,28 +61156,28 @@ "type": { "type": "reflection", "declaration": { - "id": 43288, + "id": 2219, "name": "__type", "variant": "declaration", "kind": 65536, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/types.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/types.ts", "line": 77, "character": 9 } ], "signatures": [ { - "id": 43289, + "id": 2220, "name": "__type", "variant": "signature", "kind": 4096, "flags": {}, "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/types.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/types.ts", "line": 77, "character": 9 } @@ -61018,14 +61196,14 @@ { "title": "Properties", "children": [ - 43286, - 43287 + 2217, + 2218 ] } ], "sources": [ { - "fileName": "/home/runner/work/medusa/medusa/packages/core/js-sdk/src/types.ts", + "fileName": "/Users/shahednasser/medusa/packages/core/js-sdk/src/types.ts", "line": 75, "character": 17 } @@ -61036,72 +61214,72 @@ { "title": "Classes", "children": [ - 42969, - 43144, - 42517, - 42887, - 43048, - 41434, - 42227, - 42647, - 41998, - 41944, - 41977, - 41071, - 42074, - 41400, - 42135, - 42332, - 42149, - 42949, - 42901, - 43176, - 41562, - 41603, - 41527, - 41493, - 42830, - 41754, - 42931, - 41632, - 43082, - 42940, - 41802, - 43019, - 41831, - 42383, - 41905, - 42011, - 42045, - 41861, - 42810, - 42758, - 42787, - 41783, - 42859, - 43006, - 43184 + 1900, + 2075, + 1448, + 1818, + 1979, + 365, + 1158, + 1578, + 929, + 875, + 908, + 2, + 1005, + 331, + 1066, + 1263, + 1080, + 1880, + 1832, + 2107, + 493, + 534, + 458, + 424, + 1761, + 685, + 1862, + 563, + 2013, + 1871, + 733, + 1950, + 762, + 1314, + 836, + 942, + 976, + 792, + 1741, + 1689, + 1718, + 714, + 1790, + 1937, + 2115 ] }, { "title": "Interfaces", "children": [ - 43290, - 43302, - 43285 + 2221, + 2233, + 2216 ] }, { "title": "Type Aliases", "children": [ - 43262, - 43242, - 43308, - 43310, - 43239, - 43301, - 43280, - 43257 + 2193, + 2173, + 2239, + 2241, + 2170, + 2232, + 2211, + 2188 ] } ], @@ -61110,26 +61288,26 @@ "fileName": "admin/index.ts", "line": 1, "character": 0, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/admin/index.ts#L1" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/admin/index.ts#L1" } ] }, { - "id": 41118, + "id": 49, "name": "auth", "variant": "declaration", "kind": 2, "flags": {}, "children": [ { - "id": 41119, + "id": 50, "name": "Auth", "variant": "declaration", "kind": 128, "flags": {}, "children": [ { - "id": 41120, + "id": 51, "name": "constructor", "variant": "declaration", "kind": 512, @@ -61139,12 +61317,12 @@ "fileName": "auth/index.ts", "line": 9, "character": 2, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/auth/index.ts#L9" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/auth/index.ts#L9" } ], "signatures": [ { - "id": 41121, + "id": 52, "name": "Auth", "variant": "signature", "kind": 16384, @@ -61154,32 +61332,32 @@ "fileName": "auth/index.ts", "line": 9, "character": 2, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/auth/index.ts#L9" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/auth/index.ts#L9" } ], "parameters": [ { - "id": 41122, + "id": 53, "name": "client", "variant": "param", "kind": 32768, "flags": {}, "type": { "type": "reference", - "target": 43184, + "target": 2115, "name": "Client", "package": "@medusajs/js-sdk" } }, { - "id": 41123, + "id": 54, "name": "config", "variant": "param", "kind": 32768, "flags": {}, "type": { "type": "reference", - "target": 43242, + "target": 2173, "name": "Config", "package": "@medusajs/js-sdk" } @@ -61187,7 +61365,7 @@ ], "type": { "type": "reference", - "target": 41119, + "target": 50, "name": "Auth", "package": "@medusajs/js-sdk" } @@ -61195,7 +61373,7 @@ ] }, { - "id": 41126, + "id": 57, "name": "register", "variant": "declaration", "kind": 2048, @@ -61205,12 +61383,12 @@ "fileName": "auth/index.ts", "line": 48, "character": 2, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/auth/index.ts#L48" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/auth/index.ts#L48" } ], "signatures": [ { - "id": 41127, + "id": 58, "name": "register", "variant": "signature", "kind": 4096, @@ -61257,12 +61435,12 @@ "fileName": "auth/index.ts", "line": 48, "character": 13, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/auth/index.ts#L48" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/auth/index.ts#L48" } ], "parameters": [ { - "id": 41128, + "id": 59, "name": "actor", "variant": "param", "kind": 32768, @@ -61297,7 +61475,7 @@ } }, { - "id": 41129, + "id": 60, "name": "method", "variant": "param", "kind": 32768, @@ -61332,7 +61510,7 @@ } }, { - "id": 41130, + "id": 61, "name": "payload", "variant": "param", "kind": 32768, @@ -61383,7 +61561,7 @@ ] }, { - "id": 41131, + "id": 62, "name": "login", "variant": "declaration", "kind": 2048, @@ -61393,12 +61571,12 @@ "fileName": "auth/index.ts", "line": 126, "character": 2, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/auth/index.ts#L126" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/auth/index.ts#L126" } ], "signatures": [ { - "id": 41132, + "id": 63, "name": "login", "variant": "signature", "kind": 4096, @@ -61477,12 +61655,12 @@ "fileName": "auth/index.ts", "line": 126, "character": 10, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/auth/index.ts#L126" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/auth/index.ts#L126" } ], "parameters": [ { - "id": 41133, + "id": 64, "name": "actor", "variant": "param", "kind": 32768, @@ -61517,7 +61695,7 @@ } }, { - "id": 41134, + "id": 65, "name": "method", "variant": "param", "kind": 32768, @@ -61552,7 +61730,7 @@ } }, { - "id": 41135, + "id": 66, "name": "payload", "variant": "param", "kind": 32768, @@ -61625,14 +61803,14 @@ { "type": "reflection", "declaration": { - "id": 41136, + "id": 67, "name": "__type", "variant": "declaration", "kind": 65536, "flags": {}, "children": [ { - "id": 41137, + "id": 68, "name": "location", "variant": "declaration", "kind": 1024, @@ -61642,7 +61820,7 @@ "fileName": "auth/index.ts", "line": 143, "character": 15, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/auth/index.ts#L143" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/auth/index.ts#L143" } ], "type": { @@ -61655,7 +61833,7 @@ { "title": "Properties", "children": [ - 41137 + 68 ] } ], @@ -61664,7 +61842,7 @@ "fileName": "auth/index.ts", "line": 143, "character": 13, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/auth/index.ts#L143" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/auth/index.ts#L143" } ] } @@ -61679,7 +61857,7 @@ ] }, { - "id": 41138, + "id": 69, "name": "callback", "variant": "declaration", "kind": 2048, @@ -61689,12 +61867,12 @@ "fileName": "auth/index.ts", "line": 188, "character": 2, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/auth/index.ts#L188" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/auth/index.ts#L188" } ], "signatures": [ { - "id": 41139, + "id": 70, "name": "callback", "variant": "signature", "kind": 4096, @@ -61709,7 +61887,7 @@ "kind": "inline-tag", "tag": "@link", "text": "refresh", - "target": 41143 + "target": 74 }, { "kind": "text", @@ -61751,12 +61929,12 @@ "fileName": "auth/index.ts", "line": 188, "character": 13, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/auth/index.ts#L188" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/auth/index.ts#L188" } ], "parameters": [ { - "id": 41140, + "id": 71, "name": "actor", "variant": "param", "kind": 32768, @@ -61791,7 +61969,7 @@ } }, { - "id": 41141, + "id": 72, "name": "method", "variant": "param", "kind": 32768, @@ -61818,7 +61996,7 @@ } }, { - "id": 41142, + "id": 73, "name": "query", "variant": "param", "kind": 32768, @@ -61889,7 +62067,7 @@ ] }, { - "id": 41143, + "id": 74, "name": "refresh", "variant": "declaration", "kind": 2048, @@ -61899,12 +62077,12 @@ "fileName": "auth/index.ts", "line": 228, "character": 2, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/auth/index.ts#L228" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/auth/index.ts#L228" } ], "signatures": [ { - "id": 41144, + "id": 75, "name": "refresh", "variant": "signature", "kind": 4096, @@ -61919,7 +62097,7 @@ "kind": "inline-tag", "tag": "@link", "text": "callback", - "target": 41138 + "target": 69 }, { "kind": "text", @@ -61961,7 +62139,7 @@ "fileName": "auth/index.ts", "line": 228, "character": 12, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/auth/index.ts#L228" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/auth/index.ts#L228" } ], "type": { @@ -61983,7 +62161,7 @@ ] }, { - "id": 41145, + "id": 76, "name": "logout", "variant": "declaration", "kind": 2048, @@ -61993,12 +62171,12 @@ "fileName": "auth/index.ts", "line": 260, "character": 2, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/auth/index.ts#L260" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/auth/index.ts#L260" } ], "signatures": [ { - "id": 41146, + "id": 77, "name": "logout", "variant": "signature", "kind": 4096, @@ -62052,7 +62230,7 @@ "fileName": "auth/index.ts", "line": 260, "character": 11, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/auth/index.ts#L260" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/auth/index.ts#L260" } ], "type": { @@ -62074,7 +62252,7 @@ ] }, { - "id": 41147, + "id": 78, "name": "resetPassword", "variant": "declaration", "kind": 2048, @@ -62084,12 +62262,12 @@ "fileName": "auth/index.ts", "line": 296, "character": 2, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/auth/index.ts#L296" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/auth/index.ts#L296" } ], "signatures": [ { - "id": 41148, + "id": 79, "name": "resetPassword", "variant": "signature", "kind": 4096, @@ -62104,7 +62282,7 @@ "kind": "inline-tag", "tag": "@link", "text": "updateProvider", - "target": 41154 + "target": 85 }, { "kind": "text", @@ -62137,12 +62315,12 @@ "fileName": "auth/index.ts", "line": 296, "character": 18, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/auth/index.ts#L296" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/auth/index.ts#L296" } ], "parameters": [ { - "id": 41149, + "id": 80, "name": "actor", "variant": "param", "kind": 32768, @@ -62177,7 +62355,7 @@ } }, { - "id": 41150, + "id": 81, "name": "provider", "variant": "param", "kind": 32768, @@ -62204,7 +62382,7 @@ } }, { - "id": 41151, + "id": 82, "name": "body", "variant": "param", "kind": 32768, @@ -62220,14 +62398,14 @@ "type": { "type": "reflection", "declaration": { - "id": 41152, + "id": 83, "name": "__type", "variant": "declaration", "kind": 65536, "flags": {}, "children": [ { - "id": 41153, + "id": 84, "name": "identifier", "variant": "declaration", "kind": 1024, @@ -62253,7 +62431,7 @@ "fileName": "auth/index.ts", "line": 304, "character": 6, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/auth/index.ts#L304" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/auth/index.ts#L304" } ], "type": { @@ -62266,7 +62444,7 @@ { "title": "Properties", "children": [ - 41153 + 84 ] } ], @@ -62275,7 +62453,7 @@ "fileName": "auth/index.ts", "line": 299, "character": 10, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/auth/index.ts#L299" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/auth/index.ts#L299" } ] } @@ -62301,7 +62479,7 @@ ] }, { - "id": 41154, + "id": 85, "name": "updateProvider", "variant": "declaration", "kind": 2048, @@ -62311,12 +62489,12 @@ "fileName": "auth/index.ts", "line": 344, "character": 2, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/auth/index.ts#L344" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/auth/index.ts#L344" } ], "signatures": [ { - "id": 41155, + "id": 86, "name": "updateProvider", "variant": "signature", "kind": 4096, @@ -62331,7 +62509,7 @@ "kind": "inline-tag", "tag": "@link", "text": "resetPassword", - "target": 41147 + "target": 78 }, { "kind": "text", @@ -62364,12 +62542,12 @@ "fileName": "auth/index.ts", "line": 344, "character": 19, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/auth/index.ts#L344" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/auth/index.ts#L344" } ], "parameters": [ { - "id": 41156, + "id": 87, "name": "actor", "variant": "param", "kind": 32768, @@ -62404,7 +62582,7 @@ } }, { - "id": 41157, + "id": 88, "name": "provider", "variant": "param", "kind": 32768, @@ -62431,7 +62609,7 @@ } }, { - "id": 41158, + "id": 89, "name": "body", "variant": "param", "kind": 32768, @@ -62463,7 +62641,7 @@ } }, { - "id": 41159, + "id": 90, "name": "token", "variant": "param", "kind": 32768, @@ -62497,19 +62675,19 @@ { "title": "Constructors", "children": [ - 41120 + 51 ] }, { "title": "Methods", "children": [ - 41126, - 41131, - 41138, - 41143, - 41145, - 41147, - 41154 + 57, + 62, + 69, + 74, + 76, + 78, + 85 ] } ], @@ -62518,7 +62696,7 @@ "fileName": "auth/index.ts", "line": 5, "character": 13, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/auth/index.ts#L5" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/auth/index.ts#L5" } ] } @@ -62527,7 +62705,7 @@ { "title": "Classes", "children": [ - 41119 + 50 ] } ], @@ -62536,26 +62714,26 @@ "fileName": "auth/index.ts", "line": 1, "character": 0, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/auth/index.ts#L1" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/auth/index.ts#L1" } ] }, { - "id": 41163, + "id": 94, "name": "store", "variant": "declaration", "kind": 2, "flags": {}, "children": [ { - "id": 41164, + "id": 95, "name": "Store", "variant": "declaration", "kind": 128, "flags": {}, "children": [ { - "id": 41169, + "id": 100, "name": "region", "variant": "declaration", "kind": 1024, @@ -62581,20 +62759,20 @@ "fileName": "store/index.ts", "line": 21, "character": 9, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L21" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L21" } ], "type": { "type": "reflection", "declaration": { - "id": 41170, + "id": 101, "name": "__type", "variant": "declaration", "kind": 65536, "flags": {}, "children": [ { - "id": 41171, + "id": 102, "name": "list", "variant": "declaration", "kind": 1024, @@ -62679,13 +62857,13 @@ "fileName": "store/index.ts", "line": 70, "character": 4, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L70" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L70" } ], "type": { "type": "reflection", "declaration": { - "id": 41172, + "id": 103, "name": "__type", "variant": "declaration", "kind": 65536, @@ -62695,12 +62873,12 @@ "fileName": "store/index.ts", "line": 70, "character": 10, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L70" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L70" } ], "signatures": [ { - "id": 41173, + "id": 104, "name": "__type", "variant": "signature", "kind": 4096, @@ -62724,12 +62902,12 @@ "fileName": "store/index.ts", "line": 70, "character": 10, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L70" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L70" } ], "parameters": [ { - "id": 41174, + "id": 105, "name": "query", "variant": "param", "kind": 32768, @@ -62769,7 +62947,7 @@ } }, { - "id": 41175, + "id": 106, "name": "headers", "variant": "param", "kind": 32768, @@ -62786,7 +62964,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -62819,7 +62997,7 @@ "defaultValue": "..." }, { - "id": 41176, + "id": 107, "name": "retrieve", "variant": "declaration", "kind": 1024, @@ -62872,13 +63050,13 @@ "fileName": "store/index.ts", "line": 119, "character": 4, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L119" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L119" } ], "type": { "type": "reflection", "declaration": { - "id": 41177, + "id": 108, "name": "__type", "variant": "declaration", "kind": 65536, @@ -62888,12 +63066,12 @@ "fileName": "store/index.ts", "line": 119, "character": 14, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L119" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L119" } ], "signatures": [ { - "id": 41178, + "id": 109, "name": "__type", "variant": "signature", "kind": 4096, @@ -62917,12 +63095,12 @@ "fileName": "store/index.ts", "line": 119, "character": 14, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L119" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L119" } ], "parameters": [ { - "id": 41179, + "id": 110, "name": "id", "variant": "param", "kind": 32768, @@ -62941,7 +63119,7 @@ } }, { - "id": 41180, + "id": 111, "name": "query", "variant": "param", "kind": 32768, @@ -62967,7 +63145,7 @@ } }, { - "id": 41181, + "id": 112, "name": "headers", "variant": "param", "kind": 32768, @@ -62984,7 +63162,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -63021,8 +63199,8 @@ { "title": "Properties", "children": [ - 41171, - 41176 + 102, + 107 ] } ], @@ -63031,7 +63209,7 @@ "fileName": "store/index.ts", "line": 21, "character": 18, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L21" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L21" } ] } @@ -63039,7 +63217,7 @@ "defaultValue": "..." }, { - "id": 41182, + "id": 113, "name": "collection", "variant": "declaration", "kind": 1024, @@ -63065,20 +63243,20 @@ "fileName": "store/index.ts", "line": 137, "character": 9, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L137" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L137" } ], "type": { "type": "reflection", "declaration": { - "id": 41183, + "id": 114, "name": "__type", "variant": "declaration", "kind": 65536, "flags": {}, "children": [ { - "id": 41184, + "id": 115, "name": "list", "variant": "declaration", "kind": 1024, @@ -63163,13 +63341,13 @@ "fileName": "store/index.ts", "line": 186, "character": 4, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L186" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L186" } ], "type": { "type": "reflection", "declaration": { - "id": 41185, + "id": 116, "name": "__type", "variant": "declaration", "kind": 65536, @@ -63179,12 +63357,12 @@ "fileName": "store/index.ts", "line": 186, "character": 10, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L186" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L186" } ], "signatures": [ { - "id": 41186, + "id": 117, "name": "__type", "variant": "signature", "kind": 4096, @@ -63208,12 +63386,12 @@ "fileName": "store/index.ts", "line": 186, "character": 10, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L186" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L186" } ], "parameters": [ { - "id": 41187, + "id": 118, "name": "query", "variant": "param", "kind": 32768, @@ -63253,7 +63431,7 @@ } }, { - "id": 41188, + "id": 119, "name": "headers", "variant": "param", "kind": 32768, @@ -63270,7 +63448,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -63303,7 +63481,7 @@ "defaultValue": "..." }, { - "id": 41189, + "id": 120, "name": "retrieve", "variant": "declaration", "kind": 1024, @@ -63356,13 +63534,13 @@ "fileName": "store/index.ts", "line": 232, "character": 4, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L232" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L232" } ], "type": { "type": "reflection", "declaration": { - "id": 41190, + "id": 121, "name": "__type", "variant": "declaration", "kind": 65536, @@ -63372,12 +63550,12 @@ "fileName": "store/index.ts", "line": 232, "character": 14, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L232" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L232" } ], "signatures": [ { - "id": 41191, + "id": 122, "name": "__type", "variant": "signature", "kind": 4096, @@ -63401,12 +63579,12 @@ "fileName": "store/index.ts", "line": 232, "character": 14, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L232" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L232" } ], "parameters": [ { - "id": 41192, + "id": 123, "name": "id", "variant": "param", "kind": 32768, @@ -63425,7 +63603,7 @@ } }, { - "id": 41193, + "id": 124, "name": "query", "variant": "param", "kind": 32768, @@ -63451,7 +63629,7 @@ } }, { - "id": 41194, + "id": 125, "name": "headers", "variant": "param", "kind": 32768, @@ -63468,7 +63646,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -63505,8 +63683,8 @@ { "title": "Properties", "children": [ - 41184, - 41189 + 115, + 120 ] } ], @@ -63515,7 +63693,7 @@ "fileName": "store/index.ts", "line": 137, "character": 22, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L137" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L137" } ] } @@ -63523,7 +63701,7 @@ "defaultValue": "..." }, { - "id": 41195, + "id": 126, "name": "category", "variant": "declaration", "kind": 1024, @@ -63549,20 +63727,20 @@ "fileName": "store/index.ts", "line": 250, "character": 9, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L250" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L250" } ], "type": { "type": "reflection", "declaration": { - "id": 41196, + "id": 127, "name": "__type", "variant": "declaration", "kind": 65536, "flags": {}, "children": [ { - "id": 41197, + "id": 128, "name": "list", "variant": "declaration", "kind": 1024, @@ -63647,13 +63825,13 @@ "fileName": "store/index.ts", "line": 299, "character": 4, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L299" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L299" } ], "type": { "type": "reflection", "declaration": { - "id": 41198, + "id": 129, "name": "__type", "variant": "declaration", "kind": 65536, @@ -63663,12 +63841,12 @@ "fileName": "store/index.ts", "line": 299, "character": 10, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L299" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L299" } ], "signatures": [ { - "id": 41199, + "id": 130, "name": "__type", "variant": "signature", "kind": 4096, @@ -63692,12 +63870,12 @@ "fileName": "store/index.ts", "line": 299, "character": 10, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L299" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L299" } ], "parameters": [ { - "id": 41200, + "id": 131, "name": "query", "variant": "param", "kind": 32768, @@ -63737,7 +63915,7 @@ } }, { - "id": 41201, + "id": 132, "name": "headers", "variant": "param", "kind": 32768, @@ -63754,7 +63932,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -63787,7 +63965,7 @@ "defaultValue": "..." }, { - "id": 41202, + "id": 133, "name": "retrieve", "variant": "declaration", "kind": 1024, @@ -63840,13 +64018,13 @@ "fileName": "store/index.ts", "line": 345, "character": 4, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L345" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L345" } ], "type": { "type": "reflection", "declaration": { - "id": 41203, + "id": 134, "name": "__type", "variant": "declaration", "kind": 65536, @@ -63856,12 +64034,12 @@ "fileName": "store/index.ts", "line": 345, "character": 14, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L345" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L345" } ], "signatures": [ { - "id": 41204, + "id": 135, "name": "__type", "variant": "signature", "kind": 4096, @@ -63885,12 +64063,12 @@ "fileName": "store/index.ts", "line": 345, "character": 14, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L345" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L345" } ], "parameters": [ { - "id": 41205, + "id": 136, "name": "id", "variant": "param", "kind": 32768, @@ -63909,7 +64087,7 @@ } }, { - "id": 41206, + "id": 137, "name": "query", "variant": "param", "kind": 32768, @@ -63935,7 +64113,7 @@ } }, { - "id": 41207, + "id": 138, "name": "headers", "variant": "param", "kind": 32768, @@ -63952,7 +64130,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -63989,8 +64167,8 @@ { "title": "Properties", "children": [ - 41197, - 41202 + 128, + 133 ] } ], @@ -63999,7 +64177,7 @@ "fileName": "store/index.ts", "line": 250, "character": 20, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L250" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L250" } ] } @@ -64007,7 +64185,7 @@ "defaultValue": "..." }, { - "id": 41208, + "id": 139, "name": "product", "variant": "declaration", "kind": 1024, @@ -64033,20 +64211,20 @@ "fileName": "store/index.ts", "line": 363, "character": 9, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L363" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L363" } ], "type": { "type": "reflection", "declaration": { - "id": 41209, + "id": 140, "name": "__type", "variant": "declaration", "kind": 65536, "flags": {}, "children": [ { - "id": 41210, + "id": 141, "name": "list", "variant": "declaration", "kind": 1024, @@ -64131,13 +64309,13 @@ "fileName": "store/index.ts", "line": 415, "character": 4, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L415" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L415" } ], "type": { "type": "reflection", "declaration": { - "id": 41211, + "id": 142, "name": "__type", "variant": "declaration", "kind": 65536, @@ -64147,12 +64325,12 @@ "fileName": "store/index.ts", "line": 415, "character": 10, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L415" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L415" } ], "signatures": [ { - "id": 41212, + "id": 143, "name": "__type", "variant": "signature", "kind": 4096, @@ -64176,12 +64354,12 @@ "fileName": "store/index.ts", "line": 415, "character": 10, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L415" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L415" } ], "parameters": [ { - "id": 41213, + "id": 144, "name": "query", "variant": "param", "kind": 32768, @@ -64207,7 +64385,7 @@ } }, { - "id": 41214, + "id": 145, "name": "headers", "variant": "param", "kind": 32768, @@ -64224,7 +64402,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -64257,7 +64435,7 @@ "defaultValue": "..." }, { - "id": 41215, + "id": 146, "name": "retrieve", "variant": "declaration", "kind": 1024, @@ -64310,13 +64488,13 @@ "fileName": "store/index.ts", "line": 464, "character": 4, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L464" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L464" } ], "type": { "type": "reflection", "declaration": { - "id": 41216, + "id": 147, "name": "__type", "variant": "declaration", "kind": 65536, @@ -64326,12 +64504,12 @@ "fileName": "store/index.ts", "line": 464, "character": 14, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L464" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L464" } ], "signatures": [ { - "id": 41217, + "id": 148, "name": "__type", "variant": "signature", "kind": 4096, @@ -64355,12 +64533,12 @@ "fileName": "store/index.ts", "line": 464, "character": 14, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L464" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L464" } ], "parameters": [ { - "id": 41218, + "id": 149, "name": "id", "variant": "param", "kind": 32768, @@ -64379,7 +64557,7 @@ } }, { - "id": 41219, + "id": 150, "name": "query", "variant": "param", "kind": 32768, @@ -64405,7 +64583,7 @@ } }, { - "id": 41220, + "id": 151, "name": "headers", "variant": "param", "kind": 32768, @@ -64422,7 +64600,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -64459,8 +64637,8 @@ { "title": "Properties", "children": [ - 41210, - 41215 + 141, + 146 ] } ], @@ -64469,7 +64647,7 @@ "fileName": "store/index.ts", "line": 363, "character": 19, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L363" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L363" } ] } @@ -64477,7 +64655,7 @@ "defaultValue": "..." }, { - "id": 41221, + "id": 152, "name": "cart", "variant": "declaration", "kind": 1024, @@ -64508,20 +64686,20 @@ "fileName": "store/index.ts", "line": 484, "character": 9, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L484" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L484" } ], "type": { "type": "reflection", "declaration": { - "id": 41222, + "id": 153, "name": "__type", "variant": "declaration", "kind": 65536, "flags": {}, "children": [ { - "id": 41223, + "id": 154, "name": "create", "variant": "declaration", "kind": 1024, @@ -64550,13 +64728,13 @@ "fileName": "store/index.ts", "line": 504, "character": 4, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L504" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L504" } ], "type": { "type": "reflection", "declaration": { - "id": 41224, + "id": 155, "name": "__type", "variant": "declaration", "kind": 65536, @@ -64566,12 +64744,12 @@ "fileName": "store/index.ts", "line": 504, "character": 12, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L504" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L504" } ], "signatures": [ { - "id": 41225, + "id": 156, "name": "__type", "variant": "signature", "kind": 4096, @@ -64595,12 +64773,12 @@ "fileName": "store/index.ts", "line": 504, "character": 12, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L504" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L504" } ], "parameters": [ { - "id": 41226, + "id": 157, "name": "body", "variant": "param", "kind": 32768, @@ -64624,7 +64802,7 @@ } }, { - "id": 41227, + "id": 158, "name": "query", "variant": "param", "kind": 32768, @@ -64650,7 +64828,7 @@ } }, { - "id": 41228, + "id": 159, "name": "headers", "variant": "param", "kind": 32768, @@ -64667,7 +64845,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -64700,7 +64878,7 @@ "defaultValue": "..." }, { - "id": 41229, + "id": 160, "name": "update", "variant": "declaration", "kind": 1024, @@ -64729,13 +64907,13 @@ "fileName": "store/index.ts", "line": 536, "character": 4, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L536" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L536" } ], "type": { "type": "reflection", "declaration": { - "id": 41230, + "id": 161, "name": "__type", "variant": "declaration", "kind": 65536, @@ -64745,12 +64923,12 @@ "fileName": "store/index.ts", "line": 536, "character": 12, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L536" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L536" } ], "signatures": [ { - "id": 41231, + "id": 162, "name": "__type", "variant": "signature", "kind": 4096, @@ -64774,12 +64952,12 @@ "fileName": "store/index.ts", "line": 536, "character": 12, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L536" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L536" } ], "parameters": [ { - "id": 41232, + "id": 163, "name": "id", "variant": "param", "kind": 32768, @@ -64798,7 +64976,7 @@ } }, { - "id": 41233, + "id": 164, "name": "body", "variant": "param", "kind": 32768, @@ -64822,7 +65000,7 @@ } }, { - "id": 41234, + "id": 165, "name": "query", "variant": "param", "kind": 32768, @@ -64848,7 +65026,7 @@ } }, { - "id": 41235, + "id": 166, "name": "headers", "variant": "param", "kind": 32768, @@ -64865,7 +65043,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -64898,7 +65076,7 @@ "defaultValue": "..." }, { - "id": 41236, + "id": 167, "name": "retrieve", "variant": "declaration", "kind": 1024, @@ -64951,13 +65129,13 @@ "fileName": "store/index.ts", "line": 586, "character": 4, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L586" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L586" } ], "type": { "type": "reflection", "declaration": { - "id": 41237, + "id": 168, "name": "__type", "variant": "declaration", "kind": 65536, @@ -64967,12 +65145,12 @@ "fileName": "store/index.ts", "line": 586, "character": 14, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L586" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L586" } ], "signatures": [ { - "id": 41238, + "id": 169, "name": "__type", "variant": "signature", "kind": 4096, @@ -64996,12 +65174,12 @@ "fileName": "store/index.ts", "line": 586, "character": 14, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L586" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L586" } ], "parameters": [ { - "id": 41239, + "id": 170, "name": "id", "variant": "param", "kind": 32768, @@ -65020,7 +65198,7 @@ } }, { - "id": 41240, + "id": 171, "name": "query", "variant": "param", "kind": 32768, @@ -65046,7 +65224,7 @@ } }, { - "id": 41241, + "id": 172, "name": "headers", "variant": "param", "kind": 32768, @@ -65063,7 +65241,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -65096,7 +65274,7 @@ "defaultValue": "..." }, { - "id": 41242, + "id": 173, "name": "createLineItem", "variant": "declaration", "kind": 1024, @@ -65125,13 +65303,13 @@ "fileName": "store/index.ts", "line": 620, "character": 4, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L620" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L620" } ], "type": { "type": "reflection", "declaration": { - "id": 41243, + "id": 174, "name": "__type", "variant": "declaration", "kind": 65536, @@ -65141,12 +65319,12 @@ "fileName": "store/index.ts", "line": 620, "character": 20, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L620" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L620" } ], "signatures": [ { - "id": 41244, + "id": 175, "name": "__type", "variant": "signature", "kind": 4096, @@ -65170,12 +65348,12 @@ "fileName": "store/index.ts", "line": 620, "character": 20, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L620" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L620" } ], "parameters": [ { - "id": 41245, + "id": 176, "name": "cartId", "variant": "param", "kind": 32768, @@ -65194,7 +65372,7 @@ } }, { - "id": 41246, + "id": 177, "name": "body", "variant": "param", "kind": 32768, @@ -65218,7 +65396,7 @@ } }, { - "id": 41247, + "id": 178, "name": "query", "variant": "param", "kind": 32768, @@ -65244,7 +65422,7 @@ } }, { - "id": 41248, + "id": 179, "name": "headers", "variant": "param", "kind": 32768, @@ -65261,7 +65439,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -65294,7 +65472,7 @@ "defaultValue": "..." }, { - "id": 41249, + "id": 180, "name": "updateLineItem", "variant": "declaration", "kind": 1024, @@ -65323,13 +65501,13 @@ "fileName": "store/index.ts", "line": 661, "character": 4, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L661" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L661" } ], "type": { "type": "reflection", "declaration": { - "id": 41250, + "id": 181, "name": "__type", "variant": "declaration", "kind": 65536, @@ -65339,12 +65517,12 @@ "fileName": "store/index.ts", "line": 661, "character": 20, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L661" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L661" } ], "signatures": [ { - "id": 41251, + "id": 182, "name": "__type", "variant": "signature", "kind": 4096, @@ -65368,12 +65546,12 @@ "fileName": "store/index.ts", "line": 661, "character": 20, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L661" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L661" } ], "parameters": [ { - "id": 41252, + "id": 183, "name": "cartId", "variant": "param", "kind": 32768, @@ -65392,7 +65570,7 @@ } }, { - "id": 41253, + "id": 184, "name": "lineItemId", "variant": "param", "kind": 32768, @@ -65411,7 +65589,7 @@ } }, { - "id": 41254, + "id": 185, "name": "body", "variant": "param", "kind": 32768, @@ -65435,7 +65613,7 @@ } }, { - "id": 41255, + "id": 186, "name": "query", "variant": "param", "kind": 32768, @@ -65461,7 +65639,7 @@ } }, { - "id": 41256, + "id": 187, "name": "headers", "variant": "param", "kind": 32768, @@ -65478,7 +65656,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -65511,7 +65689,7 @@ "defaultValue": "..." }, { - "id": 41257, + "id": 188, "name": "deleteLineItem", "variant": "declaration", "kind": 1024, @@ -65540,13 +65718,13 @@ "fileName": "store/index.ts", "line": 698, "character": 4, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L698" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L698" } ], "type": { "type": "reflection", "declaration": { - "id": 41258, + "id": 189, "name": "__type", "variant": "declaration", "kind": 65536, @@ -65556,12 +65734,12 @@ "fileName": "store/index.ts", "line": 698, "character": 20, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L698" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L698" } ], "signatures": [ { - "id": 41259, + "id": 190, "name": "__type", "variant": "signature", "kind": 4096, @@ -65585,12 +65763,12 @@ "fileName": "store/index.ts", "line": 698, "character": 20, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L698" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L698" } ], "parameters": [ { - "id": 41260, + "id": 191, "name": "cartId", "variant": "param", "kind": 32768, @@ -65609,7 +65787,7 @@ } }, { - "id": 41261, + "id": 192, "name": "lineItemId", "variant": "param", "kind": 32768, @@ -65628,7 +65806,7 @@ } }, { - "id": 41262, + "id": 193, "name": "headers", "variant": "param", "kind": 32768, @@ -65645,7 +65823,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -65678,7 +65856,7 @@ "defaultValue": "..." }, { - "id": 41263, + "id": 194, "name": "addShippingMethod", "variant": "declaration", "kind": 1024, @@ -65707,13 +65885,13 @@ "fileName": "store/index.ts", "line": 734, "character": 4, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L734" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L734" } ], "type": { "type": "reflection", "declaration": { - "id": 41264, + "id": 195, "name": "__type", "variant": "declaration", "kind": 65536, @@ -65723,12 +65901,12 @@ "fileName": "store/index.ts", "line": 734, "character": 23, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L734" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L734" } ], "signatures": [ { - "id": 41265, + "id": 196, "name": "__type", "variant": "signature", "kind": 4096, @@ -65752,12 +65930,12 @@ "fileName": "store/index.ts", "line": 734, "character": 23, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L734" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L734" } ], "parameters": [ { - "id": 41266, + "id": 197, "name": "cartId", "variant": "param", "kind": 32768, @@ -65776,7 +65954,7 @@ } }, { - "id": 41267, + "id": 198, "name": "body", "variant": "param", "kind": 32768, @@ -65800,7 +65978,7 @@ } }, { - "id": 41268, + "id": 199, "name": "query", "variant": "param", "kind": 32768, @@ -65826,7 +66004,7 @@ } }, { - "id": 41269, + "id": 200, "name": "headers", "variant": "param", "kind": 32768, @@ -65843,7 +66021,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -65876,7 +66054,7 @@ "defaultValue": "..." }, { - "id": 41270, + "id": 201, "name": "complete", "variant": "declaration", "kind": 1024, @@ -65905,13 +66083,13 @@ "fileName": "store/index.ts", "line": 774, "character": 4, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L774" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L774" } ], "type": { "type": "reflection", "declaration": { - "id": 41271, + "id": 202, "name": "__type", "variant": "declaration", "kind": 65536, @@ -65921,12 +66099,12 @@ "fileName": "store/index.ts", "line": 774, "character": 14, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L774" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L774" } ], "signatures": [ { - "id": 41272, + "id": 203, "name": "__type", "variant": "signature", "kind": 4096, @@ -65950,12 +66128,12 @@ "fileName": "store/index.ts", "line": 774, "character": 14, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L774" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L774" } ], "parameters": [ { - "id": 41273, + "id": 204, "name": "cartId", "variant": "param", "kind": 32768, @@ -65974,7 +66152,7 @@ } }, { - "id": 41274, + "id": 205, "name": "query", "variant": "param", "kind": 32768, @@ -66000,7 +66178,7 @@ } }, { - "id": 41275, + "id": 206, "name": "headers", "variant": "param", "kind": 32768, @@ -66017,7 +66195,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -66050,7 +66228,7 @@ "defaultValue": "..." }, { - "id": 41276, + "id": 207, "name": "transferCart", "variant": "declaration", "kind": 1024, @@ -66079,13 +66257,13 @@ "fileName": "store/index.ts", "line": 803, "character": 4, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L803" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L803" } ], "type": { "type": "reflection", "declaration": { - "id": 41277, + "id": 208, "name": "__type", "variant": "declaration", "kind": 65536, @@ -66095,12 +66273,12 @@ "fileName": "store/index.ts", "line": 803, "character": 18, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L803" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L803" } ], "signatures": [ { - "id": 41278, + "id": 209, "name": "__type", "variant": "signature", "kind": 4096, @@ -66124,12 +66302,12 @@ "fileName": "store/index.ts", "line": 803, "character": 18, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L803" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L803" } ], "parameters": [ { - "id": 41279, + "id": 210, "name": "id", "variant": "param", "kind": 32768, @@ -66148,7 +66326,7 @@ } }, { - "id": 41280, + "id": 211, "name": "query", "variant": "param", "kind": 32768, @@ -66174,7 +66352,7 @@ } }, { - "id": 41281, + "id": 212, "name": "headers", "variant": "param", "kind": 32768, @@ -66191,7 +66369,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -66228,15 +66406,15 @@ { "title": "Properties", "children": [ - 41223, - 41229, - 41236, - 41242, - 41249, - 41257, - 41263, - 41270, - 41276 + 154, + 160, + 167, + 173, + 180, + 188, + 194, + 201, + 207 ] } ], @@ -66245,7 +66423,7 @@ "fileName": "store/index.ts", "line": 484, "character": 16, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L484" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L484" } ] } @@ -66253,7 +66431,7 @@ "defaultValue": "..." }, { - "id": 41282, + "id": 213, "name": "fulfillment", "variant": "declaration", "kind": 1024, @@ -66279,20 +66457,20 @@ "fileName": "store/index.ts", "line": 822, "character": 9, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L822" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L822" } ], "type": { "type": "reflection", "declaration": { - "id": 41283, + "id": 214, "name": "__type", "variant": "declaration", "kind": 65536, "flags": {}, "children": [ { - "id": 41284, + "id": 215, "name": "listCartOptions", "variant": "declaration", "kind": 1024, @@ -66321,13 +66499,13 @@ "fileName": "store/index.ts", "line": 842, "character": 4, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L842" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L842" } ], "type": { "type": "reflection", "declaration": { - "id": 41285, + "id": 216, "name": "__type", "variant": "declaration", "kind": 65536, @@ -66337,12 +66515,12 @@ "fileName": "store/index.ts", "line": 842, "character": 21, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L842" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L842" } ], "signatures": [ { - "id": 41286, + "id": 217, "name": "__type", "variant": "signature", "kind": 4096, @@ -66366,12 +66544,12 @@ "fileName": "store/index.ts", "line": 842, "character": 21, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L842" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L842" } ], "parameters": [ { - "id": 41287, + "id": 218, "name": "query", "variant": "param", "kind": 32768, @@ -66397,7 +66575,7 @@ } }, { - "id": 41288, + "id": 219, "name": "headers", "variant": "param", "kind": 32768, @@ -66414,7 +66592,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -66447,7 +66625,7 @@ "defaultValue": "..." }, { - "id": 41289, + "id": 220, "name": "calculate", "variant": "declaration", "kind": 1024, @@ -66476,13 +66654,13 @@ "fileName": "store/index.ts", "line": 874, "character": 4, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L874" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L874" } ], "type": { "type": "reflection", "declaration": { - "id": 41290, + "id": 221, "name": "__type", "variant": "declaration", "kind": 65536, @@ -66492,12 +66670,12 @@ "fileName": "store/index.ts", "line": 874, "character": 15, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L874" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L874" } ], "signatures": [ { - "id": 41291, + "id": 222, "name": "__type", "variant": "signature", "kind": 4096, @@ -66521,12 +66699,12 @@ "fileName": "store/index.ts", "line": 874, "character": 15, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L874" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L874" } ], "parameters": [ { - "id": 41292, + "id": 223, "name": "id", "variant": "param", "kind": 32768, @@ -66545,7 +66723,7 @@ } }, { - "id": 41293, + "id": 224, "name": "body", "variant": "param", "kind": 32768, @@ -66569,7 +66747,7 @@ } }, { - "id": 41294, + "id": 225, "name": "query", "variant": "param", "kind": 32768, @@ -66595,7 +66773,7 @@ } }, { - "id": 41295, + "id": 226, "name": "headers", "variant": "param", "kind": 32768, @@ -66612,7 +66790,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -66649,8 +66827,8 @@ { "title": "Properties", "children": [ - 41284, - 41289 + 215, + 220 ] } ], @@ -66659,7 +66837,7 @@ "fileName": "store/index.ts", "line": 822, "character": 23, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L822" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L822" } ] } @@ -66667,7 +66845,7 @@ "defaultValue": "..." }, { - "id": 41296, + "id": 227, "name": "payment", "variant": "declaration", "kind": 1024, @@ -66693,20 +66871,20 @@ "fileName": "store/index.ts", "line": 895, "character": 9, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L895" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L895" } ], "type": { "type": "reflection", "declaration": { - "id": 41297, + "id": 228, "name": "__type", "variant": "declaration", "kind": 65536, "flags": {}, "children": [ { - "id": 41298, + "id": 229, "name": "listPaymentProviders", "variant": "declaration", "kind": 1024, @@ -66791,13 +66969,13 @@ "fileName": "store/index.ts", "line": 952, "character": 4, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L952" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L952" } ], "type": { "type": "reflection", "declaration": { - "id": 41299, + "id": 230, "name": "__type", "variant": "declaration", "kind": 65536, @@ -66807,12 +66985,12 @@ "fileName": "store/index.ts", "line": 952, "character": 26, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L952" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L952" } ], "signatures": [ { - "id": 41300, + "id": 231, "name": "__type", "variant": "signature", "kind": 4096, @@ -66836,12 +67014,12 @@ "fileName": "store/index.ts", "line": 952, "character": 26, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L952" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L952" } ], "parameters": [ { - "id": 41301, + "id": 232, "name": "query", "variant": "param", "kind": 32768, @@ -66881,7 +67059,7 @@ } }, { - "id": 41302, + "id": 233, "name": "headers", "variant": "param", "kind": 32768, @@ -66898,7 +67076,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -66931,7 +67109,7 @@ "defaultValue": "..." }, { - "id": 41303, + "id": 234, "name": "initiatePaymentSession", "variant": "declaration", "kind": 1024, @@ -66960,13 +67138,13 @@ "fileName": "store/index.ts", "line": 996, "character": 4, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L996" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L996" } ], "type": { "type": "reflection", "declaration": { - "id": 41304, + "id": 235, "name": "__type", "variant": "declaration", "kind": 65536, @@ -66976,12 +67154,12 @@ "fileName": "store/index.ts", "line": 996, "character": 28, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L996" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L996" } ], "signatures": [ { - "id": 41305, + "id": 236, "name": "__type", "variant": "signature", "kind": 4096, @@ -67005,12 +67183,12 @@ "fileName": "store/index.ts", "line": 996, "character": 28, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L996" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L996" } ], "parameters": [ { - "id": 41306, + "id": 237, "name": "cart", "variant": "param", "kind": 32768, @@ -67034,7 +67212,7 @@ } }, { - "id": 41307, + "id": 238, "name": "body", "variant": "param", "kind": 32768, @@ -67058,7 +67236,7 @@ } }, { - "id": 41308, + "id": 239, "name": "query", "variant": "param", "kind": 32768, @@ -67084,7 +67262,7 @@ } }, { - "id": 41309, + "id": 240, "name": "headers", "variant": "param", "kind": 32768, @@ -67101,7 +67279,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -67138,8 +67316,8 @@ { "title": "Properties", "children": [ - 41298, - 41303 + 229, + 234 ] } ], @@ -67148,7 +67326,7 @@ "fileName": "store/index.ts", "line": 895, "character": 19, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L895" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L895" } ] } @@ -67156,7 +67334,7 @@ "defaultValue": "..." }, { - "id": 41310, + "id": 241, "name": "order", "variant": "declaration", "kind": 1024, @@ -67182,20 +67360,20 @@ "fileName": "store/index.ts", "line": 1034, "character": 9, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L1034" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L1034" } ], "type": { "type": "reflection", "declaration": { - "id": 41311, + "id": 242, "name": "__type", "variant": "declaration", "kind": 65536, "flags": {}, "children": [ { - "id": 41312, + "id": 243, "name": "list", "variant": "declaration", "kind": 1024, @@ -67280,13 +67458,13 @@ "fileName": "store/index.ts", "line": 1082, "character": 4, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L1082" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L1082" } ], "type": { "type": "reflection", "declaration": { - "id": 41313, + "id": 244, "name": "__type", "variant": "declaration", "kind": 65536, @@ -67296,12 +67474,12 @@ "fileName": "store/index.ts", "line": 1082, "character": 10, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L1082" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L1082" } ], "signatures": [ { - "id": 41314, + "id": 245, "name": "__type", "variant": "signature", "kind": 4096, @@ -67325,12 +67503,12 @@ "fileName": "store/index.ts", "line": 1082, "character": 10, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L1082" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L1082" } ], "parameters": [ { - "id": 41315, + "id": 246, "name": "query", "variant": "param", "kind": 32768, @@ -67356,7 +67534,7 @@ } }, { - "id": 41316, + "id": 247, "name": "headers", "variant": "param", "kind": 32768, @@ -67373,7 +67551,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -67406,7 +67584,7 @@ "defaultValue": "..." }, { - "id": 41317, + "id": 248, "name": "retrieve", "variant": "declaration", "kind": 1024, @@ -67459,13 +67637,13 @@ "fileName": "store/index.ts", "line": 1126, "character": 4, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L1126" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L1126" } ], "type": { "type": "reflection", "declaration": { - "id": 41318, + "id": 249, "name": "__type", "variant": "declaration", "kind": 65536, @@ -67475,12 +67653,12 @@ "fileName": "store/index.ts", "line": 1126, "character": 14, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L1126" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L1126" } ], "signatures": [ { - "id": 41319, + "id": 250, "name": "__type", "variant": "signature", "kind": 4096, @@ -67504,12 +67682,12 @@ "fileName": "store/index.ts", "line": 1126, "character": 14, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L1126" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L1126" } ], "parameters": [ { - "id": 41320, + "id": 251, "name": "id", "variant": "param", "kind": 32768, @@ -67528,7 +67706,7 @@ } }, { - "id": 41321, + "id": 252, "name": "query", "variant": "param", "kind": 32768, @@ -67554,7 +67732,7 @@ } }, { - "id": 41322, + "id": 253, "name": "headers", "variant": "param", "kind": 32768, @@ -67571,7 +67749,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -67587,14 +67765,14 @@ { "type": "reflection", "declaration": { - "id": 41323, + "id": 254, "name": "__type", "variant": "declaration", "kind": 65536, "flags": {}, "children": [ { - "id": 41324, + "id": 255, "name": "order", "variant": "declaration", "kind": 1024, @@ -67604,7 +67782,7 @@ "fileName": "store/index.ts", "line": 1131, "character": 33, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L1131" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L1131" } ], "type": { @@ -67622,7 +67800,7 @@ { "title": "Properties", "children": [ - 41324 + 255 ] } ], @@ -67631,7 +67809,7 @@ "fileName": "store/index.ts", "line": 1131, "character": 31, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L1131" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L1131" } ] } @@ -67647,7 +67825,7 @@ "defaultValue": "..." }, { - "id": 41325, + "id": 256, "name": "requestTransfer", "variant": "declaration", "kind": 1024, @@ -67676,13 +67854,13 @@ "fileName": "store/index.ts", "line": 1165, "character": 4, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L1165" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L1165" } ], "type": { "type": "reflection", "declaration": { - "id": 41326, + "id": 257, "name": "__type", "variant": "declaration", "kind": 65536, @@ -67692,12 +67870,12 @@ "fileName": "store/index.ts", "line": 1165, "character": 21, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L1165" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L1165" } ], "signatures": [ { - "id": 41327, + "id": 258, "name": "__type", "variant": "signature", "kind": 4096, @@ -67721,12 +67899,12 @@ "fileName": "store/index.ts", "line": 1165, "character": 21, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L1165" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L1165" } ], "parameters": [ { - "id": 41328, + "id": 259, "name": "id", "variant": "param", "kind": 32768, @@ -67737,7 +67915,7 @@ } }, { - "id": 41329, + "id": 260, "name": "body", "variant": "param", "kind": 32768, @@ -67761,7 +67939,7 @@ } }, { - "id": 41330, + "id": 261, "name": "query", "variant": "param", "kind": 32768, @@ -67787,7 +67965,7 @@ } }, { - "id": 41331, + "id": 262, "name": "headers", "variant": "param", "kind": 32768, @@ -67804,7 +67982,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -67837,7 +68015,7 @@ "defaultValue": "..." }, { - "id": 41332, + "id": 263, "name": "cancelTransfer", "variant": "declaration", "kind": 1024, @@ -67866,13 +68044,13 @@ "fileName": "store/index.ts", "line": 1203, "character": 4, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L1203" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L1203" } ], "type": { "type": "reflection", "declaration": { - "id": 41333, + "id": 264, "name": "__type", "variant": "declaration", "kind": 65536, @@ -67882,12 +68060,12 @@ "fileName": "store/index.ts", "line": 1203, "character": 20, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L1203" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L1203" } ], "signatures": [ { - "id": 41334, + "id": 265, "name": "__type", "variant": "signature", "kind": 4096, @@ -67911,12 +68089,12 @@ "fileName": "store/index.ts", "line": 1203, "character": 20, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L1203" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L1203" } ], "parameters": [ { - "id": 41335, + "id": 266, "name": "id", "variant": "param", "kind": 32768, @@ -67935,7 +68113,7 @@ } }, { - "id": 41336, + "id": 267, "name": "query", "variant": "param", "kind": 32768, @@ -67961,7 +68139,7 @@ } }, { - "id": 41337, + "id": 268, "name": "headers", "variant": "param", "kind": 32768, @@ -67978,7 +68156,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -68011,7 +68189,7 @@ "defaultValue": "..." }, { - "id": 41338, + "id": 269, "name": "acceptTransfer", "variant": "declaration", "kind": 1024, @@ -68040,13 +68218,13 @@ "fileName": "store/index.ts", "line": 1240, "character": 4, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L1240" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L1240" } ], "type": { "type": "reflection", "declaration": { - "id": 41339, + "id": 270, "name": "__type", "variant": "declaration", "kind": 65536, @@ -68056,12 +68234,12 @@ "fileName": "store/index.ts", "line": 1240, "character": 20, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L1240" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L1240" } ], "signatures": [ { - "id": 41340, + "id": 271, "name": "__type", "variant": "signature", "kind": 4096, @@ -68085,12 +68263,12 @@ "fileName": "store/index.ts", "line": 1240, "character": 20, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L1240" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L1240" } ], "parameters": [ { - "id": 41341, + "id": 272, "name": "id", "variant": "param", "kind": 32768, @@ -68109,7 +68287,7 @@ } }, { - "id": 41342, + "id": 273, "name": "body", "variant": "param", "kind": 32768, @@ -68133,7 +68311,7 @@ } }, { - "id": 41343, + "id": 274, "name": "query", "variant": "param", "kind": 32768, @@ -68159,7 +68337,7 @@ } }, { - "id": 41344, + "id": 275, "name": "headers", "variant": "param", "kind": 32768, @@ -68176,7 +68354,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -68209,7 +68387,7 @@ "defaultValue": "..." }, { - "id": 41345, + "id": 276, "name": "declineTransfer", "variant": "declaration", "kind": 1024, @@ -68238,13 +68416,13 @@ "fileName": "store/index.ts", "line": 1279, "character": 4, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L1279" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L1279" } ], "type": { "type": "reflection", "declaration": { - "id": 41346, + "id": 277, "name": "__type", "variant": "declaration", "kind": 65536, @@ -68254,12 +68432,12 @@ "fileName": "store/index.ts", "line": 1279, "character": 21, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L1279" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L1279" } ], "signatures": [ { - "id": 41347, + "id": 278, "name": "__type", "variant": "signature", "kind": 4096, @@ -68283,12 +68461,12 @@ "fileName": "store/index.ts", "line": 1279, "character": 21, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L1279" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L1279" } ], "parameters": [ { - "id": 41348, + "id": 279, "name": "id", "variant": "param", "kind": 32768, @@ -68307,7 +68485,7 @@ } }, { - "id": 41349, + "id": 280, "name": "body", "variant": "param", "kind": 32768, @@ -68331,7 +68509,7 @@ } }, { - "id": 41350, + "id": 281, "name": "query", "variant": "param", "kind": 32768, @@ -68357,7 +68535,7 @@ } }, { - "id": 41351, + "id": 282, "name": "headers", "variant": "param", "kind": 32768, @@ -68374,7 +68552,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -68411,12 +68589,12 @@ { "title": "Properties", "children": [ - 41312, - 41317, - 41325, - 41332, - 41338, - 41345 + 243, + 248, + 256, + 263, + 269, + 276 ] } ], @@ -68425,7 +68603,7 @@ "fileName": "store/index.ts", "line": 1034, "character": 17, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L1034" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L1034" } ] } @@ -68433,7 +68611,7 @@ "defaultValue": "..." }, { - "id": 41352, + "id": 283, "name": "customer", "variant": "declaration", "kind": 1024, @@ -68459,20 +68637,20 @@ "fileName": "store/index.ts", "line": 1300, "character": 9, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L1300" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L1300" } ], "type": { "type": "reflection", "declaration": { - "id": 41353, + "id": 284, "name": "__type", "variant": "declaration", "kind": 65536, "flags": {}, "children": [ { - "id": 41354, + "id": 285, "name": "create", "variant": "declaration", "kind": 1024, @@ -68518,13 +68696,13 @@ "fileName": "store/index.ts", "line": 1334, "character": 4, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L1334" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L1334" } ], "type": { "type": "reflection", "declaration": { - "id": 41355, + "id": 286, "name": "__type", "variant": "declaration", "kind": 65536, @@ -68534,12 +68712,12 @@ "fileName": "store/index.ts", "line": 1334, "character": 12, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L1334" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L1334" } ], "signatures": [ { - "id": 41356, + "id": 287, "name": "__type", "variant": "signature", "kind": 4096, @@ -68563,12 +68741,12 @@ "fileName": "store/index.ts", "line": 1334, "character": 12, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L1334" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L1334" } ], "parameters": [ { - "id": 41357, + "id": 288, "name": "body", "variant": "param", "kind": 32768, @@ -68592,7 +68770,7 @@ } }, { - "id": 41358, + "id": 289, "name": "query", "variant": "param", "kind": 32768, @@ -68618,7 +68796,7 @@ } }, { - "id": 41359, + "id": 290, "name": "headers", "variant": "param", "kind": 32768, @@ -68635,7 +68813,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -68668,7 +68846,7 @@ "defaultValue": "..." }, { - "id": 41360, + "id": 291, "name": "update", "variant": "declaration", "kind": 1024, @@ -68706,13 +68884,13 @@ "fileName": "store/index.ts", "line": 1371, "character": 4, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L1371" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L1371" } ], "type": { "type": "reflection", "declaration": { - "id": 41361, + "id": 292, "name": "__type", "variant": "declaration", "kind": 65536, @@ -68722,12 +68900,12 @@ "fileName": "store/index.ts", "line": 1371, "character": 12, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L1371" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L1371" } ], "signatures": [ { - "id": 41362, + "id": 293, "name": "__type", "variant": "signature", "kind": 4096, @@ -68751,12 +68929,12 @@ "fileName": "store/index.ts", "line": 1371, "character": 12, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L1371" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L1371" } ], "parameters": [ { - "id": 41363, + "id": 294, "name": "body", "variant": "param", "kind": 32768, @@ -68780,7 +68958,7 @@ } }, { - "id": 41364, + "id": 295, "name": "query", "variant": "param", "kind": 32768, @@ -68806,7 +68984,7 @@ } }, { - "id": 41365, + "id": 296, "name": "headers", "variant": "param", "kind": 32768, @@ -68823,7 +69001,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -68856,7 +69034,7 @@ "defaultValue": "..." }, { - "id": 41366, + "id": 297, "name": "retrieve", "variant": "declaration", "kind": 1024, @@ -68894,13 +69072,13 @@ "fileName": "store/index.ts", "line": 1403, "character": 4, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L1403" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L1403" } ], "type": { "type": "reflection", "declaration": { - "id": 41367, + "id": 298, "name": "__type", "variant": "declaration", "kind": 65536, @@ -68910,12 +69088,12 @@ "fileName": "store/index.ts", "line": 1403, "character": 14, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L1403" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L1403" } ], "signatures": [ { - "id": 41368, + "id": 299, "name": "__type", "variant": "signature", "kind": 4096, @@ -68939,12 +69117,12 @@ "fileName": "store/index.ts", "line": 1403, "character": 14, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L1403" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L1403" } ], "parameters": [ { - "id": 41369, + "id": 300, "name": "query", "variant": "param", "kind": 32768, @@ -68970,7 +69148,7 @@ } }, { - "id": 41370, + "id": 301, "name": "headers", "variant": "param", "kind": 32768, @@ -68987,7 +69165,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -69020,7 +69198,7 @@ "defaultValue": "..." }, { - "id": 41371, + "id": 302, "name": "createAddress", "variant": "declaration", "kind": 1024, @@ -69058,13 +69236,13 @@ "fileName": "store/index.ts", "line": 1434, "character": 4, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L1434" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L1434" } ], "type": { "type": "reflection", "declaration": { - "id": 41372, + "id": 303, "name": "__type", "variant": "declaration", "kind": 65536, @@ -69074,12 +69252,12 @@ "fileName": "store/index.ts", "line": 1434, "character": 19, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L1434" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L1434" } ], "signatures": [ { - "id": 41373, + "id": 304, "name": "__type", "variant": "signature", "kind": 4096, @@ -69103,12 +69281,12 @@ "fileName": "store/index.ts", "line": 1434, "character": 19, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L1434" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L1434" } ], "parameters": [ { - "id": 41374, + "id": 305, "name": "body", "variant": "param", "kind": 32768, @@ -69132,7 +69310,7 @@ } }, { - "id": 41375, + "id": 306, "name": "query", "variant": "param", "kind": 32768, @@ -69158,7 +69336,7 @@ } }, { - "id": 41376, + "id": 307, "name": "headers", "variant": "param", "kind": 32768, @@ -69175,7 +69353,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -69208,7 +69386,7 @@ "defaultValue": "..." }, { - "id": 41377, + "id": 308, "name": "updateAddress", "variant": "declaration", "kind": 1024, @@ -69246,13 +69424,13 @@ "fileName": "store/index.ts", "line": 1475, "character": 4, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L1475" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L1475" } ], "type": { "type": "reflection", "declaration": { - "id": 41378, + "id": 309, "name": "__type", "variant": "declaration", "kind": 65536, @@ -69262,12 +69440,12 @@ "fileName": "store/index.ts", "line": 1475, "character": 19, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L1475" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L1475" } ], "signatures": [ { - "id": 41379, + "id": 310, "name": "__type", "variant": "signature", "kind": 4096, @@ -69291,12 +69469,12 @@ "fileName": "store/index.ts", "line": 1475, "character": 19, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L1475" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L1475" } ], "parameters": [ { - "id": 41380, + "id": 311, "name": "addressId", "variant": "param", "kind": 32768, @@ -69315,7 +69493,7 @@ } }, { - "id": 41381, + "id": 312, "name": "body", "variant": "param", "kind": 32768, @@ -69339,7 +69517,7 @@ } }, { - "id": 41382, + "id": 313, "name": "query", "variant": "param", "kind": 32768, @@ -69365,7 +69543,7 @@ } }, { - "id": 41383, + "id": 314, "name": "headers", "variant": "param", "kind": 32768, @@ -69382,7 +69560,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -69415,7 +69593,7 @@ "defaultValue": "..." }, { - "id": 41384, + "id": 315, "name": "listAddress", "variant": "declaration", "kind": 1024, @@ -69509,13 +69687,13 @@ "fileName": "store/index.ts", "line": 1542, "character": 4, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L1542" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L1542" } ], "type": { "type": "reflection", "declaration": { - "id": 41385, + "id": 316, "name": "__type", "variant": "declaration", "kind": 65536, @@ -69525,12 +69703,12 @@ "fileName": "store/index.ts", "line": 1542, "character": 17, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L1542" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L1542" } ], "signatures": [ { - "id": 41386, + "id": 317, "name": "__type", "variant": "signature", "kind": 4096, @@ -69554,12 +69732,12 @@ "fileName": "store/index.ts", "line": 1542, "character": 17, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L1542" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L1542" } ], "parameters": [ { - "id": 41387, + "id": 318, "name": "query", "variant": "param", "kind": 32768, @@ -69599,7 +69777,7 @@ } }, { - "id": 41388, + "id": 319, "name": "headers", "variant": "param", "kind": 32768, @@ -69616,7 +69794,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -69649,7 +69827,7 @@ "defaultValue": "..." }, { - "id": 41389, + "id": 320, "name": "retrieveAddress", "variant": "declaration", "kind": 1024, @@ -69711,13 +69889,13 @@ "fileName": "store/index.ts", "line": 1596, "character": 4, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L1596" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L1596" } ], "type": { "type": "reflection", "declaration": { - "id": 41390, + "id": 321, "name": "__type", "variant": "declaration", "kind": 65536, @@ -69727,12 +69905,12 @@ "fileName": "store/index.ts", "line": 1596, "character": 21, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L1596" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L1596" } ], "signatures": [ { - "id": 41391, + "id": 322, "name": "__type", "variant": "signature", "kind": 4096, @@ -69756,12 +69934,12 @@ "fileName": "store/index.ts", "line": 1596, "character": 21, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L1596" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L1596" } ], "parameters": [ { - "id": 41392, + "id": 323, "name": "addressId", "variant": "param", "kind": 32768, @@ -69780,7 +69958,7 @@ } }, { - "id": 41393, + "id": 324, "name": "query", "variant": "param", "kind": 32768, @@ -69806,7 +69984,7 @@ } }, { - "id": 41394, + "id": 325, "name": "headers", "variant": "param", "kind": 32768, @@ -69823,7 +70001,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -69856,7 +70034,7 @@ "defaultValue": "..." }, { - "id": 41395, + "id": 326, "name": "deleteAddress", "variant": "declaration", "kind": 1024, @@ -69894,13 +70072,13 @@ "fileName": "store/index.ts", "line": 1628, "character": 4, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L1628" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L1628" } ], "type": { "type": "reflection", "declaration": { - "id": 41396, + "id": 327, "name": "__type", "variant": "declaration", "kind": 65536, @@ -69910,12 +70088,12 @@ "fileName": "store/index.ts", "line": 1628, "character": 19, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L1628" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L1628" } ], "signatures": [ { - "id": 41397, + "id": 328, "name": "__type", "variant": "signature", "kind": 4096, @@ -69939,12 +70117,12 @@ "fileName": "store/index.ts", "line": 1628, "character": 19, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L1628" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L1628" } ], "parameters": [ { - "id": 41398, + "id": 329, "name": "addressId", "variant": "param", "kind": 32768, @@ -69963,7 +70141,7 @@ } }, { - "id": 41399, + "id": 330, "name": "headers", "variant": "param", "kind": 32768, @@ -69980,7 +70158,7 @@ }, "type": { "type": "reference", - "target": 43239, + "target": 2170, "name": "ClientHeaders", "package": "@medusajs/js-sdk" } @@ -70017,14 +70195,14 @@ { "title": "Properties", "children": [ - 41354, - 41360, - 41366, - 41371, - 41377, - 41384, - 41389, - 41395 + 285, + 291, + 297, + 302, + 308, + 315, + 320, + 326 ] } ], @@ -70033,7 +70211,7 @@ "fileName": "store/index.ts", "line": 1300, "character": 20, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L1300" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L1300" } ] } @@ -70045,15 +70223,15 @@ { "title": "Properties", "children": [ - 41169, - 41182, - 41195, - 41208, - 41221, - 41282, - 41296, - 41310, - 41352 + 100, + 113, + 126, + 139, + 152, + 213, + 227, + 241, + 283 ] } ], @@ -70062,7 +70240,7 @@ "fileName": "store/index.ts", "line": 5, "character": 13, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L5" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L5" } ] } @@ -70071,7 +70249,7 @@ { "title": "Classes", "children": [ - 41164 + 95 ] } ], @@ -70080,7 +70258,7 @@ "fileName": "store/index.ts", "line": 1, "character": 0, - "url": "https://github.com/medusajs/medusa/blob/c53d25e44227bebb4ff4e66e9448d2066f0b7c10/packages/core/js-sdk/src/store/index.ts#L1" + "url": "https://github.com/medusajs/medusa/blob/65b7e26b02f700e6a7798cc49bcd5b80f60888f7/packages/core/js-sdk/src/store/index.ts#L1" } ] } @@ -70089,8939 +70267,8939 @@ { "title": "Modules", "children": [ - 41070, - 41118, - 41163 + 1, + 49, + 94 ] } ], "packageName": "@medusajs/js-sdk", "symbolIdMap": { - "41070": { + "1": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/index.ts", "qualifiedName": "" }, - "41071": { + "2": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/index.ts", "qualifiedName": "Admin" }, - "41072": { + "3": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/index.ts", "qualifiedName": "Admin.__constructor" }, - "41073": { + "4": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/index.ts", "qualifiedName": "Admin" }, - "41074": { + "5": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/index.ts", "qualifiedName": "client" }, - "41075": { + "6": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/index.ts", "qualifiedName": "Admin.invite" }, - "41076": { + "7": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/index.ts", "qualifiedName": "Admin.customer" }, - "41077": { + "8": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/index.ts", "qualifiedName": "Admin.productCollection" }, - "41078": { + "9": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/index.ts", "qualifiedName": "Admin.productCategory" }, - "41079": { + "10": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/index.ts", "qualifiedName": "Admin.priceList" }, - "41080": { + "11": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/index.ts", "qualifiedName": "Admin.pricePreference" }, - "41081": { + "12": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/index.ts", "qualifiedName": "Admin.product" }, - "41082": { + "13": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/index.ts", "qualifiedName": "Admin.productType" }, - "41083": { + "14": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/index.ts", "qualifiedName": "Admin.upload" }, - "41084": { + "15": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/index.ts", "qualifiedName": "Admin.region" }, - "41085": { + "16": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/index.ts", "qualifiedName": "Admin.returnReason" }, - "41086": { + "17": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/index.ts", "qualifiedName": "Admin.stockLocation" }, - "41087": { + "18": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/index.ts", "qualifiedName": "Admin.salesChannel" }, - "41088": { + "19": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/index.ts", "qualifiedName": "Admin.fulfillmentSet" }, - "41089": { + "20": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/index.ts", "qualifiedName": "Admin.fulfillment" }, - "41090": { + "21": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/index.ts", "qualifiedName": "Admin.fulfillmentProvider" }, - "41091": { + "22": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/index.ts", "qualifiedName": "Admin.shippingOption" }, - "41092": { + "23": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/index.ts", "qualifiedName": "Admin.shippingProfile" }, - "41093": { + "24": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/index.ts", "qualifiedName": "Admin.inventoryItem" }, - "41094": { + "25": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/index.ts", "qualifiedName": "Admin.notification" }, - "41095": { + "26": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/index.ts", "qualifiedName": "Admin.order" }, - "41096": { + "27": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/index.ts", "qualifiedName": "Admin.draftOrder" }, - "41097": { + "28": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/index.ts", "qualifiedName": "Admin.orderEdit" }, - "41098": { + "29": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/index.ts", "qualifiedName": "Admin.return" }, - "41099": { + "30": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/index.ts", "qualifiedName": "Admin.claim" }, - "41100": { + "31": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/index.ts", "qualifiedName": "Admin.exchange" }, - "41101": { + "32": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/index.ts", "qualifiedName": "Admin.taxRate" }, - "41102": { + "33": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/index.ts", "qualifiedName": "Admin.taxRegion" }, - "41103": { + "34": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/index.ts", "qualifiedName": "Admin.store" }, - "41104": { + "35": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/index.ts", "qualifiedName": "Admin.productTag" }, - "41105": { + "36": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/index.ts", "qualifiedName": "Admin.user" }, - "41106": { + "37": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/index.ts", "qualifiedName": "Admin.currency" }, - "41107": { + "38": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/index.ts", "qualifiedName": "Admin.payment" }, - "41108": { + "39": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/index.ts", "qualifiedName": "Admin.productVariant" }, - "41109": { + "40": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/index.ts", "qualifiedName": "Admin.refundReason" }, - "41110": { + "41": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/index.ts", "qualifiedName": "Admin.paymentCollection" }, - "41111": { + "42": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/index.ts", "qualifiedName": "Admin.apiKey" }, - "41112": { + "43": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/index.ts", "qualifiedName": "Admin.workflowExecution" }, - "41113": { + "44": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/index.ts", "qualifiedName": "Admin.reservation" }, - "41114": { + "45": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/index.ts", "qualifiedName": "Admin.customerGroup" }, - "41115": { + "46": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/index.ts", "qualifiedName": "Admin.promotion" }, - "41116": { + "47": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/index.ts", "qualifiedName": "Admin.campaign" }, - "41117": { + "48": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/index.ts", "qualifiedName": "Admin.plugin" }, - "41118": { + "49": { "sourceFileName": "../../../../packages/core/js-sdk/src/auth/index.ts", "qualifiedName": "" }, - "41119": { + "50": { "sourceFileName": "../../../../packages/core/js-sdk/src/auth/index.ts", "qualifiedName": "Auth" }, - "41120": { + "51": { "sourceFileName": "../../../../packages/core/js-sdk/src/auth/index.ts", "qualifiedName": "Auth.__constructor" }, - "41121": { + "52": { "sourceFileName": "../../../../packages/core/js-sdk/src/auth/index.ts", "qualifiedName": "Auth" }, - "41122": { + "53": { "sourceFileName": "../../../../packages/core/js-sdk/src/auth/index.ts", "qualifiedName": "client" }, - "41123": { + "54": { "sourceFileName": "../../../../packages/core/js-sdk/src/auth/index.ts", "qualifiedName": "config" }, - "41126": { + "57": { "sourceFileName": "../../../../packages/core/js-sdk/src/auth/index.ts", "qualifiedName": "Auth.register" }, - "41127": { + "58": { "sourceFileName": "../../../../packages/core/js-sdk/src/auth/index.ts", "qualifiedName": "Auth.register" }, - "41128": { + "59": { "sourceFileName": "../../../../packages/core/js-sdk/src/auth/index.ts", "qualifiedName": "actor" }, - "41129": { + "60": { "sourceFileName": "../../../../packages/core/js-sdk/src/auth/index.ts", "qualifiedName": "method" }, - "41130": { + "61": { "sourceFileName": "../../../../packages/core/js-sdk/src/auth/index.ts", "qualifiedName": "payload" }, - "41131": { + "62": { "sourceFileName": "../../../../packages/core/js-sdk/src/auth/index.ts", "qualifiedName": "Auth.login" }, - "41132": { + "63": { "sourceFileName": "../../../../packages/core/js-sdk/src/auth/index.ts", "qualifiedName": "Auth.login" }, - "41133": { + "64": { "sourceFileName": "../../../../packages/core/js-sdk/src/auth/index.ts", "qualifiedName": "actor" }, - "41134": { + "65": { "sourceFileName": "../../../../packages/core/js-sdk/src/auth/index.ts", "qualifiedName": "method" }, - "41135": { + "66": { "sourceFileName": "../../../../packages/core/js-sdk/src/auth/index.ts", "qualifiedName": "payload" }, - "41136": { + "67": { "sourceFileName": "../../../../packages/core/js-sdk/src/auth/index.ts", "qualifiedName": "__object" }, - "41137": { + "68": { "sourceFileName": "../../../../packages/core/js-sdk/src/auth/index.ts", "qualifiedName": "__object.location" }, - "41138": { + "69": { "sourceFileName": "../../../../packages/core/js-sdk/src/auth/index.ts", "qualifiedName": "Auth.callback" }, - "41139": { + "70": { "sourceFileName": "../../../../packages/core/js-sdk/src/auth/index.ts", "qualifiedName": "Auth.callback" }, - "41140": { + "71": { "sourceFileName": "../../../../packages/core/js-sdk/src/auth/index.ts", "qualifiedName": "actor" }, - "41141": { + "72": { "sourceFileName": "../../../../packages/core/js-sdk/src/auth/index.ts", "qualifiedName": "method" }, - "41142": { + "73": { "sourceFileName": "../../../../packages/core/js-sdk/src/auth/index.ts", "qualifiedName": "query" }, - "41143": { + "74": { "sourceFileName": "../../../../packages/core/js-sdk/src/auth/index.ts", "qualifiedName": "Auth.refresh" }, - "41144": { + "75": { "sourceFileName": "../../../../packages/core/js-sdk/src/auth/index.ts", "qualifiedName": "Auth.refresh" }, - "41145": { + "76": { "sourceFileName": "../../../../packages/core/js-sdk/src/auth/index.ts", "qualifiedName": "Auth.logout" }, - "41146": { + "77": { "sourceFileName": "../../../../packages/core/js-sdk/src/auth/index.ts", "qualifiedName": "Auth.logout" }, - "41147": { + "78": { "sourceFileName": "../../../../packages/core/js-sdk/src/auth/index.ts", "qualifiedName": "Auth.resetPassword" }, - "41148": { + "79": { "sourceFileName": "../../../../packages/core/js-sdk/src/auth/index.ts", "qualifiedName": "Auth.resetPassword" }, - "41149": { + "80": { "sourceFileName": "../../../../packages/core/js-sdk/src/auth/index.ts", "qualifiedName": "actor" }, - "41150": { + "81": { "sourceFileName": "../../../../packages/core/js-sdk/src/auth/index.ts", "qualifiedName": "provider" }, - "41151": { + "82": { "sourceFileName": "../../../../packages/core/js-sdk/src/auth/index.ts", "qualifiedName": "body" }, - "41152": { + "83": { "sourceFileName": "../../../../packages/core/js-sdk/src/auth/index.ts", "qualifiedName": "__type" }, - "41153": { + "84": { "sourceFileName": "../../../../packages/core/js-sdk/src/auth/index.ts", "qualifiedName": "__type.identifier" }, - "41154": { + "85": { "sourceFileName": "../../../../packages/core/js-sdk/src/auth/index.ts", "qualifiedName": "Auth.updateProvider" }, - "41155": { + "86": { "sourceFileName": "../../../../packages/core/js-sdk/src/auth/index.ts", "qualifiedName": "Auth.updateProvider" }, - "41156": { + "87": { "sourceFileName": "../../../../packages/core/js-sdk/src/auth/index.ts", "qualifiedName": "actor" }, - "41157": { + "88": { "sourceFileName": "../../../../packages/core/js-sdk/src/auth/index.ts", "qualifiedName": "provider" }, - "41158": { + "89": { "sourceFileName": "../../../../packages/core/js-sdk/src/auth/index.ts", "qualifiedName": "body" }, - "41159": { + "90": { "sourceFileName": "../../../../packages/core/js-sdk/src/auth/index.ts", "qualifiedName": "token" }, - "41163": { + "94": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "" }, - "41164": { + "95": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "Store" }, - "41169": { + "100": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "Store.region" }, - "41170": { + "101": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__object" }, - "41171": { + "102": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__object.list" }, - "41172": { + "103": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__function" }, - "41173": { + "104": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__function" }, - "41174": { + "105": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "query" }, - "41175": { + "106": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "headers" }, - "41176": { + "107": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__object.retrieve" }, - "41177": { + "108": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__function" }, - "41178": { + "109": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__function" }, - "41179": { + "110": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "id" }, - "41180": { + "111": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "query" }, - "41181": { + "112": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "headers" }, - "41182": { + "113": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "Store.collection" }, - "41183": { + "114": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__object" }, - "41184": { + "115": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__object.list" }, - "41185": { + "116": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__function" }, - "41186": { + "117": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__function" }, - "41187": { + "118": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "query" }, - "41188": { + "119": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "headers" }, - "41189": { + "120": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__object.retrieve" }, - "41190": { + "121": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__function" }, - "41191": { + "122": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__function" }, - "41192": { + "123": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "id" }, - "41193": { + "124": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "query" }, - "41194": { + "125": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "headers" }, - "41195": { + "126": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "Store.category" }, - "41196": { + "127": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__object" }, - "41197": { + "128": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__object.list" }, - "41198": { + "129": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__function" }, - "41199": { + "130": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__function" }, - "41200": { + "131": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "query" }, - "41201": { + "132": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "headers" }, - "41202": { + "133": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__object.retrieve" }, - "41203": { + "134": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__function" }, - "41204": { + "135": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__function" }, - "41205": { + "136": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "id" }, - "41206": { + "137": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "query" }, - "41207": { + "138": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "headers" }, - "41208": { + "139": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "Store.product" }, - "41209": { + "140": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__object" }, - "41210": { + "141": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__object.list" }, - "41211": { + "142": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__function" }, - "41212": { + "143": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__function" }, - "41213": { + "144": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "query" }, - "41214": { + "145": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "headers" }, - "41215": { + "146": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__object.retrieve" }, - "41216": { + "147": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__function" }, - "41217": { + "148": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__function" }, - "41218": { + "149": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "id" }, - "41219": { + "150": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "query" }, - "41220": { + "151": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "headers" }, - "41221": { + "152": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "Store.cart" }, - "41222": { + "153": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__object" }, - "41223": { + "154": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__object.create" }, - "41224": { + "155": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__function" }, - "41225": { + "156": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__function" }, - "41226": { + "157": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "body" }, - "41227": { + "158": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "query" }, - "41228": { + "159": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "headers" }, - "41229": { + "160": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__object.update" }, - "41230": { + "161": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__function" }, - "41231": { + "162": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__function" }, - "41232": { + "163": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "id" }, - "41233": { + "164": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "body" }, - "41234": { + "165": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "query" }, - "41235": { + "166": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "headers" }, - "41236": { + "167": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__object.retrieve" }, - "41237": { + "168": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__function" }, - "41238": { + "169": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__function" }, - "41239": { + "170": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "id" }, - "41240": { + "171": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "query" }, - "41241": { + "172": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "headers" }, - "41242": { + "173": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__object.createLineItem" }, - "41243": { + "174": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__function" }, - "41244": { + "175": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__function" }, - "41245": { + "176": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "cartId" }, - "41246": { + "177": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "body" }, - "41247": { + "178": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "query" }, - "41248": { + "179": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "headers" }, - "41249": { + "180": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__object.updateLineItem" }, - "41250": { + "181": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__function" }, - "41251": { + "182": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__function" }, - "41252": { + "183": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "cartId" }, - "41253": { + "184": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "lineItemId" }, - "41254": { + "185": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "body" }, - "41255": { + "186": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "query" }, - "41256": { + "187": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "headers" }, - "41257": { + "188": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__object.deleteLineItem" }, - "41258": { + "189": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__function" }, - "41259": { + "190": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__function" }, - "41260": { + "191": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "cartId" }, - "41261": { + "192": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "lineItemId" }, - "41262": { + "193": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "headers" }, - "41263": { + "194": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__object.addShippingMethod" }, - "41264": { + "195": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__function" }, - "41265": { + "196": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__function" }, - "41266": { + "197": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "cartId" }, - "41267": { + "198": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "body" }, - "41268": { + "199": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "query" }, - "41269": { + "200": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "headers" }, - "41270": { + "201": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__object.complete" }, - "41271": { + "202": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__function" }, - "41272": { + "203": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__function" }, - "41273": { + "204": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "cartId" }, - "41274": { + "205": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "query" }, - "41275": { + "206": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "headers" }, - "41276": { + "207": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__object.transferCart" }, - "41277": { + "208": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__function" }, - "41278": { + "209": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__function" }, - "41279": { + "210": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "id" }, - "41280": { + "211": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "query" }, - "41281": { + "212": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "headers" }, - "41282": { + "213": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "Store.fulfillment" }, - "41283": { + "214": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__object" }, - "41284": { + "215": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__object.listCartOptions" }, - "41285": { + "216": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__function" }, - "41286": { + "217": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__function" }, - "41287": { + "218": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "query" }, - "41288": { + "219": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "headers" }, - "41289": { + "220": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__object.calculate" }, - "41290": { + "221": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__function" }, - "41291": { + "222": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__function" }, - "41292": { + "223": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "id" }, - "41293": { + "224": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "body" }, - "41294": { + "225": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "query" }, - "41295": { + "226": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "headers" }, - "41296": { + "227": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "Store.payment" }, - "41297": { + "228": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__object" }, - "41298": { + "229": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__object.listPaymentProviders" }, - "41299": { + "230": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__function" }, - "41300": { + "231": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__function" }, - "41301": { + "232": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "query" }, - "41302": { + "233": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "headers" }, - "41303": { + "234": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__object.initiatePaymentSession" }, - "41304": { + "235": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__function" }, - "41305": { + "236": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__function" }, - "41306": { + "237": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "cart" }, - "41307": { + "238": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "body" }, - "41308": { + "239": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "query" }, - "41309": { + "240": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "headers" }, - "41310": { + "241": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "Store.order" }, - "41311": { + "242": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__object" }, - "41312": { + "243": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__object.list" }, - "41313": { + "244": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__function" }, - "41314": { + "245": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__function" }, - "41315": { + "246": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "query" }, - "41316": { + "247": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "headers" }, - "41317": { + "248": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__object.retrieve" }, - "41318": { + "249": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__function" }, - "41319": { + "250": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__function" }, - "41320": { + "251": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "id" }, - "41321": { + "252": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "query" }, - "41322": { + "253": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "headers" }, - "41323": { + "254": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__type" }, - "41324": { + "255": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__type.order" }, - "41325": { + "256": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__object.requestTransfer" }, - "41326": { + "257": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__function" }, - "41327": { + "258": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__function" }, - "41328": { + "259": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "id" }, - "41329": { + "260": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "body" }, - "41330": { + "261": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "query" }, - "41331": { + "262": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "headers" }, - "41332": { + "263": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__object.cancelTransfer" }, - "41333": { + "264": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__function" }, - "41334": { + "265": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__function" }, - "41335": { + "266": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "id" }, - "41336": { + "267": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "query" }, - "41337": { + "268": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "headers" }, - "41338": { + "269": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__object.acceptTransfer" }, - "41339": { + "270": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__function" }, - "41340": { + "271": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__function" }, - "41341": { + "272": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "id" }, - "41342": { + "273": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "body" }, - "41343": { + "274": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "query" }, - "41344": { + "275": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "headers" }, - "41345": { + "276": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__object.declineTransfer" }, - "41346": { + "277": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__function" }, - "41347": { + "278": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__function" }, - "41348": { + "279": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "id" }, - "41349": { + "280": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "body" }, - "41350": { + "281": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "query" }, - "41351": { + "282": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "headers" }, - "41352": { + "283": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "Store.customer" }, - "41353": { + "284": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__object" }, - "41354": { + "285": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__object.create" }, - "41355": { + "286": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__function" }, - "41356": { + "287": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__function" }, - "41357": { + "288": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "body" }, - "41358": { + "289": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "query" }, - "41359": { + "290": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "headers" }, - "41360": { + "291": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__object.update" }, - "41361": { + "292": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__function" }, - "41362": { + "293": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__function" }, - "41363": { + "294": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "body" }, - "41364": { + "295": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "query" }, - "41365": { + "296": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "headers" }, - "41366": { + "297": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__object.retrieve" }, - "41367": { + "298": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__function" }, - "41368": { + "299": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__function" }, - "41369": { + "300": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "query" }, - "41370": { + "301": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "headers" }, - "41371": { + "302": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__object.createAddress" }, - "41372": { + "303": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__function" }, - "41373": { + "304": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__function" }, - "41374": { + "305": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "body" }, - "41375": { + "306": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "query" }, - "41376": { + "307": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "headers" }, - "41377": { + "308": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__object.updateAddress" }, - "41378": { + "309": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__function" }, - "41379": { + "310": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__function" }, - "41380": { + "311": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "addressId" }, - "41381": { + "312": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "body" }, - "41382": { + "313": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "query" }, - "41383": { + "314": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "headers" }, - "41384": { + "315": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__object.listAddress" }, - "41385": { + "316": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__function" }, - "41386": { + "317": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__function" }, - "41387": { + "318": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "query" }, - "41388": { + "319": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "headers" }, - "41389": { + "320": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__object.retrieveAddress" }, - "41390": { + "321": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__function" }, - "41391": { + "322": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__function" }, - "41392": { + "323": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "addressId" }, - "41393": { + "324": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "query" }, - "41394": { + "325": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "headers" }, - "41395": { + "326": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__object.deleteAddress" }, - "41396": { + "327": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__function" }, - "41397": { + "328": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "__function" }, - "41398": { + "329": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "addressId" }, - "41399": { + "330": { "sourceFileName": "../../../../packages/core/js-sdk/src/store/index.ts", "qualifiedName": "headers" }, - "41400": { + "331": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/invite.ts", "qualifiedName": "Invite" }, - "41401": { + "332": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/invite.ts", "qualifiedName": "Invite.__constructor" }, - "41402": { + "333": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/invite.ts", "qualifiedName": "Invite" }, - "41403": { + "334": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/invite.ts", "qualifiedName": "client" }, - "41404": { + "335": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/invite.ts", "qualifiedName": "Invite.client" }, - "41405": { + "336": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/invite.ts", "qualifiedName": "Invite.accept" }, - "41406": { + "337": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/invite.ts", "qualifiedName": "Invite.accept" }, - "41407": { + "338": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/invite.ts", "qualifiedName": "input" }, - "41408": { + "339": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/invite.ts", "qualifiedName": "__type" }, - "41409": { + "340": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/invite.ts", "qualifiedName": "__type.invite_token" }, - "41410": { + "341": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/invite.ts", "qualifiedName": "query" }, - "41411": { + "342": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/invite.ts", "qualifiedName": "headers" }, - "41412": { + "343": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/invite.ts", "qualifiedName": "Invite.create" }, - "41413": { + "344": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/invite.ts", "qualifiedName": "Invite.create" }, - "41414": { + "345": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/invite.ts", "qualifiedName": "body" }, - "41415": { + "346": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/invite.ts", "qualifiedName": "query" }, - "41416": { + "347": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/invite.ts", "qualifiedName": "headers" }, - "41417": { + "348": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/invite.ts", "qualifiedName": "Invite.retrieve" }, - "41418": { + "349": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/invite.ts", "qualifiedName": "Invite.retrieve" }, - "41419": { + "350": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/invite.ts", "qualifiedName": "id" }, - "41420": { + "351": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/invite.ts", "qualifiedName": "query" }, - "41421": { + "352": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/invite.ts", "qualifiedName": "headers" }, - "41422": { + "353": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/invite.ts", "qualifiedName": "Invite.list" }, - "41423": { + "354": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/invite.ts", "qualifiedName": "Invite.list" }, - "41424": { + "355": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/invite.ts", "qualifiedName": "queryParams" }, - "41425": { + "356": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/invite.ts", "qualifiedName": "headers" }, - "41426": { + "357": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/invite.ts", "qualifiedName": "Invite.resend" }, - "41427": { + "358": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/invite.ts", "qualifiedName": "Invite.resend" }, - "41428": { + "359": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/invite.ts", "qualifiedName": "id" }, - "41429": { + "360": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/invite.ts", "qualifiedName": "headers" }, - "41430": { + "361": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/invite.ts", "qualifiedName": "Invite.delete" }, - "41431": { + "362": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/invite.ts", "qualifiedName": "Invite.delete" }, - "41432": { + "363": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/invite.ts", "qualifiedName": "id" }, - "41433": { + "364": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/invite.ts", "qualifiedName": "headers" }, - "41434": { + "365": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer.ts", "qualifiedName": "Customer" }, - "41435": { + "366": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer.ts", "qualifiedName": "Customer.__constructor" }, - "41436": { + "367": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer.ts", "qualifiedName": "Customer" }, - "41437": { + "368": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer.ts", "qualifiedName": "client" }, - "41438": { + "369": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer.ts", "qualifiedName": "Customer.client" }, - "41439": { + "370": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer.ts", "qualifiedName": "Customer.create" }, - "41440": { + "371": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer.ts", "qualifiedName": "Customer.create" }, - "41441": { + "372": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer.ts", "qualifiedName": "body" }, - "41442": { + "373": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer.ts", "qualifiedName": "query" }, - "41443": { + "374": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer.ts", "qualifiedName": "headers" }, - "41444": { + "375": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer.ts", "qualifiedName": "Customer.update" }, - "41445": { + "376": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer.ts", "qualifiedName": "Customer.update" }, - "41446": { + "377": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer.ts", "qualifiedName": "id" }, - "41447": { + "378": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer.ts", "qualifiedName": "body" }, - "41448": { + "379": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer.ts", "qualifiedName": "query" }, - "41449": { + "380": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer.ts", "qualifiedName": "headers" }, - "41450": { + "381": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer.ts", "qualifiedName": "Customer.list" }, - "41451": { + "382": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer.ts", "qualifiedName": "Customer.list" }, - "41452": { + "383": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer.ts", "qualifiedName": "queryParams" }, - "41453": { + "384": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer.ts", "qualifiedName": "headers" }, - "41454": { + "385": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer.ts", "qualifiedName": "Customer.retrieve" }, - "41455": { + "386": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer.ts", "qualifiedName": "Customer.retrieve" }, - "41456": { + "387": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer.ts", "qualifiedName": "id" }, - "41457": { + "388": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer.ts", "qualifiedName": "query" }, - "41458": { + "389": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer.ts", "qualifiedName": "headers" }, - "41459": { + "390": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer.ts", "qualifiedName": "Customer.delete" }, - "41460": { + "391": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer.ts", "qualifiedName": "Customer.delete" }, - "41461": { + "392": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer.ts", "qualifiedName": "id" }, - "41462": { + "393": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer.ts", "qualifiedName": "headers" }, - "41463": { + "394": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer.ts", "qualifiedName": "Customer.batchCustomerGroups" }, - "41464": { + "395": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer.ts", "qualifiedName": "Customer.batchCustomerGroups" }, - "41465": { + "396": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer.ts", "qualifiedName": "id" }, - "41466": { + "397": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer.ts", "qualifiedName": "body" }, - "41467": { + "398": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer.ts", "qualifiedName": "headers" }, - "41468": { + "399": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer.ts", "qualifiedName": "Customer.createAddress" }, - "41469": { + "400": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer.ts", "qualifiedName": "Customer.createAddress" }, - "41470": { + "401": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer.ts", "qualifiedName": "id" }, - "41471": { + "402": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer.ts", "qualifiedName": "body" }, - "41472": { + "403": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer.ts", "qualifiedName": "headers" }, - "41473": { + "404": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer.ts", "qualifiedName": "Customer.updateAddress" }, - "41474": { + "405": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer.ts", "qualifiedName": "Customer.updateAddress" }, - "41475": { + "406": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer.ts", "qualifiedName": "id" }, - "41476": { + "407": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer.ts", "qualifiedName": "addressId" }, - "41477": { + "408": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer.ts", "qualifiedName": "body" }, - "41478": { + "409": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer.ts", "qualifiedName": "headers" }, - "41479": { + "410": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer.ts", "qualifiedName": "Customer.deleteAddress" }, - "41480": { + "411": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer.ts", "qualifiedName": "Customer.deleteAddress" }, - "41481": { + "412": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer.ts", "qualifiedName": "id" }, - "41482": { + "413": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer.ts", "qualifiedName": "addressId" }, - "41483": { + "414": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer.ts", "qualifiedName": "headers" }, - "41484": { + "415": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer.ts", "qualifiedName": "Customer.retrieveAddress" }, - "41485": { + "416": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer.ts", "qualifiedName": "Customer.retrieveAddress" }, - "41486": { + "417": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer.ts", "qualifiedName": "id" }, - "41487": { + "418": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer.ts", "qualifiedName": "addressId" }, - "41488": { + "419": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer.ts", "qualifiedName": "headers" }, - "41489": { + "420": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer.ts", "qualifiedName": "Customer.listAddresses" }, - "41490": { + "421": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer.ts", "qualifiedName": "Customer.listAddresses" }, - "41491": { + "422": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer.ts", "qualifiedName": "id" }, - "41492": { + "423": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer.ts", "qualifiedName": "headers" }, - "41493": { + "424": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-collection.ts", "qualifiedName": "ProductCollection" }, - "41494": { + "425": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-collection.ts", "qualifiedName": "ProductCollection.__constructor" }, - "41495": { + "426": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-collection.ts", "qualifiedName": "ProductCollection" }, - "41496": { + "427": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-collection.ts", "qualifiedName": "client" }, - "41497": { + "428": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-collection.ts", "qualifiedName": "ProductCollection.client" }, - "41498": { + "429": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-collection.ts", "qualifiedName": "ProductCollection.create" }, - "41499": { + "430": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-collection.ts", "qualifiedName": "ProductCollection.create" }, - "41500": { + "431": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-collection.ts", "qualifiedName": "body" }, - "41501": { + "432": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-collection.ts", "qualifiedName": "query" }, - "41502": { + "433": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-collection.ts", "qualifiedName": "headers" }, - "41503": { + "434": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-collection.ts", "qualifiedName": "ProductCollection.update" }, - "41504": { + "435": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-collection.ts", "qualifiedName": "ProductCollection.update" }, - "41505": { + "436": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-collection.ts", "qualifiedName": "id" }, - "41506": { + "437": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-collection.ts", "qualifiedName": "body" }, - "41507": { + "438": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-collection.ts", "qualifiedName": "query" }, - "41508": { + "439": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-collection.ts", "qualifiedName": "headers" }, - "41509": { + "440": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-collection.ts", "qualifiedName": "ProductCollection.list" }, - "41510": { + "441": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-collection.ts", "qualifiedName": "ProductCollection.list" }, - "41511": { + "442": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-collection.ts", "qualifiedName": "queryParams" }, - "41512": { + "443": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-collection.ts", "qualifiedName": "headers" }, - "41513": { + "444": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-collection.ts", "qualifiedName": "ProductCollection.retrieve" }, - "41514": { + "445": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-collection.ts", "qualifiedName": "ProductCollection.retrieve" }, - "41515": { + "446": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-collection.ts", "qualifiedName": "id" }, - "41516": { + "447": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-collection.ts", "qualifiedName": "query" }, - "41517": { + "448": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-collection.ts", "qualifiedName": "headers" }, - "41518": { + "449": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-collection.ts", "qualifiedName": "ProductCollection.delete" }, - "41519": { + "450": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-collection.ts", "qualifiedName": "ProductCollection.delete" }, - "41520": { + "451": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-collection.ts", "qualifiedName": "id" }, - "41521": { + "452": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-collection.ts", "qualifiedName": "headers" }, - "41522": { + "453": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-collection.ts", "qualifiedName": "ProductCollection.updateProducts" }, - "41523": { + "454": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-collection.ts", "qualifiedName": "ProductCollection.updateProducts" }, - "41524": { + "455": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-collection.ts", "qualifiedName": "id" }, - "41525": { + "456": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-collection.ts", "qualifiedName": "body" }, - "41526": { + "457": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-collection.ts", "qualifiedName": "headers" }, - "41527": { + "458": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-category.ts", "qualifiedName": "ProductCategory" }, - "41528": { + "459": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-category.ts", "qualifiedName": "ProductCategory.__constructor" }, - "41529": { + "460": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-category.ts", "qualifiedName": "ProductCategory" }, - "41530": { + "461": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-category.ts", "qualifiedName": "client" }, - "41531": { + "462": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-category.ts", "qualifiedName": "ProductCategory.client" }, - "41532": { + "463": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-category.ts", "qualifiedName": "ProductCategory.create" }, - "41533": { + "464": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-category.ts", "qualifiedName": "ProductCategory.create" }, - "41534": { + "465": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-category.ts", "qualifiedName": "body" }, - "41535": { + "466": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-category.ts", "qualifiedName": "query" }, - "41536": { + "467": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-category.ts", "qualifiedName": "headers" }, - "41537": { + "468": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-category.ts", "qualifiedName": "ProductCategory.update" }, - "41538": { + "469": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-category.ts", "qualifiedName": "ProductCategory.update" }, - "41539": { + "470": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-category.ts", "qualifiedName": "id" }, - "41540": { + "471": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-category.ts", "qualifiedName": "body" }, - "41541": { + "472": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-category.ts", "qualifiedName": "query" }, - "41542": { + "473": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-category.ts", "qualifiedName": "headers" }, - "41543": { + "474": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-category.ts", "qualifiedName": "ProductCategory.list" }, - "41544": { + "475": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-category.ts", "qualifiedName": "ProductCategory.list" }, - "41545": { + "476": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-category.ts", "qualifiedName": "query" }, - "41546": { + "477": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-category.ts", "qualifiedName": "headers" }, - "41547": { + "478": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-category.ts", "qualifiedName": "ProductCategory.retrieve" }, - "41548": { + "479": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-category.ts", "qualifiedName": "ProductCategory.retrieve" }, - "41549": { + "480": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-category.ts", "qualifiedName": "id" }, - "41550": { + "481": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-category.ts", "qualifiedName": "query" }, - "41551": { + "482": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-category.ts", "qualifiedName": "headers" }, - "41552": { + "483": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-category.ts", "qualifiedName": "ProductCategory.delete" }, - "41553": { + "484": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-category.ts", "qualifiedName": "ProductCategory.delete" }, - "41554": { + "485": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-category.ts", "qualifiedName": "id" }, - "41555": { + "486": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-category.ts", "qualifiedName": "headers" }, - "41556": { + "487": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-category.ts", "qualifiedName": "ProductCategory.updateProducts" }, - "41557": { + "488": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-category.ts", "qualifiedName": "ProductCategory.updateProducts" }, - "41558": { + "489": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-category.ts", "qualifiedName": "id" }, - "41559": { + "490": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-category.ts", "qualifiedName": "body" }, - "41560": { + "491": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-category.ts", "qualifiedName": "query" }, - "41561": { + "492": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-category.ts", "qualifiedName": "headers" }, - "41562": { + "493": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/price-list.ts", "qualifiedName": "PriceList" }, - "41563": { + "494": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/price-list.ts", "qualifiedName": "PriceList.__constructor" }, - "41564": { + "495": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/price-list.ts", "qualifiedName": "PriceList" }, - "41565": { + "496": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/price-list.ts", "qualifiedName": "client" }, - "41566": { + "497": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/price-list.ts", "qualifiedName": "PriceList.client" }, - "41567": { + "498": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/price-list.ts", "qualifiedName": "PriceList.retrieve" }, - "41568": { + "499": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/price-list.ts", "qualifiedName": "PriceList.retrieve" }, - "41569": { + "500": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/price-list.ts", "qualifiedName": "id" }, - "41570": { + "501": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/price-list.ts", "qualifiedName": "query" }, - "41571": { + "502": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/price-list.ts", "qualifiedName": "headers" }, - "41572": { + "503": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/price-list.ts", "qualifiedName": "PriceList.list" }, - "41573": { + "504": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/price-list.ts", "qualifiedName": "PriceList.list" }, - "41574": { + "505": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/price-list.ts", "qualifiedName": "query" }, - "41575": { + "506": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/price-list.ts", "qualifiedName": "headers" }, - "41576": { + "507": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/price-list.ts", "qualifiedName": "PriceList.create" }, - "41577": { + "508": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/price-list.ts", "qualifiedName": "PriceList.create" }, - "41578": { + "509": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/price-list.ts", "qualifiedName": "body" }, - "41579": { + "510": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/price-list.ts", "qualifiedName": "query" }, - "41580": { + "511": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/price-list.ts", "qualifiedName": "headers" }, - "41581": { + "512": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/price-list.ts", "qualifiedName": "PriceList.update" }, - "41582": { + "513": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/price-list.ts", "qualifiedName": "PriceList.update" }, - "41583": { + "514": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/price-list.ts", "qualifiedName": "id" }, - "41584": { + "515": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/price-list.ts", "qualifiedName": "body" }, - "41585": { + "516": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/price-list.ts", "qualifiedName": "query" }, - "41586": { + "517": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/price-list.ts", "qualifiedName": "headers" }, - "41587": { + "518": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/price-list.ts", "qualifiedName": "PriceList.delete" }, - "41588": { + "519": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/price-list.ts", "qualifiedName": "PriceList.delete" }, - "41589": { + "520": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/price-list.ts", "qualifiedName": "id" }, - "41590": { + "521": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/price-list.ts", "qualifiedName": "headers" }, - "41591": { + "522": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/price-list.ts", "qualifiedName": "PriceList.batchPrices" }, - "41592": { + "523": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/price-list.ts", "qualifiedName": "PriceList.batchPrices" }, - "41593": { + "524": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/price-list.ts", "qualifiedName": "id" }, - "41594": { + "525": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/price-list.ts", "qualifiedName": "body" }, - "41595": { + "526": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/price-list.ts", "qualifiedName": "query" }, - "41596": { + "527": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/price-list.ts", "qualifiedName": "headers" }, - "41597": { + "528": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/price-list.ts", "qualifiedName": "PriceList.linkProducts" }, - "41598": { + "529": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/price-list.ts", "qualifiedName": "PriceList.linkProducts" }, - "41599": { + "530": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/price-list.ts", "qualifiedName": "id" }, - "41600": { + "531": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/price-list.ts", "qualifiedName": "body" }, - "41601": { + "532": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/price-list.ts", "qualifiedName": "query" }, - "41602": { + "533": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/price-list.ts", "qualifiedName": "headers" }, - "41603": { + "534": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/price-preference.ts", "qualifiedName": "PricePreference" }, - "41604": { + "535": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/price-preference.ts", "qualifiedName": "PricePreference.__constructor" }, - "41605": { + "536": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/price-preference.ts", "qualifiedName": "PricePreference" }, - "41606": { + "537": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/price-preference.ts", "qualifiedName": "client" }, - "41607": { + "538": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/price-preference.ts", "qualifiedName": "PricePreference.client" }, - "41608": { + "539": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/price-preference.ts", "qualifiedName": "PricePreference.retrieve" }, - "41609": { + "540": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/price-preference.ts", "qualifiedName": "PricePreference.retrieve" }, - "41610": { + "541": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/price-preference.ts", "qualifiedName": "id" }, - "41611": { + "542": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/price-preference.ts", "qualifiedName": "query" }, - "41612": { + "543": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/price-preference.ts", "qualifiedName": "headers" }, - "41613": { + "544": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/price-preference.ts", "qualifiedName": "PricePreference.list" }, - "41614": { + "545": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/price-preference.ts", "qualifiedName": "PricePreference.list" }, - "41615": { + "546": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/price-preference.ts", "qualifiedName": "query" }, - "41616": { + "547": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/price-preference.ts", "qualifiedName": "headers" }, - "41617": { + "548": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/price-preference.ts", "qualifiedName": "PricePreference.create" }, - "41618": { + "549": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/price-preference.ts", "qualifiedName": "PricePreference.create" }, - "41619": { + "550": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/price-preference.ts", "qualifiedName": "body" }, - "41620": { + "551": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/price-preference.ts", "qualifiedName": "query" }, - "41621": { + "552": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/price-preference.ts", "qualifiedName": "headers" }, - "41622": { + "553": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/price-preference.ts", "qualifiedName": "PricePreference.update" }, - "41623": { + "554": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/price-preference.ts", "qualifiedName": "PricePreference.update" }, - "41624": { + "555": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/price-preference.ts", "qualifiedName": "id" }, - "41625": { + "556": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/price-preference.ts", "qualifiedName": "body" }, - "41626": { + "557": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/price-preference.ts", "qualifiedName": "query" }, - "41627": { + "558": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/price-preference.ts", "qualifiedName": "headers" }, - "41628": { + "559": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/price-preference.ts", "qualifiedName": "PricePreference.delete" }, - "41629": { + "560": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/price-preference.ts", "qualifiedName": "PricePreference.delete" }, - "41630": { + "561": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/price-preference.ts", "qualifiedName": "id" }, - "41631": { + "562": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/price-preference.ts", "qualifiedName": "headers" }, - "41632": { + "563": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "Product" }, - "41633": { + "564": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "Product.__constructor" }, - "41634": { + "565": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "Product" }, - "41635": { + "566": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "client" }, - "41636": { + "567": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "Product.client" }, - "41637": { + "568": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "Product.import" }, - "41638": { + "569": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "Product.import" }, - "41639": { + "570": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "body" }, - "41640": { + "571": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "query" }, - "41641": { + "572": { "sourceFileName": "", "qualifiedName": "__type" }, - "41642": { + "573": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "headers" }, - "41643": { + "574": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "Product.confirmImport" }, - "41644": { + "575": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "Product.confirmImport" }, - "41645": { + "576": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "transactionId" }, - "41646": { + "577": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "query" }, - "41647": { + "578": { "sourceFileName": "", "qualifiedName": "__type" }, - "41648": { + "579": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "headers" }, - "41649": { + "580": { "sourceFileName": "", "qualifiedName": "__type" }, - "41650": { + "581": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "Product.export" }, - "41651": { + "582": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "Product.export" }, - "41652": { + "583": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "body" }, - "41653": { + "584": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "query" }, - "41654": { + "585": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "headers" }, - "41655": { + "586": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "Product.batch" }, - "41656": { + "587": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "Product.batch" }, - "41657": { + "588": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "body" }, - "41658": { + "589": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "query" }, - "41659": { + "590": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "headers" }, - "41660": { + "591": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "Product.create" }, - "41661": { + "592": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "Product.create" }, - "41662": { + "593": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "body" }, - "41663": { + "594": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "query" }, - "41664": { + "595": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "headers" }, - "41665": { + "596": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "Product.update" }, - "41666": { + "597": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "Product.update" }, - "41667": { + "598": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "id" }, - "41668": { + "599": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "body" }, - "41669": { + "600": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "query" }, - "41670": { + "601": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "headers" }, - "41671": { + "602": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "Product.list" }, - "41672": { + "603": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "Product.list" }, - "41673": { + "604": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "queryParams" }, - "41674": { + "605": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "headers" }, - "41675": { + "606": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "Product.retrieve" }, - "41676": { + "607": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "Product.retrieve" }, - "41677": { + "608": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "id" }, - "41678": { + "609": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "query" }, - "41679": { + "610": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "headers" }, - "41680": { + "611": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "Product.delete" }, - "41681": { + "612": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "Product.delete" }, - "41682": { + "613": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "id" }, - "41683": { + "614": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "headers" }, - "41684": { + "615": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "Product.batchVariants" }, - "41685": { + "616": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "Product.batchVariants" }, - "41686": { + "617": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "productId" }, - "41687": { + "618": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "body" }, - "41688": { + "619": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "query" }, - "41689": { + "620": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "headers" }, - "41690": { + "621": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "Product.createVariant" }, - "41691": { + "622": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "Product.createVariant" }, - "41692": { + "623": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "productId" }, - "41693": { + "624": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "body" }, - "41694": { + "625": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "query" }, - "41695": { + "626": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "headers" }, - "41696": { + "627": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "Product.updateVariant" }, - "41697": { + "628": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "Product.updateVariant" }, - "41698": { + "629": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "productId" }, - "41699": { + "630": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "id" }, - "41700": { + "631": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "body" }, - "41701": { + "632": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "query" }, - "41702": { + "633": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "headers" }, - "41703": { + "634": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "Product.listVariants" }, - "41704": { + "635": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "Product.listVariants" }, - "41705": { + "636": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "productId" }, - "41706": { + "637": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "query" }, - "41707": { + "638": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "headers" }, - "41708": { + "639": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "Product.retrieveVariant" }, - "41709": { + "640": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "Product.retrieveVariant" }, - "41710": { + "641": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "productId" }, - "41711": { + "642": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "id" }, - "41712": { + "643": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "query" }, - "41713": { + "644": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "headers" }, - "41714": { + "645": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "Product.deleteVariant" }, - "41715": { + "646": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "Product.deleteVariant" }, - "41716": { + "647": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "productId" }, - "41717": { + "648": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "id" }, - "41718": { + "649": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "headers" }, - "41719": { + "650": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "Product.batchVariantInventoryItems" }, - "41720": { + "651": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "Product.batchVariantInventoryItems" }, - "41721": { + "652": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "productId" }, - "41722": { + "653": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "body" }, - "41723": { + "654": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "query" }, - "41724": { + "655": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "headers" }, - "41725": { + "656": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "Product.createOption" }, - "41726": { + "657": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "Product.createOption" }, - "41727": { + "658": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "productId" }, - "41728": { + "659": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "body" }, - "41729": { + "660": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "query" }, - "41730": { + "661": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "headers" }, - "41731": { + "662": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "Product.updateOption" }, - "41732": { + "663": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "Product.updateOption" }, - "41733": { + "664": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "productId" }, - "41734": { + "665": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "id" }, - "41735": { + "666": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "body" }, - "41736": { + "667": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "query" }, - "41737": { + "668": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "headers" }, - "41738": { + "669": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "Product.listOptions" }, - "41739": { + "670": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "Product.listOptions" }, - "41740": { + "671": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "productId" }, - "41741": { + "672": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "query" }, - "41742": { + "673": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "headers" }, - "41743": { + "674": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "Product.retrieveOption" }, - "41744": { + "675": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "Product.retrieveOption" }, - "41745": { + "676": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "productId" }, - "41746": { + "677": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "id" }, - "41747": { + "678": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "query" }, - "41748": { + "679": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "headers" }, - "41749": { + "680": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "Product.deleteOption" }, - "41750": { + "681": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "Product.deleteOption" }, - "41751": { + "682": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "productId" }, - "41752": { + "683": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "id" }, - "41753": { + "684": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product.ts", "qualifiedName": "headers" }, - "41754": { + "685": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-type.ts", "qualifiedName": "ProductType" }, - "41755": { + "686": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-type.ts", "qualifiedName": "ProductType.__constructor" }, - "41756": { + "687": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-type.ts", "qualifiedName": "ProductType" }, - "41757": { + "688": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-type.ts", "qualifiedName": "client" }, - "41758": { + "689": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-type.ts", "qualifiedName": "ProductType.client" }, - "41759": { + "690": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-type.ts", "qualifiedName": "ProductType.create" }, - "41760": { + "691": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-type.ts", "qualifiedName": "ProductType.create" }, - "41761": { + "692": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-type.ts", "qualifiedName": "body" }, - "41762": { + "693": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-type.ts", "qualifiedName": "query" }, - "41763": { + "694": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-type.ts", "qualifiedName": "headers" }, - "41764": { + "695": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-type.ts", "qualifiedName": "ProductType.update" }, - "41765": { + "696": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-type.ts", "qualifiedName": "ProductType.update" }, - "41766": { + "697": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-type.ts", "qualifiedName": "id" }, - "41767": { + "698": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-type.ts", "qualifiedName": "body" }, - "41768": { + "699": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-type.ts", "qualifiedName": "query" }, - "41769": { + "700": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-type.ts", "qualifiedName": "headers" }, - "41770": { + "701": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-type.ts", "qualifiedName": "ProductType.list" }, - "41771": { + "702": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-type.ts", "qualifiedName": "ProductType.list" }, - "41772": { + "703": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-type.ts", "qualifiedName": "query" }, - "41773": { + "704": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-type.ts", "qualifiedName": "headers" }, - "41774": { + "705": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-type.ts", "qualifiedName": "ProductType.retrieve" }, - "41775": { + "706": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-type.ts", "qualifiedName": "ProductType.retrieve" }, - "41776": { + "707": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-type.ts", "qualifiedName": "id" }, - "41777": { + "708": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-type.ts", "qualifiedName": "query" }, - "41778": { + "709": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-type.ts", "qualifiedName": "headers" }, - "41779": { + "710": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-type.ts", "qualifiedName": "ProductType.delete" }, - "41780": { + "711": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-type.ts", "qualifiedName": "ProductType.delete" }, - "41781": { + "712": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-type.ts", "qualifiedName": "id" }, - "41782": { + "713": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-type.ts", "qualifiedName": "headers" }, - "41783": { + "714": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/upload.ts", "qualifiedName": "Upload" }, - "41784": { + "715": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/upload.ts", "qualifiedName": "Upload.__constructor" }, - "41785": { + "716": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/upload.ts", "qualifiedName": "Upload" }, - "41786": { + "717": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/upload.ts", "qualifiedName": "client" }, - "41787": { + "718": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/upload.ts", "qualifiedName": "Upload.client" }, - "41788": { + "719": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/upload.ts", "qualifiedName": "Upload.create" }, - "41789": { + "720": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/upload.ts", "qualifiedName": "Upload.create" }, - "41790": { + "721": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/upload.ts", "qualifiedName": "body" }, - "41791": { + "722": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/upload.ts", "qualifiedName": "query" }, - "41792": { + "723": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/upload.ts", "qualifiedName": "headers" }, - "41793": { + "724": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/upload.ts", "qualifiedName": "Upload.retrieve" }, - "41794": { + "725": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/upload.ts", "qualifiedName": "Upload.retrieve" }, - "41795": { + "726": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/upload.ts", "qualifiedName": "id" }, - "41796": { + "727": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/upload.ts", "qualifiedName": "query" }, - "41797": { + "728": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/upload.ts", "qualifiedName": "headers" }, - "41798": { + "729": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/upload.ts", "qualifiedName": "Upload.delete" }, - "41799": { + "730": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/upload.ts", "qualifiedName": "Upload.delete" }, - "41800": { + "731": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/upload.ts", "qualifiedName": "id" }, - "41801": { + "732": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/upload.ts", "qualifiedName": "headers" }, - "41802": { + "733": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/region.ts", "qualifiedName": "Region" }, - "41803": { + "734": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/region.ts", "qualifiedName": "Region.__constructor" }, - "41804": { + "735": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/region.ts", "qualifiedName": "Region" }, - "41805": { + "736": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/region.ts", "qualifiedName": "client" }, - "41806": { + "737": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/region.ts", "qualifiedName": "Region.client" }, - "41807": { + "738": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/region.ts", "qualifiedName": "Region.create" }, - "41808": { + "739": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/region.ts", "qualifiedName": "Region.create" }, - "41809": { + "740": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/region.ts", "qualifiedName": "body" }, - "41810": { + "741": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/region.ts", "qualifiedName": "query" }, - "41811": { + "742": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/region.ts", "qualifiedName": "headers" }, - "41812": { + "743": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/region.ts", "qualifiedName": "Region.update" }, - "41813": { + "744": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/region.ts", "qualifiedName": "Region.update" }, - "41814": { + "745": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/region.ts", "qualifiedName": "id" }, - "41815": { + "746": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/region.ts", "qualifiedName": "body" }, - "41816": { + "747": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/region.ts", "qualifiedName": "query" }, - "41817": { + "748": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/region.ts", "qualifiedName": "headers" }, - "41818": { + "749": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/region.ts", "qualifiedName": "Region.list" }, - "41819": { + "750": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/region.ts", "qualifiedName": "Region.list" }, - "41820": { + "751": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/region.ts", "qualifiedName": "queryParams" }, - "41821": { + "752": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/region.ts", "qualifiedName": "headers" }, - "41822": { + "753": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/region.ts", "qualifiedName": "Region.retrieve" }, - "41823": { + "754": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/region.ts", "qualifiedName": "Region.retrieve" }, - "41824": { + "755": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/region.ts", "qualifiedName": "id" }, - "41825": { + "756": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/region.ts", "qualifiedName": "query" }, - "41826": { + "757": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/region.ts", "qualifiedName": "headers" }, - "41827": { + "758": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/region.ts", "qualifiedName": "Region.delete" }, - "41828": { + "759": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/region.ts", "qualifiedName": "Region.delete" }, - "41829": { + "760": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/region.ts", "qualifiedName": "id" }, - "41830": { + "761": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/region.ts", "qualifiedName": "headers" }, - "41831": { + "762": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return-reason.ts", "qualifiedName": "ReturnReason" }, - "41832": { + "763": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return-reason.ts", "qualifiedName": "ReturnReason.__constructor" }, - "41833": { + "764": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return-reason.ts", "qualifiedName": "ReturnReason" }, - "41834": { + "765": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return-reason.ts", "qualifiedName": "client" }, - "41835": { + "766": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return-reason.ts", "qualifiedName": "ReturnReason.client" }, - "41836": { + "767": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return-reason.ts", "qualifiedName": "ReturnReason.list" }, - "41837": { + "768": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return-reason.ts", "qualifiedName": "ReturnReason.list" }, - "41838": { + "769": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return-reason.ts", "qualifiedName": "query" }, - "41839": { + "770": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return-reason.ts", "qualifiedName": "headers" }, - "41840": { + "771": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return-reason.ts", "qualifiedName": "ReturnReason.retrieve" }, - "41841": { + "772": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return-reason.ts", "qualifiedName": "ReturnReason.retrieve" }, - "41842": { + "773": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return-reason.ts", "qualifiedName": "id" }, - "41843": { + "774": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return-reason.ts", "qualifiedName": "query" }, - "41844": { + "775": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return-reason.ts", "qualifiedName": "headers" }, - "41845": { + "776": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return-reason.ts", "qualifiedName": "ReturnReason.create" }, - "41846": { + "777": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return-reason.ts", "qualifiedName": "ReturnReason.create" }, - "41847": { + "778": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return-reason.ts", "qualifiedName": "body" }, - "41848": { + "779": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return-reason.ts", "qualifiedName": "query" }, - "41849": { + "780": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return-reason.ts", "qualifiedName": "headers" }, - "41850": { + "781": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return-reason.ts", "qualifiedName": "ReturnReason.update" }, - "41851": { + "782": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return-reason.ts", "qualifiedName": "ReturnReason.update" }, - "41852": { + "783": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return-reason.ts", "qualifiedName": "id" }, - "41853": { + "784": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return-reason.ts", "qualifiedName": "body" }, - "41854": { + "785": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return-reason.ts", "qualifiedName": "query" }, - "41855": { + "786": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return-reason.ts", "qualifiedName": "headers" }, - "41856": { + "787": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return-reason.ts", "qualifiedName": "ReturnReason.delete" }, - "41857": { + "788": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return-reason.ts", "qualifiedName": "ReturnReason.delete" }, - "41858": { + "789": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return-reason.ts", "qualifiedName": "id" }, - "41859": { + "790": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return-reason.ts", "qualifiedName": "query" }, - "41860": { + "791": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return-reason.ts", "qualifiedName": "headers" }, - "41861": { + "792": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/stock-location.ts", "qualifiedName": "StockLocation" }, - "41862": { + "793": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/stock-location.ts", "qualifiedName": "StockLocation.__constructor" }, - "41863": { + "794": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/stock-location.ts", "qualifiedName": "StockLocation" }, - "41864": { + "795": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/stock-location.ts", "qualifiedName": "client" }, - "41865": { + "796": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/stock-location.ts", "qualifiedName": "StockLocation.client" }, - "41866": { + "797": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/stock-location.ts", "qualifiedName": "StockLocation.create" }, - "41867": { + "798": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/stock-location.ts", "qualifiedName": "StockLocation.create" }, - "41868": { + "799": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/stock-location.ts", "qualifiedName": "body" }, - "41869": { + "800": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/stock-location.ts", "qualifiedName": "query" }, - "41870": { + "801": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/stock-location.ts", "qualifiedName": "headers" }, - "41871": { + "802": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/stock-location.ts", "qualifiedName": "StockLocation.update" }, - "41872": { + "803": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/stock-location.ts", "qualifiedName": "StockLocation.update" }, - "41873": { + "804": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/stock-location.ts", "qualifiedName": "id" }, - "41874": { + "805": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/stock-location.ts", "qualifiedName": "body" }, - "41875": { + "806": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/stock-location.ts", "qualifiedName": "query" }, - "41876": { + "807": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/stock-location.ts", "qualifiedName": "headers" }, - "41877": { + "808": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/stock-location.ts", "qualifiedName": "StockLocation.delete" }, - "41878": { + "809": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/stock-location.ts", "qualifiedName": "StockLocation.delete" }, - "41879": { + "810": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/stock-location.ts", "qualifiedName": "id" }, - "41880": { + "811": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/stock-location.ts", "qualifiedName": "headers" }, - "41881": { + "812": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/stock-location.ts", "qualifiedName": "StockLocation.retrieve" }, - "41882": { + "813": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/stock-location.ts", "qualifiedName": "StockLocation.retrieve" }, - "41883": { + "814": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/stock-location.ts", "qualifiedName": "id" }, - "41884": { + "815": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/stock-location.ts", "qualifiedName": "query" }, - "41885": { + "816": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/stock-location.ts", "qualifiedName": "headers" }, - "41886": { + "817": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/stock-location.ts", "qualifiedName": "StockLocation.list" }, - "41887": { + "818": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/stock-location.ts", "qualifiedName": "StockLocation.list" }, - "41888": { + "819": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/stock-location.ts", "qualifiedName": "query" }, - "41889": { + "820": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/stock-location.ts", "qualifiedName": "headers" }, - "41890": { + "821": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/stock-location.ts", "qualifiedName": "StockLocation.updateSalesChannels" }, - "41891": { + "822": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/stock-location.ts", "qualifiedName": "StockLocation.updateSalesChannels" }, - "41892": { + "823": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/stock-location.ts", "qualifiedName": "id" }, - "41893": { + "824": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/stock-location.ts", "qualifiedName": "body" }, - "41894": { + "825": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/stock-location.ts", "qualifiedName": "headers" }, - "41895": { + "826": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/stock-location.ts", "qualifiedName": "StockLocation.createFulfillmentSet" }, - "41896": { + "827": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/stock-location.ts", "qualifiedName": "StockLocation.createFulfillmentSet" }, - "41897": { + "828": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/stock-location.ts", "qualifiedName": "id" }, - "41898": { + "829": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/stock-location.ts", "qualifiedName": "body" }, - "41899": { + "830": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/stock-location.ts", "qualifiedName": "headers" }, - "41900": { + "831": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/stock-location.ts", "qualifiedName": "StockLocation.updateFulfillmentProviders" }, - "41901": { + "832": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/stock-location.ts", "qualifiedName": "StockLocation.updateFulfillmentProviders" }, - "41902": { + "833": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/stock-location.ts", "qualifiedName": "id" }, - "41903": { + "834": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/stock-location.ts", "qualifiedName": "body" }, - "41904": { + "835": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/stock-location.ts", "qualifiedName": "headers" }, - "41905": { + "836": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/sales-channel.ts", "qualifiedName": "SalesChannel" }, - "41906": { + "837": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/sales-channel.ts", "qualifiedName": "SalesChannel.__constructor" }, - "41907": { + "838": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/sales-channel.ts", "qualifiedName": "SalesChannel" }, - "41908": { + "839": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/sales-channel.ts", "qualifiedName": "client" }, - "41909": { + "840": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/sales-channel.ts", "qualifiedName": "SalesChannel.client" }, - "41910": { + "841": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/sales-channel.ts", "qualifiedName": "SalesChannel.create" }, - "41911": { + "842": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/sales-channel.ts", "qualifiedName": "SalesChannel.create" }, - "41912": { + "843": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/sales-channel.ts", "qualifiedName": "body" }, - "41913": { + "844": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/sales-channel.ts", "qualifiedName": "query" }, - "41914": { + "845": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/sales-channel.ts", "qualifiedName": "headers" }, - "41915": { + "846": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/sales-channel.ts", "qualifiedName": "SalesChannel.update" }, - "41916": { + "847": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/sales-channel.ts", "qualifiedName": "SalesChannel.update" }, - "41917": { + "848": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/sales-channel.ts", "qualifiedName": "id" }, - "41918": { + "849": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/sales-channel.ts", "qualifiedName": "body" }, - "41919": { + "850": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/sales-channel.ts", "qualifiedName": "query" }, - "41920": { + "851": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/sales-channel.ts", "qualifiedName": "headers" }, - "41921": { + "852": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/sales-channel.ts", "qualifiedName": "SalesChannel.delete" }, - "41922": { + "853": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/sales-channel.ts", "qualifiedName": "SalesChannel.delete" }, - "41923": { + "854": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/sales-channel.ts", "qualifiedName": "id" }, - "41924": { + "855": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/sales-channel.ts", "qualifiedName": "headers" }, - "41925": { + "856": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/sales-channel.ts", "qualifiedName": "SalesChannel.retrieve" }, - "41926": { + "857": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/sales-channel.ts", "qualifiedName": "SalesChannel.retrieve" }, - "41927": { + "858": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/sales-channel.ts", "qualifiedName": "id" }, - "41928": { + "859": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/sales-channel.ts", "qualifiedName": "query" }, - "41929": { + "860": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/sales-channel.ts", "qualifiedName": "headers" }, - "41930": { + "861": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/sales-channel.ts", "qualifiedName": "SalesChannel.list" }, - "41931": { + "862": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/sales-channel.ts", "qualifiedName": "SalesChannel.list" }, - "41932": { + "863": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/sales-channel.ts", "qualifiedName": "query" }, - "41933": { + "864": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/sales-channel.ts", "qualifiedName": "headers" }, - "41934": { + "865": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/sales-channel.ts", "qualifiedName": "SalesChannel.updateProducts" }, - "41935": { + "866": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/sales-channel.ts", "qualifiedName": "SalesChannel.updateProducts" }, - "41936": { + "867": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/sales-channel.ts", "qualifiedName": "id" }, - "41937": { + "868": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/sales-channel.ts", "qualifiedName": "body" }, - "41938": { + "869": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/sales-channel.ts", "qualifiedName": "headers" }, - "41939": { + "870": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/sales-channel.ts", "qualifiedName": "SalesChannel.batchProducts" }, - "41940": { + "871": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/sales-channel.ts", "qualifiedName": "SalesChannel.batchProducts" }, - "41941": { + "872": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/sales-channel.ts", "qualifiedName": "id" }, - "41942": { + "873": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/sales-channel.ts", "qualifiedName": "body" }, - "41943": { + "874": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/sales-channel.ts", "qualifiedName": "headers" }, - "41944": { + "875": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/fulfillment-set.ts", "qualifiedName": "FulfillmentSet" }, - "41945": { + "876": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/fulfillment-set.ts", "qualifiedName": "FulfillmentSet.__constructor" }, - "41946": { + "877": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/fulfillment-set.ts", "qualifiedName": "FulfillmentSet" }, - "41947": { + "878": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/fulfillment-set.ts", "qualifiedName": "client" }, - "41948": { + "879": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/fulfillment-set.ts", "qualifiedName": "FulfillmentSet.client" }, - "41949": { + "880": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/fulfillment-set.ts", "qualifiedName": "FulfillmentSet.delete" }, - "41950": { + "881": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/fulfillment-set.ts", "qualifiedName": "FulfillmentSet.delete" }, - "41951": { + "882": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/fulfillment-set.ts", "qualifiedName": "id" }, - "41952": { + "883": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/fulfillment-set.ts", "qualifiedName": "headers" }, - "41953": { + "884": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/fulfillment-set.ts", "qualifiedName": "FulfillmentSet.createServiceZone" }, - "41954": { + "885": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/fulfillment-set.ts", "qualifiedName": "FulfillmentSet.createServiceZone" }, - "41955": { + "886": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/fulfillment-set.ts", "qualifiedName": "id" }, - "41956": { + "887": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/fulfillment-set.ts", "qualifiedName": "body" }, - "41957": { + "888": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/fulfillment-set.ts", "qualifiedName": "query" }, - "41958": { + "889": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/fulfillment-set.ts", "qualifiedName": "headers" }, - "41959": { + "890": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/fulfillment-set.ts", "qualifiedName": "FulfillmentSet.retrieveServiceZone" }, - "41960": { + "891": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/fulfillment-set.ts", "qualifiedName": "FulfillmentSet.retrieveServiceZone" }, - "41961": { + "892": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/fulfillment-set.ts", "qualifiedName": "fulfillmentSetId" }, - "41962": { + "893": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/fulfillment-set.ts", "qualifiedName": "serviceZoneId" }, - "41963": { + "894": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/fulfillment-set.ts", "qualifiedName": "query" }, - "41964": { + "895": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/fulfillment-set.ts", "qualifiedName": "headers" }, - "41965": { + "896": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/fulfillment-set.ts", "qualifiedName": "FulfillmentSet.updateServiceZone" }, - "41966": { + "897": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/fulfillment-set.ts", "qualifiedName": "FulfillmentSet.updateServiceZone" }, - "41967": { + "898": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/fulfillment-set.ts", "qualifiedName": "fulfillmentSetId" }, - "41968": { + "899": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/fulfillment-set.ts", "qualifiedName": "serviceZoneId" }, - "41969": { + "900": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/fulfillment-set.ts", "qualifiedName": "body" }, - "41970": { + "901": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/fulfillment-set.ts", "qualifiedName": "query" }, - "41971": { + "902": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/fulfillment-set.ts", "qualifiedName": "headers" }, - "41972": { + "903": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/fulfillment-set.ts", "qualifiedName": "FulfillmentSet.deleteServiceZone" }, - "41973": { + "904": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/fulfillment-set.ts", "qualifiedName": "FulfillmentSet.deleteServiceZone" }, - "41974": { + "905": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/fulfillment-set.ts", "qualifiedName": "fulfillmentSetId" }, - "41975": { + "906": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/fulfillment-set.ts", "qualifiedName": "serviceZoneId" }, - "41976": { + "907": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/fulfillment-set.ts", "qualifiedName": "headers" }, - "41977": { + "908": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/fulfillment.ts", "qualifiedName": "Fulfillment" }, - "41978": { + "909": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/fulfillment.ts", "qualifiedName": "Fulfillment.__constructor" }, - "41979": { + "910": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/fulfillment.ts", "qualifiedName": "Fulfillment" }, - "41980": { + "911": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/fulfillment.ts", "qualifiedName": "client" }, - "41981": { + "912": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/fulfillment.ts", "qualifiedName": "Fulfillment.client" }, - "41982": { + "913": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/fulfillment.ts", "qualifiedName": "Fulfillment.create" }, - "41983": { + "914": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/fulfillment.ts", "qualifiedName": "Fulfillment.create" }, - "41984": { + "915": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/fulfillment.ts", "qualifiedName": "body" }, - "41985": { + "916": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/fulfillment.ts", "qualifiedName": "query" }, - "41986": { + "917": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/fulfillment.ts", "qualifiedName": "headers" }, - "41987": { + "918": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/fulfillment.ts", "qualifiedName": "Fulfillment.cancel" }, - "41988": { + "919": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/fulfillment.ts", "qualifiedName": "Fulfillment.cancel" }, - "41989": { + "920": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/fulfillment.ts", "qualifiedName": "id" }, - "41990": { + "921": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/fulfillment.ts", "qualifiedName": "query" }, - "41991": { + "922": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/fulfillment.ts", "qualifiedName": "headers" }, - "41992": { + "923": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/fulfillment.ts", "qualifiedName": "Fulfillment.createShipment" }, - "41993": { + "924": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/fulfillment.ts", "qualifiedName": "Fulfillment.createShipment" }, - "41994": { + "925": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/fulfillment.ts", "qualifiedName": "id" }, - "41995": { + "926": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/fulfillment.ts", "qualifiedName": "body" }, - "41996": { + "927": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/fulfillment.ts", "qualifiedName": "query" }, - "41997": { + "928": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/fulfillment.ts", "qualifiedName": "headers" }, - "41998": { + "929": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/fulfillment-provider.ts", "qualifiedName": "FulfillmentProvider" }, - "41999": { + "930": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/fulfillment-provider.ts", "qualifiedName": "FulfillmentProvider.__constructor" }, - "42000": { + "931": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/fulfillment-provider.ts", "qualifiedName": "FulfillmentProvider" }, - "42001": { + "932": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/fulfillment-provider.ts", "qualifiedName": "client" }, - "42002": { + "933": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/fulfillment-provider.ts", "qualifiedName": "FulfillmentProvider.client" }, - "42003": { + "934": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/fulfillment-provider.ts", "qualifiedName": "FulfillmentProvider.list" }, - "42004": { + "935": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/fulfillment-provider.ts", "qualifiedName": "FulfillmentProvider.list" }, - "42005": { + "936": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/fulfillment-provider.ts", "qualifiedName": "query" }, - "42006": { + "937": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/fulfillment-provider.ts", "qualifiedName": "headers" }, - "42007": { + "938": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/fulfillment-provider.ts", "qualifiedName": "FulfillmentProvider.listFulfillmentOptions" }, - "42008": { + "939": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/fulfillment-provider.ts", "qualifiedName": "FulfillmentProvider.listFulfillmentOptions" }, - "42009": { + "940": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/fulfillment-provider.ts", "qualifiedName": "id" }, - "42010": { + "941": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/fulfillment-provider.ts", "qualifiedName": "headers" }, - "42011": { + "942": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/shipping-option.ts", "qualifiedName": "ShippingOption" }, - "42012": { + "943": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/shipping-option.ts", "qualifiedName": "ShippingOption.__constructor" }, - "42013": { + "944": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/shipping-option.ts", "qualifiedName": "ShippingOption" }, - "42014": { + "945": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/shipping-option.ts", "qualifiedName": "client" }, - "42015": { + "946": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/shipping-option.ts", "qualifiedName": "ShippingOption.client" }, - "42016": { + "947": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/shipping-option.ts", "qualifiedName": "ShippingOption.create" }, - "42017": { + "948": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/shipping-option.ts", "qualifiedName": "ShippingOption.create" }, - "42018": { + "949": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/shipping-option.ts", "qualifiedName": "body" }, - "42019": { + "950": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/shipping-option.ts", "qualifiedName": "query" }, - "42020": { + "951": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/shipping-option.ts", "qualifiedName": "headers" }, - "42021": { + "952": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/shipping-option.ts", "qualifiedName": "ShippingOption.retrieve" }, - "42022": { + "953": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/shipping-option.ts", "qualifiedName": "ShippingOption.retrieve" }, - "42023": { + "954": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/shipping-option.ts", "qualifiedName": "id" }, - "42024": { + "955": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/shipping-option.ts", "qualifiedName": "query" }, - "42025": { + "956": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/shipping-option.ts", "qualifiedName": "headers" }, - "42026": { + "957": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/shipping-option.ts", "qualifiedName": "ShippingOption.update" }, - "42027": { + "958": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/shipping-option.ts", "qualifiedName": "ShippingOption.update" }, - "42028": { + "959": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/shipping-option.ts", "qualifiedName": "id" }, - "42029": { + "960": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/shipping-option.ts", "qualifiedName": "body" }, - "42030": { + "961": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/shipping-option.ts", "qualifiedName": "query" }, - "42031": { + "962": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/shipping-option.ts", "qualifiedName": "headers" }, - "42032": { + "963": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/shipping-option.ts", "qualifiedName": "ShippingOption.delete" }, - "42033": { + "964": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/shipping-option.ts", "qualifiedName": "ShippingOption.delete" }, - "42034": { + "965": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/shipping-option.ts", "qualifiedName": "id" }, - "42035": { + "966": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/shipping-option.ts", "qualifiedName": "headers" }, - "42036": { + "967": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/shipping-option.ts", "qualifiedName": "ShippingOption.list" }, - "42037": { + "968": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/shipping-option.ts", "qualifiedName": "ShippingOption.list" }, - "42038": { + "969": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/shipping-option.ts", "qualifiedName": "query" }, - "42039": { + "970": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/shipping-option.ts", "qualifiedName": "headers" }, - "42040": { + "971": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/shipping-option.ts", "qualifiedName": "ShippingOption.updateRules" }, - "42041": { + "972": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/shipping-option.ts", "qualifiedName": "ShippingOption.updateRules" }, - "42042": { + "973": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/shipping-option.ts", "qualifiedName": "id" }, - "42043": { + "974": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/shipping-option.ts", "qualifiedName": "body" }, - "42044": { + "975": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/shipping-option.ts", "qualifiedName": "headers" }, - "42045": { + "976": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/shipping-profile.ts", "qualifiedName": "ShippingProfile" }, - "42046": { + "977": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/shipping-profile.ts", "qualifiedName": "ShippingProfile.__constructor" }, - "42047": { + "978": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/shipping-profile.ts", "qualifiedName": "ShippingProfile" }, - "42048": { + "979": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/shipping-profile.ts", "qualifiedName": "client" }, - "42049": { + "980": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/shipping-profile.ts", "qualifiedName": "ShippingProfile.client" }, - "42050": { + "981": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/shipping-profile.ts", "qualifiedName": "ShippingProfile.create" }, - "42051": { + "982": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/shipping-profile.ts", "qualifiedName": "ShippingProfile.create" }, - "42052": { + "983": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/shipping-profile.ts", "qualifiedName": "body" }, - "42053": { + "984": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/shipping-profile.ts", "qualifiedName": "query" }, - "42054": { + "985": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/shipping-profile.ts", "qualifiedName": "headers" }, - "42055": { + "986": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/shipping-profile.ts", "qualifiedName": "ShippingProfile.update" }, - "42056": { + "987": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/shipping-profile.ts", "qualifiedName": "ShippingProfile.update" }, - "42057": { + "988": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/shipping-profile.ts", "qualifiedName": "id" }, - "42058": { + "989": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/shipping-profile.ts", "qualifiedName": "body" }, - "42059": { + "990": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/shipping-profile.ts", "qualifiedName": "query" }, - "42060": { + "991": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/shipping-profile.ts", "qualifiedName": "headers" }, - "42061": { + "992": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/shipping-profile.ts", "qualifiedName": "ShippingProfile.delete" }, - "42062": { + "993": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/shipping-profile.ts", "qualifiedName": "ShippingProfile.delete" }, - "42063": { + "994": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/shipping-profile.ts", "qualifiedName": "id" }, - "42064": { + "995": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/shipping-profile.ts", "qualifiedName": "headers" }, - "42065": { + "996": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/shipping-profile.ts", "qualifiedName": "ShippingProfile.list" }, - "42066": { + "997": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/shipping-profile.ts", "qualifiedName": "ShippingProfile.list" }, - "42067": { + "998": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/shipping-profile.ts", "qualifiedName": "query" }, - "42068": { + "999": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/shipping-profile.ts", "qualifiedName": "headers" }, - "42069": { + "1000": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/shipping-profile.ts", "qualifiedName": "ShippingProfile.retrieve" }, - "42070": { + "1001": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/shipping-profile.ts", "qualifiedName": "ShippingProfile.retrieve" }, - "42071": { + "1002": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/shipping-profile.ts", "qualifiedName": "id" }, - "42072": { + "1003": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/shipping-profile.ts", "qualifiedName": "query" }, - "42073": { + "1004": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/shipping-profile.ts", "qualifiedName": "headers" }, - "42074": { + "1005": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/inventory-item.ts", "qualifiedName": "InventoryItem" }, - "42075": { + "1006": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/inventory-item.ts", "qualifiedName": "InventoryItem.__constructor" }, - "42076": { + "1007": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/inventory-item.ts", "qualifiedName": "InventoryItem" }, - "42077": { + "1008": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/inventory-item.ts", "qualifiedName": "client" }, - "42078": { + "1009": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/inventory-item.ts", "qualifiedName": "InventoryItem.client" }, - "42079": { + "1010": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/inventory-item.ts", "qualifiedName": "InventoryItem.create" }, - "42080": { + "1011": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/inventory-item.ts", "qualifiedName": "InventoryItem.create" }, - "42081": { + "1012": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/inventory-item.ts", "qualifiedName": "body" }, - "42082": { + "1013": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/inventory-item.ts", "qualifiedName": "query" }, - "42083": { + "1014": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/inventory-item.ts", "qualifiedName": "headers" }, - "42084": { + "1015": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/inventory-item.ts", "qualifiedName": "InventoryItem.update" }, - "42085": { + "1016": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/inventory-item.ts", "qualifiedName": "InventoryItem.update" }, - "42086": { + "1017": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/inventory-item.ts", "qualifiedName": "id" }, - "42087": { + "1018": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/inventory-item.ts", "qualifiedName": "body" }, - "42088": { + "1019": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/inventory-item.ts", "qualifiedName": "query" }, - "42089": { + "1020": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/inventory-item.ts", "qualifiedName": "headers" }, - "42090": { + "1021": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/inventory-item.ts", "qualifiedName": "InventoryItem.list" }, - "42091": { + "1022": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/inventory-item.ts", "qualifiedName": "InventoryItem.list" }, - "42092": { + "1023": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/inventory-item.ts", "qualifiedName": "query" }, - "42093": { + "1024": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/inventory-item.ts", "qualifiedName": "headers" }, - "42094": { + "1025": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/inventory-item.ts", "qualifiedName": "InventoryItem.retrieve" }, - "42095": { + "1026": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/inventory-item.ts", "qualifiedName": "InventoryItem.retrieve" }, - "42096": { + "1027": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/inventory-item.ts", "qualifiedName": "id" }, - "42097": { + "1028": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/inventory-item.ts", "qualifiedName": "query" }, - "42098": { + "1029": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/inventory-item.ts", "qualifiedName": "headers" }, - "42099": { + "1030": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/inventory-item.ts", "qualifiedName": "InventoryItem.delete" }, - "42100": { + "1031": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/inventory-item.ts", "qualifiedName": "InventoryItem.delete" }, - "42101": { + "1032": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/inventory-item.ts", "qualifiedName": "id" }, - "42102": { + "1033": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/inventory-item.ts", "qualifiedName": "headers" }, - "42103": { + "1034": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/inventory-item.ts", "qualifiedName": "InventoryItem.listLevels" }, - "42104": { + "1035": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/inventory-item.ts", "qualifiedName": "InventoryItem.listLevels" }, - "42105": { + "1036": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/inventory-item.ts", "qualifiedName": "id" }, - "42106": { + "1037": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/inventory-item.ts", "qualifiedName": "query" }, - "42107": { + "1038": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/inventory-item.ts", "qualifiedName": "headers" }, - "42108": { + "1039": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/inventory-item.ts", "qualifiedName": "InventoryItem.updateLevel" }, - "42109": { + "1040": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/inventory-item.ts", "qualifiedName": "InventoryItem.updateLevel" }, - "42110": { + "1041": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/inventory-item.ts", "qualifiedName": "id" }, - "42111": { + "1042": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/inventory-item.ts", "qualifiedName": "locationId" }, - "42112": { + "1043": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/inventory-item.ts", "qualifiedName": "body" }, - "42113": { + "1044": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/inventory-item.ts", "qualifiedName": "query" }, - "42114": { + "1045": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/inventory-item.ts", "qualifiedName": "headers" }, - "42115": { + "1046": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/inventory-item.ts", "qualifiedName": "InventoryItem.deleteLevel" }, - "42116": { + "1047": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/inventory-item.ts", "qualifiedName": "InventoryItem.deleteLevel" }, - "42117": { + "1048": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/inventory-item.ts", "qualifiedName": "id" }, - "42118": { + "1049": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/inventory-item.ts", "qualifiedName": "locationId" }, - "42119": { + "1050": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/inventory-item.ts", "qualifiedName": "headers" }, - "42120": { + "1051": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/inventory-item.ts", "qualifiedName": "InventoryItem.batchUpdateLevels" }, - "42121": { + "1052": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/inventory-item.ts", "qualifiedName": "InventoryItem.batchUpdateLevels" }, - "42122": { + "1053": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/inventory-item.ts", "qualifiedName": "id" }, - "42123": { + "1054": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/inventory-item.ts", "qualifiedName": "body" }, - "42124": { + "1055": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/inventory-item.ts", "qualifiedName": "query" }, - "42125": { + "1056": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/inventory-item.ts", "qualifiedName": "headers" }, - "42126": { + "1057": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/inventory-item.ts", "qualifiedName": "InventoryItem.batchInventoryItemLocationLevels" }, - "42127": { + "1058": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/inventory-item.ts", "qualifiedName": "InventoryItem.batchInventoryItemLocationLevels" }, - "42128": { + "1059": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/inventory-item.ts", "qualifiedName": "id" }, - "42129": { + "1060": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/inventory-item.ts", "qualifiedName": "body" }, - "42130": { + "1061": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/inventory-item.ts", "qualifiedName": "headers" }, - "42131": { + "1062": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/inventory-item.ts", "qualifiedName": "InventoryItem.batchInventoryItemsLocationLevels" }, - "42132": { + "1063": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/inventory-item.ts", "qualifiedName": "InventoryItem.batchInventoryItemsLocationLevels" }, - "42133": { + "1064": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/inventory-item.ts", "qualifiedName": "body" }, - "42134": { + "1065": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/inventory-item.ts", "qualifiedName": "headers" }, - "42135": { + "1066": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/notification.ts", "qualifiedName": "Notification" }, - "42136": { + "1067": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/notification.ts", "qualifiedName": "Notification.__constructor" }, - "42137": { + "1068": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/notification.ts", "qualifiedName": "Notification" }, - "42138": { + "1069": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/notification.ts", "qualifiedName": "client" }, - "42139": { + "1070": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/notification.ts", "qualifiedName": "Notification.client" }, - "42140": { + "1071": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/notification.ts", "qualifiedName": "Notification.retrieve" }, - "42141": { + "1072": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/notification.ts", "qualifiedName": "Notification.retrieve" }, - "42142": { + "1073": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/notification.ts", "qualifiedName": "id" }, - "42143": { + "1074": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/notification.ts", "qualifiedName": "query" }, - "42144": { + "1075": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/notification.ts", "qualifiedName": "headers" }, - "42145": { + "1076": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/notification.ts", "qualifiedName": "Notification.list" }, - "42146": { + "1077": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/notification.ts", "qualifiedName": "Notification.list" }, - "42147": { + "1078": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/notification.ts", "qualifiedName": "query" }, - "42148": { + "1079": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/notification.ts", "qualifiedName": "headers" }, - "42149": { + "1080": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "Order" }, - "42150": { + "1081": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "Order.__constructor" }, - "42151": { + "1082": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "Order" }, - "42152": { + "1083": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "client" }, - "42153": { + "1084": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "Order.client" }, - "42154": { + "1085": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "Order.retrieve" }, - "42155": { + "1086": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "Order.retrieve" }, - "42156": { + "1087": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "id" }, - "42157": { + "1088": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "query" }, - "42158": { + "1089": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "headers" }, - "42159": { + "1090": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "Order.update" }, - "42160": { + "1091": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "Order.update" }, - "42161": { + "1092": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "id" }, - "42162": { + "1093": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "body" }, - "42163": { + "1094": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "headers" }, - "42164": { + "1095": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "Order.retrievePreview" }, - "42165": { + "1096": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "Order.retrievePreview" }, - "42166": { + "1097": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "id" }, - "42167": { + "1098": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "query" }, - "42168": { + "1099": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "headers" }, - "42169": { + "1100": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "Order.list" }, - "42170": { + "1101": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "Order.list" }, - "42171": { + "1102": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "queryParams" }, - "42172": { + "1103": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "headers" }, - "42173": { + "1104": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "Order.cancel" }, - "42174": { + "1105": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "Order.cancel" }, - "42175": { + "1106": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "id" }, - "42176": { + "1107": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "headers" }, - "42177": { + "1108": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "Order.requestTransfer" }, - "42178": { + "1109": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "Order.requestTransfer" }, - "42179": { + "1110": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "id" }, - "42180": { + "1111": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "body" }, - "42181": { + "1112": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "headers" }, - "42182": { + "1113": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "Order.cancelTransfer" }, - "42183": { + "1114": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "Order.cancelTransfer" }, - "42184": { + "1115": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "id" }, - "42185": { + "1116": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "headers" }, - "42186": { + "1117": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "Order.createFulfillment" }, - "42187": { + "1118": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "Order.createFulfillment" }, - "42188": { + "1119": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "id" }, - "42189": { + "1120": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "body" }, - "42190": { + "1121": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "query" }, - "42191": { + "1122": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "headers" }, - "42192": { + "1123": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "Order.cancelFulfillment" }, - "42193": { + "1124": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "Order.cancelFulfillment" }, - "42194": { + "1125": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "id" }, - "42195": { + "1126": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "fulfillmentId" }, - "42196": { + "1127": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "body" }, - "42197": { + "1128": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "headers" }, - "42198": { + "1129": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "Order.createShipment" }, - "42199": { + "1130": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "Order.createShipment" }, - "42200": { + "1131": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "id" }, - "42201": { + "1132": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "fulfillmentId" }, - "42202": { + "1133": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "body" }, - "42203": { + "1134": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "query" }, - "42204": { + "1135": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "headers" }, - "42205": { + "1136": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "Order.markAsDelivered" }, - "42206": { + "1137": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "Order.markAsDelivered" }, - "42207": { + "1138": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "id" }, - "42208": { + "1139": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "fulfillmentId" }, - "42209": { + "1140": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "query" }, - "42210": { + "1141": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "headers" }, - "42211": { + "1142": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "Order.listChanges" }, - "42212": { + "1143": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "Order.listChanges" }, - "42213": { + "1144": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "id" }, - "42214": { + "1145": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "queryParams" }, - "42215": { + "1146": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "headers" }, - "42216": { + "1147": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "Order.listLineItems" }, - "42217": { + "1148": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "Order.listLineItems" }, - "42218": { + "1149": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "id" }, - "42219": { + "1150": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "queryParams" }, - "42220": { + "1151": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "headers" }, - "42221": { + "1152": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "Order.createCreditLine" }, - "42222": { + "1153": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "Order.createCreditLine" }, - "42223": { + "1154": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "orderId" }, - "42224": { + "1155": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "body" }, - "42225": { + "1156": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "query" }, - "42226": { + "1157": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order.ts", "qualifiedName": "headers" }, - "42227": { + "1158": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "DraftOrder" }, - "42228": { + "1159": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "DraftOrder.__constructor" }, - "42229": { + "1160": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "DraftOrder" }, - "42230": { + "1161": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "client" }, - "42231": { + "1162": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "DraftOrder.client" }, - "42232": { + "1163": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "DraftOrder.retrieve" }, - "42233": { + "1164": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "DraftOrder.retrieve" }, - "42234": { + "1165": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "id" }, - "42235": { + "1166": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "query" }, - "42236": { + "1167": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "headers" }, - "42237": { + "1168": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "DraftOrder.list" }, - "42238": { + "1169": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "DraftOrder.list" }, - "42239": { + "1170": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "queryParams" }, - "42240": { + "1171": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "headers" }, - "42241": { + "1172": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "DraftOrder.create" }, - "42242": { + "1173": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "DraftOrder.create" }, - "42243": { + "1174": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "body" }, - "42244": { + "1175": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "query" }, - "42245": { + "1176": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "headers" }, - "42246": { + "1177": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "DraftOrder.update" }, - "42247": { + "1178": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "DraftOrder.update" }, - "42248": { + "1179": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "id" }, - "42249": { + "1180": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "body" }, - "42250": { + "1181": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "query" }, - "42251": { + "1182": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "headers" }, - "42252": { + "1183": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "DraftOrder.convertToOrder" }, - "42253": { + "1184": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "DraftOrder.convertToOrder" }, - "42254": { + "1185": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "id" }, - "42255": { + "1186": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "query" }, - "42256": { + "1187": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "headers" }, - "42257": { + "1188": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "DraftOrder.addItems" }, - "42258": { + "1189": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "DraftOrder.addItems" }, - "42259": { + "1190": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "id" }, - "42260": { + "1191": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "body" }, - "42261": { + "1192": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "headers" }, - "42262": { + "1193": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "DraftOrder.updateActionItem" }, - "42263": { + "1194": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "DraftOrder.updateActionItem" }, - "42264": { + "1195": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "id" }, - "42265": { + "1196": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "actionId" }, - "42266": { + "1197": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "body" }, - "42267": { + "1198": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "headers" }, - "42268": { + "1199": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "DraftOrder.removeActionItem" }, - "42269": { + "1200": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "DraftOrder.removeActionItem" }, - "42270": { + "1201": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "id" }, - "42271": { + "1202": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "actionId" }, - "42272": { + "1203": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "headers" }, - "42273": { + "1204": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "DraftOrder.updateItem" }, - "42274": { + "1205": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "DraftOrder.updateItem" }, - "42275": { + "1206": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "id" }, - "42276": { + "1207": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "itemId" }, - "42277": { + "1208": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "body" }, - "42278": { + "1209": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "headers" }, - "42279": { + "1210": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "DraftOrder.addPromotions" }, - "42280": { + "1211": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "DraftOrder.addPromotions" }, - "42281": { + "1212": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "id" }, - "42282": { + "1213": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "body" }, - "42283": { + "1214": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "headers" }, - "42284": { + "1215": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "DraftOrder.removePromotions" }, - "42285": { + "1216": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "DraftOrder.removePromotions" }, - "42286": { + "1217": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "id" }, - "42287": { + "1218": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "body" }, - "42288": { + "1219": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "headers" }, - "42289": { + "1220": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "DraftOrder.addShippingMethod" }, - "42290": { + "1221": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "DraftOrder.addShippingMethod" }, - "42291": { + "1222": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "id" }, - "42292": { + "1223": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "body" }, - "42293": { + "1224": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "headers" }, - "42294": { + "1225": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "DraftOrder.updateActionShippingMethod" }, - "42295": { + "1226": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "DraftOrder.updateActionShippingMethod" }, - "42296": { + "1227": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "id" }, - "42297": { + "1228": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "actionId" }, - "42298": { + "1229": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "body" }, - "42299": { + "1230": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "headers" }, - "42300": { + "1231": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "DraftOrder.removeActionShippingMethod" }, - "42301": { + "1232": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "DraftOrder.removeActionShippingMethod" }, - "42302": { + "1233": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "id" }, - "42303": { + "1234": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "actionId" }, - "42304": { + "1235": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "headers" }, - "42305": { + "1236": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "DraftOrder.removeShippingMethod" }, - "42306": { + "1237": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "DraftOrder.removeShippingMethod" }, - "42307": { + "1238": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "id" }, - "42308": { + "1239": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "shippingMethodId" }, - "42309": { + "1240": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "headers" }, - "42310": { + "1241": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "DraftOrder.updateShippingMethod" }, - "42311": { + "1242": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "DraftOrder.updateShippingMethod" }, - "42312": { + "1243": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "id" }, - "42313": { + "1244": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "methodId" }, - "42314": { + "1245": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "body" }, - "42315": { + "1246": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "headers" }, - "42316": { + "1247": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "DraftOrder.beginEdit" }, - "42317": { + "1248": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "DraftOrder.beginEdit" }, - "42318": { + "1249": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "id" }, - "42319": { + "1250": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "headers" }, - "42320": { + "1251": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "DraftOrder.cancelEdit" }, - "42321": { + "1252": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "DraftOrder.cancelEdit" }, - "42322": { + "1253": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "id" }, - "42323": { + "1254": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "headers" }, - "42324": { + "1255": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "DraftOrder.requestEdit" }, - "42325": { + "1256": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "DraftOrder.requestEdit" }, - "42326": { + "1257": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "id" }, - "42327": { + "1258": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "headers" }, - "42328": { + "1259": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "DraftOrder.confirmEdit" }, - "42329": { + "1260": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "DraftOrder.confirmEdit" }, - "42330": { + "1261": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "id" }, - "42331": { + "1262": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/draft-order.ts", "qualifiedName": "headers" }, - "42332": { + "1263": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order-edit.ts", "qualifiedName": "OrderEdit" }, - "42333": { + "1264": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order-edit.ts", "qualifiedName": "OrderEdit.__constructor" }, - "42334": { + "1265": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order-edit.ts", "qualifiedName": "OrderEdit" }, - "42335": { + "1266": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order-edit.ts", "qualifiedName": "client" }, - "42336": { + "1267": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order-edit.ts", "qualifiedName": "OrderEdit.client" }, - "42337": { + "1268": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order-edit.ts", "qualifiedName": "OrderEdit.initiateRequest" }, - "42338": { + "1269": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order-edit.ts", "qualifiedName": "OrderEdit.initiateRequest" }, - "42339": { + "1270": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order-edit.ts", "qualifiedName": "body" }, - "42340": { + "1271": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order-edit.ts", "qualifiedName": "query" }, - "42341": { + "1272": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order-edit.ts", "qualifiedName": "headers" }, - "42342": { + "1273": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order-edit.ts", "qualifiedName": "OrderEdit.request" }, - "42343": { + "1274": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order-edit.ts", "qualifiedName": "OrderEdit.request" }, - "42344": { + "1275": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order-edit.ts", "qualifiedName": "id" }, - "42345": { + "1276": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order-edit.ts", "qualifiedName": "query" }, - "42346": { + "1277": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order-edit.ts", "qualifiedName": "headers" }, - "42347": { + "1278": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order-edit.ts", "qualifiedName": "OrderEdit.confirm" }, - "42348": { + "1279": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order-edit.ts", "qualifiedName": "OrderEdit.confirm" }, - "42349": { + "1280": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order-edit.ts", "qualifiedName": "id" }, - "42350": { + "1281": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order-edit.ts", "qualifiedName": "query" }, - "42351": { + "1282": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order-edit.ts", "qualifiedName": "headers" }, - "42352": { + "1283": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order-edit.ts", "qualifiedName": "OrderEdit.cancelRequest" }, - "42353": { + "1284": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order-edit.ts", "qualifiedName": "OrderEdit.cancelRequest" }, - "42354": { + "1285": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order-edit.ts", "qualifiedName": "id" }, - "42355": { + "1286": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order-edit.ts", "qualifiedName": "query" }, - "42356": { + "1287": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order-edit.ts", "qualifiedName": "headers" }, - "42357": { + "1288": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order-edit.ts", "qualifiedName": "OrderEdit.addItems" }, - "42358": { + "1289": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order-edit.ts", "qualifiedName": "OrderEdit.addItems" }, - "42359": { + "1290": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order-edit.ts", "qualifiedName": "id" }, - "42360": { + "1291": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order-edit.ts", "qualifiedName": "body" }, - "42361": { + "1292": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order-edit.ts", "qualifiedName": "query" }, - "42362": { + "1293": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order-edit.ts", "qualifiedName": "headers" }, - "42363": { + "1294": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order-edit.ts", "qualifiedName": "OrderEdit.updateOriginalItem" }, - "42364": { + "1295": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order-edit.ts", "qualifiedName": "OrderEdit.updateOriginalItem" }, - "42365": { + "1296": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order-edit.ts", "qualifiedName": "id" }, - "42366": { + "1297": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order-edit.ts", "qualifiedName": "itemId" }, - "42367": { + "1298": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order-edit.ts", "qualifiedName": "body" }, - "42368": { + "1299": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order-edit.ts", "qualifiedName": "query" }, - "42369": { + "1300": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order-edit.ts", "qualifiedName": "headers" }, - "42370": { + "1301": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order-edit.ts", "qualifiedName": "OrderEdit.updateAddedItem" }, - "42371": { + "1302": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order-edit.ts", "qualifiedName": "OrderEdit.updateAddedItem" }, - "42372": { + "1303": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order-edit.ts", "qualifiedName": "id" }, - "42373": { + "1304": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order-edit.ts", "qualifiedName": "actionId" }, - "42374": { + "1305": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order-edit.ts", "qualifiedName": "body" }, - "42375": { + "1306": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order-edit.ts", "qualifiedName": "query" }, - "42376": { + "1307": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order-edit.ts", "qualifiedName": "headers" }, - "42377": { + "1308": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order-edit.ts", "qualifiedName": "OrderEdit.removeAddedItem" }, - "42378": { + "1309": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order-edit.ts", "qualifiedName": "OrderEdit.removeAddedItem" }, - "42379": { + "1310": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order-edit.ts", "qualifiedName": "id" }, - "42380": { + "1311": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order-edit.ts", "qualifiedName": "actionId" }, - "42381": { + "1312": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order-edit.ts", "qualifiedName": "query" }, - "42382": { + "1313": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/order-edit.ts", "qualifiedName": "headers" }, - "42383": { + "1314": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "Return" }, - "42384": { + "1315": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "Return.__constructor" }, - "42385": { + "1316": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "Return" }, - "42386": { + "1317": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "client" }, - "42387": { + "1318": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "Return.client" }, - "42388": { + "1319": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "Return.list" }, - "42389": { + "1320": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "Return.list" }, - "42390": { + "1321": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "query" }, - "42391": { + "1322": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "headers" }, - "42392": { + "1323": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "Return.retrieve" }, - "42393": { + "1324": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "Return.retrieve" }, - "42394": { + "1325": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "id" }, - "42395": { + "1326": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "query" }, - "42396": { + "1327": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "headers" }, - "42397": { + "1328": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "Return.initiateRequest" }, - "42398": { + "1329": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "Return.initiateRequest" }, - "42399": { + "1330": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "body" }, - "42400": { + "1331": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "query" }, - "42401": { + "1332": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "headers" }, - "42402": { + "1333": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "Return.cancel" }, - "42403": { + "1334": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "Return.cancel" }, - "42404": { + "1335": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "id" }, - "42405": { + "1336": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "query" }, - "42406": { + "1337": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "headers" }, - "42407": { + "1338": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "Return.cancelRequest" }, - "42408": { + "1339": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "Return.cancelRequest" }, - "42409": { + "1340": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "id" }, - "42410": { + "1341": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "query" }, - "42411": { + "1342": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "headers" }, - "42412": { + "1343": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "Return.addReturnItem" }, - "42413": { + "1344": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "Return.addReturnItem" }, - "42414": { + "1345": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "id" }, - "42415": { + "1346": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "body" }, - "42416": { + "1347": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "query" }, - "42417": { + "1348": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "headers" }, - "42418": { + "1349": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "Return.updateReturnItem" }, - "42419": { + "1350": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "Return.updateReturnItem" }, - "42420": { + "1351": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "id" }, - "42421": { + "1352": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "actionId" }, - "42422": { + "1353": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "body" }, - "42423": { + "1354": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "query" }, - "42424": { + "1355": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "headers" }, - "42425": { + "1356": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "Return.removeReturnItem" }, - "42426": { + "1357": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "Return.removeReturnItem" }, - "42427": { + "1358": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "id" }, - "42428": { + "1359": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "actionId" }, - "42429": { + "1360": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "query" }, - "42430": { + "1361": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "headers" }, - "42431": { + "1362": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "Return.addReturnShipping" }, - "42432": { + "1363": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "Return.addReturnShipping" }, - "42433": { + "1364": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "id" }, - "42434": { + "1365": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "body" }, - "42435": { + "1366": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "query" }, - "42436": { + "1367": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "headers" }, - "42437": { + "1368": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "Return.updateReturnShipping" }, - "42438": { + "1369": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "Return.updateReturnShipping" }, - "42439": { + "1370": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "id" }, - "42440": { + "1371": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "actionId" }, - "42441": { + "1372": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "body" }, - "42442": { + "1373": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "query" }, - "42443": { + "1374": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "headers" }, - "42444": { + "1375": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "Return.deleteReturnShipping" }, - "42445": { + "1376": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "Return.deleteReturnShipping" }, - "42446": { + "1377": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "id" }, - "42447": { + "1378": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "actionId" }, - "42448": { + "1379": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "query" }, - "42449": { + "1380": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "headers" }, - "42450": { + "1381": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "Return.updateRequest" }, - "42451": { + "1382": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "Return.updateRequest" }, - "42452": { + "1383": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "id" }, - "42453": { + "1384": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "body" }, - "42454": { + "1385": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "query" }, - "42455": { + "1386": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "headers" }, - "42456": { + "1387": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "Return.confirmRequest" }, - "42457": { + "1388": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "Return.confirmRequest" }, - "42458": { + "1389": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "id" }, - "42459": { + "1390": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "body" }, - "42460": { + "1391": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "query" }, - "42461": { + "1392": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "headers" }, - "42462": { + "1393": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "Return.initiateReceive" }, - "42463": { + "1394": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "Return.initiateReceive" }, - "42464": { + "1395": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "id" }, - "42465": { + "1396": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "body" }, - "42466": { + "1397": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "query" }, - "42467": { + "1398": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "headers" }, - "42468": { + "1399": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "Return.receiveItems" }, - "42469": { + "1400": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "Return.receiveItems" }, - "42470": { + "1401": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "id" }, - "42471": { + "1402": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "body" }, - "42472": { + "1403": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "query" }, - "42473": { + "1404": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "headers" }, - "42474": { + "1405": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "Return.updateReceiveItem" }, - "42475": { + "1406": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "Return.updateReceiveItem" }, - "42476": { + "1407": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "id" }, - "42477": { + "1408": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "actionId" }, - "42478": { + "1409": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "body" }, - "42479": { + "1410": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "query" }, - "42480": { + "1411": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "headers" }, - "42481": { + "1412": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "Return.removeReceiveItem" }, - "42482": { + "1413": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "Return.removeReceiveItem" }, - "42483": { + "1414": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "id" }, - "42484": { + "1415": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "actionId" }, - "42485": { + "1416": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "query" }, - "42486": { + "1417": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "headers" }, - "42487": { + "1418": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "Return.dismissItems" }, - "42488": { + "1419": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "Return.dismissItems" }, - "42489": { + "1420": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "id" }, - "42490": { + "1421": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "body" }, - "42491": { + "1422": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "query" }, - "42492": { + "1423": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "headers" }, - "42493": { + "1424": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "Return.updateDismissItem" }, - "42494": { + "1425": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "Return.updateDismissItem" }, - "42495": { + "1426": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "id" }, - "42496": { + "1427": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "actionId" }, - "42497": { + "1428": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "body" }, - "42498": { + "1429": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "query" }, - "42499": { + "1430": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "headers" }, - "42500": { + "1431": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "Return.removeDismissItem" }, - "42501": { + "1432": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "Return.removeDismissItem" }, - "42502": { + "1433": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "id" }, - "42503": { + "1434": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "actionId" }, - "42504": { + "1435": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "query" }, - "42505": { + "1436": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "headers" }, - "42506": { + "1437": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "Return.confirmReceive" }, - "42507": { + "1438": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "Return.confirmReceive" }, - "42508": { + "1439": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "id" }, - "42509": { + "1440": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "body" }, - "42510": { + "1441": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "query" }, - "42511": { + "1442": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "headers" }, - "42512": { + "1443": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "Return.cancelReceive" }, - "42513": { + "1444": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "Return.cancelReceive" }, - "42514": { + "1445": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "id" }, - "42515": { + "1446": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "query" }, - "42516": { + "1447": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/return.ts", "qualifiedName": "headers" }, - "42517": { + "1448": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "Claim" }, - "42518": { + "1449": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "Claim.__constructor" }, - "42519": { + "1450": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "Claim" }, - "42520": { + "1451": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "client" }, - "42521": { + "1452": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "Claim.client" }, - "42522": { + "1453": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "Claim.list" }, - "42523": { + "1454": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "Claim.list" }, - "42524": { + "1455": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "query" }, - "42525": { + "1456": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "headers" }, - "42526": { + "1457": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "Claim.retrieve" }, - "42527": { + "1458": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "Claim.retrieve" }, - "42528": { + "1459": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "id" }, - "42529": { + "1460": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "query" }, - "42530": { + "1461": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "headers" }, - "42531": { + "1462": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "Claim.create" }, - "42532": { + "1463": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "Claim.create" }, - "42533": { + "1464": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "body" }, - "42534": { + "1465": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "query" }, - "42535": { + "1466": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "headers" }, - "42536": { + "1467": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "Claim.cancel" }, - "42537": { + "1468": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "Claim.cancel" }, - "42538": { + "1469": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "id" }, - "42539": { + "1470": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "query" }, - "42540": { + "1471": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "headers" }, - "42541": { + "1472": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "Claim.addItems" }, - "42542": { + "1473": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "Claim.addItems" }, - "42543": { + "1474": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "id" }, - "42544": { + "1475": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "body" }, - "42545": { + "1476": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "query" }, - "42546": { + "1477": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "headers" }, - "42547": { + "1478": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "Claim.updateItem" }, - "42548": { + "1479": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "Claim.updateItem" }, - "42549": { + "1480": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "id" }, - "42550": { + "1481": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "actionId" }, - "42551": { + "1482": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "body" }, - "42552": { + "1483": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "query" }, - "42553": { + "1484": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "headers" }, - "42554": { + "1485": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "Claim.removeItem" }, - "42555": { + "1486": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "Claim.removeItem" }, - "42556": { + "1487": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "id" }, - "42557": { + "1488": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "actionId" }, - "42558": { + "1489": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "query" }, - "42559": { + "1490": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "headers" }, - "42560": { + "1491": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "Claim.addInboundItems" }, - "42561": { + "1492": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "Claim.addInboundItems" }, - "42562": { + "1493": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "id" }, - "42563": { + "1494": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "body" }, - "42564": { + "1495": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "query" }, - "42565": { + "1496": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "headers" }, - "42566": { + "1497": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "Claim.updateInboundItem" }, - "42567": { + "1498": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "Claim.updateInboundItem" }, - "42568": { + "1499": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "id" }, - "42569": { + "1500": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "actionId" }, - "42570": { + "1501": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "body" }, - "42571": { + "1502": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "query" }, - "42572": { + "1503": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "headers" }, - "42573": { + "1504": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "Claim.removeInboundItem" }, - "42574": { + "1505": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "Claim.removeInboundItem" }, - "42575": { + "1506": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "id" }, - "42576": { + "1507": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "actionId" }, - "42577": { + "1508": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "query" }, - "42578": { + "1509": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "headers" }, - "42579": { + "1510": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "Claim.addInboundShipping" }, - "42580": { + "1511": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "Claim.addInboundShipping" }, - "42581": { + "1512": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "id" }, - "42582": { + "1513": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "body" }, - "42583": { + "1514": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "query" }, - "42584": { + "1515": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "headers" }, - "42585": { + "1516": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "Claim.updateInboundShipping" }, - "42586": { + "1517": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "Claim.updateInboundShipping" }, - "42587": { + "1518": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "id" }, - "42588": { + "1519": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "actionId" }, - "42589": { + "1520": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "body" }, - "42590": { + "1521": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "query" }, - "42591": { + "1522": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "headers" }, - "42592": { + "1523": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "Claim.deleteInboundShipping" }, - "42593": { + "1524": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "Claim.deleteInboundShipping" }, - "42594": { + "1525": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "id" }, - "42595": { + "1526": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "actionId" }, - "42596": { + "1527": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "query" }, - "42597": { + "1528": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "headers" }, - "42598": { + "1529": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "Claim.addOutboundItems" }, - "42599": { + "1530": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "Claim.addOutboundItems" }, - "42600": { + "1531": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "id" }, - "42601": { + "1532": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "body" }, - "42602": { + "1533": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "query" }, - "42603": { + "1534": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "headers" }, - "42604": { + "1535": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "Claim.updateOutboundItem" }, - "42605": { + "1536": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "Claim.updateOutboundItem" }, - "42606": { + "1537": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "id" }, - "42607": { + "1538": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "actionId" }, - "42608": { + "1539": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "body" }, - "42609": { + "1540": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "query" }, - "42610": { + "1541": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "headers" }, - "42611": { + "1542": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "Claim.removeOutboundItem" }, - "42612": { + "1543": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "Claim.removeOutboundItem" }, - "42613": { + "1544": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "id" }, - "42614": { + "1545": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "actionId" }, - "42615": { + "1546": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "query" }, - "42616": { + "1547": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "headers" }, - "42617": { + "1548": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "Claim.addOutboundShipping" }, - "42618": { + "1549": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "Claim.addOutboundShipping" }, - "42619": { + "1550": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "id" }, - "42620": { + "1551": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "body" }, - "42621": { + "1552": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "query" }, - "42622": { + "1553": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "headers" }, - "42623": { + "1554": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "Claim.updateOutboundShipping" }, - "42624": { + "1555": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "Claim.updateOutboundShipping" }, - "42625": { + "1556": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "id" }, - "42626": { + "1557": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "actionId" }, - "42627": { + "1558": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "body" }, - "42628": { + "1559": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "query" }, - "42629": { + "1560": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "headers" }, - "42630": { + "1561": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "Claim.deleteOutboundShipping" }, - "42631": { + "1562": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "Claim.deleteOutboundShipping" }, - "42632": { + "1563": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "id" }, - "42633": { + "1564": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "actionId" }, - "42634": { + "1565": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "query" }, - "42635": { + "1566": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "headers" }, - "42636": { + "1567": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "Claim.request" }, - "42637": { + "1568": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "Claim.request" }, - "42638": { + "1569": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "id" }, - "42639": { + "1570": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "body" }, - "42640": { + "1571": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "query" }, - "42641": { + "1572": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "headers" }, - "42642": { + "1573": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "Claim.cancelRequest" }, - "42643": { + "1574": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "Claim.cancelRequest" }, - "42644": { + "1575": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "id" }, - "42645": { + "1576": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "query" }, - "42646": { + "1577": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/claim.ts", "qualifiedName": "headers" }, - "42647": { + "1578": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "Exchange" }, - "42648": { + "1579": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "Exchange.__constructor" }, - "42649": { + "1580": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "Exchange" }, - "42650": { + "1581": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "client" }, - "42651": { + "1582": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "Exchange.client" }, - "42652": { + "1583": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "Exchange.list" }, - "42653": { + "1584": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "Exchange.list" }, - "42654": { + "1585": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "query" }, - "42655": { + "1586": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "headers" }, - "42656": { + "1587": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "Exchange.retrieve" }, - "42657": { + "1588": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "Exchange.retrieve" }, - "42658": { + "1589": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "id" }, - "42659": { + "1590": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "query" }, - "42660": { + "1591": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "headers" }, - "42661": { + "1592": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "Exchange.create" }, - "42662": { + "1593": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "Exchange.create" }, - "42663": { + "1594": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "body" }, - "42664": { + "1595": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "query" }, - "42665": { + "1596": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "headers" }, - "42666": { + "1597": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "Exchange.cancel" }, - "42667": { + "1598": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "Exchange.cancel" }, - "42668": { + "1599": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "id" }, - "42669": { + "1600": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "query" }, - "42670": { + "1601": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "headers" }, - "42671": { + "1602": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "Exchange.addInboundItems" }, - "42672": { + "1603": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "Exchange.addInboundItems" }, - "42673": { + "1604": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "id" }, - "42674": { + "1605": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "body" }, - "42675": { + "1606": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "query" }, - "42676": { + "1607": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "headers" }, - "42677": { + "1608": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "Exchange.updateInboundItem" }, - "42678": { + "1609": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "Exchange.updateInboundItem" }, - "42679": { + "1610": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "id" }, - "42680": { + "1611": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "actionId" }, - "42681": { + "1612": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "body" }, - "42682": { + "1613": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "query" }, - "42683": { + "1614": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "headers" }, - "42684": { + "1615": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "Exchange.removeInboundItem" }, - "42685": { + "1616": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "Exchange.removeInboundItem" }, - "42686": { + "1617": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "id" }, - "42687": { + "1618": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "actionId" }, - "42688": { + "1619": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "query" }, - "42689": { + "1620": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "headers" }, - "42690": { + "1621": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "Exchange.addInboundShipping" }, - "42691": { + "1622": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "Exchange.addInboundShipping" }, - "42692": { + "1623": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "id" }, - "42693": { + "1624": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "body" }, - "42694": { + "1625": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "query" }, - "42695": { + "1626": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "headers" }, - "42696": { + "1627": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "Exchange.updateInboundShipping" }, - "42697": { + "1628": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "Exchange.updateInboundShipping" }, - "42698": { + "1629": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "id" }, - "42699": { + "1630": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "actionId" }, - "42700": { + "1631": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "body" }, - "42701": { + "1632": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "query" }, - "42702": { + "1633": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "headers" }, - "42703": { + "1634": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "Exchange.deleteInboundShipping" }, - "42704": { + "1635": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "Exchange.deleteInboundShipping" }, - "42705": { + "1636": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "id" }, - "42706": { + "1637": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "actionId" }, - "42707": { + "1638": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "query" }, - "42708": { + "1639": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "headers" }, - "42709": { + "1640": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "Exchange.addOutboundItems" }, - "42710": { + "1641": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "Exchange.addOutboundItems" }, - "42711": { + "1642": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "id" }, - "42712": { + "1643": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "body" }, - "42713": { + "1644": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "query" }, - "42714": { + "1645": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "headers" }, - "42715": { + "1646": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "Exchange.updateOutboundItem" }, - "42716": { + "1647": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "Exchange.updateOutboundItem" }, - "42717": { + "1648": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "id" }, - "42718": { + "1649": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "actionId" }, - "42719": { + "1650": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "body" }, - "42720": { + "1651": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "query" }, - "42721": { + "1652": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "headers" }, - "42722": { + "1653": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "Exchange.removeOutboundItem" }, - "42723": { + "1654": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "Exchange.removeOutboundItem" }, - "42724": { + "1655": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "id" }, - "42725": { + "1656": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "actionId" }, - "42726": { + "1657": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "query" }, - "42727": { + "1658": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "headers" }, - "42728": { + "1659": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "Exchange.addOutboundShipping" }, - "42729": { + "1660": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "Exchange.addOutboundShipping" }, - "42730": { + "1661": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "id" }, - "42731": { + "1662": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "body" }, - "42732": { + "1663": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "query" }, - "42733": { + "1664": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "headers" }, - "42734": { + "1665": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "Exchange.updateOutboundShipping" }, - "42735": { + "1666": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "Exchange.updateOutboundShipping" }, - "42736": { + "1667": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "id" }, - "42737": { + "1668": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "actionId" }, - "42738": { + "1669": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "body" }, - "42739": { + "1670": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "query" }, - "42740": { + "1671": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "headers" }, - "42741": { + "1672": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "Exchange.deleteOutboundShipping" }, - "42742": { + "1673": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "Exchange.deleteOutboundShipping" }, - "42743": { + "1674": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "id" }, - "42744": { + "1675": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "actionId" }, - "42745": { + "1676": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "query" }, - "42746": { + "1677": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "headers" }, - "42747": { + "1678": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "Exchange.request" }, - "42748": { + "1679": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "Exchange.request" }, - "42749": { + "1680": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "id" }, - "42750": { + "1681": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "body" }, - "42751": { + "1682": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "query" }, - "42752": { + "1683": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "headers" }, - "42753": { + "1684": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "Exchange.cancelRequest" }, - "42754": { + "1685": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "Exchange.cancelRequest" }, - "42755": { + "1686": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "id" }, - "42756": { + "1687": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "query" }, - "42757": { + "1688": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/exchange.ts", "qualifiedName": "headers" }, - "42758": { + "1689": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/tax-rate.ts", "qualifiedName": "TaxRate" }, - "42759": { + "1690": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/tax-rate.ts", "qualifiedName": "TaxRate.__constructor" }, - "42760": { + "1691": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/tax-rate.ts", "qualifiedName": "TaxRate" }, - "42761": { + "1692": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/tax-rate.ts", "qualifiedName": "client" }, - "42762": { + "1693": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/tax-rate.ts", "qualifiedName": "TaxRate.client" }, - "42763": { + "1694": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/tax-rate.ts", "qualifiedName": "TaxRate.create" }, - "42764": { + "1695": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/tax-rate.ts", "qualifiedName": "TaxRate.create" }, - "42765": { + "1696": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/tax-rate.ts", "qualifiedName": "body" }, - "42766": { + "1697": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/tax-rate.ts", "qualifiedName": "query" }, - "42767": { + "1698": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/tax-rate.ts", "qualifiedName": "headers" }, - "42768": { + "1699": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/tax-rate.ts", "qualifiedName": "TaxRate.update" }, - "42769": { + "1700": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/tax-rate.ts", "qualifiedName": "TaxRate.update" }, - "42770": { + "1701": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/tax-rate.ts", "qualifiedName": "id" }, - "42771": { + "1702": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/tax-rate.ts", "qualifiedName": "body" }, - "42772": { + "1703": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/tax-rate.ts", "qualifiedName": "query" }, - "42773": { + "1704": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/tax-rate.ts", "qualifiedName": "headers" }, - "42774": { + "1705": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/tax-rate.ts", "qualifiedName": "TaxRate.delete" }, - "42775": { + "1706": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/tax-rate.ts", "qualifiedName": "TaxRate.delete" }, - "42776": { + "1707": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/tax-rate.ts", "qualifiedName": "id" }, - "42777": { + "1708": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/tax-rate.ts", "qualifiedName": "headers" }, - "42778": { + "1709": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/tax-rate.ts", "qualifiedName": "TaxRate.retrieve" }, - "42779": { + "1710": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/tax-rate.ts", "qualifiedName": "TaxRate.retrieve" }, - "42780": { + "1711": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/tax-rate.ts", "qualifiedName": "id" }, - "42781": { + "1712": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/tax-rate.ts", "qualifiedName": "query" }, - "42782": { + "1713": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/tax-rate.ts", "qualifiedName": "headers" }, - "42783": { + "1714": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/tax-rate.ts", "qualifiedName": "TaxRate.list" }, - "42784": { + "1715": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/tax-rate.ts", "qualifiedName": "TaxRate.list" }, - "42785": { + "1716": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/tax-rate.ts", "qualifiedName": "query" }, - "42786": { + "1717": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/tax-rate.ts", "qualifiedName": "headers" }, - "42787": { + "1718": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/tax-region.ts", "qualifiedName": "TaxRegion" }, - "42788": { + "1719": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/tax-region.ts", "qualifiedName": "TaxRegion.__constructor" }, - "42789": { + "1720": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/tax-region.ts", "qualifiedName": "TaxRegion" }, - "42790": { + "1721": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/tax-region.ts", "qualifiedName": "client" }, - "42791": { + "1722": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/tax-region.ts", "qualifiedName": "TaxRegion.client" }, - "42792": { + "1723": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/tax-region.ts", "qualifiedName": "TaxRegion.create" }, - "42793": { + "1724": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/tax-region.ts", "qualifiedName": "TaxRegion.create" }, - "42794": { + "1725": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/tax-region.ts", "qualifiedName": "body" }, - "42795": { + "1726": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/tax-region.ts", "qualifiedName": "query" }, - "42796": { + "1727": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/tax-region.ts", "qualifiedName": "headers" }, - "42797": { + "1728": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/tax-region.ts", "qualifiedName": "TaxRegion.delete" }, - "42798": { + "1729": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/tax-region.ts", "qualifiedName": "TaxRegion.delete" }, - "42799": { + "1730": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/tax-region.ts", "qualifiedName": "id" }, - "42800": { + "1731": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/tax-region.ts", "qualifiedName": "headers" }, - "42801": { + "1732": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/tax-region.ts", "qualifiedName": "TaxRegion.retrieve" }, - "42802": { + "1733": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/tax-region.ts", "qualifiedName": "TaxRegion.retrieve" }, - "42803": { + "1734": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/tax-region.ts", "qualifiedName": "id" }, - "42804": { + "1735": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/tax-region.ts", "qualifiedName": "query" }, - "42805": { + "1736": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/tax-region.ts", "qualifiedName": "headers" }, - "42806": { + "1737": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/tax-region.ts", "qualifiedName": "TaxRegion.list" }, - "42807": { + "1738": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/tax-region.ts", "qualifiedName": "TaxRegion.list" }, - "42808": { + "1739": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/tax-region.ts", "qualifiedName": "query" }, - "42809": { + "1740": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/tax-region.ts", "qualifiedName": "headers" }, - "42810": { + "1741": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/store.ts", "qualifiedName": "Store" }, - "42811": { + "1742": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/store.ts", "qualifiedName": "Store.__constructor" }, - "42812": { + "1743": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/store.ts", "qualifiedName": "Store" }, - "42813": { + "1744": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/store.ts", "qualifiedName": "client" }, - "42814": { + "1745": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/store.ts", "qualifiedName": "Store.client" }, - "42815": { + "1746": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/store.ts", "qualifiedName": "Store.retrieve" }, - "42816": { + "1747": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/store.ts", "qualifiedName": "Store.retrieve" }, - "42817": { + "1748": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/store.ts", "qualifiedName": "id" }, - "42818": { + "1749": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/store.ts", "qualifiedName": "query" }, - "42819": { + "1750": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/store.ts", "qualifiedName": "headers" }, - "42820": { + "1751": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/store.ts", "qualifiedName": "Store.list" }, - "42821": { + "1752": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/store.ts", "qualifiedName": "Store.list" }, - "42822": { + "1753": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/store.ts", "qualifiedName": "query" }, - "42823": { + "1754": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/store.ts", "qualifiedName": "headers" }, - "42824": { + "1755": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/store.ts", "qualifiedName": "Store.update" }, - "42825": { + "1756": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/store.ts", "qualifiedName": "Store.update" }, - "42826": { + "1757": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/store.ts", "qualifiedName": "id" }, - "42827": { + "1758": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/store.ts", "qualifiedName": "body" }, - "42828": { + "1759": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/store.ts", "qualifiedName": "query" }, - "42829": { + "1760": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/store.ts", "qualifiedName": "headers" }, - "42830": { + "1761": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-tag.ts", "qualifiedName": "ProductTag" }, - "42831": { + "1762": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-tag.ts", "qualifiedName": "ProductTag.__constructor" }, - "42832": { + "1763": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-tag.ts", "qualifiedName": "ProductTag" }, - "42833": { + "1764": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-tag.ts", "qualifiedName": "client" }, - "42834": { + "1765": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-tag.ts", "qualifiedName": "ProductTag.client" }, - "42835": { + "1766": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-tag.ts", "qualifiedName": "ProductTag.create" }, - "42836": { + "1767": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-tag.ts", "qualifiedName": "ProductTag.create" }, - "42837": { + "1768": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-tag.ts", "qualifiedName": "body" }, - "42838": { + "1769": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-tag.ts", "qualifiedName": "query" }, - "42839": { + "1770": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-tag.ts", "qualifiedName": "headers" }, - "42840": { + "1771": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-tag.ts", "qualifiedName": "ProductTag.update" }, - "42841": { + "1772": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-tag.ts", "qualifiedName": "ProductTag.update" }, - "42842": { + "1773": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-tag.ts", "qualifiedName": "id" }, - "42843": { + "1774": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-tag.ts", "qualifiedName": "body" }, - "42844": { + "1775": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-tag.ts", "qualifiedName": "query" }, - "42845": { + "1776": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-tag.ts", "qualifiedName": "headers" }, - "42846": { + "1777": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-tag.ts", "qualifiedName": "ProductTag.list" }, - "42847": { + "1778": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-tag.ts", "qualifiedName": "ProductTag.list" }, - "42848": { + "1779": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-tag.ts", "qualifiedName": "query" }, - "42849": { + "1780": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-tag.ts", "qualifiedName": "headers" }, - "42850": { + "1781": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-tag.ts", "qualifiedName": "ProductTag.retrieve" }, - "42851": { + "1782": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-tag.ts", "qualifiedName": "ProductTag.retrieve" }, - "42852": { + "1783": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-tag.ts", "qualifiedName": "id" }, - "42853": { + "1784": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-tag.ts", "qualifiedName": "query" }, - "42854": { + "1785": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-tag.ts", "qualifiedName": "headers" }, - "42855": { + "1786": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-tag.ts", "qualifiedName": "ProductTag.delete" }, - "42856": { + "1787": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-tag.ts", "qualifiedName": "ProductTag.delete" }, - "42857": { + "1788": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-tag.ts", "qualifiedName": "id" }, - "42858": { + "1789": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-tag.ts", "qualifiedName": "headers" }, - "42859": { + "1790": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/user.ts", "qualifiedName": "User" }, - "42860": { + "1791": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/user.ts", "qualifiedName": "User.__constructor" }, - "42861": { + "1792": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/user.ts", "qualifiedName": "User" }, - "42862": { + "1793": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/user.ts", "qualifiedName": "client" }, - "42863": { + "1794": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/user.ts", "qualifiedName": "User.client" }, - "42864": { + "1795": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/user.ts", "qualifiedName": "User.update" }, - "42865": { + "1796": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/user.ts", "qualifiedName": "User.update" }, - "42866": { + "1797": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/user.ts", "qualifiedName": "id" }, - "42867": { + "1798": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/user.ts", "qualifiedName": "body" }, - "42868": { + "1799": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/user.ts", "qualifiedName": "query" }, - "42869": { + "1800": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/user.ts", "qualifiedName": "headers" }, - "42870": { + "1801": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/user.ts", "qualifiedName": "User.list" }, - "42871": { + "1802": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/user.ts", "qualifiedName": "User.list" }, - "42872": { + "1803": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/user.ts", "qualifiedName": "queryParams" }, - "42873": { + "1804": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/user.ts", "qualifiedName": "headers" }, - "42874": { + "1805": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/user.ts", "qualifiedName": "User.retrieve" }, - "42875": { + "1806": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/user.ts", "qualifiedName": "User.retrieve" }, - "42876": { + "1807": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/user.ts", "qualifiedName": "id" }, - "42877": { + "1808": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/user.ts", "qualifiedName": "query" }, - "42878": { + "1809": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/user.ts", "qualifiedName": "headers" }, - "42879": { + "1810": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/user.ts", "qualifiedName": "User.delete" }, - "42880": { + "1811": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/user.ts", "qualifiedName": "User.delete" }, - "42881": { + "1812": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/user.ts", "qualifiedName": "id" }, - "42882": { + "1813": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/user.ts", "qualifiedName": "headers" }, - "42883": { + "1814": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/user.ts", "qualifiedName": "User.me" }, - "42884": { + "1815": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/user.ts", "qualifiedName": "User.me" }, - "42885": { + "1816": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/user.ts", "qualifiedName": "query" }, - "42886": { + "1817": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/user.ts", "qualifiedName": "headers" }, - "42887": { + "1818": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/currency.ts", "qualifiedName": "Currency" }, - "42888": { + "1819": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/currency.ts", "qualifiedName": "Currency.__constructor" }, - "42889": { + "1820": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/currency.ts", "qualifiedName": "Currency" }, - "42890": { + "1821": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/currency.ts", "qualifiedName": "client" }, - "42891": { + "1822": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/currency.ts", "qualifiedName": "Currency.client" }, - "42892": { + "1823": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/currency.ts", "qualifiedName": "Currency.list" }, - "42893": { + "1824": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/currency.ts", "qualifiedName": "Currency.list" }, - "42894": { + "1825": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/currency.ts", "qualifiedName": "query" }, - "42895": { + "1826": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/currency.ts", "qualifiedName": "headers" }, - "42896": { + "1827": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/currency.ts", "qualifiedName": "Currency.retrieve" }, - "42897": { + "1828": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/currency.ts", "qualifiedName": "Currency.retrieve" }, - "42898": { + "1829": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/currency.ts", "qualifiedName": "code" }, - "42899": { + "1830": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/currency.ts", "qualifiedName": "query" }, - "42900": { + "1831": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/currency.ts", "qualifiedName": "headers" }, - "42901": { + "1832": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/payment.ts", "qualifiedName": "Payment" }, - "42902": { + "1833": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/payment.ts", "qualifiedName": "Payment.__constructor" }, - "42903": { + "1834": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/payment.ts", "qualifiedName": "Payment" }, - "42904": { + "1835": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/payment.ts", "qualifiedName": "client" }, - "42905": { + "1836": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/payment.ts", "qualifiedName": "Payment.client" }, - "42906": { + "1837": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/payment.ts", "qualifiedName": "Payment.list" }, - "42907": { + "1838": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/payment.ts", "qualifiedName": "Payment.list" }, - "42908": { + "1839": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/payment.ts", "qualifiedName": "query" }, - "42909": { + "1840": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/payment.ts", "qualifiedName": "headers" }, - "42910": { + "1841": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/payment.ts", "qualifiedName": "Payment.listPaymentProviders" }, - "42911": { + "1842": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/payment.ts", "qualifiedName": "Payment.listPaymentProviders" }, - "42912": { + "1843": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/payment.ts", "qualifiedName": "query" }, - "42913": { + "1844": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/payment.ts", "qualifiedName": "headers" }, - "42914": { + "1845": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/payment.ts", "qualifiedName": "Payment.retrieve" }, - "42915": { + "1846": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/payment.ts", "qualifiedName": "Payment.retrieve" }, - "42916": { + "1847": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/payment.ts", "qualifiedName": "id" }, - "42917": { + "1848": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/payment.ts", "qualifiedName": "query" }, - "42918": { + "1849": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/payment.ts", "qualifiedName": "headers" }, - "42919": { + "1850": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/payment.ts", "qualifiedName": "Payment.capture" }, - "42920": { + "1851": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/payment.ts", "qualifiedName": "Payment.capture" }, - "42921": { + "1852": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/payment.ts", "qualifiedName": "id" }, - "42922": { + "1853": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/payment.ts", "qualifiedName": "body" }, - "42923": { + "1854": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/payment.ts", "qualifiedName": "query" }, - "42924": { + "1855": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/payment.ts", "qualifiedName": "headers" }, - "42925": { + "1856": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/payment.ts", "qualifiedName": "Payment.refund" }, - "42926": { + "1857": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/payment.ts", "qualifiedName": "Payment.refund" }, - "42927": { + "1858": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/payment.ts", "qualifiedName": "id" }, - "42928": { + "1859": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/payment.ts", "qualifiedName": "body" }, - "42929": { + "1860": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/payment.ts", "qualifiedName": "query" }, - "42930": { + "1861": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/payment.ts", "qualifiedName": "headers" }, - "42931": { + "1862": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-variant.ts", "qualifiedName": "ProductVariant" }, - "42932": { + "1863": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-variant.ts", "qualifiedName": "ProductVariant.__constructor" }, - "42933": { + "1864": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-variant.ts", "qualifiedName": "ProductVariant" }, - "42934": { + "1865": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-variant.ts", "qualifiedName": "client" }, - "42935": { + "1866": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-variant.ts", "qualifiedName": "ProductVariant.client" }, - "42936": { + "1867": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-variant.ts", "qualifiedName": "ProductVariant.list" }, - "42937": { + "1868": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-variant.ts", "qualifiedName": "ProductVariant.list" }, - "42938": { + "1869": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-variant.ts", "qualifiedName": "query" }, - "42939": { + "1870": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/product-variant.ts", "qualifiedName": "headers" }, - "42940": { + "1871": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/refund-reasons.ts", "qualifiedName": "RefundReason" }, - "42941": { + "1872": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/refund-reasons.ts", "qualifiedName": "RefundReason.__constructor" }, - "42942": { + "1873": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/refund-reasons.ts", "qualifiedName": "RefundReason" }, - "42943": { + "1874": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/refund-reasons.ts", "qualifiedName": "client" }, - "42944": { + "1875": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/refund-reasons.ts", "qualifiedName": "RefundReason.client" }, - "42945": { + "1876": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/refund-reasons.ts", "qualifiedName": "RefundReason.list" }, - "42946": { + "1877": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/refund-reasons.ts", "qualifiedName": "RefundReason.list" }, - "42947": { + "1878": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/refund-reasons.ts", "qualifiedName": "query" }, - "42948": { + "1879": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/refund-reasons.ts", "qualifiedName": "headers" }, - "42949": { + "1880": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/payment-collection.ts", "qualifiedName": "PaymentCollection" }, - "42950": { + "1881": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/payment-collection.ts", "qualifiedName": "PaymentCollection.__constructor" }, - "42951": { + "1882": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/payment-collection.ts", "qualifiedName": "PaymentCollection" }, - "42952": { + "1883": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/payment-collection.ts", "qualifiedName": "client" }, - "42953": { + "1884": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/payment-collection.ts", "qualifiedName": "PaymentCollection.client" }, - "42954": { + "1885": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/payment-collection.ts", "qualifiedName": "PaymentCollection.create" }, - "42955": { + "1886": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/payment-collection.ts", "qualifiedName": "PaymentCollection.create" }, - "42956": { + "1887": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/payment-collection.ts", "qualifiedName": "body" }, - "42957": { + "1888": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/payment-collection.ts", "qualifiedName": "query" }, - "42958": { + "1889": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/payment-collection.ts", "qualifiedName": "headers" }, - "42959": { + "1890": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/payment-collection.ts", "qualifiedName": "PaymentCollection.delete" }, - "42960": { + "1891": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/payment-collection.ts", "qualifiedName": "PaymentCollection.delete" }, - "42961": { + "1892": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/payment-collection.ts", "qualifiedName": "id" }, - "42962": { + "1893": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/payment-collection.ts", "qualifiedName": "headers" }, - "42963": { + "1894": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/payment-collection.ts", "qualifiedName": "PaymentCollection.markAsPaid" }, - "42964": { + "1895": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/payment-collection.ts", "qualifiedName": "PaymentCollection.markAsPaid" }, - "42965": { + "1896": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/payment-collection.ts", "qualifiedName": "id" }, - "42966": { + "1897": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/payment-collection.ts", "qualifiedName": "body" }, - "42967": { + "1898": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/payment-collection.ts", "qualifiedName": "query" }, - "42968": { + "1899": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/payment-collection.ts", "qualifiedName": "headers" }, - "42969": { + "1900": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/api-key.ts", "qualifiedName": "ApiKey" }, - "42970": { + "1901": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/api-key.ts", "qualifiedName": "ApiKey.__constructor" }, - "42971": { + "1902": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/api-key.ts", "qualifiedName": "ApiKey" }, - "42972": { + "1903": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/api-key.ts", "qualifiedName": "client" }, - "42973": { + "1904": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/api-key.ts", "qualifiedName": "ApiKey.client" }, - "42974": { + "1905": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/api-key.ts", "qualifiedName": "ApiKey.list" }, - "42975": { + "1906": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/api-key.ts", "qualifiedName": "ApiKey.list" }, - "42976": { + "1907": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/api-key.ts", "qualifiedName": "queryParams" }, - "42977": { + "1908": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/api-key.ts", "qualifiedName": "headers" }, - "42978": { + "1909": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/api-key.ts", "qualifiedName": "ApiKey.create" }, - "42979": { + "1910": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/api-key.ts", "qualifiedName": "ApiKey.create" }, - "42980": { + "1911": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/api-key.ts", "qualifiedName": "body" }, - "42981": { + "1912": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/api-key.ts", "qualifiedName": "query" }, - "42982": { + "1913": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/api-key.ts", "qualifiedName": "headers" }, - "42983": { + "1914": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/api-key.ts", "qualifiedName": "ApiKey.revoke" }, - "42984": { + "1915": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/api-key.ts", "qualifiedName": "ApiKey.revoke" }, - "42985": { + "1916": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/api-key.ts", "qualifiedName": "id" }, - "42986": { + "1917": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/api-key.ts", "qualifiedName": "headers" }, - "42987": { + "1918": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/api-key.ts", "qualifiedName": "ApiKey.retrieve" }, - "42988": { + "1919": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/api-key.ts", "qualifiedName": "ApiKey.retrieve" }, - "42989": { + "1920": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/api-key.ts", "qualifiedName": "id" }, - "42990": { + "1921": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/api-key.ts", "qualifiedName": "headers" }, - "42991": { + "1922": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/api-key.ts", "qualifiedName": "ApiKey.update" }, - "42992": { + "1923": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/api-key.ts", "qualifiedName": "ApiKey.update" }, - "42993": { + "1924": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/api-key.ts", "qualifiedName": "id" }, - "42994": { + "1925": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/api-key.ts", "qualifiedName": "body" }, - "42995": { + "1926": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/api-key.ts", "qualifiedName": "query" }, - "42996": { + "1927": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/api-key.ts", "qualifiedName": "headers" }, - "42997": { + "1928": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/api-key.ts", "qualifiedName": "ApiKey.delete" }, - "42998": { + "1929": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/api-key.ts", "qualifiedName": "ApiKey.delete" }, - "42999": { + "1930": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/api-key.ts", "qualifiedName": "id" }, - "43000": { + "1931": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/api-key.ts", "qualifiedName": "headers" }, - "43001": { + "1932": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/api-key.ts", "qualifiedName": "ApiKey.batchSalesChannels" }, - "43002": { + "1933": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/api-key.ts", "qualifiedName": "ApiKey.batchSalesChannels" }, - "43003": { + "1934": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/api-key.ts", "qualifiedName": "id" }, - "43004": { + "1935": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/api-key.ts", "qualifiedName": "body" }, - "43005": { + "1936": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/api-key.ts", "qualifiedName": "headers" }, - "43006": { + "1937": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/workflow-execution.ts", "qualifiedName": "WorkflowExecution" }, - "43007": { + "1938": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/workflow-execution.ts", "qualifiedName": "WorkflowExecution.__constructor" }, - "43008": { + "1939": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/workflow-execution.ts", "qualifiedName": "WorkflowExecution" }, - "43009": { + "1940": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/workflow-execution.ts", "qualifiedName": "client" }, - "43010": { + "1941": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/workflow-execution.ts", "qualifiedName": "WorkflowExecution.client" }, - "43011": { + "1942": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/workflow-execution.ts", "qualifiedName": "WorkflowExecution.list" }, - "43012": { + "1943": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/workflow-execution.ts", "qualifiedName": "WorkflowExecution.list" }, - "43013": { + "1944": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/workflow-execution.ts", "qualifiedName": "queryParams" }, - "43014": { + "1945": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/workflow-execution.ts", "qualifiedName": "headers" }, - "43015": { + "1946": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/workflow-execution.ts", "qualifiedName": "WorkflowExecution.retrieve" }, - "43016": { + "1947": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/workflow-execution.ts", "qualifiedName": "WorkflowExecution.retrieve" }, - "43017": { + "1948": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/workflow-execution.ts", "qualifiedName": "id" }, - "43018": { + "1949": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/workflow-execution.ts", "qualifiedName": "headers" }, - "43019": { + "1950": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/reservation.ts", "qualifiedName": "Reservation" }, - "43020": { + "1951": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/reservation.ts", "qualifiedName": "Reservation.__constructor" }, - "43021": { + "1952": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/reservation.ts", "qualifiedName": "Reservation" }, - "43022": { + "1953": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/reservation.ts", "qualifiedName": "client" }, - "43023": { + "1954": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/reservation.ts", "qualifiedName": "Reservation.client" }, - "43024": { + "1955": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/reservation.ts", "qualifiedName": "Reservation.retrieve" }, - "43025": { + "1956": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/reservation.ts", "qualifiedName": "Reservation.retrieve" }, - "43026": { + "1957": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/reservation.ts", "qualifiedName": "id" }, - "43027": { + "1958": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/reservation.ts", "qualifiedName": "query" }, - "43028": { + "1959": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/reservation.ts", "qualifiedName": "headers" }, - "43029": { + "1960": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/reservation.ts", "qualifiedName": "Reservation.list" }, - "43030": { + "1961": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/reservation.ts", "qualifiedName": "Reservation.list" }, - "43031": { + "1962": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/reservation.ts", "qualifiedName": "query" }, - "43032": { + "1963": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/reservation.ts", "qualifiedName": "headers" }, - "43033": { + "1964": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/reservation.ts", "qualifiedName": "Reservation.create" }, - "43034": { + "1965": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/reservation.ts", "qualifiedName": "Reservation.create" }, - "43035": { + "1966": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/reservation.ts", "qualifiedName": "body" }, - "43036": { + "1967": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/reservation.ts", "qualifiedName": "query" }, - "43037": { + "1968": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/reservation.ts", "qualifiedName": "headers" }, - "43038": { + "1969": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/reservation.ts", "qualifiedName": "Reservation.update" }, - "43039": { + "1970": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/reservation.ts", "qualifiedName": "Reservation.update" }, - "43040": { + "1971": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/reservation.ts", "qualifiedName": "id" }, - "43041": { + "1972": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/reservation.ts", "qualifiedName": "body" }, - "43042": { + "1973": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/reservation.ts", "qualifiedName": "query" }, - "43043": { + "1974": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/reservation.ts", "qualifiedName": "headers" }, - "43044": { + "1975": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/reservation.ts", "qualifiedName": "Reservation.delete" }, - "43045": { + "1976": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/reservation.ts", "qualifiedName": "Reservation.delete" }, - "43046": { + "1977": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/reservation.ts", "qualifiedName": "id" }, - "43047": { + "1978": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/reservation.ts", "qualifiedName": "headers" }, - "43048": { + "1979": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer-group.ts", "qualifiedName": "CustomerGroup" }, - "43049": { + "1980": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer-group.ts", "qualifiedName": "CustomerGroup.__constructor" }, - "43050": { + "1981": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer-group.ts", "qualifiedName": "CustomerGroup" }, - "43051": { + "1982": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer-group.ts", "qualifiedName": "client" }, - "43052": { + "1983": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer-group.ts", "qualifiedName": "CustomerGroup.client" }, - "43053": { + "1984": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer-group.ts", "qualifiedName": "CustomerGroup.retrieve" }, - "43054": { + "1985": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer-group.ts", "qualifiedName": "CustomerGroup.retrieve" }, - "43055": { + "1986": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer-group.ts", "qualifiedName": "id" }, - "43056": { + "1987": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer-group.ts", "qualifiedName": "query" }, - "43057": { + "1988": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer-group.ts", "qualifiedName": "headers" }, - "43058": { + "1989": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer-group.ts", "qualifiedName": "CustomerGroup.list" }, - "43059": { + "1990": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer-group.ts", "qualifiedName": "CustomerGroup.list" }, - "43060": { + "1991": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer-group.ts", "qualifiedName": "query" }, - "43061": { + "1992": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer-group.ts", "qualifiedName": "headers" }, - "43062": { + "1993": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer-group.ts", "qualifiedName": "CustomerGroup.create" }, - "43063": { + "1994": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer-group.ts", "qualifiedName": "CustomerGroup.create" }, - "43064": { + "1995": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer-group.ts", "qualifiedName": "body" }, - "43065": { + "1996": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer-group.ts", "qualifiedName": "query" }, - "43066": { + "1997": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer-group.ts", "qualifiedName": "headers" }, - "43067": { + "1998": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer-group.ts", "qualifiedName": "CustomerGroup.update" }, - "43068": { + "1999": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer-group.ts", "qualifiedName": "CustomerGroup.update" }, - "43069": { + "2000": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer-group.ts", "qualifiedName": "id" }, - "43070": { + "2001": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer-group.ts", "qualifiedName": "body" }, - "43071": { + "2002": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer-group.ts", "qualifiedName": "query" }, - "43072": { + "2003": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer-group.ts", "qualifiedName": "headers" }, - "43073": { + "2004": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer-group.ts", "qualifiedName": "CustomerGroup.delete" }, - "43074": { + "2005": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer-group.ts", "qualifiedName": "CustomerGroup.delete" }, - "43075": { + "2006": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer-group.ts", "qualifiedName": "id" }, - "43076": { + "2007": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer-group.ts", "qualifiedName": "headers" }, - "43077": { + "2008": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer-group.ts", "qualifiedName": "CustomerGroup.batchCustomers" }, - "43078": { + "2009": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer-group.ts", "qualifiedName": "CustomerGroup.batchCustomers" }, - "43079": { + "2010": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer-group.ts", "qualifiedName": "id" }, - "43080": { + "2011": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer-group.ts", "qualifiedName": "body" }, - "43081": { + "2012": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/customer-group.ts", "qualifiedName": "headers" }, - "43082": { + "2013": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/promotion.ts", "qualifiedName": "Promotion" }, - "43083": { + "2014": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/promotion.ts", "qualifiedName": "Promotion.__constructor" }, - "43084": { + "2015": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/promotion.ts", "qualifiedName": "Promotion" }, - "43085": { + "2016": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/promotion.ts", "qualifiedName": "client" }, - "43086": { + "2017": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/promotion.ts", "qualifiedName": "Promotion.client" }, - "43087": { + "2018": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/promotion.ts", "qualifiedName": "Promotion.retrieve" }, - "43088": { + "2019": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/promotion.ts", "qualifiedName": "Promotion.retrieve" }, - "43089": { + "2020": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/promotion.ts", "qualifiedName": "id" }, - "43090": { + "2021": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/promotion.ts", "qualifiedName": "query" }, - "43091": { + "2022": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/promotion.ts", "qualifiedName": "headers" }, - "43092": { + "2023": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/promotion.ts", "qualifiedName": "Promotion.list" }, - "43093": { + "2024": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/promotion.ts", "qualifiedName": "Promotion.list" }, - "43094": { + "2025": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/promotion.ts", "qualifiedName": "query" }, - "43095": { + "2026": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/promotion.ts", "qualifiedName": "headers" }, - "43096": { + "2027": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/promotion.ts", "qualifiedName": "Promotion.create" }, - "43097": { + "2028": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/promotion.ts", "qualifiedName": "Promotion.create" }, - "43098": { + "2029": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/promotion.ts", "qualifiedName": "payload" }, - "43099": { + "2030": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/promotion.ts", "qualifiedName": "headers" }, - "43100": { + "2031": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/promotion.ts", "qualifiedName": "Promotion.update" }, - "43101": { + "2032": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/promotion.ts", "qualifiedName": "Promotion.update" }, - "43102": { + "2033": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/promotion.ts", "qualifiedName": "id" }, - "43103": { + "2034": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/promotion.ts", "qualifiedName": "payload" }, - "43104": { + "2035": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/promotion.ts", "qualifiedName": "headers" }, - "43105": { + "2036": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/promotion.ts", "qualifiedName": "Promotion.delete" }, - "43106": { + "2037": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/promotion.ts", "qualifiedName": "Promotion.delete" }, - "43107": { + "2038": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/promotion.ts", "qualifiedName": "id" }, - "43108": { + "2039": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/promotion.ts", "qualifiedName": "headers" }, - "43109": { + "2040": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/promotion.ts", "qualifiedName": "Promotion.addRules" }, - "43110": { + "2041": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/promotion.ts", "qualifiedName": "Promotion.addRules" }, - "43111": { + "2042": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/promotion.ts", "qualifiedName": "id" }, - "43112": { + "2043": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/promotion.ts", "qualifiedName": "ruleType" }, - "43113": { + "2044": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/promotion.ts", "qualifiedName": "payload" }, - "43114": { + "2045": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/promotion.ts", "qualifiedName": "headers" }, - "43115": { + "2046": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/promotion.ts", "qualifiedName": "Promotion.updateRules" }, - "43116": { + "2047": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/promotion.ts", "qualifiedName": "Promotion.updateRules" }, - "43117": { + "2048": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/promotion.ts", "qualifiedName": "id" }, - "43118": { + "2049": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/promotion.ts", "qualifiedName": "ruleType" }, - "43119": { + "2050": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/promotion.ts", "qualifiedName": "payload" }, - "43120": { + "2051": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/promotion.ts", "qualifiedName": "headers" }, - "43121": { + "2052": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/promotion.ts", "qualifiedName": "Promotion.removeRules" }, - "43122": { + "2053": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/promotion.ts", "qualifiedName": "Promotion.removeRules" }, - "43123": { + "2054": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/promotion.ts", "qualifiedName": "id" }, - "43124": { + "2055": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/promotion.ts", "qualifiedName": "ruleType" }, - "43125": { + "2056": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/promotion.ts", "qualifiedName": "payload" }, - "43126": { + "2057": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/promotion.ts", "qualifiedName": "headers" }, - "43127": { + "2058": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/promotion.ts", "qualifiedName": "Promotion.listRules" }, - "43128": { + "2059": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/promotion.ts", "qualifiedName": "Promotion.listRules" }, - "43129": { + "2060": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/promotion.ts", "qualifiedName": "id" }, - "43130": { + "2061": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/promotion.ts", "qualifiedName": "ruleType" }, - "43131": { + "2062": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/promotion.ts", "qualifiedName": "query" }, - "43132": { + "2063": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/promotion.ts", "qualifiedName": "headers" }, - "43133": { + "2064": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/promotion.ts", "qualifiedName": "Promotion.listRuleAttributes" }, - "43134": { + "2065": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/promotion.ts", "qualifiedName": "Promotion.listRuleAttributes" }, - "43135": { + "2066": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/promotion.ts", "qualifiedName": "ruleType" }, - "43136": { + "2067": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/promotion.ts", "qualifiedName": "promotionType" }, - "43137": { + "2068": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/promotion.ts", "qualifiedName": "headers" }, - "43138": { + "2069": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/promotion.ts", "qualifiedName": "Promotion.listRuleValues" }, - "43139": { + "2070": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/promotion.ts", "qualifiedName": "Promotion.listRuleValues" }, - "43140": { + "2071": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/promotion.ts", "qualifiedName": "ruleType" }, - "43141": { + "2072": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/promotion.ts", "qualifiedName": "ruleValue" }, - "43142": { + "2073": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/promotion.ts", "qualifiedName": "query" }, - "43143": { + "2074": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/promotion.ts", "qualifiedName": "headers" }, - "43144": { + "2075": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/campaign.ts", "qualifiedName": "Campaign" }, - "43145": { + "2076": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/campaign.ts", "qualifiedName": "Campaign.__constructor" }, - "43146": { + "2077": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/campaign.ts", "qualifiedName": "Campaign" }, - "43147": { + "2078": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/campaign.ts", "qualifiedName": "client" }, - "43148": { + "2079": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/campaign.ts", "qualifiedName": "Campaign.client" }, - "43149": { + "2080": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/campaign.ts", "qualifiedName": "Campaign.retrieve" }, - "43150": { + "2081": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/campaign.ts", "qualifiedName": "Campaign.retrieve" }, - "43151": { + "2082": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/campaign.ts", "qualifiedName": "id" }, - "43152": { + "2083": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/campaign.ts", "qualifiedName": "query" }, - "43153": { + "2084": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/campaign.ts", "qualifiedName": "headers" }, - "43154": { + "2085": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/campaign.ts", "qualifiedName": "Campaign.list" }, - "43155": { + "2086": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/campaign.ts", "qualifiedName": "Campaign.list" }, - "43156": { + "2087": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/campaign.ts", "qualifiedName": "query" }, - "43157": { + "2088": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/campaign.ts", "qualifiedName": "headers" }, - "43158": { + "2089": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/campaign.ts", "qualifiedName": "Campaign.create" }, - "43159": { + "2090": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/campaign.ts", "qualifiedName": "Campaign.create" }, - "43160": { + "2091": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/campaign.ts", "qualifiedName": "payload" }, - "43161": { + "2092": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/campaign.ts", "qualifiedName": "headers" }, - "43162": { + "2093": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/campaign.ts", "qualifiedName": "Campaign.update" }, - "43163": { + "2094": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/campaign.ts", "qualifiedName": "Campaign.update" }, - "43164": { + "2095": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/campaign.ts", "qualifiedName": "id" }, - "43165": { + "2096": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/campaign.ts", "qualifiedName": "payload" }, - "43166": { + "2097": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/campaign.ts", "qualifiedName": "headers" }, - "43167": { + "2098": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/campaign.ts", "qualifiedName": "Campaign.delete" }, - "43168": { + "2099": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/campaign.ts", "qualifiedName": "Campaign.delete" }, - "43169": { + "2100": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/campaign.ts", "qualifiedName": "id" }, - "43170": { + "2101": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/campaign.ts", "qualifiedName": "headers" }, - "43171": { + "2102": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/campaign.ts", "qualifiedName": "Campaign.batchPromotions" }, - "43172": { + "2103": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/campaign.ts", "qualifiedName": "Campaign.batchPromotions" }, - "43173": { + "2104": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/campaign.ts", "qualifiedName": "id" }, - "43174": { + "2105": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/campaign.ts", "qualifiedName": "payload" }, - "43175": { + "2106": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/campaign.ts", "qualifiedName": "headers" }, - "43176": { + "2107": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/plugin.ts", "qualifiedName": "Plugin" }, - "43177": { + "2108": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/plugin.ts", "qualifiedName": "Plugin.__constructor" }, - "43178": { + "2109": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/plugin.ts", "qualifiedName": "Plugin" }, - "43179": { + "2110": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/plugin.ts", "qualifiedName": "client" }, - "43180": { + "2111": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/plugin.ts", "qualifiedName": "Plugin.client" }, - "43181": { + "2112": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/plugin.ts", "qualifiedName": "Plugin.list" }, - "43182": { + "2113": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/plugin.ts", "qualifiedName": "Plugin.list" }, - "43183": { + "2114": { "sourceFileName": "../../../../packages/core/js-sdk/src/admin/plugin.ts", "qualifiedName": "headers" }, - "43184": { + "2115": { "sourceFileName": "../../../../packages/core/js-sdk/src/client.ts", "qualifiedName": "Client" }, - "43185": { + "2116": { "sourceFileName": "../../../../packages/core/js-sdk/src/client.ts", "qualifiedName": "Client.__constructor" }, - "43186": { + "2117": { "sourceFileName": "../../../../packages/core/js-sdk/src/client.ts", "qualifiedName": "Client" }, - "43187": { + "2118": { "sourceFileName": "../../../../packages/core/js-sdk/src/client.ts", "qualifiedName": "config" }, - "43188": { + "2119": { "sourceFileName": "../../../../packages/core/js-sdk/src/client.ts", "qualifiedName": "Client.fetch_" }, - "43189": { + "2120": { "sourceFileName": "../../../../packages/core/js-sdk/src/client.ts", "qualifiedName": "Client.config" }, - "43190": { + "2121": { "sourceFileName": "../../../../packages/core/js-sdk/src/client.ts", "qualifiedName": "Client.logger" }, - "43191": { + "2122": { "sourceFileName": "../../../../packages/core/js-sdk/src/client.ts", "qualifiedName": "Client.DEFAULT_JWT_STORAGE_KEY" }, - "43192": { + "2123": { "sourceFileName": "../../../../packages/core/js-sdk/src/client.ts", "qualifiedName": "Client.token" }, - "43193": { + "2124": { "sourceFileName": "../../../../packages/core/js-sdk/src/client.ts", "qualifiedName": "Client.fetch" }, - "43194": { + "2125": { "sourceFileName": "../../../../packages/core/js-sdk/src/client.ts", "qualifiedName": "Client.fetch" }, - "43195": { + "2126": { "sourceFileName": "../../../../packages/core/js-sdk/src/client.ts", "qualifiedName": "T" }, - "43196": { + "2127": { "sourceFileName": "../../../../packages/core/js-sdk/src/client.ts", "qualifiedName": "input" }, - "43197": { + "2128": { "sourceFileName": "../../../../packages/core/js-sdk/src/client.ts", "qualifiedName": "init" }, - "43198": { + "2129": { "sourceFileName": "../../../../packages/core/js-sdk/src/client.ts", "qualifiedName": "Client.fetchStream" }, - "43199": { + "2130": { "sourceFileName": "../../../../packages/core/js-sdk/src/client.ts", "qualifiedName": "Client.fetchStream" }, - "43200": { + "2131": { "sourceFileName": "../../../../packages/core/js-sdk/src/client.ts", "qualifiedName": "input" }, - "43201": { + "2132": { "sourceFileName": "../../../../packages/core/js-sdk/src/client.ts", "qualifiedName": "init" }, - "43202": { + "2133": { "sourceFileName": "../../../../packages/core/js-sdk/src/client.ts", "qualifiedName": "Client.setToken" }, - "43203": { + "2134": { "sourceFileName": "../../../../packages/core/js-sdk/src/client.ts", "qualifiedName": "Client.setToken" }, - "43204": { + "2135": { "sourceFileName": "../../../../packages/core/js-sdk/src/client.ts", "qualifiedName": "token" }, - "43205": { + "2136": { "sourceFileName": "../../../../packages/core/js-sdk/src/client.ts", "qualifiedName": "Client.clearToken" }, - "43206": { + "2137": { "sourceFileName": "../../../../packages/core/js-sdk/src/client.ts", "qualifiedName": "Client.clearToken" }, - "43207": { + "2138": { "sourceFileName": "../../../../packages/core/js-sdk/src/client.ts", "qualifiedName": "Client.clearToken_" }, - "43208": { + "2139": { "sourceFileName": "../../../../packages/core/js-sdk/src/client.ts", "qualifiedName": "Client.clearToken_" }, - "43209": { + "2140": { "sourceFileName": "../../../../packages/core/js-sdk/src/client.ts", "qualifiedName": "Client.initClient" }, - "43210": { + "2141": { "sourceFileName": "../../../../packages/core/js-sdk/src/client.ts", "qualifiedName": "Client.initClient" }, - "43211": { + "2142": { "sourceFileName": "../../../../packages/core/js-sdk/src/client.ts", "qualifiedName": "Client.getApiKeyHeader_" }, - "43212": { + "2143": { "sourceFileName": "../../../../packages/core/js-sdk/src/client.ts", "qualifiedName": "Client.getApiKeyHeader_" }, - "43213": { + "2144": { "sourceFileName": "", "qualifiedName": "__type" }, - "43214": { + "2145": { "sourceFileName": "../../../../packages/core/js-sdk/src/client.ts", "qualifiedName": "__type" }, - "43215": { + "2146": { "sourceFileName": "../../../../packages/core/js-sdk/src/client.ts", "qualifiedName": "__type.Authorization" }, - "43216": { + "2147": { "sourceFileName": "../../../../packages/core/js-sdk/src/client.ts", "qualifiedName": "Client.getPublishableKeyHeader_" }, - "43217": { + "2148": { "sourceFileName": "../../../../packages/core/js-sdk/src/client.ts", "qualifiedName": "Client.getPublishableKeyHeader_" }, - "43218": { + "2149": { "sourceFileName": "", "qualifiedName": "__type" }, - "43219": { + "2150": { "sourceFileName": "../../../../packages/core/js-sdk/src/client.ts", "qualifiedName": "__type" }, - "43220": { + "2151": { "sourceFileName": "../../../../packages/core/js-sdk/src/client.ts", "qualifiedName": "__type.x-publishable-api-key" }, - "43221": { + "2152": { "sourceFileName": "../../../../packages/core/js-sdk/src/client.ts", "qualifiedName": "Client.getJwtHeader_" }, - "43222": { + "2153": { "sourceFileName": "../../../../packages/core/js-sdk/src/client.ts", "qualifiedName": "Client.getJwtHeader_" }, - "43223": { + "2154": { "sourceFileName": "", "qualifiedName": "__type" }, - "43224": { + "2155": { "sourceFileName": "../../../../packages/core/js-sdk/src/client.ts", "qualifiedName": "__type" }, - "43225": { + "2156": { "sourceFileName": "../../../../packages/core/js-sdk/src/client.ts", "qualifiedName": "__type.Authorization" }, - "43226": { + "2157": { "sourceFileName": "../../../../packages/core/js-sdk/src/client.ts", "qualifiedName": "Client.setToken_" }, - "43227": { + "2158": { "sourceFileName": "../../../../packages/core/js-sdk/src/client.ts", "qualifiedName": "Client.setToken_" }, - "43228": { + "2159": { "sourceFileName": "../../../../packages/core/js-sdk/src/client.ts", "qualifiedName": "token" }, - "43229": { + "2160": { "sourceFileName": "../../../../packages/core/js-sdk/src/client.ts", "qualifiedName": "Client.getToken_" }, - "43230": { + "2161": { "sourceFileName": "../../../../packages/core/js-sdk/src/client.ts", "qualifiedName": "Client.getToken_" }, - "43231": { + "2162": { "sourceFileName": "../../../../packages/core/js-sdk/src/client.ts", "qualifiedName": "Client.getTokenStorageInfo_" }, - "43232": { + "2163": { "sourceFileName": "../../../../packages/core/js-sdk/src/client.ts", "qualifiedName": "Client.getTokenStorageInfo_" }, - "43233": { + "2164": { "sourceFileName": "../../../../packages/core/js-sdk/src/client.ts", "qualifiedName": "__object" }, - "43234": { + "2165": { "sourceFileName": "../../../../packages/core/js-sdk/src/client.ts", "qualifiedName": "__object.storageMethod" }, - "43235": { + "2166": { "sourceFileName": "../../../../packages/core/js-sdk/src/client.ts", "qualifiedName": "__object.storageKey" }, - "43236": { + "2167": { "sourceFileName": "../../../../packages/core/js-sdk/src/client.ts", "qualifiedName": "Client.throwError_" }, - "43237": { + "2168": { "sourceFileName": "../../../../packages/core/js-sdk/src/client.ts", "qualifiedName": "Client.throwError_" }, - "43238": { + "2169": { "sourceFileName": "../../../../packages/core/js-sdk/src/client.ts", "qualifiedName": "message" }, - "43239": { + "2170": { "sourceFileName": "../../../../packages/core/js-sdk/src/types.ts", "qualifiedName": "ClientHeaders" }, - "43240": { + "2171": { "sourceFileName": "../../../../packages/core/js-sdk/src/types.ts", "qualifiedName": "__type" }, - "43241": { + "2172": { "sourceFileName": "../../../../packages/core/js-sdk/src/types.ts", "qualifiedName": "__type.tags" }, - "43242": { + "2173": { "sourceFileName": "../../../../packages/core/js-sdk/src/types.ts", "qualifiedName": "Config" }, - "43243": { + "2174": { "sourceFileName": "../../../../packages/core/js-sdk/src/types.ts", "qualifiedName": "__type" }, - "43244": { + "2175": { "sourceFileName": "../../../../packages/core/js-sdk/src/types.ts", "qualifiedName": "__type.baseUrl" }, - "43245": { + "2176": { "sourceFileName": "../../../../packages/core/js-sdk/src/types.ts", "qualifiedName": "__type.globalHeaders" }, - "43246": { + "2177": { "sourceFileName": "../../../../packages/core/js-sdk/src/types.ts", "qualifiedName": "__type.publishableKey" }, - "43247": { + "2178": { "sourceFileName": "../../../../packages/core/js-sdk/src/types.ts", "qualifiedName": "__type.apiKey" }, - "43248": { + "2179": { "sourceFileName": "../../../../packages/core/js-sdk/src/types.ts", "qualifiedName": "__type.auth" }, - "43249": { + "2180": { "sourceFileName": "../../../../packages/core/js-sdk/src/types.ts", "qualifiedName": "__type" }, - "43250": { + "2181": { "sourceFileName": "../../../../packages/core/js-sdk/src/types.ts", "qualifiedName": "__type.type" }, - "43251": { + "2182": { "sourceFileName": "../../../../packages/core/js-sdk/src/types.ts", "qualifiedName": "__type.jwtTokenStorageKey" }, - "43252": { + "2183": { "sourceFileName": "../../../../packages/core/js-sdk/src/types.ts", "qualifiedName": "__type.jwtTokenStorageMethod" }, - "43253": { + "2184": { "sourceFileName": "../../../../packages/core/js-sdk/src/types.ts", "qualifiedName": "__type.fetchCredentials" }, - "43254": { + "2185": { "sourceFileName": "../../../../packages/core/js-sdk/src/types.ts", "qualifiedName": "__type.storage" }, - "43255": { + "2186": { "sourceFileName": "../../../../packages/core/js-sdk/src/types.ts", "qualifiedName": "__type.logger" }, - "43256": { + "2187": { "sourceFileName": "../../../../packages/core/js-sdk/src/types.ts", "qualifiedName": "__type.debug" }, - "43257": { + "2188": { "sourceFileName": "../../../../packages/core/js-sdk/src/types.ts", "qualifiedName": "ClientFetch" }, - "43258": { + "2189": { "sourceFileName": "../../../../packages/core/js-sdk/src/types.ts", "qualifiedName": "__type" }, - "43259": { + "2190": { "sourceFileName": "../../../../packages/core/js-sdk/src/types.ts", "qualifiedName": "__type" }, - "43260": { + "2191": { "sourceFileName": "../../../../packages/core/js-sdk/src/types.ts", "qualifiedName": "input" }, - "43261": { + "2192": { "sourceFileName": "../../../../packages/core/js-sdk/src/types.ts", "qualifiedName": "init" }, - "43262": { + "2193": { "sourceFileName": "../../../../packages/core/js-sdk/src/types.ts", "qualifiedName": "Logger" }, - "43263": { + "2194": { "sourceFileName": "../../../../packages/core/js-sdk/src/types.ts", "qualifiedName": "__type" }, - "43264": { + "2195": { "sourceFileName": "../../../../packages/core/js-sdk/src/types.ts", "qualifiedName": "__type.error" }, - "43265": { + "2196": { "sourceFileName": "../../../../packages/core/js-sdk/src/types.ts", "qualifiedName": "__type" }, - "43266": { + "2197": { "sourceFileName": "../../../../packages/core/js-sdk/src/types.ts", "qualifiedName": "__type" }, - "43267": { + "2198": { "sourceFileName": "../../../../packages/core/js-sdk/src/types.ts", "qualifiedName": "messages" }, - "43268": { + "2199": { "sourceFileName": "../../../../packages/core/js-sdk/src/types.ts", "qualifiedName": "__type.warn" }, - "43269": { + "2200": { "sourceFileName": "../../../../packages/core/js-sdk/src/types.ts", "qualifiedName": "__type" }, - "43270": { + "2201": { "sourceFileName": "../../../../packages/core/js-sdk/src/types.ts", "qualifiedName": "__type" }, - "43271": { + "2202": { "sourceFileName": "../../../../packages/core/js-sdk/src/types.ts", "qualifiedName": "messages" }, - "43272": { + "2203": { "sourceFileName": "../../../../packages/core/js-sdk/src/types.ts", "qualifiedName": "__type.info" }, - "43273": { + "2204": { "sourceFileName": "../../../../packages/core/js-sdk/src/types.ts", "qualifiedName": "__type" }, - "43274": { + "2205": { "sourceFileName": "../../../../packages/core/js-sdk/src/types.ts", "qualifiedName": "__type" }, - "43275": { + "2206": { "sourceFileName": "../../../../packages/core/js-sdk/src/types.ts", "qualifiedName": "messages" }, - "43276": { + "2207": { "sourceFileName": "../../../../packages/core/js-sdk/src/types.ts", "qualifiedName": "__type.debug" }, - "43277": { + "2208": { "sourceFileName": "../../../../packages/core/js-sdk/src/types.ts", "qualifiedName": "__type" }, - "43278": { + "2209": { "sourceFileName": "../../../../packages/core/js-sdk/src/types.ts", "qualifiedName": "__type" }, - "43279": { + "2210": { "sourceFileName": "../../../../packages/core/js-sdk/src/types.ts", "qualifiedName": "messages" }, - "43280": { + "2211": { "sourceFileName": "../../../../packages/core/js-sdk/src/types.ts", "qualifiedName": "FetchArgs" }, - "43281": { + "2212": { "sourceFileName": "../../../../packages/core/js-sdk/src/types.ts", "qualifiedName": "__type" }, - "43282": { + "2213": { "sourceFileName": "../../../../packages/core/js-sdk/src/types.ts", "qualifiedName": "__type.query" }, - "43283": { + "2214": { "sourceFileName": "../../../../packages/core/js-sdk/src/types.ts", "qualifiedName": "__type.headers" }, - "43284": { + "2215": { "sourceFileName": "../../../../packages/core/js-sdk/src/types.ts", "qualifiedName": "__type.body" }, - "43285": { + "2216": { "sourceFileName": "../../../../packages/core/js-sdk/src/types.ts", "qualifiedName": "FetchStreamResponse" }, - "43286": { + "2217": { "sourceFileName": "../../../../packages/core/js-sdk/src/types.ts", "qualifiedName": "FetchStreamResponse.stream" }, - "43287": { + "2218": { "sourceFileName": "../../../../packages/core/js-sdk/src/types.ts", "qualifiedName": "FetchStreamResponse.abort" }, - "43288": { + "2219": { "sourceFileName": "../../../../packages/core/js-sdk/src/types.ts", "qualifiedName": "__type" }, - "43289": { + "2220": { "sourceFileName": "../../../../packages/core/js-sdk/src/types.ts", "qualifiedName": "__type" }, - "43290": { + "2221": { "sourceFileName": "../../../../packages/core/js-sdk/src/types.ts", "qualifiedName": "CustomStorage" }, - "43291": { + "2222": { "sourceFileName": "../../../../packages/core/js-sdk/src/types.ts", "qualifiedName": "CustomStorage.getItem" }, - "43292": { + "2223": { "sourceFileName": "../../../../packages/core/js-sdk/src/types.ts", "qualifiedName": "CustomStorage.getItem" }, - "43293": { + "2224": { "sourceFileName": "../../../../packages/core/js-sdk/src/types.ts", "qualifiedName": "key" }, - "43294": { + "2225": { "sourceFileName": "../../../../packages/core/js-sdk/src/types.ts", "qualifiedName": "CustomStorage.setItem" }, - "43295": { + "2226": { "sourceFileName": "../../../../packages/core/js-sdk/src/types.ts", "qualifiedName": "CustomStorage.setItem" }, - "43296": { + "2227": { "sourceFileName": "../../../../packages/core/js-sdk/src/types.ts", "qualifiedName": "key" }, - "43297": { + "2228": { "sourceFileName": "../../../../packages/core/js-sdk/src/types.ts", "qualifiedName": "value" }, - "43298": { + "2229": { "sourceFileName": "../../../../packages/core/js-sdk/src/types.ts", "qualifiedName": "CustomStorage.removeItem" }, - "43299": { + "2230": { "sourceFileName": "../../../../packages/core/js-sdk/src/types.ts", "qualifiedName": "CustomStorage.removeItem" }, - "43300": { + "2231": { "sourceFileName": "../../../../packages/core/js-sdk/src/types.ts", "qualifiedName": "key" }, - "43301": { + "2232": { "sourceFileName": "../../../../packages/core/js-sdk/src/types.ts", "qualifiedName": "FetchInput" }, - "43302": { + "2233": { "sourceFileName": "../../../../packages/core/js-sdk/src/types.ts", "qualifiedName": "ServerSentEventMessage" }, - "43303": { + "2234": { "sourceFileName": "../../../../packages/core/js-sdk/src/types.ts", "qualifiedName": "ServerSentEventMessage.comment" }, - "43304": { + "2235": { "sourceFileName": "../../../../packages/core/js-sdk/src/types.ts", "qualifiedName": "ServerSentEventMessage.event" }, - "43305": { + "2236": { "sourceFileName": "../../../../packages/core/js-sdk/src/types.ts", "qualifiedName": "ServerSentEventMessage.data" }, - "43306": { + "2237": { "sourceFileName": "../../../../packages/core/js-sdk/src/types.ts", "qualifiedName": "ServerSentEventMessage.id" }, - "43307": { + "2238": { "sourceFileName": "../../../../packages/core/js-sdk/src/types.ts", "qualifiedName": "ServerSentEventMessage.retry" }, - "43308": { + "2239": { "sourceFileName": "../../../../packages/core/js-sdk/src/types.ts", "qualifiedName": "Awaitable" }, - "43309": { + "2240": { "sourceFileName": "../../../../packages/core/js-sdk/src/types.ts", "qualifiedName": "T" }, - "43310": { + "2241": { "sourceFileName": "../../../../packages/core/js-sdk/src/types.ts", "qualifiedName": "FetchParams" } @@ -79033,9 +79211,9 @@ "3": "../../../../packages/core/js-sdk/src/store/index.ts" }, "reflections": { - "1": 41070, - "2": 41118, - "3": 41163 + "1": 1, + "2": 49, + "3": 94 } } }