diff --git a/.changeset/sixty-kids-divide.md b/.changeset/sixty-kids-divide.md new file mode 100644 index 0000000000..734f5865d2 --- /dev/null +++ b/.changeset/sixty-kids-divide.md @@ -0,0 +1,5 @@ +--- +"@medusajs/oas-github-ci": patch +--- + +feat(oas-github-ci): output specs into `specs-v2` directory when the `--v2` option is passed diff --git a/.vale.ini b/.vale.ini index bb325eb837..7def440957 100644 --- a/.vale.ini +++ b/.vale.ini @@ -12,6 +12,7 @@ write-good.E-Prime=No write-good.So=No write-good.ThereIs=No Vale.Terms=No +BlockIgnores={/\* [\s\S]+ \*/} [formats] mdx = md \ No newline at end of file diff --git a/docs-util/oas-output/base-v2/admin.oas.base.yaml b/docs-util/oas-output/base-v2/admin.oas.base.yaml index 27870b55e5..01289e50e9 100644 --- a/docs-util/oas-output/base-v2/admin.oas.base.yaml +++ b/docs-util/oas-output/base-v2/admin.oas.base.yaml @@ -1,6 +1,6 @@ openapi: 3.0.0 info: - version: 1.0.0 + version: 2.0.0 title: Medusa Admin API license: name: MIT diff --git a/docs-util/oas-output/base-v2/store.oas.base.yaml b/docs-util/oas-output/base-v2/store.oas.base.yaml index fa2ab873f3..5eef2be5c3 100644 --- a/docs-util/oas-output/base-v2/store.oas.base.yaml +++ b/docs-util/oas-output/base-v2/store.oas.base.yaml @@ -1,6 +1,6 @@ openapi: 3.0.0 info: - version: 1.0.0 + version: 2.0.0 title: Medusa Storefront API license: name: MIT diff --git a/docs-util/packages/docblock-generator/src/classes/kinds/oas.ts b/docs-util/packages/docblock-generator/src/classes/kinds/oas.ts index 8a810afeb5..76ef0cf79a 100644 --- a/docs-util/packages/docblock-generator/src/classes/kinds/oas.ts +++ b/docs-util/packages/docblock-generator/src/classes/kinds/oas.ts @@ -28,7 +28,7 @@ import OasSchemaHelper from "../helpers/oas-schema.js" import formatOas from "../../utils/format-oas.js" import { DEFAULT_OAS_RESPONSES } from "../../constants.js" -export const API_ROUTE_PARAM_REGEX = /\[(.+)\]/g +export const API_ROUTE_PARAM_REGEX = /\[(.+?)\]/g const RES_STATUS_REGEX = /^res[\s\S]*\.status\((\d+)\)/ type SchemaDescriptionOptions = { @@ -112,9 +112,12 @@ class OasKindGenerator extends FunctionKindGenerator { // and the second of type `MedusaResponse` return ( (functionNode.parameters.length === 2 && - functionNode.parameters[0].type + (functionNode.parameters[0].type ?.getText() - .startsWith("MedusaRequest") && + .startsWith("MedusaRequest") || + functionNode.parameters[0].type + ?.getText() + .startsWith("AuthenticatedMedusaRequest")) && functionNode.parameters[1].type ?.getText() .startsWith("MedusaResponse")) || @@ -988,26 +991,32 @@ class OasKindGenerator extends FunctionKindGenerator { */ tagName?: string }): OpenAPIV3.ParameterObject[] { - const pathParameters = API_ROUTE_PARAM_REGEX.exec(oasPath)?.slice(1) + // reset regex manually + API_ROUTE_PARAM_REGEX.lastIndex = 0 + let pathParameters: string[] | undefined const parameters: OpenAPIV3.ParameterObject[] = [] - - if (pathParameters?.length) { - pathParameters.forEach((parameter) => - parameters.push( - this.getParameterObject({ - type: "path", - name: parameter, - description: this.getSchemaDescription({ - typeStr: parameter, - parentName: tagName, - }), - required: true, - schema: { - type: "string", - }, - }) + while ( + (pathParameters = API_ROUTE_PARAM_REGEX.exec(oasPath)?.slice(1)) !== + undefined + ) { + if (pathParameters.length) { + pathParameters.forEach((parameter) => + parameters.push( + this.getParameterObject({ + type: "path", + name: parameter, + description: this.getSchemaDescription({ + typeStr: parameter, + parentName: tagName, + }), + required: true, + schema: { + type: "string", + }, + }) + ) ) - ) + } } return parameters diff --git a/docs-util/packages/typedoc-config/_merger.js b/docs-util/packages/typedoc-config/_merger.js index c9d4f8eda7..68cca03c80 100644 --- a/docs-util/packages/typedoc-config/_merger.js +++ b/docs-util/packages/typedoc-config/_merger.js @@ -71,10 +71,8 @@ module.exports = { showCommentsAsHeader: true, sections: baseSectionsOptions, parameterStyle: "component", - parameterComponent: "ParameterTypes", - mdxImports: [ - `import ParameterTypes from "@site/src/components/ParameterTypes"`, - ], + parameterComponent: "TypeList", + mdxImports: [`import TypeList from "@site/src/components/TypeList"`], }, internal: { maxLevel: 1, @@ -231,7 +229,7 @@ npx medusa develop reflectionTitle: { kind: false, typeParameters: false, - suffix: " Reference", + suffix: "Reference", }, }, @@ -638,7 +636,7 @@ npx medusa develop reflectionTitle: { kind: false, typeParameters: false, - suffix: " Reference", + suffix: "Reference", }, }, @@ -681,7 +679,7 @@ npx medusa develop reflectionTitle: { kind: false, typeParameters: false, - suffix: " Reference", + suffix: "Reference", }, }, @@ -780,7 +778,7 @@ npx medusa develop reflectionTitle: { kind: false, typeParameters: false, - suffix: " Reference", + suffix: "Reference", }, }, diff --git a/docs-util/packages/typedoc-plugin-custom/src/index.ts b/docs-util/packages/typedoc-plugin-custom/src/index.ts index 7935febf0a..702e45b2d3 100644 --- a/docs-util/packages/typedoc-plugin-custom/src/index.ts +++ b/docs-util/packages/typedoc-plugin-custom/src/index.ts @@ -5,6 +5,7 @@ import { load as parseOasSchemaPlugin } from "./parse-oas-schema-plugin" import { load as apiIgnorePlugin } from "./api-ignore" import { load as eslintExamplePlugin } from "./eslint-example" import { load as signatureModifierPlugin } from "./signature-modifier" +import { MermaidDiagramGenerator } from "./mermaid-diagram-generator" import { load as parentIgnorePlugin } from "./parent-ignore" import { GenerateNamespacePlugin } from "./generate-namespace" @@ -18,4 +19,5 @@ export function load(app: Application) { parentIgnorePlugin(app) new GenerateNamespacePlugin(app) + new MermaidDiagramGenerator(app) } diff --git a/docs-util/packages/typedoc-plugin-custom/src/mermaid-diagram-generator.ts b/docs-util/packages/typedoc-plugin-custom/src/mermaid-diagram-generator.ts new file mode 100644 index 0000000000..6158bf6b2d --- /dev/null +++ b/docs-util/packages/typedoc-plugin-custom/src/mermaid-diagram-generator.ts @@ -0,0 +1,302 @@ +import path from "path" +import { + Application, + Comment, + Context, + Converter, + DeclarationReflection, + ParameterType, + ReferenceType, + Reflection, + ReflectionKind, + TypeDocOptionMap, +} from "typedoc" +import ts from "typescript" + +type RelationType = + | "one-to-one" + | "one-to-many" + | "many-to-one" + | "many-to-many" + +type Relations = Map< + string, + { + target: string + left: RelationType + right?: RelationType + name: string + }[] +> + +type PluginOptions = Pick< + TypeDocOptionMap, + "generateModelsDiagram" | "diagramAddToFile" +> + +export class MermaidDiagramGenerator { + private app: Application + private options?: PluginOptions + private mainFileReflection?: Reflection + + constructor(app: Application) { + this.app = app + this.app.options.addDeclaration({ + name: "generateModelsDiagram", + help: "Whether to generate a Mermaid.js class diagram for data models in the reference.", + type: ParameterType.Boolean, + defaultValue: false, + }) + this.app.options.addDeclaration({ + name: "diagramAddToFile", + help: "The file to add the mermaid diagram to. The diagram is added as a package comment.", + type: ParameterType.String, + }) + app.converter.on( + Converter.EVENT_CREATE_DECLARATION, + this.setMainFile.bind(this) + ) + app.converter.on( + Converter.EVENT_RESOLVE_BEGIN, + this.findRelations.bind(this) + ) + } + + getPluginOptions(): PluginOptions { + if (this.options) { + return this.options + } + + this.options = { + generateModelsDiagram: this.app.options.getValue("generateModelsDiagram"), + diagramAddToFile: this.app.options.getValue("diagramAddToFile"), + } + + return this.options + } + + setMainFile(context: Context) { + const options = this.getPluginOptions() + if ( + this.mainFileReflection || + !options.generateModelsDiagram || + !options.diagramAddToFile + ) { + return + } + + const mainFilePath = options.diagramAddToFile.startsWith("packages") + ? path.resolve("..", "..", "..", options.diagramAddToFile) + : options.diagramAddToFile + + const mainFileSource = context.program.getSourceFile(mainFilePath) + if (!mainFileSource) { + // console.error( + // `Couldn't fine the main source file ${options.diagramAddToFile}` + // ) + return + } + const mainFileSymbol = context.checker.getSymbolAtLocation(mainFileSource) + if (!mainFileSymbol) { + // console.error(`Couldn't fine the main file's symbol`) + return + } + + this.mainFileReflection = + context.project.getReflectionFromSymbol(mainFileSymbol) + + if (!this.mainFileReflection) { + // console.error(`Couldn't fine the main file's reflection`) + } + } + + findRelations(context: Context) { + const options = this.getPluginOptions() + if ( + !this.mainFileReflection || + !options.generateModelsDiagram || + !options.diagramAddToFile + ) { + return + } + + const relations: Relations = new Map() + + for (const reflection of context.project.getReflectionsByKind( + ReflectionKind.Class + )) { + if (!(reflection instanceof DeclarationReflection)) { + return + } + + // find relations of that reflection + reflection.children?.forEach((child) => { + let referenceType: ReferenceType | undefined + // check that the child field references another reflection + if (child.type?.type === "reference") { + referenceType = child.type + } else if (child.type?.type === "union") { + referenceType = child.type.types.find( + (unionType) => unionType.type === "reference" + ) as ReferenceType + } + + if (!referenceType) { + return + } + + // If type is Collection from mikro-orm, get the type argument's reflection + // otherwise, use the reflection as-is + const targetReflection = + this.isMikroOrmCollection(referenceType) && + referenceType.typeArguments?.length && + referenceType.typeArguments[0].type === "reference" && + referenceType.typeArguments[0].reflection + ? referenceType.typeArguments[0].reflection + : referenceType.reflection + + if (!targetReflection) { + return + } + + // if entry already exists in relation, don't add anything + const exists = + relations + .get(reflection.name) + ?.some((relation) => relation.target === targetReflection.name) || + relations + .get(targetReflection.name) + ?.some((relation) => relation.target === reflection.name) + + if (exists) { + return + } + + // figure out relation type from decorators + const relationType = this.getRelationFromDecorators( + this.getReflectionDecorators(context, child) + ) + if (!relationType) { + return + } + + if (!relations.has(reflection.name)) { + relations.set(reflection.name, []) + } + relations.get(reflection.name)?.push({ + target: targetReflection.name, + left: relationType, + right: this.getReverseRelationType(relationType), + name: child.name, + }) + }) + } + + if (!relations.size) { + return + } + + this.mainFileReflection.comment = new Comment([ + { + text: "## Relations Overview\n\n", + kind: "text", + }, + { + text: this.buildMermaidDiagram(relations), + kind: "code", + }, + ]) + } + + isMikroOrmCollection(referenceType: ReferenceType) { + return ( + referenceType.name === "Collection" && + referenceType.package?.includes("@mikro-orm") + ) + } + + getReflectionDecorators(context: Context, reflection: Reflection): string[] { + const symbol = context.project.getSymbolFromReflection(reflection) + const decorators: string[] = [] + + symbol?.declarations?.forEach((declaration) => { + const modifiers = + "modifiers" in declaration && declaration.modifiers + ? (declaration.modifiers as ts.NodeArray) + : [] + + modifiers.forEach((modifier) => { + if (!ts.isDecorator(modifier)) { + return + } + + ;(modifier as ts.Decorator).forEachChild((childNode) => { + if (!ts.isCallExpression(childNode)) { + return + } + + const childNodeExpression = (childNode as ts.CallExpression) + .expression + if (!ts.isIdentifier(childNodeExpression)) { + return + } + + decorators.push(childNodeExpression.escapedText.toString()) + }) + }) + }) + + return decorators + } + + getRelationFromDecorators(decorators: string[]): RelationType | undefined { + switch (true) { + case decorators.includes("OneToOne"): + return "one-to-one" + case decorators.includes("OneToMany"): + return "one-to-many" + case decorators.includes("ManyToOne"): + return "many-to-one" + case decorators.includes("ManyToMany"): + return "many-to-many" + } + } + + getReverseRelationType(relationType: RelationType): RelationType { + return relationType.split("-").reverse().join("-") as RelationType + } + + buildMermaidDiagram(relations: Relations): string { + const linePrefix = `\t` + const lineSuffix = `\n` + let diagram = `erDiagram${lineSuffix}` + relations.forEach((itemRelations, itemName) => { + itemRelations.forEach((itemRelation) => { + diagram += `${linePrefix}${itemName} ${this.getRelationTypeSymbol( + itemRelation.left, + "left" + )}--${this.getRelationTypeSymbol(itemRelation.right!, "right")} ${ + itemRelation.target + } : ${itemRelation.name}${lineSuffix}` + }) + }) + + return "```mermaid\n" + diagram + "\n```" + } + + getRelationTypeSymbol( + relationType: RelationType, + direction: "left" | "right" + ): string { + switch (relationType) { + case "one-to-one": + return "||" + case "one-to-many": + return direction === "left" ? "||" : "|{" + case "many-to-many": + return direction === "left" ? "}|" : "|{" + case "many-to-one": + return direction === "left" ? "}|" : "||" + } + } +} diff --git a/docs-util/packages/typedoc-plugin-markdown-medusa/src/utils/format-parameter-component.ts b/docs-util/packages/typedoc-plugin-markdown-medusa/src/utils/format-parameter-component.ts index e73b6684ef..9e09de0fb9 100644 --- a/docs-util/packages/typedoc-plugin-markdown-medusa/src/utils/format-parameter-component.ts +++ b/docs-util/packages/typedoc-plugin-markdown-medusa/src/utils/format-parameter-component.ts @@ -54,7 +54,7 @@ export function formatParameterComponent({ } // reorder component items to show required items first componentItems = sortComponentItems(componentItems) - return `<${parameterComponent} parameters={${JSON.stringify( + return `<${parameterComponent} types={${JSON.stringify( componentItems )}} ${extraPropsArr.join(" ")} sectionTitle="${sectionTitle}"/>` } diff --git a/docs-util/packages/types/lib/index.d.ts b/docs-util/packages/types/lib/index.d.ts index b4bc846124..b10ce9747a 100644 --- a/docs-util/packages/types/lib/index.d.ts +++ b/docs-util/packages/types/lib/index.d.ts @@ -217,5 +217,13 @@ export declare module "typedoc" { * @defaultValue false */ checkVariables: boolean + /** + * Whether to generate a Mermaid.js class diagram for data models in the reference. + */ + generateModelsDiagram: boolean + /** + * The file to add the mermaid diagram to. The diagram is added as a package comment. + */ + diagramAddToFile: string } } diff --git a/packages/oas/oas-github-ci/scripts/build-openapi.js b/packages/oas/oas-github-ci/scripts/build-openapi.js index d839e3a8b8..1c97cef9ad 100755 --- a/packages/oas/oas-github-ci/scripts/build-openapi.js +++ b/packages/oas/oas-github-ci/scripts/build-openapi.js @@ -10,7 +10,8 @@ const withFullFile = process.argv.indexOf("--with-full-file") !== -1 const v2 = process.argv.indexOf("--v2") !== -1 const basePath = path.resolve(__dirname, `../`) const repoRootPath = path.resolve(basePath, `../../../`) -const docsApiPath = path.resolve(repoRootPath, "www/apps/api-reference/specs") +const docsApiPath = v2 ? path.resolve(repoRootPath, "www/apps/api-reference/specs-v2") : + path.resolve(repoRootPath, "www/apps/api-reference/specs") const run = async () => { const oasOutDir = isDryRun ? await getTmpDirectory() : docsApiPath diff --git a/www/apps/api-reference/.env.sample b/www/apps/api-reference/.env.sample index 095df1ea60..986827f092 100644 --- a/www/apps/api-reference/.env.sample +++ b/www/apps/api-reference/.env.sample @@ -11,4 +11,5 @@ NEXT_PUBLIC_UI_URL= ALGOLIA_WRITE_API_KEY= NEXT_PUBLIC_AI_ASSISTANT_URL= NEXT_PUBLIC_AI_WEBSITE_ID= -NEXT_PUBLIC_AI_API_ASSISTANT_RECAPTCHA_SITE_KEY= \ No newline at end of file +NEXT_PUBLIC_AI_API_ASSISTANT_RECAPTCHA_SITE_KEY= +NEXT_PUBLIC_VERSIONING= \ No newline at end of file diff --git a/www/apps/api-reference/.eslintrc.js b/www/apps/api-reference/.eslintrc.js index e7efd6f654..44c231a8d4 100644 --- a/www/apps/api-reference/.eslintrc.js +++ b/www/apps/api-reference/.eslintrc.js @@ -7,5 +7,5 @@ module.exports = { next: { rootDir: ".", }, - }, + } } diff --git a/www/apps/api-reference/app/_mdx/admin.mdx b/www/apps/api-reference/app/_mdx/admin.mdx index 3f89a47ad1..f2b8b0ba0d 100644 --- a/www/apps/api-reference/app/_mdx/admin.mdx +++ b/www/apps/api-reference/app/_mdx/admin.mdx @@ -1,9 +1,12 @@ -import { Feedback, CodeTabs } from "docs-ui" +import { Feedback, CodeTabs, CodeTab } from "docs-ui" import SectionContainer from "@/components/Section/Container" import formatReportLink from "@/utils/format-report-link" +import VersionNote from "@/components/VersionNote" + + This API reference includes Medusa's Admin APIs, which are REST APIs exposed by the Medusa backend. They are typically used to perform admin functionalities or create an admin dashboard to access and manipulate your commerce store's data. All API Routes are prefixed with `/admin`. So, during development, the API Routes will be available under the path `http://localhost:9000/admin`. For production, replace `http://localhost:9000` with your Medusa backend URL. @@ -42,62 +45,57 @@ Use a user's API Token to send authenticated requests. You can use the Update User API Route to add or update the user's API token: - { - console.log(user.api_token) -})`, - lang: `ts`, - } - }, - { - label: 'Medusa React', - value: 'medusa-react', - code: { - source: `import { useAdminUpdateUser } from "medusa-react" - -const UpdateUser = () => { - const updateUser = useAdminUpdateUser(userId) - // ... - - const handleUpdateUser = () => { - updateUser.mutate({ + + + + ```ts + import Medusa from "@medusajs/medusa-js" + const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) + // must be previously logged in or use api token + medusa.admin.users.update(userId, { api_token }) - } + .then(({ user }) => { + console.log(user.api_token) + }) + ``` - // ... -} + + + + ```tsx + import { useAdminUpdateUser } from "medusa-react" -export default UpdateUser`, - lang: `tsx`, - } - }, - { - label: 'cURL', - value: 'curl', - code: { - source: `curl -L -X POST '/admin/users/' \\ --H 'Cookie: connect.sid={sid}' \\ --H 'Content-Type: application/json' \\ ---data-raw '{ - "api_token": "{api_token}" -}'`, - lang: `bash`, + const UpdateUser = () => { + const updateUser = useAdminUpdateUser(userId) + // ... + + const handleUpdateUser = () => { + updateUser.mutate({ + api_token + }) } + + // ... } - ]} -/> + + export default UpdateUser + ``` + + + + + ```bash + curl -L -X POST '/admin/users/' \\ + -H 'Cookie: connect.sid={sid}' \\ + -H 'Content-Type: application/json' \\ + --data-raw '{ + "api_token": "{api_token}" + }' + ``` + + + #### How to Use the API Token @@ -111,35 +109,31 @@ x-medusa-access-token: {api_token} You can also pass it to client libraries: - - {/* ... */} -`, - lang: `tsx`, - } - } - ]} -/> + + + + ```ts + const medusa = new Medusa({ + baseUrl: MEDUSA_BACKEND_URL, + maxRetries: 3, + apiKey: '{api_token}' + }) + ``` + + + + + ```tsx + + {/* ... */} + + ``` + + + { - console.log(products.length); -});`, - lang: `ts`, - } - }, - { - label: 'Medusa React', - value: 'medusa-react', - code: { - source: `import { useAdminProducts } from "medusa-react" + + + + ```bash + curl "http://localhost:9000/admin/products?expand=collection" \ + -H 'x-medusa-access-token: {api_token}' + ``` -const Products = () => { - const { products, isLoading } = useAdminProducts({ - expand: "collection" - }) + + + + ```ts + import Medusa from "@medusajs/medusa-js" + const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) + // must be previously logged in or use api token + medusa.admin.products.list({ + expand: "collection" + }) + .then(({ products, limit, offset, count }) => { + console.log(products.length); + }); + ``` - return ( -
- {/** ... **/} -
- ) -} +
+ + + ```tsx + import { useAdminProducts } from "medusa-react" -export default Products`, - lang: `tsx`, - } + const Products = () => { + const { products, isLoading } = useAdminProducts({ + expand: "collection" + }) + + return ( +
+ {/** ... **/} +
+ ) } - ]} -/> + + export default Products + ``` + +
+
### Expanding Multiple Relations @@ -409,57 +397,52 @@ You can expand more than one relation by separating the relations in the For example, to retrieve both the variants and the collection of products, pass to the `expand` query parameter the value `variants,collection`: - { - console.log(products.length); -});`, - lang: `ts`, - } - }, - { - label: 'Medusa React', - value: 'medusa-react', - code: { - source: `import { useAdminProducts } from "medusa-react" + + + + ```bash + curl "http://localhost:9000/admin/products?expand=variants,collection" \ + -H 'x-medusa-access-token: {api_token}' + ``` -const Products = () => { - const { products, isLoading } = useAdminProducts({ - expand: "variants,collection" - }) + + + + ```ts + import Medusa from "@medusajs/medusa-js" + const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) + // must be previously logged in or use api token + medusa.admin.products.list({ + expand: "variants,collection" + }) + .then(({ products, limit, offset, count }) => { + console.log(products.length); + }); + ``` - return ( -
- {/** ... **/} -
- ) -} +
+ + + ```tsx + import { useAdminProducts } from "medusa-react" -export default Products`, - lang: `tsx`, - } + const Products = () => { + const { products, isLoading } = useAdminProducts({ + expand: "variants,collection" + }) + + return ( +
+ {/** ... **/} +
+ ) } - ]} -/> + + export default Products + ``` + +
+
### Prevent Expanding Relations @@ -471,57 +454,52 @@ an empty expand value to retrieve an entity without any extra relations. For example: - { - console.log(products.length); -});`, - lang: `ts`, - } - }, - { - label: 'Medusa React', - value: 'medusa-react', - code: { - source: `import { useAdminProducts } from "medusa-react" + + + + ```bash + curl "http://localhost:9000/admin/products?expand" \ + -H 'x-medusa-access-token: {api_token}' + ``` -const Products = () => { - const { products, isLoading } = useAdminProducts({ - expand: "" - }) + + + + ```ts + import Medusa from "@medusajs/medusa-js" + const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) + // must be previously logged in or use api token + medusa.admin.products.list({ + expand: "" + }) + .then(({ products, limit, offset, count }) => { + console.log(products.length); + }); + ``` - return ( -
- {/** ... **/} -
- ) -} +
+ + + ```tsx + import { useAdminProducts } from "medusa-react" -export default Products`, - lang: `tsx`, - } + const Products = () => { + const { products, isLoading } = useAdminProducts({ + expand: "" + }) + + return ( +
+ {/** ... **/} +
+ ) } - ]} -/> + + export default Products + ``` + +
+
This would retrieve each product with only its properties, without any @@ -565,57 +543,52 @@ For example, when you retrieve a list of products, you can retrieve only the titles of the products by passing `title` as a value to the `fields` query parameter: - { - console.log(products.length); -});`, - lang: `ts`, - } - }, - { - label: 'Medusa React', - value: 'medusa-react', - code: { - source: `import { useAdminProducts } from "medusa-react" + + + + ```bash + curl "http://localhost:9000/admin/products?fields=title" \ + -H 'x-medusa-access-token: {api_token}' + ``` -const Products = () => { - const { products, isLoading } = useAdminProducts({ - fields: "title" - }) + + + + ```ts + import Medusa from "@medusajs/medusa-js" + const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) + // must be previously logged in or use api token + medusa.admin.products.list({ + fields: "title" + }) + .then(({ products, limit, offset, count }) => { + console.log(products.length); + }); + ``` - return ( -
- {/** ... **/} -
- ) -} +
+ + + ```tsx + import { useAdminProducts } from "medusa-react" -export default Products`, - lang: `tsx`, - } + const Products = () => { + const { products, isLoading } = useAdminProducts({ + fields: "title" + }) + + return ( +
+ {/** ... **/} +
+ ) } - ]} -/> + + export default Products + ``` + +
+
As mentioned above, the expanded relations such as `variants` will still be @@ -625,59 +598,54 @@ returned as they're not affected by the `fields` parameter. You can ensure that only the `title` field is returned by passing an empty value to the `expand` query parameter. For example: - { - console.log(products.length); -});`, - lang: `ts`, - } - }, - { - label: 'Medusa React', - value: 'medusa-react', - code: { - source: `import { useAdminProducts } from "medusa-react" + + + + ```bash + curl "http://localhost:9000/admin/products?fields=title&expand" \ + -H 'x-medusa-access-token: {api_token}' + ``` -const Products = () => { - const { products, isLoading } = useAdminProducts({ - fields: "title", - expand: "" - }) + + + + ```ts + import Medusa from "@medusajs/medusa-js" + const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) + // must be previously logged in or use api token + medusa.admin.products.list({ + fields: "title", + expand: "" + }) + .then(({ products, limit, offset, count }) => { + console.log(products.length); + }); + ``` - return ( -
- {/** ... **/} -
- ) -} +
+ + + ```tsx + import { useAdminProducts } from "medusa-react" -export default Products`, - lang: `tsx`, - } + const Products = () => { + const { products, isLoading } = useAdminProducts({ + fields: "title", + expand: "" + }) + + return ( +
+ {/** ... **/} +
+ ) } - ]} -/> + + export default Products + ``` + +
+
### Selecting Multiple Fields @@ -689,57 +657,52 @@ You can pass more than one field by seperating the field names in the For example, to select the `title` and `handle` of products: - { - console.log(products.length); -});`, - lang: `ts`, - } - }, - { - label: 'Medusa React', - value: 'medusa-react', - code: { - source: `import { useAdminProducts } from "medusa-react" + + + + ```bash + curl "http://localhost:9000/admin/products?fields=title,handle" \ + -H 'x-medusa-access-token: {api_token}' + ``` -const Products = () => { - const { products, isLoading } = useAdminProducts({ - fields: "title,handle" - }) + + + + ```ts + import Medusa from "@medusajs/medusa-js" + const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) + // must be previously logged in or use api token + medusa.admin.products.list({ + fields: "title,handle" + }) + .then(({ products, limit, offset, count }) => { + console.log(products.length); + }); + ``` - return ( -
- {/** ... **/} -
- ) -} +
+ + + ```tsx + import { useAdminProducts } from "medusa-react" -export default Products`, - lang: `tsx`, - } + const Products = () => { + const { products, isLoading } = useAdminProducts({ + fields: "title,handle" + }) + + return ( +
+ {/** ... **/} +
+ ) } - ]} -/> + + export default Products + ``` + +
+
### Retrieve Only the ID @@ -748,115 +711,105 @@ export default Products`, You can pass an empty `fields` query parameter to return only the ID of an entity. For example: - { - console.log(products.length); -});`, - lang: `ts`, - } - }, - { - label: 'Medusa React', - value: 'medusa-react', - code: { - source: `import { useAdminProducts } from "medusa-react" + + + + ```bash + curl "http://localhost:9000/admin/products?fields" \ + -H 'x-medusa-access-token: {api_token}' + ``` -const Products = () => { - const { products, isLoading } = useAdminProducts({ - fields: "" - }) + + + + ```ts + import Medusa from "@medusajs/medusa-js" + const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) + // must be previously logged in or use api token + medusa.admin.products.list({ + fields: "" + }) + .then(({ products, limit, offset, count }) => { + console.log(products.length); + }); + ``` - return ( -
- {/** ... **/} -
- ) -} +
+ + + ```tsx + import { useAdminProducts } from "medusa-react" -export default Products`, - lang: `tsx`, - } + const Products = () => { + const { products, isLoading } = useAdminProducts({ + fields: "" + }) + + return ( +
+ {/** ... **/} +
+ ) } - ]} -/> + + export default Products + ``` + +
+
You can also pair with an empty `expand` query parameter to ensure that the relations aren't retrieved as well. For example: - { - console.log(products.length); -});`, - lang: `ts`, - } - }, - { - label: 'Medusa React', - value: 'medusa-react', - code: { - source: `import { useAdminProducts } from "medusa-react" + + + + ```bash + curl "http://localhost:9000/admin/products?fields&expand" \ + -H 'x-medusa-access-token: {api_token}' + ``` -const Products = () => { - const { products, isLoading } = useAdminProducts({ - fields: "", - expand: "" - }) + + + + ```ts + import Medusa from "@medusajs/medusa-js" + const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) + // must be previously logged in or use api token + medusa.admin.products.list({ + fields: "", + expand: "" + }) + .then(({ products, limit, offset, count }) => { + console.log(products.length); + }); + ``` - return ( -
- {/** ... **/} -
- ) -} +
+ + + ```tsx + import { useAdminProducts } from "medusa-react" -export default Products`, - lang: `tsx`, - } + const Products = () => { + const { products, isLoading } = useAdminProducts({ + fields: "", + expand: "" + }) + + return ( +
+ {/** ... **/} +
+ ) } - ]} -/> + + export default Products + ``` + +
+
{ - console.log(products.length); -});`, - lang: `ts`, - } - }, - { - label: 'Medusa React', - value: 'medusa-react', - code: { - source: `import { useAdminProducts } from "medusa-react" + + + + ```bash + curl "http://localhost:9000/admin/products?limit=5" \ + -H 'x-medusa-access-token: {api_token}' + ``` -const Products = () => { - const { products, isLoading } = useAdminProducts({ - limit: 5 - }) + + + + ```ts + import Medusa from "@medusajs/medusa-js" + const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) + // must be previously logged in or use api token + medusa.admin.products.list({ + limit: 5 + }) + .then(({ products, limit, offset, count }) => { + console.log(products.length); + }); + ``` - return ( -
- {/** ... **/} -
- ) -} +
+ + + ```tsx + import { useAdminProducts } from "medusa-react" -export default Products`, - lang: `tsx`, - } + const Products = () => { + const { products, isLoading } = useAdminProducts({ + limit: 5 + }) + + return ( +
+ {/** ... **/} +
+ ) } - ]} -/> + + export default Products + ``` + +
+
### Response Fields @@ -1116,113 +1064,103 @@ sort the retrieved items by an attribute of that item. For example, you can sort products by their `created_at` attribute by setting `order` to `created_at`: - { - console.log(products.length); -});`, - lang: `ts`, - } - }, - { - label: 'Medusa React', - value: 'medusa-react', - code: { - source: `import { useAdminProducts } from "medusa-react" + + + + ```bash + curl "http://localhost:9000/admin/products?order=created_at" \ + -H 'x-medusa-access-token: {api_token}' + ``` -const Products = () => { - const { products, isLoading } = useAdminProducts({ - order: "created_at" - }) + + + + ```ts + import Medusa from "@medusajs/medusa-js" + const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) + // must be previously logged in or use api token + medusa.admin.products.list({ + order: "created_at" + }) + .then(({ products, limit, offset, count }) => { + console.log(products.length); + }); + ``` - return ( -
- {/** ... **/} -
- ) -} +
+ + + ```tsx + import { useAdminProducts } from "medusa-react" -export default Products`, - lang: `tsx`, - } + const Products = () => { + const { products, isLoading } = useAdminProducts({ + order: "created_at" + }) + + return ( +
+ {/** ... **/} +
+ ) } - ]} -/> + + export default Products + ``` + +
+
By default, the sort direction will be ascending. To change it to descending, pass a dash (`-`) before the attribute name. For example: - { - console.log(products.length); -});`, - lang: `ts`, - } - }, - { - label: 'Medusa React', - value: 'medusa-react', - code: { - source: `import { useAdminProducts } from "medusa-react" + + + + ```bash + curl "http://localhost:9000/admin/products?order=-created_at" \ + -H 'x-medusa-access-token: {api_token}' + ``` -const Products = () => { - const { products, isLoading } = useAdminProducts({ - order: "-created_at" - }) + + + + ```ts + import Medusa from "@medusajs/medusa-js" + const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) + // must be previously logged in or use api token + medusa.admin.products.list({ + order: "-created_at" + }) + .then(({ products, limit, offset, count }) => { + console.log(products.length); + }); + ``` - return ( -
- {/** ... **/} -
- ) -} +
+ + + ```tsx + import { useAdminProducts } from "medusa-react" -export default Products`, - lang: `tsx`, - } + const Products = () => { + const { products, isLoading } = useAdminProducts({ + order: "-created_at" + }) + + return ( +
+ {/** ... **/} +
+ ) } - ]} -/> + + export default Products + ``` + +
+
This sorts the products by their `created_at` attribute in the descending diff --git a/www/apps/api-reference/app/_mdx/client-libraries.mdx b/www/apps/api-reference/app/_mdx/client-libraries.mdx index 92150927d1..bbaa99b23d 100644 --- a/www/apps/api-reference/app/_mdx/client-libraries.mdx +++ b/www/apps/api-reference/app/_mdx/client-libraries.mdx @@ -1,4 +1,4 @@ -import { CodeTabs } from "docs-ui" +import { CodeTabs, CodeTab } from "docs-ui" import Space from "@/components/Space" import DownloadFull from "@/components/DownloadFull" @@ -10,26 +10,22 @@ Check out the [quickstart guide](https://docs.medusajs.com/create-medusa-app). ### Client Libraries - + + + + ```bash + npm install @medusajs/medusa-js + ``` + + + + + ```bash + npm install medusa-react @tanstack/react-query @medusajs/medusa + ``` + + + ### Download Full Reference diff --git a/www/apps/api-reference/app/_mdx/store.mdx b/www/apps/api-reference/app/_mdx/store.mdx index 567d9b9f91..225d78ada8 100644 --- a/www/apps/api-reference/app/_mdx/store.mdx +++ b/www/apps/api-reference/app/_mdx/store.mdx @@ -1,10 +1,13 @@ -import { Feedback, CodeTabs } from "docs-ui" +import { Feedback, CodeTabs, CodeTab } from "docs-ui" import SectionContainer from "@/components/Section/Container" import formatReportLink from "@/utils/format-report-link" +import VersionNote from "@/components/VersionNote" + + This API reference includes Medusa's Store APIs, which are REST APIs exposed by the Medusa backend. They are typically used to create a storefront for your commerce store, such as a webshop or a commerce mobile app. All API Routes are prefixed with `/store`. So, during development, the API Routes will be available under the path `http://localhost:9000/store`. For production, replace `http://localhost:9000` with your Medusa backend URL. @@ -155,7 +158,7 @@ You can learn more about publishable API keys and how to use them in [this docum ### How to Create a Publishable API Key You can create a publishable API key either using the [admin REST APIs](https://docs.medusajs.com/development/publishable-api-keys/admin/manage-publishable-api-keys), -or using the [Medusa admin dashboard](https://docs.medusajs.com/user-guide/settings/publishable-api-keys). +or using the [Medusa Admin](https://docs.medusajs.com/user-guide/settings/publishable-api-keys). ### How to Use a Publishable API Key @@ -168,45 +171,41 @@ x-publishable-api-key: {your_publishable_api_key} If you're using Medusa's JS or Medusa React clients, you can pass the publishable API key when you first initialize either clients. Then, the publishable API key will be automatically included in all your requests: - + + + ```ts + const medusa = new Medusa({ + maxRetries: 3, + baseUrl: "https://api.example.com", + publishableApiKey, + }) + ``` -// define query client... + + + + ```tsx + import { MedusaProvider } from "medusa-react" -const App = () => { - return ( - - - - ) -}`, - lang: `tsx`, - } - }, - ]} -/> + // define query client... + + const App = () => { + return ( + + + + ) + } + ``` + + + { - console.log(products.length); -});`, - lang: `ts`, - } - }, - { - label: 'Medusa React', - value: 'medusa-react', - code: { - source: `import { useProducts } from "medusa-react" + + + + ```bash + curl "http://localhost:9000/store/products?expand=collection" + ``` -const Products = () => { - const { products, isLoading } = useProducts({ - expand: "collection" - }) + + + + ```ts + import Medusa from "@medusajs/medusa-js" + const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) + medusa.products.list({ + expand: "collection" + }) + .then(({ products, limit, offset, count }) => { + console.log(products.length); + }); + ``` - return ( -
- {/* ... */} -
- ) -} +
+ + + ```tsx + import { useProducts } from "medusa-react" -export default Products`, - lang: `tsx`, - } + const Products = () => { + const { products, isLoading } = useProducts({ + expand: "collection" + }) + + return ( +
+ {/* ... */} +
+ ) } - ]} -/> + + export default Products + ``` + +
+
### Expanding Multiple Relations @@ -371,55 +365,50 @@ You can expand more than one relation by separating the relations in the For example, to retrieve both the variants and the collection of the products, pass to the `expand` query parameter the value `variants,collection`: - { - console.log(products.length); -});`, - lang: `ts`, - } - }, - { - label: 'Medusa React', - value: 'medusa-react', - code: { - source: `import { useProducts } from "medusa-react" + + + + ```bash + curl "http://localhost:9000/store/products?expand=variants,collection" + ``` -const Products = () => { - const { products, isLoading } = useProducts({ - expand: "variants,collection" - }) + + + + ```ts + import Medusa from "@medusajs/medusa-js" + const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) + medusa.products.list({ + expand: "variants,collection" + }) + .then(({ products, limit, offset, count }) => { + console.log(products.length); + }); + ``` - return ( -
- {/* ... */} -
- ) -} +
+ + + ```tsx + import { useProducts } from "medusa-react" -export default Products`, - lang: `tsx`, - } + const Products = () => { + const { products, isLoading } = useProducts({ + expand: "variants,collection" + }) + + return ( +
+ {/* ... */} +
+ ) } - ]} -/> + + export default Products + ``` + +
+
### Prevent Expanding Relations @@ -430,55 +419,50 @@ an empty expand value to retrieve an entity without any extra relations. For example: - { - console.log(products.length); -});`, - lang: `ts`, - } - }, - { - label: 'Medusa React', - value: 'medusa-react', - code: { - source: `import { useProducts } from "medusa-react" + + + + ```bash + curl "http://localhost:9000/store/products?expand" + ``` -const Products = () => { - const { products, isLoading } = useProducts({ - expand: "" - }) + + + + ```ts + import Medusa from "@medusajs/medusa-js" + const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) + medusa.products.list({ + expand: "" + }) + .then(({ products, limit, offset, count }) => { + console.log(products.length); + }); + ``` - return ( -
- {/* ... */} -
- ) -} +
+ + + ```tsx + import { useProducts } from "medusa-react" -export default Products`, - lang: `tsx`, - } + const Products = () => { + const { products, isLoading } = useProducts({ + expand: "" + }) + + return ( +
+ {/* ... */} +
+ ) } - ]} -/> + + export default Products + ``` + +
+
This would retrieve the products with only their properties, without any @@ -522,55 +506,50 @@ For example, when you retrieve a list of products, you can retrieve only the titles of the products by passing `title` as a value to the `fields` query parameter: - { - console.log(products.length); -});`, - lang: `ts`, - } - }, - { - label: 'Medusa React', - value: 'medusa-react', - code: { - source: `import { useProducts } from "medusa-react" + + + + ```bash + curl "http://localhost:9000/store/products?fields=title" + ``` -const Products = () => { - const { products, isLoading } = useProducts({ - fields: "title" - }) + + + + ```ts + import Medusa from "@medusajs/medusa-js" + const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) + medusa.products.list({ + fields: "title" + }) + .then(({ products, limit, offset, count }) => { + console.log(products.length); + }); + ``` - return ( -
- {/* ... */} -
- ) -} +
+ + + ```tsx + import { useProducts } from "medusa-react" -export default Products`, - lang: `tsx`, - } + const Products = () => { + const { products, isLoading } = useProducts({ + fields: "title" + }) + + return ( +
+ {/* ... */} +
+ ) } - ]} -/> + + export default Products + ``` + +
+
As mentioned above, the expanded relations such as `variants` will still be @@ -580,57 +559,52 @@ returned as they're not affected by the `fields` parameter. You can ensure that only the `title` field is returned by passing an empty value to the `expand` query parameter. For example: - { - console.log(products.length); -});`, - lang: `ts`, - } - }, - { - label: 'Medusa React', - value: 'medusa-react', - code: { - source: `import { useProducts } from "medusa-react" + + + + ```bash + curl "http://localhost:9000/store/products?fields=title&expand" + ``` -const Products = () => { - const { products, isLoading } = useProducts({ - fields: "title", - expand: "" - }) + + + + ```ts + import Medusa from "@medusajs/medusa-js" + const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) + medusa.products.list({ + fields: "title", + expand: "" + }) + .then(({ products, limit, offset, count }) => { + console.log(products.length); + }); + ``` - return ( -
- {/* ... */} -
- ) -} +
+ + + ```tsx + import { useProducts } from "medusa-react" -export default Products`, - lang: `tsx`, - } + const Products = () => { + const { products, isLoading } = useProducts({ + fields: "title", + expand: "" + }) + + return ( +
+ {/* ... */} +
+ ) } - ]} -/> + + export default Products + ``` + +
+
### Selecting Multiple Fields @@ -642,55 +616,50 @@ You can pass more than one field by seperating the field names in the For example, to select the `title` and `handle` of the products: - { - console.log(products.length); -});`, - lang: `ts`, - } - }, - { - label: 'Medusa React', - value: 'medusa-react', - code: { - source: `import { useProducts } from "medusa-react" + + + + ```bash + curl "http://localhost:9000/store/products?fields=title,handle" + ``` -const Products = () => { - const { products, isLoading } = useProducts({ - fields: "title,handle" - }) + + + + ```ts + import Medusa from "@medusajs/medusa-js" + const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) + medusa.products.list({ + fields: "title,handle" + }) + .then(({ products, limit, offset, count }) => { + console.log(products.length); + }); + ``` - return ( -
- {/* ... */} -
- ) -} +
+ + + ```tsx + import { useProducts } from "medusa-react" -export default Products`, - lang: `tsx`, - } + const Products = () => { + const { products, isLoading } = useProducts({ + fields: "title,handle" + }) + + return ( +
+ {/* ... */} +
+ ) } - ]} -/> + + export default Products + ``` + +
+
### Retrieve Only the ID @@ -699,111 +668,101 @@ export default Products`, You can pass an empty `fields` query parameter to return only the ID of an entity. For example: - { - console.log(products.length); -});`, - lang: `ts`, - } - }, - { - label: 'Medusa React', - value: 'medusa-react', - code: { - source: `import { useProducts } from "medusa-react" + + + + ```bash + curl "http://localhost:9000/store/products?fields" + ``` -const Products = () => { - const { products, isLoading } = useProducts({ - fields: "" - }) + + + + ```ts + import Medusa from "@medusajs/medusa-js" + const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) + medusa.products.list({ + fields: "" + }) + .then(({ products, limit, offset, count }) => { + console.log(products.length); + }); + ``` - return ( -
- {/* ... */} -
- ) -} +
+ + + ```tsx + import { useProducts } from "medusa-react" -export default Products`, - lang: `tsx`, - } + const Products = () => { + const { products, isLoading } = useProducts({ + fields: "" + }) + + return ( +
+ {/* ... */} +
+ ) } - ]} -/> + + export default Products + ``` + +
+
You can also pair with an empty `expand` query parameter to ensure that the relations aren't retrieved as well. For example: - { - console.log(products.length); -});`, - lang: `ts`, - } - }, - { - label: 'Medusa React', - value: 'medusa-react', - code: { - source: `import { useProducts } from "medusa-react" + + + + ```bash + curl "http://localhost:9000/store/products?fields" + ``` -const Products = () => { - const { products, isLoading } = useProducts({ - fields: "", - expand: "" - }) + + + + ```ts + import Medusa from "@medusajs/medusa-js" + const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) + medusa.products.list({ + fields: "", + expand: "" + }) + .then(({ products, limit, offset, count }) => { + console.log(products.length); + }); + ``` - return ( -
- {/* ... */} -
- ) -} +
+ + + ```tsx + import { useProducts } from "medusa-react" -export default Products`, - lang: `tsx`, - } + const Products = () => { + const { products, isLoading } = useProducts({ + fields: "", + expand: "" + }) + + return ( +
+ {/* ... */} +
+ ) } - ]} -/> + + export default Products + ``` + +
+
{ - console.log(products.length); -});`, - lang: `ts`, - } - }, - { - label: 'Medusa React', - value: 'medusa-react', - code: { - source: `import { useProducts } from "medusa-react" + + + + ```bash + curl "http://localhost:9000/store/products?limit=5" + ``` -const Products = () => { - const { products, isLoading } = useProducts({ - limit: 5 - }) + + + + ```ts + import Medusa from "@medusajs/medusa-js" + const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) + medusa.products.list({ + limit: 5 + }) + .then(({ products, limit, offset, count }) => { + console.log(products.length); + }); + ``` - return ( -
- {/* ... */} -
- ) -} +
+ + + ```tsx + import { useProducts } from "medusa-react" -export default Products`, - lang: `tsx`, - } + const Products = () => { + const { products, isLoading } = useProducts({ + limit: 5 + }) + + return ( +
+ {/* ... */} +
+ ) } - ]} -/> + + export default Products + ``` + +
+
### Response Fields @@ -1058,109 +1012,99 @@ sort the retrieved items by an attribute of that item. For example, you can sort products by their `created_at` attribute by setting `order` to `created_at`: - { - console.log(products.length); -});`, - lang: `ts`, - } - }, - { - label: 'Medusa React', - value: 'medusa-react', - code: { - source: `import { useProducts } from "medusa-react" + + + + ```bash + curl "http://localhost:9000/store/products?order=created_at" + ``` -const Products = () => { - const { products, isLoading } = useProducts({ - order: "created_at" - }) + + + + ```ts + import Medusa from "@medusajs/medusa-js" + const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) + medusa.products.list({ + order: "created_at" + }) + .then(({ products, limit, offset, count }) => { + console.log(products.length); + }); + ``` - return ( -
- {/* ... */} -
- ) -} +
+ + + ```tsx + import { useProducts } from "medusa-react" -export default Products`, - lang: `tsx`, - } + const Products = () => { + const { products, isLoading } = useProducts({ + order: "created_at" + }) + + return ( +
+ {/* ... */} +
+ ) } - ]} -/> + + export default Products + ``` + +
+
By default, the sort direction will be ascending. To change it to descending, pass a dash (`-`) before the attribute name. For example: - { - console.log(products.length); -});`, - lang: `ts`, - } - }, - { - label: 'Medusa React', - value: 'medusa-react', - code: { - source: `import { useProducts } from "medusa-react" + + + + ```bash + curl "http://localhost:9000/store/products?order=-created_at" + ``` -const Products = () => { - const { products, isLoading } = useProducts({ - order: "-created_at" - }) + + + + ```ts + import Medusa from "@medusajs/medusa-js" + const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) + medusa.products.list({ + order: "-created_at" + }) + .then(({ products, limit, offset, count }) => { + console.log(products.length); + }); + ``` - return ( -
- {/* ... */} -
- ) -} +
+ + + ```tsx + import { useProducts } from "medusa-react" -export default Products`, - lang: `tsx`, - } + const Products = () => { + const { products, isLoading } = useProducts({ + order: "-created_at" + }) + + return ( +
+ {/* ... */} +
+ ) } - ]} -/> + + export default Products + ``` + +
+
This sorts the products by their `created_at` attribute in the descending diff --git a/www/apps/api-reference/app/api/[area]/layout.tsx b/www/apps/api-reference/app/api/[area]/layout.tsx index be48a86b41..63b41b825d 100644 --- a/www/apps/api-reference/app/api/[area]/layout.tsx +++ b/www/apps/api-reference/app/api/[area]/layout.tsx @@ -1,10 +1,9 @@ -import clsx from "clsx" -import "../../../css/globals.css" +import "../../globals.css" import Navbar from "@/components/Navbar" -import { Inter } from "next/font/google" -import { Roboto_Mono } from "next/font/google" import Providers from "../../../providers" -import { Sidebar } from "docs-ui" +import { WideLayout } from "docs-ui" +import { Inter, Roboto_Mono } from "next/font/google" +import clsx from "clsx" export const metadata = { title: "Medusa API Reference", @@ -28,31 +27,12 @@ export default function RootLayout({ children: React.ReactNode }) { return ( - - - - -
-
- -
- {children} -
-
-
-
- - + + {children} + ) } diff --git a/www/apps/api-reference/app/api/[area]/page.tsx b/www/apps/api-reference/app/api/[area]/page.tsx index 96d932dba0..512589b374 100644 --- a/www/apps/api-reference/app/api/[area]/page.tsx +++ b/www/apps/api-reference/app/api/[area]/page.tsx @@ -8,6 +8,7 @@ import type { Area } from "@/types/openapi" import DividedLayout from "@/layouts/Divided" import { capitalize } from "docs-ui" import PageTitleProvider from "../../../providers/page-title" +import PageHeading from "../../../components/PageHeading" type ReferencePageProps = { params: { @@ -19,15 +20,11 @@ const ReferencePage = async ({ params: { area } }: ReferencePageProps) => { return ( -

- Medusa {capitalize(area)} API Reference -

+ -

- Medusa {capitalize(area)} API Reference -

+ {area.includes("admin") && } {area.includes("store") && } diff --git a/www/apps/api-reference/app/api/algolia/route.tsx b/www/apps/api-reference/app/api/algolia/route.ts similarity index 100% rename from www/apps/api-reference/app/api/algolia/route.tsx rename to www/apps/api-reference/app/api/algolia/route.ts diff --git a/www/apps/api-reference/app/api/base-specs/route.ts b/www/apps/api-reference/app/api/base-specs/route.ts index f1ffb966a5..86df926bb3 100644 --- a/www/apps/api-reference/app/api/base-specs/route.ts +++ b/www/apps/api-reference/app/api/base-specs/route.ts @@ -2,11 +2,15 @@ import { NextResponse } from "next/server" import path from "path" import OpenAPIParser from "@readme/openapi-parser" import getPathsOfTag from "@/utils/get-paths-of-tag" -import type { ExpandedDocument } from "@/types/openapi" +import type { ExpandedDocument, Version } from "@/types/openapi" export async function GET(request: Request) { const { searchParams } = new URL(request.url) const area = searchParams.get("area") + const version = + process.env.NEXT_PUBLIC_VERSIONING === "true" + ? (searchParams.get("version") as Version) || "1" + : "1" const expand = searchParams.get("expand") if (area !== "admin" && area !== "store") { return NextResponse.json( @@ -20,7 +24,11 @@ export async function GET(request: Request) { ) } const baseSpecs = (await OpenAPIParser.parse( - path.join(process.cwd(), `specs/${area}/openapi.yaml`) + path.join( + process.cwd(), + version === "1" ? "specs" : "specs-v2", + `${area}/openapi.yaml` + ) )) as ExpandedDocument if (expand) { diff --git a/www/apps/api-reference/app/api/tag/route.ts b/www/apps/api-reference/app/api/tag/route.ts index fdc30d2c21..dbdd589175 100644 --- a/www/apps/api-reference/app/api/tag/route.ts +++ b/www/apps/api-reference/app/api/tag/route.ts @@ -1,11 +1,16 @@ import { NextResponse } from "next/server" import path from "path" import getPathsOfTag from "@/utils/get-paths-of-tag" +import { Version } from "../../../types/openapi" export async function GET(request: Request) { const { searchParams } = new URL(request.url) const tagName = searchParams.get("tagName") || "" const area = searchParams.get("area") + const version = + process.env.NEXT_PUBLIC_VERSIONING === "true" + ? (searchParams.get("version") as Version) || "1" + : "1" if (area !== "admin" && area !== "store") { return NextResponse.json( @@ -26,9 +31,15 @@ export async function GET(request: Request) { path.join(process.cwd(), "specs/store/code_samples") path.join(process.cwd(), "specs/store/components") path.join(process.cwd(), "specs/store/paths") + path.join(process.cwd(), "specs-v2/admin/code_samples") + path.join(process.cwd(), "specs-v2/admin/components") + path.join(process.cwd(), "specs-v2/admin/paths") + path.join(process.cwd(), "specs-v2/store/code_samples") + path.join(process.cwd(), "specs-v2/store/components") + path.join(process.cwd(), "specs-v2/store/paths") // get path files - const paths = await getPathsOfTag(tagName, area) + const paths = await getPathsOfTag(tagName, area, version) return NextResponse.json( { diff --git a/www/apps/api-reference/app/assets/sitemap.ts b/www/apps/api-reference/app/assets/sitemap.ts index 814b8c3bd9..7de6e75f5b 100644 --- a/www/apps/api-reference/app/assets/sitemap.ts +++ b/www/apps/api-reference/app/assets/sitemap.ts @@ -1,14 +1,14 @@ import { MetadataRoute } from "next" import OpenAPIParser from "@readme/openapi-parser" import path from "path" -import getBaseUrl from "../../utils/get-base-url" import type { ExpandedDocument, Operation } from "../../types/openapi" import getUrl from "../../utils/get-url" import getSectionId from "../../utils/get-section-id" import getPathsOfTag from "../../utils/get-paths-of-tag" +import { config } from "../../config" export default async function sitemap(): Promise { - const baseUrl = getBaseUrl() + const baseUrl = config.baseUrl const results = [ { diff --git a/www/apps/api-reference/css/globals.css b/www/apps/api-reference/app/globals.css similarity index 100% rename from www/apps/api-reference/css/globals.css rename to www/apps/api-reference/app/globals.css diff --git a/www/apps/api-reference/components/MDXComponents/index.tsx b/www/apps/api-reference/components/MDXComponents/index.tsx index 85fb0ae74f..d87c69f10c 100644 --- a/www/apps/api-reference/components/MDXComponents/index.tsx +++ b/www/apps/api-reference/components/MDXComponents/index.tsx @@ -2,7 +2,7 @@ import type { MDXComponents } from "mdx/types" import Security from "./Security" import type { OpenAPIV3 } from "openapi-types" import H2 from "./H2" -import { CodeMdx, Kbd, NextLink } from "docs-ui" +import { Link, MDXComponents as UiMDXComponents } from "docs-ui" export type ScopeType = { specs?: OpenAPIV3.Document @@ -11,11 +11,12 @@ export type ScopeType = { const getCustomComponents = (scope?: ScopeType): MDXComponents => { return { + ...UiMDXComponents, Security: () => , - code: CodeMdx, - a: NextLink, - h2: (props) =>

, - kbd: Kbd, + a: Link, + h2: (props: React.HTMLAttributes) => ( +

+ ), } } diff --git a/www/apps/api-reference/components/MDXContent/Server/index.tsx b/www/apps/api-reference/components/MDXContent/Server/index.tsx index a0ae00aff3..9e4722b7bd 100644 --- a/www/apps/api-reference/components/MDXContent/Server/index.tsx +++ b/www/apps/api-reference/components/MDXContent/Server/index.tsx @@ -20,6 +20,9 @@ const MDXContentServer = ({ content, ...props }: MDXContentServerProps) => { components={getCustomComponents((props.scope as ScopeType) || {})} options={{ scope: props.scope, + mdxOptions: { + development: process.env.NEXT_PUBLIC_ENV === "development", + }, }} {...props} /> diff --git a/www/apps/api-reference/components/Navbar/index.tsx b/www/apps/api-reference/components/Navbar/index.tsx index 8a5cf03e17..572d435981 100644 --- a/www/apps/api-reference/components/Navbar/index.tsx +++ b/www/apps/api-reference/components/Navbar/index.tsx @@ -1,47 +1,48 @@ "use client" -import { Navbar as UiNavbar, usePageLoading } from "docs-ui" -import getLinkWithBasePath from "../../utils/get-link-with-base-path" -import { useSidebar } from "docs-ui" +import { + Navbar as UiNavbar, + getNavbarItems, + usePageLoading, + useSidebar, +} from "docs-ui" import FeedbackModal from "./FeedbackModal" +import { useMemo } from "react" +import { config } from "../../config" +import { usePathname } from "next/navigation" +import VersionSwitcher from "../VersionSwitcher" const Navbar = () => { const { setMobileSidebarOpen, mobileSidebarOpen } = useSidebar() + const pathname = usePathname() const { isLoading } = usePageLoading() + const navbarItems = useMemo( + () => + getNavbarItems({ + basePath: config.baseUrl, + activePath: pathname, + }), + [pathname] + ) + return ( } + additionalActionsBefore={ + <> + {process.env.NEXT_PUBLIC_VERSIONING === "true" && } + + } + additionalActionsAfter={} isLoading={isLoading} /> ) diff --git a/www/apps/api-reference/components/PageHeading/index.tsx b/www/apps/api-reference/components/PageHeading/index.tsx new file mode 100644 index 0000000000..d878d79aa1 --- /dev/null +++ b/www/apps/api-reference/components/PageHeading/index.tsx @@ -0,0 +1,25 @@ +"use client" + +import { capitalize } from "docs-ui" +import { useArea } from "../../providers/area" +import { useVersion } from "../../providers/version" + +type PageHeadingProps = { + className?: string +} + +const PageHeading = ({ className }: PageHeadingProps) => { + const { area } = useArea() + const { version } = useVersion() + + const versionText = + process.env.NEXT_PUBLIC_VERSIONING === "true" ? ` V${version}` : "" + + return ( +

+ Medusa{versionText} {capitalize(area)} API Reference +

+ ) +} + +export default PageHeading diff --git a/www/apps/api-reference/components/Tags/Operation/CodeSection/RequestSamples/index.tsx b/www/apps/api-reference/components/Tags/Operation/CodeSection/RequestSamples/index.tsx index c66671723a..becb39b0ba 100644 --- a/www/apps/api-reference/components/Tags/Operation/CodeSection/RequestSamples/index.tsx +++ b/www/apps/api-reference/components/Tags/Operation/CodeSection/RequestSamples/index.tsx @@ -1,5 +1,5 @@ import type { Code } from "@/types/openapi" -import { CodeTabs } from "docs-ui" +import { LegacyCodeTabs } from "docs-ui" import slugify from "slugify" export type TagOperationCodeSectionRequestSamplesProps = { @@ -12,7 +12,7 @@ const TagOperationCodeSectionRequestSamples = ({ return (

Request samples

- ({ label: codeSample.label, value: slugify(codeSample.label), diff --git a/www/apps/api-reference/components/Tags/Operation/DescriptionSection/index.tsx b/www/apps/api-reference/components/Tags/Operation/DescriptionSection/index.tsx index c70a1d18e2..0f9be83d30 100644 --- a/www/apps/api-reference/components/Tags/Operation/DescriptionSection/index.tsx +++ b/www/apps/api-reference/components/Tags/Operation/DescriptionSection/index.tsx @@ -8,7 +8,7 @@ import dynamic from "next/dynamic" import TagsOperationDescriptionSectionParameters from "./Parameters" import MDXContentClient from "@/components/MDXContent/Client" import { useArea } from "../../../../providers/area" -import { Feedback, Badge, NextLink, FeatureFlagNotice } from "docs-ui" +import { Feedback, Badge, Link, FeatureFlagNotice } from "docs-ui" import { usePathname } from "next/navigation" import formatReportLink from "../../../../utils/format-report-link" @@ -70,9 +70,9 @@ const TagsOperationDescriptionSection = ({ {operation.externalDocs && ( <> Related guide:{" "} - + {operation.externalDocs.description || "Read More"} - + )} {operation.security && ( diff --git a/www/apps/api-reference/components/Tags/Operation/FeatureFlagNotice/index.tsx b/www/apps/api-reference/components/Tags/Operation/FeatureFlagNotice/index.tsx index 478ee9b198..60840d09d9 100644 --- a/www/apps/api-reference/components/Tags/Operation/FeatureFlagNotice/index.tsx +++ b/www/apps/api-reference/components/Tags/Operation/FeatureFlagNotice/index.tsx @@ -1,4 +1,4 @@ -import { Badge, NextLink, Tooltip } from "docs-ui" +import { Badge, Link, Tooltip } from "docs-ui" export type TagsOperationFeatureFlagNoticeProps = { featureFlag: string @@ -19,12 +19,12 @@ const TagsOperationFeatureFlagNotice = ({ To use this {type}, make sure to
- enable its feature flag: {featureFlag} - +
} clickable diff --git a/www/apps/api-reference/components/Tags/Operation/Parameters/Description/index.tsx b/www/apps/api-reference/components/Tags/Operation/Parameters/Description/index.tsx index cbc531033b..3111a5798c 100644 --- a/www/apps/api-reference/components/Tags/Operation/Parameters/Description/index.tsx +++ b/www/apps/api-reference/components/Tags/Operation/Parameters/Description/index.tsx @@ -3,7 +3,7 @@ import type { SchemaObject } from "@/types/openapi" import clsx from "clsx" import dynamic from "next/dynamic" import { Fragment } from "react" -import { NextLink, type InlineCodeProps, capitalize } from "docs-ui" +import { Link, type InlineCodeProps, capitalize } from "docs-ui" const InlineCode = dynamic( async () => (await import("docs-ui")).InlineCode @@ -122,9 +122,9 @@ const TagOperationParametersDescription = ({ {schema.externalDocs && ( <> Related guide:{" "} - + {schema.externalDocs.description || "Read More"} - + )}
diff --git a/www/apps/api-reference/components/Tags/Operation/Parameters/Name/index.tsx b/www/apps/api-reference/components/Tags/Operation/Parameters/Name/index.tsx index 3b0c2a879c..e43b384adc 100644 --- a/www/apps/api-reference/components/Tags/Operation/Parameters/Name/index.tsx +++ b/www/apps/api-reference/components/Tags/Operation/Parameters/Name/index.tsx @@ -1,11 +1,5 @@ import type { SchemaObject } from "@/types/openapi" -import dynamic from "next/dynamic" -import type { TooltipProps } from "docs-ui" -import { Badge, ExpandableNotice, FeatureFlagNotice, NextLink } from "docs-ui" - -const Tooltip = dynamic( - async () => (await import("docs-ui")).Tooltip -) as React.FC +import { Badge, ExpandableNotice, FeatureFlagNotice } from "docs-ui" export type TagOperationParametersNameProps = { name: string @@ -37,7 +31,7 @@ const TagOperationParametersName = ({
)} diff --git a/www/apps/api-reference/components/Tags/Paths/index.tsx b/www/apps/api-reference/components/Tags/Paths/index.tsx index eabb8fc771..845043c3ee 100644 --- a/www/apps/api-reference/components/Tags/Paths/index.tsx +++ b/www/apps/api-reference/components/Tags/Paths/index.tsx @@ -4,22 +4,18 @@ import getSectionId from "@/utils/get-section-id" import type { OpenAPIV3 } from "openapi-types" import useSWR from "swr" import type { Operation, PathsObject } from "@/types/openapi" -import { - SidebarItemSections, - useSidebar, - type SidebarItemType, - swrFetcher, -} from "docs-ui" +import { useSidebar, swrFetcher, getLinkWithBasePath } from "docs-ui" import { Fragment, useEffect, useMemo } from "react" import dynamic from "next/dynamic" import type { TagOperationProps } from "../Operation" import { useArea } from "@/providers/area" -import getLinkWithBasePath from "@/utils/get-link-with-base-path" import clsx from "clsx" import { useBaseSpecs } from "@/providers/base-specs" import getTagChildSidebarItems from "@/utils/get-tag-child-sidebar-items" import { useLoading } from "@/providers/loading" import DividedLoading from "@/components/DividedLoading" +import { SidebarItemSections, SidebarItemType } from "types" +import { useVersion } from "../../../providers/version" const TagOperation = dynamic( async () => import("../Operation") @@ -32,6 +28,7 @@ export type TagPathsProps = { const TagPaths = ({ tag, className }: TagPathsProps) => { const tagSlugName = useMemo(() => getSectionId([tag.name]), [tag]) const { area } = useArea() + const { version } = useVersion() const { items, addItems, findItemInSection } = useSidebar() const { baseSpecs } = useBaseSpecs() const { loading } = useLoading() @@ -47,7 +44,10 @@ const TagPaths = ({ tag, className }: TagPathsProps) => { paths: PathsObject }>( !Object.keys(paths).length - ? getLinkWithBasePath(`/tag?tagName=${tagSlugName}&area=${area}`) + ? getLinkWithBasePath( + `/tag?tagName=${tagSlugName}&area=${area}&version=${version}`, + process.env.NEXT_PUBLIC_BASE_PATH + ) : null, swrFetcher, { diff --git a/www/apps/api-reference/components/Tags/Section/index.tsx b/www/apps/api-reference/components/Tags/Section/index.tsx index f4c37f9105..060d0fb07c 100644 --- a/www/apps/api-reference/components/Tags/Section/index.tsx +++ b/www/apps/api-reference/components/Tags/Section/index.tsx @@ -15,7 +15,7 @@ import SectionContainer from "../../Section/Container" import { useArea } from "../../../providers/area" import SectionDivider from "../../Section/Divider" import clsx from "clsx" -import { Feedback, Loading, NextLink } from "docs-ui" +import { Feedback, Loading, Link } from "docs-ui" import { usePathname } from "next/navigation" import formatReportLink from "../../../utils/format-report-link" @@ -100,9 +100,9 @@ const TagSection = ({ tag }: TagSectionProps) => { {tag.externalDocs && ( <> Related guide:{" "} - + {tag.externalDocs.description || "Read More"} - + )} ( async () => import("./Section") @@ -32,10 +33,14 @@ const Tags = () => { const { baseSpecs, setBaseSpecs } = useBaseSpecs() const { addItems } = useSidebar() const { area } = useArea() + const { version } = useVersion() const { data } = useSWR( loadData && !baseSpecs - ? getLinkWithBasePath(`/base-specs?area=${area}&expand=${expand}`) + ? getLinkWithBasePath( + `/base-specs?area=${area}&expand=${expand}&version=${version}`, + process.env.NEXT_PUBLIC_BASE_PATH + ) : null, swrFetcher, { diff --git a/www/apps/api-reference/components/VersionNote/index.tsx b/www/apps/api-reference/components/VersionNote/index.tsx new file mode 100644 index 0000000000..1ecf6d40ed --- /dev/null +++ b/www/apps/api-reference/components/VersionNote/index.tsx @@ -0,0 +1,22 @@ +"use client" + +import { Note } from "docs-ui" +import { useVersion } from "../../providers/version" + +const VersionNote = () => { + const { version } = useVersion() + + return ( + <> + {version === "2" && ( + + Medusa v2.0 is in development and not suitable for production + environments. As such, the API reference is incomplete and subject to + change, so please use it with caution. + + )} + + ) +} + +export default VersionNote diff --git a/www/apps/api-reference/components/VersionSwitcher/index.tsx b/www/apps/api-reference/components/VersionSwitcher/index.tsx new file mode 100644 index 0000000000..f1a9be56de --- /dev/null +++ b/www/apps/api-reference/components/VersionSwitcher/index.tsx @@ -0,0 +1,36 @@ +"use client" + +import { Toggle } from "docs-ui" +import { useVersion } from "../../providers/version" +import clsx from "clsx" + +const VersionSwitcher = () => { + const { version, changeVersion } = useVersion() + + return ( +
+ + V1 + + changeVersion(checked ? "2" : "1")} + /> + + V2 + +
+ ) +} + +export default VersionSwitcher diff --git a/www/apps/api-reference/config/index.ts b/www/apps/api-reference/config/index.ts new file mode 100644 index 0000000000..9f82fc084a --- /dev/null +++ b/www/apps/api-reference/config/index.ts @@ -0,0 +1,18 @@ +import { DocsConfig } from "types" +import { mobileSidebarItems } from "docs-ui" + +export const config: DocsConfig = { + baseUrl: process.env.NEXT_PUBLIC_BASE_URL || "http://localhost:3000", + // sidebar is auto generated + sidebar: { + top: [ + { + title: "Introduction", + path: "", + loaded: true, + }, + ], + bottom: [], + mobile: mobileSidebarItems, + }, +} diff --git a/www/apps/api-reference/next.config.mjs b/www/apps/api-reference/next.config.mjs index c8687bfe4c..7e5b34bcd5 100644 --- a/www/apps/api-reference/next.config.mjs +++ b/www/apps/api-reference/next.config.mjs @@ -33,6 +33,7 @@ const withMDX = mdx({ extension: /\.mdx?$/, options: { rehypePlugins: [], + development: process.env.NODE_ENV === "development", }, }) diff --git a/www/apps/api-reference/package.json b/www/apps/api-reference/package.json index 93c9840ad4..7f6ccde42a 100644 --- a/www/apps/api-reference/package.json +++ b/www/apps/api-reference/package.json @@ -7,21 +7,23 @@ "dev:monorepo": "yarn dev -p 3000", "build": "next build", "build:dev": "NODE_ENV=test next build", + "build:prod": "NEXT_PUBLIC_ENV=production next build", "start": "next start", "start:monorepo": "yarn start -p 3000", "lint": "next lint --fix" }, "dependencies": { - "@mdx-js/loader": "^2.3.0", - "@mdx-js/react": "^2.3.0", + "@mdx-js/loader": "^3.0.0", + "@mdx-js/react": "^3.0.0", "@medusajs/icons": "^1.2.0", - "@next/mdx": "13.4.19", + "@medusajs/ui": "^2.4.1", + "@next/mdx": "14.1.3", "@readme/openapi-parser": "^2.5.0", "@types/mapbox__rehype-prism": "^0.8.0", "@types/mdx": "^2.0.5", "@types/node": "20.4.5", - "@types/react": "18.2.17", - "@types/react-dom": "18.2.7", + "@types/react": "^18.2.0", + "@types/react-dom": "^18.2.0", "@types/react-transition-group": "^4.4.6", "autoprefixer": "10.4.14", "clsx": "^2.0.0", @@ -30,14 +32,14 @@ "jsdom": "^22.1.0", "json-schema": "^0.4.0", "json-stringify-pretty-compact": "^4.0.0", - "next": "^14", + "next": "^14.1.3", "next-mdx-remote": "^4.4.1", "openapi-sampler": "^1.3.1", "openapi-types": "^12.1.3", "postcss": "8.4.27", "prism-react-renderer": "2.3.1", - "react": "latest", - "react-dom": "latest", + "react": "^18.2.0", + "react-dom": "^18.2.0", "react-instantsearch": "^7.0.1", "react-intersection-observer": "^9.5.3", "react-tooltip": "^5.19.0", @@ -50,8 +52,9 @@ "yaml": "^2.3.1" }, "devDependencies": { - "@next/bundle-analyzer": "^13.4.19", - "@types/jsdom": "^21.1.1" + "@next/bundle-analyzer": "^14.1.3", + "@types/jsdom": "^21.1.1", + "types": "*" }, "engines": { "node": ">=18.17.0" diff --git a/www/apps/api-reference/providers/color-mode.tsx b/www/apps/api-reference/providers/color-mode.tsx deleted file mode 100644 index fd0b97891e..0000000000 --- a/www/apps/api-reference/providers/color-mode.tsx +++ /dev/null @@ -1,74 +0,0 @@ -"use client" - -import { - createContext, - useCallback, - useContext, - useEffect, - useState, -} from "react" - -type ColorMode = "light" | "dark" - -type ColorModeContextType = { - colorMode: ColorMode - setColorMode: (value: ColorMode) => void - toggleColorMode: () => void -} - -const ColorModeContext = createContext(null) - -type ColorModeProviderProps = { - children: React.ReactNode -} - -const ColorModeProvider = ({ children }: ColorModeProviderProps) => { - const [colorMode, setColorMode] = useState("light") - - const toggleColorMode = () => - setColorMode(colorMode === "light" ? "dark" : "light") - - const init = () => { - const theme = localStorage.getItem("theme") - if (theme && (theme === "light" || theme === "dark")) { - setColorMode(theme) - } - } - - useEffect(() => { - init() - }, []) - - useEffect(() => { - const theme = localStorage.getItem("theme") - if (theme !== colorMode) { - localStorage.setItem("theme", colorMode) - } - - document.querySelector("html")?.setAttribute("data-theme", colorMode) - }, [colorMode]) - - return ( - - {children} - - ) -} - -export default ColorModeProvider - -export const useColorMode = (): ColorModeContextType => { - const context = useContext(ColorModeContext) - - if (!context) { - throw new Error("useColorMode must be used inside a ColorModeProvider") - } - - return context -} diff --git a/www/apps/api-reference/providers/index.tsx b/www/apps/api-reference/providers/index.tsx index dc0dc48613..bff3067c7a 100644 --- a/www/apps/api-reference/providers/index.tsx +++ b/www/apps/api-reference/providers/index.tsx @@ -1,18 +1,17 @@ "use client" import { - AiAssistantProvider, AnalyticsProvider, ColorModeProvider, MobileProvider, ModalProvider, - NavbarProvider, PageLoadingProvider, ScrollControllerProvider, } from "docs-ui" import BaseSpecsProvider from "./base-specs" import SidebarProvider from "./sidebar" import SearchProvider from "./search" +import VersionProvider from "./version" type ProvidersProps = { children?: React.ReactNode @@ -27,11 +26,11 @@ const Providers = ({ children }: ProvidersProps) => { - - - {children} - - + + + {children} + + diff --git a/www/apps/api-reference/providers/search.tsx b/www/apps/api-reference/providers/search.tsx index 3f88dc65fa..354d724f24 100644 --- a/www/apps/api-reference/providers/search.tsx +++ b/www/apps/api-reference/providers/search.tsx @@ -5,8 +5,9 @@ import { SearchProvider as UiSearchProvider, AiAssistantCommandIcon, AiAssistantProvider, + searchFilters, } from "docs-ui" -import getBaseUrl from "../utils/get-base-url" +import { config } from "../config" type SearchProviderProps = { children: React.ReactNode @@ -29,47 +30,30 @@ const SearchProvider = ({ children }: SearchProviderProps) => { isLoading, suggestions: [ { - title: "Search Suggestions", + title: "Getting started? Try one of the following terms.", items: [ - "Authentication", - "Expanding fields", - "Selecting fields", - "Pagination", - "Query parameter types", + "Install Medusa with create-medusa-app", + "Next.js quickstart", + "Admin dashboard quickstart", + "Commerce modules", + "Medusa architecture", + ], + }, + { + title: "Developing with Medusa", + items: [ + "Recipes", + "How to create API routes", + "How to create an entity", + "How to create a plugin", + "How to create an admin widget", ], }, ], - checkInternalPattern: new RegExp(`^${getBaseUrl()}/api/(admin|store)`), - filterOptions: [ - { - value: "admin", - label: "Admin API", - }, - { - value: "store", - label: "Store API", - }, - { - value: "docs", - label: "Docs", - }, - { - value: "user-guide", - label: "User Guide", - }, - { - value: "plugins", - label: "Plugins", - }, - { - value: "reference", - label: "References", - }, - { - value: "ui", - label: "UI", - }, - ], + checkInternalPattern: new RegExp( + `^${config.baseUrl}/api/(admin|store)` + ), + filterOptions: searchFilters, }} commands={[ { diff --git a/www/apps/api-reference/providers/sidebar.tsx b/www/apps/api-reference/providers/sidebar.tsx index 6650e86cca..a3ba380329 100644 --- a/www/apps/api-reference/providers/sidebar.tsx +++ b/www/apps/api-reference/providers/sidebar.tsx @@ -1,9 +1,11 @@ "use client" import { SidebarProvider as UiSidebarProvider, + mobileSidebarItems, usePageLoading, useScrollController, } from "docs-ui" +import { config } from "../config" type SidebarProviderProps = { children?: React.ReactNode @@ -19,42 +21,7 @@ const SidebarProvider = ({ children }: SidebarProviderProps) => { setIsLoading={setIsLoading} shouldHandleHashChange={true} scrollableElement={scrollableElement} - initialItems={{ - top: [ - { - title: "Introduction", - path: "", - loaded: true, - }, - ], - bottom: [], - mobile: [ - { - title: "Docs", - path: "https://docs.medusajs.com/", - loaded: true, - isPathHref: true, - }, - { - title: "User Guide", - path: "https://docs.medusajs.com/user-guide", - loaded: true, - isPathHref: true, - }, - { - title: "Store API", - path: "/api/store", - loaded: true, - isPathHref: true, - }, - { - title: "Admin API", - path: "/api/admin", - loaded: true, - isPathHref: true, - }, - ], - }} + initialItems={config.sidebar} > {children} diff --git a/www/apps/api-reference/providers/version.tsx b/www/apps/api-reference/providers/version.tsx new file mode 100644 index 0000000000..983694dbb4 --- /dev/null +++ b/www/apps/api-reference/providers/version.tsx @@ -0,0 +1,74 @@ +"use client" + +import { createContext, useContext, useEffect, useState } from "react" +import { Version } from "../types/openapi" +import { usePathname } from "next/navigation" +import { useIsBrowser } from "docs-ui" + +type VersionContextType = { + version: Version + changeVersion: (value: Version) => void +} + +const VersionContext = createContext(null) + +type VersionProviderProps = { + children: React.ReactNode +} + +const VersionProvider = ({ children }: VersionProviderProps) => { + const pathname = usePathname() + const [version, setVersion] = useState("1") + const isBrowser = useIsBrowser() + + const changeVersion = (version: Version) => { + if (!isBrowser || process.env.NEXT_PUBLIC_VERSIONING !== "true") { + return + } + localStorage.setItem("api-version", version) + + location.href = `${location.href.substring( + 0, + location.href.indexOf(location.pathname) + )}${pathname}` + } + + useEffect(() => { + if (!isBrowser || process.env.NEXT_PUBLIC_VERSIONING !== "true") { + return + } + // try to load from localstorage + const versionInLocalStorage = localStorage.getItem("api-version") as Version + if (versionInLocalStorage) { + setVersion(versionInLocalStorage) + } + }, [isBrowser]) + + useEffect(() => { + if (!isBrowser || process.env.NEXT_PUBLIC_VERSIONING !== "true") { + return + } + const versionInLocalStorage = localStorage.getItem("api-version") as Version + if (version !== versionInLocalStorage) { + localStorage.setItem("api-version", version) + } + }, [version, isBrowser]) + + return ( + + {children} + + ) +} + +export default VersionProvider + +export const useVersion = (): VersionContextType => { + const context = useContext(VersionContext) + + if (!context) { + throw new Error("useVersion must be used inside an VersionProvider") + } + + return context +} diff --git a/www/apps/api-reference/types/openapi.ts b/www/apps/api-reference/types/openapi.ts index 589c38716f..f54ee31398 100644 --- a/www/apps/api-reference/types/openapi.ts +++ b/www/apps/api-reference/types/openapi.ts @@ -1,6 +1,7 @@ import type { OpenAPIV3 } from "openapi-types" export type Area = "admin" | "store" +export type Version = "1" | "2" export type Code = { lang: string diff --git a/www/apps/api-reference/utils/get-base-url.ts b/www/apps/api-reference/utils/get-base-url.ts deleted file mode 100644 index 0c54e1ac45..0000000000 --- a/www/apps/api-reference/utils/get-base-url.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default function getBaseUrl() { - return process.env.NEXT_PUBLIC_BASE_URL || "http://localhost:3000" -} diff --git a/www/apps/api-reference/utils/get-link-with-base-path.ts b/www/apps/api-reference/utils/get-link-with-base-path.ts deleted file mode 100644 index 29c11e94ec..0000000000 --- a/www/apps/api-reference/utils/get-link-with-base-path.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default function getLinkWithBasePath(path: string): string { - return `${process.env.NEXT_PUBLIC_BASE_PATH || "/api"}${path}` -} diff --git a/www/apps/api-reference/utils/get-paths-of-tag.ts b/www/apps/api-reference/utils/get-paths-of-tag.ts index 630ded0006..f90fb30ae8 100644 --- a/www/apps/api-reference/utils/get-paths-of-tag.ts +++ b/www/apps/api-reference/utils/get-paths-of-tag.ts @@ -1,7 +1,7 @@ import path from "path" import { promises as fs } from "fs" import type { OpenAPIV3 } from "openapi-types" -import type { Operation, Document } from "@/types/openapi" +import type { Operation, Document, Version } from "@/types/openapi" import readSpecDocument from "./read-spec-document" import getSectionId from "./get-section-id" import OpenAPIParser from "@readme/openapi-parser" @@ -12,10 +12,15 @@ type ParsedPathItemObject = OpenAPIV3.PathItemObject & { export default async function getPathsOfTag( tagName: string, - area: string + area: string, + version: Version = "1" ): Promise { // get path files - const basePath = path.join(process.cwd(), `specs/${area}/paths`) + const basePath = path.join( + process.cwd(), + version === "1" ? "specs" : "specs-v2", + `${area}/paths` + ) const files = await fs.readdir(basePath) diff --git a/www/apps/api-reference/utils/get-tag-child-sidebar-items.tsx b/www/apps/api-reference/utils/get-tag-child-sidebar-items.tsx index 01644788f0..68945b7179 100644 --- a/www/apps/api-reference/utils/get-tag-child-sidebar-items.tsx +++ b/www/apps/api-reference/utils/get-tag-child-sidebar-items.tsx @@ -1,4 +1,4 @@ -import type { SidebarItemType } from "docs-ui" +import type { SidebarItemType } from "types" import type { Operation, PathsObject } from "@/types/openapi" import type { OpenAPIV3 } from "openapi-types" import dynamic from "next/dynamic" diff --git a/www/apps/api-reference/utils/get-url.ts b/www/apps/api-reference/utils/get-url.ts index 075ce26541..67297b198b 100644 --- a/www/apps/api-reference/utils/get-url.ts +++ b/www/apps/api-reference/utils/get-url.ts @@ -1,5 +1,5 @@ -import getBaseUrl from "./get-base-url" +import { config } from "../config" export default function getUrl(area: string, tagName?: string): string { - return `${getBaseUrl()}/api/${area}#${tagName}` + return `${config.baseUrl}/api/${area}#${tagName}` } diff --git a/www/apps/docs/content/admin/configuration.mdx b/www/apps/docs/content/admin/configuration.mdx index 06d3da9231..653d625246 100644 --- a/www/apps/docs/content/admin/configuration.mdx +++ b/www/apps/docs/content/admin/configuration.mdx @@ -2,7 +2,7 @@ description: "In this document, you'll learn about the different ways you can configure the admin dashboard." --- -import ParameterTypes from "@site/src/components/ParameterTypes" +import { TypeList } from "docs-ui" # Admin Configuration @@ -37,7 +37,7 @@ const plugins = [ ] ``` - {\n // ...\n const productService = await initializeProductModule()\n const products = await productService.list({\n id: "${data?.product_id}",\n })\n\n console.log(products[0])\n}`, + code: `// Install the Pricing Module in a serverless project, such as a Next.js storefront: @medusajs/product\n\nimport {\ninitialize as initializeProductModule,\n} from "@medusajs/product"\n\n// in an async function, or you can use promises\nasync () => {\n // ...\n const productService = await initializeProductModule()\n const products = await productService.list({\n id: "${data?.product_id}",\n })\n\n console.log(products[0])\n}`, }, ]} className="my-6"> diff --git a/www/apps/docs/content/admin/quickstart.mdx b/www/apps/docs/content/admin/quickstart.mdx index 428429611c..fe58cfd408 100644 --- a/www/apps/docs/content/admin/quickstart.mdx +++ b/www/apps/docs/content/admin/quickstart.mdx @@ -149,7 +149,7 @@ You can learn more about the admin dashboard and its features in the [User Guide Medusa supports multiple languages and translations. Check out available languages [here](../user-guide/tips/languages.md). -Refer to [this user guide](../user-guide/users/profile.md#change-admin-language) to learn how to switch the language of the Medusa admin. +Refer to [this user guide](../user-guide/users/profile.md#change-admin-language) to learn how to switch the language of the Medusa Admin. --- diff --git a/www/apps/docs/content/contribution/_admin-translations.md b/www/apps/docs/content/contribution/_admin-translations.md index bff6648b30..410c2ab2d4 100644 --- a/www/apps/docs/content/contribution/_admin-translations.md +++ b/www/apps/docs/content/contribution/_admin-translations.md @@ -5,11 +5,11 @@ sidebar_position: 2 # Contribute by Translating Admin -In this document, you'll learn how you can contribute to Medusa by translating the Medusa admin. +In this document, you'll learn how you can contribute to Medusa by translating the Medusa Admin. ## Overview -The Medusa admin supports multiple languages, with the default being English. To ensure a wide support for different languages, your contribution by translating to other languages you're fluent in is highly appreciated. +The Medusa Admin supports multiple languages, with the default being English. To ensure a wide support for different languages, your contribution by translating to other languages you're fluent in is highly appreciated. This type of contribution is a no-code contribution, meaning you don't need advanced technical skills to contribute. diff --git a/www/apps/docs/content/deployments/admin/general-guide.mdx b/www/apps/docs/content/deployments/admin/general-guide.mdx index f68b7d3e84..e6869bab0e 100644 --- a/www/apps/docs/content/deployments/admin/general-guide.mdx +++ b/www/apps/docs/content/deployments/admin/general-guide.mdx @@ -8,7 +8,7 @@ import CorsErrorSection from '../../troubleshooting/cors-issues.md' # General Deployment Guide for Medusa Admin -In this guide, you’ll learn the general steps to follow when deploying the Medusa admin separately from the backend. This guide isn’t tailored towards any hosting provider. +In this guide, you’ll learn the general steps to follow when deploying the Medusa Admin separately from the backend. This guide isn’t tailored towards any hosting provider. ## Prerequisites @@ -69,7 +69,7 @@ When using the `--deployment` option, the backend's URL is loaded from the `MEDU The steps to deploy the admin can be different based on the hosting provider you use. The following points cover common configurations across hosting providers: -- If your hosting provider supports choosing a Framework Preset, choose the “Other” option as the Medusa admin doesn’t follow known framework presets. +- If your hosting provider supports choosing a Framework Preset, choose the “Other” option as the Medusa Admin doesn’t follow known framework presets. - Set the build command of your deployed project to use the `build:admin` command: ```bash npm2yarn diff --git a/www/apps/docs/content/deployments/index.mdx b/www/apps/docs/content/deployments/index.mdx index c513bc5770..bbe664d5d0 100644 --- a/www/apps/docs/content/deployments/index.mdx +++ b/www/apps/docs/content/deployments/index.mdx @@ -14,7 +14,7 @@ In this document, you’ll learn about the different ways you can deploy your Me A standard Medusa project is made up of the following: - Medusa backend -- Medusa admin +- Medusa Admin - One or more storefronts ![Diagram showcasing the connection between the three deployed components](https://res.cloudinary.com/dza7lstvk/image/upload/v1705999238/Medusa%20Docs/Diagrams/Social_Media_Graphics_2024_options_uxzmlx.jpg) @@ -27,7 +27,7 @@ This guide details options to consider when deploying each of these components i You must deploy the Medusa backend before the admin or storefront, as both of them connect to the backend and won’t work without a deployed Medusa backend URL. -![Diagram showcasing how the Medusa admin and its associated services would be deployed](https://res.cloudinary.com/dza7lstvk/image/upload/v1705999287/Medusa%20Docs/Diagrams/Social_Media_Graphics_2024_backend_deployment__1_twbdsd.jpg) +![Diagram showcasing how the Medusa Admin and its associated services would be deployed](https://res.cloudinary.com/dza7lstvk/image/upload/v1705999287/Medusa%20Docs/Diagrams/Social_Media_Graphics_2024_backend_deployment__1_twbdsd.jpg) The Medusa backend is a Node.js server. So, it must be deployed to a hosting provider that supports deploying servers, such as Railway, DigitalOcean, AWS, Heroku, etc… @@ -49,11 +49,11 @@ Your backend connects to PostgreSQL and Redis databases. Most hosting providers ## Deploying the Medusa Admin -There are two options to deploy the Medusa admin: +There are two options to deploy the Medusa Admin: ### Deploy Admin with Backend -Since the Medusa admin is a plugin installed in the backend, you may choose to host it along with the backend. +Since the Medusa Admin is a plugin installed in the backend, you may choose to host it along with the backend. In this scenario, make sure the hosting provider and plan of your choice provide at least 2GB of RAM, as the admin build requires high RAM usage. diff --git a/www/apps/docs/content/deployments/server/deploying-on-heroku.mdx b/www/apps/docs/content/deployments/server/deploying-on-heroku.mdx index 00b587ff33..ce29217af5 100644 --- a/www/apps/docs/content/deployments/server/deploying-on-heroku.mdx +++ b/www/apps/docs/content/deployments/server/deploying-on-heroku.mdx @@ -366,7 +366,7 @@ For example, to create an admin user you can run the following command: heroku run -a -- npx medusa user -e "" -p "" ``` -Where `` is the name of your Heroku app, and `` and `` are the credentials you want to use to log in to the Medusa admin dashboard. +Where `` is the name of your Heroku app, and `` and `` are the credentials you want to use to log in to the Medusa Admin dashboard. --- @@ -386,5 +386,5 @@ Where `` is the name of your Heroku app, `` is the name of t ## See Also -- [Deploy your Medusa admin](../admin/index.mdx) +- [Deploy your Medusa Admin](../admin/index.mdx) - [Deploy your storefront](../storefront/index.mdx) diff --git a/www/apps/docs/content/deployments/server/deploying-on-railway.md b/www/apps/docs/content/deployments/server/deploying-on-railway.md index d12ce5069c..27f7abd6b7 100644 --- a/www/apps/docs/content/deployments/server/deploying-on-railway.md +++ b/www/apps/docs/content/deployments/server/deploying-on-railway.md @@ -234,7 +234,7 @@ It’s highly recommended to use strong, randomly generated secrets for `JWT_SE ::: -Make sure to add any other environment variables that are relevant for you here. For example, you can add environment variables related to Medusa admin or your modules. +Make sure to add any other environment variables that are relevant for you here. For example, you can add environment variables related to Medusa Admin or your modules. ### Change Start Command diff --git a/www/apps/docs/content/development/api-routes/create-express-route.mdx b/www/apps/docs/content/development/api-routes/create-express-route.mdx index 68dd4b88b3..bd82c5b96a 100644 --- a/www/apps/docs/content/development/api-routes/create-express-route.mdx +++ b/www/apps/docs/content/development/api-routes/create-express-route.mdx @@ -111,7 +111,7 @@ You can also create endpoints that don't reside under these two prefixes, simila ## CORS Configuration -If you’re adding a storefront or admin endpoint and you want to access these endpoints from the storefront or Medusa admin, you need to pass your endpoints Cross-Origin Resource Origin (CORS) options using the `cors` package. +If you’re adding a storefront or admin endpoint and you want to access these endpoints from the storefront or Medusa Admin, you need to pass your endpoints Cross-Origin Resource Origin (CORS) options using the `cors` package. First, import the necessary utility functions and types from Medusa's packages with the `cors` package: diff --git a/www/apps/docs/content/development/backend/directory-structure.md b/www/apps/docs/content/development/backend/directory-structure.md index dd39230b3b..9cb3f05bf4 100644 --- a/www/apps/docs/content/development/backend/directory-structure.md +++ b/www/apps/docs/content/development/backend/directory-structure.md @@ -85,11 +85,11 @@ These are the directories present at the root of your Medusa backend. ### .cache -This directory will only be available if you have the Medusa admin installed and you’ve already started your Medusa backend at least once before. It holds all cached files related to building the Medusa admin assets. +This directory will only be available if you have the Medusa Admin installed and you’ve already started your Medusa backend at least once before. It holds all cached files related to building the Medusa Admin assets. ### build -This directory will only be available if you have the Medusa admin installed and you’ve either built your admin files or ran the Medusa backend at least once before. It holds the built files that are used to serve the admin in your browser. +This directory will only be available if you have the Medusa Admin installed and you’ve either built your admin files or ran the Medusa backend at least once before. It holds the built files that are used to serve the admin in your browser. ### data @@ -129,10 +129,10 @@ If any of these directories are not available, you can create them yourself. ### admin -This directory holds all Medusa admin customizations. The main subdirectories of this directory are: +This directory holds all Medusa Admin customizations. The main subdirectories of this directory are: -- `widgets`: Holds all [Medusa admin widgets](../../admin/widgets.md). -- `routes`: Holds all [Medusa admin UI routes](../../admin/routes.md). +- `widgets`: Holds all [Medusa Admin widgets](../../admin/widgets.md). +- `routes`: Holds all [Medusa Admin UI routes](../../admin/routes.md). ### api diff --git a/www/apps/docs/content/development/cache/create.md b/www/apps/docs/content/development/cache/create.md index 07bd9b8879..6b00575421 100644 --- a/www/apps/docs/content/development/cache/create.md +++ b/www/apps/docs/content/development/cache/create.md @@ -10,7 +10,7 @@ In this document, you will learn how to build your own Medusa cache module. Medusa provides ready-made modules for cache, including in-memory and Redis modules. If you prefer another technology used for caching in your commerce application, you can build a module locally and use it in your Medusa backend. You can also publish to NPM and reuse it across multiple Medusa backend instances. -In this document, you will learn how to build your own Medusa cache module based on Memcached as an example. This gives you a real-life example of creating the cache module. You can follow the general steps with any other caching system or service. +In this document, you will learn how to build your own Medusa cache module based on Memcached as an example. This gives you a real-life example of creating the Cache Module. You can follow the general steps with any other caching system or service. --- @@ -250,7 +250,7 @@ module.exports = { Make sure to replace the `path/to/custom-module` with a relative path from your Medusa backend to your module. You can learn more about module reference in the [Create Module documentation](../modules/create.mdx#module-reference). -You can also add any necessary options to the module. The options added in the example above are relevant to the memcached module and you can replace them with your own options. +You can also add any necessary options to the module. The options added in the example above are relevant to the Memcached Module and you can replace them with your own options. Then, to test the module, run the Medusa backend which also runs your module: diff --git a/www/apps/docs/content/development/cache/modules/redis.md b/www/apps/docs/content/development/cache/modules/redis.md index 7b1f33f689..6487e00e91 100644 --- a/www/apps/docs/content/development/cache/modules/redis.md +++ b/www/apps/docs/content/development/cache/modules/redis.md @@ -10,7 +10,7 @@ In this document, you’ll learn about the Redis cache module and how you can in Medusa’s modular architecture allows developers to extend or replace the logic used for [caching](../overview.mdx). You can create a custom module, or you can use the modules Medusa provides. -One of these modules is the Redis module. This module allows you to utilize Redis for the caching functionality. This document will you guide you through installing the Redis module. +One of these modules is the Redis Module. This module allows you to utilize Redis for the caching functionality. This document will you guide you through installing the Redis Module. --- diff --git a/www/apps/docs/content/development/events/modules/redis.md b/www/apps/docs/content/development/events/modules/redis.md index 68a249169a..c12c3d64d9 100644 --- a/www/apps/docs/content/development/events/modules/redis.md +++ b/www/apps/docs/content/development/events/modules/redis.md @@ -11,9 +11,9 @@ In this document, you’ll learn about the Redis events module and how you can i Medusa’s modular architecture allows developers to extend or completely replace the logic used for events. You can create a custom module, or you can use the modules Medusa provides. -One of these modules is the Redis module. This module allows you to utilize Redis for the event bus functionality. When installed, the Medusa’s events system is powered by BullMQ and `io-redis`. BullMQ is responsible for the message queue and worker, and `io-redis` is the underlying Redis client that BullMQ connects to for events storage. +One of these modules is the Redis Module. This module allows you to utilize Redis for the event bus functionality. When installed, the Medusa’s events system is powered by BullMQ and `io-redis`. BullMQ is responsible for the message queue and worker, and `io-redis` is the underlying Redis client that BullMQ connects to for events storage. -This document will you guide you through installing the Redis module. +This document will you guide you through installing the Redis Module. --- diff --git a/www/apps/docs/content/development/modules/overview.mdx b/www/apps/docs/content/development/modules/overview.mdx index 3e9bc2b334..3a9d7463bc 100644 --- a/www/apps/docs/content/development/modules/overview.mdx +++ b/www/apps/docs/content/development/modules/overview.mdx @@ -13,7 +13,7 @@ In this document, you’ll learn what Modules are and how can you use them durin Modules are self-contained, reusable pieces of code that encapsulate specific functionality or features within an ecommerce application. They foster separation of concerns, maintainability, and reusability by organizing code into smaller, independent units that can be easily managed, tested, and integrated with other modules. -Modules further increase Medusa’s extensibility. commerce modules, such as the cart engine, can be extended or entirely replaced with your own custom logic. They can also run independently of the core Medusa package, allowing you to utilize the commerce module within a larger commerce ecosystem. For example, you can use the Order module as an Order Management System (OMS) without using Medusa’s core. +Modules further increase Medusa’s extensibility. commerce modules, such as the cart engine, can be extended or entirely replaced with your own custom logic. They can also run independently of the core Medusa package, allowing you to utilize the commerce module within a larger commerce ecosystem. For example, you can use the Order Module as an Order Management System (OMS) without using Medusa’s core. This also applies to core logic such as caching or events systems. You can use modules to integrate any logic or third-party service to handle this logic. This gives you greater flexibility in how you choose your tech stack. diff --git a/www/apps/docs/content/development/overview.mdx b/www/apps/docs/content/development/overview.mdx index b76c357a38..f324d4ab3b 100644 --- a/www/apps/docs/content/development/overview.mdx +++ b/www/apps/docs/content/development/overview.mdx @@ -199,7 +199,7 @@ By installing a Module in your project and expose its APIs based on the framewor ### Full-Fledged Ecommerce System -Developers can use Medusa’s toolkit to create their ecommerce system. With the use of the [create-medusa-app](../create-medusa-app.mdx) command, developers can set up a Medusa Backend, Medusa admin, and a storefront. +Developers can use Medusa’s toolkit to create their ecommerce system. With the use of the [create-medusa-app](../create-medusa-app.mdx) command, developers can set up a Medusa Backend, Medusa Admin, and a storefront. ![Full-Fledged Ecommerce System](https://res.cloudinary.com/dza7lstvk/image/upload/v1697707368/Medusa%20Docs/Diagrams/Social_Media_Graphics_vosikk.jpg) diff --git a/www/apps/docs/content/experimental/pricing/concepts.md b/www/apps/docs/content/experimental/pricing/concepts.md index ebe32735e4..3e5f9cd8eb 100644 --- a/www/apps/docs/content/experimental/pricing/concepts.md +++ b/www/apps/docs/content/experimental/pricing/concepts.md @@ -1,6 +1,6 @@ # Pricing Concepts -In this document, you’ll learn about the main concepts in the Pricing module, and how data is stored and related. +In this document, you’ll learn about the main concepts in the Pricing Module, and how data is stored and related. ## Money Amount @@ -74,10 +74,10 @@ Each rule of a price list can have more than one value, representing its values ## Use Case Example: Pricing and Product Modules -In a real use case, you would use the pricing module with your custom logic or other Medusa Commerce Modules, such as the Product Module. +In a real use case, you would use the Pricing Module with your custom logic or other Medusa Commerce Modules, such as the Product Module. When used with the Product Module, a product variant’s prices are stored as money amounts belonging to a price set. A relation is formed between the `ProductVariant` and the `PriceSet` when the modules are linked. -![A diagram showcasing an example of how resources 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/v1700574189/Medusa%20Docs/Diagrams/pricing-product_jcsjt0.jpg) +![A diagram showcasing an example of how resources from the Pricing and Product module are linked. The PriceSet is linked to the ProductVariant of the Pricing Module.](https://res.cloudinary.com/dza7lstvk/image/upload/v1700574189/Medusa%20Docs/Diagrams/pricing-product_jcsjt0.jpg) So, when you want to add prices for a product variant, you create a price set and add the prices as money amounts 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. diff --git a/www/apps/docs/content/experimental/pricing/examples.mdx b/www/apps/docs/content/experimental/pricing/examples.mdx index 1f9532a687..d917998ee1 100644 --- a/www/apps/docs/content/experimental/pricing/examples.mdx +++ b/www/apps/docs/content/experimental/pricing/examples.mdx @@ -4,7 +4,7 @@ import TabItem from '@theme/TabItem'; # Examples of Pricing Module -In this document, you’ll find common examples of how you can use the Pricing module in your application. +In this document, you’ll find common examples of how you can use the Pricing Module in your application. ## Create a Price Set diff --git a/www/apps/docs/content/experimental/pricing/install-medusa.mdx b/www/apps/docs/content/experimental/pricing/install-medusa.mdx index 80c10d0a6f..40752f4f92 100644 --- a/www/apps/docs/content/experimental/pricing/install-medusa.mdx +++ b/www/apps/docs/content/experimental/pricing/install-medusa.mdx @@ -5,11 +5,11 @@ import TabItem from '@theme/TabItem'; # Install Pricing Module in Medusa -In this document, you'll learn how to install the Pricing module using NPM in the Medusa backend. +In this document, you'll learn how to install the Pricing Module using NPM in the Medusa backend. ## Step 1: Install Module -To install the Pricing module, run the following command in the root directory of the Medusa backend: +To install the Pricing Module, run the following command in the root directory of the Medusa backend: ```bash npm2yarn npm install @medusajs/pricing @@ -19,7 +19,7 @@ npm install @medusajs/pricing ## Step 2: Add Module to Configurations -In `medusa-config.js`, add the pricing module to the exported object under the `modules` property: +In `medusa-config.js`, add the Pricing Module to the exported object under the `modules` property: ```js title=medusa-config.js module.exports = { @@ -153,6 +153,6 @@ For example: ## Start Development -You can refer to the [Example Usages documentation page](./examples.mdx) for examples of using the Pricing module. +You can refer to the [Example Usages documentation page](./examples.mdx) for examples of using the Pricing Module. You can also refer to the [Module Interface Reference](../../references/pricing/interfaces/pricing.IPricingModuleService.mdx) for a detailed reference on all available methods. diff --git a/www/apps/docs/content/experimental/pricing/install-nodejs.md b/www/apps/docs/content/experimental/pricing/install-nodejs.md index f6873ebbb6..675bdad8d4 100644 --- a/www/apps/docs/content/experimental/pricing/install-nodejs.md +++ b/www/apps/docs/content/experimental/pricing/install-nodejs.md @@ -1,10 +1,10 @@ # Install in Node.js-Based Application -In this document, you’ll learn how to setup and use the Pricing module in a Node.js based application. +In this document, you’ll learn how to setup and use the Pricing Module in a Node.js based application. ## Prerequisites -Before installing the Pricing module in your application, make sure you have the following prerequisites: +Before installing the Pricing Module in your application, make sure you have the following prerequisites: - Node.js v16 or greater - PostgreSQL database. You can use an existing Medusa database, or set up a new PostgreSQL database. @@ -13,7 +13,7 @@ Before installing the Pricing module in your application, make sure you have the ## Install Package -In your Node.js-based applications, such as a Next.js application, you can install the Pricing module with the following command: +In your Node.js-based applications, such as a Next.js application, you can install the Pricing Module with the following command: ```bash npm2yarn npm install @medusajs/pricing @@ -161,7 +161,7 @@ npm run price:seed ## Next.js Application: Adjust Configurations -The Pricing module uses dependencies that aren’t Webpack optimized. Since Next.js uses Webpack for compilation, you need to add the Pricing module as an external dependency. +The Pricing Module uses dependencies that aren’t Webpack optimized. Since Next.js uses Webpack for compilation, you need to add the Pricing Module as an external dependency. To do that, add the `serverComponentsExternalPackages` option in `next.config.js`: @@ -183,6 +183,6 @@ module.exports = nextConfig ## Start Development -You can refer to the [Example Usages documentation page](./examples.mdx) for examples of using the Pricing module. +You can refer to the [Example Usages documentation page](./examples.mdx) for examples of using the Pricing Module. You can also refer to the [Module Interface Reference](../../references/pricing/interfaces/pricing.IPricingModuleService.mdx) for a detailed reference on all available methods. \ No newline at end of file diff --git a/www/apps/docs/content/experimental/pricing/overview.mdx b/www/apps/docs/content/experimental/pricing/overview.mdx index a8d87ac47e..e250a9495c 100644 --- a/www/apps/docs/content/experimental/pricing/overview.mdx +++ b/www/apps/docs/content/experimental/pricing/overview.mdx @@ -3,13 +3,13 @@ import Icons from '@theme/Icon' # Pricing Module Overview -The Pricing module is the `@medusajs/pricing` NPM package that provides advanced pricing features in your Medusa and Node.js applications. It can be used to add prices to any resource, such as products or shipping options. +The Pricing Module is the `@medusajs/pricing` NPM package that provides advanced pricing features in your Medusa and Node.js applications. It can be used to add prices to any resource, such as products or shipping options. ## Features ### Price Management -With the Product module, you can store the prices of a resource and manage them through the main interface method. Prices are grouped in a price set, allowing you to add more than one price for a resource based on different conditions, such as currency code. +With the Pricing Module, you can store the prices of a resource and manage them through the main interface method. Prices are grouped in a price set, allowing you to add more than one price for a resource based on different conditions, such as currency code. ```ts const priceSet = await pricingService.create({ @@ -102,7 +102,7 @@ const price = await pricingService.calculatePrices( The Pricing Module can be used in many use cases, including: -- Medusa Backend: The Medusa backend uses the pricing module to implement some features. However, it's guarded by the [experimental feature flag](../index.md#enabling-experimental-features). If you want to use the pricing module in your backend's customizations, follow [this installation guide](./install-medusa.mdx). +- Medusa Backend: The Medusa backend uses the Pricing Module to implement some features. However, it's guarded by the [experimental feature flag](../index.md#enabling-experimental-features). If you want to use the Pricing Module in your backend's customizations, follow [this installation guide](./install-medusa.mdx). - Serverless Application: Use the Pricing Module in a serverless application, such as a Next.js application, without having to manage a fully-fledged ecommerce system. You can use it by [installing it in your Node.js project as an NPM package](./install-nodejs.md). - Node.js Application: Use the Pricing Module in any Node.js application. Follow [this guide](./install-nodejs.md) to learn how to install it. @@ -116,7 +116,7 @@ The Pricing Module can be used in many use cases, including: label: 'Pricing Concepts', customProps: { icon: Icons['academic-cap-solid'], - description: 'Learn about the main concepts in the Pricing module.' + description: 'Learn about the main concepts in the Pricing Module.' } }} /> diff --git a/www/apps/docs/content/experimental/pricing/prices-calculation.mdx b/www/apps/docs/content/experimental/pricing/prices-calculation.mdx index f13a3f94f4..4efc70081c 100644 --- a/www/apps/docs/content/experimental/pricing/prices-calculation.mdx +++ b/www/apps/docs/content/experimental/pricing/prices-calculation.mdx @@ -3,7 +3,7 @@ import TabItem from "@theme/TabItem" # Prices Calculation -In this document, you'll learn how prices are calculated under the hood when you use the `calculatePrices` method of the Pricing module interface. +In this document, you'll learn how prices are calculated under the hood when you use the `calculatePrices` method of the Pricing Module interface. ## Overview diff --git a/www/apps/docs/content/experimental/product/examples.mdx b/www/apps/docs/content/experimental/product/examples.mdx index 3cb41e1128..e6bf5b5eff 100644 --- a/www/apps/docs/content/experimental/product/examples.mdx +++ b/www/apps/docs/content/experimental/product/examples.mdx @@ -3,7 +3,7 @@ import TabItem from '@theme/TabItem'; # Examples of Product Module -In this document, you’ll find common examples of how you can use the Product module in your application. +In this document, you’ll find common examples of how you can use the Product Module in your application. ## Create Product diff --git a/www/apps/docs/content/experimental/product/install-medusa.mdx b/www/apps/docs/content/experimental/product/install-medusa.mdx index 56b1332ebf..a7fb88dd8b 100644 --- a/www/apps/docs/content/experimental/product/install-medusa.mdx +++ b/www/apps/docs/content/experimental/product/install-medusa.mdx @@ -5,11 +5,11 @@ import TabItem from '@theme/TabItem'; # Install Product Module in Medusa -In this document, you'll learn how to install the Product module using NPM in the Medusa backend. +In this document, you'll learn how to install the Product Module using NPM in the Medusa backend. ## Step 1: Install Module -To install the Product module, run the following command in the root directory of the Medusa backend: +To install the Product Module, run the following command in the root directory of the Medusa backend: ```bash npm2yarn npm install @medusajs/product @@ -19,7 +19,7 @@ npm install @medusajs/product ## Step 2: Add Module to Configurations -In `medusa-config.js`, add the product module to the exported object under the `modules` property: +In `medusa-config.js`, add the Product Module to the exported object under the `modules` property: ```js title=medusa-config.js module.exports = { @@ -148,6 +148,6 @@ For example: ## Start Development -You can refer to the [Example Usages documentation page](./examples.mdx) for examples of using the Product module. +You can refer to the [Example Usages documentation page](./examples.mdx) for examples of using the Product Module. You can also refer to the [Module Interface Reference](../../references/product/interfaces/product.IProductModuleService.mdx) for a detailed reference on all available methods. \ No newline at end of file diff --git a/www/apps/docs/content/experimental/product/install-nodejs.md b/www/apps/docs/content/experimental/product/install-nodejs.md index b6e0055419..0f070b64b5 100644 --- a/www/apps/docs/content/experimental/product/install-nodejs.md +++ b/www/apps/docs/content/experimental/product/install-nodejs.md @@ -1,10 +1,10 @@ # Install in Node.js-Based Application -In this document, you’ll learn how to setup and use the Product module in a Node.js based application. +In this document, you’ll learn how to setup and use the Product Module in a Node.js based application. ## Prerequisites -Before installing the Product module in your application, make sure you have the following prerequisites: +Before installing the Product Module in your application, make sure you have the following prerequisites: - Node.js v16 or greater - PostgreSQL database. You can use an existing Medusa database, or set up a new PostgreSQL database. @@ -13,7 +13,7 @@ Before installing the Product module in your application, make sure you have the ## Install Package -In your Node.js-based applications, such as a Next.js application, you can install the Product module with the following command: +In your Node.js-based applications, such as a Next.js application, you can install the Product Module with the following command: ```bash npm2yarn npm install @medusajs/product @@ -172,7 +172,7 @@ npm run product:seed ## Next.js Application: Adjust Configurations -The Product module uses dependencies that aren’t Webpack optimized. Since Next.js uses Webpack for compilation, you need to add the Product module as an external dependency. +the Product Module uses dependencies that aren’t Webpack optimized. Since Next.js uses Webpack for compilation, you need to add the Product Module as an external dependency. To do that, add the `serverComponentsExternalPackages` option in `next.config.js`: @@ -193,6 +193,6 @@ module.exports = nextConfig ## Start Development -You can refer to the [Example Usages documentation page](./examples.mdx) for examples of using the Product module. +You can refer to the [Example Usages documentation page](./examples.mdx) for examples of using the Product Module. You can also refer to the [Module Interface Reference](../../references/product/interfaces/product.IProductModuleService.mdx) for a detailed reference on all available methods. diff --git a/www/apps/docs/content/experimental/product/overview.mdx b/www/apps/docs/content/experimental/product/overview.mdx index 491c6e473a..329067fc76 100644 --- a/www/apps/docs/content/experimental/product/overview.mdx +++ b/www/apps/docs/content/experimental/product/overview.mdx @@ -3,13 +3,13 @@ import Icons from '@theme/Icon' # Product Module Overview -The Product module is the `@medusajs/product` NPM package that provides product-related features in your Medusa and Node.js applications. It can be used to store products with variants, organize them into categories and collections, and more. +the Product Module is the `@medusajs/product` NPM package that provides product-related features in your Medusa and Node.js applications. It can be used to store products with variants, organize them into categories and collections, and more. ## Features ### Products Management -With the Product module, you can store products and manage them through the main interface methods. Products can have custom options, such as color or size, and each variant in the product sets the value for these options. +With the Product Module, you can store products and manage them through the main interface methods. Products can have custom options, such as color or size, and each variant in the product sets the value for these options. ```ts const products = await productService.create([ @@ -36,7 +36,7 @@ const products = await productService.create([ ### Product Organizations -The Product module provides different entities that can be used to organize products, including categories, collections, tags, and more. +the Product Module provides different entities that can be used to organize products, including categories, collections, tags, and more. ```ts const category = await productService.createCategory({ @@ -61,7 +61,7 @@ const products = await productService.update([ The Product Module can be used in many use cases, including: -- Medusa Backend: The Medusa backend uses the product module to implement some product features. However, it's guarded by the [experimental feature flag](../index.md#enabling-experimental-features). If you want to use the product module in your backend's customizations, follow [this installation guide](./install-medusa.mdx). +- Medusa Backend: The Medusa backend uses the Product Module to implement some product features. However, it's guarded by the [experimental feature flag](../index.md#enabling-experimental-features). If you want to use the Product Module in your backend's customizations, follow [this installation guide](./install-medusa.mdx). - Serverless Application: Use the Product Module in a serverless application, such as a Next.js application, without having to manage a fully-fledged ecommerce system. You can use it by [installing it in your Node.js project as an NPM package](./install-nodejs.md). - Node.js Application: Use the Product Module in any Node.js application. Follow [this guide](./install-nodejs.md) to learn how to install it. diff --git a/www/apps/docs/content/homepage.mdx b/www/apps/docs/content/homepage.mdx index b3e86201a1..66d05aac6e 100644 --- a/www/apps/docs/content/homepage.mdx +++ b/www/apps/docs/content/homepage.mdx @@ -55,7 +55,7 @@ Medusa provides the essential building blocks that developers can put together t label: 'User Guide', customProps: { icon: Icons['users-solid'], - description: 'No-code guides to help users manage their ecommerce stores using the Medusa admin.' + description: 'No-code guides to help users manage their ecommerce stores using the Medusa Admin.' } } ]} /> diff --git a/www/apps/docs/content/js-client/overview.mdx b/www/apps/docs/content/js-client/overview.mdx index f6b7f02636..92b4e8a49d 100644 --- a/www/apps/docs/content/js-client/overview.mdx +++ b/www/apps/docs/content/js-client/overview.mdx @@ -98,7 +98,7 @@ The client accepts the following options on initialization: | `maxRetries` | `0` | The amount of times a request is retried. | | `baseUrl` | `'http://localhost:9000'` | The url to which requests are made to. | | `apiKey` | `''` | Optional API key used for authenticating admin requests. | -| `publishableApiKey` | `''` | Optional publishable API key used for storefront requests. You can create a publishable API key either using the [admin APIs](../development/publishable-api-keys/admin/manage-publishable-api-keys.mdx) or the [Medusa admin](../user-guide/settings/publishable-api-keys.mdx). | +| `publishableApiKey` | `''` | Optional publishable API key used for storefront requests. You can create a publishable API key either using the [admin APIs](../development/publishable-api-keys/admin/manage-publishable-api-keys.mdx) or the [Medusa Admin](../user-guide/settings/publishable-api-keys.mdx). | | `customHeaders` | `{}` | Optional headers to attach to every request. | @@ -268,7 +268,7 @@ You can learn more about publishable API keys and how to use them in [this docum ### Create a Publishable API Key -You can create a publishable API key either using the [admin REST APIs](../development/publishable-api-keys/admin/manage-publishable-api-keys.mdx), or using the [Medusa admin dashboard](../user-guide/settings/publishable-api-keys.mdx). +You can create a publishable API key either using the [admin REST APIs](../development/publishable-api-keys/admin/manage-publishable-api-keys.mdx), or using the [Medusa Admin dashboard](../user-guide/settings/publishable-api-keys.mdx). ### Use a Publishable API Key diff --git a/www/apps/docs/content/medusa-react/overview.mdx b/www/apps/docs/content/medusa-react/overview.mdx index b4035e98e3..a700d2d24b 100644 --- a/www/apps/docs/content/medusa-react/overview.mdx +++ b/www/apps/docs/content/medusa-react/overview.mdx @@ -9,7 +9,7 @@ import TabItem from '@theme/TabItem'; [Medusa React](https://www.npmjs.com/package/medusa-react) is a React library that provides a set of utilities and hooks for interacting seamlessly with the Medusa backend. -For example, if you're creating a storefront with frameworks like Nuxt, you can send requests to the backend using this client. You can also use it in your Medusa admin customizations. +For example, if you're creating a storefront with frameworks like Nuxt, you can send requests to the backend using this client. You can also use it in your Medusa Admin customizations. This reference provides details on the available hooks, providers, and utilities, including examples of each. @@ -326,7 +326,7 @@ You can learn more about publishable API keys and how to use them in [this docum ### Create a Publishable API Key -You can create a publishable API key either using the [admin REST APIs](../development/publishable-api-keys/admin/manage-publishable-api-keys.mdx), or using the [Medusa admin dashboard](../user-guide/settings/publishable-api-keys.mdx). +You can create a publishable API key either using the [admin REST APIs](../development/publishable-api-keys/admin/manage-publishable-api-keys.mdx), or using the [Medusa Admin dashboard](../user-guide/settings/publishable-api-keys.mdx). ### Use a Publishable API Key diff --git a/www/apps/docs/content/modules/carts-and-checkout/cart.md b/www/apps/docs/content/modules/carts-and-checkout/cart.md index 7a18f4ba19..ea581c0ade 100644 --- a/www/apps/docs/content/modules/carts-and-checkout/cart.md +++ b/www/apps/docs/content/modules/carts-and-checkout/cart.md @@ -86,7 +86,7 @@ The process is implemented as follows: 1. When the idempotency key’s recovery point is set to `started`, the tax lines are created for the items in the cart. This is done using the `CartService`'s [createTaxLines method](../../references/services/classes/services.CartService.mdx#createtaxlines). If that is completed with no errors, the recovery point is set to `tax_lines_created` and the process continues. 2. When the idempotency key’s recovery point is set to `tax_lines_created`, the payment is authorized using the `CartService`'s method [authorizePayment](../../references/services/classes/services.CartService.mdx#authorizepayment). If the payment requires more action or is pending authorization, then the tax lines that were created in the previous steps are deleted and the cart completion process is terminated. Once the payment is authorized, the process can be restarted. 3. When the idempotency key’s recovery point is set to `payment_authorized`, tax lines are created again the same way as the first step. Then, the inventory of each of the items in the cart is confirmed using the `ProductVariantInventoryService`'s method [confirmInventory](../../references/services/classes/services.ProductVariantInventoryService.mdx#confirminventory). If an item is in stock, the quantity is reserved using the `ProductVariantInventoryService`'s method [reserveQuantity](../../references/services/classes/services.ProductVariantInventoryService.mdx#reservequantity). If an item is out of stock, any item reservations that were created are deleted, the payment is canceled, and an error is thrown, terminating the cart completion process. If all item quantities are confirmed to be available: - 1. If the cart belongs to a swap (the `type` attribute is set to `swap`), the swap is registered as completed using the `SwapService`'s [registerCartCompletion method](../../references/services/classes/services.SwapService.mdx#registercartcompletion) and the inventory item reservations are removed using the Inventory module. The process ends successfully here for a swap. + 1. If the cart belongs to a swap (the `type` attribute is set to `swap`), the swap is registered as completed using the `SwapService`'s [registerCartCompletion method](../../references/services/classes/services.SwapService.mdx#registercartcompletion) and the inventory item reservations are removed using the Inventory Module. The process ends successfully here for a swap. 2. If the cart belongs to an order, the order is created using the `OrderService`'s method [createFromCart](../../references/services/classes/services.OrderService.mdx#createfromcart). The order is then retrieved and sent in the response. 4. Once the process detailed above is done, the idempotency key’s recovery point is set to `finished`. diff --git a/www/apps/docs/content/modules/multiwarehouse/admin/manage-inventory-items.mdx b/www/apps/docs/content/modules/multiwarehouse/admin/manage-inventory-items.mdx index 04ef6f4725..975829dbfd 100644 --- a/www/apps/docs/content/modules/multiwarehouse/admin/manage-inventory-items.mdx +++ b/www/apps/docs/content/modules/multiwarehouse/admin/manage-inventory-items.mdx @@ -31,7 +31,7 @@ It is assumed that you already have a Medusa backend installed and set up. If no ### Required Module -This guide assumes you have the Inventory module installed on your Medusa backend. If not, you can learn how to install it using [this guide](../install-modules.md#inventory-module). +This guide assumes you have the Inventory Module installed on your Medusa backend. If not, you can learn how to install it using [this guide](../install-modules.md#inventory-module). Furthermore, inventory levels are tied to a location ID. So, it’s recommended to use the [Stock Location module](../install-modules.md#stock-location-module) if you don’t have any location logic implemented in place. @@ -568,7 +568,7 @@ You can create a location level by sending a request to the [Create Inventory Le This API Route requires the inventory item ID as a path parameter. In the request body, it requires the following parameters: -- `location_id`: The ID of the location associated with this location level. This ID is typically available through using the stock location module. +- `location_id`: The ID of the location associated with this location level. This ID is typically available through using the Stock Location Module. - `stocked_quantity`: A number indicating the item’s quantity in stock. You can also pass other optional request body parameters, as explained in the [API reference](https://docs.medusajs.com/api/admin#inventory-items_postinventoryitemsinventoryitemlocationlevels). diff --git a/www/apps/docs/content/modules/multiwarehouse/backend/create-inventory-service.md b/www/apps/docs/content/modules/multiwarehouse/backend/create-inventory-service.md index a0e6a77d49..7739ba9a26 100644 --- a/www/apps/docs/content/modules/multiwarehouse/backend/create-inventory-service.md +++ b/www/apps/docs/content/modules/multiwarehouse/backend/create-inventory-service.md @@ -19,7 +19,7 @@ This guide will only explain what is required to create in your custom inventory :::note -It should be noted that the Medusa backend expects the inventory module to have entities for an inventory item, an inventory level, and a reservation item, as it uses the IDs of those entities when orchestrating between different modules and the in the API Routes it exposes. You can learn more about this in the [Inventory Module Architecture documentation](../inventory-module.md). +It should be noted that the Medusa backend expects the Inventory Module to have entities for an inventory item, an inventory level, and a reservation item, as it uses the IDs of those entities when orchestrating between different modules and the in the API Routes it exposes. You can learn more about this in the [Inventory Module Architecture documentation](../inventory-module.md). ::: diff --git a/www/apps/docs/content/modules/multiwarehouse/backend/create-stock-location-service.md b/www/apps/docs/content/modules/multiwarehouse/backend/create-stock-location-service.md index b5d848c114..708c0cc000 100644 --- a/www/apps/docs/content/modules/multiwarehouse/backend/create-stock-location-service.md +++ b/www/apps/docs/content/modules/multiwarehouse/backend/create-stock-location-service.md @@ -19,7 +19,7 @@ This guide will only explain what is required to create in your custom stock loc :::note -It should be noted that the Medusa backend expects the stock location module to have entities for a location and a location address, as it uses the IDs of those entities when orchestrating between different modules and the in the API Routes it exposes. You can learn more about this in the [Stock Location Module Architecture documentation](../stock-location-module.md). +It should be noted that the Medusa backend expects the Stock Location Module to have entities for a location and a location address, as it uses the IDs of those entities when orchestrating between different modules and the in the API Routes it exposes. You can learn more about this in the [Stock Location Module Architecture documentation](../stock-location-module.md). ::: diff --git a/www/apps/docs/content/modules/multiwarehouse/install-modules.md b/www/apps/docs/content/modules/multiwarehouse/install-modules.md index c18aa12393..af422182a9 100644 --- a/www/apps/docs/content/modules/multiwarehouse/install-modules.md +++ b/www/apps/docs/content/modules/multiwarehouse/install-modules.md @@ -24,7 +24,7 @@ npm install @medusajs/inventory ### Step 2: Add Inventory Module to Configurations -In `medusa-config.js`, add the inventory module to the exported object under the `modules` property: +In `medusa-config.js`, add the Inventory Module to the exported object under the `modules` property: ```js module.exports = { @@ -48,7 +48,7 @@ npx medusa migrations run ### Step 4: Run Migration Script -After installing the Stock Location module, make sure to [run the migration script](#run-migration-script) +After installing the Stock Location Module, make sure to [run the migration script](#run-migration-script) --- @@ -64,7 +64,7 @@ npm install @medusajs/stock-location ### Step 2: Add Stock Location Module to Configurations -In `medusa-config.js`, add the stock location module to the exported object under the `modules` property: +In `medusa-config.js`, add the Stock Location Module to the exported object under the `modules` property: ```js module.exports = { @@ -100,4 +100,4 @@ After installing both modules, run the following command to migrate current prod node ./node_modules/@medusajs/medusa/dist/scripts/migrate-inventory-items.js ``` -You can now start the Medusa backend and use the stock location module in your commerce application. +You can now start the Medusa backend and use the Stock Location Module in your commerce application. diff --git a/www/apps/docs/content/modules/multiwarehouse/inventory-module.md b/www/apps/docs/content/modules/multiwarehouse/inventory-module.md index b2a4c1128d..03d3218b5c 100644 --- a/www/apps/docs/content/modules/multiwarehouse/inventory-module.md +++ b/www/apps/docs/content/modules/multiwarehouse/inventory-module.md @@ -1,16 +1,16 @@ --- -description: "In this document, you’ll learn about the inventory module, how it works, and its relation to other processes in your commerce application." +description: "In this document, you’ll learn about the Inventory Module, how it works, and its relation to other processes in your commerce application." --- # Inventory Module -In this document, you’ll learn about the inventory module and how it works. +In this document, you’ll learn about the Inventory Module and how it works. ## Overview -The inventory module includes all functionalities related to product inventory. It implements inventory management for a product, confirming whether a product is available across inventory levels, and updating the inventory availability of a product variant at different points in the order lifecycle. +The Inventory Module includes all functionalities related to product inventory. It implements inventory management for a product, confirming whether a product is available across inventory levels, and updating the inventory availability of a product variant at different points in the order lifecycle. -Medusa's Inventory module is a standalone module that can be used in any commerce application, not just in a Medusa backend. This document gives a general overview of how the inventory module is designed, then explains how the Medusa core orchestrates relations and processes around this module when it's used with the Medusa backend. +Medusa's Inventory module is a standalone module that can be used in any commerce application, not just in a Medusa backend. This document gives a general overview of how the Inventory Module is designed, then explains how the Medusa core orchestrates relations and processes around this module when it's used with the Medusa backend. --- @@ -51,7 +51,7 @@ The `ReservationItem` entity has the following notable attributes, among others: ## How the Module Integrates into Medusa -This section explains how the Medusa backend uses the inventory module along with its entities and other modules, and in its processes. +This section explains how the Medusa backend uses the Inventory Module along with its entities and other modules, and in its processes. ### Entities Relation Overview @@ -61,23 +61,23 @@ When you use Medusa's Inventory Module, the Medusa backend uses the `ProductVari ![Inventory Item's Relation to Product Variants in the Medusa Backend](https://res.cloudinary.com/dza7lstvk/image/upload/v1680185070/Medusa%20Docs/Diagrams/inventory-item-medusa-diagram_i21ht8.jpg) -The Medusa backend also orchestrates between the installed inventory and stock location modules. The association between an Inventory Level and a location is handled by passing the ID of a location from the stock location module to the inventory module when an Inventory Level is being created. When using Medusa's [Stock Location module](./stock-location-module.md), the entity representing the location is `StockLocation`. +The Medusa backend also orchestrates between the installed inventory and stock location modules. The association between an Inventory Level and a location is handled by passing the ID of a location from the Stock Location Module to the Inventory Module when an Inventory Level is being created. When using Medusa's [Stock Location module](./stock-location-module.md), the entity representing the location is `StockLocation`. ![Inventory Level's relation to Stock Location Module in the Medusa Backend](https://res.cloudinary.com/dza7lstvk/image/upload/v1680185151/Medusa%20Docs/Diagrams/inventory-medusa-diagram_ltojt9.jpg) -Similarly, the Medusa backend associates the `ReservationItem` entity with a line item and a location by passing the IDs of each to the inventory module when a reservation item is created. +Similarly, the Medusa backend associates the `ReservationItem` entity with a line item and a location by passing the IDs of each to the Inventory Module when a reservation item is created. ### Product Variant Creation Process -In the Medusa backend, when a product variant that has an enabled `manage_inventory` attribute is created, the backend uses the inventory module to automatically create an inventory item along with the product variant. When the inventory item is created, the Medusa backend attaches it to the product variant using the `ProductVariantInventoryItem` entity as explained earlier. +In the Medusa backend, when a product variant that has an enabled `manage_inventory` attribute is created, the backend uses the Inventory Module to automatically create an inventory item along with the product variant. When the inventory item is created, the Medusa backend attaches it to the product variant using the `ProductVariantInventoryItem` entity as explained earlier. -The Medusa backend uses the inventory module to create Inventory Levels when the admin sets the available quantity of a product variant in a stock location. +The Medusa backend uses the Inventory Module to create Inventory Levels when the admin sets the available quantity of a product variant in a stock location. ### Cart and Checkout -During the cart and checkout workflow, for example when a product variant is added to the cart or during cart validation, the Medusa backend uses the inventory module to confirm that items in the cart have sufficient stock to be purchased in the desired quantity. If a product variant doesn't have an inventory item, which is the case when the `manage_inventory` attribute of the variant is disabled, the variant is assumed to be available in stock. +During the cart and checkout workflow, for example when a product variant is added to the cart or during cart validation, the Medusa backend uses the Inventory Module to confirm that items in the cart have sufficient stock to be purchased in the desired quantity. If a product variant doesn't have an inventory item, which is the case when the `manage_inventory` attribute of the variant is disabled, the variant is assumed to be available in stock. -As an inventory item can exist in multiple locations, the inventory module checks across those locations. The Medusa backend retrieves the locations based on the sales channel of the cart, as each location is associated with a sales channel, and passes them along to the inventory module to perform the checking. +As an inventory item can exist in multiple locations, the Inventory Module checks across those locations. The Medusa backend retrieves the locations based on the sales channel of the cart, as each location is associated with a sales channel, and passes them along to the Inventory Module to perform the checking. :::tip @@ -85,18 +85,18 @@ You can learn more about the relation between Stock Locations and Sales Channels ::: -Then, the inventory module confirms that the product variant has sufficient quantity across these locations by summing all the `stocked_quantity` of the inventory levels associated with these locations. When retrieving the `stocked_quantity` of each of the inventory levels, the `reserved_quantity` is subtracted from it to ensure accurate availability. +Then, the Inventory Module confirms that the product variant has sufficient quantity across these locations by summing all the `stocked_quantity` of the inventory levels associated with these locations. When retrieving the `stocked_quantity` of each of the inventory levels, the `reserved_quantity` is subtracted from it to ensure accurate availability. ### Order Placement -When an order is placed, the Medusa backend uses the inventory module to reserve the ordered quantity of line items that are associated with product variants having an enabled `manage_inventory` attribute. The reserved quantity is indicated by creating a reservation item for each line item, associating it with its inventory item and a stock location. +When an order is placed, the Medusa backend uses the Inventory Module to reserve the ordered quantity of line items that are associated with product variants having an enabled `manage_inventory` attribute. The reserved quantity is indicated by creating a reservation item for each line item, associating it with its inventory item and a stock location. The Medusa backend chooses the stock location randomly from the available stock locations associated with the order’s sales channel. The admin can later change which stock location the item will be fulfilled from. ### Order Fulfillment -When an item in the order is fulfilled, and the item is associated with a product variant that has an enabled `manage_inventory`, the Medusa backend uses the inventory module to subtract the inventory level's `reserved_quantity` from the `stocked_quantity`. The inventory module also resets the `reserved_quantity` to `0`. +When an item in the order is fulfilled, and the item is associated with a product variant that has an enabled `manage_inventory`, the Medusa backend uses the Inventory Module to subtract the inventory level's `reserved_quantity` from the `stocked_quantity`. The Inventory Module also resets the `reserved_quantity` to `0`. ### Order Return -When an item in the order is returned, and the item is associated with a product variant that has an enabled `manage_inventory`, the Medusa backend uses the inventory module to increment the inventory level's `stocked_quantity` with the returned amount. +When an item in the order is returned, and the item is associated with a product variant that has an enabled `manage_inventory`, the Medusa backend uses the Inventory Module to increment the inventory level's `stocked_quantity` with the returned amount. diff --git a/www/apps/docs/content/modules/multiwarehouse/overview.mdx b/www/apps/docs/content/modules/multiwarehouse/overview.mdx index 2ff20acf24..2b4d78cb9c 100644 --- a/www/apps/docs/content/modules/multiwarehouse/overview.mdx +++ b/www/apps/docs/content/modules/multiwarehouse/overview.mdx @@ -60,7 +60,7 @@ Admins can manage the stock locations, which are the places they store their pro label: 'User Guide: Manage Stock Locations', customProps: { icon: Icons['users-solid'], - description: 'Learn how to manage stock locations in Medusa admin.' + description: 'Learn how to manage stock locations in Medusa Admin.' } }, { @@ -85,7 +85,7 @@ Admins can manage the inventory of product variants across the different stock l label: 'User Guide: Manage Inventory', customProps: { icon: Icons['users-solid'], - description: 'Learn how to manage inventory using the Medusa admin.' + description: 'Learn how to manage inventory using the Medusa Admin.' } }, { @@ -110,7 +110,7 @@ Admins can manage item allocations to choose which stock location to fulfill ite label: 'User Guide: Manage Allocations in Orders', customProps: { icon: Icons['users-solid'], - description: 'Learn how to manage allocations of items in an order using the Medusa admin.' + description: 'Learn how to manage allocations of items in an order using the Medusa Admin.' } }, { diff --git a/www/apps/docs/content/modules/multiwarehouse/stock-location-module.md b/www/apps/docs/content/modules/multiwarehouse/stock-location-module.md index 50decf73b1..dca9dc9eda 100644 --- a/www/apps/docs/content/modules/multiwarehouse/stock-location-module.md +++ b/www/apps/docs/content/modules/multiwarehouse/stock-location-module.md @@ -1,16 +1,16 @@ --- -description: "In this document, you’ll learn about the inventory module, how it works, and its relation to other processes in your commerce application." +description: "In this document, you’ll learn about the Inventory Module, how it works, and its relation to other processes in your commerce application." --- # Stock Location Module -In this document, you’ll learn about the Stock Location module and how it works. +In this document, you’ll learn about the Stock Location Module and how it works. ## Overview -A stock location indicates a physical address that stock-kept items can be stored in. The Stock Location module handles functionalities related to managing stock locations and their addresses. +A stock location indicates a physical address that stock-kept items can be stored in. The Stock Location Module handles functionalities related to managing stock locations and their addresses. -Medusa's Stock Location module is a standalone module that can be used in any commerce application, not just in a Medusa backend. This document gives a general overview of how the stock location module is designed, and highlights how the Medusa core orchestrates relations around this module when it's used with the Medusa backend. +Medusa's Stock Location module is a standalone module that can be used in any commerce application, not just in a Medusa backend. This document gives a general overview of how the Stock Location Module is designed, and highlights how the Medusa core orchestrates relations around this module when it's used with the Medusa backend. --- @@ -30,7 +30,7 @@ The `StockLocationAddress` entity belongs to the `StockLocation` entity. It is u ## How the Module Integrates into Medusa -This section explains how the Medusa backend uses the stock location module along with its entities and other modules. +This section explains how the Medusa backend uses the Stock Location Module along with its entities and other modules. ### Entities Relation Overview @@ -48,7 +48,7 @@ The Medusa backend also orchestrates between different modules. The [Inventory M - `InventoryLevel`: This entity is used to indicate the stocked quantity of an inventory item in a stock location. As explained in the [Inventory Module documentation](./inventory-module.md#inventorylevel), the `InventoryLevel` entity has an attribute `location_id`. - `ReservationItem`: This entity is used to indicate the reserved quantity of an inventory item in a stock location. As explained in the [Inventory Module documentation](./inventory-module.md#reservationitem), the `ReservationItem` entity has an attribute `location_id`. -When both modules are used within the Medusa backend, the Medusa backend bridges between these modules by passing the ID of a `StockLocation` from the stock location module to the inventory module, and the inventory module uses the ID in its entities. +When both modules are used within the Medusa backend, the Medusa backend bridges between these modules by passing the ID of a `StockLocation` from the Stock Location Module to the Inventory Module, and the Inventory Module uses the ID in its entities. ### Relation to SalesChannel @@ -58,6 +58,6 @@ As the `StockLocation` and `SalesChannel` entities are available in separate mod This relation is used across the Medusa backend and within checkout and order workflows: -- When checking the availability of an inventory item during checkout, the Medusa backend retrieves the location IDs that are associated with the cart’s sales channel using the `SalesChannelLocation`, then passes it along to the inventory module to perform the quantity check. -- When an order is placed, the Medusa backend retrieves the location IDs that are associated with the cart’s sales channel using the `SalesChannelLocation` entity, and passes it to the inventory module that reserves the ordered quantity of the inventory item from that location. The admin can later change the stock location if necessary. -- When an item in an order is fulfilled, the admin chooses a stock location to fulfill the item from. Similarly, when an item in an order is returned, the admin can choose a stock location to return the item to. The Medusa backend then passes the ID of the location from the stock module to the inventory module to perform inventory management functionalities. +- When checking the availability of an inventory item during checkout, the Medusa backend retrieves the location IDs that are associated with the cart’s sales channel using the `SalesChannelLocation`, then passes it along to the Inventory Module to perform the quantity check. +- When an order is placed, the Medusa backend retrieves the location IDs that are associated with the cart’s sales channel using the `SalesChannelLocation` entity, and passes it to the Inventory Module that reserves the ordered quantity of the inventory item from that location. The admin can later change the stock location if necessary. +- When an item in an order is fulfilled, the admin chooses a stock location to fulfill the item from. Similarly, when an item in an order is returned, the admin can choose a stock location to return the item to. The Medusa backend then passes the ID of the location from the Stock Location Module to the Inventory Module to perform inventory management functionalities. diff --git a/www/apps/docs/content/modules/orders/fulfillments.md b/www/apps/docs/content/modules/orders/fulfillments.md index 25030f82bc..8e93ed35a6 100644 --- a/www/apps/docs/content/modules/orders/fulfillments.md +++ b/www/apps/docs/content/modules/orders/fulfillments.md @@ -21,7 +21,7 @@ When a fulfillment is created for one or more item, shipments can then be create Some of the `Fulfillment` entity’s attributes include: - `provider_id`: a string indicating the ID of the fulfillment provider that processes this fulfillment. You can also access the provider by expanding the `provider` relation and accessing `fulfillment.provider`. -- `location_id`: a string indicating where the fulfillment is being made from. When paired with the Stock Location module in the Medusa backend, this would be the ID of a `StockLocation`. +- `location_id`: a string indicating where the fulfillment is being made from. When paired with the Stock Location Module in the Medusa backend, this would be the ID of a `StockLocation`. - `no_notification`: a boolean value indicating whether the customer should receive notifications for fulfillment updates. - `data`: an object that can hold any data relevant for the fulfillment provider. - `shipped_at`: a date indicating when the fulfillment was shipped. diff --git a/www/apps/docs/content/modules/orders/overview.mdx b/www/apps/docs/content/modules/orders/overview.mdx index f70ad20d5a..14ace0f1d4 100644 --- a/www/apps/docs/content/modules/orders/overview.mdx +++ b/www/apps/docs/content/modules/orders/overview.mdx @@ -48,7 +48,7 @@ Customers can view their previous orders. label: 'User Guide: Export Orders', customProps: { icon: Icons['users-solid'], - description: 'Export orders into CSV files in Medusa admin.' + description: 'Export orders into CSV files in Medusa Admin.' } }, ]} /> diff --git a/www/apps/docs/content/modules/orders/storefront/handle-order-edits.mdx b/www/apps/docs/content/modules/orders/storefront/handle-order-edits.mdx index b77c090dbc..8553035751 100644 --- a/www/apps/docs/content/modules/orders/storefront/handle-order-edits.mdx +++ b/www/apps/docs/content/modules/orders/storefront/handle-order-edits.mdx @@ -200,7 +200,7 @@ In case the customer wants to confirm the order edit, you must check whether a r ### Refund Amount -If `difference_due` is less than 0, then the amount will be refunded to the customer by the merchant from the Medusa admin. No additional actions are required here before [completing the order edit](#complete-the-order-edit). +If `difference_due` is less than 0, then the amount will be refunded to the customer by the merchant from the Medusa Admin. No additional actions are required here before [completing the order edit](#complete-the-order-edit). ### Make Additional Payments diff --git a/www/apps/docs/content/modules/products/products.mdx b/www/apps/docs/content/modules/products/products.mdx index 0df8bb7e7c..b41aa6c6a7 100644 --- a/www/apps/docs/content/modules/products/products.mdx +++ b/www/apps/docs/content/modules/products/products.mdx @@ -135,7 +135,7 @@ For zero-decimal currencies, the amount is still stored as an integer without mu This logic of formatting the price is not handled in the backend. So, when you add a product variant using the Admin APIs, you must format the price as explained earlier. The backend stores the price as received from API requests. -In addition, the Medusa admin dashboard and the Next.js Starter Template expect the price to be of that format, so when prices are displayed for currencies that are stored multiplied by a `100`, such as USD, they’re divided by a hundred. Also, when you add or update a product variant, its price is sent to the Medusa backend as the price multiplied by a hundred. +In addition, the Medusa Admin dashboard and the Next.js Starter Template expect the price to be of that format, so when prices are displayed for currencies that are stored multiplied by a `100`, such as USD, they’re divided by a hundred. Also, when you add or update a product variant, its price is sent to the Medusa backend as the price multiplied by a hundred. ### Displaying the Product Variant’s Price diff --git a/www/apps/docs/content/modules/taxes/storefront/manual-calculation.md b/www/apps/docs/content/modules/taxes/storefront/manual-calculation.md index f691e72a5b..be5dfb9243 100644 --- a/www/apps/docs/content/modules/taxes/storefront/manual-calculation.md +++ b/www/apps/docs/content/modules/taxes/storefront/manual-calculation.md @@ -8,7 +8,7 @@ In this document, you’ll learn how to manually calculate taxes during checkout ## Overview -By default, taxes are automatically calculated by Medusa during checkout. This behavior can be disabled for a region using the Admin APIs or the Medusa admin to limit the requests being sent to a tax provider. +By default, taxes are automatically calculated by Medusa during checkout. This behavior can be disabled for a region using the Admin APIs or the Medusa Admin to limit the requests being sent to a tax provider. If you disable this behavior, you must manually trigger taxes calculation. When taxes are calculated, this means that requests will be sent to the tax provider to retrieve the tax rates. diff --git a/www/apps/docs/content/plugins/cms/strapi.md b/www/apps/docs/content/plugins/cms/strapi.md index 17d6786e5a..3ca4ef6280 100644 --- a/www/apps/docs/content/plugins/cms/strapi.md +++ b/www/apps/docs/content/plugins/cms/strapi.md @@ -81,7 +81,7 @@ DATABASE_SCHEMA=public 1. Change `APP_KEYS`, `API_TOKEN_SALT`, `JWT_SECRET`, and `ADMIN_JWT_SECRET` to a random and unique string. These keys are used by Strapi to sign session cookies, generate API tokens, and more. 2. Change `MEDUSA_STRAPI_SECRET` to a random unique string. The value of this environment variable is used later in your Medusa configurations. 3. Change `MEDUSA_BACKEND_URL` to the URL of your Medusa backend. If you’re running it locally, it should be `http://localhost:9000`. -4. Change `MEDUSA_BACKEND_ADMIN` to the URL of your Medusa admin. If you’re running it locally, it should be `http://localhost:7001`. +4. Change `MEDUSA_BACKEND_ADMIN` to the URL of your Medusa Admin. If you’re running it locally, it should be `http://localhost:7001`. 5. Change the following environment variables to define the Strapi super user: 1. `SUPERUSER_EMAIL`: the super user’s email. By default, it’s `support@medusa-commerce.com`. 2. `SUPERUSER_USERNAME`: the super user’s username. By default, it’s `SuperUser`. @@ -209,7 +209,7 @@ info: Strapi Subscriber Initialized ### Two-Way Syncing -To test syncing data from Medusa to Strapi, try creating or updating a product either using the Medusa admin or the [REST APIs](https://docs.medusajs.com/api/admin#products_postproducts). This triggers the associated event in Medusa, which makes the updates in Strapi. +To test syncing data from Medusa to Strapi, try creating or updating a product either using the Medusa Admin or the [REST APIs](https://docs.medusajs.com/api/admin#products_postproducts). This triggers the associated event in Medusa, which makes the updates in Strapi. :::tip diff --git a/www/apps/docs/content/plugins/notifications/sendgrid.mdx b/www/apps/docs/content/plugins/notifications/sendgrid.mdx index ecfab0e1b6..41c0901d1a 100644 --- a/www/apps/docs/content/plugins/notifications/sendgrid.mdx +++ b/www/apps/docs/content/plugins/notifications/sendgrid.mdx @@ -4064,4 +4064,4 @@ You don’t have to create a template for every type in the reference. You can s ## See Also - [Notifications Overview](../../development/notification/overview.mdx) -- Install the [Medusa admin](../../admin/quickstart.mdx) for functionalities like Gift Cards creation, swaps, claims, order return requests, and more. +- Install the [Medusa Admin](../../admin/quickstart.mdx) for functionalities like Gift Cards creation, swaps, claims, order return requests, and more. diff --git a/www/apps/docs/content/plugins/notifications/twilio-sms.md b/www/apps/docs/content/plugins/notifications/twilio-sms.md index 60cfdefcaf..ebfac65184 100644 --- a/www/apps/docs/content/plugins/notifications/twilio-sms.md +++ b/www/apps/docs/content/plugins/notifications/twilio-sms.md @@ -135,4 +135,4 @@ If you’re on a Twilio trial make sure that the phone number you entered on che ## See Also - [Notifications Overview](../../development/notification/overview.mdx). -- Install the [Medusa admin](../../admin/quickstart.mdx) for functionalities like Gift Cards creation, swaps, claims, order return requests, and more. +- Install the [Medusa Admin](../../admin/quickstart.mdx) for functionalities like Gift Cards creation, swaps, claims, order return requests, and more. diff --git a/www/apps/docs/content/plugins/other/discount-generator.md b/www/apps/docs/content/plugins/other/discount-generator.md index c05ca11aff..b372ad45d3 100644 --- a/www/apps/docs/content/plugins/other/discount-generator.md +++ b/www/apps/docs/content/plugins/other/discount-generator.md @@ -53,7 +53,7 @@ So, to test out the API Route, run the following command in the root of your pro npx medusa develop ``` -Then, create a dynamic discount. You can do that either using the [Medusa admin](../../user-guide/discounts/create.mdx) which is available (if installed) at `http://localhost:7001` after starting the backend, or using the [Admin REST APIs](../../modules/discounts/admin/manage-discounts.mdx). +Then, create a dynamic discount. You can do that either using the [Medusa Admin](../../user-guide/discounts/create.mdx) which is available (if installed) at `http://localhost:7001` after starting the backend, or using the [Admin REST APIs](../../modules/discounts/admin/manage-discounts.mdx). After that, send a `POST` request to the `/discount-code` API Route, passing the `discount_code` parameter in the request body with the value being the code of the dynamic discount you just created. A new discount will be created with the same attributes as the dynamic discount code and returned in the response. diff --git a/www/apps/docs/content/plugins/other/restock-notifications.md b/www/apps/docs/content/plugins/other/restock-notifications.md index 2d5c093361..ecb3516078 100644 --- a/www/apps/docs/content/plugins/other/restock-notifications.md +++ b/www/apps/docs/content/plugins/other/restock-notifications.md @@ -28,9 +28,9 @@ Before you follow this guide, you must have a Medusa backend installed. If not, ### Event-Bus Module -To trigger events to the subscribed handler functions, you must have an event-bus module installed. For development purposes, you can use the [Local module](../../development/events/modules/local.md) which should be enabled by default in your Medusa backend. +To trigger events to the subscribed handler functions, you must have an event-bus module installed. For development purposes, you can use the [Local Module](../../development/events/modules/local.md) which should be enabled by default in your Medusa backend. -For production, it's recommended to use the [Redis module](../../development/events/modules/redis.md). +For production, it's recommended to use the [Redis Module](../../development/events/modules/redis.md). --- @@ -100,7 +100,7 @@ The API Route accepts the following request body parameters: After subscribing to the out-of-stock variant, change its stock quantity to the minimum inventory required to test out the event trigger. The new stock quantity should be any value above `0` if you didn't set the `inventory_required` option. -You can use the [Medusa admin](../../user-guide/products/manage.mdx#manage-product-variants) or the [Admin REST API Routes](https://docs.medusajs.com/api/admin#products_postproductsproductvariantsvariant) to update the quantity. +You can use the [Medusa Admin](../../user-guide/products/manage.mdx#manage-product-variants) or the [Admin REST API Routes](https://docs.medusajs.com/api/admin#products_postproductsproductvariantsvariant) to update the quantity. After you update the quantity, you can see the `restock-notification.restocked` triggered and logged in the Medusa backend logs. If you've implemented the notification sending, this is where it'll be triggered and a notification will be sent. diff --git a/www/apps/docs/content/plugins/payment/paypal.md b/www/apps/docs/content/plugins/payment/paypal.md index 8ca8c20ddd..10edf5e83c 100644 --- a/www/apps/docs/content/plugins/payment/paypal.md +++ b/www/apps/docs/content/plugins/payment/paypal.md @@ -87,13 +87,13 @@ The PayPal plugin also accepts the following optional configurations: ## Admin Setup -This section will guide you through adding PayPal as a payment processor in a region using your Medusa admin dashboard. +This section will guide you through adding PayPal as a payment processor in a region using your Medusa Admin dashboard. This step is required for you to be able to use PayPal as a payment processor in your storefront. ### Admin Prerequisites -If you don’t have a Medusa admin installed, make sure to follow along with [the guide on how to install it](../../admin/quickstart.mdx) before continuing with this section. +If you don’t have a Medusa Admin installed, make sure to follow along with [the guide on how to install it](../../admin/quickstart.mdx) before continuing with this section. ### Add PayPal to Regions diff --git a/www/apps/docs/content/plugins/payment/stripe.mdx b/www/apps/docs/content/plugins/payment/stripe.mdx index cf56140ba8..2431bbfa74 100644 --- a/www/apps/docs/content/plugins/payment/stripe.mdx +++ b/www/apps/docs/content/plugins/payment/stripe.mdx @@ -119,13 +119,13 @@ STRIPE_WEBHOOK_SECRET=whsec_... ## Admin Setup -This section will guide you through adding Stripe as a payment processor in a region using your Medusa admin dashboard. +This section will guide you through adding Stripe as a payment processor in a region using your Medusa Admin dashboard. This step is required for you to be able to use Stripe as a payment processor in your storefront. ### Admin Prerequisites -If you don’t have a Medusa admin installed, make sure to follow along with [the guide on how to install it](https://github.com/medusajs/admin#-quickstart) before continuing with this section. +If you don’t have a Medusa Admin installed, make sure to follow along with [the guide on how to install it](https://github.com/medusajs/admin#-quickstart) before continuing with this section. ### Add Stripe to Regions diff --git a/www/apps/docs/content/recipes/b2b.mdx b/www/apps/docs/content/recipes/b2b.mdx index e14c1d8ae5..a7c8b095ca 100644 --- a/www/apps/docs/content/recipes/b2b.mdx +++ b/www/apps/docs/content/recipes/b2b.mdx @@ -25,7 +25,7 @@ Medusa’s commerce features, including sales channels, customer groups, and pri In Medusa, a sales channel allows you to set product availability per channel. In this case, you can create a B2B sales channel that will include only B2B products. -You can create a sales channel through the Medusa admin or Admin REST APIs. +You can create a sales channel through the Medusa Admin or Admin REST APIs. diff --git a/www/apps/docs/content/recipes/digital-products.mdx b/www/apps/docs/content/recipes/digital-products.mdx index 8f9e7a2df2..3ca73f2a3f 100644 --- a/www/apps/docs/content/recipes/digital-products.mdx +++ b/www/apps/docs/content/recipes/digital-products.mdx @@ -548,7 +548,7 @@ Creating an API Route also requires creating a service, which is a class that ty ## Customize Admin Dashboard -The Medusa admin dashboard provides merchants with an easy-to-use interface to manage their store's data and settings. It's also extendable, so you can add widgets, pages, and setting pages relevant to your use case. +The Medusa Admin dashboard provides merchants with an easy-to-use interface to manage their store's data and settings. It's also extendable, so you can add widgets, pages, and setting pages relevant to your use case. To add an interface that allows the admin user to upload digital products, you can create custom widgets or pages that use the routes you created. You can use the [Protected Files Upload API Route](https://docs.medusajs.com/api/admin#uploads_postuploadsprotected). @@ -559,7 +559,7 @@ To add an interface that allows the admin user to upload digital products, you c label: 'Create a Widget', customProps: { icon: Icons['academic-cap-solid'], - description: 'Learn how to create a widget in the Medusa admin.', + description: 'Learn how to create a widget in the Medusa Admin.', } }, { @@ -568,7 +568,7 @@ To add an interface that allows the admin user to upload digital products, you c label: 'Create UI Route', customProps: { icon: Icons['academic-cap-solid'], - description: 'Learn how to create a UI route in the Medusa admin.', + description: 'Learn how to create a UI route in the Medusa Admin.', } }, { diff --git a/www/apps/docs/content/recipes/ecommerce.mdx b/www/apps/docs/content/recipes/ecommerce.mdx index d9007e078d..3dc60a2bdc 100644 --- a/www/apps/docs/content/recipes/ecommerce.mdx +++ b/www/apps/docs/content/recipes/ecommerce.mdx @@ -97,7 +97,7 @@ You can now deploy your storefront. The instructions defer whether you're using ## Explore Features and Development Resources -Our documentation includes guides related to Medusa's features and how to customize your store. You can learn about how to add new features to your storefront and backend, how to customize existing features, or how to use the Medusa admin to perform different ecommerce functionalities. +Our documentation includes guides related to Medusa's features and how to customize your store. You can learn about how to add new features to your storefront and backend, how to customize existing features, or how to use the Medusa Admin to perform different ecommerce functionalities. diff --git a/www/apps/docs/content/recipes/multi-region.mdx b/www/apps/docs/content/recipes/multi-region.mdx index e693fce062..f8406985a1 100644 --- a/www/apps/docs/content/recipes/multi-region.mdx +++ b/www/apps/docs/content/recipes/multi-region.mdx @@ -165,7 +165,7 @@ A multi-regional setup lets you manage your inventory through Medusa across the label: 'Manage Stock Locations', customProps: { icon: Icons['users-solid'], - description: 'Learn how to manage stock locations in the Medusa admin.', + description: 'Learn how to manage stock locations in the Medusa Admin.', } }, { @@ -174,7 +174,7 @@ A multi-regional setup lets you manage your inventory through Medusa across the label: 'Manage Inventory', customProps: { icon: Icons['users-solid'], - description: 'Learn how to manage inventory in the Medusa admin.', + description: 'Learn how to manage inventory in the Medusa Admin.', } }, ]} /> diff --git a/www/apps/docs/content/recipes/personalized-products.mdx b/www/apps/docs/content/recipes/personalized-products.mdx index ec675e9114..33ce647b51 100644 --- a/www/apps/docs/content/recipes/personalized-products.mdx +++ b/www/apps/docs/content/recipes/personalized-products.mdx @@ -129,7 +129,7 @@ If you stored the personalized data in the `metadata` of the Line Items, those s In the case that you’ve created a custom entity or extended a core entity, you can create a custom API Route that handles retrieving the personalization data. If the entity you’ve created or customized is associated with the Order entity, you can alternatively expand it similarly to the `items` relation. -If you want to show the personalized data in the Medusa admin, you can extend the Medusa admin to add a widget, a UI route, or a setting page and show the personalized data. +If you want to show the personalized data in the Medusa Admin, you can extend the Medusa Admin to add a widget, a UI route, or a setting page and show the personalized data. diff --git a/www/apps/docs/content/recipes/pos.mdx b/www/apps/docs/content/recipes/pos.mdx index 03ec3c3982..1fb1eca5e8 100644 --- a/www/apps/docs/content/recipes/pos.mdx +++ b/www/apps/docs/content/recipes/pos.mdx @@ -216,7 +216,7 @@ Medusa's architecture allows you to integrate any third-party payment processor Once you accept the payment, you can place an order in the POS system using the [Draft Order APIs](https://docs.medusajs.com/api/admin#draft-orders). Draft orders provide similar features to an online checkout experience, including discounts, payment processing, and more. -Then, merchants can view all orders coming from different sales channels using the Medusa admin dashboard. This keeps logistics and order handling consistent and allows businesses to provide return and exchange features to online and in-store customers. +Then, merchants can view all orders coming from different sales channels using the Medusa Admin dashboard. This keeps logistics and order handling consistent and allows businesses to provide return and exchange features to online and in-store customers. diff --git a/www/apps/docs/content/references/_index.mdx b/www/apps/docs/content/references/_index.mdx index 99aba10cbe..463c1b39ae 100644 --- a/www/apps/docs/content/references/_index.mdx +++ b/www/apps/docs/content/references/_index.mdx @@ -1,3 +1,3 @@ -import ParameterTypes from "@site/src/components/ParameterTypes" +import TypeList from "@site/src/components/TypeList" # Medusa References diff --git a/www/apps/docs/content/references/entities/classes/entities.Address.mdx b/www/apps/docs/content/references/entities/classes/entities.Address.mdx index 52769b31f3..613e3e59e6 100644 --- a/www/apps/docs/content/references/entities/classes/entities.Address.mdx +++ b/www/apps/docs/content/references/entities/classes/entities.Address.mdx @@ -3,7 +3,7 @@ displayed_sidebar: entitiesSidebar slug: /references/entities/classes/Address --- -import ParameterTypes from "@site/src/components/ParameterTypes" +import TypeList from "@site/src/components/TypeList" # Address @@ -11,4 +11,4 @@ An address is used across the Medusa backend within other schemas and object typ ## Properties -`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="Address"/> +`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="Address"/> diff --git a/www/apps/docs/content/references/entities/classes/entities.AnalyticsConfig.mdx b/www/apps/docs/content/references/entities/classes/entities.AnalyticsConfig.mdx index d86da720cf..f5798243a2 100644 --- a/www/apps/docs/content/references/entities/classes/entities.AnalyticsConfig.mdx +++ b/www/apps/docs/content/references/entities/classes/entities.AnalyticsConfig.mdx @@ -3,10 +3,10 @@ displayed_sidebar: entitiesSidebar slug: /references/entities/classes/AnalyticsConfig --- -import ParameterTypes from "@site/src/components/ParameterTypes" +import TypeList from "@site/src/components/TypeList" # AnalyticsConfig ## Properties - + diff --git a/www/apps/docs/content/references/entities/classes/entities.BatchJob.mdx b/www/apps/docs/content/references/entities/classes/entities.BatchJob.mdx index c35e7ecd81..004efd915c 100644 --- a/www/apps/docs/content/references/entities/classes/entities.BatchJob.mdx +++ b/www/apps/docs/content/references/entities/classes/entities.BatchJob.mdx @@ -3,7 +3,7 @@ displayed_sidebar: entitiesSidebar slug: /references/entities/classes/BatchJob --- -import ParameterTypes from "@site/src/components/ParameterTypes" +import TypeList from "@site/src/components/TypeList" # BatchJob @@ -11,4 +11,4 @@ A Batch Job indicates an asynchronus task stored in the Medusa backend. Its stat ## Properties -`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"context","type":"`Record`","description":"The context of the batch job, the type of the batch job determines what the context should contain.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"result","type":"`object` & `Record`","description":"The result of the batch job.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"count","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"advancement_count","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"progress","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"errors","type":"(`string` \\| [BatchJobResultError](../../medusa/types/medusa.BatchJobResultError.mdx))[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"stat_descriptors","type":"[BatchJobResultStatDescriptor](../../medusa/types/medusa.BatchJobResultStatDescriptor.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"file_key","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"file_size","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"dry_run","type":"`boolean`","description":"Specify if the job must apply the modifications or not.","optional":false,"defaultValue":"false","expandable":false,"children":[]},{"name":"status","type":"[BatchJobStatus](../../medusa/enums/medusa.BatchJobStatus.mdx)","description":"The status of the batch job.","optional":false,"defaultValue":"created","expandable":false,"children":[{"name":"CREATED","type":"`\"created\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"PRE_PROCESSED","type":"`\"pre_processed\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"CONFIRMED","type":"`\"confirmed\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"PROCESSING","type":"`\"processing\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"COMPLETED","type":"`\"completed\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"CANCELED","type":"`\"canceled\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"FAILED","type":"`\"failed\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"pre_processed_at","type":"`Date`","description":"The date from which the job has been pre-processed.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"processing_at","type":"`Date`","description":"The date the job is processing at.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"confirmed_at","type":"`Date`","description":"The date when the confirmation has been done.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"completed_at","type":"`Date`","description":"The date of the completion.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`Date`","description":"The date of the concellation.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"failed_at","type":"`Date`","description":"The date when the job failed.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="BatchJob"/> +`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"context","type":"`Record`","description":"The context of the batch job, the type of the batch job determines what the context should contain.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"result","type":"`object` & `Record`","description":"The result of the batch job.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"count","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"advancement_count","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"progress","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"errors","type":"(`string` \\| [BatchJobResultError](../../medusa/types/medusa.BatchJobResultError.mdx))[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"stat_descriptors","type":"[BatchJobResultStatDescriptor](../../medusa/types/medusa.BatchJobResultStatDescriptor.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"file_key","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"file_size","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"dry_run","type":"`boolean`","description":"Specify if the job must apply the modifications or not.","optional":false,"defaultValue":"false","expandable":false,"children":[]},{"name":"status","type":"[BatchJobStatus](../../medusa/enums/medusa.BatchJobStatus.mdx)","description":"The status of the batch job.","optional":false,"defaultValue":"created","expandable":false,"children":[{"name":"CREATED","type":"`\"created\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"PRE_PROCESSED","type":"`\"pre_processed\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"CONFIRMED","type":"`\"confirmed\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"PROCESSING","type":"`\"processing\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"COMPLETED","type":"`\"completed\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"CANCELED","type":"`\"canceled\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"FAILED","type":"`\"failed\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"pre_processed_at","type":"`Date`","description":"The date from which the job has been pre-processed.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"processing_at","type":"`Date`","description":"The date the job is processing at.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"confirmed_at","type":"`Date`","description":"The date when the confirmation has been done.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"completed_at","type":"`Date`","description":"The date of the completion.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`Date`","description":"The date of the concellation.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"failed_at","type":"`Date`","description":"The date when the job failed.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="BatchJob"/> diff --git a/www/apps/docs/content/references/entities/classes/entities.Cart.mdx b/www/apps/docs/content/references/entities/classes/entities.Cart.mdx index d63507b6ee..a6b4c9a790 100644 --- a/www/apps/docs/content/references/entities/classes/entities.Cart.mdx +++ b/www/apps/docs/content/references/entities/classes/entities.Cart.mdx @@ -3,7 +3,7 @@ displayed_sidebar: entitiesSidebar slug: /references/entities/classes/Cart --- -import ParameterTypes from "@site/src/components/ParameterTypes" +import TypeList from "@site/src/components/TypeList" # Cart @@ -11,4 +11,4 @@ A cart represents a virtual shopping bag. It can be used to complete an order, a ## Properties -`","description":"The context of the cart which can include info like IP or user agent.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The sales channel ID the cart is associated with.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel","type":"[SalesChannel](entities.SalesChannel.mdx)","description":"The details of the sales channel associated with the cart.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"sales_channels","type":"[SalesChannel](entities.SalesChannel.mdx)[]","description":"The associated sales channels.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"shipping_total","type":"`number`","description":"The total of shipping","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_total","type":"`number`","description":"The total of discount rounded","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_discount_total","type":"`number`","description":"The total of discount","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`null` \\| `number`","description":"The total of items with taxes","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_tax_total","type":"`null` \\| `number`","description":"The total of shipping with taxes","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_total","type":"`null` \\| `number`","description":"The total of tax","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"refunded_total","type":"`number`","description":"The total amount refunded if the order associated with this cart is returned.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"total","type":"`number`","description":"The total amount of the cart","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"subtotal","type":"`number`","description":"The subtotal of the cart","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"refundable_amount","type":"`number`","description":"The amount that can be refunded","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"gift_card_total","type":"`number`","description":"The total of gift cards","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"gift_card_tax_total","type":"`number`","description":"The total of gift cards with taxes","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="Cart"/> +`","description":"The context of the cart which can include info like IP or user agent.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The sales channel ID the cart is associated with.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel","type":"[SalesChannel](entities.SalesChannel.mdx)","description":"The details of the sales channel associated with the cart.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"sales_channels","type":"[SalesChannel](entities.SalesChannel.mdx)[]","description":"The associated sales channels.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"shipping_total","type":"`number`","description":"The total of shipping","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_total","type":"`number`","description":"The total of discount rounded","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_discount_total","type":"`number`","description":"The total of discount","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`null` \\| `number`","description":"The total of items with taxes","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_tax_total","type":"`null` \\| `number`","description":"The total of shipping with taxes","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_total","type":"`null` \\| `number`","description":"The total of tax","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"refunded_total","type":"`number`","description":"The total amount refunded if the order associated with this cart is returned.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"total","type":"`number`","description":"The total amount of the cart","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"subtotal","type":"`number`","description":"The subtotal of the cart","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"refundable_amount","type":"`number`","description":"The amount that can be refunded","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"gift_card_total","type":"`number`","description":"The total of gift cards","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"gift_card_tax_total","type":"`number`","description":"The total of gift cards with taxes","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="Cart"/> diff --git a/www/apps/docs/content/references/entities/classes/entities.ClaimImage.mdx b/www/apps/docs/content/references/entities/classes/entities.ClaimImage.mdx index 17e4a738e5..520ee130d4 100644 --- a/www/apps/docs/content/references/entities/classes/entities.ClaimImage.mdx +++ b/www/apps/docs/content/references/entities/classes/entities.ClaimImage.mdx @@ -3,7 +3,7 @@ displayed_sidebar: entitiesSidebar slug: /references/entities/classes/ClaimImage --- -import ParameterTypes from "@site/src/components/ParameterTypes" +import TypeList from "@site/src/components/TypeList" # ClaimImage @@ -11,4 +11,4 @@ The details of an image attached to a claim. ## Properties -`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"url","type":"`string`","description":"The URL of the image","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="ClaimImage"/> +`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"url","type":"`string`","description":"The URL of the image","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="ClaimImage"/> diff --git a/www/apps/docs/content/references/entities/classes/entities.ClaimItem.mdx b/www/apps/docs/content/references/entities/classes/entities.ClaimItem.mdx index cb12334d84..9733275fe8 100644 --- a/www/apps/docs/content/references/entities/classes/entities.ClaimItem.mdx +++ b/www/apps/docs/content/references/entities/classes/entities.ClaimItem.mdx @@ -3,7 +3,7 @@ displayed_sidebar: entitiesSidebar slug: /references/entities/classes/ClaimItem --- -import ParameterTypes from "@site/src/components/ParameterTypes" +import TypeList from "@site/src/components/TypeList" # ClaimItem @@ -11,4 +11,4 @@ A claim item is an item created as part of a claim. It references an item in the ## Properties -`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"claim_order_id","type":"`string`","description":"The ID of the claim this item is associated with.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"claim_order","type":"[ClaimOrder](entities.ClaimOrder.mdx)","description":"The details of the claim this item belongs to.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The claim's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[ClaimPaymentStatus](../enums/entities.ClaimPaymentStatus.mdx)","description":"The status of the claim's payment","optional":false,"defaultValue":"na","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[ClaimFulfillmentStatus](../enums/entities.ClaimFulfillmentStatus.mdx)","description":"The claim's fulfillment status","optional":false,"defaultValue":"not_fulfilled","expandable":false,"children":[]},{"name":"claim_items","type":"[ClaimItem](entities.ClaimItem.mdx)[]","description":"The details of the items that should be replaced or refunded.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"additional_items","type":"[LineItem](entities.LineItem.mdx)[]","description":"The details of the new items to be shipped when the claim's type is `replace`","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"type","type":"[ClaimType](../enums/entities.ClaimType.mdx)","description":"The claim's type","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_id","type":"`string`","description":"The ID of the order that the claim comes from.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"[Order](entities.Order.mdx)","description":"The details of the order that this claim was created for.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"return_order","type":"[Return](entities.Return.mdx)","description":"The details of the return associated with the claim if the claim's type is `replace`.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"shipping_address_id","type":"`string`","description":"The ID of the address that the new items should be shipped to","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_address","type":"[Address](entities.Address.mdx)","description":"The details of the address that new items should be shipped to.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"shipping_methods","type":"[ShippingMethod](entities.ShippingMethod.mdx)[]","description":"The details of the shipping methods that the claim order will be shipped with.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"fulfillments","type":"[Fulfillment](entities.Fulfillment.mdx)[]","description":"The fulfillments of the new items to be shipped","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"refund_amount","type":"`number`","description":"The amount that will be refunded in conjunction with the claim","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`Date`","description":"The date with timezone at which the claim was canceled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"no_notification","type":"`boolean`","description":"Flag for describing whether or not notifications related to this should be send.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotency_key","type":"`string`","description":"Randomly generated key used to continue the completion of the cart associated with the claim in case of failure.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"item_id","type":"`string`","description":"The ID of the line item that the claim item refers to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item","type":"[LineItem](entities.LineItem.mdx)","description":"The details of the line item in the original order that this claim item refers to.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The line item's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart_id","type":"`string`","description":"The ID of the cart that the line item may belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart","type":"[Cart](entities.Cart.mdx)","description":"The details of the cart that the line item may belongs to.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"order_id","type":"`null` \\| `string`","description":"The ID of the order that the line item may belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"[Order](entities.Order.mdx)","description":"The details of the order that the line item may belongs to.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"swap_id","type":"`string`","description":"The ID of the swap that the line item may belong to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"swap","type":"[Swap](entities.Swap.mdx)","description":"The details of the swap that the line item may belong to.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"claim_order_id","type":"`string`","description":"The ID of the claim that the line item may belong to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"claim_order","type":"[ClaimOrder](entities.ClaimOrder.mdx)","description":"The details of the claim that the line item may belong to.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"tax_lines","type":"[LineItemTaxLine](entities.LineItemTaxLine.mdx)[]","description":"The details of the item's tax lines.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"adjustments","type":"[LineItemAdjustment](entities.LineItemAdjustment.mdx)[]","description":"The details of the item's adjustments, which are available when a discount is applied on the item.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"title","type":"`string`","description":"The title of the Line Item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"A more detailed description of the contents of the Line Item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"thumbnail","type":"`null` \\| `string`","description":"A URL string to a small image of the contents of the Line Item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_return","type":"`boolean`","description":"Is the item being returned","optional":false,"defaultValue":"false","expandable":false,"children":[]},{"name":"is_giftcard","type":"`boolean`","description":"Flag to indicate if the Line Item is a Gift Card.","optional":false,"defaultValue":"false","expandable":false,"children":[]},{"name":"should_merge","type":"`boolean`","description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","optional":false,"defaultValue":"true","expandable":false,"children":[]},{"name":"allow_discounts","type":"`boolean`","description":"Flag to indicate if the Line Item should be included when doing discount calculations.","optional":false,"defaultValue":"true","expandable":false,"children":[]},{"name":"has_shipping","type":"`null` \\| `boolean`","description":"Flag to indicate if the Line Item has fulfillment associated with it.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"unit_price","type":"`number`","description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_id","type":"`null` \\| `string`","description":"The id of the Product Variant contained in the Line Item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"variant","type":"[ProductVariant](entities.ProductVariant.mdx)","description":"The details of the product variant that this item was created from.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"product_id","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`number`","description":"The quantity of the content in the Line Item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfilled_quantity","type":"`null` \\| `number`","description":"The quantity of the Line Item that has been fulfilled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"returned_quantity","type":"`null` \\| `number`","description":"The quantity of the Line Item that has been returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipped_quantity","type":"`null` \\| `number`","description":"The quantity of the Line Item that has been shipped.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"includes_tax","type":"`boolean`","description":"Indicates if the line item unit\\_price include tax","optional":false,"defaultValue":"false","expandable":false,"featureFlag":"tax_inclusive_pricing","children":[]},{"name":"original_item_id","type":"`null` \\| `string`","description":"The ID of the original line item. This is useful if the line item belongs to a resource that references an order, such as a return or an order edit.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order_edit_id","type":"`null` \\| `string`","description":"The ID of the order edit that the item may belong to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order_edit","type":"`null` \\| [OrderEdit](entities.OrderEdit.mdx)","description":"The details of the order edit.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"refundable","type":"`null` \\| `number`","description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"subtotal","type":"`null` \\| `number`","description":"The subtotal of the line item","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_total","type":"`null` \\| `number`","description":"The total of tax of the line item","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"total","type":"`null` \\| `number`","description":"The total amount of the line item","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"`null` \\| `number`","description":"The original total amount of the line item","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"original_tax_total","type":"`null` \\| `number`","description":"The original tax total amount of the line item","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_total","type":"`null` \\| `number`","description":"The total of discount of the line item rounded","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_discount_total","type":"`null` \\| `number`","description":"The total of discount of the line item","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"gift_card_total","type":"`null` \\| `number`","description":"The total of the gift card of the line item","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"variant_id","type":"`string`","description":"The ID of the product variant that is claimed.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"variant","type":"[ProductVariant](entities.ProductVariant.mdx)","description":"The details of the product variant to potentially replace the item in the original order.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The product variant's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"A title that can be displayed for easy identification of the Product Variant.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"product_id","type":"`string`","description":"The ID of the product that the product variant belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"product","type":"[Product](entities.Product.mdx)","description":"The details of the product that the product variant belongs to.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"prices","type":"[MoneyAmount](entities.MoneyAmount.mdx)[]","description":"The details of the prices of the Product Variant, each represented as a Money Amount. Each Money Amount represents a price in a given currency or a specific Region.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"sku","type":"`null` \\| `string`","description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unique identifer for the item that is to be shipped, and can be referenced across multiple systems.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"barcode","type":"`null` \\| `string`","description":"A generic field for a GTIN number that can be used to identify the Product Variant.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"ean","type":"`null` \\| `string`","description":"An EAN barcode number that can be used to identify the Product Variant.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"upc","type":"`null` \\| `string`","description":"A UPC barcode number that can be used to identify the Product Variant.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_rank","type":"`null` \\| `number`","description":"The ranking of this variant","optional":false,"defaultValue":"0","expandable":false,"children":[]},{"name":"inventory_quantity","type":"`number`","description":"The current quantity of the item that is stocked.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"allow_backorder","type":"`boolean`","description":"Whether the Product Variant should be purchasable when `inventory\\_quantity` is 0.","optional":false,"defaultValue":"false","expandable":false,"children":[]},{"name":"manage_inventory","type":"`boolean`","description":"Whether Medusa should manage inventory for the Product Variant.","optional":false,"defaultValue":"true","expandable":false,"children":[]},{"name":"hs_code","type":"`null` \\| `string`","description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"origin_country","type":"`null` \\| `string`","description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"mid_code","type":"`null` \\| `string`","description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"material","type":"`null` \\| `string`","description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"weight","type":"`null` \\| `number`","description":"The weight of the Product Variant. May be used in shipping rate calculations.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"length","type":"`null` \\| `number`","description":"The length of the Product Variant. May be used in shipping rate calculations.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"height","type":"`null` \\| `number`","description":"The height of the Product Variant. May be used in shipping rate calculations.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"width","type":"`null` \\| `number`","description":"The width of the Product Variant. May be used in shipping rate calculations.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"[ProductOptionValue](entities.ProductOptionValue.mdx)[]","description":"The details of the product options that this product variant defines values for.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"inventory_items","type":"[ProductVariantInventoryItem](entities.ProductVariantInventoryItem.mdx)[]","description":"The details inventory items of the product variant.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"metadata","type":"`null` \\| `Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"purchasable","type":"`boolean`","description":"Only used with the inventory modules.\nA boolean value indicating whether the Product Variant is purchasable.\nA variant is purchasable if:\n - inventory is not managed\n - it has no inventory items\n - it is in stock\n - it is backorderable.\n","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"reason","type":"[ClaimReason](../enums/entities.ClaimReason.mdx)","description":"The reason for the claim","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"MISSING_ITEM","type":"`\"missing_item\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"WRONG_ITEM","type":"`\"wrong_item\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"PRODUCTION_FAILURE","type":"`\"production_failure\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"OTHER","type":"`\"other\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"note","type":"`string`","description":"An optional note about the claim, for additional information","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`number`","description":"The quantity of the item that is being claimed; must be less than or equal to the amount purchased in the original order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tags","type":"[ClaimTag](entities.ClaimTag.mdx)[]","description":"User defined tags for easy filtering and grouping.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The claim tag's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string`","description":"The value that the claim tag holds","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="ClaimItem"/> +`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"claim_order_id","type":"`string`","description":"The ID of the claim this item is associated with.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"claim_order","type":"[ClaimOrder](entities.ClaimOrder.mdx)","description":"The details of the claim this item belongs to.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The claim's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[ClaimPaymentStatus](../enums/entities.ClaimPaymentStatus.mdx)","description":"The status of the claim's payment","optional":false,"defaultValue":"na","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[ClaimFulfillmentStatus](../enums/entities.ClaimFulfillmentStatus.mdx)","description":"The claim's fulfillment status","optional":false,"defaultValue":"not_fulfilled","expandable":false,"children":[]},{"name":"claim_items","type":"[ClaimItem](entities.ClaimItem.mdx)[]","description":"The details of the items that should be replaced or refunded.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"additional_items","type":"[LineItem](entities.LineItem.mdx)[]","description":"The details of the new items to be shipped when the claim's type is `replace`","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"type","type":"[ClaimType](../enums/entities.ClaimType.mdx)","description":"The claim's type","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_id","type":"`string`","description":"The ID of the order that the claim comes from.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"[Order](entities.Order.mdx)","description":"The details of the order that this claim was created for.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"return_order","type":"[Return](entities.Return.mdx)","description":"The details of the return associated with the claim if the claim's type is `replace`.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"shipping_address_id","type":"`string`","description":"The ID of the address that the new items should be shipped to","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_address","type":"[Address](entities.Address.mdx)","description":"The details of the address that new items should be shipped to.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"shipping_methods","type":"[ShippingMethod](entities.ShippingMethod.mdx)[]","description":"The details of the shipping methods that the claim order will be shipped with.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"fulfillments","type":"[Fulfillment](entities.Fulfillment.mdx)[]","description":"The fulfillments of the new items to be shipped","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"refund_amount","type":"`number`","description":"The amount that will be refunded in conjunction with the claim","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`Date`","description":"The date with timezone at which the claim was canceled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"no_notification","type":"`boolean`","description":"Flag for describing whether or not notifications related to this should be send.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotency_key","type":"`string`","description":"Randomly generated key used to continue the completion of the cart associated with the claim in case of failure.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"item_id","type":"`string`","description":"The ID of the line item that the claim item refers to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item","type":"[LineItem](entities.LineItem.mdx)","description":"The details of the line item in the original order that this claim item refers to.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The line item's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart_id","type":"`string`","description":"The ID of the cart that the line item may belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart","type":"[Cart](entities.Cart.mdx)","description":"The details of the cart that the line item may belongs to.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"order_id","type":"`null` \\| `string`","description":"The ID of the order that the line item may belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"[Order](entities.Order.mdx)","description":"The details of the order that the line item may belongs to.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"swap_id","type":"`string`","description":"The ID of the swap that the line item may belong to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"swap","type":"[Swap](entities.Swap.mdx)","description":"The details of the swap that the line item may belong to.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"claim_order_id","type":"`string`","description":"The ID of the claim that the line item may belong to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"claim_order","type":"[ClaimOrder](entities.ClaimOrder.mdx)","description":"The details of the claim that the line item may belong to.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"tax_lines","type":"[LineItemTaxLine](entities.LineItemTaxLine.mdx)[]","description":"The details of the item's tax lines.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"adjustments","type":"[LineItemAdjustment](entities.LineItemAdjustment.mdx)[]","description":"The details of the item's adjustments, which are available when a discount is applied on the item.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"title","type":"`string`","description":"The title of the Line Item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"A more detailed description of the contents of the Line Item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"thumbnail","type":"`null` \\| `string`","description":"A URL string to a small image of the contents of the Line Item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_return","type":"`boolean`","description":"Is the item being returned","optional":false,"defaultValue":"false","expandable":false,"children":[]},{"name":"is_giftcard","type":"`boolean`","description":"Flag to indicate if the Line Item is a Gift Card.","optional":false,"defaultValue":"false","expandable":false,"children":[]},{"name":"should_merge","type":"`boolean`","description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","optional":false,"defaultValue":"true","expandable":false,"children":[]},{"name":"allow_discounts","type":"`boolean`","description":"Flag to indicate if the Line Item should be included when doing discount calculations.","optional":false,"defaultValue":"true","expandable":false,"children":[]},{"name":"has_shipping","type":"`null` \\| `boolean`","description":"Flag to indicate if the Line Item has fulfillment associated with it.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"unit_price","type":"`number`","description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_id","type":"`null` \\| `string`","description":"The id of the Product Variant contained in the Line Item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"variant","type":"[ProductVariant](entities.ProductVariant.mdx)","description":"The details of the product variant that this item was created from.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"product_id","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`number`","description":"The quantity of the content in the Line Item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfilled_quantity","type":"`null` \\| `number`","description":"The quantity of the Line Item that has been fulfilled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"returned_quantity","type":"`null` \\| `number`","description":"The quantity of the Line Item that has been returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipped_quantity","type":"`null` \\| `number`","description":"The quantity of the Line Item that has been shipped.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"includes_tax","type":"`boolean`","description":"Indicates if the line item unit\\_price include tax","optional":false,"defaultValue":"false","expandable":false,"featureFlag":"tax_inclusive_pricing","children":[]},{"name":"original_item_id","type":"`null` \\| `string`","description":"The ID of the original line item. This is useful if the line item belongs to a resource that references an order, such as a return or an order edit.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order_edit_id","type":"`null` \\| `string`","description":"The ID of the order edit that the item may belong to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order_edit","type":"`null` \\| [OrderEdit](entities.OrderEdit.mdx)","description":"The details of the order edit.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"refundable","type":"`null` \\| `number`","description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"subtotal","type":"`null` \\| `number`","description":"The subtotal of the line item","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_total","type":"`null` \\| `number`","description":"The total of tax of the line item","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"total","type":"`null` \\| `number`","description":"The total amount of the line item","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"`null` \\| `number`","description":"The original total amount of the line item","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"original_tax_total","type":"`null` \\| `number`","description":"The original tax total amount of the line item","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_total","type":"`null` \\| `number`","description":"The total of discount of the line item rounded","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_discount_total","type":"`null` \\| `number`","description":"The total of discount of the line item","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"gift_card_total","type":"`null` \\| `number`","description":"The total of the gift card of the line item","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"variant_id","type":"`string`","description":"The ID of the product variant that is claimed.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"variant","type":"[ProductVariant](entities.ProductVariant.mdx)","description":"The details of the product variant to potentially replace the item in the original order.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The product variant's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"A title that can be displayed for easy identification of the Product Variant.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"product_id","type":"`string`","description":"The ID of the product that the product variant belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"product","type":"[Product](entities.Product.mdx)","description":"The details of the product that the product variant belongs to.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"prices","type":"[MoneyAmount](entities.MoneyAmount.mdx)[]","description":"The details of the prices of the Product Variant, each represented as a Money Amount. Each Money Amount represents a price in a given currency or a specific Region.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"sku","type":"`null` \\| `string`","description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unique identifer for the item that is to be shipped, and can be referenced across multiple systems.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"barcode","type":"`null` \\| `string`","description":"A generic field for a GTIN number that can be used to identify the Product Variant.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"ean","type":"`null` \\| `string`","description":"An EAN barcode number that can be used to identify the Product Variant.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"upc","type":"`null` \\| `string`","description":"A UPC barcode number that can be used to identify the Product Variant.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_rank","type":"`null` \\| `number`","description":"The ranking of this variant","optional":false,"defaultValue":"0","expandable":false,"children":[]},{"name":"inventory_quantity","type":"`number`","description":"The current quantity of the item that is stocked.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"allow_backorder","type":"`boolean`","description":"Whether the Product Variant should be purchasable when `inventory\\_quantity` is 0.","optional":false,"defaultValue":"false","expandable":false,"children":[]},{"name":"manage_inventory","type":"`boolean`","description":"Whether Medusa should manage inventory for the Product Variant.","optional":false,"defaultValue":"true","expandable":false,"children":[]},{"name":"hs_code","type":"`null` \\| `string`","description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"origin_country","type":"`null` \\| `string`","description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"mid_code","type":"`null` \\| `string`","description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"material","type":"`null` \\| `string`","description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"weight","type":"`null` \\| `number`","description":"The weight of the Product Variant. May be used in shipping rate calculations.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"length","type":"`null` \\| `number`","description":"The length of the Product Variant. May be used in shipping rate calculations.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"height","type":"`null` \\| `number`","description":"The height of the Product Variant. May be used in shipping rate calculations.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"width","type":"`null` \\| `number`","description":"The width of the Product Variant. May be used in shipping rate calculations.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"[ProductOptionValue](entities.ProductOptionValue.mdx)[]","description":"The details of the product options that this product variant defines values for.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"inventory_items","type":"[ProductVariantInventoryItem](entities.ProductVariantInventoryItem.mdx)[]","description":"The details inventory items of the product variant.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"metadata","type":"`null` \\| `Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"purchasable","type":"`boolean`","description":"Only used with the inventory modules.\nA boolean value indicating whether the Product Variant is purchasable.\nA variant is purchasable if:\n - inventory is not managed\n - it has no inventory items\n - it is in stock\n - it is backorderable.\n","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"reason","type":"[ClaimReason](../enums/entities.ClaimReason.mdx)","description":"The reason for the claim","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"MISSING_ITEM","type":"`\"missing_item\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"WRONG_ITEM","type":"`\"wrong_item\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"PRODUCTION_FAILURE","type":"`\"production_failure\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"OTHER","type":"`\"other\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"note","type":"`string`","description":"An optional note about the claim, for additional information","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`number`","description":"The quantity of the item that is being claimed; must be less than or equal to the amount purchased in the original order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tags","type":"[ClaimTag](entities.ClaimTag.mdx)[]","description":"User defined tags for easy filtering and grouping.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The claim tag's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string`","description":"The value that the claim tag holds","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="ClaimItem"/> diff --git a/www/apps/docs/content/references/entities/classes/entities.ClaimOrder.mdx b/www/apps/docs/content/references/entities/classes/entities.ClaimOrder.mdx index 2fa2661130..c2ad2b1bb7 100644 --- a/www/apps/docs/content/references/entities/classes/entities.ClaimOrder.mdx +++ b/www/apps/docs/content/references/entities/classes/entities.ClaimOrder.mdx @@ -3,7 +3,7 @@ displayed_sidebar: entitiesSidebar slug: /references/entities/classes/ClaimOrder --- -import ParameterTypes from "@site/src/components/ParameterTypes" +import TypeList from "@site/src/components/TypeList" # ClaimOrder @@ -11,4 +11,4 @@ A Claim represents a group of faulty or missing items. It consists of claim item ## Properties -`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotency_key","type":"`string`","description":"Randomly generated key used to continue the completion of the cart associated with the claim in case of failure.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="ClaimOrder"/> +`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotency_key","type":"`string`","description":"Randomly generated key used to continue the completion of the cart associated with the claim in case of failure.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="ClaimOrder"/> diff --git a/www/apps/docs/content/references/entities/classes/entities.ClaimTag.mdx b/www/apps/docs/content/references/entities/classes/entities.ClaimTag.mdx index 546af35e87..2cac3b0525 100644 --- a/www/apps/docs/content/references/entities/classes/entities.ClaimTag.mdx +++ b/www/apps/docs/content/references/entities/classes/entities.ClaimTag.mdx @@ -3,7 +3,7 @@ displayed_sidebar: entitiesSidebar slug: /references/entities/classes/ClaimTag --- -import ParameterTypes from "@site/src/components/ParameterTypes" +import TypeList from "@site/src/components/TypeList" # ClaimTag @@ -11,4 +11,4 @@ Claim Tags are user defined tags that can be assigned to claim items for easy fi ## Properties -`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="ClaimTag"/> +`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="ClaimTag"/> diff --git a/www/apps/docs/content/references/entities/classes/entities.Country.mdx b/www/apps/docs/content/references/entities/classes/entities.Country.mdx index e659cfda66..bf97704e04 100644 --- a/www/apps/docs/content/references/entities/classes/entities.Country.mdx +++ b/www/apps/docs/content/references/entities/classes/entities.Country.mdx @@ -3,7 +3,7 @@ displayed_sidebar: entitiesSidebar slug: /references/entities/classes/Country --- -import ParameterTypes from "@site/src/components/ParameterTypes" +import TypeList from "@site/src/components/TypeList" # Country @@ -11,4 +11,4 @@ Country details ## Properties -`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"includes_tax","type":"`boolean`","description":"Whether the prices for the region include tax","optional":false,"defaultValue":"false","expandable":false,"featureFlag":"tax_inclusive_pricing","children":[]}]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="Country"/> +`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"includes_tax","type":"`boolean`","description":"Whether the prices for the region include tax","optional":false,"defaultValue":"false","expandable":false,"featureFlag":"tax_inclusive_pricing","children":[]}]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="Country"/> diff --git a/www/apps/docs/content/references/entities/classes/entities.Currency.mdx b/www/apps/docs/content/references/entities/classes/entities.Currency.mdx index bc23b1fb44..2e034129f0 100644 --- a/www/apps/docs/content/references/entities/classes/entities.Currency.mdx +++ b/www/apps/docs/content/references/entities/classes/entities.Currency.mdx @@ -3,7 +3,7 @@ displayed_sidebar: entitiesSidebar slug: /references/entities/classes/Currency --- -import ParameterTypes from "@site/src/components/ParameterTypes" +import TypeList from "@site/src/components/TypeList" # Currency @@ -11,4 +11,4 @@ Currency ## Properties - + diff --git a/www/apps/docs/content/references/entities/classes/entities.CustomShippingOption.mdx b/www/apps/docs/content/references/entities/classes/entities.CustomShippingOption.mdx index b02b88fbc8..6860bab19c 100644 --- a/www/apps/docs/content/references/entities/classes/entities.CustomShippingOption.mdx +++ b/www/apps/docs/content/references/entities/classes/entities.CustomShippingOption.mdx @@ -3,7 +3,7 @@ displayed_sidebar: entitiesSidebar slug: /references/entities/classes/CustomShippingOption --- -import ParameterTypes from "@site/src/components/ParameterTypes" +import TypeList from "@site/src/components/TypeList" # CustomShippingOption @@ -11,4 +11,4 @@ Custom Shipping Options are overridden Shipping Options. Admins can attach a Cus ## Properties -`","description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"includes_tax","type":"`boolean`","description":"Whether the shipping option price include tax","optional":false,"defaultValue":"false","expandable":false,"featureFlag":"tax_inclusive_pricing","children":[]}]},{"name":"cart_id","type":"`string`","description":"The ID of the Cart that the custom shipping option is attached to","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart","type":"[Cart](entities.Cart.mdx)","description":"The details of the cart this shipping option belongs to.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The cart's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"object","type":"`\"cart\"`","description":"","optional":false,"defaultValue":"\"cart\"","expandable":false,"children":[]},{"name":"email","type":"`string`","description":"The email associated with the cart","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"billing_address_id","type":"`string`","description":"The billing address's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"billing_address","type":"[Address](entities.Address.mdx)","description":"The details of the billing address associated with the cart.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"shipping_address_id","type":"`string`","description":"The shipping address's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_address","type":"`null` \\| [Address](entities.Address.mdx)","description":"The details of the shipping address associated with the cart.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"items","type":"[LineItem](entities.LineItem.mdx)[]","description":"The line items added to the cart.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"region_id","type":"`string`","description":"The region's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region","type":"[Region](entities.Region.mdx)","description":"The details of the region associated with the cart.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"discounts","type":"[Discount](entities.Discount.mdx)[]","description":"An array of details of all discounts applied to the cart.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"gift_cards","type":"[GiftCard](entities.GiftCard.mdx)[]","description":"An array of details of all gift cards applied to the cart.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"customer_id","type":"`string`","description":"The customer's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer","type":"[Customer](entities.Customer.mdx)","description":"The details of the customer the cart belongs to.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"payment_session","type":"`null` \\| [PaymentSession](entities.PaymentSession.mdx)","description":"The details of the selected payment session in the cart.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"payment_sessions","type":"[PaymentSession](entities.PaymentSession.mdx)[]","description":"The details of all payment sessions created on the cart.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"payment_id","type":"`string`","description":"The payment's ID if available","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment","type":"[Payment](entities.Payment.mdx)","description":"The details of the payment associated with the cart.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"shipping_methods","type":"[ShippingMethod](entities.ShippingMethod.mdx)[]","description":"The details of the shipping methods added to the cart.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"type","type":"[CartType](../enums/entities.CartType.mdx)","description":"The cart's type.","optional":false,"defaultValue":"default","expandable":false,"children":[]},{"name":"completed_at","type":"`Date`","description":"The date with timezone at which the cart was completed.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_authorized_at","type":"`Date`","description":"The date with timezone at which the payment was authorized.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotency_key","type":"`string`","description":"Randomly generated key used to continue the completion of a cart in case of failure.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"`Record`","description":"The context of the cart which can include info like IP or user agent.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The sales channel ID the cart is associated with.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel","type":"[SalesChannel](entities.SalesChannel.mdx)","description":"The details of the sales channel associated with the cart.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"sales_channels","type":"[SalesChannel](entities.SalesChannel.mdx)[]","description":"The associated sales channels.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"shipping_total","type":"`number`","description":"The total of shipping","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_total","type":"`number`","description":"The total of discount rounded","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_discount_total","type":"`number`","description":"The total of discount","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`null` \\| `number`","description":"The total of items with taxes","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_tax_total","type":"`null` \\| `number`","description":"The total of shipping with taxes","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_total","type":"`null` \\| `number`","description":"The total of tax","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"refunded_total","type":"`number`","description":"The total amount refunded if the order associated with this cart is returned.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"total","type":"`number`","description":"The total amount of the cart","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"subtotal","type":"`number`","description":"The subtotal of the cart","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"refundable_amount","type":"`number`","description":"The amount that can be refunded","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"gift_card_total","type":"`number`","description":"The total of gift cards","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"gift_card_tax_total","type":"`number`","description":"The total of gift cards with taxes","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="CustomShippingOption"/> +`","description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"includes_tax","type":"`boolean`","description":"Whether the shipping option price include tax","optional":false,"defaultValue":"false","expandable":false,"featureFlag":"tax_inclusive_pricing","children":[]}]},{"name":"cart_id","type":"`string`","description":"The ID of the Cart that the custom shipping option is attached to","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart","type":"[Cart](entities.Cart.mdx)","description":"The details of the cart this shipping option belongs to.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The cart's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"object","type":"`\"cart\"`","description":"","optional":false,"defaultValue":"\"cart\"","expandable":false,"children":[]},{"name":"email","type":"`string`","description":"The email associated with the cart","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"billing_address_id","type":"`string`","description":"The billing address's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"billing_address","type":"[Address](entities.Address.mdx)","description":"The details of the billing address associated with the cart.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"shipping_address_id","type":"`string`","description":"The shipping address's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_address","type":"`null` \\| [Address](entities.Address.mdx)","description":"The details of the shipping address associated with the cart.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"items","type":"[LineItem](entities.LineItem.mdx)[]","description":"The line items added to the cart.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"region_id","type":"`string`","description":"The region's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region","type":"[Region](entities.Region.mdx)","description":"The details of the region associated with the cart.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"discounts","type":"[Discount](entities.Discount.mdx)[]","description":"An array of details of all discounts applied to the cart.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"gift_cards","type":"[GiftCard](entities.GiftCard.mdx)[]","description":"An array of details of all gift cards applied to the cart.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"customer_id","type":"`string`","description":"The customer's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer","type":"[Customer](entities.Customer.mdx)","description":"The details of the customer the cart belongs to.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"payment_session","type":"`null` \\| [PaymentSession](entities.PaymentSession.mdx)","description":"The details of the selected payment session in the cart.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"payment_sessions","type":"[PaymentSession](entities.PaymentSession.mdx)[]","description":"The details of all payment sessions created on the cart.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"payment_id","type":"`string`","description":"The payment's ID if available","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment","type":"[Payment](entities.Payment.mdx)","description":"The details of the payment associated with the cart.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"shipping_methods","type":"[ShippingMethod](entities.ShippingMethod.mdx)[]","description":"The details of the shipping methods added to the cart.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"type","type":"[CartType](../enums/entities.CartType.mdx)","description":"The cart's type.","optional":false,"defaultValue":"default","expandable":false,"children":[]},{"name":"completed_at","type":"`Date`","description":"The date with timezone at which the cart was completed.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_authorized_at","type":"`Date`","description":"The date with timezone at which the payment was authorized.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotency_key","type":"`string`","description":"Randomly generated key used to continue the completion of a cart in case of failure.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"`Record`","description":"The context of the cart which can include info like IP or user agent.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The sales channel ID the cart is associated with.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel","type":"[SalesChannel](entities.SalesChannel.mdx)","description":"The details of the sales channel associated with the cart.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"sales_channels","type":"[SalesChannel](entities.SalesChannel.mdx)[]","description":"The associated sales channels.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"shipping_total","type":"`number`","description":"The total of shipping","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_total","type":"`number`","description":"The total of discount rounded","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_discount_total","type":"`number`","description":"The total of discount","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`null` \\| `number`","description":"The total of items with taxes","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_tax_total","type":"`null` \\| `number`","description":"The total of shipping with taxes","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_total","type":"`null` \\| `number`","description":"The total of tax","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"refunded_total","type":"`number`","description":"The total amount refunded if the order associated with this cart is returned.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"total","type":"`number`","description":"The total amount of the cart","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"subtotal","type":"`number`","description":"The subtotal of the cart","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"refundable_amount","type":"`number`","description":"The amount that can be refunded","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"gift_card_total","type":"`number`","description":"The total of gift cards","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"gift_card_tax_total","type":"`number`","description":"The total of gift cards with taxes","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="CustomShippingOption"/> diff --git a/www/apps/docs/content/references/entities/classes/entities.Customer.mdx b/www/apps/docs/content/references/entities/classes/entities.Customer.mdx index a197e1c6d4..ff17fd2330 100644 --- a/www/apps/docs/content/references/entities/classes/entities.Customer.mdx +++ b/www/apps/docs/content/references/entities/classes/entities.Customer.mdx @@ -3,7 +3,7 @@ displayed_sidebar: entitiesSidebar slug: /references/entities/classes/Customer --- -import ParameterTypes from "@site/src/components/ParameterTypes" +import TypeList from "@site/src/components/TypeList" # Customer @@ -11,4 +11,4 @@ A customer can make purchases in your store and manage their profile. ## Properties -`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"shipping_addresses","type":"[Address](entities.Address.mdx)[]","description":"The details of the shipping addresses associated with the customer.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"ID of the address","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"ID of the customer this address belongs to","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer","type":"`null` \\| [Customer](entities.Customer.mdx)","description":"Available if the relation `customer` is expanded.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`null` \\| `string`","description":"Company name","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`null` \\| `string`","description":"First name","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`null` \\| `string`","description":"Last name","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`null` \\| `string`","description":"Address line 1","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`null` \\| `string`","description":"Address line 2","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`null` \\| `string`","description":"City","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`null` \\| `string`","description":"The 2 character ISO code of the country in lower case","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"country","type":"`null` \\| [Country](entities.Country.mdx)","description":"A country object.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"province","type":"`null` \\| `string`","description":"Province","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`null` \\| `string`","description":"Postal Code","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`null` \\| `string`","description":"Phone Number","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"password_hash","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The customer's phone number","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"has_account","type":"`boolean`","description":"Whether the customer has an account or not","optional":false,"defaultValue":"false","expandable":false,"children":[]},{"name":"orders","type":"[Order](entities.Order.mdx)[]","description":"The details of the orders this customer placed.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The order's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"object","type":"`\"order\"`","description":"","optional":false,"defaultValue":"\"order\"","expandable":false,"children":[]},{"name":"status","type":"[OrderStatus](../enums/entities.OrderStatus.mdx)","description":"The order's status","optional":false,"defaultValue":"pending","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../enums/entities.FulfillmentStatus.mdx)","description":"The order's fulfillment status","optional":false,"defaultValue":"not_fulfilled","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../enums/entities.PaymentStatus.mdx)","description":"The order's payment status","optional":false,"defaultValue":"not_paid","expandable":false,"children":[]},{"name":"display_id","type":"`number`","description":"The order's display ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart_id","type":"`string`","description":"The ID of the cart associated with the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart","type":"[Cart](entities.Cart.mdx)","description":"The details of the cart associated with the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"customer_id","type":"`string`","description":"The ID of the customer associated with the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer","type":"[Customer](entities.Customer.mdx)","description":"The details of the customer associated with the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"email","type":"`string`","description":"The email associated with the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"billing_address_id","type":"`string`","description":"The ID of the billing address associated with the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"billing_address","type":"[Address](entities.Address.mdx)","description":"The details of the billing address associated with the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"shipping_address_id","type":"`string`","description":"The ID of the shipping address associated with the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_address","type":"[Address](entities.Address.mdx)","description":"The details of the shipping address associated with the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"region_id","type":"`string`","description":"The ID of the region this order was created in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region","type":"[Region](entities.Region.mdx)","description":"The details of the region this order was created in.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"currency_code","type":"`string`","description":"The 3 character currency code that is used in the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency","type":"[Currency](entities.Currency.mdx)","description":"The details of the currency used in the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"tax_rate","type":"`null` \\| `number`","description":"The order's tax rate","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discounts","type":"[Discount](entities.Discount.mdx)[]","description":"The details of the discounts applied on the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"gift_cards","type":"[GiftCard](entities.GiftCard.mdx)[]","description":"The details of the gift card used in the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"shipping_methods","type":"[ShippingMethod](entities.ShippingMethod.mdx)[]","description":"The details of the shipping methods used in the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"payments","type":"[Payment](entities.Payment.mdx)[]","description":"The details of the payments used in the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"fulfillments","type":"[Fulfillment](entities.Fulfillment.mdx)[]","description":"The details of the fulfillments created for the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"returns","type":"[Return](entities.Return.mdx)[]","description":"The details of the returns created for the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"claims","type":"[ClaimOrder](entities.ClaimOrder.mdx)[]","description":"The details of the claims created for the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"refunds","type":"[Refund](entities.Refund.mdx)[]","description":"The details of the refunds created for the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"swaps","type":"[Swap](entities.Swap.mdx)[]","description":"The details of the swaps created for the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"draft_order_id","type":"`string`","description":"The ID of the draft order this order was created from.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"draft_order","type":"[DraftOrder](entities.DraftOrder.mdx)","description":"The details of the draft order this order was created from.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"edits","type":"[OrderEdit](entities.OrderEdit.mdx)[]","description":"The details of the order edits done on the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"items","type":"[LineItem](entities.LineItem.mdx)[]","description":"The details of the line items that belong to the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"gift_card_transactions","type":"[GiftCardTransaction](entities.GiftCardTransaction.mdx)[]","description":"The gift card transactions made in the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"canceled_at","type":"`Date`","description":"The date the order was canceled on.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"no_notification","type":"`boolean`","description":"Flag for describing whether or not notifications related to this should be send.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotency_key","type":"`string`","description":"Randomly generated key used to continue the processing of the order in case of failure.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"external_id","type":"`null` \\| `string`","description":"The ID of an external order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel this order belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel","type":"[SalesChannel](entities.SalesChannel.mdx)","description":"The details of the sales channel this order belongs to.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"shipping_total","type":"`number`","description":"The total of shipping","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_tax_total","type":"`null` \\| `number`","description":"The tax total applied on shipping","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_total","type":"`number`","description":"The total of discount rounded","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_discount_total","type":"`number`","description":"The total of discount","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`null` \\| `number`","description":"The tax total applied on items","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_total","type":"`null` \\| `number`","description":"The total of tax","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"refunded_total","type":"`number`","description":"The total amount refunded if the order is returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"total","type":"`number`","description":"The total amount of the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"subtotal","type":"`number`","description":"The subtotal of the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"paid_total","type":"`number`","description":"The total amount paid","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"refundable_amount","type":"`number`","description":"The amount that can be refunded","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"gift_card_total","type":"`number`","description":"The total of gift cards","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"gift_card_tax_total","type":"`number`","description":"The total of gift cards with taxes","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channels","type":"[SalesChannel](entities.SalesChannel.mdx)[]","description":"The associated sales channels.","optional":true,"defaultValue":"","expandable":true,"featureFlag":"medusa_v2","children":[]},{"name":"returnable_items","type":"[LineItem](entities.LineItem.mdx)[]","description":"The details of the line items that are returnable as part of the order, swaps, or claims","optional":true,"defaultValue":"","expandable":true,"children":[]}]},{"name":"groups","type":"[CustomerGroup](entities.CustomerGroup.mdx)[]","description":"The customer groups the customer belongs to.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The customer group's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the customer group","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customers","type":"[Customer](entities.Customer.mdx)[]","description":"The details of the customers that belong to the customer group.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"price_lists","type":"[PriceList](entities.PriceList.mdx)[]","description":"The price lists that are associated with the customer group.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="Customer"/> +`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"shipping_addresses","type":"[Address](entities.Address.mdx)[]","description":"The details of the shipping addresses associated with the customer.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"ID of the address","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"ID of the customer this address belongs to","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer","type":"`null` \\| [Customer](entities.Customer.mdx)","description":"Available if the relation `customer` is expanded.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`null` \\| `string`","description":"Company name","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`null` \\| `string`","description":"First name","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`null` \\| `string`","description":"Last name","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`null` \\| `string`","description":"Address line 1","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`null` \\| `string`","description":"Address line 2","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`null` \\| `string`","description":"City","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`null` \\| `string`","description":"The 2 character ISO code of the country in lower case","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"country","type":"`null` \\| [Country](entities.Country.mdx)","description":"A country object.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"province","type":"`null` \\| `string`","description":"Province","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`null` \\| `string`","description":"Postal Code","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`null` \\| `string`","description":"Phone Number","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"password_hash","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The customer's phone number","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"has_account","type":"`boolean`","description":"Whether the customer has an account or not","optional":false,"defaultValue":"false","expandable":false,"children":[]},{"name":"orders","type":"[Order](entities.Order.mdx)[]","description":"The details of the orders this customer placed.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The order's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"object","type":"`\"order\"`","description":"","optional":false,"defaultValue":"\"order\"","expandable":false,"children":[]},{"name":"status","type":"[OrderStatus](../enums/entities.OrderStatus.mdx)","description":"The order's status","optional":false,"defaultValue":"pending","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../enums/entities.FulfillmentStatus.mdx)","description":"The order's fulfillment status","optional":false,"defaultValue":"not_fulfilled","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../enums/entities.PaymentStatus.mdx)","description":"The order's payment status","optional":false,"defaultValue":"not_paid","expandable":false,"children":[]},{"name":"display_id","type":"`number`","description":"The order's display ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart_id","type":"`string`","description":"The ID of the cart associated with the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart","type":"[Cart](entities.Cart.mdx)","description":"The details of the cart associated with the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"customer_id","type":"`string`","description":"The ID of the customer associated with the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer","type":"[Customer](entities.Customer.mdx)","description":"The details of the customer associated with the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"email","type":"`string`","description":"The email associated with the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"billing_address_id","type":"`string`","description":"The ID of the billing address associated with the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"billing_address","type":"[Address](entities.Address.mdx)","description":"The details of the billing address associated with the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"shipping_address_id","type":"`string`","description":"The ID of the shipping address associated with the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_address","type":"[Address](entities.Address.mdx)","description":"The details of the shipping address associated with the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"region_id","type":"`string`","description":"The ID of the region this order was created in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region","type":"[Region](entities.Region.mdx)","description":"The details of the region this order was created in.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"currency_code","type":"`string`","description":"The 3 character currency code that is used in the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency","type":"[Currency](entities.Currency.mdx)","description":"The details of the currency used in the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"tax_rate","type":"`null` \\| `number`","description":"The order's tax rate","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discounts","type":"[Discount](entities.Discount.mdx)[]","description":"The details of the discounts applied on the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"gift_cards","type":"[GiftCard](entities.GiftCard.mdx)[]","description":"The details of the gift card used in the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"shipping_methods","type":"[ShippingMethod](entities.ShippingMethod.mdx)[]","description":"The details of the shipping methods used in the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"payments","type":"[Payment](entities.Payment.mdx)[]","description":"The details of the payments used in the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"fulfillments","type":"[Fulfillment](entities.Fulfillment.mdx)[]","description":"The details of the fulfillments created for the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"returns","type":"[Return](entities.Return.mdx)[]","description":"The details of the returns created for the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"claims","type":"[ClaimOrder](entities.ClaimOrder.mdx)[]","description":"The details of the claims created for the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"refunds","type":"[Refund](entities.Refund.mdx)[]","description":"The details of the refunds created for the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"swaps","type":"[Swap](entities.Swap.mdx)[]","description":"The details of the swaps created for the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"draft_order_id","type":"`string`","description":"The ID of the draft order this order was created from.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"draft_order","type":"[DraftOrder](entities.DraftOrder.mdx)","description":"The details of the draft order this order was created from.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"edits","type":"[OrderEdit](entities.OrderEdit.mdx)[]","description":"The details of the order edits done on the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"items","type":"[LineItem](entities.LineItem.mdx)[]","description":"The details of the line items that belong to the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"gift_card_transactions","type":"[GiftCardTransaction](entities.GiftCardTransaction.mdx)[]","description":"The gift card transactions made in the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"canceled_at","type":"`Date`","description":"The date the order was canceled on.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"no_notification","type":"`boolean`","description":"Flag for describing whether or not notifications related to this should be send.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotency_key","type":"`string`","description":"Randomly generated key used to continue the processing of the order in case of failure.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"external_id","type":"`null` \\| `string`","description":"The ID of an external order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel this order belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel","type":"[SalesChannel](entities.SalesChannel.mdx)","description":"The details of the sales channel this order belongs to.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"shipping_total","type":"`number`","description":"The total of shipping","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_tax_total","type":"`null` \\| `number`","description":"The tax total applied on shipping","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_total","type":"`number`","description":"The total of discount rounded","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_discount_total","type":"`number`","description":"The total of discount","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`null` \\| `number`","description":"The tax total applied on items","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_total","type":"`null` \\| `number`","description":"The total of tax","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"refunded_total","type":"`number`","description":"The total amount refunded if the order is returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"total","type":"`number`","description":"The total amount of the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"subtotal","type":"`number`","description":"The subtotal of the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"paid_total","type":"`number`","description":"The total amount paid","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"refundable_amount","type":"`number`","description":"The amount that can be refunded","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"gift_card_total","type":"`number`","description":"The total of gift cards","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"gift_card_tax_total","type":"`number`","description":"The total of gift cards with taxes","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channels","type":"[SalesChannel](entities.SalesChannel.mdx)[]","description":"The associated sales channels.","optional":true,"defaultValue":"","expandable":true,"featureFlag":"medusa_v2","children":[]},{"name":"returnable_items","type":"[LineItem](entities.LineItem.mdx)[]","description":"The details of the line items that are returnable as part of the order, swaps, or claims","optional":true,"defaultValue":"","expandable":true,"children":[]}]},{"name":"groups","type":"[CustomerGroup](entities.CustomerGroup.mdx)[]","description":"The customer groups the customer belongs to.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The customer group's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the customer group","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customers","type":"[Customer](entities.Customer.mdx)[]","description":"The details of the customers that belong to the customer group.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"price_lists","type":"[PriceList](entities.PriceList.mdx)[]","description":"The price lists that are associated with the customer group.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="Customer"/> diff --git a/www/apps/docs/content/references/entities/classes/entities.CustomerGroup.mdx b/www/apps/docs/content/references/entities/classes/entities.CustomerGroup.mdx index 2a0310eea2..16b3b382d5 100644 --- a/www/apps/docs/content/references/entities/classes/entities.CustomerGroup.mdx +++ b/www/apps/docs/content/references/entities/classes/entities.CustomerGroup.mdx @@ -3,7 +3,7 @@ displayed_sidebar: entitiesSidebar slug: /references/entities/classes/CustomerGroup --- -import ParameterTypes from "@site/src/components/ParameterTypes" +import TypeList from "@site/src/components/TypeList" # CustomerGroup @@ -11,4 +11,4 @@ A customer group that can be used to organize customers into groups of similar t ## Properties -`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"price_lists","type":"[PriceList](entities.PriceList.mdx)[]","description":"The price lists that are associated with the customer group.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The price list's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The price list's name","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The price list's description","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[PriceListType](../../medusa/enums/medusa.PriceListType-1.mdx)","description":"The type of Price List. This can be one of either `sale` or `override`.","optional":false,"defaultValue":"sale","expandable":false,"children":[]},{"name":"status","type":"[PriceListStatus](../../medusa/enums/medusa.PriceListStatus-1.mdx)","description":"The status of the Price List","optional":false,"defaultValue":"draft","expandable":false,"children":[]},{"name":"starts_at","type":"`null` \\| `Date`","description":"The date with timezone that the Price List starts being valid.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"ends_at","type":"`null` \\| `Date`","description":"The date with timezone that the Price List stops being valid.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_groups","type":"[CustomerGroup](entities.CustomerGroup.mdx)[]","description":"The details of the customer groups that the Price List can apply to.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"prices","type":"[MoneyAmount](entities.MoneyAmount.mdx)[]","description":"The prices that belong to the price list, represented as a Money Amount.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"includes_tax","type":"`boolean`","description":"Whether the price list prices include tax","optional":false,"defaultValue":"false","expandable":false,"featureFlag":"tax_inclusive_pricing","children":[]}]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="CustomerGroup"/> +`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"price_lists","type":"[PriceList](entities.PriceList.mdx)[]","description":"The price lists that are associated with the customer group.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The price list's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The price list's name","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The price list's description","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[PriceListType](../../medusa/enums/medusa.PriceListType-1.mdx)","description":"The type of Price List. This can be one of either `sale` or `override`.","optional":false,"defaultValue":"sale","expandable":false,"children":[]},{"name":"status","type":"[PriceListStatus](../../medusa/enums/medusa.PriceListStatus-1.mdx)","description":"The status of the Price List","optional":false,"defaultValue":"draft","expandable":false,"children":[]},{"name":"starts_at","type":"`null` \\| `Date`","description":"The date with timezone that the Price List starts being valid.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"ends_at","type":"`null` \\| `Date`","description":"The date with timezone that the Price List stops being valid.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_groups","type":"[CustomerGroup](entities.CustomerGroup.mdx)[]","description":"The details of the customer groups that the Price List can apply to.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"prices","type":"[MoneyAmount](entities.MoneyAmount.mdx)[]","description":"The prices that belong to the price list, represented as a Money Amount.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"includes_tax","type":"`boolean`","description":"Whether the price list prices include tax","optional":false,"defaultValue":"false","expandable":false,"featureFlag":"tax_inclusive_pricing","children":[]}]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="CustomerGroup"/> diff --git a/www/apps/docs/content/references/entities/classes/entities.Discount.mdx b/www/apps/docs/content/references/entities/classes/entities.Discount.mdx index 7a1823e021..f6c596aedb 100644 --- a/www/apps/docs/content/references/entities/classes/entities.Discount.mdx +++ b/www/apps/docs/content/references/entities/classes/entities.Discount.mdx @@ -3,7 +3,7 @@ displayed_sidebar: entitiesSidebar slug: /references/entities/classes/Discount --- -import ParameterTypes from "@site/src/components/ParameterTypes" +import TypeList from "@site/src/components/TypeList" # Discount @@ -11,4 +11,4 @@ A discount can be applied to a cart for promotional purposes. ## Properties -`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"is_disabled","type":"`boolean`","description":"Whether the Discount has been disabled. Disabled discounts cannot be applied to carts","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"parent_discount_id","type":"`string`","description":"The Discount that the discount was created from. This will always be a dynamic discount","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"parent_discount","type":"[Discount](entities.Discount.mdx)","description":"The details of the parent discount that this discount was created from.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The discount's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"A unique code for the discount - this will be used by the customer to apply the discount","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_dynamic","type":"`boolean`","description":"A flag to indicate if multiple instances of the discount can be generated. I.e. for newsletter discounts","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rule_id","type":"`string`","description":"The ID of the discount rule that defines how the discount will be applied to a cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rule","type":"[DiscountRule](entities.DiscountRule.mdx)","description":"The details of the discount rule that defines how the discount will be applied to a cart..","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"is_disabled","type":"`boolean`","description":"Whether the Discount has been disabled. Disabled discounts cannot be applied to carts","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"parent_discount_id","type":"`string`","description":"The Discount that the discount was created from. This will always be a dynamic discount","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"parent_discount","type":"[Discount](entities.Discount.mdx)","description":"The details of the parent discount that this discount was created from.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"starts_at","type":"`Date`","description":"The time at which the discount can be used.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"ends_at","type":"`null` \\| `Date`","description":"The time at which the discount can no longer be used.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"valid_duration","type":"`null` \\| `string`","description":"Duration the discount runs between","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"regions","type":"[Region](entities.Region.mdx)[]","description":"The details of the regions in which the Discount can be used.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"usage_limit","type":"`null` \\| `number`","description":"The maximum number of times that a discount can be used.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"usage_count","type":"`number`","description":"The number of times a discount has been used.","optional":false,"defaultValue":"0","expandable":false,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"starts_at","type":"`Date`","description":"The time at which the discount can be used.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"ends_at","type":"`null` \\| `Date`","description":"The time at which the discount can no longer be used.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"valid_duration","type":"`null` \\| `string`","description":"Duration the discount runs between","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"regions","type":"[Region](entities.Region.mdx)[]","description":"The details of the regions in which the Discount can be used.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The region's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The three character currency code used in the region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency","type":"[Currency](entities.Currency.mdx)","description":"The details of the currency used in the region.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"tax_rate","type":"`number`","description":"The tax rate that should be charged on purchases in the Region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_rates","type":"`null` \\| [TaxRate](entities.TaxRate.mdx)[]","description":"The details of the tax rates used in the region, aside from the default rate.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"tax_code","type":"`string`","description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"gift_cards_taxable","type":"`boolean`","description":"Whether the gift cards are taxable or not in this region.","optional":false,"defaultValue":"true","expandable":false,"children":[]},{"name":"automatic_taxes","type":"`boolean`","description":"Whether taxes should be automated in this region.","optional":false,"defaultValue":"true","expandable":false,"children":[]},{"name":"countries","type":"[Country](entities.Country.mdx)[]","description":"The details of the countries included in this region.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"tax_provider_id","type":"`null` \\| `string`","description":"The ID of the tax provider used in this region","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_provider","type":"[TaxProvider](entities.TaxProvider.mdx)","description":"The details of the tax provider used in the region.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"payment_providers","type":"[PaymentProvider](entities.PaymentProvider.mdx)[]","description":"The details of the payment providers that can be used to process payments in the region.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"fulfillment_providers","type":"[FulfillmentProvider](entities.FulfillmentProvider.mdx)[]","description":"The details of the fulfillment providers that can be used to fulfill items of orders and similar resources in the region.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"includes_tax","type":"`boolean`","description":"Whether the prices for the region include tax","optional":false,"defaultValue":"false","expandable":false,"featureFlag":"tax_inclusive_pricing","children":[]}]},{"name":"usage_limit","type":"`null` \\| `number`","description":"The maximum number of times that a discount can be used.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"usage_count","type":"`number`","description":"The number of times a discount has been used.","optional":false,"defaultValue":"0","expandable":false,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="Discount"/> +`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"is_disabled","type":"`boolean`","description":"Whether the Discount has been disabled. Disabled discounts cannot be applied to carts","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"parent_discount_id","type":"`string`","description":"The Discount that the discount was created from. This will always be a dynamic discount","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"parent_discount","type":"[Discount](entities.Discount.mdx)","description":"The details of the parent discount that this discount was created from.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The discount's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"A unique code for the discount - this will be used by the customer to apply the discount","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_dynamic","type":"`boolean`","description":"A flag to indicate if multiple instances of the discount can be generated. I.e. for newsletter discounts","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rule_id","type":"`string`","description":"The ID of the discount rule that defines how the discount will be applied to a cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rule","type":"[DiscountRule](entities.DiscountRule.mdx)","description":"The details of the discount rule that defines how the discount will be applied to a cart..","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"is_disabled","type":"`boolean`","description":"Whether the Discount has been disabled. Disabled discounts cannot be applied to carts","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"parent_discount_id","type":"`string`","description":"The Discount that the discount was created from. This will always be a dynamic discount","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"parent_discount","type":"[Discount](entities.Discount.mdx)","description":"The details of the parent discount that this discount was created from.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"starts_at","type":"`Date`","description":"The time at which the discount can be used.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"ends_at","type":"`null` \\| `Date`","description":"The time at which the discount can no longer be used.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"valid_duration","type":"`null` \\| `string`","description":"Duration the discount runs between","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"regions","type":"[Region](entities.Region.mdx)[]","description":"The details of the regions in which the Discount can be used.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"usage_limit","type":"`null` \\| `number`","description":"The maximum number of times that a discount can be used.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"usage_count","type":"`number`","description":"The number of times a discount has been used.","optional":false,"defaultValue":"0","expandable":false,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"starts_at","type":"`Date`","description":"The time at which the discount can be used.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"ends_at","type":"`null` \\| `Date`","description":"The time at which the discount can no longer be used.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"valid_duration","type":"`null` \\| `string`","description":"Duration the discount runs between","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"regions","type":"[Region](entities.Region.mdx)[]","description":"The details of the regions in which the Discount can be used.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The region's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The three character currency code used in the region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency","type":"[Currency](entities.Currency.mdx)","description":"The details of the currency used in the region.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"tax_rate","type":"`number`","description":"The tax rate that should be charged on purchases in the Region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_rates","type":"`null` \\| [TaxRate](entities.TaxRate.mdx)[]","description":"The details of the tax rates used in the region, aside from the default rate.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"tax_code","type":"`string`","description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"gift_cards_taxable","type":"`boolean`","description":"Whether the gift cards are taxable or not in this region.","optional":false,"defaultValue":"true","expandable":false,"children":[]},{"name":"automatic_taxes","type":"`boolean`","description":"Whether taxes should be automated in this region.","optional":false,"defaultValue":"true","expandable":false,"children":[]},{"name":"countries","type":"[Country](entities.Country.mdx)[]","description":"The details of the countries included in this region.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"tax_provider_id","type":"`null` \\| `string`","description":"The ID of the tax provider used in this region","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_provider","type":"[TaxProvider](entities.TaxProvider.mdx)","description":"The details of the tax provider used in the region.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"payment_providers","type":"[PaymentProvider](entities.PaymentProvider.mdx)[]","description":"The details of the payment providers that can be used to process payments in the region.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"fulfillment_providers","type":"[FulfillmentProvider](entities.FulfillmentProvider.mdx)[]","description":"The details of the fulfillment providers that can be used to fulfill items of orders and similar resources in the region.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"includes_tax","type":"`boolean`","description":"Whether the prices for the region include tax","optional":false,"defaultValue":"false","expandable":false,"featureFlag":"tax_inclusive_pricing","children":[]}]},{"name":"usage_limit","type":"`null` \\| `number`","description":"The maximum number of times that a discount can be used.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"usage_count","type":"`number`","description":"The number of times a discount has been used.","optional":false,"defaultValue":"0","expandable":false,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="Discount"/> diff --git a/www/apps/docs/content/references/entities/classes/entities.DiscountCondition.mdx b/www/apps/docs/content/references/entities/classes/entities.DiscountCondition.mdx index 43cb65fd95..98a1d04e86 100644 --- a/www/apps/docs/content/references/entities/classes/entities.DiscountCondition.mdx +++ b/www/apps/docs/content/references/entities/classes/entities.DiscountCondition.mdx @@ -3,7 +3,7 @@ displayed_sidebar: entitiesSidebar slug: /references/entities/classes/DiscountCondition --- -import ParameterTypes from "@site/src/components/ParameterTypes" +import TypeList from "@site/src/components/TypeList" # DiscountCondition @@ -11,4 +11,4 @@ Holds rule conditions for when a discount is applicable ## Properties -`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"products","type":"[Product](entities.Product.mdx)[]","description":"products associated with this condition if `type` is `products`.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The product's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"A title that can be displayed for easy identification of the Product.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"subtitle","type":"`null` \\| `string`","description":"An optional subtitle that can be used to further specify the Product.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"A short description of the Product.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"handle","type":"`null` \\| `string`","description":"A unique identifier for the Product (e.g. for slug structure).","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_giftcard","type":"`boolean`","description":"Whether the Product represents a Gift Card. Products that represent Gift Cards will automatically generate a redeemable Gift Card code once they are purchased.","optional":false,"defaultValue":"false","expandable":false,"children":[]},{"name":"status","type":"[ProductStatus](../enums/entities.ProductStatus.mdx)","description":"The status of the product","optional":false,"defaultValue":"draft","expandable":false,"children":[]},{"name":"images","type":"[Image](entities.Image.mdx)[]","description":"The details of the product's images.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"thumbnail","type":"`null` \\| `string`","description":"A URL to an image file that can be used to identify the Product.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"[ProductOption](entities.ProductOption.mdx)[]","description":"The details of the Product Options that are defined for the Product. The product's variants will have a unique combination of values of the product's options.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"variants","type":"[ProductVariant](entities.ProductVariant.mdx)[]","description":"The details of the Product Variants that belong to the Product. Each will have a unique combination of values of the product's options.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"categories","type":"[ProductCategory](entities.ProductCategory.mdx)[]","description":"The details of the product categories that this product belongs to.","optional":false,"defaultValue":"","expandable":true,"featureFlag":"product_categories","children":[]},{"name":"profile_id","type":"`string`","description":"The ID of the shipping profile that the product belongs to. The shipping profile has a set of defined shipping options that can be used to fulfill the product.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"profile","type":"[ShippingProfile](entities.ShippingProfile.mdx)","description":"The details of the shipping profile that the product belongs to. The shipping profile has a set of defined shipping options that can be used to fulfill the product.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"profiles","type":"[ShippingProfile](entities.ShippingProfile.mdx)[]","description":"Available if the relation `profiles` is expanded.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"weight","type":"`null` \\| `number`","description":"The weight of the Product Variant. May be used in shipping rate calculations.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"length","type":"`null` \\| `number`","description":"The length of the Product Variant. May be used in shipping rate calculations.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"height","type":"`null` \\| `number`","description":"The height of the Product Variant. May be used in shipping rate calculations.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"width","type":"`null` \\| `number`","description":"The width of the Product Variant. May be used in shipping rate calculations.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"hs_code","type":"`null` \\| `string`","description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"origin_country","type":"`null` \\| `string`","description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"mid_code","type":"`null` \\| `string`","description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"material","type":"`null` \\| `string`","description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"collection_id","type":"`null` \\| `string`","description":"The ID of the product collection that the product belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"collection","type":"[ProductCollection](entities.ProductCollection.mdx)","description":"The details of the product collection that the product belongs to.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"type_id","type":"`null` \\| `string`","description":"The ID of the product type that the product belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[ProductType](entities.ProductType.mdx)","description":"The details of the product type that the product belongs to.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"tags","type":"[ProductTag](entities.ProductTag.mdx)[]","description":"The details of the product tags used in this product.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"discountable","type":"`boolean`","description":"Whether the Product can be discounted. Discounts will not apply to Line Items of this Product when this flag is set to `false`.","optional":false,"defaultValue":"true","expandable":false,"children":[]},{"name":"external_id","type":"`null` \\| `string`","description":"The external ID of the product","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channels","type":"[SalesChannel](entities.SalesChannel.mdx)[]","description":"The details of the sales channels this product is available in.","optional":false,"defaultValue":"","expandable":true,"children":[]}]},{"name":"product_types","type":"[ProductType](entities.ProductType.mdx)[]","description":"Product types associated with this condition if `type` is `product\\_types`.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The product type's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string`","description":"The value that the Product Type represents.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"product_tags","type":"[ProductTag](entities.ProductTag.mdx)[]","description":"Product tags associated with this condition if `type` is `product\\_tags`.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The product tag's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string`","description":"The value that the Product Tag represents","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"product_collections","type":"[ProductCollection](entities.ProductCollection.mdx)[]","description":"Product collections associated with this condition if `type` is `product\\_collections`.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The product collection's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"The title that the Product Collection is identified by.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"handle","type":"`string`","description":"A unique string that identifies the Product Collection - can for example be used in slug structures.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"products","type":"[Product](entities.Product.mdx)[]","description":"The details of the products that belong to this product collection.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"customer_groups","type":"[CustomerGroup](entities.CustomerGroup.mdx)[]","description":"Customer groups associated with this condition if `type` is `customer\\_groups`.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The customer group's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the customer group","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customers","type":"[Customer](entities.Customer.mdx)[]","description":"The details of the customers that belong to the customer group.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"price_lists","type":"[PriceList](entities.PriceList.mdx)[]","description":"The price lists that are associated with the customer group.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="DiscountCondition"/> +`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"products","type":"[Product](entities.Product.mdx)[]","description":"products associated with this condition if `type` is `products`.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The product's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"A title that can be displayed for easy identification of the Product.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"subtitle","type":"`null` \\| `string`","description":"An optional subtitle that can be used to further specify the Product.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"A short description of the Product.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"handle","type":"`null` \\| `string`","description":"A unique identifier for the Product (e.g. for slug structure).","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_giftcard","type":"`boolean`","description":"Whether the Product represents a Gift Card. Products that represent Gift Cards will automatically generate a redeemable Gift Card code once they are purchased.","optional":false,"defaultValue":"false","expandable":false,"children":[]},{"name":"status","type":"[ProductStatus](../enums/entities.ProductStatus.mdx)","description":"The status of the product","optional":false,"defaultValue":"draft","expandable":false,"children":[]},{"name":"images","type":"[Image](entities.Image.mdx)[]","description":"The details of the product's images.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"thumbnail","type":"`null` \\| `string`","description":"A URL to an image file that can be used to identify the Product.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"[ProductOption](entities.ProductOption.mdx)[]","description":"The details of the Product Options that are defined for the Product. The product's variants will have a unique combination of values of the product's options.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"variants","type":"[ProductVariant](entities.ProductVariant.mdx)[]","description":"The details of the Product Variants that belong to the Product. Each will have a unique combination of values of the product's options.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"categories","type":"[ProductCategory](entities.ProductCategory.mdx)[]","description":"The details of the product categories that this product belongs to.","optional":false,"defaultValue":"","expandable":true,"featureFlag":"product_categories","children":[]},{"name":"profile_id","type":"`string`","description":"The ID of the shipping profile that the product belongs to. The shipping profile has a set of defined shipping options that can be used to fulfill the product.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"profile","type":"[ShippingProfile](entities.ShippingProfile.mdx)","description":"The details of the shipping profile that the product belongs to. The shipping profile has a set of defined shipping options that can be used to fulfill the product.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"profiles","type":"[ShippingProfile](entities.ShippingProfile.mdx)[]","description":"Available if the relation `profiles` is expanded.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"weight","type":"`null` \\| `number`","description":"The weight of the Product Variant. May be used in shipping rate calculations.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"length","type":"`null` \\| `number`","description":"The length of the Product Variant. May be used in shipping rate calculations.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"height","type":"`null` \\| `number`","description":"The height of the Product Variant. May be used in shipping rate calculations.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"width","type":"`null` \\| `number`","description":"The width of the Product Variant. May be used in shipping rate calculations.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"hs_code","type":"`null` \\| `string`","description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"origin_country","type":"`null` \\| `string`","description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"mid_code","type":"`null` \\| `string`","description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"material","type":"`null` \\| `string`","description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"collection_id","type":"`null` \\| `string`","description":"The ID of the product collection that the product belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"collection","type":"[ProductCollection](entities.ProductCollection.mdx)","description":"The details of the product collection that the product belongs to.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"type_id","type":"`null` \\| `string`","description":"The ID of the product type that the product belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[ProductType](entities.ProductType.mdx)","description":"The details of the product type that the product belongs to.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"tags","type":"[ProductTag](entities.ProductTag.mdx)[]","description":"The details of the product tags used in this product.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"discountable","type":"`boolean`","description":"Whether the Product can be discounted. Discounts will not apply to Line Items of this Product when this flag is set to `false`.","optional":false,"defaultValue":"true","expandable":false,"children":[]},{"name":"external_id","type":"`null` \\| `string`","description":"The external ID of the product","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channels","type":"[SalesChannel](entities.SalesChannel.mdx)[]","description":"The details of the sales channels this product is available in.","optional":false,"defaultValue":"","expandable":true,"children":[]}]},{"name":"product_types","type":"[ProductType](entities.ProductType.mdx)[]","description":"Product types associated with this condition if `type` is `product\\_types`.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The product type's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string`","description":"The value that the Product Type represents.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"product_tags","type":"[ProductTag](entities.ProductTag.mdx)[]","description":"Product tags associated with this condition if `type` is `product\\_tags`.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The product tag's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string`","description":"The value that the Product Tag represents","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"product_collections","type":"[ProductCollection](entities.ProductCollection.mdx)[]","description":"Product collections associated with this condition if `type` is `product\\_collections`.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The product collection's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"The title that the Product Collection is identified by.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"handle","type":"`string`","description":"A unique string that identifies the Product Collection - can for example be used in slug structures.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"products","type":"[Product](entities.Product.mdx)[]","description":"The details of the products that belong to this product collection.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"customer_groups","type":"[CustomerGroup](entities.CustomerGroup.mdx)[]","description":"Customer groups associated with this condition if `type` is `customer\\_groups`.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The customer group's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the customer group","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customers","type":"[Customer](entities.Customer.mdx)[]","description":"The details of the customers that belong to the customer group.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"price_lists","type":"[PriceList](entities.PriceList.mdx)[]","description":"The price lists that are associated with the customer group.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="DiscountCondition"/> diff --git a/www/apps/docs/content/references/entities/classes/entities.DiscountConditionCustomerGroup.mdx b/www/apps/docs/content/references/entities/classes/entities.DiscountConditionCustomerGroup.mdx index a335ed736c..5006b5169f 100644 --- a/www/apps/docs/content/references/entities/classes/entities.DiscountConditionCustomerGroup.mdx +++ b/www/apps/docs/content/references/entities/classes/entities.DiscountConditionCustomerGroup.mdx @@ -3,7 +3,7 @@ displayed_sidebar: entitiesSidebar slug: /references/entities/classes/DiscountConditionCustomerGroup --- -import ParameterTypes from "@site/src/components/ParameterTypes" +import TypeList from "@site/src/components/TypeList" # DiscountConditionCustomerGroup @@ -11,4 +11,4 @@ Associates a discount condition with a customer group ## Properties -`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_group","type":"[CustomerGroup](entities.CustomerGroup.mdx)","description":"Available if the relation `customer\\_group` is expanded.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The customer group's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the customer group","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customers","type":"[Customer](entities.Customer.mdx)[]","description":"The details of the customers that belong to the customer group.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"price_lists","type":"[PriceList](entities.PriceList.mdx)[]","description":"The price lists that are associated with the customer group.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"discount_condition","type":"[DiscountCondition](entities.DiscountCondition.mdx)","description":"Available if the relation `discount\\_condition` is expanded.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The discount condition's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[DiscountConditionType](../enums/entities.DiscountConditionType.mdx)","description":"The type of the condition. The type affects the available resources associated with the condition. For example, if the type is `products`, that means the `products` relation will hold the products associated with this condition and other relations will be empty.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"operator","type":"[DiscountConditionOperator](../enums/entities.DiscountConditionOperator.mdx)","description":"The operator of the condition. `in` indicates that discountable resources are within the specified resources. `not\\_in` indicates that discountable resources are everything but the specified resources.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_rule_id","type":"`string`","description":"The ID of the discount rule associated with the condition","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_rule","type":"[DiscountRule](entities.DiscountRule.mdx)","description":"The details of the discount rule associated with the condition.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"products","type":"[Product](entities.Product.mdx)[]","description":"products associated with this condition if `type` is `products`.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"product_types","type":"[ProductType](entities.ProductType.mdx)[]","description":"Product types associated with this condition if `type` is `product\\_types`.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"product_tags","type":"[ProductTag](entities.ProductTag.mdx)[]","description":"Product tags associated with this condition if `type` is `product\\_tags`.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"product_collections","type":"[ProductCollection](entities.ProductCollection.mdx)[]","description":"Product collections associated with this condition if `type` is `product\\_collections`.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"customer_groups","type":"[CustomerGroup](entities.CustomerGroup.mdx)[]","description":"Customer groups associated with this condition if `type` is `customer\\_groups`.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="DiscountConditionCustomerGroup"/> +`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_group","type":"[CustomerGroup](entities.CustomerGroup.mdx)","description":"Available if the relation `customer\\_group` is expanded.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The customer group's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the customer group","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customers","type":"[Customer](entities.Customer.mdx)[]","description":"The details of the customers that belong to the customer group.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"price_lists","type":"[PriceList](entities.PriceList.mdx)[]","description":"The price lists that are associated with the customer group.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"discount_condition","type":"[DiscountCondition](entities.DiscountCondition.mdx)","description":"Available if the relation `discount\\_condition` is expanded.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The discount condition's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[DiscountConditionType](../enums/entities.DiscountConditionType.mdx)","description":"The type of the condition. The type affects the available resources associated with the condition. For example, if the type is `products`, that means the `products` relation will hold the products associated with this condition and other relations will be empty.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"operator","type":"[DiscountConditionOperator](../enums/entities.DiscountConditionOperator.mdx)","description":"The operator of the condition. `in` indicates that discountable resources are within the specified resources. `not\\_in` indicates that discountable resources are everything but the specified resources.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_rule_id","type":"`string`","description":"The ID of the discount rule associated with the condition","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_rule","type":"[DiscountRule](entities.DiscountRule.mdx)","description":"The details of the discount rule associated with the condition.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"products","type":"[Product](entities.Product.mdx)[]","description":"products associated with this condition if `type` is `products`.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"product_types","type":"[ProductType](entities.ProductType.mdx)[]","description":"Product types associated with this condition if `type` is `product\\_types`.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"product_tags","type":"[ProductTag](entities.ProductTag.mdx)[]","description":"Product tags associated with this condition if `type` is `product\\_tags`.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"product_collections","type":"[ProductCollection](entities.ProductCollection.mdx)[]","description":"Product collections associated with this condition if `type` is `product\\_collections`.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"customer_groups","type":"[CustomerGroup](entities.CustomerGroup.mdx)[]","description":"Customer groups associated with this condition if `type` is `customer\\_groups`.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="DiscountConditionCustomerGroup"/> diff --git a/www/apps/docs/content/references/entities/classes/entities.DiscountConditionProduct.mdx b/www/apps/docs/content/references/entities/classes/entities.DiscountConditionProduct.mdx index fcc6b18d98..5e7a2d518d 100644 --- a/www/apps/docs/content/references/entities/classes/entities.DiscountConditionProduct.mdx +++ b/www/apps/docs/content/references/entities/classes/entities.DiscountConditionProduct.mdx @@ -3,7 +3,7 @@ displayed_sidebar: entitiesSidebar slug: /references/entities/classes/DiscountConditionProduct --- -import ParameterTypes from "@site/src/components/ParameterTypes" +import TypeList from "@site/src/components/TypeList" # DiscountConditionProduct @@ -11,4 +11,4 @@ This represents the association between a discount condition and a product ## Properties -`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"product","type":"[Product](entities.Product.mdx)","description":"The details of the product.","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The product's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"A title that can be displayed for easy identification of the Product.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"subtitle","type":"`null` \\| `string`","description":"An optional subtitle that can be used to further specify the Product.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"A short description of the Product.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"handle","type":"`null` \\| `string`","description":"A unique identifier for the Product (e.g. for slug structure).","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_giftcard","type":"`boolean`","description":"Whether the Product represents a Gift Card. Products that represent Gift Cards will automatically generate a redeemable Gift Card code once they are purchased.","optional":false,"defaultValue":"false","expandable":false,"children":[]},{"name":"status","type":"[ProductStatus](../enums/entities.ProductStatus.mdx)","description":"The status of the product","optional":false,"defaultValue":"draft","expandable":false,"children":[]},{"name":"images","type":"[Image](entities.Image.mdx)[]","description":"The details of the product's images.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"thumbnail","type":"`null` \\| `string`","description":"A URL to an image file that can be used to identify the Product.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"[ProductOption](entities.ProductOption.mdx)[]","description":"The details of the Product Options that are defined for the Product. The product's variants will have a unique combination of values of the product's options.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"variants","type":"[ProductVariant](entities.ProductVariant.mdx)[]","description":"The details of the Product Variants that belong to the Product. Each will have a unique combination of values of the product's options.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"categories","type":"[ProductCategory](entities.ProductCategory.mdx)[]","description":"The details of the product categories that this product belongs to.","optional":false,"defaultValue":"","expandable":true,"featureFlag":"product_categories","children":[]},{"name":"profile_id","type":"`string`","description":"The ID of the shipping profile that the product belongs to. The shipping profile has a set of defined shipping options that can be used to fulfill the product.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"profile","type":"[ShippingProfile](entities.ShippingProfile.mdx)","description":"The details of the shipping profile that the product belongs to. The shipping profile has a set of defined shipping options that can be used to fulfill the product.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"profiles","type":"[ShippingProfile](entities.ShippingProfile.mdx)[]","description":"Available if the relation `profiles` is expanded.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"weight","type":"`null` \\| `number`","description":"The weight of the Product Variant. May be used in shipping rate calculations.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"length","type":"`null` \\| `number`","description":"The length of the Product Variant. May be used in shipping rate calculations.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"height","type":"`null` \\| `number`","description":"The height of the Product Variant. May be used in shipping rate calculations.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"width","type":"`null` \\| `number`","description":"The width of the Product Variant. May be used in shipping rate calculations.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"hs_code","type":"`null` \\| `string`","description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"origin_country","type":"`null` \\| `string`","description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"mid_code","type":"`null` \\| `string`","description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"material","type":"`null` \\| `string`","description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"collection_id","type":"`null` \\| `string`","description":"The ID of the product collection that the product belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"collection","type":"[ProductCollection](entities.ProductCollection.mdx)","description":"The details of the product collection that the product belongs to.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"type_id","type":"`null` \\| `string`","description":"The ID of the product type that the product belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[ProductType](entities.ProductType.mdx)","description":"The details of the product type that the product belongs to.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"tags","type":"[ProductTag](entities.ProductTag.mdx)[]","description":"The details of the product tags used in this product.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"discountable","type":"`boolean`","description":"Whether the Product can be discounted. Discounts will not apply to Line Items of this Product when this flag is set to `false`.","optional":false,"defaultValue":"true","expandable":false,"children":[]},{"name":"external_id","type":"`null` \\| `string`","description":"The external ID of the product","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channels","type":"[SalesChannel](entities.SalesChannel.mdx)[]","description":"The details of the sales channels this product is available in.","optional":false,"defaultValue":"","expandable":true,"children":[]}]},{"name":"discount_condition","type":"[DiscountCondition](entities.DiscountCondition.mdx)","description":"The details of the discount condition.","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The discount condition's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[DiscountConditionType](../enums/entities.DiscountConditionType.mdx)","description":"The type of the condition. The type affects the available resources associated with the condition. For example, if the type is `products`, that means the `products` relation will hold the products associated with this condition and other relations will be empty.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"operator","type":"[DiscountConditionOperator](../enums/entities.DiscountConditionOperator.mdx)","description":"The operator of the condition. `in` indicates that discountable resources are within the specified resources. `not\\_in` indicates that discountable resources are everything but the specified resources.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_rule_id","type":"`string`","description":"The ID of the discount rule associated with the condition","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_rule","type":"[DiscountRule](entities.DiscountRule.mdx)","description":"The details of the discount rule associated with the condition.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"products","type":"[Product](entities.Product.mdx)[]","description":"products associated with this condition if `type` is `products`.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"product_types","type":"[ProductType](entities.ProductType.mdx)[]","description":"Product types associated with this condition if `type` is `product\\_types`.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"product_tags","type":"[ProductTag](entities.ProductTag.mdx)[]","description":"Product tags associated with this condition if `type` is `product\\_tags`.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"product_collections","type":"[ProductCollection](entities.ProductCollection.mdx)[]","description":"Product collections associated with this condition if `type` is `product\\_collections`.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"customer_groups","type":"[CustomerGroup](entities.CustomerGroup.mdx)[]","description":"Customer groups associated with this condition if `type` is `customer\\_groups`.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="DiscountConditionProduct"/> +`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"product","type":"[Product](entities.Product.mdx)","description":"The details of the product.","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The product's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"A title that can be displayed for easy identification of the Product.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"subtitle","type":"`null` \\| `string`","description":"An optional subtitle that can be used to further specify the Product.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"A short description of the Product.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"handle","type":"`null` \\| `string`","description":"A unique identifier for the Product (e.g. for slug structure).","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_giftcard","type":"`boolean`","description":"Whether the Product represents a Gift Card. Products that represent Gift Cards will automatically generate a redeemable Gift Card code once they are purchased.","optional":false,"defaultValue":"false","expandable":false,"children":[]},{"name":"status","type":"[ProductStatus](../enums/entities.ProductStatus.mdx)","description":"The status of the product","optional":false,"defaultValue":"draft","expandable":false,"children":[]},{"name":"images","type":"[Image](entities.Image.mdx)[]","description":"The details of the product's images.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"thumbnail","type":"`null` \\| `string`","description":"A URL to an image file that can be used to identify the Product.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"[ProductOption](entities.ProductOption.mdx)[]","description":"The details of the Product Options that are defined for the Product. The product's variants will have a unique combination of values of the product's options.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"variants","type":"[ProductVariant](entities.ProductVariant.mdx)[]","description":"The details of the Product Variants that belong to the Product. Each will have a unique combination of values of the product's options.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"categories","type":"[ProductCategory](entities.ProductCategory.mdx)[]","description":"The details of the product categories that this product belongs to.","optional":false,"defaultValue":"","expandable":true,"featureFlag":"product_categories","children":[]},{"name":"profile_id","type":"`string`","description":"The ID of the shipping profile that the product belongs to. The shipping profile has a set of defined shipping options that can be used to fulfill the product.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"profile","type":"[ShippingProfile](entities.ShippingProfile.mdx)","description":"The details of the shipping profile that the product belongs to. The shipping profile has a set of defined shipping options that can be used to fulfill the product.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"profiles","type":"[ShippingProfile](entities.ShippingProfile.mdx)[]","description":"Available if the relation `profiles` is expanded.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"weight","type":"`null` \\| `number`","description":"The weight of the Product Variant. May be used in shipping rate calculations.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"length","type":"`null` \\| `number`","description":"The length of the Product Variant. May be used in shipping rate calculations.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"height","type":"`null` \\| `number`","description":"The height of the Product Variant. May be used in shipping rate calculations.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"width","type":"`null` \\| `number`","description":"The width of the Product Variant. May be used in shipping rate calculations.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"hs_code","type":"`null` \\| `string`","description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"origin_country","type":"`null` \\| `string`","description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"mid_code","type":"`null` \\| `string`","description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"material","type":"`null` \\| `string`","description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"collection_id","type":"`null` \\| `string`","description":"The ID of the product collection that the product belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"collection","type":"[ProductCollection](entities.ProductCollection.mdx)","description":"The details of the product collection that the product belongs to.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"type_id","type":"`null` \\| `string`","description":"The ID of the product type that the product belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[ProductType](entities.ProductType.mdx)","description":"The details of the product type that the product belongs to.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"tags","type":"[ProductTag](entities.ProductTag.mdx)[]","description":"The details of the product tags used in this product.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"discountable","type":"`boolean`","description":"Whether the Product can be discounted. Discounts will not apply to Line Items of this Product when this flag is set to `false`.","optional":false,"defaultValue":"true","expandable":false,"children":[]},{"name":"external_id","type":"`null` \\| `string`","description":"The external ID of the product","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channels","type":"[SalesChannel](entities.SalesChannel.mdx)[]","description":"The details of the sales channels this product is available in.","optional":false,"defaultValue":"","expandable":true,"children":[]}]},{"name":"discount_condition","type":"[DiscountCondition](entities.DiscountCondition.mdx)","description":"The details of the discount condition.","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The discount condition's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[DiscountConditionType](../enums/entities.DiscountConditionType.mdx)","description":"The type of the condition. The type affects the available resources associated with the condition. For example, if the type is `products`, that means the `products` relation will hold the products associated with this condition and other relations will be empty.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"operator","type":"[DiscountConditionOperator](../enums/entities.DiscountConditionOperator.mdx)","description":"The operator of the condition. `in` indicates that discountable resources are within the specified resources. `not\\_in` indicates that discountable resources are everything but the specified resources.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_rule_id","type":"`string`","description":"The ID of the discount rule associated with the condition","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_rule","type":"[DiscountRule](entities.DiscountRule.mdx)","description":"The details of the discount rule associated with the condition.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"products","type":"[Product](entities.Product.mdx)[]","description":"products associated with this condition if `type` is `products`.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"product_types","type":"[ProductType](entities.ProductType.mdx)[]","description":"Product types associated with this condition if `type` is `product\\_types`.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"product_tags","type":"[ProductTag](entities.ProductTag.mdx)[]","description":"Product tags associated with this condition if `type` is `product\\_tags`.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"product_collections","type":"[ProductCollection](entities.ProductCollection.mdx)[]","description":"Product collections associated with this condition if `type` is `product\\_collections`.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"customer_groups","type":"[CustomerGroup](entities.CustomerGroup.mdx)[]","description":"Customer groups associated with this condition if `type` is `customer\\_groups`.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="DiscountConditionProduct"/> diff --git a/www/apps/docs/content/references/entities/classes/entities.DiscountConditionProductCollection.mdx b/www/apps/docs/content/references/entities/classes/entities.DiscountConditionProductCollection.mdx index 8fbfd5e111..2b3daf71f1 100644 --- a/www/apps/docs/content/references/entities/classes/entities.DiscountConditionProductCollection.mdx +++ b/www/apps/docs/content/references/entities/classes/entities.DiscountConditionProductCollection.mdx @@ -3,7 +3,7 @@ displayed_sidebar: entitiesSidebar slug: /references/entities/classes/DiscountConditionProductCollection --- -import ParameterTypes from "@site/src/components/ParameterTypes" +import TypeList from "@site/src/components/TypeList" # DiscountConditionProductCollection @@ -11,4 +11,4 @@ This represents the association between a discount condition and a product colle ## Properties -`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"product_collection","type":"[ProductCollection](entities.ProductCollection.mdx)","description":"The details of the product collection.","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The product collection's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"The title that the Product Collection is identified by.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"handle","type":"`string`","description":"A unique string that identifies the Product Collection - can for example be used in slug structures.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"products","type":"[Product](entities.Product.mdx)[]","description":"The details of the products that belong to this product collection.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"discount_condition","type":"[DiscountCondition](entities.DiscountCondition.mdx)","description":"The details of the discount condition.","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The discount condition's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[DiscountConditionType](../enums/entities.DiscountConditionType.mdx)","description":"The type of the condition. The type affects the available resources associated with the condition. For example, if the type is `products`, that means the `products` relation will hold the products associated with this condition and other relations will be empty.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"operator","type":"[DiscountConditionOperator](../enums/entities.DiscountConditionOperator.mdx)","description":"The operator of the condition. `in` indicates that discountable resources are within the specified resources. `not\\_in` indicates that discountable resources are everything but the specified resources.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_rule_id","type":"`string`","description":"The ID of the discount rule associated with the condition","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_rule","type":"[DiscountRule](entities.DiscountRule.mdx)","description":"The details of the discount rule associated with the condition.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"products","type":"[Product](entities.Product.mdx)[]","description":"products associated with this condition if `type` is `products`.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"product_types","type":"[ProductType](entities.ProductType.mdx)[]","description":"Product types associated with this condition if `type` is `product\\_types`.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"product_tags","type":"[ProductTag](entities.ProductTag.mdx)[]","description":"Product tags associated with this condition if `type` is `product\\_tags`.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"product_collections","type":"[ProductCollection](entities.ProductCollection.mdx)[]","description":"Product collections associated with this condition if `type` is `product\\_collections`.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"customer_groups","type":"[CustomerGroup](entities.CustomerGroup.mdx)[]","description":"Customer groups associated with this condition if `type` is `customer\\_groups`.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="DiscountConditionProductCollection"/> +`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"product_collection","type":"[ProductCollection](entities.ProductCollection.mdx)","description":"The details of the product collection.","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The product collection's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"The title that the Product Collection is identified by.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"handle","type":"`string`","description":"A unique string that identifies the Product Collection - can for example be used in slug structures.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"products","type":"[Product](entities.Product.mdx)[]","description":"The details of the products that belong to this product collection.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"discount_condition","type":"[DiscountCondition](entities.DiscountCondition.mdx)","description":"The details of the discount condition.","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The discount condition's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[DiscountConditionType](../enums/entities.DiscountConditionType.mdx)","description":"The type of the condition. The type affects the available resources associated with the condition. For example, if the type is `products`, that means the `products` relation will hold the products associated with this condition and other relations will be empty.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"operator","type":"[DiscountConditionOperator](../enums/entities.DiscountConditionOperator.mdx)","description":"The operator of the condition. `in` indicates that discountable resources are within the specified resources. `not\\_in` indicates that discountable resources are everything but the specified resources.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_rule_id","type":"`string`","description":"The ID of the discount rule associated with the condition","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_rule","type":"[DiscountRule](entities.DiscountRule.mdx)","description":"The details of the discount rule associated with the condition.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"products","type":"[Product](entities.Product.mdx)[]","description":"products associated with this condition if `type` is `products`.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"product_types","type":"[ProductType](entities.ProductType.mdx)[]","description":"Product types associated with this condition if `type` is `product\\_types`.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"product_tags","type":"[ProductTag](entities.ProductTag.mdx)[]","description":"Product tags associated with this condition if `type` is `product\\_tags`.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"product_collections","type":"[ProductCollection](entities.ProductCollection.mdx)[]","description":"Product collections associated with this condition if `type` is `product\\_collections`.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"customer_groups","type":"[CustomerGroup](entities.CustomerGroup.mdx)[]","description":"Customer groups associated with this condition if `type` is `customer\\_groups`.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="DiscountConditionProductCollection"/> diff --git a/www/apps/docs/content/references/entities/classes/entities.DiscountConditionProductTag.mdx b/www/apps/docs/content/references/entities/classes/entities.DiscountConditionProductTag.mdx index 0993799655..dca5a10c17 100644 --- a/www/apps/docs/content/references/entities/classes/entities.DiscountConditionProductTag.mdx +++ b/www/apps/docs/content/references/entities/classes/entities.DiscountConditionProductTag.mdx @@ -3,7 +3,7 @@ displayed_sidebar: entitiesSidebar slug: /references/entities/classes/DiscountConditionProductTag --- -import ParameterTypes from "@site/src/components/ParameterTypes" +import TypeList from "@site/src/components/TypeList" # DiscountConditionProductTag @@ -11,4 +11,4 @@ This represents the association between a discount condition and a product tag ## Properties -`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"product_tag","type":"[ProductTag](entities.ProductTag.mdx)","description":"The details of the product tag.","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The product tag's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string`","description":"The value that the Product Tag represents","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"discount_condition","type":"[DiscountCondition](entities.DiscountCondition.mdx)","description":"The details of the discount condition.","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The discount condition's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[DiscountConditionType](../enums/entities.DiscountConditionType.mdx)","description":"The type of the condition. The type affects the available resources associated with the condition. For example, if the type is `products`, that means the `products` relation will hold the products associated with this condition and other relations will be empty.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"operator","type":"[DiscountConditionOperator](../enums/entities.DiscountConditionOperator.mdx)","description":"The operator of the condition. `in` indicates that discountable resources are within the specified resources. `not\\_in` indicates that discountable resources are everything but the specified resources.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_rule_id","type":"`string`","description":"The ID of the discount rule associated with the condition","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_rule","type":"[DiscountRule](entities.DiscountRule.mdx)","description":"The details of the discount rule associated with the condition.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"products","type":"[Product](entities.Product.mdx)[]","description":"products associated with this condition if `type` is `products`.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"product_types","type":"[ProductType](entities.ProductType.mdx)[]","description":"Product types associated with this condition if `type` is `product\\_types`.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"product_tags","type":"[ProductTag](entities.ProductTag.mdx)[]","description":"Product tags associated with this condition if `type` is `product\\_tags`.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"product_collections","type":"[ProductCollection](entities.ProductCollection.mdx)[]","description":"Product collections associated with this condition if `type` is `product\\_collections`.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"customer_groups","type":"[CustomerGroup](entities.CustomerGroup.mdx)[]","description":"Customer groups associated with this condition if `type` is `customer\\_groups`.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="DiscountConditionProductTag"/> +`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"product_tag","type":"[ProductTag](entities.ProductTag.mdx)","description":"The details of the product tag.","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The product tag's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string`","description":"The value that the Product Tag represents","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"discount_condition","type":"[DiscountCondition](entities.DiscountCondition.mdx)","description":"The details of the discount condition.","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The discount condition's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[DiscountConditionType](../enums/entities.DiscountConditionType.mdx)","description":"The type of the condition. The type affects the available resources associated with the condition. For example, if the type is `products`, that means the `products` relation will hold the products associated with this condition and other relations will be empty.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"operator","type":"[DiscountConditionOperator](../enums/entities.DiscountConditionOperator.mdx)","description":"The operator of the condition. `in` indicates that discountable resources are within the specified resources. `not\\_in` indicates that discountable resources are everything but the specified resources.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_rule_id","type":"`string`","description":"The ID of the discount rule associated with the condition","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_rule","type":"[DiscountRule](entities.DiscountRule.mdx)","description":"The details of the discount rule associated with the condition.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"products","type":"[Product](entities.Product.mdx)[]","description":"products associated with this condition if `type` is `products`.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"product_types","type":"[ProductType](entities.ProductType.mdx)[]","description":"Product types associated with this condition if `type` is `product\\_types`.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"product_tags","type":"[ProductTag](entities.ProductTag.mdx)[]","description":"Product tags associated with this condition if `type` is `product\\_tags`.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"product_collections","type":"[ProductCollection](entities.ProductCollection.mdx)[]","description":"Product collections associated with this condition if `type` is `product\\_collections`.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"customer_groups","type":"[CustomerGroup](entities.CustomerGroup.mdx)[]","description":"Customer groups associated with this condition if `type` is `customer\\_groups`.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="DiscountConditionProductTag"/> diff --git a/www/apps/docs/content/references/entities/classes/entities.DiscountConditionProductType.mdx b/www/apps/docs/content/references/entities/classes/entities.DiscountConditionProductType.mdx index bbcfe4f8f3..7f8bccf65f 100644 --- a/www/apps/docs/content/references/entities/classes/entities.DiscountConditionProductType.mdx +++ b/www/apps/docs/content/references/entities/classes/entities.DiscountConditionProductType.mdx @@ -3,7 +3,7 @@ displayed_sidebar: entitiesSidebar slug: /references/entities/classes/DiscountConditionProductType --- -import ParameterTypes from "@site/src/components/ParameterTypes" +import TypeList from "@site/src/components/TypeList" # DiscountConditionProductType @@ -11,4 +11,4 @@ This represents the association between a discount condition and a product type ## Properties -`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"product_type","type":"[ProductType](entities.ProductType.mdx)","description":"The details of the product type.","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The product type's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string`","description":"The value that the Product Type represents.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"discount_condition","type":"[DiscountCondition](entities.DiscountCondition.mdx)","description":"The details of the discount condition.","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The discount condition's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[DiscountConditionType](../enums/entities.DiscountConditionType.mdx)","description":"The type of the condition. The type affects the available resources associated with the condition. For example, if the type is `products`, that means the `products` relation will hold the products associated with this condition and other relations will be empty.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"operator","type":"[DiscountConditionOperator](../enums/entities.DiscountConditionOperator.mdx)","description":"The operator of the condition. `in` indicates that discountable resources are within the specified resources. `not\\_in` indicates that discountable resources are everything but the specified resources.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_rule_id","type":"`string`","description":"The ID of the discount rule associated with the condition","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_rule","type":"[DiscountRule](entities.DiscountRule.mdx)","description":"The details of the discount rule associated with the condition.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"products","type":"[Product](entities.Product.mdx)[]","description":"products associated with this condition if `type` is `products`.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"product_types","type":"[ProductType](entities.ProductType.mdx)[]","description":"Product types associated with this condition if `type` is `product\\_types`.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"product_tags","type":"[ProductTag](entities.ProductTag.mdx)[]","description":"Product tags associated with this condition if `type` is `product\\_tags`.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"product_collections","type":"[ProductCollection](entities.ProductCollection.mdx)[]","description":"Product collections associated with this condition if `type` is `product\\_collections`.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"customer_groups","type":"[CustomerGroup](entities.CustomerGroup.mdx)[]","description":"Customer groups associated with this condition if `type` is `customer\\_groups`.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="DiscountConditionProductType"/> +`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"product_type","type":"[ProductType](entities.ProductType.mdx)","description":"The details of the product type.","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The product type's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string`","description":"The value that the Product Type represents.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"discount_condition","type":"[DiscountCondition](entities.DiscountCondition.mdx)","description":"The details of the discount condition.","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The discount condition's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[DiscountConditionType](../enums/entities.DiscountConditionType.mdx)","description":"The type of the condition. The type affects the available resources associated with the condition. For example, if the type is `products`, that means the `products` relation will hold the products associated with this condition and other relations will be empty.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"operator","type":"[DiscountConditionOperator](../enums/entities.DiscountConditionOperator.mdx)","description":"The operator of the condition. `in` indicates that discountable resources are within the specified resources. `not\\_in` indicates that discountable resources are everything but the specified resources.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_rule_id","type":"`string`","description":"The ID of the discount rule associated with the condition","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_rule","type":"[DiscountRule](entities.DiscountRule.mdx)","description":"The details of the discount rule associated with the condition.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"products","type":"[Product](entities.Product.mdx)[]","description":"products associated with this condition if `type` is `products`.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"product_types","type":"[ProductType](entities.ProductType.mdx)[]","description":"Product types associated with this condition if `type` is `product\\_types`.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"product_tags","type":"[ProductTag](entities.ProductTag.mdx)[]","description":"Product tags associated with this condition if `type` is `product\\_tags`.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"product_collections","type":"[ProductCollection](entities.ProductCollection.mdx)[]","description":"Product collections associated with this condition if `type` is `product\\_collections`.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"customer_groups","type":"[CustomerGroup](entities.CustomerGroup.mdx)[]","description":"Customer groups associated with this condition if `type` is `customer\\_groups`.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="DiscountConditionProductType"/> diff --git a/www/apps/docs/content/references/entities/classes/entities.DiscountRule.mdx b/www/apps/docs/content/references/entities/classes/entities.DiscountRule.mdx index e75bb292ea..5519c02be5 100644 --- a/www/apps/docs/content/references/entities/classes/entities.DiscountRule.mdx +++ b/www/apps/docs/content/references/entities/classes/entities.DiscountRule.mdx @@ -3,7 +3,7 @@ displayed_sidebar: entitiesSidebar slug: /references/entities/classes/DiscountRule --- -import ParameterTypes from "@site/src/components/ParameterTypes" +import TypeList from "@site/src/components/TypeList" # DiscountRule @@ -11,4 +11,4 @@ A discount rule defines how a Discount is calculated when applied to a Cart. ## Properties -`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="DiscountRule"/> +`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="DiscountRule"/> diff --git a/www/apps/docs/content/references/entities/classes/entities.DraftOrder.mdx b/www/apps/docs/content/references/entities/classes/entities.DraftOrder.mdx index 08c74b776a..0d5b9f885d 100644 --- a/www/apps/docs/content/references/entities/classes/entities.DraftOrder.mdx +++ b/www/apps/docs/content/references/entities/classes/entities.DraftOrder.mdx @@ -3,7 +3,7 @@ displayed_sidebar: entitiesSidebar slug: /references/entities/classes/DraftOrder --- -import ParameterTypes from "@site/src/components/ParameterTypes" +import TypeList from "@site/src/components/TypeList" # DraftOrder @@ -11,4 +11,4 @@ A draft order is created by an admin without direct involvement of the customer. ## Properties -`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotency_key","type":"`string`","description":"Randomly generated key used to continue the completion of the cart associated with the draft order in case of failure.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="DraftOrder"/> +`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotency_key","type":"`string`","description":"Randomly generated key used to continue the completion of the cart associated with the draft order in case of failure.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="DraftOrder"/> diff --git a/www/apps/docs/content/references/entities/classes/entities.Fulfillment.mdx b/www/apps/docs/content/references/entities/classes/entities.Fulfillment.mdx index 43259d2383..7fdfdfedaa 100644 --- a/www/apps/docs/content/references/entities/classes/entities.Fulfillment.mdx +++ b/www/apps/docs/content/references/entities/classes/entities.Fulfillment.mdx @@ -3,7 +3,7 @@ displayed_sidebar: entitiesSidebar slug: /references/entities/classes/Fulfillment --- -import ParameterTypes from "@site/src/components/ParameterTypes" +import TypeList from "@site/src/components/TypeList" # Fulfillment @@ -11,4 +11,4 @@ A Fulfillment is created once an admin can prepare the purchased goods. Fulfillm ## Properties -`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotency_key","type":"`string`","description":"Randomly generated key used to continue the completion of the cart associated with the claim in case of failure.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"swap_id","type":"`string`","description":"The ID of the Swap that the Fulfillment belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"swap","type":"[Swap](entities.Swap.mdx)","description":"The details of the swap that the fulfillment may belong to.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The swap's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[SwapFulfillmentStatus](../enums/entities.SwapFulfillmentStatus.mdx)","description":"The status of the Fulfillment of the Swap.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[SwapPaymentStatus](../enums/entities.SwapPaymentStatus.mdx)","description":"The status of the Payment of the Swap. The payment may either refer to the refund of an amount or the authorization of a new amount.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_id","type":"`string`","description":"The ID of the order that the swap belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"[Order](entities.Order.mdx)","description":"The details of the order that the swap belongs to.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"additional_items","type":"[LineItem](entities.LineItem.mdx)[]","description":"The details of the new products to send to the customer, represented as line items.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"return_order","type":"[Return](entities.Return.mdx)","description":"The details of the return that belongs to the swap, which holds the details on the items being returned.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"fulfillments","type":"[Fulfillment](entities.Fulfillment.mdx)[]","description":"The details of the fulfillments that are used to send the new items to the customer.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"payment","type":"[Payment](entities.Payment.mdx)","description":"The details of the additional payment authorized by the customer when `difference\\_due` is positive.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"difference_due","type":"`number`","description":"The difference amount between the order’s original total and the new total imposed by the swap. If its value is negative, a refund must be issues to the customer. If it's positive, additional payment must be authorized by the customer. Otherwise, no payment processing is required.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_address_id","type":"`string`","description":"The Address to send the new Line Items to - in most cases this will be the same as the shipping address on the Order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_address","type":"[Address](entities.Address.mdx)","description":"The details of the shipping address that the new items should be sent to.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"shipping_methods","type":"[ShippingMethod](entities.ShippingMethod.mdx)[]","description":"The details of the shipping methods used to fulfill the additional items purchased.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"cart_id","type":"`string`","description":"The ID of the cart that the customer uses to complete the swap.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart","type":"[Cart](entities.Cart.mdx)","description":"The details of the cart that the customer uses to complete the swap.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"confirmed_at","type":"`Date`","description":"The date with timezone at which the Swap was confirmed by the Customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`Date`","description":"The date with timezone at which the Swap was canceled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"no_notification","type":"`boolean`","description":"If set to true, no notification will be sent related to this swap","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"allow_backorder","type":"`boolean`","description":"If true, swaps can be completed with items out of stock","optional":false,"defaultValue":"false","expandable":false,"children":[]},{"name":"idempotency_key","type":"`string`","description":"Randomly generated key used to continue the completion of the swap in case of failure.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"order_id","type":"`string`","description":"The ID of the Order that the Fulfillment belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"[Order](entities.Order.mdx)","description":"The details of the order that the fulfillment may belong to.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The order's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"object","type":"`\"order\"`","description":"","optional":false,"defaultValue":"\"order\"","expandable":false,"children":[]},{"name":"status","type":"[OrderStatus](../enums/entities.OrderStatus.mdx)","description":"The order's status","optional":false,"defaultValue":"pending","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../enums/entities.FulfillmentStatus.mdx)","description":"The order's fulfillment status","optional":false,"defaultValue":"not_fulfilled","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../enums/entities.PaymentStatus.mdx)","description":"The order's payment status","optional":false,"defaultValue":"not_paid","expandable":false,"children":[]},{"name":"display_id","type":"`number`","description":"The order's display ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart_id","type":"`string`","description":"The ID of the cart associated with the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart","type":"[Cart](entities.Cart.mdx)","description":"The details of the cart associated with the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"customer_id","type":"`string`","description":"The ID of the customer associated with the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer","type":"[Customer](entities.Customer.mdx)","description":"The details of the customer associated with the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"email","type":"`string`","description":"The email associated with the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"billing_address_id","type":"`string`","description":"The ID of the billing address associated with the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"billing_address","type":"[Address](entities.Address.mdx)","description":"The details of the billing address associated with the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"shipping_address_id","type":"`string`","description":"The ID of the shipping address associated with the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_address","type":"[Address](entities.Address.mdx)","description":"The details of the shipping address associated with the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"region_id","type":"`string`","description":"The ID of the region this order was created in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region","type":"[Region](entities.Region.mdx)","description":"The details of the region this order was created in.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"currency_code","type":"`string`","description":"The 3 character currency code that is used in the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency","type":"[Currency](entities.Currency.mdx)","description":"The details of the currency used in the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"tax_rate","type":"`null` \\| `number`","description":"The order's tax rate","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discounts","type":"[Discount](entities.Discount.mdx)[]","description":"The details of the discounts applied on the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"gift_cards","type":"[GiftCard](entities.GiftCard.mdx)[]","description":"The details of the gift card used in the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"shipping_methods","type":"[ShippingMethod](entities.ShippingMethod.mdx)[]","description":"The details of the shipping methods used in the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"payments","type":"[Payment](entities.Payment.mdx)[]","description":"The details of the payments used in the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"fulfillments","type":"[Fulfillment](entities.Fulfillment.mdx)[]","description":"The details of the fulfillments created for the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"returns","type":"[Return](entities.Return.mdx)[]","description":"The details of the returns created for the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"claims","type":"[ClaimOrder](entities.ClaimOrder.mdx)[]","description":"The details of the claims created for the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"refunds","type":"[Refund](entities.Refund.mdx)[]","description":"The details of the refunds created for the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"swaps","type":"[Swap](entities.Swap.mdx)[]","description":"The details of the swaps created for the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"draft_order_id","type":"`string`","description":"The ID of the draft order this order was created from.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"draft_order","type":"[DraftOrder](entities.DraftOrder.mdx)","description":"The details of the draft order this order was created from.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"edits","type":"[OrderEdit](entities.OrderEdit.mdx)[]","description":"The details of the order edits done on the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"items","type":"[LineItem](entities.LineItem.mdx)[]","description":"The details of the line items that belong to the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"gift_card_transactions","type":"[GiftCardTransaction](entities.GiftCardTransaction.mdx)[]","description":"The gift card transactions made in the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"canceled_at","type":"`Date`","description":"The date the order was canceled on.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"no_notification","type":"`boolean`","description":"Flag for describing whether or not notifications related to this should be send.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotency_key","type":"`string`","description":"Randomly generated key used to continue the processing of the order in case of failure.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"external_id","type":"`null` \\| `string`","description":"The ID of an external order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel this order belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel","type":"[SalesChannel](entities.SalesChannel.mdx)","description":"The details of the sales channel this order belongs to.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"shipping_total","type":"`number`","description":"The total of shipping","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_tax_total","type":"`null` \\| `number`","description":"The tax total applied on shipping","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_total","type":"`number`","description":"The total of discount rounded","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_discount_total","type":"`number`","description":"The total of discount","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`null` \\| `number`","description":"The tax total applied on items","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_total","type":"`null` \\| `number`","description":"The total of tax","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"refunded_total","type":"`number`","description":"The total amount refunded if the order is returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"total","type":"`number`","description":"The total amount of the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"subtotal","type":"`number`","description":"The subtotal of the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"paid_total","type":"`number`","description":"The total amount paid","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"refundable_amount","type":"`number`","description":"The amount that can be refunded","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"gift_card_total","type":"`number`","description":"The total of gift cards","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"gift_card_tax_total","type":"`number`","description":"The total of gift cards with taxes","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channels","type":"[SalesChannel](entities.SalesChannel.mdx)[]","description":"The associated sales channels.","optional":true,"defaultValue":"","expandable":true,"featureFlag":"medusa_v2","children":[]},{"name":"returnable_items","type":"[LineItem](entities.LineItem.mdx)[]","description":"The details of the line items that are returnable as part of the order, swaps, or claims","optional":true,"defaultValue":"","expandable":true,"children":[]}]},{"name":"no_notification","type":"`boolean`","description":"Flag for describing whether or not notifications related to this should be sent.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The ID of the Fulfillment Provider responsible for handling the fulfillment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`null` \\| `string`","description":"The ID of the stock location the fulfillment will be shipped from","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider","type":"[FulfillmentProvider](entities.FulfillmentProvider.mdx)","description":"The details of the fulfillment provider responsible for handling the fulfillment.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The ID of the fulfillment provider as given by the fulfillment service.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_installed","type":"`boolean`","description":"Whether the fulfillment service is installed in the current version. If a fulfillment service is no longer installed, the `is\\_installed` attribute is set to `false`.","optional":false,"defaultValue":"true","expandable":false,"children":[]}]},{"name":"items","type":"[FulfillmentItem](entities.FulfillmentItem.mdx)[]","description":"The Fulfillment Items in the Fulfillment. These hold information about how many of each Line Item has been fulfilled.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"fulfillment_id","type":"`string`","description":"The ID of the Fulfillment that the Fulfillment Item belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_id","type":"`string`","description":"The ID of the Line Item that the Fulfillment Item references.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment","type":"[Fulfillment](entities.Fulfillment.mdx)","description":"The details of the fulfillment.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"item","type":"[LineItem](entities.LineItem.mdx)","description":"The details of the line item.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"quantity","type":"`number`","description":"The quantity of the Line Item that is included in the Fulfillment.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"tracking_links","type":"[TrackingLink](entities.TrackingLink.mdx)[]","description":"The Tracking Links that can be used to track the status of the Fulfillment. These will usually be provided by the Fulfillment Provider.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The tracking link's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"url","type":"`string`","description":"The URL at which the status of the shipment can be tracked.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tracking_number","type":"`string`","description":"The tracking number given by the shipping carrier.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_id","type":"`string`","description":"The ID of the fulfillment that the tracking link belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment","type":"[Fulfillment](entities.Fulfillment.mdx)","description":"The details of the fulfillment that the tracking link belongs to.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"idempotency_key","type":"`string`","description":"Randomly generated key used to continue the completion of a process in case of failure.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"tracking_numbers","type":"`string`[]","description":"The tracking numbers that can be used to track the status of the fulfillment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record`","description":"This contains all the data necessary for the Fulfillment provider to handle the fulfillment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipped_at","type":"`Date`","description":"The date with timezone at which the Fulfillment was shipped.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`Date`","description":"The date with timezone at which the Fulfillment was canceled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotency_key","type":"`string`","description":"Randomly generated key used to continue the completion of the fulfillment in case of failure.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="Fulfillment"/> +`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotency_key","type":"`string`","description":"Randomly generated key used to continue the completion of the cart associated with the claim in case of failure.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"swap_id","type":"`string`","description":"The ID of the Swap that the Fulfillment belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"swap","type":"[Swap](entities.Swap.mdx)","description":"The details of the swap that the fulfillment may belong to.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The swap's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[SwapFulfillmentStatus](../enums/entities.SwapFulfillmentStatus.mdx)","description":"The status of the Fulfillment of the Swap.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[SwapPaymentStatus](../enums/entities.SwapPaymentStatus.mdx)","description":"The status of the Payment of the Swap. The payment may either refer to the refund of an amount or the authorization of a new amount.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_id","type":"`string`","description":"The ID of the order that the swap belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"[Order](entities.Order.mdx)","description":"The details of the order that the swap belongs to.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"additional_items","type":"[LineItem](entities.LineItem.mdx)[]","description":"The details of the new products to send to the customer, represented as line items.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"return_order","type":"[Return](entities.Return.mdx)","description":"The details of the return that belongs to the swap, which holds the details on the items being returned.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"fulfillments","type":"[Fulfillment](entities.Fulfillment.mdx)[]","description":"The details of the fulfillments that are used to send the new items to the customer.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"payment","type":"[Payment](entities.Payment.mdx)","description":"The details of the additional payment authorized by the customer when `difference\\_due` is positive.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"difference_due","type":"`number`","description":"The difference amount between the order’s original total and the new total imposed by the swap. If its value is negative, a refund must be issues to the customer. If it's positive, additional payment must be authorized by the customer. Otherwise, no payment processing is required.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_address_id","type":"`string`","description":"The Address to send the new Line Items to - in most cases this will be the same as the shipping address on the Order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_address","type":"[Address](entities.Address.mdx)","description":"The details of the shipping address that the new items should be sent to.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"shipping_methods","type":"[ShippingMethod](entities.ShippingMethod.mdx)[]","description":"The details of the shipping methods used to fulfill the additional items purchased.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"cart_id","type":"`string`","description":"The ID of the cart that the customer uses to complete the swap.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart","type":"[Cart](entities.Cart.mdx)","description":"The details of the cart that the customer uses to complete the swap.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"confirmed_at","type":"`Date`","description":"The date with timezone at which the Swap was confirmed by the Customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`Date`","description":"The date with timezone at which the Swap was canceled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"no_notification","type":"`boolean`","description":"If set to true, no notification will be sent related to this swap","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"allow_backorder","type":"`boolean`","description":"If true, swaps can be completed with items out of stock","optional":false,"defaultValue":"false","expandable":false,"children":[]},{"name":"idempotency_key","type":"`string`","description":"Randomly generated key used to continue the completion of the swap in case of failure.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"order_id","type":"`string`","description":"The ID of the Order that the Fulfillment belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"[Order](entities.Order.mdx)","description":"The details of the order that the fulfillment may belong to.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The order's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"object","type":"`\"order\"`","description":"","optional":false,"defaultValue":"\"order\"","expandable":false,"children":[]},{"name":"status","type":"[OrderStatus](../enums/entities.OrderStatus.mdx)","description":"The order's status","optional":false,"defaultValue":"pending","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../enums/entities.FulfillmentStatus.mdx)","description":"The order's fulfillment status","optional":false,"defaultValue":"not_fulfilled","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../enums/entities.PaymentStatus.mdx)","description":"The order's payment status","optional":false,"defaultValue":"not_paid","expandable":false,"children":[]},{"name":"display_id","type":"`number`","description":"The order's display ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart_id","type":"`string`","description":"The ID of the cart associated with the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart","type":"[Cart](entities.Cart.mdx)","description":"The details of the cart associated with the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"customer_id","type":"`string`","description":"The ID of the customer associated with the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer","type":"[Customer](entities.Customer.mdx)","description":"The details of the customer associated with the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"email","type":"`string`","description":"The email associated with the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"billing_address_id","type":"`string`","description":"The ID of the billing address associated with the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"billing_address","type":"[Address](entities.Address.mdx)","description":"The details of the billing address associated with the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"shipping_address_id","type":"`string`","description":"The ID of the shipping address associated with the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_address","type":"[Address](entities.Address.mdx)","description":"The details of the shipping address associated with the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"region_id","type":"`string`","description":"The ID of the region this order was created in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region","type":"[Region](entities.Region.mdx)","description":"The details of the region this order was created in.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"currency_code","type":"`string`","description":"The 3 character currency code that is used in the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency","type":"[Currency](entities.Currency.mdx)","description":"The details of the currency used in the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"tax_rate","type":"`null` \\| `number`","description":"The order's tax rate","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discounts","type":"[Discount](entities.Discount.mdx)[]","description":"The details of the discounts applied on the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"gift_cards","type":"[GiftCard](entities.GiftCard.mdx)[]","description":"The details of the gift card used in the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"shipping_methods","type":"[ShippingMethod](entities.ShippingMethod.mdx)[]","description":"The details of the shipping methods used in the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"payments","type":"[Payment](entities.Payment.mdx)[]","description":"The details of the payments used in the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"fulfillments","type":"[Fulfillment](entities.Fulfillment.mdx)[]","description":"The details of the fulfillments created for the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"returns","type":"[Return](entities.Return.mdx)[]","description":"The details of the returns created for the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"claims","type":"[ClaimOrder](entities.ClaimOrder.mdx)[]","description":"The details of the claims created for the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"refunds","type":"[Refund](entities.Refund.mdx)[]","description":"The details of the refunds created for the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"swaps","type":"[Swap](entities.Swap.mdx)[]","description":"The details of the swaps created for the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"draft_order_id","type":"`string`","description":"The ID of the draft order this order was created from.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"draft_order","type":"[DraftOrder](entities.DraftOrder.mdx)","description":"The details of the draft order this order was created from.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"edits","type":"[OrderEdit](entities.OrderEdit.mdx)[]","description":"The details of the order edits done on the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"items","type":"[LineItem](entities.LineItem.mdx)[]","description":"The details of the line items that belong to the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"gift_card_transactions","type":"[GiftCardTransaction](entities.GiftCardTransaction.mdx)[]","description":"The gift card transactions made in the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"canceled_at","type":"`Date`","description":"The date the order was canceled on.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"no_notification","type":"`boolean`","description":"Flag for describing whether or not notifications related to this should be send.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotency_key","type":"`string`","description":"Randomly generated key used to continue the processing of the order in case of failure.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"external_id","type":"`null` \\| `string`","description":"The ID of an external order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel this order belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel","type":"[SalesChannel](entities.SalesChannel.mdx)","description":"The details of the sales channel this order belongs to.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"shipping_total","type":"`number`","description":"The total of shipping","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_tax_total","type":"`null` \\| `number`","description":"The tax total applied on shipping","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_total","type":"`number`","description":"The total of discount rounded","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_discount_total","type":"`number`","description":"The total of discount","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`null` \\| `number`","description":"The tax total applied on items","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_total","type":"`null` \\| `number`","description":"The total of tax","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"refunded_total","type":"`number`","description":"The total amount refunded if the order is returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"total","type":"`number`","description":"The total amount of the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"subtotal","type":"`number`","description":"The subtotal of the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"paid_total","type":"`number`","description":"The total amount paid","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"refundable_amount","type":"`number`","description":"The amount that can be refunded","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"gift_card_total","type":"`number`","description":"The total of gift cards","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"gift_card_tax_total","type":"`number`","description":"The total of gift cards with taxes","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channels","type":"[SalesChannel](entities.SalesChannel.mdx)[]","description":"The associated sales channels.","optional":true,"defaultValue":"","expandable":true,"featureFlag":"medusa_v2","children":[]},{"name":"returnable_items","type":"[LineItem](entities.LineItem.mdx)[]","description":"The details of the line items that are returnable as part of the order, swaps, or claims","optional":true,"defaultValue":"","expandable":true,"children":[]}]},{"name":"no_notification","type":"`boolean`","description":"Flag for describing whether or not notifications related to this should be sent.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The ID of the Fulfillment Provider responsible for handling the fulfillment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`null` \\| `string`","description":"The ID of the stock location the fulfillment will be shipped from","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider","type":"[FulfillmentProvider](entities.FulfillmentProvider.mdx)","description":"The details of the fulfillment provider responsible for handling the fulfillment.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The ID of the fulfillment provider as given by the fulfillment service.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_installed","type":"`boolean`","description":"Whether the fulfillment service is installed in the current version. If a fulfillment service is no longer installed, the `is\\_installed` attribute is set to `false`.","optional":false,"defaultValue":"true","expandable":false,"children":[]}]},{"name":"items","type":"[FulfillmentItem](entities.FulfillmentItem.mdx)[]","description":"The Fulfillment Items in the Fulfillment. These hold information about how many of each Line Item has been fulfilled.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"fulfillment_id","type":"`string`","description":"The ID of the Fulfillment that the Fulfillment Item belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_id","type":"`string`","description":"The ID of the Line Item that the Fulfillment Item references.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment","type":"[Fulfillment](entities.Fulfillment.mdx)","description":"The details of the fulfillment.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"item","type":"[LineItem](entities.LineItem.mdx)","description":"The details of the line item.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"quantity","type":"`number`","description":"The quantity of the Line Item that is included in the Fulfillment.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"tracking_links","type":"[TrackingLink](entities.TrackingLink.mdx)[]","description":"The Tracking Links that can be used to track the status of the Fulfillment. These will usually be provided by the Fulfillment Provider.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The tracking link's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"url","type":"`string`","description":"The URL at which the status of the shipment can be tracked.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tracking_number","type":"`string`","description":"The tracking number given by the shipping carrier.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_id","type":"`string`","description":"The ID of the fulfillment that the tracking link belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment","type":"[Fulfillment](entities.Fulfillment.mdx)","description":"The details of the fulfillment that the tracking link belongs to.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"idempotency_key","type":"`string`","description":"Randomly generated key used to continue the completion of a process in case of failure.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"tracking_numbers","type":"`string`[]","description":"The tracking numbers that can be used to track the status of the fulfillment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record`","description":"This contains all the data necessary for the Fulfillment provider to handle the fulfillment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipped_at","type":"`Date`","description":"The date with timezone at which the Fulfillment was shipped.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`Date`","description":"The date with timezone at which the Fulfillment was canceled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotency_key","type":"`string`","description":"Randomly generated key used to continue the completion of the fulfillment in case of failure.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="Fulfillment"/> diff --git a/www/apps/docs/content/references/entities/classes/entities.FulfillmentItem.mdx b/www/apps/docs/content/references/entities/classes/entities.FulfillmentItem.mdx index 1981240061..2e570e93b1 100644 --- a/www/apps/docs/content/references/entities/classes/entities.FulfillmentItem.mdx +++ b/www/apps/docs/content/references/entities/classes/entities.FulfillmentItem.mdx @@ -3,7 +3,7 @@ displayed_sidebar: entitiesSidebar slug: /references/entities/classes/FulfillmentItem --- -import ParameterTypes from "@site/src/components/ParameterTypes" +import TypeList from "@site/src/components/TypeList" # FulfillmentItem @@ -11,4 +11,4 @@ This represents the association between a Line Item and a Fulfillment. ## Properties -`","description":"This contains all the data necessary for the Fulfillment provider to handle the fulfillment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipped_at","type":"`Date`","description":"The date with timezone at which the Fulfillment was shipped.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`Date`","description":"The date with timezone at which the Fulfillment was canceled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotency_key","type":"`string`","description":"Randomly generated key used to continue the completion of the fulfillment in case of failure.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"item","type":"[LineItem](entities.LineItem.mdx)","description":"The details of the line item.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The line item's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart_id","type":"`string`","description":"The ID of the cart that the line item may belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart","type":"[Cart](entities.Cart.mdx)","description":"The details of the cart that the line item may belongs to.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"order_id","type":"`null` \\| `string`","description":"The ID of the order that the line item may belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"[Order](entities.Order.mdx)","description":"The details of the order that the line item may belongs to.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"swap_id","type":"`string`","description":"The ID of the swap that the line item may belong to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"swap","type":"[Swap](entities.Swap.mdx)","description":"The details of the swap that the line item may belong to.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"claim_order_id","type":"`string`","description":"The ID of the claim that the line item may belong to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"claim_order","type":"[ClaimOrder](entities.ClaimOrder.mdx)","description":"The details of the claim that the line item may belong to.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"tax_lines","type":"[LineItemTaxLine](entities.LineItemTaxLine.mdx)[]","description":"The details of the item's tax lines.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"adjustments","type":"[LineItemAdjustment](entities.LineItemAdjustment.mdx)[]","description":"The details of the item's adjustments, which are available when a discount is applied on the item.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"title","type":"`string`","description":"The title of the Line Item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"A more detailed description of the contents of the Line Item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"thumbnail","type":"`null` \\| `string`","description":"A URL string to a small image of the contents of the Line Item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_return","type":"`boolean`","description":"Is the item being returned","optional":false,"defaultValue":"false","expandable":false,"children":[]},{"name":"is_giftcard","type":"`boolean`","description":"Flag to indicate if the Line Item is a Gift Card.","optional":false,"defaultValue":"false","expandable":false,"children":[]},{"name":"should_merge","type":"`boolean`","description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","optional":false,"defaultValue":"true","expandable":false,"children":[]},{"name":"allow_discounts","type":"`boolean`","description":"Flag to indicate if the Line Item should be included when doing discount calculations.","optional":false,"defaultValue":"true","expandable":false,"children":[]},{"name":"has_shipping","type":"`null` \\| `boolean`","description":"Flag to indicate if the Line Item has fulfillment associated with it.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"unit_price","type":"`number`","description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_id","type":"`null` \\| `string`","description":"The id of the Product Variant contained in the Line Item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"variant","type":"[ProductVariant](entities.ProductVariant.mdx)","description":"The details of the product variant that this item was created from.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"product_id","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`number`","description":"The quantity of the content in the Line Item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfilled_quantity","type":"`null` \\| `number`","description":"The quantity of the Line Item that has been fulfilled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"returned_quantity","type":"`null` \\| `number`","description":"The quantity of the Line Item that has been returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipped_quantity","type":"`null` \\| `number`","description":"The quantity of the Line Item that has been shipped.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"includes_tax","type":"`boolean`","description":"Indicates if the line item unit\\_price include tax","optional":false,"defaultValue":"false","expandable":false,"featureFlag":"tax_inclusive_pricing","children":[]},{"name":"original_item_id","type":"`null` \\| `string`","description":"The ID of the original line item. This is useful if the line item belongs to a resource that references an order, such as a return or an order edit.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order_edit_id","type":"`null` \\| `string`","description":"The ID of the order edit that the item may belong to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order_edit","type":"`null` \\| [OrderEdit](entities.OrderEdit.mdx)","description":"The details of the order edit.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"refundable","type":"`null` \\| `number`","description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"subtotal","type":"`null` \\| `number`","description":"The subtotal of the line item","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_total","type":"`null` \\| `number`","description":"The total of tax of the line item","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"total","type":"`null` \\| `number`","description":"The total amount of the line item","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"`null` \\| `number`","description":"The original total amount of the line item","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"original_tax_total","type":"`null` \\| `number`","description":"The original tax total amount of the line item","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_total","type":"`null` \\| `number`","description":"The total of discount of the line item rounded","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_discount_total","type":"`null` \\| `number`","description":"The total of discount of the line item","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"gift_card_total","type":"`null` \\| `number`","description":"The total of the gift card of the line item","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"quantity","type":"`number`","description":"The quantity of the Line Item that is included in the Fulfillment.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="FulfillmentItem"/> +`","description":"This contains all the data necessary for the Fulfillment provider to handle the fulfillment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipped_at","type":"`Date`","description":"The date with timezone at which the Fulfillment was shipped.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`Date`","description":"The date with timezone at which the Fulfillment was canceled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotency_key","type":"`string`","description":"Randomly generated key used to continue the completion of the fulfillment in case of failure.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"item","type":"[LineItem](entities.LineItem.mdx)","description":"The details of the line item.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The line item's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart_id","type":"`string`","description":"The ID of the cart that the line item may belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart","type":"[Cart](entities.Cart.mdx)","description":"The details of the cart that the line item may belongs to.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"order_id","type":"`null` \\| `string`","description":"The ID of the order that the line item may belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"[Order](entities.Order.mdx)","description":"The details of the order that the line item may belongs to.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"swap_id","type":"`string`","description":"The ID of the swap that the line item may belong to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"swap","type":"[Swap](entities.Swap.mdx)","description":"The details of the swap that the line item may belong to.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"claim_order_id","type":"`string`","description":"The ID of the claim that the line item may belong to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"claim_order","type":"[ClaimOrder](entities.ClaimOrder.mdx)","description":"The details of the claim that the line item may belong to.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"tax_lines","type":"[LineItemTaxLine](entities.LineItemTaxLine.mdx)[]","description":"The details of the item's tax lines.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"adjustments","type":"[LineItemAdjustment](entities.LineItemAdjustment.mdx)[]","description":"The details of the item's adjustments, which are available when a discount is applied on the item.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"title","type":"`string`","description":"The title of the Line Item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"A more detailed description of the contents of the Line Item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"thumbnail","type":"`null` \\| `string`","description":"A URL string to a small image of the contents of the Line Item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_return","type":"`boolean`","description":"Is the item being returned","optional":false,"defaultValue":"false","expandable":false,"children":[]},{"name":"is_giftcard","type":"`boolean`","description":"Flag to indicate if the Line Item is a Gift Card.","optional":false,"defaultValue":"false","expandable":false,"children":[]},{"name":"should_merge","type":"`boolean`","description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","optional":false,"defaultValue":"true","expandable":false,"children":[]},{"name":"allow_discounts","type":"`boolean`","description":"Flag to indicate if the Line Item should be included when doing discount calculations.","optional":false,"defaultValue":"true","expandable":false,"children":[]},{"name":"has_shipping","type":"`null` \\| `boolean`","description":"Flag to indicate if the Line Item has fulfillment associated with it.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"unit_price","type":"`number`","description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_id","type":"`null` \\| `string`","description":"The id of the Product Variant contained in the Line Item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"variant","type":"[ProductVariant](entities.ProductVariant.mdx)","description":"The details of the product variant that this item was created from.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"product_id","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`number`","description":"The quantity of the content in the Line Item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfilled_quantity","type":"`null` \\| `number`","description":"The quantity of the Line Item that has been fulfilled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"returned_quantity","type":"`null` \\| `number`","description":"The quantity of the Line Item that has been returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipped_quantity","type":"`null` \\| `number`","description":"The quantity of the Line Item that has been shipped.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"includes_tax","type":"`boolean`","description":"Indicates if the line item unit\\_price include tax","optional":false,"defaultValue":"false","expandable":false,"featureFlag":"tax_inclusive_pricing","children":[]},{"name":"original_item_id","type":"`null` \\| `string`","description":"The ID of the original line item. This is useful if the line item belongs to a resource that references an order, such as a return or an order edit.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order_edit_id","type":"`null` \\| `string`","description":"The ID of the order edit that the item may belong to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order_edit","type":"`null` \\| [OrderEdit](entities.OrderEdit.mdx)","description":"The details of the order edit.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"refundable","type":"`null` \\| `number`","description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"subtotal","type":"`null` \\| `number`","description":"The subtotal of the line item","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_total","type":"`null` \\| `number`","description":"The total of tax of the line item","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"total","type":"`null` \\| `number`","description":"The total amount of the line item","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"`null` \\| `number`","description":"The original total amount of the line item","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"original_tax_total","type":"`null` \\| `number`","description":"The original tax total amount of the line item","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_total","type":"`null` \\| `number`","description":"The total of discount of the line item rounded","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_discount_total","type":"`null` \\| `number`","description":"The total of discount of the line item","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"gift_card_total","type":"`null` \\| `number`","description":"The total of the gift card of the line item","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"quantity","type":"`number`","description":"The quantity of the Line Item that is included in the Fulfillment.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="FulfillmentItem"/> diff --git a/www/apps/docs/content/references/entities/classes/entities.FulfillmentProvider.mdx b/www/apps/docs/content/references/entities/classes/entities.FulfillmentProvider.mdx index 1e452469e0..18239ab96d 100644 --- a/www/apps/docs/content/references/entities/classes/entities.FulfillmentProvider.mdx +++ b/www/apps/docs/content/references/entities/classes/entities.FulfillmentProvider.mdx @@ -3,7 +3,7 @@ displayed_sidebar: entitiesSidebar slug: /references/entities/classes/FulfillmentProvider --- -import ParameterTypes from "@site/src/components/ParameterTypes" +import TypeList from "@site/src/components/TypeList" # FulfillmentProvider @@ -11,4 +11,4 @@ A fulfillment provider represents a fulfillment service installed in the Medusa ## Properties - + diff --git a/www/apps/docs/content/references/entities/classes/entities.GiftCard.mdx b/www/apps/docs/content/references/entities/classes/entities.GiftCard.mdx index 4ba9785290..e827d5d234 100644 --- a/www/apps/docs/content/references/entities/classes/entities.GiftCard.mdx +++ b/www/apps/docs/content/references/entities/classes/entities.GiftCard.mdx @@ -3,7 +3,7 @@ displayed_sidebar: entitiesSidebar slug: /references/entities/classes/GiftCard --- -import ParameterTypes from "@site/src/components/ParameterTypes" +import TypeList from "@site/src/components/TypeList" # GiftCard @@ -11,4 +11,4 @@ Gift Cards are redeemable and represent a value that can be used towards the pay ## Properties -`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"includes_tax","type":"`boolean`","description":"Whether the prices for the region include tax","optional":false,"defaultValue":"false","expandable":false,"featureFlag":"tax_inclusive_pricing","children":[]}]},{"name":"order_id","type":"`string`","description":"The ID of the order that the gift card was purchased in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"[Order](entities.Order.mdx)","description":"The details of the order that the gift card was purchased in.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The order's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"object","type":"`\"order\"`","description":"","optional":false,"defaultValue":"\"order\"","expandable":false,"children":[]},{"name":"status","type":"[OrderStatus](../enums/entities.OrderStatus.mdx)","description":"The order's status","optional":false,"defaultValue":"pending","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../enums/entities.FulfillmentStatus.mdx)","description":"The order's fulfillment status","optional":false,"defaultValue":"not_fulfilled","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../enums/entities.PaymentStatus.mdx)","description":"The order's payment status","optional":false,"defaultValue":"not_paid","expandable":false,"children":[]},{"name":"display_id","type":"`number`","description":"The order's display ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart_id","type":"`string`","description":"The ID of the cart associated with the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart","type":"[Cart](entities.Cart.mdx)","description":"The details of the cart associated with the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"customer_id","type":"`string`","description":"The ID of the customer associated with the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer","type":"[Customer](entities.Customer.mdx)","description":"The details of the customer associated with the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"email","type":"`string`","description":"The email associated with the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"billing_address_id","type":"`string`","description":"The ID of the billing address associated with the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"billing_address","type":"[Address](entities.Address.mdx)","description":"The details of the billing address associated with the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"shipping_address_id","type":"`string`","description":"The ID of the shipping address associated with the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_address","type":"[Address](entities.Address.mdx)","description":"The details of the shipping address associated with the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"region_id","type":"`string`","description":"The ID of the region this order was created in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region","type":"[Region](entities.Region.mdx)","description":"The details of the region this order was created in.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"currency_code","type":"`string`","description":"The 3 character currency code that is used in the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency","type":"[Currency](entities.Currency.mdx)","description":"The details of the currency used in the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"tax_rate","type":"`null` \\| `number`","description":"The order's tax rate","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discounts","type":"[Discount](entities.Discount.mdx)[]","description":"The details of the discounts applied on the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"gift_cards","type":"[GiftCard](entities.GiftCard.mdx)[]","description":"The details of the gift card used in the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"shipping_methods","type":"[ShippingMethod](entities.ShippingMethod.mdx)[]","description":"The details of the shipping methods used in the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"payments","type":"[Payment](entities.Payment.mdx)[]","description":"The details of the payments used in the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"fulfillments","type":"[Fulfillment](entities.Fulfillment.mdx)[]","description":"The details of the fulfillments created for the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"returns","type":"[Return](entities.Return.mdx)[]","description":"The details of the returns created for the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"claims","type":"[ClaimOrder](entities.ClaimOrder.mdx)[]","description":"The details of the claims created for the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"refunds","type":"[Refund](entities.Refund.mdx)[]","description":"The details of the refunds created for the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"swaps","type":"[Swap](entities.Swap.mdx)[]","description":"The details of the swaps created for the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"draft_order_id","type":"`string`","description":"The ID of the draft order this order was created from.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"draft_order","type":"[DraftOrder](entities.DraftOrder.mdx)","description":"The details of the draft order this order was created from.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"edits","type":"[OrderEdit](entities.OrderEdit.mdx)[]","description":"The details of the order edits done on the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"items","type":"[LineItem](entities.LineItem.mdx)[]","description":"The details of the line items that belong to the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"gift_card_transactions","type":"[GiftCardTransaction](entities.GiftCardTransaction.mdx)[]","description":"The gift card transactions made in the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"canceled_at","type":"`Date`","description":"The date the order was canceled on.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"no_notification","type":"`boolean`","description":"Flag for describing whether or not notifications related to this should be send.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotency_key","type":"`string`","description":"Randomly generated key used to continue the processing of the order in case of failure.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"external_id","type":"`null` \\| `string`","description":"The ID of an external order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel this order belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel","type":"[SalesChannel](entities.SalesChannel.mdx)","description":"The details of the sales channel this order belongs to.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"shipping_total","type":"`number`","description":"The total of shipping","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_tax_total","type":"`null` \\| `number`","description":"The tax total applied on shipping","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_total","type":"`number`","description":"The total of discount rounded","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_discount_total","type":"`number`","description":"The total of discount","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`null` \\| `number`","description":"The tax total applied on items","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_total","type":"`null` \\| `number`","description":"The total of tax","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"refunded_total","type":"`number`","description":"The total amount refunded if the order is returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"total","type":"`number`","description":"The total amount of the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"subtotal","type":"`number`","description":"The subtotal of the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"paid_total","type":"`number`","description":"The total amount paid","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"refundable_amount","type":"`number`","description":"The amount that can be refunded","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"gift_card_total","type":"`number`","description":"The total of gift cards","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"gift_card_tax_total","type":"`number`","description":"The total of gift cards with taxes","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channels","type":"[SalesChannel](entities.SalesChannel.mdx)[]","description":"The associated sales channels.","optional":true,"defaultValue":"","expandable":true,"featureFlag":"medusa_v2","children":[]},{"name":"returnable_items","type":"[LineItem](entities.LineItem.mdx)[]","description":"The details of the line items that are returnable as part of the order, swaps, or claims","optional":true,"defaultValue":"","expandable":true,"children":[]}]},{"name":"is_disabled","type":"`boolean`","description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","optional":false,"defaultValue":"false","expandable":false,"children":[]},{"name":"ends_at","type":"`Date`","description":"The time at which the Gift Card can no longer be used.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_rate","type":"`null` \\| `number`","description":"The gift card's tax rate that will be applied on calculating totals","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="GiftCard"/> +`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"includes_tax","type":"`boolean`","description":"Whether the prices for the region include tax","optional":false,"defaultValue":"false","expandable":false,"featureFlag":"tax_inclusive_pricing","children":[]}]},{"name":"order_id","type":"`string`","description":"The ID of the order that the gift card was purchased in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"[Order](entities.Order.mdx)","description":"The details of the order that the gift card was purchased in.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The order's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"object","type":"`\"order\"`","description":"","optional":false,"defaultValue":"\"order\"","expandable":false,"children":[]},{"name":"status","type":"[OrderStatus](../enums/entities.OrderStatus.mdx)","description":"The order's status","optional":false,"defaultValue":"pending","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../enums/entities.FulfillmentStatus.mdx)","description":"The order's fulfillment status","optional":false,"defaultValue":"not_fulfilled","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../enums/entities.PaymentStatus.mdx)","description":"The order's payment status","optional":false,"defaultValue":"not_paid","expandable":false,"children":[]},{"name":"display_id","type":"`number`","description":"The order's display ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart_id","type":"`string`","description":"The ID of the cart associated with the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart","type":"[Cart](entities.Cart.mdx)","description":"The details of the cart associated with the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"customer_id","type":"`string`","description":"The ID of the customer associated with the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer","type":"[Customer](entities.Customer.mdx)","description":"The details of the customer associated with the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"email","type":"`string`","description":"The email associated with the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"billing_address_id","type":"`string`","description":"The ID of the billing address associated with the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"billing_address","type":"[Address](entities.Address.mdx)","description":"The details of the billing address associated with the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"shipping_address_id","type":"`string`","description":"The ID of the shipping address associated with the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_address","type":"[Address](entities.Address.mdx)","description":"The details of the shipping address associated with the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"region_id","type":"`string`","description":"The ID of the region this order was created in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region","type":"[Region](entities.Region.mdx)","description":"The details of the region this order was created in.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"currency_code","type":"`string`","description":"The 3 character currency code that is used in the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency","type":"[Currency](entities.Currency.mdx)","description":"The details of the currency used in the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"tax_rate","type":"`null` \\| `number`","description":"The order's tax rate","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discounts","type":"[Discount](entities.Discount.mdx)[]","description":"The details of the discounts applied on the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"gift_cards","type":"[GiftCard](entities.GiftCard.mdx)[]","description":"The details of the gift card used in the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"shipping_methods","type":"[ShippingMethod](entities.ShippingMethod.mdx)[]","description":"The details of the shipping methods used in the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"payments","type":"[Payment](entities.Payment.mdx)[]","description":"The details of the payments used in the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"fulfillments","type":"[Fulfillment](entities.Fulfillment.mdx)[]","description":"The details of the fulfillments created for the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"returns","type":"[Return](entities.Return.mdx)[]","description":"The details of the returns created for the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"claims","type":"[ClaimOrder](entities.ClaimOrder.mdx)[]","description":"The details of the claims created for the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"refunds","type":"[Refund](entities.Refund.mdx)[]","description":"The details of the refunds created for the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"swaps","type":"[Swap](entities.Swap.mdx)[]","description":"The details of the swaps created for the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"draft_order_id","type":"`string`","description":"The ID of the draft order this order was created from.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"draft_order","type":"[DraftOrder](entities.DraftOrder.mdx)","description":"The details of the draft order this order was created from.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"edits","type":"[OrderEdit](entities.OrderEdit.mdx)[]","description":"The details of the order edits done on the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"items","type":"[LineItem](entities.LineItem.mdx)[]","description":"The details of the line items that belong to the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"gift_card_transactions","type":"[GiftCardTransaction](entities.GiftCardTransaction.mdx)[]","description":"The gift card transactions made in the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"canceled_at","type":"`Date`","description":"The date the order was canceled on.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"no_notification","type":"`boolean`","description":"Flag for describing whether or not notifications related to this should be send.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotency_key","type":"`string`","description":"Randomly generated key used to continue the processing of the order in case of failure.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"external_id","type":"`null` \\| `string`","description":"The ID of an external order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel this order belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel","type":"[SalesChannel](entities.SalesChannel.mdx)","description":"The details of the sales channel this order belongs to.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"shipping_total","type":"`number`","description":"The total of shipping","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_tax_total","type":"`null` \\| `number`","description":"The tax total applied on shipping","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_total","type":"`number`","description":"The total of discount rounded","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_discount_total","type":"`number`","description":"The total of discount","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`null` \\| `number`","description":"The tax total applied on items","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_total","type":"`null` \\| `number`","description":"The total of tax","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"refunded_total","type":"`number`","description":"The total amount refunded if the order is returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"total","type":"`number`","description":"The total amount of the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"subtotal","type":"`number`","description":"The subtotal of the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"paid_total","type":"`number`","description":"The total amount paid","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"refundable_amount","type":"`number`","description":"The amount that can be refunded","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"gift_card_total","type":"`number`","description":"The total of gift cards","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"gift_card_tax_total","type":"`number`","description":"The total of gift cards with taxes","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channels","type":"[SalesChannel](entities.SalesChannel.mdx)[]","description":"The associated sales channels.","optional":true,"defaultValue":"","expandable":true,"featureFlag":"medusa_v2","children":[]},{"name":"returnable_items","type":"[LineItem](entities.LineItem.mdx)[]","description":"The details of the line items that are returnable as part of the order, swaps, or claims","optional":true,"defaultValue":"","expandable":true,"children":[]}]},{"name":"is_disabled","type":"`boolean`","description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","optional":false,"defaultValue":"false","expandable":false,"children":[]},{"name":"ends_at","type":"`Date`","description":"The time at which the Gift Card can no longer be used.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_rate","type":"`null` \\| `number`","description":"The gift card's tax rate that will be applied on calculating totals","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="GiftCard"/> diff --git a/www/apps/docs/content/references/entities/classes/entities.GiftCardTransaction.mdx b/www/apps/docs/content/references/entities/classes/entities.GiftCardTransaction.mdx index d4a0f0137c..0463521cdb 100644 --- a/www/apps/docs/content/references/entities/classes/entities.GiftCardTransaction.mdx +++ b/www/apps/docs/content/references/entities/classes/entities.GiftCardTransaction.mdx @@ -3,7 +3,7 @@ displayed_sidebar: entitiesSidebar slug: /references/entities/classes/GiftCardTransaction --- -import ParameterTypes from "@site/src/components/ParameterTypes" +import TypeList from "@site/src/components/TypeList" # GiftCardTransaction @@ -11,4 +11,4 @@ Gift Card Transactions are created once a Customer uses a Gift Card to pay for t ## Properties -`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"order_id","type":"`string`","description":"The ID of the order that the gift card was used for payment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"[Order](entities.Order.mdx)","description":"The details of the order that the gift card was used for payment.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The order's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"object","type":"`\"order\"`","description":"","optional":false,"defaultValue":"\"order\"","expandable":false,"children":[]},{"name":"status","type":"[OrderStatus](../enums/entities.OrderStatus.mdx)","description":"The order's status","optional":false,"defaultValue":"pending","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../enums/entities.FulfillmentStatus.mdx)","description":"The order's fulfillment status","optional":false,"defaultValue":"not_fulfilled","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../enums/entities.PaymentStatus.mdx)","description":"The order's payment status","optional":false,"defaultValue":"not_paid","expandable":false,"children":[]},{"name":"display_id","type":"`number`","description":"The order's display ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart_id","type":"`string`","description":"The ID of the cart associated with the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart","type":"[Cart](entities.Cart.mdx)","description":"The details of the cart associated with the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"customer_id","type":"`string`","description":"The ID of the customer associated with the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer","type":"[Customer](entities.Customer.mdx)","description":"The details of the customer associated with the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"email","type":"`string`","description":"The email associated with the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"billing_address_id","type":"`string`","description":"The ID of the billing address associated with the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"billing_address","type":"[Address](entities.Address.mdx)","description":"The details of the billing address associated with the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"shipping_address_id","type":"`string`","description":"The ID of the shipping address associated with the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_address","type":"[Address](entities.Address.mdx)","description":"The details of the shipping address associated with the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"region_id","type":"`string`","description":"The ID of the region this order was created in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region","type":"[Region](entities.Region.mdx)","description":"The details of the region this order was created in.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"currency_code","type":"`string`","description":"The 3 character currency code that is used in the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency","type":"[Currency](entities.Currency.mdx)","description":"The details of the currency used in the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"tax_rate","type":"`null` \\| `number`","description":"The order's tax rate","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discounts","type":"[Discount](entities.Discount.mdx)[]","description":"The details of the discounts applied on the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"gift_cards","type":"[GiftCard](entities.GiftCard.mdx)[]","description":"The details of the gift card used in the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"shipping_methods","type":"[ShippingMethod](entities.ShippingMethod.mdx)[]","description":"The details of the shipping methods used in the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"payments","type":"[Payment](entities.Payment.mdx)[]","description":"The details of the payments used in the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"fulfillments","type":"[Fulfillment](entities.Fulfillment.mdx)[]","description":"The details of the fulfillments created for the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"returns","type":"[Return](entities.Return.mdx)[]","description":"The details of the returns created for the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"claims","type":"[ClaimOrder](entities.ClaimOrder.mdx)[]","description":"The details of the claims created for the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"refunds","type":"[Refund](entities.Refund.mdx)[]","description":"The details of the refunds created for the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"swaps","type":"[Swap](entities.Swap.mdx)[]","description":"The details of the swaps created for the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"draft_order_id","type":"`string`","description":"The ID of the draft order this order was created from.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"draft_order","type":"[DraftOrder](entities.DraftOrder.mdx)","description":"The details of the draft order this order was created from.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"edits","type":"[OrderEdit](entities.OrderEdit.mdx)[]","description":"The details of the order edits done on the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"items","type":"[LineItem](entities.LineItem.mdx)[]","description":"The details of the line items that belong to the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"gift_card_transactions","type":"[GiftCardTransaction](entities.GiftCardTransaction.mdx)[]","description":"The gift card transactions made in the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"canceled_at","type":"`Date`","description":"The date the order was canceled on.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"no_notification","type":"`boolean`","description":"Flag for describing whether or not notifications related to this should be send.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotency_key","type":"`string`","description":"Randomly generated key used to continue the processing of the order in case of failure.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"external_id","type":"`null` \\| `string`","description":"The ID of an external order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel this order belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel","type":"[SalesChannel](entities.SalesChannel.mdx)","description":"The details of the sales channel this order belongs to.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"shipping_total","type":"`number`","description":"The total of shipping","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_tax_total","type":"`null` \\| `number`","description":"The tax total applied on shipping","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_total","type":"`number`","description":"The total of discount rounded","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_discount_total","type":"`number`","description":"The total of discount","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`null` \\| `number`","description":"The tax total applied on items","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_total","type":"`null` \\| `number`","description":"The total of tax","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"refunded_total","type":"`number`","description":"The total amount refunded if the order is returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"total","type":"`number`","description":"The total amount of the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"subtotal","type":"`number`","description":"The subtotal of the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"paid_total","type":"`number`","description":"The total amount paid","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"refundable_amount","type":"`number`","description":"The amount that can be refunded","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"gift_card_total","type":"`number`","description":"The total of gift cards","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"gift_card_tax_total","type":"`number`","description":"The total of gift cards with taxes","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channels","type":"[SalesChannel](entities.SalesChannel.mdx)[]","description":"The associated sales channels.","optional":true,"defaultValue":"","expandable":true,"featureFlag":"medusa_v2","children":[]},{"name":"returnable_items","type":"[LineItem](entities.LineItem.mdx)[]","description":"The details of the line items that are returnable as part of the order, swaps, or claims","optional":true,"defaultValue":"","expandable":true,"children":[]}]},{"name":"amount","type":"`number`","description":"The amount that was used from the Gift Card.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_taxable","type":"`boolean`","description":"Whether the transaction is taxable or not.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_rate","type":"`null` \\| `number`","description":"The tax rate of the transaction","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="GiftCardTransaction"/> +`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"order_id","type":"`string`","description":"The ID of the order that the gift card was used for payment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"[Order](entities.Order.mdx)","description":"The details of the order that the gift card was used for payment.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The order's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"object","type":"`\"order\"`","description":"","optional":false,"defaultValue":"\"order\"","expandable":false,"children":[]},{"name":"status","type":"[OrderStatus](../enums/entities.OrderStatus.mdx)","description":"The order's status","optional":false,"defaultValue":"pending","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../enums/entities.FulfillmentStatus.mdx)","description":"The order's fulfillment status","optional":false,"defaultValue":"not_fulfilled","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../enums/entities.PaymentStatus.mdx)","description":"The order's payment status","optional":false,"defaultValue":"not_paid","expandable":false,"children":[]},{"name":"display_id","type":"`number`","description":"The order's display ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart_id","type":"`string`","description":"The ID of the cart associated with the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart","type":"[Cart](entities.Cart.mdx)","description":"The details of the cart associated with the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"customer_id","type":"`string`","description":"The ID of the customer associated with the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer","type":"[Customer](entities.Customer.mdx)","description":"The details of the customer associated with the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"email","type":"`string`","description":"The email associated with the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"billing_address_id","type":"`string`","description":"The ID of the billing address associated with the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"billing_address","type":"[Address](entities.Address.mdx)","description":"The details of the billing address associated with the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"shipping_address_id","type":"`string`","description":"The ID of the shipping address associated with the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_address","type":"[Address](entities.Address.mdx)","description":"The details of the shipping address associated with the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"region_id","type":"`string`","description":"The ID of the region this order was created in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region","type":"[Region](entities.Region.mdx)","description":"The details of the region this order was created in.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"currency_code","type":"`string`","description":"The 3 character currency code that is used in the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency","type":"[Currency](entities.Currency.mdx)","description":"The details of the currency used in the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"tax_rate","type":"`null` \\| `number`","description":"The order's tax rate","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discounts","type":"[Discount](entities.Discount.mdx)[]","description":"The details of the discounts applied on the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"gift_cards","type":"[GiftCard](entities.GiftCard.mdx)[]","description":"The details of the gift card used in the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"shipping_methods","type":"[ShippingMethod](entities.ShippingMethod.mdx)[]","description":"The details of the shipping methods used in the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"payments","type":"[Payment](entities.Payment.mdx)[]","description":"The details of the payments used in the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"fulfillments","type":"[Fulfillment](entities.Fulfillment.mdx)[]","description":"The details of the fulfillments created for the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"returns","type":"[Return](entities.Return.mdx)[]","description":"The details of the returns created for the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"claims","type":"[ClaimOrder](entities.ClaimOrder.mdx)[]","description":"The details of the claims created for the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"refunds","type":"[Refund](entities.Refund.mdx)[]","description":"The details of the refunds created for the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"swaps","type":"[Swap](entities.Swap.mdx)[]","description":"The details of the swaps created for the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"draft_order_id","type":"`string`","description":"The ID of the draft order this order was created from.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"draft_order","type":"[DraftOrder](entities.DraftOrder.mdx)","description":"The details of the draft order this order was created from.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"edits","type":"[OrderEdit](entities.OrderEdit.mdx)[]","description":"The details of the order edits done on the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"items","type":"[LineItem](entities.LineItem.mdx)[]","description":"The details of the line items that belong to the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"gift_card_transactions","type":"[GiftCardTransaction](entities.GiftCardTransaction.mdx)[]","description":"The gift card transactions made in the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"canceled_at","type":"`Date`","description":"The date the order was canceled on.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"no_notification","type":"`boolean`","description":"Flag for describing whether or not notifications related to this should be send.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotency_key","type":"`string`","description":"Randomly generated key used to continue the processing of the order in case of failure.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"external_id","type":"`null` \\| `string`","description":"The ID of an external order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel this order belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel","type":"[SalesChannel](entities.SalesChannel.mdx)","description":"The details of the sales channel this order belongs to.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"shipping_total","type":"`number`","description":"The total of shipping","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_tax_total","type":"`null` \\| `number`","description":"The tax total applied on shipping","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_total","type":"`number`","description":"The total of discount rounded","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_discount_total","type":"`number`","description":"The total of discount","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`null` \\| `number`","description":"The tax total applied on items","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_total","type":"`null` \\| `number`","description":"The total of tax","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"refunded_total","type":"`number`","description":"The total amount refunded if the order is returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"total","type":"`number`","description":"The total amount of the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"subtotal","type":"`number`","description":"The subtotal of the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"paid_total","type":"`number`","description":"The total amount paid","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"refundable_amount","type":"`number`","description":"The amount that can be refunded","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"gift_card_total","type":"`number`","description":"The total of gift cards","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"gift_card_tax_total","type":"`number`","description":"The total of gift cards with taxes","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channels","type":"[SalesChannel](entities.SalesChannel.mdx)[]","description":"The associated sales channels.","optional":true,"defaultValue":"","expandable":true,"featureFlag":"medusa_v2","children":[]},{"name":"returnable_items","type":"[LineItem](entities.LineItem.mdx)[]","description":"The details of the line items that are returnable as part of the order, swaps, or claims","optional":true,"defaultValue":"","expandable":true,"children":[]}]},{"name":"amount","type":"`number`","description":"The amount that was used from the Gift Card.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_taxable","type":"`boolean`","description":"Whether the transaction is taxable or not.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_rate","type":"`null` \\| `number`","description":"The tax rate of the transaction","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="GiftCardTransaction"/> diff --git a/www/apps/docs/content/references/entities/classes/entities.IdempotencyKey.mdx b/www/apps/docs/content/references/entities/classes/entities.IdempotencyKey.mdx index ab81ecaa79..570f75fa09 100644 --- a/www/apps/docs/content/references/entities/classes/entities.IdempotencyKey.mdx +++ b/www/apps/docs/content/references/entities/classes/entities.IdempotencyKey.mdx @@ -3,7 +3,7 @@ displayed_sidebar: entitiesSidebar slug: /references/entities/classes/IdempotencyKey --- -import ParameterTypes from "@site/src/components/ParameterTypes" +import TypeList from "@site/src/components/TypeList" # IdempotencyKey @@ -11,4 +11,4 @@ Idempotency Key is used to continue a process in case of any failure that might ## Properties -`","description":"The parameters passed to the request","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"request_path","type":"`string`","description":"The request's path","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"response_code","type":"`number`","description":"The response's code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"response_body","type":"`Record`","description":"The response's body","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"recovery_point","type":"`string`","description":"Where to continue from.","optional":false,"defaultValue":"started","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="IdempotencyKey"/> +`","description":"The parameters passed to the request","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"request_path","type":"`string`","description":"The request's path","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"response_code","type":"`number`","description":"The response's code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"response_body","type":"`Record`","description":"The response's body","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"recovery_point","type":"`string`","description":"Where to continue from.","optional":false,"defaultValue":"started","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="IdempotencyKey"/> diff --git a/www/apps/docs/content/references/entities/classes/entities.Image.mdx b/www/apps/docs/content/references/entities/classes/entities.Image.mdx index 7bb28ae0ff..2a01ccb4d6 100644 --- a/www/apps/docs/content/references/entities/classes/entities.Image.mdx +++ b/www/apps/docs/content/references/entities/classes/entities.Image.mdx @@ -3,7 +3,7 @@ displayed_sidebar: entitiesSidebar slug: /references/entities/classes/Image --- -import ParameterTypes from "@site/src/components/ParameterTypes" +import TypeList from "@site/src/components/TypeList" # Image @@ -11,4 +11,4 @@ An Image is used to store details about uploaded images. Images are uploaded by ## Properties -`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="Image"/> +`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="Image"/> diff --git a/www/apps/docs/content/references/entities/classes/entities.Invite.mdx b/www/apps/docs/content/references/entities/classes/entities.Invite.mdx index 57b30ff484..3502b928ef 100644 --- a/www/apps/docs/content/references/entities/classes/entities.Invite.mdx +++ b/www/apps/docs/content/references/entities/classes/entities.Invite.mdx @@ -3,7 +3,7 @@ displayed_sidebar: entitiesSidebar slug: /references/entities/classes/Invite --- -import ParameterTypes from "@site/src/components/ParameterTypes" +import TypeList from "@site/src/components/TypeList" # Invite @@ -11,4 +11,4 @@ An invite is created when an admin user invites a new user to join the store's t ## Properties -`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="Invite"/> +`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="Invite"/> diff --git a/www/apps/docs/content/references/entities/classes/entities.LineItem.mdx b/www/apps/docs/content/references/entities/classes/entities.LineItem.mdx index 91f3caec80..3e64631203 100644 --- a/www/apps/docs/content/references/entities/classes/entities.LineItem.mdx +++ b/www/apps/docs/content/references/entities/classes/entities.LineItem.mdx @@ -3,7 +3,7 @@ displayed_sidebar: entitiesSidebar slug: /references/entities/classes/LineItem --- -import ParameterTypes from "@site/src/components/ParameterTypes" +import TypeList from "@site/src/components/TypeList" # LineItem @@ -11,4 +11,4 @@ Line Items are created when a product is added to a Cart. When Line Items are pu ## Properties -`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"includes_tax","type":"`boolean`","description":"Indicates if the line item unit\\_price include tax","optional":false,"defaultValue":"false","expandable":false,"featureFlag":"tax_inclusive_pricing","children":[]},{"name":"original_item_id","type":"`null` \\| `string`","description":"The ID of the original line item. This is useful if the line item belongs to a resource that references an order, such as a return or an order edit.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order_edit_id","type":"`null` \\| `string`","description":"The ID of the order edit that the item may belong to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order_edit","type":"`null` \\| [OrderEdit](entities.OrderEdit.mdx)","description":"The details of the order edit.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"refundable","type":"`null` \\| `number`","description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"subtotal","type":"`null` \\| `number`","description":"The subtotal of the line item","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_total","type":"`null` \\| `number`","description":"The total of tax of the line item","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"total","type":"`null` \\| `number`","description":"The total amount of the line item","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"`null` \\| `number`","description":"The original total amount of the line item","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"original_tax_total","type":"`null` \\| `number`","description":"The original tax total amount of the line item","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_total","type":"`null` \\| `number`","description":"The total of discount of the line item rounded","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_discount_total","type":"`null` \\| `number`","description":"The total of discount of the line item","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"gift_card_total","type":"`null` \\| `number`","description":"The total of the gift card of the line item","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="LineItem"/> +`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"includes_tax","type":"`boolean`","description":"Indicates if the line item unit\\_price include tax","optional":false,"defaultValue":"false","expandable":false,"featureFlag":"tax_inclusive_pricing","children":[]},{"name":"original_item_id","type":"`null` \\| `string`","description":"The ID of the original line item. This is useful if the line item belongs to a resource that references an order, such as a return or an order edit.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order_edit_id","type":"`null` \\| `string`","description":"The ID of the order edit that the item may belong to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order_edit","type":"`null` \\| [OrderEdit](entities.OrderEdit.mdx)","description":"The details of the order edit.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"refundable","type":"`null` \\| `number`","description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"subtotal","type":"`null` \\| `number`","description":"The subtotal of the line item","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_total","type":"`null` \\| `number`","description":"The total of tax of the line item","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"total","type":"`null` \\| `number`","description":"The total amount of the line item","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"`null` \\| `number`","description":"The original total amount of the line item","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"original_tax_total","type":"`null` \\| `number`","description":"The original tax total amount of the line item","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_total","type":"`null` \\| `number`","description":"The total of discount of the line item rounded","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_discount_total","type":"`null` \\| `number`","description":"The total of discount of the line item","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"gift_card_total","type":"`null` \\| `number`","description":"The total of the gift card of the line item","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="LineItem"/> diff --git a/www/apps/docs/content/references/entities/classes/entities.LineItemAdjustment.mdx b/www/apps/docs/content/references/entities/classes/entities.LineItemAdjustment.mdx index 34a5c46796..33300d7bea 100644 --- a/www/apps/docs/content/references/entities/classes/entities.LineItemAdjustment.mdx +++ b/www/apps/docs/content/references/entities/classes/entities.LineItemAdjustment.mdx @@ -3,7 +3,7 @@ displayed_sidebar: entitiesSidebar slug: /references/entities/classes/LineItemAdjustment --- -import ParameterTypes from "@site/src/components/ParameterTypes" +import TypeList from "@site/src/components/TypeList" # LineItemAdjustment @@ -11,4 +11,4 @@ A Line Item Adjustment includes details on discounts applied on a line item. ## Properties -`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="LineItemAdjustment"/> +`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="LineItemAdjustment"/> diff --git a/www/apps/docs/content/references/entities/classes/entities.LineItemTaxLine.mdx b/www/apps/docs/content/references/entities/classes/entities.LineItemTaxLine.mdx index b887556b0b..db104f3b05 100644 --- a/www/apps/docs/content/references/entities/classes/entities.LineItemTaxLine.mdx +++ b/www/apps/docs/content/references/entities/classes/entities.LineItemTaxLine.mdx @@ -3,7 +3,7 @@ displayed_sidebar: entitiesSidebar slug: /references/entities/classes/LineItemTaxLine --- -import ParameterTypes from "@site/src/components/ParameterTypes" +import TypeList from "@site/src/components/TypeList" # LineItemTaxLine @@ -11,4 +11,4 @@ A Line Item Tax Line represents the taxes applied on a line item. ## Properties -`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="LineItemTaxLine"/> +`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="LineItemTaxLine"/> diff --git a/www/apps/docs/content/references/entities/classes/entities.MoneyAmount.mdx b/www/apps/docs/content/references/entities/classes/entities.MoneyAmount.mdx index 51522fce0a..b8ee8c9911 100644 --- a/www/apps/docs/content/references/entities/classes/entities.MoneyAmount.mdx +++ b/www/apps/docs/content/references/entities/classes/entities.MoneyAmount.mdx @@ -3,7 +3,7 @@ displayed_sidebar: entitiesSidebar slug: /references/entities/classes/MoneyAmount --- -import ParameterTypes from "@site/src/components/ParameterTypes" +import TypeList from "@site/src/components/TypeList" # MoneyAmount @@ -11,4 +11,4 @@ A Money Amount represent a price amount, for example, a product variant's price ## Properties -`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"purchasable","type":"`boolean`","description":"Only used with the inventory modules.\nA boolean value indicating whether the Product Variant is purchasable.\nA variant is purchasable if:\n - inventory is not managed\n - it has no inventory items\n - it is in stock\n - it is backorderable.\n","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"variant","type":"[ProductVariant](entities.ProductVariant.mdx)","description":"The details of the product variant that the money amount may belong to.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The product variant's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"A title that can be displayed for easy identification of the Product Variant.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"product_id","type":"`string`","description":"The ID of the product that the product variant belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"product","type":"[Product](entities.Product.mdx)","description":"The details of the product that the product variant belongs to.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"prices","type":"[MoneyAmount](entities.MoneyAmount.mdx)[]","description":"The details of the prices of the Product Variant, each represented as a Money Amount. Each Money Amount represents a price in a given currency or a specific Region.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"sku","type":"`null` \\| `string`","description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unique identifer for the item that is to be shipped, and can be referenced across multiple systems.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"barcode","type":"`null` \\| `string`","description":"A generic field for a GTIN number that can be used to identify the Product Variant.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"ean","type":"`null` \\| `string`","description":"An EAN barcode number that can be used to identify the Product Variant.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"upc","type":"`null` \\| `string`","description":"A UPC barcode number that can be used to identify the Product Variant.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_rank","type":"`null` \\| `number`","description":"The ranking of this variant","optional":false,"defaultValue":"0","expandable":false,"children":[]},{"name":"inventory_quantity","type":"`number`","description":"The current quantity of the item that is stocked.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"allow_backorder","type":"`boolean`","description":"Whether the Product Variant should be purchasable when `inventory\\_quantity` is 0.","optional":false,"defaultValue":"false","expandable":false,"children":[]},{"name":"manage_inventory","type":"`boolean`","description":"Whether Medusa should manage inventory for the Product Variant.","optional":false,"defaultValue":"true","expandable":false,"children":[]},{"name":"hs_code","type":"`null` \\| `string`","description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"origin_country","type":"`null` \\| `string`","description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"mid_code","type":"`null` \\| `string`","description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"material","type":"`null` \\| `string`","description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"weight","type":"`null` \\| `number`","description":"The weight of the Product Variant. May be used in shipping rate calculations.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"length","type":"`null` \\| `number`","description":"The length of the Product Variant. May be used in shipping rate calculations.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"height","type":"`null` \\| `number`","description":"The height of the Product Variant. May be used in shipping rate calculations.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"width","type":"`null` \\| `number`","description":"The width of the Product Variant. May be used in shipping rate calculations.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"[ProductOptionValue](entities.ProductOptionValue.mdx)[]","description":"The details of the product options that this product variant defines values for.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"inventory_items","type":"[ProductVariantInventoryItem](entities.ProductVariantInventoryItem.mdx)[]","description":"The details inventory items of the product variant.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"metadata","type":"`null` \\| `Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"purchasable","type":"`boolean`","description":"Only used with the inventory modules.\nA boolean value indicating whether the Product Variant is purchasable.\nA variant is purchasable if:\n - inventory is not managed\n - it has no inventory items\n - it is in stock\n - it is backorderable.\n","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"variant_id","type":"`string`","description":"The ID of the Product Variant contained in the Line Item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The region's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency","type":"[Currency](entities.Currency.mdx)","description":"The details of the currency that the money amount may belong to.","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"code","type":"`string`","description":"The 3 character ISO code for the currency.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"symbol","type":"`string`","description":"The symbol used to indicate the currency.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"symbol_native","type":"`string`","description":"The native symbol used to indicate the currency.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The written name of the currency","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"includes_tax","type":"`boolean`","description":"Whether the currency prices include tax","optional":true,"defaultValue":"false","expandable":false,"featureFlag":"tax_inclusive_pricing","children":[]}]},{"name":"region","type":"[Region](entities.Region.mdx)","description":"The details of the region that the money amount may belong to.","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The region's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The three character currency code used in the region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency","type":"[Currency](entities.Currency.mdx)","description":"The details of the currency used in the region.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"tax_rate","type":"`number`","description":"The tax rate that should be charged on purchases in the Region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_rates","type":"`null` \\| [TaxRate](entities.TaxRate.mdx)[]","description":"The details of the tax rates used in the region, aside from the default rate.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"tax_code","type":"`string`","description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"gift_cards_taxable","type":"`boolean`","description":"Whether the gift cards are taxable or not in this region.","optional":false,"defaultValue":"true","expandable":false,"children":[]},{"name":"automatic_taxes","type":"`boolean`","description":"Whether taxes should be automated in this region.","optional":false,"defaultValue":"true","expandable":false,"children":[]},{"name":"countries","type":"[Country](entities.Country.mdx)[]","description":"The details of the countries included in this region.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"tax_provider_id","type":"`null` \\| `string`","description":"The ID of the tax provider used in this region","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_provider","type":"[TaxProvider](entities.TaxProvider.mdx)","description":"The details of the tax provider used in the region.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"payment_providers","type":"[PaymentProvider](entities.PaymentProvider.mdx)[]","description":"The details of the payment providers that can be used to process payments in the region.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"fulfillment_providers","type":"[FulfillmentProvider](entities.FulfillmentProvider.mdx)[]","description":"The details of the fulfillment providers that can be used to fulfill items of orders and similar resources in the region.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"includes_tax","type":"`boolean`","description":"Whether the prices for the region include tax","optional":false,"defaultValue":"false","expandable":false,"featureFlag":"tax_inclusive_pricing","children":[]}]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="MoneyAmount"/> +`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"purchasable","type":"`boolean`","description":"Only used with the inventory modules.\nA boolean value indicating whether the Product Variant is purchasable.\nA variant is purchasable if:\n - inventory is not managed\n - it has no inventory items\n - it is in stock\n - it is backorderable.\n","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"variant","type":"[ProductVariant](entities.ProductVariant.mdx)","description":"The details of the product variant that the money amount may belong to.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The product variant's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"A title that can be displayed for easy identification of the Product Variant.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"product_id","type":"`string`","description":"The ID of the product that the product variant belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"product","type":"[Product](entities.Product.mdx)","description":"The details of the product that the product variant belongs to.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"prices","type":"[MoneyAmount](entities.MoneyAmount.mdx)[]","description":"The details of the prices of the Product Variant, each represented as a Money Amount. Each Money Amount represents a price in a given currency or a specific Region.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"sku","type":"`null` \\| `string`","description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unique identifer for the item that is to be shipped, and can be referenced across multiple systems.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"barcode","type":"`null` \\| `string`","description":"A generic field for a GTIN number that can be used to identify the Product Variant.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"ean","type":"`null` \\| `string`","description":"An EAN barcode number that can be used to identify the Product Variant.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"upc","type":"`null` \\| `string`","description":"A UPC barcode number that can be used to identify the Product Variant.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_rank","type":"`null` \\| `number`","description":"The ranking of this variant","optional":false,"defaultValue":"0","expandable":false,"children":[]},{"name":"inventory_quantity","type":"`number`","description":"The current quantity of the item that is stocked.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"allow_backorder","type":"`boolean`","description":"Whether the Product Variant should be purchasable when `inventory\\_quantity` is 0.","optional":false,"defaultValue":"false","expandable":false,"children":[]},{"name":"manage_inventory","type":"`boolean`","description":"Whether Medusa should manage inventory for the Product Variant.","optional":false,"defaultValue":"true","expandable":false,"children":[]},{"name":"hs_code","type":"`null` \\| `string`","description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"origin_country","type":"`null` \\| `string`","description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"mid_code","type":"`null` \\| `string`","description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"material","type":"`null` \\| `string`","description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"weight","type":"`null` \\| `number`","description":"The weight of the Product Variant. May be used in shipping rate calculations.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"length","type":"`null` \\| `number`","description":"The length of the Product Variant. May be used in shipping rate calculations.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"height","type":"`null` \\| `number`","description":"The height of the Product Variant. May be used in shipping rate calculations.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"width","type":"`null` \\| `number`","description":"The width of the Product Variant. May be used in shipping rate calculations.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"[ProductOptionValue](entities.ProductOptionValue.mdx)[]","description":"The details of the product options that this product variant defines values for.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"inventory_items","type":"[ProductVariantInventoryItem](entities.ProductVariantInventoryItem.mdx)[]","description":"The details inventory items of the product variant.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"metadata","type":"`null` \\| `Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"purchasable","type":"`boolean`","description":"Only used with the inventory modules.\nA boolean value indicating whether the Product Variant is purchasable.\nA variant is purchasable if:\n - inventory is not managed\n - it has no inventory items\n - it is in stock\n - it is backorderable.\n","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"variant_id","type":"`string`","description":"The ID of the Product Variant contained in the Line Item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The region's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency","type":"[Currency](entities.Currency.mdx)","description":"The details of the currency that the money amount may belong to.","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"code","type":"`string`","description":"The 3 character ISO code for the currency.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"symbol","type":"`string`","description":"The symbol used to indicate the currency.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"symbol_native","type":"`string`","description":"The native symbol used to indicate the currency.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The written name of the currency","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"includes_tax","type":"`boolean`","description":"Whether the currency prices include tax","optional":true,"defaultValue":"false","expandable":false,"featureFlag":"tax_inclusive_pricing","children":[]}]},{"name":"region","type":"[Region](entities.Region.mdx)","description":"The details of the region that the money amount may belong to.","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The region's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The three character currency code used in the region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency","type":"[Currency](entities.Currency.mdx)","description":"The details of the currency used in the region.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"tax_rate","type":"`number`","description":"The tax rate that should be charged on purchases in the Region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_rates","type":"`null` \\| [TaxRate](entities.TaxRate.mdx)[]","description":"The details of the tax rates used in the region, aside from the default rate.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"tax_code","type":"`string`","description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"gift_cards_taxable","type":"`boolean`","description":"Whether the gift cards are taxable or not in this region.","optional":false,"defaultValue":"true","expandable":false,"children":[]},{"name":"automatic_taxes","type":"`boolean`","description":"Whether taxes should be automated in this region.","optional":false,"defaultValue":"true","expandable":false,"children":[]},{"name":"countries","type":"[Country](entities.Country.mdx)[]","description":"The details of the countries included in this region.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"tax_provider_id","type":"`null` \\| `string`","description":"The ID of the tax provider used in this region","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_provider","type":"[TaxProvider](entities.TaxProvider.mdx)","description":"The details of the tax provider used in the region.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"payment_providers","type":"[PaymentProvider](entities.PaymentProvider.mdx)[]","description":"The details of the payment providers that can be used to process payments in the region.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"fulfillment_providers","type":"[FulfillmentProvider](entities.FulfillmentProvider.mdx)[]","description":"The details of the fulfillment providers that can be used to fulfill items of orders and similar resources in the region.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"includes_tax","type":"`boolean`","description":"Whether the prices for the region include tax","optional":false,"defaultValue":"false","expandable":false,"featureFlag":"tax_inclusive_pricing","children":[]}]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="MoneyAmount"/> diff --git a/www/apps/docs/content/references/entities/classes/entities.Note.mdx b/www/apps/docs/content/references/entities/classes/entities.Note.mdx index 95e0a14cd8..fee2492af7 100644 --- a/www/apps/docs/content/references/entities/classes/entities.Note.mdx +++ b/www/apps/docs/content/references/entities/classes/entities.Note.mdx @@ -3,7 +3,7 @@ displayed_sidebar: entitiesSidebar slug: /references/entities/classes/Note --- -import ParameterTypes from "@site/src/components/ParameterTypes" +import TypeList from "@site/src/components/TypeList" # Note @@ -11,4 +11,4 @@ A Note is an element that can be used in association with different resources to ## Properties -`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="Note"/> +`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="Note"/> diff --git a/www/apps/docs/content/references/entities/classes/entities.Notification.mdx b/www/apps/docs/content/references/entities/classes/entities.Notification.mdx index f82cda85ca..f82f18c0fd 100644 --- a/www/apps/docs/content/references/entities/classes/entities.Notification.mdx +++ b/www/apps/docs/content/references/entities/classes/entities.Notification.mdx @@ -3,7 +3,7 @@ displayed_sidebar: entitiesSidebar slug: /references/entities/classes/Notification --- -import ParameterTypes from "@site/src/components/ParameterTypes" +import TypeList from "@site/src/components/TypeList" # Notification @@ -11,4 +11,4 @@ A notification is an alert sent, typically to customers, using the installed Not ## Properties -`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"to","type":"`string`","description":"The address that the Notification was sent to. This will usually be an email address, but can represent other addresses such as a chat bot user ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record`","description":"The data that the Notification was sent with. This contains all the data necessary for the Notification Provider to initiate a resend.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"parent_id","type":"`string`","description":"The notification's parent ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"parent_notification","type":"[Notification](entities.Notification.mdx)","description":"The details of the parent notification.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The notification's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"event_name","type":"`string`","description":"The name of the event that the notification was sent for.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"resource_type","type":"`string`","description":"The type of resource that the Notification refers to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"resource_id","type":"`string`","description":"The ID of the resource that the Notification refers to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that this notification was sent to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer","type":"[Customer](entities.Customer.mdx)","description":"The details of the customer that this notification was sent to.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"to","type":"`string`","description":"The address that the Notification was sent to. This will usually be an email address, but can represent other addresses such as a chat bot user ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record`","description":"The data that the Notification was sent with. This contains all the data necessary for the Notification Provider to initiate a resend.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"parent_id","type":"`string`","description":"The notification's parent ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"parent_notification","type":"[Notification](entities.Notification.mdx)","description":"The details of the parent notification.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"resends","type":"[Notification](entities.Notification.mdx)[]","description":"The details of all resends of the notification.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"provider_id","type":"`string`","description":"The ID of the notification provider used to send the notification.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider","type":"[NotificationProvider](entities.NotificationProvider.mdx)","description":"The notification provider used to send the notification.","optional":false,"defaultValue":"","expandable":true,"children":[]}]},{"name":"resends","type":"[Notification](entities.Notification.mdx)[]","description":"The details of all resends of the notification.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The notification's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"event_name","type":"`string`","description":"The name of the event that the notification was sent for.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"resource_type","type":"`string`","description":"The type of resource that the Notification refers to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"resource_id","type":"`string`","description":"The ID of the resource that the Notification refers to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that this notification was sent to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer","type":"[Customer](entities.Customer.mdx)","description":"The details of the customer that this notification was sent to.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"to","type":"`string`","description":"The address that the Notification was sent to. This will usually be an email address, but can represent other addresses such as a chat bot user ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record`","description":"The data that the Notification was sent with. This contains all the data necessary for the Notification Provider to initiate a resend.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"parent_id","type":"`string`","description":"The notification's parent ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"parent_notification","type":"[Notification](entities.Notification.mdx)","description":"The details of the parent notification.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"resends","type":"[Notification](entities.Notification.mdx)[]","description":"The details of all resends of the notification.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"provider_id","type":"`string`","description":"The ID of the notification provider used to send the notification.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider","type":"[NotificationProvider](entities.NotificationProvider.mdx)","description":"The notification provider used to send the notification.","optional":false,"defaultValue":"","expandable":true,"children":[]}]},{"name":"provider_id","type":"`string`","description":"The ID of the notification provider used to send the notification.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider","type":"[NotificationProvider](entities.NotificationProvider.mdx)","description":"The notification provider used to send the notification.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The ID of the notification provider as given by the notification service.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_installed","type":"`boolean`","description":"Whether the notification service is installed in the current version. If a notification service is no longer installed, the `is\\_installed` attribute is set to `false`.","optional":false,"defaultValue":"true","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="Notification"/> +`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"to","type":"`string`","description":"The address that the Notification was sent to. This will usually be an email address, but can represent other addresses such as a chat bot user ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record`","description":"The data that the Notification was sent with. This contains all the data necessary for the Notification Provider to initiate a resend.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"parent_id","type":"`string`","description":"The notification's parent ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"parent_notification","type":"[Notification](entities.Notification.mdx)","description":"The details of the parent notification.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The notification's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"event_name","type":"`string`","description":"The name of the event that the notification was sent for.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"resource_type","type":"`string`","description":"The type of resource that the Notification refers to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"resource_id","type":"`string`","description":"The ID of the resource that the Notification refers to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that this notification was sent to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer","type":"[Customer](entities.Customer.mdx)","description":"The details of the customer that this notification was sent to.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"to","type":"`string`","description":"The address that the Notification was sent to. This will usually be an email address, but can represent other addresses such as a chat bot user ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record`","description":"The data that the Notification was sent with. This contains all the data necessary for the Notification Provider to initiate a resend.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"parent_id","type":"`string`","description":"The notification's parent ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"parent_notification","type":"[Notification](entities.Notification.mdx)","description":"The details of the parent notification.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"resends","type":"[Notification](entities.Notification.mdx)[]","description":"The details of all resends of the notification.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"provider_id","type":"`string`","description":"The ID of the notification provider used to send the notification.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider","type":"[NotificationProvider](entities.NotificationProvider.mdx)","description":"The notification provider used to send the notification.","optional":false,"defaultValue":"","expandable":true,"children":[]}]},{"name":"resends","type":"[Notification](entities.Notification.mdx)[]","description":"The details of all resends of the notification.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The notification's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"event_name","type":"`string`","description":"The name of the event that the notification was sent for.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"resource_type","type":"`string`","description":"The type of resource that the Notification refers to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"resource_id","type":"`string`","description":"The ID of the resource that the Notification refers to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that this notification was sent to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer","type":"[Customer](entities.Customer.mdx)","description":"The details of the customer that this notification was sent to.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"to","type":"`string`","description":"The address that the Notification was sent to. This will usually be an email address, but can represent other addresses such as a chat bot user ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record`","description":"The data that the Notification was sent with. This contains all the data necessary for the Notification Provider to initiate a resend.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"parent_id","type":"`string`","description":"The notification's parent ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"parent_notification","type":"[Notification](entities.Notification.mdx)","description":"The details of the parent notification.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"resends","type":"[Notification](entities.Notification.mdx)[]","description":"The details of all resends of the notification.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"provider_id","type":"`string`","description":"The ID of the notification provider used to send the notification.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider","type":"[NotificationProvider](entities.NotificationProvider.mdx)","description":"The notification provider used to send the notification.","optional":false,"defaultValue":"","expandable":true,"children":[]}]},{"name":"provider_id","type":"`string`","description":"The ID of the notification provider used to send the notification.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider","type":"[NotificationProvider](entities.NotificationProvider.mdx)","description":"The notification provider used to send the notification.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The ID of the notification provider as given by the notification service.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_installed","type":"`boolean`","description":"Whether the notification service is installed in the current version. If a notification service is no longer installed, the `is\\_installed` attribute is set to `false`.","optional":false,"defaultValue":"true","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="Notification"/> diff --git a/www/apps/docs/content/references/entities/classes/entities.NotificationProvider.mdx b/www/apps/docs/content/references/entities/classes/entities.NotificationProvider.mdx index 9989b1cf21..06f310ee60 100644 --- a/www/apps/docs/content/references/entities/classes/entities.NotificationProvider.mdx +++ b/www/apps/docs/content/references/entities/classes/entities.NotificationProvider.mdx @@ -3,7 +3,7 @@ displayed_sidebar: entitiesSidebar slug: /references/entities/classes/NotificationProvider --- -import ParameterTypes from "@site/src/components/ParameterTypes" +import TypeList from "@site/src/components/TypeList" # NotificationProvider @@ -11,4 +11,4 @@ A notification provider represents a notification service installed in the Medus ## Properties - + diff --git a/www/apps/docs/content/references/entities/classes/entities.Oauth.mdx b/www/apps/docs/content/references/entities/classes/entities.Oauth.mdx index 77fb38aa15..123a105fb0 100644 --- a/www/apps/docs/content/references/entities/classes/entities.Oauth.mdx +++ b/www/apps/docs/content/references/entities/classes/entities.Oauth.mdx @@ -3,10 +3,10 @@ displayed_sidebar: entitiesSidebar slug: /references/entities/classes/Oauth --- -import ParameterTypes from "@site/src/components/ParameterTypes" +import TypeList from "@site/src/components/TypeList" # Oauth ## Properties -`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="Oauth"/> +`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="Oauth"/> diff --git a/www/apps/docs/content/references/entities/classes/entities.Order.mdx b/www/apps/docs/content/references/entities/classes/entities.Order.mdx index 534043d394..ce3ff0703a 100644 --- a/www/apps/docs/content/references/entities/classes/entities.Order.mdx +++ b/www/apps/docs/content/references/entities/classes/entities.Order.mdx @@ -3,7 +3,7 @@ displayed_sidebar: entitiesSidebar slug: /references/entities/classes/Order --- -import ParameterTypes from "@site/src/components/ParameterTypes" +import TypeList from "@site/src/components/TypeList" # Order @@ -11,4 +11,4 @@ An order is a purchase made by a customer. It holds details about payment and fu ## Properties -`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"no_notification","type":"`boolean`","description":"Flag for describing whether or not notifications related to this should be send.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotency_key","type":"`string`","description":"Randomly generated key used to continue the processing of the order in case of failure.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"external_id","type":"`null` \\| `string`","description":"The ID of an external order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel this order belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel","type":"[SalesChannel](entities.SalesChannel.mdx)","description":"The details of the sales channel this order belongs to.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"shipping_total","type":"`number`","description":"The total of shipping","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_tax_total","type":"`null` \\| `number`","description":"The tax total applied on shipping","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_total","type":"`number`","description":"The total of discount rounded","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_discount_total","type":"`number`","description":"The total of discount","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`null` \\| `number`","description":"The tax total applied on items","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_total","type":"`null` \\| `number`","description":"The total of tax","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"refunded_total","type":"`number`","description":"The total amount refunded if the order is returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"total","type":"`number`","description":"The total amount of the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"subtotal","type":"`number`","description":"The subtotal of the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"paid_total","type":"`number`","description":"The total amount paid","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"refundable_amount","type":"`number`","description":"The amount that can be refunded","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"gift_card_total","type":"`number`","description":"The total of gift cards","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"gift_card_tax_total","type":"`number`","description":"The total of gift cards with taxes","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channels","type":"[SalesChannel](entities.SalesChannel.mdx)[]","description":"The associated sales channels.","optional":true,"defaultValue":"","expandable":true,"featureFlag":"medusa_v2","children":[]},{"name":"returnable_items","type":"[LineItem](entities.LineItem.mdx)[]","description":"The details of the line items that are returnable as part of the order, swaps, or claims","optional":true,"defaultValue":"","expandable":true,"children":[]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="Order"/> +`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"no_notification","type":"`boolean`","description":"Flag for describing whether or not notifications related to this should be send.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotency_key","type":"`string`","description":"Randomly generated key used to continue the processing of the order in case of failure.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"external_id","type":"`null` \\| `string`","description":"The ID of an external order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel this order belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel","type":"[SalesChannel](entities.SalesChannel.mdx)","description":"The details of the sales channel this order belongs to.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"shipping_total","type":"`number`","description":"The total of shipping","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_tax_total","type":"`null` \\| `number`","description":"The tax total applied on shipping","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_total","type":"`number`","description":"The total of discount rounded","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_discount_total","type":"`number`","description":"The total of discount","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`null` \\| `number`","description":"The tax total applied on items","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_total","type":"`null` \\| `number`","description":"The total of tax","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"refunded_total","type":"`number`","description":"The total amount refunded if the order is returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"total","type":"`number`","description":"The total amount of the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"subtotal","type":"`number`","description":"The subtotal of the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"paid_total","type":"`number`","description":"The total amount paid","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"refundable_amount","type":"`number`","description":"The amount that can be refunded","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"gift_card_total","type":"`number`","description":"The total of gift cards","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"gift_card_tax_total","type":"`number`","description":"The total of gift cards with taxes","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channels","type":"[SalesChannel](entities.SalesChannel.mdx)[]","description":"The associated sales channels.","optional":true,"defaultValue":"","expandable":true,"featureFlag":"medusa_v2","children":[]},{"name":"returnable_items","type":"[LineItem](entities.LineItem.mdx)[]","description":"The details of the line items that are returnable as part of the order, swaps, or claims","optional":true,"defaultValue":"","expandable":true,"children":[]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="Order"/> diff --git a/www/apps/docs/content/references/entities/classes/entities.OrderEdit.mdx b/www/apps/docs/content/references/entities/classes/entities.OrderEdit.mdx index 887f2538b3..675aedb477 100644 --- a/www/apps/docs/content/references/entities/classes/entities.OrderEdit.mdx +++ b/www/apps/docs/content/references/entities/classes/entities.OrderEdit.mdx @@ -3,7 +3,7 @@ displayed_sidebar: entitiesSidebar slug: /references/entities/classes/OrderEdit --- -import ParameterTypes from "@site/src/components/ParameterTypes" +import TypeList from "@site/src/components/TypeList" # OrderEdit @@ -11,4 +11,4 @@ Order edit allows modifying items in an order, such as adding, updating, or dele ## Properties - + diff --git a/www/apps/docs/content/references/entities/classes/entities.OrderItemChange.mdx b/www/apps/docs/content/references/entities/classes/entities.OrderItemChange.mdx index 8de700895d..0b1c36722c 100644 --- a/www/apps/docs/content/references/entities/classes/entities.OrderItemChange.mdx +++ b/www/apps/docs/content/references/entities/classes/entities.OrderItemChange.mdx @@ -3,7 +3,7 @@ displayed_sidebar: entitiesSidebar slug: /references/entities/classes/OrderItemChange --- -import ParameterTypes from "@site/src/components/ParameterTypes" +import TypeList from "@site/src/components/TypeList" # OrderItemChange @@ -11,4 +11,4 @@ An order item change is a change made within an order edit to an order's items. ## Properties - + diff --git a/www/apps/docs/content/references/entities/classes/entities.Payment.mdx b/www/apps/docs/content/references/entities/classes/entities.Payment.mdx index 3cac5e7afc..3452f592f0 100644 --- a/www/apps/docs/content/references/entities/classes/entities.Payment.mdx +++ b/www/apps/docs/content/references/entities/classes/entities.Payment.mdx @@ -3,7 +3,7 @@ displayed_sidebar: entitiesSidebar slug: /references/entities/classes/Payment --- -import ParameterTypes from "@site/src/components/ParameterTypes" +import TypeList from "@site/src/components/TypeList" # Payment @@ -11,4 +11,4 @@ A payment is originally created from a payment session. Once a payment session i ## Properties -`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"cart_id","type":"`string`","description":"The ID of the cart that the payment session was potentially created for.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart","type":"[Cart](entities.Cart.mdx)","description":"The details of the cart that the payment session was potentially created for.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The cart's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"object","type":"`\"cart\"`","description":"","optional":false,"defaultValue":"\"cart\"","expandable":false,"children":[]},{"name":"email","type":"`string`","description":"The email associated with the cart","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"billing_address_id","type":"`string`","description":"The billing address's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"billing_address","type":"[Address](entities.Address.mdx)","description":"The details of the billing address associated with the cart.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"shipping_address_id","type":"`string`","description":"The shipping address's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_address","type":"`null` \\| [Address](entities.Address.mdx)","description":"The details of the shipping address associated with the cart.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"items","type":"[LineItem](entities.LineItem.mdx)[]","description":"The line items added to the cart.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"region_id","type":"`string`","description":"The region's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region","type":"[Region](entities.Region.mdx)","description":"The details of the region associated with the cart.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"discounts","type":"[Discount](entities.Discount.mdx)[]","description":"An array of details of all discounts applied to the cart.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"gift_cards","type":"[GiftCard](entities.GiftCard.mdx)[]","description":"An array of details of all gift cards applied to the cart.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"customer_id","type":"`string`","description":"The customer's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer","type":"[Customer](entities.Customer.mdx)","description":"The details of the customer the cart belongs to.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"payment_session","type":"`null` \\| [PaymentSession](entities.PaymentSession.mdx)","description":"The details of the selected payment session in the cart.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"payment_sessions","type":"[PaymentSession](entities.PaymentSession.mdx)[]","description":"The details of all payment sessions created on the cart.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"payment_id","type":"`string`","description":"The payment's ID if available","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment","type":"[Payment](entities.Payment.mdx)","description":"The details of the payment associated with the cart.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"shipping_methods","type":"[ShippingMethod](entities.ShippingMethod.mdx)[]","description":"The details of the shipping methods added to the cart.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"type","type":"[CartType](../enums/entities.CartType.mdx)","description":"The cart's type.","optional":false,"defaultValue":"default","expandable":false,"children":[]},{"name":"completed_at","type":"`Date`","description":"The date with timezone at which the cart was completed.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_authorized_at","type":"`Date`","description":"The date with timezone at which the payment was authorized.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotency_key","type":"`string`","description":"Randomly generated key used to continue the completion of a cart in case of failure.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"`Record`","description":"The context of the cart which can include info like IP or user agent.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The sales channel ID the cart is associated with.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel","type":"[SalesChannel](entities.SalesChannel.mdx)","description":"The details of the sales channel associated with the cart.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"sales_channels","type":"[SalesChannel](entities.SalesChannel.mdx)[]","description":"The associated sales channels.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"shipping_total","type":"`number`","description":"The total of shipping","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_total","type":"`number`","description":"The total of discount rounded","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_discount_total","type":"`number`","description":"The total of discount","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`null` \\| `number`","description":"The total of items with taxes","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_tax_total","type":"`null` \\| `number`","description":"The total of shipping with taxes","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_total","type":"`null` \\| `number`","description":"The total of tax","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"refunded_total","type":"`number`","description":"The total amount refunded if the order associated with this cart is returned.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"total","type":"`number`","description":"The total amount of the cart","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"subtotal","type":"`number`","description":"The subtotal of the cart","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"refundable_amount","type":"`number`","description":"The amount that can be refunded","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"gift_card_total","type":"`number`","description":"The total of gift cards","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"gift_card_tax_total","type":"`number`","description":"The total of gift cards with taxes","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"order_id","type":"`string`","description":"The ID of the order that the payment session was potentially created for.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"[Order](entities.Order.mdx)","description":"The details of the order that the payment session was potentially created for.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The order's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"object","type":"`\"order\"`","description":"","optional":false,"defaultValue":"\"order\"","expandable":false,"children":[]},{"name":"status","type":"[OrderStatus](../enums/entities.OrderStatus.mdx)","description":"The order's status","optional":false,"defaultValue":"pending","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../enums/entities.FulfillmentStatus.mdx)","description":"The order's fulfillment status","optional":false,"defaultValue":"not_fulfilled","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../enums/entities.PaymentStatus.mdx)","description":"The order's payment status","optional":false,"defaultValue":"not_paid","expandable":false,"children":[]},{"name":"display_id","type":"`number`","description":"The order's display ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart_id","type":"`string`","description":"The ID of the cart associated with the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart","type":"[Cart](entities.Cart.mdx)","description":"The details of the cart associated with the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"customer_id","type":"`string`","description":"The ID of the customer associated with the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer","type":"[Customer](entities.Customer.mdx)","description":"The details of the customer associated with the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"email","type":"`string`","description":"The email associated with the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"billing_address_id","type":"`string`","description":"The ID of the billing address associated with the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"billing_address","type":"[Address](entities.Address.mdx)","description":"The details of the billing address associated with the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"shipping_address_id","type":"`string`","description":"The ID of the shipping address associated with the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_address","type":"[Address](entities.Address.mdx)","description":"The details of the shipping address associated with the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"region_id","type":"`string`","description":"The ID of the region this order was created in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region","type":"[Region](entities.Region.mdx)","description":"The details of the region this order was created in.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"currency_code","type":"`string`","description":"The 3 character currency code that is used in the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency","type":"[Currency](entities.Currency.mdx)","description":"The details of the currency used in the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"tax_rate","type":"`null` \\| `number`","description":"The order's tax rate","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discounts","type":"[Discount](entities.Discount.mdx)[]","description":"The details of the discounts applied on the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"gift_cards","type":"[GiftCard](entities.GiftCard.mdx)[]","description":"The details of the gift card used in the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"shipping_methods","type":"[ShippingMethod](entities.ShippingMethod.mdx)[]","description":"The details of the shipping methods used in the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"payments","type":"[Payment](entities.Payment.mdx)[]","description":"The details of the payments used in the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"fulfillments","type":"[Fulfillment](entities.Fulfillment.mdx)[]","description":"The details of the fulfillments created for the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"returns","type":"[Return](entities.Return.mdx)[]","description":"The details of the returns created for the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"claims","type":"[ClaimOrder](entities.ClaimOrder.mdx)[]","description":"The details of the claims created for the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"refunds","type":"[Refund](entities.Refund.mdx)[]","description":"The details of the refunds created for the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"swaps","type":"[Swap](entities.Swap.mdx)[]","description":"The details of the swaps created for the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"draft_order_id","type":"`string`","description":"The ID of the draft order this order was created from.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"draft_order","type":"[DraftOrder](entities.DraftOrder.mdx)","description":"The details of the draft order this order was created from.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"edits","type":"[OrderEdit](entities.OrderEdit.mdx)[]","description":"The details of the order edits done on the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"items","type":"[LineItem](entities.LineItem.mdx)[]","description":"The details of the line items that belong to the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"gift_card_transactions","type":"[GiftCardTransaction](entities.GiftCardTransaction.mdx)[]","description":"The gift card transactions made in the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"canceled_at","type":"`Date`","description":"The date the order was canceled on.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"no_notification","type":"`boolean`","description":"Flag for describing whether or not notifications related to this should be send.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotency_key","type":"`string`","description":"Randomly generated key used to continue the processing of the order in case of failure.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"external_id","type":"`null` \\| `string`","description":"The ID of an external order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel this order belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel","type":"[SalesChannel](entities.SalesChannel.mdx)","description":"The details of the sales channel this order belongs to.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"shipping_total","type":"`number`","description":"The total of shipping","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_tax_total","type":"`null` \\| `number`","description":"The tax total applied on shipping","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_total","type":"`number`","description":"The total of discount rounded","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_discount_total","type":"`number`","description":"The total of discount","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`null` \\| `number`","description":"The tax total applied on items","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_total","type":"`null` \\| `number`","description":"The total of tax","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"refunded_total","type":"`number`","description":"The total amount refunded if the order is returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"total","type":"`number`","description":"The total amount of the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"subtotal","type":"`number`","description":"The subtotal of the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"paid_total","type":"`number`","description":"The total amount paid","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"refundable_amount","type":"`number`","description":"The amount that can be refunded","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"gift_card_total","type":"`number`","description":"The total of gift cards","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"gift_card_tax_total","type":"`number`","description":"The total of gift cards with taxes","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channels","type":"[SalesChannel](entities.SalesChannel.mdx)[]","description":"The associated sales channels.","optional":true,"defaultValue":"","expandable":true,"featureFlag":"medusa_v2","children":[]},{"name":"returnable_items","type":"[LineItem](entities.LineItem.mdx)[]","description":"The details of the line items that are returnable as part of the order, swaps, or claims","optional":true,"defaultValue":"","expandable":true,"children":[]}]},{"name":"amount","type":"`number`","description":"The amount that the Payment has been authorized for.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The 3 character ISO currency code of the payment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency","type":"[Currency](entities.Currency.mdx)","description":"The details of the currency of the payment.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"code","type":"`string`","description":"The 3 character ISO code for the currency.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"symbol","type":"`string`","description":"The symbol used to indicate the currency.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"symbol_native","type":"`string`","description":"The native symbol used to indicate the currency.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The written name of the currency","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"includes_tax","type":"`boolean`","description":"Whether the currency prices include tax","optional":true,"defaultValue":"false","expandable":false,"featureFlag":"tax_inclusive_pricing","children":[]}]},{"name":"amount_refunded","type":"`number`","description":"The amount of the original Payment amount that has been refunded back to the Customer.","optional":false,"defaultValue":"0","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The id of the Payment Provider that is responsible for the Payment","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record`","description":"The data required for the Payment Provider to identify, modify and process the Payment. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"captured_at","type":"`string` \\| `Date`","description":"The date with timezone at which the Payment was captured.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`string` \\| `Date`","description":"The date with timezone at which the Payment was canceled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotency_key","type":"`string`","description":"Randomly generated key used to continue the completion of a payment in case of failure.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="Payment"/> +`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"cart_id","type":"`string`","description":"The ID of the cart that the payment session was potentially created for.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart","type":"[Cart](entities.Cart.mdx)","description":"The details of the cart that the payment session was potentially created for.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The cart's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"object","type":"`\"cart\"`","description":"","optional":false,"defaultValue":"\"cart\"","expandable":false,"children":[]},{"name":"email","type":"`string`","description":"The email associated with the cart","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"billing_address_id","type":"`string`","description":"The billing address's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"billing_address","type":"[Address](entities.Address.mdx)","description":"The details of the billing address associated with the cart.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"shipping_address_id","type":"`string`","description":"The shipping address's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_address","type":"`null` \\| [Address](entities.Address.mdx)","description":"The details of the shipping address associated with the cart.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"items","type":"[LineItem](entities.LineItem.mdx)[]","description":"The line items added to the cart.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"region_id","type":"`string`","description":"The region's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region","type":"[Region](entities.Region.mdx)","description":"The details of the region associated with the cart.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"discounts","type":"[Discount](entities.Discount.mdx)[]","description":"An array of details of all discounts applied to the cart.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"gift_cards","type":"[GiftCard](entities.GiftCard.mdx)[]","description":"An array of details of all gift cards applied to the cart.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"customer_id","type":"`string`","description":"The customer's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer","type":"[Customer](entities.Customer.mdx)","description":"The details of the customer the cart belongs to.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"payment_session","type":"`null` \\| [PaymentSession](entities.PaymentSession.mdx)","description":"The details of the selected payment session in the cart.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"payment_sessions","type":"[PaymentSession](entities.PaymentSession.mdx)[]","description":"The details of all payment sessions created on the cart.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"payment_id","type":"`string`","description":"The payment's ID if available","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment","type":"[Payment](entities.Payment.mdx)","description":"The details of the payment associated with the cart.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"shipping_methods","type":"[ShippingMethod](entities.ShippingMethod.mdx)[]","description":"The details of the shipping methods added to the cart.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"type","type":"[CartType](../enums/entities.CartType.mdx)","description":"The cart's type.","optional":false,"defaultValue":"default","expandable":false,"children":[]},{"name":"completed_at","type":"`Date`","description":"The date with timezone at which the cart was completed.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_authorized_at","type":"`Date`","description":"The date with timezone at which the payment was authorized.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotency_key","type":"`string`","description":"Randomly generated key used to continue the completion of a cart in case of failure.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"`Record`","description":"The context of the cart which can include info like IP or user agent.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The sales channel ID the cart is associated with.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel","type":"[SalesChannel](entities.SalesChannel.mdx)","description":"The details of the sales channel associated with the cart.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"sales_channels","type":"[SalesChannel](entities.SalesChannel.mdx)[]","description":"The associated sales channels.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"shipping_total","type":"`number`","description":"The total of shipping","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_total","type":"`number`","description":"The total of discount rounded","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_discount_total","type":"`number`","description":"The total of discount","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`null` \\| `number`","description":"The total of items with taxes","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_tax_total","type":"`null` \\| `number`","description":"The total of shipping with taxes","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_total","type":"`null` \\| `number`","description":"The total of tax","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"refunded_total","type":"`number`","description":"The total amount refunded if the order associated with this cart is returned.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"total","type":"`number`","description":"The total amount of the cart","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"subtotal","type":"`number`","description":"The subtotal of the cart","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"refundable_amount","type":"`number`","description":"The amount that can be refunded","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"gift_card_total","type":"`number`","description":"The total of gift cards","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"gift_card_tax_total","type":"`number`","description":"The total of gift cards with taxes","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"order_id","type":"`string`","description":"The ID of the order that the payment session was potentially created for.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"[Order](entities.Order.mdx)","description":"The details of the order that the payment session was potentially created for.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The order's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"object","type":"`\"order\"`","description":"","optional":false,"defaultValue":"\"order\"","expandable":false,"children":[]},{"name":"status","type":"[OrderStatus](../enums/entities.OrderStatus.mdx)","description":"The order's status","optional":false,"defaultValue":"pending","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../enums/entities.FulfillmentStatus.mdx)","description":"The order's fulfillment status","optional":false,"defaultValue":"not_fulfilled","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../enums/entities.PaymentStatus.mdx)","description":"The order's payment status","optional":false,"defaultValue":"not_paid","expandable":false,"children":[]},{"name":"display_id","type":"`number`","description":"The order's display ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart_id","type":"`string`","description":"The ID of the cart associated with the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart","type":"[Cart](entities.Cart.mdx)","description":"The details of the cart associated with the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"customer_id","type":"`string`","description":"The ID of the customer associated with the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer","type":"[Customer](entities.Customer.mdx)","description":"The details of the customer associated with the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"email","type":"`string`","description":"The email associated with the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"billing_address_id","type":"`string`","description":"The ID of the billing address associated with the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"billing_address","type":"[Address](entities.Address.mdx)","description":"The details of the billing address associated with the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"shipping_address_id","type":"`string`","description":"The ID of the shipping address associated with the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_address","type":"[Address](entities.Address.mdx)","description":"The details of the shipping address associated with the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"region_id","type":"`string`","description":"The ID of the region this order was created in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region","type":"[Region](entities.Region.mdx)","description":"The details of the region this order was created in.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"currency_code","type":"`string`","description":"The 3 character currency code that is used in the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency","type":"[Currency](entities.Currency.mdx)","description":"The details of the currency used in the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"tax_rate","type":"`null` \\| `number`","description":"The order's tax rate","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discounts","type":"[Discount](entities.Discount.mdx)[]","description":"The details of the discounts applied on the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"gift_cards","type":"[GiftCard](entities.GiftCard.mdx)[]","description":"The details of the gift card used in the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"shipping_methods","type":"[ShippingMethod](entities.ShippingMethod.mdx)[]","description":"The details of the shipping methods used in the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"payments","type":"[Payment](entities.Payment.mdx)[]","description":"The details of the payments used in the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"fulfillments","type":"[Fulfillment](entities.Fulfillment.mdx)[]","description":"The details of the fulfillments created for the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"returns","type":"[Return](entities.Return.mdx)[]","description":"The details of the returns created for the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"claims","type":"[ClaimOrder](entities.ClaimOrder.mdx)[]","description":"The details of the claims created for the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"refunds","type":"[Refund](entities.Refund.mdx)[]","description":"The details of the refunds created for the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"swaps","type":"[Swap](entities.Swap.mdx)[]","description":"The details of the swaps created for the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"draft_order_id","type":"`string`","description":"The ID of the draft order this order was created from.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"draft_order","type":"[DraftOrder](entities.DraftOrder.mdx)","description":"The details of the draft order this order was created from.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"edits","type":"[OrderEdit](entities.OrderEdit.mdx)[]","description":"The details of the order edits done on the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"items","type":"[LineItem](entities.LineItem.mdx)[]","description":"The details of the line items that belong to the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"gift_card_transactions","type":"[GiftCardTransaction](entities.GiftCardTransaction.mdx)[]","description":"The gift card transactions made in the order.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"canceled_at","type":"`Date`","description":"The date the order was canceled on.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"no_notification","type":"`boolean`","description":"Flag for describing whether or not notifications related to this should be send.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotency_key","type":"`string`","description":"Randomly generated key used to continue the processing of the order in case of failure.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"external_id","type":"`null` \\| `string`","description":"The ID of an external order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel this order belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel","type":"[SalesChannel](entities.SalesChannel.mdx)","description":"The details of the sales channel this order belongs to.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"shipping_total","type":"`number`","description":"The total of shipping","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_tax_total","type":"`null` \\| `number`","description":"The tax total applied on shipping","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_total","type":"`number`","description":"The total of discount rounded","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_discount_total","type":"`number`","description":"The total of discount","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`null` \\| `number`","description":"The tax total applied on items","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_total","type":"`null` \\| `number`","description":"The total of tax","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"refunded_total","type":"`number`","description":"The total amount refunded if the order is returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"total","type":"`number`","description":"The total amount of the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"subtotal","type":"`number`","description":"The subtotal of the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"paid_total","type":"`number`","description":"The total amount paid","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"refundable_amount","type":"`number`","description":"The amount that can be refunded","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"gift_card_total","type":"`number`","description":"The total of gift cards","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"gift_card_tax_total","type":"`number`","description":"The total of gift cards with taxes","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channels","type":"[SalesChannel](entities.SalesChannel.mdx)[]","description":"The associated sales channels.","optional":true,"defaultValue":"","expandable":true,"featureFlag":"medusa_v2","children":[]},{"name":"returnable_items","type":"[LineItem](entities.LineItem.mdx)[]","description":"The details of the line items that are returnable as part of the order, swaps, or claims","optional":true,"defaultValue":"","expandable":true,"children":[]}]},{"name":"amount","type":"`number`","description":"The amount that the Payment has been authorized for.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The 3 character ISO currency code of the payment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency","type":"[Currency](entities.Currency.mdx)","description":"The details of the currency of the payment.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"code","type":"`string`","description":"The 3 character ISO code for the currency.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"symbol","type":"`string`","description":"The symbol used to indicate the currency.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"symbol_native","type":"`string`","description":"The native symbol used to indicate the currency.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The written name of the currency","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"includes_tax","type":"`boolean`","description":"Whether the currency prices include tax","optional":true,"defaultValue":"false","expandable":false,"featureFlag":"tax_inclusive_pricing","children":[]}]},{"name":"amount_refunded","type":"`number`","description":"The amount of the original Payment amount that has been refunded back to the Customer.","optional":false,"defaultValue":"0","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The id of the Payment Provider that is responsible for the Payment","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record`","description":"The data required for the Payment Provider to identify, modify and process the Payment. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"captured_at","type":"`string` \\| `Date`","description":"The date with timezone at which the Payment was captured.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`string` \\| `Date`","description":"The date with timezone at which the Payment was canceled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotency_key","type":"`string`","description":"Randomly generated key used to continue the completion of a payment in case of failure.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="Payment"/> diff --git a/www/apps/docs/content/references/entities/classes/entities.PaymentCollection.mdx b/www/apps/docs/content/references/entities/classes/entities.PaymentCollection.mdx index 2801f98e1f..324066f22a 100644 --- a/www/apps/docs/content/references/entities/classes/entities.PaymentCollection.mdx +++ b/www/apps/docs/content/references/entities/classes/entities.PaymentCollection.mdx @@ -3,7 +3,7 @@ displayed_sidebar: entitiesSidebar slug: /references/entities/classes/PaymentCollection --- -import ParameterTypes from "@site/src/components/ParameterTypes" +import TypeList from "@site/src/components/TypeList" # PaymentCollection @@ -11,4 +11,4 @@ A payment collection allows grouping and managing a list of payments at one. Thi ## Properties -`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"includes_tax","type":"`boolean`","description":"Whether the prices for the region include tax","optional":false,"defaultValue":"false","expandable":false,"featureFlag":"tax_inclusive_pricing","children":[]}]},{"name":"currency_code","type":"`string`","description":"The three character ISO code for the currency this payment collection is associated with.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency","type":"[Currency](entities.Currency.mdx)","description":"The details of the currency this payment collection is associated with.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"code","type":"`string`","description":"The 3 character ISO code for the currency.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"symbol","type":"`string`","description":"The symbol used to indicate the currency.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"symbol_native","type":"`string`","description":"The native symbol used to indicate the currency.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The written name of the currency","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"includes_tax","type":"`boolean`","description":"Whether the currency prices include tax","optional":true,"defaultValue":"false","expandable":false,"featureFlag":"tax_inclusive_pricing","children":[]}]},{"name":"payment_sessions","type":"[PaymentSession](entities.PaymentSession.mdx)[]","description":"The details of the payment sessions created as part of the payment collection.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The payment session's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart_id","type":"`null` \\| `string`","description":"The ID of the cart that the payment session was created for.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart","type":"[Cart](entities.Cart.mdx)","description":"The details of the cart that the payment session was created for.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"provider_id","type":"`string`","description":"The ID of the Payment Provider that is responsible for the Payment Session","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_selected","type":"`null` \\| `boolean`","description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_initiated","type":"`boolean`","description":"A flag to indicate if a communication with the third party provider has been initiated.","optional":false,"defaultValue":"false","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires\\_more` to indicate that further actions are to be completed by the Customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record`","description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotency_key","type":"`string`","description":"Randomly generated key used to continue the completion of a cart in case of failure.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"`number`","description":"The amount that the Payment Session has been authorized for.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_authorized_at","type":"`Date`","description":"The date with timezone at which the Payment Session was authorized.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"payments","type":"[Payment](entities.Payment.mdx)[]","description":"The details of the payments created as part of the payment collection.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The payment's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"swap_id","type":"`string`","description":"The ID of the swap that this payment was potentially created for.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"swap","type":"[Swap](entities.Swap.mdx)","description":"The details of the swap that this payment was potentially created for.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"cart_id","type":"`string`","description":"The ID of the cart that the payment session was potentially created for.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart","type":"[Cart](entities.Cart.mdx)","description":"The details of the cart that the payment session was potentially created for.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"order_id","type":"`string`","description":"The ID of the order that the payment session was potentially created for.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"[Order](entities.Order.mdx)","description":"The details of the order that the payment session was potentially created for.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"amount","type":"`number`","description":"The amount that the Payment has been authorized for.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The 3 character ISO currency code of the payment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency","type":"[Currency](entities.Currency.mdx)","description":"The details of the currency of the payment.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"amount_refunded","type":"`number`","description":"The amount of the original Payment amount that has been refunded back to the Customer.","optional":false,"defaultValue":"0","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The id of the Payment Provider that is responsible for the Payment","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record`","description":"The data required for the Payment Provider to identify, modify and process the Payment. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"captured_at","type":"`string` \\| `Date`","description":"The date with timezone at which the Payment was captured.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`string` \\| `Date`","description":"The date with timezone at which the Payment was canceled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotency_key","type":"`string`","description":"Randomly generated key used to continue the completion of a payment in case of failure.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`string`","description":"The ID of the user that created the payment collection.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="PaymentCollection"/> +`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"includes_tax","type":"`boolean`","description":"Whether the prices for the region include tax","optional":false,"defaultValue":"false","expandable":false,"featureFlag":"tax_inclusive_pricing","children":[]}]},{"name":"currency_code","type":"`string`","description":"The three character ISO code for the currency this payment collection is associated with.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency","type":"[Currency](entities.Currency.mdx)","description":"The details of the currency this payment collection is associated with.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"code","type":"`string`","description":"The 3 character ISO code for the currency.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"symbol","type":"`string`","description":"The symbol used to indicate the currency.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"symbol_native","type":"`string`","description":"The native symbol used to indicate the currency.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The written name of the currency","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"includes_tax","type":"`boolean`","description":"Whether the currency prices include tax","optional":true,"defaultValue":"false","expandable":false,"featureFlag":"tax_inclusive_pricing","children":[]}]},{"name":"payment_sessions","type":"[PaymentSession](entities.PaymentSession.mdx)[]","description":"The details of the payment sessions created as part of the payment collection.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The payment session's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart_id","type":"`null` \\| `string`","description":"The ID of the cart that the payment session was created for.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart","type":"[Cart](entities.Cart.mdx)","description":"The details of the cart that the payment session was created for.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"provider_id","type":"`string`","description":"The ID of the Payment Provider that is responsible for the Payment Session","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_selected","type":"`null` \\| `boolean`","description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_initiated","type":"`boolean`","description":"A flag to indicate if a communication with the third party provider has been initiated.","optional":false,"defaultValue":"false","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires\\_more` to indicate that further actions are to be completed by the Customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record`","description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotency_key","type":"`string`","description":"Randomly generated key used to continue the completion of a cart in case of failure.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"`number`","description":"The amount that the Payment Session has been authorized for.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_authorized_at","type":"`Date`","description":"The date with timezone at which the Payment Session was authorized.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"payments","type":"[Payment](entities.Payment.mdx)[]","description":"The details of the payments created as part of the payment collection.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The payment's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"swap_id","type":"`string`","description":"The ID of the swap that this payment was potentially created for.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"swap","type":"[Swap](entities.Swap.mdx)","description":"The details of the swap that this payment was potentially created for.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"cart_id","type":"`string`","description":"The ID of the cart that the payment session was potentially created for.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart","type":"[Cart](entities.Cart.mdx)","description":"The details of the cart that the payment session was potentially created for.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"order_id","type":"`string`","description":"The ID of the order that the payment session was potentially created for.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"[Order](entities.Order.mdx)","description":"The details of the order that the payment session was potentially created for.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"amount","type":"`number`","description":"The amount that the Payment has been authorized for.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The 3 character ISO currency code of the payment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency","type":"[Currency](entities.Currency.mdx)","description":"The details of the currency of the payment.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"amount_refunded","type":"`number`","description":"The amount of the original Payment amount that has been refunded back to the Customer.","optional":false,"defaultValue":"0","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The id of the Payment Provider that is responsible for the Payment","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record`","description":"The data required for the Payment Provider to identify, modify and process the Payment. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"captured_at","type":"`string` \\| `Date`","description":"The date with timezone at which the Payment was captured.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`string` \\| `Date`","description":"The date with timezone at which the Payment was canceled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotency_key","type":"`string`","description":"Randomly generated key used to continue the completion of a payment in case of failure.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`string`","description":"The ID of the user that created the payment collection.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="PaymentCollection"/> diff --git a/www/apps/docs/content/references/entities/classes/entities.PaymentProvider.mdx b/www/apps/docs/content/references/entities/classes/entities.PaymentProvider.mdx index cdd16c56de..892fd606ef 100644 --- a/www/apps/docs/content/references/entities/classes/entities.PaymentProvider.mdx +++ b/www/apps/docs/content/references/entities/classes/entities.PaymentProvider.mdx @@ -3,7 +3,7 @@ displayed_sidebar: entitiesSidebar slug: /references/entities/classes/PaymentProvider --- -import ParameterTypes from "@site/src/components/ParameterTypes" +import TypeList from "@site/src/components/TypeList" # PaymentProvider @@ -11,4 +11,4 @@ A payment provider represents a payment service installed in the Medusa backend, ## Properties - + diff --git a/www/apps/docs/content/references/entities/classes/entities.PaymentSession.mdx b/www/apps/docs/content/references/entities/classes/entities.PaymentSession.mdx index aaefc71730..60a3ecd4ef 100644 --- a/www/apps/docs/content/references/entities/classes/entities.PaymentSession.mdx +++ b/www/apps/docs/content/references/entities/classes/entities.PaymentSession.mdx @@ -3,7 +3,7 @@ displayed_sidebar: entitiesSidebar slug: /references/entities/classes/PaymentSession --- -import ParameterTypes from "@site/src/components/ParameterTypes" +import TypeList from "@site/src/components/TypeList" # PaymentSession @@ -11,4 +11,4 @@ A Payment Session is created when a Customer initilizes the checkout flow, and c ## Properties -`","description":"The context of the cart which can include info like IP or user agent.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The sales channel ID the cart is associated with.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel","type":"[SalesChannel](entities.SalesChannel.mdx)","description":"The details of the sales channel associated with the cart.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"sales_channels","type":"[SalesChannel](entities.SalesChannel.mdx)[]","description":"The associated sales channels.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"shipping_total","type":"`number`","description":"The total of shipping","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_total","type":"`number`","description":"The total of discount rounded","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_discount_total","type":"`number`","description":"The total of discount","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`null` \\| `number`","description":"The total of items with taxes","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_tax_total","type":"`null` \\| `number`","description":"The total of shipping with taxes","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_total","type":"`null` \\| `number`","description":"The total of tax","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"refunded_total","type":"`number`","description":"The total amount refunded if the order associated with this cart is returned.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"total","type":"`number`","description":"The total amount of the cart","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"subtotal","type":"`number`","description":"The subtotal of the cart","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"refundable_amount","type":"`number`","description":"The amount that can be refunded","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"gift_card_total","type":"`number`","description":"The total of gift cards","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"gift_card_tax_total","type":"`number`","description":"The total of gift cards with taxes","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"provider_id","type":"`string`","description":"The ID of the Payment Provider that is responsible for the Payment Session","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_selected","type":"`null` \\| `boolean`","description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_initiated","type":"`boolean`","description":"A flag to indicate if a communication with the third party provider has been initiated.","optional":false,"defaultValue":"false","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires\\_more` to indicate that further actions are to be completed by the Customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record`","description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotency_key","type":"`string`","description":"Randomly generated key used to continue the completion of a cart in case of failure.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"`number`","description":"The amount that the Payment Session has been authorized for.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_authorized_at","type":"`Date`","description":"The date with timezone at which the Payment Session was authorized.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="PaymentSession"/> +`","description":"The context of the cart which can include info like IP or user agent.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The sales channel ID the cart is associated with.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel","type":"[SalesChannel](entities.SalesChannel.mdx)","description":"The details of the sales channel associated with the cart.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"sales_channels","type":"[SalesChannel](entities.SalesChannel.mdx)[]","description":"The associated sales channels.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"shipping_total","type":"`number`","description":"The total of shipping","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_total","type":"`number`","description":"The total of discount rounded","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_discount_total","type":"`number`","description":"The total of discount","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`null` \\| `number`","description":"The total of items with taxes","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_tax_total","type":"`null` \\| `number`","description":"The total of shipping with taxes","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_total","type":"`null` \\| `number`","description":"The total of tax","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"refunded_total","type":"`number`","description":"The total amount refunded if the order associated with this cart is returned.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"total","type":"`number`","description":"The total amount of the cart","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"subtotal","type":"`number`","description":"The subtotal of the cart","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"refundable_amount","type":"`number`","description":"The amount that can be refunded","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"gift_card_total","type":"`number`","description":"The total of gift cards","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"gift_card_tax_total","type":"`number`","description":"The total of gift cards with taxes","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"provider_id","type":"`string`","description":"The ID of the Payment Provider that is responsible for the Payment Session","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_selected","type":"`null` \\| `boolean`","description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_initiated","type":"`boolean`","description":"A flag to indicate if a communication with the third party provider has been initiated.","optional":false,"defaultValue":"false","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires\\_more` to indicate that further actions are to be completed by the Customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record`","description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotency_key","type":"`string`","description":"Randomly generated key used to continue the completion of a cart in case of failure.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"`number`","description":"The amount that the Payment Session has been authorized for.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_authorized_at","type":"`Date`","description":"The date with timezone at which the Payment Session was authorized.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="PaymentSession"/> diff --git a/www/apps/docs/content/references/entities/classes/entities.PriceList.mdx b/www/apps/docs/content/references/entities/classes/entities.PriceList.mdx index c784c71e46..abd1db7235 100644 --- a/www/apps/docs/content/references/entities/classes/entities.PriceList.mdx +++ b/www/apps/docs/content/references/entities/classes/entities.PriceList.mdx @@ -3,7 +3,7 @@ displayed_sidebar: entitiesSidebar slug: /references/entities/classes/PriceList --- -import ParameterTypes from "@site/src/components/ParameterTypes" +import TypeList from "@site/src/components/TypeList" # PriceList @@ -11,4 +11,4 @@ A Price List represents a set of prices that override the default price for one ## Properties -`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"prices","type":"[MoneyAmount](entities.MoneyAmount.mdx)[]","description":"The prices that belong to the price list, represented as a Money Amount.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The money amount's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The 3 character currency code that the money amount may belong to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"`number`","description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"min_quantity","type":"`null` \\| `number`","description":"The minimum quantity that the Money Amount applies to. If this value is not set, the Money Amount applies to all quantities.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"max_quantity","type":"`null` \\| `number`","description":"The maximum quantity that the Money Amount applies to. If this value is not set, the Money Amount applies to all quantities.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_list_id","type":"`null` \\| `string`","description":"The ID of the price list that the money amount may belong to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_list","type":"`null` \\| [PriceList](entities.PriceList.mdx)","description":"The details of the price list that the money amount may belong to.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"variants","type":"[ProductVariant](entities.ProductVariant.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"variant","type":"[ProductVariant](entities.ProductVariant.mdx)","description":"The details of the product variant that the money amount may belong to.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"variant_id","type":"`string`","description":"The ID of the Product Variant contained in the Line Item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The region's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency","type":"[Currency](entities.Currency.mdx)","description":"The details of the currency that the money amount may belong to.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"region","type":"[Region](entities.Region.mdx)","description":"The details of the region that the money amount may belong to.","optional":true,"defaultValue":"","expandable":true,"children":[]}]},{"name":"includes_tax","type":"`boolean`","description":"Whether the price list prices include tax","optional":false,"defaultValue":"false","expandable":false,"featureFlag":"tax_inclusive_pricing","children":[]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="PriceList"/> +`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"prices","type":"[MoneyAmount](entities.MoneyAmount.mdx)[]","description":"The prices that belong to the price list, represented as a Money Amount.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The money amount's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The 3 character currency code that the money amount may belong to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"`number`","description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"min_quantity","type":"`null` \\| `number`","description":"The minimum quantity that the Money Amount applies to. If this value is not set, the Money Amount applies to all quantities.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"max_quantity","type":"`null` \\| `number`","description":"The maximum quantity that the Money Amount applies to. If this value is not set, the Money Amount applies to all quantities.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_list_id","type":"`null` \\| `string`","description":"The ID of the price list that the money amount may belong to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_list","type":"`null` \\| [PriceList](entities.PriceList.mdx)","description":"The details of the price list that the money amount may belong to.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"variants","type":"[ProductVariant](entities.ProductVariant.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"variant","type":"[ProductVariant](entities.ProductVariant.mdx)","description":"The details of the product variant that the money amount may belong to.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"variant_id","type":"`string`","description":"The ID of the Product Variant contained in the Line Item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The region's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency","type":"[Currency](entities.Currency.mdx)","description":"The details of the currency that the money amount may belong to.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"region","type":"[Region](entities.Region.mdx)","description":"The details of the region that the money amount may belong to.","optional":true,"defaultValue":"","expandable":true,"children":[]}]},{"name":"includes_tax","type":"`boolean`","description":"Whether the price list prices include tax","optional":false,"defaultValue":"false","expandable":false,"featureFlag":"tax_inclusive_pricing","children":[]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="PriceList"/> diff --git a/www/apps/docs/content/references/entities/classes/entities.Product.mdx b/www/apps/docs/content/references/entities/classes/entities.Product.mdx index dff838d31d..ed25750c82 100644 --- a/www/apps/docs/content/references/entities/classes/entities.Product.mdx +++ b/www/apps/docs/content/references/entities/classes/entities.Product.mdx @@ -3,7 +3,7 @@ displayed_sidebar: entitiesSidebar slug: /references/entities/classes/Product --- -import ParameterTypes from "@site/src/components/ParameterTypes" +import TypeList from "@site/src/components/TypeList" # Product @@ -11,4 +11,4 @@ A product is a saleable item that holds general information such as name or desc ## Properties -`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"thumbnail","type":"`null` \\| `string`","description":"A URL to an image file that can be used to identify the Product.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"[ProductOption](entities.ProductOption.mdx)[]","description":"The details of the Product Options that are defined for the Product. The product's variants will have a unique combination of values of the product's options.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The product option's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"The title that the Product Option is defined by (e.g. `Size`).","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"values","type":"[ProductOptionValue](entities.ProductOptionValue.mdx)[]","description":"The details of the values of the product option.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"product_id","type":"`string`","description":"The ID of the product that this product option belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"product","type":"[Product](entities.Product.mdx)","description":"The details of the product that this product option belongs to.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"variants","type":"[ProductVariant](entities.ProductVariant.mdx)[]","description":"The details of the Product Variants that belong to the Product. Each will have a unique combination of values of the product's options.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The product variant's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"A title that can be displayed for easy identification of the Product Variant.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"product_id","type":"`string`","description":"The ID of the product that the product variant belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"product","type":"[Product](entities.Product.mdx)","description":"The details of the product that the product variant belongs to.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"prices","type":"[MoneyAmount](entities.MoneyAmount.mdx)[]","description":"The details of the prices of the Product Variant, each represented as a Money Amount. Each Money Amount represents a price in a given currency or a specific Region.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"sku","type":"`null` \\| `string`","description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unique identifer for the item that is to be shipped, and can be referenced across multiple systems.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"barcode","type":"`null` \\| `string`","description":"A generic field for a GTIN number that can be used to identify the Product Variant.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"ean","type":"`null` \\| `string`","description":"An EAN barcode number that can be used to identify the Product Variant.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"upc","type":"`null` \\| `string`","description":"A UPC barcode number that can be used to identify the Product Variant.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_rank","type":"`null` \\| `number`","description":"The ranking of this variant","optional":false,"defaultValue":"0","expandable":false,"children":[]},{"name":"inventory_quantity","type":"`number`","description":"The current quantity of the item that is stocked.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"allow_backorder","type":"`boolean`","description":"Whether the Product Variant should be purchasable when `inventory\\_quantity` is 0.","optional":false,"defaultValue":"false","expandable":false,"children":[]},{"name":"manage_inventory","type":"`boolean`","description":"Whether Medusa should manage inventory for the Product Variant.","optional":false,"defaultValue":"true","expandable":false,"children":[]},{"name":"hs_code","type":"`null` \\| `string`","description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"origin_country","type":"`null` \\| `string`","description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"mid_code","type":"`null` \\| `string`","description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"material","type":"`null` \\| `string`","description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"weight","type":"`null` \\| `number`","description":"The weight of the Product Variant. May be used in shipping rate calculations.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"length","type":"`null` \\| `number`","description":"The length of the Product Variant. May be used in shipping rate calculations.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"height","type":"`null` \\| `number`","description":"The height of the Product Variant. May be used in shipping rate calculations.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"width","type":"`null` \\| `number`","description":"The width of the Product Variant. May be used in shipping rate calculations.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"[ProductOptionValue](entities.ProductOptionValue.mdx)[]","description":"The details of the product options that this product variant defines values for.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"inventory_items","type":"[ProductVariantInventoryItem](entities.ProductVariantInventoryItem.mdx)[]","description":"The details inventory items of the product variant.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"metadata","type":"`null` \\| `Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"purchasable","type":"`boolean`","description":"Only used with the inventory modules.\nA boolean value indicating whether the Product Variant is purchasable.\nA variant is purchasable if:\n - inventory is not managed\n - it has no inventory items\n - it is in stock\n - it is backorderable.\n","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"categories","type":"[ProductCategory](entities.ProductCategory.mdx)[]","description":"The details of the product categories that this product belongs to.","optional":false,"defaultValue":"","expandable":true,"featureFlag":"product_categories","children":[{"name":"id","type":"`string`","description":"The product category's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productCategoryProductJoinTable","type":"`string`","description":"","optional":false,"defaultValue":"\"product_category_product\"","expandable":false,"children":[]},{"name":"treeRelations","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The product category's name","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The product category's description.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"handle","type":"`string`","description":"A unique string that identifies the Product Category - can for example be used in slug structures.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_active","type":"`Boolean`","description":"A flag to make product category visible/hidden in the store front","optional":false,"defaultValue":"false","expandable":false,"children":[]},{"name":"is_internal","type":"`Boolean`","description":"A flag to make product category an internal category for admins","optional":false,"defaultValue":"false","expandable":false,"children":[]},{"name":"parent_category","type":"`null` \\| [ProductCategory](entities.ProductCategory.mdx)","description":"The details of the parent of this category.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"parent_category_id","type":"`null` \\| `string`","description":"The ID of the parent category.","optional":false,"defaultValue":"null","expandable":false,"children":[]},{"name":"category_children","type":"[ProductCategory](entities.ProductCategory.mdx)[]","description":"The details of the category's children.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"rank","type":"`number`","description":"An integer that depicts the rank of category in a tree node","optional":false,"defaultValue":"0","expandable":false,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"products","type":"[Product](entities.Product.mdx)[]","description":"The details of the products that belong to this category.","optional":false,"defaultValue":"","expandable":true,"children":[]}]},{"name":"profile_id","type":"`string`","description":"The ID of the shipping profile that the product belongs to. The shipping profile has a set of defined shipping options that can be used to fulfill the product.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"profile","type":"[ShippingProfile](entities.ShippingProfile.mdx)","description":"The details of the shipping profile that the product belongs to. The shipping profile has a set of defined shipping options that can be used to fulfill the product.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The shipping profile's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name given to the Shipping profile - this may be displayed to the Customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[ShippingProfileType](../enums/entities.ShippingProfileType.mdx)","description":"The type of the Shipping Profile, may be `default`, `gift\\_card` or `custom`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"products","type":"[Product](entities.Product.mdx)[]","description":"The details of the products that the Shipping Profile defines Shipping Options for. Available if the relation `products` is expanded.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"shipping_options","type":"[ShippingOption](entities.ShippingOption.mdx)[]","description":"The details of the shipping options that can be used to create shipping methods for the Products in the Shipping Profile.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"profiles","type":"[ShippingProfile](entities.ShippingProfile.mdx)[]","description":"Available if the relation `profiles` is expanded.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The shipping profile's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name given to the Shipping profile - this may be displayed to the Customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[ShippingProfileType](../enums/entities.ShippingProfileType.mdx)","description":"The type of the Shipping Profile, may be `default`, `gift\\_card` or `custom`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"products","type":"[Product](entities.Product.mdx)[]","description":"The details of the products that the Shipping Profile defines Shipping Options for. Available if the relation `products` is expanded.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"shipping_options","type":"[ShippingOption](entities.ShippingOption.mdx)[]","description":"The details of the shipping options that can be used to create shipping methods for the Products in the Shipping Profile.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"weight","type":"`null` \\| `number`","description":"The weight of the Product Variant. May be used in shipping rate calculations.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"length","type":"`null` \\| `number`","description":"The length of the Product Variant. May be used in shipping rate calculations.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"height","type":"`null` \\| `number`","description":"The height of the Product Variant. May be used in shipping rate calculations.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"width","type":"`null` \\| `number`","description":"The width of the Product Variant. May be used in shipping rate calculations.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"hs_code","type":"`null` \\| `string`","description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"origin_country","type":"`null` \\| `string`","description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"mid_code","type":"`null` \\| `string`","description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"material","type":"`null` \\| `string`","description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"collection_id","type":"`null` \\| `string`","description":"The ID of the product collection that the product belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"collection","type":"[ProductCollection](entities.ProductCollection.mdx)","description":"The details of the product collection that the product belongs to.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The product collection's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"The title that the Product Collection is identified by.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"handle","type":"`string`","description":"A unique string that identifies the Product Collection - can for example be used in slug structures.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"products","type":"[Product](entities.Product.mdx)[]","description":"The details of the products that belong to this product collection.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"type_id","type":"`null` \\| `string`","description":"The ID of the product type that the product belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[ProductType](entities.ProductType.mdx)","description":"The details of the product type that the product belongs to.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The product type's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string`","description":"The value that the Product Type represents.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"tags","type":"[ProductTag](entities.ProductTag.mdx)[]","description":"The details of the product tags used in this product.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The product tag's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string`","description":"The value that the Product Tag represents","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"discountable","type":"`boolean`","description":"Whether the Product can be discounted. Discounts will not apply to Line Items of this Product when this flag is set to `false`.","optional":false,"defaultValue":"true","expandable":false,"children":[]},{"name":"external_id","type":"`null` \\| `string`","description":"The external ID of the product","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channels","type":"[SalesChannel](entities.SalesChannel.mdx)[]","description":"The details of the sales channels this product is available in.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The sales channel's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_disabled","type":"`boolean`","description":"Specify if the sales channel is enabled or disabled.","optional":false,"defaultValue":"false","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"products","type":"[Product](entities.Product.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"carts","type":"[Cart](entities.Cart.mdx)[]","description":"The associated carts.","optional":false,"defaultValue":"","expandable":true,"featureFlag":"medusa_v2","children":[]},{"name":"orders","type":"[Order](entities.Order.mdx)[]","description":"The associated orders.","optional":false,"defaultValue":"","expandable":true,"featureFlag":"medusa_v2","children":[]},{"name":"publishableKeys","type":"[PublishableApiKey](entities.PublishableApiKey.mdx)[]","description":"The associated publishable API keys.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"locations","type":"[SalesChannelLocation](entities.SalesChannelLocation.mdx)[]","description":"The details of the stock locations related to the sales channel.","optional":false,"defaultValue":"","expandable":true,"children":[]}]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="Product"/> +`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"thumbnail","type":"`null` \\| `string`","description":"A URL to an image file that can be used to identify the Product.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"[ProductOption](entities.ProductOption.mdx)[]","description":"The details of the Product Options that are defined for the Product. The product's variants will have a unique combination of values of the product's options.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The product option's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"The title that the Product Option is defined by (e.g. `Size`).","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"values","type":"[ProductOptionValue](entities.ProductOptionValue.mdx)[]","description":"The details of the values of the product option.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"product_id","type":"`string`","description":"The ID of the product that this product option belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"product","type":"[Product](entities.Product.mdx)","description":"The details of the product that this product option belongs to.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"variants","type":"[ProductVariant](entities.ProductVariant.mdx)[]","description":"The details of the Product Variants that belong to the Product. Each will have a unique combination of values of the product's options.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The product variant's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"A title that can be displayed for easy identification of the Product Variant.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"product_id","type":"`string`","description":"The ID of the product that the product variant belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"product","type":"[Product](entities.Product.mdx)","description":"The details of the product that the product variant belongs to.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"prices","type":"[MoneyAmount](entities.MoneyAmount.mdx)[]","description":"The details of the prices of the Product Variant, each represented as a Money Amount. Each Money Amount represents a price in a given currency or a specific Region.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"sku","type":"`null` \\| `string`","description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unique identifer for the item that is to be shipped, and can be referenced across multiple systems.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"barcode","type":"`null` \\| `string`","description":"A generic field for a GTIN number that can be used to identify the Product Variant.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"ean","type":"`null` \\| `string`","description":"An EAN barcode number that can be used to identify the Product Variant.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"upc","type":"`null` \\| `string`","description":"A UPC barcode number that can be used to identify the Product Variant.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_rank","type":"`null` \\| `number`","description":"The ranking of this variant","optional":false,"defaultValue":"0","expandable":false,"children":[]},{"name":"inventory_quantity","type":"`number`","description":"The current quantity of the item that is stocked.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"allow_backorder","type":"`boolean`","description":"Whether the Product Variant should be purchasable when `inventory\\_quantity` is 0.","optional":false,"defaultValue":"false","expandable":false,"children":[]},{"name":"manage_inventory","type":"`boolean`","description":"Whether Medusa should manage inventory for the Product Variant.","optional":false,"defaultValue":"true","expandable":false,"children":[]},{"name":"hs_code","type":"`null` \\| `string`","description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"origin_country","type":"`null` \\| `string`","description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"mid_code","type":"`null` \\| `string`","description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"material","type":"`null` \\| `string`","description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"weight","type":"`null` \\| `number`","description":"The weight of the Product Variant. May be used in shipping rate calculations.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"length","type":"`null` \\| `number`","description":"The length of the Product Variant. May be used in shipping rate calculations.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"height","type":"`null` \\| `number`","description":"The height of the Product Variant. May be used in shipping rate calculations.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"width","type":"`null` \\| `number`","description":"The width of the Product Variant. May be used in shipping rate calculations.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"[ProductOptionValue](entities.ProductOptionValue.mdx)[]","description":"The details of the product options that this product variant defines values for.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"inventory_items","type":"[ProductVariantInventoryItem](entities.ProductVariantInventoryItem.mdx)[]","description":"The details inventory items of the product variant.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"metadata","type":"`null` \\| `Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"purchasable","type":"`boolean`","description":"Only used with the inventory modules.\nA boolean value indicating whether the Product Variant is purchasable.\nA variant is purchasable if:\n - inventory is not managed\n - it has no inventory items\n - it is in stock\n - it is backorderable.\n","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"categories","type":"[ProductCategory](entities.ProductCategory.mdx)[]","description":"The details of the product categories that this product belongs to.","optional":false,"defaultValue":"","expandable":true,"featureFlag":"product_categories","children":[{"name":"id","type":"`string`","description":"The product category's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productCategoryProductJoinTable","type":"`string`","description":"","optional":false,"defaultValue":"\"product_category_product\"","expandable":false,"children":[]},{"name":"treeRelations","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The product category's name","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The product category's description.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"handle","type":"`string`","description":"A unique string that identifies the Product Category - can for example be used in slug structures.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_active","type":"`Boolean`","description":"A flag to make product category visible/hidden in the store front","optional":false,"defaultValue":"false","expandable":false,"children":[]},{"name":"is_internal","type":"`Boolean`","description":"A flag to make product category an internal category for admins","optional":false,"defaultValue":"false","expandable":false,"children":[]},{"name":"parent_category","type":"`null` \\| [ProductCategory](entities.ProductCategory.mdx)","description":"The details of the parent of this category.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"parent_category_id","type":"`null` \\| `string`","description":"The ID of the parent category.","optional":false,"defaultValue":"null","expandable":false,"children":[]},{"name":"category_children","type":"[ProductCategory](entities.ProductCategory.mdx)[]","description":"The details of the category's children.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"rank","type":"`number`","description":"An integer that depicts the rank of category in a tree node","optional":false,"defaultValue":"0","expandable":false,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"products","type":"[Product](entities.Product.mdx)[]","description":"The details of the products that belong to this category.","optional":false,"defaultValue":"","expandable":true,"children":[]}]},{"name":"profile_id","type":"`string`","description":"The ID of the shipping profile that the product belongs to. The shipping profile has a set of defined shipping options that can be used to fulfill the product.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"profile","type":"[ShippingProfile](entities.ShippingProfile.mdx)","description":"The details of the shipping profile that the product belongs to. The shipping profile has a set of defined shipping options that can be used to fulfill the product.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The shipping profile's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name given to the Shipping profile - this may be displayed to the Customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[ShippingProfileType](../enums/entities.ShippingProfileType.mdx)","description":"The type of the Shipping Profile, may be `default`, `gift\\_card` or `custom`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"products","type":"[Product](entities.Product.mdx)[]","description":"The details of the products that the Shipping Profile defines Shipping Options for. Available if the relation `products` is expanded.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"shipping_options","type":"[ShippingOption](entities.ShippingOption.mdx)[]","description":"The details of the shipping options that can be used to create shipping methods for the Products in the Shipping Profile.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"profiles","type":"[ShippingProfile](entities.ShippingProfile.mdx)[]","description":"Available if the relation `profiles` is expanded.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The shipping profile's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name given to the Shipping profile - this may be displayed to the Customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[ShippingProfileType](../enums/entities.ShippingProfileType.mdx)","description":"The type of the Shipping Profile, may be `default`, `gift\\_card` or `custom`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"products","type":"[Product](entities.Product.mdx)[]","description":"The details of the products that the Shipping Profile defines Shipping Options for. Available if the relation `products` is expanded.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"shipping_options","type":"[ShippingOption](entities.ShippingOption.mdx)[]","description":"The details of the shipping options that can be used to create shipping methods for the Products in the Shipping Profile.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"weight","type":"`null` \\| `number`","description":"The weight of the Product Variant. May be used in shipping rate calculations.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"length","type":"`null` \\| `number`","description":"The length of the Product Variant. May be used in shipping rate calculations.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"height","type":"`null` \\| `number`","description":"The height of the Product Variant. May be used in shipping rate calculations.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"width","type":"`null` \\| `number`","description":"The width of the Product Variant. May be used in shipping rate calculations.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"hs_code","type":"`null` \\| `string`","description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"origin_country","type":"`null` \\| `string`","description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"mid_code","type":"`null` \\| `string`","description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"material","type":"`null` \\| `string`","description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"collection_id","type":"`null` \\| `string`","description":"The ID of the product collection that the product belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"collection","type":"[ProductCollection](entities.ProductCollection.mdx)","description":"The details of the product collection that the product belongs to.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The product collection's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"The title that the Product Collection is identified by.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"handle","type":"`string`","description":"A unique string that identifies the Product Collection - can for example be used in slug structures.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"products","type":"[Product](entities.Product.mdx)[]","description":"The details of the products that belong to this product collection.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"type_id","type":"`null` \\| `string`","description":"The ID of the product type that the product belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[ProductType](entities.ProductType.mdx)","description":"The details of the product type that the product belongs to.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The product type's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string`","description":"The value that the Product Type represents.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"tags","type":"[ProductTag](entities.ProductTag.mdx)[]","description":"The details of the product tags used in this product.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The product tag's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string`","description":"The value that the Product Tag represents","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"discountable","type":"`boolean`","description":"Whether the Product can be discounted. Discounts will not apply to Line Items of this Product when this flag is set to `false`.","optional":false,"defaultValue":"true","expandable":false,"children":[]},{"name":"external_id","type":"`null` \\| `string`","description":"The external ID of the product","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channels","type":"[SalesChannel](entities.SalesChannel.mdx)[]","description":"The details of the sales channels this product is available in.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The sales channel's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_disabled","type":"`boolean`","description":"Specify if the sales channel is enabled or disabled.","optional":false,"defaultValue":"false","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"products","type":"[Product](entities.Product.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"carts","type":"[Cart](entities.Cart.mdx)[]","description":"The associated carts.","optional":false,"defaultValue":"","expandable":true,"featureFlag":"medusa_v2","children":[]},{"name":"orders","type":"[Order](entities.Order.mdx)[]","description":"The associated orders.","optional":false,"defaultValue":"","expandable":true,"featureFlag":"medusa_v2","children":[]},{"name":"publishableKeys","type":"[PublishableApiKey](entities.PublishableApiKey.mdx)[]","description":"The associated publishable API keys.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"locations","type":"[SalesChannelLocation](entities.SalesChannelLocation.mdx)[]","description":"The details of the stock locations related to the sales channel.","optional":false,"defaultValue":"","expandable":true,"children":[]}]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="Product"/> diff --git a/www/apps/docs/content/references/entities/classes/entities.ProductCategory.mdx b/www/apps/docs/content/references/entities/classes/entities.ProductCategory.mdx index 217b47279b..26f392e7f8 100644 --- a/www/apps/docs/content/references/entities/classes/entities.ProductCategory.mdx +++ b/www/apps/docs/content/references/entities/classes/entities.ProductCategory.mdx @@ -3,7 +3,7 @@ displayed_sidebar: entitiesSidebar slug: /references/entities/classes/ProductCategory --- -import ParameterTypes from "@site/src/components/ParameterTypes" +import TypeList from "@site/src/components/TypeList" # ProductCategory @@ -11,4 +11,4 @@ A product category can be used to categorize products into a hierarchy of catego ## Properties -