diff --git a/docs-util/packages/scripts/package.json b/docs-util/packages/scripts/package.json index 840eb89798..5eaf9a3e75 100644 --- a/docs-util/packages/scripts/package.json +++ b/docs-util/packages/scripts/package.json @@ -33,7 +33,7 @@ "typedoc-plugin-missing-exports": "^2.1.0", "typedoc-plugin-reference-excluder": "1.1.3", "typedoc-plugin-rename-defaults": "^0.6.6", - "typescript": "^5.2.2" + "typescript": "5.2" }, "devDependencies": { "@types/randomcolor": "^0.5.8" diff --git a/docs-util/packages/typedoc-config/fulfillment.js b/docs-util/packages/typedoc-config/fulfillment.js new file mode 100644 index 0000000000..d496d3f4b6 --- /dev/null +++ b/docs-util/packages/typedoc-config/fulfillment.js @@ -0,0 +1,64 @@ +/* eslint-disable @typescript-eslint/no-var-requires */ +const path = require("path") +const globalTypedocOptions = require("./_base") + +const pathPrefix = path.join(__dirname, "..", "..", "..") + +module.exports = { + ...globalTypedocOptions, + entryPoints: [ + path.join( + pathPrefix, + "packages/medusa/src/interfaces/fulfillment-service.ts" + ), + ], + out: [path.join(pathPrefix, "www/apps/docs/content/references/fulfillment")], + tsconfig: path.join(__dirname, "extended-tsconfig", "medusa.json"), + name: "Fulfillment Provider Reference", + indexTitle: "Fulfillment Provider Reference", + entryDocument: "_index.mdx", + hideInPageTOC: true, + hideBreadcrumbs: true, + formatting: { + "*": { + showCommentsAsHeader: true, + sections: { + member_sources_definedIn: false, + reflection_hierarchy: false, + member_sources_inheritedFrom: false, + member_sources_implementationOf: false, + reflection_implementedBy: false, + member_signature_sources: false, + reflection_callable: false, + reflection_indexable: false, + reflection_implements: false, + member_signature_title: false, + member_signature_returns: false, + }, + parameterStyle: "component", + parameterComponent: "ParameterTypes", + mdxImports: [ + `import ParameterTypes from "@site/src/components/ParameterTypes"`, + ], + reflectionGroups: { + Properties: false, + }, + frontmatterData: { + displayed_sidebar: "modules", + }, + }, + AbstractFulfillmentService: { + reflectionDescription: `In this document, you’ll learn how to create a fulfillment provider to a Medusa backend and the methods you must implement in it. If you’re unfamiliar with the Shipping architecture in Medusa, make sure to [check out the overview first](https://docs.medusajs.com/modules/carts-and-checkout/shipping).`, + frontmatterData: { + displayed_sidebar: "modules", + slug: "/modules/carts-and-checkout/backend/add-fulfillment-provider", + }, + reflectionTitle: { + fullReplacement: "How to Create a Fulfillment Provider", + }, + }, + }, + objectLiteralTypeDeclarationStyle: "component", + mdxOutput: true, + maxLevel: 2, +} diff --git a/docs-util/packages/typedoc-plugin-custom/package.json b/docs-util/packages/typedoc-plugin-custom/package.json index d584fad384..7720376f47 100644 --- a/docs-util/packages/typedoc-plugin-custom/package.json +++ b/docs-util/packages/typedoc-plugin-custom/package.json @@ -23,7 +23,7 @@ }, "devDependencies": { "@types/node": "^16.11.10", - "typescript": "^4.6" + "typescript": "5.2" }, "keywords": [ "typedocplugin", diff --git a/docs-util/packages/typedoc-plugin-markdown-medusa/package.json b/docs-util/packages/typedoc-plugin-markdown-medusa/package.json index 2477c6a68d..87ec7551d0 100644 --- a/docs-util/packages/typedoc-plugin-markdown-medusa/package.json +++ b/docs-util/packages/typedoc-plugin-markdown-medusa/package.json @@ -23,7 +23,7 @@ "devDependencies": { "@types/node": "^16.11.10", "copyfiles": "^2.4.1", - "typescript": "^4.6" + "typescript": "5.2" }, "keywords": [ "typedocplugin", diff --git a/docs-util/packages/typedoc-plugin-markdown-medusa/src/render-utils.ts b/docs-util/packages/typedoc-plugin-markdown-medusa/src/render-utils.ts index 615f6db13f..31c55c9a69 100644 --- a/docs-util/packages/typedoc-plugin-markdown-medusa/src/render-utils.ts +++ b/docs-util/packages/typedoc-plugin-markdown-medusa/src/render-utils.ts @@ -45,6 +45,10 @@ import commentTagHelper from "./resources/helpers/comment-tag" import exampleHelper from "./resources/helpers/example" import ifFeatureFlagHelper from "./resources/helpers/if-feature-flag" import featureFlagHelper from "./resources/helpers/feature-flag" +import decrementCurrentTitleLevelHelper from "./resources/helpers/decrement-current-title-level" +import incrementCurrentTitleLevelHelper from "./resources/helpers/increment-current-title-level" +import hasMoreThanOneSignatureHelper from "./resources/helpers/has-more-than-one-signature" +import ifCanShowConstructorsTitleHelper from "./resources/helpers/if-can-show-constructors-title" import { MarkdownTheme } from "./theme" // test @@ -120,4 +124,8 @@ export function registerHelpers(theme: MarkdownTheme) { exampleHelper() ifFeatureFlagHelper() featureFlagHelper() + decrementCurrentTitleLevelHelper(theme) + incrementCurrentTitleLevelHelper(theme) + hasMoreThanOneSignatureHelper() + ifCanShowConstructorsTitleHelper() } diff --git a/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/helpers/comment-tag.ts b/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/helpers/comment-tag.ts index 10330212f0..12b643effa 100644 --- a/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/helpers/comment-tag.ts +++ b/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/helpers/comment-tag.ts @@ -6,7 +6,7 @@ import { MarkdownTheme } from "../../theme" export default function (theme: MarkdownTheme) { Handlebars.registerHelper( "commentTag", - function (tag: CommentTag, commentLevel = 4, parent = null) { + function (tag: CommentTag, parent = null) { const { showCommentsAsHeader, showCommentsAsDetails } = theme.getFormattingOptionsForLocation() if (tag.tag === "@schema") { @@ -19,8 +19,7 @@ export default function (theme: MarkdownTheme) { if (showCommentsAsHeader) { return `${Handlebars.helpers.titleLevel.call( - parent, - commentLevel + parent )} ${tagTitle}\n\n${tagContent}` } else if (showCommentsAsDetails) { return `
\n\n${tagTitle}\n\n\n${tagContent}\n\n
` diff --git a/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/helpers/comments.ts b/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/helpers/comments.ts index 9bceb4edfc..c41d41a5c3 100644 --- a/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/helpers/comments.ts +++ b/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/helpers/comments.ts @@ -10,7 +10,6 @@ export default function () { comment: Comment, showSummary = true, showTags = true, - commentLevel = 4, parent = null ) { const md: string[] = [] @@ -24,11 +23,7 @@ export default function () { (tag) => !EXCLUDED_TAGS.includes(tag.tag) ) const tags = filteredTags.map((tag) => { - return Handlebars.helpers.commentTag( - tag, - commentLevel, - parent || comment - ) + return Handlebars.helpers.commentTag(tag, parent || comment) }) md.push(tags.join("\n\n")) } diff --git a/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/helpers/decrement-current-title-level.ts b/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/helpers/decrement-current-title-level.ts new file mode 100644 index 0000000000..b14504682b --- /dev/null +++ b/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/helpers/decrement-current-title-level.ts @@ -0,0 +1,9 @@ +import { MarkdownTheme } from "../../theme" +import * as Handlebars from "handlebars" + +export default function (theme: MarkdownTheme) { + Handlebars.registerHelper("decrementCurrentTitleLevel", function () { + const { currentTitleLevel } = theme + theme.setCurrentTitleLevel(currentTitleLevel - 1) + }) +} diff --git a/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/helpers/example.ts b/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/helpers/example.ts index c62a662a1b..e9c570967a 100644 --- a/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/helpers/example.ts +++ b/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/helpers/example.ts @@ -2,18 +2,15 @@ import * as Handlebars from "handlebars" import { Reflection } from "typedoc" export default function () { - Handlebars.registerHelper( - "example", - function (reflection: Reflection, commentLevel = 4) { - const exampleTag = reflection.comment?.blockTags.find( - (tag) => tag.tag === "@example" - ) + Handlebars.registerHelper("example", function (reflection: Reflection) { + const exampleTag = reflection.comment?.blockTags.find( + (tag) => tag.tag === "@example" + ) - if (!exampleTag) { - return "" - } - - return Handlebars.helpers.commentTag(exampleTag, commentLevel, reflection) + if (!exampleTag) { + return "" } - ) + + return Handlebars.helpers.commentTag(exampleTag, reflection) + }) } diff --git a/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/helpers/has-more-than-one-signature.ts b/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/helpers/has-more-than-one-signature.ts new file mode 100644 index 0000000000..0a1a9fd621 --- /dev/null +++ b/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/helpers/has-more-than-one-signature.ts @@ -0,0 +1,11 @@ +import { DeclarationReflection } from "typedoc" +import * as Handlebars from "handlebars" + +export default function () { + Handlebars.registerHelper( + "hasMoreThanOneSignature", + function (model: DeclarationReflection) { + return (model.signatures?.length || 0) > 1 + } + ) +} diff --git a/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/helpers/if-can-show-constructors-title.ts b/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/helpers/if-can-show-constructors-title.ts new file mode 100644 index 0000000000..4095eb8e52 --- /dev/null +++ b/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/helpers/if-can-show-constructors-title.ts @@ -0,0 +1,14 @@ +import * as Handlebars from "handlebars" +import { ReflectionGroup } from "typedoc" + +export default function () { + Handlebars.registerHelper( + "ifCanShowConstructorTitle", + function (this: ReflectionGroup, options: Handlebars.HelperOptions) { + return this.title.toLowerCase() !== "constructors" || + this.children.length > 1 + ? options.fn(this) + : options.inverse(this) + } + ) +} diff --git a/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/helpers/increment-current-title-level.ts b/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/helpers/increment-current-title-level.ts new file mode 100644 index 0000000000..02f8c2a511 --- /dev/null +++ b/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/helpers/increment-current-title-level.ts @@ -0,0 +1,9 @@ +import { MarkdownTheme } from "../../theme" +import * as Handlebars from "handlebars" + +export default function (theme: MarkdownTheme) { + Handlebars.registerHelper("incrementCurrentTitleLevel", function () { + const { currentTitleLevel } = theme + theme.setCurrentTitleLevel(currentTitleLevel + 1) + }) +} diff --git a/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/helpers/reflection-title.ts b/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/helpers/reflection-title.ts index 2fa95ec9b1..65ef9a2abc 100644 --- a/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/helpers/reflection-title.ts +++ b/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/helpers/reflection-title.ts @@ -10,6 +10,10 @@ export default function (theme: MarkdownTheme) { function (this: PageEvent, shouldEscape = true) { const { reflectionTitle } = theme.getFormattingOptionsForLocation() + if (reflectionTitle?.fullReplacement?.length) { + return reflectionTitle.fullReplacement + } + const title: string[] = [""] if ( reflectionTitle?.kind && diff --git a/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/helpers/signature-title.ts b/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/helpers/signature-title.ts index 0bfebe6f1e..c4c11008a2 100644 --- a/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/helpers/signature-title.ts +++ b/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/helpers/signature-title.ts @@ -13,11 +13,15 @@ export default function (theme: MarkdownTheme) { function (this: SignatureReflection, accessor?: string, standalone = true) { const { sections, expandMembers = false } = theme.getFormattingOptionsForLocation() - if (sections && sections.member_signature_title === false) { + const parentHasMoreThanOneSignature = + Handlebars.helpers.hasMoreThanOneSignature(this.parent) + if ( + sections && + sections.member_signature_title === false && + !parentHasMoreThanOneSignature + ) { // only show title if there are more than one signatures - if (!this.parent.signatures || this.parent.signatures.length <= 1) { - return "" - } + return "" } const md: string[] = [] @@ -36,12 +40,12 @@ export default function (theme: MarkdownTheme) { if (accessor) { md.push( `${accessor}${ - expandMembers ? `${Handlebars.helpers.titleLevel(4)} ` : "**" + expandMembers ? `${Handlebars.helpers.titleLevel()} ` : "**" }${this.name}${!expandMembers ? "**" : ""}` ) } else if (this.name !== "__call" && this.name !== "__type") { md.push( - `${expandMembers ? `${Handlebars.helpers.titleLevel(4)} ` : "**"}${ + `${expandMembers ? `${Handlebars.helpers.titleLevel()} ` : "**"}${ this.name }${!expandMembers ? "**" : ""}` ) diff --git a/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/helpers/title-level.ts b/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/helpers/title-level.ts index 5e2360c271..3aed90593f 100644 --- a/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/helpers/title-level.ts +++ b/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/helpers/title-level.ts @@ -1,44 +1,18 @@ import { MarkdownTheme } from "../../theme" import * as Handlebars from "handlebars" -import { SignatureReflection, Reflection } from "typedoc" +import { Reflection } from "typedoc" export default function (theme: MarkdownTheme) { - Handlebars.registerHelper( - "titleLevel", - function (this: Reflection, originalLevel = 3): string { - const { expandMembers, sections } = - theme.getFormattingOptionsForLocation() + Handlebars.registerHelper("titleLevel", function (this: Reflection): string { + const { currentTitleLevel } = theme - if (!expandMembers) { - return Array(originalLevel).fill("#").join("") - } + // let titleLevel = currentTitleLevel - const { allReflectionsHaveOwnDocument } = theme + // if (isChild) { + // titleLevel++ + // theme.setCurrentTitleLevel(titleLevel + 1) + // } - let isSignatureChild = false - if ( - sections && - sections.member_signature_title === false && - (this instanceof SignatureReflection || this.variant === "signature") - ) { - // only show title if there are more than one signatures - isSignatureChild = - this.parent !== undefined && - "signatures" in this.parent && - (this.parent.signatures as SignatureReflection[]).length > 1 - } - - const numberToSubtract = allReflectionsHaveOwnDocument - ? isSignatureChild - ? 1 - : 2 - : isSignatureChild - ? 0 - : 1 - - const level = originalLevel - numberToSubtract - - return Array(level).fill("#").join("") - } - ) + return Array(currentTitleLevel).fill("#").join("") + }) } diff --git a/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/partials/comment.hbs b/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/partials/comment.hbs index 1d950b6ffd..2889e8ed55 100755 --- a/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/partials/comment.hbs +++ b/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/partials/comment.hbs @@ -4,7 +4,7 @@ {{#if hasVisibleComponent}} -{{{comments this true true 4 model}}} +{{{comments this true true model}}} {{/if}} diff --git a/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/partials/member.declaration.hbs b/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/partials/member.declaration.hbs index 2a339b5737..f9cbb59a86 100755 --- a/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/partials/member.declaration.hbs +++ b/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/partials/member.declaration.hbs @@ -12,7 +12,7 @@ {{#if (sectionEnabled "member_declaration_example")}} -{{{example this 4}}} +{{{example this}}} {{/if}} @@ -20,7 +20,7 @@ {{#if typeParameters}} -{{{titleLevel 4}}} Type Parameters +{{{titleLevel}}} Type Parameters {{#with typeParameters}} @@ -40,7 +40,7 @@ {{#with type.declaration.indexSignature}} -{{titleLevel 4}} Index signature +{{titleLevel}} Index signature {{{indexSignatureTitle}}} @@ -58,17 +58,21 @@ {{#if type.declaration.children}} -{{{titleLevel 4}}} Call signature +{{{titleLevel}}} Call signature {{else}} -{{{titleLevel 4}}} Type declaration +{{{titleLevel}}} Type declaration {{/if}} {{#each type.declaration.signatures}} -{{> member.signature showSources=false commentLevel=5 }} +{{incrementCurrentTitleLevel}} + +{{> member.signature showSources=false }} + +{{decrementCurrentTitleLevel}} {{/each}} @@ -82,7 +86,7 @@ {{#with type.declaration}} -{{{titleLevel 4}}} Type declaration +{{{titleLevel}}} Type declaration {{/with}} diff --git a/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/partials/member.getterSetter.hbs b/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/partials/member.getterSetter.hbs index 746961b44c..0657dc1fbd 100755 --- a/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/partials/member.getterSetter.hbs +++ b/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/partials/member.getterSetter.hbs @@ -4,7 +4,7 @@ {{#with getSignature}} -{{> member.signature accessor="get" showSources=true commentLevel=4 }} +{{> member.signature accessor="get" showSources=true }} {{/with}} @@ -18,7 +18,7 @@ {{#with setSignature}} -{{> member.signature accessor="set" showSources=true commentLevel=4 }} +{{> member.signature accessor="set" showSources=true }} {{/with}} diff --git a/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/partials/member.hbs b/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/partials/member.hbs index 91c0a4f0dd..30ac37c284 100644 --- a/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/partials/member.hbs +++ b/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/partials/member.hbs @@ -2,7 +2,9 @@ {{#if name}} -{{titleLevel 4}} {{#ifNamedAnchors}} {{/ifNamedAnchors}}{{ escape name }} +{{titleLevel}} {{#ifNamedAnchors}} {{/ifNamedAnchors}}{{ escape name }} + +{{incrementCurrentTitleLevel}} {{/if}} @@ -14,7 +16,7 @@ {{#each signatures}} -{{> member.signature showSources=true commentLevel=../commentLevel }} +{{> member.signature showSources=true }} {{/each}} @@ -59,3 +61,13 @@ ___ {{/unless}} {{/unless}} + +{{#unless hasOwnDocument}} + +{{#if name}} + +{{decrementCurrentTitleLevel}} + +{{/if}} + +{{/unless}} \ No newline at end of file diff --git a/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/partials/member.signature.hbs b/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/partials/member.signature.hbs index 7a50c41def..15c12ac98d 100644 --- a/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/partials/member.signature.hbs +++ b/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/partials/member.signature.hbs @@ -1,5 +1,15 @@ {{{signatureTitle accessor}}} +{{#if (getFormattingOption "expandMembers")}} + +{{#if (hasMoreThanOneSignature parent)}} + +{{incrementCurrentTitleLevel}} + +{{/if}} + +{{/if}} + {{#if (sectionEnabled "member_signature_comment")}} {{#with comment}} @@ -16,7 +26,7 @@ {{#if (sectionEnabled "member_signature_example")}} -{{{example this commentLevel}}} +{{{example this}}} {{/if}} @@ -24,7 +34,7 @@ {{#if typeParameters}} -{{{titleLevel commentLevel}}} Type Parameters +{{{titleLevel}}} Type Parameters {{#with typeParameters}} @@ -40,7 +50,7 @@ {{#if parameters}} -{{{titleLevel commentLevel}}} Parameters +{{{titleLevel}}} Parameters {{#with parameters}} @@ -56,7 +66,7 @@ {{#if type}} -{{{titleLevel commentLevel}}} Returns +{{{titleLevel}}} Returns {{#if (sectionEnabled "member_signature_returns")}} @@ -76,12 +86,16 @@ {{#if declaration.signatures}} +{{incrementCurrentTitleLevel}} + {{#each declaration.signatures}} -{{> member.signature showSources=false commentLevel=commentLevel }} +{{> member.signature showSources=false }} {{/each}} +{{decrementCurrentTitleLevel}} + {{/if}} {{/if}} @@ -112,7 +126,7 @@ {{#if hasVisibleComponent}} -{{{comments this false true commentLevel ..}}} +{{{comments this false true ..}}} {{/if}} @@ -124,8 +138,22 @@ {{#if showSources}} +{{incrementCurrentTitleLevel}} + {{> member.sources}} +{{decrementCurrentTitleLevel}} + +{{/if}} + +{{/if}} + +{{#if (getFormattingOption "expandMembers")}} + +{{#if (hasMoreThanOneSignature parent)}} + +{{decrementCurrentTitleLevel}} + {{/if}} {{/if}} \ No newline at end of file diff --git a/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/partials/member.sources.hbs b/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/partials/member.sources.hbs index 3b4887b4b2..74f7b38d46 100755 --- a/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/partials/member.sources.hbs +++ b/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/partials/member.sources.hbs @@ -2,7 +2,7 @@ {{#if implementationOf}} -{{titleLevel 4}} Implementation of +{{titleLevel}} Implementation of {{#with implementationOf}} @@ -18,7 +18,7 @@ {{#if inheritedFrom}} -{{titleLevel 4}} Inherited from +{{titleLevel}} Inherited from {{#with inheritedFrom}} @@ -34,7 +34,7 @@ {{#if overwrites}} -{{titleLevel 4}} Overrides +{{titleLevel}} Overrides {{#with overwrites}} @@ -50,7 +50,7 @@ {{#if sources}} -{{titleLevel 4}} Defined in +{{titleLevel}} Defined in {{#each sources}} diff --git a/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/partials/members.group.hbs b/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/partials/members.group.hbs index b32fb78432..9363f01221 100755 --- a/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/partials/members.group.hbs +++ b/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/partials/members.group.hbs @@ -10,7 +10,13 @@ ___ {{#unless (getFormattingOption "expandMembers")}} -## {{title}} {{../title}} +{{#ifCanShowConstructorTitle}} + +{{titleLevel}} {{title}} {{../title}} + +{{incrementCurrentTitleLevel}} + +{{/ifCanShowConstructorTitle}} {{/unless}} @@ -26,19 +32,35 @@ ___ {{#each children}} -{{> member commentLevel=5}} +{{> member }} {{/each}} {{/if}} +{{#unless (getFormattingOption "expandMembers")}} + +{{#ifCanShowConstructorTitle}} + +{{decrementCurrentTitleLevel}} + +{{/ifCanShowConstructorTitle}} + +{{/unless}} + {{/each}} {{else}} {{#unless (getFormattingOption "expandMembers")}} -## {{title}} +{{#ifCanShowConstructorTitle}} + +{{titleLevel}} {{title}} + +{{incrementCurrentTitleLevel}} + +{{/ifCanShowConstructorTitle}} {{/unless}} @@ -54,12 +76,22 @@ ___ {{#each children}} -{{> member commentLevel=5}} +{{> member}} {{/each}} {{/if}} +{{#unless (getFormattingOption "expandMembers")}} + +{{#ifCanShowConstructorTitle}} + +{{decrementCurrentTitleLevel}} + +{{/ifCanShowConstructorTitle}} + +{{/unless}} + {{/if}} {{/if}} \ No newline at end of file diff --git a/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/partials/members.hbs b/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/partials/members.hbs index c00601347a..19279a9042 100644 --- a/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/partials/members.hbs +++ b/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/partials/members.hbs @@ -8,7 +8,9 @@ {{#unless (getFormattingOption "expandMembers")}} -## {{title}} +{{{titleLevel}}} {{title}} + +{{incrementCurrentTitleLevel}} {{/unless}} @@ -16,12 +18,18 @@ {{#unless hasOwnDocument}} -{{> member commentLevel=4}} +{{> member}} {{/unless}} {{/each}} +{{#unless (getFormattingOption "expandMembers")}} + +{{decrementCurrentTitleLevel}} + +{{/unless}} + {{/unless}} {{/each}} @@ -32,6 +40,10 @@ {{#unless allChildrenHaveOwnDocument}} +{{#unless @first}} +___ +{{/unless}} + {{> members.group}} {{/unless}} diff --git a/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/partials/section-title.hbs b/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/partials/section-title.hbs index e863067f41..ac1332513c 100644 --- a/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/partials/section-title.hbs +++ b/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/partials/section-title.hbs @@ -1,9 +1,13 @@ {{#if showSources}} -{{{titleLevel 4}}} {{{title}}} +{{incrementCurrentTitleLevel}} -{{else}} +{{/if}} -{{{titleLevel 5}}} {{{title}}} +{{{titleLevel}}} {{{title}}} + +{{#if showSources}} + +{{decrementCurrentTitleLevel}} {{/if}} \ No newline at end of file diff --git a/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/partials/title.hbs b/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/partials/title.hbs index 75f8b214de..4d1bc47c1d 100644 --- a/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/partials/title.hbs +++ b/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/partials/title.hbs @@ -1,6 +1,6 @@ {{#ifShowPageTitle}} -# {{{reflectionTitle true}}} +{{titleLevel}} {{{reflectionTitle true}}} {{/ifShowPageTitle}} diff --git a/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/templates/index.hbs b/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/templates/index.hbs index 19a40da27f..c392fefe55 100644 --- a/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/templates/index.hbs +++ b/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/templates/index.hbs @@ -1,5 +1,7 @@ {{> header}} +{{incrementCurrentTitleLevel}} + {{#with model.readme}} {{{comment this}}} diff --git a/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/templates/reflection.hbs b/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/templates/reflection.hbs index 6c63ea1f9c..7f1e57e8b3 100755 --- a/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/templates/reflection.hbs +++ b/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/templates/reflection.hbs @@ -2,6 +2,8 @@ {{> title}} +{{incrementCurrentTitleLevel}} + {{#with model}} {{#if (sectionEnabled "reflection_comment")}} @@ -18,7 +20,7 @@ {{#if (sectionEnabled "reflection_example")}} -{{{example model 2}}} +{{{example model}}} {{/if}} @@ -26,7 +28,7 @@ {{#if model.typeParameters}} -## Type parameters +{{{titleLevel}}} Type parameters {{#with model.typeParameters}} @@ -42,7 +44,7 @@ {{#ifShowTypeHierarchy}} -## Hierarchy +{{{titleLevel}}} Hierarchy {{#with model.typeHierarchy}} @@ -58,7 +60,7 @@ {{#if model.implementedTypes}} -## Implements +{{{titleLevel}}} Implements {{#each model.implementedTypes}} - {{{type}}} @@ -72,7 +74,7 @@ {{#if model.implementedBy}} -## Implemented by +{{{titleLevel}}} Implemented by {{#each model.implementedBy}} - {{{type}}} @@ -86,18 +88,26 @@ {{#if model.signatures}} -## Callable +{{{titleLevel}}} Callable {{#with model}} +{{incrementCurrentTitleLevel}} + {{#each signatures}} -### {{name}} +{{{titleLevel}}} {{name}} -{{> member.signature showSources=true commentLevel=4 }} +{{incrementCurrentTitleLevel}} + +{{> member.signature showSources=true }} + +{{decrementCurrentTitleLevel}} {{/each}} +{{decrementCurrentTitleLevel}} + {{/with}} {{/if}} @@ -108,16 +118,20 @@ {{#if model.indexSignature}} -## Indexable +{{{titleLevel}}} Indexable {{#with model}} {{#with indexSignature}} +{{incrementCurrentTitleLevel}} + {{{indexSignatureTitle}}} {{> comment}} +{{decrementCurrentTitleLevel}} + {{/with}} {{/with}} diff --git a/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/templates/reflection.member.hbs b/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/templates/reflection.member.hbs index 8b2a6554b2..8cfcc17b9d 100644 --- a/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/templates/reflection.member.hbs +++ b/docs-util/packages/typedoc-plugin-markdown-medusa/src/resources/templates/reflection.member.hbs @@ -4,6 +4,10 @@ {{#with model}} -{{> member showSources=false commentLevel=4}} +{{incrementCurrentTitleLevel}} + +{{> member showSources=false}} + +{{decrementCurrentTitleLevel}} {{/with}} diff --git a/docs-util/packages/typedoc-plugin-markdown-medusa/src/theme.ts b/docs-util/packages/typedoc-plugin-markdown-medusa/src/theme.ts index 1b739b1efb..49df6b4c3c 100644 --- a/docs-util/packages/typedoc-plugin-markdown-medusa/src/theme.ts +++ b/docs-util/packages/typedoc-plugin-markdown-medusa/src/theme.ts @@ -54,6 +54,7 @@ export class MarkdownTheme extends Theme { reflection?: DeclarationReflection location!: string anchorMap: Record = {} + currentTitleLevel = 1 static URL_PREFIX = /^(http|ftp)s?:\/\// @@ -355,6 +356,8 @@ export class MarkdownTheme extends Theme { * @param page An event object describing the current render operation. */ protected onBeginPage(page: PageEvent) { + // reset header level counter + this.currentTitleLevel = 1 this.location = page.url this.reflection = page.model instanceof DeclarationReflection ? page.model : undefined @@ -403,6 +406,10 @@ export class MarkdownTheme extends Theme { return `modules.${this.mdxOutput ? "mdx" : "md"}` } + setCurrentTitleLevel(value: number) { + this.currentTitleLevel = value + } + getFormattingOptionsForLocation(): FormattingOptionType { if (!this.location) { return {} diff --git a/docs-util/packages/typedoc-plugin-markdown-medusa/src/types.ts b/docs-util/packages/typedoc-plugin-markdown-medusa/src/types.ts index 8187cf1d80..3b910dd9b2 100644 --- a/docs-util/packages/typedoc-plugin-markdown-medusa/src/types.ts +++ b/docs-util/packages/typedoc-plugin-markdown-medusa/src/types.ts @@ -67,6 +67,7 @@ export type FormattingOptionType = { kind: boolean typeParameters: boolean suffix?: string + fullReplacement?: string } reflectionDescription?: string expandMembers?: boolean diff --git a/docs-util/packages/typedoc-plugin-markdown-medusa/src/utils/reflection-formatter.ts b/docs-util/packages/typedoc-plugin-markdown-medusa/src/utils/reflection-formatter.ts index fc7909b1dd..32681e883c 100644 --- a/docs-util/packages/typedoc-plugin-markdown-medusa/src/utils/reflection-formatter.ts +++ b/docs-util/packages/typedoc-plugin-markdown-medusa/src/utils/reflection-formatter.ts @@ -109,7 +109,7 @@ export function reflectionComponentFormatter( ? getType(reflection.type, "object") : getReflectionType(reflection, "object", true), description: comments - ? stripLineBreaks(Handlebars.helpers.comments(comments, true, false)) + ? Handlebars.helpers.comments(comments, true, false) : "", optional, defaultValue, @@ -230,8 +230,8 @@ export function getDefaultValue( parameter.defaultValue !== "..." ? `${parameter.defaultValue}` : defaultComment - ? defaultComment.content.map((content) => stripCode(content.text)).join() - : null + ? defaultComment.content.map((content) => stripCode(content.text)).join() + : null } export function hasDefaultValues(parameters: ReflectionParameterType[]) { diff --git a/docs-util/packages/utils/package.json b/docs-util/packages/utils/package.json index 087a41d26a..c41eddcad4 100644 --- a/docs-util/packages/utils/package.json +++ b/docs-util/packages/utils/package.json @@ -18,7 +18,7 @@ }, "devDependencies": { "@types/node": "^16.11.10", - "typescript": "^4.6" + "typescript": "5.2" }, "dependencies": { "rimraf": "^5.0.5" diff --git a/docs-util/packages/workflows-diagrams-generator/package.json b/docs-util/packages/workflows-diagrams-generator/package.json index 666fe73a83..b3e65bc7c7 100644 --- a/docs-util/packages/workflows-diagrams-generator/package.json +++ b/docs-util/packages/workflows-diagrams-generator/package.json @@ -21,7 +21,7 @@ "@mermaid-js/mermaid-cli": "^10.6.1", "commander": "^11.1.0", "ts-node": "^10.9.1", - "typescript": "^5.1.6" + "typescript": "5.2" }, "devDependencies": { "@types/node": "^20.9.4" diff --git a/docs-util/packages/workflows-diagrams-generator/src/commands/generate.ts b/docs-util/packages/workflows-diagrams-generator/src/commands/generate.ts index c0d3244047..7bcdf91e5f 100644 --- a/docs-util/packages/workflows-diagrams-generator/src/commands/generate.ts +++ b/docs-util/packages/workflows-diagrams-generator/src/commands/generate.ts @@ -4,6 +4,7 @@ import * as path from "path" import { existsSync, mkdirSync, rmSync, writeFileSync } from "fs" import registerWorkflows from "../utils/register-workflows.js" import DiagramBuilder from "../classes/diagram-builder.js" +// @ts-expect-error mermaid typing issue import { run as runMermaid } from "@mermaid-js/mermaid-cli" type Options = { diff --git a/docs-util/yarn.lock b/docs-util/yarn.lock index 879a6bd7bd..ce60e8427b 100644 --- a/docs-util/yarn.lock +++ b/docs-util/yarn.lock @@ -3730,7 +3730,7 @@ __metadata: typedoc-plugin-missing-exports: ^2.1.0 typedoc-plugin-reference-excluder: 1.1.3 typedoc-plugin-rename-defaults: ^0.6.6 - typescript: ^5.2.2 + typescript: 5.2 languageName: unknown linkType: soft @@ -4232,7 +4232,7 @@ __metadata: eslint: ^8.53.0 glob: ^10.3.10 typedoc-plugin-markdown: ^3.16.0 - typescript: ^4.6 + typescript: 5.2 utils: "*" yaml: ^2.3.3 peerDependencies: @@ -4256,7 +4256,7 @@ __metadata: "@types/node": ^16.11.10 copyfiles: ^2.4.1 handlebars: ^4.7.8 - typescript: ^4.6 + typescript: 5.2 utils: "*" peerDependencies: typedoc: 0.25.x @@ -4337,43 +4337,23 @@ __metadata: languageName: node linkType: hard -"typescript@npm:^4.6": - version: 4.9.5 - resolution: "typescript@npm:4.9.5" +"typescript@npm:5.2": + version: 5.2.2 + resolution: "typescript@npm:5.2.2" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 5f6cad2e728a8a063521328e612d7876e12f0d8a8390d3b3aaa452a6a65e24e9ac8ea22beb72a924fd96ea0a49ea63bb4e251fb922b12eedfb7f7a26475e5c56 + checksum: 91ae3e6193d0ddb8656d4c418a033f0f75dec5e077ebbc2bd6d76439b93f35683936ee1bdc0e9cf94ec76863aa49f27159b5788219b50e1cd0cd6d110aa34b07 languageName: node linkType: hard -"typescript@npm:^5.1.6, typescript@npm:^5.2.2": - version: 5.3.2 - resolution: "typescript@npm:5.3.2" +"typescript@patch:typescript@5.2#~builtin": + version: 5.2.2 + resolution: "typescript@patch:typescript@npm%3A5.2.2#~builtin::version=5.2.2&hash=7ad353" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: d7dbe1fbe19039e36a65468ea64b5d338c976550394ba576b7af9c68ed40c0bc5d12ecce390e4b94b287a09a71bd3229f19c2d5680611f35b7c53a3898791159 - languageName: node - linkType: hard - -"typescript@patch:typescript@^4.6#~builtin": - version: 4.9.5 - resolution: "typescript@patch:typescript@npm%3A4.9.5#~builtin::version=4.9.5&hash=7ad353" - bin: - tsc: bin/tsc - tsserver: bin/tsserver - checksum: 897c8ac656e01b132fa82be6a8e34c4507b19be63dbf1ff1d8287d775519081a7c91dd0ca3ec62536c8137228141d65b238dfb2e8987a3f5182818f58f83e7d7 - languageName: node - linkType: hard - -"typescript@patch:typescript@^5.1.6#~builtin, typescript@patch:typescript@^5.2.2#~builtin": - version: 5.3.2 - resolution: "typescript@patch:typescript@npm%3A5.3.2#~builtin::version=5.3.2&hash=7ad353" - bin: - tsc: bin/tsc - tsserver: bin/tsserver - checksum: c81b9bd20c6dbe90fa43e876c586021447f2b47baede9fa542b1f56715835c043e23b2eaf19c42c067cc6f5ae512bd9a9be28a67b3a1d9807f8c9cfb1269875e + checksum: 303979762f9b8932c53f8149e866521a1265168b5c0fde8cc8ad83ac3d0e8ede8096cb02dff5f2de048e7f118a6f61902f81da12d5972c7fb582f09f2f18d169 languageName: node linkType: hard @@ -4499,7 +4479,7 @@ __metadata: dependencies: "@types/node": ^16.11.10 rimraf: ^5.0.5 - typescript: ^4.6 + typescript: 5.2 peerDependencies: typedoc: 0.25.x languageName: unknown @@ -4586,7 +4566,7 @@ __metadata: "@types/node": ^20.9.4 commander: ^11.1.0 ts-node: ^10.9.1 - typescript: ^5.1.6 + typescript: 5.2 bin: workflow-diagrams-generator: dist/index.js languageName: unknown diff --git a/packages/medusa/src/interfaces/fulfillment-service.ts b/packages/medusa/src/interfaces/fulfillment-service.ts index cb869f30dc..910f9565ec 100644 --- a/packages/medusa/src/interfaces/fulfillment-service.ts +++ b/packages/medusa/src/interfaces/fulfillment-service.ts @@ -7,33 +7,107 @@ type ShippingOptionData = Record type ShippingMethodData = Record /** - * Fulfillment Provider interface - * Fullfillment provider plugin services should extend the AbstractFulfillmentService from this file + * ## Overview + * + * A fulfillment provider is the shipping provider used to fulfill orders and deliver them to customers. An example of a fulfillment provider is FedEx. + * + * By default, a Medusa Backend has a `manual` fulfillment provider which has minimal implementation. It allows you to accept orders and fulfill them manually. However, you can integrate any fulfillment provider into Medusa, and your fulfillment provider can interact with third-party shipping providers. + * + * A fulfillment provider is a service that extends the `AbstractFulfillmentService` and implements its methods. So, adding a fulfillment provider is as simple as creating a service file in `src/services`. + * The file's name is the fulfillment provider's class name as a slug and without the word `Service`. For example, if you're creating a `MyFulfillmentService` class, the file name is `src/services/my-fulfillment.ts`. + * + * ```ts title=src/services/my-fulfillment.ts + * import { AbstractFulfillmentService } from "@medusajs/medusa" + * + * class MyFulfillmentService extends AbstractFulfillmentService { + * // methods here... + * } + * ``` + * + * --- + * + * ## Identifier Property + * + * The `FulfillmentProvider` entity has 2 properties: `identifier` and `is_installed`. The `identifier` property in the class is used when the fulfillment provider is created in the database. + * + * The value of this property is also used to reference the fulfillment provider throughout Medusa. For example, it is used to [add a fulfillment provider](https://docs.medusajs.com/api/admin#regions_postregionsregionfulfillmentproviders) to a region. + * + * ```ts + * class MyFulfillmentService extends AbstractFulfillmentService { + * static identifier = "my-fulfillment" + * + * // ... + * } + * ``` + * + * --- */ export interface FulfillmentService { /** + * @ignore + * * Return a unique identifier to retrieve the fulfillment plugin provider */ getIdentifier(): string /** - * Called before a shipping option is created in Admin. The method should - * return all of the options that the fulfillment provider can be used with, - * and it is here the distinction between different shipping options are - * enforced. For example, a fulfillment provider may offer Standard Shipping - * and Express Shipping as fulfillment options, it is up to the store operator - * to create shipping options in Medusa that are offered to the customer. + * This method is used when retrieving the list of fulfillment options available in a region, particularly by the [List Fulfillment Options API Route](https://docs.medusajs.com/api/admin#regions_getregionsregionfulfillmentoptions). + * For example, if you’re integrating UPS as a fulfillment provider, you might support two fulfillment options: UPS Express Shipping and UPS Access Point. Each of these options can have different data associated with them. + * + * @returns {Promise} The list of fulfillment options. These options don't have any required format. Later on, these options can be used when creating a shipping option, + * such as when using the [Create Shipping Option API Route](https://docs.medusajs.com/api/admin#shipping-options_postshippingoptions). The chosen fulfillment option, which is one of the + * items in the array returned by this method, will be set in the `data` object of the shipping option. + * + * @example + * class MyFulfillmentService extends AbstractFulfillmentService { + * // ... + * async getFulfillmentOptions(): Promise { + * return [ + * { + * id: "my-fulfillment", + * }, + * { + * id: "my-fulfillment-dynamic", + * }, + * ] + * } + * } */ getFulfillmentOptions(): Promise /** - * Called before a shipping method is set on a cart to ensure that the data - * sent with the shipping method is valid. The data object may contain extra - * data about the shipment such as an id of a drop point. It is up to the - * fulfillment provider to enforce that the correct data is being sent - * through. - * @return the data to populate `cart.shipping_methods.$.data` this - * is usually important for future actions like generating shipping labels + * This method is called when a shipping method is created. This typically happens when the customer chooses a shipping option during checkout, when a shipping method is created + * for an order return, or in other similar cases. The shipping option and its data are validated before the shipping method is created. + * + * You can use the provided parameters to validate the chosen shipping option. For example, you can check if the `data` object passed as a second parameter includes all data needed to + * fulfill the shipment later on. + * + * If any of the data is invalid, you can throw an error. This error will stop Medusa from creating a shipping method and the error message will be returned as a result of the API Route. + * + * @param {ShippingOptionData} optionData - The data object of the shipping option selected when creating the shipping method. + * @param {FulfillmentProviderData} data - The `data` object passed in the body of the request. + * @param {Cart} cart - The customer's cart details. It may be empty if the shipping method isn't associated with a cart, such as when it's associated with a claim. + * @returns {Promise>} The data that will be stored in the `data` property of the shipping method to be created. + * Make sure the value you return contains everything you need to fulfill the shipment later on. The returned value may also be used to calculate the price of the shipping method + * if it doesn't have a set price. It will be passed along to the {@link calculatePrice} method. + * + * @example + * class MyFulfillmentService extends AbstractFulfillmentService { + * // ... + * async validateFulfillmentData( + * optionData: Record, + * data: Record, + * cart: Cart + * ): Promise> { + * if (data.id !== "my-fulfillment") { + * throw new Error("invalid data") + * } + * + * return { + * ...data, + * } + * } + * } */ validateFulfillmentData( optionData: ShippingOptionData, @@ -42,18 +116,95 @@ export interface FulfillmentService { ): Promise> /** - * Called before a shipping option is created in Admin. Use this to ensure - * that a fulfillment option does in fact exist. + * Once the admin creates the shipping option, the data of the shipping option will be validated first using this method. This method is called when the [Create Shipping Option API Route](https://docs.medusajs.com/api/admin#shipping-options_postshippingoptions) is used. + * + * @param {ShippingOptionData} data - the data object that is sent in the body of the request, basically, the data object of the shipping option. You can use this data to validate the shipping option before it is saved. + * @returns {Promise} Whether the fulfillment option is valid. If the returned value is false, an error is thrown and the shipping option will not be saved. + * + * @example + * For example, you can use this method to ensure that the `id` in the `data` object is correct: + * + * ```ts + * class MyFulfillmentService extends AbstractFulfillmentService { + * // ... + * async validateOption( + * data: Record + * ): Promise { + * return data.id == "my-fulfillment" + * } + * } + * ``` */ validateOption(data: ShippingOptionData): Promise /** - * Used to determine if a shipping option can have a calculated price + * This method is used to determine whether a shipping option is calculated dynamically or flat rate. It is called if the `price_type` of the shipping option being created is set to calculated. + * + * @param {ShippingOptionData} data - The `data` object of the shipping option being created. You can use this data to determine whether the shipping option should be calculated or not. + * This is useful if the fulfillment provider you are integrating has both flat rate and dynamically priced fulfillment options. + * @returns {Promise} If this method returns `true`, that means that the price can be calculated dynamically and the shipping option can have the `price_type` set to calculated. + * The amount property of the shipping option will then be set to null. The amount will be created later when the shipping method is created on checkout using the {@link calculatePrice} method. + * If the method returns `false`, an error is thrown as it means the selected shipping option is invalid and it can only have the `flat_rate` price type. + * + * @example + * class MyFulfillmentService extends AbstractFulfillmentService { + * // ... + * async canCalculate( + * data: Record + * ): Promise { + * return data.id === "my-fulfillment-dynamic" + * } + * } */ canCalculate(data: ShippingOptionData): Promise /** - * Used to calculate a price for a given shipping option. + * This method is used in different places, including: + * + * 1. When the shipping options for a cart are retrieved during checkout. If a shipping option has their `price_type` set to calculated, this method is used to set the amount of the returned shipping option. + * 2. When a shipping method is created. If the shipping option associated with the method has their `price_type` set to `calculated`, this method is used to set the `price` attribute of the shipping method in the database. + * 3. When the cart's totals are calculated. + * + * @param {ShippingOptionData} optionData - The `data` object of the selected shipping option. + * @param {FulfillmentProviderData} data - + * A `data` object that is different based on the context it's used in: + * + * 1. If the price is being calculated for the list of shipping options available for a cart, it's the `data` object of the shipping option. + * 2. If the price is being calculated when the shipping method is being created, it's the data returned by the {@link validateFulfillmentData} method used during the shipping method creation. + * 3. If the price is being calculated while calculating the cart's totals, it will be the data object of the cart's shipping method. + * @param {Cart} cart - Either the Cart or the Order object. + * @returns {Promise} Used to set the price of the shipping method or option, based on the context the method is used in. + * + * @example + * An example of calculating the price based on some custom logic: + * + * ```ts + * class MyFulfillmentService extends AbstractFulfillmentService { + * // ... + * async calculatePrice( + * optionData: Record, + * data: Record, + * cart: Cart + * ): Promise { + * return cart.items.length * 1000 + * } + * } + * ``` + * + * If your fulfillment provider does not provide any dynamically calculated rates you can return any static value or throw an error. For example: + * + * ```ts + * class MyFulfillmentService extends AbstractFulfillmentService { + * // ... + * async calculatePrice( + * optionData: Record, + * data: Record, + * cart: Cart + * ): Promise { + * throw new Error("Method not implemented.") + * } + * } + * ``` */ calculatePrice( optionData: ShippingOptionData, @@ -62,8 +213,38 @@ export interface FulfillmentService { ): Promise /** - * Create a fulfillment using data from shipping method, line items, and fulfillment. All from the order. - * The returned value of this method will populate the `fulfillment.data` field. + * This method is used when a fulfillment is created for an order, a claim, or a swap. + * + * @param {ShippingMethodData} data - + * The `data` object of the shipping method associated with the resource, such as the order. + * You can use it to access the data specific to the shipping option. This is based on your implementation of previous methods. + * @param {LineItem[]} items - The line items in the order to be fulfilled. The admin can choose all or some of the items to fulfill. + * @param {Order} order - + * The details of the created resource, which is either an order, a claim, or a swap: + * - If the resource the fulfillment is being created for is a claim, the `is_claim` property in the object will be `true`. + * - If the resource the fulfillment is being created for is a swap, the `is_swap` property in the object will be `true`. + * - Otherwise, the resource is an order. + * @param {Fulfillment} fulfillment - The fulfillment being created. + * @returns {Promise} The data that will be stored in the `data` attribute of the created fulfillment. + * + * @example + * Here is a basic implementation of `createFulfillment` for a fulfillment provider that does not interact with any third-party provider to create the fulfillment: + * + * ```ts + * class MyFulfillmentService extends AbstractFulfillmentService { + * // ... + * async createFulfillment( + * data: Record, + * items: LineItem, + * order: Order, + * fulfillment: Fulfillment + * ) { + * // No data is being sent anywhere + * // No data to be stored in the fulfillment's data object + * return {} + * } + * } + * ``` */ createFulfillment( data: ShippingMethodData, @@ -73,32 +254,133 @@ export interface FulfillmentService { ): Promise /** - * Cancel a fulfillment using data from the fulfillment + * This method is called when a fulfillment is cancelled by the admin. This fulfillment can be for an order, a claim, or a swap. + * + * @param {FulfillmentProviderData} fulfillmentData - The `data` attribute of the fulfillment being canceled + * @returns {Promise} The method isn't expected to return any specific data. + * + * @example + * This is the basic implementation of the method for a fulfillment provider that doesn't interact with a third-party provider to cancel the fulfillment: + * + * ```ts + * class MyFulfillmentService extends FulfillmentService { + * // ... + * async cancelFulfillment( + * fulfillment: Record + * ): Promise { + * return {} + * } + * } + * ``` */ cancelFulfillment(fulfillmentData: FulfillmentProviderData): Promise /** - * Used to create a return order. Should return the data necessary for future - * operations on the return; in particular the data may be used to receive - * documents attached to the return. + * Fulfillment providers can also be used to return products. A shipping option can be used for returns if the `is_return` property is true or if an admin creates a Return Shipping Option from the settings. + * This method is used when the admin [creates a return request](https://docs.medusajs.com/api/admin#orders_postordersorderreturns) for an order, + * [creates a swap](https://docs.medusajs.com/api/admin#orders_postordersorderswaps) for an order, or when the + * [customer creates a return of their order](https://docs.medusajs.com/api/store#returns_postreturns). The fulfillment is created automatically for the order return. + * + * @param {CreateReturnType} returnOrder - the return that the fulfillment is being created for. + * @returns {Promise>} Used to set the value of the `shipping_data` attribute of the return being created. + * + * @example + * This is the basic implementation of the method for a fulfillment provider that does not contact with a third-party provider to fulfill the return: + * + * ```ts + * class MyFulfillmentService extends AbstractFulfillmentService { + * // ... + * async createReturn( + * returnOrder: CreateReturnType + * ): Promise> { + * return {} + * } + * } + * ``` */ createReturn(returnOrder: CreateReturnType): Promise> /** - * Used to retrieve documents associated with a fulfillment. + * This method is used to retrieve any documents associated with a fulfillment. This method isn't used by default in the backend, but you can use it for custom use cases such as allowing admins to download these documents. + * + * @param {FulfillmentProviderData} data - The `data` attribute of the fulfillment that you're retrieving the documents for. + * @returns {Promise} There are no restrictions on the returned response. If your fulfillment provider doesn't provide this functionality, you can leave the method empty or through an error. + * + * @example + * class MyFulfillmentService extends FulfillmentService { + * // ... + * async getFulfillmentDocuments( + * data: Record + * ): Promise { + * // assuming you contact a client to + * // retrieve the document + * return this.client.getFulfillmentDocuments() + * } + * } */ getFulfillmentDocuments(data: FulfillmentProviderData): Promise /** - * Used to retrieve documents related to a return order. + * This method is used to retrieve any documents associated with a return. This method isn't used by default in the backend, but you can use it for custom use cases such as allowing admins to download these documents. + * + * @param {Record} data - The data attribute of the return that you're retrieving the documents for. + * @returns {Promise} There are no restrictions on the returned response. If your fulfillment provider doesn't provide this functionality, you can leave the method empty or through an error. + * + * @example + * class MyFulfillmentService extends FulfillmentService { + * // ... + * async getReturnDocuments( + * data: Record + * ): Promise { + * // assuming you contact a client to + * // retrieve the document + * return this.client.getReturnDocuments() + * } + * } */ getReturnDocuments(data: Record): Promise /** - * Used to retrieve documents related to a shipment. + * This method is used to retrieve any documents associated with a shipment. This method isn't used by default in the backend, but you can use it for custom use cases such as allowing admins to download these documents. + * + * @param {Record} data - The `data` attribute of the shipment that you're retrieving the documents for. + * @returns {Promise} There are no restrictions on the returned response. If your fulfillment provider doesn't provide this functionality, you can leave the method empty or through an error. + * + * @example + * class MyFulfillmentService extends FulfillmentService { + * // ... + * async getShipmentDocuments( + * data: Record + * ): Promise { + * // assuming you contact a client to + * // retrieve the document + * return this.client.getShipmentDocuments() + * } + * } */ getShipmentDocuments(data: Record): Promise + /** + * This method is used to retrieve any documents associated with an order and its fulfillments. This method isn't used by default in the backend, but you can use it for + * custom use cases such as allowing admins to download these documents. + * + * @param {FulfillmentProviderData} fulfillmentData - The `data` attribute of the order's fulfillment. + * @param documentType - The type of document to retrieve. + * @returns {Promise} There are no restrictions on the returned response. If your fulfillment provider doesn't provide this functionality, you can leave the method empty or through an error. + * + * @example + * class MyFulfillmentService extends FulfillmentService { + * // ... + * async retrieveDocuments( + * fulfillmentData: Record, + * documentType: "invoice" | "label" + * ): Promise { + * // assuming you contact a client to + * // retrieve the document + * return this.client.getDocuments() + * } + * } + */ retrieveDocuments( fulfillmentData: FulfillmentProviderData, documentType: "invoice" | "label" @@ -106,13 +388,42 @@ export interface FulfillmentService { } export abstract class AbstractFulfillmentService implements FulfillmentService { + /** + * You can use the `constructor` of your fulfillment provider to access the different services in Medusa through dependency injection. + * You can also use the constructor to initialize your integration with the third-party provider. For example, if you use a client to connect to the third-party provider’s APIs, you can initialize it in the constructor and use it in other methods in the service. + * Additionally, if you’re creating your fulfillment provider as an external plugin to be installed on any Medusa backend and you want to access the options added for the plugin, you can access it in the constructor. + * + * @param {MedusaContainer} container - An instance of `MedusaContainer` that allows you to access other resources, such as services, in your Medusa backend. + * @param {Record} config - If this fulfillment provider is created in a plugin, the plugin's options are passed in this parameter. + * + * @example + * class MyFulfillmentService extends AbstractFulfillmentService { + * static identifier = "my-fulfillment" + * + * // ... + * } + */ protected constructor( protected readonly container: MedusaContainer, protected readonly config?: Record // eslint-disable-next-line @typescript-eslint/no-empty-function ) {} + /** + * The `FulfillmentProvider` entity has 2 properties: `identifier` and `is_installed`. The `identifier` property in the class is used when the fulfillment provider is created in the database. + * The value of this property is also used to reference the fulfillment provider throughout Medusa. For example, it is used to [add a fulfillment provider](https://docs.medusajs.com/api/admin#regions_postregionsregionfulfillmentproviders) to a region. + * + * @example + * class MyFulfillmentService extends AbstractFulfillmentService { + * static identifier = "my-fulfillment" + * + * // ... + * } + */ public static identifier: string + /** + * @ignore + */ public getIdentifier(): string { const ctr = this.constructor as typeof AbstractFulfillmentService diff --git a/packages/types/src/pricing/common/price-list.ts b/packages/types/src/pricing/common/price-list.ts index 42e2a6fd4c..a256ca379b 100644 --- a/packages/types/src/pricing/common/price-list.ts +++ b/packages/types/src/pricing/common/price-list.ts @@ -202,7 +202,7 @@ export interface UpdatePriceListDTO { } /** - * @inteface + * @interface * * Filters to apply on price lists. */ diff --git a/www/apps/docs/content/modules/carts-and-checkout/backend/add-fulfillment-provider.md b/www/apps/docs/content/modules/carts-and-checkout/backend/add-fulfillment-provider.md deleted file mode 100644 index 0d9d15f122..0000000000 --- a/www/apps/docs/content/modules/carts-and-checkout/backend/add-fulfillment-provider.md +++ /dev/null @@ -1,507 +0,0 @@ ---- -description: 'Learn how to create a fulfillment provider in the Medusa backend. This guide explains the different methods in the fulfillment provider.' -addHowToData: true ---- - -# How to Add a Fulfillment Provider - -In this document, you’ll learn how to add a fulfillment provider to a Medusa backend. If you’re unfamiliar with the Shipping architecture in Medusa, make sure to [check out the overview first](../shipping.md). - -## Overview - -A fulfillment provider is the shipping provider used to fulfill orders and deliver them to customers. An example of a fulfillment provider is FedEx. - -By default, a Medusa Backend has a `manual` fulfillment provider which has minimal implementation. It allows you to accept orders and fulfill them manually. However, you can integrate any fulfillment provider into Medusa, and your fulfillment provider can interact with third-party shipping providers. - -Adding a fulfillment provider is as simple as creating one [service](../../../development/services/create-service.mdx) file in `src/services`. A fulfillment provider is essentially a service that extends the `AbstractFulfillmentService`. It requires implementing 4 methods: - -1. `getFulfillmentOptions`: used to retrieve available fulfillment options provided by this fulfillment provider. -2. `validateOption`: used to validate the shipping option when it’s being created by the admin. -3. `validateFulfillmentData`: used to validate a shipping method's data before it's created, typically during checkout. -4. `createFulfillment`: used to perform any additional actions when fulfillment is being created for an order, such as communicating with a third-party service. - -There are other [useful methods](#useful-methods) that can be implemented based on your fulfillment provider's use case. - -Also, the fulfillment provider class should have a static property `identifier`. It is the name that will be used to install and refer to the fulfillment provider throughout Medusa. - -Fulfillment providers are loaded and installed on the backend startup. - ---- - -## Create a Fulfillment Provider - -The first step is to create a JavaScript or TypeScript file under `src/services`. For example, create the file `src/services/my-fulfillment.ts` with the following content: - -```ts title="src/services/my-fulfillment.ts" -import { - AbstractFulfillmentService, - Cart, - Fulfillment, - LineItem, - Order, -} from "@medusajs/medusa" -import { - CreateReturnType, -} from "@medusajs/medusa/dist/types/fulfillment-provider" - -class MyFulfillmentService extends AbstractFulfillmentService { - async getFulfillmentOptions(): Promise { - throw new Error("Method not implemented.") - } - async validateFulfillmentData( - optionData: { [x: string]: unknown }, - data: { [x: string]: unknown }, - cart: Cart - ): Promise> { - throw new Error("Method not implemented.") - } - async validateOption( - data: { [x: string]: unknown } - ): Promise { - throw new Error("Method not implemented.") - } - async canCalculate( - data: { [x: string]: unknown } - ): Promise { - throw new Error("Method not implemented.") - } - async calculatePrice( - optionData: { [x: string]: unknown }, - data: { [x: string]: unknown }, - cart: Cart - ): Promise { - throw new Error("Method not implemented.") - } - async createFulfillment( - data: { [x: string]: unknown }, - items: LineItem, - order: Order, - fulfillment: Fulfillment - ) { - throw new Error("Method not implemented.") - } - async cancelFulfillment( - fulfillment: { [x: string]: unknown } - ): Promise { - throw new Error("Method not implemented.") - } - async createReturn( - returnOrder: CreateReturnType - ): Promise> { - throw new Error("Method not implemented.") - } - async getFulfillmentDocuments( - data: { [x: string]: unknown } - ): Promise { - throw new Error("Method not implemented.") - } - async getReturnDocuments( - data: Record - ): Promise { - throw new Error("Method not implemented.") - } - async getShipmentDocuments( - data: Record - ): Promise { - throw new Error("Method not implemented.") - } - async retrieveDocuments( - fulfillmentData: Record, - documentType: "invoice" | "label" - ): Promise { - throw new Error("Method not implemented.") - } -} - -export default MyFulfillmentService -``` - -Fulfillment provider services must extend the `AbstractFulfillmentService` class imported from `@medusajs/medusa`. - -:::note - -Following the naming convention of Services, the name of the file should be the slug name of the fulfillment provider, and the name of the class should be the camel case name of the fulfillment provider suffixed with “Service”. You can learn more in the [service documentation](../../../development/services/create-service.mdx). - -::: - -### Identifier - -As mentioned in the overview, fulfillment providers should have a static `identifier` property. - -The `FulfillmentProvider` entity has 2 properties: `identifier` and `is_installed`. The `identifier` property in the class will be used when the fulfillment provider is created in the database. - -The value of this property will also be used to reference the fulfillment provider throughout Medusa. For example, it is used to [add a fulfillment provider](https://docs.medusajs.com/api/admin#regions_postregionsregionfulfillmentproviders) to a region. - -```ts -class MyFulfillmentService extends AbstractFulfillmentService { - static identifier = "my-fulfillment" - - // ... -} -``` - -### constructor - -You can use the `constructor` of your fulfillment provider to have access to different services in Medusa through dependency injection. You can access any services you create in Medusa in the first parameter. - -You can also use the constructor to initialize your integration with the third-party provider. For example, if you use a client to connect to the third-party provider’s APIs, you can initialize it in the constructor and use it in other methods in the service. - -Additionally, if you’re creating your fulfillment provider as an external plugin to be installed on any Medusa backend and you want to access the options added for the plugin, you can access it in the constructor. The options are passed as a second parameter. - -For example: - -```ts -class MyFulfillmentService extends AbstractFulfillmentService { - // ... - constructor(container, options) { - super() - // you can access options here - } -} -``` - -### getFulfillmentOptions - -This method is used when retrieving the list of fulfillment options available in a region, particularly by the [List Fulfillment Options API Route](https://docs.medusajs.com/api/admin#regions_getregionsregionfulfillmentoptions). - -For example, if you’re integrating UPS as a fulfillment provider, you might support two fulfillment options: UPS Express Shipping and UPS Access Point. Each of these options can have different data associated with them. - -This method is expected to return an array of options. These options don't have any required format. - -Later on, these options can be used when creating a shipping option, such as when using the [Create Shipping Option API Route](https://docs.medusajs.com/api/admin#shipping-options_postshippingoptions). The chosen fulfillment option, which is one of the items in the array returned by this method, will be set in the `data` object of the shipping option. - -For example: - -```ts -class MyFulfillmentService extends AbstractFulfillmentService { - // ... - async getFulfillmentOptions(): Promise { - return [ - { - id: "my-fulfillment", - }, - { - id: "my-fulfillment-dynamic", - }, - ] - } -} -``` - -### validateOption - -Once the admin creates the shipping option, the data of the shipping option will be validated first using this method. This method is called when the [Create Shipping Option API Route](https://docs.medusajs.com/api/admin#shipping-options_postshippingoptions) is used. - -This method accepts the `data` object that is sent in the body of the request, basically, the `data` object of the shipping option. You can use this data to validate the shipping option before it is saved. - -This method returns a boolean. If the returned value is `false`, an error is thrown and the shipping option will not be saved. - -For example, you can use this method to ensure that the `id` in the `data` object is correct: - -```ts -class MyFulfillmentService extends AbstractFulfillmentService { - // ... - async validateOption( - data: { [x: string]: unknown } - ): Promise { - return data.id == "my-fulfillment" - } -} -``` - -If your fulfillment provider doesn't need to run any validation, you can simply return `true`. - -### validateFulfillmentData - -This method is called when a shipping method is created. This typically happens when the customer chooses a shipping option during checkout, when a shipping method is created for an order return, or in other similar cases. The shipping option and its data are validated before the shipping method is created. - -This method accepts three parameters: - -1. The first parameter is the `data` object of the shipping option selected when creating the shipping method. -2. The second parameter is `data` object passed in the body of the request. -3. The third parameter is an object indicating the customer’s cart data. It may be empty if the shipping method isn't associated with a cart, such as when it's associated with a claim. - -You can use these parameters to validate the chosen shipping option. For example, you can check if the `data` object passed as a second parameter includes all data needed to fulfill the shipment later on. - -If any of the data is invalid, you can throw an error. This error will stop Medusa from creating a shipping method and the error message will be returned as a result of the API Route. - -If everything is valid, this method must return an object that will be stored in the `data` property of the shipping method to be created. So, make sure the value you return contains everything you need to fulfill the shipment later on. - -The returned value may also be used to calculate the price of the shipping method if it doesn't have a set price. It will be passed along to the [calculatePrice](#calculateprice) method. - -Here's an example implementation: - -```ts -class MyFulfillmentService extends AbstractFulfillmentService { - // ... - async validateFulfillmentData( - optionData: { [x: string]: unknown }, - data: { [x: string]: unknown }, - cart: Cart - ): Promise> { - if (data.id !== "my-fulfillment") { - throw new Error("invalid data") - } - - return { - ...data, - } - } -} -``` - -### createFulfillment - -This method is used when a fulfillment is created for an order, a claim, or a swap. - -It accepts four parameters: - -1. The first parameter is the `data` object of the shipping method associated with the resource, such as the order. -2. The second parameter is the array of line item objects in the order to be fulfilled. The admin can choose all or some of the items to fulfill. -3. The third parameter is an object that includes data related to the order, claim, or swap this fulfillment is being created for. - 1. If the resource the fulfillment is being created for is a claim, the `is_claim` property in the object will be `true`. - 2. If the resource the fulfillment is being created for is a swap, the `is_swap` property in the object will be `true`. - 3. Otherwise, the resource is an order. -4. The fourth parameter is an object of type [Fulfillment](../../../references/entities/classes/Fulfillment.mdx), which is the fulfillment being created. - -You can use the `data` property in the shipping method (first parameter) to access the data specific to the shipping option. This is based on your implementation of previous methods. - -This method must return an object of data that will be stored in the `data` attribute of the created fulfillment. - -Here is a basic implementation of `createFulfillment` for a fulfillment provider that does not interact with any third-party provider to create the fulfillment: - -```ts -class MyFulfillmentService extends AbstractFulfillmentService { - // ... - async createFulfillment( - data: { [x: string]: unknown }, - items: LineItem, - order: Order, - fulfillment: Fulfillment - ) { - // No data is being sent anywhere - // No data to be stored in the fulfillment's data object - return {} - } -} -``` - -### Useful Methods - -The above-detailed methods are the required methods for every fulfillment provider. However, there are additional methods that you can use in your fulfillment provider to customize it further or add additional features. - -#### canCalculate - -This method is used to determine whether a shipping option is calculated dynamically or flat rate. It is called if the `price_type` of the shipping option being created is set to `calculated`. - -This method accepts an object as a parameter, which is the `data` object of the shipping option being created. You can use this data to determine whether the shipping option should be calculated or not. This is useful if the fulfillment provider you are integrating has both flat rate and dynamically priced fulfillment options. - -If this method returns `true`, that means that the price can be calculated dynamically and the shipping option can have the `price_type` set to `calculated`. The `amount` property of the shipping option will then be set to `null`. The amount will be created later when the shipping method is created on checkout using the [calculatePrice method](#calculateprice). - -If the method returns `false`, an error is thrown as it means the selected shipping option is invalid and it can only have the `flat_rate` price type. - -For example: - -```ts -class MyFulfillmentService extends AbstractFulfillmentService { - // ... - async canCalculate( - data: { [x: string]: unknown } - ): Promise { - return data.id === "my-fulfillment-dynamic" - } -} -``` - -#### calculatePrice - -This method is used in different places, including: - -1. When the shipping options for a cart are retrieved during checkout. If a shipping option has their `price_type` set to `calculated`, this method is used to set the `amount` of the returned shipping option. -2. When a shipping method is created. If the shipping option associated with the method has their `price_type` set to `calculated`, this method is used to set the `price` attribute of the shipping method in the database. -3. When the cart's totals are calculated. - -This method receives three parameters: - -1. The first parameter is the `data` object of the selected shipping option. -2. The second parameter is a `data` object that is different based on the context it's used in: - 1. If the price is being calculated for the list of shipping options available for a cart, it's the `data` object of the shipping option. - 2. If the price is being calculated when the shipping method is being created, it's the data returned by the [validateFulfillmentData](#validatefulfillmentdata) method used during the shipping method creation. - 3. If the price is being calculated while calculating the cart's totals, it will be the `data` object of the cart's shipping method. -3. The third parameter is either the [Cart](../../../references/entities/classes/Cart.mdx) or the [Order](../../../references/entities/classes/Order.mdx) object. - -The method is expected to return a number that will be used to set the price of the shipping method or option, based on the context it's used in. - -If your fulfillment provider does not provide any dynamically calculated rates you can return any static value or throw an error. For example: - -```ts -class MyFulfillmentService extends AbstractFulfillmentService { - // ... - async calculatePrice( - optionData: { [x: string]: unknown }, - data: { [x: string]: unknown }, - cart: Cart - ): Promise { - throw new Error("Method not implemented.") - } -} -``` - -Otherwise, you can use it to calculate the price with custom logic. For example: - -```ts -class MyFulfillmentService extends AbstractFulfillmentService { - // ... - async calculatePrice( - optionData: { [x: string]: unknown }, - data: { [x: string]: unknown }, - cart: Cart - ): Promise { - return cart.items.length * 1000 - } -} -``` - -#### createReturn - -Fulfillment providers can also be used to return products. A shipping option can be used for returns if the `is_return` property is `true` or if an admin creates a Return Shipping Option from the settings. - -This method is used when the admin [creates a return request](https://docs.medusajs.com/api/admin#orders_postordersorderreturns) for an order, [creates a swap](https://docs.medusajs.com/api/admin#orders_postordersorderswaps) for an order, or when the customer [creates a return of their order](https://docs.medusajs.com/api/store#returns_postreturns). The fulfillment is created automatically for the order return. - -The method receives as a parameter the [Return](../../../references/entities/classes/Return.mdx) object, which is the return that the fulfillment is being created for. - -The method must return an object that will be used to set the value of the `shipping_data` attribute of the return being created. - -This is the basic implementation of the method for a fulfillment provider that does not contact with a third-party provider to fulfill the return: - -```ts -class MyFulfillmentService extends AbstractFulfillmentService { - // ... - async createReturn( - returnOrder: CreateReturnType - ): Promise> { - return {} - } -} -``` - -#### cancelFulfillment - -This method is called when a fulfillment is cancelled by the admin. This fulfillment can be for an order, a claim, or a swap. - -The method receives the `data` attribute of the fulfillment being canceled. The method isn't expected to return any specific data. - -This is the basic implementation of the method for a fulfillment provider that doesn't interact with a third-party provider to cancel the fulfillment: - -```ts -class MyFulfillmentService extends FulfillmentService { - // ... - async cancelFulfillment( - fulfillment: { [x: string]: unknown } - ): Promise { - return {} - } -} -``` - -#### retrieveDocuments - -This method is used to retrieve any documents associated with an order and its fulfillments. This method isn't used by default in the backend, but you can use it for custom use cases such as allowing admins to download these documents. - -The method accepts two parameters: - -1. The first parameter is the `data` attribute of the order's fulfillment. -2. The second parameter is a string indicating the type of document to retrieve. Possible values are `invoice` and `label`. - -There are no restrictions on the returned response. If your fulfillment provider doesn't provide this functionality, you can leave the method empty or through an error. - -For example: - -```ts -class MyFulfillmentService extends FulfillmentService { - // ... - async retrieveDocuments( - fulfillmentData: Record, - documentType: "invoice" | "label" - ): Promise { - // assuming you contact a client to - // retrieve the document - return this.client.getDocuments() - } -} -``` - -#### getFulfillmentDocuments - -This method is used to retrieve any documents associated with a fulfillment. This method isn't used by default in the backend, but you can use it for custom use cases such as allowing admins to download these documents. - -The method accepts the `data` attribute of the fulfillment that you're retrieving the documents for. - -There are no restrictions on the returned response. If your fulfillment provider doesn't provide this functionality, you can leave the method empty or through an error. - -For example: - -```ts -class MyFulfillmentService extends FulfillmentService { - // ... - async getFulfillmentDocuments( - data: { [x: string]: unknown } - ): Promise { - // assuming you contact a client to - // retrieve the document - return this.client.getFulfillmentDocuments() - } -} -``` - -#### getReturnDocuments - -This method is used to retrieve any documents associated with a return. This method isn't used by default in the backend, but you can use it for custom use cases such as allowing admins to download these documents. - -The method accepts the `data` attribute of the return that you're retrieving the documents for. - -There are no restrictions on the returned response. If your fulfillment provider doesn't provide this functionality, you can leave the method empty or through an error. - -For example: - -```ts -class MyFulfillmentService extends FulfillmentService { - // ... - async getReturnDocuments( - data: Record - ): Promise { - // assuming you contact a client to - // retrieve the document - return this.client.getReturnDocuments() - } -} -``` - -#### getShipmentDocuments - -This method is used to retrieve any documents associated with a shipment. This method isn't used by default in the backend, but you can use it for custom use cases such as allowing admins to download these documents. - -The method accepts the `data` attribute of the shipment that you're retrieving the documents for. - -There are no restrictions on the returned response. If your fulfillment provider doesn't provide this functionality, you can leave the method empty or through an error. - -For example: - -```ts -class MyFulfillmentService extends FulfillmentService { - // ... - async getShipmentDocuments( - data: Record - ): Promise { - // assuming you contact a client to - // retrieve the document - return this.client.getShipmentDocuments() - } -} -``` - ---- - -## See Also - -- Example Implementations: [Webshipper plugin](https://github.com/medusajs/medusa/tree/master/packages/medusa-fulfillment-webshipper) and the [manual fulfillment plugin](https://github.com/medusajs/medusa/tree/master/packages/medusa-fulfillment-manual) diff --git a/www/apps/docs/content/modules/carts-and-checkout/shipping.md b/www/apps/docs/content/modules/carts-and-checkout/shipping.md index f319c7dec0..f71e8b8547 100644 --- a/www/apps/docs/content/modules/carts-and-checkout/shipping.md +++ b/www/apps/docs/content/modules/carts-and-checkout/shipping.md @@ -153,5 +153,5 @@ The `ShippingMethod` instance holds a `price` attribute, which will either b ## See Also -- [Create a Fulfillment Provider](./backend/add-fulfillment-provider.md) +- [Create a Fulfillment Provider](../../references/fulfillment/classes/AbstractFulfillmentService.mdx) - [Available shipping plugins](https://github.com/medusajs/medusa/tree/master/packages) diff --git a/www/apps/docs/content/modules/orders/fulfillments.md b/www/apps/docs/content/modules/orders/fulfillments.md index bc9410d34e..7fde94d09d 100644 --- a/www/apps/docs/content/modules/orders/fulfillments.md +++ b/www/apps/docs/content/modules/orders/fulfillments.md @@ -10,7 +10,7 @@ In this document, you’ll learn about Fulfillments, how they’re used in your Fulfillments are used to ship items, typically to a customer. Fulfillments can be used in orders, returns, swaps, and more. -Fulfillments are processed within Medusa by a [fulfillment provider](../carts-and-checkout/backend/add-fulfillment-provider.md). The fulfillment provider handles creating, validating, and processing the fulfillment, among other functionalities. Typically, a fulfillment provider would be integrated with a third-party service that handles the actual shipping of the items. +Fulfillments are processed within Medusa by a [fulfillment provider](../../references/fulfillment/classes/AbstractFulfillmentService.mdx). The fulfillment provider handles creating, validating, and processing the fulfillment, among other functionalities. Typically, a fulfillment provider would be integrated with a third-party service that handles the actual shipping of the items. When a fulfillment is created for one or more item, shipments can then be created for that fulfillment. These shipments can then be tracked using tracking numbers, providing customers and merchants accurate details about a shipment. diff --git a/www/apps/docs/content/plugins/fulfillment/index.mdx b/www/apps/docs/content/plugins/fulfillment/index.mdx index 7380f0dc59..12f696a289 100644 --- a/www/apps/docs/content/plugins/fulfillment/index.mdx +++ b/www/apps/docs/content/plugins/fulfillment/index.mdx @@ -2,6 +2,6 @@ import DocCardList from '@theme/DocCardList'; # Fulfillment Plugins -If you can't find your fulfillment provider, try checking the [Community Plugins Library](https://medusajs.com/plugins/?filters=Shipping&categories=Shipping). You can also [create your own fulfillment provider](../../modules/carts-and-checkout/backend/add-fulfillment-provider.md). +If you can't find your fulfillment provider, try checking the [Community Plugins Library](https://medusajs.com/plugins/?filters=Shipping&categories=Shipping). You can also [create your own fulfillment provider](../../references/fulfillment/classes/AbstractFulfillmentService.mdx). \ No newline at end of file diff --git a/www/apps/docs/content/references/entities/enums/AllocationType.mdx b/www/apps/docs/content/references/entities/enums/AllocationType.mdx index b05b0b0504..cb71377b53 100644 --- a/www/apps/docs/content/references/entities/enums/AllocationType.mdx +++ b/www/apps/docs/content/references/entities/enums/AllocationType.mdx @@ -10,7 +10,7 @@ The scope that the discount should apply to. ## Enumeration Members -#### ITEM +### ITEM **ITEM** = `"item"` @@ -18,7 +18,7 @@ The discount should be applied to applicable items in the cart. ___ -#### TOTAL +### TOTAL **TOTAL** = `"total"` diff --git a/www/apps/docs/content/references/entities/enums/BatchJobStatus.mdx b/www/apps/docs/content/references/entities/enums/BatchJobStatus.mdx index b2c5e0b950..2a4b2151a6 100644 --- a/www/apps/docs/content/references/entities/enums/BatchJobStatus.mdx +++ b/www/apps/docs/content/references/entities/enums/BatchJobStatus.mdx @@ -8,42 +8,42 @@ import ParameterTypes from "@site/src/components/ParameterTypes" ## Enumeration Members -#### CANCELED +### CANCELED **CANCELED** = `"canceled"` ___ -#### COMPLETED +### COMPLETED **COMPLETED** = `"completed"` ___ -#### CONFIRMED +### CONFIRMED **CONFIRMED** = `"confirmed"` ___ -#### CREATED +### CREATED **CREATED** = `"created"` ___ -#### FAILED +### FAILED **FAILED** = `"failed"` ___ -#### PRE\_PROCESSED +### PRE\_PROCESSED **PRE\_PROCESSED** = `"pre_processed"` ___ -#### PROCESSING +### PROCESSING **PROCESSING** = `"processing"` diff --git a/www/apps/docs/content/references/entities/enums/CartType.mdx b/www/apps/docs/content/references/entities/enums/CartType.mdx index 401129bcaf..c78f78f7ce 100644 --- a/www/apps/docs/content/references/entities/enums/CartType.mdx +++ b/www/apps/docs/content/references/entities/enums/CartType.mdx @@ -8,30 +8,30 @@ import ParameterTypes from "@site/src/components/ParameterTypes" ## Enumeration Members -#### CLAIM +### CLAIM **CLAIM** = `"claim"` ___ -#### DEFAULT +### DEFAULT **DEFAULT** = `"default"` ___ -#### DRAFT\_ORDER +### DRAFT\_ORDER **DRAFT\_ORDER** = `"draft_order"` ___ -#### PAYMENT\_LINK +### PAYMENT\_LINK **PAYMENT\_LINK** = `"payment_link"` ___ -#### SWAP +### SWAP **SWAP** = `"swap"` diff --git a/www/apps/docs/content/references/entities/enums/ClaimFulfillmentStatus.mdx b/www/apps/docs/content/references/entities/enums/ClaimFulfillmentStatus.mdx index 6bca914bdd..9640e72599 100644 --- a/www/apps/docs/content/references/entities/enums/ClaimFulfillmentStatus.mdx +++ b/www/apps/docs/content/references/entities/enums/ClaimFulfillmentStatus.mdx @@ -10,7 +10,7 @@ The claim's fulfillment status. ## Enumeration Members -#### CANCELED +### CANCELED **CANCELED** = `"canceled"` @@ -18,7 +18,7 @@ The claim's fulfillments are canceled. ___ -#### FULFILLED +### FULFILLED **FULFILLED** = `"fulfilled"` @@ -26,7 +26,7 @@ The claim's replacement items are fulfilled. ___ -#### NOT\_FULFILLED +### NOT\_FULFILLED **NOT\_FULFILLED** = `"not_fulfilled"` @@ -34,7 +34,7 @@ The claim's replacement items are not fulfilled. ___ -#### PARTIALLY\_FULFILLED +### PARTIALLY\_FULFILLED **PARTIALLY\_FULFILLED** = `"partially_fulfilled"` @@ -42,7 +42,7 @@ Some of the claim's replacement items, but not all, are fulfilled. ___ -#### PARTIALLY\_RETURNED +### PARTIALLY\_RETURNED **PARTIALLY\_RETURNED** = `"partially_returned"` @@ -50,7 +50,7 @@ Some of the claim's items, but not all, are returned. ___ -#### PARTIALLY\_SHIPPED +### PARTIALLY\_SHIPPED **PARTIALLY\_SHIPPED** = `"partially_shipped"` @@ -58,7 +58,7 @@ Some of the claim's replacement items, but not all, are shipped. ___ -#### REQUIRES\_ACTION +### REQUIRES\_ACTION **REQUIRES\_ACTION** = `"requires_action"` @@ -66,7 +66,7 @@ The claim's fulfillment requires action. ___ -#### RETURNED +### RETURNED **RETURNED** = `"returned"` @@ -74,7 +74,7 @@ The claim's items are returned. ___ -#### SHIPPED +### SHIPPED **SHIPPED** = `"shipped"` diff --git a/www/apps/docs/content/references/entities/enums/ClaimPaymentStatus.mdx b/www/apps/docs/content/references/entities/enums/ClaimPaymentStatus.mdx index 05e3d57ce7..4a7aabbcac 100644 --- a/www/apps/docs/content/references/entities/enums/ClaimPaymentStatus.mdx +++ b/www/apps/docs/content/references/entities/enums/ClaimPaymentStatus.mdx @@ -10,7 +10,7 @@ The claim's payment status ## Enumeration Members -#### NA +### NA **NA** = `"na"` @@ -18,7 +18,7 @@ The payment status isn't set, which is typically used when the claim's type is ` ___ -#### NOT\_REFUNDED +### NOT\_REFUNDED **NOT\_REFUNDED** = `"not_refunded"` @@ -26,7 +26,7 @@ The payment isn't refunded. ___ -#### REFUNDED +### REFUNDED **REFUNDED** = `"refunded"` diff --git a/www/apps/docs/content/references/entities/enums/ClaimReason.mdx b/www/apps/docs/content/references/entities/enums/ClaimReason.mdx index 5d9e70c44f..6300920b54 100644 --- a/www/apps/docs/content/references/entities/enums/ClaimReason.mdx +++ b/www/apps/docs/content/references/entities/enums/ClaimReason.mdx @@ -8,24 +8,24 @@ import ParameterTypes from "@site/src/components/ParameterTypes" ## Enumeration Members -#### MISSING\_ITEM +### MISSING\_ITEM **MISSING\_ITEM** = `"missing_item"` ___ -#### OTHER +### OTHER **OTHER** = `"other"` ___ -#### PRODUCTION\_FAILURE +### PRODUCTION\_FAILURE **PRODUCTION\_FAILURE** = `"production_failure"` ___ -#### WRONG\_ITEM +### WRONG\_ITEM **WRONG\_ITEM** = `"wrong_item"` diff --git a/www/apps/docs/content/references/entities/enums/ClaimType.mdx b/www/apps/docs/content/references/entities/enums/ClaimType.mdx index 929041ee9e..23eabada69 100644 --- a/www/apps/docs/content/references/entities/enums/ClaimType.mdx +++ b/www/apps/docs/content/references/entities/enums/ClaimType.mdx @@ -10,7 +10,7 @@ The claim's type. ## Enumeration Members -#### REFUND +### REFUND **REFUND** = `"refund"` @@ -18,7 +18,7 @@ The claim refunds an amount to the customer. ___ -#### REPLACE +### REPLACE **REPLACE** = `"replace"` diff --git a/www/apps/docs/content/references/entities/enums/DiscountConditionOperator.mdx b/www/apps/docs/content/references/entities/enums/DiscountConditionOperator.mdx index 5906ead960..d4146cca85 100644 --- a/www/apps/docs/content/references/entities/enums/DiscountConditionOperator.mdx +++ b/www/apps/docs/content/references/entities/enums/DiscountConditionOperator.mdx @@ -10,7 +10,7 @@ The possible operators used for a discount condition. ## Enumeration Members -#### IN +### IN **IN** = `"in"` @@ -18,7 +18,7 @@ The discountable resources are within the specified resources. ___ -#### NOT\_IN +### NOT\_IN **NOT\_IN** = `"not_in"` diff --git a/www/apps/docs/content/references/entities/enums/DiscountConditionType.mdx b/www/apps/docs/content/references/entities/enums/DiscountConditionType.mdx index 864681779c..cd13c91243 100644 --- a/www/apps/docs/content/references/entities/enums/DiscountConditionType.mdx +++ b/www/apps/docs/content/references/entities/enums/DiscountConditionType.mdx @@ -10,7 +10,7 @@ The discount condition's type. ## Enumeration Members -#### CUSTOMER\_GROUPS +### CUSTOMER\_GROUPS **CUSTOMER\_GROUPS** = `"customer_groups"` @@ -18,7 +18,7 @@ The discount condition is used for customer groups. ___ -#### PRODUCTS +### PRODUCTS **PRODUCTS** = `"products"` @@ -26,7 +26,7 @@ The discount condition is used for products. ___ -#### PRODUCT\_COLLECTIONS +### PRODUCT\_COLLECTIONS **PRODUCT\_COLLECTIONS** = `"product_collections"` @@ -34,7 +34,7 @@ The discount condition is used for product collections. ___ -#### PRODUCT\_TAGS +### PRODUCT\_TAGS **PRODUCT\_TAGS** = `"product_tags"` @@ -42,7 +42,7 @@ The discount condition is used for product tags. ___ -#### PRODUCT\_TYPES +### PRODUCT\_TYPES **PRODUCT\_TYPES** = `"product_types"` diff --git a/www/apps/docs/content/references/entities/enums/DiscountRuleType.mdx b/www/apps/docs/content/references/entities/enums/DiscountRuleType.mdx index 48fd94f166..7905738dfd 100644 --- a/www/apps/docs/content/references/entities/enums/DiscountRuleType.mdx +++ b/www/apps/docs/content/references/entities/enums/DiscountRuleType.mdx @@ -10,7 +10,7 @@ The possible types of discount rules. ## Enumeration Members -#### FIXED +### FIXED **FIXED** = `"fixed"` @@ -18,7 +18,7 @@ Discounts that reduce the price by a fixed amount. ___ -#### FREE\_SHIPPING +### FREE\_SHIPPING **FREE\_SHIPPING** = `"free_shipping"` @@ -26,7 +26,7 @@ Discounts that sets the shipping price to `0`. ___ -#### PERCENTAGE +### PERCENTAGE **PERCENTAGE** = `"percentage"` diff --git a/www/apps/docs/content/references/entities/enums/DraftOrderStatus.mdx b/www/apps/docs/content/references/entities/enums/DraftOrderStatus.mdx index ba4212d8ab..87026819d2 100644 --- a/www/apps/docs/content/references/entities/enums/DraftOrderStatus.mdx +++ b/www/apps/docs/content/references/entities/enums/DraftOrderStatus.mdx @@ -10,7 +10,7 @@ The draft order's status. ## Enumeration Members -#### COMPLETED +### COMPLETED **COMPLETED** = `"completed"` @@ -18,7 +18,7 @@ The draft order is completed, and an order has been created from it. ___ -#### OPEN +### OPEN **OPEN** = `"open"` diff --git a/www/apps/docs/content/references/entities/enums/FulfillmentStatus.mdx b/www/apps/docs/content/references/entities/enums/FulfillmentStatus.mdx index c43bd91df7..560234d78a 100644 --- a/www/apps/docs/content/references/entities/enums/FulfillmentStatus.mdx +++ b/www/apps/docs/content/references/entities/enums/FulfillmentStatus.mdx @@ -10,7 +10,7 @@ The order's fulfillment status. ## Enumeration Members -#### CANCELED +### CANCELED **CANCELED** = `"canceled"` @@ -18,7 +18,7 @@ The order's fulfillments are canceled. ___ -#### FULFILLED +### FULFILLED **FULFILLED** = `"fulfilled"` @@ -26,7 +26,7 @@ The order's items are fulfilled. ___ -#### NOT\_FULFILLED +### NOT\_FULFILLED **NOT\_FULFILLED** = `"not_fulfilled"` @@ -34,7 +34,7 @@ The order's items are not fulfilled. ___ -#### PARTIALLY\_FULFILLED +### PARTIALLY\_FULFILLED **PARTIALLY\_FULFILLED** = `"partially_fulfilled"` @@ -42,7 +42,7 @@ Some of the order's items, but not all, are fulfilled. ___ -#### PARTIALLY\_RETURNED +### PARTIALLY\_RETURNED **PARTIALLY\_RETURNED** = `"partially_returned"` @@ -50,7 +50,7 @@ Some of the order's items, but not all, are returned. ___ -#### PARTIALLY\_SHIPPED +### PARTIALLY\_SHIPPED **PARTIALLY\_SHIPPED** = `"partially_shipped"` @@ -58,7 +58,7 @@ Some of the order's items, but not all, are shipped. ___ -#### REQUIRES\_ACTION +### REQUIRES\_ACTION **REQUIRES\_ACTION** = `"requires_action"` @@ -66,7 +66,7 @@ The order's fulfillment requires action. ___ -#### RETURNED +### RETURNED **RETURNED** = `"returned"` @@ -74,7 +74,7 @@ The order's items are returned. ___ -#### SHIPPED +### SHIPPED **SHIPPED** = `"shipped"` diff --git a/www/apps/docs/content/references/entities/enums/OrderEditItemChangeType.mdx b/www/apps/docs/content/references/entities/enums/OrderEditItemChangeType.mdx index eb44a8e5b5..92c6cabab5 100644 --- a/www/apps/docs/content/references/entities/enums/OrderEditItemChangeType.mdx +++ b/www/apps/docs/content/references/entities/enums/OrderEditItemChangeType.mdx @@ -10,7 +10,7 @@ The type of the order edit item change. ## Enumeration Members -#### ITEM\_ADD +### ITEM\_ADD **ITEM\_ADD** = `"item_add"` @@ -18,7 +18,7 @@ A new item to be added to the original order. ___ -#### ITEM\_REMOVE +### ITEM\_REMOVE **ITEM\_REMOVE** = `"item_remove"` @@ -26,7 +26,7 @@ An existing item to be removed from the original order. ___ -#### ITEM\_UPDATE +### ITEM\_UPDATE **ITEM\_UPDATE** = `"item_update"` diff --git a/www/apps/docs/content/references/entities/enums/OrderEditStatus.mdx b/www/apps/docs/content/references/entities/enums/OrderEditStatus.mdx index 2b63c41b80..e965d5f26b 100644 --- a/www/apps/docs/content/references/entities/enums/OrderEditStatus.mdx +++ b/www/apps/docs/content/references/entities/enums/OrderEditStatus.mdx @@ -10,7 +10,7 @@ The order edit's status. ## Enumeration Members -#### CANCELED +### CANCELED **CANCELED** = `"canceled"` @@ -18,7 +18,7 @@ The order edit is canceled. ___ -#### CONFIRMED +### CONFIRMED **CONFIRMED** = `"confirmed"` @@ -26,7 +26,7 @@ The order edit is confirmed. ___ -#### CREATED +### CREATED **CREATED** = `"created"` @@ -34,7 +34,7 @@ The order edit is created. ___ -#### DECLINED +### DECLINED **DECLINED** = `"declined"` @@ -42,7 +42,7 @@ The order edit is declined. ___ -#### REQUESTED +### REQUESTED **REQUESTED** = `"requested"` diff --git a/www/apps/docs/content/references/entities/enums/OrderStatus.mdx b/www/apps/docs/content/references/entities/enums/OrderStatus.mdx index 60d4dd6001..9427b7ad56 100644 --- a/www/apps/docs/content/references/entities/enums/OrderStatus.mdx +++ b/www/apps/docs/content/references/entities/enums/OrderStatus.mdx @@ -10,7 +10,7 @@ The order's status. ## Enumeration Members -#### ARCHIVED +### ARCHIVED **ARCHIVED** = `"archived"` @@ -18,7 +18,7 @@ The order is archived. ___ -#### CANCELED +### CANCELED **CANCELED** = `"canceled"` @@ -26,7 +26,7 @@ The order is canceled. ___ -#### COMPLETED +### COMPLETED **COMPLETED** = `"completed"` @@ -36,7 +36,7 @@ has been captured. ___ -#### PENDING +### PENDING **PENDING** = `"pending"` @@ -44,7 +44,7 @@ The order is pending. ___ -#### REQUIRES\_ACTION +### REQUIRES\_ACTION **REQUIRES\_ACTION** = `"requires_action"` diff --git a/www/apps/docs/content/references/entities/enums/PaymentCollectionStatus.mdx b/www/apps/docs/content/references/entities/enums/PaymentCollectionStatus.mdx index c011988b08..5f0e6ffb4f 100644 --- a/www/apps/docs/content/references/entities/enums/PaymentCollectionStatus.mdx +++ b/www/apps/docs/content/references/entities/enums/PaymentCollectionStatus.mdx @@ -10,7 +10,7 @@ The payment collection's status. ## Enumeration Members -#### AUTHORIZED +### AUTHORIZED **AUTHORIZED** = `"authorized"` @@ -18,7 +18,7 @@ The payment colleciton is authorized. ___ -#### AWAITING +### AWAITING **AWAITING** = `"awaiting"` @@ -26,7 +26,7 @@ The payment collection is awaiting payment. ___ -#### CANCELED +### CANCELED **CANCELED** = `"canceled"` @@ -34,7 +34,7 @@ The payment collection is canceled. ___ -#### NOT\_PAID +### NOT\_PAID **NOT\_PAID** = `"not_paid"` @@ -42,7 +42,7 @@ The payment collection isn't paid. ___ -#### PARTIALLY\_AUTHORIZED +### PARTIALLY\_AUTHORIZED **PARTIALLY\_AUTHORIZED** = `"partially_authorized"` diff --git a/www/apps/docs/content/references/entities/enums/PaymentCollectionType.mdx b/www/apps/docs/content/references/entities/enums/PaymentCollectionType.mdx index 454e617049..b1f8feed0a 100644 --- a/www/apps/docs/content/references/entities/enums/PaymentCollectionType.mdx +++ b/www/apps/docs/content/references/entities/enums/PaymentCollectionType.mdx @@ -10,7 +10,7 @@ The payment collection's type. ## Enumeration Members -#### ORDER\_EDIT +### ORDER\_EDIT **ORDER\_EDIT** = `"order_edit"` diff --git a/www/apps/docs/content/references/entities/enums/PaymentSessionStatus.mdx b/www/apps/docs/content/references/entities/enums/PaymentSessionStatus.mdx index f45190a1a3..6cc3711019 100644 --- a/www/apps/docs/content/references/entities/enums/PaymentSessionStatus.mdx +++ b/www/apps/docs/content/references/entities/enums/PaymentSessionStatus.mdx @@ -8,30 +8,30 @@ import ParameterTypes from "@site/src/components/ParameterTypes" ## Enumeration Members -#### AUTHORIZED +### AUTHORIZED **AUTHORIZED** = `"authorized"` ___ -#### CANCELED +### CANCELED **CANCELED** = `"canceled"` ___ -#### ERROR +### ERROR **ERROR** = `"error"` ___ -#### PENDING +### PENDING **PENDING** = `"pending"` ___ -#### REQUIRES\_MORE +### REQUIRES\_MORE **REQUIRES\_MORE** = `"requires_more"` diff --git a/www/apps/docs/content/references/entities/enums/PaymentStatus.mdx b/www/apps/docs/content/references/entities/enums/PaymentStatus.mdx index 0b8f68c06c..f1e020cb06 100644 --- a/www/apps/docs/content/references/entities/enums/PaymentStatus.mdx +++ b/www/apps/docs/content/references/entities/enums/PaymentStatus.mdx @@ -10,7 +10,7 @@ The order's payment status. ## Enumeration Members -#### AWAITING +### AWAITING **AWAITING** = `"awaiting"` @@ -18,7 +18,7 @@ The order's payment is awaiting capturing. ___ -#### CANCELED +### CANCELED **CANCELED** = `"canceled"` @@ -26,7 +26,7 @@ The order's payment is canceled. ___ -#### CAPTURED +### CAPTURED **CAPTURED** = `"captured"` @@ -34,7 +34,7 @@ The order's payment is captured. ___ -#### NOT\_PAID +### NOT\_PAID **NOT\_PAID** = `"not_paid"` @@ -42,7 +42,7 @@ The order's payment is not paid. ___ -#### PARTIALLY\_REFUNDED +### PARTIALLY\_REFUNDED **PARTIALLY\_REFUNDED** = `"partially_refunded"` @@ -50,7 +50,7 @@ Some of the order's payment amount is refunded. ___ -#### REFUNDED +### REFUNDED **REFUNDED** = `"refunded"` @@ -58,7 +58,7 @@ The order's payment amount is refunded. ___ -#### REQUIRES\_ACTION +### REQUIRES\_ACTION **REQUIRES\_ACTION** = `"requires_action"` diff --git a/www/apps/docs/content/references/entities/enums/PriceListStatus.mdx b/www/apps/docs/content/references/entities/enums/PriceListStatus.mdx index e65894337b..458f0df10c 100644 --- a/www/apps/docs/content/references/entities/enums/PriceListStatus.mdx +++ b/www/apps/docs/content/references/entities/enums/PriceListStatus.mdx @@ -8,12 +8,12 @@ import ParameterTypes from "@site/src/components/ParameterTypes" ## Enumeration Members -#### ACTIVE +### ACTIVE **ACTIVE** = `"active"` ___ -#### DRAFT +### DRAFT **DRAFT** = `"draft"` diff --git a/www/apps/docs/content/references/entities/enums/PriceListType.mdx b/www/apps/docs/content/references/entities/enums/PriceListType.mdx index 5d238410a5..f079104657 100644 --- a/www/apps/docs/content/references/entities/enums/PriceListType.mdx +++ b/www/apps/docs/content/references/entities/enums/PriceListType.mdx @@ -8,12 +8,12 @@ import ParameterTypes from "@site/src/components/ParameterTypes" ## Enumeration Members -#### OVERRIDE +### OVERRIDE **OVERRIDE** = `"override"` ___ -#### SALE +### SALE **SALE** = `"sale"` diff --git a/www/apps/docs/content/references/entities/enums/ProductStatus.mdx b/www/apps/docs/content/references/entities/enums/ProductStatus.mdx index 942720d6c7..0f7c8b46df 100644 --- a/www/apps/docs/content/references/entities/enums/ProductStatus.mdx +++ b/www/apps/docs/content/references/entities/enums/ProductStatus.mdx @@ -10,7 +10,7 @@ The status of a product. ## Enumeration Members -#### DRAFT +### DRAFT **DRAFT** = `"draft"` @@ -18,7 +18,7 @@ The product is a draft. It's not viewable by customers. ___ -#### PROPOSED +### PROPOSED **PROPOSED** = `"proposed"` @@ -26,7 +26,7 @@ The product is proposed, but not yet published. ___ -#### PUBLISHED +### PUBLISHED **PUBLISHED** = `"published"` @@ -34,7 +34,7 @@ The product is published. ___ -#### REJECTED +### REJECTED **REJECTED** = `"rejected"` diff --git a/www/apps/docs/content/references/entities/enums/RefundReason.mdx b/www/apps/docs/content/references/entities/enums/RefundReason.mdx index 73dda8f429..1ca51325cb 100644 --- a/www/apps/docs/content/references/entities/enums/RefundReason.mdx +++ b/www/apps/docs/content/references/entities/enums/RefundReason.mdx @@ -10,7 +10,7 @@ The reason of the refund. ## Enumeration Members -#### CLAIM +### CLAIM **CLAIM** = `"claim"` @@ -18,7 +18,7 @@ The refund is applied because of a created claim. ___ -#### DISCOUNT +### DISCOUNT **DISCOUNT** = `"discount"` @@ -26,7 +26,7 @@ The refund is applied as a discount. ___ -#### OTHER +### OTHER **OTHER** = `"other"` @@ -34,7 +34,7 @@ The refund is created for a custom reason. ___ -#### RETURN +### RETURN **RETURN** = `"return"` @@ -42,7 +42,7 @@ The refund is applied because of a created return. ___ -#### SWAP +### SWAP **SWAP** = `"swap"` diff --git a/www/apps/docs/content/references/entities/enums/RequirementType.mdx b/www/apps/docs/content/references/entities/enums/RequirementType.mdx index b835485cb6..8c9caa134a 100644 --- a/www/apps/docs/content/references/entities/enums/RequirementType.mdx +++ b/www/apps/docs/content/references/entities/enums/RequirementType.mdx @@ -10,7 +10,7 @@ The type of shipping option requirement. ## Enumeration Members -#### MAX\_SUBTOTAL +### MAX\_SUBTOTAL **MAX\_SUBTOTAL** = `"max_subtotal"` @@ -18,7 +18,7 @@ The shipping option can only be applied if the subtotal is less than the require ___ -#### MIN\_SUBTOTAL +### MIN\_SUBTOTAL **MIN\_SUBTOTAL** = `"min_subtotal"` diff --git a/www/apps/docs/content/references/entities/enums/ReturnStatus.mdx b/www/apps/docs/content/references/entities/enums/ReturnStatus.mdx index 2408d800b3..7d86a5fe10 100644 --- a/www/apps/docs/content/references/entities/enums/ReturnStatus.mdx +++ b/www/apps/docs/content/references/entities/enums/ReturnStatus.mdx @@ -10,7 +10,7 @@ The return's status. ## Enumeration Members -#### CANCELED +### CANCELED **CANCELED** = `"canceled"` @@ -18,7 +18,7 @@ The return is canceled. ___ -#### RECEIVED +### RECEIVED **RECEIVED** = `"received"` @@ -26,7 +26,7 @@ The return is received. ___ -#### REQUESTED +### REQUESTED **REQUESTED** = `"requested"` @@ -34,7 +34,7 @@ The return is requested. ___ -#### REQUIRES\_ACTION +### REQUIRES\_ACTION **REQUIRES\_ACTION** = `"requires_action"` diff --git a/www/apps/docs/content/references/entities/enums/ShippingOptionPriceType.mdx b/www/apps/docs/content/references/entities/enums/ShippingOptionPriceType.mdx index 9fbbbdaf80..fb58a0f17b 100644 --- a/www/apps/docs/content/references/entities/enums/ShippingOptionPriceType.mdx +++ b/www/apps/docs/content/references/entities/enums/ShippingOptionPriceType.mdx @@ -10,7 +10,7 @@ The type of the shipping option price. ## Enumeration Members -#### CALCULATED +### CALCULATED **CALCULATED** = `"calculated"` @@ -18,7 +18,7 @@ The shipping option's price is calculated. In this case, the `amount` field is t ___ -#### FLAT\_RATE +### FLAT\_RATE **FLAT\_RATE** = `"flat_rate"` diff --git a/www/apps/docs/content/references/entities/enums/ShippingProfileType.mdx b/www/apps/docs/content/references/entities/enums/ShippingProfileType.mdx index b59baaf208..eb986e3d76 100644 --- a/www/apps/docs/content/references/entities/enums/ShippingProfileType.mdx +++ b/www/apps/docs/content/references/entities/enums/ShippingProfileType.mdx @@ -10,7 +10,7 @@ The shipping profile's type. ## Enumeration Members -#### CUSTOM +### CUSTOM **CUSTOM** = `"custom"` @@ -18,7 +18,7 @@ The profile used to ship custom items. ___ -#### DEFAULT +### DEFAULT **DEFAULT** = `"default"` @@ -26,7 +26,7 @@ The default profile used to ship item. ___ -#### GIFT\_CARD +### GIFT\_CARD **GIFT\_CARD** = `"gift_card"` diff --git a/www/apps/docs/content/references/entities/enums/SwapFulfillmentStatus.mdx b/www/apps/docs/content/references/entities/enums/SwapFulfillmentStatus.mdx index fbd0bd3c0c..2997ee1d1b 100644 --- a/www/apps/docs/content/references/entities/enums/SwapFulfillmentStatus.mdx +++ b/www/apps/docs/content/references/entities/enums/SwapFulfillmentStatus.mdx @@ -10,7 +10,7 @@ The swap's fulfillment status. ## Enumeration Members -#### CANCELED +### CANCELED **CANCELED** = `"canceled"` @@ -18,7 +18,7 @@ The swap's fulfillments are canceled. ___ -#### FULFILLED +### FULFILLED **FULFILLED** = `"fulfilled"` @@ -26,7 +26,7 @@ The swap's items are fulfilled. ___ -#### NOT\_FULFILLED +### NOT\_FULFILLED **NOT\_FULFILLED** = `"not_fulfilled"` @@ -34,7 +34,7 @@ The swap's items aren't fulfilled. ___ -#### PARTIALLY\_SHIPPED +### PARTIALLY\_SHIPPED **PARTIALLY\_SHIPPED** = `"partially_shipped"` @@ -42,7 +42,7 @@ Some of the swap's items are shipped. ___ -#### REQUIRES\_ACTION +### REQUIRES\_ACTION **REQUIRES\_ACTION** = `"requires_action"` @@ -50,7 +50,7 @@ The swap's fulfillments require an action. ___ -#### SHIPPED +### SHIPPED **SHIPPED** = `"shipped"` diff --git a/www/apps/docs/content/references/entities/enums/SwapPaymentStatus.mdx b/www/apps/docs/content/references/entities/enums/SwapPaymentStatus.mdx index fa7af904f3..3804a0f19c 100644 --- a/www/apps/docs/content/references/entities/enums/SwapPaymentStatus.mdx +++ b/www/apps/docs/content/references/entities/enums/SwapPaymentStatus.mdx @@ -10,7 +10,7 @@ The swap's payment status. ## Enumeration Members -#### AWAITING +### AWAITING **AWAITING** = `"awaiting"` @@ -18,7 +18,7 @@ The swap is additional awaiting payment. ___ -#### CANCELED +### CANCELED **CANCELED** = `"canceled"` @@ -26,7 +26,7 @@ The swap's additional payment is canceled. ___ -#### CAPTURED +### CAPTURED **CAPTURED** = `"captured"` @@ -34,7 +34,7 @@ The swap's additional payment is captured. ___ -#### CONFIRMED +### CONFIRMED **CONFIRMED** = `"confirmed"` @@ -42,7 +42,7 @@ The swap's additional payment is confirmed. ___ -#### DIFFERENCE\_REFUNDED +### DIFFERENCE\_REFUNDED **DIFFERENCE\_REFUNDED** = `"difference_refunded"` @@ -50,7 +50,7 @@ The negative difference amount between the returned item(s) and the new one(s) h ___ -#### NOT\_PAID +### NOT\_PAID **NOT\_PAID** = `"not_paid"` @@ -58,7 +58,7 @@ The swap's additional payment isn't paid. ___ -#### PARTIALLY\_REFUNDED +### PARTIALLY\_REFUNDED **PARTIALLY\_REFUNDED** = `"partially_refunded"` @@ -66,7 +66,7 @@ Some of the negative difference amount between the returned item(s) and the new ___ -#### REFUNDED +### REFUNDED **REFUNDED** = `"refunded"` @@ -74,7 +74,7 @@ The amount in the associated order has been refunded. ___ -#### REQUIRES\_ACTION +### REQUIRES\_ACTION **REQUIRES\_ACTION** = `"requires_action"` diff --git a/www/apps/docs/content/references/entities/enums/UserRoles.mdx b/www/apps/docs/content/references/entities/enums/UserRoles.mdx index a2bb57bb56..52717c53c2 100644 --- a/www/apps/docs/content/references/entities/enums/UserRoles.mdx +++ b/www/apps/docs/content/references/entities/enums/UserRoles.mdx @@ -10,7 +10,7 @@ The user's role. These roles don't change the user's capabilities or provide acc ## Enumeration Members -#### ADMIN +### ADMIN **ADMIN** = `"admin"` @@ -18,7 +18,7 @@ The user is an admin. ___ -#### DEVELOPER +### DEVELOPER **DEVELOPER** = `"developer"` @@ -26,7 +26,7 @@ The user is a developer. ___ -#### MEMBER +### MEMBER **MEMBER** = `"member"` diff --git a/www/apps/docs/content/references/entities/index.mdx b/www/apps/docs/content/references/entities/index.mdx index 79d66c70a6..e8d0be6506 100644 --- a/www/apps/docs/content/references/entities/index.mdx +++ b/www/apps/docs/content/references/entities/index.mdx @@ -135,13 +135,15 @@ import ParameterTypes from "@site/src/components/ParameterTypes" - [BatchJobResultStatDescriptor](types/BatchJobResultStatDescriptor.mdx) - [Record](types/Record.mdx) +___ + ## Functions -#### Boolean +### Boolean `**Boolean**(value?): boolean` -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` diff --git a/www/apps/docs/content/references/entities/types/BatchJobResultError.mdx b/www/apps/docs/content/references/entities/types/BatchJobResultError.mdx index 00c67ac674..df2a2139c5 100644 --- a/www/apps/docs/content/references/entities/types/BatchJobResultError.mdx +++ b/www/apps/docs/content/references/entities/types/BatchJobResultError.mdx @@ -8,11 +8,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes" **BatchJobResultError**: `Object` -#### Index signature +## Index signature ▪ [key: `string`]: `unknown` -#### Type declaration +## Type declaration + +#### Parameters + + + +#### Returns + + diff --git a/www/apps/docs/content/references/fulfillment/classes/AbstractFulfillmentService.mdx b/www/apps/docs/content/references/fulfillment/classes/AbstractFulfillmentService.mdx new file mode 100644 index 0000000000..d7bb33f8f2 --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/classes/AbstractFulfillmentService.mdx @@ -0,0 +1,2939 @@ +--- +displayed_sidebar: modules +slug: /modules/carts-and-checkout/backend/add-fulfillment-provider +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# How to Create a Fulfillment Provider + +In this document, you’ll learn how to create a fulfillment provider to a Medusa backend and the methods you must implement in it. If you’re unfamiliar with the Shipping architecture in Medusa, make sure to [check out the overview first](https://docs.medusajs.com/modules/carts-and-checkout/shipping). + +## Overview + +A fulfillment provider is the shipping provider used to fulfill orders and deliver them to customers. An example of a fulfillment provider is FedEx. + +By default, a Medusa Backend has a `manual` fulfillment provider which has minimal implementation. It allows you to accept orders and fulfill them manually. However, you can integrate any fulfillment provider into Medusa, and your fulfillment provider can interact with third-party shipping providers. + +A fulfillment provider is a service that extends the `AbstractFulfillmentService` and implements its methods. So, adding a fulfillment provider is as simple as creating a service file in `src/services`. +The file's name is the fulfillment provider's class name as a slug and without the word `Service`. For example, if you're creating a `MyFulfillmentService` class, the file name is `src/services/my-fulfillment.ts`. + +```ts title=src/services/my-fulfillment.ts +import { AbstractFulfillmentService } from "@medusajs/medusa" + +class MyFulfillmentService extends AbstractFulfillmentService { + // methods here... +} +``` + +--- + +## Identifier Property + +The `FulfillmentProvider` entity has 2 properties: `identifier` and `is_installed`. The `identifier` property in the class is used when the fulfillment provider is created in the database. + +The value of this property is also used to reference the fulfillment provider throughout Medusa. For example, it is used to [add a fulfillment provider](https://docs.medusajs.com/api/admin#regions\_postregionsregionfulfillmentproviders) to a region. + +```ts +class MyFulfillmentService extends AbstractFulfillmentService { + static identifier = "my-fulfillment" + + // ... +} +``` + +--- + +## constructor + +You can use the `constructor` of your fulfillment provider to access the different services in Medusa through dependency injection. +You can also use the constructor to initialize your integration with the third-party provider. For example, if you use a client to connect to the third-party provider’s APIs, you can initialize it in the constructor and use it in other methods in the service. +Additionally, if you’re creating your fulfillment provider as an external plugin to be installed on any Medusa backend and you want to access the options added for the plugin, you can access it in the constructor. + +### Example + +```ts +class MyFulfillmentService extends AbstractFulfillmentService { + static identifier = "my-fulfillment" + + // ... +} +``` + +### Parameters + + [MedusaContainer](../types/MedusaContainer.mdx)", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "registerAdd", + "type": "``(`name`: `string`, `registration`: `T`) => [MedusaContainer](../types/MedusaContainer.mdx)", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + } + ] + }, + { + "name": "config", + "type": "`Record`", + "description": "If this fulfillment provider is created in a plugin, the plugin's options are passed in this parameter.", + "optional": true, + "defaultValue": "", + "expandable": false, + "children": [] + } +]} /> + +___ + +## Methods + +### calculatePrice + +This method is used in different places, including: + +1. When the shipping options for a cart are retrieved during checkout. If a shipping option has their `price_type` set to calculated, this method is used to set the amount of the returned shipping option. +2. When a shipping method is created. If the shipping option associated with the method has their `price_type` set to `calculated`, this method is used to set the `price` attribute of the shipping method in the database. +3. When the cart's totals are calculated. + +#### Example + +An example of calculating the price based on some custom logic: + +```ts +class MyFulfillmentService extends AbstractFulfillmentService { + // ... + async calculatePrice( + optionData: Record, + data: Record, + cart: Cart + ): Promise { + return cart.items.length * 1000 + } +} +``` + +If your fulfillment provider does not provide any dynamically calculated rates you can return any static value or throw an error. For example: + +```ts +class MyFulfillmentService extends AbstractFulfillmentService { + // ... + async calculatePrice( + optionData: Record, + data: Record, + cart: Cart + ): Promise { + throw new Error("Method not implemented.") + } +} +``` + +#### Parameters + +`", + "description": "The context of the cart which can include info like IP or user agent.", + "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": "customer", + "type": "[Customer](Customer.mdx)", + "description": "The details of the customer the cart belongs to.", + "optional": false, + "defaultValue": "", + "expandable": true, + "children": [] + }, + { + "name": "customer_id", + "type": "`string`", + "description": "The customer's ID", + "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": "discount_total", + "type": "`number`", + "description": "The total of discount rounded", + "optional": true, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "discounts", + "type": "[Discount](Discount.mdx)[]", + "description": "An array of details of all discounts applied to the cart.", + "optional": false, + "defaultValue": "", + "expandable": true, + "children": [] + }, + { + "name": "email", + "type": "`string`", + "description": "The email associated with the cart", + "optional": false, + "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": "gift_card_total", + "type": "`number`", + "description": "The total of gift cards", + "optional": true, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "gift_cards", + "type": "[GiftCard](GiftCard.mdx)[]", + "description": "An array of details of all gift cards applied to the cart.", + "optional": false, + "defaultValue": "", + "expandable": true, + "children": [] + }, + { + "name": "id", + "type": "`string`", + "description": "The cart's ID", + "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": "item_tax_total", + "type": "`null` \\| `number`", + "description": "The total of items with taxes", + "optional": true, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "items", + "type": "[LineItem](LineItem.mdx)[]", + "description": "The line items added to the cart.", + "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": "object", + "type": "`\"cart\"`", + "description": "", + "optional": false, + "defaultValue": "\"cart\"", + "expandable": false, + "children": [] + }, + { + "name": "payment", + "type": "[Payment](Payment.mdx)", + "description": "The details of the payment associated with the cart.", + "optional": false, + "defaultValue": "", + "expandable": true, + "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": "payment_id", + "type": "`string`", + "description": "The payment's ID if available", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "payment_session", + "type": "`null` \\| [PaymentSession](PaymentSession.mdx)", + "description": "The details of the selected payment session in the cart.", + "optional": false, + "defaultValue": "", + "expandable": true, + "children": [] + }, + { + "name": "payment_sessions", + "type": "[PaymentSession](PaymentSession.mdx)[]", + "description": "The details of all payment sessions created on the cart.", + "optional": false, + "defaultValue": "", + "expandable": true, + "children": [] + }, + { + "name": "raw_discount_total", + "type": "`number`", + "description": "The total of discount", + "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": "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": "region", + "type": "[Region](Region.mdx)", + "description": "The details of the region associated with 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": "sales_channel", + "type": "[SalesChannel](SalesChannel.mdx)", + "description": "The details of the sales channel associated with the cart.", + "optional": false, + "defaultValue": "", + "expandable": true, + "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": "shipping_address", + "type": "`null` \\| [Address](Address.mdx)", + "description": "The details of the shipping 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_methods", + "type": "[ShippingMethod](ShippingMethod.mdx)[]", + "description": "The details of the shipping methods added to the cart.", + "optional": false, + "defaultValue": "", + "expandable": true, + "children": [] + }, + { + "name": "shipping_tax_total", + "type": "`null` \\| `number`", + "description": "The total of shipping with taxes", + "optional": true, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "shipping_total", + "type": "`number`", + "description": "The total of shipping", + "optional": true, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "subtotal", + "type": "`number`", + "description": "The subtotal of the cart", + "optional": true, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "tax_total", + "type": "`null` \\| `number`", + "description": "The total of tax", + "optional": true, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "total", + "type": "`number`", + "description": "The total amount of the cart", + "optional": true, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "type", + "type": "[CartType](../enums/CartType.mdx)", + "description": "The cart's type.", + "optional": false, + "defaultValue": "default", + "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": [] + } + ] + } +]} /> + +#### Returns + + + +___ + +### canCalculate + +This method is used to determine whether a shipping option is calculated dynamically or flat rate. It is called if the `price_type` of the shipping option being created is set to calculated. + +#### Example + +```ts +class MyFulfillmentService extends AbstractFulfillmentService { + // ... + async canCalculate( + data: Record + ): Promise { + return data.id === "my-fulfillment-dynamic" + } +} +``` + +#### Parameters + + + +#### Returns + + + +___ + +### cancelFulfillment + +This method is called when a fulfillment is cancelled by the admin. This fulfillment can be for an order, a claim, or a swap. + +#### Example + +This is the basic implementation of the method for a fulfillment provider that doesn't interact with a third-party provider to cancel the fulfillment: + +```ts +class MyFulfillmentService extends FulfillmentService { + // ... + async cancelFulfillment( + fulfillment: Record + ): Promise { + return {} + } +} +``` + +#### Parameters + + + +#### Returns + + + +___ + +### createFulfillment + +This method is used when a fulfillment is created for an order, a claim, or a swap. + +#### Example + +Here is a basic implementation of `createFulfillment` for a fulfillment provider that does not interact with any third-party provider to create the fulfillment: + +```ts +class MyFulfillmentService extends AbstractFulfillmentService { + // ... + async createFulfillment( + data: Record, + items: LineItem, + order: Order, + fulfillment: Fulfillment + ) { + // No data is being sent anywhere + // No data to be stored in the fulfillment's data object + return {} + } +} +``` + +#### Parameters + +`", + "description": "An optional key-value map with additional details", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "order", + "type": "[Order](Order.mdx)", + "description": "The details of the order that the line item may belongs to.", + "optional": false, + "defaultValue": "", + "expandable": true, + "children": [] + }, + { + "name": "order_edit", + "type": "`null` \\| [OrderEdit](OrderEdit.mdx)", + "description": "The details of the order edit.", + "optional": true, + "defaultValue": "", + "expandable": true, + "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_id", + "type": "`null` \\| `string`", + "description": "The ID of the order that the line item may belongs to.", + "optional": false, + "defaultValue": "", + "expandable": false, + "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": "original_tax_total", + "type": "`null` \\| `number`", + "description": "The original tax 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": "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": "raw_discount_total", + "type": "`null` \\| `number`", + "description": "The total of discount of the line item", + "optional": true, + "defaultValue": "", + "expandable": false, + "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": "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": "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": "subtotal", + "type": "`null` \\| `number`", + "description": "The subtotal of the line item", + "optional": true, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "swap", + "type": "[Swap](Swap.mdx)", + "description": "The details of the swap that the line item may belong 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": "tax_lines", + "type": "[LineItemTaxLine](LineItemTaxLine.mdx)[]", + "description": "The details of the item's tax lines.", + "optional": false, + "defaultValue": "", + "expandable": true, + "children": [] + }, + { + "name": "tax_total", + "type": "`null` \\| `number`", + "description": "The total of tax of the line item", + "optional": true, + "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": "title", + "type": "`string`", + "description": "The title of the Line Item.", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "total", + "type": "`null` \\| `number`", + "description": "The total amount of the line item", + "optional": true, + "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": "updated_at", + "type": "`Date`", + "description": "The date with timezone at which the resource was updated.", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "variant", + "type": "[ProductVariant](ProductVariant.mdx)", + "description": "The details of the product variant that this item was created from.", + "optional": false, + "defaultValue": "", + "expandable": true, + "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": "order", + "type": "[Order](Order.mdx)", + "description": "An order is a purchase made by a customer. It holds details about payment and fulfillment of the order. An order may also be created from a draft order, which is created by an admin user.", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [ + { + "name": "billing_address", + "type": "[Address](Address.mdx)", + "description": "The details of the billing address associated with the order.", + "optional": false, + "defaultValue": "", + "expandable": true, + "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": "canceled_at", + "type": "`Date`", + "description": "The date the order was canceled on.", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "cart", + "type": "[Cart](Cart.mdx)", + "description": "The details of the cart associated with the order.", + "optional": false, + "defaultValue": "", + "expandable": true, + "children": [] + }, + { + "name": "cart_id", + "type": "`string`", + "description": "The ID of the cart associated with the order", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "claims", + "type": "[ClaimOrder](ClaimOrder.mdx)[]", + "description": "The details of the claims created for the order.", + "optional": false, + "defaultValue": "", + "expandable": true, + "children": [] + }, + { + "name": "created_at", + "type": "`Date`", + "description": "The date with timezone at which the resource was created.", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "currency", + "type": "[Currency](Currency.mdx)", + "description": "The details of the currency used in the order.", + "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": "customer", + "type": "[Customer](Customer.mdx)", + "description": "The details of the customer 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": "discount_total", + "type": "`number`", + "description": "The total of discount rounded", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "discounts", + "type": "[Discount](Discount.mdx)[]", + "description": "The details of the discounts applied on the order.", + "optional": false, + "defaultValue": "", + "expandable": true, + "children": [] + }, + { + "name": "display_id", + "type": "`number`", + "description": "The order's display ID", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "draft_order", + "type": "[DraftOrder](DraftOrder.mdx)", + "description": "The details of the draft order this order was created from.", + "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": "edits", + "type": "[OrderEdit](OrderEdit.mdx)[]", + "description": "The details of the order edits done on 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": "external_id", + "type": "`null` \\| `string`", + "description": "The ID of an external order.", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "fulfillment_status", + "type": "[FulfillmentStatus](../enums/FulfillmentStatus.mdx)", + "description": "The order's fulfillment status", + "optional": false, + "defaultValue": "not_fulfilled", + "expandable": false, + "children": [] + }, + { + "name": "fulfillments", + "type": "[Fulfillment](Fulfillment.mdx)[]", + "description": "The details of the fulfillments created for the order.", + "optional": false, + "defaultValue": "", + "expandable": true, + "children": [] + }, + { + "name": "gift_card_tax_total", + "type": "`number`", + "description": "The total of gift cards with taxes", + "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_transactions", + "type": "[GiftCardTransaction](GiftCardTransaction.mdx)[]", + "description": "The gift card transactions made in the order.", + "optional": false, + "defaultValue": "", + "expandable": true, + "children": [] + }, + { + "name": "gift_cards", + "type": "[GiftCard](GiftCard.mdx)[]", + "description": "The details of the gift card used in the order.", + "optional": false, + "defaultValue": "", + "expandable": true, + "children": [] + }, + { + "name": "id", + "type": "`string`", + "description": "The order's ID", + "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": "item_tax_total", + "type": "`null` \\| `number`", + "description": "The tax total applied on items", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "items", + "type": "[LineItem](LineItem.mdx)[]", + "description": "The details of the line items that belong to the order.", + "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": "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": "object", + "type": "`\"order\"`", + "description": "", + "optional": false, + "defaultValue": "\"order\"", + "expandable": false, + "children": [] + }, + { + "name": "paid_total", + "type": "`number`", + "description": "The total amount paid", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "payment_status", + "type": "[PaymentStatus](../enums/PaymentStatus.mdx)", + "description": "The order's payment status", + "optional": false, + "defaultValue": "not_paid", + "expandable": false, + "children": [] + }, + { + "name": "payments", + "type": "[Payment](Payment.mdx)[]", + "description": "The details of the payments used in the order.", + "optional": false, + "defaultValue": "", + "expandable": true, + "children": [] + }, + { + "name": "raw_discount_total", + "type": "`number`", + "description": "The total of discount", + "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": "refunded_total", + "type": "`number`", + "description": "The total amount refunded if the order is returned.", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "refunds", + "type": "[Refund](Refund.mdx)[]", + "description": "The details of the refunds created for the order.", + "optional": false, + "defaultValue": "", + "expandable": true, + "children": [] + }, + { + "name": "region", + "type": "[Region](Region.mdx)", + "description": "The details of the region this order was created in.", + "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": "returnable_items", + "type": "[LineItem](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": "returns", + "type": "[Return](Return.mdx)[]", + "description": "The details of the returns created for the order.", + "optional": false, + "defaultValue": "", + "expandable": true, + "children": [] + }, + { + "name": "sales_channel", + "type": "[SalesChannel](SalesChannel.mdx)", + "description": "The details of the sales channel this order belongs to.", + "optional": false, + "defaultValue": "", + "expandable": true, + "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": "shipping_address", + "type": "[Address](Address.mdx)", + "description": "The details of the shipping 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_methods", + "type": "[ShippingMethod](ShippingMethod.mdx)[]", + "description": "The details of the shipping methods used in the order.", + "optional": false, + "defaultValue": "", + "expandable": true, + "children": [] + }, + { + "name": "shipping_tax_total", + "type": "`null` \\| `number`", + "description": "The tax total applied on shipping", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "shipping_total", + "type": "`number`", + "description": "The total of shipping", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "status", + "type": "[OrderStatus](../enums/OrderStatus.mdx)", + "description": "The order's status", + "optional": false, + "defaultValue": "pending", + "expandable": false, + "children": [] + }, + { + "name": "subtotal", + "type": "`number`", + "description": "The subtotal of the order", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "swaps", + "type": "[Swap](Swap.mdx)[]", + "description": "The details of the swaps created for 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": "tax_total", + "type": "`null` \\| `number`", + "description": "The total of tax", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "total", + "type": "`number`", + "description": "The total amount of the order", + "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": "fulfillment", + "type": "[Fulfillment](Fulfillment.mdx)", + "description": "A Fulfillment is created once an admin can prepare the purchased goods. Fulfillments will eventually be shipped and hold information about how to track shipments. Fulfillments are created through a fulfillment provider, which typically integrates a third-party shipping service. Fulfillments can be associated with orders, claims, swaps, and returns.", + "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": "claim_order", + "type": "[ClaimOrder](ClaimOrder.mdx)", + "description": "The details of the claim that the fulfillment may belong to.", + "optional": false, + "defaultValue": "", + "expandable": true, + "children": [] + }, + { + "name": "claim_order_id", + "type": "`string`", + "description": "The ID of the Claim that the Fulfillment belongs to.", + "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": "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": "id", + "type": "`string`", + "description": "The fulfillment's ID", + "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": "items", + "type": "[FulfillmentItem](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": "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": "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 sent.", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "order", + "type": "[Order](Order.mdx)", + "description": "The details of the order that the fulfillment may belong to.", + "optional": false, + "defaultValue": "", + "expandable": true, + "children": [] + }, + { + "name": "order_id", + "type": "`string`", + "description": "The ID of the Order that the Fulfillment belongs to.", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "provider", + "type": "[FulfillmentProvider](FulfillmentProvider.mdx)", + "description": "The details of the fulfillment provider responsible for handling the fulfillment.", + "optional": false, + "defaultValue": "", + "expandable": true, + "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": "shipped_at", + "type": "`Date`", + "description": "The date with timezone at which the Fulfillment was shipped.", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "swap", + "type": "[Swap](Swap.mdx)", + "description": "The details of the swap that the fulfillment may belong to.", + "optional": false, + "defaultValue": "", + "expandable": true, + "children": [] + }, + { + "name": "swap_id", + "type": "`string`", + "description": "The ID of the Swap that the Fulfillment belongs to.", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "tracking_links", + "type": "[TrackingLink](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": "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": "updated_at", + "type": "`Date`", + "description": "The date with timezone at which the resource was updated.", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + } + ] + } +]} /> + +#### Returns + +`", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + } + ] + } +]} /> + +___ + +### createReturn + +Fulfillment providers can also be used to return products. A shipping option can be used for returns if the `is_return` property is true or if an admin creates a Return Shipping Option from the settings. +This method is used when the admin [creates a return request](https://docs.medusajs.com/api/admin#orders\_postordersorderreturns) for an order, +[creates a swap](https://docs.medusajs.com/api/admin#orders\_postordersorderswaps) for an order, or when the +[customer creates a return of their order](https://docs.medusajs.com/api/store#returns\_postreturns). The fulfillment is created automatically for the order return. + +#### Example + +This is the basic implementation of the method for a fulfillment provider that does not contact with a third-party provider to fulfill the return: + +```ts +class MyFulfillmentService extends AbstractFulfillmentService { + // ... + async createReturn( + returnOrder: CreateReturnType + ): Promise> { + return {} + } +} +``` + +#### Parameters + +`", + "description": "An optional key-value map with additional details", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "no_notification", + "type": "`null` \\| `boolean`", + "description": "When set to true, no notification will be sent related to this return.", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "order", + "type": "[Order](Order.mdx)", + "description": "The details of the order that the return was created for.", + "optional": false, + "defaultValue": "", + "expandable": true, + "children": [] + }, + { + "name": "order_id", + "type": "`null` \\| `string`", + "description": "The ID of the order that the return was created for.", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "received_at", + "type": "`Date`", + "description": "The date with timezone at which the return was received.", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "refund_amount", + "type": "`number`", + "description": "The amount that should be refunded as a result of the return.", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "shipping_data", + "type": "`Record`", + "description": "Data about the return shipment as provided by the Fulfilment Provider that handles the return shipment.", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "shipping_method", + "type": "[ShippingMethod](ShippingMethod.mdx)", + "description": "The details of the Shipping Method that will be used to send the Return back. Can be null if the Customer will handle the return shipment themselves.", + "optional": false, + "defaultValue": "", + "expandable": true, + "children": [] + }, + { + "name": "status", + "type": "[ReturnStatus](../enums/ReturnStatus.mdx)", + "description": "Status of the Return.", + "optional": false, + "defaultValue": "requested", + "expandable": false, + "children": [] + }, + { + "name": "swap", + "type": "[Swap](Swap.mdx)", + "description": "The details of the swap that the return may belong to.", + "optional": false, + "defaultValue": "", + "expandable": true, + "children": [] + }, + { + "name": "swap_id", + "type": "`null` \\| `string`", + "description": "The ID of the swap that the return may belong to.", + "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": [] + } + ] + } +]} /> + +#### Returns + +`", + "optional": false, + "defaultValue": "", + "description": "", + "expandable": false, + "children": [] + } + ] + } +]} /> + +___ + +### getFulfillmentDocuments + +This method is used to retrieve any documents associated with a fulfillment. This method isn't used by default in the backend, but you can use it for custom use cases such as allowing admins to download these documents. + +#### Example + +```ts +class MyFulfillmentService extends FulfillmentService { + // ... + async getFulfillmentDocuments( + data: Record + ): Promise { + // assuming you contact a client to + // retrieve the document + return this.client.getFulfillmentDocuments() + } +} +``` + +#### Parameters + + + +#### Returns + + + +___ + +### getFulfillmentOptions + +This method is used when retrieving the list of fulfillment options available in a region, particularly by the [List Fulfillment Options API Route](https://docs.medusajs.com/api/admin#regions\_getregionsregionfulfillmentoptions). +For example, if you’re integrating UPS as a fulfillment provider, you might support two fulfillment options: UPS Express Shipping and UPS Access Point. Each of these options can have different data associated with them. + +#### Example + +```ts +class MyFulfillmentService extends AbstractFulfillmentService { + // ... + async getFulfillmentOptions(): Promise { + return [ + { + id: "my-fulfillment", + }, + { + id: "my-fulfillment-dynamic", + }, + ] + } +} +``` + +#### Returns + + + +___ + +### getReturnDocuments + +This method is used to retrieve any documents associated with a return. This method isn't used by default in the backend, but you can use it for custom use cases such as allowing admins to download these documents. + +#### Example + +```ts +class MyFulfillmentService extends FulfillmentService { + // ... + async getReturnDocuments( + data: Record + ): Promise { + // assuming you contact a client to + // retrieve the document + return this.client.getReturnDocuments() + } +} +``` + +#### Parameters + +`", + "description": "The data attribute of the return that you're retrieving the documents for.", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + } +]} /> + +#### Returns + + + +___ + +### getShipmentDocuments + +This method is used to retrieve any documents associated with a shipment. This method isn't used by default in the backend, but you can use it for custom use cases such as allowing admins to download these documents. + +#### Example + +```ts +class MyFulfillmentService extends FulfillmentService { + // ... + async getShipmentDocuments( + data: Record + ): Promise { + // assuming you contact a client to + // retrieve the document + return this.client.getShipmentDocuments() + } +} +``` + +#### Parameters + +`", + "description": "The `data` attribute of the shipment that you're retrieving the documents for.", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + } +]} /> + +#### Returns + + + +___ + +### retrieveDocuments + +This method is used to retrieve any documents associated with an order and its fulfillments. This method isn't used by default in the backend, but you can use it for +custom use cases such as allowing admins to download these documents. + +#### Example + +```ts +class MyFulfillmentService extends FulfillmentService { + // ... + async retrieveDocuments( + fulfillmentData: Record, + documentType: "invoice" | "label" + ): Promise { + // assuming you contact a client to + // retrieve the document + return this.client.getDocuments() + } +} +``` + +#### Parameters + +`", + "description": "The `data` attribute of the order's fulfillment.", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "documentType", + "type": "`\"label\"` \\| `\"invoice\"`", + "description": "The type of document to retrieve.", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + } +]} /> + +#### Returns + + + +___ + +### validateFulfillmentData + +This method is called when a shipping method is created. This typically happens when the customer chooses a shipping option during checkout, when a shipping method is created +for an order return, or in other similar cases. The shipping option and its data are validated before the shipping method is created. + +You can use the provided parameters to validate the chosen shipping option. For example, you can check if the `data` object passed as a second parameter includes all data needed to +fulfill the shipment later on. + +If any of the data is invalid, you can throw an error. This error will stop Medusa from creating a shipping method and the error message will be returned as a result of the API Route. + +#### Example + +```ts +class MyFulfillmentService extends AbstractFulfillmentService { + // ... + async validateFulfillmentData( + optionData: Record, + data: Record, + cart: Cart + ): Promise> { + if (data.id !== "my-fulfillment") { + throw new Error("invalid data") + } + + return { + ...data, + } + } +} +``` + +#### Parameters + +`", + "description": "The context of the cart which can include info like IP or user agent.", + "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": "customer", + "type": "[Customer](Customer.mdx)", + "description": "The details of the customer the cart belongs to.", + "optional": false, + "defaultValue": "", + "expandable": true, + "children": [] + }, + { + "name": "customer_id", + "type": "`string`", + "description": "The customer's ID", + "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": "discount_total", + "type": "`number`", + "description": "The total of discount rounded", + "optional": true, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "discounts", + "type": "[Discount](Discount.mdx)[]", + "description": "An array of details of all discounts applied to the cart.", + "optional": false, + "defaultValue": "", + "expandable": true, + "children": [] + }, + { + "name": "email", + "type": "`string`", + "description": "The email associated with the cart", + "optional": false, + "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": "gift_card_total", + "type": "`number`", + "description": "The total of gift cards", + "optional": true, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "gift_cards", + "type": "[GiftCard](GiftCard.mdx)[]", + "description": "An array of details of all gift cards applied to the cart.", + "optional": false, + "defaultValue": "", + "expandable": true, + "children": [] + }, + { + "name": "id", + "type": "`string`", + "description": "The cart's ID", + "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": "item_tax_total", + "type": "`null` \\| `number`", + "description": "The total of items with taxes", + "optional": true, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "items", + "type": "[LineItem](LineItem.mdx)[]", + "description": "The line items added to the cart.", + "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": "object", + "type": "`\"cart\"`", + "description": "", + "optional": false, + "defaultValue": "\"cart\"", + "expandable": false, + "children": [] + }, + { + "name": "payment", + "type": "[Payment](Payment.mdx)", + "description": "The details of the payment associated with the cart.", + "optional": false, + "defaultValue": "", + "expandable": true, + "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": "payment_id", + "type": "`string`", + "description": "The payment's ID if available", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "payment_session", + "type": "`null` \\| [PaymentSession](PaymentSession.mdx)", + "description": "The details of the selected payment session in the cart.", + "optional": false, + "defaultValue": "", + "expandable": true, + "children": [] + }, + { + "name": "payment_sessions", + "type": "[PaymentSession](PaymentSession.mdx)[]", + "description": "The details of all payment sessions created on the cart.", + "optional": false, + "defaultValue": "", + "expandable": true, + "children": [] + }, + { + "name": "raw_discount_total", + "type": "`number`", + "description": "The total of discount", + "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": "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": "region", + "type": "[Region](Region.mdx)", + "description": "The details of the region associated with 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": "sales_channel", + "type": "[SalesChannel](SalesChannel.mdx)", + "description": "The details of the sales channel associated with the cart.", + "optional": false, + "defaultValue": "", + "expandable": true, + "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": "shipping_address", + "type": "`null` \\| [Address](Address.mdx)", + "description": "The details of the shipping 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_methods", + "type": "[ShippingMethod](ShippingMethod.mdx)[]", + "description": "The details of the shipping methods added to the cart.", + "optional": false, + "defaultValue": "", + "expandable": true, + "children": [] + }, + { + "name": "shipping_tax_total", + "type": "`null` \\| `number`", + "description": "The total of shipping with taxes", + "optional": true, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "shipping_total", + "type": "`number`", + "description": "The total of shipping", + "optional": true, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "subtotal", + "type": "`number`", + "description": "The subtotal of the cart", + "optional": true, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "tax_total", + "type": "`null` \\| `number`", + "description": "The total of tax", + "optional": true, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "total", + "type": "`number`", + "description": "The total amount of the cart", + "optional": true, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "type", + "type": "[CartType](../enums/CartType.mdx)", + "description": "The cart's type.", + "optional": false, + "defaultValue": "default", + "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": [] + } + ] + } +]} /> + +#### Returns + +`", + "optional": false, + "defaultValue": "", + "description": "", + "expandable": false, + "children": [] + } + ] + } +]} /> + +___ + +### validateOption + +Once the admin creates the shipping option, the data of the shipping option will be validated first using this method. This method is called when the [Create Shipping Option API Route](https://docs.medusajs.com/api/admin#shipping-options\_postshippingoptions) is used. + +#### Example + +For example, you can use this method to ensure that the `id` in the `data` object is correct: + +```ts +class MyFulfillmentService extends AbstractFulfillmentService { + // ... + async validateOption( + data: Record + ): Promise { + return data.id == "my-fulfillment" + } +} +``` + +#### Parameters + + + +#### Returns + + diff --git a/www/apps/docs/content/references/fulfillment/classes/Address.mdx b/www/apps/docs/content/references/fulfillment/classes/Address.mdx new file mode 100644 index 0000000000..7e25f2eef1 --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/classes/Address.mdx @@ -0,0 +1,33 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# Address + +An address is used across the Medusa backend within other schemas and object types. For example, a customer's billing and shipping addresses both use the Address entity. + +## constructor + +An address is used across the Medusa backend within other schemas and object types. For example, a customer's billing and shipping addresses both use the Address entity. + +___ + +## Methods + +### beforeInsert + +#### Returns + + diff --git a/www/apps/docs/content/references/fulfillment/classes/BaseEntity.mdx b/www/apps/docs/content/references/fulfillment/classes/BaseEntity.mdx new file mode 100644 index 0000000000..b254c9e991 --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/classes/BaseEntity.mdx @@ -0,0 +1,11 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# BaseEntity + +Base abstract entity for all entities + +## constructor diff --git a/www/apps/docs/content/references/fulfillment/classes/Cart.mdx b/www/apps/docs/content/references/fulfillment/classes/Cart.mdx new file mode 100644 index 0000000000..80b459c369 --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/classes/Cart.mdx @@ -0,0 +1,51 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# Cart + +A cart represents a virtual shopping bag. It can be used to complete an order, a swap, or a claim. + +## constructor + +A cart represents a virtual shopping bag. It can be used to complete an order, a swap, or a claim. + +___ + +## Methods + +### afterLoad + +#### Returns + + + +___ + +### beforeInsert + +#### Returns + + diff --git a/www/apps/docs/content/references/fulfillment/classes/ClaimImage.mdx b/www/apps/docs/content/references/fulfillment/classes/ClaimImage.mdx new file mode 100644 index 0000000000..85c5bed4b1 --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/classes/ClaimImage.mdx @@ -0,0 +1,33 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# ClaimImage + +The details of an image attached to a claim. + +## constructor + +The details of an image attached to a claim. + +___ + +## Methods + +### beforeInsert + +#### Returns + + diff --git a/www/apps/docs/content/references/fulfillment/classes/ClaimItem.mdx b/www/apps/docs/content/references/fulfillment/classes/ClaimItem.mdx new file mode 100644 index 0000000000..ece9c73cd9 --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/classes/ClaimItem.mdx @@ -0,0 +1,33 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# ClaimItem + +A claim item is an item created as part of a claim. It references an item in the order that should be exchanged or refunded. + +## constructor + +A claim item is an item created as part of a claim. It references an item in the order that should be exchanged or refunded. + +___ + +## Methods + +### beforeInsert + +#### Returns + + diff --git a/www/apps/docs/content/references/fulfillment/classes/ClaimOrder.mdx b/www/apps/docs/content/references/fulfillment/classes/ClaimOrder.mdx new file mode 100644 index 0000000000..684e842ad0 --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/classes/ClaimOrder.mdx @@ -0,0 +1,33 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# ClaimOrder + +A Claim represents a group of faulty or missing items. It consists of claim items that refer to items in the original order that should be replaced or refunded. It also includes details related to shipping and fulfillment. + +## constructor + +A Claim represents a group of faulty or missing items. It consists of claim items that refer to items in the original order that should be replaced or refunded. It also includes details related to shipping and fulfillment. + +___ + +## Methods + +### beforeInsert + +#### Returns + + diff --git a/www/apps/docs/content/references/fulfillment/classes/ClaimTag.mdx b/www/apps/docs/content/references/fulfillment/classes/ClaimTag.mdx new file mode 100644 index 0000000000..1cf3908d6c --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/classes/ClaimTag.mdx @@ -0,0 +1,33 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# ClaimTag + +Claim Tags are user defined tags that can be assigned to claim items for easy filtering and grouping. + +## constructor + +Claim Tags are user defined tags that can be assigned to claim items for easy filtering and grouping. + +___ + +## Methods + +### beforeInsert + +#### Returns + + diff --git a/www/apps/docs/content/references/fulfillment/classes/Country.mdx b/www/apps/docs/content/references/fulfillment/classes/Country.mdx new file mode 100644 index 0000000000..30e822583b --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/classes/Country.mdx @@ -0,0 +1,13 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# Country + +Country details + +## constructor + +Country details diff --git a/www/apps/docs/content/references/fulfillment/classes/Currency.mdx b/www/apps/docs/content/references/fulfillment/classes/Currency.mdx new file mode 100644 index 0000000000..befeb03536 --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/classes/Currency.mdx @@ -0,0 +1,13 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# Currency + +Currency + +## constructor + +Currency diff --git a/www/apps/docs/content/references/fulfillment/classes/Customer.mdx b/www/apps/docs/content/references/fulfillment/classes/Customer.mdx new file mode 100644 index 0000000000..4101640941 --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/classes/Customer.mdx @@ -0,0 +1,33 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# Customer + +A customer can make purchases in your store and manage their profile. + +## constructor + +A customer can make purchases in your store and manage their profile. + +___ + +## Methods + +### beforeInsert + +#### Returns + + diff --git a/www/apps/docs/content/references/fulfillment/classes/CustomerGroup.mdx b/www/apps/docs/content/references/fulfillment/classes/CustomerGroup.mdx new file mode 100644 index 0000000000..e986a54e97 --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/classes/CustomerGroup.mdx @@ -0,0 +1,33 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# CustomerGroup + +A customer group that can be used to organize customers into groups of similar traits. + +## constructor + +A customer group that can be used to organize customers into groups of similar traits. + +___ + +## Methods + +### beforeInsert + +#### Returns + + diff --git a/www/apps/docs/content/references/fulfillment/classes/Discount.mdx b/www/apps/docs/content/references/fulfillment/classes/Discount.mdx new file mode 100644 index 0000000000..fecc31318d --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/classes/Discount.mdx @@ -0,0 +1,33 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# Discount + +A discount can be applied to a cart for promotional purposes. + +## constructor + +A discount can be applied to a cart for promotional purposes. + +___ + +## Methods + +### upperCaseCodeAndTrim + +#### Returns + + diff --git a/www/apps/docs/content/references/fulfillment/classes/DiscountCondition.mdx b/www/apps/docs/content/references/fulfillment/classes/DiscountCondition.mdx new file mode 100644 index 0000000000..add3562b20 --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/classes/DiscountCondition.mdx @@ -0,0 +1,33 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# DiscountCondition + +Holds rule conditions for when a discount is applicable + +## constructor + +Holds rule conditions for when a discount is applicable + +___ + +## Methods + +### beforeInsert + +#### Returns + + diff --git a/www/apps/docs/content/references/fulfillment/classes/DiscountRule.mdx b/www/apps/docs/content/references/fulfillment/classes/DiscountRule.mdx new file mode 100644 index 0000000000..1ad4cfc0ae --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/classes/DiscountRule.mdx @@ -0,0 +1,33 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# DiscountRule + +A discount rule defines how a Discount is calculated when applied to a Cart. + +## constructor + +A discount rule defines how a Discount is calculated when applied to a Cart. + +___ + +## Methods + +### beforeInsert + +#### Returns + + diff --git a/www/apps/docs/content/references/fulfillment/classes/DraftOrder.mdx b/www/apps/docs/content/references/fulfillment/classes/DraftOrder.mdx new file mode 100644 index 0000000000..67282b12ed --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/classes/DraftOrder.mdx @@ -0,0 +1,33 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# DraftOrder + +A draft order is created by an admin without direct involvement of the customer. Once its payment is marked as captured, it is transformed into an order. + +## constructor + +A draft order is created by an admin without direct involvement of the customer. Once its payment is marked as captured, it is transformed into an order. + +___ + +## Methods + +### beforeInsert + +#### Returns + + diff --git a/www/apps/docs/content/references/fulfillment/classes/Fulfillment.mdx b/www/apps/docs/content/references/fulfillment/classes/Fulfillment.mdx new file mode 100644 index 0000000000..8fcef3503c --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/classes/Fulfillment.mdx @@ -0,0 +1,33 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# Fulfillment + +A Fulfillment is created once an admin can prepare the purchased goods. Fulfillments will eventually be shipped and hold information about how to track shipments. Fulfillments are created through a fulfillment provider, which typically integrates a third-party shipping service. Fulfillments can be associated with orders, claims, swaps, and returns. + +## constructor + +A Fulfillment is created once an admin can prepare the purchased goods. Fulfillments will eventually be shipped and hold information about how to track shipments. Fulfillments are created through a fulfillment provider, which typically integrates a third-party shipping service. Fulfillments can be associated with orders, claims, swaps, and returns. + +___ + +## Methods + +### beforeInsert + +#### Returns + + diff --git a/www/apps/docs/content/references/fulfillment/classes/FulfillmentItem.mdx b/www/apps/docs/content/references/fulfillment/classes/FulfillmentItem.mdx new file mode 100644 index 0000000000..4025a05220 --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/classes/FulfillmentItem.mdx @@ -0,0 +1,13 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# FulfillmentItem + +This represents the association between a Line Item and a Fulfillment. + +## constructor + +This represents the association between a Line Item and a Fulfillment. diff --git a/www/apps/docs/content/references/fulfillment/classes/FulfillmentProvider.mdx b/www/apps/docs/content/references/fulfillment/classes/FulfillmentProvider.mdx new file mode 100644 index 0000000000..239dbc5bc9 --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/classes/FulfillmentProvider.mdx @@ -0,0 +1,13 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# FulfillmentProvider + +A fulfillment provider represents a fulfillment service installed in the Medusa backend, either through a plugin or backend customizations. It holds the fulfillment service's installation status. + +## constructor + +A fulfillment provider represents a fulfillment service installed in the Medusa backend, either through a plugin or backend customizations. It holds the fulfillment service's installation status. diff --git a/www/apps/docs/content/references/fulfillment/classes/GiftCard.mdx b/www/apps/docs/content/references/fulfillment/classes/GiftCard.mdx new file mode 100644 index 0000000000..a43aa34a55 --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/classes/GiftCard.mdx @@ -0,0 +1,33 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# GiftCard + +Gift Cards are redeemable and represent a value that can be used towards the payment of an Order. + +## constructor + +Gift Cards are redeemable and represent a value that can be used towards the payment of an Order. + +___ + +## Methods + +### beforeInsert + +#### Returns + + diff --git a/www/apps/docs/content/references/fulfillment/classes/GiftCardTransaction.mdx b/www/apps/docs/content/references/fulfillment/classes/GiftCardTransaction.mdx new file mode 100644 index 0000000000..520cbf6bd3 --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/classes/GiftCardTransaction.mdx @@ -0,0 +1,33 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# GiftCardTransaction + +Gift Card Transactions are created once a Customer uses a Gift Card to pay for their Order. + +## constructor + +Gift Card Transactions are created once a Customer uses a Gift Card to pay for their Order. + +___ + +## Methods + +### beforeInsert + +#### Returns + + diff --git a/www/apps/docs/content/references/fulfillment/classes/Image.mdx b/www/apps/docs/content/references/fulfillment/classes/Image.mdx new file mode 100644 index 0000000000..15fcc60c88 --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/classes/Image.mdx @@ -0,0 +1,33 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# Image + +An Image is used to store details about uploaded images. Images are uploaded by the File Service, and the URL is provided by the File Service. + +## constructor + +An Image is used to store details about uploaded images. Images are uploaded by the File Service, and the URL is provided by the File Service. + +___ + +## Methods + +### beforeInsert + +#### Returns + + diff --git a/www/apps/docs/content/references/fulfillment/classes/LineItem.mdx b/www/apps/docs/content/references/fulfillment/classes/LineItem.mdx new file mode 100644 index 0000000000..0db90039c2 --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/classes/LineItem.mdx @@ -0,0 +1,69 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# LineItem + +Line Items are created when a product is added to a Cart. When Line Items are purchased they will get copied to the resulting order, swap, or claim, and can eventually be referenced in Fulfillments and Returns. Line items may also be used for order edits. + +## constructor + +Line Items are created when a product is added to a Cart. When Line Items are purchased they will get copied to the resulting order, swap, or claim, and can eventually be referenced in Fulfillments and Returns. Line items may also be used for order edits. + +___ + +## Methods + +### afterUpdateOrLoad + +#### Returns + + + +___ + +### beforeInsert + +#### Returns + + + +___ + +### beforeUpdate + +#### Returns + + diff --git a/www/apps/docs/content/references/fulfillment/classes/LineItemAdjustment.mdx b/www/apps/docs/content/references/fulfillment/classes/LineItemAdjustment.mdx new file mode 100644 index 0000000000..e25b05584a --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/classes/LineItemAdjustment.mdx @@ -0,0 +1,33 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# LineItemAdjustment + +A Line Item Adjustment includes details on discounts applied on a line item. + +## constructor + +A Line Item Adjustment includes details on discounts applied on a line item. + +___ + +## Methods + +### beforeInsert + +#### Returns + + diff --git a/www/apps/docs/content/references/fulfillment/classes/LineItemTaxLine.mdx b/www/apps/docs/content/references/fulfillment/classes/LineItemTaxLine.mdx new file mode 100644 index 0000000000..4e84930c98 --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/classes/LineItemTaxLine.mdx @@ -0,0 +1,33 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# LineItemTaxLine + +A Line Item Tax Line represents the taxes applied on a line item. + +## constructor + +A Line Item Tax Line represents the taxes applied on a line item. + +___ + +## Methods + +### beforeInsert + +#### Returns + + diff --git a/www/apps/docs/content/references/fulfillment/classes/MoneyAmount.mdx b/www/apps/docs/content/references/fulfillment/classes/MoneyAmount.mdx new file mode 100644 index 0000000000..215796359e --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/classes/MoneyAmount.mdx @@ -0,0 +1,69 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# MoneyAmount + +A Money Amount represent a price amount, for example, a product variant's price or a price in a price list. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based pricing, the given price in a specific Region. If region-based pricing is used, the amount will be in the currency defined for the Region. + +## constructor + +A Money Amount represent a price amount, for example, a product variant's price or a price in a price list. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based pricing, the given price in a specific Region. If region-based pricing is used, the amount will be in the currency defined for the Region. + +___ + +## Methods + +### afterLoad + +#### Returns + + + +___ + +### beforeInsert + +#### Returns + + + +___ + +### beforeUpdate + +#### Returns + + diff --git a/www/apps/docs/content/references/fulfillment/classes/Order.mdx b/www/apps/docs/content/references/fulfillment/classes/Order.mdx new file mode 100644 index 0000000000..63a69901bd --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/classes/Order.mdx @@ -0,0 +1,33 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# Order + +An order is a purchase made by a customer. It holds details about payment and fulfillment of the order. An order may also be created from a draft order, which is created by an admin user. + +## constructor + +An order is a purchase made by a customer. It holds details about payment and fulfillment of the order. An order may also be created from a draft order, which is created by an admin user. + +___ + +## Methods + +### beforeInsert + +#### Returns + + diff --git a/www/apps/docs/content/references/fulfillment/classes/OrderEdit.mdx b/www/apps/docs/content/references/fulfillment/classes/OrderEdit.mdx new file mode 100644 index 0000000000..fd6205f966 --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/classes/OrderEdit.mdx @@ -0,0 +1,51 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# OrderEdit + +Order edit allows modifying items in an order, such as adding, updating, or deleting items from the original order. Once the order edit is confirmed, the changes are reflected on the original order. + +## constructor + +Order edit allows modifying items in an order, such as adding, updating, or deleting items from the original order. Once the order edit is confirmed, the changes are reflected on the original order. + +___ + +## Methods + +### beforeInsert + +#### Returns + + + +___ + +### loadStatus + +#### Returns + + diff --git a/www/apps/docs/content/references/fulfillment/classes/OrderItemChange.mdx b/www/apps/docs/content/references/fulfillment/classes/OrderItemChange.mdx new file mode 100644 index 0000000000..d575cefa43 --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/classes/OrderItemChange.mdx @@ -0,0 +1,33 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# OrderItemChange + +An order item change is a change made within an order edit to an order's items. These changes are not reflected on the original order until the order edit is confirmed. + +## constructor + +An order item change is a change made within an order edit to an order's items. These changes are not reflected on the original order until the order edit is confirmed. + +___ + +## Methods + +### beforeInsert + +#### Returns + + diff --git a/www/apps/docs/content/references/fulfillment/classes/Payment.mdx b/www/apps/docs/content/references/fulfillment/classes/Payment.mdx new file mode 100644 index 0000000000..c70dcbd0c9 --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/classes/Payment.mdx @@ -0,0 +1,33 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# Payment + +A payment is originally created from a payment session. Once a payment session is authorized, the payment is created to represent the authorized amount with a given payment method. Payments can be captured, canceled or refunded. Payments can be made towards orders, swaps, order edits, or other resources. + +## constructor + +A payment is originally created from a payment session. Once a payment session is authorized, the payment is created to represent the authorized amount with a given payment method. Payments can be captured, canceled or refunded. Payments can be made towards orders, swaps, order edits, or other resources. + +___ + +## Methods + +### beforeInsert + +#### Returns + + diff --git a/www/apps/docs/content/references/fulfillment/classes/PaymentCollection.mdx b/www/apps/docs/content/references/fulfillment/classes/PaymentCollection.mdx new file mode 100644 index 0000000000..92920258c2 --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/classes/PaymentCollection.mdx @@ -0,0 +1,33 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# PaymentCollection + +A payment collection allows grouping and managing a list of payments at one. This can be helpful when making additional payment for order edits or integrating installment payments. + +## constructor + +A payment collection allows grouping and managing a list of payments at one. This can be helpful when making additional payment for order edits or integrating installment payments. + +___ + +## Methods + +### beforeInsert + +#### Returns + + diff --git a/www/apps/docs/content/references/fulfillment/classes/PaymentProvider.mdx b/www/apps/docs/content/references/fulfillment/classes/PaymentProvider.mdx new file mode 100644 index 0000000000..fb762308d4 --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/classes/PaymentProvider.mdx @@ -0,0 +1,13 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# PaymentProvider + +A payment provider represents a payment service installed in the Medusa backend, either through a plugin or backend customizations. It holds the payment service's installation status. + +## constructor + +A payment provider represents a payment service installed in the Medusa backend, either through a plugin or backend customizations. It holds the payment service's installation status. diff --git a/www/apps/docs/content/references/fulfillment/classes/PaymentSession.mdx b/www/apps/docs/content/references/fulfillment/classes/PaymentSession.mdx new file mode 100644 index 0000000000..a53fdec569 --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/classes/PaymentSession.mdx @@ -0,0 +1,33 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# PaymentSession + +A Payment Session is created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, which is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for payment processing such as capture or refund. Payment sessions can also be used as part of payment collections. + +## constructor + +A Payment Session is created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, which is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for payment processing such as capture or refund. Payment sessions can also be used as part of payment collections. + +___ + +## Methods + +### beforeInsert + +#### Returns + + diff --git a/www/apps/docs/content/references/fulfillment/classes/PriceList.mdx b/www/apps/docs/content/references/fulfillment/classes/PriceList.mdx new file mode 100644 index 0000000000..d7a32e70ae --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/classes/PriceList.mdx @@ -0,0 +1,33 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# PriceList + +A Price List represents a set of prices that override the default price for one or more product variants. + +## constructor + +A Price List represents a set of prices that override the default price for one or more product variants. + +___ + +## Methods + +### beforeInsert + +#### Returns + + diff --git a/www/apps/docs/content/references/fulfillment/classes/Product.mdx b/www/apps/docs/content/references/fulfillment/classes/Product.mdx new file mode 100644 index 0000000000..7ac0b815cd --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/classes/Product.mdx @@ -0,0 +1,69 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# Product + +A product is a saleable item that holds general information such as name or description. It must include at least one Product Variant, where each product variant defines different options to purchase the product with (for example, different sizes or colors). The prices and inventory of the product are defined on the variant level. + +## constructor + +A product is a saleable item that holds general information such as name or description. It must include at least one Product Variant, where each product variant defines different options to purchase the product with (for example, different sizes or colors). The prices and inventory of the product are defined on the variant level. + +___ + +## Methods + +### afterLoad + +#### Returns + + + +___ + +### beforeInsert + +#### Returns + + + +___ + +### beforeUpdate + +#### Returns + + diff --git a/www/apps/docs/content/references/fulfillment/classes/ProductCategory.mdx b/www/apps/docs/content/references/fulfillment/classes/ProductCategory.mdx new file mode 100644 index 0000000000..1f7a2f961d --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/classes/ProductCategory.mdx @@ -0,0 +1,33 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# ProductCategory + +A product category can be used to categorize products into a hierarchy of categories. + +## constructor + +A product category can be used to categorize products into a hierarchy of categories. + +___ + +## Methods + +### beforeInsert + +#### Returns + + diff --git a/www/apps/docs/content/references/fulfillment/classes/ProductCollection.mdx b/www/apps/docs/content/references/fulfillment/classes/ProductCollection.mdx new file mode 100644 index 0000000000..392da34c7d --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/classes/ProductCollection.mdx @@ -0,0 +1,33 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# ProductCollection + +A Product Collection allows grouping together products for promotional purposes. For example, an admin can create a Summer collection, add products to it, and showcase it on the storefront. + +## constructor + +A Product Collection allows grouping together products for promotional purposes. For example, an admin can create a Summer collection, add products to it, and showcase it on the storefront. + +___ + +## Methods + +### createHandleIfNotProvided + +#### Returns + + diff --git a/www/apps/docs/content/references/fulfillment/classes/ProductOption.mdx b/www/apps/docs/content/references/fulfillment/classes/ProductOption.mdx new file mode 100644 index 0000000000..a2bb9095bb --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/classes/ProductOption.mdx @@ -0,0 +1,33 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# ProductOption + +A Product Option defines properties that may vary between different variants of a Product. Common Product Options are "Size" and "Color". Admins are free to create any product options. + +## constructor + +A Product Option defines properties that may vary between different variants of a Product. Common Product Options are "Size" and "Color". Admins are free to create any product options. + +___ + +## Methods + +### beforeInsert + +#### Returns + + diff --git a/www/apps/docs/content/references/fulfillment/classes/ProductOptionValue.mdx b/www/apps/docs/content/references/fulfillment/classes/ProductOptionValue.mdx new file mode 100644 index 0000000000..eedae578b8 --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/classes/ProductOptionValue.mdx @@ -0,0 +1,33 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# ProductOptionValue + +An option value is one of the possible values of a Product Option. Product Variants specify a unique combination of product option values. + +## constructor + +An option value is one of the possible values of a Product Option. Product Variants specify a unique combination of product option values. + +___ + +## Methods + +### beforeInsert + +#### Returns + + diff --git a/www/apps/docs/content/references/fulfillment/classes/ProductTag.mdx b/www/apps/docs/content/references/fulfillment/classes/ProductTag.mdx new file mode 100644 index 0000000000..3323f45770 --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/classes/ProductTag.mdx @@ -0,0 +1,33 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# ProductTag + +A Product Tag can be added to Products for easy filtering and grouping. + +## constructor + +A Product Tag can be added to Products for easy filtering and grouping. + +___ + +## Methods + +### beforeInsert + +#### Returns + + diff --git a/www/apps/docs/content/references/fulfillment/classes/ProductType.mdx b/www/apps/docs/content/references/fulfillment/classes/ProductType.mdx new file mode 100644 index 0000000000..548cf332ae --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/classes/ProductType.mdx @@ -0,0 +1,33 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# ProductType + +A Product Type can be added to Products for filtering and reporting purposes. + +## constructor + +A Product Type can be added to Products for filtering and reporting purposes. + +___ + +## Methods + +### beforeInsert + +#### Returns + + diff --git a/www/apps/docs/content/references/fulfillment/classes/ProductVariant.mdx b/www/apps/docs/content/references/fulfillment/classes/ProductVariant.mdx new file mode 100644 index 0000000000..4bbc21d28c --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/classes/ProductVariant.mdx @@ -0,0 +1,33 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# ProductVariant + +A Product Variant represents a Product with a specific set of Product Option configurations. The maximum number of Product Variants that a Product can have is given by the number of available Product Option combinations. A product must at least have one product variant. + +## constructor + +A Product Variant represents a Product with a specific set of Product Option configurations. The maximum number of Product Variants that a Product can have is given by the number of available Product Option combinations. A product must at least have one product variant. + +___ + +## Methods + +### beforeInsert + +#### Returns + + diff --git a/www/apps/docs/content/references/fulfillment/classes/ProductVariantInventoryItem.mdx b/www/apps/docs/content/references/fulfillment/classes/ProductVariantInventoryItem.mdx new file mode 100644 index 0000000000..7825502e99 --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/classes/ProductVariantInventoryItem.mdx @@ -0,0 +1,33 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# ProductVariantInventoryItem + +A Product Variant Inventory Item links variants with inventory items and denotes the required quantity of the variant. + +## constructor + +A Product Variant Inventory Item links variants with inventory items and denotes the required quantity of the variant. + +___ + +## Methods + +### beforeInsert + +#### Returns + + diff --git a/www/apps/docs/content/references/fulfillment/classes/Refund.mdx b/www/apps/docs/content/references/fulfillment/classes/Refund.mdx new file mode 100644 index 0000000000..06f23de913 --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/classes/Refund.mdx @@ -0,0 +1,33 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# Refund + +A refund represents an amount of money transfered back to the customer for a given reason. Refunds may occur in relation to Returns, Swaps and Claims, but can also be initiated by an admin for an order. + +## constructor + +A refund represents an amount of money transfered back to the customer for a given reason. Refunds may occur in relation to Returns, Swaps and Claims, but can also be initiated by an admin for an order. + +___ + +## Methods + +### beforeInsert + +#### Returns + + diff --git a/www/apps/docs/content/references/fulfillment/classes/Region.mdx b/www/apps/docs/content/references/fulfillment/classes/Region.mdx new file mode 100644 index 0000000000..faa485fbfd --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/classes/Region.mdx @@ -0,0 +1,33 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# Region + +A region holds settings specific to a geographical location, including the currency, tax rates, and fulfillment and payment providers. A Region can consist of multiple countries to accomodate common shopping settings across countries. + +## constructor + +A region holds settings specific to a geographical location, including the currency, tax rates, and fulfillment and payment providers. A Region can consist of multiple countries to accomodate common shopping settings across countries. + +___ + +## Methods + +### beforeInsert + +#### Returns + + diff --git a/www/apps/docs/content/references/fulfillment/classes/Return.mdx b/www/apps/docs/content/references/fulfillment/classes/Return.mdx new file mode 100644 index 0000000000..16996c98f1 --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/classes/Return.mdx @@ -0,0 +1,33 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# Return + +A Return holds information about Line Items that a Customer wishes to send back, along with how the items will be returned. Returns can also be used as part of a Swap or a Claim. + +## constructor + +A Return holds information about Line Items that a Customer wishes to send back, along with how the items will be returned. Returns can also be used as part of a Swap or a Claim. + +___ + +## Methods + +### beforeInsert + +#### Returns + + diff --git a/www/apps/docs/content/references/fulfillment/classes/ReturnItem.mdx b/www/apps/docs/content/references/fulfillment/classes/ReturnItem.mdx new file mode 100644 index 0000000000..0cc8a537bb --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/classes/ReturnItem.mdx @@ -0,0 +1,13 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# ReturnItem + +A return item represents a line item in an order that is to be returned. It includes details related to the return and the reason behind it. + +## constructor + +A return item represents a line item in an order that is to be returned. It includes details related to the return and the reason behind it. diff --git a/www/apps/docs/content/references/fulfillment/classes/ReturnReason.mdx b/www/apps/docs/content/references/fulfillment/classes/ReturnReason.mdx new file mode 100644 index 0000000000..91f9548b11 --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/classes/ReturnReason.mdx @@ -0,0 +1,33 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# ReturnReason + +A Return Reason is a value defined by an admin. It can be used on Return Items in order to indicate why a Line Item was returned. + +## constructor + +A Return Reason is a value defined by an admin. It can be used on Return Items in order to indicate why a Line Item was returned. + +___ + +## Methods + +### beforeInsert + +#### Returns + + diff --git a/www/apps/docs/content/references/fulfillment/classes/SalesChannel.mdx b/www/apps/docs/content/references/fulfillment/classes/SalesChannel.mdx new file mode 100644 index 0000000000..7d158ba334 --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/classes/SalesChannel.mdx @@ -0,0 +1,33 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# SalesChannel + +A Sales Channel is a method a business offers its products for purchase for the customers. For example, a Webshop can be a sales channel, and a mobile app can be another. + +## constructor + +A Sales Channel is a method a business offers its products for purchase for the customers. For example, a Webshop can be a sales channel, and a mobile app can be another. + +___ + +## Methods + +### beforeInsert + +#### Returns + + diff --git a/www/apps/docs/content/references/fulfillment/classes/SalesChannelLocation.mdx b/www/apps/docs/content/references/fulfillment/classes/SalesChannelLocation.mdx new file mode 100644 index 0000000000..83481fe96d --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/classes/SalesChannelLocation.mdx @@ -0,0 +1,33 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# SalesChannelLocation + +This represents the association between a sales channel and a stock locations. + +## constructor + +This represents the association between a sales channel and a stock locations. + +___ + +## Methods + +### beforeInsert + +#### Returns + + diff --git a/www/apps/docs/content/references/fulfillment/classes/ShippingMethod.mdx b/www/apps/docs/content/references/fulfillment/classes/ShippingMethod.mdx new file mode 100644 index 0000000000..4063c72fe5 --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/classes/ShippingMethod.mdx @@ -0,0 +1,33 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# ShippingMethod + +A Shipping Method represents a way in which an Order or Return can be shipped. Shipping Methods are created from a Shipping Option, but may contain additional details that can be necessary for the Fulfillment Provider to handle the shipment. If the shipping method is created for a return, it may be associated with a claim or a swap that the return is part of. + +## constructor + +A Shipping Method represents a way in which an Order or Return can be shipped. Shipping Methods are created from a Shipping Option, but may contain additional details that can be necessary for the Fulfillment Provider to handle the shipment. If the shipping method is created for a return, it may be associated with a claim or a swap that the return is part of. + +___ + +## Methods + +### beforeInsert + +#### Returns + + diff --git a/www/apps/docs/content/references/fulfillment/classes/ShippingMethodTaxLine.mdx b/www/apps/docs/content/references/fulfillment/classes/ShippingMethodTaxLine.mdx new file mode 100644 index 0000000000..e56b84e1fa --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/classes/ShippingMethodTaxLine.mdx @@ -0,0 +1,33 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# ShippingMethodTaxLine + +A Shipping Method Tax Line represents the taxes applied on a shipping method in a cart. + +## constructor + +A Shipping Method Tax Line represents the taxes applied on a shipping method in a cart. + +___ + +## Methods + +### beforeInsert + +#### Returns + + diff --git a/www/apps/docs/content/references/fulfillment/classes/ShippingOption.mdx b/www/apps/docs/content/references/fulfillment/classes/ShippingOption.mdx new file mode 100644 index 0000000000..bd72909c84 --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/classes/ShippingOption.mdx @@ -0,0 +1,33 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# ShippingOption + +A Shipping Option represents a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information. + +## constructor + +A Shipping Option represents a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information. + +___ + +## Methods + +### beforeInsert + +#### Returns + + diff --git a/www/apps/docs/content/references/fulfillment/classes/ShippingOptionRequirement.mdx b/www/apps/docs/content/references/fulfillment/classes/ShippingOptionRequirement.mdx new file mode 100644 index 0000000000..e5ca8bdb25 --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/classes/ShippingOptionRequirement.mdx @@ -0,0 +1,33 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# ShippingOptionRequirement + +A shipping option requirement defines conditions that a Cart must satisfy for the Shipping Option to be available for usage in the Cart. + +## constructor + +A shipping option requirement defines conditions that a Cart must satisfy for the Shipping Option to be available for usage in the Cart. + +___ + +## Methods + +### beforeInsert + +#### Returns + + diff --git a/www/apps/docs/content/references/fulfillment/classes/ShippingProfile.mdx b/www/apps/docs/content/references/fulfillment/classes/ShippingProfile.mdx new file mode 100644 index 0000000000..0f46bb9a4c --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/classes/ShippingProfile.mdx @@ -0,0 +1,33 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# ShippingProfile + +A Shipping Profile has a set of defined Shipping Options that can be used to fulfill a given set of Products. For example, gift cards are shipped differently than physical products, so a shipping profile with the type `gift\_card` groups together the shipping options that can only be used for gift cards. + +## constructor + +A Shipping Profile has a set of defined Shipping Options that can be used to fulfill a given set of Products. For example, gift cards are shipped differently than physical products, so a shipping profile with the type `gift\_card` groups together the shipping options that can only be used for gift cards. + +___ + +## Methods + +### beforeInsert + +#### Returns + + diff --git a/www/apps/docs/content/references/fulfillment/classes/SoftDeletableEntity.mdx b/www/apps/docs/content/references/fulfillment/classes/SoftDeletableEntity.mdx new file mode 100644 index 0000000000..ac8e75707c --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/classes/SoftDeletableEntity.mdx @@ -0,0 +1,11 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# SoftDeletableEntity + +Base abstract entity for all entities + +## constructor diff --git a/www/apps/docs/content/references/fulfillment/classes/Swap.mdx b/www/apps/docs/content/references/fulfillment/classes/Swap.mdx new file mode 100644 index 0000000000..237939102f --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/classes/Swap.mdx @@ -0,0 +1,33 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# Swap + +A swap can be created when a Customer wishes to exchange Products that they have purchased with different Products. It consists of a Return of previously purchased Products and a Fulfillment of new Products. It also includes information on any additional payment or refund required based on the difference between the exchanged products. + +## constructor + +A swap can be created when a Customer wishes to exchange Products that they have purchased with different Products. It consists of a Return of previously purchased Products and a Fulfillment of new Products. It also includes information on any additional payment or refund required based on the difference between the exchanged products. + +___ + +## Methods + +### beforeInsert + +#### Returns + + diff --git a/www/apps/docs/content/references/fulfillment/classes/TaxLine.mdx b/www/apps/docs/content/references/fulfillment/classes/TaxLine.mdx new file mode 100644 index 0000000000..2efceb041b --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/classes/TaxLine.mdx @@ -0,0 +1,13 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# TaxLine + +A tax line represents the taxes amount applied to a line item. + +## constructor + +A tax line represents the taxes amount applied to a line item. diff --git a/www/apps/docs/content/references/fulfillment/classes/TaxProvider.mdx b/www/apps/docs/content/references/fulfillment/classes/TaxProvider.mdx new file mode 100644 index 0000000000..9ce3ce2037 --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/classes/TaxProvider.mdx @@ -0,0 +1,13 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# TaxProvider + +A tax provider represents a tax service installed in the Medusa backend, either through a plugin or backend customizations. It holds the tax service's installation status. + +## constructor + +A tax provider represents a tax service installed in the Medusa backend, either through a plugin or backend customizations. It holds the tax service's installation status. diff --git a/www/apps/docs/content/references/fulfillment/classes/TaxRate.mdx b/www/apps/docs/content/references/fulfillment/classes/TaxRate.mdx new file mode 100644 index 0000000000..7ec4a56a42 --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/classes/TaxRate.mdx @@ -0,0 +1,33 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# TaxRate + +A Tax Rate can be used to define a custom rate to charge on specified products, product types, and shipping options within a given region. + +## constructor + +A Tax Rate can be used to define a custom rate to charge on specified products, product types, and shipping options within a given region. + +___ + +## Methods + +### beforeInsert + +#### Returns + + diff --git a/www/apps/docs/content/references/fulfillment/classes/TrackingLink.mdx b/www/apps/docs/content/references/fulfillment/classes/TrackingLink.mdx new file mode 100644 index 0000000000..43f56b3c2f --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/classes/TrackingLink.mdx @@ -0,0 +1,33 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# TrackingLink + +A tracking link holds information about tracking numbers for a Fulfillment. Tracking Links can optionally contain a URL that can be visited to see the status of the shipment. Typically, the tracking link is provided from the third-party service integrated through the used fulfillment provider. + +## constructor + +A tracking link holds information about tracking numbers for a Fulfillment. Tracking Links can optionally contain a URL that can be visited to see the status of the shipment. Typically, the tracking link is provided from the third-party service integrated through the used fulfillment provider. + +___ + +## Methods + +### beforeInsert + +#### Returns + + diff --git a/www/apps/docs/content/references/fulfillment/enums/AllocationType.mdx b/www/apps/docs/content/references/fulfillment/enums/AllocationType.mdx new file mode 100644 index 0000000000..730d1a829c --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/enums/AllocationType.mdx @@ -0,0 +1,25 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# AllocationType + +The scope that the discount should apply to. + +## Enumeration Members + +### ITEM + + **ITEM** = `"item"` + +The discount should be applied to applicable items in the cart. + +___ + +### TOTAL + + **TOTAL** = `"total"` + +The discount should be applied to the checkout total. diff --git a/www/apps/docs/content/references/fulfillment/enums/CartType.mdx b/www/apps/docs/content/references/fulfillment/enums/CartType.mdx new file mode 100644 index 0000000000..bff32f4c6d --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/enums/CartType.mdx @@ -0,0 +1,37 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# CartType + +## Enumeration Members + +### CLAIM + + **CLAIM** = `"claim"` + +___ + +### DEFAULT + + **DEFAULT** = `"default"` + +___ + +### DRAFT\_ORDER + + **DRAFT\_ORDER** = `"draft_order"` + +___ + +### PAYMENT\_LINK + + **PAYMENT\_LINK** = `"payment_link"` + +___ + +### SWAP + + **SWAP** = `"swap"` diff --git a/www/apps/docs/content/references/fulfillment/enums/ClaimFulfillmentStatus.mdx b/www/apps/docs/content/references/fulfillment/enums/ClaimFulfillmentStatus.mdx new file mode 100644 index 0000000000..c71f879f68 --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/enums/ClaimFulfillmentStatus.mdx @@ -0,0 +1,81 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# ClaimFulfillmentStatus + +The claim's fulfillment status. + +## Enumeration Members + +### CANCELED + + **CANCELED** = `"canceled"` + +The claim's fulfillments are canceled. + +___ + +### FULFILLED + + **FULFILLED** = `"fulfilled"` + +The claim's replacement items are fulfilled. + +___ + +### NOT\_FULFILLED + + **NOT\_FULFILLED** = `"not_fulfilled"` + +The claim's replacement items are not fulfilled. + +___ + +### PARTIALLY\_FULFILLED + + **PARTIALLY\_FULFILLED** = `"partially_fulfilled"` + +Some of the claim's replacement items, but not all, are fulfilled. + +___ + +### PARTIALLY\_RETURNED + + **PARTIALLY\_RETURNED** = `"partially_returned"` + +Some of the claim's items, but not all, are returned. + +___ + +### PARTIALLY\_SHIPPED + + **PARTIALLY\_SHIPPED** = `"partially_shipped"` + +Some of the claim's replacement items, but not all, are shipped. + +___ + +### REQUIRES\_ACTION + + **REQUIRES\_ACTION** = `"requires_action"` + +The claim's fulfillment requires action. + +___ + +### RETURNED + + **RETURNED** = `"returned"` + +The claim's items are returned. + +___ + +### SHIPPED + + **SHIPPED** = `"shipped"` + +The claim's replacement items are shipped. diff --git a/www/apps/docs/content/references/fulfillment/enums/ClaimPaymentStatus.mdx b/www/apps/docs/content/references/fulfillment/enums/ClaimPaymentStatus.mdx new file mode 100644 index 0000000000..a2895ece8b --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/enums/ClaimPaymentStatus.mdx @@ -0,0 +1,33 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# ClaimPaymentStatus + +The claim's payment status + +## Enumeration Members + +### NA + + **NA** = `"na"` + +The payment status isn't set, which is typically used when the claim's type is `replace`. + +___ + +### NOT\_REFUNDED + + **NOT\_REFUNDED** = `"not_refunded"` + +The payment isn't refunded. + +___ + +### REFUNDED + + **REFUNDED** = `"refunded"` + +The payment is refunded. diff --git a/www/apps/docs/content/references/fulfillment/enums/ClaimReason.mdx b/www/apps/docs/content/references/fulfillment/enums/ClaimReason.mdx new file mode 100644 index 0000000000..9bdb0eb3cf --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/enums/ClaimReason.mdx @@ -0,0 +1,31 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# ClaimReason + +## Enumeration Members + +### MISSING\_ITEM + + **MISSING\_ITEM** = `"missing_item"` + +___ + +### OTHER + + **OTHER** = `"other"` + +___ + +### PRODUCTION\_FAILURE + + **PRODUCTION\_FAILURE** = `"production_failure"` + +___ + +### WRONG\_ITEM + + **WRONG\_ITEM** = `"wrong_item"` diff --git a/www/apps/docs/content/references/fulfillment/enums/ClaimType.mdx b/www/apps/docs/content/references/fulfillment/enums/ClaimType.mdx new file mode 100644 index 0000000000..0b7f383d9f --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/enums/ClaimType.mdx @@ -0,0 +1,25 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# ClaimType + +The claim's type. + +## Enumeration Members + +### REFUND + + **REFUND** = `"refund"` + +The claim refunds an amount to the customer. + +___ + +### REPLACE + + **REPLACE** = `"replace"` + +The claim replaces the returned item with a new one. diff --git a/www/apps/docs/content/references/fulfillment/enums/DiscountConditionOperator.mdx b/www/apps/docs/content/references/fulfillment/enums/DiscountConditionOperator.mdx new file mode 100644 index 0000000000..4e236e0f5f --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/enums/DiscountConditionOperator.mdx @@ -0,0 +1,25 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# DiscountConditionOperator + +The possible operators used for a discount condition. + +## Enumeration Members + +### IN + + **IN** = `"in"` + +The discountable resources are within the specified resources. + +___ + +### NOT\_IN + + **NOT\_IN** = `"not_in"` + +The discountable resources are everything but the specified resources. diff --git a/www/apps/docs/content/references/fulfillment/enums/DiscountConditionType.mdx b/www/apps/docs/content/references/fulfillment/enums/DiscountConditionType.mdx new file mode 100644 index 0000000000..c76b8a1702 --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/enums/DiscountConditionType.mdx @@ -0,0 +1,49 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# DiscountConditionType + +The discount condition's type. + +## Enumeration Members + +### CUSTOMER\_GROUPS + + **CUSTOMER\_GROUPS** = `"customer_groups"` + +The discount condition is used for customer groups. + +___ + +### PRODUCTS + + **PRODUCTS** = `"products"` + +The discount condition is used for products. + +___ + +### PRODUCT\_COLLECTIONS + + **PRODUCT\_COLLECTIONS** = `"product_collections"` + +The discount condition is used for product collections. + +___ + +### PRODUCT\_TAGS + + **PRODUCT\_TAGS** = `"product_tags"` + +The discount condition is used for product tags. + +___ + +### PRODUCT\_TYPES + + **PRODUCT\_TYPES** = `"product_types"` + +The discount condition is used for product types. diff --git a/www/apps/docs/content/references/fulfillment/enums/DiscountRuleType.mdx b/www/apps/docs/content/references/fulfillment/enums/DiscountRuleType.mdx new file mode 100644 index 0000000000..3e729ec213 --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/enums/DiscountRuleType.mdx @@ -0,0 +1,33 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# DiscountRuleType + +The possible types of discount rules. + +## Enumeration Members + +### FIXED + + **FIXED** = `"fixed"` + +Discounts that reduce the price by a fixed amount. + +___ + +### FREE\_SHIPPING + + **FREE\_SHIPPING** = `"free_shipping"` + +Discounts that sets the shipping price to `0`. + +___ + +### PERCENTAGE + + **PERCENTAGE** = `"percentage"` + +Discounts that reduce the price by a percentage reduction. diff --git a/www/apps/docs/content/references/fulfillment/enums/DraftOrderStatus.mdx b/www/apps/docs/content/references/fulfillment/enums/DraftOrderStatus.mdx new file mode 100644 index 0000000000..1ae483867c --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/enums/DraftOrderStatus.mdx @@ -0,0 +1,25 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# DraftOrderStatus + +The draft order's status. + +## Enumeration Members + +### COMPLETED + + **COMPLETED** = `"completed"` + +The draft order is completed, and an order has been created from it. + +___ + +### OPEN + + **OPEN** = `"open"` + +The draft order is open. diff --git a/www/apps/docs/content/references/fulfillment/enums/FulfillmentStatus.mdx b/www/apps/docs/content/references/fulfillment/enums/FulfillmentStatus.mdx new file mode 100644 index 0000000000..e394d6207c --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/enums/FulfillmentStatus.mdx @@ -0,0 +1,81 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# FulfillmentStatus + +The order's fulfillment status. + +## Enumeration Members + +### CANCELED + + **CANCELED** = `"canceled"` + +The order's fulfillments are canceled. + +___ + +### FULFILLED + + **FULFILLED** = `"fulfilled"` + +The order's items are fulfilled. + +___ + +### NOT\_FULFILLED + + **NOT\_FULFILLED** = `"not_fulfilled"` + +The order's items are not fulfilled. + +___ + +### PARTIALLY\_FULFILLED + + **PARTIALLY\_FULFILLED** = `"partially_fulfilled"` + +Some of the order's items, but not all, are fulfilled. + +___ + +### PARTIALLY\_RETURNED + + **PARTIALLY\_RETURNED** = `"partially_returned"` + +Some of the order's items, but not all, are returned. + +___ + +### PARTIALLY\_SHIPPED + + **PARTIALLY\_SHIPPED** = `"partially_shipped"` + +Some of the order's items, but not all, are shipped. + +___ + +### REQUIRES\_ACTION + + **REQUIRES\_ACTION** = `"requires_action"` + +The order's fulfillment requires action. + +___ + +### RETURNED + + **RETURNED** = `"returned"` + +The order's items are returned. + +___ + +### SHIPPED + + **SHIPPED** = `"shipped"` + +The order's items are shipped. diff --git a/www/apps/docs/content/references/fulfillment/enums/OrderEditItemChangeType.mdx b/www/apps/docs/content/references/fulfillment/enums/OrderEditItemChangeType.mdx new file mode 100644 index 0000000000..c607268d42 --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/enums/OrderEditItemChangeType.mdx @@ -0,0 +1,33 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# OrderEditItemChangeType + +The type of the order edit item change. + +## Enumeration Members + +### ITEM\_ADD + + **ITEM\_ADD** = `"item_add"` + +A new item to be added to the original order. + +___ + +### ITEM\_REMOVE + + **ITEM\_REMOVE** = `"item_remove"` + +An existing item to be removed from the original order. + +___ + +### ITEM\_UPDATE + + **ITEM\_UPDATE** = `"item_update"` + +An existing item to be updated in the original order. diff --git a/www/apps/docs/content/references/fulfillment/enums/OrderEditStatus.mdx b/www/apps/docs/content/references/fulfillment/enums/OrderEditStatus.mdx new file mode 100644 index 0000000000..4e73fb1386 --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/enums/OrderEditStatus.mdx @@ -0,0 +1,49 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# OrderEditStatus + +The order edit's status. + +## Enumeration Members + +### CANCELED + + **CANCELED** = `"canceled"` + +The order edit is canceled. + +___ + +### CONFIRMED + + **CONFIRMED** = `"confirmed"` + +The order edit is confirmed. + +___ + +### CREATED + + **CREATED** = `"created"` + +The order edit is created. + +___ + +### DECLINED + + **DECLINED** = `"declined"` + +The order edit is declined. + +___ + +### REQUESTED + + **REQUESTED** = `"requested"` + +The order edit is requested. diff --git a/www/apps/docs/content/references/fulfillment/enums/OrderStatus.mdx b/www/apps/docs/content/references/fulfillment/enums/OrderStatus.mdx new file mode 100644 index 0000000000..078aeb828e --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/enums/OrderStatus.mdx @@ -0,0 +1,51 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# OrderStatus + +The order's status. + +## Enumeration Members + +### ARCHIVED + + **ARCHIVED** = `"archived"` + +The order is archived. + +___ + +### CANCELED + + **CANCELED** = `"canceled"` + +The order is canceled. + +___ + +### COMPLETED + + **COMPLETED** = `"completed"` + +The order is completed, meaning that +the items have been fulfilled and the payment +has been captured. + +___ + +### PENDING + + **PENDING** = `"pending"` + +The order is pending. + +___ + +### REQUIRES\_ACTION + + **REQUIRES\_ACTION** = `"requires_action"` + +The order requires action. diff --git a/www/apps/docs/content/references/fulfillment/enums/PaymentCollectionStatus.mdx b/www/apps/docs/content/references/fulfillment/enums/PaymentCollectionStatus.mdx new file mode 100644 index 0000000000..69236ded7d --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/enums/PaymentCollectionStatus.mdx @@ -0,0 +1,49 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# PaymentCollectionStatus + +The payment collection's status. + +## Enumeration Members + +### AUTHORIZED + + **AUTHORIZED** = `"authorized"` + +The payment colleciton is authorized. + +___ + +### AWAITING + + **AWAITING** = `"awaiting"` + +The payment collection is awaiting payment. + +___ + +### CANCELED + + **CANCELED** = `"canceled"` + +The payment collection is canceled. + +___ + +### NOT\_PAID + + **NOT\_PAID** = `"not_paid"` + +The payment collection isn't paid. + +___ + +### PARTIALLY\_AUTHORIZED + + **PARTIALLY\_AUTHORIZED** = `"partially_authorized"` + +Some of the payments in the payment collection are authorized. diff --git a/www/apps/docs/content/references/fulfillment/enums/PaymentStatus.mdx b/www/apps/docs/content/references/fulfillment/enums/PaymentStatus.mdx new file mode 100644 index 0000000000..328faa775d --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/enums/PaymentStatus.mdx @@ -0,0 +1,65 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# PaymentStatus + +The order's payment status. + +## Enumeration Members + +### AWAITING + + **AWAITING** = `"awaiting"` + +The order's payment is awaiting capturing. + +___ + +### CANCELED + + **CANCELED** = `"canceled"` + +The order's payment is canceled. + +___ + +### CAPTURED + + **CAPTURED** = `"captured"` + +The order's payment is captured. + +___ + +### NOT\_PAID + + **NOT\_PAID** = `"not_paid"` + +The order's payment is not paid. + +___ + +### PARTIALLY\_REFUNDED + + **PARTIALLY\_REFUNDED** = `"partially_refunded"` + +Some of the order's payment amount is refunded. + +___ + +### REFUNDED + + **REFUNDED** = `"refunded"` + +The order's payment amount is refunded. + +___ + +### REQUIRES\_ACTION + + **REQUIRES\_ACTION** = `"requires_action"` + +The order's payment requires action. diff --git a/www/apps/docs/content/references/fulfillment/enums/PriceListStatus.mdx b/www/apps/docs/content/references/fulfillment/enums/PriceListStatus.mdx new file mode 100644 index 0000000000..60b251262f --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/enums/PriceListStatus.mdx @@ -0,0 +1,19 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# PriceListStatus + +## Enumeration Members + +### ACTIVE + + **ACTIVE** = `"active"` + +___ + +### DRAFT + + **DRAFT** = `"draft"` diff --git a/www/apps/docs/content/references/fulfillment/enums/PriceListType.mdx b/www/apps/docs/content/references/fulfillment/enums/PriceListType.mdx new file mode 100644 index 0000000000..73a7c41d7f --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/enums/PriceListType.mdx @@ -0,0 +1,19 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# PriceListType + +## Enumeration Members + +### OVERRIDE + + **OVERRIDE** = `"override"` + +___ + +### SALE + + **SALE** = `"sale"` diff --git a/www/apps/docs/content/references/fulfillment/enums/ProductStatus.mdx b/www/apps/docs/content/references/fulfillment/enums/ProductStatus.mdx new file mode 100644 index 0000000000..86e2929feb --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/enums/ProductStatus.mdx @@ -0,0 +1,41 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# ProductStatus + +The status of a product. + +## Enumeration Members + +### DRAFT + + **DRAFT** = `"draft"` + +The product is a draft. It's not viewable by customers. + +___ + +### PROPOSED + + **PROPOSED** = `"proposed"` + +The product is proposed, but not yet published. + +___ + +### PUBLISHED + + **PUBLISHED** = `"published"` + +The product is published. + +___ + +### REJECTED + + **REJECTED** = `"rejected"` + +The product is rejected. It's not viewable by customers. diff --git a/www/apps/docs/content/references/fulfillment/enums/RequirementType.mdx b/www/apps/docs/content/references/fulfillment/enums/RequirementType.mdx new file mode 100644 index 0000000000..bb8a100a33 --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/enums/RequirementType.mdx @@ -0,0 +1,25 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# RequirementType + +The type of shipping option requirement. + +## Enumeration Members + +### MAX\_SUBTOTAL + + **MAX\_SUBTOTAL** = `"max_subtotal"` + +The shipping option can only be applied if the subtotal is less than the requirement's amont. + +___ + +### MIN\_SUBTOTAL + + **MIN\_SUBTOTAL** = `"min_subtotal"` + +The shipping option can only be applied if the subtotal is greater than the requirement's amount. diff --git a/www/apps/docs/content/references/fulfillment/enums/ReturnStatus.mdx b/www/apps/docs/content/references/fulfillment/enums/ReturnStatus.mdx new file mode 100644 index 0000000000..22fab6e6d1 --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/enums/ReturnStatus.mdx @@ -0,0 +1,41 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# ReturnStatus + +The return's status. + +## Enumeration Members + +### CANCELED + + **CANCELED** = `"canceled"` + +The return is canceled. + +___ + +### RECEIVED + + **RECEIVED** = `"received"` + +The return is received. + +___ + +### REQUESTED + + **REQUESTED** = `"requested"` + +The return is requested. + +___ + +### REQUIRES\_ACTION + + **REQUIRES\_ACTION** = `"requires_action"` + +The return is awaiting action. diff --git a/www/apps/docs/content/references/fulfillment/enums/ShippingOptionPriceType.mdx b/www/apps/docs/content/references/fulfillment/enums/ShippingOptionPriceType.mdx new file mode 100644 index 0000000000..02eca86af8 --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/enums/ShippingOptionPriceType.mdx @@ -0,0 +1,25 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# ShippingOptionPriceType + +The type of the shipping option price. + +## Enumeration Members + +### CALCULATED + + **CALCULATED** = `"calculated"` + +The shipping option's price is calculated. In this case, the `amount` field is typically `null`. + +___ + +### FLAT\_RATE + + **FLAT\_RATE** = `"flat_rate"` + +The shipping option's price is a flat rate. diff --git a/www/apps/docs/content/references/fulfillment/enums/ShippingProfileType.mdx b/www/apps/docs/content/references/fulfillment/enums/ShippingProfileType.mdx new file mode 100644 index 0000000000..dceab3e10d --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/enums/ShippingProfileType.mdx @@ -0,0 +1,33 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# ShippingProfileType + +The shipping profile's type. + +## Enumeration Members + +### CUSTOM + + **CUSTOM** = `"custom"` + +The profile used to ship custom items. + +___ + +### DEFAULT + + **DEFAULT** = `"default"` + +The default profile used to ship item. + +___ + +### GIFT\_CARD + + **GIFT\_CARD** = `"gift_card"` + +The profile used to ship gift cards. diff --git a/www/apps/docs/content/references/fulfillment/enums/SwapFulfillmentStatus.mdx b/www/apps/docs/content/references/fulfillment/enums/SwapFulfillmentStatus.mdx new file mode 100644 index 0000000000..f37d020ff5 --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/enums/SwapFulfillmentStatus.mdx @@ -0,0 +1,57 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# SwapFulfillmentStatus + +The swap's fulfillment status. + +## Enumeration Members + +### CANCELED + + **CANCELED** = `"canceled"` + +The swap's fulfillments are canceled. + +___ + +### FULFILLED + + **FULFILLED** = `"fulfilled"` + +The swap's items are fulfilled. + +___ + +### NOT\_FULFILLED + + **NOT\_FULFILLED** = `"not_fulfilled"` + +The swap's items aren't fulfilled. + +___ + +### PARTIALLY\_SHIPPED + + **PARTIALLY\_SHIPPED** = `"partially_shipped"` + +Some of the swap's items are shipped. + +___ + +### REQUIRES\_ACTION + + **REQUIRES\_ACTION** = `"requires_action"` + +The swap's fulfillments require an action. + +___ + +### SHIPPED + + **SHIPPED** = `"shipped"` + +The swap's items are shipped. diff --git a/www/apps/docs/content/references/fulfillment/enums/SwapPaymentStatus.mdx b/www/apps/docs/content/references/fulfillment/enums/SwapPaymentStatus.mdx new file mode 100644 index 0000000000..ff7f20baee --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/enums/SwapPaymentStatus.mdx @@ -0,0 +1,81 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# SwapPaymentStatus + +The swap's payment status. + +## Enumeration Members + +### AWAITING + + **AWAITING** = `"awaiting"` + +The swap is additional awaiting payment. + +___ + +### CANCELED + + **CANCELED** = `"canceled"` + +The swap's additional payment is canceled. + +___ + +### CAPTURED + + **CAPTURED** = `"captured"` + +The swap's additional payment is captured. + +___ + +### CONFIRMED + + **CONFIRMED** = `"confirmed"` + +The swap's additional payment is confirmed. + +___ + +### DIFFERENCE\_REFUNDED + + **DIFFERENCE\_REFUNDED** = `"difference_refunded"` + +The negative difference amount between the returned item(s) and the new one(s) has been refuneded. + +___ + +### NOT\_PAID + + **NOT\_PAID** = `"not_paid"` + +The swap's additional payment isn't paid. + +___ + +### PARTIALLY\_REFUNDED + + **PARTIALLY\_REFUNDED** = `"partially_refunded"` + +Some of the negative difference amount between the returned item(s) and the new one(s) has been refuneded. + +___ + +### REFUNDED + + **REFUNDED** = `"refunded"` + +The amount in the associated order has been refunded. + +___ + +### REQUIRES\_ACTION + + **REQUIRES\_ACTION** = `"requires_action"` + +The swap's payment requires an action. diff --git a/www/apps/docs/content/references/fulfillment/interfaces/Boolean.mdx b/www/apps/docs/content/references/fulfillment/interfaces/Boolean.mdx new file mode 100644 index 0000000000..54b013b61c --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/interfaces/Boolean.mdx @@ -0,0 +1,27 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# Boolean + +## Methods + +### valueOf + +Returns the primitive value of the specified object. + +#### Returns + + diff --git a/www/apps/docs/content/references/fulfillment/interfaces/FulfillmentService.mdx b/www/apps/docs/content/references/fulfillment/interfaces/FulfillmentService.mdx new file mode 100644 index 0000000000..474bd71bdb --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/interfaces/FulfillmentService.mdx @@ -0,0 +1,2876 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# FulfillmentService + +## Overview + +A fulfillment provider is the shipping provider used to fulfill orders and deliver them to customers. An example of a fulfillment provider is FedEx. + +By default, a Medusa Backend has a `manual` fulfillment provider which has minimal implementation. It allows you to accept orders and fulfill them manually. However, you can integrate any fulfillment provider into Medusa, and your fulfillment provider can interact with third-party shipping providers. + +A fulfillment provider is a service that extends the `AbstractFulfillmentService` and implements its methods. So, adding a fulfillment provider is as simple as creating a service file in `src/services`. +The file's name is the fulfillment provider's class name as a slug and without the word `Service`. For example, if you're creating a `MyFulfillmentService` class, the file name is `src/services/my-fulfillment.ts`. + +```ts title=src/services/my-fulfillment.ts +import { AbstractFulfillmentService } from "@medusajs/medusa" + +class MyFulfillmentService extends AbstractFulfillmentService { + // methods here... +} +``` + +--- + +## Identifier Property + +The `FulfillmentProvider` entity has 2 properties: `identifier` and `is_installed`. The `identifier` property in the class is used when the fulfillment provider is created in the database. + +The value of this property is also used to reference the fulfillment provider throughout Medusa. For example, it is used to [add a fulfillment provider](https://docs.medusajs.com/api/admin#regions\_postregionsregionfulfillmentproviders) to a region. + +```ts +class MyFulfillmentService extends AbstractFulfillmentService { + static identifier = "my-fulfillment" + + // ... +} +``` + +--- + +## Methods + +### calculatePrice + +This method is used in different places, including: + +1. When the shipping options for a cart are retrieved during checkout. If a shipping option has their `price_type` set to calculated, this method is used to set the amount of the returned shipping option. +2. When a shipping method is created. If the shipping option associated with the method has their `price_type` set to `calculated`, this method is used to set the `price` attribute of the shipping method in the database. +3. When the cart's totals are calculated. + +#### Example + +An example of calculating the price based on some custom logic: + +```ts +class MyFulfillmentService extends AbstractFulfillmentService { + // ... + async calculatePrice( + optionData: Record, + data: Record, + cart: Cart + ): Promise { + return cart.items.length * 1000 + } +} +``` + +If your fulfillment provider does not provide any dynamically calculated rates you can return any static value or throw an error. For example: + +```ts +class MyFulfillmentService extends AbstractFulfillmentService { + // ... + async calculatePrice( + optionData: Record, + data: Record, + cart: Cart + ): Promise { + throw new Error("Method not implemented.") + } +} +``` + +#### Parameters + +`", + "description": "The context of the cart which can include info like IP or user agent.", + "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": "customer", + "type": "[Customer](../classes/Customer.mdx)", + "description": "The details of the customer the cart belongs to.", + "optional": false, + "defaultValue": "", + "expandable": true, + "children": [] + }, + { + "name": "customer_id", + "type": "`string`", + "description": "The customer's ID", + "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": "discount_total", + "type": "`number`", + "description": "The total of discount rounded", + "optional": true, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "discounts", + "type": "[Discount](../classes/Discount.mdx)[]", + "description": "An array of details of all discounts applied to the cart.", + "optional": false, + "defaultValue": "", + "expandable": true, + "children": [] + }, + { + "name": "email", + "type": "`string`", + "description": "The email associated with the cart", + "optional": false, + "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": "gift_card_total", + "type": "`number`", + "description": "The total of gift cards", + "optional": true, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "gift_cards", + "type": "[GiftCard](../classes/GiftCard.mdx)[]", + "description": "An array of details of all gift cards applied to the cart.", + "optional": false, + "defaultValue": "", + "expandable": true, + "children": [] + }, + { + "name": "id", + "type": "`string`", + "description": "The cart's ID", + "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": "item_tax_total", + "type": "`null` \\| `number`", + "description": "The total of items with taxes", + "optional": true, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "items", + "type": "[LineItem](../classes/LineItem.mdx)[]", + "description": "The line items added to the cart.", + "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": "object", + "type": "`\"cart\"`", + "description": "", + "optional": false, + "defaultValue": "\"cart\"", + "expandable": false, + "children": [] + }, + { + "name": "payment", + "type": "[Payment](../classes/Payment.mdx)", + "description": "The details of the payment associated with the cart.", + "optional": false, + "defaultValue": "", + "expandable": true, + "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": "payment_id", + "type": "`string`", + "description": "The payment's ID if available", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "payment_session", + "type": "`null` \\| [PaymentSession](../classes/PaymentSession.mdx)", + "description": "The details of the selected payment session in the cart.", + "optional": false, + "defaultValue": "", + "expandable": true, + "children": [] + }, + { + "name": "payment_sessions", + "type": "[PaymentSession](../classes/PaymentSession.mdx)[]", + "description": "The details of all payment sessions created on the cart.", + "optional": false, + "defaultValue": "", + "expandable": true, + "children": [] + }, + { + "name": "raw_discount_total", + "type": "`number`", + "description": "The total of discount", + "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": "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": "region", + "type": "[Region](../classes/Region.mdx)", + "description": "The details of the region associated with 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": "sales_channel", + "type": "[SalesChannel](../classes/SalesChannel.mdx)", + "description": "The details of the sales channel associated with the cart.", + "optional": false, + "defaultValue": "", + "expandable": true, + "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": "shipping_address", + "type": "`null` \\| [Address](../classes/Address.mdx)", + "description": "The details of the shipping 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_methods", + "type": "[ShippingMethod](../classes/ShippingMethod.mdx)[]", + "description": "The details of the shipping methods added to the cart.", + "optional": false, + "defaultValue": "", + "expandable": true, + "children": [] + }, + { + "name": "shipping_tax_total", + "type": "`null` \\| `number`", + "description": "The total of shipping with taxes", + "optional": true, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "shipping_total", + "type": "`number`", + "description": "The total of shipping", + "optional": true, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "subtotal", + "type": "`number`", + "description": "The subtotal of the cart", + "optional": true, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "tax_total", + "type": "`null` \\| `number`", + "description": "The total of tax", + "optional": true, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "total", + "type": "`number`", + "description": "The total amount of the cart", + "optional": true, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "type", + "type": "[CartType](../enums/CartType.mdx)", + "description": "The cart's type.", + "optional": false, + "defaultValue": "default", + "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": [] + } + ] + } +]} /> + +#### Returns + + + +___ + +### canCalculate + +This method is used to determine whether a shipping option is calculated dynamically or flat rate. It is called if the `price_type` of the shipping option being created is set to calculated. + +#### Example + +```ts +class MyFulfillmentService extends AbstractFulfillmentService { + // ... + async canCalculate( + data: Record + ): Promise { + return data.id === "my-fulfillment-dynamic" + } +} +``` + +#### Parameters + + + +#### Returns + + + +___ + +### cancelFulfillment + +This method is called when a fulfillment is cancelled by the admin. This fulfillment can be for an order, a claim, or a swap. + +#### Example + +This is the basic implementation of the method for a fulfillment provider that doesn't interact with a third-party provider to cancel the fulfillment: + +```ts +class MyFulfillmentService extends FulfillmentService { + // ... + async cancelFulfillment( + fulfillment: Record + ): Promise { + return {} + } +} +``` + +#### Parameters + + + +#### Returns + + + +___ + +### createFulfillment + +This method is used when a fulfillment is created for an order, a claim, or a swap. + +#### Example + +Here is a basic implementation of `createFulfillment` for a fulfillment provider that does not interact with any third-party provider to create the fulfillment: + +```ts +class MyFulfillmentService extends AbstractFulfillmentService { + // ... + async createFulfillment( + data: Record, + items: LineItem, + order: Order, + fulfillment: Fulfillment + ) { + // No data is being sent anywhere + // No data to be stored in the fulfillment's data object + return {} + } +} +``` + +#### Parameters + +`", + "description": "An optional key-value map with additional details", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "order", + "type": "[Order](../classes/Order.mdx)", + "description": "The details of the order that the line item may belongs to.", + "optional": false, + "defaultValue": "", + "expandable": true, + "children": [] + }, + { + "name": "order_edit", + "type": "`null` \\| [OrderEdit](../classes/OrderEdit.mdx)", + "description": "The details of the order edit.", + "optional": true, + "defaultValue": "", + "expandable": true, + "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_id", + "type": "`null` \\| `string`", + "description": "The ID of the order that the line item may belongs to.", + "optional": false, + "defaultValue": "", + "expandable": false, + "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": "original_tax_total", + "type": "`null` \\| `number`", + "description": "The original tax 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": "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": "raw_discount_total", + "type": "`null` \\| `number`", + "description": "The total of discount of the line item", + "optional": true, + "defaultValue": "", + "expandable": false, + "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": "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": "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": "subtotal", + "type": "`null` \\| `number`", + "description": "The subtotal of the line item", + "optional": true, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "swap", + "type": "[Swap](../classes/Swap.mdx)", + "description": "The details of the swap that the line item may belong 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": "tax_lines", + "type": "[LineItemTaxLine](../classes/LineItemTaxLine.mdx)[]", + "description": "The details of the item's tax lines.", + "optional": false, + "defaultValue": "", + "expandable": true, + "children": [] + }, + { + "name": "tax_total", + "type": "`null` \\| `number`", + "description": "The total of tax of the line item", + "optional": true, + "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": "title", + "type": "`string`", + "description": "The title of the Line Item.", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "total", + "type": "`null` \\| `number`", + "description": "The total amount of the line item", + "optional": true, + "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": "updated_at", + "type": "`Date`", + "description": "The date with timezone at which the resource was updated.", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "variant", + "type": "[ProductVariant](../classes/ProductVariant.mdx)", + "description": "The details of the product variant that this item was created from.", + "optional": false, + "defaultValue": "", + "expandable": true, + "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": "order", + "type": "[Order](../classes/Order.mdx)", + "description": "The details of the created resource, which is either an order, a claim, or a swap:\n- If the resource the fulfillment is being created for is a claim, the `is_claim` property in the object will be `true`.\n- If the resource the fulfillment is being created for is a swap, the `is_swap` property in the object will be `true`.\n- Otherwise, the resource is an order.", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [ + { + "name": "billing_address", + "type": "[Address](../classes/Address.mdx)", + "description": "The details of the billing address associated with the order.", + "optional": false, + "defaultValue": "", + "expandable": true, + "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": "canceled_at", + "type": "`Date`", + "description": "The date the order was canceled on.", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "cart", + "type": "[Cart](../classes/Cart.mdx)", + "description": "The details of the cart associated with the order.", + "optional": false, + "defaultValue": "", + "expandable": true, + "children": [] + }, + { + "name": "cart_id", + "type": "`string`", + "description": "The ID of the cart associated with the order", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "claims", + "type": "[ClaimOrder](../classes/ClaimOrder.mdx)[]", + "description": "The details of the claims created for the order.", + "optional": false, + "defaultValue": "", + "expandable": true, + "children": [] + }, + { + "name": "created_at", + "type": "`Date`", + "description": "The date with timezone at which the resource was created.", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "currency", + "type": "[Currency](../classes/Currency.mdx)", + "description": "The details of the currency used in the order.", + "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": "customer", + "type": "[Customer](../classes/Customer.mdx)", + "description": "The details of the customer 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": "discount_total", + "type": "`number`", + "description": "The total of discount rounded", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "discounts", + "type": "[Discount](../classes/Discount.mdx)[]", + "description": "The details of the discounts applied on the order.", + "optional": false, + "defaultValue": "", + "expandable": true, + "children": [] + }, + { + "name": "display_id", + "type": "`number`", + "description": "The order's display ID", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "draft_order", + "type": "[DraftOrder](../classes/DraftOrder.mdx)", + "description": "The details of the draft order this order was created from.", + "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": "edits", + "type": "[OrderEdit](../classes/OrderEdit.mdx)[]", + "description": "The details of the order edits done on 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": "external_id", + "type": "`null` \\| `string`", + "description": "The ID of an external order.", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "fulfillment_status", + "type": "[FulfillmentStatus](../enums/FulfillmentStatus.mdx)", + "description": "The order's fulfillment status", + "optional": false, + "defaultValue": "not_fulfilled", + "expandable": false, + "children": [] + }, + { + "name": "fulfillments", + "type": "[Fulfillment](../classes/Fulfillment.mdx)[]", + "description": "The details of the fulfillments created for the order.", + "optional": false, + "defaultValue": "", + "expandable": true, + "children": [] + }, + { + "name": "gift_card_tax_total", + "type": "`number`", + "description": "The total of gift cards with taxes", + "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_transactions", + "type": "[GiftCardTransaction](../classes/GiftCardTransaction.mdx)[]", + "description": "The gift card transactions made in the order.", + "optional": false, + "defaultValue": "", + "expandable": true, + "children": [] + }, + { + "name": "gift_cards", + "type": "[GiftCard](../classes/GiftCard.mdx)[]", + "description": "The details of the gift card used in the order.", + "optional": false, + "defaultValue": "", + "expandable": true, + "children": [] + }, + { + "name": "id", + "type": "`string`", + "description": "The order's ID", + "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": "item_tax_total", + "type": "`null` \\| `number`", + "description": "The tax total applied on items", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "items", + "type": "[LineItem](../classes/LineItem.mdx)[]", + "description": "The details of the line items that belong to the order.", + "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": "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": "object", + "type": "`\"order\"`", + "description": "", + "optional": false, + "defaultValue": "\"order\"", + "expandable": false, + "children": [] + }, + { + "name": "paid_total", + "type": "`number`", + "description": "The total amount paid", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "payment_status", + "type": "[PaymentStatus](../enums/PaymentStatus.mdx)", + "description": "The order's payment status", + "optional": false, + "defaultValue": "not_paid", + "expandable": false, + "children": [] + }, + { + "name": "payments", + "type": "[Payment](../classes/Payment.mdx)[]", + "description": "The details of the payments used in the order.", + "optional": false, + "defaultValue": "", + "expandable": true, + "children": [] + }, + { + "name": "raw_discount_total", + "type": "`number`", + "description": "The total of discount", + "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": "refunded_total", + "type": "`number`", + "description": "The total amount refunded if the order is returned.", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "refunds", + "type": "[Refund](../classes/Refund.mdx)[]", + "description": "The details of the refunds created for the order.", + "optional": false, + "defaultValue": "", + "expandable": true, + "children": [] + }, + { + "name": "region", + "type": "[Region](../classes/Region.mdx)", + "description": "The details of the region this order was created in.", + "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": "returnable_items", + "type": "[LineItem](../classes/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": "returns", + "type": "[Return](../classes/Return.mdx)[]", + "description": "The details of the returns created for the order.", + "optional": false, + "defaultValue": "", + "expandable": true, + "children": [] + }, + { + "name": "sales_channel", + "type": "[SalesChannel](../classes/SalesChannel.mdx)", + "description": "The details of the sales channel this order belongs to.", + "optional": false, + "defaultValue": "", + "expandable": true, + "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": "shipping_address", + "type": "[Address](../classes/Address.mdx)", + "description": "The details of the shipping 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_methods", + "type": "[ShippingMethod](../classes/ShippingMethod.mdx)[]", + "description": "The details of the shipping methods used in the order.", + "optional": false, + "defaultValue": "", + "expandable": true, + "children": [] + }, + { + "name": "shipping_tax_total", + "type": "`null` \\| `number`", + "description": "The tax total applied on shipping", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "shipping_total", + "type": "`number`", + "description": "The total of shipping", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "status", + "type": "[OrderStatus](../enums/OrderStatus.mdx)", + "description": "The order's status", + "optional": false, + "defaultValue": "pending", + "expandable": false, + "children": [] + }, + { + "name": "subtotal", + "type": "`number`", + "description": "The subtotal of the order", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "swaps", + "type": "[Swap](../classes/Swap.mdx)[]", + "description": "The details of the swaps created for 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": "tax_total", + "type": "`null` \\| `number`", + "description": "The total of tax", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "total", + "type": "`number`", + "description": "The total amount of the order", + "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": "fulfillment", + "type": "[Fulfillment](../classes/Fulfillment.mdx)", + "description": "The fulfillment being created.", + "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": "claim_order", + "type": "[ClaimOrder](../classes/ClaimOrder.mdx)", + "description": "The details of the claim that the fulfillment may belong to.", + "optional": false, + "defaultValue": "", + "expandable": true, + "children": [] + }, + { + "name": "claim_order_id", + "type": "`string`", + "description": "The ID of the Claim that the Fulfillment belongs to.", + "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": "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": "id", + "type": "`string`", + "description": "The fulfillment's ID", + "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": "items", + "type": "[FulfillmentItem](../classes/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": "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": "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 sent.", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "order", + "type": "[Order](../classes/Order.mdx)", + "description": "The details of the order that the fulfillment may belong to.", + "optional": false, + "defaultValue": "", + "expandable": true, + "children": [] + }, + { + "name": "order_id", + "type": "`string`", + "description": "The ID of the Order that the Fulfillment belongs to.", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "provider", + "type": "[FulfillmentProvider](../classes/FulfillmentProvider.mdx)", + "description": "The details of the fulfillment provider responsible for handling the fulfillment.", + "optional": false, + "defaultValue": "", + "expandable": true, + "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": "shipped_at", + "type": "`Date`", + "description": "The date with timezone at which the Fulfillment was shipped.", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "swap", + "type": "[Swap](../classes/Swap.mdx)", + "description": "The details of the swap that the fulfillment may belong to.", + "optional": false, + "defaultValue": "", + "expandable": true, + "children": [] + }, + { + "name": "swap_id", + "type": "`string`", + "description": "The ID of the Swap that the Fulfillment belongs to.", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "tracking_links", + "type": "[TrackingLink](../classes/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": "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": "updated_at", + "type": "`Date`", + "description": "The date with timezone at which the resource was updated.", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + } + ] + } +]} /> + +#### Returns + +`", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + } + ] + } +]} /> + +___ + +### createReturn + +Fulfillment providers can also be used to return products. A shipping option can be used for returns if the `is_return` property is true or if an admin creates a Return Shipping Option from the settings. +This method is used when the admin [creates a return request](https://docs.medusajs.com/api/admin#orders\_postordersorderreturns) for an order, +[creates a swap](https://docs.medusajs.com/api/admin#orders\_postordersorderswaps) for an order, or when the +[customer creates a return of their order](https://docs.medusajs.com/api/store#returns\_postreturns). The fulfillment is created automatically for the order return. + +#### Example + +This is the basic implementation of the method for a fulfillment provider that does not contact with a third-party provider to fulfill the return: + +```ts +class MyFulfillmentService extends AbstractFulfillmentService { + // ... + async createReturn( + returnOrder: CreateReturnType + ): Promise> { + return {} + } +} +``` + +#### Parameters + +`", + "description": "An optional key-value map with additional details", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "no_notification", + "type": "`null` \\| `boolean`", + "description": "When set to true, no notification will be sent related to this return.", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "order", + "type": "[Order](../classes/Order.mdx)", + "description": "The details of the order that the return was created for.", + "optional": false, + "defaultValue": "", + "expandable": true, + "children": [] + }, + { + "name": "order_id", + "type": "`null` \\| `string`", + "description": "The ID of the order that the return was created for.", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "received_at", + "type": "`Date`", + "description": "The date with timezone at which the return was received.", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "refund_amount", + "type": "`number`", + "description": "The amount that should be refunded as a result of the return.", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "shipping_data", + "type": "`Record`", + "description": "Data about the return shipment as provided by the Fulfilment Provider that handles the return shipment.", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "shipping_method", + "type": "[ShippingMethod](../classes/ShippingMethod.mdx)", + "description": "The details of the Shipping Method that will be used to send the Return back. Can be null if the Customer will handle the return shipment themselves.", + "optional": false, + "defaultValue": "", + "expandable": true, + "children": [] + }, + { + "name": "status", + "type": "[ReturnStatus](../enums/ReturnStatus.mdx)", + "description": "Status of the Return.", + "optional": false, + "defaultValue": "requested", + "expandable": false, + "children": [] + }, + { + "name": "swap", + "type": "[Swap](../classes/Swap.mdx)", + "description": "The details of the swap that the return may belong to.", + "optional": false, + "defaultValue": "", + "expandable": true, + "children": [] + }, + { + "name": "swap_id", + "type": "`null` \\| `string`", + "description": "The ID of the swap that the return may belong to.", + "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": [] + } + ] + } +]} /> + +#### Returns + +`", + "optional": false, + "defaultValue": "", + "description": "", + "expandable": false, + "children": [] + } + ] + } +]} /> + +___ + +### getFulfillmentDocuments + +This method is used to retrieve any documents associated with a fulfillment. This method isn't used by default in the backend, but you can use it for custom use cases such as allowing admins to download these documents. + +#### Example + +```ts +class MyFulfillmentService extends FulfillmentService { + // ... + async getFulfillmentDocuments( + data: Record + ): Promise { + // assuming you contact a client to + // retrieve the document + return this.client.getFulfillmentDocuments() + } +} +``` + +#### Parameters + + + +#### Returns + + + +___ + +### getFulfillmentOptions + +This method is used when retrieving the list of fulfillment options available in a region, particularly by the [List Fulfillment Options API Route](https://docs.medusajs.com/api/admin#regions\_getregionsregionfulfillmentoptions). +For example, if you’re integrating UPS as a fulfillment provider, you might support two fulfillment options: UPS Express Shipping and UPS Access Point. Each of these options can have different data associated with them. + +#### Example + +```ts +class MyFulfillmentService extends AbstractFulfillmentService { + // ... + async getFulfillmentOptions(): Promise { + return [ + { + id: "my-fulfillment", + }, + { + id: "my-fulfillment-dynamic", + }, + ] + } +} +``` + +#### Returns + + + +___ + +### getReturnDocuments + +This method is used to retrieve any documents associated with a return. This method isn't used by default in the backend, but you can use it for custom use cases such as allowing admins to download these documents. + +#### Example + +```ts +class MyFulfillmentService extends FulfillmentService { + // ... + async getReturnDocuments( + data: Record + ): Promise { + // assuming you contact a client to + // retrieve the document + return this.client.getReturnDocuments() + } +} +``` + +#### Parameters + +`", + "description": "The data attribute of the return that you're retrieving the documents for.", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + } +]} /> + +#### Returns + + + +___ + +### getShipmentDocuments + +This method is used to retrieve any documents associated with a shipment. This method isn't used by default in the backend, but you can use it for custom use cases such as allowing admins to download these documents. + +#### Example + +```ts +class MyFulfillmentService extends FulfillmentService { + // ... + async getShipmentDocuments( + data: Record + ): Promise { + // assuming you contact a client to + // retrieve the document + return this.client.getShipmentDocuments() + } +} +``` + +#### Parameters + +`", + "description": "The `data` attribute of the shipment that you're retrieving the documents for.", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + } +]} /> + +#### Returns + + + +___ + +### retrieveDocuments + +This method is used to retrieve any documents associated with an order and its fulfillments. This method isn't used by default in the backend, but you can use it for +custom use cases such as allowing admins to download these documents. + +#### Example + +```ts +class MyFulfillmentService extends FulfillmentService { + // ... + async retrieveDocuments( + fulfillmentData: Record, + documentType: "invoice" | "label" + ): Promise { + // assuming you contact a client to + // retrieve the document + return this.client.getDocuments() + } +} +``` + +#### Parameters + + + +#### Returns + + + +___ + +### validateFulfillmentData + +This method is called when a shipping method is created. This typically happens when the customer chooses a shipping option during checkout, when a shipping method is created +for an order return, or in other similar cases. The shipping option and its data are validated before the shipping method is created. + +You can use the provided parameters to validate the chosen shipping option. For example, you can check if the `data` object passed as a second parameter includes all data needed to +fulfill the shipment later on. + +If any of the data is invalid, you can throw an error. This error will stop Medusa from creating a shipping method and the error message will be returned as a result of the API Route. + +#### Example + +```ts +class MyFulfillmentService extends AbstractFulfillmentService { + // ... + async validateFulfillmentData( + optionData: Record, + data: Record, + cart: Cart + ): Promise> { + if (data.id !== "my-fulfillment") { + throw new Error("invalid data") + } + + return { + ...data, + } + } +} +``` + +#### Parameters + +`", + "description": "The context of the cart which can include info like IP or user agent.", + "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": "customer", + "type": "[Customer](../classes/Customer.mdx)", + "description": "The details of the customer the cart belongs to.", + "optional": false, + "defaultValue": "", + "expandable": true, + "children": [] + }, + { + "name": "customer_id", + "type": "`string`", + "description": "The customer's ID", + "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": "discount_total", + "type": "`number`", + "description": "The total of discount rounded", + "optional": true, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "discounts", + "type": "[Discount](../classes/Discount.mdx)[]", + "description": "An array of details of all discounts applied to the cart.", + "optional": false, + "defaultValue": "", + "expandable": true, + "children": [] + }, + { + "name": "email", + "type": "`string`", + "description": "The email associated with the cart", + "optional": false, + "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": "gift_card_total", + "type": "`number`", + "description": "The total of gift cards", + "optional": true, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "gift_cards", + "type": "[GiftCard](../classes/GiftCard.mdx)[]", + "description": "An array of details of all gift cards applied to the cart.", + "optional": false, + "defaultValue": "", + "expandable": true, + "children": [] + }, + { + "name": "id", + "type": "`string`", + "description": "The cart's ID", + "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": "item_tax_total", + "type": "`null` \\| `number`", + "description": "The total of items with taxes", + "optional": true, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "items", + "type": "[LineItem](../classes/LineItem.mdx)[]", + "description": "The line items added to the cart.", + "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": "object", + "type": "`\"cart\"`", + "description": "", + "optional": false, + "defaultValue": "\"cart\"", + "expandable": false, + "children": [] + }, + { + "name": "payment", + "type": "[Payment](../classes/Payment.mdx)", + "description": "The details of the payment associated with the cart.", + "optional": false, + "defaultValue": "", + "expandable": true, + "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": "payment_id", + "type": "`string`", + "description": "The payment's ID if available", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "payment_session", + "type": "`null` \\| [PaymentSession](../classes/PaymentSession.mdx)", + "description": "The details of the selected payment session in the cart.", + "optional": false, + "defaultValue": "", + "expandable": true, + "children": [] + }, + { + "name": "payment_sessions", + "type": "[PaymentSession](../classes/PaymentSession.mdx)[]", + "description": "The details of all payment sessions created on the cart.", + "optional": false, + "defaultValue": "", + "expandable": true, + "children": [] + }, + { + "name": "raw_discount_total", + "type": "`number`", + "description": "The total of discount", + "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": "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": "region", + "type": "[Region](../classes/Region.mdx)", + "description": "The details of the region associated with 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": "sales_channel", + "type": "[SalesChannel](../classes/SalesChannel.mdx)", + "description": "The details of the sales channel associated with the cart.", + "optional": false, + "defaultValue": "", + "expandable": true, + "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": "shipping_address", + "type": "`null` \\| [Address](../classes/Address.mdx)", + "description": "The details of the shipping 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_methods", + "type": "[ShippingMethod](../classes/ShippingMethod.mdx)[]", + "description": "The details of the shipping methods added to the cart.", + "optional": false, + "defaultValue": "", + "expandable": true, + "children": [] + }, + { + "name": "shipping_tax_total", + "type": "`null` \\| `number`", + "description": "The total of shipping with taxes", + "optional": true, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "shipping_total", + "type": "`number`", + "description": "The total of shipping", + "optional": true, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "subtotal", + "type": "`number`", + "description": "The subtotal of the cart", + "optional": true, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "tax_total", + "type": "`null` \\| `number`", + "description": "The total of tax", + "optional": true, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "total", + "type": "`number`", + "description": "The total amount of the cart", + "optional": true, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "type", + "type": "[CartType](../enums/CartType.mdx)", + "description": "The cart's type.", + "optional": false, + "defaultValue": "default", + "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": [] + } + ] + } +]} /> + +#### Returns + +`", + "optional": false, + "defaultValue": "", + "description": "", + "expandable": false, + "children": [] + } + ] + } +]} /> + +___ + +### validateOption + +Once the admin creates the shipping option, the data of the shipping option will be validated first using this method. This method is called when the [Create Shipping Option API Route](https://docs.medusajs.com/api/admin#shipping-options\_postshippingoptions) is used. + +#### Example + +For example, you can use this method to ensure that the `id` in the `data` object is correct: + +```ts +class MyFulfillmentService extends AbstractFulfillmentService { + // ... + async validateOption( + data: Record + ): Promise { + return data.id == "my-fulfillment" + } +} +``` + +#### Parameters + + + +#### Returns + + diff --git a/www/apps/docs/content/references/fulfillment/types/CreateReturnType.mdx b/www/apps/docs/content/references/fulfillment/types/CreateReturnType.mdx new file mode 100644 index 0000000000..57bc5120b3 --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/types/CreateReturnType.mdx @@ -0,0 +1,9 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# CreateReturnType + + **CreateReturnType**: [Omit](Omit.mdx)<[Return](../classes/Return.mdx), "beforeInsert"> diff --git a/www/apps/docs/content/references/fulfillment/types/Exclude.mdx b/www/apps/docs/content/references/fulfillment/types/Exclude.mdx new file mode 100644 index 0000000000..645f1c362a --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/types/Exclude.mdx @@ -0,0 +1,34 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# Exclude + + **Exclude**: `T` extends `U` ? `never` : `T` + +Exclude from T those types that are assignable to U + +## Type Parameters + + diff --git a/www/apps/docs/content/references/fulfillment/types/FulfillmentProviderData.mdx b/www/apps/docs/content/references/fulfillment/types/FulfillmentProviderData.mdx new file mode 100644 index 0000000000..131b873239 --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/types/FulfillmentProviderData.mdx @@ -0,0 +1,9 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# FulfillmentProviderData + + **FulfillmentProviderData**: `Record` diff --git a/www/apps/docs/content/references/fulfillment/types/MedusaContainer.mdx b/www/apps/docs/content/references/fulfillment/types/MedusaContainer.mdx new file mode 100644 index 0000000000..d4f449a4b0 --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/types/MedusaContainer.mdx @@ -0,0 +1,9 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# MedusaContainer + + **MedusaContainer**: `AwilixContainer` & ``{ createScope: () => [MedusaContainer](MedusaContainer.mdx) ; registerAdd: <T>(name: string, registration: T) => [MedusaContainer](MedusaContainer.mdx) }`` diff --git a/www/apps/docs/content/references/fulfillment/types/Omit.mdx b/www/apps/docs/content/references/fulfillment/types/Omit.mdx new file mode 100644 index 0000000000..04136e4dd6 --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/types/Omit.mdx @@ -0,0 +1,34 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# Omit + + **Omit**: [Pick](Pick.mdx)<T, [Exclude](Exclude.mdx)<keyof T, K>> + +Construct a type with the properties of T except for those in type K. + +## Type Parameters + + diff --git a/www/apps/docs/content/references/fulfillment/types/Pick.mdx b/www/apps/docs/content/references/fulfillment/types/Pick.mdx new file mode 100644 index 0000000000..92950bfb39 --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/types/Pick.mdx @@ -0,0 +1,34 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# Pick + + **Pick**: { [P in K]: T[P] } + +From T, pick a set of properties whose keys are in the union K + +## Type Parameters + + diff --git a/www/apps/docs/content/references/fulfillment/types/Record.mdx b/www/apps/docs/content/references/fulfillment/types/Record.mdx new file mode 100644 index 0000000000..5a0cb4a1c0 --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/types/Record.mdx @@ -0,0 +1,34 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# Record + + **Record**: { [P in K]: T } + +Construct a type with a set of properties K of type T + +## Type Parameters + + diff --git a/www/apps/docs/content/references/fulfillment/types/ShippingMethodData.mdx b/www/apps/docs/content/references/fulfillment/types/ShippingMethodData.mdx new file mode 100644 index 0000000000..2cca286019 --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/types/ShippingMethodData.mdx @@ -0,0 +1,9 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# ShippingMethodData + + **ShippingMethodData**: `Record` diff --git a/www/apps/docs/content/references/fulfillment/types/ShippingOptionData.mdx b/www/apps/docs/content/references/fulfillment/types/ShippingOptionData.mdx new file mode 100644 index 0000000000..8c63d4a052 --- /dev/null +++ b/www/apps/docs/content/references/fulfillment/types/ShippingOptionData.mdx @@ -0,0 +1,9 @@ +--- +displayed_sidebar: modules +--- + +import ParameterTypes from "@site/src/components/ParameterTypes" + +# ShippingOptionData + + **ShippingOptionData**: `Record` diff --git a/www/apps/docs/content/references/inventory/types/Exclude.mdx b/www/apps/docs/content/references/inventory/types/Exclude.mdx index 58d9fcaa13..60cb8df21b 100644 --- a/www/apps/docs/content/references/inventory/types/Exclude.mdx +++ b/www/apps/docs/content/references/inventory/types/Exclude.mdx @@ -10,7 +10,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes" Exclude from T those types that are assignable to U -#### Type Parameters +## Type Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -#### Type declaration +## Type declaration -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -#### Type declaration +## Type declaration (eventName, data, options?): Promise<void>` -##### Parameters +#### Parameters -##### Returns +#### Returns (data): Promise<void>` -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -#### Type declaration +## Type declaration -#### Type declaration +## Type declaration -##### Parameters +### Parameters -##### Returns +### Returns -#### Type declaration +## Type declaration -##### Parameters +### Parameters -##### Returns +### Returns { + strictEqual(executionAsyncId(), ee1.asyncId); + strictEqual(triggerAsyncId(), ee1.triggerAsyncId); +}); -#### Since +const ee2 = new EventEmitter(); + +// 'foo' listeners on ordinary EventEmitters that do not track async +// context, however, run in the same async context as the emit(). +ee2.on('foo', () => { + notStrictEqual(executionAsyncId(), ee2.asyncId); + notStrictEqual(triggerAsyncId(), ee2.triggerAsyncId); +}); + +Promise.resolve().then(() => { + ee1.emit('foo'); + ee2.emit('foo'); +}); +``` + +The `EventEmitterAsyncResource` class has the same methods and takes the +same options as `EventEmitter` and `AsyncResource` themselves. + +## Since v17.4.0, v16.14.0 @@ -27,7 +52,7 @@ v17.4.0, v16.14.0 { "name": "asyncId", "type": "`number`", - "description": "The unique asyncId assigned to the resource.", + "description": "The unique `asyncId` assigned to the resource.", "optional": false, "defaultValue": "", "expandable": false, @@ -36,7 +61,7 @@ v17.4.0, v16.14.0 { "name": "asyncResource", "type": "[EventEmitterReferencingAsyncResource](../interfaces/internal.EventEmitter.EventEmitterReferencingAsyncResource.mdx)", - "description": "The underlying AsyncResource", + "description": "The returned `AsyncResource` object has an additional `eventEmitter` property that provides a reference to this `EventEmitterAsyncResource`.", "optional": false, "defaultValue": "", "expandable": false, @@ -89,11 +114,13 @@ v17.4.0, v16.14.0 } ]} /> +___ + ## Methods -#### [captureRejectionSymbol] +### [captureRejectionSymbol] -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns { Returns a reference to the `EventEmitter`, so that calls can be chained. -##### Parameters +#### Parameters -##### Returns +#### Returns { Returns a reference to the `EventEmitter`, so that calls can be chained. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns ac.abort()); ``` -##### Parameters +#### Parameters ac.abort()); } ]} /> -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Methods -#### asyncId +### asyncId -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -#### Type declaration +## Type declaration -##### Parameters +### Parameters -#### Type declaration +## Type declaration -##### Returns +### Returns -##### Returns +### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Methods -#### addDocuments +### addDocuments Used to index documents by the search engine provider -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### updateAddress +### updateAddress Update an address of the logged-in customer. -##### Example +#### Example ```ts import Medusa from "@medusajs/medusa-js" @@ -577,7 +577,7 @@ medusa.customers.addresses }) ``` -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### getToken +### getToken Authenticate the user and retrieve a JWT token to use for subsequent authenticated requests. -##### Example +#### Example ```ts import Medusa from "@medusajs/medusa-js" @@ -424,7 +424,7 @@ medusa.admin.auth }) ``` -##### Parameters +#### Parameters -##### Returns +#### Returns { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### confirm +### confirm When a batch job is created, it's not executed automatically if `dry_run` is set to `true`. This method confirms that the batch job should be executed. -##### Example +#### Example ```ts import Medusa from "@medusajs/medusa-js" @@ -262,7 +262,7 @@ medusa.admin.batchJobs.confirm(batchJobId).then(({ batch_job }) => { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### create +### create Create a Batch Job to be executed asynchronously in the Medusa backend. If `dry_run` is set to `true`, the batch job will not be executed until the it is confirmed, which can be done using the [confirm](AdminBatchJobsResource.mdx#confirm) method. -##### Example +#### Example ```ts import Medusa from "@medusajs/medusa-js" @@ -495,7 +495,7 @@ medusa.admin.batchJobs.create({ }) ``` -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### update +### update Update a product collection's details. -##### Example +#### Example ```ts import Medusa from "@medusajs/medusa-js" @@ -1117,7 +1117,7 @@ medusa.admin.collections }) ``` -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### get +### get Send a `GET` request to a custom API Route. The method accepts a tuple of type parameters: the first `TQuery` is the type of accepted query parameters, which defaults to `Record`; the second `TResponse` is the type of response, which defaults to `any`. -##### Example +#### Example ```ts import Medusa from "@medusajs/medusa-js" @@ -126,7 +126,7 @@ medusa.admin.custom.get, PostsResponse>( }) ``` -##### Parameters +#### Parameters , PostsResponse>( } ]} /> -##### Returns +#### Returns , PostsResponse>( ___ -#### post +### post Send a `POST` request to a custom API Route. The method accepts a tuple of type parameters: the first `TPayload` is the type of accepted body parameters, which defaults to `Record`; the second `TResponse` is the type of response, which defaults to `any`. -##### Example +#### Example ```ts import Medusa from "@medusajs/medusa-js" @@ -240,7 +240,7 @@ medusa.admin.custom.post( }) ``` -##### Parameters +#### Parameters ( } ]} /> -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### update +### update Update a customer's details. -##### Example +#### Example ```ts import Medusa from "@medusajs/medusa-js" @@ -845,7 +845,7 @@ medusa.admin.customers }) ``` -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### create +### create Create a discount with a given set of rules that defines how the discount is applied. -##### Example +#### Example ```ts import Medusa from "@medusajs/medusa-js" @@ -625,7 +625,7 @@ medusa.admin.discounts }) ``` -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### deleteCondition +### deleteCondition Delete a discount condition. This doesn't delete resources associated to the discount condition. -##### Example +#### Example ```ts import Medusa from "@medusajs/medusa-js" @@ -1844,7 +1844,7 @@ medusa.admin.discounts }) ``` -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### retrieveByCode +### retrieveByCode Retrieve a discount's details by its discount code. -##### Example +#### Example ```ts import Medusa from "@medusajs/medusa-js" @@ -3641,7 +3641,7 @@ medusa.admin.discounts.retrieveByCode(code).then(({ discount }) => { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### update +### update Update a discount with a given set of rules that define how the discount is applied. -##### Example +#### Example ```ts import Medusa from "@medusajs/medusa-js" @@ -3882,7 +3882,7 @@ medusa.admin.discounts }) ``` -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### removeLineItem +### removeLineItem Delete a Line Item from a Draft Order. -##### Example +#### Example ```ts import Medusa from "@medusajs/medusa-js" @@ -1635,7 +1635,7 @@ medusa.admin.draftOrders }) ``` -##### Parameters +#### Parameters -##### Returns +#### Returns { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### update +### update Update a Draft Order's details. -##### Example +#### Example ```ts import Medusa from "@medusajs/medusa-js" @@ -2050,7 +2050,7 @@ medusa.admin.draftOrders }) ``` -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### list +### list Retrieve a list of gift cards. The gift cards can be filtered by fields such as `q` passed in the `query` parameter. The gift cards can also paginated. -##### Example +#### Example To list gift cards: @@ -394,7 +394,7 @@ medusa.admin.giftCards }) ``` -##### Parameters +#### Parameters -##### Returns +#### Returns { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### update +### update Update a gift card's details. -##### Example +#### Example ```ts import Medusa from "@medusajs/medusa-js" @@ -873,7 +873,7 @@ medusa.admin.giftCards }) ``` -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### list +### list Retrieve a list of invites. -##### Example +#### Example ```ts import Medusa from "@medusajs/medusa-js" @@ -311,7 +311,7 @@ medusa.admin.invites.list().then(({ invites }) => { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### resend +### resend Resend an invite. This renews the expiry date by seven days and generates a new token for the invite. It also triggers the `invite.created` event, so if you have a Notification Provider installed that handles this event, a notification should be sent to the email associated with the invite to allow them to accept the invite. -##### Example +#### Example ```ts import Medusa from "@medusajs/medusa-js" @@ -474,7 +474,7 @@ medusa.admin.invites }) ``` -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### list +### list Retrieve a list of notes. The notes can be filtered by fields such as `resource_id` passed in the `query` parameter. The notes can also be paginated. -##### Example +#### Example To list notes: @@ -330,7 +330,7 @@ medusa.admin.notes }) ``` -##### Parameters +#### Parameters -##### Returns +#### Returns { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### update +### update Update a Note's details. -##### Example +#### Example ```ts import Medusa from "@medusajs/medusa-js" @@ -719,7 +719,7 @@ medusa.admin.notes }) ``` -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns -##### Returns +#### Returns { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### confirm +### confirm Confirm an order edit. This will reflect the changes in the order edit on the associated order. -##### Example +#### Example ```ts import Medusa from "@medusajs/medusa-js" @@ -748,7 +748,7 @@ medusa.admin.orderEdits.confirm(orderEditId).then(({ order_edit }) => { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### create +### create Create an order edit. -##### Example +#### Example ```ts import Medusa from "@medusajs/medusa-js" @@ -1084,7 +1084,7 @@ medusa.admin.orderEdits.create({ orderId }).then(({ order_edit }) => { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### delete +### delete Delete an order edit. Only order edits that have the status `created` can be deleted. -##### Example +#### Example ```ts import Medusa from "@medusajs/medusa-js" @@ -1448,7 +1448,7 @@ medusa.admin.orderEdits.delete(orderEditId).then(({ id, object, deleted }) => { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### deleteItemChange +### deleteItemChange Delete a line item change that indicates the addition, deletion, or update of a line item in the original order. -##### Example +#### Example ```ts import Medusa from "@medusajs/medusa-js" @@ -1532,7 +1532,7 @@ medusa.admin.orderEdits }) ``` -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### cancel +### cancel Cancel an order and change its status. This will also cancel any associated fulfillments and payments, and it may fail if the payment or fulfillment Provider is unable to cancel the payment/fulfillment. -##### Example +#### Example ```ts import Medusa from "@medusajs/medusa-js" @@ -205,7 +205,7 @@ medusa.admin.orders.cancel(orderId).then(({ order }) => { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### cancelClaim +### cancelClaim Cancel a claim and change its status. A claim can't be canceled if it has a refund, if its fulfillments haven't been canceled, of if its associated return hasn't been canceled. -##### Example +#### Example ```ts import Medusa from "@medusajs/medusa-js" @@ -269,7 +269,7 @@ medusa.admin.orders.cancelClaim(orderId, claimId).then(({ order }) => { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### cancelClaimFulfillment +### cancelClaimFulfillment Cancel a claim's fulfillment and change its fulfillment status to `canceled`. -##### Example +#### Example ```ts import Medusa from "@medusajs/medusa-js" @@ -344,7 +344,7 @@ medusa.admin.orders }) ``` -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### cancelSwapFulfillment +### cancelSwapFulfillment Cancel a swap's fulfillment and change its fulfillment status to `canceled`. -##### Example +#### Example ```ts import Medusa from "@medusajs/medusa-js" @@ -576,7 +576,7 @@ medusa.admin.orders }) ``` -##### Parameters +#### Parameters -##### Returns +#### Returns { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### complete +### complete Complete an order and change its status. A canceled order can't be completed. -##### Example +#### Example ```ts import Medusa from "@medusajs/medusa-js" @@ -722,7 +722,7 @@ medusa.admin.orders.complete(orderId).then(({ order }) => { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### createClaim +### createClaim Create a claim for an order. If a return shipping method is specified, a return will also be created and associated with the claim. If the claim's type is `refund`, the refund is processed as well. -##### Example +#### Example ```ts import Medusa from "@medusajs/medusa-js" @@ -797,7 +797,7 @@ medusa.admin.orders }) ``` -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### fulfillSwap +### fulfillSwap Create a Fulfillment for a Swap and change its fulfillment status to `fulfilled`. If it requires any additional actions, its fulfillment status may change to `requires_action`. -##### Example +#### Example ```ts import Medusa from "@medusajs/medusa-js" @@ -1679,7 +1679,7 @@ medusa.admin.orders }) ``` -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### refundPayment +### refundPayment Refund an amount for an order. The amount must be less than or equal the `refundable_amount` of the order. -##### Example +#### Example ```ts import Medusa from "@medusajs/medusa-js" @@ -2147,7 +2147,7 @@ medusa.admin.orders }) ``` -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### refundPayment +### refundPayment Refund a payment. The payment must be captured first. -##### Example +#### Example ```ts import Medusa from "@medusajs/medusa-js" @@ -283,7 +283,7 @@ medusa.admin.payments }) ``` -##### Parameters +#### Parameters -##### Returns +#### Returns { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### deletePrices +### deletePrices Delete a list of prices in a price list -##### Example +#### Example ```ts import Medusa from "@medusajs/medusa-js" @@ -803,7 +803,7 @@ medusa.admin.priceLists }) ``` -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### update +### update Update a price list's details. -##### Example +#### Example ```ts import Medusa from "@medusajs/medusa-js" @@ -2736,7 +2736,7 @@ medusa.admin.priceLists }) ``` -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### deleteOption +### deleteOption Delete a product option. If there are product variants that use this product option, they must be deleted before deleting the product option. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### retrieve +### retrieve Retrieve a product's details. -##### Example +#### Example ```ts import Medusa from "@medusajs/medusa-js" @@ -3616,7 +3616,7 @@ medusa.admin.products.retrieve(productId).then(({ product }) => { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### setMetadata +### setMetadata Set the metadata of a product. It can be any key-value pair, which allows adding custom data to a product. Learn about how you can update and delete the metadata attribute [here](https://docs.medusajs.com/development/entities/overview#metadata-attribute). -##### Example +#### Example ```ts import Medusa from "@medusajs/medusa-js" @@ -4013,7 +4013,7 @@ medusa.admin.products }) ``` -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### deleteCountry +### deleteCountry Delete a country from the list of countries in a region. The country will still be available in the system, and it can be used in other regions. -##### Example +#### Example ```ts import Medusa from "@medusajs/medusa-js" @@ -1265,7 +1265,7 @@ medusa.admin.regions.deleteCountry(regionId, "dk").then(({ region }) => { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### deleteFulfillmentProvider +### deleteFulfillmentProvider Delete a fulfillment provider from a region. The fulfillment provider will still be available for usage in other regions. -##### Example +#### Example ```ts import Medusa from "@medusajs/medusa-js" @@ -1523,7 +1523,7 @@ medusa.admin.regions }) ``` -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### retrieveFulfillmentOptions +### retrieveFulfillmentOptions Retrieve a list of fulfillment options available in a region. -##### Example +#### Example ```ts import Medusa from "@medusajs/medusa-js" @@ -2735,7 +2735,7 @@ medusa.admin.regions }) ``` -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### update +### update Update a reservation's details. -##### Example +#### Example ```ts import Medusa from "@medusajs/medusa-js" @@ -944,7 +944,7 @@ medusa.admin.reservations }) ``` -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### retrieve +### retrieve Retrieve a return reason's details. -##### Example +#### Example ```ts import Medusa from "@medusajs/medusa-js" @@ -510,7 +510,7 @@ medusa.admin.returnReasons }) ``` -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### list +### list Retrieve a list of Returns. The returns can be paginated. -##### Example +#### Example To list returns: @@ -631,7 +631,7 @@ medusa.admin.returns }) ``` -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### retrieve +### retrieve Retrieve a shipping option's details. -##### Example +#### Example ```ts import Medusa from "@medusajs/medusa-js" @@ -804,7 +804,7 @@ medusa.admin.shippingOptions.retrieve(optionId).then(({ shipping_option }) => { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### update +### update Update a shipping option's details. -##### Example +#### Example ```ts import Medusa from "@medusajs/medusa-js" @@ -1062,7 +1062,7 @@ medusa.admin.shippingOptions }) ``` -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### retrieve +### retrieve Retrieve a shipping profile's details. -##### Example +#### Example ```ts import Medusa from "@medusajs/medusa-js" @@ -483,7 +483,7 @@ medusa.admin.shippingProfiles }) ``` -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### deleteCurrency +### deleteCurrency Delete a currency code from the available currencies in a store. This doesn't completely delete the currency and it can be added again later to the store. -##### Example +#### Example ```ts import Medusa from "@medusajs/medusa-js" @@ -234,7 +234,7 @@ medusa.admin.store.deleteCurrency("eur").then(({ store }) => { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### listPaymentProviders +### listPaymentProviders Retrieve a list of available payment providers in a store. -##### Example +#### Example ```ts import Medusa from "@medusajs/medusa-js" @@ -435,7 +435,7 @@ medusa.admin.store.listPaymentProviders().then(({ payment_providers }) => { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### listTaxProviders +### listTaxProviders Retrieve a list of available tax providers in a store. -##### Example +#### Example ```ts import Medusa from "@medusajs/medusa-js" @@ -519,7 +519,7 @@ medusa.admin.store.listTaxProviders().then(({ tax_providers }) => { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### retrieve +### retrieve Retrieve the store's details. -##### Example +#### Example ```ts import Medusa from "@medusajs/medusa-js" @@ -603,7 +603,7 @@ medusa.admin.store.retrieve().then(({ store }) => { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### update +### update Update the store's details. -##### Example +#### Example ```ts import Medusa from "@medusajs/medusa-js" @@ -835,7 +835,7 @@ medusa.admin.store }) ``` -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### list +### list Retrieve a list of tax rates. The tax rates can be filtered by fields such as `name` or `rate` passed in the `query` parameter. The tax rates can also be paginated. -##### Example +#### Example To list tax rates: @@ -1240,7 +1240,7 @@ medusa.admin.taxRates }) ``` -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### createProtected +### createProtected Upload a file to an ACL or a non-public bucket. The file upload is handled by the file service installed on the Medusa backend. -##### Example +#### Example ```ts import Medusa from "@medusajs/medusa-js" @@ -149,7 +149,7 @@ medusa.admin.uploads.createProtected(file).then(({ uploads }) => { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### delete +### delete Delete an uploaded file from storage. The file is deleted using the installed file service on the Medusa backend. -##### Example +#### Example ```ts import Medusa from "@medusajs/medusa-js" @@ -237,7 +237,7 @@ medusa.admin.uploads }) ``` -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### list +### list Retrieve all admin users. -##### Example +#### Example ```ts import Medusa from "@medusajs/medusa-js" @@ -285,7 +285,7 @@ medusa.admin.users.list().then(({ users }) => { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### resetPassword +### resetPassword Reset the password of an admin user using their reset password token. You must generate a reset password token first for the user using the [sendResetPasswordToken](AdminUsersResource.mdx#sendresetpasswordtoken) method, then use that token to reset the password in this method. -##### Example +#### Example ```ts import Medusa from "@medusajs/medusa-js" @@ -447,7 +447,7 @@ medusa.admin.users }) ``` -##### Parameters +#### Parameters -##### Returns +#### Returns { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### sendResetPasswordToken +### sendResetPasswordToken Generate a password token for an admin user with a given email. This also triggers the `user.password_reset` event. So, if you have a Notification Service installed that can handle this event, a notification, such as an email, will be sent to the user. The token is triggered as part of the `user.password_reset` event's payload. That token must be used later to reset the password using the [resetPassword](AdminUsersResource.mdx#resetpassword) method. -##### Example +#### Example ```ts import Medusa from "@medusajs/medusa-js" @@ -814,7 +814,7 @@ medusa.admin.users }) ``` -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### list +### list Retrieve a list of product variants. The product variant can be filtered by fields such as `id` or `title` passed in the `query` parameter. The product variant can also be paginated. -##### Example +#### Example To list product variants: @@ -170,7 +170,7 @@ medusa.admin.variants }) ``` -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### exists +### exists Check if the email is already used by another registered customer. Can be used to validate a new customer's email. -##### Example +#### Example ```ts import Medusa from "@medusajs/medusa-js" @@ -308,7 +308,7 @@ const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) medusa.auth.exists("user@example.com") ``` -##### Parameters +#### Parameters -##### Returns +#### Returns { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### getToken +### getToken Authenticate the customer and retrieve a JWT token to use for subsequent authenticated requests. -##### Example +#### Example ```ts import Medusa from "@medusajs/medusa-js" @@ -588,7 +588,7 @@ medusa.auth }) ``` -##### Parameters +#### Parameters -##### Returns +#### Returns +___ + ## Methods -#### addShippingMethod +### addShippingMethod Add a shipping method to the cart. The validation of the `data` field is handled by the fulfillment provider of the chosen shipping option. -##### Example +#### Example ```ts import Medusa from "@medusajs/medusa-js" @@ -49,7 +51,7 @@ medusa.carts }) ``` -##### Parameters +#### Parameters -##### Returns +#### Returns { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### create +### create Create a Cart. Although optional, specifying the cart's region and sales channel can affect the cart's pricing and the products that can be added to the cart respectively. So, make sure to set those early on and change them if necessary, such as when the customer changes their region. If a customer is logged in, make sure to pass its ID or email within the cart's details so that the cart is attached to the customer. -##### Example +#### Example ```ts import Medusa from "@medusajs/medusa-js" @@ -571,7 +573,7 @@ medusa.carts.create().then(({ cart }) => { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### createPaymentSessions +### createPaymentSessions Create Payment Sessions for each of the available Payment Providers in the Cart's Region. If there's only one payment session created, it will be selected by default. The creation of the payment session uses the payment provider and may require sending requests to third-party services. -##### Example +#### Example ```ts import Medusa from "@medusajs/medusa-js" @@ -1062,7 +1064,7 @@ medusa.carts.createPaymentSessions(cartId).then(({ cart }) => { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### deleteDiscount +### deleteDiscount Remove a Discount from a Cart. This only removes the application of the discount, and not completely deletes it. The totals will be re-calculated and the payment sessions will be refreshed after the removal. -##### Example +#### Example ```ts import Medusa from "@medusajs/medusa-js" @@ -1488,7 +1490,7 @@ medusa.carts.deleteDiscount(cartId, code).then(({ cart }) => { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### deletePaymentSession +### deletePaymentSession Delete a Payment Session in a Cart. May be useful if a payment has failed. The totals will be recalculated. -##### Example +#### Example ```ts import Medusa from "@medusajs/medusa-js" @@ -1922,7 +1924,7 @@ medusa.carts.deletePaymentSession(cartId, "manual").then(({ cart }) => { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### refreshPaymentSession +### refreshPaymentSession Refresh a Payment Session to ensure that it is in sync with the Cart. This is usually not necessary, but is provided for edge cases. -##### Example +#### Example ```ts import Medusa from "@medusajs/medusa-js" @@ -2356,7 +2358,7 @@ medusa.carts.refreshPaymentSession(cartId, "manual").then(({ cart }) => { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### retrieve +### retrieve Retrieve a Cart's details. This includes recalculating its totals. -##### Example +#### Example ```ts import Medusa from "@medusajs/medusa-js" @@ -2790,7 +2792,7 @@ medusa.carts.retrieve(cartId).then(({ cart }) => { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### setPaymentSession +### setPaymentSession Select the Payment Session that will be used to complete the cart. This is typically used when the customer chooses their preferred payment method during checkout. The totals of the cart will be recalculated. -##### Example +#### Example ```ts import Medusa from "@medusajs/medusa-js" @@ -3220,7 +3222,7 @@ medusa.carts }) ``` -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns +___ + ## Methods -#### create +### create Register a new customer. This will also automatically authenticate the customer and set their login session in the response Cookie header. Subsequent requests sent with the JS client are sent with the Cookie session automatically. -##### Example +#### Example ```ts import Medusa from "@medusajs/medusa-js" @@ -61,7 +63,7 @@ medusa.customers }) ``` -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### resetPassword +### resetPassword Reset a customer's password using a password token created by a previous request using the [generatePasswordToken](CustomersResource.mdx#generatepasswordtoken) method. If the password token expired, you must create a new one. -##### Example +#### Example ```ts import Medusa from "@medusajs/medusa-js" @@ -1467,7 +1469,7 @@ medusa.customers }) ``` -##### Parameters +#### Parameters -##### Returns +#### Returns { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### update +### update Update the logged-in customer's details. This method requires [customer authentication](AuthResource.mdx#authenticate). -##### Example +#### Example ```ts import Medusa from "@medusajs/medusa-js" @@ -1910,7 +1912,7 @@ medusa.customers }) ``` -##### Parameters +#### Parameters -##### Returns +#### Returns { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns -##### Returns +#### Returns { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### update +### update Update a line item's data. -##### Example +#### Example ```ts import Medusa from "@medusajs/medusa-js" @@ -931,7 +931,7 @@ medusa.carts.lineItems }) ``` -##### Parameters +#### Parameters -##### Returns +#### Returns { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### decline +### decline Decline an Order Edit. The changes are not reflected on the original order. -##### Example +#### Example ```ts import Medusa from "@medusajs/medusa-js" @@ -330,7 +330,7 @@ medusa.orderEdits.decline(orderEditId).then(({ order_edit }) => { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### retrieve +### retrieve Retrieve an Order Edit's details. -##### Example +#### Example ```ts import Medusa from "@medusajs/medusa-js" @@ -648,7 +648,7 @@ medusa.orderEdits.retrieve(orderEditId).then(({ order_edit }) => { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### retrieveByCartId +### retrieveByCartId Retrieve an order's details by the ID of the cart that was used to create the order. -##### Example +#### Example ```ts import Medusa from "@medusajs/medusa-js" @@ -1390,7 +1390,7 @@ medusa.orders.retrieveByCartId(cartId).then(({ order }) => { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns +___ + ## Methods -#### list +### list Retrieves a list of products. The products can be filtered by fields such as `id` or `q` passed in the `query` parameter. The products can also be sorted or paginated. This method can also be used to retrieve a product by its handle. @@ -42,7 +44,7 @@ For accurate and correct pricing of the products based on the customer's context Passing `sales_channel_id` ensures retrieving only products available in the specified sales channel. You can alternatively use a publishable API key in the request header instead of passing a `sales_channel_id`. -##### Example +#### Example To list products: @@ -84,7 +86,7 @@ medusa.products }) ``` -##### Parameters +#### Parameters -##### Returns +#### Returns { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### search +### search Run a search query on products using the search service installed on the Medusa backend. The searching is handled through the search service, so the returned data's format depends on the search service you're using. -##### Example +#### Example ```ts import Medusa from "@medusajs/medusa-js" @@ -1174,7 +1176,7 @@ medusa.products }) ``` -##### Parameters +#### Parameters -##### Returns +#### Returns { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### retrieve +### retrieve Retrieve a Region's details. -##### Example +#### Example ```ts import Medusa from "@medusajs/medusa-js" @@ -295,7 +295,7 @@ medusa.regions.retrieve(regionId).then(({ region }) => { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### retrieve +### retrieve Retrieve a Return Reason's details. -##### Example +#### Example ```ts import Medusa from "@medusajs/medusa-js" @@ -192,7 +192,7 @@ medusa.returnReasons.retrieve(reasonId).then(({ return_reason }) => { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns -##### Returns +#### Returns { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { ___ -#### listCartOptions +### listCartOptions Retrieve a list of shipping options available for a cart. -##### Example +#### Example ```ts import Medusa from "@medusajs/medusa-js" @@ -331,7 +331,7 @@ medusa.shippingOptions.listCartOptions(cartId).then(({ shipping_options }) => { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns -##### Returns +#### Returns { }) ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Methods -#### [captureRejectionSymbol] +### [captureRejectionSymbol] -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns { Returns a reference to the `EventEmitter`, so that calls can be chained. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns { Returns a reference to the `EventEmitter`, so that calls can be chained. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns { See also: `writable.cork()`. -##### Returns +#### Returns { A `Writable` stream in object mode will always ignore the `encoding` argument. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns ac.abort()); ``` -##### Parameters +#### Parameters ac.abort()); } ]} /> -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Methods -#### construct +### construct -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Methods -#### construct +### construct -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns (source, destination, options?): [PipelinePromise](../types/internal.internal-3.PipelinePromise.mdx)<B>` -##### Parameters +#### Parameters -##### Returns +#### Returns (source, transform1, destination, options?): [PipelinePromise](../types/internal.internal-3.PipelinePromise.mdx)<B>` -##### Parameters +#### Parameters -##### Returns +#### Returns (source, transform1, transform2, destination, options?): [PipelinePromise](../types/internal.internal-3.PipelinePromise.mdx)<B>` -##### Parameters +#### Parameters -##### Returns +#### Returns (source, transform1, transform2, transform3, destination, options?): [PipelinePromise](../types/internal.internal-3.PipelinePromise.mdx)<B>` -##### Parameters +#### Parameters -##### Returns +#### Returns (source, transform1, transform2, transform3, transform4, destination, options?): [PipelinePromise](../types/internal.internal-3.PipelinePromise.mdx)<B>` -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -#### Type declaration +## Type declaration -##### Parameters +### Parameters -##### Returns +### Returns -#### Type declaration +## Type declaration -##### Parameters +### Parameters -##### Returns +### Returns -#### Type declaration +## Type declaration -##### Returns +### Returns +___ + ## Accessors -#### eventToSubscribersMap +### eventToSubscribersMap + +#### Returns + + + +___ ## Methods -#### emit +### emit `Abstract **emit**(eventName, data, options): Promise<void>` -##### Parameters +#### Parameters -##### Returns +#### Returns (data): Promise<void>` -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Accessors -#### options +### options -#### Implementation of +#### Returns -[ISearchService](../../SearchTypes/interfaces/internal.internal-1.SearchTypes.ISearchService.mdx).[options](../../SearchTypes/interfaces/internal.internal-1.SearchTypes.ISearchService.mdx#options) +`", + "optional": false, + "defaultValue": "", + "description": "", + "expandable": false, + "children": [] + } +]} /> + +___ ## Methods -#### addDocuments +### addDocuments Used to index documents by the search engine provider -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Methods -#### delete +### delete -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Methods -#### loadStatus +### loadStatus ___ -#### toJSON +### toJSON A Batch Job indicates an asynchronus task stored in the Medusa backend. Its status determines whether it has been executed or not. -##### Returns +#### Returns +___ + ## Methods -#### arrayBuffer +### arrayBuffer Returns a promise that fulfills with an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global\_Objects/ArrayBuffer) containing a copy of the `Blob` data. -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Methods -#### createClient +### createClient Creates the axios client used for requests As part of the creation, we configure the retry conditions and the exponential backoff approach. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Methods -#### [asyncDispose] +### [asyncDispose] Calls `readable.destroy()` with an `AbortError` and returns a promise that fulfills when the stream is finished. -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns (fn, options?): Promise<undefined \| T>` @@ -2013,7 +2015,7 @@ to find a chunk with a truthy value for *fn*. Once an *fn* call's awaited return the stream is destroyed and the promise is fulfilled with value for which *fn* returned a truthy value. If all of the *fn* calls on the chunks return a falsy value, the promise is fulfilled with `undefined`. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns { The `readable.pause()` method has no effect if there is a `'readable'`event listener. -##### Returns +#### Returns -##### Returns +#### Returns { Returns a reference to the `EventEmitter`, so that calls can be chained. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns { Returns a reference to the `EventEmitter`, so that calls can be chained. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns (fn, initial?, options?): Promise<T>` @@ -4800,7 +4802,7 @@ If the stream is empty, the promise is rejected with a `TypeError` with the `ERR The reducer function iterates the stream element-by-element which means that there is no *concurrency* parameter or parallelism. To perform a reduce concurrently, you can extract the async function to `readable.map` method. -##### Parameters +#### Parameters -##### Returns +#### Returns (fn, initial, options?): Promise<T>` -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns { }); ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns { See also: `writable.cork()`. -##### Returns +#### Returns { }, 1000); ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns -##### Returns +#### Returns { }); ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { A `Writable` stream in object mode will always ignore the `encoding` argument. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns ac.abort()); ``` -##### Parameters +#### Parameters ac.abort()); } ]} /> -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Methods -#### [captureRejectionSymbol] +### [captureRejectionSymbol] -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns { Returns a reference to the `EventEmitter`, so that calls can be chained. -##### Parameters +#### Parameters -##### Returns +#### Returns { Returns a reference to the `EventEmitter`, so that calls can be chained. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns ac.abort()); ``` -##### Parameters +#### Parameters ac.abort()); } ]} /> -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Methods -#### isFeatureEnabled +### isFeatureEnabled Check if a feature flag is enabled. There are two ways of using this method: @@ -36,7 +38,7 @@ We use 1. for top-level feature flags and 2. for nested feature flags. Almost al An example of a nested flag is workflows. To use it, you would do: `isFeatureEnabled({ workflows: Workflows.CreateCart })` -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Accessors -#### activeManager\_ +### activeManager\_ -#### Inherited from +#### Returns -[TransactionBaseService](internal.internal.TransactionBaseService.mdx).[activeManager_](internal.internal.TransactionBaseService.mdx#activemanager_) + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Methods -#### afterUpdateOrLoad +### afterUpdateOrLoad ___ -#### beforeUpdate +### beforeUpdate diff --git a/www/apps/docs/content/references/js-client/internal/classes/internal.MedusaError.mdx b/www/apps/docs/content/references/js-client/internal/classes/internal.MedusaError.mdx index d226745081..31d6965a03 100644 --- a/www/apps/docs/content/references/js-client/internal/classes/internal.MedusaError.mdx +++ b/www/apps/docs/content/references/js-client/internal/classes/internal.MedusaError.mdx @@ -211,13 +211,15 @@ Standardized error to be used across Medusa project. } ]} /> +___ + ## Methods -#### captureStackTrace +### captureStackTrace Create .stack property on a target object -##### Parameters +#### Parameters -##### Returns +#### Returns +___ + ## Methods -#### loadStatus +### loadStatus diff --git a/www/apps/docs/content/references/js-client/internal/classes/internal.PassThrough.mdx b/www/apps/docs/content/references/js-client/internal/classes/internal.PassThrough.mdx index e78312fd6b..1fe9e3bd11 100644 --- a/www/apps/docs/content/references/js-client/internal/classes/internal.PassThrough.mdx +++ b/www/apps/docs/content/references/js-client/internal/classes/internal.PassThrough.mdx @@ -239,13 +239,15 @@ primarily for examples and testing, but there are some use cases where`stream.Pa } ]} /> +___ + ## Methods -#### [asyncDispose] +### [asyncDispose] Calls `readable.destroy()` with an `AbortError` and returns a promise that fulfills when the stream is finished. -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns (fn, options?): Promise<undefined \| T>` @@ -2082,7 +2084,7 @@ to find a chunk with a truthy value for *fn*. Once an *fn* call's awaited return the stream is destroyed and the promise is fulfilled with value for which *fn* returned a truthy value. If all of the *fn* calls on the chunks return a falsy value, the promise is fulfilled with `undefined`. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns { The `readable.pause()` method has no effect if there is a `'readable'`event listener. -##### Returns +#### Returns -##### Returns +#### Returns { Returns a reference to the `EventEmitter`, so that calls can be chained. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns { Returns a reference to the `EventEmitter`, so that calls can be chained. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns (fn, initial?, options?): Promise<T>` @@ -4869,7 +4871,7 @@ If the stream is empty, the promise is rejected with a `TypeError` with the `ERR The reducer function iterates the stream element-by-element which means that there is no *concurrency* parameter or parallelism. To perform a reduce concurrently, you can extract the async function to `readable.map` method. -##### Parameters +#### Parameters -##### Returns +#### Returns (fn, initial, options?): Promise<T>` -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns { }); ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns { See also: `writable.cork()`. -##### Returns +#### Returns { }, 1000); ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns -##### Returns +#### Returns { }); ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { A `Writable` stream in object mode will always ignore the `encoding` argument. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns ac.abort()); ``` -##### Parameters +#### Parameters ac.abort()); } ]} /> -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Accessors -#### activeManager\_ +### activeManager\_ -#### Inherited from +#### Returns -[TransactionBaseService](internal.internal.TransactionBaseService.mdx).[activeManager_](internal.internal.TransactionBaseService.mdx#activemanager_) + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Methods -#### [asyncDispose] +### [asyncDispose] Calls `readable.destroy()` with an `AbortError` and returns a promise that fulfills when the stream is finished. -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns (fn, options?): Promise<undefined \| T>` @@ -1324,7 +1326,7 @@ to find a chunk with a truthy value for *fn*. Once an *fn* call's awaited return the stream is destroyed and the promise is fulfilled with value for which *fn* returned a truthy value. If all of the *fn* calls on the chunks return a falsy value, the promise is fulfilled with `undefined`. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns { The `readable.pause()` method has no effect if there is a `'readable'`event listener. -##### Returns +#### Returns -##### Returns +#### Returns { Returns a reference to the `EventEmitter`, so that calls can be chained. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns { Returns a reference to the `EventEmitter`, so that calls can be chained. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns (fn, initial?, options?): Promise<T>` @@ -3487,7 +3489,7 @@ If the stream is empty, the promise is rejected with a `TypeError` with the `ERR The reducer function iterates the stream element-by-element which means that there is no *concurrency* parameter or parallelism. To perform a reduce concurrently, you can extract the async function to `readable.map` method. -##### Parameters +#### Parameters -##### Returns +#### Returns (fn, initial, options?): Promise<T>` -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns { }); ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns { }, 1000); ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns -##### Returns +#### Returns { }); ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns ac.abort()); ``` -##### Parameters +#### Parameters ac.abort()); } ]} /> -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Methods -#### [asyncDispose] +### [asyncDispose] Calls `readable.destroy()` with an `AbortError` and returns a promise that fulfills when the stream is finished. -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns (fn, options?): Promise<undefined \| T>` @@ -1339,7 +1341,7 @@ to find a chunk with a truthy value for *fn*. Once an *fn* call's awaited return the stream is destroyed and the promise is fulfilled with value for which *fn* returned a truthy value. If all of the *fn* calls on the chunks return a falsy value, the promise is fulfilled with `undefined`. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns { The `readable.pause()` method has no effect if there is a `'readable'`event listener. -##### Returns +#### Returns -##### Returns +#### Returns { Returns a reference to the `EventEmitter`, so that calls can be chained. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns { Returns a reference to the `EventEmitter`, so that calls can be chained. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns (fn, initial?, options?): Promise<T>` @@ -3502,7 +3504,7 @@ If the stream is empty, the promise is rejected with a `TypeError` with the `ERR The reducer function iterates the stream element-by-element which means that there is no *concurrency* parameter or parallelism. To perform a reduce concurrently, you can extract the async function to `readable.map` method. -##### Parameters +#### Parameters -##### Returns +#### Returns (fn, initial, options?): Promise<T>` -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns { }); ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns { }, 1000); ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns -##### Returns +#### Returns { }); ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns ac.abort()); ``` -##### Parameters +#### Parameters ac.abort()); } ]} /> -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Methods -#### [asyncDispose] +### [asyncDispose] Calls `readable.destroy()` with an `AbortError` and returns a promise that fulfills when the stream is finished. -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns (fn, options?): Promise<undefined \| T>` @@ -2251,7 +2253,7 @@ to find a chunk with a truthy value for *fn*. Once an *fn* call's awaited return the stream is destroyed and the promise is fulfilled with value for which *fn* returned a truthy value. If all of the *fn* calls on the chunks return a falsy value, the promise is fulfilled with `undefined`. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns { Returns a reference to the `EventEmitter`, so that calls can be chained. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns { Returns a reference to the `EventEmitter`, so that calls can be chained. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns (fn, initial?, options?): Promise<T>` @@ -4706,7 +4708,7 @@ If the stream is empty, the promise is rejected with a `TypeError` with the `ERR The reducer function iterates the stream element-by-element which means that there is no *concurrency* parameter or parallelism. To perform a reduce concurrently, you can extract the async function to `readable.map` method. -##### Parameters +#### Parameters -##### Returns +#### Returns (fn, initial, options?): Promise<T>` -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns { See also: `writable.cork()`. -##### Returns +#### Returns { }, 1000); ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns -##### Returns +#### Returns { }); ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns ac.abort()); ``` -##### Parameters +#### Parameters ac.abort()); } ]} /> -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Methods -#### [captureRejectionSymbol] +### [captureRejectionSymbol] -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns { Returns a reference to the `EventEmitter`, so that calls can be chained. -##### Parameters +#### Parameters -##### Returns +#### Returns { Returns a reference to the `EventEmitter`, so that calls can be chained. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns ac.abort()); ``` -##### Parameters +#### Parameters ac.abort()); } ]} /> -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Methods -#### [asyncDispose] +### [asyncDispose] Calls `readable.destroy()` with an `AbortError` and returns a promise that fulfills when the stream is finished. -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns (fn, options?): Promise<undefined \| T>` @@ -2092,7 +2094,7 @@ to find a chunk with a truthy value for *fn*. Once an *fn* call's awaited return the stream is destroyed and the promise is fulfilled with value for which *fn* returned a truthy value. If all of the *fn* calls on the chunks return a falsy value, the promise is fulfilled with `undefined`. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns { The `readable.pause()` method has no effect if there is a `'readable'`event listener. -##### Returns +#### Returns -##### Returns +#### Returns { Returns a reference to the `EventEmitter`, so that calls can be chained. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns { Returns a reference to the `EventEmitter`, so that calls can be chained. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns (fn, initial?, options?): Promise<T>` @@ -4879,7 +4881,7 @@ If the stream is empty, the promise is rejected with a `TypeError` with the `ERR The reducer function iterates the stream element-by-element which means that there is no *concurrency* parameter or parallelism. To perform a reduce concurrently, you can extract the async function to `readable.map` method. -##### Parameters +#### Parameters -##### Returns +#### Returns (fn, initial, options?): Promise<T>` -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns { }); ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns { See also: `writable.cork()`. -##### Returns +#### Returns { }, 1000); ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns -##### Returns +#### Returns { }); ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns { A `Writable` stream in object mode will always ignore the `encoding` argument. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns ac.abort()); ``` -##### Parameters +#### Parameters ac.abort()); } ]} /> -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Methods -#### [captureRejectionSymbol] +### [captureRejectionSymbol] -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns { Returns a reference to the `EventEmitter`, so that calls can be chained. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns { Returns a reference to the `EventEmitter`, so that calls can be chained. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns { See also: `writable.cork()`. -##### Returns +#### Returns { A `Writable` stream in object mode will always ignore the `encoding` argument. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns ac.abort()); ``` -##### Parameters +#### Parameters ac.abort()); } ]} /> -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Methods -#### [captureRejectionSymbol] +### [captureRejectionSymbol] -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns { Returns a reference to the `EventEmitter`, so that calls can be chained. -##### Parameters +#### Parameters -##### Returns +#### Returns { Returns a reference to the `EventEmitter`, so that calls can be chained. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns ac.abort()); ``` -##### Parameters +#### Parameters ac.abort()); } ]} /> -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Accessors -#### activeManager\_ +### activeManager\_ -#### Implementation of +#### Returns -[IBatchJobStrategy](../interfaces/internal.internal.IBatchJobStrategy.mdx).[activeManager_](../interfaces/internal.internal.IBatchJobStrategy.mdx#activemanager_) + -#### Inherited from - -[TransactionBaseService](internal.internal.TransactionBaseService.mdx).[activeManager_](internal.internal.TransactionBaseService.mdx#activemanager_) +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Accessors -#### activeManager\_ +### activeManager\_ -#### Inherited from +#### Returns -[TransactionBaseService](internal.internal.TransactionBaseService.mdx).[activeManager_](internal.internal.TransactionBaseService.mdx#activemanager_) + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Accessors -#### activeManager\_ +### activeManager\_ -#### Implementation of +#### Returns -[IFileService](../interfaces/internal.internal.IFileService.mdx).[activeManager_](../interfaces/internal.internal.IFileService.mdx#activemanager_) + -#### Inherited from - -[TransactionBaseService](internal.internal.TransactionBaseService.mdx).[activeManager_](internal.internal.TransactionBaseService.mdx#activemanager_) +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Methods -#### calculatePrice +### calculatePrice Used to calculate a price for a given shipping option. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Accessors -#### activeManager\_ +### activeManager\_ -#### Implementation of +#### Returns -[INotificationService](../interfaces/internal.internal.INotificationService.mdx).[activeManager_](../interfaces/internal.internal.INotificationService.mdx#activemanager_) + -#### Inherited from - -[TransactionBaseService](internal.internal.TransactionBaseService.mdx).[activeManager_](internal.internal.TransactionBaseService.mdx#activemanager_) +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Methods -#### authorizePayment +### authorizePayment Authorize an existing session if it is not already authorized -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Accessors -#### activeManager\_ +### activeManager\_ -#### Implementation of +#### Returns -[PaymentService](../interfaces/internal.internal.PaymentService.mdx).[activeManager_](../interfaces/internal.internal.PaymentService.mdx#activemanager_) + -#### Inherited from - -[TransactionBaseService](internal.internal.TransactionBaseService.mdx).[activeManager_](internal.internal.TransactionBaseService.mdx#activemanager_) +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Accessors -#### activeManager\_ +### activeManager\_ -#### Inherited from +#### Returns -[TransactionBaseService](internal.internal.TransactionBaseService.mdx).[activeManager_](internal.internal.TransactionBaseService.mdx#activemanager_) + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Methods -#### getIdentifier +### getIdentifier -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Accessors -#### activeManager\_ +### activeManager\_ -#### Inherited from +#### Returns -[TransactionBaseService](internal.internal.TransactionBaseService.mdx).[activeManager_](internal.internal.TransactionBaseService.mdx#activemanager_) + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Accessors -#### activeManager\_ +### activeManager\_ -#### Inherited from +#### Returns -[TransactionBaseService](internal.internal.TransactionBaseService.mdx).[activeManager_](internal.internal.TransactionBaseService.mdx#activemanager_) + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Accessors -#### activeManager\_ +### activeManager\_ -#### Inherited from +#### Returns -[TransactionBaseService](internal.internal.TransactionBaseService.mdx).[activeManager_](internal.internal.TransactionBaseService.mdx#activemanager_) + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Accessors -#### activeManager\_ +### activeManager\_ -#### Inherited from +#### Returns -[TransactionBaseService](internal.internal.TransactionBaseService.mdx).[activeManager_](internal.internal.TransactionBaseService.mdx#activemanager_) + + +___ ## Methods -#### addLineItem +### addLineItem Adds a line item to the cart. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Accessors -#### activeManager\_ +### activeManager\_ -#### Inherited from +#### Returns -[TransactionBaseService](internal.internal.TransactionBaseService.mdx).[activeManager_](internal.internal.TransactionBaseService.mdx#activemanager_) + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Accessors -#### activeManager\_ +### activeManager\_ -#### Inherited from +#### Returns -[TransactionBaseService](internal.internal.TransactionBaseService.mdx).[activeManager_](internal.internal.TransactionBaseService.mdx#activemanager_) + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Accessors -#### activeManager\_ +### activeManager\_ -#### Inherited from +#### Returns -[TransactionBaseService](internal.internal.TransactionBaseService.mdx).[activeManager_](internal.internal.TransactionBaseService.mdx#activemanager_) + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Accessors -#### activeManager\_ +### activeManager\_ -#### Inherited from +#### Returns -[TransactionBaseService](internal.internal.TransactionBaseService.mdx).[activeManager_](internal.internal.TransactionBaseService.mdx#activemanager_) + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Accessors -#### activeManager\_ +### activeManager\_ -#### Inherited from +#### Returns -[TransactionBaseService](internal.internal.TransactionBaseService.mdx).[activeManager_](internal.internal.TransactionBaseService.mdx#activemanager_) + + +___ ## Methods -#### addCustomers +### addCustomers Add a batch of customers to a customer group at once -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Accessors -#### activeManager\_ +### activeManager\_ -#### Inherited from +#### Returns -[TransactionBaseService](internal.internal.TransactionBaseService.mdx).[activeManager_](internal.internal.TransactionBaseService.mdx#activemanager_) + + +___ ## Methods -#### addAddress +### addAddress -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Accessors -#### activeManager\_ +### activeManager\_ -#### Inherited from +#### Returns -[TransactionBaseService](internal.internal.TransactionBaseService.mdx).[activeManager_](internal.internal.TransactionBaseService.mdx#activemanager_) + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Accessors -#### activeManager\_ +### activeManager\_ -#### Inherited from +#### Returns -[TransactionBaseService](internal.internal.TransactionBaseService.mdx).[activeManager_](internal.internal.TransactionBaseService.mdx#activemanager_) + + +___ ## Methods -#### addRegion +### addRegion Adds a region to the discount regions array. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Accessors -#### activeManager\_ +### activeManager\_ -#### Inherited from +#### Returns -[TransactionBaseService](internal.internal.TransactionBaseService.mdx).[activeManager_](internal.internal.TransactionBaseService.mdx#activemanager_) + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Accessors -#### activeManager\_ +### activeManager\_ -#### Inherited from +#### Returns -[TransactionBaseService](internal.internal.TransactionBaseService.mdx).[activeManager_](internal.internal.TransactionBaseService.mdx#activemanager_) + ___ -#### eventBusModuleService\_ +### eventBusModuleService\_ + +#### Returns + + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Parameters +#### Parameters -##### Returns +#### Returns (data): Promise<void \| [StagedJob](internal.internal.StagedJob.mdx)[]>` Calls all subscribers when an event occurs. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Accessors -#### activeManager\_ +### activeManager\_ -#### Inherited from +#### Returns -[TransactionBaseService](internal.internal.TransactionBaseService.mdx).[activeManager_](internal.internal.TransactionBaseService.mdx#activemanager_) + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Accessors -#### activeManager\_ +### activeManager\_ -#### Inherited from +#### Returns -[TransactionBaseService](internal.internal.TransactionBaseService.mdx).[activeManager_](internal.internal.TransactionBaseService.mdx#activemanager_) + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Accessors -#### activeManager\_ +### activeManager\_ -#### Inherited from +#### Returns -[TransactionBaseService](internal.internal.TransactionBaseService.mdx).[activeManager_](internal.internal.TransactionBaseService.mdx#activemanager_) + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Accessors -#### activeManager\_ +### activeManager\_ -#### Inherited from +#### Returns -[TransactionBaseService](internal.internal.TransactionBaseService.mdx).[activeManager_](internal.internal.TransactionBaseService.mdx#activemanager_) + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Accessors -#### activeManager\_ +### activeManager\_ -#### Inherited from +#### Returns -[TransactionBaseService](internal.internal.TransactionBaseService.mdx).[activeManager_](internal.internal.TransactionBaseService.mdx#activemanager_) + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Methods -#### addPostAuthentication +### addPostAuthentication Adds a middleware function to be called after authentication is completed. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Accessors -#### activeManager\_ +### activeManager\_ -#### Inherited from +#### Returns -[TransactionBaseService](internal.internal.TransactionBaseService.mdx).[activeManager_](internal.internal.TransactionBaseService.mdx#activemanager_) + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Accessors -#### activeManager\_ +### activeManager\_ -#### Inherited from +#### Returns -[TransactionBaseService](internal.internal.TransactionBaseService.mdx).[activeManager_](internal.internal.TransactionBaseService.mdx#activemanager_) + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Accessors -#### activeManager\_ +### activeManager\_ -#### Inherited from +#### Returns -[TransactionBaseService](internal.internal.TransactionBaseService.mdx).[activeManager_](internal.internal.TransactionBaseService.mdx#activemanager_) + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Accessors -#### activeManager\_ +### activeManager\_ -#### Inherited from +#### Returns -[TransactionBaseService](internal.internal.TransactionBaseService.mdx).[activeManager_](internal.internal.TransactionBaseService.mdx#activemanager_) + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Accessors -#### activeManager\_ +### activeManager\_ -#### Inherited from +#### Returns -[TransactionBaseService](internal.internal.TransactionBaseService.mdx).[activeManager_](internal.internal.TransactionBaseService.mdx#activemanager_) + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Accessors -#### activeManager\_ +### activeManager\_ -#### Inherited from +#### Returns -[TransactionBaseService](internal.internal.TransactionBaseService.mdx).[activeManager_](internal.internal.TransactionBaseService.mdx#activemanager_) + ___ -#### inventoryService\_ +### inventoryService\_ + +#### Returns + + + +___ ## Methods -#### addLineItem +### addLineItem -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Accessors -#### activeManager\_ +### activeManager\_ -#### Inherited from +#### Returns -[TransactionBaseService](internal.internal.TransactionBaseService.mdx).[activeManager_](internal.internal.TransactionBaseService.mdx#activemanager_) + + +___ ## Methods -#### addShippingMethod +### addShippingMethod -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Accessors -#### activeManager\_ +### activeManager\_ -#### Inherited from +#### Returns -[TransactionBaseService](internal.internal.TransactionBaseService.mdx).[activeManager_](internal.internal.TransactionBaseService.mdx#activemanager_) + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Accessors -#### activeManager\_ +### activeManager\_ -#### Inherited from +#### Returns -[TransactionBaseService](internal.internal.TransactionBaseService.mdx).[activeManager_](internal.internal.TransactionBaseService.mdx#activemanager_) + ___ -#### paymentService\_ +### paymentService\_ + +#### Returns + + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Accessors -#### activeManager\_ +### activeManager\_ -#### Inherited from +#### Returns -[TransactionBaseService](internal.internal.TransactionBaseService.mdx).[activeManager_](internal.internal.TransactionBaseService.mdx#activemanager_) + + +___ ## Methods -#### addCurrencyFromRegion +### addCurrencyFromRegion Add `currency_code` to an MA record if `region_id`is passed. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Accessors -#### activeManager\_ +### activeManager\_ -#### Inherited from +#### Returns -[TransactionBaseService](internal.internal.TransactionBaseService.mdx).[activeManager_](internal.internal.TransactionBaseService.mdx#activemanager_) + ___ -#### pricingModuleService +### pricingModuleService + +#### Returns + + Promise<[PriceListDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.PriceListDTO.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "addPrices", + "type": "(`data`: [AddPricesDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.AddPricesDTO.mdx), `sharedContext?`: [Context](../../internal-1/interfaces/internal.internal-1.Context.mdx)) => Promise<[PriceSetDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.PriceSetDTO.mdx)>(`data`: [AddPricesDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.AddPricesDTO.mdx)[], `sharedContext?`: [Context](../../internal-1/interfaces/internal.internal-1.Context.mdx)) => Promise<[PriceSetDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.PriceSetDTO.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "addRules", + "type": "(`data`: [AddRulesDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.AddRulesDTO.mdx), `sharedContext?`: [Context](../../internal-1/interfaces/internal.internal-1.Context.mdx)) => Promise<[PriceSetDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.PriceSetDTO.mdx)>(`data`: [AddRulesDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.AddRulesDTO.mdx)[], `sharedContext?`: [Context](../../internal-1/interfaces/internal.internal-1.Context.mdx)) => Promise<[PriceSetDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.PriceSetDTO.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "calculatePrices", + "type": "(`filters`: [PricingFilters](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.PricingFilters.mdx), `context?`: [PricingContext](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.PricingContext.mdx), `sharedContext?`: [Context](../../internal-1/interfaces/internal.internal-1.Context.mdx)) => Promise<[CalculatedPriceSet](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.CalculatedPriceSet.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "create", + "type": "(`data`: [CreatePriceSetDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.CreatePriceSetDTO.mdx), `sharedContext?`: [Context](../../internal-1/interfaces/internal.internal-1.Context.mdx)) => Promise<[PriceSetDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.PriceSetDTO.mdx)>(`data`: [CreatePriceSetDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.CreatePriceSetDTO.mdx)[], `sharedContext?`: [Context](../../internal-1/interfaces/internal.internal-1.Context.mdx)) => Promise<[PriceSetDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.PriceSetDTO.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "createCurrencies", + "type": "(`data`: [CreateCurrencyDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.CreateCurrencyDTO.mdx)[], `sharedContext?`: [Context](../../internal-1/interfaces/internal.internal-1.Context.mdx)) => Promise<[CurrencyDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.CurrencyDTO.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "createMoneyAmounts", + "type": "(`data`: [CreateMoneyAmountDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.CreateMoneyAmountDTO.mdx)[], `sharedContext?`: [Context](../../internal-1/interfaces/internal.internal-1.Context.mdx)) => Promise<[MoneyAmountDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.MoneyAmountDTO.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "createPriceListRules", + "type": "(`data`: [CreatePriceListRuleDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.CreatePriceListRuleDTO.mdx)[], `sharedContext?`: [Context](../../internal-1/interfaces/internal.internal-1.Context.mdx)) => Promise<[PriceListRuleDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.PriceListRuleDTO.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "createPriceLists", + "type": "(`data`: [CreatePriceListDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.CreatePriceListDTO.mdx)[], `sharedContext?`: [Context](../../internal-1/interfaces/internal.internal-1.Context.mdx)) => Promise<[PriceListDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.PriceListDTO.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "createPriceRules", + "type": "(`data`: [CreatePriceRuleDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.CreatePriceRuleDTO.mdx)[], `sharedContext?`: [Context](../../internal-1/interfaces/internal.internal-1.Context.mdx)) => Promise<[PriceRuleDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.PriceRuleDTO.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "createPriceSetMoneyAmountRules", + "type": "(`data`: [CreatePriceSetMoneyAmountRulesDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.CreatePriceSetMoneyAmountRulesDTO.mdx)[], `sharedContext?`: [Context](../../internal-1/interfaces/internal.internal-1.Context.mdx)) => Promise<[PriceSetMoneyAmountRulesDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.PriceSetMoneyAmountRulesDTO.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "createRuleTypes", + "type": "(`data`: [CreateRuleTypeDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.CreateRuleTypeDTO.mdx)[], `sharedContext?`: [Context](../../internal-1/interfaces/internal.internal-1.Context.mdx)) => Promise<[RuleTypeDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.RuleTypeDTO.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "delete", + "type": "(`ids`: `string`[], `sharedContext?`: [Context](../../internal-1/interfaces/internal.internal-1.Context.mdx)) => Promise<void>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "deleteCurrencies", + "type": "(`currencyCodes`: `string`[], `sharedContext?`: [Context](../../internal-1/interfaces/internal.internal-1.Context.mdx)) => Promise<void>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "deleteMoneyAmounts", + "type": "(`ids`: `string`[], `sharedContext?`: [Context](../../internal-1/interfaces/internal.internal-1.Context.mdx)) => Promise<void>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "deletePriceListRules", + "type": "(`priceListRuleIds`: `string`[], `sharedContext?`: [Context](../../internal-1/interfaces/internal.internal-1.Context.mdx)) => Promise<void>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "deletePriceLists", + "type": "(`priceListIds`: `string`[], `sharedContext?`: [Context](../../internal-1/interfaces/internal.internal-1.Context.mdx)) => Promise<void>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "deletePriceRules", + "type": "(`priceRuleIds`: `string`[], `sharedContext?`: [Context](../../internal-1/interfaces/internal.internal-1.Context.mdx)) => Promise<void>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "deletePriceSetMoneyAmountRules", + "type": "(`ids`: `string`[], `sharedContext?`: [Context](../../internal-1/interfaces/internal.internal-1.Context.mdx)) => Promise<void>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "deleteRuleTypes", + "type": "(`ruleTypeIds`: `string`[], `sharedContext?`: [Context](../../internal-1/interfaces/internal.internal-1.Context.mdx)) => Promise<void>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "list", + "type": "(`filters?`: [FilterablePriceSetProps](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.FilterablePriceSetProps.mdx), `config?`: [FindConfig](../../CommonTypes/interfaces/internal.internal-1.CommonTypes.FindConfig.mdx)<[PriceSetDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.PriceSetDTO.mdx)>, `sharedContext?`: [Context](../../internal-1/interfaces/internal.internal-1.Context.mdx)) => Promise<[PriceSetDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.PriceSetDTO.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "listAndCount", + "type": "(`filters?`: [FilterablePriceSetProps](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.FilterablePriceSetProps.mdx), `config?`: [FindConfig](../../CommonTypes/interfaces/internal.internal-1.CommonTypes.FindConfig.mdx)<[PriceSetDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.PriceSetDTO.mdx)>, `sharedContext?`: [Context](../../internal-1/interfaces/internal.internal-1.Context.mdx)) => Promise<[[PriceSetDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.PriceSetDTO.mdx)[], number]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "listAndCountCurrencies", + "type": "(`filters?`: [FilterableCurrencyProps](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.FilterableCurrencyProps.mdx), `config?`: [FindConfig](../../CommonTypes/interfaces/internal.internal-1.CommonTypes.FindConfig.mdx)<[CurrencyDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.CurrencyDTO.mdx)>, `sharedContext?`: [Context](../../internal-1/interfaces/internal.internal-1.Context.mdx)) => Promise<[[CurrencyDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.CurrencyDTO.mdx)[], number]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "listAndCountMoneyAmounts", + "type": "(`filters?`: [FilterableMoneyAmountProps](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.FilterableMoneyAmountProps.mdx), `config?`: [FindConfig](../../CommonTypes/interfaces/internal.internal-1.CommonTypes.FindConfig.mdx)<[MoneyAmountDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.MoneyAmountDTO.mdx)>, `sharedContext?`: [Context](../../internal-1/interfaces/internal.internal-1.Context.mdx)) => Promise<[[MoneyAmountDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.MoneyAmountDTO.mdx)[], number]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "listAndCountPriceListRules", + "type": "(`filters?`: [FilterablePriceListRuleProps](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.FilterablePriceListRuleProps.mdx), `config?`: [FindConfig](../../CommonTypes/interfaces/internal.internal-1.CommonTypes.FindConfig.mdx)<[PriceListRuleDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.PriceListRuleDTO.mdx)>, `sharedContext?`: [Context](../../internal-1/interfaces/internal.internal-1.Context.mdx)) => Promise<[[PriceListRuleDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.PriceListRuleDTO.mdx)[], number]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "listAndCountPriceLists", + "type": "(`filters?`: [FilterablePriceListProps](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.FilterablePriceListProps.mdx), `config?`: [FindConfig](../../CommonTypes/interfaces/internal.internal-1.CommonTypes.FindConfig.mdx)<[PriceListDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.PriceListDTO.mdx)>, `sharedContext?`: [Context](../../internal-1/interfaces/internal.internal-1.Context.mdx)) => Promise<[[PriceListDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.PriceListDTO.mdx)[], number]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "listAndCountPriceRules", + "type": "(`filters?`: [FilterablePriceRuleProps](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.FilterablePriceRuleProps.mdx), `config?`: [FindConfig](../../CommonTypes/interfaces/internal.internal-1.CommonTypes.FindConfig.mdx)<[PriceRuleDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.PriceRuleDTO.mdx)>, `sharedContext?`: [Context](../../internal-1/interfaces/internal.internal-1.Context.mdx)) => Promise<[[PriceRuleDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.PriceRuleDTO.mdx)[], number]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "listAndCountPriceSetMoneyAmountRules", + "type": "(`filters?`: [FilterablePriceSetMoneyAmountRulesProps](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.FilterablePriceSetMoneyAmountRulesProps.mdx), `config?`: [FindConfig](../../CommonTypes/interfaces/internal.internal-1.CommonTypes.FindConfig.mdx)<[PriceSetMoneyAmountRulesDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.PriceSetMoneyAmountRulesDTO.mdx)>, `sharedContext?`: [Context](../../internal-1/interfaces/internal.internal-1.Context.mdx)) => Promise<[[PriceSetMoneyAmountRulesDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.PriceSetMoneyAmountRulesDTO.mdx)[], number]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "listAndCountPriceSetMoneyAmounts", + "type": "(`filters?`: [FilterablePriceSetMoneyAmountProps](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.FilterablePriceSetMoneyAmountProps.mdx), `config?`: [FindConfig](../../CommonTypes/interfaces/internal.internal-1.CommonTypes.FindConfig.mdx)<[PriceSetMoneyAmountDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.PriceSetMoneyAmountDTO.mdx)>, `sharedContext?`: [Context](../../internal-1/interfaces/internal.internal-1.Context.mdx)) => Promise<[[PriceSetMoneyAmountDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.PriceSetMoneyAmountDTO.mdx)[], number]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "listAndCountRuleTypes", + "type": "(`filters?`: [FilterableRuleTypeProps](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.FilterableRuleTypeProps.mdx), `config?`: [FindConfig](../../CommonTypes/interfaces/internal.internal-1.CommonTypes.FindConfig.mdx)<[RuleTypeDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.RuleTypeDTO.mdx)>, `sharedContext?`: [Context](../../internal-1/interfaces/internal.internal-1.Context.mdx)) => Promise<[[RuleTypeDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.RuleTypeDTO.mdx)[], number]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "listCurrencies", + "type": "(`filters?`: [FilterableCurrencyProps](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.FilterableCurrencyProps.mdx), `config?`: [FindConfig](../../CommonTypes/interfaces/internal.internal-1.CommonTypes.FindConfig.mdx)<[CurrencyDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.CurrencyDTO.mdx)>, `sharedContext?`: [Context](../../internal-1/interfaces/internal.internal-1.Context.mdx)) => Promise<[CurrencyDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.CurrencyDTO.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "listMoneyAmounts", + "type": "(`filters?`: [FilterableMoneyAmountProps](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.FilterableMoneyAmountProps.mdx), `config?`: [FindConfig](../../CommonTypes/interfaces/internal.internal-1.CommonTypes.FindConfig.mdx)<[MoneyAmountDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.MoneyAmountDTO.mdx)>, `sharedContext?`: [Context](../../internal-1/interfaces/internal.internal-1.Context.mdx)) => Promise<[MoneyAmountDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.MoneyAmountDTO.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "listPriceListRules", + "type": "(`filters?`: [FilterablePriceListRuleProps](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.FilterablePriceListRuleProps.mdx), `config?`: [FindConfig](../../CommonTypes/interfaces/internal.internal-1.CommonTypes.FindConfig.mdx)<[PriceListRuleDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.PriceListRuleDTO.mdx)>, `sharedContext?`: [Context](../../internal-1/interfaces/internal.internal-1.Context.mdx)) => Promise<[PriceListRuleDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.PriceListRuleDTO.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "listPriceLists", + "type": "(`filters?`: [FilterablePriceListProps](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.FilterablePriceListProps.mdx), `config?`: [FindConfig](../../CommonTypes/interfaces/internal.internal-1.CommonTypes.FindConfig.mdx)<[PriceListDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.PriceListDTO.mdx)>, `sharedContext?`: [Context](../../internal-1/interfaces/internal.internal-1.Context.mdx)) => Promise<[PriceListDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.PriceListDTO.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "listPriceRules", + "type": "(`filters?`: [FilterablePriceRuleProps](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.FilterablePriceRuleProps.mdx), `config?`: [FindConfig](../../CommonTypes/interfaces/internal.internal-1.CommonTypes.FindConfig.mdx)<[PriceRuleDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.PriceRuleDTO.mdx)>, `sharedContext?`: [Context](../../internal-1/interfaces/internal.internal-1.Context.mdx)) => Promise<[PriceRuleDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.PriceRuleDTO.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "listPriceSetMoneyAmountRules", + "type": "(`filters?`: [FilterablePriceSetMoneyAmountRulesProps](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.FilterablePriceSetMoneyAmountRulesProps.mdx), `config?`: [FindConfig](../../CommonTypes/interfaces/internal.internal-1.CommonTypes.FindConfig.mdx)<[PriceSetMoneyAmountRulesDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.PriceSetMoneyAmountRulesDTO.mdx)>, `sharedContext?`: [Context](../../internal-1/interfaces/internal.internal-1.Context.mdx)) => Promise<[PriceSetMoneyAmountRulesDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.PriceSetMoneyAmountRulesDTO.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "listPriceSetMoneyAmounts", + "type": "(`filters?`: [FilterablePriceSetMoneyAmountProps](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.FilterablePriceSetMoneyAmountProps.mdx), `config?`: [FindConfig](../../CommonTypes/interfaces/internal.internal-1.CommonTypes.FindConfig.mdx)<[PriceSetMoneyAmountDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.PriceSetMoneyAmountDTO.mdx)>, `sharedContext?`: [Context](../../internal-1/interfaces/internal.internal-1.Context.mdx)) => Promise<[PriceSetMoneyAmountDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.PriceSetMoneyAmountDTO.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "listRuleTypes", + "type": "(`filters?`: [FilterableRuleTypeProps](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.FilterableRuleTypeProps.mdx), `config?`: [FindConfig](../../CommonTypes/interfaces/internal.internal-1.CommonTypes.FindConfig.mdx)<[RuleTypeDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.RuleTypeDTO.mdx)>, `sharedContext?`: [Context](../../internal-1/interfaces/internal.internal-1.Context.mdx)) => Promise<[RuleTypeDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.RuleTypeDTO.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "removePriceListRules", + "type": "(`data`: [RemovePriceListRulesDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.RemovePriceListRulesDTO.mdx), `sharedContext?`: [Context](../../internal-1/interfaces/internal.internal-1.Context.mdx)) => Promise<[PriceListDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.PriceListDTO.mdx)>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "removeRules", + "type": "(`data`: [RemovePriceSetRulesDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.RemovePriceSetRulesDTO.mdx)[], `sharedContext?`: [Context](../../internal-1/interfaces/internal.internal-1.Context.mdx)) => Promise<void>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "retrieve", + "type": "(`id`: `string`, `config?`: [FindConfig](../../CommonTypes/interfaces/internal.internal-1.CommonTypes.FindConfig.mdx)<[PriceSetDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.PriceSetDTO.mdx)>, `sharedContext?`: [Context](../../internal-1/interfaces/internal.internal-1.Context.mdx)) => Promise<[PriceSetDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.PriceSetDTO.mdx)>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "retrieveCurrency", + "type": "(`code`: `string`, `config?`: [FindConfig](../../CommonTypes/interfaces/internal.internal-1.CommonTypes.FindConfig.mdx)<[CurrencyDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.CurrencyDTO.mdx)>, `sharedContext?`: [Context](../../internal-1/interfaces/internal.internal-1.Context.mdx)) => Promise<[CurrencyDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.CurrencyDTO.mdx)>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "retrieveMoneyAmount", + "type": "(`id`: `string`, `config?`: [FindConfig](../../CommonTypes/interfaces/internal.internal-1.CommonTypes.FindConfig.mdx)<[MoneyAmountDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.MoneyAmountDTO.mdx)>, `sharedContext?`: [Context](../../internal-1/interfaces/internal.internal-1.Context.mdx)) => Promise<[MoneyAmountDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.MoneyAmountDTO.mdx)>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "retrievePriceList", + "type": "(`id`: `string`, `config?`: [FindConfig](../../CommonTypes/interfaces/internal.internal-1.CommonTypes.FindConfig.mdx)<[PriceListDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.PriceListDTO.mdx)>, `sharedContext?`: [Context](../../internal-1/interfaces/internal.internal-1.Context.mdx)) => Promise<[PriceListDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.PriceListDTO.mdx)>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "retrievePriceListRule", + "type": "(`id`: `string`, `config?`: [FindConfig](../../CommonTypes/interfaces/internal.internal-1.CommonTypes.FindConfig.mdx)<[PriceListRuleDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.PriceListRuleDTO.mdx)>, `sharedContext?`: [Context](../../internal-1/interfaces/internal.internal-1.Context.mdx)) => Promise<[PriceListRuleDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.PriceListRuleDTO.mdx)>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "retrievePriceRule", + "type": "(`id`: `string`, `config?`: [FindConfig](../../CommonTypes/interfaces/internal.internal-1.CommonTypes.FindConfig.mdx)<[PriceRuleDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.PriceRuleDTO.mdx)>, `sharedContext?`: [Context](../../internal-1/interfaces/internal.internal-1.Context.mdx)) => Promise<[PriceRuleDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.PriceRuleDTO.mdx)>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "retrievePriceSetMoneyAmountRules", + "type": "(`id`: `string`, `config?`: [FindConfig](../../CommonTypes/interfaces/internal.internal-1.CommonTypes.FindConfig.mdx)<[PriceSetMoneyAmountRulesDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.PriceSetMoneyAmountRulesDTO.mdx)>, `sharedContext?`: [Context](../../internal-1/interfaces/internal.internal-1.Context.mdx)) => Promise<[PriceSetMoneyAmountRulesDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.PriceSetMoneyAmountRulesDTO.mdx)>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "retrieveRuleType", + "type": "(`id`: `string`, `config?`: [FindConfig](../../CommonTypes/interfaces/internal.internal-1.CommonTypes.FindConfig.mdx)<[RuleTypeDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.RuleTypeDTO.mdx)>, `sharedContext?`: [Context](../../internal-1/interfaces/internal.internal-1.Context.mdx)) => Promise<[RuleTypeDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.RuleTypeDTO.mdx)>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "setPriceListRules", + "type": "(`data`: [SetPriceListRulesDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.SetPriceListRulesDTO.mdx), `sharedContext?`: [Context](../../internal-1/interfaces/internal.internal-1.Context.mdx)) => Promise<[PriceListDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.PriceListDTO.mdx)>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "updateCurrencies", + "type": "(`data`: [UpdateCurrencyDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.UpdateCurrencyDTO.mdx)[], `sharedContext?`: [Context](../../internal-1/interfaces/internal.internal-1.Context.mdx)) => Promise<[CurrencyDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.CurrencyDTO.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "updateMoneyAmounts", + "type": "(`data`: [UpdateMoneyAmountDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.UpdateMoneyAmountDTO.mdx)[], `sharedContext?`: [Context](../../internal-1/interfaces/internal.internal-1.Context.mdx)) => Promise<[MoneyAmountDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.MoneyAmountDTO.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "updatePriceListRules", + "type": "(`data`: [UpdatePriceListRuleDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.UpdatePriceListRuleDTO.mdx)[], `sharedContext?`: [Context](../../internal-1/interfaces/internal.internal-1.Context.mdx)) => Promise<[PriceListRuleDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.PriceListRuleDTO.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "updatePriceLists", + "type": "(`data`: [UpdatePriceListDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.UpdatePriceListDTO.mdx)[], `sharedContext?`: [Context](../../internal-1/interfaces/internal.internal-1.Context.mdx)) => Promise<[PriceListDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.PriceListDTO.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "updatePriceRules", + "type": "(`data`: [UpdatePriceRuleDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.UpdatePriceRuleDTO.mdx)[], `sharedContext?`: [Context](../../internal-1/interfaces/internal.internal-1.Context.mdx)) => Promise<[PriceRuleDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.PriceRuleDTO.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "updatePriceSetMoneyAmountRules", + "type": "(`data`: [UpdatePriceSetMoneyAmountRulesDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.UpdatePriceSetMoneyAmountRulesDTO.mdx)[], `sharedContext?`: [Context](../../internal-1/interfaces/internal.internal-1.Context.mdx)) => Promise<[PriceSetMoneyAmountRulesDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.PriceSetMoneyAmountRulesDTO.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "updateRuleTypes", + "type": "(`data`: [UpdateRuleTypeDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.UpdateRuleTypeDTO.mdx)[], `sharedContext?`: [Context](../../internal-1/interfaces/internal.internal-1.Context.mdx)) => Promise<[RuleTypeDTO](../../PricingTypes/interfaces/internal.internal-1.PricingTypes.RuleTypeDTO.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + } +]} /> ___ -#### remoteQuery +### remoteQuery + +#### Returns + +`) => Promise<any> \\| `null`", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + } +]} /> + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Accessors -#### activeManager\_ +### activeManager\_ -#### Inherited from +#### Returns -[TransactionBaseService](internal.internal.TransactionBaseService.mdx).[activeManager_](internal.internal.TransactionBaseService.mdx#activemanager_) + + +___ ## Methods -#### addProducts +### addProducts Add a batch of product to a product category -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Accessors -#### activeManager\_ +### activeManager\_ -#### Inherited from +#### Returns -[TransactionBaseService](internal.internal.TransactionBaseService.mdx).[activeManager_](internal.internal.TransactionBaseService.mdx#activemanager_) + + +___ ## Methods -#### addProducts +### addProducts -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Accessors -#### activeManager\_ +### activeManager\_ -#### Inherited from +#### Returns -[TransactionBaseService](internal.internal.TransactionBaseService.mdx).[activeManager_](internal.internal.TransactionBaseService.mdx#activemanager_) + + +___ ## Methods -#### addOption +### addOption Adds an option to a product. Options can, for example, be "Size", "Color", etc. Will update all the products variants with a dummy value for the newly created option. The same option cannot be added more than once. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Accessors -#### activeManager\_ +### activeManager\_ -#### Inherited from +#### Returns -[TransactionBaseService](internal.internal.TransactionBaseService.mdx).[activeManager_](internal.internal.TransactionBaseService.mdx#activemanager_) + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Accessors -#### activeManager\_ +### activeManager\_ -#### Inherited from +#### Returns -[TransactionBaseService](internal.internal.TransactionBaseService.mdx).[activeManager_](internal.internal.TransactionBaseService.mdx#activemanager_) + ___ -#### inventoryService\_ +### inventoryService\_ + +#### Returns + + Promise<[InventoryLevelDTO](../types/internal.InventoryLevelDTO.mdx)>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "confirmInventory", + "type": "(`inventoryItemId`: `string`, `locationIds`: `string`[], `quantity`: `number`, `context?`: [SharedContext](../../internal-1/interfaces/internal.internal-1.SharedContext.mdx)) => Promise<boolean>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "createInventoryItem", + "type": "(`input`: [CreateInventoryItemInput](../../InventoryTypes/interfaces/internal.internal-1.InventoryTypes.CreateInventoryItemInput.mdx), `context?`: [SharedContext](../../internal-1/interfaces/internal.internal-1.SharedContext.mdx)) => Promise<[InventoryItemDTO](../types/internal.InventoryItemDTO.mdx)>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "createInventoryItems", + "type": "(`input`: [CreateInventoryItemInput](../../InventoryTypes/interfaces/internal.internal-1.InventoryTypes.CreateInventoryItemInput.mdx)[], `context?`: [SharedContext](../../internal-1/interfaces/internal.internal-1.SharedContext.mdx)) => Promise<[InventoryItemDTO](../types/internal.InventoryItemDTO.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "createInventoryLevel", + "type": "(`data`: [CreateInventoryLevelInput](../../InventoryTypes/interfaces/internal.internal-1.InventoryTypes.CreateInventoryLevelInput.mdx), `context?`: [SharedContext](../../internal-1/interfaces/internal.internal-1.SharedContext.mdx)) => Promise<[InventoryLevelDTO](../types/internal.InventoryLevelDTO.mdx)>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "createInventoryLevels", + "type": "(`data`: [CreateInventoryLevelInput](../../InventoryTypes/interfaces/internal.internal-1.InventoryTypes.CreateInventoryLevelInput.mdx)[], `context?`: [SharedContext](../../internal-1/interfaces/internal.internal-1.SharedContext.mdx)) => Promise<[InventoryLevelDTO](../types/internal.InventoryLevelDTO.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "createReservationItem", + "type": "(`input`: [CreateReservationItemInput](../../InventoryTypes/interfaces/internal.internal-1.InventoryTypes.CreateReservationItemInput.mdx), `context?`: [SharedContext](../../internal-1/interfaces/internal.internal-1.SharedContext.mdx)) => Promise<[ReservationItemDTO](../types/internal.ReservationItemDTO.mdx)>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "createReservationItems", + "type": "(`input`: [CreateReservationItemInput](../../InventoryTypes/interfaces/internal.internal-1.InventoryTypes.CreateReservationItemInput.mdx)[], `context?`: [SharedContext](../../internal-1/interfaces/internal.internal-1.SharedContext.mdx)) => Promise<[ReservationItemDTO](../types/internal.ReservationItemDTO.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "deleteInventoryItem", + "type": "(`inventoryItemId`: `string` \\| `string`[], `context?`: [SharedContext](../../internal-1/interfaces/internal.internal-1.SharedContext.mdx)) => Promise<void>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "deleteInventoryItemLevelByLocationId", + "type": "(`locationId`: `string` \\| `string`[], `context?`: [SharedContext](../../internal-1/interfaces/internal.internal-1.SharedContext.mdx)) => Promise<void>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "deleteInventoryLevel", + "type": "(`inventoryItemId`: `string`, `locationId`: `string`, `context?`: [SharedContext](../../internal-1/interfaces/internal.internal-1.SharedContext.mdx)) => Promise<void>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "deleteReservationItem", + "type": "(`reservationItemId`: `string` \\| `string`[], `context?`: [SharedContext](../../internal-1/interfaces/internal.internal-1.SharedContext.mdx)) => Promise<void>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "deleteReservationItemByLocationId", + "type": "(`locationId`: `string` \\| `string`[], `context?`: [SharedContext](../../internal-1/interfaces/internal.internal-1.SharedContext.mdx)) => Promise<void>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "deleteReservationItemsByLineItem", + "type": "(`lineItemId`: `string` \\| `string`[], `context?`: [SharedContext](../../internal-1/interfaces/internal.internal-1.SharedContext.mdx)) => Promise<void>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "listInventoryItems", + "type": "(`selector`: [FilterableInventoryItemProps](../../InventoryTypes/interfaces/internal.internal-1.InventoryTypes.FilterableInventoryItemProps.mdx), `config?`: [FindConfig](../../CommonTypes/interfaces/internal.internal-1.CommonTypes.FindConfig.mdx)<[InventoryItemDTO](../types/internal.InventoryItemDTO.mdx)>, `context?`: [SharedContext](../../internal-1/interfaces/internal.internal-1.SharedContext.mdx)) => Promise<[[InventoryItemDTO](../types/internal.InventoryItemDTO.mdx)[], number]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "listInventoryLevels", + "type": "(`selector`: [FilterableInventoryLevelProps](../../InventoryTypes/interfaces/internal.internal-1.InventoryTypes.FilterableInventoryLevelProps.mdx), `config?`: [FindConfig](../../CommonTypes/interfaces/internal.internal-1.CommonTypes.FindConfig.mdx)<[InventoryLevelDTO](../types/internal.InventoryLevelDTO.mdx)>, `context?`: [SharedContext](../../internal-1/interfaces/internal.internal-1.SharedContext.mdx)) => Promise<[[InventoryLevelDTO](../types/internal.InventoryLevelDTO.mdx)[], number]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "listReservationItems", + "type": "(`selector`: [FilterableReservationItemProps](../../InventoryTypes/interfaces/internal.internal-1.InventoryTypes.FilterableReservationItemProps.mdx), `config?`: [FindConfig](../../CommonTypes/interfaces/internal.internal-1.CommonTypes.FindConfig.mdx)<[ReservationItemDTO](../types/internal.ReservationItemDTO.mdx)>, `context?`: [SharedContext](../../internal-1/interfaces/internal.internal-1.SharedContext.mdx)) => Promise<[[ReservationItemDTO](../types/internal.ReservationItemDTO.mdx)[], number]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "restoreInventoryItem", + "type": "(`inventoryItemId`: `string` \\| `string`[], `context?`: [SharedContext](../../internal-1/interfaces/internal.internal-1.SharedContext.mdx)) => Promise<void>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "retrieveAvailableQuantity", + "type": "(`inventoryItemId`: `string`, `locationIds`: `string`[], `context?`: [SharedContext](../../internal-1/interfaces/internal.internal-1.SharedContext.mdx)) => Promise<number>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "retrieveInventoryItem", + "type": "(`inventoryItemId`: `string`, `config?`: [FindConfig](../../CommonTypes/interfaces/internal.internal-1.CommonTypes.FindConfig.mdx)<[InventoryItemDTO](../types/internal.InventoryItemDTO.mdx)>, `context?`: [SharedContext](../../internal-1/interfaces/internal.internal-1.SharedContext.mdx)) => Promise<[InventoryItemDTO](../types/internal.InventoryItemDTO.mdx)>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "retrieveInventoryLevel", + "type": "(`inventoryItemId`: `string`, `locationId`: `string`, `context?`: [SharedContext](../../internal-1/interfaces/internal.internal-1.SharedContext.mdx)) => Promise<[InventoryLevelDTO](../types/internal.InventoryLevelDTO.mdx)>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "retrieveReservationItem", + "type": "(`reservationId`: `string`, `context?`: [SharedContext](../../internal-1/interfaces/internal.internal-1.SharedContext.mdx)) => Promise<[ReservationItemDTO](../types/internal.ReservationItemDTO.mdx)>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "retrieveReservedQuantity", + "type": "(`inventoryItemId`: `string`, `locationIds`: `string`[], `context?`: [SharedContext](../../internal-1/interfaces/internal.internal-1.SharedContext.mdx)) => Promise<number>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "retrieveStockedQuantity", + "type": "(`inventoryItemId`: `string`, `locationIds`: `string`[], `context?`: [SharedContext](../../internal-1/interfaces/internal.internal-1.SharedContext.mdx)) => Promise<number>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "updateInventoryItem", + "type": "(`inventoryItemId`: `string`, `input`: [Partial](../types/internal.Partial.mdx)<[CreateInventoryItemInput](../../InventoryTypes/interfaces/internal.internal-1.InventoryTypes.CreateInventoryItemInput.mdx)>, `context?`: [SharedContext](../../internal-1/interfaces/internal.internal-1.SharedContext.mdx)) => Promise<[InventoryItemDTO](../types/internal.InventoryItemDTO.mdx)>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "updateInventoryLevel", + "type": "(`inventoryItemId`: `string`, `locationId`: `string`, `update`: [UpdateInventoryLevelInput](../../InventoryTypes/interfaces/internal.internal-1.InventoryTypes.UpdateInventoryLevelInput.mdx), `context?`: [SharedContext](../../internal-1/interfaces/internal.internal-1.SharedContext.mdx)) => Promise<[InventoryLevelDTO](../types/internal.InventoryLevelDTO.mdx)>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "updateInventoryLevels", + "type": "(`updates`: [BulkUpdateInventoryLevelInput](../../InventoryTypes/interfaces/internal.internal-1.InventoryTypes.BulkUpdateInventoryLevelInput.mdx)[], `context?`: [SharedContext](../../internal-1/interfaces/internal.internal-1.SharedContext.mdx)) => Promise<[InventoryLevelDTO](../types/internal.InventoryLevelDTO.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "updateReservationItem", + "type": "(`reservationItemId`: `string`, `input`: [UpdateReservationItemInput](../../InventoryTypes/interfaces/internal.internal-1.InventoryTypes.UpdateReservationItemInput.mdx), `context?`: [SharedContext](../../internal-1/interfaces/internal.internal-1.SharedContext.mdx)) => Promise<[ReservationItemDTO](../types/internal.ReservationItemDTO.mdx)>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + } +]} /> ___ -#### stockLocationService\_ +### stockLocationService\_ + +#### Returns + + Promise<[StockLocationDTO](../types/internal.StockLocationDTO.mdx)>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "delete", + "type": "(`id`: `string`, `context?`: [SharedContext](../../internal-1/interfaces/internal.internal-1.SharedContext.mdx)) => Promise<void>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "list", + "type": "(`selector`: [FilterableStockLocationProps](../../StockLocationTypes/interfaces/internal.internal-1.StockLocationTypes.FilterableStockLocationProps.mdx), `config?`: [FindConfig](../../CommonTypes/interfaces/internal.internal-1.CommonTypes.FindConfig.mdx)<[StockLocationDTO](../types/internal.StockLocationDTO.mdx)>, `context?`: [SharedContext](../../internal-1/interfaces/internal.internal-1.SharedContext.mdx)) => Promise<[StockLocationDTO](../types/internal.StockLocationDTO.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "listAndCount", + "type": "(`selector`: [FilterableStockLocationProps](../../StockLocationTypes/interfaces/internal.internal-1.StockLocationTypes.FilterableStockLocationProps.mdx), `config?`: [FindConfig](../../CommonTypes/interfaces/internal.internal-1.CommonTypes.FindConfig.mdx)<[StockLocationDTO](../types/internal.StockLocationDTO.mdx)>, `context?`: [SharedContext](../../internal-1/interfaces/internal.internal-1.SharedContext.mdx)) => Promise<[[StockLocationDTO](../types/internal.StockLocationDTO.mdx)[], number]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "retrieve", + "type": "(`id`: `string`, `config?`: [FindConfig](../../CommonTypes/interfaces/internal.internal-1.CommonTypes.FindConfig.mdx)<[StockLocationDTO](../types/internal.StockLocationDTO.mdx)>, `context?`: [SharedContext](../../internal-1/interfaces/internal.internal-1.SharedContext.mdx)) => Promise<[StockLocationDTO](../types/internal.StockLocationDTO.mdx)>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "update", + "type": "(`id`: `string`, `input`: [UpdateStockLocationInput](../../StockLocationTypes/types/internal.internal-1.StockLocationTypes.UpdateStockLocationInput.mdx), `context?`: [SharedContext](../../internal-1/interfaces/internal.internal-1.SharedContext.mdx)) => Promise<[StockLocationDTO](../types/internal.StockLocationDTO.mdx)>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + } +]} /> + +___ ## Methods -#### adjustInventory +### adjustInventory Adjusts inventory of a variant on a location -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Accessors -#### activeManager\_ +### activeManager\_ -#### Inherited from +#### Returns -[TransactionBaseService](internal.internal.TransactionBaseService.mdx).[activeManager_](internal.internal.TransactionBaseService.mdx#activemanager_) + + +___ ## Methods -#### addOptionValue +### addOptionValue Adds option value to a variant. Fails when product with variant does not exist or @@ -182,7 +196,7 @@ if that product does not have an option with the given option id. Fails if given variant is not found. Option value must be of type string or number. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Accessors -#### activeManager\_ +### activeManager\_ -#### Inherited from +#### Returns -[TransactionBaseService](internal.internal.TransactionBaseService.mdx).[activeManager_](internal.internal.TransactionBaseService.mdx#activemanager_) + + +___ ## Methods -#### addCountry +### addCountry Adds a country to the region. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Accessors -#### activeManager\_ +### activeManager\_ -#### Inherited from +#### Returns -[TransactionBaseService](internal.internal.TransactionBaseService.mdx).[activeManager_](internal.internal.TransactionBaseService.mdx#activemanager_) + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Accessors -#### activeManager\_ +### activeManager\_ -#### Inherited from +#### Returns -[TransactionBaseService](internal.internal.TransactionBaseService.mdx).[activeManager_](internal.internal.TransactionBaseService.mdx#activemanager_) + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Accessors -#### activeManager\_ +### activeManager\_ -#### Inherited from +#### Returns -[TransactionBaseService](internal.internal.TransactionBaseService.mdx).[activeManager_](internal.internal.TransactionBaseService.mdx#activemanager_) + ___ -#### inventoryService\_ +### inventoryService\_ + +#### Returns + + Promise<[InventoryLevelDTO](../types/internal.InventoryLevelDTO.mdx)>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "confirmInventory", + "type": "(`inventoryItemId`: `string`, `locationIds`: `string`[], `quantity`: `number`, `context?`: [SharedContext](../../internal-1/interfaces/internal.internal-1.SharedContext.mdx)) => Promise<boolean>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "createInventoryItem", + "type": "(`input`: [CreateInventoryItemInput](../../InventoryTypes/interfaces/internal.internal-1.InventoryTypes.CreateInventoryItemInput.mdx), `context?`: [SharedContext](../../internal-1/interfaces/internal.internal-1.SharedContext.mdx)) => Promise<[InventoryItemDTO](../types/internal.InventoryItemDTO.mdx)>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "createInventoryItems", + "type": "(`input`: [CreateInventoryItemInput](../../InventoryTypes/interfaces/internal.internal-1.InventoryTypes.CreateInventoryItemInput.mdx)[], `context?`: [SharedContext](../../internal-1/interfaces/internal.internal-1.SharedContext.mdx)) => Promise<[InventoryItemDTO](../types/internal.InventoryItemDTO.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "createInventoryLevel", + "type": "(`data`: [CreateInventoryLevelInput](../../InventoryTypes/interfaces/internal.internal-1.InventoryTypes.CreateInventoryLevelInput.mdx), `context?`: [SharedContext](../../internal-1/interfaces/internal.internal-1.SharedContext.mdx)) => Promise<[InventoryLevelDTO](../types/internal.InventoryLevelDTO.mdx)>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "createInventoryLevels", + "type": "(`data`: [CreateInventoryLevelInput](../../InventoryTypes/interfaces/internal.internal-1.InventoryTypes.CreateInventoryLevelInput.mdx)[], `context?`: [SharedContext](../../internal-1/interfaces/internal.internal-1.SharedContext.mdx)) => Promise<[InventoryLevelDTO](../types/internal.InventoryLevelDTO.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "createReservationItem", + "type": "(`input`: [CreateReservationItemInput](../../InventoryTypes/interfaces/internal.internal-1.InventoryTypes.CreateReservationItemInput.mdx), `context?`: [SharedContext](../../internal-1/interfaces/internal.internal-1.SharedContext.mdx)) => Promise<[ReservationItemDTO](../types/internal.ReservationItemDTO.mdx)>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "createReservationItems", + "type": "(`input`: [CreateReservationItemInput](../../InventoryTypes/interfaces/internal.internal-1.InventoryTypes.CreateReservationItemInput.mdx)[], `context?`: [SharedContext](../../internal-1/interfaces/internal.internal-1.SharedContext.mdx)) => Promise<[ReservationItemDTO](../types/internal.ReservationItemDTO.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "deleteInventoryItem", + "type": "(`inventoryItemId`: `string` \\| `string`[], `context?`: [SharedContext](../../internal-1/interfaces/internal.internal-1.SharedContext.mdx)) => Promise<void>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "deleteInventoryItemLevelByLocationId", + "type": "(`locationId`: `string` \\| `string`[], `context?`: [SharedContext](../../internal-1/interfaces/internal.internal-1.SharedContext.mdx)) => Promise<void>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "deleteInventoryLevel", + "type": "(`inventoryItemId`: `string`, `locationId`: `string`, `context?`: [SharedContext](../../internal-1/interfaces/internal.internal-1.SharedContext.mdx)) => Promise<void>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "deleteReservationItem", + "type": "(`reservationItemId`: `string` \\| `string`[], `context?`: [SharedContext](../../internal-1/interfaces/internal.internal-1.SharedContext.mdx)) => Promise<void>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "deleteReservationItemByLocationId", + "type": "(`locationId`: `string` \\| `string`[], `context?`: [SharedContext](../../internal-1/interfaces/internal.internal-1.SharedContext.mdx)) => Promise<void>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "deleteReservationItemsByLineItem", + "type": "(`lineItemId`: `string` \\| `string`[], `context?`: [SharedContext](../../internal-1/interfaces/internal.internal-1.SharedContext.mdx)) => Promise<void>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "listInventoryItems", + "type": "(`selector`: [FilterableInventoryItemProps](../../InventoryTypes/interfaces/internal.internal-1.InventoryTypes.FilterableInventoryItemProps.mdx), `config?`: [FindConfig](../../CommonTypes/interfaces/internal.internal-1.CommonTypes.FindConfig.mdx)<[InventoryItemDTO](../types/internal.InventoryItemDTO.mdx)>, `context?`: [SharedContext](../../internal-1/interfaces/internal.internal-1.SharedContext.mdx)) => Promise<[[InventoryItemDTO](../types/internal.InventoryItemDTO.mdx)[], number]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "listInventoryLevels", + "type": "(`selector`: [FilterableInventoryLevelProps](../../InventoryTypes/interfaces/internal.internal-1.InventoryTypes.FilterableInventoryLevelProps.mdx), `config?`: [FindConfig](../../CommonTypes/interfaces/internal.internal-1.CommonTypes.FindConfig.mdx)<[InventoryLevelDTO](../types/internal.InventoryLevelDTO.mdx)>, `context?`: [SharedContext](../../internal-1/interfaces/internal.internal-1.SharedContext.mdx)) => Promise<[[InventoryLevelDTO](../types/internal.InventoryLevelDTO.mdx)[], number]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "listReservationItems", + "type": "(`selector`: [FilterableReservationItemProps](../../InventoryTypes/interfaces/internal.internal-1.InventoryTypes.FilterableReservationItemProps.mdx), `config?`: [FindConfig](../../CommonTypes/interfaces/internal.internal-1.CommonTypes.FindConfig.mdx)<[ReservationItemDTO](../types/internal.ReservationItemDTO.mdx)>, `context?`: [SharedContext](../../internal-1/interfaces/internal.internal-1.SharedContext.mdx)) => Promise<[[ReservationItemDTO](../types/internal.ReservationItemDTO.mdx)[], number]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "restoreInventoryItem", + "type": "(`inventoryItemId`: `string` \\| `string`[], `context?`: [SharedContext](../../internal-1/interfaces/internal.internal-1.SharedContext.mdx)) => Promise<void>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "retrieveAvailableQuantity", + "type": "(`inventoryItemId`: `string`, `locationIds`: `string`[], `context?`: [SharedContext](../../internal-1/interfaces/internal.internal-1.SharedContext.mdx)) => Promise<number>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "retrieveInventoryItem", + "type": "(`inventoryItemId`: `string`, `config?`: [FindConfig](../../CommonTypes/interfaces/internal.internal-1.CommonTypes.FindConfig.mdx)<[InventoryItemDTO](../types/internal.InventoryItemDTO.mdx)>, `context?`: [SharedContext](../../internal-1/interfaces/internal.internal-1.SharedContext.mdx)) => Promise<[InventoryItemDTO](../types/internal.InventoryItemDTO.mdx)>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "retrieveInventoryLevel", + "type": "(`inventoryItemId`: `string`, `locationId`: `string`, `context?`: [SharedContext](../../internal-1/interfaces/internal.internal-1.SharedContext.mdx)) => Promise<[InventoryLevelDTO](../types/internal.InventoryLevelDTO.mdx)>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "retrieveReservationItem", + "type": "(`reservationId`: `string`, `context?`: [SharedContext](../../internal-1/interfaces/internal.internal-1.SharedContext.mdx)) => Promise<[ReservationItemDTO](../types/internal.ReservationItemDTO.mdx)>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "retrieveReservedQuantity", + "type": "(`inventoryItemId`: `string`, `locationIds`: `string`[], `context?`: [SharedContext](../../internal-1/interfaces/internal.internal-1.SharedContext.mdx)) => Promise<number>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "retrieveStockedQuantity", + "type": "(`inventoryItemId`: `string`, `locationIds`: `string`[], `context?`: [SharedContext](../../internal-1/interfaces/internal.internal-1.SharedContext.mdx)) => Promise<number>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "updateInventoryItem", + "type": "(`inventoryItemId`: `string`, `input`: [Partial](../types/internal.Partial.mdx)<[CreateInventoryItemInput](../../InventoryTypes/interfaces/internal.internal-1.InventoryTypes.CreateInventoryItemInput.mdx)>, `context?`: [SharedContext](../../internal-1/interfaces/internal.internal-1.SharedContext.mdx)) => Promise<[InventoryItemDTO](../types/internal.InventoryItemDTO.mdx)>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "updateInventoryLevel", + "type": "(`inventoryItemId`: `string`, `locationId`: `string`, `update`: [UpdateInventoryLevelInput](../../InventoryTypes/interfaces/internal.internal-1.InventoryTypes.UpdateInventoryLevelInput.mdx), `context?`: [SharedContext](../../internal-1/interfaces/internal.internal-1.SharedContext.mdx)) => Promise<[InventoryLevelDTO](../types/internal.InventoryLevelDTO.mdx)>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "updateInventoryLevels", + "type": "(`updates`: [BulkUpdateInventoryLevelInput](../../InventoryTypes/interfaces/internal.internal-1.InventoryTypes.BulkUpdateInventoryLevelInput.mdx)[], `context?`: [SharedContext](../../internal-1/interfaces/internal.internal-1.SharedContext.mdx)) => Promise<[InventoryLevelDTO](../types/internal.InventoryLevelDTO.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "updateReservationItem", + "type": "(`reservationItemId`: `string`, `input`: [UpdateReservationItemInput](../../InventoryTypes/interfaces/internal.internal-1.InventoryTypes.UpdateReservationItemInput.mdx), `context?`: [SharedContext](../../internal-1/interfaces/internal.internal-1.SharedContext.mdx)) => Promise<[ReservationItemDTO](../types/internal.ReservationItemDTO.mdx)>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + } +]} /> + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Accessors -#### activeManager\_ +### activeManager\_ -#### Inherited from +#### Returns -[TransactionBaseService](internal.internal.TransactionBaseService.mdx).[activeManager_](internal.internal.TransactionBaseService.mdx#activemanager_) + ___ -#### stockLocationService\_ +### stockLocationService\_ + +#### Returns + + Promise<[StockLocationDTO](../types/internal.StockLocationDTO.mdx)>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "delete", + "type": "(`id`: `string`, `context?`: [SharedContext](../../internal-1/interfaces/internal.internal-1.SharedContext.mdx)) => Promise<void>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "list", + "type": "(`selector`: [FilterableStockLocationProps](../../StockLocationTypes/interfaces/internal.internal-1.StockLocationTypes.FilterableStockLocationProps.mdx), `config?`: [FindConfig](../../CommonTypes/interfaces/internal.internal-1.CommonTypes.FindConfig.mdx)<[StockLocationDTO](../types/internal.StockLocationDTO.mdx)>, `context?`: [SharedContext](../../internal-1/interfaces/internal.internal-1.SharedContext.mdx)) => Promise<[StockLocationDTO](../types/internal.StockLocationDTO.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "listAndCount", + "type": "(`selector`: [FilterableStockLocationProps](../../StockLocationTypes/interfaces/internal.internal-1.StockLocationTypes.FilterableStockLocationProps.mdx), `config?`: [FindConfig](../../CommonTypes/interfaces/internal.internal-1.CommonTypes.FindConfig.mdx)<[StockLocationDTO](../types/internal.StockLocationDTO.mdx)>, `context?`: [SharedContext](../../internal-1/interfaces/internal.internal-1.SharedContext.mdx)) => Promise<[[StockLocationDTO](../types/internal.StockLocationDTO.mdx)[], number]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "retrieve", + "type": "(`id`: `string`, `config?`: [FindConfig](../../CommonTypes/interfaces/internal.internal-1.CommonTypes.FindConfig.mdx)<[StockLocationDTO](../types/internal.StockLocationDTO.mdx)>, `context?`: [SharedContext](../../internal-1/interfaces/internal.internal-1.SharedContext.mdx)) => Promise<[StockLocationDTO](../types/internal.StockLocationDTO.mdx)>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "update", + "type": "(`id`: `string`, `input`: [UpdateStockLocationInput](../../StockLocationTypes/types/internal.internal-1.StockLocationTypes.UpdateStockLocationInput.mdx), `context?`: [SharedContext](../../internal-1/interfaces/internal.internal-1.SharedContext.mdx)) => Promise<[StockLocationDTO](../types/internal.StockLocationDTO.mdx)>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + } +]} /> + +___ ## Methods -#### associateLocation +### associateLocation Associates a sales channel with a stock location. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Accessors -#### activeManager\_ +### activeManager\_ -#### Inherited from +#### Returns -[TransactionBaseService](internal.internal.TransactionBaseService.mdx).[activeManager_](internal.internal.TransactionBaseService.mdx#activemanager_) + + +___ ## Methods -#### addProducts +### addProducts Add a batch of product to a sales channel -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Accessors -#### options +### options -#### Inherited from +#### Returns -[AbstractSearchService](internal.AbstractSearchService.mdx).[options](internal.AbstractSearchService.mdx#options) +`", + "optional": false, + "defaultValue": "", + "description": "", + "expandable": false, + "children": [] + } +]} /> + +___ ## Methods -#### addDocuments +### addDocuments Used to index documents by the search engine provider -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Accessors -#### activeManager\_ +### activeManager\_ -#### Inherited from +#### Returns -[TransactionBaseService](internal.internal.TransactionBaseService.mdx).[activeManager_](internal.internal.TransactionBaseService.mdx#activemanager_) + + +___ ## Methods -#### addRequirement +### addRequirement Adds a requirement to a shipping option. Only 1 requirement of each type is allowed. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Accessors -#### activeManager\_ +### activeManager\_ -#### Inherited from +#### Returns -[TransactionBaseService](internal.internal.TransactionBaseService.mdx).[activeManager_](internal.internal.TransactionBaseService.mdx#activemanager_) + + +___ ## Methods -#### addProduct +### addProduct -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Accessors -#### activeManager\_ +### activeManager\_ -#### Inherited from +#### Returns -[TransactionBaseService](internal.internal.TransactionBaseService.mdx).[activeManager_](internal.internal.TransactionBaseService.mdx#activemanager_) + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Accessors -#### activeManager\_ +### activeManager\_ -#### Inherited from +#### Returns -[TransactionBaseService](internal.internal.TransactionBaseService.mdx).[activeManager_](internal.internal.TransactionBaseService.mdx#activemanager_) + + +___ ## Methods -#### addCurrency +### addCurrency Add a currency to the store -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Accessors -#### activeManager\_ +### activeManager\_ -#### Inherited from +#### Returns -[TransactionBaseService](internal.internal.TransactionBaseService.mdx).[activeManager_](internal.internal.TransactionBaseService.mdx#activemanager_) + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Accessors -#### activeManager\_ +### activeManager\_ -#### Inherited from +#### Returns -[TransactionBaseService](internal.internal.TransactionBaseService.mdx).[activeManager_](internal.internal.TransactionBaseService.mdx#activemanager_) + + +___ ## Methods -#### areReturnItemsValid +### areReturnItemsValid -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Accessors -#### activeManager\_ +### activeManager\_ -#### Inherited from +#### Returns -[TransactionBaseService](internal.internal.TransactionBaseService.mdx).[activeManager_](internal.internal.TransactionBaseService.mdx#activemanager_) + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Accessors -#### activeManager\_ +### activeManager\_ -#### Inherited from +#### Returns -[TransactionBaseService](internal.internal.TransactionBaseService.mdx).[activeManager_](internal.internal.TransactionBaseService.mdx#activemanager_) + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Accessors -#### activeManager\_ +### activeManager\_ -#### Inherited from +#### Returns -[TransactionBaseService](internal.internal.TransactionBaseService.mdx).[activeManager_](internal.internal.TransactionBaseService.mdx#activemanager_) + + +___ ## Methods -#### addToProduct +### addToProduct -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Methods -#### signToken +### signToken -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Accessors -#### activeManager\_ +### activeManager\_ -#### Inherited from +#### Returns -[TransactionBaseService](internal.internal.TransactionBaseService.mdx).[activeManager_](internal.internal.TransactionBaseService.mdx#activemanager_) + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Accessors -#### activeManager\_ +### activeManager\_ + +#### Returns + + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Accessors -#### activeManager\_ +### activeManager\_ -#### Inherited from +#### Returns -[TransactionBaseService](internal.internal.TransactionBaseService.mdx).[activeManager_](internal.internal.TransactionBaseService.mdx#activemanager_) + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Methods -#### delete +### delete -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Methods -#### catch +### catch Attaches a callback for only the rejection of the Promise. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Methods -#### [iterator] +### [iterator] -##### Returns +#### Returns -##### Returns +#### Returns target.byteLength`, or `sourceEnd > source.byteLength`. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns ``` -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns ``` -##### Parameters +#### Parameters -##### Returns +#### Returns ``` -##### Parameters +#### Parameters -##### Returns +#### Returns ``` -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns ``` -##### Parameters +#### Parameters -##### Returns +#### Returns ``` -##### Parameters +#### Parameters -##### Returns +#### Returns ``` -##### Parameters +#### Parameters -##### Returns +#### Returns ``` -##### Parameters +#### Parameters -##### Returns +#### Returns ``` -##### Parameters +#### Parameters -##### Returns +#### Returns ``` -##### Parameters +#### Parameters -##### Returns +#### Returns ``` -##### Parameters +#### Parameters -##### Returns +#### Returns ``` -##### Parameters +#### Parameters -##### Returns +#### Returns ``` -##### Parameters +#### Parameters -##### Returns +#### Returns ``` -##### Parameters +#### Parameters -##### Returns +#### Returns ``` -##### Parameters +#### Parameters -##### Returns +#### Returns ``` -##### Parameters +#### Parameters -##### Returns +#### Returns ``` -##### Parameters +#### Parameters -##### Returns +#### Returns ``` -##### Parameters +#### Parameters -##### Returns +#### Returns ``` -##### Parameters +#### Parameters -##### Returns +#### Returns ``` -##### Parameters +#### Parameters -##### Returns +#### Returns ``` -##### Parameters +#### Parameters -##### Returns +#### Returns ``` -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Methods -#### alloc +### alloc Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the`Buffer` will be zero-filled. @@ -70,7 +72,7 @@ data that might not have been allocated for `Buffer`s. A `TypeError` will be thrown if `size` is not a number. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns { A `TypeError` will be thrown if `size` is not a number. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Methods -#### throwIfRequested +### throwIfRequested -##### Returns +#### Returns +___ + ## Methods -#### construct +### construct -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns { Returns a reference to the `EventEmitter`, so that calls can be chained. -##### Parameters +#### Parameters -##### Returns +#### Returns { Returns a reference to the `EventEmitter`, so that calls can be chained. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Methods -#### arrayBuffer +### arrayBuffer [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/arrayBuffer) -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Methods -#### callback +### callback This function is called for every chunk of incoming data. Two arguments are passed to it: the number of bytes written to buffer and a reference to buffer. Return false from this function to implicitly pause() the socket. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Methods -#### [asyncIterator] +### [asyncIterator] -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns { Returns a reference to the `EventEmitter`, so that calls can be chained. -##### Parameters +#### Parameters -##### Returns +#### Returns { Returns a reference to the `EventEmitter`, so that calls can be chained. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Methods -#### close +### close -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Methods -#### close +### close [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/close) -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Methods -#### construct +### construct -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Methods -#### [asyncIterator] +### [asyncIterator] -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns { Returns a reference to the `EventEmitter`, so that calls can be chained. -##### Parameters +#### Parameters -##### Returns +#### Returns { Returns a reference to the `EventEmitter`, so that calls can be chained. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Methods -#### [asyncIterator] +### [asyncIterator] -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Methods -#### cancel +### cancel [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/cancel) -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Methods -#### cancel +### cancel -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Methods -#### cancel +### cancel [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/cancel) -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Methods -#### respond +### respond [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/respond) -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Methods -#### close +### close -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Methods -#### close +### close [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/close) -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Methods -#### cancel +### cancel -##### Parameters +#### Parameters -##### Returns +#### Returns +___ + ## Methods -#### cancel +### cancel [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/cancel) -##### Parameters +#### Parameters -##### Returns +#### Returns +___ + ## Methods -#### cancel +### cancel -##### Parameters +#### Parameters -##### Returns +#### Returns +___ + ## Methods -#### cancel +### cancel [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/cancel) -##### Parameters +#### Parameters -##### Returns +#### Returns +___ + ## Methods -#### slice +### slice Returns a section of an SharedArrayBuffer. -##### Parameters +#### Parameters -##### Returns +#### Returns +___ + ## Methods -#### construct +### construct -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Methods -#### abort +### abort [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/abort) -##### Parameters +#### Parameters -##### Returns +#### Returns +___ + ## Methods -#### abort +### abort -##### Parameters +#### Parameters -##### Returns +#### Returns +___ + ## Methods -#### [captureRejectionSymbol] +### [captureRejectionSymbol] -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns { Returns a reference to the `EventEmitter`, so that calls can be chained. -##### Parameters +#### Parameters -##### Returns +#### Returns { Returns a reference to the `EventEmitter`, so that calls can be chained. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Methods -#### error +### error [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController/error) -##### Parameters +#### Parameters -##### Returns +#### Returns +___ + ## Methods -#### abort +### abort -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Methods -#### abort +### abort [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/abort) -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Accessors -#### activeManager\_ +### activeManager\_ -#### Inherited from +#### Returns -[TransactionBaseService](../classes/internal.internal.TransactionBaseService.mdx).[activeManager_](../classes/internal.internal.TransactionBaseService.mdx#activemanager_) + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Accessors -#### activeManager\_ +### activeManager\_ -#### Inherited from +#### Returns -[TransactionBaseService](../classes/internal.internal.TransactionBaseService.mdx).[activeManager_](../classes/internal.internal.TransactionBaseService.mdx#activemanager_) + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Accessors -#### activeManager\_ +### activeManager\_ -#### Inherited from +#### Returns -[TransactionBaseService](../classes/internal.internal.TransactionBaseService.mdx).[activeManager_](../classes/internal.internal.TransactionBaseService.mdx#activemanager_) + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Methods -#### [asyncDispose] +### [asyncDispose] Calls `readable.destroy()` with an `AbortError` and returns a promise that fulfills when the stream is finished. -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns (fn, options?): Promise<undefined \| T>` @@ -1462,7 +1464,7 @@ to find a chunk with a truthy value for *fn*. Once an *fn* call's awaited return the stream is destroyed and the promise is fulfilled with value for which *fn* returned a truthy value. If all of the *fn* calls on the chunks return a falsy value, the promise is fulfilled with `undefined`. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns { The `readable.pause()` method has no effect if there is a `'readable'`event listener. -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns (fn, initial?, options?): Promise<T>` @@ -3533,7 +3535,7 @@ If the stream is empty, the promise is rejected with a `TypeError` with the `ERR The reducer function iterates the stream element-by-element which means that there is no *concurrency* parameter or parallelism. To perform a reduce concurrently, you can extract the async function to `readable.map` method. -##### Parameters +#### Parameters -##### Returns +#### Returns (fn, initial, options?): Promise<T>` -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns { }); ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns { }, 1000); ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns -##### Returns +#### Returns { }); ``` -##### Parameters +#### Parameters { } ]} /> -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns +___ + ## Accessors -#### activeManager\_ +### activeManager\_ -#### Inherited from +#### Returns -[TransactionBaseService](../classes/internal.internal.TransactionBaseService.mdx).[activeManager_](../classes/internal.internal.TransactionBaseService.mdx#activemanager_) + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +#### Returns -##### Returns +### Returns -#### Index signature +## Index signature ▪ [k: `string`]: `T` diff --git a/www/apps/docs/content/references/js-client/internal/types/internal.Discount-5.mdx b/www/apps/docs/content/references/js-client/internal/types/internal.Discount-5.mdx index 38c0954ab8..09ed9d6012 100644 --- a/www/apps/docs/content/references/js-client/internal/types/internal.Discount-5.mdx +++ b/www/apps/docs/content/references/js-client/internal/types/internal.Discount-5.mdx @@ -8,7 +8,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes" A discount can be applied to a cart for promotional purposes. -#### Type declaration +## Type declaration -##### Returns +### Returns -##### Returns +### Returns -#### Type declaration +## Type declaration -##### Returns +### Returns -##### Returns +### Returns -##### Returns +### Returns -##### Returns +### Returns -#### Type declaration +## Type declaration -##### Parameters +### Parameters -##### Returns +### Returns -#### Type declaration +## Type declaration -##### Parameters +### Parameters -##### Returns +### Returns -#### Type declaration +## Type declaration -#### Type declaration +## Type declaration -#### Type declaration +## Type declaration -#### Type declaration +## Type declaration -##### Returns +### Returns diff --git a/www/apps/docs/content/references/js-client/internal/types/internal.middlewareType.mdx b/www/apps/docs/content/references/js-client/internal/types/internal.middlewareType.mdx index 53e3ddfb3b..e454164db0 100644 --- a/www/apps/docs/content/references/js-client/internal/types/internal.middlewareType.mdx +++ b/www/apps/docs/content/references/js-client/internal/types/internal.middlewareType.mdx @@ -6,7 +6,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes" # middlewareType -#### Type declaration +## Type declaration +___ + ## Functions -#### Boolean +### Boolean -##### Parameters +#### Parameters -##### Returns +#### Returns -##### Returns +#### Returns -#### Inherited from +### Inherited from Uint8Array.[iterator] diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.at.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.at.mdx index 8c8b85b4b3..3220d7d526 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.at.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.at.mdx @@ -14,7 +14,7 @@ Takes an integer value and returns the item at that index, allowing for positive and negative integers. Negative integers count back from the last item in the array. -#### Parameters +## Parameters -#### Returns +## Returns `undefined` \| `number` @@ -44,6 +44,6 @@ Negative integers count back from the last item in the array. } ]} /> -#### Inherited from +### Inherited from Uint8Array.at diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.compare.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.compare.mdx index 7d02eddada..209a0a7b05 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.compare.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.compare.mdx @@ -57,7 +57,7 @@ console.log(buf1.compare(buf2, 5, 6, 5)); `ERR_OUT_OF_RANGE` is thrown if `targetStart < 0`, `sourceStart < 0`,`targetEnd > target.byteLength`, or `sourceEnd > source.byteLength`. -#### Parameters +## Parameters -#### Returns +## Returns `0` \| `1` \| `-1` @@ -123,6 +123,6 @@ console.log(buf1.compare(buf2, 5, 6, 5)); } ]} /> -#### Since +## Since v0.11.13 diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.copy.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.copy.mdx index c7c0c3b7ed..2311ce446f 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.copy.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.copy.mdx @@ -56,7 +56,7 @@ console.log(buf.toString()); // Prints: efghijghijklmnopqrstuvwxyz ``` -#### Parameters +## Parameters -#### Returns +## Returns `number` @@ -113,6 +113,6 @@ console.log(buf.toString()); } ]} /> -#### Since +## Since v0.1.90 diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.copyWithin.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.copyWithin.mdx index 5fad9a0e7c..dfa9016ed3 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.copyWithin.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.copyWithin.mdx @@ -13,7 +13,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes" Returns the this object after copying a section of the array identified by start and end to the same array starting at position target -#### Parameters +## Parameters -#### Returns +## Returns [Buffer](../../variables/Buffer-1.mdx) @@ -61,6 +61,6 @@ to the same array starting at position target } ]} /> -#### Inherited from +### Inherited from Uint8Array.copyWithin diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.entries.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.entries.mdx index 697e65c79f..9d5b0906d9 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.entries.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.entries.mdx @@ -32,7 +32,7 @@ for (const pair of buf.entries()) { // [5, 114] ``` -#### Returns +## Returns [IterableIterator](../../interfaces/IterableIterator.mdx)<[number, number]> @@ -67,10 +67,10 @@ for (const pair of buf.entries()) { } ]} /> -#### Since +## Since v1.1.0 -#### Overrides +### Overrides Uint8Array.entries diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.equals.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.equals.mdx index 2bc4ecf33e..06e17c8a40 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.equals.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.equals.mdx @@ -25,7 +25,7 @@ console.log(buf1.equals(buf3)); // Prints: false ``` -#### Parameters +## Parameters -#### Returns +## Returns `boolean` @@ -55,6 +55,6 @@ console.log(buf1.equals(buf3)); } ]} /> -#### Since +## Since v0.11.13 diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.every.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.every.mdx index 18fc2a171a..0075dace5e 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.every.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.every.mdx @@ -12,7 +12,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes" Determines whether all the members of an array satisfy the specified test. -#### Parameters +## Parameters -#### Returns +## Returns `boolean` @@ -51,6 +51,6 @@ Determines whether all the members of an array satisfy the specified test. } ]} /> -#### Inherited from +### Inherited from Uint8Array.every diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.fill.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.fill.mdx index fdfc1cad2c..3409beb159 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.fill.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.fill.mdx @@ -62,7 +62,7 @@ console.log(buf.fill('zz', 'hex')); // Throws an exception. ``` -#### Parameters +## Parameters -#### Returns +## Returns [Buffer](../../variables/Buffer-1.mdx) @@ -119,10 +119,10 @@ console.log(buf.fill('zz', 'hex')); } ]} /> -#### Since +## Since v0.5.0 -#### Overrides +### Overrides Uint8Array.fill diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.filter.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.filter.mdx index b163cab9b2..025df0037a 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.filter.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.filter.mdx @@ -12,7 +12,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes" Returns the elements of an array that meet the condition specified in a callback function. -#### Parameters +## Parameters -#### Returns +## Returns Uint8Array @@ -51,6 +51,6 @@ Uint8Array } ]} /> -#### Inherited from +### Inherited from Uint8Array.filter diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.find.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.find.mdx index 566e77c787..91e4b3210c 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.find.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.find.mdx @@ -13,7 +13,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes" Returns the value of the first element in the array where predicate is true, and undefined otherwise. -#### Parameters +## Parameters -#### Returns +## Returns `undefined` \| `number` @@ -52,6 +52,6 @@ otherwise. } ]} /> -#### Inherited from +### Inherited from Uint8Array.find diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.findIndex.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.findIndex.mdx index d3d1442b3b..46c6df4eb0 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.findIndex.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.findIndex.mdx @@ -13,7 +13,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes" Returns the index of the first element in the array where predicate is true, and -1 otherwise. -#### Parameters +## Parameters -#### Returns +## Returns `number` @@ -52,6 +52,6 @@ otherwise. } ]} /> -#### Inherited from +### Inherited from Uint8Array.findIndex diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.forEach.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.forEach.mdx index 769ae6584e..af43b7beaa 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.forEach.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.forEach.mdx @@ -12,7 +12,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes" Performs the specified action for each element in an array. -#### Parameters +## Parameters -#### Returns +## Returns `void` @@ -51,6 +51,6 @@ Performs the specified action for each element in an array. } ]} /> -#### Inherited from +### Inherited from Uint8Array.forEach diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.includes.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.includes.mdx index 0f10a0b245..ef2c5c6dd3 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.includes.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.includes.mdx @@ -33,7 +33,7 @@ console.log(buf.includes('this', 4)); // Prints: false ``` -#### Parameters +## Parameters -#### Returns +## Returns `boolean` @@ -81,10 +81,10 @@ console.log(buf.includes('this', 4)); } ]} /> -#### Since +## Since v5.3.0 -#### Overrides +### Overrides Uint8Array.includes diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.indexOf.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.indexOf.mdx index 896bc08386..6de980df9c 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.indexOf.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.indexOf.mdx @@ -72,7 +72,7 @@ console.log(b.indexOf('b', [])); If `value` is an empty string or empty `Buffer` and `byteOffset` is less than `buf.length`, `byteOffset` will be returned. If `value` is empty and`byteOffset` is at least `buf.length`, `buf.length` will be returned. -#### Parameters +## Parameters -#### Returns +## Returns `number` @@ -120,10 +120,10 @@ than `buf.length`, `byteOffset` will be returned. If `value` is empty and`byteOf } ]} /> -#### Since +## Since v1.5.0 -#### Overrides +### Overrides Uint8Array.indexOf diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.join.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.join.mdx index fe9e94a5d6..812eeb1f5c 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.join.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.join.mdx @@ -12,7 +12,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes" Adds all the elements of an array separated by the specified separator string. -#### Parameters +## Parameters -#### Returns +## Returns `string` @@ -42,6 +42,6 @@ Adds all the elements of an array separated by the specified separator string. } ]} /> -#### Inherited from +### Inherited from Uint8Array.join diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.keys.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.keys.mdx index 5a783bf7f8..c81f8107ea 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.keys.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.keys.mdx @@ -29,7 +29,7 @@ for (const key of buf.keys()) { // 5 ``` -#### Returns +## Returns [IterableIterator](../../interfaces/IterableIterator.mdx)<number> @@ -55,10 +55,10 @@ for (const key of buf.keys()) { } ]} /> -#### Since +## Since v1.1.0 -#### Overrides +### Overrides Uint8Array.keys diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.lastIndexOf.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.lastIndexOf.mdx index da6a35f690..6aa277a7e4 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.lastIndexOf.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.lastIndexOf.mdx @@ -71,7 +71,7 @@ console.log(b.lastIndexOf('b', [])); If `value` is an empty string or empty `Buffer`, `byteOffset` will be returned. -#### Parameters +## Parameters -#### Returns +## Returns `number` @@ -119,10 +119,10 @@ If `value` is an empty string or empty `Buffer`, `byteOffset` will be returned. } ]} /> -#### Since +## Since v6.0.0 -#### Overrides +### Overrides Uint8Array.lastIndexOf diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.map.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.map.mdx index fa902d4a5e..2f18e04e41 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.map.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.map.mdx @@ -13,7 +13,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes" Calls a defined callback function on each element of an array, and returns an array that contains the results. -#### Parameters +## Parameters -#### Returns +## Returns Uint8Array @@ -52,6 +52,6 @@ Uint8Array } ]} /> -#### Inherited from +### Inherited from Uint8Array.map diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.readBigInt64BE.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.readBigInt64BE.mdx index 3aa94fa1fc..e14f67f47b 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.readBigInt64BE.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.readBigInt64BE.mdx @@ -15,7 +15,7 @@ Reads a signed, big-endian 64-bit integer from `buf` at the specified `offset`. Integers read from a `Buffer` are interpreted as two's complement signed values. -#### Parameters +## Parameters -#### Returns +## Returns `bigint` @@ -45,6 +45,6 @@ values. } ]} /> -#### Since +## Since v12.0.0, v10.20.0 diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.readBigInt64LE.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.readBigInt64LE.mdx index 6dbd29e229..ea228f9851 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.readBigInt64LE.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.readBigInt64LE.mdx @@ -15,7 +15,7 @@ Reads a signed, little-endian 64-bit integer from `buf` at the specified`offset` Integers read from a `Buffer` are interpreted as two's complement signed values. -#### Parameters +## Parameters -#### Returns +## Returns `bigint` @@ -45,6 +45,6 @@ values. } ]} /> -#### Since +## Since v12.0.0, v10.20.0 diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.readBigUInt64BE.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.readBigUInt64BE.mdx index 91e23179dd..8adafda451 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.readBigUInt64BE.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.readBigUInt64BE.mdx @@ -23,7 +23,7 @@ console.log(buf.readBigUInt64BE(0)); // Prints: 4294967295n ``` -#### Parameters +## Parameters -#### Returns +## Returns `bigint` @@ -53,6 +53,6 @@ console.log(buf.readBigUInt64BE(0)); } ]} /> -#### Since +## Since v12.0.0, v10.20.0 diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.readBigUInt64LE.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.readBigUInt64LE.mdx index 8dc80d67d9..0b641bb40e 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.readBigUInt64LE.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.readBigUInt64LE.mdx @@ -23,7 +23,7 @@ console.log(buf.readBigUInt64LE(0)); // Prints: 18446744069414584320n ``` -#### Parameters +## Parameters -#### Returns +## Returns `bigint` @@ -53,6 +53,6 @@ console.log(buf.readBigUInt64LE(0)); } ]} /> -#### Since +## Since v12.0.0, v10.20.0 diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.readBigUint64BE-1.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.readBigUint64BE-1.mdx index 6c132e2a8e..073a6f2573 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.readBigUint64BE-1.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.readBigUint64BE-1.mdx @@ -10,7 +10,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes" `**readBigUint64BE**(offset?): bigint` -#### Parameters +## Parameters -#### Returns +## Returns `bigint` @@ -40,10 +40,10 @@ import ParameterTypes from "@site/src/components/ParameterTypes" } ]} /> -#### Alias +## Alias Buffer.readBigUInt64BE -#### Since +## Since v14.10.0, v12.19.0 diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.readBigUint64LE-1.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.readBigUint64LE-1.mdx index 20220a8ed6..a6ae07f7f9 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.readBigUint64LE-1.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.readBigUint64LE-1.mdx @@ -10,7 +10,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes" `**readBigUint64LE**(offset?): bigint` -#### Parameters +## Parameters -#### Returns +## Returns `bigint` @@ -40,10 +40,10 @@ import ParameterTypes from "@site/src/components/ParameterTypes" } ]} /> -#### Alias +## Alias Buffer.readBigUInt64LE -#### Since +## Since v14.10.0, v12.19.0 diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.readDoubleBE.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.readDoubleBE.mdx index 0602e14759..9bcd7325b2 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.readDoubleBE.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.readDoubleBE.mdx @@ -21,7 +21,7 @@ console.log(buf.readDoubleBE(0)); // Prints: 8.20788039913184e-304 ``` -#### Parameters +## Parameters -#### Returns +## Returns `number` @@ -51,6 +51,6 @@ console.log(buf.readDoubleBE(0)); } ]} /> -#### Since +## Since v0.11.15 diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.readDoubleLE.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.readDoubleLE.mdx index 15cf6ae491..77d73c61eb 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.readDoubleLE.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.readDoubleLE.mdx @@ -23,7 +23,7 @@ console.log(buf.readDoubleLE(1)); // Throws ERR_OUT_OF_RANGE. ``` -#### Parameters +## Parameters -#### Returns +## Returns `number` @@ -53,6 +53,6 @@ console.log(buf.readDoubleLE(1)); } ]} /> -#### Since +## Since v0.11.15 diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.readFloatBE.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.readFloatBE.mdx index f2206c42f2..c950d0a383 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.readFloatBE.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.readFloatBE.mdx @@ -21,7 +21,7 @@ console.log(buf.readFloatBE(0)); // Prints: 2.387939260590663e-38 ``` -#### Parameters +## Parameters -#### Returns +## Returns `number` @@ -51,6 +51,6 @@ console.log(buf.readFloatBE(0)); } ]} /> -#### Since +## Since v0.11.15 diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.readFloatLE.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.readFloatLE.mdx index 8d0f85ca93..f2aeeca36a 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.readFloatLE.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.readFloatLE.mdx @@ -23,7 +23,7 @@ console.log(buf.readFloatLE(1)); // Throws ERR_OUT_OF_RANGE. ``` -#### Parameters +## Parameters -#### Returns +## Returns `number` @@ -53,6 +53,6 @@ console.log(buf.readFloatLE(1)); } ]} /> -#### Since +## Since v0.11.15 diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.readInt16BE.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.readInt16BE.mdx index 86e689421d..b9123e455f 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.readInt16BE.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.readInt16BE.mdx @@ -23,7 +23,7 @@ console.log(buf.readInt16BE(0)); // Prints: 5 ``` -#### Parameters +## Parameters -#### Returns +## Returns `number` @@ -53,6 +53,6 @@ console.log(buf.readInt16BE(0)); } ]} /> -#### Since +## Since v0.5.5 diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.readInt16LE.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.readInt16LE.mdx index 6d434497be..8c93d08b7d 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.readInt16LE.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.readInt16LE.mdx @@ -25,7 +25,7 @@ console.log(buf.readInt16LE(1)); // Throws ERR_OUT_OF_RANGE. ``` -#### Parameters +## Parameters -#### Returns +## Returns `number` @@ -55,6 +55,6 @@ console.log(buf.readInt16LE(1)); } ]} /> -#### Since +## Since v0.5.5 diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.readInt32BE.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.readInt32BE.mdx index c501ba77fb..8eb2eff797 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.readInt32BE.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.readInt32BE.mdx @@ -23,7 +23,7 @@ console.log(buf.readInt32BE(0)); // Prints: 5 ``` -#### Parameters +## Parameters -#### Returns +## Returns `number` @@ -53,6 +53,6 @@ console.log(buf.readInt32BE(0)); } ]} /> -#### Since +## Since v0.5.5 diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.readInt32LE.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.readInt32LE.mdx index 5df09f104b..794e430d73 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.readInt32LE.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.readInt32LE.mdx @@ -25,7 +25,7 @@ console.log(buf.readInt32LE(1)); // Throws ERR_OUT_OF_RANGE. ``` -#### Parameters +## Parameters -#### Returns +## Returns `number` @@ -55,6 +55,6 @@ console.log(buf.readInt32LE(1)); } ]} /> -#### Since +## Since v0.5.5 diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.readInt8.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.readInt8.mdx index 5f7fa4bab9..7635670fd3 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.readInt8.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.readInt8.mdx @@ -27,7 +27,7 @@ console.log(buf.readInt8(2)); // Throws ERR_OUT_OF_RANGE. ``` -#### Parameters +## Parameters -#### Returns +## Returns `number` @@ -57,6 +57,6 @@ console.log(buf.readInt8(2)); } ]} /> -#### Since +## Since v0.5.0 diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.readIntBE.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.readIntBE.mdx index c2ed5e8891..a1cfb36af7 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.readIntBE.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.readIntBE.mdx @@ -26,7 +26,7 @@ console.log(buf.readIntBE(1, 0).toString(16)); // Throws ERR_OUT_OF_RANGE. ``` -#### Parameters +## Parameters -#### Returns +## Returns `number` @@ -65,6 +65,6 @@ console.log(buf.readIntBE(1, 0).toString(16)); } ]} /> -#### Since +## Since v0.11.15 diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.readIntLE.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.readIntLE.mdx index 7cedcbc801..5a26e47280 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.readIntLE.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.readIntLE.mdx @@ -22,7 +22,7 @@ console.log(buf.readIntLE(0, 6).toString(16)); // Prints: -546f87a9cbee ``` -#### Parameters +## Parameters -#### Returns +## Returns `number` @@ -61,6 +61,6 @@ console.log(buf.readIntLE(0, 6).toString(16)); } ]} /> -#### Since +## Since v0.11.15 diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.readUInt16BE.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.readUInt16BE.mdx index fc8e13faa3..023458fb69 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.readUInt16BE.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.readUInt16BE.mdx @@ -25,7 +25,7 @@ console.log(buf.readUInt16BE(1).toString(16)); // Prints: 3456 ``` -#### Parameters +## Parameters -#### Returns +## Returns `number` @@ -55,6 +55,6 @@ console.log(buf.readUInt16BE(1).toString(16)); } ]} /> -#### Since +## Since v0.5.5 diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.readUInt16LE.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.readUInt16LE.mdx index 3fc76050af..4c81d88b1f 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.readUInt16LE.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.readUInt16LE.mdx @@ -27,7 +27,7 @@ console.log(buf.readUInt16LE(2).toString(16)); // Throws ERR_OUT_OF_RANGE. ``` -#### Parameters +## Parameters -#### Returns +## Returns `number` @@ -57,6 +57,6 @@ console.log(buf.readUInt16LE(2).toString(16)); } ]} /> -#### Since +## Since v0.5.5 diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.readUInt32BE.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.readUInt32BE.mdx index fb351b4a6d..551af7854a 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.readUInt32BE.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.readUInt32BE.mdx @@ -23,7 +23,7 @@ console.log(buf.readUInt32BE(0).toString(16)); // Prints: 12345678 ``` -#### Parameters +## Parameters -#### Returns +## Returns `number` @@ -53,6 +53,6 @@ console.log(buf.readUInt32BE(0).toString(16)); } ]} /> -#### Since +## Since v0.5.5 diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.readUInt32LE.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.readUInt32LE.mdx index 0cee415ac5..e7774db986 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.readUInt32LE.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.readUInt32LE.mdx @@ -25,7 +25,7 @@ console.log(buf.readUInt32LE(1).toString(16)); // Throws ERR_OUT_OF_RANGE. ``` -#### Parameters +## Parameters -#### Returns +## Returns `number` @@ -55,6 +55,6 @@ console.log(buf.readUInt32LE(1).toString(16)); } ]} /> -#### Since +## Since v0.5.5 diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.readUInt8.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.readUInt8.mdx index 842fb978fe..2337c903f7 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.readUInt8.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.readUInt8.mdx @@ -27,7 +27,7 @@ console.log(buf.readUInt8(2)); // Throws ERR_OUT_OF_RANGE. ``` -#### Parameters +## Parameters -#### Returns +## Returns `number` @@ -57,6 +57,6 @@ console.log(buf.readUInt8(2)); } ]} /> -#### Since +## Since v0.5.0 diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.readUIntBE.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.readUIntBE.mdx index a3365df89e..f2f45b98b6 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.readUIntBE.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.readUIntBE.mdx @@ -26,7 +26,7 @@ console.log(buf.readUIntBE(1, 6).toString(16)); // Throws ERR_OUT_OF_RANGE. ``` -#### Parameters +## Parameters -#### Returns +## Returns `number` @@ -65,6 +65,6 @@ console.log(buf.readUIntBE(1, 6).toString(16)); } ]} /> -#### Since +## Since v0.11.15 diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.readUIntLE.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.readUIntLE.mdx index 82b3289d50..49c6dfc1c0 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.readUIntLE.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.readUIntLE.mdx @@ -24,7 +24,7 @@ console.log(buf.readUIntLE(0, 6).toString(16)); // Prints: ab9078563412 ``` -#### Parameters +## Parameters -#### Returns +## Returns `number` @@ -63,6 +63,6 @@ console.log(buf.readUIntLE(0, 6).toString(16)); } ]} /> -#### Since +## Since v0.11.15 diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.readUint16BE-1.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.readUint16BE-1.mdx index 9549999547..83411629a3 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.readUint16BE-1.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.readUint16BE-1.mdx @@ -10,7 +10,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes" `**readUint16BE**(offset?): number` -#### Parameters +## Parameters -#### Returns +## Returns `number` @@ -40,10 +40,10 @@ import ParameterTypes from "@site/src/components/ParameterTypes" } ]} /> -#### Alias +## Alias Buffer.readUInt16BE -#### Since +## Since v14.9.0, v12.19.0 diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.readUint16LE-1.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.readUint16LE-1.mdx index 358952bde6..7aebd23545 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.readUint16LE-1.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.readUint16LE-1.mdx @@ -10,7 +10,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes" `**readUint16LE**(offset?): number` -#### Parameters +## Parameters -#### Returns +## Returns `number` @@ -40,10 +40,10 @@ import ParameterTypes from "@site/src/components/ParameterTypes" } ]} /> -#### Alias +## Alias Buffer.readUInt16LE -#### Since +## Since v14.9.0, v12.19.0 diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.readUint32BE-1.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.readUint32BE-1.mdx index 874db6db16..055598b70a 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.readUint32BE-1.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.readUint32BE-1.mdx @@ -10,7 +10,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes" `**readUint32BE**(offset?): number` -#### Parameters +## Parameters -#### Returns +## Returns `number` @@ -40,10 +40,10 @@ import ParameterTypes from "@site/src/components/ParameterTypes" } ]} /> -#### Alias +## Alias Buffer.readUInt32BE -#### Since +## Since v14.9.0, v12.19.0 diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.readUint32LE-1.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.readUint32LE-1.mdx index e51e2b2d8b..f3354dfa00 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.readUint32LE-1.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.readUint32LE-1.mdx @@ -10,7 +10,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes" `**readUint32LE**(offset?): number` -#### Parameters +## Parameters -#### Returns +## Returns `number` @@ -40,10 +40,10 @@ import ParameterTypes from "@site/src/components/ParameterTypes" } ]} /> -#### Alias +## Alias Buffer.readUInt32LE -#### Since +## Since v14.9.0, v12.19.0 diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.readUint8-1.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.readUint8-1.mdx index 9324fc3c2a..15fda29fef 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.readUint8-1.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.readUint8-1.mdx @@ -10,7 +10,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes" `**readUint8**(offset?): number` -#### Parameters +## Parameters -#### Returns +## Returns `number` @@ -40,10 +40,10 @@ import ParameterTypes from "@site/src/components/ParameterTypes" } ]} /> -#### Alias +## Alias Buffer.readUInt8 -#### Since +## Since v14.9.0, v12.19.0 diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.readUintBE-1.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.readUintBE-1.mdx index e926381ed5..df5ff39f2e 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.readUintBE-1.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.readUintBE-1.mdx @@ -10,7 +10,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes" `**readUintBE**(offset, byteLength): number` -#### Parameters +## Parameters -#### Returns +## Returns `number` @@ -49,10 +49,10 @@ import ParameterTypes from "@site/src/components/ParameterTypes" } ]} /> -#### Alias +## Alias Buffer.readUIntBE -#### Since +## Since v14.9.0, v12.19.0 diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.readUintLE-1.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.readUintLE-1.mdx index 8d61f4d108..1f5e066e31 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.readUintLE-1.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.readUintLE-1.mdx @@ -10,7 +10,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes" `**readUintLE**(offset, byteLength): number` -#### Parameters +## Parameters -#### Returns +## Returns `number` @@ -49,10 +49,10 @@ import ParameterTypes from "@site/src/components/ParameterTypes" } ]} /> -#### Alias +## Alias Buffer.readUIntLE -#### Since +## Since v14.9.0, v12.19.0 diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.reduce.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.reduce.mdx index b715250899..a576072a29 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.reduce.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.reduce.mdx @@ -14,7 +14,7 @@ Calls the specified callback function for all the elements in an array. The retu the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. -#### Parameters +## Parameters -#### Returns +## Returns `number` @@ -44,13 +44,13 @@ call to the callback function. } ]} /> -#### Inherited from +### Inherited from Uint8Array.reduce `**reduce**(callbackfn, initialValue): number` -#### Parameters +## Parameters -#### Returns +## Returns `number` @@ -89,7 +89,7 @@ Uint8Array.reduce } ]} /> -#### Inherited from +### Inherited from Uint8Array.reduce @@ -99,7 +99,7 @@ Calls the specified callback function for all the elements in an array. The retu the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. -#### Type Parameters +## Type Parameters -#### Parameters +## Parameters -#### Returns +## Returns `U` @@ -152,6 +152,6 @@ call to the callback function. } ]} /> -#### Inherited from +### Inherited from Uint8Array.reduce diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.reduceRight.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.reduceRight.mdx index 8dae04b920..ed7a5bd275 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.reduceRight.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.reduceRight.mdx @@ -14,7 +14,7 @@ Calls the specified callback function for all the elements in an array, in desce The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. -#### Parameters +## Parameters -#### Returns +## Returns `number` @@ -44,13 +44,13 @@ argument in the next call to the callback function. } ]} /> -#### Inherited from +### Inherited from Uint8Array.reduceRight `**reduceRight**(callbackfn, initialValue): number` -#### Parameters +## Parameters -#### Returns +## Returns `number` @@ -89,7 +89,7 @@ Uint8Array.reduceRight } ]} /> -#### Inherited from +### Inherited from Uint8Array.reduceRight @@ -99,7 +99,7 @@ Calls the specified callback function for all the elements in an array, in desce The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. -#### Type Parameters +## Type Parameters -#### Parameters +## Parameters -#### Returns +## Returns `U` @@ -152,6 +152,6 @@ argument in the next call to the callback function. } ]} /> -#### Inherited from +### Inherited from Uint8Array.reduceRight diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.reverse.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.reverse.mdx index 8d972b8937..8de9fa8416 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.reverse.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.reverse.mdx @@ -10,7 +10,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes" `**reverse**(): [Buffer](../../variables/Buffer-1.mdx)` -#### Returns +## Returns [Buffer](../../variables/Buffer-1.mdx) @@ -26,6 +26,6 @@ import ParameterTypes from "@site/src/components/ParameterTypes" } ]} /> -#### Overrides +### Overrides Uint8Array.reverse diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.set.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.set.mdx index 88dd1aaa46..7f44d90f38 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.set.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.set.mdx @@ -12,7 +12,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes" Sets a value or an array of values. -#### Parameters +## Parameters -#### Returns +## Returns `void` @@ -61,6 +61,6 @@ Sets a value or an array of values. } ]} /> -#### Inherited from +### Inherited from Uint8Array.set diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.slice.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.slice.mdx index 8a6f88f635..7cbd8482e2 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.slice.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.slice.mdx @@ -38,7 +38,7 @@ console.log(buf.toString()); // Also prints: cuffer (!) ``` -#### Parameters +## Parameters -#### Returns +## Returns [Buffer](../../variables/Buffer-1.mdx) @@ -77,14 +77,14 @@ console.log(buf.toString()); } ]} /> -#### Since +## Since v0.3.0 -#### Deprecated +## Deprecated Use `subarray` instead. -#### Overrides +### Overrides Uint8Array.slice diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.some.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.some.mdx index d707df5074..6f692d726a 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.some.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.some.mdx @@ -12,7 +12,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes" Determines whether the specified callback function returns true for any element of an array. -#### Parameters +## Parameters -#### Returns +## Returns `boolean` @@ -51,6 +51,6 @@ Determines whether the specified callback function returns true for any element } ]} /> -#### Inherited from +### Inherited from Uint8Array.some diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.sort.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.sort.mdx index cc99f0c53b..e9492df67f 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.sort.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.sort.mdx @@ -12,7 +12,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes" Sorts an array. -#### Parameters +## Parameters -#### Returns +## Returns [Buffer](../../variables/Buffer-1.mdx) @@ -42,6 +42,6 @@ Sorts an array. } ]} /> -#### Inherited from +### Inherited from Uint8Array.sort diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.subarray.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.subarray.mdx index 0789a35e3e..6de70962d9 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.subarray.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.subarray.mdx @@ -65,7 +65,7 @@ console.log(buf.subarray(-5, -2).toString()); // (Equivalent to buf.subarray(1, 4).) ``` -#### Parameters +## Parameters -#### Returns +## Returns [Buffer](../../variables/Buffer-1.mdx) @@ -104,10 +104,10 @@ console.log(buf.subarray(-5, -2).toString()); } ]} /> -#### Since +## Since v3.0.0 -#### Overrides +### Overrides Uint8Array.subarray diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.swap16.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.swap16.mdx index a017deafed..973259cee6 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.swap16.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.swap16.mdx @@ -42,7 +42,7 @@ const buf = Buffer.from('This is little-endian UTF-16', 'utf16le'); buf.swap16(); // Convert to big-endian UTF-16 text. ``` -#### Returns +## Returns [Buffer](../../variables/Buffer-1.mdx) @@ -58,6 +58,6 @@ buf.swap16(); // Convert to big-endian UTF-16 text. } ]} /> -#### Since +## Since v5.10.0 diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.swap32.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.swap32.mdx index 3e1708aeac..1a62f331c9 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.swap32.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.swap32.mdx @@ -32,7 +32,7 @@ buf2.swap32(); // Throws ERR_INVALID_BUFFER_SIZE. ``` -#### Returns +## Returns [Buffer](../../variables/Buffer-1.mdx) @@ -48,6 +48,6 @@ buf2.swap32(); } ]} /> -#### Since +## Since v5.10.0 diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.swap64.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.swap64.mdx index d50a1683dc..7157daa218 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.swap64.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.swap64.mdx @@ -32,7 +32,7 @@ buf2.swap64(); // Throws ERR_INVALID_BUFFER_SIZE. ``` -#### Returns +## Returns [Buffer](../../variables/Buffer-1.mdx) @@ -48,6 +48,6 @@ buf2.swap64(); } ]} /> -#### Since +## Since v6.3.0 diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.toJSON.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.toJSON.mdx index 3c35bfb173..d0b72b8c70 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.toJSON.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.toJSON.mdx @@ -35,7 +35,7 @@ console.log(copy); // Prints: ``` -#### Returns +## Returns `object` @@ -72,6 +72,6 @@ console.log(copy); } ]} /> -#### Since +## Since v0.9.2 diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.toLocaleString.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.toLocaleString.mdx index 1a0e134fbc..351f57eb66 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.toLocaleString.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.toLocaleString.mdx @@ -12,7 +12,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes" Converts a number to a string by using the current locale. -#### Returns +## Returns `string` @@ -28,6 +28,6 @@ Converts a number to a string by using the current locale. } ]} /> -#### Inherited from +### Inherited from Uint8Array.toLocaleString diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.toString.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.toString.mdx index 917f9748df..74d0c0d453 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.toString.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.toString.mdx @@ -43,7 +43,7 @@ console.log(buf2.toString(undefined, 0, 3)); // Prints: té ``` -#### Parameters +## Parameters -#### Returns +## Returns `string` @@ -91,10 +91,10 @@ console.log(buf2.toString(undefined, 0, 3)); } ]} /> -#### Since +## Since v0.1.90 -#### Overrides +### Overrides Uint8Array.toString diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.valueOf.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.valueOf.mdx index fff15a8dc2..96c5481f2e 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.valueOf.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.valueOf.mdx @@ -12,7 +12,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes" Returns the primitive value of the specified object. -#### Returns +## Returns Uint8Array @@ -28,6 +28,6 @@ Uint8Array } ]} /> -#### Inherited from +### Inherited from Uint8Array.valueOf diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.values.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.values.mdx index eb301325ec..f628bf907e 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.values.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.values.mdx @@ -41,7 +41,7 @@ for (const value of buf) { // 114 ``` -#### Returns +## Returns [IterableIterator](../../interfaces/IterableIterator.mdx)<number> @@ -67,10 +67,10 @@ for (const value of buf) { } ]} /> -#### Since +## Since v1.1.0 -#### Overrides +### Overrides Uint8Array.values diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.write.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.write.mdx index 0d2b5832bb..118f9907af 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.write.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.write.mdx @@ -32,7 +32,7 @@ console.log(`${length} bytes: ${buffer.toString('utf8', 8, 10)}`); // Prints: 2 bytes : ab ``` -#### Parameters +## Parameters -#### Returns +## Returns `number` @@ -71,13 +71,13 @@ console.log(`${length} bytes: ${buffer.toString('utf8', 8, 10)}`); } ]} /> -#### Since +## Since v0.1.90 `**write**(string, offset, encoding?): number` -#### Parameters +## Parameters -#### Returns +## Returns `number` @@ -127,7 +127,7 @@ v0.1.90 `**write**(string, offset, length, encoding?): number` -#### Parameters +## Parameters -#### Returns +## Returns `number` diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeBigInt64BE.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeBigInt64BE.mdx index 1442136bb3..c9792ba2c8 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeBigInt64BE.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeBigInt64BE.mdx @@ -25,7 +25,7 @@ console.log(buf); // Prints: ``` -#### Parameters +## Parameters -#### Returns +## Returns `number` @@ -64,6 +64,6 @@ console.log(buf); } ]} /> -#### Since +## Since v12.0.0, v10.20.0 diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeBigInt64LE.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeBigInt64LE.mdx index fa6e9bc292..3c780a5b53 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeBigInt64LE.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeBigInt64LE.mdx @@ -25,7 +25,7 @@ console.log(buf); // Prints: ``` -#### Parameters +## Parameters -#### Returns +## Returns `number` @@ -64,6 +64,6 @@ console.log(buf); } ]} /> -#### Since +## Since v12.0.0, v10.20.0 diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeBigUInt64BE.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeBigUInt64BE.mdx index acd64f2549..0117d482b4 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeBigUInt64BE.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeBigUInt64BE.mdx @@ -25,7 +25,7 @@ console.log(buf); // Prints: ``` -#### Parameters +## Parameters -#### Returns +## Returns `number` @@ -64,6 +64,6 @@ console.log(buf); } ]} /> -#### Since +## Since v12.0.0, v10.20.0 diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeBigUInt64LE.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeBigUInt64LE.mdx index 589ea2cbd7..345cdaed93 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeBigUInt64LE.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeBigUInt64LE.mdx @@ -25,7 +25,7 @@ console.log(buf); This function is also available under the `writeBigUint64LE` alias. -#### Parameters +## Parameters -#### Returns +## Returns `number` @@ -64,6 +64,6 @@ This function is also available under the `writeBigUint64LE` alias. } ]} /> -#### Since +## Since v12.0.0, v10.20.0 diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeBigUint64BE-1.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeBigUint64BE-1.mdx index 42d82a1760..0539e62c13 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeBigUint64BE-1.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeBigUint64BE-1.mdx @@ -10,7 +10,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes" `**writeBigUint64BE**(value, offset?): number` -#### Parameters +## Parameters -#### Returns +## Returns `number` @@ -49,10 +49,10 @@ import ParameterTypes from "@site/src/components/ParameterTypes" } ]} /> -#### Alias +## Alias Buffer.writeBigUInt64BE -#### Since +## Since v14.10.0, v12.19.0 diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeBigUint64LE-1.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeBigUint64LE-1.mdx index 338fb6cb0c..e0d81a625b 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeBigUint64LE-1.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeBigUint64LE-1.mdx @@ -10,7 +10,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes" `**writeBigUint64LE**(value, offset?): number` -#### Parameters +## Parameters -#### Returns +## Returns `number` @@ -49,10 +49,10 @@ import ParameterTypes from "@site/src/components/ParameterTypes" } ]} /> -#### Alias +## Alias Buffer.writeBigUInt64LE -#### Since +## Since v14.10.0, v12.19.0 diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeDoubleBE.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeDoubleBE.mdx index 85042a0f39..49ec64339a 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeDoubleBE.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeDoubleBE.mdx @@ -24,7 +24,7 @@ console.log(buf); // Prints: ``` -#### Parameters +## Parameters -#### Returns +## Returns `number` @@ -63,6 +63,6 @@ console.log(buf); } ]} /> -#### Since +## Since v0.11.15 diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeDoubleLE.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeDoubleLE.mdx index cb4c7fa43f..f380b38204 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeDoubleLE.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeDoubleLE.mdx @@ -24,7 +24,7 @@ console.log(buf); // Prints: ``` -#### Parameters +## Parameters -#### Returns +## Returns `number` @@ -63,6 +63,6 @@ console.log(buf); } ]} /> -#### Since +## Since v0.11.15 diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeFloatBE.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeFloatBE.mdx index 96d7bc67fb..316af666b3 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeFloatBE.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeFloatBE.mdx @@ -24,7 +24,7 @@ console.log(buf); // Prints: ``` -#### Parameters +## Parameters -#### Returns +## Returns `number` @@ -63,6 +63,6 @@ console.log(buf); } ]} /> -#### Since +## Since v0.11.15 diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeFloatLE.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeFloatLE.mdx index c2b2fa53b1..c5efbf397f 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeFloatLE.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeFloatLE.mdx @@ -24,7 +24,7 @@ console.log(buf); // Prints: ``` -#### Parameters +## Parameters -#### Returns +## Returns `number` @@ -63,6 +63,6 @@ console.log(buf); } ]} /> -#### Since +## Since v0.11.15 diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeInt16BE.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeInt16BE.mdx index 9eabf80dc5..a56f33231c 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeInt16BE.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeInt16BE.mdx @@ -26,7 +26,7 @@ console.log(buf); // Prints: ``` -#### Parameters +## Parameters -#### Returns +## Returns `number` @@ -65,6 +65,6 @@ console.log(buf); } ]} /> -#### Since +## Since v0.5.5 diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeInt16LE.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeInt16LE.mdx index 3a749b25d5..0e0984ba78 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeInt16LE.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeInt16LE.mdx @@ -26,7 +26,7 @@ console.log(buf); // Prints: ``` -#### Parameters +## Parameters -#### Returns +## Returns `number` @@ -65,6 +65,6 @@ console.log(buf); } ]} /> -#### Since +## Since v0.5.5 diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeInt32BE.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeInt32BE.mdx index 3792285fe6..b660f26339 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeInt32BE.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeInt32BE.mdx @@ -26,7 +26,7 @@ console.log(buf); // Prints: ``` -#### Parameters +## Parameters -#### Returns +## Returns `number` @@ -65,6 +65,6 @@ console.log(buf); } ]} /> -#### Since +## Since v0.5.5 diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeInt32LE.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeInt32LE.mdx index 463eb2e71e..fa91c2a895 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeInt32LE.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeInt32LE.mdx @@ -26,7 +26,7 @@ console.log(buf); // Prints: ``` -#### Parameters +## Parameters -#### Returns +## Returns `number` @@ -65,6 +65,6 @@ console.log(buf); } ]} /> -#### Since +## Since v0.5.5 diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeInt8.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeInt8.mdx index 4fa979ad46..b106aa5f03 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeInt8.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeInt8.mdx @@ -28,7 +28,7 @@ console.log(buf); // Prints: ``` -#### Parameters +## Parameters -#### Returns +## Returns `number` @@ -67,6 +67,6 @@ console.log(buf); } ]} /> -#### Since +## Since v0.5.0 diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeIntBE.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeIntBE.mdx index 71a52559d2..e7baadd92e 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeIntBE.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeIntBE.mdx @@ -24,7 +24,7 @@ console.log(buf); // Prints: ``` -#### Parameters +## Parameters -#### Returns +## Returns `number` @@ -72,6 +72,6 @@ console.log(buf); } ]} /> -#### Since +## Since v0.11.15 diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeIntLE.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeIntLE.mdx index cbcfaa5173..50bb30b531 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeIntLE.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeIntLE.mdx @@ -24,7 +24,7 @@ console.log(buf); // Prints: ``` -#### Parameters +## Parameters -#### Returns +## Returns `number` @@ -72,6 +72,6 @@ console.log(buf); } ]} /> -#### Since +## Since v0.11.15 diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeUInt16BE.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeUInt16BE.mdx index 0d31692e51..4f085af87e 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeUInt16BE.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeUInt16BE.mdx @@ -27,7 +27,7 @@ console.log(buf); // Prints: ``` -#### Parameters +## Parameters -#### Returns +## Returns `number` @@ -66,6 +66,6 @@ console.log(buf); } ]} /> -#### Since +## Since v0.5.5 diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeUInt16LE.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeUInt16LE.mdx index 604f26d7a9..b412fa5815 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeUInt16LE.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeUInt16LE.mdx @@ -27,7 +27,7 @@ console.log(buf); // Prints: ``` -#### Parameters +## Parameters -#### Returns +## Returns `number` @@ -66,6 +66,6 @@ console.log(buf); } ]} /> -#### Since +## Since v0.5.5 diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeUInt32BE.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeUInt32BE.mdx index 4b402dd6a5..9ea31b6ded 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeUInt32BE.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeUInt32BE.mdx @@ -26,7 +26,7 @@ console.log(buf); // Prints: ``` -#### Parameters +## Parameters -#### Returns +## Returns `number` @@ -65,6 +65,6 @@ console.log(buf); } ]} /> -#### Since +## Since v0.5.5 diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeUInt32LE.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeUInt32LE.mdx index 3bdd0c1506..6dee6dfb48 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeUInt32LE.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeUInt32LE.mdx @@ -26,7 +26,7 @@ console.log(buf); // Prints: ``` -#### Parameters +## Parameters -#### Returns +## Returns `number` @@ -65,6 +65,6 @@ console.log(buf); } ]} /> -#### Since +## Since v0.5.5 diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeUInt8.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeUInt8.mdx index c7da95fceb..342cb44a89 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeUInt8.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeUInt8.mdx @@ -30,7 +30,7 @@ console.log(buf); // Prints: ``` -#### Parameters +## Parameters -#### Returns +## Returns `number` @@ -69,6 +69,6 @@ console.log(buf); } ]} /> -#### Since +## Since v0.5.0 diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeUIntBE.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeUIntBE.mdx index 13ecf2ca0e..c07b0f0b7a 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeUIntBE.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeUIntBE.mdx @@ -26,7 +26,7 @@ console.log(buf); // Prints: ``` -#### Parameters +## Parameters -#### Returns +## Returns `number` @@ -74,6 +74,6 @@ console.log(buf); } ]} /> -#### Since +## Since v0.5.5 diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeUIntLE.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeUIntLE.mdx index 38a403c726..b017d996ad 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeUIntLE.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeUIntLE.mdx @@ -26,7 +26,7 @@ console.log(buf); // Prints: ``` -#### Parameters +## Parameters -#### Returns +## Returns `number` @@ -74,6 +74,6 @@ console.log(buf); } ]} /> -#### Since +## Since v0.5.5 diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeUint16BE-1.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeUint16BE-1.mdx index 8e9740132e..89375abca0 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeUint16BE-1.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeUint16BE-1.mdx @@ -10,7 +10,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes" `**writeUint16BE**(value, offset?): number` -#### Parameters +## Parameters -#### Returns +## Returns `number` @@ -49,10 +49,10 @@ import ParameterTypes from "@site/src/components/ParameterTypes" } ]} /> -#### Alias +## Alias Buffer.writeUInt16BE -#### Since +## Since v14.9.0, v12.19.0 diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeUint16LE-1.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeUint16LE-1.mdx index b6dbd0f53e..487bc23939 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeUint16LE-1.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeUint16LE-1.mdx @@ -10,7 +10,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes" `**writeUint16LE**(value, offset?): number` -#### Parameters +## Parameters -#### Returns +## Returns `number` @@ -49,10 +49,10 @@ import ParameterTypes from "@site/src/components/ParameterTypes" } ]} /> -#### Alias +## Alias Buffer.writeUInt16LE -#### Since +## Since v14.9.0, v12.19.0 diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeUint32BE-1.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeUint32BE-1.mdx index e21b8e9bce..07b6abe348 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeUint32BE-1.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeUint32BE-1.mdx @@ -10,7 +10,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes" `**writeUint32BE**(value, offset?): number` -#### Parameters +## Parameters -#### Returns +## Returns `number` @@ -49,10 +49,10 @@ import ParameterTypes from "@site/src/components/ParameterTypes" } ]} /> -#### Alias +## Alias Buffer.writeUInt32BE -#### Since +## Since v14.9.0, v12.19.0 diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeUint32LE-1.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeUint32LE-1.mdx index b815552177..06db201678 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeUint32LE-1.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeUint32LE-1.mdx @@ -10,7 +10,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes" `**writeUint32LE**(value, offset?): number` -#### Parameters +## Parameters -#### Returns +## Returns `number` @@ -49,10 +49,10 @@ import ParameterTypes from "@site/src/components/ParameterTypes" } ]} /> -#### Alias +## Alias Buffer.writeUInt32LE -#### Since +## Since v14.9.0, v12.19.0 diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeUint8-1.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeUint8-1.mdx index 0662fbe6fc..8e4dae62eb 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeUint8-1.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeUint8-1.mdx @@ -10,7 +10,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes" `**writeUint8**(value, offset?): number` -#### Parameters +## Parameters -#### Returns +## Returns `number` @@ -49,10 +49,10 @@ import ParameterTypes from "@site/src/components/ParameterTypes" } ]} /> -#### Alias +## Alias Buffer.writeUInt8 -#### Since +## Since v14.9.0, v12.19.0 diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeUintBE-1.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeUintBE-1.mdx index be53b045b7..0ab9b4bf7c 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeUintBE-1.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeUintBE-1.mdx @@ -10,7 +10,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes" `**writeUintBE**(value, offset, byteLength): number` -#### Parameters +## Parameters -#### Returns +## Returns `number` @@ -58,10 +58,10 @@ import ParameterTypes from "@site/src/components/ParameterTypes" } ]} /> -#### Alias +## Alias Buffer.writeUIntBE -#### Since +## Since v14.9.0, v12.19.0 diff --git a/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeUintLE-1.mdx b/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeUintLE-1.mdx index 0f00aaca6c..9481473f34 100644 --- a/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeUintLE-1.mdx +++ b/www/apps/docs/content/references/product/Buffer/methods/Buffer.writeUintLE-1.mdx @@ -10,7 +10,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes" `**writeUintLE**(value, offset, byteLength): number` -#### Parameters +## Parameters -#### Returns +## Returns `number` @@ -58,10 +58,10 @@ import ParameterTypes from "@site/src/components/ParameterTypes" } ]} /> -#### Alias +## Alias Buffer.writeUIntLE -#### Since +## Since v14.9.0, v12.19.0 diff --git a/www/apps/docs/content/references/product/BufferConstructor/methods/BufferConstructor.alloc.mdx b/www/apps/docs/content/references/product/BufferConstructor/methods/BufferConstructor.alloc.mdx index 8cdc86b846..4f0c28d5ef 100644 --- a/www/apps/docs/content/references/product/BufferConstructor/methods/BufferConstructor.alloc.mdx +++ b/www/apps/docs/content/references/product/BufferConstructor/methods/BufferConstructor.alloc.mdx @@ -52,7 +52,7 @@ data that might not have been allocated for `Buffer`s. A `TypeError` will be thrown if `size` is not a number. -#### Parameters +## Parameters -#### Returns +## Returns [Buffer](../../variables/Buffer-1.mdx) @@ -100,6 +100,6 @@ A `TypeError` will be thrown if `size` is not a number. } ]} /> -#### Since +## Since v5.10.0 diff --git a/www/apps/docs/content/references/product/BufferConstructor/methods/BufferConstructor.allocUnsafe.mdx b/www/apps/docs/content/references/product/BufferConstructor/methods/BufferConstructor.allocUnsafe.mdx index e6113c4617..3d0662bbed 100644 --- a/www/apps/docs/content/references/product/BufferConstructor/methods/BufferConstructor.allocUnsafe.mdx +++ b/www/apps/docs/content/references/product/BufferConstructor/methods/BufferConstructor.allocUnsafe.mdx @@ -42,7 +42,7 @@ than or equal to half `Buffer.poolSize`. The difference is subtle but can be important when an application requires the additional performance that `Buffer.allocUnsafe()` provides. -#### Parameters +## Parameters -#### Returns +## Returns [Buffer](../../variables/Buffer-1.mdx) @@ -72,6 +72,6 @@ additional performance that `Buffer.allocUnsafe()` provides. } ]} /> -#### Since +## Since v5.10.0 diff --git a/www/apps/docs/content/references/product/BufferConstructor/methods/BufferConstructor.allocUnsafeSlow.mdx b/www/apps/docs/content/references/product/BufferConstructor/methods/BufferConstructor.allocUnsafeSlow.mdx index 148bd81cab..79ee07e34e 100644 --- a/www/apps/docs/content/references/product/BufferConstructor/methods/BufferConstructor.allocUnsafeSlow.mdx +++ b/www/apps/docs/content/references/product/BufferConstructor/methods/BufferConstructor.allocUnsafeSlow.mdx @@ -51,7 +51,7 @@ socket.on('readable', () => { A `TypeError` will be thrown if `size` is not a number. -#### Parameters +## Parameters -#### Returns +## Returns [Buffer](../../variables/Buffer-1.mdx) @@ -81,6 +81,6 @@ A `TypeError` will be thrown if `size` is not a number. } ]} /> -#### Since +## Since v5.12.0 diff --git a/www/apps/docs/content/references/product/BufferConstructor/methods/BufferConstructor.byteLength.mdx b/www/apps/docs/content/references/product/BufferConstructor/methods/BufferConstructor.byteLength.mdx index a0bb2093bc..5de0de7fb0 100644 --- a/www/apps/docs/content/references/product/BufferConstructor/methods/BufferConstructor.byteLength.mdx +++ b/www/apps/docs/content/references/product/BufferConstructor/methods/BufferConstructor.byteLength.mdx @@ -34,7 +34,7 @@ When `string` is a Reference/Global\_Objects/TypedArray)/[`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global\_Objects/ArrayBuffer)/[`SharedArrayBuffer`](https://develop- er.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global\_Objects/SharedArrayBuffer), the byte length as reported by `.byteLength`is returned. -#### Parameters +## Parameters -#### Returns +## Returns `number` @@ -73,6 +73,6 @@ er.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global\_Objects/SharedArrayBu } ]} /> -#### Since +## Since v0.1.90 diff --git a/www/apps/docs/content/references/product/BufferConstructor/methods/BufferConstructor.compare.mdx b/www/apps/docs/content/references/product/BufferConstructor/methods/BufferConstructor.compare.mdx index 4b751401b0..098c9ad5f9 100644 --- a/www/apps/docs/content/references/product/BufferConstructor/methods/BufferConstructor.compare.mdx +++ b/www/apps/docs/content/references/product/BufferConstructor/methods/BufferConstructor.compare.mdx @@ -24,7 +24,7 @@ console.log(arr.sort(Buffer.compare)); // (This result is equal to: [buf2, buf1].) ``` -#### Parameters +## Parameters -#### Returns +## Returns `0` \| `1` \| `-1` @@ -63,6 +63,6 @@ console.log(arr.sort(Buffer.compare)); } ]} /> -#### Since +## Since v0.11.13 diff --git a/www/apps/docs/content/references/product/BufferConstructor/methods/BufferConstructor.concat.mdx b/www/apps/docs/content/references/product/BufferConstructor/methods/BufferConstructor.concat.mdx index bd35129c84..a407412588 100644 --- a/www/apps/docs/content/references/product/BufferConstructor/methods/BufferConstructor.concat.mdx +++ b/www/apps/docs/content/references/product/BufferConstructor/methods/BufferConstructor.concat.mdx @@ -44,7 +44,7 @@ console.log(bufA.length); `Buffer.concat()` may also use the internal `Buffer` pool like `Buffer.allocUnsafe()` does. -#### Parameters +## Parameters -#### Returns +## Returns [Buffer](../../variables/Buffer-1.mdx) @@ -83,6 +83,6 @@ console.log(bufA.length); } ]} /> -#### Since +## Since v0.7.11 diff --git a/www/apps/docs/content/references/product/BufferConstructor/methods/BufferConstructor.copyBytesFrom.mdx b/www/apps/docs/content/references/product/BufferConstructor/methods/BufferConstructor.copyBytesFrom.mdx index e8a7a60df5..5fdb60ae48 100644 --- a/www/apps/docs/content/references/product/BufferConstructor/methods/BufferConstructor.copyBytesFrom.mdx +++ b/www/apps/docs/content/references/product/BufferConstructor/methods/BufferConstructor.copyBytesFrom.mdx @@ -21,7 +21,7 @@ console.log(buf[0]); // 255 console.log(buf[1]); // 255 ``` -#### Parameters +## Parameters -#### Returns +## Returns [Buffer](../../variables/Buffer-1.mdx) @@ -69,6 +69,6 @@ console.log(buf[1]); // 255 } ]} /> -#### Since +## Since v19.8.0 diff --git a/www/apps/docs/content/references/product/BufferConstructor/methods/BufferConstructor.from.mdx b/www/apps/docs/content/references/product/BufferConstructor/methods/BufferConstructor.from.mdx index b6f8c08b92..ea2884221d 100644 --- a/www/apps/docs/content/references/product/BufferConstructor/methods/BufferConstructor.from.mdx +++ b/www/apps/docs/content/references/product/BufferConstructor/methods/BufferConstructor.from.mdx @@ -29,7 +29,7 @@ appropriate for `Buffer.from()` variants. `Buffer.from(array)` and `Buffer.from(string)` may also use the internal`Buffer` pool like `Buffer.allocUnsafe()` does. -#### Parameters +## Parameters -#### Returns +## Returns [Buffer](../../variables/Buffer-1.mdx) @@ -77,7 +77,7 @@ appropriate for `Buffer.from()` variants. } ]} /> -#### Since +## Since v5.10.0 @@ -85,7 +85,7 @@ v5.10.0 Creates a new Buffer using the passed {data} -#### Parameters +## Parameters -#### Returns +## Returns [Buffer](../../variables/Buffer-1.mdx) @@ -117,7 +117,7 @@ Creates a new Buffer using the passed {data} `**from**(data): [Buffer](../../variables/Buffer-1.mdx)` -#### Parameters +## Parameters -#### Returns +## Returns [Buffer](../../variables/Buffer-1.mdx) @@ -153,7 +153,7 @@ Creates a new Buffer containing the given JavaScript string {str}. If provided, the {encoding} parameter identifies the character encoding. If not provided, {encoding} defaults to 'utf8'. -#### Parameters +## Parameters -#### Returns +## Returns [Buffer](../../variables/Buffer-1.mdx) diff --git a/www/apps/docs/content/references/product/BufferConstructor/methods/BufferConstructor.isBuffer.mdx b/www/apps/docs/content/references/product/BufferConstructor/methods/BufferConstructor.isBuffer.mdx index ff01fdcbc7..441f40f3d1 100644 --- a/www/apps/docs/content/references/product/BufferConstructor/methods/BufferConstructor.isBuffer.mdx +++ b/www/apps/docs/content/references/product/BufferConstructor/methods/BufferConstructor.isBuffer.mdx @@ -22,7 +22,7 @@ Buffer.isBuffer([]); // false Buffer.isBuffer(new Uint8Array(1024)); // false ``` -#### Parameters +## Parameters -#### Returns +## Returns obj is Buffer @@ -52,6 +52,6 @@ obj is Buffer } ]} /> -#### Since +## Since v0.1.101 diff --git a/www/apps/docs/content/references/product/BufferConstructor/methods/BufferConstructor.isEncoding.mdx b/www/apps/docs/content/references/product/BufferConstructor/methods/BufferConstructor.isEncoding.mdx index 99ea0094bb..95f155d2d6 100644 --- a/www/apps/docs/content/references/product/BufferConstructor/methods/BufferConstructor.isEncoding.mdx +++ b/www/apps/docs/content/references/product/BufferConstructor/methods/BufferConstructor.isEncoding.mdx @@ -29,7 +29,7 @@ console.log(Buffer.isEncoding('')); // Prints: false ``` -#### Parameters +## Parameters -#### Returns +## Returns encoding is BufferEncoding @@ -59,6 +59,6 @@ encoding is BufferEncoding } ]} /> -#### Since +## Since v0.9.1 diff --git a/www/apps/docs/content/references/product/BufferConstructor/methods/BufferConstructor.of.mdx b/www/apps/docs/content/references/product/BufferConstructor/methods/BufferConstructor.of.mdx index 5fa8f38a26..a9e9379561 100644 --- a/www/apps/docs/content/references/product/BufferConstructor/methods/BufferConstructor.of.mdx +++ b/www/apps/docs/content/references/product/BufferConstructor/methods/BufferConstructor.of.mdx @@ -12,7 +12,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes" Creates a new Buffer using the passed {data} -#### Parameters +## Parameters -#### Returns +## Returns [Buffer](../../variables/Buffer-1.mdx) diff --git a/www/apps/docs/content/references/product/IterableIterator/methods/IterableIterator._iterator_.mdx b/www/apps/docs/content/references/product/IterableIterator/methods/IterableIterator._iterator_.mdx index e94161d08a..c5c6806940 100644 --- a/www/apps/docs/content/references/product/IterableIterator/methods/IterableIterator._iterator_.mdx +++ b/www/apps/docs/content/references/product/IterableIterator/methods/IterableIterator._iterator_.mdx @@ -10,7 +10,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes" `**[iterator]**(): [IterableIterator](../../interfaces/IterableIterator.mdx)<T>` -#### Returns +## Returns [IterableIterator](../../interfaces/IterableIterator.mdx)<T> diff --git a/www/apps/docs/content/references/product/IterableIterator/methods/IterableIterator.next.mdx b/www/apps/docs/content/references/product/IterableIterator/methods/IterableIterator.next.mdx index fd0353056f..b253d05f85 100644 --- a/www/apps/docs/content/references/product/IterableIterator/methods/IterableIterator.next.mdx +++ b/www/apps/docs/content/references/product/IterableIterator/methods/IterableIterator.next.mdx @@ -10,7 +10,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes" `**next**(...args): [IteratorResult](../../types/IteratorResult.mdx)<T, any>` -#### Parameters +## Parameters -#### Returns +## Returns [IteratorResult](../../types/IteratorResult.mdx)<T, any> @@ -59,6 +59,6 @@ import ParameterTypes from "@site/src/components/ParameterTypes" } ]} /> -#### Inherited from +### Inherited from [Iterator](../../interfaces/Iterator.mdx).[next](../../Iterator/methods/Iterator.next.mdx) diff --git a/www/apps/docs/content/references/product/IterableIterator/methods/IterableIterator.return.mdx b/www/apps/docs/content/references/product/IterableIterator/methods/IterableIterator.return.mdx index dd0702fefe..58e1b6de8f 100644 --- a/www/apps/docs/content/references/product/IterableIterator/methods/IterableIterator.return.mdx +++ b/www/apps/docs/content/references/product/IterableIterator/methods/IterableIterator.return.mdx @@ -10,7 +10,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes" `Optional **return**(value?): [IteratorResult](../../types/IteratorResult.mdx)<T, any>` -#### Parameters +## Parameters -#### Returns +## Returns [IteratorResult](../../types/IteratorResult.mdx)<T, any> @@ -59,6 +59,6 @@ import ParameterTypes from "@site/src/components/ParameterTypes" } ]} /> -#### Inherited from +### Inherited from [Iterator](../../interfaces/Iterator.mdx).[return](../../Iterator/methods/Iterator.return.mdx) diff --git a/www/apps/docs/content/references/product/IterableIterator/methods/IterableIterator.throw.mdx b/www/apps/docs/content/references/product/IterableIterator/methods/IterableIterator.throw.mdx index 13fbc83482..e62bbc3692 100644 --- a/www/apps/docs/content/references/product/IterableIterator/methods/IterableIterator.throw.mdx +++ b/www/apps/docs/content/references/product/IterableIterator/methods/IterableIterator.throw.mdx @@ -10,7 +10,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes" `Optional **throw**(e?): [IteratorResult](../../types/IteratorResult.mdx)<T, any>` -#### Parameters +## Parameters -#### Returns +## Returns [IteratorResult](../../types/IteratorResult.mdx)<T, any> @@ -59,6 +59,6 @@ import ParameterTypes from "@site/src/components/ParameterTypes" } ]} /> -#### Inherited from +### Inherited from [Iterator](../../interfaces/Iterator.mdx).[throw](../../Iterator/methods/Iterator.throw.mdx) diff --git a/www/apps/docs/content/references/product/Iterator/methods/Iterator.next.mdx b/www/apps/docs/content/references/product/Iterator/methods/Iterator.next.mdx index 9a94ad8053..837dcec641 100644 --- a/www/apps/docs/content/references/product/Iterator/methods/Iterator.next.mdx +++ b/www/apps/docs/content/references/product/Iterator/methods/Iterator.next.mdx @@ -10,7 +10,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes" `**next**(...args): [IteratorResult](../../types/IteratorResult.mdx)<T, TReturn>` -#### Parameters +## Parameters -#### Returns +## Returns [IteratorResult](../../types/IteratorResult.mdx)<T, TReturn> diff --git a/www/apps/docs/content/references/product/Iterator/methods/Iterator.return.mdx b/www/apps/docs/content/references/product/Iterator/methods/Iterator.return.mdx index 7be6d6fb79..95948c024a 100644 --- a/www/apps/docs/content/references/product/Iterator/methods/Iterator.return.mdx +++ b/www/apps/docs/content/references/product/Iterator/methods/Iterator.return.mdx @@ -10,7 +10,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes" `Optional **return**(value?): [IteratorResult](../../types/IteratorResult.mdx)<T, TReturn>` -#### Parameters +## Parameters -#### Returns +## Returns [IteratorResult](../../types/IteratorResult.mdx)<T, TReturn> diff --git a/www/apps/docs/content/references/product/Iterator/methods/Iterator.throw.mdx b/www/apps/docs/content/references/product/Iterator/methods/Iterator.throw.mdx index 470ac06465..c3337e9a62 100644 --- a/www/apps/docs/content/references/product/Iterator/methods/Iterator.throw.mdx +++ b/www/apps/docs/content/references/product/Iterator/methods/Iterator.throw.mdx @@ -10,7 +10,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes" `Optional **throw**(e?): [IteratorResult](../../types/IteratorResult.mdx)<T, TReturn>` -#### Parameters +## Parameters -#### Returns +## Returns [IteratorResult](../../types/IteratorResult.mdx)<T, TReturn> diff --git a/www/apps/docs/content/references/product/SharedArrayBuffer/methods/SharedArrayBuffer.slice.mdx b/www/apps/docs/content/references/product/SharedArrayBuffer/methods/SharedArrayBuffer.slice.mdx index 5861785630..20f0063208 100644 --- a/www/apps/docs/content/references/product/SharedArrayBuffer/methods/SharedArrayBuffer.slice.mdx +++ b/www/apps/docs/content/references/product/SharedArrayBuffer/methods/SharedArrayBuffer.slice.mdx @@ -12,7 +12,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes" Returns a section of an SharedArrayBuffer. -#### Parameters +## Parameters -#### Returns +## Returns [SharedArrayBuffer](../../variables/SharedArrayBuffer-1.mdx) diff --git a/www/apps/docs/content/references/product/enums/ProductStatus.mdx b/www/apps/docs/content/references/product/enums/ProductStatus.mdx index 63dccf4ed7..42a74208d7 100644 --- a/www/apps/docs/content/references/product/enums/ProductStatus.mdx +++ b/www/apps/docs/content/references/product/enums/ProductStatus.mdx @@ -8,24 +8,24 @@ import ParameterTypes from "@site/src/components/ParameterTypes" ## Enumeration Members -#### DRAFT +### DRAFT **DRAFT** = `"draft"` ___ -#### PROPOSED +### PROPOSED **PROPOSED** = `"proposed"` ___ -#### PUBLISHED +### PUBLISHED **PUBLISHED** = `"published"` ___ -#### REJECTED +### REJECTED **REJECTED** = `"rejected"` diff --git a/www/apps/docs/content/references/product/interfaces/BufferConstructor.mdx b/www/apps/docs/content/references/product/interfaces/BufferConstructor.mdx index b8aab0fe24..418bcac808 100644 --- a/www/apps/docs/content/references/product/interfaces/BufferConstructor.mdx +++ b/www/apps/docs/content/references/product/interfaces/BufferConstructor.mdx @@ -24,15 +24,13 @@ Valid string encodings: 'ascii'\|'utf8'\|'utf16le'\|'ucs2'(alias of 'utf16le')\| - [isEncoding](../BufferConstructor/methods/BufferConstructor.isEncoding.mdx) - [of](../BufferConstructor/methods/BufferConstructor.of.mdx) -## Constructors - -#### constructor +## constructor `**new BufferConstructor**(str, encoding?)` Allocates a new buffer containing the given {str}. -##### Parameters +### Parameters -#### Deprecated +### Deprecated since v10.0.0 - Use `Buffer.from(string[, encoding])` instead. @@ -63,7 +61,7 @@ since v10.0.0 - Use `Buffer.from(string[, encoding])` instead. Allocates a new buffer of {size} octets. -##### Parameters +### Parameters -#### Deprecated +### Deprecated since v10.0.0 - Use `Buffer.alloc()` instead (also see `Buffer.allocUnsafe()`). @@ -85,7 +83,7 @@ since v10.0.0 - Use `Buffer.alloc()` instead (also see `Buffer.allocUnsafe()`). Allocates a new buffer containing the given {array} of octets. -##### Parameters +### Parameters -#### Deprecated +### Deprecated since v10.0.0 - Use `Buffer.from(array)` instead. @@ -108,7 +106,7 @@ since v10.0.0 - Use `Buffer.from(array)` instead. Produces a Buffer backed by the same allocated memory as the given {ArrayBuffer}/{SharedArrayBuffer}. -##### Parameters +### Parameters -#### Deprecated +### Deprecated since v10.0.0 - Use `Buffer.from(arrayBuffer[, byteOffset[, length]])` instead. @@ -130,7 +128,7 @@ since v10.0.0 - Use `Buffer.from(arrayBuffer[, byteOffset[, length]])` instead. Allocates a new buffer containing the given {array} of octets. -##### Parameters +### Parameters -#### Deprecated +### Deprecated since v10.0.0 - Use `Buffer.from(array)` instead. @@ -152,7 +150,7 @@ since v10.0.0 - Use `Buffer.from(array)` instead. Copies the passed {buffer} data onto a new {Buffer} instance. -##### Parameters +### Parameters -#### Deprecated +### Deprecated since v10.0.0 - Use `Buffer.from(buffer)` instead. +___ + ## Properties +___ + ## Properties -#### Type declaration +## Type declaration +___ + ## Properties +___ + ## Accessors -#### activeManager\_ +### activeManager\_ - `Protected` **activeManager\_**: [object Object] +`Protected get**activeManager_**(): EntityManager` + +#### Returns + +EntityManager + + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ `Protected **atomicPhase_**(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise<TResult>` @@ -141,7 +161,7 @@ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<TResult> @@ -214,13 +234,13 @@ Promise<TResult> ___ -#### buildTemplate +### buildTemplate `Abstract **buildTemplate**(): Promise<string>` Builds and returns a template file that can be downloaded and filled in -##### Returns +#### Returns Promise<string> @@ -238,11 +258,11 @@ Promise<string> ___ -#### handleProcessingError +### handleProcessingError `Protected **handleProcessingError**(batchJobId, err, result): Promise<void>` -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -306,13 +326,13 @@ Promise<void> ___ -#### preProcessBatchJob +### preProcessBatchJob `**preProcessBatchJob**(batchJobId): Promise<void>` Method for pre-processing a batch job -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -344,13 +364,13 @@ Promise<void> ___ -#### prepareBatchJobForProcessing +### prepareBatchJobForProcessing `**prepareBatchJobForProcessing**(batchJob, req): Promise<[CreateBatchJobInput](../types/CreateBatchJobInput.mdx)>` Method for preparing a batch job for processing -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[CreateBatchJobInput](../types/CreateBatchJobInput.mdx)> @@ -391,13 +411,13 @@ Promise<[CreateBatchJobInput](../types/CreateBatchJobInput.mdx)> ___ -#### processJob +### processJob `Abstract **processJob**(batchJobId): Promise<void>` Method does the actual processing of the job. Should report back on the progress of the operation. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -429,11 +449,11 @@ Promise<void> ___ -#### shouldRetryOnProcessingError +### shouldRetryOnProcessingError `Protected **shouldRetryOnProcessingError**(batchJob, err): Promise<boolean>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<boolean> @@ -474,11 +494,11 @@ Promise<boolean> ___ -#### shouldRetryTransaction\_ +### shouldRetryTransaction\_ `Protected **shouldRetryTransaction_**(err): boolean` -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` @@ -510,11 +530,11 @@ ___ ___ -#### withTransaction +### withTransaction `**withTransaction**(transactionManager?): [AbstractBatchJobStrategy](AbstractBatchJobStrategy.mdx)` -##### Parameters +#### Parameters -##### Returns +#### Returns [AbstractBatchJobStrategy](AbstractBatchJobStrategy.mdx) diff --git a/www/apps/docs/content/references/services/classes/AbstractEventBusModuleService.mdx b/www/apps/docs/content/references/services/classes/AbstractEventBusModuleService.mdx index 16d7a897f3..aee119e9d3 100644 --- a/www/apps/docs/content/references/services/classes/AbstractEventBusModuleService.mdx +++ b/www/apps/docs/content/references/services/classes/AbstractEventBusModuleService.mdx @@ -10,12 +10,12 @@ import ParameterTypes from "@site/src/components/ParameterTypes" - [IEventBusModuleService](../interfaces/IEventBusModuleService.mdx) -## Constructors - -#### constructor +## constructor `**new AbstractEventBusModuleService**()` +___ + ## Properties +___ + ## Accessors -#### eventToSubscribersMap +### eventToSubscribersMap - **eventToSubscribersMap**: [object Object] +`get**eventToSubscribersMap**(): Map<string \| symbol, [SubscriberDescriptor](../types/SubscriberDescriptor.mdx)[]>` + +#### Returns + +Map<string \| symbol, [SubscriberDescriptor](../types/SubscriberDescriptor.mdx)[]> + + + +___ ## Methods -#### emit +### emit `Abstract **emit**(eventName, data, options): Promise<void>` -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -106,7 +126,7 @@ Promise<void> `Abstract **emit**(data): Promise<void>` -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -152,11 +172,11 @@ Promise<void> ___ -#### storeSubscribers +### storeSubscribers `Protected **storeSubscribers**(«destructured»): void` -##### Parameters +#### Parameters -##### Returns +#### Returns `void` @@ -215,11 +235,11 @@ ___ ___ -#### subscribe +### subscribe `**subscribe**(eventName, subscriber, context?): [AbstractEventBusModuleService](AbstractEventBusModuleService.mdx)` -##### Parameters +#### Parameters -##### Returns +#### Returns [AbstractEventBusModuleService](AbstractEventBusModuleService.mdx) @@ -269,11 +289,11 @@ ___ ___ -#### unsubscribe +### unsubscribe `**unsubscribe**(eventName, subscriber, context): [AbstractEventBusModuleService](AbstractEventBusModuleService.mdx)` -##### Parameters +#### Parameters -##### Returns +#### Returns [AbstractEventBusModuleService](AbstractEventBusModuleService.mdx) diff --git a/www/apps/docs/content/references/services/classes/AbstractNotificationService.mdx b/www/apps/docs/content/references/services/classes/AbstractNotificationService.mdx index 5661309831..d06ece273c 100644 --- a/www/apps/docs/content/references/services/classes/AbstractNotificationService.mdx +++ b/www/apps/docs/content/references/services/classes/AbstractNotificationService.mdx @@ -10,13 +10,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes" - [INotificationService](../interfaces/INotificationService.mdx) -## Constructors - -#### constructor +## constructor `Protected **new AbstractNotificationService**(__container__, __configModule__?, __moduleDeclaration__?)` -##### Parameters +### Parameters +___ + ## Properties +___ + ## Accessors -#### activeManager\_ +### activeManager\_ - `Protected` **activeManager\_**: [object Object] +`Protected get**activeManager_**(): EntityManager` + +#### Returns + +EntityManager + + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ `Protected **atomicPhase_**(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise<TResult>` @@ -123,7 +143,7 @@ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<TResult> @@ -196,11 +216,11 @@ Promise<TResult> ___ -#### getIdentifier +### getIdentifier `**getIdentifier**(): string` -##### Returns +#### Returns `string` @@ -218,11 +238,11 @@ ___ ___ -#### resendNotification +### resendNotification `Abstract **resendNotification**(notification, config, attachmentGenerator): Promise<[ReturnedData](../types/ReturnedData.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ReturnedData](../types/ReturnedData.mdx)> @@ -272,11 +292,11 @@ Promise<[ReturnedData](../types/ReturnedData.mdx)> ___ -#### sendNotification +### sendNotification `Abstract **sendNotification**(event, data, attachmentGenerator): Promise<[ReturnedData](../types/ReturnedData.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ReturnedData](../types/ReturnedData.mdx)> @@ -326,11 +346,11 @@ Promise<[ReturnedData](../types/ReturnedData.mdx)> ___ -#### shouldRetryTransaction\_ +### shouldRetryTransaction\_ `Protected **shouldRetryTransaction_**(err): boolean` -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` @@ -362,11 +382,11 @@ ___ ___ -#### withTransaction +### withTransaction `**withTransaction**(transactionManager?): [AbstractNotificationService](AbstractNotificationService.mdx)` -##### Parameters +#### Parameters -##### Returns +#### Returns [AbstractNotificationService](AbstractNotificationService.mdx) diff --git a/www/apps/docs/content/references/services/classes/AbstractPaymentProcessor.mdx b/www/apps/docs/content/references/services/classes/AbstractPaymentProcessor.mdx index e907e13621..9b781d6128 100644 --- a/www/apps/docs/content/references/services/classes/AbstractPaymentProcessor.mdx +++ b/www/apps/docs/content/references/services/classes/AbstractPaymentProcessor.mdx @@ -12,13 +12,11 @@ Payment processor in charge of creating , managing and processing a payment - [PaymentProcessor](../interfaces/PaymentProcessor.mdx) -## Constructors - -#### constructor +## constructor `Protected **new AbstractPaymentProcessor**(container, config?)` -##### Parameters +### Parameters +___ + ## Properties +___ + ## Methods -#### authorizePayment +### authorizePayment `Abstract **authorizePayment**(paymentSessionData, context): Promise<[PaymentProcessorError](../interfaces/PaymentProcessorError.mdx) \| { data: Record<string, unknown> ; status: [PaymentSessionStatus](../enums/PaymentSessionStatus.mdx) }>` Authorize an existing session if it is not already authorized -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[PaymentProcessorError](../interfaces/PaymentProcessorError.mdx) \| { data: Record<string, unknown> ; status: [PaymentSessionStatus](../enums/PaymentSessionStatus.mdx) }> @@ -122,13 +124,13 @@ Promise<[PaymentProcessorError](../interfaces/PaymentProcessorError.mdx) \| ___ -#### cancelPayment +### cancelPayment `Abstract **cancelPayment**(paymentSessionData): Promise<Record<string, unknown> \| [PaymentProcessorError](../interfaces/PaymentProcessorError.mdx)>` Cancel an existing session -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<Record<string, unknown> \| [PaymentProcessorError](../interfaces/PaymentProcessorError.mdx)> @@ -160,13 +162,13 @@ Promise<Record<string, unknown> \| [PaymentProcessorError](../interf ___ -#### capturePayment +### capturePayment `Abstract **capturePayment**(paymentSessionData): Promise<Record<string, unknown> \| [PaymentProcessorError](../interfaces/PaymentProcessorError.mdx)>` Capture an existing session -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<Record<string, unknown> \| [PaymentProcessorError](../interfaces/PaymentProcessorError.mdx)> @@ -198,13 +200,13 @@ Promise<Record<string, unknown> \| [PaymentProcessorError](../interf ___ -#### deletePayment +### deletePayment `Abstract **deletePayment**(paymentSessionData): Promise<Record<string, unknown> \| [PaymentProcessorError](../interfaces/PaymentProcessorError.mdx)>` Delete an existing session -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<Record<string, unknown> \| [PaymentProcessorError](../interfaces/PaymentProcessorError.mdx)> @@ -236,13 +238,13 @@ Promise<Record<string, unknown> \| [PaymentProcessorError](../interf ___ -#### getIdentifier +### getIdentifier `**getIdentifier**(): string` Return a unique identifier to retrieve the payment plugin provider -##### Returns +#### Returns `string` @@ -260,13 +262,13 @@ Return a unique identifier to retrieve the payment plugin provider ___ -#### getPaymentStatus +### getPaymentStatus `Abstract **getPaymentStatus**(paymentSessionData): Promise<[PaymentSessionStatus](../enums/PaymentSessionStatus.mdx)>` Return the status of the session -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[PaymentSessionStatus](../enums/PaymentSessionStatus.mdx)> @@ -298,13 +300,13 @@ Promise<[PaymentSessionStatus](../enums/PaymentSessionStatus.mdx)> ___ -#### initiatePayment +### initiatePayment `Abstract **initiatePayment**(context): Promise<[PaymentProcessorError](../interfaces/PaymentProcessorError.mdx) \| [PaymentProcessorSessionResponse](../types/PaymentProcessorSessionResponse.mdx)>` Initiate a payment session with the external provider -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[PaymentProcessorError](../interfaces/PaymentProcessorError.mdx) \| [PaymentProcessorSessionResponse](../types/PaymentProcessorSessionResponse.mdx)> @@ -336,13 +338,13 @@ Promise<[PaymentProcessorError](../interfaces/PaymentProcessorError.mdx) \| ___ -#### refundPayment +### refundPayment `Abstract **refundPayment**(paymentSessionData, refundAmount): Promise<Record<string, unknown> \| [PaymentProcessorError](../interfaces/PaymentProcessorError.mdx)>` Refund an existing session -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<Record<string, unknown> \| [PaymentProcessorError](../interfaces/PaymentProcessorError.mdx)> @@ -383,13 +385,13 @@ Promise<Record<string, unknown> \| [PaymentProcessorError](../interf ___ -#### retrievePayment +### retrievePayment `Abstract **retrievePayment**(paymentSessionData): Promise<Record<string, unknown> \| [PaymentProcessorError](../interfaces/PaymentProcessorError.mdx)>` Retrieve an existing session -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<Record<string, unknown> \| [PaymentProcessorError](../interfaces/PaymentProcessorError.mdx)> @@ -421,13 +423,13 @@ Promise<Record<string, unknown> \| [PaymentProcessorError](../interf ___ -#### updatePayment +### updatePayment `Abstract **updatePayment**(context): Promise<void \| [PaymentProcessorError](../interfaces/PaymentProcessorError.mdx) \| [PaymentProcessorSessionResponse](../types/PaymentProcessorSessionResponse.mdx)>` Update an existing payment session -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void \| [PaymentProcessorError](../interfaces/PaymentProcessorError.mdx) \| [PaymentProcessorSessionResponse](../types/PaymentProcessorSessionResponse.mdx)> @@ -459,13 +461,13 @@ Promise<void \| [PaymentProcessorError](../interfaces/PaymentProcessorError. ___ -#### updatePaymentData +### updatePaymentData `Abstract **updatePaymentData**(sessionId, data): Promise<Record<string, unknown> \| [PaymentProcessorError](../interfaces/PaymentProcessorError.mdx)>` Update the session data for a payment session -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<Record<string, unknown> \| [PaymentProcessorError](../interfaces/PaymentProcessorError.mdx)> diff --git a/www/apps/docs/content/references/services/classes/AbstractPaymentService.mdx b/www/apps/docs/content/references/services/classes/AbstractPaymentService.mdx index d6a5987ddc..d91c5af6db 100644 --- a/www/apps/docs/content/references/services/classes/AbstractPaymentService.mdx +++ b/www/apps/docs/content/references/services/classes/AbstractPaymentService.mdx @@ -8,7 +8,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes" This will be -#### Deprecated +## Deprecated in the near future use the AbstractPaymentProcessor instead @@ -16,13 +16,11 @@ in the near future use the AbstractPaymentProcessor instead - ["medusa-interfaces"](../modules/medusa_interfaces_.mdx) -## Constructors - -#### constructor +## constructor `Protected **new AbstractPaymentService**(container, config?)` -##### Parameters +### Parameters +___ + ## Properties +___ + ## Accessors -#### activeManager\_ +### activeManager\_ - `Protected` **activeManager\_**: [object Object] +`Protected get**activeManager_**(): EntityManager` + +#### Returns + +EntityManager + + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ `Protected **atomicPhase_**(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise<TResult>` @@ -120,7 +140,7 @@ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<TResult> @@ -193,11 +213,11 @@ Promise<TResult> ___ -#### authorizePayment +### authorizePayment `Abstract **authorizePayment**(paymentSession, context): Promise<{ data: [Data](../types/Data.mdx) ; status: [PaymentSessionStatus](../enums/PaymentSessionStatus.mdx) }>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<{ data: [Data](../types/Data.mdx) ; status: [PaymentSessionStatus](../enums/PaymentSessionStatus.mdx) }> @@ -240,13 +260,13 @@ Promise<{ data: [Data](../types/Data.mdx) ; status: [PaymentSessionStat ___ -#### cancelPayment +### cancelPayment `Abstract **cancelPayment**(payment): Promise<[Data](../types/Data.mdx)>` This will be -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Data](../types/Data.mdx)> @@ -282,13 +302,13 @@ in the near future ___ -#### capturePayment +### capturePayment `Abstract **capturePayment**(payment): Promise<[Data](../types/Data.mdx)>` This will be -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Data](../types/Data.mdx)> @@ -324,11 +344,11 @@ in the near future ___ -#### createPayment +### createPayment `Abstract **createPayment**(context): Promise<[PaymentSessionResponse](../types/PaymentSessionResponse.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[PaymentSessionResponse](../types/PaymentSessionResponse.mdx)> @@ -362,7 +382,7 @@ Promise<[PaymentSessionResponse](../types/PaymentSessionResponse.mdx)> This will be -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Data](../types/Data.mdx)> @@ -398,13 +418,13 @@ in the near future use `createPayment(context: Cart & PaymentContext): Promise

-##### Returns +#### Returns Promise<void> @@ -440,11 +460,11 @@ in the near future ___ -#### getIdentifier +### getIdentifier `**getIdentifier**(): string` -##### Returns +#### Returns `string` @@ -462,11 +482,11 @@ ___ ___ -#### getPaymentData +### getPaymentData `Abstract **getPaymentData**(paymentSession): Promise<[Data](../types/Data.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Data](../types/Data.mdx)> @@ -500,13 +520,13 @@ Promise<[Data](../types/Data.mdx)> ___ -#### getStatus +### getStatus `Abstract **getStatus**(data): Promise<[PaymentSessionStatus](../enums/PaymentSessionStatus.mdx)>` This will be -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[PaymentSessionStatus](../enums/PaymentSessionStatus.mdx)> @@ -542,13 +562,13 @@ in the near future ___ -#### refundPayment +### refundPayment `Abstract **refundPayment**(payment, refundAmount): Promise<[Data](../types/Data.mdx)>` This will be -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Data](../types/Data.mdx)> @@ -593,11 +613,11 @@ in the near future ___ -#### retrievePayment +### retrievePayment `Abstract **retrievePayment**(paymentData): Promise<[Data](../types/Data.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Data](../types/Data.mdx)> @@ -631,13 +651,13 @@ Promise<[Data](../types/Data.mdx)> ___ -#### retrieveSavedMethods +### retrieveSavedMethods `**retrieveSavedMethods**(customer): Promise<[Data](../types/Data.mdx)[]>` This will be -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Data](../types/Data.mdx)[]> @@ -673,11 +693,11 @@ in the near future ___ -#### shouldRetryTransaction\_ +### shouldRetryTransaction\_ `Protected **shouldRetryTransaction_**(err): boolean` -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` @@ -709,11 +729,11 @@ ___ ___ -#### updatePayment +### updatePayment `Abstract **updatePayment**(paymentSessionData, context): Promise<Record<string, unknown> \| [PaymentSessionResponse](../types/PaymentSessionResponse.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<Record<string, unknown> \| [PaymentSessionResponse](../types/PaymentSessionResponse.mdx)> @@ -756,7 +776,7 @@ Promise<Record<string, unknown> \| [PaymentSessionResponse](../types This will be -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Data](../types/Data.mdx)> @@ -801,11 +821,11 @@ in the near future use `updatePayment(paymentSessionData: PaymentSessionData, co ___ -#### updatePaymentData +### updatePaymentData `Abstract **updatePaymentData**(paymentSessionData, data): Promise<[Data](../types/Data.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Data](../types/Data.mdx)> @@ -848,11 +868,11 @@ Promise<[Data](../types/Data.mdx)> ___ -#### withTransaction +### withTransaction `**withTransaction**(transactionManager?): [AbstractPaymentService](AbstractPaymentService.mdx)` -##### Parameters +#### Parameters -##### Returns +#### Returns [AbstractPaymentService](AbstractPaymentService.mdx) diff --git a/www/apps/docs/content/references/services/classes/AbstractSearchService.mdx b/www/apps/docs/content/references/services/classes/AbstractSearchService.mdx index ea9aa67f70..40b3f8cbe5 100644 --- a/www/apps/docs/content/references/services/classes/AbstractSearchService.mdx +++ b/www/apps/docs/content/references/services/classes/AbstractSearchService.mdx @@ -10,13 +10,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes" - [ISearchService](../interfaces/ISearchService.mdx) -## Constructors - -#### constructor +## constructor `Protected **new AbstractSearchService**(container, options)` -##### Parameters +### Parameters +___ + ## Properties +___ + ## Accessors -#### options +### options - **options**: [object Object] +`get**options**(): Record<string, unknown>` + +#### Returns + +`Record` + +`", + "optional": false, + "defaultValue": "", + "description": "", + "expandable": false, + "children": [] + } +]} /> + +___ ## Methods -#### addDocuments +### addDocuments `Abstract **addDocuments**(indexName, documents, type): unknown` Used to index documents by the search engine provider -##### Parameters +#### Parameters -##### Returns +#### Returns `unknown` @@ -126,13 +146,13 @@ Used to index documents by the search engine provider ___ -#### createIndex +### createIndex `Abstract **createIndex**(indexName, options): unknown` Used to create an index -##### Parameters +#### Parameters -##### Returns +#### Returns `unknown` @@ -173,13 +193,13 @@ Used to create an index ___ -#### deleteAllDocuments +### deleteAllDocuments `Abstract **deleteAllDocuments**(indexName): unknown` Used to delete all documents -##### Parameters +#### Parameters -##### Returns +#### Returns `unknown` @@ -211,13 +231,13 @@ Used to delete all documents ___ -#### deleteDocument +### deleteDocument `Abstract **deleteDocument**(indexName, document_id): unknown` Used to delete document -##### Parameters +#### Parameters -##### Returns +#### Returns `unknown` @@ -258,13 +278,13 @@ Used to delete document ___ -#### getIndex +### getIndex `Abstract **getIndex**(indexName): unknown` Used to get an index -##### Parameters +#### Parameters -##### Returns +#### Returns `unknown` @@ -296,13 +316,13 @@ Used to get an index ___ -#### replaceDocuments +### replaceDocuments `Abstract **replaceDocuments**(indexName, documents, type): unknown` Used to replace documents -##### Parameters +#### Parameters -##### Returns +#### Returns `unknown` @@ -352,13 +372,13 @@ Used to replace documents ___ -#### search +### search `Abstract **search**(indexName, query, options): unknown` Used to search for a document in an index -##### Parameters +#### Parameters -##### Returns +#### Returns `unknown` @@ -408,13 +428,13 @@ Used to search for a document in an index ___ -#### updateSettings +### updateSettings `Abstract **updateSettings**(indexName, settings): unknown` Used to update the settings of an index -##### Parameters +#### Parameters -##### Returns +#### Returns `unknown` diff --git a/www/apps/docs/content/references/services/classes/Address.mdx b/www/apps/docs/content/references/services/classes/Address.mdx index 0e3cf9442c..3f608816d8 100644 --- a/www/apps/docs/content/references/services/classes/Address.mdx +++ b/www/apps/docs/content/references/services/classes/Address.mdx @@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes" An address is used across the Medusa backend within other schemas and object types. For example, a customer's billing and shipping addresses both use the Address entity. -## Constructors - -#### constructor +## constructor `**new Address**()` An address is used across the Medusa backend within other schemas and object types. For example, a customer's billing and shipping addresses both use the Address entity. +___ + ## Properties +___ + ## Methods -#### beforeInsert +### beforeInsert `Private **beforeInsert**(): void` -##### Returns +#### Returns `void` diff --git a/www/apps/docs/content/references/services/classes/AddressCreatePayload.mdx b/www/apps/docs/content/references/services/classes/AddressCreatePayload.mdx index 3b34ae7a58..befed3fc5b 100644 --- a/www/apps/docs/content/references/services/classes/AddressCreatePayload.mdx +++ b/www/apps/docs/content/references/services/classes/AddressCreatePayload.mdx @@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes" Address fields used when creating an address. -## Constructors - -#### constructor +## constructor `**new AddressCreatePayload**()` Address fields used when creating an address. +___ + ## Properties +___ + ## Methods -#### beforeInsert +### beforeInsert `Private **beforeInsert**(): void` -##### Returns +#### Returns `void` diff --git a/www/apps/docs/content/references/services/classes/AnalyticsConfigService.mdx b/www/apps/docs/content/references/services/classes/AnalyticsConfigService.mdx index f8914ee24d..7f6301df1f 100644 --- a/www/apps/docs/content/references/services/classes/AnalyticsConfigService.mdx +++ b/www/apps/docs/content/references/services/classes/AnalyticsConfigService.mdx @@ -6,13 +6,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes" # AnalyticsConfigService -## Constructors - -#### constructor +## constructor `**new AnalyticsConfigService**(«destructured»)` -##### Parameters +### Parameters +___ + ## Properties +___ + ## Accessors -#### activeManager\_ +### activeManager\_ - `Protected` **activeManager\_**: [object Object] +`Protected get**activeManager_**(): EntityManager` + +#### Returns + +EntityManager + + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ `Protected **atomicPhase_**(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise<TResult>` @@ -110,7 +130,7 @@ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<TResult> @@ -183,13 +203,13 @@ Promise<TResult> ___ -#### create +### create `**create**(userId, data): Promise<[AnalyticsConfig](AnalyticsConfig.mdx)>` Creates an analytics config. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[AnalyticsConfig](AnalyticsConfig.mdx)> @@ -230,13 +250,13 @@ Promise<[AnalyticsConfig](AnalyticsConfig.mdx)> ___ -#### delete +### delete `**delete**(userId): Promise<void>` Deletes an analytics config. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -268,11 +288,11 @@ Promise<void> ___ -#### retrieve +### retrieve `**retrieve**(userId): Promise<[AnalyticsConfig](AnalyticsConfig.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[AnalyticsConfig](AnalyticsConfig.mdx)> @@ -304,11 +324,11 @@ Promise<[AnalyticsConfig](AnalyticsConfig.mdx)> ___ -#### shouldRetryTransaction\_ +### shouldRetryTransaction\_ `Protected **shouldRetryTransaction_**(err): boolean` -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` @@ -340,13 +360,13 @@ ___ ___ -#### update +### update `**update**(userId, update): Promise<[AnalyticsConfig](AnalyticsConfig.mdx)>` Updates an analytics config. If the config does not exist, it will be created instead. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[AnalyticsConfig](AnalyticsConfig.mdx)> @@ -387,11 +407,11 @@ Promise<[AnalyticsConfig](AnalyticsConfig.mdx)> ___ -#### withTransaction +### withTransaction `**withTransaction**(transactionManager?): [AnalyticsConfigService](AnalyticsConfigService.mdx)` -##### Parameters +#### Parameters -##### Returns +#### Returns [AnalyticsConfigService](AnalyticsConfigService.mdx) diff --git a/www/apps/docs/content/references/services/classes/AuthService.mdx b/www/apps/docs/content/references/services/classes/AuthService.mdx index 2a558f7355..780abf1895 100644 --- a/www/apps/docs/content/references/services/classes/AuthService.mdx +++ b/www/apps/docs/content/references/services/classes/AuthService.mdx @@ -8,13 +8,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes" Can authenticate a user based on email password combination -## Constructors - -#### constructor +## constructor `**new AuthService**(«destructured»)` -##### Parameters +### Parameters +___ + ## Properties +___ + ## Accessors -#### activeManager\_ +### activeManager\_ - `Protected` **activeManager\_**: [object Object] +`Protected get**activeManager_**(): EntityManager` + +#### Returns + +EntityManager + + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ `Protected **atomicPhase_**(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise<TResult>` @@ -112,7 +132,7 @@ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<TResult> @@ -185,14 +205,14 @@ Promise<TResult> ___ -#### authenticate +### authenticate `**authenticate**(email, password): Promise<[AuthenticateResult](../types/AuthenticateResult.mdx)>` Authenticates a given user based on an email, password combination. Uses scrypt to match password with hashed value. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[AuthenticateResult](../types/AuthenticateResult.mdx)> @@ -233,13 +253,13 @@ Promise<[AuthenticateResult](../types/AuthenticateResult.mdx)> ___ -#### authenticateAPIToken +### authenticateAPIToken `**authenticateAPIToken**(token): Promise<[AuthenticateResult](../types/AuthenticateResult.mdx)>` Authenticates a given user with an API token -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[AuthenticateResult](../types/AuthenticateResult.mdx)> @@ -271,14 +291,14 @@ Promise<[AuthenticateResult](../types/AuthenticateResult.mdx)> ___ -#### authenticateCustomer +### authenticateCustomer `**authenticateCustomer**(email, password): Promise<[AuthenticateResult](../types/AuthenticateResult.mdx)>` Authenticates a customer based on an email, password combination. Uses scrypt to match password with hashed value. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[AuthenticateResult](../types/AuthenticateResult.mdx)> @@ -319,13 +339,13 @@ Promise<[AuthenticateResult](../types/AuthenticateResult.mdx)> ___ -#### comparePassword\_ +### comparePassword\_ `Protected **comparePassword_**(password, hash): Promise<boolean>` Verifies if a password is valid given the provided password hash -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<boolean> @@ -366,11 +386,11 @@ Promise<boolean> ___ -#### shouldRetryTransaction\_ +### shouldRetryTransaction\_ `Protected **shouldRetryTransaction_**(err): boolean` -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` @@ -402,11 +422,11 @@ ___ ___ -#### withTransaction +### withTransaction `**withTransaction**(transactionManager?): [AuthService](AuthService.mdx)` -##### Parameters +#### Parameters -##### Returns +#### Returns [AuthService](AuthService.mdx) diff --git a/www/apps/docs/content/references/services/classes/BaseEntity.mdx b/www/apps/docs/content/references/services/classes/BaseEntity.mdx index 03721a9888..5e6a400074 100644 --- a/www/apps/docs/content/references/services/classes/BaseEntity.mdx +++ b/www/apps/docs/content/references/services/classes/BaseEntity.mdx @@ -8,12 +8,12 @@ import ParameterTypes from "@site/src/components/ParameterTypes" Base abstract entity for all entities -## Constructors - -#### constructor +## constructor `**new BaseEntity**()` +___ + ## Properties +___ + ## Methods -#### beforeInsert +### beforeInsert `Private **beforeInsert**(): void` -##### Returns +#### Returns `void` @@ -198,11 +200,11 @@ A Batch Job indicates an asynchronus task stored in the Medusa backend. Its stat ___ -#### loadStatus +### loadStatus `**loadStatus**(): void` -##### Returns +#### Returns `void` @@ -220,13 +222,13 @@ ___ ___ -#### toJSON +### toJSON `**toJSON**(): [BatchJob](BatchJob.mdx)` A Batch Job indicates an asynchronus task stored in the Medusa backend. Its status determines whether it has been executed or not. -##### Returns +#### Returns [BatchJob](BatchJob.mdx) diff --git a/www/apps/docs/content/references/services/classes/BatchJobService.mdx b/www/apps/docs/content/references/services/classes/BatchJobService.mdx index e9de6173c6..b6aa54c5be 100644 --- a/www/apps/docs/content/references/services/classes/BatchJobService.mdx +++ b/www/apps/docs/content/references/services/classes/BatchJobService.mdx @@ -6,13 +6,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes" # BatchJobService -## Constructors - -#### constructor +## constructor `**new BatchJobService**(«destructured»)` -##### Parameters +### Parameters +___ + ## Properties +___ + ## Accessors -#### activeManager\_ +### activeManager\_ - `Protected` **activeManager\_**: [object Object] +`Protected get**activeManager_**(): EntityManager` + +#### Returns + +EntityManager + + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ `Protected **atomicPhase_**(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise<TResult>` @@ -209,7 +229,7 @@ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<TResult> @@ -282,11 +302,11 @@ Promise<TResult> ___ -#### cancel +### cancel `**cancel**(batchJobOrId): Promise<[BatchJob](BatchJob.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[BatchJob](BatchJob.mdx)> @@ -318,11 +338,11 @@ Promise<[BatchJob](BatchJob.mdx)> ___ -#### complete +### complete `**complete**(batchJobOrId): Promise<[BatchJob](BatchJob.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[BatchJob](BatchJob.mdx)> @@ -354,11 +374,11 @@ Promise<[BatchJob](BatchJob.mdx)> ___ -#### confirm +### confirm `**confirm**(batchJobOrId): Promise<[BatchJob](BatchJob.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[BatchJob](BatchJob.mdx)> @@ -390,11 +410,11 @@ Promise<[BatchJob](BatchJob.mdx)> ___ -#### create +### create `**create**(data): Promise<[BatchJob](BatchJob.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[BatchJob](BatchJob.mdx)> @@ -426,11 +446,11 @@ Promise<[BatchJob](BatchJob.mdx)> ___ -#### listAndCount +### listAndCount `**listAndCount**(selector?, config?): Promise<[[BatchJob](BatchJob.mdx)[], number]>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[[BatchJob](BatchJob.mdx)[], number]> @@ -471,11 +491,11 @@ Promise<[[BatchJob](BatchJob.mdx)[], number]> ___ -#### prepareBatchJobForProcessing +### prepareBatchJobForProcessing `**prepareBatchJobForProcessing**(data, req): Promise<[CreateBatchJobInput](../types/CreateBatchJobInput.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[CreateBatchJobInput](../types/CreateBatchJobInput.mdx)> @@ -516,11 +536,11 @@ Promise<[CreateBatchJobInput](../types/CreateBatchJobInput.mdx)> ___ -#### retrieve +### retrieve `**retrieve**(batchJobId, config?): Promise<[BatchJob](BatchJob.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[BatchJob](BatchJob.mdx)> @@ -561,11 +581,11 @@ Promise<[BatchJob](BatchJob.mdx)> ___ -#### setFailed +### setFailed `**setFailed**(batchJobOrId, error?): Promise<[BatchJob](BatchJob.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[BatchJob](BatchJob.mdx)> @@ -606,11 +626,11 @@ Promise<[BatchJob](BatchJob.mdx)> ___ -#### setPreProcessingDone +### setPreProcessingDone `**setPreProcessingDone**(batchJobOrId): Promise<[BatchJob](BatchJob.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[BatchJob](BatchJob.mdx)> @@ -642,11 +662,11 @@ Promise<[BatchJob](BatchJob.mdx)> ___ -#### setProcessing +### setProcessing `**setProcessing**(batchJobOrId): Promise<[BatchJob](BatchJob.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[BatchJob](BatchJob.mdx)> @@ -678,11 +698,11 @@ Promise<[BatchJob](BatchJob.mdx)> ___ -#### shouldRetryTransaction\_ +### shouldRetryTransaction\_ `Protected **shouldRetryTransaction_**(err): boolean` -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` @@ -714,11 +734,11 @@ ___ ___ -#### update +### update `**update**(batchJobOrId, data): Promise<[BatchJob](BatchJob.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[BatchJob](BatchJob.mdx)> @@ -759,11 +779,11 @@ Promise<[BatchJob](BatchJob.mdx)> ___ -#### updateStatus +### updateStatus `Protected **updateStatus**(batchJobOrId, status): Promise<[BatchJob](BatchJob.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[BatchJob](BatchJob.mdx)> @@ -804,11 +824,11 @@ Promise<[BatchJob](BatchJob.mdx)> ___ -#### withTransaction +### withTransaction `**withTransaction**(transactionManager?): [BatchJobService](BatchJobService.mdx)` -##### Parameters +#### Parameters -##### Returns +#### Returns [BatchJobService](BatchJobService.mdx) diff --git a/www/apps/docs/content/references/services/classes/Cart.mdx b/www/apps/docs/content/references/services/classes/Cart.mdx index 003fb82c86..75298ba33b 100644 --- a/www/apps/docs/content/references/services/classes/Cart.mdx +++ b/www/apps/docs/content/references/services/classes/Cart.mdx @@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes" A cart represents a virtual shopping bag. It can be used to complete an order, a swap, or a claim. -## Constructors - -#### constructor +## constructor `**new Cart**()` A cart represents a virtual shopping bag. It can be used to complete an order, a swap, or a claim. +___ + ## Properties +___ + ## Methods -#### afterLoad +### afterLoad `Private **afterLoad**(): void` -##### Returns +#### Returns `void` @@ -423,11 +425,11 @@ A cart represents a virtual shopping bag. It can be used to complete an order, a ___ -#### beforeInsert +### beforeInsert `Private **beforeInsert**(): void` -##### Returns +#### Returns `void` diff --git a/www/apps/docs/content/references/services/classes/CartService.mdx b/www/apps/docs/content/references/services/classes/CartService.mdx index 6a8e18065b..93634f85bb 100644 --- a/www/apps/docs/content/references/services/classes/CartService.mdx +++ b/www/apps/docs/content/references/services/classes/CartService.mdx @@ -6,13 +6,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes" # CartService -## Constructors - -#### constructor +## constructor `**new CartService**(«destructured»)` -##### Parameters +### Parameters +___ + ## Properties +___ + ## Accessors -#### activeManager\_ +### activeManager\_ - `Protected` **activeManager\_**: [object Object] +`Protected get**activeManager_**(): EntityManager` + +#### Returns + +EntityManager + + + +___ ## Methods -#### addLineItem +### addLineItem `**addLineItem**(cartId, lineItem, config?): Promise<void>` Adds a line item to the cart. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -432,14 +452,14 @@ Use [addOrUpdateLineItems](CartService.mdx#addorupdatelineitems) instead. ___ -#### addOrUpdateLineItems +### addOrUpdateLineItems `**addOrUpdateLineItems**(cartId, lineItems, config?): Promise<void>` Adds or update one or multiple line items to the cart. It also update all existing items in the cart to have has\_shipping to false. Finally, the adjustments will be updated. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -498,7 +518,7 @@ Promise<void> ___ -#### addShippingMethod +### addShippingMethod `**addShippingMethod**(cartOrId, optionId, data?): Promise<[Cart](Cart.mdx)>` @@ -508,7 +528,7 @@ Shipping Option is a possible way to ship an order. Shipping Methods may also have additional details in the data field such as an id for a package shop. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Cart](Cart.mdx)> @@ -558,7 +578,7 @@ Promise<[Cart](Cart.mdx)> ___ -#### adjustFreeShipping\_ +### adjustFreeShipping\_ `Protected **adjustFreeShipping_**(cart, shouldAdd): Promise<void>` @@ -567,7 +587,7 @@ shipping discount If a free shipping is present, we set shipping methods price to 0 if a free shipping was present, we set shipping methods to original amount -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -608,7 +628,7 @@ Promise<void> ___ -#### applyDiscount +### applyDiscount `**applyDiscount**(cart, discountCode): Promise<void>` @@ -617,7 +637,7 @@ If discount besides free shipping is already applied, this will be overwritten Throws if discount regions does not include the cart region -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -658,7 +678,7 @@ Promise<void> ___ -#### applyDiscounts +### applyDiscounts `**applyDiscounts**(cart, discountCodes): Promise<void>` @@ -667,7 +687,7 @@ If discount besides free shipping is already applied, this will be overwritten Throws if discount regions does not include the cart region -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -708,11 +728,11 @@ Promise<void> ___ -#### applyGiftCard\_ +### applyGiftCard\_ `Protected **applyGiftCard_**(cart, code): Promise<void>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -753,7 +773,7 @@ Promise<void> ___ -#### atomicPhase\_ +### atomicPhase\_ `Protected **atomicPhase_**(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise<TResult>` @@ -761,7 +781,7 @@ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<TResult> @@ -834,7 +854,7 @@ Promise<TResult> ___ -#### authorizePayment +### authorizePayment `**authorizePayment**(cartId, context?): Promise<[Cart](Cart.mdx)>` @@ -844,7 +864,7 @@ a payment object, that we will use to update our cart payment with. Additionally, if the payment does not require more or fails, we will set the payment on the cart. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Cart](Cart.mdx)> @@ -885,13 +905,13 @@ Promise<[Cart](Cart.mdx)> ___ -#### create +### create `**create**(data): Promise<[Cart](Cart.mdx)>` Creates a cart. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Cart](Cart.mdx)> @@ -923,13 +943,13 @@ Promise<[Cart](Cart.mdx)> ___ -#### createOrFetchGuestCustomerFromEmail\_ +### createOrFetchGuestCustomerFromEmail\_ `Protected **createOrFetchGuestCustomerFromEmail_**(email): Promise<[Customer](Customer.mdx)>` Creates or fetches a user based on an email. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Customer](Customer.mdx)> @@ -961,11 +981,11 @@ Promise<[Customer](Customer.mdx)> ___ -#### createTaxLines +### createTaxLines `**createTaxLines**(cartOrId): Promise<void>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -997,11 +1017,11 @@ Promise<void> ___ -#### decorateTotals +### decorateTotals `**decorateTotals**(cart, totalsConfig?): Promise<[WithRequiredProperty](../types/WithRequiredProperty.mdx)<[Cart](Cart.mdx), "total">>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[WithRequiredProperty](../types/WithRequiredProperty.mdx)<[Cart](Cart.mdx), "total">> @@ -1042,11 +1062,11 @@ Promise<[WithRequiredProperty](../types/WithRequiredProperty.mdx)<[Cart] ___ -#### decorateTotals\_ +### decorateTotals\_ `Protected **decorateTotals_**(cart, totalsToSelect, options?): Promise<[Cart](Cart.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Cart](Cart.mdx)> @@ -1100,13 +1120,13 @@ Use decorateTotals instead ___ -#### delete +### delete `**delete**(cartId): Promise<[Cart](Cart.mdx)>` Deletes a cart from the database. Completed carts cannot be deleted. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Cart](Cart.mdx)> @@ -1138,13 +1158,13 @@ Promise<[Cart](Cart.mdx)> ___ -#### deletePaymentSession +### deletePaymentSession `**deletePaymentSession**(cartId, providerId): Promise<void>` Removes a payment session from the cart. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -1185,11 +1205,11 @@ Promise<void> ___ -#### deleteTaxLines +### deleteTaxLines `**deleteTaxLines**(id): Promise<void>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -1221,14 +1241,14 @@ Promise<void> ___ -#### findCustomShippingOption +### findCustomShippingOption `**findCustomShippingOption**(cartCustomShippingOptions, optionId): undefined \| [CustomShippingOption](CustomShippingOption.mdx)` Finds the cart's custom shipping options based on the passed option id. throws if custom options is not empty and no shipping option corresponds to optionId -##### Parameters +#### Parameters -##### Returns +#### Returns `undefined` \| [CustomShippingOption](CustomShippingOption.mdx) @@ -1269,11 +1289,11 @@ throws if custom options is not empty and no shipping option corresponds to opti ___ -#### getTotalsRelations +### getTotalsRelations `Private **getTotalsRelations**(config): string[]` -##### Parameters +#### Parameters -##### Returns +#### Returns `string`[] @@ -1305,11 +1325,11 @@ ___ ___ -#### getValidatedSalesChannel +### getValidatedSalesChannel `Protected **getValidatedSalesChannel**(salesChannelId?): Promise<[SalesChannel](SalesChannel.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[SalesChannel](SalesChannel.mdx)> @@ -1341,11 +1361,11 @@ Promise<[SalesChannel](SalesChannel.mdx)> ___ -#### list +### list `**list**(selector, config?): Promise<[Cart](Cart.mdx)[]>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Cart](Cart.mdx)[]> @@ -1386,13 +1406,13 @@ Promise<[Cart](Cart.mdx)[]> ___ -#### onSalesChannelChange +### onSalesChannelChange `Protected **onSalesChannelChange**(cart, newSalesChannelId): Promise<void>` Remove the cart line item that does not belongs to the newly assigned sales channel -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -1433,11 +1453,11 @@ Promise<void> ___ -#### refreshAdjustments\_ +### refreshAdjustments\_ `Protected **refreshAdjustments_**(cart): Promise<void>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -1469,13 +1489,13 @@ Promise<void> ___ -#### refreshPaymentSession +### refreshPaymentSession `**refreshPaymentSession**(cartId, providerId): Promise<void>` Refreshes a payment session on a cart -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -1516,13 +1536,13 @@ Promise<void> ___ -#### removeDiscount +### removeDiscount `**removeDiscount**(cartId, discountCode): Promise<[Cart](Cart.mdx)>` Removes a discount based on a discount code. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Cart](Cart.mdx)> @@ -1563,13 +1583,13 @@ Promise<[Cart](Cart.mdx)> ___ -#### removeLineItem +### removeLineItem `**removeLineItem**(cartId, lineItemId): Promise<[Cart](Cart.mdx)>` Removes a line item from the cart. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Cart](Cart.mdx)> @@ -1610,13 +1630,13 @@ Promise<[Cart](Cart.mdx)> ___ -#### retrieve +### retrieve `**retrieve**(cartId, options?, totalsConfig?): Promise<[Cart](Cart.mdx)>` Gets a cart by id. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Cart](Cart.mdx)> @@ -1666,11 +1686,11 @@ Promise<[Cart](Cart.mdx)> ___ -#### retrieveLegacy +### retrieveLegacy `Protected **retrieveLegacy**(cartId, options?, totalsConfig?): Promise<[Cart](Cart.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Cart](Cart.mdx)> @@ -1722,11 +1742,11 @@ Promise<[Cart](Cart.mdx)> ___ -#### retrieveWithTotals +### retrieveWithTotals `**retrieveWithTotals**(cartId, options?, totalsConfig?): Promise<[WithRequiredProperty](../types/WithRequiredProperty.mdx)<[Cart](Cart.mdx), "total">>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[WithRequiredProperty](../types/WithRequiredProperty.mdx)<[Cart](Cart.mdx), "total">> @@ -1776,7 +1796,7 @@ Promise<[WithRequiredProperty](../types/WithRequiredProperty.mdx)<[Cart] ___ -#### setMetadata +### setMetadata `**setMetadata**(cartId, key, value): Promise<[Cart](Cart.mdx)>` @@ -1784,7 +1804,7 @@ Dedicated method to set metadata for a cart. To ensure that plugins does not overwrite each others metadata fields, setMetadata is provided. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Cart](Cart.mdx)> @@ -1834,13 +1854,13 @@ Promise<[Cart](Cart.mdx)> ___ -#### setPaymentSession +### setPaymentSession `**setPaymentSession**(cartId, providerId): Promise<void>` Selects a payment session for a cart and creates a payment object in the external provider system -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -1881,7 +1901,7 @@ Promise<void> ___ -#### setPaymentSessions +### setPaymentSessions `**setPaymentSessions**(cartOrCartId): Promise<void>` @@ -1891,7 +1911,7 @@ provider. Additional calls will ensure that payment sessions have correct amounts, currencies, etc. as well as make sure to filter payment sessions that are not available for the cart's region. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -1923,13 +1943,13 @@ Promise<void> ___ -#### setRegion\_ +### setRegion\_ `Protected **setRegion_**(cart, regionId, countryCode): Promise<void>` Set's the region of a cart. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -1979,11 +1999,11 @@ Promise<void> ___ -#### shouldRetryTransaction\_ +### shouldRetryTransaction\_ `Protected **shouldRetryTransaction_**(err): boolean` -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` @@ -2015,11 +2035,11 @@ ___ ___ -#### transformQueryForTotals\_ +### transformQueryForTotals\_ `Protected **transformQueryForTotals_**(config): [FindConfig](../interfaces/FindConfig.mdx)<[Cart](Cart.mdx)> & { totalsToSelect: [TotalField](../types/TotalField.mdx)[] }` -##### Parameters +#### Parameters -##### Returns +#### Returns [FindConfig](../interfaces/FindConfig.mdx)<[Cart](Cart.mdx)> & ``{ totalsToSelect: [TotalField](../types/TotalField.mdx)[] }`` @@ -2051,11 +2071,11 @@ ___ ___ -#### update +### update `**update**(cartOrId, data): Promise<[Cart](Cart.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Cart](Cart.mdx)> @@ -2096,13 +2116,13 @@ Promise<[Cart](Cart.mdx)> ___ -#### updateBillingAddress\_ +### updateBillingAddress\_ `Protected **updateBillingAddress_**(cart, addressOrId, addrRepo): Promise<void>` Updates the cart's billing address. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -2152,13 +2172,13 @@ Promise<void> ___ -#### updateCustomerId\_ +### updateCustomerId\_ `Protected **updateCustomerId_**(cart, customerId): Promise<void>` Sets the customer id of a cart -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -2199,13 +2219,13 @@ Promise<void> ___ -#### updateLineItem +### updateLineItem `**updateLineItem**(cartId, lineItemId, update): Promise<[Cart](Cart.mdx)>` Updates a cart's existing line item. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Cart](Cart.mdx)> @@ -2255,13 +2275,13 @@ Promise<[Cart](Cart.mdx)> ___ -#### updatePaymentSession +### updatePaymentSession `**updatePaymentSession**(cartId, update): Promise<[Cart](Cart.mdx)>` Updates the currently selected payment session. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Cart](Cart.mdx)> @@ -2302,13 +2322,13 @@ Promise<[Cart](Cart.mdx)> ___ -#### updateShippingAddress\_ +### updateShippingAddress\_ `Protected **updateShippingAddress_**(cart, addressOrId, addrRepo): Promise<void>` Updates the cart's shipping address. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -2358,11 +2378,11 @@ Promise<void> ___ -#### updateUnitPrices\_ +### updateUnitPrices\_ `Protected **updateUnitPrices_**(cart, regionId?, customer_id?): Promise<void>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -2412,13 +2432,13 @@ Promise<void> ___ -#### validateLineItem +### validateLineItem `Protected **validateLineItem**(sales_channel_id, lineItem): Promise<boolean>` Check if line item's variant belongs to the cart's sales channel. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<boolean> @@ -2468,7 +2488,7 @@ Promise<boolean> ___ -#### validateLineItemShipping\_ +### validateLineItemShipping\_ `Protected **validateLineItemShipping_**(shippingMethods, lineItemShippingProfiledId): boolean` @@ -2476,7 +2496,7 @@ Checks if a given line item has a shipping method that can fulfill it. Returns true if all products in the cart can be fulfilled with the current shipping methods. -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` @@ -2517,11 +2537,11 @@ shipping methods. ___ -#### withTransaction +### withTransaction `**withTransaction**(transactionManager?): [CartService](CartService.mdx)` -##### Parameters +#### Parameters -##### Returns +#### Returns [CartService](CartService.mdx) diff --git a/www/apps/docs/content/references/services/classes/ClaimImage.mdx b/www/apps/docs/content/references/services/classes/ClaimImage.mdx index 70fd2763f7..3b3d965a0f 100644 --- a/www/apps/docs/content/references/services/classes/ClaimImage.mdx +++ b/www/apps/docs/content/references/services/classes/ClaimImage.mdx @@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes" The details of an image attached to a claim. -## Constructors - -#### constructor +## constructor `**new ClaimImage**()` The details of an image attached to a claim. +___ + ## Properties +___ + ## Methods -#### beforeInsert +### beforeInsert `Private **beforeInsert**(): void` -##### Returns +#### Returns `void` diff --git a/www/apps/docs/content/references/services/classes/ClaimItem.mdx b/www/apps/docs/content/references/services/classes/ClaimItem.mdx index fa71c94f93..73102d91a9 100644 --- a/www/apps/docs/content/references/services/classes/ClaimItem.mdx +++ b/www/apps/docs/content/references/services/classes/ClaimItem.mdx @@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes" A claim item is an item created as part of a claim. It references an item in the order that should be exchanged or refunded. -## Constructors - -#### constructor +## constructor `**new ClaimItem**()` A claim item is an item created as part of a claim. It references an item in the order that should be exchanged or refunded. +___ + ## Properties +___ + ## Methods -#### beforeInsert +### beforeInsert `Private **beforeInsert**(): void` -##### Returns +#### Returns `void` diff --git a/www/apps/docs/content/references/services/classes/ClaimItemService.mdx b/www/apps/docs/content/references/services/classes/ClaimItemService.mdx index 7eb037b465..d935274fc7 100644 --- a/www/apps/docs/content/references/services/classes/ClaimItemService.mdx +++ b/www/apps/docs/content/references/services/classes/ClaimItemService.mdx @@ -6,13 +6,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes" # ClaimItemService -## Constructors - -#### constructor +## constructor `**new ClaimItemService**(«destructured»)` -##### Parameters +### Parameters +___ + ## Properties +___ + ## Accessors -#### activeManager\_ +### activeManager\_ - `Protected` **activeManager\_**: [object Object] +`Protected get**activeManager_**(): EntityManager` + +#### Returns + +EntityManager + + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ `Protected **atomicPhase_**(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise<TResult>` @@ -173,7 +193,7 @@ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<TResult> @@ -246,11 +266,11 @@ Promise<TResult> ___ -#### create +### create `**create**(data): Promise<[ClaimItem](ClaimItem.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ClaimItem](ClaimItem.mdx)> @@ -282,11 +302,11 @@ Promise<[ClaimItem](ClaimItem.mdx)> ___ -#### list +### list `**list**(selector, config?): Promise<[ClaimItem](ClaimItem.mdx)[]>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ClaimItem](ClaimItem.mdx)[]> @@ -327,13 +347,13 @@ Promise<[ClaimItem](ClaimItem.mdx)[]> ___ -#### retrieve +### retrieve `**retrieve**(claimItemId, config?): Promise<[ClaimItem](ClaimItem.mdx)>` Gets a claim item by id. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ClaimItem](ClaimItem.mdx)> @@ -374,11 +394,11 @@ Promise<[ClaimItem](ClaimItem.mdx)> ___ -#### shouldRetryTransaction\_ +### shouldRetryTransaction\_ `Protected **shouldRetryTransaction_**(err): boolean` -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` @@ -410,11 +430,11 @@ ___ ___ -#### update +### update `**update**(id, data): Promise<[ClaimItem](ClaimItem.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ClaimItem](ClaimItem.mdx)> @@ -455,11 +475,11 @@ Promise<[ClaimItem](ClaimItem.mdx)> ___ -#### withTransaction +### withTransaction `**withTransaction**(transactionManager?): [ClaimItemService](ClaimItemService.mdx)` -##### Parameters +#### Parameters -##### Returns +#### Returns [ClaimItemService](ClaimItemService.mdx) diff --git a/www/apps/docs/content/references/services/classes/ClaimOrder.mdx b/www/apps/docs/content/references/services/classes/ClaimOrder.mdx index 88dc988005..1bf2282347 100644 --- a/www/apps/docs/content/references/services/classes/ClaimOrder.mdx +++ b/www/apps/docs/content/references/services/classes/ClaimOrder.mdx @@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes" A Claim represents a group of faulty or missing items. It consists of claim items that refer to items in the original order that should be replaced or refunded. It also includes details related to shipping and fulfillment. -## Constructors - -#### constructor +## constructor `**new ClaimOrder**()` A Claim represents a group of faulty or missing items. It consists of claim items that refer to items in the original order that should be replaced or refunded. It also includes details related to shipping and fulfillment. +___ + ## Properties +___ + ## Methods -#### beforeInsert +### beforeInsert `Private **beforeInsert**(): void` -##### Returns +#### Returns `void` diff --git a/www/apps/docs/content/references/services/classes/ClaimService.mdx b/www/apps/docs/content/references/services/classes/ClaimService.mdx index f58f205137..e71395a727 100644 --- a/www/apps/docs/content/references/services/classes/ClaimService.mdx +++ b/www/apps/docs/content/references/services/classes/ClaimService.mdx @@ -6,13 +6,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes" # ClaimService -## Constructors - -#### constructor +## constructor `**new ClaimService**(«destructured»)` -##### Parameters +### Parameters +___ + ## Properties +___ + ## Accessors -#### activeManager\_ +### activeManager\_ - `Protected` **activeManager\_**: [object Object] +`Protected get**activeManager_**(): EntityManager` + +#### Returns + +EntityManager + + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ `Protected **atomicPhase_**(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise<TResult>` @@ -299,7 +319,7 @@ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<TResult> @@ -372,11 +392,11 @@ Promise<TResult> ___ -#### cancel +### cancel `**cancel**(id): Promise<[ClaimOrder](ClaimOrder.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ClaimOrder](ClaimOrder.mdx)> @@ -408,11 +428,11 @@ Promise<[ClaimOrder](ClaimOrder.mdx)> ___ -#### cancelFulfillment +### cancelFulfillment `**cancelFulfillment**(fulfillmentId): Promise<[ClaimOrder](ClaimOrder.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ClaimOrder](ClaimOrder.mdx)> @@ -444,7 +464,7 @@ Promise<[ClaimOrder](ClaimOrder.mdx)> ___ -#### create +### create `**create**(data): Promise<[ClaimOrder](ClaimOrder.mdx)>` @@ -452,7 +472,7 @@ Creates a Claim on an Order. Claims consists of items that are claimed and optionally items to be sent as replacement for the claimed items. The shipping address that the new items will be shipped to -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ClaimOrder](ClaimOrder.mdx)> @@ -484,11 +504,11 @@ Promise<[ClaimOrder](ClaimOrder.mdx)> ___ -#### createFulfillment +### createFulfillment `**createFulfillment**(id, config?): Promise<[ClaimOrder](ClaimOrder.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ClaimOrder](ClaimOrder.mdx)> @@ -556,11 +576,11 @@ Promise<[ClaimOrder](ClaimOrder.mdx)> ___ -#### createShipment +### createShipment `**createShipment**(id, fulfillmentId, trackingLinks?, config?): Promise<[ClaimOrder](ClaimOrder.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ClaimOrder](ClaimOrder.mdx)> @@ -637,7 +657,7 @@ Promise<[ClaimOrder](ClaimOrder.mdx)> ___ -#### getRefundTotalForClaimLinesOnOrder +### getRefundTotalForClaimLinesOnOrder `Protected **getRefundTotalForClaimLinesOnOrder**(order, claimItems): Promise<number>` @@ -648,7 +668,7 @@ There are three places too look: - Claim items (from previous claims) Note, it will attempt to return early from each of these places to avoid having to iterate over all items every time. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<number> @@ -689,11 +709,11 @@ Promise<number> ___ -#### list +### list `**list**(selector, config?): Promise<[ClaimOrder](ClaimOrder.mdx)[]>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ClaimOrder](ClaimOrder.mdx)[]> @@ -734,11 +754,11 @@ Promise<[ClaimOrder](ClaimOrder.mdx)[]> ___ -#### processRefund +### processRefund `**processRefund**(id): Promise<[ClaimOrder](ClaimOrder.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ClaimOrder](ClaimOrder.mdx)> @@ -770,13 +790,13 @@ Promise<[ClaimOrder](ClaimOrder.mdx)> ___ -#### retrieve +### retrieve `**retrieve**(claimId, config?): Promise<[ClaimOrder](ClaimOrder.mdx)>` Gets an order by id. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ClaimOrder](ClaimOrder.mdx)> @@ -817,11 +837,11 @@ Promise<[ClaimOrder](ClaimOrder.mdx)> ___ -#### shouldRetryTransaction\_ +### shouldRetryTransaction\_ `Protected **shouldRetryTransaction_**(err): boolean` -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` @@ -853,11 +873,11 @@ ___ ___ -#### update +### update `**update**(id, data): Promise<[ClaimOrder](ClaimOrder.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ClaimOrder](ClaimOrder.mdx)> @@ -898,11 +918,11 @@ Promise<[ClaimOrder](ClaimOrder.mdx)> ___ -#### validateCreateClaimInput +### validateCreateClaimInput `Protected **validateCreateClaimInput**(data): Promise<void>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -934,11 +954,11 @@ Promise<void> ___ -#### withTransaction +### withTransaction `**withTransaction**(transactionManager?): [ClaimService](ClaimService.mdx)` -##### Parameters +#### Parameters -##### Returns +#### Returns [ClaimService](ClaimService.mdx) diff --git a/www/apps/docs/content/references/services/classes/ClaimTag.mdx b/www/apps/docs/content/references/services/classes/ClaimTag.mdx index 13aa2ce592..ad82117b4f 100644 --- a/www/apps/docs/content/references/services/classes/ClaimTag.mdx +++ b/www/apps/docs/content/references/services/classes/ClaimTag.mdx @@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes" Claim Tags are user defined tags that can be assigned to claim items for easy filtering and grouping. -## Constructors - -#### constructor +## constructor `**new ClaimTag**()` Claim Tags are user defined tags that can be assigned to claim items for easy filtering and grouping. +___ + ## Properties +___ + ## Methods -#### beforeInsert +### beforeInsert `Private **beforeInsert**(): void` -##### Returns +#### Returns `void` diff --git a/www/apps/docs/content/references/services/classes/Country.mdx b/www/apps/docs/content/references/services/classes/Country.mdx index 616f640ab1..318620867f 100644 --- a/www/apps/docs/content/references/services/classes/Country.mdx +++ b/www/apps/docs/content/references/services/classes/Country.mdx @@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes" Country details -## Constructors - -#### constructor +## constructor `**new Country**()` Country details +___ + ## Properties +___ + ## Properties +___ + ## Accessors -#### activeManager\_ +### activeManager\_ - `Protected` **activeManager\_**: [object Object] +`Protected get**activeManager_**(): EntityManager` + +#### Returns + +EntityManager + + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ `Protected **atomicPhase_**(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise<TResult>` @@ -137,7 +157,7 @@ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<TResult> @@ -210,14 +230,14 @@ Promise<TResult> ___ -#### listAndCount +### listAndCount `**listAndCount**(selector, config?): Promise<[[Currency](Currency.mdx)[], number]>` Lists currencies based on the provided parameters and includes the count of currencies that match the query. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[[Currency](Currency.mdx)[], number]> @@ -258,13 +278,13 @@ Promise<[[Currency](Currency.mdx)[], number]> ___ -#### retrieveByCode +### retrieveByCode `**retrieveByCode**(code): Promise<[Currency](Currency.mdx)>` Return the currency -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Currency](Currency.mdx)> @@ -296,11 +316,11 @@ Promise<[Currency](Currency.mdx)> ___ -#### shouldRetryTransaction\_ +### shouldRetryTransaction\_ `Protected **shouldRetryTransaction_**(err): boolean` -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` @@ -332,13 +352,13 @@ ___ ___ -#### update +### update `**update**(code, data): Promise<undefined \| [Currency](Currency.mdx)>` Update a currency -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<undefined \| [Currency](Currency.mdx)> @@ -379,11 +399,11 @@ Promise<undefined \| [Currency](Currency.mdx)> ___ -#### withTransaction +### withTransaction `**withTransaction**(transactionManager?): [CurrencyService](CurrencyService.mdx)` -##### Parameters +#### Parameters -##### Returns +#### Returns [CurrencyService](CurrencyService.mdx) diff --git a/www/apps/docs/content/references/services/classes/CustomShippingOption.mdx b/www/apps/docs/content/references/services/classes/CustomShippingOption.mdx index a54f4bb56a..7fce5147e4 100644 --- a/www/apps/docs/content/references/services/classes/CustomShippingOption.mdx +++ b/www/apps/docs/content/references/services/classes/CustomShippingOption.mdx @@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes" Custom Shipping Options are overridden Shipping Options. Admins can attach a Custom Shipping Option to a cart in order to set a custom price for a particular Shipping Option. -## Constructors - -#### constructor +## constructor `**new CustomShippingOption**()` Custom Shipping Options are overridden Shipping Options. Admins can attach a Custom Shipping Option to a cart in order to set a custom price for a particular Shipping Option. +___ + ## Properties +___ + ## Methods -#### beforeInsert +### beforeInsert `Private **beforeInsert**(): void` -##### Returns +#### Returns `void` diff --git a/www/apps/docs/content/references/services/classes/CustomShippingOptionService.mdx b/www/apps/docs/content/references/services/classes/CustomShippingOptionService.mdx index 6032289bae..16796a90e6 100644 --- a/www/apps/docs/content/references/services/classes/CustomShippingOptionService.mdx +++ b/www/apps/docs/content/references/services/classes/CustomShippingOptionService.mdx @@ -6,13 +6,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes" # CustomShippingOptionService -## Constructors - -#### constructor +## constructor `**new CustomShippingOptionService**(«destructured»)` -##### Parameters +### Parameters +___ + ## Properties +___ + ## Accessors -#### activeManager\_ +### activeManager\_ - `Protected` **activeManager\_**: [object Object] +`Protected get**activeManager_**(): EntityManager` + +#### Returns + +EntityManager + + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ `Protected **atomicPhase_**(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise<TResult>` @@ -101,7 +121,7 @@ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<TResult> @@ -174,13 +194,13 @@ Promise<TResult> ___ -#### create +### create `**create**(data): Promise<TResult>` Creates a custom shipping option -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<TResult> @@ -235,13 +255,13 @@ Promise<TResult> ___ -#### list +### list `**list**(selector, config?): Promise<[CustomShippingOption](CustomShippingOption.mdx)[]>` Fetches all custom shipping options based on the given selector -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[CustomShippingOption](CustomShippingOption.mdx)[]> @@ -282,13 +302,13 @@ Promise<[CustomShippingOption](CustomShippingOption.mdx)[]> ___ -#### retrieve +### retrieve `**retrieve**(id, config?): Promise<[CustomShippingOption](CustomShippingOption.mdx)>` Retrieves a specific shipping option. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[CustomShippingOption](CustomShippingOption.mdx)> @@ -329,11 +349,11 @@ Promise<[CustomShippingOption](CustomShippingOption.mdx)> ___ -#### shouldRetryTransaction\_ +### shouldRetryTransaction\_ `Protected **shouldRetryTransaction_**(err): boolean` -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` @@ -365,11 +385,11 @@ ___ ___ -#### withTransaction +### withTransaction `**withTransaction**(transactionManager?): [CustomShippingOptionService](CustomShippingOptionService.mdx)` -##### Parameters +#### Parameters -##### Returns +#### Returns [CustomShippingOptionService](CustomShippingOptionService.mdx) diff --git a/www/apps/docs/content/references/services/classes/Customer.mdx b/www/apps/docs/content/references/services/classes/Customer.mdx index cfb9ab00f0..b463b1d3fc 100644 --- a/www/apps/docs/content/references/services/classes/Customer.mdx +++ b/www/apps/docs/content/references/services/classes/Customer.mdx @@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes" A customer can make purchases in your store and manage their profile. -## Constructors - -#### constructor +## constructor `**new Customer**()` A customer can make purchases in your store and manage their profile. +___ + ## Properties +___ + ## Methods -#### beforeInsert +### beforeInsert `Private **beforeInsert**(): void` -##### Returns +#### Returns `void` diff --git a/www/apps/docs/content/references/services/classes/CustomerGroup.mdx b/www/apps/docs/content/references/services/classes/CustomerGroup.mdx index 5be717861c..9ba2a5aecb 100644 --- a/www/apps/docs/content/references/services/classes/CustomerGroup.mdx +++ b/www/apps/docs/content/references/services/classes/CustomerGroup.mdx @@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes" A customer group that can be used to organize customers into groups of similar traits. -## Constructors - -#### constructor +## constructor `**new CustomerGroup**()` A customer group that can be used to organize customers into groups of similar traits. +___ + ## Properties +___ + ## Methods -#### beforeInsert +### beforeInsert `Private **beforeInsert**(): void` -##### Returns +#### Returns `void` diff --git a/www/apps/docs/content/references/services/classes/CustomerGroupService.mdx b/www/apps/docs/content/references/services/classes/CustomerGroupService.mdx index 11758d0a72..14dfdf481c 100644 --- a/www/apps/docs/content/references/services/classes/CustomerGroupService.mdx +++ b/www/apps/docs/content/references/services/classes/CustomerGroupService.mdx @@ -6,13 +6,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes" # CustomerGroupService -## Constructors - -#### constructor +## constructor `**new CustomerGroupService**(«destructured»)` -##### Parameters +### Parameters +___ + ## Properties +___ + ## Accessors -#### activeManager\_ +### activeManager\_ - `Protected` **activeManager\_**: [object Object] +`Protected get**activeManager_**(): EntityManager` + +#### Returns + +EntityManager + + + +___ ## Methods -#### addCustomers +### addCustomers `**addCustomers**(id, customerIds): Promise<[CustomerGroup](CustomerGroup.mdx)>` Add a batch of customers to a customer group at once -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[CustomerGroup](CustomerGroup.mdx)> @@ -149,7 +169,7 @@ Promise<[CustomerGroup](CustomerGroup.mdx)> ___ -#### atomicPhase\_ +### atomicPhase\_ `Protected **atomicPhase_**(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise<TResult>` @@ -157,7 +177,7 @@ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<TResult> @@ -230,13 +250,13 @@ Promise<TResult> ___ -#### create +### create `**create**(group): Promise<[CustomerGroup](CustomerGroup.mdx)>` Creates a customer group with the provided data. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[CustomerGroup](CustomerGroup.mdx)> @@ -268,13 +288,13 @@ Promise<[CustomerGroup](CustomerGroup.mdx)> ___ -#### delete +### delete `**delete**(groupId): Promise<void>` Remove customer group -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -306,11 +326,11 @@ Promise<void> ___ -#### handleCreationFail +### handleCreationFail `Private **handleCreationFail**(id, ids, error): Promise<never>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<never> @@ -360,13 +380,13 @@ Promise<never> ___ -#### list +### list `**list**(selector?, config): Promise<[CustomerGroup](CustomerGroup.mdx)[]>` List customer groups. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[CustomerGroup](CustomerGroup.mdx)[]> @@ -407,13 +427,13 @@ Promise<[CustomerGroup](CustomerGroup.mdx)[]> ___ -#### listAndCount +### listAndCount `**listAndCount**(selector?, config): Promise<[[CustomerGroup](CustomerGroup.mdx)[], number]>` Retrieve a list of customer groups and total count of records that match the query. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[[CustomerGroup](CustomerGroup.mdx)[], number]> @@ -454,13 +474,13 @@ Promise<[[CustomerGroup](CustomerGroup.mdx)[], number]> ___ -#### removeCustomer +### removeCustomer `**removeCustomer**(id, customerIds): Promise<[CustomerGroup](CustomerGroup.mdx)>` Remove list of customers from a customergroup -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[CustomerGroup](CustomerGroup.mdx)> @@ -501,11 +521,11 @@ Promise<[CustomerGroup](CustomerGroup.mdx)> ___ -#### retrieve +### retrieve `**retrieve**(customerGroupId, config?): Promise<[CustomerGroup](CustomerGroup.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[CustomerGroup](CustomerGroup.mdx)> @@ -546,11 +566,11 @@ Promise<[CustomerGroup](CustomerGroup.mdx)> ___ -#### shouldRetryTransaction\_ +### shouldRetryTransaction\_ `Protected **shouldRetryTransaction_**(err): boolean` -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` @@ -582,13 +602,13 @@ ___ ___ -#### update +### update `**update**(customerGroupId, update): Promise<[CustomerGroup](CustomerGroup.mdx)>` Update a customer group. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[CustomerGroup](CustomerGroup.mdx)> @@ -629,11 +649,11 @@ Promise<[CustomerGroup](CustomerGroup.mdx)> ___ -#### withTransaction +### withTransaction `**withTransaction**(transactionManager?): [CustomerGroupService](CustomerGroupService.mdx)` -##### Parameters +#### Parameters -##### Returns +#### Returns [CustomerGroupService](CustomerGroupService.mdx) diff --git a/www/apps/docs/content/references/services/classes/CustomerGroupUpdate.mdx b/www/apps/docs/content/references/services/classes/CustomerGroupUpdate.mdx index 26cf206754..4644839c22 100644 --- a/www/apps/docs/content/references/services/classes/CustomerGroupUpdate.mdx +++ b/www/apps/docs/content/references/services/classes/CustomerGroupUpdate.mdx @@ -6,12 +6,12 @@ import ParameterTypes from "@site/src/components/ParameterTypes" # CustomerGroupUpdate -## Constructors - -#### constructor +## constructor `**new CustomerGroupUpdate**()` +___ + ## Properties +___ + ## Properties +___ + ## Accessors -#### activeManager\_ +### activeManager\_ - `Protected` **activeManager\_**: [object Object] +`Protected get**activeManager_**(): EntityManager` + +#### Returns + +EntityManager + + + +___ ## Methods -#### addAddress +### addAddress `**addAddress**(customerId, address): Promise<[Customer](Customer.mdx) \| [Address](Address.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Customer](Customer.mdx) \| [Address](Address.mdx)> @@ -194,7 +214,7 @@ Promise<[Customer](Customer.mdx) \| [Address](Address.mdx)> ___ -#### atomicPhase\_ +### atomicPhase\_ `Protected **atomicPhase_**(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise<TResult>` @@ -202,7 +222,7 @@ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<TResult> @@ -275,13 +295,13 @@ Promise<TResult> ___ -#### count +### count `**count**(): Promise<number>` Return the total number of documents in database -##### Returns +#### Returns Promise<number> @@ -299,7 +319,7 @@ Promise<number> ___ -#### create +### create `**create**(customer): Promise<[Customer](Customer.mdx)>` @@ -308,7 +328,7 @@ e.g. to login and view order history, etc. If a password is provided the customer will automatically get an account, otherwise the customer is just used to hold details of customers. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Customer](Customer.mdx)> @@ -340,13 +360,13 @@ Promise<[Customer](Customer.mdx)> ___ -#### delete +### delete `**delete**(customerId): Promise<void \| [Customer](Customer.mdx)>` Deletes a customer from a given customer id. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void \| [Customer](Customer.mdx)> @@ -378,7 +398,7 @@ Promise<void \| [Customer](Customer.mdx)> ___ -#### generateResetPasswordToken +### generateResetPasswordToken `**generateResetPasswordToken**(customerId): Promise<string>` @@ -388,7 +408,7 @@ The token will be signed with the customer's current password hash as a secret a long side a payload with userId and the expiry time for the token, which is always 15 minutes. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<string> @@ -420,13 +440,13 @@ Promise<string> ___ -#### hashPassword\_ +### hashPassword\_ `**hashPassword_**(password): Promise<string>` Hashes a password -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<string> @@ -458,11 +478,11 @@ Promise<string> ___ -#### list +### list `**list**(selector?, config?): Promise<[Customer](Customer.mdx)[]>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Customer](Customer.mdx)[]> @@ -503,11 +523,11 @@ Promise<[Customer](Customer.mdx)[]> ___ -#### listAndCount +### listAndCount `**listAndCount**(selector, config?): Promise<[[Customer](Customer.mdx)[], number]>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[[Customer](Customer.mdx)[], number]> @@ -548,11 +568,11 @@ Promise<[[Customer](Customer.mdx)[], number]> ___ -#### listByEmail +### listByEmail `**listByEmail**(email, config?): Promise<[Customer](Customer.mdx)[]>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Customer](Customer.mdx)[]> @@ -593,11 +613,11 @@ Promise<[Customer](Customer.mdx)[]> ___ -#### removeAddress +### removeAddress `**removeAddress**(customerId, addressId): Promise<void>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -638,13 +658,13 @@ Promise<void> ___ -#### retrieve +### retrieve `**retrieve**(customerId, config?): Promise<[Customer](Customer.mdx)>` Gets a customer by id. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Customer](Customer.mdx)> @@ -685,13 +705,13 @@ Promise<[Customer](Customer.mdx)> ___ -#### retrieveByEmail +### retrieveByEmail `**retrieveByEmail**(email, config?): Promise<[Customer](Customer.mdx)>` Gets a registered customer by email. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Customer](Customer.mdx)> @@ -734,13 +754,13 @@ Promise<[Customer](Customer.mdx)> ___ -#### retrieveByPhone +### retrieveByPhone `**retrieveByPhone**(phone, config?): Promise<[Customer](Customer.mdx)>` Gets a customer by phone. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Customer](Customer.mdx)> @@ -781,11 +801,11 @@ Promise<[Customer](Customer.mdx)> ___ -#### retrieveRegisteredByEmail +### retrieveRegisteredByEmail `**retrieveRegisteredByEmail**(email, config?): Promise<[Customer](Customer.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Customer](Customer.mdx)> @@ -826,11 +846,11 @@ Promise<[Customer](Customer.mdx)> ___ -#### retrieveUnregisteredByEmail +### retrieveUnregisteredByEmail `**retrieveUnregisteredByEmail**(email, config?): Promise<[Customer](Customer.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Customer](Customer.mdx)> @@ -871,11 +891,11 @@ Promise<[Customer](Customer.mdx)> ___ -#### retrieve\_ +### retrieve\_ `Private **retrieve_**(selector, config?): Promise<[Customer](Customer.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Customer](Customer.mdx)> @@ -916,11 +936,11 @@ Promise<[Customer](Customer.mdx)> ___ -#### shouldRetryTransaction\_ +### shouldRetryTransaction\_ `Protected **shouldRetryTransaction_**(err): boolean` -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` @@ -952,13 +972,13 @@ ___ ___ -#### update +### update `**update**(customerId, update): Promise<[Customer](Customer.mdx)>` Updates a customer. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Customer](Customer.mdx)> @@ -999,11 +1019,11 @@ Promise<[Customer](Customer.mdx)> ___ -#### updateAddress +### updateAddress `**updateAddress**(customerId, addressId, address): Promise<[Address](Address.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Address](Address.mdx)> @@ -1053,13 +1073,13 @@ Promise<[Address](Address.mdx)> ___ -#### updateBillingAddress\_ +### updateBillingAddress\_ `**updateBillingAddress_**(customer, addressOrId): Promise<void>` Updates the customers' billing address. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -1100,11 +1120,11 @@ Promise<void> ___ -#### withTransaction +### withTransaction `**withTransaction**(transactionManager?): [CustomerService](CustomerService.mdx)` -##### Parameters +#### Parameters -##### Returns +#### Returns [CustomerService](CustomerService.mdx) diff --git a/www/apps/docs/content/references/services/classes/DateComparisonOperator.mdx b/www/apps/docs/content/references/services/classes/DateComparisonOperator.mdx index a102309ea8..4437543574 100644 --- a/www/apps/docs/content/references/services/classes/DateComparisonOperator.mdx +++ b/www/apps/docs/content/references/services/classes/DateComparisonOperator.mdx @@ -8,12 +8,12 @@ import ParameterTypes from "@site/src/components/ParameterTypes" Fields used to apply flexible filters on dates. -## Constructors - -#### constructor +## constructor `**new DateComparisonOperator**()` +___ + ## Properties +___ + ## Methods -#### upperCaseCodeAndTrim +### upperCaseCodeAndTrim `Private **upperCaseCodeAndTrim**(): void` -##### Returns +#### Returns `void` diff --git a/www/apps/docs/content/references/services/classes/DiscountCondition.mdx b/www/apps/docs/content/references/services/classes/DiscountCondition.mdx index f176735bbb..d821fece0e 100644 --- a/www/apps/docs/content/references/services/classes/DiscountCondition.mdx +++ b/www/apps/docs/content/references/services/classes/DiscountCondition.mdx @@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes" Holds rule conditions for when a discount is applicable -## Constructors - -#### constructor +## constructor `**new DiscountCondition**()` Holds rule conditions for when a discount is applicable +___ + ## Properties +___ + ## Methods -#### beforeInsert +### beforeInsert `Private **beforeInsert**(): void` -##### Returns +#### Returns `void` diff --git a/www/apps/docs/content/references/services/classes/DiscountConditionCustomerGroup.mdx b/www/apps/docs/content/references/services/classes/DiscountConditionCustomerGroup.mdx index 75a579a0b0..c6d745229a 100644 --- a/www/apps/docs/content/references/services/classes/DiscountConditionCustomerGroup.mdx +++ b/www/apps/docs/content/references/services/classes/DiscountConditionCustomerGroup.mdx @@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes" Associates a discount condition with a customer group -## Constructors - -#### constructor +## constructor `**new DiscountConditionCustomerGroup**()` Associates a discount condition with a customer group +___ + ## Properties +___ + ## Properties +___ + ## Accessors -#### activeManager\_ +### activeManager\_ - `Protected` **activeManager\_**: [object Object] +`Protected get**activeManager_**(): EntityManager` + +#### Returns + +EntityManager + + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ `Protected **atomicPhase_**(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise<TResult>` @@ -114,7 +134,7 @@ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<TResult> @@ -187,11 +207,11 @@ Promise<TResult> ___ -#### delete +### delete `**delete**(discountConditionId): Promise<void \| [DiscountCondition](DiscountCondition.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void \| [DiscountCondition](DiscountCondition.mdx)> @@ -223,11 +243,11 @@ Promise<void \| [DiscountCondition](DiscountCondition.mdx)> ___ -#### removeResources +### removeResources `**removeResources**(data): Promise<void>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -259,11 +279,11 @@ Promise<void> ___ -#### retrieve +### retrieve `**retrieve**(conditionId, config?): Promise<[DiscountCondition](DiscountCondition.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[DiscountCondition](DiscountCondition.mdx)> @@ -304,11 +324,11 @@ Promise<[DiscountCondition](DiscountCondition.mdx)> ___ -#### shouldRetryTransaction\_ +### shouldRetryTransaction\_ `Protected **shouldRetryTransaction_**(err): boolean` -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` @@ -340,11 +360,11 @@ ___ ___ -#### upsertCondition +### upsertCondition `**upsertCondition**(data, overrideExisting?): Promise<([DiscountConditionProduct](DiscountConditionProduct.mdx) \| [DiscountConditionProductType](DiscountConditionProductType.mdx) \| [DiscountConditionProductCollection](DiscountConditionProductCollection.mdx) \| [DiscountConditionProductTag](DiscountConditionProductTag.mdx) \| [DiscountConditionCustomerGroup](DiscountConditionCustomerGroup.mdx))[]>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<([DiscountConditionProduct](DiscountConditionProduct.mdx) \| [DiscountConditionProductType](DiscountConditionProductType.mdx) \| [DiscountConditionProductCollection](DiscountConditionProductCollection.mdx) \| [DiscountConditionProductTag](DiscountConditionProductTag.mdx) \| [DiscountConditionCustomerGroup](DiscountConditionCustomerGroup.mdx))[]> @@ -385,11 +405,11 @@ Promise<([DiscountConditionProduct](DiscountConditionProduct.mdx) \| [Discou ___ -#### withTransaction +### withTransaction `**withTransaction**(transactionManager?): [DiscountConditionService](DiscountConditionService.mdx)` -##### Parameters +#### Parameters -##### Returns +#### Returns [DiscountConditionService](DiscountConditionService.mdx) @@ -421,11 +441,11 @@ ___ ___ -#### resolveConditionType\_ +### resolveConditionType\_ `Static Protected **resolveConditionType_**(data): undefined \| { resource_ids: (string \| { id: string })[] ; type: [DiscountConditionType](../enums/DiscountConditionType.mdx) }` -##### Parameters +#### Parameters -##### Returns +#### Returns `undefined` \| ``{ resource_ids: (string \| { id: string })[] ; type: [DiscountConditionType](../enums/DiscountConditionType.mdx) }`` diff --git a/www/apps/docs/content/references/services/classes/DiscountRule.mdx b/www/apps/docs/content/references/services/classes/DiscountRule.mdx index 94de254561..1d1cfd6c1a 100644 --- a/www/apps/docs/content/references/services/classes/DiscountRule.mdx +++ b/www/apps/docs/content/references/services/classes/DiscountRule.mdx @@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes" A discount rule defines how a Discount is calculated when applied to a Cart. -## Constructors - -#### constructor +## constructor `**new DiscountRule**()` A discount rule defines how a Discount is calculated when applied to a Cart. +___ + ## Properties +___ + ## Methods -#### beforeInsert +### beforeInsert `Private **beforeInsert**(): void` -##### Returns +#### Returns `void` diff --git a/www/apps/docs/content/references/services/classes/DiscountService.mdx b/www/apps/docs/content/references/services/classes/DiscountService.mdx index 58f7674384..adc0674174 100644 --- a/www/apps/docs/content/references/services/classes/DiscountService.mdx +++ b/www/apps/docs/content/references/services/classes/DiscountService.mdx @@ -8,15 +8,13 @@ import ParameterTypes from "@site/src/components/ParameterTypes" Provides layer to manipulate discounts. -#### Implements +## Implements -## Constructors - -#### constructor +## constructor `**new DiscountService**(«destructured»)` -##### Parameters +### Parameters +___ + ## Properties +___ + ## Accessors -#### activeManager\_ +### activeManager\_ - `Protected` **activeManager\_**: [object Object] +`Protected get**activeManager_**(): EntityManager` + +#### Returns + +EntityManager + + + +___ ## Methods -#### addRegion +### addRegion `**addRegion**(discountId, regionId): Promise<[Discount](Discount.mdx)>` Adds a region to the discount regions array. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Discount](Discount.mdx)> @@ -243,7 +263,7 @@ Promise<[Discount](Discount.mdx)> ___ -#### atomicPhase\_ +### atomicPhase\_ `Protected **atomicPhase_**(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise<TResult>` @@ -251,7 +271,7 @@ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<TResult> @@ -324,11 +344,11 @@ Promise<TResult> ___ -#### calculateDiscountForLineItem +### calculateDiscountForLineItem `**calculateDiscountForLineItem**(discountId, lineItem, calculationContextData): Promise<number>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<number> @@ -378,11 +398,11 @@ Promise<number> ___ -#### canApplyForCustomer +### canApplyForCustomer `**canApplyForCustomer**(discountRuleId, customerId): Promise<boolean>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<boolean> @@ -423,14 +443,14 @@ Promise<boolean> ___ -#### create +### create `**create**(discount): Promise<[Discount](Discount.mdx)>` Creates a discount with provided data given that the data is validated. Normalizes discount code to uppercase. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Discount](Discount.mdx)> @@ -462,13 +482,13 @@ Promise<[Discount](Discount.mdx)> ___ -#### createDynamicCode +### createDynamicCode `**createDynamicCode**(discountId, data): Promise<[Discount](Discount.mdx)>` Creates a dynamic code for a discount id. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Discount](Discount.mdx)> @@ -509,13 +529,13 @@ Promise<[Discount](Discount.mdx)> ___ -#### delete +### delete `**delete**(discountId): Promise<void>` Deletes a discount idempotently -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -547,13 +567,13 @@ Promise<void> ___ -#### deleteDynamicCode +### deleteDynamicCode `**deleteDynamicCode**(discountId, code): Promise<void>` Deletes a dynamic code for a discount id. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -594,11 +614,11 @@ Promise<void> ___ -#### hasCustomersGroupCondition +### hasCustomersGroupCondition `**hasCustomersGroupCondition**(discount): boolean` -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` @@ -630,11 +650,11 @@ ___ ___ -#### hasExpired +### hasExpired `**hasExpired**(discount): boolean` -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` @@ -666,11 +686,11 @@ ___ ___ -#### hasNotStarted +### hasNotStarted `**hasNotStarted**(discount): boolean` -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` @@ -702,11 +722,11 @@ ___ ___ -#### hasReachedLimit +### hasReachedLimit `**hasReachedLimit**(discount): boolean` -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` @@ -738,11 +758,11 @@ ___ ___ -#### isDisabled +### isDisabled `**isDisabled**(discount): boolean` -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` @@ -774,11 +794,11 @@ ___ ___ -#### isValidForRegion +### isValidForRegion `**isValidForRegion**(discount, region_id): Promise<boolean>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<boolean> @@ -819,11 +839,11 @@ Promise<boolean> ___ -#### list +### list `**list**(selector?, config?): Promise<[Discount](Discount.mdx)[]>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Discount](Discount.mdx)[]> @@ -864,11 +884,11 @@ Promise<[Discount](Discount.mdx)[]> ___ -#### listAndCount +### listAndCount `**listAndCount**(selector?, config?): Promise<[[Discount](Discount.mdx)[], number]>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[[Discount](Discount.mdx)[], number]> @@ -909,13 +929,13 @@ Promise<[[Discount](Discount.mdx)[], number]> ___ -#### listByCodes +### listByCodes `**listByCodes**(discountCodes, config?): Promise<[Discount](Discount.mdx)[]>` List all the discounts corresponding to the given codes -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Discount](Discount.mdx)[]> @@ -956,13 +976,13 @@ Promise<[Discount](Discount.mdx)[]> ___ -#### removeRegion +### removeRegion `**removeRegion**(discountId, regionId): Promise<[Discount](Discount.mdx)>` Removes a region from the discount regions array. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Discount](Discount.mdx)> @@ -1003,13 +1023,13 @@ Promise<[Discount](Discount.mdx)> ___ -#### retrieve +### retrieve `**retrieve**(discountId, config?): Promise<[Discount](Discount.mdx)>` Gets a discount by id. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Discount](Discount.mdx)> @@ -1050,13 +1070,13 @@ Promise<[Discount](Discount.mdx)> ___ -#### retrieveByCode +### retrieveByCode `**retrieveByCode**(discountCode, config?): Promise<[Discount](Discount.mdx)>` Gets the discount by discount code. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Discount](Discount.mdx)> @@ -1097,11 +1117,11 @@ Promise<[Discount](Discount.mdx)> ___ -#### shouldRetryTransaction\_ +### shouldRetryTransaction\_ `Protected **shouldRetryTransaction_**(err): boolean` -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` @@ -1133,13 +1153,13 @@ ___ ___ -#### update +### update `**update**(discountId, update): Promise<[Discount](Discount.mdx)>` Updates a discount. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Discount](Discount.mdx)> @@ -1180,11 +1200,11 @@ Promise<[Discount](Discount.mdx)> ___ -#### validateDiscountForCartOrThrow +### validateDiscountForCartOrThrow `**validateDiscountForCartOrThrow**(cart, discount): Promise<void>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -1225,11 +1245,11 @@ Promise<void> ___ -#### validateDiscountForProduct +### validateDiscountForProduct `**validateDiscountForProduct**(discountRuleId, productId?): Promise<boolean>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<boolean> @@ -1270,13 +1290,13 @@ Promise<boolean> ___ -#### validateDiscountRule\_ +### validateDiscountRule\_ `**validateDiscountRule_**(discountRule): T` Creates a discount rule with provided data given that the data is validated. -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns `T` @@ -1322,11 +1342,11 @@ Creates a discount rule with provided data given that the data is validated. ___ -#### withTransaction +### withTransaction `**withTransaction**(transactionManager?): [DiscountService](DiscountService.mdx)` -##### Parameters +#### Parameters -##### Returns +#### Returns [DiscountService](DiscountService.mdx) diff --git a/www/apps/docs/content/references/services/classes/DraftOrder.mdx b/www/apps/docs/content/references/services/classes/DraftOrder.mdx index 91fa45b752..28aeb290ee 100644 --- a/www/apps/docs/content/references/services/classes/DraftOrder.mdx +++ b/www/apps/docs/content/references/services/classes/DraftOrder.mdx @@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes" A draft order is created by an admin without direct involvement of the customer. Once its payment is marked as captured, it is transformed into an order. -## Constructors - -#### constructor +## constructor `**new DraftOrder**()` A draft order is created by an admin without direct involvement of the customer. Once its payment is marked as captured, it is transformed into an order. +___ + ## Properties +___ + ## Methods -#### beforeInsert +### beforeInsert `Private **beforeInsert**(): Promise<void>` -##### Returns +#### Returns Promise<void> diff --git a/www/apps/docs/content/references/services/classes/DraftOrderService.mdx b/www/apps/docs/content/references/services/classes/DraftOrderService.mdx index 504f3aa8f4..3869e8ad21 100644 --- a/www/apps/docs/content/references/services/classes/DraftOrderService.mdx +++ b/www/apps/docs/content/references/services/classes/DraftOrderService.mdx @@ -8,15 +8,13 @@ import ParameterTypes from "@site/src/components/ParameterTypes" Handles draft orders -#### Implements +## Implements -## Constructors - -#### constructor +## constructor `**new DraftOrderService**(«destructured»)` -##### Parameters +### Parameters +___ + ## Properties +___ + ## Accessors -#### activeManager\_ +### activeManager\_ - `Protected` **activeManager\_**: [object Object] +`Protected get**activeManager_**(): EntityManager` + +#### Returns + +EntityManager + + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ `Protected **atomicPhase_**(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise<TResult>` @@ -204,7 +224,7 @@ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<TResult> @@ -277,13 +297,13 @@ Promise<TResult> ___ -#### create +### create `**create**(data): Promise<[DraftOrder](DraftOrder.mdx)>` Creates a draft order. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[DraftOrder](DraftOrder.mdx)> @@ -315,13 +335,13 @@ Promise<[DraftOrder](DraftOrder.mdx)> ___ -#### delete +### delete `**delete**(draftOrderId): Promise<undefined \| [DraftOrder](DraftOrder.mdx)>` Deletes draft order idempotently. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<undefined \| [DraftOrder](DraftOrder.mdx)> @@ -353,13 +373,13 @@ Promise<undefined \| [DraftOrder](DraftOrder.mdx)> ___ -#### list +### list `**list**(selector, config?): Promise<[DraftOrder](DraftOrder.mdx)[]>` Lists draft orders -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[DraftOrder](DraftOrder.mdx)[]> @@ -400,13 +420,13 @@ Promise<[DraftOrder](DraftOrder.mdx)[]> ___ -#### listAndCount +### listAndCount `**listAndCount**(selector, config?): Promise<[[DraftOrder](DraftOrder.mdx)[], number]>` Lists draft orders alongside the count -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[[DraftOrder](DraftOrder.mdx)[], number]> @@ -447,13 +467,13 @@ Promise<[[DraftOrder](DraftOrder.mdx)[], number]> ___ -#### registerCartCompletion +### registerCartCompletion `**registerCartCompletion**(draftOrderId, orderId): Promise<UpdateResult>` Registers a draft order as completed, when an order has been completed. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<UpdateResult> @@ -494,13 +514,13 @@ Promise<UpdateResult> ___ -#### retrieve +### retrieve `**retrieve**(draftOrderId, config?): Promise<[DraftOrder](DraftOrder.mdx)>` Retrieves a draft order with the given id. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[DraftOrder](DraftOrder.mdx)> @@ -541,13 +561,13 @@ Promise<[DraftOrder](DraftOrder.mdx)> ___ -#### retrieveByCartId +### retrieveByCartId `**retrieveByCartId**(cartId, config?): Promise<[DraftOrder](DraftOrder.mdx)>` Retrieves a draft order based on its associated cart id -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[DraftOrder](DraftOrder.mdx)> @@ -588,11 +608,11 @@ Promise<[DraftOrder](DraftOrder.mdx)> ___ -#### shouldRetryTransaction\_ +### shouldRetryTransaction\_ `Protected **shouldRetryTransaction_**(err): boolean` -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` @@ -624,13 +644,13 @@ ___ ___ -#### update +### update `**update**(id, data): Promise<[DraftOrder](DraftOrder.mdx)>` Updates a draft order with the given data -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[DraftOrder](DraftOrder.mdx)> @@ -680,11 +700,11 @@ Promise<[DraftOrder](DraftOrder.mdx)> ___ -#### withTransaction +### withTransaction `**withTransaction**(transactionManager?): [DraftOrderService](DraftOrderService.mdx)` -##### Parameters +#### Parameters -##### Returns +#### Returns [DraftOrderService](DraftOrderService.mdx) diff --git a/www/apps/docs/content/references/services/classes/EventBusService.mdx b/www/apps/docs/content/references/services/classes/EventBusService.mdx index 48ad4920d5..9877ace7e6 100644 --- a/www/apps/docs/content/references/services/classes/EventBusService.mdx +++ b/www/apps/docs/content/references/services/classes/EventBusService.mdx @@ -13,13 +13,11 @@ subscribers when events happen. Events will run asynchronously. - [IEventBusService](../interfaces/IEventBusService.mdx) -## Constructors - -#### constructor +## constructor `**new EventBusService**(«destructured», config, isSingleton?)` -##### Parameters +### Parameters +___ + ## Properties +___ + ## Accessors -#### activeManager\_ +### activeManager\_ - `Protected` **activeManager\_**: [object Object] +`Protected get**activeManager_**(): EntityManager` + +#### Returns + +EntityManager + + ___ -#### eventBusModuleService\_ +### eventBusModuleService\_ - `Protected` **eventBusModuleService\_**: [object Object] +`Protected get**eventBusModuleService_**(): [IEventBusModuleService](../interfaces/IEventBusModuleService.mdx)` + +#### Returns + +[IEventBusModuleService](../interfaces/IEventBusModuleService.mdx) + + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ `Protected **atomicPhase_**(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise<TResult>` @@ -168,7 +204,7 @@ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<TResult> @@ -241,13 +277,13 @@ Promise<TResult> ___ -#### emit +### emit `**emit**(data): Promise<void \| [StagedJob](StagedJob.mdx)[]>` Calls all subscribers when an event occurs. -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void \| [StagedJob](StagedJob.mdx)[]> @@ -295,7 +331,7 @@ Promise<void \| [StagedJob](StagedJob.mdx)[]> Calls all subscribers when an event occurs. -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void \| [StagedJob](StagedJob.mdx)> @@ -359,11 +395,11 @@ Promise<void \| [StagedJob](StagedJob.mdx)> ___ -#### enqueuer\_ +### enqueuer\_ `**enqueuer_**(): Promise<void>` -##### Returns +#### Returns Promise<void> @@ -381,11 +417,11 @@ Promise<void> ___ -#### listJobs +### listJobs `Protected **listJobs**(listConfig): Promise<never[] \| [StagedJob](StagedJob.mdx)[]>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<never[] \| [StagedJob](StagedJob.mdx)[]> @@ -417,11 +453,11 @@ Promise<never[] \| [StagedJob](StagedJob.mdx)[]> ___ -#### shouldRetryTransaction\_ +### shouldRetryTransaction\_ `Protected **shouldRetryTransaction_**(err): boolean` -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` @@ -453,11 +489,11 @@ ___ ___ -#### startEnqueuer +### startEnqueuer `**startEnqueuer**(): void` -##### Returns +#### Returns `void` @@ -475,11 +511,11 @@ ___ ___ -#### stopEnqueuer +### stopEnqueuer `**stopEnqueuer**(): Promise<void>` -##### Returns +#### Returns Promise<void> @@ -497,13 +533,13 @@ Promise<void> ___ -#### subscribe +### subscribe `**subscribe**(event, subscriber, context?): [EventBusService](EventBusService.mdx)` Adds a function to a list of event subscribers. -##### Parameters +#### Parameters -##### Returns +#### Returns [EventBusService](EventBusService.mdx) @@ -553,13 +589,13 @@ Adds a function to a list of event subscribers. ___ -#### unsubscribe +### unsubscribe `**unsubscribe**(event, subscriber, context): [EventBusService](EventBusService.mdx)` Removes function from the list of event subscribers. -##### Parameters +#### Parameters -##### Returns +#### Returns [EventBusService](EventBusService.mdx) @@ -609,11 +645,11 @@ Removes function from the list of event subscribers. ___ -#### withTransaction +### withTransaction `**withTransaction**(transactionManager?): [EventBusService](EventBusService.mdx)` -##### Parameters +#### Parameters -##### Returns +#### Returns [EventBusService](EventBusService.mdx) diff --git a/www/apps/docs/content/references/services/classes/FilterableBatchJobProps.mdx b/www/apps/docs/content/references/services/classes/FilterableBatchJobProps.mdx index 8eb79316a3..1f901fa7c1 100644 --- a/www/apps/docs/content/references/services/classes/FilterableBatchJobProps.mdx +++ b/www/apps/docs/content/references/services/classes/FilterableBatchJobProps.mdx @@ -6,12 +6,12 @@ import ParameterTypes from "@site/src/components/ParameterTypes" # FilterableBatchJobProps -## Constructors - -#### constructor +## constructor `**new FilterableBatchJobProps**()` +___ + ## Properties +___ + ## Properties +___ + ## Methods -#### isFeatureEnabled +### isFeatureEnabled `**isFeatureEnabled**(flag): boolean` @@ -58,7 +60,7 @@ We use 1. for top-level feature flags and 2. for nested feature flags. Almost al An example of a nested flag is workflows. To use it, you would do: `isFeatureEnabled({ workflows: Workflows.CreateCart })` -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` @@ -90,11 +92,11 @@ An example of a nested flag is workflows. To use it, you would do: ___ -#### listFlags +### listFlags `**listFlags**(): [FeatureFlagsResponse](../types/FeatureFlagsResponse.mdx)` -##### Returns +#### Returns [FeatureFlagsResponse](../types/FeatureFlagsResponse.mdx) @@ -112,7 +114,7 @@ ___ ___ -#### setFlag +### setFlag `**setFlag**(key, value): void` @@ -122,7 +124,7 @@ Flags take two shapes: `setFlag("myFeatureFlag", { nestedFlag: true })` These shapes are used for top-level and nested flags respectively, as explained in isFeatureEnabled. -##### Parameters +#### Parameters -##### Returns +#### Returns `void` diff --git a/www/apps/docs/content/references/services/classes/Fulfillment.mdx b/www/apps/docs/content/references/services/classes/Fulfillment.mdx index aef95de217..100bc8127f 100644 --- a/www/apps/docs/content/references/services/classes/Fulfillment.mdx +++ b/www/apps/docs/content/references/services/classes/Fulfillment.mdx @@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes" A Fulfillment is created once an admin can prepare the purchased goods. Fulfillments will eventually be shipped and hold information about how to track shipments. Fulfillments are created through a fulfillment provider, which typically integrates a third-party shipping service. Fulfillments can be associated with orders, claims, swaps, and returns. -## Constructors - -#### constructor +## constructor `**new Fulfillment**()` A Fulfillment is created once an admin can prepare the purchased goods. Fulfillments will eventually be shipped and hold information about how to track shipments. Fulfillments are created through a fulfillment provider, which typically integrates a third-party shipping service. Fulfillments can be associated with orders, claims, swaps, and returns. +___ + ## Properties +___ + ## Methods -#### beforeInsert +### beforeInsert `Private **beforeInsert**(): void` -##### Returns +#### Returns `void` diff --git a/www/apps/docs/content/references/services/classes/FulfillmentItem.mdx b/www/apps/docs/content/references/services/classes/FulfillmentItem.mdx index e4611e9608..300a078545 100644 --- a/www/apps/docs/content/references/services/classes/FulfillmentItem.mdx +++ b/www/apps/docs/content/references/services/classes/FulfillmentItem.mdx @@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes" This represents the association between a Line Item and a Fulfillment. -## Constructors - -#### constructor +## constructor `**new FulfillmentItem**()` This represents the association between a Line Item and a Fulfillment. +___ + ## Properties +___ + ## Properties +___ + ## Accessors -#### activeManager\_ +### activeManager\_ - `Protected` **activeManager\_**: [object Object] +`Protected get**activeManager_**(): EntityManager` + +#### Returns + +EntityManager + + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ `Protected **atomicPhase_**(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise<TResult>` @@ -112,7 +132,7 @@ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<TResult> @@ -185,11 +205,11 @@ Promise<TResult> ___ -#### calculatePrice +### calculatePrice `**calculatePrice**(option, data, cart?): Promise<number>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<number> @@ -239,11 +259,11 @@ Promise<number> ___ -#### canCalculate +### canCalculate `**canCalculate**(option): Promise<boolean>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<boolean> @@ -275,11 +295,11 @@ Promise<boolean> ___ -#### cancelFulfillment +### cancelFulfillment `**cancelFulfillment**(fulfillment): Promise<[Fulfillment](Fulfillment.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Fulfillment](Fulfillment.mdx)> @@ -311,11 +331,11 @@ Promise<[Fulfillment](Fulfillment.mdx)> ___ -#### createFulfillment +### createFulfillment `**createFulfillment**(method, items, order, fulfillment): Promise<Record<string, unknown>>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<Record<string, unknown>> @@ -374,11 +394,11 @@ Promise<Record<string, unknown>> ___ -#### createReturn +### createReturn `**createReturn**(returnOrder): Promise<Record<string, unknown>>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<Record<string, unknown>> @@ -410,11 +430,11 @@ Promise<Record<string, unknown>> ___ -#### list +### list `**list**(): Promise<[FulfillmentProvider](FulfillmentProvider.mdx)[]>` -##### Returns +#### Returns Promise<[FulfillmentProvider](FulfillmentProvider.mdx)[]> @@ -432,11 +452,11 @@ Promise<[FulfillmentProvider](FulfillmentProvider.mdx)[]> ___ -#### listFulfillmentOptions +### listFulfillmentOptions `**listFulfillmentOptions**(providerIds): Promise<[FulfillmentOptions](../types/FulfillmentOptions.mdx)[]>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[FulfillmentOptions](../types/FulfillmentOptions.mdx)[]> @@ -468,11 +488,11 @@ Promise<[FulfillmentOptions](../types/FulfillmentOptions.mdx)[]> ___ -#### registerInstalledProviders +### registerInstalledProviders `**registerInstalledProviders**(providers): Promise<void>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -504,13 +524,13 @@ Promise<void> ___ -#### retrieveDocuments +### retrieveDocuments `**retrieveDocuments**(providerId, fulfillmentData, documentType): Promise<any>` Fetches documents from the fulfillment provider -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<any> @@ -560,11 +580,11 @@ Promise<any> ___ -#### retrieveProvider +### retrieveProvider `**retrieveProvider**(providerId): any` -##### Parameters +#### Parameters -##### Returns +#### Returns `any` @@ -596,11 +616,11 @@ ___ ___ -#### shouldRetryTransaction\_ +### shouldRetryTransaction\_ `Protected **shouldRetryTransaction_**(err): boolean` -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` @@ -632,11 +652,11 @@ ___ ___ -#### validateFulfillmentData +### validateFulfillmentData `**validateFulfillmentData**(option, data, cart): Promise<Record<string, unknown>>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<Record<string, unknown>> @@ -686,11 +706,11 @@ Promise<Record<string, unknown>> ___ -#### validateOption +### validateOption `**validateOption**(option): Promise<boolean>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<boolean> @@ -722,11 +742,11 @@ Promise<boolean> ___ -#### withTransaction +### withTransaction `**withTransaction**(transactionManager?): [FulfillmentProviderService](FulfillmentProviderService.mdx)` -##### Parameters +#### Parameters -##### Returns +#### Returns [FulfillmentProviderService](FulfillmentProviderService.mdx) diff --git a/www/apps/docs/content/references/services/classes/FulfillmentService.mdx b/www/apps/docs/content/references/services/classes/FulfillmentService.mdx index ff92356a92..ef2df9a9ce 100644 --- a/www/apps/docs/content/references/services/classes/FulfillmentService.mdx +++ b/www/apps/docs/content/references/services/classes/FulfillmentService.mdx @@ -8,13 +8,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes" Handles Fulfillments -## Constructors - -#### constructor +## constructor `**new FulfillmentService**(«destructured»)` -##### Parameters +### Parameters +___ + ## Properties +___ + ## Accessors -#### activeManager\_ +### activeManager\_ - `Protected` **activeManager\_**: [object Object] +`Protected get**activeManager_**(): EntityManager` + +#### Returns + +EntityManager + + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ `Protected **atomicPhase_**(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise<TResult>` @@ -166,7 +186,7 @@ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<TResult> @@ -239,7 +259,7 @@ Promise<TResult> ___ -#### cancelFulfillment +### cancelFulfillment `**cancelFulfillment**(fulfillmentOrId): Promise<[Fulfillment](Fulfillment.mdx)>` @@ -247,7 +267,7 @@ Cancels a fulfillment with the fulfillment provider. Will decrement the fulfillment\_quantity on the line items associated with the fulfillment. Throws if the fulfillment has already been shipped. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Fulfillment](Fulfillment.mdx)> @@ -279,7 +299,7 @@ Promise<[Fulfillment](Fulfillment.mdx)> ___ -#### createFulfillment +### createFulfillment `**createFulfillment**(order, itemsToFulfill, custom?): Promise<[Fulfillment](Fulfillment.mdx)[]>` @@ -288,7 +308,7 @@ If items needs to be fulfilled by different provider, we make sure to partition those items, and create fulfillment for those partitions. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Fulfillment](Fulfillment.mdx)[]> @@ -338,14 +358,14 @@ Promise<[Fulfillment](Fulfillment.mdx)[]> ___ -#### createShipment +### createShipment `**createShipment**(fulfillmentId, trackingLinks?, config?): Promise<[Fulfillment](Fulfillment.mdx)>` Creates a shipment by marking a fulfillment as shipped. Adds tracking links and potentially more metadata. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Fulfillment](Fulfillment.mdx)> @@ -395,13 +415,13 @@ Promise<[Fulfillment](Fulfillment.mdx)> ___ -#### getFulfillmentItems\_ +### getFulfillmentItems\_ `**getFulfillmentItems_**(order, items): Promise<(null \| [LineItem](LineItem.mdx))[]>` Retrieves the order line items, given an array of items. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<(null \| [LineItem](LineItem.mdx))[]> @@ -442,11 +462,11 @@ Promise<(null \| [LineItem](LineItem.mdx))[]> ___ -#### partitionItems\_ +### partitionItems\_ `**partitionItems_**(shippingMethods, items): [FulfillmentItemPartition](../types/FulfillmentItemPartition.mdx)[]` -##### Parameters +#### Parameters -##### Returns +#### Returns [FulfillmentItemPartition](../types/FulfillmentItemPartition.mdx)[] @@ -487,13 +507,13 @@ ___ ___ -#### retrieve +### retrieve `**retrieve**(fulfillmentId, config?): Promise<[Fulfillment](Fulfillment.mdx)>` Retrieves a fulfillment by its id. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Fulfillment](Fulfillment.mdx)> @@ -534,11 +554,11 @@ Promise<[Fulfillment](Fulfillment.mdx)> ___ -#### shouldRetryTransaction\_ +### shouldRetryTransaction\_ `Protected **shouldRetryTransaction_**(err): boolean` -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` @@ -570,7 +590,7 @@ ___ ___ -#### validateFulfillmentLineItem\_ +### validateFulfillmentLineItem\_ `**validateFulfillmentLineItem_**(item, quantity): null \| [LineItem](LineItem.mdx)` @@ -579,7 +599,7 @@ fulfillable quantity is lower than the requested fulfillment quantity. Fulfillable quantity is calculated by subtracting the already fulfilled quantity from the quantity that was originally purchased. -##### Parameters +#### Parameters -##### Returns +#### Returns `null` \| [LineItem](LineItem.mdx) @@ -620,11 +640,11 @@ quantity from the quantity that was originally purchased. ___ -#### withTransaction +### withTransaction `**withTransaction**(transactionManager?): [FulfillmentService](FulfillmentService.mdx)` -##### Parameters +#### Parameters -##### Returns +#### Returns [FulfillmentService](FulfillmentService.mdx) diff --git a/www/apps/docs/content/references/services/classes/GiftCard-1.mdx b/www/apps/docs/content/references/services/classes/GiftCard-1.mdx index e104149f30..789b89085d 100644 --- a/www/apps/docs/content/references/services/classes/GiftCard-1.mdx +++ b/www/apps/docs/content/references/services/classes/GiftCard-1.mdx @@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes" Gift Cards are redeemable and represent a value that can be used towards the payment of an Order. -## Constructors - -#### constructor +## constructor `**new GiftCard**()` Gift Cards are redeemable and represent a value that can be used towards the payment of an Order. +___ + ## Properties +___ + ## Methods -#### beforeInsert +### beforeInsert `Private **beforeInsert**(): void` -##### Returns +#### Returns `void` diff --git a/www/apps/docs/content/references/services/classes/GiftCardService.mdx b/www/apps/docs/content/references/services/classes/GiftCardService.mdx index 3f593ab311..20d3c21843 100644 --- a/www/apps/docs/content/references/services/classes/GiftCardService.mdx +++ b/www/apps/docs/content/references/services/classes/GiftCardService.mdx @@ -8,13 +8,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes" Provides layer to manipulate gift cards. -## Constructors - -#### constructor +## constructor `**new GiftCardService**(«destructured»)` -##### Parameters +### Parameters +___ + ## Properties +___ + ## Accessors -#### activeManager\_ +### activeManager\_ - `Protected` **activeManager\_**: [object Object] +`Protected get**activeManager_**(): EntityManager` + +#### Returns + +EntityManager + + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ `Protected **atomicPhase_**(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise<TResult>` @@ -148,7 +168,7 @@ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<TResult> @@ -221,13 +241,13 @@ Promise<TResult> ___ -#### create +### create `**create**(giftCard): Promise<[GiftCard](GiftCard.mdx)>` Creates a gift card with provided data given that the data is validated. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[GiftCard](GiftCard.mdx)> @@ -259,11 +279,11 @@ Promise<[GiftCard](GiftCard.mdx)> ___ -#### createTransaction +### createTransaction `**createTransaction**(data): Promise<string>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<string> @@ -295,13 +315,13 @@ Promise<string> ___ -#### delete +### delete `**delete**(giftCardId): Promise<void \| [GiftCard](GiftCard.mdx)>` Deletes a gift card idempotently -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void \| [GiftCard](GiftCard.mdx)> @@ -333,11 +353,11 @@ Promise<void \| [GiftCard](GiftCard.mdx)> ___ -#### list +### list `**list**(selector?, config?): Promise<[GiftCard](GiftCard.mdx)[]>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[GiftCard](GiftCard.mdx)[]> @@ -378,11 +398,11 @@ Promise<[GiftCard](GiftCard.mdx)[]> ___ -#### listAndCount +### listAndCount `**listAndCount**(selector?, config?): Promise<[[GiftCard](GiftCard.mdx)[], number]>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[[GiftCard](GiftCard.mdx)[], number]> @@ -423,13 +443,13 @@ Promise<[[GiftCard](GiftCard.mdx)[], number]> ___ -#### retrieve +### retrieve `**retrieve**(giftCardId, config?): Promise<[GiftCard](GiftCard.mdx)>` Gets a gift card by id. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[GiftCard](GiftCard.mdx)> @@ -470,11 +490,11 @@ Promise<[GiftCard](GiftCard.mdx)> ___ -#### retrieveByCode +### retrieveByCode `**retrieveByCode**(code, config?): Promise<[GiftCard](GiftCard.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[GiftCard](GiftCard.mdx)> @@ -515,11 +535,11 @@ Promise<[GiftCard](GiftCard.mdx)> ___ -#### retrieve\_ +### retrieve\_ `Protected **retrieve_**(selector, config?): Promise<[GiftCard](GiftCard.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[GiftCard](GiftCard.mdx)> @@ -560,11 +580,11 @@ Promise<[GiftCard](GiftCard.mdx)> ___ -#### shouldRetryTransaction\_ +### shouldRetryTransaction\_ `Protected **shouldRetryTransaction_**(err): boolean` -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` @@ -596,13 +616,13 @@ ___ ___ -#### update +### update `**update**(giftCardId, update): Promise<[GiftCard](GiftCard.mdx)>` Updates a giftCard. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[GiftCard](GiftCard.mdx)> @@ -643,11 +663,11 @@ Promise<[GiftCard](GiftCard.mdx)> ___ -#### withTransaction +### withTransaction `**withTransaction**(transactionManager?): [GiftCardService](GiftCardService.mdx)` -##### Parameters +#### Parameters -##### Returns +#### Returns [GiftCardService](GiftCardService.mdx) @@ -679,13 +699,13 @@ ___ ___ -#### generateCode +### generateCode `Static **generateCode**(): string` Generates a 16 character gift card code -##### Returns +#### Returns `string` @@ -703,14 +723,14 @@ Generates a 16 character gift card code ___ -#### resolveTaxRate +### resolveTaxRate `Static Protected **resolveTaxRate**(giftCardTaxRate, region): null \| number` The tax\_rate of the giftcard can depend on whether regions tax gift cards, an input provided by the user or the tax rate. Based on these conditions, tax\_rate changes. -##### Parameters +#### Parameters -##### Returns +#### Returns `null` \| `number` diff --git a/www/apps/docs/content/references/services/classes/GiftCardTransaction.mdx b/www/apps/docs/content/references/services/classes/GiftCardTransaction.mdx index d2a059eeb2..fc8b17114b 100644 --- a/www/apps/docs/content/references/services/classes/GiftCardTransaction.mdx +++ b/www/apps/docs/content/references/services/classes/GiftCardTransaction.mdx @@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes" Gift Card Transactions are created once a Customer uses a Gift Card to pay for their Order. -## Constructors - -#### constructor +## constructor `**new GiftCardTransaction**()` Gift Card Transactions are created once a Customer uses a Gift Card to pay for their Order. +___ + ## Properties +___ + ## Methods -#### beforeInsert +### beforeInsert `Private **beforeInsert**(): void` -##### Returns +#### Returns `void` diff --git a/www/apps/docs/content/references/services/classes/IdempotencyKey.mdx b/www/apps/docs/content/references/services/classes/IdempotencyKey.mdx index 91d4e0e08f..9187871667 100644 --- a/www/apps/docs/content/references/services/classes/IdempotencyKey.mdx +++ b/www/apps/docs/content/references/services/classes/IdempotencyKey.mdx @@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes" Idempotency Key is used to continue a process in case of any failure that might occur. -## Constructors - -#### constructor +## constructor `**new IdempotencyKey**()` Idempotency Key is used to continue a process in case of any failure that might occur. +___ + ## Properties +___ + ## Methods -#### beforeInsert +### beforeInsert `Private **beforeInsert**(): void` -##### Returns +#### Returns `void` diff --git a/www/apps/docs/content/references/services/classes/IdempotencyKeyService.mdx b/www/apps/docs/content/references/services/classes/IdempotencyKeyService.mdx index 0012f57d9b..4679d17e04 100644 --- a/www/apps/docs/content/references/services/classes/IdempotencyKeyService.mdx +++ b/www/apps/docs/content/references/services/classes/IdempotencyKeyService.mdx @@ -6,13 +6,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes" # IdempotencyKeyService -## Constructors - -#### constructor +## constructor `**new IdempotencyKeyService**(«destructured»)` -##### Parameters +### Parameters +___ + ## Properties +___ + ## Accessors -#### activeManager\_ +### activeManager\_ - `Protected` **activeManager\_**: [object Object] +`Protected get**activeManager_**(): EntityManager` + +#### Returns + +EntityManager + + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ `Protected **atomicPhase_**(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise<TResult>` @@ -101,7 +121,7 @@ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<TResult> @@ -174,7 +194,7 @@ Promise<TResult> ___ -#### create +### create `**create**(payload): Promise<[IdempotencyKey](IdempotencyKey.mdx)>` @@ -182,7 +202,7 @@ Creates an idempotency key for a request. If no idempotency key is provided in request, we will create a unique identifier. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[IdempotencyKey](IdempotencyKey.mdx)> @@ -214,13 +234,13 @@ Promise<[IdempotencyKey](IdempotencyKey.mdx)> ___ -#### initializeRequest +### initializeRequest `**initializeRequest**(headerKey, reqMethod, reqParams, reqPath): Promise<[IdempotencyKey](IdempotencyKey.mdx)>` Execute the initial steps in a idempotent request. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[IdempotencyKey](IdempotencyKey.mdx)> @@ -279,13 +299,13 @@ Promise<[IdempotencyKey](IdempotencyKey.mdx)> ___ -#### lock +### lock `**lock**(idempotencyKey): Promise<[IdempotencyKey](IdempotencyKey.mdx)>` Locks an idempotency. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[IdempotencyKey](IdempotencyKey.mdx)> @@ -317,13 +337,13 @@ Promise<[IdempotencyKey](IdempotencyKey.mdx)> ___ -#### retrieve +### retrieve `**retrieve**(idempotencyKeyOrSelector): Promise<[IdempotencyKey](IdempotencyKey.mdx)>` Retrieves an idempotency key -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[IdempotencyKey](IdempotencyKey.mdx)> @@ -355,11 +375,11 @@ Promise<[IdempotencyKey](IdempotencyKey.mdx)> ___ -#### shouldRetryTransaction\_ +### shouldRetryTransaction\_ `Protected **shouldRetryTransaction_**(err): boolean` -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` @@ -391,13 +411,13 @@ ___ ___ -#### update +### update `**update**(idempotencyKey, update): Promise<[IdempotencyKey](IdempotencyKey.mdx)>` Locks an idempotency. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[IdempotencyKey](IdempotencyKey.mdx)> @@ -438,11 +458,11 @@ Promise<[IdempotencyKey](IdempotencyKey.mdx)> ___ -#### withTransaction +### withTransaction `**withTransaction**(transactionManager?): [IdempotencyKeyService](IdempotencyKeyService.mdx)` -##### Parameters +#### Parameters -##### Returns +#### Returns [IdempotencyKeyService](IdempotencyKeyService.mdx) @@ -474,7 +494,7 @@ ___ ___ -#### workStage +### workStage `**workStage**(idempotencyKey, callback): Promise<[IdempotencyKey](IdempotencyKey.mdx)>` @@ -484,7 +504,7 @@ transactionally executed in isolation. An idempotent request will always consist of 2 or more of these phases. The required phases are "started" and "finished". -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[IdempotencyKey](IdempotencyKey.mdx)> diff --git a/www/apps/docs/content/references/services/classes/Image.mdx b/www/apps/docs/content/references/services/classes/Image.mdx index 590d39216e..69e6af879e 100644 --- a/www/apps/docs/content/references/services/classes/Image.mdx +++ b/www/apps/docs/content/references/services/classes/Image.mdx @@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes" An Image is used to store details about uploaded images. Images are uploaded by the File Service, and the URL is provided by the File Service. -## Constructors - -#### constructor +## constructor `**new Image**()` An Image is used to store details about uploaded images. Images are uploaded by the File Service, and the URL is provided by the File Service. +___ + ## Properties +___ + ## Methods -#### beforeInsert +### beforeInsert `Private **beforeInsert**(): void` -##### Returns +#### Returns `void` diff --git a/www/apps/docs/content/references/services/classes/LineItem.mdx b/www/apps/docs/content/references/services/classes/LineItem.mdx index 9797b8b4b6..305196fdfb 100644 --- a/www/apps/docs/content/references/services/classes/LineItem.mdx +++ b/www/apps/docs/content/references/services/classes/LineItem.mdx @@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes" Line Items are created when a product is added to a Cart. When Line Items are purchased they will get copied to the resulting order, swap, or claim, and can eventually be referenced in Fulfillments and Returns. Line items may also be used for order edits. -## Constructors - -#### constructor +## constructor `**new LineItem**()` Line Items are created when a product is added to a Cart. When Line Items are purchased they will get copied to the resulting order, swap, or claim, and can eventually be referenced in Fulfillments and Returns. Line items may also be used for order edits. +___ + ## Properties +___ + ## Methods -#### afterUpdateOrLoad +### afterUpdateOrLoad `**afterUpdateOrLoad**(): void` -##### Returns +#### Returns `void` @@ -433,11 +435,11 @@ Line Items are created when a product is added to a Cart. When Line Items are pu ___ -#### beforeInsert +### beforeInsert `Private **beforeInsert**(): void` -##### Returns +#### Returns `void` @@ -455,11 +457,11 @@ ___ ___ -#### beforeUpdate +### beforeUpdate `**beforeUpdate**(): void` -##### Returns +#### Returns `void` diff --git a/www/apps/docs/content/references/services/classes/LineItemAdjustment.mdx b/www/apps/docs/content/references/services/classes/LineItemAdjustment.mdx index 4053d73a15..f96397678b 100644 --- a/www/apps/docs/content/references/services/classes/LineItemAdjustment.mdx +++ b/www/apps/docs/content/references/services/classes/LineItemAdjustment.mdx @@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes" A Line Item Adjustment includes details on discounts applied on a line item. -## Constructors - -#### constructor +## constructor `**new LineItemAdjustment**()` A Line Item Adjustment includes details on discounts applied on a line item. +___ + ## Properties +___ + ## Methods -#### beforeInsert +### beforeInsert `Private **beforeInsert**(): void` -##### Returns +#### Returns `void` diff --git a/www/apps/docs/content/references/services/classes/LineItemAdjustmentService.mdx b/www/apps/docs/content/references/services/classes/LineItemAdjustmentService.mdx index 0a0744164b..4a49c7ddff 100644 --- a/www/apps/docs/content/references/services/classes/LineItemAdjustmentService.mdx +++ b/www/apps/docs/content/references/services/classes/LineItemAdjustmentService.mdx @@ -8,13 +8,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes" Provides layer to manipulate line item adjustments. -## Constructors - -#### constructor +## constructor `**new LineItemAdjustmentService**(«destructured»)` -##### Parameters +### Parameters +___ + ## Properties +___ + ## Accessors -#### activeManager\_ +### activeManager\_ - `Protected` **activeManager\_**: [object Object] +`Protected get**activeManager_**(): EntityManager` + +#### Returns + +EntityManager + + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ `Protected **atomicPhase_**(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise<TResult>` @@ -112,7 +132,7 @@ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<TResult> @@ -185,13 +205,13 @@ Promise<TResult> ___ -#### create +### create `**create**(data): Promise<[LineItemAdjustment](LineItemAdjustment.mdx)>` Creates a line item adjustment -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[LineItemAdjustment](LineItemAdjustment.mdx)> @@ -223,13 +243,13 @@ Promise<[LineItemAdjustment](LineItemAdjustment.mdx)> ___ -#### createAdjustmentForLineItem +### createAdjustmentForLineItem `**createAdjustmentForLineItem**(cart, lineItem): Promise<[LineItemAdjustment](LineItemAdjustment.mdx)[]>` Creates adjustment for a line item -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[LineItemAdjustment](LineItemAdjustment.mdx)[]> @@ -270,13 +290,13 @@ Promise<[LineItemAdjustment](LineItemAdjustment.mdx)[]> ___ -#### createAdjustments +### createAdjustments `**createAdjustments**(cart, lineItem?): Promise<[LineItemAdjustment](LineItemAdjustment.mdx)[] \| [LineItemAdjustment](LineItemAdjustment.mdx)[][]>` Creates adjustment for a line item -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[LineItemAdjustment](LineItemAdjustment.mdx)[] \| [LineItemAdjustment](LineItemAdjustment.mdx)[][]> @@ -317,13 +337,13 @@ Promise<[LineItemAdjustment](LineItemAdjustment.mdx)[] \| [LineItemAdjustmen ___ -#### delete +### delete `**delete**(selectorOrIds): Promise<void>` Deletes line item adjustments matching a selector -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -355,13 +375,13 @@ Promise<void> ___ -#### generateAdjustments +### generateAdjustments `**generateAdjustments**(calculationContextData, generatedLineItem, context): Promise<[GeneratedAdjustment](../types/GeneratedAdjustment.mdx)[]>` Creates adjustment for a line item -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[GeneratedAdjustment](../types/GeneratedAdjustment.mdx)[]> @@ -411,13 +431,13 @@ Promise<[GeneratedAdjustment](../types/GeneratedAdjustment.mdx)[]> ___ -#### list +### list `**list**(selector?, config?): Promise<[LineItemAdjustment](LineItemAdjustment.mdx)[]>` Lists line item adjustments -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[LineItemAdjustment](LineItemAdjustment.mdx)[]> @@ -458,13 +478,13 @@ Promise<[LineItemAdjustment](LineItemAdjustment.mdx)[]> ___ -#### retrieve +### retrieve `**retrieve**(lineItemAdjustmentId, config?): Promise<[LineItemAdjustment](LineItemAdjustment.mdx)>` Retrieves a line item adjustment by id. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[LineItemAdjustment](LineItemAdjustment.mdx)> @@ -505,11 +525,11 @@ Promise<[LineItemAdjustment](LineItemAdjustment.mdx)> ___ -#### shouldRetryTransaction\_ +### shouldRetryTransaction\_ `Protected **shouldRetryTransaction_**(err): boolean` -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` @@ -541,13 +561,13 @@ ___ ___ -#### update +### update `**update**(id, data): Promise<[LineItemAdjustment](LineItemAdjustment.mdx)>` Creates a line item adjustment -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[LineItemAdjustment](LineItemAdjustment.mdx)> @@ -588,11 +608,11 @@ Promise<[LineItemAdjustment](LineItemAdjustment.mdx)> ___ -#### withTransaction +### withTransaction `**withTransaction**(transactionManager?): [LineItemAdjustmentService](LineItemAdjustmentService.mdx)` -##### Parameters +#### Parameters -##### Returns +#### Returns [LineItemAdjustmentService](LineItemAdjustmentService.mdx) diff --git a/www/apps/docs/content/references/services/classes/LineItemService.mdx b/www/apps/docs/content/references/services/classes/LineItemService.mdx index ac99cdbd5e..d78dab8d67 100644 --- a/www/apps/docs/content/references/services/classes/LineItemService.mdx +++ b/www/apps/docs/content/references/services/classes/LineItemService.mdx @@ -6,13 +6,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes" # LineItemService -## Constructors - -#### constructor +## constructor `**new LineItemService**(«destructured»)` -##### Parameters +### Parameters +___ + ## Properties +___ + ## Accessors -#### activeManager\_ +### activeManager\_ - `Protected` **activeManager\_**: [object Object] +`Protected get**activeManager_**(): EntityManager` + +#### Returns + +EntityManager + + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ `Protected **atomicPhase_**(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise<TResult>` @@ -182,7 +202,7 @@ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<TResult> @@ -255,11 +275,11 @@ Promise<TResult> ___ -#### cloneTo +### cloneTo `**cloneTo**(ids, data?, options?): Promise<[LineItem](LineItem.mdx)[]>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[LineItem](LineItem.mdx)[]> @@ -318,13 +338,13 @@ Promise<[LineItem](LineItem.mdx)[]> ___ -#### create +### create `**create**(data): Promise<TResult>` Create a line item -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<TResult> @@ -379,14 +399,14 @@ Promise<TResult> ___ -#### createReturnLines +### createReturnLines `**createReturnLines**(returnId, cartId): Promise<[LineItem](LineItem.mdx)[]>` Creates return line items for a given cart based on the return items in a return. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[LineItem](LineItem.mdx)[]> @@ -427,13 +447,13 @@ Promise<[LineItem](LineItem.mdx)[]> ___ -#### createTaxLine +### createTaxLine `**createTaxLine**(args): [LineItemTaxLine](LineItemTaxLine.mdx)` Create a line item tax line. -##### Parameters +#### Parameters -##### Returns +#### Returns [LineItemTaxLine](LineItemTaxLine.mdx) @@ -465,13 +485,13 @@ Create a line item tax line. ___ -#### delete +### delete `**delete**(id): Promise<undefined \| null \| [LineItem](LineItem.mdx)>` Deletes a line item. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<undefined \| null \| [LineItem](LineItem.mdx)> @@ -503,11 +523,11 @@ Promise<undefined \| null \| [LineItem](LineItem.mdx)> ___ -#### deleteWithTaxLines +### deleteWithTaxLines `**deleteWithTaxLines**(id): Promise<undefined \| null \| [LineItem](LineItem.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<undefined \| null \| [LineItem](LineItem.mdx)> @@ -544,13 +564,13 @@ Deletes a line item with the tax lines. ___ -#### generate +### generate `**generate**(variantIdOrData, regionIdOrContext, quantity?, context?): Promise<TResult>` Generate a single or multiple line item without persisting the data into the db -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<TResult> @@ -632,11 +652,11 @@ Promise<TResult> ___ -#### generateLineItem +### generateLineItem `Protected **generateLineItem**(variant, quantity, context): Promise<[LineItem](LineItem.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[LineItem](LineItem.mdx)> @@ -758,11 +778,11 @@ Promise<[LineItem](LineItem.mdx)> ___ -#### list +### list `**list**(selector, config?): Promise<[LineItem](LineItem.mdx)[]>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[LineItem](LineItem.mdx)[]> @@ -803,13 +823,13 @@ Promise<[LineItem](LineItem.mdx)[]> ___ -#### retrieve +### retrieve `**retrieve**(id, config?): Promise<[LineItem](LineItem.mdx)>` Retrieves a line item by its id. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[LineItem](LineItem.mdx)> @@ -850,11 +870,11 @@ Promise<[LineItem](LineItem.mdx)> ___ -#### shouldRetryTransaction\_ +### shouldRetryTransaction\_ `Protected **shouldRetryTransaction_**(err): boolean` -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` @@ -886,13 +906,13 @@ ___ ___ -#### update +### update `**update**(idOrSelector, data): Promise<[LineItem](LineItem.mdx)[]>` Updates a line item -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[LineItem](LineItem.mdx)[]> @@ -933,11 +953,11 @@ Promise<[LineItem](LineItem.mdx)[]> ___ -#### validateGenerateArguments +### validateGenerateArguments `Protected **validateGenerateArguments**(variantIdOrData, regionIdOrContext, quantity?): void` -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns `void` @@ -1010,11 +1030,11 @@ ___ ___ -#### withTransaction +### withTransaction `**withTransaction**(transactionManager?): [LineItemService](LineItemService.mdx)` -##### Parameters +#### Parameters -##### Returns +#### Returns [LineItemService](LineItemService.mdx) diff --git a/www/apps/docs/content/references/services/classes/LineItemTaxLine.mdx b/www/apps/docs/content/references/services/classes/LineItemTaxLine.mdx index fc56843383..1fef742240 100644 --- a/www/apps/docs/content/references/services/classes/LineItemTaxLine.mdx +++ b/www/apps/docs/content/references/services/classes/LineItemTaxLine.mdx @@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes" A Line Item Tax Line represents the taxes applied on a line item. -## Constructors - -#### constructor +## constructor `**new LineItemTaxLine**()` A Line Item Tax Line represents the taxes applied on a line item. +___ + ## Properties +___ + ## Methods -#### beforeInsert +### beforeInsert `Private **beforeInsert**(): void` -##### Returns +#### Returns `void` diff --git a/www/apps/docs/content/references/services/classes/MiddlewareService.mdx b/www/apps/docs/content/references/services/classes/MiddlewareService.mdx index ecb3291a39..af1da0a6b1 100644 --- a/www/apps/docs/content/references/services/classes/MiddlewareService.mdx +++ b/www/apps/docs/content/references/services/classes/MiddlewareService.mdx @@ -8,12 +8,12 @@ import ParameterTypes from "@site/src/components/ParameterTypes" Orchestrates dynamic middleware registered through the Medusa Middleware API -## Constructors - -#### constructor +## constructor `**new MiddlewareService**()` +___ + ## Properties +___ + ## Methods -#### addPostAuthentication +### addPostAuthentication `**addPostAuthentication**(middleware, options): void` Adds a middleware function to be called after authentication is completed. -##### Parameters +#### Parameters -##### Returns +#### Returns `void` @@ -104,13 +106,13 @@ Adds a middleware function to be called after authentication is completed. ___ -#### addPreAuthentication +### addPreAuthentication `**addPreAuthentication**(middleware, options): void` Adds a middleware function to be called before authentication is completed. -##### Parameters +#### Parameters -##### Returns +#### Returns `void` @@ -151,13 +153,13 @@ Adds a middleware function to be called before authentication is completed. ___ -#### addPreCartCreation +### addPreCartCreation `**addPreCartCreation**(middleware): void` Adds a middleware function to be called before cart creation -##### Parameters +#### Parameters -##### Returns +#### Returns `void` @@ -189,11 +191,11 @@ Adds a middleware function to be called before cart creation ___ -#### addRouter +### addRouter `**addRouter**(path, router): void` -##### Parameters +#### Parameters -##### Returns +#### Returns `void` @@ -234,11 +236,11 @@ ___ ___ -#### getRouters +### getRouters `**getRouters**(path): Router[]` -##### Parameters +#### Parameters -##### Returns +#### Returns Router[] @@ -270,13 +272,13 @@ Router[] ___ -#### usePostAuthentication +### usePostAuthentication `**usePostAuthentication**(app): void` Adds post authentication middleware to an express app. -##### Parameters +#### Parameters -##### Returns +#### Returns `void` @@ -308,13 +310,13 @@ Adds post authentication middleware to an express app. ___ -#### usePreAuthentication +### usePreAuthentication `**usePreAuthentication**(app): void` Adds pre authentication middleware to an express app. -##### Parameters +#### Parameters -##### Returns +#### Returns `void` @@ -346,11 +348,11 @@ Adds pre authentication middleware to an express app. ___ -#### usePreCartCreation +### usePreCartCreation `**usePreCartCreation**(): RequestHandler<ParamsDictionary, any, any, ParsedQs, Record<string, any>>[]` -##### Returns +#### Returns RequestHandler<ParamsDictionary, any, any, ParsedQs, Record<string, any>>[] @@ -368,13 +370,13 @@ RequestHandler<ParamsDictionary, any, any, ParsedQs, Record<string, any& ___ -#### validateMiddleware\_ +### validateMiddleware\_ `**validateMiddleware_**(fn): void` Validates a middleware function, throws if fn is not of type function. -##### Parameters +#### Parameters -##### Returns +#### Returns `void` diff --git a/www/apps/docs/content/references/services/classes/MoneyAmount.mdx b/www/apps/docs/content/references/services/classes/MoneyAmount.mdx index 294fbe8c34..5e235c7798 100644 --- a/www/apps/docs/content/references/services/classes/MoneyAmount.mdx +++ b/www/apps/docs/content/references/services/classes/MoneyAmount.mdx @@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes" A Money Amount represent a price amount, for example, a product variant's price or a price in a price list. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based pricing, the given price in a specific Region. If region-based pricing is used, the amount will be in the currency defined for the Region. -## Constructors - -#### constructor +## constructor `**new MoneyAmount**()` A Money Amount represent a price amount, for example, a product variant's price or a price in a price list. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based pricing, the given price in a specific Region. If region-based pricing is used, the amount will be in the currency defined for the Region. +___ + ## Properties +___ + ## Methods -#### afterLoad +### afterLoad `Private **afterLoad**(): void` -##### Returns +#### Returns `void` @@ -189,11 +191,11 @@ A Money Amount represent a price amount, for example, a product variant's price ___ -#### beforeInsert +### beforeInsert `Private **beforeInsert**(): undefined \| void` -##### Returns +#### Returns `undefined` \| `void` @@ -211,11 +213,11 @@ ___ ___ -#### beforeUpdate +### beforeUpdate `Private **beforeUpdate**(): void` -##### Returns +#### Returns `void` diff --git a/www/apps/docs/content/references/services/classes/NewTotalsService.mdx b/www/apps/docs/content/references/services/classes/NewTotalsService.mdx index a0d2eaa8d4..eb795181b1 100644 --- a/www/apps/docs/content/references/services/classes/NewTotalsService.mdx +++ b/www/apps/docs/content/references/services/classes/NewTotalsService.mdx @@ -6,13 +6,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes" # NewTotalsService -## Constructors - -#### constructor +## constructor `**new NewTotalsService**(«destructured»)` -##### Parameters +### Parameters +___ + ## Properties +___ + ## Accessors -#### activeManager\_ +### activeManager\_ - `Protected` **activeManager\_**: [object Object] +`Protected get**activeManager_**(): EntityManager` + +#### Returns + +EntityManager + + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ `Protected **atomicPhase_**(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise<TResult>` @@ -119,7 +139,7 @@ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<TResult> @@ -192,13 +212,13 @@ Promise<TResult> ___ -#### getGiftCardTotals +### getGiftCardTotals `**getGiftCardTotals**(giftCardableAmount, «destructured»): Promise<{ tax_total: number ; total: number }>` Calculate and return the gift cards totals -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<{ tax_total: number ; total: number }> @@ -266,13 +286,13 @@ Promise<{ tax_total: number ; total: number }> ___ -#### getGiftCardTransactionsTotals +### getGiftCardTransactionsTotals `**getGiftCardTransactionsTotals**(«destructured»): { tax_total: number ; total: number }` Calculate and return the gift cards totals based on their transactions -##### Parameters +#### Parameters -##### Returns +#### Returns `object` @@ -361,11 +381,11 @@ Calculate and return the gift cards totals based on their transactions ___ -#### getGiftCardableAmount +### getGiftCardableAmount `**getGiftCardableAmount**(«destructured»): number` -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -442,13 +462,13 @@ ___ ___ -#### getLineItemRefund +### getLineItemRefund `**getLineItemRefund**(lineItem, «destructured»): number` Return the amount that can be refund on a line item -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -552,11 +572,11 @@ Return the amount that can be refund on a line item ___ -#### getLineItemRefundLegacy +### getLineItemRefundLegacy `Protected **getLineItemRefundLegacy**(lineItem, «destructured»): number` -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -651,13 +671,13 @@ ___ ___ -#### getLineItemTotals +### getLineItemTotals `**getLineItemTotals**(items, «destructured»): Promise<{ [lineItemId: string]: [LineItemTotals](../types/LineItemTotals.mdx); }>` Calculate and return the items totals for either the legacy calculation or the new calculation -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<{ [lineItemId: string]: [LineItemTotals](../types/LineItemTotals.mdx); }> @@ -725,13 +745,13 @@ Promise<{ [lineItemId: string]: [LineItemTotals](../types/LineItemTotal ___ -#### getLineItemTotalsLegacy +### getLineItemTotalsLegacy `Protected **getLineItemTotalsLegacy**(item, «destructured»): Promise<[LineItemTotals](../types/LineItemTotals.mdx)>` Calculate and return the legacy calculated totals using the tax rate -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[LineItemTotals](../types/LineItemTotals.mdx)> @@ -817,13 +837,13 @@ Promise<[LineItemTotals](../types/LineItemTotals.mdx)> ___ -#### getLineItemTotals\_ +### getLineItemTotals\_ `Protected **getLineItemTotals_**(item, «destructured»): Promise<[LineItemTotals](../types/LineItemTotals.mdx)>` Calculate and return the totals for an item -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[LineItemTotals](../types/LineItemTotals.mdx)> @@ -918,13 +938,13 @@ Promise<[LineItemTotals](../types/LineItemTotals.mdx)> ___ -#### getShippingMethodTotals +### getShippingMethodTotals `**getShippingMethodTotals**(shippingMethods, «destructured»): Promise<{ [shippingMethodId: string]: [ShippingMethodTotals](../types/ShippingMethodTotals.mdx); }>` Calculate and return the shipping methods totals for either the legacy calculation or the new calculation -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<{ [shippingMethodId: string]: [ShippingMethodTotals](../types/ShippingMethodTotals.mdx); }> @@ -1001,13 +1021,13 @@ Promise<{ [shippingMethodId: string]: [ShippingMethodTotals](../types/S ___ -#### getShippingMethodTotalsLegacy +### getShippingMethodTotalsLegacy `Protected **getShippingMethodTotalsLegacy**(shippingMethod, «destructured»): Promise<[ShippingMethodTotals](../types/ShippingMethodTotals.mdx)>` Calculate and return the shipping method totals legacy using the tax rate -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ShippingMethodTotals](../types/ShippingMethodTotals.mdx)> @@ -1075,13 +1095,13 @@ Promise<[ShippingMethodTotals](../types/ShippingMethodTotals.mdx)> ___ -#### getShippingMethodTotals\_ +### getShippingMethodTotals\_ `Protected **getShippingMethodTotals_**(shippingMethod, «destructured»): Promise<[ShippingMethodTotals](../types/ShippingMethodTotals.mdx)>` Calculate and return the shipping method totals -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ShippingMethodTotals](../types/ShippingMethodTotals.mdx)> @@ -1158,11 +1178,11 @@ Promise<[ShippingMethodTotals](../types/ShippingMethodTotals.mdx)> ___ -#### shouldRetryTransaction\_ +### shouldRetryTransaction\_ `Protected **shouldRetryTransaction_**(err): boolean` -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` @@ -1194,11 +1214,11 @@ ___ ___ -#### withTransaction +### withTransaction `**withTransaction**(transactionManager?): [NewTotalsService](NewTotalsService.mdx)` -##### Parameters +#### Parameters -##### Returns +#### Returns [NewTotalsService](NewTotalsService.mdx) diff --git a/www/apps/docs/content/references/services/classes/Note.mdx b/www/apps/docs/content/references/services/classes/Note.mdx index b954da2819..500fa0019a 100644 --- a/www/apps/docs/content/references/services/classes/Note.mdx +++ b/www/apps/docs/content/references/services/classes/Note.mdx @@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes" A Note is an element that can be used in association with different resources to allow admin users to describe additional information. For example, they can be used to add additional information about orders. -## Constructors - -#### constructor +## constructor `**new Note**()` A Note is an element that can be used in association with different resources to allow admin users to describe additional information. For example, they can be used to add additional information about orders. +___ + ## Properties +___ + ## Methods -#### beforeInsert +### beforeInsert `Private **beforeInsert**(): void` -##### Returns +#### Returns `void` diff --git a/www/apps/docs/content/references/services/classes/NoteService.mdx b/www/apps/docs/content/references/services/classes/NoteService.mdx index e043a7db0e..107f8bc476 100644 --- a/www/apps/docs/content/references/services/classes/NoteService.mdx +++ b/www/apps/docs/content/references/services/classes/NoteService.mdx @@ -6,13 +6,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes" # NoteService -## Constructors - -#### constructor +## constructor `**new NoteService**(«destructured»)` -##### Parameters +### Parameters +___ + ## Properties +___ + ## Accessors -#### activeManager\_ +### activeManager\_ - `Protected` **activeManager\_**: [object Object] +`Protected get**activeManager_**(): EntityManager` + +#### Returns + +EntityManager + + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ `Protected **atomicPhase_**(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise<TResult>` @@ -146,7 +166,7 @@ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<TResult> @@ -219,13 +239,13 @@ Promise<TResult> ___ -#### create +### create `**create**(data, config?): Promise<[Note](Note.mdx)>` Creates a note associated with a given author -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Note](Note.mdx)> @@ -275,13 +295,13 @@ Promise<[Note](Note.mdx)> ___ -#### delete +### delete `**delete**(noteId): Promise<void>` Deletes a given note -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -313,13 +333,13 @@ Promise<void> ___ -#### list +### list `**list**(selector, config?): Promise<[Note](Note.mdx)[]>` Fetches all notes related to the given selector -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Note](Note.mdx)[]> @@ -360,13 +380,13 @@ Promise<[Note](Note.mdx)[]> ___ -#### listAndCount +### listAndCount `**listAndCount**(selector, config?): Promise<[[Note](Note.mdx)[], number]>` Fetches all notes related to the given selector -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[[Note](Note.mdx)[], number]> @@ -407,13 +427,13 @@ Promise<[[Note](Note.mdx)[], number]> ___ -#### retrieve +### retrieve `**retrieve**(noteId, config?): Promise<[Note](Note.mdx)>` Retrieves a specific note. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Note](Note.mdx)> @@ -454,11 +474,11 @@ Promise<[Note](Note.mdx)> ___ -#### shouldRetryTransaction\_ +### shouldRetryTransaction\_ `Protected **shouldRetryTransaction_**(err): boolean` -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` @@ -490,13 +510,13 @@ ___ ___ -#### update +### update `**update**(noteId, value): Promise<[Note](Note.mdx)>` Updates a given note with a new value -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Note](Note.mdx)> @@ -537,11 +557,11 @@ Promise<[Note](Note.mdx)> ___ -#### withTransaction +### withTransaction `**withTransaction**(transactionManager?): [NoteService](NoteService.mdx)` -##### Parameters +#### Parameters -##### Returns +#### Returns [NoteService](NoteService.mdx) diff --git a/www/apps/docs/content/references/services/classes/Notification.mdx b/www/apps/docs/content/references/services/classes/Notification.mdx index 1f8116d689..c65375be7e 100644 --- a/www/apps/docs/content/references/services/classes/Notification.mdx +++ b/www/apps/docs/content/references/services/classes/Notification.mdx @@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes" A notification is an alert sent, typically to customers, using the installed Notification Provider as a reaction to internal events such as `order.placed`. Notifications can be resent. -## Constructors - -#### constructor +## constructor `**new Notification**()` A notification is an alert sent, typically to customers, using the installed Notification Provider as a reaction to internal events such as `order.placed`. Notifications can be resent. +___ + ## Properties +___ + ## Methods -#### beforeInsert +### beforeInsert `Private **beforeInsert**(): void` -##### Returns +#### Returns `void` diff --git a/www/apps/docs/content/references/services/classes/NotificationProvider.mdx b/www/apps/docs/content/references/services/classes/NotificationProvider.mdx index 966c6f819d..838be12028 100644 --- a/www/apps/docs/content/references/services/classes/NotificationProvider.mdx +++ b/www/apps/docs/content/references/services/classes/NotificationProvider.mdx @@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes" A notification provider represents a notification service installed in the Medusa backend, either through a plugin or backend customizations. It holds the notification service's installation status. -## Constructors - -#### constructor +## constructor `**new NotificationProvider**()` A notification provider represents a notification service installed in the Medusa backend, either through a plugin or backend customizations. It holds the notification service's installation status. +___ + ## Properties +___ + ## Properties +___ + ## Accessors -#### activeManager\_ +### activeManager\_ - `Protected` **activeManager\_**: [object Object] +`Protected get**activeManager_**(): EntityManager` + +#### Returns + +EntityManager + + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ `Protected **atomicPhase_**(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise<TResult>` @@ -146,7 +166,7 @@ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<TResult> @@ -219,7 +239,7 @@ Promise<TResult> ___ -#### handleEvent +### handleEvent `**handleEvent**(eventName, data): Promise<undefined \| void \| [Notification](Notification.mdx)[]>` @@ -227,7 +247,7 @@ Handles an event by relaying the event data to the subscribing providers. The result of the notification send will be persisted in the database in order to allow for resends. Will log any errors that are encountered. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<undefined \| void \| [Notification](Notification.mdx)[]> @@ -268,13 +288,13 @@ Promise<undefined \| void \| [Notification](Notification.mdx)[]> ___ -#### list +### list `**list**(selector, config?): Promise<[Notification](Notification.mdx)[]>` Retrieves a list of notifications. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Notification](Notification.mdx)[]> @@ -315,13 +335,13 @@ Promise<[Notification](Notification.mdx)[]> ___ -#### listAndCount +### listAndCount `**listAndCount**(selector, config?): Promise<[[Notification](Notification.mdx)[], number]>` Retrieves a list of notifications and total count. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[[Notification](Notification.mdx)[], number]> @@ -362,14 +382,14 @@ Promise<[[Notification](Notification.mdx)[], number]> ___ -#### registerAttachmentGenerator +### registerAttachmentGenerator `**registerAttachmentGenerator**(service): void` Registers an attachment generator to the service. The generator can be used to generate on demand invoices or other documents. -##### Parameters +#### Parameters -##### Returns +#### Returns `void` @@ -401,13 +421,13 @@ used to generate on demand invoices or other documents. ___ -#### registerInstalledProviders +### registerInstalledProviders `**registerInstalledProviders**(providerIds): Promise<void>` Takes a list of notification provider ids and persists them in the database. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -439,14 +459,14 @@ Promise<void> ___ -#### resend +### resend `**resend**(id, config?): Promise<[Notification](Notification.mdx)>` Resends a notification by retrieving a prior notification and calling the underlying provider's resendNotification method. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Notification](Notification.mdx)> @@ -487,13 +507,13 @@ Promise<[Notification](Notification.mdx)> ___ -#### retrieve +### retrieve `**retrieve**(id, config?): Promise<[Notification](Notification.mdx)>` Retrieves a notification with a given id -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Notification](Notification.mdx)> @@ -534,14 +554,14 @@ Promise<[Notification](Notification.mdx)> ___ -#### retrieveProvider\_ +### retrieveProvider\_ `Protected **retrieveProvider_**(id): [AbstractNotificationService](AbstractNotificationService.mdx)` Finds a provider with a given id. Will throw a NOT\_FOUND error if the resolution fails. -##### Parameters +#### Parameters -##### Returns +#### Returns [AbstractNotificationService](AbstractNotificationService.mdx) @@ -573,14 +593,14 @@ resolution fails. ___ -#### send +### send `**send**(event, eventData, providerId): Promise<undefined \| [Notification](Notification.mdx)>` Sends a notification, by calling the given provider's sendNotification method. Persists the Notification in the database. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<undefined \| [Notification](Notification.mdx)> @@ -630,11 +650,11 @@ Promise<undefined \| [Notification](Notification.mdx)> ___ -#### shouldRetryTransaction\_ +### shouldRetryTransaction\_ `Protected **shouldRetryTransaction_**(err): boolean` -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` @@ -666,13 +686,13 @@ ___ ___ -#### subscribe +### subscribe `**subscribe**(eventName, providerId): void` Subscribes a given provider to an event. -##### Parameters +#### Parameters -##### Returns +#### Returns `void` @@ -713,11 +733,11 @@ Subscribes a given provider to an event. ___ -#### withTransaction +### withTransaction `**withTransaction**(transactionManager?): [NotificationService](NotificationService.mdx)` -##### Parameters +#### Parameters -##### Returns +#### Returns [NotificationService](NotificationService.mdx) diff --git a/www/apps/docs/content/references/services/classes/NumericalComparisonOperator.mdx b/www/apps/docs/content/references/services/classes/NumericalComparisonOperator.mdx index c9dfe796cd..2886a49ea6 100644 --- a/www/apps/docs/content/references/services/classes/NumericalComparisonOperator.mdx +++ b/www/apps/docs/content/references/services/classes/NumericalComparisonOperator.mdx @@ -8,12 +8,12 @@ import ParameterTypes from "@site/src/components/ParameterTypes" Fields used to apply flexible filters on numbers. -## Constructors - -#### constructor +## constructor `**new NumericalComparisonOperator**()` +___ + ## Properties +___ + ## Methods -#### beforeInsert +### beforeInsert `Private **beforeInsert**(): void` -##### Returns +#### Returns `void` diff --git a/www/apps/docs/content/references/services/classes/OauthService.mdx b/www/apps/docs/content/references/services/classes/OauthService.mdx index deb8ee7245..a30e70fe8d 100644 --- a/www/apps/docs/content/references/services/classes/OauthService.mdx +++ b/www/apps/docs/content/references/services/classes/OauthService.mdx @@ -6,13 +6,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes" # OauthService -## Constructors - -#### constructor +## constructor `**new OauthService**(cradle)` -##### Parameters +### Parameters +___ + ## Properties +___ + ## Accessors -#### activeManager\_ +### activeManager\_ - `Protected` **activeManager\_**: [object Object] +`Protected get**activeManager_**(): EntityManager` + +#### Returns + +EntityManager + + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ `Protected **atomicPhase_**(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise<TResult>` @@ -146,7 +166,7 @@ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<TResult> @@ -219,11 +239,11 @@ Promise<TResult> ___ -#### create +### create `**create**(data): Promise<[Oauth](Oauth.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Oauth](Oauth.mdx)> @@ -255,11 +275,11 @@ Promise<[Oauth](Oauth.mdx)> ___ -#### generateToken +### generateToken `**generateToken**(appName, code, state): Promise<[Oauth](Oauth.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Oauth](Oauth.mdx)> @@ -309,11 +329,11 @@ Promise<[Oauth](Oauth.mdx)> ___ -#### list +### list `**list**(selector): Promise<[Oauth](Oauth.mdx)[]>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Oauth](Oauth.mdx)[]> @@ -345,11 +365,11 @@ Promise<[Oauth](Oauth.mdx)[]> ___ -#### refreshToken +### refreshToken `**refreshToken**(appName): Promise<[Oauth](Oauth.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Oauth](Oauth.mdx)> @@ -381,11 +401,11 @@ Promise<[Oauth](Oauth.mdx)> ___ -#### registerOauthApp +### registerOauthApp `**registerOauthApp**(appDetails): Promise<[Oauth](Oauth.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Oauth](Oauth.mdx)> @@ -417,11 +437,11 @@ Promise<[Oauth](Oauth.mdx)> ___ -#### retrieve +### retrieve `**retrieve**(oauthId): Promise<[Oauth](Oauth.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Oauth](Oauth.mdx)> @@ -453,11 +473,11 @@ Promise<[Oauth](Oauth.mdx)> ___ -#### retrieveByName +### retrieveByName `**retrieveByName**(appName): Promise<[Oauth](Oauth.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Oauth](Oauth.mdx)> @@ -489,11 +509,11 @@ Promise<[Oauth](Oauth.mdx)> ___ -#### shouldRetryTransaction\_ +### shouldRetryTransaction\_ `Protected **shouldRetryTransaction_**(err): boolean` -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` @@ -525,11 +545,11 @@ ___ ___ -#### update +### update `**update**(id, update): Promise<[Oauth](Oauth.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Oauth](Oauth.mdx)> @@ -570,11 +590,11 @@ Promise<[Oauth](Oauth.mdx)> ___ -#### withTransaction +### withTransaction `**withTransaction**(transactionManager?): [OauthService](OauthService.mdx)` -##### Parameters +#### Parameters -##### Returns +#### Returns [OauthService](OauthService.mdx) diff --git a/www/apps/docs/content/references/services/classes/Order.mdx b/www/apps/docs/content/references/services/classes/Order.mdx index b66b781fd9..6f222585b5 100644 --- a/www/apps/docs/content/references/services/classes/Order.mdx +++ b/www/apps/docs/content/references/services/classes/Order.mdx @@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes" An order is a purchase made by a customer. It holds details about payment and fulfillment of the order. An order may also be created from a draft order, which is created by an admin user. -## Constructors - -#### constructor +## constructor `**new Order**()` An order is a purchase made by a customer. It holds details about payment and fulfillment of the order. An order may also be created from a draft order, which is created by an admin user. +___ + ## Properties +___ + ## Methods -#### beforeInsert +### beforeInsert `Private **beforeInsert**(): Promise<void>` -##### Returns +#### Returns Promise<void> diff --git a/www/apps/docs/content/references/services/classes/OrderEdit.mdx b/www/apps/docs/content/references/services/classes/OrderEdit.mdx index ba22c065fe..567bd76b76 100644 --- a/www/apps/docs/content/references/services/classes/OrderEdit.mdx +++ b/www/apps/docs/content/references/services/classes/OrderEdit.mdx @@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes" Order edit allows modifying items in an order, such as adding, updating, or deleting items from the original order. Once the order edit is confirmed, the changes are reflected on the original order. -## Constructors - -#### constructor +## constructor `**new OrderEdit**()` Order edit allows modifying items in an order, such as adding, updating, or deleting items from the original order. Once the order edit is confirmed, the changes are reflected on the original order. +___ + ## Properties +___ + ## Methods -#### beforeInsert +### beforeInsert `Private **beforeInsert**(): void` -##### Returns +#### Returns `void` @@ -306,11 +308,11 @@ Order edit allows modifying items in an order, such as adding, updating, or dele ___ -#### loadStatus +### loadStatus `**loadStatus**(): void` -##### Returns +#### Returns `void` diff --git a/www/apps/docs/content/references/services/classes/OrderEditItemChangeService.mdx b/www/apps/docs/content/references/services/classes/OrderEditItemChangeService.mdx index ea90a7450a..436d7e602e 100644 --- a/www/apps/docs/content/references/services/classes/OrderEditItemChangeService.mdx +++ b/www/apps/docs/content/references/services/classes/OrderEditItemChangeService.mdx @@ -6,13 +6,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes" # OrderEditItemChangeService -## Constructors - -#### constructor +## constructor `**new OrderEditItemChangeService**(«destructured»)` -##### Parameters +### Parameters +___ + ## Properties +___ + ## Accessors -#### activeManager\_ +### activeManager\_ - `Protected` **activeManager\_**: [object Object] +`Protected get**activeManager_**(): EntityManager` + +#### Returns + +EntityManager + + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ `Protected **atomicPhase_**(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise<TResult>` @@ -155,7 +175,7 @@ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<TResult> @@ -228,11 +248,11 @@ Promise<TResult> ___ -#### create +### create `**create**(data): Promise<[OrderItemChange](OrderItemChange.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[OrderItemChange](OrderItemChange.mdx)> @@ -264,11 +284,11 @@ Promise<[OrderItemChange](OrderItemChange.mdx)> ___ -#### delete +### delete `**delete**(itemChangeIds): Promise<void>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -300,11 +320,11 @@ Promise<void> ___ -#### list +### list `**list**(selector, config?): Promise<[OrderItemChange](OrderItemChange.mdx)[]>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[OrderItemChange](OrderItemChange.mdx)[]> @@ -345,11 +365,11 @@ Promise<[OrderItemChange](OrderItemChange.mdx)[]> ___ -#### retrieve +### retrieve `**retrieve**(id, config?): Promise<[OrderItemChange](OrderItemChange.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[OrderItemChange](OrderItemChange.mdx)> @@ -390,11 +410,11 @@ Promise<[OrderItemChange](OrderItemChange.mdx)> ___ -#### shouldRetryTransaction\_ +### shouldRetryTransaction\_ `Protected **shouldRetryTransaction_**(err): boolean` -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` @@ -426,11 +446,11 @@ ___ ___ -#### withTransaction +### withTransaction `**withTransaction**(transactionManager?): [OrderEditItemChangeService](OrderEditItemChangeService.mdx)` -##### Parameters +#### Parameters -##### Returns +#### Returns [OrderEditItemChangeService](OrderEditItemChangeService.mdx) diff --git a/www/apps/docs/content/references/services/classes/OrderEditService.mdx b/www/apps/docs/content/references/services/classes/OrderEditService.mdx index dc08c1612a..98ccd585c0 100644 --- a/www/apps/docs/content/references/services/classes/OrderEditService.mdx +++ b/www/apps/docs/content/references/services/classes/OrderEditService.mdx @@ -6,13 +6,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes" # OrderEditService -## Constructors - -#### constructor +## constructor `**new OrderEditService**(«destructured»)` -##### Parameters +### Parameters +___ + ## Properties +___ + ## Accessors -#### activeManager\_ +### activeManager\_ - `Protected` **activeManager\_**: [object Object] +`Protected get**activeManager_**(): EntityManager` + +#### Returns + +EntityManager + + ___ -#### inventoryService\_ +### inventoryService\_ - `Protected` **inventoryService\_**: [object Object] +`Protected get**inventoryService_**(): undefined \| [IInventoryService](../interfaces/IInventoryService.mdx)` + +#### Returns + +`undefined` \| [IInventoryService](../interfaces/IInventoryService.mdx) + + + +___ ## Methods -#### addLineItem +### addLineItem `**addLineItem**(orderEditId, data): Promise<void>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -279,7 +315,7 @@ Promise<void> ___ -#### atomicPhase\_ +### atomicPhase\_ `Protected **atomicPhase_**(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise<TResult>` @@ -287,7 +323,7 @@ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<TResult> @@ -360,11 +396,11 @@ Promise<TResult> ___ -#### cancel +### cancel `**cancel**(orderEditId, context?): Promise<[OrderEdit](OrderEdit.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[OrderEdit](OrderEdit.mdx)> @@ -414,11 +450,11 @@ Promise<[OrderEdit](OrderEdit.mdx)> ___ -#### confirm +### confirm `**confirm**(orderEditId, context?): Promise<[OrderEdit](OrderEdit.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[OrderEdit](OrderEdit.mdx)> @@ -468,11 +504,11 @@ Promise<[OrderEdit](OrderEdit.mdx)> ___ -#### create +### create `**create**(data, context): Promise<[OrderEdit](OrderEdit.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[OrderEdit](OrderEdit.mdx)> @@ -522,11 +558,11 @@ Promise<[OrderEdit](OrderEdit.mdx)> ___ -#### decline +### decline `**decline**(orderEditId, context): Promise<[OrderEdit](OrderEdit.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[OrderEdit](OrderEdit.mdx)> @@ -585,11 +621,11 @@ Promise<[OrderEdit](OrderEdit.mdx)> ___ -#### decorateTotals +### decorateTotals `**decorateTotals**(orderEdit): Promise<[OrderEdit](OrderEdit.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[OrderEdit](OrderEdit.mdx)> @@ -621,11 +657,11 @@ Promise<[OrderEdit](OrderEdit.mdx)> ___ -#### delete +### delete `**delete**(id): Promise<void>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -657,11 +693,11 @@ Promise<void> ___ -#### deleteClonedItems +### deleteClonedItems `Protected **deleteClonedItems**(orderEditId): Promise<void>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -693,11 +729,11 @@ Promise<void> ___ -#### deleteItemChange +### deleteItemChange `**deleteItemChange**(orderEditId, itemChangeId): Promise<void>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -738,11 +774,11 @@ Promise<void> ___ -#### list +### list `**list**(selector, config?): Promise<[OrderEdit](OrderEdit.mdx)[]>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[OrderEdit](OrderEdit.mdx)[]> @@ -783,11 +819,11 @@ Promise<[OrderEdit](OrderEdit.mdx)[]> ___ -#### listAndCount +### listAndCount `**listAndCount**(selector, config?): Promise<[[OrderEdit](OrderEdit.mdx)[], number]>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[[OrderEdit](OrderEdit.mdx)[], number]> @@ -828,11 +864,11 @@ Promise<[[OrderEdit](OrderEdit.mdx)[], number]> ___ -#### refreshAdjustments +### refreshAdjustments `**refreshAdjustments**(orderEditId, config?): Promise<void>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -882,11 +918,11 @@ Promise<void> ___ -#### removeLineItem +### removeLineItem `**removeLineItem**(orderEditId, lineItemId): Promise<void>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -927,11 +963,11 @@ Promise<void> ___ -#### requestConfirmation +### requestConfirmation `**requestConfirmation**(orderEditId, context?): Promise<[OrderEdit](OrderEdit.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[OrderEdit](OrderEdit.mdx)> @@ -981,11 +1017,11 @@ Promise<[OrderEdit](OrderEdit.mdx)> ___ -#### retrieve +### retrieve `**retrieve**(orderEditId, config?): Promise<[OrderEdit](OrderEdit.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[OrderEdit](OrderEdit.mdx)> @@ -1026,11 +1062,11 @@ Promise<[OrderEdit](OrderEdit.mdx)> ___ -#### retrieveActive +### retrieveActive `Protected **retrieveActive**(orderId, config?): Promise<undefined \| null \| [OrderEdit](OrderEdit.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<undefined \| null \| [OrderEdit](OrderEdit.mdx)> @@ -1071,11 +1107,11 @@ Promise<undefined \| null \| [OrderEdit](OrderEdit.mdx)> ___ -#### shouldRetryTransaction\_ +### shouldRetryTransaction\_ `Protected **shouldRetryTransaction_**(err): boolean` -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` @@ -1107,11 +1143,11 @@ ___ ___ -#### update +### update `**update**(orderEditId, data): Promise<[OrderEdit](OrderEdit.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[OrderEdit](OrderEdit.mdx)> @@ -1152,7 +1188,7 @@ Promise<[OrderEdit](OrderEdit.mdx)> ___ -#### updateLineItem +### updateLineItem `**updateLineItem**(orderEditId, itemId, data): Promise<void>` @@ -1160,7 +1196,7 @@ Create or update order edit item change line item and apply the quantity - If the item change already exists then update the quantity of the line item as well as the line adjustments - If the item change does not exist then create the item change of type update and apply the quantity as well as update the line adjustments -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -1219,11 +1255,11 @@ Promise<void> ___ -#### withTransaction +### withTransaction `**withTransaction**(transactionManager?): [OrderEditService](OrderEditService.mdx)` -##### Parameters +#### Parameters -##### Returns +#### Returns [OrderEditService](OrderEditService.mdx) @@ -1255,11 +1291,11 @@ ___ ___ -#### isOrderEditActive +### isOrderEditActive `Static Private **isOrderEditActive**(orderEdit): boolean` -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` diff --git a/www/apps/docs/content/references/services/classes/OrderItemChange.mdx b/www/apps/docs/content/references/services/classes/OrderItemChange.mdx index 7c7c6ba75e..f5743ef064 100644 --- a/www/apps/docs/content/references/services/classes/OrderItemChange.mdx +++ b/www/apps/docs/content/references/services/classes/OrderItemChange.mdx @@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes" An order item change is a change made within an order edit to an order's items. These changes are not reflected on the original order until the order edit is confirmed. -## Constructors - -#### constructor +## constructor `**new OrderItemChange**()` An order item change is a change made within an order edit to an order's items. These changes are not reflected on the original order until the order edit is confirmed. +___ + ## Properties +___ + ## Methods -#### beforeInsert +### beforeInsert `Private **beforeInsert**(): void` -##### Returns +#### Returns `void` diff --git a/www/apps/docs/content/references/services/classes/OrderService.mdx b/www/apps/docs/content/references/services/classes/OrderService.mdx index 5e2de31ef7..70adfc672a 100644 --- a/www/apps/docs/content/references/services/classes/OrderService.mdx +++ b/www/apps/docs/content/references/services/classes/OrderService.mdx @@ -6,13 +6,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes" # OrderService -## Constructors - -#### constructor +## constructor `**new OrderService**(«destructured»)` -##### Parameters +### Parameters +___ + ## Properties +___ + ## Accessors -#### activeManager\_ +### activeManager\_ - `Protected` **activeManager\_**: [object Object] +`Protected get**activeManager_**(): EntityManager` + +#### Returns + +EntityManager + + + +___ ## Methods -#### addShippingMethod +### addShippingMethod `**addShippingMethod**(orderId, optionId, data?, config?): Promise<[Order](Order.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Order](Order.mdx)> @@ -489,14 +509,14 @@ Promise<[Order](Order.mdx)> ___ -#### archive +### archive `**archive**(orderId): Promise<[Order](Order.mdx)>` Archives an order. It only alloved, if the order has been fulfilled and payment has been captured. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Order](Order.mdx)> @@ -528,7 +548,7 @@ Promise<[Order](Order.mdx)> ___ -#### atomicPhase\_ +### atomicPhase\_ `Protected **atomicPhase_**(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise<TResult>` @@ -536,7 +556,7 @@ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<TResult> @@ -609,7 +629,7 @@ Promise<TResult> ___ -#### cancel +### cancel `**cancel**(orderId): Promise<[Order](Order.mdx)>` @@ -617,7 +637,7 @@ Cancels an order. Throws if fulfillment process has been initiated. Throws if payment process has been initiated. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Order](Order.mdx)> @@ -649,13 +669,13 @@ Promise<[Order](Order.mdx)> ___ -#### cancelFulfillment +### cancelFulfillment `**cancelFulfillment**(fulfillmentId): Promise<[Order](Order.mdx)>` Cancels a fulfillment (if related to an order) -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Order](Order.mdx)> @@ -687,13 +707,13 @@ Promise<[Order](Order.mdx)> ___ -#### capturePayment +### capturePayment `**capturePayment**(orderId): Promise<[Order](Order.mdx)>` Captures payment for an order. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Order](Order.mdx)> @@ -725,11 +745,11 @@ Promise<[Order](Order.mdx)> ___ -#### completeOrder +### completeOrder `**completeOrder**(orderId): Promise<[Order](Order.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Order](Order.mdx)> @@ -761,13 +781,13 @@ Promise<[Order](Order.mdx)> ___ -#### createFromCart +### createFromCart `**createFromCart**(cartOrId): Promise<[Order](Order.mdx)>` Creates an order from a cart -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Order](Order.mdx)> @@ -799,7 +819,7 @@ Promise<[Order](Order.mdx)> ___ -#### createFulfillment +### createFulfillment `**createFulfillment**(orderId, itemsToFulfill, config?): Promise<[Order](Order.mdx)>` @@ -808,7 +828,7 @@ In a situation where the order has more than one shipping method, we need to partition the order items, such that they can be sent to their respective fulfillment provider. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Order](Order.mdx)> @@ -885,11 +905,11 @@ Promise<[Order](Order.mdx)> ___ -#### createGiftCardsFromLineItem\_ +### createGiftCardsFromLineItem\_ `Protected **createGiftCardsFromLineItem_**(order, lineItem, manager): Promise<[GiftCard](GiftCard.mdx)>[]` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[GiftCard](GiftCard.mdx)>[] @@ -939,13 +959,13 @@ Promise<[GiftCard](GiftCard.mdx)>[] ___ -#### createRefund +### createRefund `**createRefund**(orderId, refundAmount, reason, note?, config?): Promise<[Order](Order.mdx)>` Refunds a given amount back to the customer. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Order](Order.mdx)> @@ -1022,7 +1042,7 @@ Promise<[Order](Order.mdx)> ___ -#### createShipment +### createShipment `**createShipment**(orderId, fulfillmentId, trackingLinks?, config?): Promise<[Order](Order.mdx)>` @@ -1030,7 +1050,7 @@ Adds a shipment to the order to indicate that an order has left the warehouse. Will ask the fulfillment provider for any documents that may have been created in regards to the shipment. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Order](Order.mdx)> @@ -1107,13 +1127,13 @@ Promise<[Order](Order.mdx)> ___ -#### decorateTotals +### decorateTotals `**decorateTotals**(order, totalsFields?): Promise<[Order](Order.mdx)>` Calculate and attach the different total fields on the object -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Order](Order.mdx)> @@ -1156,7 +1176,7 @@ Promise<[Order](Order.mdx)> Calculate and attach the different total fields on the object -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Order](Order.mdx)> @@ -1197,11 +1217,11 @@ Promise<[Order](Order.mdx)> ___ -#### decorateTotalsLegacy +### decorateTotalsLegacy `Protected **decorateTotalsLegacy**(order, totalsFields?): Promise<[Order](Order.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Order](Order.mdx)> @@ -1242,13 +1262,13 @@ Promise<[Order](Order.mdx)> ___ -#### getFulfillmentItems +### getFulfillmentItems `Protected **getFulfillmentItems**(order, items, transformer): Promise<[LineItem](LineItem.mdx)[]>` Retrieves the order line items, given an array of items. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[LineItem](LineItem.mdx)[]> @@ -1298,11 +1318,11 @@ Promise<[LineItem](LineItem.mdx)[]> ___ -#### getTotalsRelations +### getTotalsRelations `Private **getTotalsRelations**(config): string[]` -##### Parameters +#### Parameters -##### Returns +#### Returns `string`[] @@ -1334,11 +1354,11 @@ ___ ___ -#### list +### list `**list**(selector, config?): Promise<[Order](Order.mdx)[]>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Order](Order.mdx)[]> @@ -1379,11 +1399,11 @@ Promise<[Order](Order.mdx)[]> ___ -#### listAndCount +### listAndCount `**listAndCount**(selector, config?): Promise<[[Order](Order.mdx)[], number]>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[[Order](Order.mdx)[], number]> @@ -1424,7 +1444,7 @@ Promise<[[Order](Order.mdx)[], number]> ___ -#### registerReturnReceived +### registerReturnReceived `**registerReturnReceived**(orderId, receivedReturn, customRefundAmount?): Promise<[Order](Order.mdx)>` @@ -1436,7 +1456,7 @@ returned items are not matching the requested items. Setting the allowMismatch argument to true, will process the return, ignoring any mismatches. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Order](Order.mdx)> @@ -1486,13 +1506,13 @@ Promise<[Order](Order.mdx)> ___ -#### retrieve +### retrieve `**retrieve**(orderId, config?): Promise<[Order](Order.mdx)>` Gets an order by id. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Order](Order.mdx)> @@ -1533,13 +1553,13 @@ Promise<[Order](Order.mdx)> ___ -#### retrieveByCartId +### retrieveByCartId `**retrieveByCartId**(cartId, config?): Promise<[Order](Order.mdx)>` Gets an order by cart id. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Order](Order.mdx)> @@ -1580,11 +1600,11 @@ Promise<[Order](Order.mdx)> ___ -#### retrieveByCartIdWithTotals +### retrieveByCartIdWithTotals `**retrieveByCartIdWithTotals**(cartId, options?): Promise<[Order](Order.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Order](Order.mdx)> @@ -1625,13 +1645,13 @@ Promise<[Order](Order.mdx)> ___ -#### retrieveByExternalId +### retrieveByExternalId `**retrieveByExternalId**(externalId, config?): Promise<[Order](Order.mdx)>` Gets an order by id. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Order](Order.mdx)> @@ -1672,11 +1692,11 @@ Promise<[Order](Order.mdx)> ___ -#### retrieveLegacy +### retrieveLegacy `Protected **retrieveLegacy**(orderIdOrSelector, config?): Promise<[Order](Order.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Order](Order.mdx)> @@ -1717,11 +1737,11 @@ Promise<[Order](Order.mdx)> ___ -#### retrieveWithTotals +### retrieveWithTotals `**retrieveWithTotals**(orderId, options?, context?): Promise<[Order](Order.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Order](Order.mdx)> @@ -1771,11 +1791,11 @@ Promise<[Order](Order.mdx)> ___ -#### shouldRetryTransaction\_ +### shouldRetryTransaction\_ `Protected **shouldRetryTransaction_**(err): boolean` -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` @@ -1807,11 +1827,11 @@ ___ ___ -#### transformQueryForTotals +### transformQueryForTotals `Protected **transformQueryForTotals**(config): { relations: undefined \| string[] ; select: undefined \| keyof [Order](Order.mdx)[] ; totalsToSelect: undefined \| keyof [Order](Order.mdx)[] }` -##### Parameters +#### Parameters -##### Returns +#### Returns `object` @@ -1873,7 +1893,7 @@ ___ ___ -#### update +### update `**update**(orderId, update): Promise<[Order](Order.mdx)>` @@ -1881,7 +1901,7 @@ Updates an order. Metadata updates should use dedicated method, e.g. `setMetadata` etc. The function will throw errors if metadata updates are attempted. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Order](Order.mdx)> @@ -1922,13 +1942,13 @@ Promise<[Order](Order.mdx)> ___ -#### updateBillingAddress +### updateBillingAddress `Protected **updateBillingAddress**(order, address): Promise<void>` Updates the order's billing address. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -1969,13 +1989,13 @@ Promise<void> ___ -#### updateShippingAddress +### updateShippingAddress `Protected **updateShippingAddress**(order, address): Promise<void>` Updates the order's shipping address. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -2016,7 +2036,7 @@ Promise<void> ___ -#### validateFulfillmentLineItem +### validateFulfillmentLineItem `Protected **validateFulfillmentLineItem**(item, quantity): null \| [LineItem](LineItem.mdx)` @@ -2025,7 +2045,7 @@ fulfillable quantity is lower than the requested fulfillment quantity. Fulfillable quantity is calculated by subtracting the already fulfilled quantity from the quantity that was originally purchased. -##### Parameters +#### Parameters -##### Returns +#### Returns `null` \| [LineItem](LineItem.mdx) @@ -2066,11 +2086,11 @@ quantity from the quantity that was originally purchased. ___ -#### withTransaction +### withTransaction `**withTransaction**(transactionManager?): [OrderService](OrderService.mdx)` -##### Parameters +#### Parameters -##### Returns +#### Returns [OrderService](OrderService.mdx) diff --git a/www/apps/docs/content/references/services/classes/OrdersReturnItem.mdx b/www/apps/docs/content/references/services/classes/OrdersReturnItem.mdx index d1ae536c4f..0cd9955c3b 100644 --- a/www/apps/docs/content/references/services/classes/OrdersReturnItem.mdx +++ b/www/apps/docs/content/references/services/classes/OrdersReturnItem.mdx @@ -6,12 +6,12 @@ import ParameterTypes from "@site/src/components/ParameterTypes" # OrdersReturnItem -## Constructors - -#### constructor +## constructor `**new OrdersReturnItem**()` +___ + ## Properties +___ + ## Methods -#### beforeInsert +### beforeInsert `Private **beforeInsert**(): void` -##### Returns +#### Returns `void` diff --git a/www/apps/docs/content/references/services/classes/PaymentCollection.mdx b/www/apps/docs/content/references/services/classes/PaymentCollection.mdx index d00b3393a8..4744f2102a 100644 --- a/www/apps/docs/content/references/services/classes/PaymentCollection.mdx +++ b/www/apps/docs/content/references/services/classes/PaymentCollection.mdx @@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes" A payment collection allows grouping and managing a list of payments at one. This can be helpful when making additional payment for order edits or integrating installment payments. -## Constructors - -#### constructor +## constructor `**new PaymentCollection**()` A payment collection allows grouping and managing a list of payments at one. This can be helpful when making additional payment for order edits or integrating installment payments. +___ + ## Properties +___ + ## Methods -#### beforeInsert +### beforeInsert `Private **beforeInsert**(): void` -##### Returns +#### Returns `void` diff --git a/www/apps/docs/content/references/services/classes/PaymentCollectionService.mdx b/www/apps/docs/content/references/services/classes/PaymentCollectionService.mdx index fa488ded00..c061039bca 100644 --- a/www/apps/docs/content/references/services/classes/PaymentCollectionService.mdx +++ b/www/apps/docs/content/references/services/classes/PaymentCollectionService.mdx @@ -6,13 +6,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes" # PaymentCollectionService -## Constructors - -#### constructor +## constructor `**new PaymentCollectionService**(«destructured»)` -##### Parameters +### Parameters +___ + ## Properties +___ + ## Accessors -#### activeManager\_ +### activeManager\_ - `Protected` **activeManager\_**: [object Object] +`Protected get**activeManager_**(): EntityManager` + +#### Returns + +EntityManager + + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ `Protected **atomicPhase_**(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise<TResult>` @@ -173,7 +193,7 @@ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<TResult> @@ -246,13 +266,13 @@ Promise<TResult> ___ -#### authorizePaymentSessions +### authorizePaymentSessions `**authorizePaymentSessions**(paymentCollectionId, sessionIds, context?): Promise<[PaymentCollection](PaymentCollection.mdx)>` Authorizes the payment sessions of a payment collection. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[PaymentCollection](PaymentCollection.mdx)> @@ -302,13 +322,13 @@ Promise<[PaymentCollection](PaymentCollection.mdx)> ___ -#### create +### create `**create**(data): Promise<[PaymentCollection](PaymentCollection.mdx)>` Creates a new payment collection. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[PaymentCollection](PaymentCollection.mdx)> @@ -340,13 +360,13 @@ Promise<[PaymentCollection](PaymentCollection.mdx)> ___ -#### delete +### delete `**delete**(paymentCollectionId): Promise<undefined \| [PaymentCollection](PaymentCollection.mdx)>` Deletes a payment collection. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<undefined \| [PaymentCollection](PaymentCollection.mdx)> @@ -378,11 +398,11 @@ Promise<undefined \| [PaymentCollection](PaymentCollection.mdx)> ___ -#### isValidTotalAmount +### isValidTotalAmount `Private **isValidTotalAmount**(total, sessionsInput): boolean` -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` @@ -423,13 +443,13 @@ ___ ___ -#### markAsAuthorized +### markAsAuthorized `**markAsAuthorized**(paymentCollectionId): Promise<[PaymentCollection](PaymentCollection.mdx)>` Marks a payment collection as authorized bypassing the payment flow. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[PaymentCollection](PaymentCollection.mdx)> @@ -461,13 +481,13 @@ Promise<[PaymentCollection](PaymentCollection.mdx)> ___ -#### refreshPaymentSession +### refreshPaymentSession `**refreshPaymentSession**(paymentCollectionId, sessionId, customerId): Promise<[PaymentSession](PaymentSession.mdx)>` Removes and recreate a payment session of a payment collection. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[PaymentSession](PaymentSession.mdx)> @@ -517,13 +537,13 @@ Promise<[PaymentSession](PaymentSession.mdx)> ___ -#### retrieve +### retrieve `**retrieve**(paymentCollectionId, config?): Promise<[PaymentCollection](PaymentCollection.mdx)>` Retrieves a payment collection by id. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[PaymentCollection](PaymentCollection.mdx)> @@ -564,13 +584,13 @@ Promise<[PaymentCollection](PaymentCollection.mdx)> ___ -#### setPaymentSession +### setPaymentSession `**setPaymentSession**(paymentCollectionId, sessionInput, customerId): Promise<[PaymentCollection](PaymentCollection.mdx)>` Manages a single payment sessions of a payment collection. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[PaymentCollection](PaymentCollection.mdx)> @@ -620,13 +640,13 @@ Promise<[PaymentCollection](PaymentCollection.mdx)> ___ -#### setPaymentSessionsBatch +### setPaymentSessionsBatch `**setPaymentSessionsBatch**(paymentCollectionOrId, sessionsInput, customerId): Promise<[PaymentCollection](PaymentCollection.mdx)>` Manages multiple payment sessions of a payment collection. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[PaymentCollection](PaymentCollection.mdx)> @@ -676,11 +696,11 @@ Promise<[PaymentCollection](PaymentCollection.mdx)> ___ -#### shouldRetryTransaction\_ +### shouldRetryTransaction\_ `Protected **shouldRetryTransaction_**(err): boolean` -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` @@ -712,13 +732,13 @@ ___ ___ -#### update +### update `**update**(paymentCollectionId, data): Promise<[PaymentCollection](PaymentCollection.mdx)>` Updates a payment collection. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[PaymentCollection](PaymentCollection.mdx)> @@ -759,11 +779,11 @@ Promise<[PaymentCollection](PaymentCollection.mdx)> ___ -#### withTransaction +### withTransaction `**withTransaction**(transactionManager?): [PaymentCollectionService](PaymentCollectionService.mdx)` -##### Parameters +#### Parameters -##### Returns +#### Returns [PaymentCollectionService](PaymentCollectionService.mdx) diff --git a/www/apps/docs/content/references/services/classes/PaymentProvider.mdx b/www/apps/docs/content/references/services/classes/PaymentProvider.mdx index 93d7cb5260..7ad260d7af 100644 --- a/www/apps/docs/content/references/services/classes/PaymentProvider.mdx +++ b/www/apps/docs/content/references/services/classes/PaymentProvider.mdx @@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes" A payment provider represents a payment service installed in the Medusa backend, either through a plugin or backend customizations. It holds the payment service's installation status. -## Constructors - -#### constructor +## constructor `**new PaymentProvider**()` A payment provider represents a payment service installed in the Medusa backend, either through a plugin or backend customizations. It holds the payment service's installation status. +___ + ## Properties +___ + ## Properties +___ + ## Accessors -#### activeManager\_ +### activeManager\_ - `Protected` **activeManager\_**: [object Object] +`Protected get**activeManager_**(): EntityManager` + +#### Returns + +EntityManager + + ___ -#### paymentService\_ +### paymentService\_ - `Protected` **paymentService\_**: [object Object] +`Protected get**paymentService_**(): [PaymentService](PaymentService.mdx)` + +#### Returns + +[PaymentService](PaymentService.mdx) + + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ `Protected **atomicPhase_**(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise<TResult>` @@ -172,7 +208,7 @@ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<TResult> @@ -245,11 +281,11 @@ Promise<TResult> ___ -#### authorizePayment +### authorizePayment `**authorizePayment**(paymentSession, context): Promise<undefined \| [PaymentSession](PaymentSession.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<undefined \| [PaymentSession](PaymentSession.mdx)> @@ -290,13 +326,13 @@ Promise<undefined \| [PaymentSession](PaymentSession.mdx)> ___ -#### buildPaymentProcessorContext +### buildPaymentProcessorContext `Protected **buildPaymentProcessorContext**(cartOrData): [Cart](Cart.mdx) & [PaymentContext](../types/PaymentContext.mdx)` Build the create session context for both legacy and new API -##### Parameters +#### Parameters -##### Returns +#### Returns [Cart](Cart.mdx) & [PaymentContext](../types/PaymentContext.mdx) @@ -328,11 +364,11 @@ Build the create session context for both legacy and new API ___ -#### cancelPayment +### cancelPayment `**cancelPayment**(paymentObj): Promise<[Payment](Payment.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Payment](Payment.mdx)> @@ -364,11 +400,11 @@ Promise<[Payment](Payment.mdx)> ___ -#### capturePayment +### capturePayment `**capturePayment**(paymentObj): Promise<[Payment](Payment.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Payment](Payment.mdx)> @@ -400,11 +436,11 @@ Promise<[Payment](Payment.mdx)> ___ -#### createPayment +### createPayment `**createPayment**(data): Promise<[Payment](Payment.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Payment](Payment.mdx)> @@ -436,11 +472,11 @@ Promise<[Payment](Payment.mdx)> ___ -#### createSession +### createSession `**createSession**(providerId, cart): Promise<[PaymentSession](PaymentSession.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[PaymentSession](PaymentSession.mdx)> @@ -485,7 +521,7 @@ Promise<[PaymentSession](PaymentSession.mdx)> Creates a payment session with the given provider. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[PaymentSession](PaymentSession.mdx)> @@ -517,11 +553,11 @@ Promise<[PaymentSession](PaymentSession.mdx)> ___ -#### deleteSession +### deleteSession `**deleteSession**(paymentSession): Promise<undefined \| [PaymentSession](PaymentSession.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<undefined \| [PaymentSession](PaymentSession.mdx)> @@ -553,11 +589,11 @@ Promise<undefined \| [PaymentSession](PaymentSession.mdx)> ___ -#### getStatus +### getStatus `**getStatus**(payment): Promise<[PaymentSessionStatus](../enums/PaymentSessionStatus.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[PaymentSessionStatus](../enums/PaymentSessionStatus.mdx)> @@ -589,11 +625,11 @@ Promise<[PaymentSessionStatus](../enums/PaymentSessionStatus.mdx)> ___ -#### list +### list `**list**(): Promise<[PaymentProvider](PaymentProvider.mdx)[]>` -##### Returns +#### Returns Promise<[PaymentProvider](PaymentProvider.mdx)[]> @@ -611,13 +647,13 @@ Promise<[PaymentProvider](PaymentProvider.mdx)[]> ___ -#### listPayments +### listPayments `**listPayments**(selector, config?): Promise<[Payment](Payment.mdx)[]>` List all the payments according to the given selector and config. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Payment](Payment.mdx)[]> @@ -658,13 +694,13 @@ Promise<[Payment](Payment.mdx)[]> ___ -#### processUpdateRequestsData +### processUpdateRequestsData `Protected **processUpdateRequestsData**(data?, paymentResponse): Promise<void>` Process the collected data. Can be used every time we need to process some collected data returned by the provider -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -723,14 +759,14 @@ Promise<void> ___ -#### refreshSession +### refreshSession `**refreshSession**(paymentSession, sessionInput): Promise<[PaymentSession](PaymentSession.mdx)>` Refreshes a payment session with the given provider. This means, that we delete the current one and create a new. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[PaymentSession](PaymentSession.mdx)> @@ -798,11 +834,11 @@ Promise<[PaymentSession](PaymentSession.mdx)> ___ -#### refundFromPayment +### refundFromPayment `**refundFromPayment**(payment, amount, reason, note?): Promise<[Refund](Refund.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Refund](Refund.mdx)> @@ -861,11 +897,11 @@ Promise<[Refund](Refund.mdx)> ___ -#### refundPayment +### refundPayment `**refundPayment**(payObjs, amount, reason, note?): Promise<[Refund](Refund.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Refund](Refund.mdx)> @@ -924,11 +960,11 @@ Promise<[Refund](Refund.mdx)> ___ -#### registerInstalledProviders +### registerInstalledProviders `**registerInstalledProviders**(providerIds): Promise<void>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -960,13 +996,13 @@ Promise<void> ___ -#### retrievePayment +### retrievePayment `**retrievePayment**(paymentId, relations?): Promise<[Payment](Payment.mdx)>` Retrieve a payment entity with the given id. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Payment](Payment.mdx)> @@ -1007,13 +1043,13 @@ Promise<[Payment](Payment.mdx)> ___ -#### retrieveProvider +### retrieveProvider `**retrieveProvider**(providerId): TProvider extends [AbstractPaymentService](AbstractPaymentService.mdx) ? [AbstractPaymentService](AbstractPaymentService.mdx) : TProvider extends [AbstractPaymentProcessor](AbstractPaymentProcessor.mdx) ? [AbstractPaymentProcessor](AbstractPaymentProcessor.mdx) : any` Finds a provider given an id -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns `TProvider` extends [AbstractPaymentService](AbstractPaymentService.mdx) ? [AbstractPaymentService](AbstractPaymentService.mdx) : `TProvider` extends [AbstractPaymentProcessor](AbstractPaymentProcessor.mdx) ? [AbstractPaymentProcessor](AbstractPaymentProcessor.mdx) : `any` @@ -1059,11 +1095,11 @@ Finds a provider given an id ___ -#### retrieveRefund +### retrieveRefund `**retrieveRefund**(id, config?): Promise<[Refund](Refund.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Refund](Refund.mdx)> @@ -1104,13 +1140,13 @@ Promise<[Refund](Refund.mdx)> ___ -#### retrieveSession +### retrieveSession `**retrieveSession**(paymentSessionId, relations?): Promise<[PaymentSession](PaymentSession.mdx)>` Return the payment session for the given id. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[PaymentSession](PaymentSession.mdx)> @@ -1151,13 +1187,13 @@ Promise<[PaymentSession](PaymentSession.mdx)> ___ -#### saveSession +### saveSession `Protected **saveSession**(providerId, data): Promise<[PaymentSession](PaymentSession.mdx)>` Create or update a Payment session data. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[PaymentSession](PaymentSession.mdx)> @@ -1261,11 +1297,11 @@ Promise<[PaymentSession](PaymentSession.mdx)> ___ -#### shouldRetryTransaction\_ +### shouldRetryTransaction\_ `Protected **shouldRetryTransaction_**(err): boolean` -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` @@ -1297,11 +1333,11 @@ ___ ___ -#### throwFromPaymentProcessorError +### throwFromPaymentProcessorError `Private **throwFromPaymentProcessorError**(errObj): void` -##### Parameters +#### Parameters -##### Returns +#### Returns `void` @@ -1333,11 +1369,11 @@ ___ ___ -#### updatePayment +### updatePayment `**updatePayment**(paymentId, data): Promise<[Payment](Payment.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Payment](Payment.mdx)> @@ -1396,13 +1432,13 @@ Promise<[Payment](Payment.mdx)> ___ -#### updateSession +### updateSession `**updateSession**(paymentSession, sessionInput): Promise<[PaymentSession](PaymentSession.mdx)>` Update a payment session with the given provider. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[PaymentSession](PaymentSession.mdx)> @@ -1470,11 +1506,11 @@ Promise<[PaymentSession](PaymentSession.mdx)> ___ -#### updateSessionData +### updateSessionData `**updateSessionData**(paymentSession, data): Promise<[PaymentSession](PaymentSession.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[PaymentSession](PaymentSession.mdx)> @@ -1515,11 +1551,11 @@ Promise<[PaymentSession](PaymentSession.mdx)> ___ -#### withTransaction +### withTransaction `**withTransaction**(transactionManager?): [PaymentProviderService](PaymentProviderService.mdx)` -##### Parameters +#### Parameters -##### Returns +#### Returns [PaymentProviderService](PaymentProviderService.mdx) diff --git a/www/apps/docs/content/references/services/classes/PaymentService.mdx b/www/apps/docs/content/references/services/classes/PaymentService.mdx index ac924f8c9d..e969f959b2 100644 --- a/www/apps/docs/content/references/services/classes/PaymentService.mdx +++ b/www/apps/docs/content/references/services/classes/PaymentService.mdx @@ -6,13 +6,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes" # PaymentService -## Constructors - -#### constructor +## constructor `**new PaymentService**(«destructured»)` -##### Parameters +### Parameters +___ + ## Properties +___ + ## Accessors -#### activeManager\_ +### activeManager\_ - `Protected` **activeManager\_**: [object Object] +`Protected get**activeManager_**(): EntityManager` + +#### Returns + +EntityManager + + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ `Protected **atomicPhase_**(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise<TResult>` @@ -182,7 +202,7 @@ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<TResult> @@ -255,13 +275,13 @@ Promise<TResult> ___ -#### capture +### capture `**capture**(paymentOrId): Promise<[Payment](Payment.mdx)>` Captures a payment. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Payment](Payment.mdx)> @@ -293,13 +313,13 @@ Promise<[Payment](Payment.mdx)> ___ -#### create +### create `**create**(paymentInput): Promise<[Payment](Payment.mdx)>` Created a new payment. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Payment](Payment.mdx)> @@ -331,13 +351,13 @@ Promise<[Payment](Payment.mdx)> ___ -#### refund +### refund `**refund**(paymentOrId, amount, reason, note?): Promise<[Refund](Refund.mdx)>` refunds a payment. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Refund](Refund.mdx)> @@ -396,13 +416,13 @@ Promise<[Refund](Refund.mdx)> ___ -#### retrieve +### retrieve `**retrieve**(paymentId, config?): Promise<[Payment](Payment.mdx)>` Retrieves a payment by id. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Payment](Payment.mdx)> @@ -443,11 +463,11 @@ Promise<[Payment](Payment.mdx)> ___ -#### shouldRetryTransaction\_ +### shouldRetryTransaction\_ `Protected **shouldRetryTransaction_**(err): boolean` -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` @@ -479,13 +499,13 @@ ___ ___ -#### update +### update `**update**(paymentId, data): Promise<[Payment](Payment.mdx)>` Updates a payment in order to link it to an order or a swap. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Payment](Payment.mdx)> @@ -544,11 +564,11 @@ Promise<[Payment](Payment.mdx)> ___ -#### withTransaction +### withTransaction `**withTransaction**(transactionManager?): [PaymentService](PaymentService.mdx)` -##### Parameters +#### Parameters -##### Returns +#### Returns [PaymentService](PaymentService.mdx) diff --git a/www/apps/docs/content/references/services/classes/PaymentSession.mdx b/www/apps/docs/content/references/services/classes/PaymentSession.mdx index 84cad8bebc..34d5e8578d 100644 --- a/www/apps/docs/content/references/services/classes/PaymentSession.mdx +++ b/www/apps/docs/content/references/services/classes/PaymentSession.mdx @@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes" A Payment Session is created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, which is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for payment processing such as capture or refund. Payment sessions can also be used as part of payment collections. -## Constructors - -#### constructor +## constructor `**new PaymentSession**()` A Payment Session is created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, which is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for payment processing such as capture or refund. Payment sessions can also be used as part of payment collections. +___ + ## Properties +___ + ## Methods -#### beforeInsert +### beforeInsert `Private **beforeInsert**(): void` -##### Returns +#### Returns `void` diff --git a/www/apps/docs/content/references/services/classes/PriceList.mdx b/www/apps/docs/content/references/services/classes/PriceList.mdx index 6215b35f4e..4634640678 100644 --- a/www/apps/docs/content/references/services/classes/PriceList.mdx +++ b/www/apps/docs/content/references/services/classes/PriceList.mdx @@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes" A Price List represents a set of prices that override the default price for one or more product variants. -## Constructors - -#### constructor +## constructor `**new PriceList**()` A Price List represents a set of prices that override the default price for one or more product variants. +___ + ## Properties +___ + ## Methods -#### beforeInsert +### beforeInsert `Private **beforeInsert**(): undefined \| void` -##### Returns +#### Returns `undefined` \| `void` diff --git a/www/apps/docs/content/references/services/classes/PriceListService.mdx b/www/apps/docs/content/references/services/classes/PriceListService.mdx index 5602d22640..170e7ff38e 100644 --- a/www/apps/docs/content/references/services/classes/PriceListService.mdx +++ b/www/apps/docs/content/references/services/classes/PriceListService.mdx @@ -8,13 +8,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes" Provides layer to manipulate product tags. -## Constructors - -#### constructor +## constructor `**new PriceListService**(«destructured»)` -##### Parameters +### Parameters +___ + ## Properties +___ + ## Accessors -#### activeManager\_ +### activeManager\_ - `Protected` **activeManager\_**: [object Object] +`Protected get**activeManager_**(): EntityManager` + +#### Returns + +EntityManager + + + +___ ## Methods -#### addCurrencyFromRegion +### addCurrencyFromRegion `Protected **addCurrencyFromRegion**(prices): Promise<T[]>` Add `currency_code` to an MA record if `region_id`is passed. -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<T[]> @@ -210,13 +230,13 @@ Promise<T[]> ___ -#### addPrices +### addPrices `**addPrices**(id, prices, replace?): Promise<[PriceList](PriceList.mdx)>` Adds prices to a price list in bulk, optionally replacing all existing prices -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[PriceList](PriceList.mdx)> @@ -266,7 +286,7 @@ Promise<[PriceList](PriceList.mdx)> ___ -#### atomicPhase\_ +### atomicPhase\_ `Protected **atomicPhase_**(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise<TResult>` @@ -274,7 +294,7 @@ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<TResult> @@ -347,13 +367,13 @@ Promise<TResult> ___ -#### clearPrices +### clearPrices `**clearPrices**(id): Promise<void>` Removes all prices from a price list and deletes the removed prices in bulk -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -385,13 +405,13 @@ Promise<void> ___ -#### create +### create `**create**(priceListObject): Promise<[PriceList](PriceList.mdx)>` Creates a Price List -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[PriceList](PriceList.mdx)> @@ -423,14 +443,14 @@ Promise<[PriceList](PriceList.mdx)> ___ -#### delete +### delete `**delete**(id): Promise<void>` Deletes a Price List Will never fail due to delete being idempotent. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -462,13 +482,13 @@ Promise<void> ___ -#### deletePrices +### deletePrices `**deletePrices**(id, priceIds): Promise<void>` Removes prices from a price list and deletes the removed prices in bulk -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -509,11 +529,11 @@ Promise<void> ___ -#### deleteProductPrices +### deleteProductPrices `**deleteProductPrices**(priceListId, productIds): Promise<[string[], number]>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[string[], number]> @@ -554,11 +574,11 @@ Promise<[string[], number]> ___ -#### deleteVariantPrices +### deleteVariantPrices `**deleteVariantPrices**(priceListId, variantIds): Promise<[string[], number]>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[string[], number]> @@ -599,13 +619,13 @@ Promise<[string[], number]> ___ -#### list +### list `**list**(selector?, config?): Promise<[PriceList](PriceList.mdx)[]>` Lists Price Lists -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[PriceList](PriceList.mdx)[]> @@ -646,13 +666,13 @@ Promise<[PriceList](PriceList.mdx)[]> ___ -#### listAndCount +### listAndCount `**listAndCount**(selector?, config?): Promise<[[PriceList](PriceList.mdx)[], number]>` Lists Price Lists and adds count -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[[PriceList](PriceList.mdx)[], number]> @@ -693,11 +713,11 @@ Promise<[[PriceList](PriceList.mdx)[], number]> ___ -#### listPriceListsVariantIdsMap +### listPriceListsVariantIdsMap `**listPriceListsVariantIdsMap**(priceListIds): Promise<{ [priceListId: string]: string[]; }>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<{ [priceListId: string]: string[]; }> @@ -729,11 +749,11 @@ Promise<{ [priceListId: string]: string[]; }> ___ -#### listProducts +### listProducts `**listProducts**(priceListId, selector?, config?, requiresPriceList?): Promise<[[Product](Product.mdx)[], number]>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[[Product](Product.mdx)[], number]> @@ -792,11 +812,11 @@ Promise<[[Product](Product.mdx)[], number]> ___ -#### listVariants +### listVariants `**listVariants**(priceListId, selector?, config?, requiresPriceList?): Promise<[[ProductVariant](ProductVariant.mdx)[], number]>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[[ProductVariant](ProductVariant.mdx)[], number]> @@ -855,13 +875,13 @@ Promise<[[ProductVariant](ProductVariant.mdx)[], number]> ___ -#### retrieve +### retrieve `**retrieve**(priceListId, config?): Promise<[PriceList](PriceList.mdx)>` Retrieves a product tag by id. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[PriceList](PriceList.mdx)> @@ -902,11 +922,11 @@ Promise<[PriceList](PriceList.mdx)> ___ -#### shouldRetryTransaction\_ +### shouldRetryTransaction\_ `Protected **shouldRetryTransaction_**(err): boolean` -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` @@ -938,13 +958,13 @@ ___ ___ -#### update +### update `**update**(id, update): Promise<[PriceList](PriceList.mdx)>` Updates a Price List -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[PriceList](PriceList.mdx)> @@ -985,11 +1005,11 @@ Promise<[PriceList](PriceList.mdx)> ___ -#### upsertCustomerGroups\_ +### upsertCustomerGroups\_ `Protected **upsertCustomerGroups_**(priceListId, customerGroups): Promise<void>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -1030,11 +1050,11 @@ Promise<void> ___ -#### withTransaction +### withTransaction `**withTransaction**(transactionManager?): [PriceListService](PriceListService.mdx)` -##### Parameters +#### Parameters -##### Returns +#### Returns [PriceListService](PriceListService.mdx) diff --git a/www/apps/docs/content/references/services/classes/PricingService.mdx b/www/apps/docs/content/references/services/classes/PricingService.mdx index 02892bf8f9..bc6e7905f7 100644 --- a/www/apps/docs/content/references/services/classes/PricingService.mdx +++ b/www/apps/docs/content/references/services/classes/PricingService.mdx @@ -8,13 +8,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes" Allows retrieval of prices. -## Constructors - -#### constructor +## constructor `**new PricingService**(«destructured»)` -##### Parameters +### Parameters +___ + ## Properties +___ + ## Accessors -#### activeManager\_ +### activeManager\_ - `Protected` **activeManager\_**: [object Object] +`Protected get**activeManager_**(): EntityManager` + +#### Returns + +EntityManager + + ___ -#### pricingModuleService +### pricingModuleService - `Protected` **pricingModuleService**: [object Object] +`Protected get**pricingModuleService**(): [IPricingModuleService](../interfaces/IPricingModuleService.mdx)` + +#### Returns + +[IPricingModuleService](../interfaces/IPricingModuleService.mdx) + + Promise<[PriceListDTO](../interfaces/PriceListDTO.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "addPrices", + "type": "(`data`: [AddPricesDTO](../interfaces/AddPricesDTO.mdx), `sharedContext?`: [Context](../interfaces/Context.mdx)) => Promise<[PriceSetDTO](../interfaces/PriceSetDTO.mdx)>(`data`: [AddPricesDTO](../interfaces/AddPricesDTO.mdx)[], `sharedContext?`: [Context](../interfaces/Context.mdx)) => Promise<[PriceSetDTO](../interfaces/PriceSetDTO.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "addRules", + "type": "(`data`: [AddRulesDTO](../interfaces/AddRulesDTO.mdx), `sharedContext?`: [Context](../interfaces/Context.mdx)) => Promise<[PriceSetDTO](../interfaces/PriceSetDTO.mdx)>(`data`: [AddRulesDTO](../interfaces/AddRulesDTO.mdx)[], `sharedContext?`: [Context](../interfaces/Context.mdx)) => Promise<[PriceSetDTO](../interfaces/PriceSetDTO.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "calculatePrices", + "type": "(`filters`: [PricingFilters](../interfaces/PricingFilters.mdx), `context?`: [PricingContext](../interfaces/PricingContext.mdx), `sharedContext?`: [Context](../interfaces/Context.mdx)) => Promise<[CalculatedPriceSet](../interfaces/CalculatedPriceSet.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "create", + "type": "(`data`: [CreatePriceSetDTO](../interfaces/CreatePriceSetDTO.mdx), `sharedContext?`: [Context](../interfaces/Context.mdx)) => Promise<[PriceSetDTO](../interfaces/PriceSetDTO.mdx)>(`data`: [CreatePriceSetDTO](../interfaces/CreatePriceSetDTO.mdx)[], `sharedContext?`: [Context](../interfaces/Context.mdx)) => Promise<[PriceSetDTO](../interfaces/PriceSetDTO.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "createCurrencies", + "type": "(`data`: [CreateCurrencyDTO](../interfaces/CreateCurrencyDTO.mdx)[], `sharedContext?`: [Context](../interfaces/Context.mdx)) => Promise<[CurrencyDTO](../interfaces/CurrencyDTO.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "createMoneyAmounts", + "type": "(`data`: [CreateMoneyAmountDTO](../interfaces/CreateMoneyAmountDTO.mdx)[], `sharedContext?`: [Context](../interfaces/Context.mdx)) => Promise<[MoneyAmountDTO](../interfaces/MoneyAmountDTO.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "createPriceListRules", + "type": "(`data`: [CreatePriceListRuleDTO](../interfaces/CreatePriceListRuleDTO.mdx)[], `sharedContext?`: [Context](../interfaces/Context.mdx)) => Promise<[PriceListRuleDTO](../interfaces/PriceListRuleDTO.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "createPriceLists", + "type": "(`data`: [CreatePriceListDTO](../interfaces/CreatePriceListDTO.mdx)[], `sharedContext?`: [Context](../interfaces/Context.mdx)) => Promise<[PriceListDTO](../interfaces/PriceListDTO.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "createPriceRules", + "type": "(`data`: [CreatePriceRuleDTO](../interfaces/CreatePriceRuleDTO.mdx)[], `sharedContext?`: [Context](../interfaces/Context.mdx)) => Promise<[PriceRuleDTO](../interfaces/PriceRuleDTO.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "createPriceSetMoneyAmountRules", + "type": "(`data`: [CreatePriceSetMoneyAmountRulesDTO](../interfaces/CreatePriceSetMoneyAmountRulesDTO.mdx)[], `sharedContext?`: [Context](../interfaces/Context.mdx)) => Promise<[PriceSetMoneyAmountRulesDTO](../interfaces/PriceSetMoneyAmountRulesDTO.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "createRuleTypes", + "type": "(`data`: [CreateRuleTypeDTO](../interfaces/CreateRuleTypeDTO.mdx)[], `sharedContext?`: [Context](../interfaces/Context.mdx)) => Promise<[RuleTypeDTO](../interfaces/RuleTypeDTO.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "delete", + "type": "(`ids`: `string`[], `sharedContext?`: [Context](../interfaces/Context.mdx)) => Promise<void>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "deleteCurrencies", + "type": "(`currencyCodes`: `string`[], `sharedContext?`: [Context](../interfaces/Context.mdx)) => Promise<void>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "deleteMoneyAmounts", + "type": "(`ids`: `string`[], `sharedContext?`: [Context](../interfaces/Context.mdx)) => Promise<void>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "deletePriceListRules", + "type": "(`priceListRuleIds`: `string`[], `sharedContext?`: [Context](../interfaces/Context.mdx)) => Promise<void>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "deletePriceLists", + "type": "(`priceListIds`: `string`[], `sharedContext?`: [Context](../interfaces/Context.mdx)) => Promise<void>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "deletePriceRules", + "type": "(`priceRuleIds`: `string`[], `sharedContext?`: [Context](../interfaces/Context.mdx)) => Promise<void>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "deletePriceSetMoneyAmountRules", + "type": "(`ids`: `string`[], `sharedContext?`: [Context](../interfaces/Context.mdx)) => Promise<void>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "deleteRuleTypes", + "type": "(`ruleTypeIds`: `string`[], `sharedContext?`: [Context](../interfaces/Context.mdx)) => Promise<void>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "list", + "type": "(`filters?`: [FilterablePriceSetProps](../interfaces/FilterablePriceSetProps.mdx), `config?`: [FindConfig](../interfaces/FindConfig-1.mdx)<[PriceSetDTO](../interfaces/PriceSetDTO.mdx)>, `sharedContext?`: [Context](../interfaces/Context.mdx)) => Promise<[PriceSetDTO](../interfaces/PriceSetDTO.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "listAndCount", + "type": "(`filters?`: [FilterablePriceSetProps](../interfaces/FilterablePriceSetProps.mdx), `config?`: [FindConfig](../interfaces/FindConfig-1.mdx)<[PriceSetDTO](../interfaces/PriceSetDTO.mdx)>, `sharedContext?`: [Context](../interfaces/Context.mdx)) => Promise<[[PriceSetDTO](../interfaces/PriceSetDTO.mdx)[], number]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "listAndCountCurrencies", + "type": "(`filters?`: [FilterableCurrencyProps](../interfaces/FilterableCurrencyProps.mdx), `config?`: [FindConfig](../interfaces/FindConfig-1.mdx)<[CurrencyDTO](../interfaces/CurrencyDTO.mdx)>, `sharedContext?`: [Context](../interfaces/Context.mdx)) => Promise<[[CurrencyDTO](../interfaces/CurrencyDTO.mdx)[], number]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "listAndCountMoneyAmounts", + "type": "(`filters?`: [FilterableMoneyAmountProps](../interfaces/FilterableMoneyAmountProps.mdx), `config?`: [FindConfig](../interfaces/FindConfig-1.mdx)<[MoneyAmountDTO](../interfaces/MoneyAmountDTO.mdx)>, `sharedContext?`: [Context](../interfaces/Context.mdx)) => Promise<[[MoneyAmountDTO](../interfaces/MoneyAmountDTO.mdx)[], number]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "listAndCountPriceListRules", + "type": "(`filters?`: [FilterablePriceListRuleProps](../interfaces/FilterablePriceListRuleProps.mdx), `config?`: [FindConfig](../interfaces/FindConfig-1.mdx)<[PriceListRuleDTO](../interfaces/PriceListRuleDTO.mdx)>, `sharedContext?`: [Context](../interfaces/Context.mdx)) => Promise<[[PriceListRuleDTO](../interfaces/PriceListRuleDTO.mdx)[], number]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "listAndCountPriceLists", + "type": "(`filters?`: [FilterablePriceListProps](../interfaces/FilterablePriceListProps-1.mdx), `config?`: [FindConfig](../interfaces/FindConfig-1.mdx)<[PriceListDTO](../interfaces/PriceListDTO.mdx)>, `sharedContext?`: [Context](../interfaces/Context.mdx)) => Promise<[[PriceListDTO](../interfaces/PriceListDTO.mdx)[], number]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "listAndCountPriceRules", + "type": "(`filters?`: [FilterablePriceRuleProps](../interfaces/FilterablePriceRuleProps.mdx), `config?`: [FindConfig](../interfaces/FindConfig-1.mdx)<[PriceRuleDTO](../interfaces/PriceRuleDTO.mdx)>, `sharedContext?`: [Context](../interfaces/Context.mdx)) => Promise<[[PriceRuleDTO](../interfaces/PriceRuleDTO.mdx)[], number]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "listAndCountPriceSetMoneyAmountRules", + "type": "(`filters?`: [FilterablePriceSetMoneyAmountRulesProps](../interfaces/FilterablePriceSetMoneyAmountRulesProps.mdx), `config?`: [FindConfig](../interfaces/FindConfig-1.mdx)<[PriceSetMoneyAmountRulesDTO](../interfaces/PriceSetMoneyAmountRulesDTO.mdx)>, `sharedContext?`: [Context](../interfaces/Context.mdx)) => Promise<[[PriceSetMoneyAmountRulesDTO](../interfaces/PriceSetMoneyAmountRulesDTO.mdx)[], number]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "listAndCountPriceSetMoneyAmounts", + "type": "(`filters?`: [FilterablePriceSetMoneyAmountProps](../interfaces/FilterablePriceSetMoneyAmountProps.mdx), `config?`: [FindConfig](../interfaces/FindConfig-1.mdx)<[PriceSetMoneyAmountDTO](../interfaces/PriceSetMoneyAmountDTO.mdx)>, `sharedContext?`: [Context](../interfaces/Context.mdx)) => Promise<[[PriceSetMoneyAmountDTO](../interfaces/PriceSetMoneyAmountDTO.mdx)[], number]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "listAndCountRuleTypes", + "type": "(`filters?`: [FilterableRuleTypeProps](../interfaces/FilterableRuleTypeProps.mdx), `config?`: [FindConfig](../interfaces/FindConfig-1.mdx)<[RuleTypeDTO](../interfaces/RuleTypeDTO.mdx)>, `sharedContext?`: [Context](../interfaces/Context.mdx)) => Promise<[[RuleTypeDTO](../interfaces/RuleTypeDTO.mdx)[], number]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "listCurrencies", + "type": "(`filters?`: [FilterableCurrencyProps](../interfaces/FilterableCurrencyProps.mdx), `config?`: [FindConfig](../interfaces/FindConfig-1.mdx)<[CurrencyDTO](../interfaces/CurrencyDTO.mdx)>, `sharedContext?`: [Context](../interfaces/Context.mdx)) => Promise<[CurrencyDTO](../interfaces/CurrencyDTO.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "listMoneyAmounts", + "type": "(`filters?`: [FilterableMoneyAmountProps](../interfaces/FilterableMoneyAmountProps.mdx), `config?`: [FindConfig](../interfaces/FindConfig-1.mdx)<[MoneyAmountDTO](../interfaces/MoneyAmountDTO.mdx)>, `sharedContext?`: [Context](../interfaces/Context.mdx)) => Promise<[MoneyAmountDTO](../interfaces/MoneyAmountDTO.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "listPriceListRules", + "type": "(`filters?`: [FilterablePriceListRuleProps](../interfaces/FilterablePriceListRuleProps.mdx), `config?`: [FindConfig](../interfaces/FindConfig-1.mdx)<[PriceListRuleDTO](../interfaces/PriceListRuleDTO.mdx)>, `sharedContext?`: [Context](../interfaces/Context.mdx)) => Promise<[PriceListRuleDTO](../interfaces/PriceListRuleDTO.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "listPriceLists", + "type": "(`filters?`: [FilterablePriceListProps](../interfaces/FilterablePriceListProps-1.mdx), `config?`: [FindConfig](../interfaces/FindConfig-1.mdx)<[PriceListDTO](../interfaces/PriceListDTO.mdx)>, `sharedContext?`: [Context](../interfaces/Context.mdx)) => Promise<[PriceListDTO](../interfaces/PriceListDTO.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "listPriceRules", + "type": "(`filters?`: [FilterablePriceRuleProps](../interfaces/FilterablePriceRuleProps.mdx), `config?`: [FindConfig](../interfaces/FindConfig-1.mdx)<[PriceRuleDTO](../interfaces/PriceRuleDTO.mdx)>, `sharedContext?`: [Context](../interfaces/Context.mdx)) => Promise<[PriceRuleDTO](../interfaces/PriceRuleDTO.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "listPriceSetMoneyAmountRules", + "type": "(`filters?`: [FilterablePriceSetMoneyAmountRulesProps](../interfaces/FilterablePriceSetMoneyAmountRulesProps.mdx), `config?`: [FindConfig](../interfaces/FindConfig-1.mdx)<[PriceSetMoneyAmountRulesDTO](../interfaces/PriceSetMoneyAmountRulesDTO.mdx)>, `sharedContext?`: [Context](../interfaces/Context.mdx)) => Promise<[PriceSetMoneyAmountRulesDTO](../interfaces/PriceSetMoneyAmountRulesDTO.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "listPriceSetMoneyAmounts", + "type": "(`filters?`: [FilterablePriceSetMoneyAmountProps](../interfaces/FilterablePriceSetMoneyAmountProps.mdx), `config?`: [FindConfig](../interfaces/FindConfig-1.mdx)<[PriceSetMoneyAmountDTO](../interfaces/PriceSetMoneyAmountDTO.mdx)>, `sharedContext?`: [Context](../interfaces/Context.mdx)) => Promise<[PriceSetMoneyAmountDTO](../interfaces/PriceSetMoneyAmountDTO.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "listRuleTypes", + "type": "(`filters?`: [FilterableRuleTypeProps](../interfaces/FilterableRuleTypeProps.mdx), `config?`: [FindConfig](../interfaces/FindConfig-1.mdx)<[RuleTypeDTO](../interfaces/RuleTypeDTO.mdx)>, `sharedContext?`: [Context](../interfaces/Context.mdx)) => Promise<[RuleTypeDTO](../interfaces/RuleTypeDTO.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "removePriceListRules", + "type": "(`data`: [RemovePriceListRulesDTO](../interfaces/RemovePriceListRulesDTO.mdx), `sharedContext?`: [Context](../interfaces/Context.mdx)) => Promise<[PriceListDTO](../interfaces/PriceListDTO.mdx)>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "removeRules", + "type": "(`data`: [RemovePriceSetRulesDTO](../interfaces/RemovePriceSetRulesDTO.mdx)[], `sharedContext?`: [Context](../interfaces/Context.mdx)) => Promise<void>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "retrieve", + "type": "(`id`: `string`, `config?`: [FindConfig](../interfaces/FindConfig-1.mdx)<[PriceSetDTO](../interfaces/PriceSetDTO.mdx)>, `sharedContext?`: [Context](../interfaces/Context.mdx)) => Promise<[PriceSetDTO](../interfaces/PriceSetDTO.mdx)>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "retrieveCurrency", + "type": "(`code`: `string`, `config?`: [FindConfig](../interfaces/FindConfig-1.mdx)<[CurrencyDTO](../interfaces/CurrencyDTO.mdx)>, `sharedContext?`: [Context](../interfaces/Context.mdx)) => Promise<[CurrencyDTO](../interfaces/CurrencyDTO.mdx)>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "retrieveMoneyAmount", + "type": "(`id`: `string`, `config?`: [FindConfig](../interfaces/FindConfig-1.mdx)<[MoneyAmountDTO](../interfaces/MoneyAmountDTO.mdx)>, `sharedContext?`: [Context](../interfaces/Context.mdx)) => Promise<[MoneyAmountDTO](../interfaces/MoneyAmountDTO.mdx)>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "retrievePriceList", + "type": "(`id`: `string`, `config?`: [FindConfig](../interfaces/FindConfig-1.mdx)<[PriceListDTO](../interfaces/PriceListDTO.mdx)>, `sharedContext?`: [Context](../interfaces/Context.mdx)) => Promise<[PriceListDTO](../interfaces/PriceListDTO.mdx)>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "retrievePriceListRule", + "type": "(`id`: `string`, `config?`: [FindConfig](../interfaces/FindConfig-1.mdx)<[PriceListRuleDTO](../interfaces/PriceListRuleDTO.mdx)>, `sharedContext?`: [Context](../interfaces/Context.mdx)) => Promise<[PriceListRuleDTO](../interfaces/PriceListRuleDTO.mdx)>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "retrievePriceRule", + "type": "(`id`: `string`, `config?`: [FindConfig](../interfaces/FindConfig-1.mdx)<[PriceRuleDTO](../interfaces/PriceRuleDTO.mdx)>, `sharedContext?`: [Context](../interfaces/Context.mdx)) => Promise<[PriceRuleDTO](../interfaces/PriceRuleDTO.mdx)>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "retrievePriceSetMoneyAmountRules", + "type": "(`id`: `string`, `config?`: [FindConfig](../interfaces/FindConfig-1.mdx)<[PriceSetMoneyAmountRulesDTO](../interfaces/PriceSetMoneyAmountRulesDTO.mdx)>, `sharedContext?`: [Context](../interfaces/Context.mdx)) => Promise<[PriceSetMoneyAmountRulesDTO](../interfaces/PriceSetMoneyAmountRulesDTO.mdx)>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "retrieveRuleType", + "type": "(`id`: `string`, `config?`: [FindConfig](../interfaces/FindConfig-1.mdx)<[RuleTypeDTO](../interfaces/RuleTypeDTO.mdx)>, `sharedContext?`: [Context](../interfaces/Context.mdx)) => Promise<[RuleTypeDTO](../interfaces/RuleTypeDTO.mdx)>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "setPriceListRules", + "type": "(`data`: [SetPriceListRulesDTO](../interfaces/SetPriceListRulesDTO.mdx), `sharedContext?`: [Context](../interfaces/Context.mdx)) => Promise<[PriceListDTO](../interfaces/PriceListDTO.mdx)>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "updateCurrencies", + "type": "(`data`: [UpdateCurrencyDTO](../interfaces/UpdateCurrencyDTO.mdx)[], `sharedContext?`: [Context](../interfaces/Context.mdx)) => Promise<[CurrencyDTO](../interfaces/CurrencyDTO.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "updateMoneyAmounts", + "type": "(`data`: [UpdateMoneyAmountDTO](../interfaces/UpdateMoneyAmountDTO.mdx)[], `sharedContext?`: [Context](../interfaces/Context.mdx)) => Promise<[MoneyAmountDTO](../interfaces/MoneyAmountDTO.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "updatePriceListRules", + "type": "(`data`: [UpdatePriceListRuleDTO](../interfaces/UpdatePriceListRuleDTO.mdx)[], `sharedContext?`: [Context](../interfaces/Context.mdx)) => Promise<[PriceListRuleDTO](../interfaces/PriceListRuleDTO.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "updatePriceLists", + "type": "(`data`: [UpdatePriceListDTO](../interfaces/UpdatePriceListDTO.mdx)[], `sharedContext?`: [Context](../interfaces/Context.mdx)) => Promise<[PriceListDTO](../interfaces/PriceListDTO.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "updatePriceRules", + "type": "(`data`: [UpdatePriceRuleDTO](../interfaces/UpdatePriceRuleDTO.mdx)[], `sharedContext?`: [Context](../interfaces/Context.mdx)) => Promise<[PriceRuleDTO](../interfaces/PriceRuleDTO.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "updatePriceSetMoneyAmountRules", + "type": "(`data`: [UpdatePriceSetMoneyAmountRulesDTO](../interfaces/UpdatePriceSetMoneyAmountRulesDTO.mdx)[], `sharedContext?`: [Context](../interfaces/Context.mdx)) => Promise<[PriceSetMoneyAmountRulesDTO](../interfaces/PriceSetMoneyAmountRulesDTO.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "updateRuleTypes", + "type": "(`data`: [UpdateRuleTypeDTO](../interfaces/UpdateRuleTypeDTO.mdx)[], `sharedContext?`: [Context](../interfaces/Context.mdx)) => Promise<[RuleTypeDTO](../interfaces/RuleTypeDTO.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + } +]} /> ___ -#### remoteQuery +### remoteQuery - `Protected` **remoteQuery**: [object Object] +`Protected get**remoteQuery**(): [RemoteQueryFunction](../types/RemoteQueryFunction.mdx)` + +#### Returns + +[RemoteQueryFunction](../types/RemoteQueryFunction.mdx) + +`) => Promise<any> \\| `null`", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + } +]} /> + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ `Protected **atomicPhase_**(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise<TResult>` @@ -160,7 +707,7 @@ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<TResult> @@ -233,13 +780,13 @@ Promise<TResult> ___ -#### calculateTaxes +### calculateTaxes `**calculateTaxes**(variantPricing, productRates): [TaxedPricing](../types/TaxedPricing.mdx)` Gets the prices for a product variant -##### Parameters +#### Parameters -##### Returns +#### Returns [TaxedPricing](../types/TaxedPricing.mdx) @@ -280,14 +827,14 @@ Gets the prices for a product variant ___ -#### collectPricingContext +### collectPricingContext `**collectPricingContext**(context): Promise<[PricingContext](../types/PricingContext-1.mdx)>` Collects additional information necessary for completing the price selection. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[PricingContext](../types/PricingContext-1.mdx)> @@ -319,11 +866,11 @@ Promise<[PricingContext](../types/PricingContext-1.mdx)> ___ -#### getPricingModuleVariantMoneyAmounts +### getPricingModuleVariantMoneyAmounts `Private **getPricingModuleVariantMoneyAmounts**(variantIds): Promise<Map<string, [MoneyAmount](MoneyAmount.mdx)[]>>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<Map<string, [MoneyAmount](MoneyAmount.mdx)[]>> @@ -355,14 +902,14 @@ Promise<Map<string, [MoneyAmount](MoneyAmount.mdx)[]>> ___ -#### getProductPricing +### getProductPricing `**getProductPricing**(product, context): Promise<Record<string, [ProductVariantPricing](../types/ProductVariantPricing.mdx)>>` Gets all the variant prices for a product. All the product's variants will be fetched. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<Record<string, [ProductVariantPricing](../types/ProductVariantPricing.mdx)>> @@ -403,13 +950,13 @@ Promise<Record<string, [ProductVariantPricing](../types/ProductVariantPr ___ -#### getProductPricingById +### getProductPricingById `**getProductPricingById**(productId, context): Promise<Record<string, [ProductVariantPricing](../types/ProductVariantPricing.mdx)>>` Gets all the variant prices for a product by the product id -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<Record<string, [ProductVariantPricing](../types/ProductVariantPricing.mdx)>> @@ -450,11 +997,11 @@ Promise<Record<string, [ProductVariantPricing](../types/ProductVariantPr ___ -#### getProductPricing\_ +### getProductPricing\_ `Private **getProductPricing_**(data, context): Promise<Map<string, Record<string, [ProductVariantPricing](../types/ProductVariantPricing.mdx)>>>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<Map<string, Record<string, [ProductVariantPricing](../types/ProductVariantPricing.mdx)>>> @@ -495,13 +1042,13 @@ Promise<Map<string, Record<string, [ProductVariantPricing](../types/ ___ -#### getProductVariantPricing +### getProductVariantPricing `**getProductVariantPricing**(variant, context): Promise<[ProductVariantPricing](../types/ProductVariantPricing.mdx)>` Gets the prices for a product variant. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ProductVariantPricing](../types/ProductVariantPricing.mdx)> @@ -542,13 +1089,13 @@ Promise<[ProductVariantPricing](../types/ProductVariantPricing.mdx)> ___ -#### getProductVariantPricingById +### getProductVariantPricingById `**getProductVariantPricingById**(variantId, context): Promise<[ProductVariantPricing](../types/ProductVariantPricing.mdx)>` Gets the prices for a product variant by a variant id. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ProductVariantPricing](../types/ProductVariantPricing.mdx)> @@ -593,11 +1140,11 @@ Use [getProductVariantsPricing](PricingService.mdx#getproductvariantspricing) in ___ -#### getProductVariantPricingModulePricing\_ +### getProductVariantPricingModulePricing\_ `Private **getProductVariantPricingModulePricing_**(variantPriceData, context): Promise<Map<any, any>>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<Map<any, any>> @@ -638,11 +1185,11 @@ Promise<Map<any, any>> ___ -#### getProductVariantPricing\_ +### getProductVariantPricing\_ `Private **getProductVariantPricing_**(data, context): Promise<Map<string, [ProductVariantPricing](../types/ProductVariantPricing.mdx)>>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<Map<string, [ProductVariantPricing](../types/ProductVariantPricing.mdx)>> @@ -683,13 +1230,13 @@ Promise<Map<string, [ProductVariantPricing](../types/ProductVariantPrici ___ -#### getProductVariantsPricing +### getProductVariantsPricing `**getProductVariantsPricing**(data, context): Promise<{ [variant_id: string]: [ProductVariantPricing](../types/ProductVariantPricing.mdx); }>` Gets the prices for a collection of variants. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<{ [variant_id: string]: [ProductVariantPricing](../types/ProductVariantPricing.mdx); }> @@ -730,13 +1277,13 @@ Promise<{ [variant_id: string]: [ProductVariantPricing](../types/Produc ___ -#### getShippingOptionPricing +### getShippingOptionPricing `**getShippingOptionPricing**(shippingOption, context): Promise<[PricedShippingOption](../types/PricedShippingOption.mdx)>` Gets the prices for a shipping option. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[PricedShippingOption](../types/PricedShippingOption.mdx)> @@ -777,11 +1324,11 @@ Promise<[PricedShippingOption](../types/PricedShippingOption.mdx)> ___ -#### setAdminProductPricing +### setAdminProductPricing `**setAdminProductPricing**(products): Promise<([Product](Product.mdx) \| [PricedProduct](../types/PricedProduct.mdx))[]>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<([Product](Product.mdx) \| [PricedProduct](../types/PricedProduct.mdx))[]> @@ -813,11 +1360,11 @@ Promise<([Product](Product.mdx) \| [PricedProduct](../types/PricedProduct.md ___ -#### setAdminVariantPricing +### setAdminVariantPricing `**setAdminVariantPricing**(variants, context?): Promise<[PricedVariant](../types/PricedVariant.mdx)[]>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[PricedVariant](../types/PricedVariant.mdx)[]> @@ -858,13 +1405,13 @@ Promise<[PricedVariant](../types/PricedVariant.mdx)[]> ___ -#### setProductPrices +### setProductPrices `**setProductPrices**(products, context?): Promise<([Product](Product.mdx) \| [PricedProduct](../types/PricedProduct.mdx))[]>` Set additional prices on a list of products. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<([Product](Product.mdx) \| [PricedProduct](../types/PricedProduct.mdx))[]> @@ -905,13 +1452,13 @@ Promise<([Product](Product.mdx) \| [PricedProduct](../types/PricedProduct.md ___ -#### setShippingOptionPrices +### setShippingOptionPrices `**setShippingOptionPrices**(shippingOptions, context?): Promise<[PricedShippingOption](../types/PricedShippingOption.mdx)[]>` Set additional prices on a list of shipping options. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[PricedShippingOption](../types/PricedShippingOption.mdx)[]> @@ -952,13 +1499,13 @@ Promise<[PricedShippingOption](../types/PricedShippingOption.mdx)[]> ___ -#### setVariantPrices +### setVariantPrices `**setVariantPrices**(variants, context?): Promise<[PricedVariant](../types/PricedVariant.mdx)[]>` Set additional prices on a list of product variants. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[PricedVariant](../types/PricedVariant.mdx)[]> @@ -999,11 +1546,11 @@ Promise<[PricedVariant](../types/PricedVariant.mdx)[]> ___ -#### shouldRetryTransaction\_ +### shouldRetryTransaction\_ `Protected **shouldRetryTransaction_**(err): boolean` -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` @@ -1035,11 +1582,11 @@ ___ ___ -#### withTransaction +### withTransaction `**withTransaction**(transactionManager?): [PricingService](PricingService.mdx)` -##### Parameters +#### Parameters -##### Returns +#### Returns [PricingService](PricingService.mdx) diff --git a/www/apps/docs/content/references/services/classes/Product.mdx b/www/apps/docs/content/references/services/classes/Product.mdx index c9e8bf6f34..7797a42eb9 100644 --- a/www/apps/docs/content/references/services/classes/Product.mdx +++ b/www/apps/docs/content/references/services/classes/Product.mdx @@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes" A product is a saleable item that holds general information such as name or description. It must include at least one Product Variant, where each product variant defines different options to purchase the product with (for example, different sizes or colors). The prices and inventory of the product are defined on the variant level. -## Constructors - -#### constructor +## constructor `**new Product**()` A product is a saleable item that holds general information such as name or description. It must include at least one Product Variant, where each product variant defines different options to purchase the product with (for example, different sizes or colors). The prices and inventory of the product are defined on the variant level. +___ + ## Properties +___ + ## Methods -#### afterLoad +### afterLoad `Private **afterLoad**(): void` -##### Returns +#### Returns `void` @@ -361,11 +363,11 @@ A product is a saleable item that holds general information such as name or desc ___ -#### beforeInsert +### beforeInsert `Private **beforeInsert**(): void` -##### Returns +#### Returns `void` @@ -383,11 +385,11 @@ ___ ___ -#### beforeUpdate +### beforeUpdate `Private **beforeUpdate**(): void` -##### Returns +#### Returns `void` diff --git a/www/apps/docs/content/references/services/classes/ProductCategory.mdx b/www/apps/docs/content/references/services/classes/ProductCategory.mdx index 45428f7939..a945161b91 100644 --- a/www/apps/docs/content/references/services/classes/ProductCategory.mdx +++ b/www/apps/docs/content/references/services/classes/ProductCategory.mdx @@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes" A product category can be used to categorize products into a hierarchy of categories. -## Constructors - -#### constructor +## constructor `**new ProductCategory**()` A product category can be used to categorize products into a hierarchy of categories. +___ + ## Properties +___ + ## Methods -#### beforeInsert +### beforeInsert `Private **beforeInsert**(): void` -##### Returns +#### Returns `void` diff --git a/www/apps/docs/content/references/services/classes/ProductCategoryService.mdx b/www/apps/docs/content/references/services/classes/ProductCategoryService.mdx index 3bf2eb6eab..f309082974 100644 --- a/www/apps/docs/content/references/services/classes/ProductCategoryService.mdx +++ b/www/apps/docs/content/references/services/classes/ProductCategoryService.mdx @@ -8,13 +8,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes" Provides layer to manipulate product categories. -## Constructors - -#### constructor +## constructor `**new ProductCategoryService**(«destructured»)` -##### Parameters +### Parameters +___ + ## Properties +___ + ## Accessors -#### activeManager\_ +### activeManager\_ - `Protected` **activeManager\_**: [object Object] +`Protected get**activeManager_**(): EntityManager` + +#### Returns + +EntityManager + + + +___ ## Methods -#### addProducts +### addProducts `**addProducts**(productCategoryId, productIds): Promise<void>` Add a batch of product to a product category -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -187,7 +207,7 @@ Promise<void> ___ -#### atomicPhase\_ +### atomicPhase\_ `Protected **atomicPhase_**(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise<TResult>` @@ -195,7 +215,7 @@ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<TResult> @@ -268,13 +288,13 @@ Promise<TResult> ___ -#### create +### create `**create**(productCategoryInput): Promise<[ProductCategory](ProductCategory.mdx)>` Creates a product category -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ProductCategory](ProductCategory.mdx)> @@ -306,13 +326,13 @@ Promise<[ProductCategory](ProductCategory.mdx)> ___ -#### delete +### delete `**delete**(productCategoryId): Promise<void>` Deletes a product category -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -344,11 +364,11 @@ Promise<void> ___ -#### fetchReorderConditions +### fetchReorderConditions `Protected **fetchReorderConditions**(productCategory, input, shouldDeleteElement?): [ReorderConditions](../types/ReorderConditions.mdx)` -##### Parameters +#### Parameters -##### Returns +#### Returns [ReorderConditions](../types/ReorderConditions.mdx) @@ -398,14 +418,14 @@ ___ ___ -#### listAndCount +### listAndCount `**listAndCount**(selector, config?, treeSelector?): Promise<[[ProductCategory](ProductCategory.mdx)[], number]>` Lists product category based on the provided parameters and includes the count of product category that match the query. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[[ProductCategory](ProductCategory.mdx)[], number]> @@ -455,11 +475,11 @@ Promise<[[ProductCategory](ProductCategory.mdx)[], number]> ___ -#### performReordering +### performReordering `Protected **performReordering**(repository, conditions): Promise<void>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -500,13 +520,13 @@ Promise<void> ___ -#### removeProducts +### removeProducts `**removeProducts**(productCategoryId, productIds): Promise<void>` Remove a batch of product from a product category -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -547,13 +567,13 @@ Promise<void> ___ -#### retrieve +### retrieve `**retrieve**(productCategoryId, config?, selector?, treeSelector?): Promise<[ProductCategory](ProductCategory.mdx)>` Retrieves a product category by id. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ProductCategory](ProductCategory.mdx)> @@ -612,13 +632,13 @@ Promise<[ProductCategory](ProductCategory.mdx)> ___ -#### retrieveByHandle +### retrieveByHandle `**retrieveByHandle**(handle, config?, selector?, treeSelector?): Promise<[ProductCategory](ProductCategory.mdx)>` Retrieves a product category by handle. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ProductCategory](ProductCategory.mdx)> @@ -677,13 +697,13 @@ Promise<[ProductCategory](ProductCategory.mdx)> ___ -#### retrieve\_ +### retrieve\_ `Protected **retrieve_**(config?, selector?, treeSelector?): Promise<[ProductCategory](ProductCategory.mdx)>` A generic retrieve for fining product categories by different attributes. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ProductCategory](ProductCategory.mdx)> @@ -733,11 +753,11 @@ Promise<[ProductCategory](ProductCategory.mdx)> ___ -#### shiftSiblings +### shiftSiblings `Protected **shiftSiblings**(repository, conditions): Promise<void>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -778,11 +798,11 @@ Promise<void> ___ -#### shouldRetryTransaction\_ +### shouldRetryTransaction\_ `Protected **shouldRetryTransaction_**(err): boolean` -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` @@ -814,14 +834,14 @@ ___ ___ -#### transformParentIdToEntity +### transformParentIdToEntity `Protected **transformParentIdToEntity**(productCategoryInput): Promise<[CreateProductCategoryInput](../types/CreateProductCategoryInput.mdx) \| [UpdateProductCategoryInput](../types/UpdateProductCategoryInput.mdx)>` Accepts an input object and transforms product\_category\_id into product\_category entity. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[CreateProductCategoryInput](../types/CreateProductCategoryInput.mdx) \| [UpdateProductCategoryInput](../types/UpdateProductCategoryInput.mdx)> @@ -853,13 +873,13 @@ Promise<[CreateProductCategoryInput](../types/CreateProductCategoryInput.mdx ___ -#### update +### update `**update**(productCategoryId, productCategoryInput): Promise<[ProductCategory](ProductCategory.mdx)>` Updates a product category -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ProductCategory](ProductCategory.mdx)> @@ -900,11 +920,11 @@ Promise<[ProductCategory](ProductCategory.mdx)> ___ -#### withTransaction +### withTransaction `**withTransaction**(transactionManager?): [ProductCategoryService](ProductCategoryService.mdx)` -##### Parameters +#### Parameters -##### Returns +#### Returns [ProductCategoryService](ProductCategoryService.mdx) diff --git a/www/apps/docs/content/references/services/classes/ProductCollection.mdx b/www/apps/docs/content/references/services/classes/ProductCollection.mdx index 16234f90ed..eee24cc482 100644 --- a/www/apps/docs/content/references/services/classes/ProductCollection.mdx +++ b/www/apps/docs/content/references/services/classes/ProductCollection.mdx @@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes" A Product Collection allows grouping together products for promotional purposes. For example, an admin can create a Summer collection, add products to it, and showcase it on the storefront. -## Constructors - -#### constructor +## constructor `**new ProductCollection**()` A Product Collection allows grouping together products for promotional purposes. For example, an admin can create a Summer collection, add products to it, and showcase it on the storefront. +___ + ## Properties +___ + ## Methods -#### createHandleIfNotProvided +### createHandleIfNotProvided `Private **createHandleIfNotProvided**(): void` -##### Returns +#### Returns `void` diff --git a/www/apps/docs/content/references/services/classes/ProductCollectionService.mdx b/www/apps/docs/content/references/services/classes/ProductCollectionService.mdx index 79a75b4fd0..53979c9b4c 100644 --- a/www/apps/docs/content/references/services/classes/ProductCollectionService.mdx +++ b/www/apps/docs/content/references/services/classes/ProductCollectionService.mdx @@ -8,13 +8,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes" Provides layer to manipulate product collections. -## Constructors - -#### constructor +## constructor `**new ProductCollectionService**(«destructured»)` -##### Parameters +### Parameters +___ + ## Properties +___ + ## Accessors -#### activeManager\_ +### activeManager\_ - `Protected` **activeManager\_**: [object Object] +`Protected get**activeManager_**(): EntityManager` + +#### Returns + +EntityManager + + + +___ ## Methods -#### addProducts +### addProducts `**addProducts**(collectionId, productIds): Promise<[ProductCollection](ProductCollection.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ProductCollection](ProductCollection.mdx)> @@ -212,7 +232,7 @@ Promise<[ProductCollection](ProductCollection.mdx)> ___ -#### atomicPhase\_ +### atomicPhase\_ `Protected **atomicPhase_**(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise<TResult>` @@ -220,7 +240,7 @@ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<TResult> @@ -293,13 +313,13 @@ Promise<TResult> ___ -#### create +### create `**create**(collection): Promise<[ProductCollection](ProductCollection.mdx)>` Creates a product collection -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ProductCollection](ProductCollection.mdx)> @@ -331,13 +351,13 @@ Promise<[ProductCollection](ProductCollection.mdx)> ___ -#### delete +### delete `**delete**(collectionId): Promise<void>` Deletes a product collection idempotently -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -369,13 +389,13 @@ Promise<void> ___ -#### list +### list `**list**(selector?, config?): Promise<[ProductCollection](ProductCollection.mdx)[]>` Lists product collections -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ProductCollection](ProductCollection.mdx)[]> @@ -434,13 +454,13 @@ Promise<[ProductCollection](ProductCollection.mdx)[]> ___ -#### listAndCount +### listAndCount `**listAndCount**(selector?, config?): Promise<[[ProductCollection](ProductCollection.mdx)[], number]>` Lists product collections and add count. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[[ProductCollection](ProductCollection.mdx)[], number]> @@ -481,11 +501,11 @@ Promise<[[ProductCollection](ProductCollection.mdx)[], number]> ___ -#### removeProducts +### removeProducts `**removeProducts**(collectionId, productIds): Promise<void>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -526,13 +546,13 @@ Promise<void> ___ -#### retrieve +### retrieve `**retrieve**(collectionId, config?): Promise<[ProductCollection](ProductCollection.mdx)>` Retrieves a product collection by id. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ProductCollection](ProductCollection.mdx)> @@ -573,13 +593,13 @@ Promise<[ProductCollection](ProductCollection.mdx)> ___ -#### retrieveByHandle +### retrieveByHandle `**retrieveByHandle**(collectionHandle, config?): Promise<[ProductCollection](ProductCollection.mdx)>` Retrieves a product collection by id. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ProductCollection](ProductCollection.mdx)> @@ -620,11 +640,11 @@ Promise<[ProductCollection](ProductCollection.mdx)> ___ -#### shouldRetryTransaction\_ +### shouldRetryTransaction\_ `Protected **shouldRetryTransaction_**(err): boolean` -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` @@ -656,13 +676,13 @@ ___ ___ -#### update +### update `**update**(collectionId, update): Promise<[ProductCollection](ProductCollection.mdx)>` Updates a product collection -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ProductCollection](ProductCollection.mdx)> @@ -703,11 +723,11 @@ Promise<[ProductCollection](ProductCollection.mdx)> ___ -#### withTransaction +### withTransaction `**withTransaction**(transactionManager?): [ProductCollectionService](ProductCollectionService.mdx)` -##### Parameters +#### Parameters -##### Returns +#### Returns [ProductCollectionService](ProductCollectionService.mdx) diff --git a/www/apps/docs/content/references/services/classes/ProductOption.mdx b/www/apps/docs/content/references/services/classes/ProductOption.mdx index 08ce7d0d5d..a6cfa2df8b 100644 --- a/www/apps/docs/content/references/services/classes/ProductOption.mdx +++ b/www/apps/docs/content/references/services/classes/ProductOption.mdx @@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes" A Product Option defines properties that may vary between different variants of a Product. Common Product Options are "Size" and "Color". Admins are free to create any product options. -## Constructors - -#### constructor +## constructor `**new ProductOption**()` A Product Option defines properties that may vary between different variants of a Product. Common Product Options are "Size" and "Color". Admins are free to create any product options. +___ + ## Properties +___ + ## Methods -#### beforeInsert +### beforeInsert `Private **beforeInsert**(): void` -##### Returns +#### Returns `void` diff --git a/www/apps/docs/content/references/services/classes/ProductOptionValue.mdx b/www/apps/docs/content/references/services/classes/ProductOptionValue.mdx index fe7dbd78af..0f708ebe2b 100644 --- a/www/apps/docs/content/references/services/classes/ProductOptionValue.mdx +++ b/www/apps/docs/content/references/services/classes/ProductOptionValue.mdx @@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes" An option value is one of the possible values of a Product Option. Product Variants specify a unique combination of product option values. -## Constructors - -#### constructor +## constructor `**new ProductOptionValue**()` An option value is one of the possible values of a Product Option. Product Variants specify a unique combination of product option values. +___ + ## Properties +___ + ## Methods -#### beforeInsert +### beforeInsert `Private **beforeInsert**(): void` -##### Returns +#### Returns `void` diff --git a/www/apps/docs/content/references/services/classes/ProductService.mdx b/www/apps/docs/content/references/services/classes/ProductService.mdx index 330d26f36d..392f3c61cd 100644 --- a/www/apps/docs/content/references/services/classes/ProductService.mdx +++ b/www/apps/docs/content/references/services/classes/ProductService.mdx @@ -6,13 +6,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes" # ProductService -## Constructors - -#### constructor +## constructor `**new ProductService**(«destructured»)` -##### Parameters +### Parameters +___ + ## Properties +___ + ## Accessors -#### activeManager\_ +### activeManager\_ - `Protected` **activeManager\_**: [object Object] +`Protected get**activeManager_**(): EntityManager` + +#### Returns + +EntityManager + + + +___ ## Methods -#### addOption +### addOption `**addOption**(productId, optionTitle): Promise<[Product](Product.mdx)>` @@ -236,7 +256,7 @@ Adds an option to a product. Options can, for example, be "Size", "Color", etc. Will update all the products variants with a dummy value for the newly created option. The same option cannot be added more than once. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Product](Product.mdx)> @@ -277,7 +297,7 @@ Promise<[Product](Product.mdx)> ___ -#### atomicPhase\_ +### atomicPhase\_ `Protected **atomicPhase_**(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise<TResult>` @@ -285,7 +305,7 @@ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<TResult> @@ -358,13 +378,13 @@ Promise<TResult> ___ -#### count +### count `**count**(selector?): Promise<number>` Return the total number of documents in database -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<number> @@ -396,13 +416,13 @@ Promise<number> ___ -#### create +### create `**create**(productObject): Promise<[Product](Product.mdx)>` Creates a product. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Product](Product.mdx)> @@ -434,14 +454,14 @@ Promise<[Product](Product.mdx)> ___ -#### delete +### delete `**delete**(productId): Promise<void>` Deletes a product from a given product id. The product's associated variants will also be deleted. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -473,13 +493,13 @@ Promise<void> ___ -#### deleteOption +### deleteOption `**deleteOption**(productId, optionId): Promise<void \| [Product](Product.mdx)>` Delete an option from a product. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void \| [Product](Product.mdx)> @@ -520,11 +540,11 @@ Promise<void \| [Product](Product.mdx)> ___ -#### filterProductsBySalesChannel +### filterProductsBySalesChannel `**filterProductsBySalesChannel**(productIds, salesChannelId, config?): Promise<[Product](Product.mdx)[]>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Product](Product.mdx)[]> @@ -574,13 +594,13 @@ Promise<[Product](Product.mdx)[]> ___ -#### isProductInSalesChannels +### isProductInSalesChannels `**isProductInSalesChannels**(id, salesChannelIds): Promise<boolean>` Check if the product is assigned to at least one of the provided sales channels. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<boolean> @@ -621,13 +641,13 @@ Promise<boolean> ___ -#### list +### list `**list**(selector, config?): Promise<[Product](Product.mdx)[]>` Lists products based on the provided parameters. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Product](Product.mdx)[]> @@ -668,14 +688,14 @@ Promise<[Product](Product.mdx)[]> ___ -#### listAndCount +### listAndCount `**listAndCount**(selector, config?): Promise<[[Product](Product.mdx)[], number]>` Lists products based on the provided parameters and includes the count of products that match the query. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[[Product](Product.mdx)[], number]> @@ -716,11 +736,11 @@ Promise<[[Product](Product.mdx)[], number]> ___ -#### listTagsByUsage +### listTagsByUsage `**listTagsByUsage**(take?): Promise<[ProductTag](ProductTag.mdx)[]>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ProductTag](ProductTag.mdx)[]> @@ -752,11 +772,11 @@ Promise<[ProductTag](ProductTag.mdx)[]> ___ -#### listTypes +### listTypes `**listTypes**(): Promise<[ProductType](ProductType.mdx)[]>` -##### Returns +#### Returns Promise<[ProductType](ProductType.mdx)[]> @@ -774,13 +794,13 @@ Promise<[ProductType](ProductType.mdx)[]> ___ -#### prepareListQuery\_ +### prepareListQuery\_ `Protected **prepareListQuery_**(selector, config): { q: string ; query: [FindWithoutRelationsOptions](../types/FindWithoutRelationsOptions-1.mdx) ; relations: keyof [Product](Product.mdx)[] }` Temporary method to be used in place we need custom query strategy to prevent typeorm bug -##### Parameters +#### Parameters -##### Returns +#### Returns `object` @@ -851,11 +871,11 @@ Temporary method to be used in place we need custom query strategy to prevent ty ___ -#### reorderVariants +### reorderVariants `**reorderVariants**(productId, variantOrder): Promise<[Product](Product.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Product](Product.mdx)> @@ -896,14 +916,14 @@ Promise<[Product](Product.mdx)> ___ -#### retrieve +### retrieve `**retrieve**(productId, config?): Promise<[Product](Product.mdx)>` Gets a product by id. Throws in case of DB Error and if product was not found. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Product](Product.mdx)> @@ -944,14 +964,14 @@ Promise<[Product](Product.mdx)> ___ -#### retrieveByExternalId +### retrieveByExternalId `**retrieveByExternalId**(externalId, config?): Promise<[Product](Product.mdx)>` Gets a product by external id. Throws in case of DB Error and if product was not found. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Product](Product.mdx)> @@ -992,14 +1012,14 @@ Promise<[Product](Product.mdx)> ___ -#### retrieveByHandle +### retrieveByHandle `**retrieveByHandle**(productHandle, config?): Promise<[Product](Product.mdx)>` Gets a product by handle. Throws in case of DB Error and if product was not found. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Product](Product.mdx)> @@ -1040,13 +1060,13 @@ Promise<[Product](Product.mdx)> ___ -#### retrieveOptionByTitle +### retrieveOptionByTitle `**retrieveOptionByTitle**(title, productId): Promise<null \| [ProductOption](ProductOption.mdx)>` Retrieve product's option by title. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<null \| [ProductOption](ProductOption.mdx)> @@ -1087,13 +1107,13 @@ Promise<null \| [ProductOption](ProductOption.mdx)> ___ -#### retrieveVariants +### retrieveVariants `**retrieveVariants**(productId, config?): Promise<[ProductVariant](ProductVariant.mdx)[]>` Gets all variants belonging to a product. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ProductVariant](ProductVariant.mdx)[]> @@ -1134,14 +1154,14 @@ Promise<[ProductVariant](ProductVariant.mdx)[]> ___ -#### retrieve\_ +### retrieve\_ `**retrieve_**(selector, config?): Promise<[Product](Product.mdx)>` Gets a product by selector. Throws in case of DB Error and if product was not found. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Product](Product.mdx)> @@ -1182,11 +1202,11 @@ Promise<[Product](Product.mdx)> ___ -#### shouldRetryTransaction\_ +### shouldRetryTransaction\_ `Protected **shouldRetryTransaction_**(err): boolean` -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` @@ -1218,7 +1238,7 @@ ___ ___ -#### update +### update `**update**(productId, update): Promise<[Product](Product.mdx)>` @@ -1226,7 +1246,7 @@ Updates a product. Product variant updates should use dedicated methods, e.g. `addVariant`, etc. The function will throw errors if metadata or product variant updates are attempted. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Product](Product.mdx)> @@ -1267,14 +1287,14 @@ Promise<[Product](Product.mdx)> ___ -#### updateOption +### updateOption `**updateOption**(productId, optionId, data): Promise<[Product](Product.mdx)>` Updates a product's option. Throws if the call tries to update an option not associated with the product. Throws if the updated title already exists. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Product](Product.mdx)> @@ -1324,13 +1344,13 @@ Promise<[Product](Product.mdx)> ___ -#### updateShippingProfile +### updateShippingProfile `**updateShippingProfile**(productIds, profileId): Promise<[Product](Product.mdx)[]>` Assign a product to a profile, if a profile id null is provided then detach the product from the profile -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Product](Product.mdx)[]> @@ -1371,11 +1391,11 @@ Promise<[Product](Product.mdx)[]> ___ -#### withTransaction +### withTransaction `**withTransaction**(transactionManager?): [ProductService](ProductService.mdx)` -##### Parameters +#### Parameters -##### Returns +#### Returns [ProductService](ProductService.mdx) diff --git a/www/apps/docs/content/references/services/classes/ProductTag.mdx b/www/apps/docs/content/references/services/classes/ProductTag.mdx index 8e51d8562e..47084d7064 100644 --- a/www/apps/docs/content/references/services/classes/ProductTag.mdx +++ b/www/apps/docs/content/references/services/classes/ProductTag.mdx @@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes" A Product Tag can be added to Products for easy filtering and grouping. -## Constructors - -#### constructor +## constructor `**new ProductTag**()` A Product Tag can be added to Products for easy filtering and grouping. +___ + ## Properties +___ + ## Methods -#### beforeInsert +### beforeInsert `Private **beforeInsert**(): void` -##### Returns +#### Returns `void` diff --git a/www/apps/docs/content/references/services/classes/ProductTaxRate.mdx b/www/apps/docs/content/references/services/classes/ProductTaxRate.mdx index 9b7ba524bf..a8ac6b2d0a 100644 --- a/www/apps/docs/content/references/services/classes/ProductTaxRate.mdx +++ b/www/apps/docs/content/references/services/classes/ProductTaxRate.mdx @@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes" This represents the association between a tax rate and a product to indicate that the product is taxed in a way different than the default. -## Constructors - -#### constructor +## constructor `**new ProductTaxRate**()` This represents the association between a tax rate and a product to indicate that the product is taxed in a way different than the default. +___ + ## Properties +___ + ## Methods -#### beforeInsert +### beforeInsert `Private **beforeInsert**(): void` -##### Returns +#### Returns `void` diff --git a/www/apps/docs/content/references/services/classes/ProductTypeService.mdx b/www/apps/docs/content/references/services/classes/ProductTypeService.mdx index 534e175a2e..0184b1a2eb 100644 --- a/www/apps/docs/content/references/services/classes/ProductTypeService.mdx +++ b/www/apps/docs/content/references/services/classes/ProductTypeService.mdx @@ -6,13 +6,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes" # ProductTypeService -## Constructors - -#### constructor +## constructor `**new ProductTypeService**(«destructured»)` -##### Parameters +### Parameters +___ + ## Properties +___ + ## Accessors -#### activeManager\_ +### activeManager\_ - `Protected` **activeManager\_**: [object Object] +`Protected get**activeManager_**(): EntityManager` + +#### Returns + +EntityManager + + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ `Protected **atomicPhase_**(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise<TResult>` @@ -101,7 +121,7 @@ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<TResult> @@ -174,13 +194,13 @@ Promise<TResult> ___ -#### list +### list `**list**(selector?, config?): Promise<[ProductType](ProductType.mdx)[]>` Lists product types -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ProductType](ProductType.mdx)[]> @@ -221,13 +241,13 @@ Promise<[ProductType](ProductType.mdx)[]> ___ -#### listAndCount +### listAndCount `**listAndCount**(selector?, config?): Promise<[[ProductType](ProductType.mdx)[], number]>` Lists product types and adds count. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[[ProductType](ProductType.mdx)[], number]> @@ -268,14 +288,14 @@ Promise<[[ProductType](ProductType.mdx)[], number]> ___ -#### retrieve +### retrieve `**retrieve**(id, config?): Promise<[ProductType](ProductType.mdx)>` Gets a product type by id. Throws in case of DB Error and if product was not found. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ProductType](ProductType.mdx)> @@ -316,11 +336,11 @@ Promise<[ProductType](ProductType.mdx)> ___ -#### shouldRetryTransaction\_ +### shouldRetryTransaction\_ `Protected **shouldRetryTransaction_**(err): boolean` -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` @@ -352,11 +372,11 @@ ___ ___ -#### withTransaction +### withTransaction `**withTransaction**(transactionManager?): [ProductTypeService](ProductTypeService.mdx)` -##### Parameters +#### Parameters -##### Returns +#### Returns [ProductTypeService](ProductTypeService.mdx) diff --git a/www/apps/docs/content/references/services/classes/ProductTypeTaxRate.mdx b/www/apps/docs/content/references/services/classes/ProductTypeTaxRate.mdx index a60617e7dc..30999dc070 100644 --- a/www/apps/docs/content/references/services/classes/ProductTypeTaxRate.mdx +++ b/www/apps/docs/content/references/services/classes/ProductTypeTaxRate.mdx @@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes" This represents the association between a tax rate and a product type to indicate that the product type is taxed in a different way than the default. -## Constructors - -#### constructor +## constructor `**new ProductTypeTaxRate**()` This represents the association between a tax rate and a product type to indicate that the product type is taxed in a different way than the default. +___ + ## Properties +___ + ## Methods -#### beforeInsert +### beforeInsert `Private **beforeInsert**(): void` -##### Returns +#### Returns `void` diff --git a/www/apps/docs/content/references/services/classes/ProductVariantInventoryItem.mdx b/www/apps/docs/content/references/services/classes/ProductVariantInventoryItem.mdx index dff7606e87..44b984cd7c 100644 --- a/www/apps/docs/content/references/services/classes/ProductVariantInventoryItem.mdx +++ b/www/apps/docs/content/references/services/classes/ProductVariantInventoryItem.mdx @@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes" A Product Variant Inventory Item links variants with inventory items and denotes the required quantity of the variant. -## Constructors - -#### constructor +## constructor `**new ProductVariantInventoryItem**()` A Product Variant Inventory Item links variants with inventory items and denotes the required quantity of the variant. +___ + ## Properties +___ + ## Methods -#### beforeInsert +### beforeInsert `Private **beforeInsert**(): void` -##### Returns +#### Returns `void` diff --git a/www/apps/docs/content/references/services/classes/ProductVariantInventoryService.mdx b/www/apps/docs/content/references/services/classes/ProductVariantInventoryService.mdx index 229ead223e..e2352b49cc 100644 --- a/www/apps/docs/content/references/services/classes/ProductVariantInventoryService.mdx +++ b/www/apps/docs/content/references/services/classes/ProductVariantInventoryService.mdx @@ -6,13 +6,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes" # ProductVariantInventoryService -## Constructors - -#### constructor +## constructor `**new ProductVariantInventoryService**(«destructured»)` -##### Parameters +### Parameters +___ + ## Properties +___ + ## Accessors -#### activeManager\_ +### activeManager\_ - `Protected` **activeManager\_**: [object Object] +`Protected get**activeManager_**(): EntityManager` + +#### Returns + +EntityManager + + ___ -#### inventoryService\_ +### inventoryService\_ - `Protected` **inventoryService\_**: [object Object] +`Protected get**inventoryService_**(): [IInventoryService](../interfaces/IInventoryService.mdx)` + +#### Returns + +[IInventoryService](../interfaces/IInventoryService.mdx) + + Promise<[InventoryLevelDTO](../types/InventoryLevelDTO.mdx)>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "confirmInventory", + "type": "(`inventoryItemId`: `string`, `locationIds`: `string`[], `quantity`: `number`, `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise<boolean>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "createInventoryItem", + "type": "(`input`: [CreateInventoryItemInput](../interfaces/CreateInventoryItemInput.mdx), `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise<[InventoryItemDTO](../types/InventoryItemDTO.mdx)>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "createInventoryItems", + "type": "(`input`: [CreateInventoryItemInput](../interfaces/CreateInventoryItemInput.mdx)[], `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise<[InventoryItemDTO](../types/InventoryItemDTO.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "createInventoryLevel", + "type": "(`data`: [CreateInventoryLevelInput](../interfaces/CreateInventoryLevelInput.mdx), `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise<[InventoryLevelDTO](../types/InventoryLevelDTO.mdx)>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "createInventoryLevels", + "type": "(`data`: [CreateInventoryLevelInput](../interfaces/CreateInventoryLevelInput.mdx)[], `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise<[InventoryLevelDTO](../types/InventoryLevelDTO.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "createReservationItem", + "type": "(`input`: [CreateReservationItemInput](../interfaces/CreateReservationItemInput.mdx), `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise<[ReservationItemDTO](../types/ReservationItemDTO.mdx)>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "createReservationItems", + "type": "(`input`: [CreateReservationItemInput](../interfaces/CreateReservationItemInput.mdx)[], `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise<[ReservationItemDTO](../types/ReservationItemDTO.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "deleteInventoryItem", + "type": "(`inventoryItemId`: `string` \\| `string`[], `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise<void>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "deleteInventoryItemLevelByLocationId", + "type": "(`locationId`: `string` \\| `string`[], `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise<void>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "deleteInventoryLevel", + "type": "(`inventoryItemId`: `string`, `locationId`: `string`, `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise<void>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "deleteReservationItem", + "type": "(`reservationItemId`: `string` \\| `string`[], `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise<void>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "deleteReservationItemByLocationId", + "type": "(`locationId`: `string` \\| `string`[], `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise<void>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "deleteReservationItemsByLineItem", + "type": "(`lineItemId`: `string` \\| `string`[], `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise<void>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "listInventoryItems", + "type": "(`selector`: [FilterableInventoryItemProps](../interfaces/FilterableInventoryItemProps.mdx), `config?`: [FindConfig](../interfaces/FindConfig-1.mdx)<[InventoryItemDTO](../types/InventoryItemDTO.mdx)>, `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise<[[InventoryItemDTO](../types/InventoryItemDTO.mdx)[], number]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "listInventoryLevels", + "type": "(`selector`: [FilterableInventoryLevelProps](../interfaces/FilterableInventoryLevelProps.mdx), `config?`: [FindConfig](../interfaces/FindConfig-1.mdx)<[InventoryLevelDTO](../types/InventoryLevelDTO.mdx)>, `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise<[[InventoryLevelDTO](../types/InventoryLevelDTO.mdx)[], number]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "listReservationItems", + "type": "(`selector`: [FilterableReservationItemProps](../interfaces/FilterableReservationItemProps.mdx), `config?`: [FindConfig](../interfaces/FindConfig-1.mdx)<[ReservationItemDTO](../types/ReservationItemDTO.mdx)>, `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise<[[ReservationItemDTO](../types/ReservationItemDTO.mdx)[], number]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "restoreInventoryItem", + "type": "(`inventoryItemId`: `string` \\| `string`[], `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise<void>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "retrieveAvailableQuantity", + "type": "(`inventoryItemId`: `string`, `locationIds`: `string`[], `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise<number>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "retrieveInventoryItem", + "type": "(`inventoryItemId`: `string`, `config?`: [FindConfig](../interfaces/FindConfig-1.mdx)<[InventoryItemDTO](../types/InventoryItemDTO.mdx)>, `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise<[InventoryItemDTO](../types/InventoryItemDTO.mdx)>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "retrieveInventoryLevel", + "type": "(`inventoryItemId`: `string`, `locationId`: `string`, `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise<[InventoryLevelDTO](../types/InventoryLevelDTO.mdx)>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "retrieveReservationItem", + "type": "(`reservationId`: `string`, `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise<[ReservationItemDTO](../types/ReservationItemDTO.mdx)>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "retrieveReservedQuantity", + "type": "(`inventoryItemId`: `string`, `locationIds`: `string`[], `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise<number>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "retrieveStockedQuantity", + "type": "(`inventoryItemId`: `string`, `locationIds`: `string`[], `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise<number>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "updateInventoryItem", + "type": "(`inventoryItemId`: `string`, `input`: [Partial](../types/Partial.mdx)<[CreateInventoryItemInput](../interfaces/CreateInventoryItemInput.mdx)>, `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise<[InventoryItemDTO](../types/InventoryItemDTO.mdx)>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "updateInventoryLevel", + "type": "(`inventoryItemId`: `string`, `locationId`: `string`, `update`: [UpdateInventoryLevelInput](../interfaces/UpdateInventoryLevelInput.mdx), `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise<[InventoryLevelDTO](../types/InventoryLevelDTO.mdx)>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "updateInventoryLevels", + "type": "(`updates`: [BulkUpdateInventoryLevelInput](../interfaces/BulkUpdateInventoryLevelInput.mdx)[], `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise<[InventoryLevelDTO](../types/InventoryLevelDTO.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "updateReservationItem", + "type": "(`reservationItemId`: `string`, `input`: [UpdateReservationItemInput](../interfaces/UpdateReservationItemInput.mdx), `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise<[ReservationItemDTO](../types/ReservationItemDTO.mdx)>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + } +]} /> ___ -#### stockLocationService\_ +### stockLocationService\_ - `Protected` **stockLocationService\_**: [object Object] +`Protected get**stockLocationService_**(): [IStockLocationService](../interfaces/IStockLocationService.mdx)` + +#### Returns + +[IStockLocationService](../interfaces/IStockLocationService.mdx) + + Promise<[StockLocationDTO](../types/StockLocationDTO.mdx)>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "delete", + "type": "(`id`: `string`, `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise<void>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "list", + "type": "(`selector`: [FilterableStockLocationProps](../interfaces/FilterableStockLocationProps.mdx), `config?`: [FindConfig](../interfaces/FindConfig-1.mdx)<[StockLocationDTO](../types/StockLocationDTO.mdx)>, `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise<[StockLocationDTO](../types/StockLocationDTO.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "listAndCount", + "type": "(`selector`: [FilterableStockLocationProps](../interfaces/FilterableStockLocationProps.mdx), `config?`: [FindConfig](../interfaces/FindConfig-1.mdx)<[StockLocationDTO](../types/StockLocationDTO.mdx)>, `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise<[[StockLocationDTO](../types/StockLocationDTO.mdx)[], number]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "retrieve", + "type": "(`id`: `string`, `config?`: [FindConfig](../interfaces/FindConfig-1.mdx)<[StockLocationDTO](../types/StockLocationDTO.mdx)>, `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise<[StockLocationDTO](../types/StockLocationDTO.mdx)>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "update", + "type": "(`id`: `string`, `input`: [UpdateStockLocationInput](../types/UpdateStockLocationInput.mdx), `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise<[StockLocationDTO](../types/StockLocationDTO.mdx)>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + } +]} /> + +___ ## Methods -#### adjustInventory +### adjustInventory `**adjustInventory**(variantId, locationId, quantity): Promise<void>` Adjusts inventory of a variant on a location -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -188,13 +528,13 @@ Promise<void> ___ -#### adjustReservationsQuantityByLineItem +### adjustReservationsQuantityByLineItem `**adjustReservationsQuantityByLineItem**(lineItemId, variantId, locationId, quantity): Promise<void>` Adjusts the quantity of reservations for a line item by a given amount. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -253,7 +593,7 @@ Promise<void> ___ -#### atomicPhase\_ +### atomicPhase\_ `Protected **atomicPhase_**(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise<TResult>` @@ -261,7 +601,7 @@ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<TResult> @@ -334,13 +674,13 @@ Promise<TResult> ___ -#### attachInventoryItem +### attachInventoryItem `**attachInventoryItem**(attachments): Promise<[ProductVariantInventoryItem](ProductVariantInventoryItem.mdx)[]>` Attach a variant to an inventory item -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ProductVariantInventoryItem](ProductVariantInventoryItem.mdx)[]> @@ -372,7 +712,7 @@ Promise<[ProductVariantInventoryItem](ProductVariantInventoryItem.mdx)[]> `**attachInventoryItem**(variantId, inventoryItemId, requiredQuantity?): Promise<[ProductVariantInventoryItem](ProductVariantInventoryItem.mdx)[]>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ProductVariantInventoryItem](ProductVariantInventoryItem.mdx)[]> @@ -422,13 +762,13 @@ Promise<[ProductVariantInventoryItem](ProductVariantInventoryItem.mdx)[]> ___ -#### confirmInventory +### confirmInventory `**confirmInventory**(variantId, quantity, context?): Promise<[Boolean](../index.md#boolean)>` confirms if requested inventory is available -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Boolean](../index.md#boolean)> @@ -487,13 +827,13 @@ Promise<[Boolean](../index.md#boolean)> ___ -#### deleteReservationsByLineItem +### deleteReservationsByLineItem `**deleteReservationsByLineItem**(lineItemId, variantId, quantity): Promise<void>` delete a reservation of variant quantity -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -543,13 +883,13 @@ Promise<void> ___ -#### detachInventoryItem +### detachInventoryItem `**detachInventoryItem**(inventoryItemId, variantId?): Promise<void>` Remove a variant from an inventory item -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -590,11 +930,11 @@ Promise<void> ___ -#### getAvailabilityContext +### getAvailabilityContext `Private **getAvailabilityContext**(variants, salesChannelId, existingContext?): Promise<[Required](../types/Required.mdx)<[AvailabilityContext](../types/AvailabilityContext.mdx)>>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Required](../types/Required.mdx)<[AvailabilityContext](../types/AvailabilityContext.mdx)>> @@ -644,7 +984,7 @@ Promise<[Required](../types/Required.mdx)<[AvailabilityContext](../types ___ -#### getVariantQuantityFromVariantInventoryItems +### getVariantQuantityFromVariantInventoryItems `**getVariantQuantityFromVariantInventoryItems**(variantInventoryItems, channelId): Promise<number>` @@ -653,7 +993,7 @@ The inventory quantity of the variant should be equal to the inventory item with the smallest stock, adjusted for quantity required to fulfill the given variant. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<number> @@ -694,13 +1034,13 @@ Promise<number> ___ -#### listByItem +### listByItem `**listByItem**(itemIds): Promise<[ProductVariantInventoryItem](ProductVariantInventoryItem.mdx)[]>` list registered inventory items -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ProductVariantInventoryItem](ProductVariantInventoryItem.mdx)[]> @@ -732,13 +1072,13 @@ Promise<[ProductVariantInventoryItem](ProductVariantInventoryItem.mdx)[]> ___ -#### listByVariant +### listByVariant `**listByVariant**(variantId): Promise<[ProductVariantInventoryItem](ProductVariantInventoryItem.mdx)[]>` List inventory items for a specific variant -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ProductVariantInventoryItem](ProductVariantInventoryItem.mdx)[]> @@ -770,13 +1110,13 @@ Promise<[ProductVariantInventoryItem](ProductVariantInventoryItem.mdx)[]> ___ -#### listInventoryItemsByVariant +### listInventoryItemsByVariant `**listInventoryItemsByVariant**(variantId): Promise<[InventoryItemDTO](../types/InventoryItemDTO.mdx)[]>` lists inventory items for a given variant -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[InventoryItemDTO](../types/InventoryItemDTO.mdx)[]> @@ -808,13 +1148,13 @@ Promise<[InventoryItemDTO](../types/InventoryItemDTO.mdx)[]> ___ -#### listVariantsByItem +### listVariantsByItem `**listVariantsByItem**(itemId): Promise<[ProductVariant](ProductVariant.mdx)[]>` lists variant by inventory item id -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ProductVariant](ProductVariant.mdx)[]> @@ -846,13 +1186,13 @@ Promise<[ProductVariant](ProductVariant.mdx)[]> ___ -#### reserveQuantity +### reserveQuantity `**reserveQuantity**(variantId, quantity, context?): Promise<void \| [ReservationItemDTO](../types/ReservationItemDTO.mdx)[]>` Reserves a quantity of a variant -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void \| [ReservationItemDTO](../types/ReservationItemDTO.mdx)[]> @@ -902,13 +1242,13 @@ Promise<void \| [ReservationItemDTO](../types/ReservationItemDTO.mdx)[]> ___ -#### retrieve +### retrieve `**retrieve**(inventoryItemId, variantId): Promise<[ProductVariantInventoryItem](ProductVariantInventoryItem.mdx)>` Retrieves a product variant inventory item by its inventory item ID and variant ID. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ProductVariantInventoryItem](ProductVariantInventoryItem.mdx)> @@ -949,11 +1289,11 @@ Promise<[ProductVariantInventoryItem](ProductVariantInventoryItem.mdx)> ___ -#### setProductAvailability +### setProductAvailability `**setProductAvailability**(products, salesChannelId): Promise<([Product](Product.mdx) \| [PricedProduct](../types/PricedProduct.mdx))[]>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<([Product](Product.mdx) \| [PricedProduct](../types/PricedProduct.mdx))[]> @@ -994,11 +1334,11 @@ Promise<([Product](Product.mdx) \| [PricedProduct](../types/PricedProduct.md ___ -#### setVariantAvailability +### setVariantAvailability `**setVariantAvailability**(variants, salesChannelId, availabilityContext?): Promise<[ProductVariant](ProductVariant.mdx)[] \| [PricedVariant](../types/PricedVariant.mdx)[]>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ProductVariant](ProductVariant.mdx)[] \| [PricedVariant](../types/PricedVariant.mdx)[]> @@ -1048,11 +1388,11 @@ Promise<[ProductVariant](ProductVariant.mdx)[] \| [PricedVariant](../types/P ___ -#### shouldRetryTransaction\_ +### shouldRetryTransaction\_ `Protected **shouldRetryTransaction_**(err): boolean` -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` @@ -1084,13 +1424,13 @@ ___ ___ -#### validateInventoryAtLocation +### validateInventoryAtLocation `**validateInventoryAtLocation**(items, locationId): Promise<void>` Validate stock at a location for fulfillment items -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -1131,11 +1471,11 @@ Promise<void> ___ -#### withTransaction +### withTransaction `**withTransaction**(transactionManager?): [ProductVariantInventoryService](ProductVariantInventoryService.mdx)` -##### Parameters +#### Parameters -##### Returns +#### Returns [ProductVariantInventoryService](ProductVariantInventoryService.mdx) diff --git a/www/apps/docs/content/references/services/classes/ProductVariantService.mdx b/www/apps/docs/content/references/services/classes/ProductVariantService.mdx index 5f726edd37..5dfc922c2e 100644 --- a/www/apps/docs/content/references/services/classes/ProductVariantService.mdx +++ b/www/apps/docs/content/references/services/classes/ProductVariantService.mdx @@ -6,13 +6,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes" # ProductVariantService -## Constructors - -#### constructor +## constructor `**new ProductVariantService**(«destructured»)` -##### Parameters +### Parameters +___ + ## Properties +___ + ## Accessors -#### activeManager\_ +### activeManager\_ - `Protected` **activeManager\_**: [object Object] +`Protected get**activeManager_**(): EntityManager` + +#### Returns + +EntityManager + + + +___ ## Methods -#### addOptionValue +### addOptionValue `**addOptionValue**(variantId, optionId, optionValue): Promise<[ProductOptionValue](ProductOptionValue.mdx)>` @@ -202,7 +222,7 @@ if that product does not have an option with the given option id. Fails if given variant is not found. Option value must be of type string or number. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ProductOptionValue](ProductOptionValue.mdx)> @@ -252,7 +272,7 @@ Promise<[ProductOptionValue](ProductOptionValue.mdx)> ___ -#### atomicPhase\_ +### atomicPhase\_ `Protected **atomicPhase_**(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise<TResult>` @@ -260,7 +280,7 @@ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<TResult> @@ -333,14 +353,14 @@ Promise<TResult> ___ -#### create +### create `**create**(productOrProductId, variants): Promise<TOutput>` Creates an unpublished product variant. Will validate against parent product to ensure that the variant can in fact be created. -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<TOutput> @@ -404,14 +424,14 @@ Promise<TOutput> ___ -#### delete +### delete `**delete**(variantIds): Promise<void>` Deletes variant or variants. Will never fail due to delete being idempotent. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -443,14 +463,14 @@ Promise<void> ___ -#### deleteOptionValue +### deleteOptionValue `**deleteOptionValue**(variantId, optionId): Promise<void>` Deletes option value from given variant. Will never fail due to delete being idempotent. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -491,14 +511,14 @@ Promise<void> ___ -#### getFreeTextQueryBuilder\_ +### getFreeTextQueryBuilder\_ `**getFreeTextQueryBuilder_**(variantRepo, query, q?): SelectQueryBuilder<[ProductVariant](ProductVariant.mdx)>` Lists variants based on the provided parameters and includes the count of variants that match the query. -##### Parameters +#### Parameters -##### Returns +#### Returns SelectQueryBuilder<[ProductVariant](ProductVariant.mdx)> @@ -548,7 +568,7 @@ SelectQueryBuilder<[ProductVariant](ProductVariant.mdx)> ___ -#### getRegionPrice +### getRegionPrice `**getRegionPrice**(variantId, context): Promise<null \| number>` @@ -556,7 +576,7 @@ Gets the price specific to a region. If no region specific money amount exists the function will try to use a currency price. If no default currency price exists the function will throw an error. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<null \| number> @@ -597,13 +617,13 @@ Promise<null \| number> ___ -#### isVariantInSalesChannels +### isVariantInSalesChannels `**isVariantInSalesChannels**(id, salesChannelIds): Promise<boolean>` Check if the variant is assigned to at least one of the provided sales channels. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<boolean> @@ -644,11 +664,11 @@ Promise<boolean> ___ -#### list +### list `**list**(selector, config?): Promise<[ProductVariant](ProductVariant.mdx)[]>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ProductVariant](ProductVariant.mdx)[]> @@ -689,11 +709,11 @@ Promise<[ProductVariant](ProductVariant.mdx)[]> ___ -#### listAndCount +### listAndCount `**listAndCount**(selector, config?): Promise<[[ProductVariant](ProductVariant.mdx)[], number]>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[[ProductVariant](ProductVariant.mdx)[], number]> @@ -734,13 +754,13 @@ Promise<[[ProductVariant](ProductVariant.mdx)[], number]> ___ -#### retrieve +### retrieve `**retrieve**(variantId, config?): Promise<[ProductVariant](ProductVariant.mdx)>` Gets a product variant by id. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ProductVariant](ProductVariant.mdx)> @@ -781,13 +801,13 @@ Promise<[ProductVariant](ProductVariant.mdx)> ___ -#### retrieveBySKU +### retrieveBySKU `**retrieveBySKU**(sku, config?): Promise<[ProductVariant](ProductVariant.mdx)>` Gets a product variant by id. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ProductVariant](ProductVariant.mdx)> @@ -828,11 +848,11 @@ Promise<[ProductVariant](ProductVariant.mdx)> ___ -#### setCurrencyPrice +### setCurrencyPrice `**setCurrencyPrice**(variantId, price): Promise<[MoneyAmount](MoneyAmount.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[MoneyAmount](MoneyAmount.mdx)> @@ -878,11 +898,11 @@ Sets the default price for the given currency. ___ -#### setRegionPrice +### setRegionPrice `**setRegionPrice**(variantId, price): Promise<[MoneyAmount](MoneyAmount.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[MoneyAmount](MoneyAmount.mdx)> @@ -928,11 +948,11 @@ Sets the default price of a specific region ___ -#### shouldRetryTransaction\_ +### shouldRetryTransaction\_ `Protected **shouldRetryTransaction_**(err): boolean` -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` @@ -964,13 +984,13 @@ ___ ___ -#### update +### update `**update**(variantData): Promise<[ProductVariant](ProductVariant.mdx)[]>` Updates a collection of variant. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ProductVariant](ProductVariant.mdx)[]> @@ -1006,7 +1026,7 @@ Updates a variant. Price updates should use dedicated methods. The function will throw, if price updates are attempted. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ProductVariant](ProductVariant.mdx)> @@ -1047,7 +1067,7 @@ Promise<[ProductVariant](ProductVariant.mdx)> `**update**(variantOrVariantId, update): Promise<[ProductVariant](ProductVariant.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ProductVariant](ProductVariant.mdx)> @@ -1088,11 +1108,11 @@ Promise<[ProductVariant](ProductVariant.mdx)> ___ -#### updateBatch +### updateBatch `Protected **updateBatch**(variantData): Promise<[ProductVariant](ProductVariant.mdx)[]>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ProductVariant](ProductVariant.mdx)[]> @@ -1124,14 +1144,14 @@ Promise<[ProductVariant](ProductVariant.mdx)[]> ___ -#### updateOptionValue +### updateOptionValue `**updateOptionValue**(variantId, optionId, optionValue): Promise<[ProductOptionValue](ProductOptionValue.mdx)>` Updates variant's option value. Option value must be of type string or number. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ProductOptionValue](ProductOptionValue.mdx)> @@ -1181,14 +1201,14 @@ Promise<[ProductOptionValue](ProductOptionValue.mdx)> ___ -#### updateVariantPrices +### updateVariantPrices `**updateVariantPrices**(data): Promise<void>` Updates variant/prices collection. Deletes any prices that are not in the update object, and is not associated with a price list. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -1223,7 +1243,7 @@ Promise<void> Updates a variant's prices. Deletes any prices that are not in the update object, and is not associated with a price list. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -1264,11 +1284,11 @@ Promise<void> ___ -#### updateVariantPricesBatch +### updateVariantPricesBatch `Protected **updateVariantPricesBatch**(data): Promise<void>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -1300,11 +1320,11 @@ Promise<void> ___ -#### upsertCurrencyPrices +### upsertCurrencyPrices `**upsertCurrencyPrices**(data): Promise<void>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -1336,11 +1356,11 @@ Promise<void> ___ -#### upsertRegionPrices +### upsertRegionPrices `**upsertRegionPrices**(data): Promise<void>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -1372,11 +1392,11 @@ Promise<void> ___ -#### validateVariantsToCreate\_ +### validateVariantsToCreate\_ `Protected **validateVariantsToCreate_**(product, variants): void` -##### Parameters +#### Parameters -##### Returns +#### Returns `void` @@ -1417,11 +1437,11 @@ ___ ___ -#### withTransaction +### withTransaction `**withTransaction**(transactionManager?): [ProductVariantService](ProductVariantService.mdx)` -##### Parameters +#### Parameters -##### Returns +#### Returns [ProductVariantService](ProductVariantService.mdx) diff --git a/www/apps/docs/content/references/services/classes/Refund.mdx b/www/apps/docs/content/references/services/classes/Refund.mdx index c0e3115da5..c2d72df5fe 100644 --- a/www/apps/docs/content/references/services/classes/Refund.mdx +++ b/www/apps/docs/content/references/services/classes/Refund.mdx @@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes" A refund represents an amount of money transfered back to the customer for a given reason. Refunds may occur in relation to Returns, Swaps and Claims, but can also be initiated by an admin for an order. -## Constructors - -#### constructor +## constructor `**new Refund**()` A refund represents an amount of money transfered back to the customer for a given reason. Refunds may occur in relation to Returns, Swaps and Claims, but can also be initiated by an admin for an order. +___ + ## Properties +___ + ## Methods -#### beforeInsert +### beforeInsert `Private **beforeInsert**(): void` -##### Returns +#### Returns `void` diff --git a/www/apps/docs/content/references/services/classes/Region.mdx b/www/apps/docs/content/references/services/classes/Region.mdx index c173c792f5..736d691239 100644 --- a/www/apps/docs/content/references/services/classes/Region.mdx +++ b/www/apps/docs/content/references/services/classes/Region.mdx @@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes" A region holds settings specific to a geographical location, including the currency, tax rates, and fulfillment and payment providers. A Region can consist of multiple countries to accomodate common shopping settings across countries. -## Constructors - -#### constructor +## constructor `**new Region**()` A region holds settings specific to a geographical location, including the currency, tax rates, and fulfillment and payment providers. A Region can consist of multiple countries to accomodate common shopping settings across countries. +___ + ## Properties +___ + ## Methods -#### beforeInsert +### beforeInsert `Private **beforeInsert**(): void` -##### Returns +#### Returns `void` diff --git a/www/apps/docs/content/references/services/classes/RegionService.mdx b/www/apps/docs/content/references/services/classes/RegionService.mdx index c7098252bb..20edfb56a8 100644 --- a/www/apps/docs/content/references/services/classes/RegionService.mdx +++ b/www/apps/docs/content/references/services/classes/RegionService.mdx @@ -8,13 +8,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes" Provides layer to manipulate regions. -## Constructors - -#### constructor +## constructor `**new RegionService**(«destructured»)` -##### Parameters +### Parameters +___ + ## Properties +___ + ## Accessors -#### activeManager\_ +### activeManager\_ - `Protected` **activeManager\_**: [object Object] +`Protected get**activeManager_**(): EntityManager` + +#### Returns + +EntityManager + + + +___ ## Methods -#### addCountry +### addCountry `**addCountry**(regionId, code): Promise<[Region](Region.mdx)>` Adds a country to the region. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Region](Region.mdx)> @@ -268,14 +288,14 @@ Promise<[Region](Region.mdx)> ___ -#### addFulfillmentProvider +### addFulfillmentProvider `**addFulfillmentProvider**(regionId, providerId): Promise<[Region](Region.mdx)>` Adds a fulfillment provider that is available in the region. Fails if the provider doesn't exist. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Region](Region.mdx)> @@ -316,14 +336,14 @@ Promise<[Region](Region.mdx)> ___ -#### addPaymentProvider +### addPaymentProvider `**addPaymentProvider**(regionId, providerId): Promise<[Region](Region.mdx)>` Adds a payment provider that is available in the region. Fails if the provider doesn't exist. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Region](Region.mdx)> @@ -364,7 +384,7 @@ Promise<[Region](Region.mdx)> ___ -#### atomicPhase\_ +### atomicPhase\_ `Protected **atomicPhase_**(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise<TResult>` @@ -372,7 +392,7 @@ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<TResult> @@ -445,13 +465,13 @@ Promise<TResult> ___ -#### create +### create `**create**(data): Promise<[Region](Region.mdx)>` Creates a region. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Region](Region.mdx)> @@ -483,13 +503,13 @@ Promise<[Region](Region.mdx)> ___ -#### delete +### delete `**delete**(regionId): Promise<void>` Deletes a region. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -521,13 +541,13 @@ Promise<void> ___ -#### list +### list `**list**(selector?, config?): Promise<[Region](Region.mdx)[]>` Lists all regions based on a query -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Region](Region.mdx)[]> @@ -568,13 +588,13 @@ Promise<[Region](Region.mdx)[]> ___ -#### listAndCount +### listAndCount `**listAndCount**(selector?, config?): Promise<[[Region](Region.mdx)[], number]>` Lists all regions based on a query and returns them along with count -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[[Region](Region.mdx)[], number]> @@ -615,13 +635,13 @@ Promise<[[Region](Region.mdx)[], number]> ___ -#### removeCountry +### removeCountry `**removeCountry**(regionId, code): Promise<[Region](Region.mdx)>` Removes a country from a Region. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Region](Region.mdx)> @@ -662,13 +682,13 @@ Promise<[Region](Region.mdx)> ___ -#### removeFulfillmentProvider +### removeFulfillmentProvider `**removeFulfillmentProvider**(regionId, providerId): Promise<[Region](Region.mdx)>` Removes a fulfillment provider from a region. Is idempotent. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Region](Region.mdx)> @@ -709,13 +729,13 @@ Promise<[Region](Region.mdx)> ___ -#### removePaymentProvider +### removePaymentProvider `**removePaymentProvider**(regionId, providerId): Promise<[Region](Region.mdx)>` Removes a payment provider from a region. Is idempotent. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Region](Region.mdx)> @@ -756,13 +776,13 @@ Promise<[Region](Region.mdx)> ___ -#### retrieve +### retrieve `**retrieve**(regionId, config?): Promise<[Region](Region.mdx)>` Retrieves a region by its id. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Region](Region.mdx)> @@ -803,13 +823,13 @@ Promise<[Region](Region.mdx)> ___ -#### retrieveByCountryCode +### retrieveByCountryCode `**retrieveByCountryCode**(code, config?): Promise<[Region](Region.mdx)>` Retrieve a region by country code. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Region](Region.mdx)> @@ -850,13 +870,13 @@ Promise<[Region](Region.mdx)> ___ -#### retrieveByName +### retrieveByName `**retrieveByName**(name): Promise<[Region](Region.mdx)>` Retrieves a region by name. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Region](Region.mdx)> @@ -888,11 +908,11 @@ Promise<[Region](Region.mdx)> ___ -#### shouldRetryTransaction\_ +### shouldRetryTransaction\_ `Protected **shouldRetryTransaction_**(err): boolean` -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` @@ -924,13 +944,13 @@ ___ ___ -#### update +### update `**update**(regionId, update): Promise<[Region](Region.mdx)>` Updates a region -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Region](Region.mdx)> @@ -971,14 +991,14 @@ Promise<[Region](Region.mdx)> ___ -#### validateCountry +### validateCountry `Protected **validateCountry**(code, regionId): Promise<[Country](Country.mdx)>` Validates a country code. Will normalize the code before checking for existence. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Country](Country.mdx)> @@ -1019,13 +1039,13 @@ Promise<[Country](Country.mdx)> ___ -#### validateCurrency +### validateCurrency `Protected **validateCurrency**(currencyCode): Promise<void>` Validates a currency code. Will throw if the currency code doesn't exist. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -1061,14 +1081,14 @@ if the provided currency code is invalid ___ -#### validateFields +### validateFields `Protected **validateFields**(regionData, id?): Promise<DeepPartial<[Region](Region.mdx)>>` Validates fields for creation and updates. If the region already exists the id can be passed to check that country updates are allowed. -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<DeepPartial<[Region](Region.mdx)>> @@ -1123,13 +1143,13 @@ Promise<DeepPartial<[Region](Region.mdx)>> ___ -#### validateTaxRate +### validateTaxRate `Protected **validateTaxRate**(taxRate): void` Validates a tax rate. Will throw if the tax rate is not between 0 and 1. -##### Parameters +#### Parameters -##### Returns +#### Returns `void` @@ -1165,11 +1185,11 @@ if the tax rate isn't number between 0-100 ___ -#### withTransaction +### withTransaction `**withTransaction**(transactionManager?): [RegionService](RegionService.mdx)` -##### Parameters +#### Parameters -##### Returns +#### Returns [RegionService](RegionService.mdx) diff --git a/www/apps/docs/content/references/services/classes/Return.mdx b/www/apps/docs/content/references/services/classes/Return.mdx index cc1ceccad9..60f2606938 100644 --- a/www/apps/docs/content/references/services/classes/Return.mdx +++ b/www/apps/docs/content/references/services/classes/Return.mdx @@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes" A Return holds information about Line Items that a Customer wishes to send back, along with how the items will be returned. Returns can also be used as part of a Swap or a Claim. -## Constructors - -#### constructor +## constructor `**new Return**()` A Return holds information about Line Items that a Customer wishes to send back, along with how the items will be returned. Returns can also be used as part of a Swap or a Claim. +___ + ## Properties +___ + ## Methods -#### beforeInsert +### beforeInsert `Private **beforeInsert**(): void` -##### Returns +#### Returns `void` diff --git a/www/apps/docs/content/references/services/classes/ReturnItem.mdx b/www/apps/docs/content/references/services/classes/ReturnItem.mdx index e8d2301cd3..c016e07cb4 100644 --- a/www/apps/docs/content/references/services/classes/ReturnItem.mdx +++ b/www/apps/docs/content/references/services/classes/ReturnItem.mdx @@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes" A return item represents a line item in an order that is to be returned. It includes details related to the return and the reason behind it. -## Constructors - -#### constructor +## constructor `**new ReturnItem**()` A return item represents a line item in an order that is to be returned. It includes details related to the return and the reason behind it. +___ + ## Properties +___ + ## Methods -#### beforeInsert +### beforeInsert `Private **beforeInsert**(): void` -##### Returns +#### Returns `void` diff --git a/www/apps/docs/content/references/services/classes/ReturnReasonService.mdx b/www/apps/docs/content/references/services/classes/ReturnReasonService.mdx index 8c6c28f2d2..dc546ea7cd 100644 --- a/www/apps/docs/content/references/services/classes/ReturnReasonService.mdx +++ b/www/apps/docs/content/references/services/classes/ReturnReasonService.mdx @@ -6,13 +6,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes" # ReturnReasonService -## Constructors - -#### constructor +## constructor `**new ReturnReasonService**(«destructured»)` -##### Parameters +### Parameters +___ + ## Properties +___ + ## Accessors -#### activeManager\_ +### activeManager\_ - `Protected` **activeManager\_**: [object Object] +`Protected get**activeManager_**(): EntityManager` + +#### Returns + +EntityManager + + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ `Protected **atomicPhase_**(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise<TResult>` @@ -101,7 +121,7 @@ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<TResult> @@ -174,11 +194,11 @@ Promise<TResult> ___ -#### create +### create `**create**(data): Promise<[ReturnReason](ReturnReason.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ReturnReason](ReturnReason.mdx)> @@ -210,11 +230,11 @@ Promise<[ReturnReason](ReturnReason.mdx)> ___ -#### delete +### delete `**delete**(returnReasonId): Promise<void>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -246,11 +266,11 @@ Promise<void> ___ -#### list +### list `**list**(selector, config?): Promise<[ReturnReason](ReturnReason.mdx)[]>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ReturnReason](ReturnReason.mdx)[]> @@ -291,13 +311,13 @@ Promise<[ReturnReason](ReturnReason.mdx)[]> ___ -#### retrieve +### retrieve `**retrieve**(returnReasonId, config?): Promise<[ReturnReason](ReturnReason.mdx)>` Gets an order by id. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ReturnReason](ReturnReason.mdx)> @@ -338,11 +358,11 @@ Promise<[ReturnReason](ReturnReason.mdx)> ___ -#### shouldRetryTransaction\_ +### shouldRetryTransaction\_ `Protected **shouldRetryTransaction_**(err): boolean` -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` @@ -374,11 +394,11 @@ ___ ___ -#### update +### update `**update**(id, data): Promise<[ReturnReason](ReturnReason.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ReturnReason](ReturnReason.mdx)> @@ -419,11 +439,11 @@ Promise<[ReturnReason](ReturnReason.mdx)> ___ -#### withTransaction +### withTransaction `**withTransaction**(transactionManager?): [ReturnReasonService](ReturnReasonService.mdx)` -##### Parameters +#### Parameters -##### Returns +#### Returns [ReturnReasonService](ReturnReasonService.mdx) diff --git a/www/apps/docs/content/references/services/classes/ReturnService.mdx b/www/apps/docs/content/references/services/classes/ReturnService.mdx index e735f70115..f83ceb5486 100644 --- a/www/apps/docs/content/references/services/classes/ReturnService.mdx +++ b/www/apps/docs/content/references/services/classes/ReturnService.mdx @@ -6,13 +6,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes" # ReturnService -## Constructors - -#### constructor +## constructor `**new ReturnService**(«destructured»)` -##### Parameters +### Parameters +___ + ## Properties +___ + ## Accessors -#### activeManager\_ +### activeManager\_ - `Protected` **activeManager\_**: [object Object] +`Protected get**activeManager_**(): EntityManager` + +#### Returns + +EntityManager + + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ `Protected **atomicPhase_**(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise<TResult>` @@ -191,7 +211,7 @@ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<TResult> @@ -264,13 +284,13 @@ Promise<TResult> ___ -#### cancel +### cancel `**cancel**(returnId): Promise<[Return](Return.mdx)>` Cancels a return if possible. Returns can be canceled if it has not been received. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Return](Return.mdx)> @@ -302,7 +322,7 @@ Promise<[Return](Return.mdx)> ___ -#### create +### create `**create**(data): Promise<[Return](Return.mdx)>` @@ -310,7 +330,7 @@ Creates a return request for an order, with given items, and a shipping method. If no refund amount is provided the refund amount is calculated from the return lines and the shipping cost. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Return](Return.mdx)> @@ -342,11 +362,11 @@ Promise<[Return](Return.mdx)> ___ -#### fulfill +### fulfill `**fulfill**(returnId): Promise<[Return](Return.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Return](Return.mdx)> @@ -378,13 +398,13 @@ Promise<[Return](Return.mdx)> ___ -#### getFulfillmentItems +### getFulfillmentItems `Protected **getFulfillmentItems**(order, items, transformer): Promise<[LineItem](LineItem.mdx) & { note?: string ; reason_id?: string }[]>` Retrieves the order line items, given an array of items -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[LineItem](LineItem.mdx) & { note?: string ; reason_id?: string }[]> @@ -434,11 +454,11 @@ Promise<[LineItem](LineItem.mdx) & { note?: string ; reason_id?: string ___ -#### list +### list `**list**(selector, config?): Promise<[Return](Return.mdx)[]>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Return](Return.mdx)[]> @@ -479,11 +499,11 @@ Promise<[Return](Return.mdx)[]> ___ -#### listAndCount +### listAndCount `**listAndCount**(selector, config?): Promise<[[Return](Return.mdx)[], number]>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[[Return](Return.mdx)[], number]> @@ -524,7 +544,7 @@ Promise<[[Return](Return.mdx)[], number]> ___ -#### receive +### receive `**receive**(returnId, receivedItems, refundAmount?, allowMismatch?, context?): Promise<[Return](Return.mdx)>` @@ -536,7 +556,7 @@ returned items are not matching the requested items. Setting the allowMismatch argument to true, will process the return, ignoring any mismatches. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Return](Return.mdx)> @@ -613,13 +633,13 @@ Promise<[Return](Return.mdx)> ___ -#### retrieve +### retrieve `**retrieve**(returnId, config?): Promise<[Return](Return.mdx)>` Retrieves a return by its id. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Return](Return.mdx)> @@ -660,11 +680,11 @@ Promise<[Return](Return.mdx)> ___ -#### retrieveBySwap +### retrieveBySwap `**retrieveBySwap**(swapId, relations?): Promise<[Return](Return.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Return](Return.mdx)> @@ -705,11 +725,11 @@ Promise<[Return](Return.mdx)> ___ -#### shouldRetryTransaction\_ +### shouldRetryTransaction\_ `Protected **shouldRetryTransaction_**(err): boolean` -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` @@ -741,11 +761,11 @@ ___ ___ -#### update +### update `**update**(returnId, update): Promise<[Return](Return.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Return](Return.mdx)> @@ -786,7 +806,7 @@ Promise<[Return](Return.mdx)> ___ -#### validateReturnLineItem +### validateReturnLineItem `Protected **validateReturnLineItem**(item?, quantity?, additional?): DeepPartial<[LineItem](LineItem.mdx)>` @@ -794,7 +814,7 @@ Checks that a given quantity of a line item can be returned. Fails if the item is undefined or if the returnable quantity of the item is lower, than the quantity that is requested to be returned. -##### Parameters +#### Parameters -##### Returns +#### Returns DeepPartial<[LineItem](LineItem.mdx)> @@ -862,7 +882,7 @@ DeepPartial<[LineItem](LineItem.mdx)> ___ -#### validateReturnStatuses +### validateReturnStatuses `Protected **validateReturnStatuses**(order): void` @@ -870,7 +890,7 @@ Checks that an order has the statuses necessary to complete a return. fulfillment\_status cannot be not\_fulfilled or returned. payment\_status must be captured. -##### Parameters +#### Parameters -##### Returns +#### Returns `void` @@ -906,11 +926,11 @@ when statuses are not sufficient for returns. ___ -#### withTransaction +### withTransaction `**withTransaction**(transactionManager?): [ReturnService](ReturnService.mdx)` -##### Parameters +#### Parameters -##### Returns +#### Returns [ReturnService](ReturnService.mdx) diff --git a/www/apps/docs/content/references/services/classes/SalesChannel.mdx b/www/apps/docs/content/references/services/classes/SalesChannel.mdx index e297467ad0..0b39b60231 100644 --- a/www/apps/docs/content/references/services/classes/SalesChannel.mdx +++ b/www/apps/docs/content/references/services/classes/SalesChannel.mdx @@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes" A Sales Channel is a method a business offers its products for purchase for the customers. For example, a Webshop can be a sales channel, and a mobile app can be another. -## Constructors - -#### constructor +## constructor `**new SalesChannel**()` A Sales Channel is a method a business offers its products for purchase for the customers. For example, a Webshop can be a sales channel, and a mobile app can be another. +___ + ## Properties +___ + ## Methods -#### beforeInsert +### beforeInsert `Private **beforeInsert**(): void` -##### Returns +#### Returns `void` diff --git a/www/apps/docs/content/references/services/classes/SalesChannelInventoryService.mdx b/www/apps/docs/content/references/services/classes/SalesChannelInventoryService.mdx index 39ed7a349a..d43388c455 100644 --- a/www/apps/docs/content/references/services/classes/SalesChannelInventoryService.mdx +++ b/www/apps/docs/content/references/services/classes/SalesChannelInventoryService.mdx @@ -6,13 +6,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes" # SalesChannelInventoryService -## Constructors - -#### constructor +## constructor `**new SalesChannelInventoryService**(«destructured»)` -##### Parameters +### Parameters +___ + ## Properties +___ + ## Accessors -#### activeManager\_ +### activeManager\_ - `Protected` **activeManager\_**: [object Object] +`Protected get**activeManager_**(): EntityManager` + +#### Returns + +EntityManager + + ___ -#### inventoryService\_ +### inventoryService\_ - `Protected` **inventoryService\_**: [object Object] +`Protected get**inventoryService_**(): [IInventoryService](../interfaces/IInventoryService.mdx)` + +#### Returns + +[IInventoryService](../interfaces/IInventoryService.mdx) + + Promise<[InventoryLevelDTO](../types/InventoryLevelDTO.mdx)>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "confirmInventory", + "type": "(`inventoryItemId`: `string`, `locationIds`: `string`[], `quantity`: `number`, `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise<boolean>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "createInventoryItem", + "type": "(`input`: [CreateInventoryItemInput](../interfaces/CreateInventoryItemInput.mdx), `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise<[InventoryItemDTO](../types/InventoryItemDTO.mdx)>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "createInventoryItems", + "type": "(`input`: [CreateInventoryItemInput](../interfaces/CreateInventoryItemInput.mdx)[], `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise<[InventoryItemDTO](../types/InventoryItemDTO.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "createInventoryLevel", + "type": "(`data`: [CreateInventoryLevelInput](../interfaces/CreateInventoryLevelInput.mdx), `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise<[InventoryLevelDTO](../types/InventoryLevelDTO.mdx)>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "createInventoryLevels", + "type": "(`data`: [CreateInventoryLevelInput](../interfaces/CreateInventoryLevelInput.mdx)[], `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise<[InventoryLevelDTO](../types/InventoryLevelDTO.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "createReservationItem", + "type": "(`input`: [CreateReservationItemInput](../interfaces/CreateReservationItemInput.mdx), `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise<[ReservationItemDTO](../types/ReservationItemDTO.mdx)>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "createReservationItems", + "type": "(`input`: [CreateReservationItemInput](../interfaces/CreateReservationItemInput.mdx)[], `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise<[ReservationItemDTO](../types/ReservationItemDTO.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "deleteInventoryItem", + "type": "(`inventoryItemId`: `string` \\| `string`[], `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise<void>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "deleteInventoryItemLevelByLocationId", + "type": "(`locationId`: `string` \\| `string`[], `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise<void>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "deleteInventoryLevel", + "type": "(`inventoryItemId`: `string`, `locationId`: `string`, `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise<void>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "deleteReservationItem", + "type": "(`reservationItemId`: `string` \\| `string`[], `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise<void>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "deleteReservationItemByLocationId", + "type": "(`locationId`: `string` \\| `string`[], `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise<void>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "deleteReservationItemsByLineItem", + "type": "(`lineItemId`: `string` \\| `string`[], `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise<void>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "listInventoryItems", + "type": "(`selector`: [FilterableInventoryItemProps](../interfaces/FilterableInventoryItemProps.mdx), `config?`: [FindConfig](../interfaces/FindConfig-1.mdx)<[InventoryItemDTO](../types/InventoryItemDTO.mdx)>, `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise<[[InventoryItemDTO](../types/InventoryItemDTO.mdx)[], number]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "listInventoryLevels", + "type": "(`selector`: [FilterableInventoryLevelProps](../interfaces/FilterableInventoryLevelProps.mdx), `config?`: [FindConfig](../interfaces/FindConfig-1.mdx)<[InventoryLevelDTO](../types/InventoryLevelDTO.mdx)>, `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise<[[InventoryLevelDTO](../types/InventoryLevelDTO.mdx)[], number]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "listReservationItems", + "type": "(`selector`: [FilterableReservationItemProps](../interfaces/FilterableReservationItemProps.mdx), `config?`: [FindConfig](../interfaces/FindConfig-1.mdx)<[ReservationItemDTO](../types/ReservationItemDTO.mdx)>, `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise<[[ReservationItemDTO](../types/ReservationItemDTO.mdx)[], number]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "restoreInventoryItem", + "type": "(`inventoryItemId`: `string` \\| `string`[], `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise<void>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "retrieveAvailableQuantity", + "type": "(`inventoryItemId`: `string`, `locationIds`: `string`[], `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise<number>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "retrieveInventoryItem", + "type": "(`inventoryItemId`: `string`, `config?`: [FindConfig](../interfaces/FindConfig-1.mdx)<[InventoryItemDTO](../types/InventoryItemDTO.mdx)>, `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise<[InventoryItemDTO](../types/InventoryItemDTO.mdx)>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "retrieveInventoryLevel", + "type": "(`inventoryItemId`: `string`, `locationId`: `string`, `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise<[InventoryLevelDTO](../types/InventoryLevelDTO.mdx)>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "retrieveReservationItem", + "type": "(`reservationId`: `string`, `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise<[ReservationItemDTO](../types/ReservationItemDTO.mdx)>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "retrieveReservedQuantity", + "type": "(`inventoryItemId`: `string`, `locationIds`: `string`[], `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise<number>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "retrieveStockedQuantity", + "type": "(`inventoryItemId`: `string`, `locationIds`: `string`[], `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise<number>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "updateInventoryItem", + "type": "(`inventoryItemId`: `string`, `input`: [Partial](../types/Partial.mdx)<[CreateInventoryItemInput](../interfaces/CreateInventoryItemInput.mdx)>, `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise<[InventoryItemDTO](../types/InventoryItemDTO.mdx)>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "updateInventoryLevel", + "type": "(`inventoryItemId`: `string`, `locationId`: `string`, `update`: [UpdateInventoryLevelInput](../interfaces/UpdateInventoryLevelInput.mdx), `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise<[InventoryLevelDTO](../types/InventoryLevelDTO.mdx)>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "updateInventoryLevels", + "type": "(`updates`: [BulkUpdateInventoryLevelInput](../interfaces/BulkUpdateInventoryLevelInput.mdx)[], `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise<[InventoryLevelDTO](../types/InventoryLevelDTO.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "updateReservationItem", + "type": "(`reservationItemId`: `string`, `input`: [UpdateReservationItemInput](../interfaces/UpdateReservationItemInput.mdx), `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise<[ReservationItemDTO](../types/ReservationItemDTO.mdx)>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + } +]} /> + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ `Protected **atomicPhase_**(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise<TResult>` @@ -116,7 +395,7 @@ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<TResult> @@ -189,13 +468,13 @@ Promise<TResult> ___ -#### retrieveAvailableItemQuantity +### retrieveAvailableItemQuantity `**retrieveAvailableItemQuantity**(salesChannelId, inventoryItemId): Promise<number>` Retrieves the available quantity of an item across all sales channel locations -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<number> @@ -236,11 +515,11 @@ Promise<number> ___ -#### shouldRetryTransaction\_ +### shouldRetryTransaction\_ `Protected **shouldRetryTransaction_**(err): boolean` -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` @@ -272,11 +551,11 @@ ___ ___ -#### withTransaction +### withTransaction `**withTransaction**(transactionManager?): [SalesChannelInventoryService](SalesChannelInventoryService.mdx)` -##### Parameters +#### Parameters -##### Returns +#### Returns [SalesChannelInventoryService](SalesChannelInventoryService.mdx) diff --git a/www/apps/docs/content/references/services/classes/SalesChannelLocation.mdx b/www/apps/docs/content/references/services/classes/SalesChannelLocation.mdx index b83f71fe32..1a195361a0 100644 --- a/www/apps/docs/content/references/services/classes/SalesChannelLocation.mdx +++ b/www/apps/docs/content/references/services/classes/SalesChannelLocation.mdx @@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes" This represents the association between a sales channel and a stock locations. -## Constructors - -#### constructor +## constructor `**new SalesChannelLocation**()` This represents the association between a sales channel and a stock locations. +___ + ## Properties +___ + ## Methods -#### beforeInsert +### beforeInsert `Private **beforeInsert**(): void` -##### Returns +#### Returns `void` diff --git a/www/apps/docs/content/references/services/classes/SalesChannelLocationService.mdx b/www/apps/docs/content/references/services/classes/SalesChannelLocationService.mdx index fb83907395..6a1a2a1592 100644 --- a/www/apps/docs/content/references/services/classes/SalesChannelLocationService.mdx +++ b/www/apps/docs/content/references/services/classes/SalesChannelLocationService.mdx @@ -8,13 +8,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes" Service for managing the stock locations of sales channels -## Constructors - -#### constructor +## constructor `**new SalesChannelLocationService**(«destructured»)` -##### Parameters +### Parameters +___ + ## Properties +___ + ## Accessors -#### activeManager\_ +### activeManager\_ - `Protected` **activeManager\_**: [object Object] +`Protected get**activeManager_**(): EntityManager` + +#### Returns + +EntityManager + + ___ -#### stockLocationService\_ +### stockLocationService\_ - `Protected` **stockLocationService\_**: [object Object] +`Protected get**stockLocationService_**(): [IStockLocationService](../interfaces/IStockLocationService.mdx)` + +#### Returns + +[IStockLocationService](../interfaces/IStockLocationService.mdx) + + Promise<[StockLocationDTO](../types/StockLocationDTO.mdx)>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "delete", + "type": "(`id`: `string`, `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise<void>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "list", + "type": "(`selector`: [FilterableStockLocationProps](../interfaces/FilterableStockLocationProps.mdx), `config?`: [FindConfig](../interfaces/FindConfig-1.mdx)<[StockLocationDTO](../types/StockLocationDTO.mdx)>, `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise<[StockLocationDTO](../types/StockLocationDTO.mdx)[]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "listAndCount", + "type": "(`selector`: [FilterableStockLocationProps](../interfaces/FilterableStockLocationProps.mdx), `config?`: [FindConfig](../interfaces/FindConfig-1.mdx)<[StockLocationDTO](../types/StockLocationDTO.mdx)>, `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise<[[StockLocationDTO](../types/StockLocationDTO.mdx)[], number]>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "retrieve", + "type": "(`id`: `string`, `config?`: [FindConfig](../interfaces/FindConfig-1.mdx)<[StockLocationDTO](../types/StockLocationDTO.mdx)>, `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise<[StockLocationDTO](../types/StockLocationDTO.mdx)>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + }, + { + "name": "update", + "type": "(`id`: `string`, `input`: [UpdateStockLocationInput](../types/UpdateStockLocationInput.mdx), `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise<[StockLocationDTO](../types/StockLocationDTO.mdx)>", + "description": "", + "optional": false, + "defaultValue": "", + "expandable": false, + "children": [] + } +]} /> + +___ ## Methods -#### associateLocation +### associateLocation `**associateLocation**(salesChannelId, locationId): Promise<void>` Associates a sales channel with a stock location. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -157,7 +238,7 @@ Promise<void> ___ -#### atomicPhase\_ +### atomicPhase\_ `Protected **atomicPhase_**(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise<TResult>` @@ -165,7 +246,7 @@ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<TResult> @@ -238,13 +319,13 @@ Promise<TResult> ___ -#### listLocationIds +### listLocationIds `**listLocationIds**(salesChannelId): Promise<string[]>` Lists the stock locations associated with a sales channel. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<string[]> @@ -276,13 +357,13 @@ Promise<string[]> ___ -#### listSalesChannelIds +### listSalesChannelIds `**listSalesChannelIds**(locationId): Promise<string[]>` Lists the sales channels associated with a stock location. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<string[]> @@ -314,13 +395,13 @@ Promise<string[]> ___ -#### removeLocation +### removeLocation `**removeLocation**(locationId, salesChannelId?): Promise<void>` Removes an association between a sales channel and a stock location. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -361,11 +442,11 @@ Promise<void> ___ -#### shouldRetryTransaction\_ +### shouldRetryTransaction\_ `Protected **shouldRetryTransaction_**(err): boolean` -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` @@ -397,11 +478,11 @@ ___ ___ -#### withTransaction +### withTransaction `**withTransaction**(transactionManager?): [SalesChannelLocationService](SalesChannelLocationService.mdx)` -##### Parameters +#### Parameters -##### Returns +#### Returns [SalesChannelLocationService](SalesChannelLocationService.mdx) diff --git a/www/apps/docs/content/references/services/classes/SalesChannelService.mdx b/www/apps/docs/content/references/services/classes/SalesChannelService.mdx index b6af21edd2..2f9076e1d5 100644 --- a/www/apps/docs/content/references/services/classes/SalesChannelService.mdx +++ b/www/apps/docs/content/references/services/classes/SalesChannelService.mdx @@ -6,13 +6,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes" # SalesChannelService -## Constructors - -#### constructor +## constructor `**new SalesChannelService**(«destructured»)` -##### Parameters +### Parameters +___ + ## Properties +___ + ## Accessors -#### activeManager\_ +### activeManager\_ - `Protected` **activeManager\_**: [object Object] +`Protected get**activeManager_**(): EntityManager` + +#### Returns + +EntityManager + + + +___ ## Methods -#### addProducts +### addProducts `**addProducts**(salesChannelId, productIds): Promise<[SalesChannel](SalesChannel.mdx)>` Add a batch of product to a sales channel -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[SalesChannel](SalesChannel.mdx)> @@ -194,7 +214,7 @@ Promise<[SalesChannel](SalesChannel.mdx)> ___ -#### atomicPhase\_ +### atomicPhase\_ `Protected **atomicPhase_**(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise<TResult>` @@ -202,7 +222,7 @@ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<TResult> @@ -275,7 +295,7 @@ Promise<TResult> ___ -#### create +### create `**create**(data): Promise<[SalesChannel](SalesChannel.mdx)>` @@ -284,7 +304,7 @@ Creates a SalesChannel This feature is under development and may change in the future. To use this feature please enable the corresponding feature flag in your medusa backend project. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[SalesChannel](SalesChannel.mdx)> @@ -316,13 +336,13 @@ Promise<[SalesChannel](SalesChannel.mdx)> ___ -#### createDefault +### createDefault `**createDefault**(): Promise<[SalesChannel](SalesChannel.mdx)>` Creates a default sales channel, if this does not already exist. -##### Returns +#### Returns Promise<[SalesChannel](SalesChannel.mdx)> @@ -340,7 +360,7 @@ Promise<[SalesChannel](SalesChannel.mdx)> ___ -#### delete +### delete `**delete**(salesChannelId): Promise<void>` @@ -348,7 +368,7 @@ Deletes a sales channel from This feature is under development and may change in the future. To use this feature please enable the corresponding feature flag in your medusa backend project. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -380,14 +400,14 @@ Promise<void> ___ -#### listAndCount +### listAndCount `**listAndCount**(selector, config?): Promise<[[SalesChannel](SalesChannel.mdx)[], number]>` Lists sales channels based on the provided parameters and includes the count of sales channels that match the query. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[[SalesChannel](SalesChannel.mdx)[], number]> @@ -428,13 +448,13 @@ Promise<[[SalesChannel](SalesChannel.mdx)[], number]> ___ -#### listProductIdsBySalesChannelIds +### listProductIdsBySalesChannelIds `**listProductIdsBySalesChannelIds**(salesChannelIds): Promise<{ [salesChannelId: string]: string[]; }>` List all product ids that belongs to the sales channels ids -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<{ [salesChannelId: string]: string[]; }> @@ -466,13 +486,13 @@ Promise<{ [salesChannelId: string]: string[]; }> ___ -#### removeProducts +### removeProducts `**removeProducts**(salesChannelId, productIds): Promise<[SalesChannel](SalesChannel.mdx)>` Remove a batch of product from a sales channel -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[SalesChannel](SalesChannel.mdx)> @@ -513,13 +533,13 @@ Promise<[SalesChannel](SalesChannel.mdx)> ___ -#### retrieve +### retrieve `**retrieve**(salesChannelId, config?): Promise<[SalesChannel](SalesChannel.mdx)>` Retrieve a SalesChannel by id -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[SalesChannel](SalesChannel.mdx)> @@ -560,13 +580,13 @@ Promise<[SalesChannel](SalesChannel.mdx)> ___ -#### retrieveByName +### retrieveByName `**retrieveByName**(name, config?): Promise<unknown>` Find a sales channel by name. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<unknown> @@ -607,13 +627,13 @@ Promise<unknown> ___ -#### retrieveDefault +### retrieveDefault `**retrieveDefault**(): Promise<[SalesChannel](SalesChannel.mdx)>` Retrieves the default sales channel. -##### Returns +#### Returns Promise<[SalesChannel](SalesChannel.mdx)> @@ -631,13 +651,13 @@ Promise<[SalesChannel](SalesChannel.mdx)> ___ -#### retrieve\_ +### retrieve\_ `Protected **retrieve_**(selector, config?): Promise<[SalesChannel](SalesChannel.mdx)>` A generic retrieve used to find a sales channel by different attributes. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[SalesChannel](SalesChannel.mdx)> @@ -678,11 +698,11 @@ Promise<[SalesChannel](SalesChannel.mdx)> ___ -#### shouldRetryTransaction\_ +### shouldRetryTransaction\_ `Protected **shouldRetryTransaction_**(err): boolean` -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` @@ -714,11 +734,11 @@ ___ ___ -#### update +### update `**update**(salesChannelId, data): Promise<[SalesChannel](SalesChannel.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[SalesChannel](SalesChannel.mdx)> @@ -759,11 +779,11 @@ Promise<[SalesChannel](SalesChannel.mdx)> ___ -#### withTransaction +### withTransaction `**withTransaction**(transactionManager?): [SalesChannelService](SalesChannelService.mdx)` -##### Parameters +#### Parameters -##### Returns +#### Returns [SalesChannelService](SalesChannelService.mdx) diff --git a/www/apps/docs/content/references/services/classes/SearchService.mdx b/www/apps/docs/content/references/services/classes/SearchService.mdx index 95111768af..32aff85647 100644 --- a/www/apps/docs/content/references/services/classes/SearchService.mdx +++ b/www/apps/docs/content/references/services/classes/SearchService.mdx @@ -6,13 +6,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes" # SearchService -## Constructors - -#### constructor +## constructor `**new SearchService**(«destructured», options)` -##### Parameters +### Parameters +___ + ## Properties +___ + ## Accessors -#### options +### options - **options**: [object Object] +`get**options**(): Record<string, unknown>` + +#### Returns + +`Record` + +`", + "optional": false, + "defaultValue": "", + "description": "", + "expandable": false, + "children": [] + } +]} /> + +___ ## Methods -#### addDocuments +### addDocuments `**addDocuments**(indexName, documents, type): Promise<void>` Used to index documents by the search engine provider -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -131,13 +151,13 @@ Promise<void> ___ -#### createIndex +### createIndex `**createIndex**(indexName, options): Promise<void>` Used to create an index -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -178,13 +198,13 @@ Promise<void> ___ -#### deleteAllDocuments +### deleteAllDocuments `**deleteAllDocuments**(indexName): Promise<void>` Used to delete all documents -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -216,13 +236,13 @@ Promise<void> ___ -#### deleteDocument +### deleteDocument `**deleteDocument**(indexName, document_id): Promise<void>` Used to delete document -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -263,13 +283,13 @@ Promise<void> ___ -#### getIndex +### getIndex `**getIndex**(indexName): Promise<void>` Used to get an index -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -301,13 +321,13 @@ Promise<void> ___ -#### replaceDocuments +### replaceDocuments `**replaceDocuments**(indexName, documents, type): Promise<void>` Used to replace documents -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -357,13 +377,13 @@ Promise<void> ___ -#### search +### search `**search**(indexName, query, options): Promise<{ hits: unknown[] }>` Used to search for a document in an index -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<{ hits: unknown[] }> @@ -413,13 +433,13 @@ Promise<{ hits: unknown[] }> ___ -#### updateSettings +### updateSettings `**updateSettings**(indexName, settings): Promise<void>` Used to update the settings of an index -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> diff --git a/www/apps/docs/content/references/services/classes/ShippingMethod.mdx b/www/apps/docs/content/references/services/classes/ShippingMethod.mdx index 599fc9f70a..8c9d4ce087 100644 --- a/www/apps/docs/content/references/services/classes/ShippingMethod.mdx +++ b/www/apps/docs/content/references/services/classes/ShippingMethod.mdx @@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes" A Shipping Method represents a way in which an Order or Return can be shipped. Shipping Methods are created from a Shipping Option, but may contain additional details that can be necessary for the Fulfillment Provider to handle the shipment. If the shipping method is created for a return, it may be associated with a claim or a swap that the return is part of. -## Constructors - -#### constructor +## constructor `**new ShippingMethod**()` A Shipping Method represents a way in which an Order or Return can be shipped. Shipping Methods are created from a Shipping Option, but may contain additional details that can be necessary for the Fulfillment Provider to handle the shipment. If the shipping method is created for a return, it may be associated with a claim or a swap that the return is part of. +___ + ## Properties +___ + ## Methods -#### beforeInsert +### beforeInsert `Private **beforeInsert**(): void` -##### Returns +#### Returns `void` diff --git a/www/apps/docs/content/references/services/classes/ShippingMethodTaxLine.mdx b/www/apps/docs/content/references/services/classes/ShippingMethodTaxLine.mdx index 876173f735..32e6daebe2 100644 --- a/www/apps/docs/content/references/services/classes/ShippingMethodTaxLine.mdx +++ b/www/apps/docs/content/references/services/classes/ShippingMethodTaxLine.mdx @@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes" A Shipping Method Tax Line represents the taxes applied on a shipping method in a cart. -## Constructors - -#### constructor +## constructor `**new ShippingMethodTaxLine**()` A Shipping Method Tax Line represents the taxes applied on a shipping method in a cart. +___ + ## Properties +___ + ## Methods -#### beforeInsert +### beforeInsert `Private **beforeInsert**(): void` -##### Returns +#### Returns `void` diff --git a/www/apps/docs/content/references/services/classes/ShippingOption.mdx b/www/apps/docs/content/references/services/classes/ShippingOption.mdx index 6d0c9ae6ab..46ed783aab 100644 --- a/www/apps/docs/content/references/services/classes/ShippingOption.mdx +++ b/www/apps/docs/content/references/services/classes/ShippingOption.mdx @@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes" A Shipping Option represents a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information. -## Constructors - -#### constructor +## constructor `**new ShippingOption**()` A Shipping Option represents a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information. +___ + ## Properties +___ + ## Methods -#### beforeInsert +### beforeInsert `Private **beforeInsert**(): void` -##### Returns +#### Returns `void` diff --git a/www/apps/docs/content/references/services/classes/ShippingOptionRequirement.mdx b/www/apps/docs/content/references/services/classes/ShippingOptionRequirement.mdx index 280008afa8..aa8ec3bacb 100644 --- a/www/apps/docs/content/references/services/classes/ShippingOptionRequirement.mdx +++ b/www/apps/docs/content/references/services/classes/ShippingOptionRequirement.mdx @@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes" A shipping option requirement defines conditions that a Cart must satisfy for the Shipping Option to be available for usage in the Cart. -## Constructors - -#### constructor +## constructor `**new ShippingOptionRequirement**()` A shipping option requirement defines conditions that a Cart must satisfy for the Shipping Option to be available for usage in the Cart. +___ + ## Properties +___ + ## Methods -#### beforeInsert +### beforeInsert `Private **beforeInsert**(): void` -##### Returns +#### Returns `void` diff --git a/www/apps/docs/content/references/services/classes/ShippingOptionService.mdx b/www/apps/docs/content/references/services/classes/ShippingOptionService.mdx index 04616f28e3..238fbfe0cf 100644 --- a/www/apps/docs/content/references/services/classes/ShippingOptionService.mdx +++ b/www/apps/docs/content/references/services/classes/ShippingOptionService.mdx @@ -8,13 +8,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes" Provides layer to manipulate profiles. -## Constructors - -#### constructor +## constructor `**new ShippingOptionService**(«destructured»)` -##### Parameters +### Parameters +___ + ## Properties +___ + ## Accessors -#### activeManager\_ +### activeManager\_ - `Protected` **activeManager\_**: [object Object] +`Protected get**activeManager_**(): EntityManager` + +#### Returns + +EntityManager + + + +___ ## Methods -#### addRequirement +### addRequirement `**addRequirement**(optionId, requirement): Promise<[ShippingOption](ShippingOption.mdx)>` Adds a requirement to a shipping option. Only 1 requirement of each type is allowed. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ShippingOption](ShippingOption.mdx)> @@ -188,7 +208,7 @@ Promise<[ShippingOption](ShippingOption.mdx)> ___ -#### atomicPhase\_ +### atomicPhase\_ `Protected **atomicPhase_**(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise<TResult>` @@ -196,7 +216,7 @@ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<TResult> @@ -269,7 +289,7 @@ Promise<TResult> ___ -#### create +### create `**create**(data): Promise<[ShippingOption](ShippingOption.mdx)>` @@ -277,7 +297,7 @@ Creates a new shipping option. Used both for outbound and inbound shipping options. The difference is registered by the `is_return` field which defaults to false. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ShippingOption](ShippingOption.mdx)> @@ -309,13 +329,13 @@ Promise<[ShippingOption](ShippingOption.mdx)> ___ -#### createShippingMethod +### createShippingMethod `**createShippingMethod**(optionId, data, config): Promise<[ShippingMethod](ShippingMethod.mdx)>` Creates a shipping method for a given cart. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ShippingMethod](ShippingMethod.mdx)> @@ -365,13 +385,13 @@ Promise<[ShippingMethod](ShippingMethod.mdx)> ___ -#### delete +### delete `**delete**(optionId): Promise<void \| [ShippingOption](ShippingOption.mdx)>` Deletes a profile with a given profile id. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void \| [ShippingOption](ShippingOption.mdx)> @@ -403,13 +423,13 @@ Promise<void \| [ShippingOption](ShippingOption.mdx)> ___ -#### deleteShippingMethods +### deleteShippingMethods `**deleteShippingMethods**(shippingMethods): Promise<[ShippingMethod](ShippingMethod.mdx)[]>` Removes a given shipping method -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ShippingMethod](ShippingMethod.mdx)[]> @@ -441,7 +461,7 @@ Promise<[ShippingMethod](ShippingMethod.mdx)[]> ___ -#### getPrice\_ +### getPrice\_ `**getPrice_**(option, data, cart): Promise<number>` @@ -449,7 +469,7 @@ Returns the amount to be paid for a shipping method. Will ask the fulfillment provider to calculate the price if the shipping option has the price type "calculated". -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<number> @@ -499,11 +519,11 @@ Promise<number> ___ -#### list +### list `**list**(selector, config?): Promise<[ShippingOption](ShippingOption.mdx)[]>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ShippingOption](ShippingOption.mdx)[]> @@ -544,11 +564,11 @@ Promise<[ShippingOption](ShippingOption.mdx)[]> ___ -#### listAndCount +### listAndCount `**listAndCount**(selector, config?): Promise<[[ShippingOption](ShippingOption.mdx)[], number]>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[[ShippingOption](ShippingOption.mdx)[], number]> @@ -589,13 +609,13 @@ Promise<[[ShippingOption](ShippingOption.mdx)[], number]> ___ -#### removeRequirement +### removeRequirement `**removeRequirement**(requirementId): Promise<void \| [ShippingOptionRequirement](ShippingOptionRequirement.mdx)>` Removes a requirement from a shipping option -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void \| [ShippingOptionRequirement](ShippingOptionRequirement.mdx)> @@ -627,14 +647,14 @@ Promise<void \| [ShippingOptionRequirement](ShippingOptionRequirement.mdx)&# ___ -#### retrieve +### retrieve `**retrieve**(optionId, options?): Promise<[ShippingOption](ShippingOption.mdx)>` Gets a profile by id. Throws in case of DB Error and if profile was not found. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ShippingOption](ShippingOption.mdx)> @@ -675,11 +695,11 @@ Promise<[ShippingOption](ShippingOption.mdx)> ___ -#### shouldRetryTransaction\_ +### shouldRetryTransaction\_ `Protected **shouldRetryTransaction_**(err): boolean` -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` @@ -711,7 +731,7 @@ ___ ___ -#### update +### update `**update**(optionId, update): Promise<[ShippingOption](ShippingOption.mdx)>` @@ -719,7 +739,7 @@ Updates a profile. Metadata updates and product updates should use dedicated methods, e.g. `setMetadata`, etc. The function will throw errors if metadata or product updates are attempted. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ShippingOption](ShippingOption.mdx)> @@ -760,14 +780,14 @@ Promise<[ShippingOption](ShippingOption.mdx)> ___ -#### updateShippingMethod +### updateShippingMethod `**updateShippingMethod**(id, update): Promise<undefined \| [ShippingMethod](ShippingMethod.mdx)>` Updates a shipping method's associations. Useful when a cart is completed and its methods should be copied to an order/swap entity. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<undefined \| [ShippingMethod](ShippingMethod.mdx)> @@ -808,11 +828,11 @@ Promise<undefined \| [ShippingMethod](ShippingMethod.mdx)> ___ -#### updateShippingProfile +### updateShippingProfile `**updateShippingProfile**(optionIds, profileId): Promise<[ShippingOption](ShippingOption.mdx)[]>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ShippingOption](ShippingOption.mdx)[]> @@ -853,11 +873,11 @@ Promise<[ShippingOption](ShippingOption.mdx)[]> ___ -#### validateAndMutatePrice +### validateAndMutatePrice `Private **validateAndMutatePrice**(option, priceInput): Promise<[CreateShippingOptionInput](../types/CreateShippingOptionInput.mdx) \| [Omit](../types/Omit.mdx)<[ShippingOption](ShippingOption.mdx), "beforeInsert">>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[CreateShippingOptionInput](../types/CreateShippingOptionInput.mdx) \| [Omit](../types/Omit.mdx)<[ShippingOption](ShippingOption.mdx), "beforeInsert">> @@ -898,7 +918,7 @@ Promise<[CreateShippingOptionInput](../types/CreateShippingOptionInput.mdx) ___ -#### validateCartOption +### validateCartOption `**validateCartOption**(option, cart): Promise<null \| [ShippingOption](ShippingOption.mdx)>` @@ -906,7 +926,7 @@ Checks if a given option id is a valid option for a cart. If it is the option is returned with the correct price. Throws when region\_ids do not match, or when the shipping option requirements are not satisfied. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<null \| [ShippingOption](ShippingOption.mdx)> @@ -947,13 +967,13 @@ Promise<null \| [ShippingOption](ShippingOption.mdx)> ___ -#### validatePriceType\_ +### validatePriceType\_ `**validatePriceType_**(priceType, option): Promise<[ShippingOptionPriceType](../enums/ShippingOptionPriceType.mdx)>` Validates a shipping option price -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ShippingOptionPriceType](../enums/ShippingOptionPriceType.mdx)> @@ -994,13 +1014,13 @@ Promise<[ShippingOptionPriceType](../enums/ShippingOptionPriceType.mdx)> ___ -#### validateRequirement\_ +### validateRequirement\_ `**validateRequirement_**(requirement, optionId?): Promise<[ShippingOptionRequirement](ShippingOptionRequirement.mdx)>` Validates a requirement -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ShippingOptionRequirement](ShippingOptionRequirement.mdx)> @@ -1041,11 +1061,11 @@ Promise<[ShippingOptionRequirement](ShippingOptionRequirement.mdx)> ___ -#### withTransaction +### withTransaction `**withTransaction**(transactionManager?): [ShippingOptionService](ShippingOptionService.mdx)` -##### Parameters +#### Parameters -##### Returns +#### Returns [ShippingOptionService](ShippingOptionService.mdx) diff --git a/www/apps/docs/content/references/services/classes/ShippingProfile.mdx b/www/apps/docs/content/references/services/classes/ShippingProfile.mdx index 04810f8a75..2a8a0ffd87 100644 --- a/www/apps/docs/content/references/services/classes/ShippingProfile.mdx +++ b/www/apps/docs/content/references/services/classes/ShippingProfile.mdx @@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes" A Shipping Profile has a set of defined Shipping Options that can be used to fulfill a given set of Products. For example, gift cards are shipped differently than physical products, so a shipping profile with the type `gift\_card` groups together the shipping options that can only be used for gift cards. -## Constructors - -#### constructor +## constructor `**new ShippingProfile**()` A Shipping Profile has a set of defined Shipping Options that can be used to fulfill a given set of Products. For example, gift cards are shipped differently than physical products, so a shipping profile with the type `gift\_card` groups together the shipping options that can only be used for gift cards. +___ + ## Properties +___ + ## Methods -#### beforeInsert +### beforeInsert `Private **beforeInsert**(): void` -##### Returns +#### Returns `void` diff --git a/www/apps/docs/content/references/services/classes/ShippingProfileService.mdx b/www/apps/docs/content/references/services/classes/ShippingProfileService.mdx index 76b0d3d093..b46ae0ab5b 100644 --- a/www/apps/docs/content/references/services/classes/ShippingProfileService.mdx +++ b/www/apps/docs/content/references/services/classes/ShippingProfileService.mdx @@ -8,15 +8,13 @@ import ParameterTypes from "@site/src/components/ParameterTypes" Provides layer to manipulate profiles. -#### Implements +## Implements -## Constructors - -#### constructor +## constructor `**new ShippingProfileService**(«destructured»)` -##### Parameters +### Parameters +___ + ## Properties +___ + ## Accessors -#### activeManager\_ +### activeManager\_ - `Protected` **activeManager\_**: [object Object] +`Protected get**activeManager_**(): EntityManager` + +#### Returns + +EntityManager + + + +___ ## Methods -#### addProduct +### addProduct `**addProduct**(profileId, productId): Promise<[ShippingProfile](ShippingProfile.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ShippingProfile](ShippingProfile.mdx)> @@ -191,13 +211,13 @@ use [addProducts](ShippingProfileService.mdx#addproducts) instead ___ -#### addProducts +### addProducts `**addProducts**(profileId, productId): Promise<[ShippingProfile](ShippingProfile.mdx)>` Adds a product or an array of products to the profile. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ShippingProfile](ShippingProfile.mdx)> @@ -238,14 +258,14 @@ Promise<[ShippingProfile](ShippingProfile.mdx)> ___ -#### addShippingOption +### addShippingOption `**addShippingOption**(profileId, optionId): Promise<[ShippingProfile](ShippingProfile.mdx)>` Adds a shipping option to the profile. The shipping option can be used to fulfill the products in the products field. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ShippingProfile](ShippingProfile.mdx)> @@ -286,7 +306,7 @@ Promise<[ShippingProfile](ShippingProfile.mdx)> ___ -#### atomicPhase\_ +### atomicPhase\_ `Protected **atomicPhase_**(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise<TResult>` @@ -294,7 +314,7 @@ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<TResult> @@ -367,13 +387,13 @@ Promise<TResult> ___ -#### create +### create `**create**(profile): Promise<[ShippingProfile](ShippingProfile.mdx)>` Creates a new shipping profile. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ShippingProfile](ShippingProfile.mdx)> @@ -405,13 +425,13 @@ Promise<[ShippingProfile](ShippingProfile.mdx)> ___ -#### createDefault +### createDefault `**createDefault**(): Promise<[ShippingProfile](ShippingProfile.mdx)>` Creates a default shipping profile, if this does not already exist. -##### Returns +#### Returns Promise<[ShippingProfile](ShippingProfile.mdx)> @@ -429,14 +449,14 @@ Promise<[ShippingProfile](ShippingProfile.mdx)> ___ -#### createGiftCardDefault +### createGiftCardDefault `**createGiftCardDefault**(): Promise<[ShippingProfile](ShippingProfile.mdx)>` Creates a default shipping profile, for gift cards if unless it already exists. -##### Returns +#### Returns Promise<[ShippingProfile](ShippingProfile.mdx)> @@ -454,13 +474,13 @@ Promise<[ShippingProfile](ShippingProfile.mdx)> ___ -#### delete +### delete `**delete**(profileId): Promise<void>` Deletes a profile with a given profile id. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -492,14 +512,14 @@ Promise<void> ___ -#### fetchCartOptions +### fetchCartOptions `**fetchCartOptions**(cart): Promise<[ShippingOption](ShippingOption.mdx)[]>` Finds all the shipping profiles that cover the products in a cart, and validates all options that are available for the cart. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ShippingOption](ShippingOption.mdx)[]> @@ -531,11 +551,11 @@ Promise<[ShippingOption](ShippingOption.mdx)[]> ___ -#### getMapProfileIdsByProductIds +### getMapProfileIdsByProductIds `**getMapProfileIdsByProductIds**(productIds): Promise<Map<string, string>>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<Map<string, string>> @@ -567,13 +587,13 @@ Promise<Map<string, string>> ___ -#### getProfilesInCart +### getProfilesInCart `Protected **getProfilesInCart**(cart): Promise<string[]>` Returns a list of all the productIds in the cart. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<string[]> @@ -605,11 +625,11 @@ Promise<string[]> ___ -#### list +### list `**list**(selector?, config?): Promise<[ShippingProfile](ShippingProfile.mdx)[]>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ShippingProfile](ShippingProfile.mdx)[]> @@ -650,13 +670,13 @@ Promise<[ShippingProfile](ShippingProfile.mdx)[]> ___ -#### removeProducts +### removeProducts `**removeProducts**(profileId, productId): Promise<void \| [ShippingProfile](ShippingProfile.mdx)>` Removes a product or an array of products from the profile. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void \| [ShippingProfile](ShippingProfile.mdx)> @@ -697,14 +717,14 @@ Promise<void \| [ShippingProfile](ShippingProfile.mdx)> ___ -#### retrieve +### retrieve `**retrieve**(profileId, options?): Promise<[ShippingProfile](ShippingProfile.mdx)>` Gets a profile by id. Throws in case of DB Error and if profile was not found. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ShippingProfile](ShippingProfile.mdx)> @@ -745,11 +765,11 @@ Promise<[ShippingProfile](ShippingProfile.mdx)> ___ -#### retrieveDefault +### retrieveDefault `**retrieveDefault**(): Promise<null \| [ShippingProfile](ShippingProfile.mdx)>` -##### Returns +#### Returns Promise<null \| [ShippingProfile](ShippingProfile.mdx)> @@ -767,11 +787,11 @@ Promise<null \| [ShippingProfile](ShippingProfile.mdx)> ___ -#### retrieveForProducts +### retrieveForProducts `**retrieveForProducts**(productIds): Promise<{ [product_id: string]: [ShippingProfile](ShippingProfile.mdx)[]; }>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<{ [product_id: string]: [ShippingProfile](ShippingProfile.mdx)[]; }> @@ -803,13 +823,13 @@ Promise<{ [product_id: string]: [ShippingProfile](ShippingProfile.mdx)[ ___ -#### retrieveGiftCardDefault +### retrieveGiftCardDefault `**retrieveGiftCardDefault**(): Promise<null \| [ShippingProfile](ShippingProfile.mdx)>` Retrieves the default gift card profile -##### Returns +#### Returns Promise<null \| [ShippingProfile](ShippingProfile.mdx)> @@ -827,11 +847,11 @@ Promise<null \| [ShippingProfile](ShippingProfile.mdx)> ___ -#### shouldRetryTransaction\_ +### shouldRetryTransaction\_ `Protected **shouldRetryTransaction_**(err): boolean` -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` @@ -863,7 +883,7 @@ ___ ___ -#### update +### update `**update**(profileId, update): Promise<[ShippingProfile](ShippingProfile.mdx)>` @@ -871,7 +891,7 @@ Updates a profile. Metadata updates and product updates should use dedicated methods, e.g. `setMetadata`, `addProduct`, etc. The function will throw errors if metadata or product updates are attempted. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ShippingProfile](ShippingProfile.mdx)> @@ -912,11 +932,11 @@ Promise<[ShippingProfile](ShippingProfile.mdx)> ___ -#### withTransaction +### withTransaction `**withTransaction**(transactionManager?): [ShippingProfileService](ShippingProfileService.mdx)` -##### Parameters +#### Parameters -##### Returns +#### Returns [ShippingProfileService](ShippingProfileService.mdx) diff --git a/www/apps/docs/content/references/services/classes/ShippingTaxRate.mdx b/www/apps/docs/content/references/services/classes/ShippingTaxRate.mdx index fb1e7b8cfa..de942923f7 100644 --- a/www/apps/docs/content/references/services/classes/ShippingTaxRate.mdx +++ b/www/apps/docs/content/references/services/classes/ShippingTaxRate.mdx @@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes" This represents the tax rates applied on a shipping option. -## Constructors - -#### constructor +## constructor `**new ShippingTaxRate**()` This represents the tax rates applied on a shipping option. +___ + ## Properties +___ + ## Methods -#### beforeInsert +### beforeInsert `Private **beforeInsert**(): void` -##### Returns +#### Returns `void` diff --git a/www/apps/docs/content/references/services/classes/StagedJobService.mdx b/www/apps/docs/content/references/services/classes/StagedJobService.mdx index 0b0cc482c9..3ef786b7be 100644 --- a/www/apps/docs/content/references/services/classes/StagedJobService.mdx +++ b/www/apps/docs/content/references/services/classes/StagedJobService.mdx @@ -8,13 +8,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes" Provides layer to manipulate users. -## Constructors - -#### constructor +## constructor `**new StagedJobService**(«destructured»)` -##### Parameters +### Parameters +___ + ## Properties +___ + ## Accessors -#### activeManager\_ +### activeManager\_ - `Protected` **activeManager\_**: [object Object] +`Protected get**activeManager_**(): EntityManager` + +#### Returns + +EntityManager + + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ `Protected **atomicPhase_**(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise<TResult>` @@ -103,7 +123,7 @@ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<TResult> @@ -176,11 +196,11 @@ Promise<TResult> ___ -#### create +### create `**create**(data): Promise<[StagedJob](StagedJob.mdx)[]>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[StagedJob](StagedJob.mdx)[]> @@ -212,11 +232,11 @@ Promise<[StagedJob](StagedJob.mdx)[]> ___ -#### delete +### delete `**delete**(stagedJobIds): Promise<void>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -248,11 +268,11 @@ Promise<void> ___ -#### list +### list `**list**(config): Promise<[StagedJob](StagedJob.mdx)[]>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[StagedJob](StagedJob.mdx)[]> @@ -284,11 +304,11 @@ Promise<[StagedJob](StagedJob.mdx)[]> ___ -#### shouldRetryTransaction\_ +### shouldRetryTransaction\_ `Protected **shouldRetryTransaction_**(err): boolean` -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` @@ -320,11 +340,11 @@ ___ ___ -#### withTransaction +### withTransaction `**withTransaction**(transactionManager?): [StagedJobService](StagedJobService.mdx)` -##### Parameters +#### Parameters -##### Returns +#### Returns [StagedJobService](StagedJobService.mdx) diff --git a/www/apps/docs/content/references/services/classes/Store.mdx b/www/apps/docs/content/references/services/classes/Store.mdx index 97014d0792..94cfdbfd9b 100644 --- a/www/apps/docs/content/references/services/classes/Store.mdx +++ b/www/apps/docs/content/references/services/classes/Store.mdx @@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes" A store holds the main settings of the commerce shop. By default, only one store is created and used within the Medusa backend. It holds settings related to the name of the store, available currencies, and more. -## Constructors - -#### constructor +## constructor `**new Store**()` A store holds the main settings of the commerce shop. By default, only one store is created and used within the Medusa backend. It holds settings related to the name of the store, available currencies, and more. +___ + ## Properties +___ + ## Methods -#### beforeInsert +### beforeInsert `Private **beforeInsert**(): void` -##### Returns +#### Returns `void` diff --git a/www/apps/docs/content/references/services/classes/StorePostCustomersCustomerAddressesAddressReq.mdx b/www/apps/docs/content/references/services/classes/StorePostCustomersCustomerAddressesAddressReq.mdx index 98bec87c7a..24e1e30b04 100644 --- a/www/apps/docs/content/references/services/classes/StorePostCustomersCustomerAddressesAddressReq.mdx +++ b/www/apps/docs/content/references/services/classes/StorePostCustomersCustomerAddressesAddressReq.mdx @@ -6,12 +6,12 @@ import ParameterTypes from "@site/src/components/ParameterTypes" # StorePostCustomersCustomerAddressesAddressReq -## Constructors - -#### constructor +## constructor `**new StorePostCustomersCustomerAddressesAddressReq**()` +___ + ## Properties +___ + ## Properties +___ + ## Accessors -#### activeManager\_ +### activeManager\_ - `Protected` **activeManager\_**: [object Object] +`Protected get**activeManager_**(): EntityManager` + +#### Returns + +EntityManager + + + +___ ## Methods -#### addCurrency +### addCurrency `**addCurrency**(code): Promise<[Store](Store.mdx)>` Add a currency to the store -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Store](Store.mdx)> @@ -151,7 +171,7 @@ Promise<[Store](Store.mdx)> ___ -#### atomicPhase\_ +### atomicPhase\_ `Protected **atomicPhase_**(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise<TResult>` @@ -159,7 +179,7 @@ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<TResult> @@ -232,13 +252,13 @@ Promise<TResult> ___ -#### create +### create `**create**(): Promise<[Store](Store.mdx)>` Creates a store if it doesn't already exist. -##### Returns +#### Returns Promise<[Store](Store.mdx)> @@ -256,11 +276,11 @@ Promise<[Store](Store.mdx)> ___ -#### getDefaultCurrency\_ +### getDefaultCurrency\_ `Protected **getDefaultCurrency_**(code): [Partial](../types/Partial.mdx)<[Currency](Currency.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns [Partial](../types/Partial.mdx)<[Currency](Currency.mdx)> @@ -292,13 +312,13 @@ ___ ___ -#### removeCurrency +### removeCurrency `**removeCurrency**(code): Promise<any>` Removes a currency from the store -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<any> @@ -330,13 +350,13 @@ Promise<any> ___ -#### retrieve +### retrieve `**retrieve**(config?): Promise<[Store](Store.mdx)>` Retrieve the store settings. There is always a maximum of one store. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Store](Store.mdx)> @@ -368,11 +388,11 @@ Promise<[Store](Store.mdx)> ___ -#### shouldRetryTransaction\_ +### shouldRetryTransaction\_ `Protected **shouldRetryTransaction_**(err): boolean` -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` @@ -404,13 +424,13 @@ ___ ___ -#### update +### update `**update**(data): Promise<[Store](Store.mdx)>` Updates a store -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Store](Store.mdx)> @@ -442,11 +462,11 @@ Promise<[Store](Store.mdx)> ___ -#### withTransaction +### withTransaction `**withTransaction**(transactionManager?): [StoreService](StoreService.mdx)` -##### Parameters +#### Parameters -##### Returns +#### Returns [StoreService](StoreService.mdx) diff --git a/www/apps/docs/content/references/services/classes/StrategyResolverService.mdx b/www/apps/docs/content/references/services/classes/StrategyResolverService.mdx index 62e944ad0f..66e7488a5a 100644 --- a/www/apps/docs/content/references/services/classes/StrategyResolverService.mdx +++ b/www/apps/docs/content/references/services/classes/StrategyResolverService.mdx @@ -6,13 +6,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes" # StrategyResolverService -## Constructors - -#### constructor +## constructor `**new StrategyResolverService**(container)` -##### Parameters +### Parameters +___ + ## Properties +___ + ## Accessors -#### activeManager\_ +### activeManager\_ - `Protected` **activeManager\_**: [object Object] +`Protected get**activeManager_**(): EntityManager` + +#### Returns + +EntityManager + + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ `Protected **atomicPhase_**(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise<TResult>` @@ -101,7 +121,7 @@ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<TResult> @@ -174,11 +194,11 @@ Promise<TResult> ___ -#### resolveBatchJobByType +### resolveBatchJobByType `**resolveBatchJobByType**(type): [AbstractBatchJobStrategy](AbstractBatchJobStrategy.mdx)` -##### Parameters +#### Parameters -##### Returns +#### Returns [AbstractBatchJobStrategy](AbstractBatchJobStrategy.mdx) @@ -210,11 +230,11 @@ ___ ___ -#### shouldRetryTransaction\_ +### shouldRetryTransaction\_ `Protected **shouldRetryTransaction_**(err): boolean` -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` @@ -246,11 +266,11 @@ ___ ___ -#### withTransaction +### withTransaction `**withTransaction**(transactionManager?): [StrategyResolverService](StrategyResolverService.mdx)` -##### Parameters +#### Parameters -##### Returns +#### Returns [StrategyResolverService](StrategyResolverService.mdx) diff --git a/www/apps/docs/content/references/services/classes/StringComparisonOperator.mdx b/www/apps/docs/content/references/services/classes/StringComparisonOperator.mdx index 0d9c2a5a5c..6aa35e6108 100644 --- a/www/apps/docs/content/references/services/classes/StringComparisonOperator.mdx +++ b/www/apps/docs/content/references/services/classes/StringComparisonOperator.mdx @@ -8,12 +8,12 @@ import ParameterTypes from "@site/src/components/ParameterTypes" Fields used to apply flexible filters on strings. -## Constructors - -#### constructor +## constructor `**new StringComparisonOperator**()` +___ + ## Properties +___ + ## Methods -#### beforeInsert +### beforeInsert `Private **beforeInsert**(): void` -##### Returns +#### Returns `void` diff --git a/www/apps/docs/content/references/services/classes/SwapService.mdx b/www/apps/docs/content/references/services/classes/SwapService.mdx index f9e3bd4447..6552d2acdd 100644 --- a/www/apps/docs/content/references/services/classes/SwapService.mdx +++ b/www/apps/docs/content/references/services/classes/SwapService.mdx @@ -8,13 +8,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes" Handles swaps -## Constructors - -#### constructor +## constructor `**new SwapService**(«destructured»)` -##### Parameters +### Parameters +___ + ## Properties +___ + ## Accessors -#### activeManager\_ +### activeManager\_ - `Protected` **activeManager\_**: [object Object] +`Protected get**activeManager_**(): EntityManager` + +#### Returns + +EntityManager + + + +___ ## Methods -#### areReturnItemsValid +### areReturnItemsValid `Protected **areReturnItemsValid**(returnItems): Promise<boolean>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<boolean> @@ -329,7 +349,7 @@ Promise<boolean> ___ -#### atomicPhase\_ +### atomicPhase\_ `Protected **atomicPhase_**(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise<TResult>` @@ -337,7 +357,7 @@ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<TResult> @@ -410,7 +430,7 @@ Promise<TResult> ___ -#### cancel +### cancel `**cancel**(swapId): Promise<[Swap](Swap.mdx)>` @@ -418,7 +438,7 @@ Cancels a given swap if possible. A swap can only be canceled if all related returns, fulfillments, and payments have been canceled. If a swap is associated with a refund, it cannot be canceled. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Swap](Swap.mdx)> @@ -450,13 +470,13 @@ Promise<[Swap](Swap.mdx)> ___ -#### cancelFulfillment +### cancelFulfillment `**cancelFulfillment**(fulfillmentId): Promise<[Swap](Swap.mdx)>` Cancels a fulfillment (if related to a swap) -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Swap](Swap.mdx)> @@ -488,14 +508,14 @@ Promise<[Swap](Swap.mdx)> ___ -#### create +### create `**create**(order, returnItems, additionalItems?, returnShipping?, custom?): Promise<[Swap](Swap.mdx)>` Creates a swap from an order, with given return items, additional items and an optional return shipping method. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Swap](Swap.mdx)> @@ -617,7 +637,7 @@ Promise<[Swap](Swap.mdx)> ___ -#### createCart +### createCart `**createCart**(swapId, customShippingOptions?, context?): Promise<[Swap](Swap.mdx)>` @@ -626,7 +646,7 @@ for differences associated with the swap. The swap represented by the swapId must belong to the order. Fails if there is already a cart on the swap. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Swap](Swap.mdx)> @@ -685,14 +705,14 @@ Promise<[Swap](Swap.mdx)> ___ -#### createFulfillment +### createFulfillment `**createFulfillment**(swapId, config?): Promise<[Swap](Swap.mdx)>` Fulfills the additional items associated with the swap. Will call the fulfillment providers associated with the shipping methods. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Swap](Swap.mdx)> @@ -733,13 +753,13 @@ Promise<[Swap](Swap.mdx)> ___ -#### createShipment +### createShipment `**createShipment**(swapId, fulfillmentId, trackingLinks?, config?): Promise<[Swap](Swap.mdx)>` Marks a fulfillment as shipped and attaches tracking numbers. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Swap](Swap.mdx)> @@ -798,13 +818,13 @@ Promise<[Swap](Swap.mdx)> ___ -#### deleteMetadata +### deleteMetadata `**deleteMetadata**(swapId, key): Promise<[Swap](Swap.mdx)>` Dedicated method to delete metadata for a swap. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Swap](Swap.mdx)> @@ -845,13 +865,13 @@ Promise<[Swap](Swap.mdx)> ___ -#### list +### list `**list**(selector, config?): Promise<[Swap](Swap.mdx)[]>` List swaps. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Swap](Swap.mdx)[]> @@ -892,13 +912,13 @@ Promise<[Swap](Swap.mdx)[]> ___ -#### listAndCount +### listAndCount `**listAndCount**(selector, config?): Promise<[[Swap](Swap.mdx)[], number]>` List swaps. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[[Swap](Swap.mdx)[], number]> @@ -939,13 +959,13 @@ Promise<[[Swap](Swap.mdx)[], number]> ___ -#### processDifference +### processDifference `**processDifference**(swapId): Promise<[Swap](Swap.mdx)>` Process difference for the requested swap. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Swap](Swap.mdx)> @@ -977,13 +997,13 @@ Promise<[Swap](Swap.mdx)> ___ -#### registerCartCompletion +### registerCartCompletion `**registerCartCompletion**(swapId): Promise<[Swap](Swap.mdx)>` Register a cart completion -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Swap](Swap.mdx)> @@ -1015,14 +1035,14 @@ Promise<[Swap](Swap.mdx)> ___ -#### registerReceived +### registerReceived `**registerReceived**(id): Promise<[Swap](Swap.mdx)>` Registers the swap return items as received so that they cannot be used as a part of other swaps/returns. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Swap](Swap.mdx)> @@ -1054,13 +1074,13 @@ Promise<[Swap](Swap.mdx)> ___ -#### retrieve +### retrieve `**retrieve**(swapId, config?): Promise<[Swap](Swap.mdx)>` Retrieves a swap with the given id. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Swap](Swap.mdx)> @@ -1101,13 +1121,13 @@ Promise<[Swap](Swap.mdx)> ___ -#### retrieveByCartId +### retrieveByCartId `**retrieveByCartId**(cartId, relations?): Promise<[Swap](Swap.mdx)>` Retrieves a swap based on its associated cart id -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Swap](Swap.mdx)> @@ -1148,11 +1168,11 @@ Promise<[Swap](Swap.mdx)> ___ -#### shouldRetryTransaction\_ +### shouldRetryTransaction\_ `Protected **shouldRetryTransaction_**(err): boolean` -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` @@ -1184,13 +1204,13 @@ ___ ___ -#### transformQueryForCart +### transformQueryForCart `Protected **transformQueryForCart**(config): [Omit](../types/Omit.mdx)<[FindConfig](../interfaces/FindConfig.mdx)<[Swap](Swap.mdx)>, "select"> & { select?: string[] } & { cartRelations: undefined \| string[] ; cartSelects: undefined \| keyof [Cart](Cart.mdx)[] }` Transform find config object for retrieval. -##### Parameters +#### Parameters -##### Returns +#### Returns [Omit](../types/Omit.mdx)<[FindConfig](../interfaces/FindConfig.mdx)<[Swap](Swap.mdx)>, "select"> & ``{ select?: string[] }`` & ``{ cartRelations: undefined \| string[] ; cartSelects: undefined \| keyof [Cart](Cart.mdx)[] }`` @@ -1222,13 +1242,13 @@ Transform find config object for retrieval. ___ -#### update +### update `**update**(swapId, update): Promise<[Swap](Swap.mdx)>` Update the swap record. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[Swap](Swap.mdx)> @@ -1269,11 +1289,11 @@ Promise<[Swap](Swap.mdx)> ___ -#### withTransaction +### withTransaction `**withTransaction**(transactionManager?): [SwapService](SwapService.mdx)` -##### Parameters +#### Parameters -##### Returns +#### Returns [SwapService](SwapService.mdx) diff --git a/www/apps/docs/content/references/services/classes/SystemPaymentProviderService.mdx b/www/apps/docs/content/references/services/classes/SystemPaymentProviderService.mdx index ba1f5d0167..bba0672012 100644 --- a/www/apps/docs/content/references/services/classes/SystemPaymentProviderService.mdx +++ b/www/apps/docs/content/references/services/classes/SystemPaymentProviderService.mdx @@ -6,13 +6,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes" # SystemPaymentProviderService -## Constructors - -#### constructor +## constructor `**new SystemPaymentProviderService**(_)` -##### Parameters +### Parameters +___ + ## Properties +___ + ## Accessors -#### activeManager\_ +### activeManager\_ - `Protected` **activeManager\_**: [object Object] +`Protected get**activeManager_**(): EntityManager` + +#### Returns + +EntityManager + + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ `Protected **atomicPhase_**(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise<TResult>` @@ -101,7 +121,7 @@ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<TResult> @@ -174,11 +194,11 @@ Promise<TResult> ___ -#### authorizePayment +### authorizePayment `**authorizePayment**(_): Promise<Record<string, unknown>>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<Record<string, unknown>> @@ -210,11 +230,11 @@ Promise<Record<string, unknown>> ___ -#### cancelPayment +### cancelPayment `**cancelPayment**(_): Promise<Record<string, unknown>>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<Record<string, unknown>> @@ -246,11 +266,11 @@ Promise<Record<string, unknown>> ___ -#### capturePayment +### capturePayment `**capturePayment**(_): Promise<Record<string, unknown>>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<Record<string, unknown>> @@ -282,11 +302,11 @@ Promise<Record<string, unknown>> ___ -#### createPayment +### createPayment `**createPayment**(_): Promise<Record<string, unknown>>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<Record<string, unknown>> @@ -318,11 +338,11 @@ Promise<Record<string, unknown>> ___ -#### deletePayment +### deletePayment `**deletePayment**(_): Promise<Record<string, unknown>>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<Record<string, unknown>> @@ -354,11 +374,11 @@ Promise<Record<string, unknown>> ___ -#### getPaymentData +### getPaymentData `**getPaymentData**(_): Promise<Record<string, unknown>>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<Record<string, unknown>> @@ -390,11 +410,11 @@ Promise<Record<string, unknown>> ___ -#### getStatus +### getStatus `**getStatus**(_): Promise<string>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<string> @@ -426,11 +446,11 @@ Promise<string> ___ -#### refundPayment +### refundPayment `**refundPayment**(_): Promise<Record<string, unknown>>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<Record<string, unknown>> @@ -462,11 +482,11 @@ Promise<Record<string, unknown>> ___ -#### shouldRetryTransaction\_ +### shouldRetryTransaction\_ `Protected **shouldRetryTransaction_**(err): boolean` -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` @@ -498,11 +518,11 @@ ___ ___ -#### updatePayment +### updatePayment `**updatePayment**(_): Promise<Record<string, unknown>>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<Record<string, unknown>> @@ -534,11 +554,11 @@ Promise<Record<string, unknown>> ___ -#### updatePaymentData +### updatePaymentData `**updatePaymentData**(_): Promise<Record<string, unknown>>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<Record<string, unknown>> @@ -570,11 +590,11 @@ Promise<Record<string, unknown>> ___ -#### withTransaction +### withTransaction `**withTransaction**(transactionManager?): [SystemPaymentProviderService](SystemPaymentProviderService.mdx)` -##### Parameters +#### Parameters -##### Returns +#### Returns [SystemPaymentProviderService](SystemPaymentProviderService.mdx) diff --git a/www/apps/docs/content/references/services/classes/TaxLine.mdx b/www/apps/docs/content/references/services/classes/TaxLine.mdx index 7970b000e8..5a4babbdb2 100644 --- a/www/apps/docs/content/references/services/classes/TaxLine.mdx +++ b/www/apps/docs/content/references/services/classes/TaxLine.mdx @@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes" A tax line represents the taxes amount applied to a line item. -## Constructors - -#### constructor +## constructor `**new TaxLine**()` A tax line represents the taxes amount applied to a line item. +___ + ## Properties +___ + ## Properties +___ + ## Accessors -#### activeManager\_ +### activeManager\_ - `Protected` **activeManager\_**: [object Object] +`Protected get**activeManager_**(): EntityManager` + +#### Returns + +EntityManager + + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ `Protected **atomicPhase_**(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise<TResult>` @@ -157,7 +177,7 @@ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<TResult> @@ -230,11 +250,11 @@ Promise<TResult> ___ -#### clearLineItemsTaxLines +### clearLineItemsTaxLines `**clearLineItemsTaxLines**(itemIds): Promise<void>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -266,11 +286,11 @@ Promise<void> ___ -#### clearTaxLines +### clearTaxLines `**clearTaxLines**(cartId): Promise<void>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -302,14 +322,14 @@ Promise<void> ___ -#### createShippingTaxLines +### createShippingTaxLines `**createShippingTaxLines**(shippingMethod, calculationContext): Promise<([LineItemTaxLine](LineItemTaxLine.mdx) \| [ShippingMethodTaxLine](ShippingMethodTaxLine.mdx))[]>` Persists the tax lines relevant for a shipping method to the database. Used for return shipping methods. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<([LineItemTaxLine](LineItemTaxLine.mdx) \| [ShippingMethodTaxLine](ShippingMethodTaxLine.mdx))[]> @@ -350,13 +370,13 @@ Promise<([LineItemTaxLine](LineItemTaxLine.mdx) \| [ShippingMethodTaxLine](S ___ -#### createTaxLines +### createTaxLines `**createTaxLines**(cartOrLineItems, calculationContext): Promise<([LineItemTaxLine](LineItemTaxLine.mdx) \| [ShippingMethodTaxLine](ShippingMethodTaxLine.mdx))[]>` Persists the tax lines relevant for an order to the database. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<([LineItemTaxLine](LineItemTaxLine.mdx) \| [ShippingMethodTaxLine](ShippingMethodTaxLine.mdx))[]> @@ -397,13 +417,13 @@ Promise<([LineItemTaxLine](LineItemTaxLine.mdx) \| [ShippingMethodTaxLine](S ___ -#### getCacheKey +### getCacheKey `Private **getCacheKey**(id, regionId): string` The cache key to get cache hits by. -##### Parameters +#### Parameters -##### Returns +#### Returns `string` @@ -444,14 +464,14 @@ The cache key to get cache hits by. ___ -#### getRegionRatesForProduct +### getRegionRatesForProduct `**getRegionRatesForProduct**(productIds, region): Promise<Map<string, [TaxServiceRate](../types/TaxServiceRate.mdx)[]>>` Gets the tax rates configured for a product. The rates are cached between calls. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<Map<string, [TaxServiceRate](../types/TaxServiceRate.mdx)[]>> @@ -492,14 +512,14 @@ Promise<Map<string, [TaxServiceRate](../types/TaxServiceRate.mdx)[]> ___ -#### getRegionRatesForShipping +### getRegionRatesForShipping `**getRegionRatesForShipping**(optionId, regionDetails): Promise<[TaxServiceRate](../types/TaxServiceRate.mdx)[]>` Gets the tax rates configured for a shipping option. The rates are cached between calls. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[TaxServiceRate](../types/TaxServiceRate.mdx)[]> @@ -540,7 +560,7 @@ Promise<[TaxServiceRate](../types/TaxServiceRate.mdx)[]> ___ -#### getShippingTaxLines +### getShippingTaxLines `**getShippingTaxLines**(shippingMethod, calculationContext): Promise<[ShippingMethodTaxLine](ShippingMethodTaxLine.mdx)[]>` @@ -548,7 +568,7 @@ Gets the relevant tax lines for a shipping method. Note: this method doesn't persist the tax lines. Use createShippingTaxLines if you wish to persist the tax lines to the DB layer. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ShippingMethodTaxLine](ShippingMethodTaxLine.mdx)[]> @@ -589,7 +609,7 @@ Promise<[ShippingMethodTaxLine](ShippingMethodTaxLine.mdx)[]> ___ -#### getTaxLines +### getTaxLines `**getTaxLines**(lineItems, calculationContext): Promise<([LineItemTaxLine](LineItemTaxLine.mdx) \| [ShippingMethodTaxLine](ShippingMethodTaxLine.mdx))[]>` @@ -599,7 +619,7 @@ will be computed from the tax rules and potentially a 3rd party tax plugin. Note: this method doesn't persist the tax lines. Use createTaxLines if you wish to persist the tax lines to the DB layer. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<([LineItemTaxLine](LineItemTaxLine.mdx) \| [ShippingMethodTaxLine](ShippingMethodTaxLine.mdx))[]> @@ -640,13 +660,13 @@ Promise<([LineItemTaxLine](LineItemTaxLine.mdx) \| [ShippingMethodTaxLine](S ___ -#### getTaxLinesMap +### getTaxLinesMap `Protected **getTaxLinesMap**(items, calculationContext): Promise<[TaxLinesMaps](../types/TaxLinesMaps.mdx)>` Return a map of tax lines for line items and shipping methods -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[TaxLinesMaps](../types/TaxLinesMaps.mdx)> @@ -687,11 +707,11 @@ Promise<[TaxLinesMaps](../types/TaxLinesMaps.mdx)> ___ -#### list +### list `**list**(): Promise<[TaxProvider](TaxProvider.mdx)[]>` -##### Returns +#### Returns Promise<[TaxProvider](TaxProvider.mdx)[]> @@ -709,11 +729,11 @@ Promise<[TaxProvider](TaxProvider.mdx)[]> ___ -#### registerInstalledProviders +### registerInstalledProviders `**registerInstalledProviders**(providers): Promise<void>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -745,13 +765,13 @@ Promise<void> ___ -#### retrieveProvider +### retrieveProvider `**retrieveProvider**(region): [ITaxService](../interfaces/ITaxService.mdx)` Retrieves the relevant tax provider for the given region. -##### Parameters +#### Parameters -##### Returns +#### Returns [ITaxService](../interfaces/ITaxService.mdx) @@ -783,11 +803,11 @@ Retrieves the relevant tax provider for the given region. ___ -#### shouldRetryTransaction\_ +### shouldRetryTransaction\_ `Protected **shouldRetryTransaction_**(err): boolean` -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` @@ -819,11 +839,11 @@ ___ ___ -#### withTransaction +### withTransaction `**withTransaction**(transactionManager?): [TaxProviderService](TaxProviderService.mdx)` -##### Parameters +#### Parameters -##### Returns +#### Returns [TaxProviderService](TaxProviderService.mdx) diff --git a/www/apps/docs/content/references/services/classes/TaxRate.mdx b/www/apps/docs/content/references/services/classes/TaxRate.mdx index bf66a75088..50e23b4e7b 100644 --- a/www/apps/docs/content/references/services/classes/TaxRate.mdx +++ b/www/apps/docs/content/references/services/classes/TaxRate.mdx @@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes" A Tax Rate can be used to define a custom rate to charge on specified products, product types, and shipping options within a given region. -## Constructors - -#### constructor +## constructor `**new TaxRate**()` A Tax Rate can be used to define a custom rate to charge on specified products, product types, and shipping options within a given region. +___ + ## Properties +___ + ## Methods -#### beforeInsert +### beforeInsert `Private **beforeInsert**(): void` -##### Returns +#### Returns `void` diff --git a/www/apps/docs/content/references/services/classes/TaxRateService.mdx b/www/apps/docs/content/references/services/classes/TaxRateService.mdx index 0b834cdbde..023fbb6ac6 100644 --- a/www/apps/docs/content/references/services/classes/TaxRateService.mdx +++ b/www/apps/docs/content/references/services/classes/TaxRateService.mdx @@ -6,13 +6,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes" # TaxRateService -## Constructors - -#### constructor +## constructor `**new TaxRateService**(«destructured»)` -##### Parameters +### Parameters +___ + ## Properties +___ + ## Accessors -#### activeManager\_ +### activeManager\_ - `Protected` **activeManager\_**: [object Object] +`Protected get**activeManager_**(): EntityManager` + +#### Returns + +EntityManager + + + +___ ## Methods -#### addToProduct +### addToProduct `**addToProduct**(id, productIds, replace?): Promise<[ProductTaxRate](ProductTaxRate.mdx) \| [ProductTaxRate](ProductTaxRate.mdx)[]>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ProductTaxRate](ProductTaxRate.mdx) \| [ProductTaxRate](ProductTaxRate.mdx)[]> @@ -174,11 +194,11 @@ Promise<[ProductTaxRate](ProductTaxRate.mdx) \| [ProductTaxRate](ProductTaxR ___ -#### addToProductType +### addToProductType `**addToProductType**(id, productTypeIds, replace?): Promise<[ProductTypeTaxRate](ProductTypeTaxRate.mdx)[]>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ProductTypeTaxRate](ProductTypeTaxRate.mdx)[]> @@ -228,11 +248,11 @@ Promise<[ProductTypeTaxRate](ProductTypeTaxRate.mdx)[]> ___ -#### addToShippingOption +### addToShippingOption `**addToShippingOption**(id, optionIds, replace?): Promise<[ShippingTaxRate](ShippingTaxRate.mdx)[]>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ShippingTaxRate](ShippingTaxRate.mdx)[]> @@ -282,7 +302,7 @@ Promise<[ShippingTaxRate](ShippingTaxRate.mdx)[]> ___ -#### atomicPhase\_ +### atomicPhase\_ `Protected **atomicPhase_**(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise<TResult>` @@ -290,7 +310,7 @@ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<TResult> @@ -363,11 +383,11 @@ Promise<TResult> ___ -#### create +### create `**create**(data): Promise<[TaxRate](TaxRate.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[TaxRate](TaxRate.mdx)> @@ -399,11 +419,11 @@ Promise<[TaxRate](TaxRate.mdx)> ___ -#### delete +### delete `**delete**(id): Promise<void>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -435,11 +455,11 @@ Promise<void> ___ -#### list +### list `**list**(selector, config?): Promise<[TaxRate](TaxRate.mdx)[]>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[TaxRate](TaxRate.mdx)[]> @@ -480,11 +500,11 @@ Promise<[TaxRate](TaxRate.mdx)[]> ___ -#### listAndCount +### listAndCount `**listAndCount**(selector, config?): Promise<[[TaxRate](TaxRate.mdx)[], number]>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[[TaxRate](TaxRate.mdx)[], number]> @@ -525,11 +545,11 @@ Promise<[[TaxRate](TaxRate.mdx)[], number]> ___ -#### listByProduct +### listByProduct `**listByProduct**(productId, config): Promise<[TaxRate](TaxRate.mdx)[]>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[TaxRate](TaxRate.mdx)[]> @@ -570,11 +590,11 @@ Promise<[TaxRate](TaxRate.mdx)[]> ___ -#### listByShippingOption +### listByShippingOption `**listByShippingOption**(shippingOptionId): Promise<[TaxRate](TaxRate.mdx)[]>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[TaxRate](TaxRate.mdx)[]> @@ -606,11 +626,11 @@ Promise<[TaxRate](TaxRate.mdx)[]> ___ -#### removeFromProduct +### removeFromProduct `**removeFromProduct**(id, productIds): Promise<void>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -651,11 +671,11 @@ Promise<void> ___ -#### removeFromProductType +### removeFromProductType `**removeFromProductType**(id, typeIds): Promise<void>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -696,11 +716,11 @@ Promise<void> ___ -#### removeFromShippingOption +### removeFromShippingOption `**removeFromShippingOption**(id, optionIds): Promise<void>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -741,11 +761,11 @@ Promise<void> ___ -#### retrieve +### retrieve `**retrieve**(taxRateId, config?): Promise<[TaxRate](TaxRate.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[TaxRate](TaxRate.mdx)> @@ -786,11 +806,11 @@ Promise<[TaxRate](TaxRate.mdx)> ___ -#### shouldRetryTransaction\_ +### shouldRetryTransaction\_ `Protected **shouldRetryTransaction_**(err): boolean` -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` @@ -822,11 +842,11 @@ ___ ___ -#### update +### update `**update**(id, data): Promise<[TaxRate](TaxRate.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[TaxRate](TaxRate.mdx)> @@ -867,11 +887,11 @@ Promise<[TaxRate](TaxRate.mdx)> ___ -#### withTransaction +### withTransaction `**withTransaction**(transactionManager?): [TaxRateService](TaxRateService.mdx)` -##### Parameters +#### Parameters -##### Returns +#### Returns [TaxRateService](TaxRateService.mdx) diff --git a/www/apps/docs/content/references/services/classes/TokenService.mdx b/www/apps/docs/content/references/services/classes/TokenService.mdx index e129e512e6..b5b2eed96a 100644 --- a/www/apps/docs/content/references/services/classes/TokenService.mdx +++ b/www/apps/docs/content/references/services/classes/TokenService.mdx @@ -6,13 +6,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes" # TokenService -## Constructors - -#### constructor +## constructor `**new TokenService**(«destructured»)` -##### Parameters +### Parameters +___ + ## Properties +___ + ## Methods -#### signToken +### signToken `**signToken**(data, options?): string` -##### Parameters +#### Parameters -##### Returns +#### Returns `string` @@ -96,11 +98,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes" ___ -#### verifyToken +### verifyToken `**verifyToken**(token, options?): string \| Jwt \| JwtPayload` -##### Parameters +#### Parameters -##### Returns +#### Returns `string` \| `Jwt` \| `JwtPayload` diff --git a/www/apps/docs/content/references/services/classes/TotalsService.mdx b/www/apps/docs/content/references/services/classes/TotalsService.mdx index 73d0370380..274ebb41a2 100644 --- a/www/apps/docs/content/references/services/classes/TotalsService.mdx +++ b/www/apps/docs/content/references/services/classes/TotalsService.mdx @@ -8,15 +8,13 @@ import ParameterTypes from "@site/src/components/ParameterTypes" A service that calculates total and subtotals for orders, carts etc.. -#### Implements +## Implements -## Constructors - -#### constructor +## constructor `**new TotalsService**(«destructured»)` -##### Parameters +### Parameters +___ + ## Properties +___ + ## Accessors -#### activeManager\_ +### activeManager\_ - `Protected` **activeManager\_**: [object Object] +`Protected get**activeManager_**(): EntityManager` + +#### Returns + +EntityManager + + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ `Protected **atomicPhase_**(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise<TResult>` @@ -132,7 +152,7 @@ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<TResult> @@ -205,13 +225,13 @@ Promise<TResult> ___ -#### calculateDiscount\_ +### calculateDiscount\_ `**calculateDiscount_**(lineItem, variant, variantPrice, value, discountType): [LineDiscount](../types/LineDiscount.mdx)` Calculates either fixed or percentage discount of a variant -##### Parameters +#### Parameters -##### Returns +#### Returns [LineDiscount](../types/LineDiscount.mdx) @@ -283,7 +303,7 @@ Calculates either fixed or percentage discount of a variant ___ -#### getAllocationItemDiscounts +### getAllocationItemDiscounts `**getAllocationItemDiscounts**(discount, cart): [LineDiscount](../types/LineDiscount.mdx)[]` @@ -293,7 +313,7 @@ make sure to only apply the discount on valid variants. And finally we return ether an array of percentages discounts or fixed discounts alongside the variant on which the discount was applied. -##### Parameters +#### Parameters -##### Returns +#### Returns [LineDiscount](../types/LineDiscount.mdx)[] @@ -334,7 +354,7 @@ alongside the variant on which the discount was applied. ___ -#### getAllocationMap +### getAllocationMap `**getAllocationMap**(orderOrCart, options?): Promise<[LineAllocationsMap](../types/LineAllocationsMap.mdx)>` @@ -342,7 +362,7 @@ Gets a map of discounts and gift cards that apply to line items in an order. The function calculates the amount of a discount or gift card that applies to a specific line item. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[LineAllocationsMap](../types/LineAllocationsMap.mdx)> @@ -419,13 +439,13 @@ Promise<[LineAllocationsMap](../types/LineAllocationsMap.mdx)> ___ -#### getCalculationContext +### getCalculationContext `**getCalculationContext**(calculationContextData, options?): Promise<[TaxCalculationContext](../types/TaxCalculationContext.mdx)>` Prepares the calculation context for a tax total calculation. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[TaxCalculationContext](../types/TaxCalculationContext.mdx)> @@ -466,14 +486,14 @@ Promise<[TaxCalculationContext](../types/TaxCalculationContext.mdx)> ___ -#### getDiscountTotal +### getDiscountTotal `**getDiscountTotal**(cartOrOrder): Promise<number>` Calculates the total discount amount for each of the different supported discount types. If discounts aren't present or invalid returns 0. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<number> @@ -505,13 +525,13 @@ Promise<number> ___ -#### getGiftCardTotal +### getGiftCardTotal `**getGiftCardTotal**(cartOrOrder, opts?): Promise<{ tax_total: number ; total: number }>` Gets the gift card amount on a cart or order. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<{ tax_total: number ; total: number }> @@ -561,14 +581,14 @@ Promise<{ tax_total: number ; total: number }> ___ -#### getGiftCardableAmount +### getGiftCardableAmount `**getGiftCardableAmount**(cartOrOrder): Promise<number>` Gets the amount that can be gift carded on a cart. In regions where gift cards are taxable this amount should exclude taxes. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<number> @@ -600,13 +620,13 @@ Promise<number> ___ -#### getLineDiscounts +### getLineDiscounts `**getLineDiscounts**(cartOrOrder, discount?): [LineDiscountAmount](../types/LineDiscountAmount.mdx)[]` Returns the discount amount allocated to the line items of an order. -##### Parameters +#### Parameters -##### Returns +#### Returns [LineDiscountAmount](../types/LineDiscountAmount.mdx)[] @@ -674,11 +694,11 @@ Returns the discount amount allocated to the line items of an order. ___ -#### getLineItemAdjustmentsTotal +### getLineItemAdjustmentsTotal `**getLineItemAdjustmentsTotal**(cartOrOrder): number` -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -710,11 +730,11 @@ ___ ___ -#### getLineItemDiscountAdjustment +### getLineItemDiscountAdjustment `**getLineItemDiscountAdjustment**(lineItem, discount): number` -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -755,13 +775,13 @@ ___ ___ -#### getLineItemRefund +### getLineItemRefund `**getLineItemRefund**(order, lineItem): Promise<number>` The amount that can be refunded for a given line item. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<number> @@ -802,14 +822,14 @@ Promise<number> ___ -#### getLineItemTotal +### getLineItemTotal `**getLineItemTotal**(lineItem, cartOrOrder, options?): Promise<number>` Gets a total for a line item. The total can take gift cards, discounts and taxes into account. This can be controlled through the options. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<number> @@ -859,7 +879,7 @@ Promise<number> ___ -#### getLineItemTotals +### getLineItemTotals `**getLineItemTotals**(lineItem, cartOrOrder, options?): Promise<[LineItemTotals](../types/LineItemTotals-1.mdx)>` @@ -867,7 +887,7 @@ Breaks down the totals related to a line item; these are the subtotal, the amount of discount applied to the line item, the amount of a gift card applied to a line item and the amount of tax applied to a line item. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[LineItemTotals](../types/LineItemTotals-1.mdx)> @@ -917,13 +937,13 @@ Promise<[LineItemTotals](../types/LineItemTotals-1.mdx)> ___ -#### getPaidTotal +### getPaidTotal `**getPaidTotal**(order): number` Gets the total payments made on an order -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -955,7 +975,7 @@ Gets the total payments made on an order ___ -#### getRefundTotal +### getRefundTotal `**getRefundTotal**(order, lineItems): Promise<number>` @@ -963,7 +983,7 @@ Calculates refund total of line items. If any of the items to return have been discounted, we need to apply the discount again before refunding them. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<number> @@ -1004,13 +1024,13 @@ Promise<number> ___ -#### getRefundedTotal +### getRefundedTotal `**getRefundedTotal**(order): number` Gets the total refund amount for an order. -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -1042,14 +1062,14 @@ Gets the total refund amount for an order. ___ -#### getShippingMethodTotals +### getShippingMethodTotals `**getShippingMethodTotals**(shippingMethod, cartOrOrder, opts?): Promise<[ShippingMethodTotals](../types/ShippingMethodTotals-1.mdx)>` Gets the totals breakdown for a shipping method. Fetches tax lines if not already provided. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ShippingMethodTotals](../types/ShippingMethodTotals-1.mdx)> @@ -1099,13 +1119,13 @@ Promise<[ShippingMethodTotals](../types/ShippingMethodTotals-1.mdx)> ___ -#### getShippingTotal +### getShippingTotal `**getShippingTotal**(cartOrOrder): Promise<number>` Calculates shipping total -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<number> @@ -1137,13 +1157,13 @@ Promise<number> ___ -#### getSubtotal +### getSubtotal `**getSubtotal**(cartOrOrder, opts?): Promise<number>` Calculates subtotal of a given cart or order. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<number> @@ -1184,14 +1204,14 @@ Promise<number> ___ -#### getSwapTotal +### getSwapTotal `**getSwapTotal**(order): number` The total paid for swaps. May be negative in case of negative swap difference. -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -1223,14 +1243,14 @@ difference. ___ -#### getTaxTotal +### getTaxTotal `**getTaxTotal**(cartOrOrder, forceTaxes?): Promise<null \| number>` Calculates tax total Currently based on the Danish tax system -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<null \| number> @@ -1271,13 +1291,13 @@ Promise<null \| number> ___ -#### getTotal +### getTotal `**getTotal**(cartOrOrder, options?): Promise<number>` Calculates total of a given cart or order. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<number> @@ -1318,13 +1338,13 @@ Promise<number> ___ -#### rounded +### rounded `**rounded**(value): number` Rounds a number using Math.round. -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -1356,11 +1376,11 @@ Rounds a number using Math.round. ___ -#### shouldRetryTransaction\_ +### shouldRetryTransaction\_ `Protected **shouldRetryTransaction_**(err): boolean` -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` @@ -1392,11 +1412,11 @@ ___ ___ -#### withTransaction +### withTransaction `**withTransaction**(transactionManager?): [TotalsService](TotalsService.mdx)` -##### Parameters +#### Parameters -##### Returns +#### Returns [TotalsService](TotalsService.mdx) diff --git a/www/apps/docs/content/references/services/classes/TrackingLink.mdx b/www/apps/docs/content/references/services/classes/TrackingLink.mdx index 56b8f3ca60..f02368e036 100644 --- a/www/apps/docs/content/references/services/classes/TrackingLink.mdx +++ b/www/apps/docs/content/references/services/classes/TrackingLink.mdx @@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes" A tracking link holds information about tracking numbers for a Fulfillment. Tracking Links can optionally contain a URL that can be visited to see the status of the shipment. Typically, the tracking link is provided from the third-party service integrated through the used fulfillment provider. -## Constructors - -#### constructor +## constructor `**new TrackingLink**()` A tracking link holds information about tracking numbers for a Fulfillment. Tracking Links can optionally contain a URL that can be visited to see the status of the shipment. Typically, the tracking link is provided from the third-party service integrated through the used fulfillment provider. +___ + ## Properties +___ + ## Methods -#### beforeInsert +### beforeInsert `Private **beforeInsert**(): void` -##### Returns +#### Returns `void` diff --git a/www/apps/docs/content/references/services/classes/TransactionBaseService.mdx b/www/apps/docs/content/references/services/classes/TransactionBaseService.mdx index a342a104e7..07f5df27a4 100644 --- a/www/apps/docs/content/references/services/classes/TransactionBaseService.mdx +++ b/www/apps/docs/content/references/services/classes/TransactionBaseService.mdx @@ -6,13 +6,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes" # TransactionBaseService -## Constructors - -#### constructor +## constructor `Protected **new TransactionBaseService**(__container__, __configModule__?, __moduleDeclaration__?)` -##### Parameters +### Parameters +___ + ## Properties +___ + ## Accessors -#### activeManager\_ +### activeManager\_ - `Protected` **activeManager\_**: [object Object] +`Protected get**activeManager_**(): EntityManager` + +#### Returns + +EntityManager + + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ `Protected **atomicPhase_**(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise<TResult>` @@ -110,7 +130,7 @@ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<TResult> @@ -183,11 +203,11 @@ Promise<TResult> ___ -#### shouldRetryTransaction\_ +### shouldRetryTransaction\_ `Protected **shouldRetryTransaction_**(err): boolean` -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` @@ -219,11 +239,11 @@ ___ ___ -#### withTransaction +### withTransaction `**withTransaction**(transactionManager?): [TransactionBaseService](TransactionBaseService.mdx)` -##### Parameters +#### Parameters -##### Returns +#### Returns [TransactionBaseService](TransactionBaseService.mdx) diff --git a/www/apps/docs/content/references/services/classes/User.mdx b/www/apps/docs/content/references/services/classes/User.mdx index f5df76fcd7..7155173efb 100644 --- a/www/apps/docs/content/references/services/classes/User.mdx +++ b/www/apps/docs/content/references/services/classes/User.mdx @@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes" A User is an administrator who can manage store settings and data. -## Constructors - -#### constructor +## constructor `**new User**()` A User is an administrator who can manage store settings and data. +___ + ## Properties +___ + ## Methods -#### beforeInsert +### beforeInsert `Private **beforeInsert**(): void` -##### Returns +#### Returns `void` diff --git a/www/apps/docs/content/references/services/classes/UserService.mdx b/www/apps/docs/content/references/services/classes/UserService.mdx index ae77b509ad..4fa48c886c 100644 --- a/www/apps/docs/content/references/services/classes/UserService.mdx +++ b/www/apps/docs/content/references/services/classes/UserService.mdx @@ -8,13 +8,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes" Provides layer to manipulate users. -## Constructors - -#### constructor +## constructor `**new UserService**(«destructured»)` -##### Parameters +### Parameters +___ + ## Properties +___ + ## Accessors -#### activeManager\_ +### activeManager\_ - `Protected` **activeManager\_**: [object Object] +`Protected get**activeManager_**(): EntityManager` + +#### Returns + +EntityManager + + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ `Protected **atomicPhase_**(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise<TResult>` @@ -175,7 +195,7 @@ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<TResult> @@ -248,14 +268,14 @@ Promise<TResult> ___ -#### create +### create `**create**(user, password): Promise<[User](User.mdx)>` Creates a user with username being validated. Fails if email is not a valid format. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[User](User.mdx)> @@ -296,13 +316,13 @@ Promise<[User](User.mdx)> ___ -#### delete +### delete `**delete**(userId): Promise<void>` Deletes a user from a given user id. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -334,7 +354,7 @@ Promise<void> ___ -#### generateResetPasswordToken +### generateResetPasswordToken `**generateResetPasswordToken**(userId): Promise<string>` @@ -344,7 +364,7 @@ The token will be signed with the users current password hash as a secret a long side a payload with userId and the expiry time for the token, which is always 15 minutes. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<string> @@ -376,13 +396,13 @@ Promise<string> ___ -#### hashPassword\_ +### hashPassword\_ `**hashPassword_**(password): Promise<string>` Hashes a password -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<string> @@ -414,11 +434,11 @@ Promise<string> ___ -#### list +### list `**list**(selector, config?): Promise<[User](User.mdx)[]>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[User](User.mdx)[]> @@ -459,14 +479,14 @@ Promise<[User](User.mdx)[]> ___ -#### retrieve +### retrieve `**retrieve**(userId, config?): Promise<[User](User.mdx)>` Gets a user by id. Throws in case of DB Error and if user was not found. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[User](User.mdx)> @@ -507,14 +527,14 @@ Promise<[User](User.mdx)> ___ -#### retrieveByApiToken +### retrieveByApiToken `**retrieveByApiToken**(apiToken, relations?): Promise<[User](User.mdx)>` Gets a user by api token. Throws in case of DB Error and if user was not found. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[User](User.mdx)> @@ -555,14 +575,14 @@ Promise<[User](User.mdx)> ___ -#### retrieveByEmail +### retrieveByEmail `**retrieveByEmail**(email, config?): Promise<[User](User.mdx)>` Gets a user by email. Throws in case of DB Error and if user was not found. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[User](User.mdx)> @@ -603,7 +623,7 @@ Promise<[User](User.mdx)> ___ -#### setPassword\_ +### setPassword\_ `**setPassword_**(userId, password): Promise<[User](User.mdx)>` @@ -611,7 +631,7 @@ Sets a password for a user Fails if no user exists with userId and if the hashing of the new password does not work. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[User](User.mdx)> @@ -652,11 +672,11 @@ Promise<[User](User.mdx)> ___ -#### shouldRetryTransaction\_ +### shouldRetryTransaction\_ `Protected **shouldRetryTransaction_**(err): boolean` -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` @@ -688,13 +708,13 @@ ___ ___ -#### update +### update `**update**(userId, update): Promise<[User](User.mdx)>` Updates a user. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[User](User.mdx)> @@ -735,11 +755,11 @@ Promise<[User](User.mdx)> ___ -#### withTransaction +### withTransaction `**withTransaction**(transactionManager?): [UserService](UserService.mdx)` -##### Parameters +#### Parameters -##### Returns +#### Returns [UserService](UserService.mdx) diff --git a/www/apps/docs/content/references/services/enums/AllocationType.mdx b/www/apps/docs/content/references/services/enums/AllocationType.mdx index c160009d4f..fdfce12e50 100644 --- a/www/apps/docs/content/references/services/enums/AllocationType.mdx +++ b/www/apps/docs/content/references/services/enums/AllocationType.mdx @@ -10,7 +10,7 @@ The scope that the discount should apply to. ## Enumeration Members -#### ITEM +### ITEM **ITEM** = `"item"` @@ -18,7 +18,7 @@ The discount should be applied to applicable items in the cart. ___ -#### TOTAL +### TOTAL **TOTAL** = `"total"` diff --git a/www/apps/docs/content/references/services/enums/BatchJobStatus.mdx b/www/apps/docs/content/references/services/enums/BatchJobStatus.mdx index 4f7314576a..5293589f20 100644 --- a/www/apps/docs/content/references/services/enums/BatchJobStatus.mdx +++ b/www/apps/docs/content/references/services/enums/BatchJobStatus.mdx @@ -8,42 +8,42 @@ import ParameterTypes from "@site/src/components/ParameterTypes" ## Enumeration Members -#### CANCELED +### CANCELED **CANCELED** = `"canceled"` ___ -#### COMPLETED +### COMPLETED **COMPLETED** = `"completed"` ___ -#### CONFIRMED +### CONFIRMED **CONFIRMED** = `"confirmed"` ___ -#### CREATED +### CREATED **CREATED** = `"created"` ___ -#### FAILED +### FAILED **FAILED** = `"failed"` ___ -#### PRE\_PROCESSED +### PRE\_PROCESSED **PRE\_PROCESSED** = `"pre_processed"` ___ -#### PROCESSING +### PROCESSING **PROCESSING** = `"processing"` diff --git a/www/apps/docs/content/references/services/enums/CartType.mdx b/www/apps/docs/content/references/services/enums/CartType.mdx index 0c83012487..4240fcc2e2 100644 --- a/www/apps/docs/content/references/services/enums/CartType.mdx +++ b/www/apps/docs/content/references/services/enums/CartType.mdx @@ -8,30 +8,30 @@ import ParameterTypes from "@site/src/components/ParameterTypes" ## Enumeration Members -#### CLAIM +### CLAIM **CLAIM** = `"claim"` ___ -#### DEFAULT +### DEFAULT **DEFAULT** = `"default"` ___ -#### DRAFT\_ORDER +### DRAFT\_ORDER **DRAFT\_ORDER** = `"draft_order"` ___ -#### PAYMENT\_LINK +### PAYMENT\_LINK **PAYMENT\_LINK** = `"payment_link"` ___ -#### SWAP +### SWAP **SWAP** = `"swap"` diff --git a/www/apps/docs/content/references/services/enums/ClaimFulfillmentStatus.mdx b/www/apps/docs/content/references/services/enums/ClaimFulfillmentStatus.mdx index a0a5188589..1ab00b8e89 100644 --- a/www/apps/docs/content/references/services/enums/ClaimFulfillmentStatus.mdx +++ b/www/apps/docs/content/references/services/enums/ClaimFulfillmentStatus.mdx @@ -10,7 +10,7 @@ The claim's fulfillment status. ## Enumeration Members -#### CANCELED +### CANCELED **CANCELED** = `"canceled"` @@ -18,7 +18,7 @@ The claim's fulfillments are canceled. ___ -#### FULFILLED +### FULFILLED **FULFILLED** = `"fulfilled"` @@ -26,7 +26,7 @@ The claim's replacement items are fulfilled. ___ -#### NOT\_FULFILLED +### NOT\_FULFILLED **NOT\_FULFILLED** = `"not_fulfilled"` @@ -34,7 +34,7 @@ The claim's replacement items are not fulfilled. ___ -#### PARTIALLY\_FULFILLED +### PARTIALLY\_FULFILLED **PARTIALLY\_FULFILLED** = `"partially_fulfilled"` @@ -42,7 +42,7 @@ Some of the claim's replacement items, but not all, are fulfilled. ___ -#### PARTIALLY\_RETURNED +### PARTIALLY\_RETURNED **PARTIALLY\_RETURNED** = `"partially_returned"` @@ -50,7 +50,7 @@ Some of the claim's items, but not all, are returned. ___ -#### PARTIALLY\_SHIPPED +### PARTIALLY\_SHIPPED **PARTIALLY\_SHIPPED** = `"partially_shipped"` @@ -58,7 +58,7 @@ Some of the claim's replacement items, but not all, are shipped. ___ -#### REQUIRES\_ACTION +### REQUIRES\_ACTION **REQUIRES\_ACTION** = `"requires_action"` @@ -66,7 +66,7 @@ The claim's fulfillment requires action. ___ -#### RETURNED +### RETURNED **RETURNED** = `"returned"` @@ -74,7 +74,7 @@ The claim's items are returned. ___ -#### SHIPPED +### SHIPPED **SHIPPED** = `"shipped"` diff --git a/www/apps/docs/content/references/services/enums/ClaimPaymentStatus.mdx b/www/apps/docs/content/references/services/enums/ClaimPaymentStatus.mdx index 1942100811..e85fb0ed23 100644 --- a/www/apps/docs/content/references/services/enums/ClaimPaymentStatus.mdx +++ b/www/apps/docs/content/references/services/enums/ClaimPaymentStatus.mdx @@ -10,7 +10,7 @@ The claim's payment status ## Enumeration Members -#### NA +### NA **NA** = `"na"` @@ -18,7 +18,7 @@ The payment status isn't set, which is typically used when the claim's type is ` ___ -#### NOT\_REFUNDED +### NOT\_REFUNDED **NOT\_REFUNDED** = `"not_refunded"` @@ -26,7 +26,7 @@ The payment isn't refunded. ___ -#### REFUNDED +### REFUNDED **REFUNDED** = `"refunded"` diff --git a/www/apps/docs/content/references/services/enums/ClaimReason.mdx b/www/apps/docs/content/references/services/enums/ClaimReason.mdx index 94b28316d6..5dcd9213c1 100644 --- a/www/apps/docs/content/references/services/enums/ClaimReason.mdx +++ b/www/apps/docs/content/references/services/enums/ClaimReason.mdx @@ -8,24 +8,24 @@ import ParameterTypes from "@site/src/components/ParameterTypes" ## Enumeration Members -#### MISSING\_ITEM +### MISSING\_ITEM **MISSING\_ITEM** = `"missing_item"` ___ -#### OTHER +### OTHER **OTHER** = `"other"` ___ -#### PRODUCTION\_FAILURE +### PRODUCTION\_FAILURE **PRODUCTION\_FAILURE** = `"production_failure"` ___ -#### WRONG\_ITEM +### WRONG\_ITEM **WRONG\_ITEM** = `"wrong_item"` diff --git a/www/apps/docs/content/references/services/enums/ClaimType.mdx b/www/apps/docs/content/references/services/enums/ClaimType.mdx index e1310bccbb..5790ef30ac 100644 --- a/www/apps/docs/content/references/services/enums/ClaimType.mdx +++ b/www/apps/docs/content/references/services/enums/ClaimType.mdx @@ -10,7 +10,7 @@ The claim's type. ## Enumeration Members -#### REFUND +### REFUND **REFUND** = `"refund"` @@ -18,7 +18,7 @@ The claim refunds an amount to the customer. ___ -#### REPLACE +### REPLACE **REPLACE** = `"replace"` diff --git a/www/apps/docs/content/references/services/enums/DefaultPriceType.mdx b/www/apps/docs/content/references/services/enums/DefaultPriceType.mdx index 792b0a0a69..c2e46d6b88 100644 --- a/www/apps/docs/content/references/services/enums/DefaultPriceType.mdx +++ b/www/apps/docs/content/references/services/enums/DefaultPriceType.mdx @@ -8,6 +8,6 @@ import ParameterTypes from "@site/src/components/ParameterTypes" ## References -#### DEFAULT +### DEFAULT - **DEFAULT** = [object Object] +Re-exports [DEFAULT](../index.md#default) diff --git a/www/apps/docs/content/references/services/enums/DiscountConditionJoinTableForeignKey.mdx b/www/apps/docs/content/references/services/enums/DiscountConditionJoinTableForeignKey.mdx index dc1f07c524..5ffc89335a 100644 --- a/www/apps/docs/content/references/services/enums/DiscountConditionJoinTableForeignKey.mdx +++ b/www/apps/docs/content/references/services/enums/DiscountConditionJoinTableForeignKey.mdx @@ -8,30 +8,30 @@ import ParameterTypes from "@site/src/components/ParameterTypes" ## Enumeration Members -#### CUSTOMER\_GROUP\_ID +### CUSTOMER\_GROUP\_ID **CUSTOMER\_GROUP\_ID** = `"customer_group_id"` ___ -#### PRODUCT\_COLLECTION\_ID +### PRODUCT\_COLLECTION\_ID **PRODUCT\_COLLECTION\_ID** = `"product_collection_id"` ___ -#### PRODUCT\_ID +### PRODUCT\_ID **PRODUCT\_ID** = `"product_id"` ___ -#### PRODUCT\_TAG\_ID +### PRODUCT\_TAG\_ID **PRODUCT\_TAG\_ID** = `"product_tag_id"` ___ -#### PRODUCT\_TYPE\_ID +### PRODUCT\_TYPE\_ID **PRODUCT\_TYPE\_ID** = `"product_type_id"` diff --git a/www/apps/docs/content/references/services/enums/DiscountConditionOperator.mdx b/www/apps/docs/content/references/services/enums/DiscountConditionOperator.mdx index 91aaa9ea49..c31cac8daf 100644 --- a/www/apps/docs/content/references/services/enums/DiscountConditionOperator.mdx +++ b/www/apps/docs/content/references/services/enums/DiscountConditionOperator.mdx @@ -10,7 +10,7 @@ The possible operators used for a discount condition. ## Enumeration Members -#### IN +### IN **IN** = `"in"` @@ -18,7 +18,7 @@ The discountable resources are within the specified resources. ___ -#### NOT\_IN +### NOT\_IN **NOT\_IN** = `"not_in"` diff --git a/www/apps/docs/content/references/services/enums/DiscountConditionType.mdx b/www/apps/docs/content/references/services/enums/DiscountConditionType.mdx index 78a706afec..f9802294cf 100644 --- a/www/apps/docs/content/references/services/enums/DiscountConditionType.mdx +++ b/www/apps/docs/content/references/services/enums/DiscountConditionType.mdx @@ -10,7 +10,7 @@ The discount condition's type. ## Enumeration Members -#### CUSTOMER\_GROUPS +### CUSTOMER\_GROUPS **CUSTOMER\_GROUPS** = `"customer_groups"` @@ -18,7 +18,7 @@ The discount condition is used for customer groups. ___ -#### PRODUCTS +### PRODUCTS **PRODUCTS** = `"products"` @@ -26,7 +26,7 @@ The discount condition is used for products. ___ -#### PRODUCT\_COLLECTIONS +### PRODUCT\_COLLECTIONS **PRODUCT\_COLLECTIONS** = `"product_collections"` @@ -34,7 +34,7 @@ The discount condition is used for product collections. ___ -#### PRODUCT\_TAGS +### PRODUCT\_TAGS **PRODUCT\_TAGS** = `"product_tags"` @@ -42,7 +42,7 @@ The discount condition is used for product tags. ___ -#### PRODUCT\_TYPES +### PRODUCT\_TYPES **PRODUCT\_TYPES** = `"product_types"` diff --git a/www/apps/docs/content/references/services/enums/DiscountRuleType.mdx b/www/apps/docs/content/references/services/enums/DiscountRuleType.mdx index eb59f18776..1009bfff16 100644 --- a/www/apps/docs/content/references/services/enums/DiscountRuleType.mdx +++ b/www/apps/docs/content/references/services/enums/DiscountRuleType.mdx @@ -10,7 +10,7 @@ The possible types of discount rules. ## Enumeration Members -#### FIXED +### FIXED **FIXED** = `"fixed"` @@ -18,7 +18,7 @@ Discounts that reduce the price by a fixed amount. ___ -#### FREE\_SHIPPING +### FREE\_SHIPPING **FREE\_SHIPPING** = `"free_shipping"` @@ -26,7 +26,7 @@ Discounts that sets the shipping price to `0`. ___ -#### PERCENTAGE +### PERCENTAGE **PERCENTAGE** = `"percentage"` diff --git a/www/apps/docs/content/references/services/enums/DraftOrderStatus.mdx b/www/apps/docs/content/references/services/enums/DraftOrderStatus.mdx index 0d9576c279..8aa3c85e0e 100644 --- a/www/apps/docs/content/references/services/enums/DraftOrderStatus.mdx +++ b/www/apps/docs/content/references/services/enums/DraftOrderStatus.mdx @@ -10,7 +10,7 @@ The draft order's status. ## Enumeration Members -#### COMPLETED +### COMPLETED **COMPLETED** = `"completed"` @@ -18,7 +18,7 @@ The draft order is completed, and an order has been created from it. ___ -#### OPEN +### OPEN **OPEN** = `"open"` diff --git a/www/apps/docs/content/references/services/enums/FulfillmentStatus-1.mdx b/www/apps/docs/content/references/services/enums/FulfillmentStatus-1.mdx index 3e672a5140..505e9c140c 100644 --- a/www/apps/docs/content/references/services/enums/FulfillmentStatus-1.mdx +++ b/www/apps/docs/content/references/services/enums/FulfillmentStatus-1.mdx @@ -10,7 +10,7 @@ The fulfillment status of an order. ## Enumeration Members -#### canceled +### canceled **canceled** = `"canceled"` @@ -18,7 +18,7 @@ The order's fulfillments are canceled. ___ -#### fulfilled +### fulfilled **fulfilled** = `"fulfilled"` @@ -26,7 +26,7 @@ All of the order's items are fulfilled. ___ -#### not\_fulfilled +### not\_fulfilled **not\_fulfilled** = `"not_fulfilled"` @@ -34,7 +34,7 @@ The order isn't fulfilled. ___ -#### partially\_fulfilled +### partially\_fulfilled **partially\_fulfilled** = `"partially_fulfilled"` @@ -42,7 +42,7 @@ Some, but not all, of the order's items are fulfilled. ___ -#### partially\_returned +### partially\_returned **partially\_returned** = `"partially_returned"` @@ -50,7 +50,7 @@ Some, but not all, of the order's items are returned. ___ -#### partially\_shipped +### partially\_shipped **partially\_shipped** = `"partially_shipped"` @@ -58,7 +58,7 @@ Some, but not all, of the order's items are shipped. ___ -#### requires\_action +### requires\_action **requires\_action** = `"requires_action"` @@ -66,7 +66,7 @@ The order's fulfillment requires an action. ___ -#### returned +### returned **returned** = `"returned"` @@ -74,7 +74,7 @@ All of the order's items are returned. ___ -#### shipped +### shipped **shipped** = `"shipped"` diff --git a/www/apps/docs/content/references/services/enums/FulfillmentStatus.mdx b/www/apps/docs/content/references/services/enums/FulfillmentStatus.mdx index c294ba1e4a..f1214a65b6 100644 --- a/www/apps/docs/content/references/services/enums/FulfillmentStatus.mdx +++ b/www/apps/docs/content/references/services/enums/FulfillmentStatus.mdx @@ -10,7 +10,7 @@ The order's fulfillment status. ## Enumeration Members -#### CANCELED +### CANCELED **CANCELED** = `"canceled"` @@ -18,7 +18,7 @@ The order's fulfillments are canceled. ___ -#### FULFILLED +### FULFILLED **FULFILLED** = `"fulfilled"` @@ -26,7 +26,7 @@ The order's items are fulfilled. ___ -#### NOT\_FULFILLED +### NOT\_FULFILLED **NOT\_FULFILLED** = `"not_fulfilled"` @@ -34,7 +34,7 @@ The order's items are not fulfilled. ___ -#### PARTIALLY\_FULFILLED +### PARTIALLY\_FULFILLED **PARTIALLY\_FULFILLED** = `"partially_fulfilled"` @@ -42,7 +42,7 @@ Some of the order's items, but not all, are fulfilled. ___ -#### PARTIALLY\_RETURNED +### PARTIALLY\_RETURNED **PARTIALLY\_RETURNED** = `"partially_returned"` @@ -50,7 +50,7 @@ Some of the order's items, but not all, are returned. ___ -#### PARTIALLY\_SHIPPED +### PARTIALLY\_SHIPPED **PARTIALLY\_SHIPPED** = `"partially_shipped"` @@ -58,7 +58,7 @@ Some of the order's items, but not all, are shipped. ___ -#### REQUIRES\_ACTION +### REQUIRES\_ACTION **REQUIRES\_ACTION** = `"requires_action"` @@ -66,7 +66,7 @@ The order's fulfillment requires action. ___ -#### RETURNED +### RETURNED **RETURNED** = `"returned"` @@ -74,7 +74,7 @@ The order's items are returned. ___ -#### SHIPPED +### SHIPPED **SHIPPED** = `"shipped"` diff --git a/www/apps/docs/content/references/services/enums/MODULE_RESOURCE_TYPE.mdx b/www/apps/docs/content/references/services/enums/MODULE_RESOURCE_TYPE.mdx index 8d95d8ec9b..5d352c5caa 100644 --- a/www/apps/docs/content/references/services/enums/MODULE_RESOURCE_TYPE.mdx +++ b/www/apps/docs/content/references/services/enums/MODULE_RESOURCE_TYPE.mdx @@ -8,12 +8,12 @@ import ParameterTypes from "@site/src/components/ParameterTypes" ## Enumeration Members -#### ISOLATED +### ISOLATED **ISOLATED** = `"isolated"` ___ -#### SHARED +### SHARED **SHARED** = `"shared"` diff --git a/www/apps/docs/content/references/services/enums/OrderEditItemChangeType.mdx b/www/apps/docs/content/references/services/enums/OrderEditItemChangeType.mdx index 5b527a2506..56c095e085 100644 --- a/www/apps/docs/content/references/services/enums/OrderEditItemChangeType.mdx +++ b/www/apps/docs/content/references/services/enums/OrderEditItemChangeType.mdx @@ -10,7 +10,7 @@ The type of the order edit item change. ## Enumeration Members -#### ITEM\_ADD +### ITEM\_ADD **ITEM\_ADD** = `"item_add"` @@ -18,7 +18,7 @@ A new item to be added to the original order. ___ -#### ITEM\_REMOVE +### ITEM\_REMOVE **ITEM\_REMOVE** = `"item_remove"` @@ -26,7 +26,7 @@ An existing item to be removed from the original order. ___ -#### ITEM\_UPDATE +### ITEM\_UPDATE **ITEM\_UPDATE** = `"item_update"` diff --git a/www/apps/docs/content/references/services/enums/OrderEditStatus.mdx b/www/apps/docs/content/references/services/enums/OrderEditStatus.mdx index 344e5a6c59..df66c8b4b8 100644 --- a/www/apps/docs/content/references/services/enums/OrderEditStatus.mdx +++ b/www/apps/docs/content/references/services/enums/OrderEditStatus.mdx @@ -10,7 +10,7 @@ The order edit's status. ## Enumeration Members -#### CANCELED +### CANCELED **CANCELED** = `"canceled"` @@ -18,7 +18,7 @@ The order edit is canceled. ___ -#### CONFIRMED +### CONFIRMED **CONFIRMED** = `"confirmed"` @@ -26,7 +26,7 @@ The order edit is confirmed. ___ -#### CREATED +### CREATED **CREATED** = `"created"` @@ -34,7 +34,7 @@ The order edit is created. ___ -#### DECLINED +### DECLINED **DECLINED** = `"declined"` @@ -42,7 +42,7 @@ The order edit is declined. ___ -#### REQUESTED +### REQUESTED **REQUESTED** = `"requested"` diff --git a/www/apps/docs/content/references/services/enums/OrderStatus-1.mdx b/www/apps/docs/content/references/services/enums/OrderStatus-1.mdx index 45cde25202..80bd4fd4d5 100644 --- a/www/apps/docs/content/references/services/enums/OrderStatus-1.mdx +++ b/www/apps/docs/content/references/services/enums/OrderStatus-1.mdx @@ -10,7 +10,7 @@ The status of an order. ## Enumeration Members -#### archived +### archived **archived** = `"archived"` @@ -18,7 +18,7 @@ Order is archived. ___ -#### canceled +### canceled **canceled** = `"canceled"` @@ -26,7 +26,7 @@ Order is canceled. ___ -#### completed +### completed **completed** = `"completed"` @@ -34,7 +34,7 @@ Order is completed. An order is completed when it's paid and fulfilled. ___ -#### pending +### pending **pending** = `"pending"` @@ -42,7 +42,7 @@ Order is pending. ___ -#### requires\_action +### requires\_action **requires\_action** = `"requires_action"` diff --git a/www/apps/docs/content/references/services/enums/OrderStatus.mdx b/www/apps/docs/content/references/services/enums/OrderStatus.mdx index 63f8f36ff7..cd0d5a795d 100644 --- a/www/apps/docs/content/references/services/enums/OrderStatus.mdx +++ b/www/apps/docs/content/references/services/enums/OrderStatus.mdx @@ -10,7 +10,7 @@ The order's status. ## Enumeration Members -#### ARCHIVED +### ARCHIVED **ARCHIVED** = `"archived"` @@ -18,7 +18,7 @@ The order is archived. ___ -#### CANCELED +### CANCELED **CANCELED** = `"canceled"` @@ -26,7 +26,7 @@ The order is canceled. ___ -#### COMPLETED +### COMPLETED **COMPLETED** = `"completed"` @@ -36,7 +36,7 @@ has been captured. ___ -#### PENDING +### PENDING **PENDING** = `"pending"` @@ -44,7 +44,7 @@ The order is pending. ___ -#### REQUIRES\_ACTION +### REQUIRES\_ACTION **REQUIRES\_ACTION** = `"requires_action"` diff --git a/www/apps/docs/content/references/services/enums/PaymentCollectionStatus.mdx b/www/apps/docs/content/references/services/enums/PaymentCollectionStatus.mdx index de87c6ae0a..74bc707f72 100644 --- a/www/apps/docs/content/references/services/enums/PaymentCollectionStatus.mdx +++ b/www/apps/docs/content/references/services/enums/PaymentCollectionStatus.mdx @@ -10,7 +10,7 @@ The payment collection's status. ## Enumeration Members -#### AUTHORIZED +### AUTHORIZED **AUTHORIZED** = `"authorized"` @@ -18,7 +18,7 @@ The payment colleciton is authorized. ___ -#### AWAITING +### AWAITING **AWAITING** = `"awaiting"` @@ -26,7 +26,7 @@ The payment collection is awaiting payment. ___ -#### CANCELED +### CANCELED **CANCELED** = `"canceled"` @@ -34,7 +34,7 @@ The payment collection is canceled. ___ -#### NOT\_PAID +### NOT\_PAID **NOT\_PAID** = `"not_paid"` @@ -42,7 +42,7 @@ The payment collection isn't paid. ___ -#### PARTIALLY\_AUTHORIZED +### PARTIALLY\_AUTHORIZED **PARTIALLY\_AUTHORIZED** = `"partially_authorized"` diff --git a/www/apps/docs/content/references/services/enums/PaymentCollectionType.mdx b/www/apps/docs/content/references/services/enums/PaymentCollectionType.mdx index 55a00e837a..5e7048569b 100644 --- a/www/apps/docs/content/references/services/enums/PaymentCollectionType.mdx +++ b/www/apps/docs/content/references/services/enums/PaymentCollectionType.mdx @@ -10,6 +10,6 @@ The payment collection's type. ## References -#### ORDER\_EDIT +### ORDER\_EDIT - **ORDER\_EDIT** = [object Object] +Re-exports [ORDER_EDIT](../index.md#order_edit) diff --git a/www/apps/docs/content/references/services/enums/PaymentSessionStatus.mdx b/www/apps/docs/content/references/services/enums/PaymentSessionStatus.mdx index 8c8c864301..bd4867115b 100644 --- a/www/apps/docs/content/references/services/enums/PaymentSessionStatus.mdx +++ b/www/apps/docs/content/references/services/enums/PaymentSessionStatus.mdx @@ -8,30 +8,30 @@ import ParameterTypes from "@site/src/components/ParameterTypes" ## Enumeration Members -#### AUTHORIZED +### AUTHORIZED **AUTHORIZED** = `"authorized"` ___ -#### CANCELED +### CANCELED **CANCELED** = `"canceled"` ___ -#### ERROR +### ERROR **ERROR** = `"error"` ___ -#### PENDING +### PENDING **PENDING** = `"pending"` ___ -#### REQUIRES\_MORE +### REQUIRES\_MORE **REQUIRES\_MORE** = `"requires_more"` diff --git a/www/apps/docs/content/references/services/enums/PaymentStatus-1.mdx b/www/apps/docs/content/references/services/enums/PaymentStatus-1.mdx index a0080615ae..e762583767 100644 --- a/www/apps/docs/content/references/services/enums/PaymentStatus-1.mdx +++ b/www/apps/docs/content/references/services/enums/PaymentStatus-1.mdx @@ -10,7 +10,7 @@ The payment status of the order. ## Enumeration Members -#### awaiting +### awaiting **awaiting** = `"awaiting"` @@ -18,7 +18,7 @@ The order's payment is awaiting. ___ -#### canceled +### canceled **canceled** = `"canceled"` @@ -26,7 +26,7 @@ The order's payment is canceled. ___ -#### captured +### captured **captured** = `"captured"` @@ -34,7 +34,7 @@ The order's payment is captured. ___ -#### not\_paid +### not\_paid **not\_paid** = `"not_paid"` @@ -42,7 +42,7 @@ The order's payment isn't paid. ___ -#### partially\_refunded +### partially\_refunded **partially\_refunded** = `"partially_refunded"` @@ -50,7 +50,7 @@ The order's payment is partially refunded. ___ -#### refunded +### refunded **refunded** = `"refunded"` @@ -58,7 +58,7 @@ The order's payment is fully refunded. ___ -#### requires\_action +### requires\_action **requires\_action** = `"requires_action"` diff --git a/www/apps/docs/content/references/services/enums/PaymentStatus.mdx b/www/apps/docs/content/references/services/enums/PaymentStatus.mdx index 091bd594d5..e3de874f37 100644 --- a/www/apps/docs/content/references/services/enums/PaymentStatus.mdx +++ b/www/apps/docs/content/references/services/enums/PaymentStatus.mdx @@ -10,7 +10,7 @@ The order's payment status. ## Enumeration Members -#### AWAITING +### AWAITING **AWAITING** = `"awaiting"` @@ -18,7 +18,7 @@ The order's payment is awaiting capturing. ___ -#### CANCELED +### CANCELED **CANCELED** = `"canceled"` @@ -26,7 +26,7 @@ The order's payment is canceled. ___ -#### CAPTURED +### CAPTURED **CAPTURED** = `"captured"` @@ -34,7 +34,7 @@ The order's payment is captured. ___ -#### NOT\_PAID +### NOT\_PAID **NOT\_PAID** = `"not_paid"` @@ -42,7 +42,7 @@ The order's payment is not paid. ___ -#### PARTIALLY\_REFUNDED +### PARTIALLY\_REFUNDED **PARTIALLY\_REFUNDED** = `"partially_refunded"` @@ -50,7 +50,7 @@ Some of the order's payment amount is refunded. ___ -#### REFUNDED +### REFUNDED **REFUNDED** = `"refunded"` @@ -58,7 +58,7 @@ The order's payment amount is refunded. ___ -#### REQUIRES\_ACTION +### REQUIRES\_ACTION **REQUIRES\_ACTION** = `"requires_action"` diff --git a/www/apps/docs/content/references/services/enums/PriceListStatus-1.mdx b/www/apps/docs/content/references/services/enums/PriceListStatus-1.mdx index b8e7840c91..0e117081f7 100644 --- a/www/apps/docs/content/references/services/enums/PriceListStatus-1.mdx +++ b/www/apps/docs/content/references/services/enums/PriceListStatus-1.mdx @@ -10,7 +10,7 @@ The status of a price list. ## Enumeration Members -#### ACTIVE +### ACTIVE **ACTIVE** = `"active"` @@ -18,7 +18,7 @@ The price list is active, meaning its prices are applied to customers. ___ -#### DRAFT +### DRAFT **DRAFT** = `"draft"` diff --git a/www/apps/docs/content/references/services/enums/PriceListStatus-2.mdx b/www/apps/docs/content/references/services/enums/PriceListStatus-2.mdx index 9b7f85ed26..02ce053c8d 100644 --- a/www/apps/docs/content/references/services/enums/PriceListStatus-2.mdx +++ b/www/apps/docs/content/references/services/enums/PriceListStatus-2.mdx @@ -10,7 +10,7 @@ The price list's status. ## Enumeration Members -#### ACTIVE +### ACTIVE **ACTIVE** = `"active"` @@ -18,7 +18,7 @@ The price list is enabled and its prices can be used. ___ -#### DRAFT +### DRAFT **DRAFT** = `"draft"` diff --git a/www/apps/docs/content/references/services/enums/PriceListStatus.mdx b/www/apps/docs/content/references/services/enums/PriceListStatus.mdx index 6f57fb3567..1b1db889a2 100644 --- a/www/apps/docs/content/references/services/enums/PriceListStatus.mdx +++ b/www/apps/docs/content/references/services/enums/PriceListStatus.mdx @@ -8,12 +8,12 @@ import ParameterTypes from "@site/src/components/ParameterTypes" ## Enumeration Members -#### ACTIVE +### ACTIVE **ACTIVE** = `"active"` ___ -#### DRAFT +### DRAFT **DRAFT** = `"draft"` diff --git a/www/apps/docs/content/references/services/enums/PriceListType-1.mdx b/www/apps/docs/content/references/services/enums/PriceListType-1.mdx index 733ebca992..7a4d7b7aea 100644 --- a/www/apps/docs/content/references/services/enums/PriceListType-1.mdx +++ b/www/apps/docs/content/references/services/enums/PriceListType-1.mdx @@ -10,7 +10,7 @@ The type of price list. ## Enumeration Members -#### OVERRIDE +### OVERRIDE **OVERRIDE** = `"override"` @@ -18,7 +18,7 @@ The price list is used to override original prices for specific conditions. ___ -#### SALE +### SALE **SALE** = `"sale"` diff --git a/www/apps/docs/content/references/services/enums/PriceListType-2.mdx b/www/apps/docs/content/references/services/enums/PriceListType-2.mdx index 83a8bbeae1..dd2976d8d6 100644 --- a/www/apps/docs/content/references/services/enums/PriceListType-2.mdx +++ b/www/apps/docs/content/references/services/enums/PriceListType-2.mdx @@ -10,7 +10,7 @@ The price list's type. ## Enumeration Members -#### OVERRIDE +### OVERRIDE **OVERRIDE** = `"override"` @@ -18,7 +18,7 @@ The price list's prices override original prices. This affects the calculated pr ___ -#### SALE +### SALE **SALE** = `"sale"` diff --git a/www/apps/docs/content/references/services/enums/PriceListType.mdx b/www/apps/docs/content/references/services/enums/PriceListType.mdx index 353e58572c..ba777803f1 100644 --- a/www/apps/docs/content/references/services/enums/PriceListType.mdx +++ b/www/apps/docs/content/references/services/enums/PriceListType.mdx @@ -8,12 +8,12 @@ import ParameterTypes from "@site/src/components/ParameterTypes" ## Enumeration Members -#### OVERRIDE +### OVERRIDE **OVERRIDE** = `"override"` ___ -#### SALE +### SALE **SALE** = `"sale"` diff --git a/www/apps/docs/content/references/services/enums/ProductStatus.mdx b/www/apps/docs/content/references/services/enums/ProductStatus.mdx index e4931b2f47..7a231383e9 100644 --- a/www/apps/docs/content/references/services/enums/ProductStatus.mdx +++ b/www/apps/docs/content/references/services/enums/ProductStatus.mdx @@ -10,7 +10,7 @@ The status of a product. ## Enumeration Members -#### DRAFT +### DRAFT **DRAFT** = `"draft"` @@ -18,7 +18,7 @@ The product is a draft. It's not viewable by customers. ___ -#### PROPOSED +### PROPOSED **PROPOSED** = `"proposed"` @@ -26,7 +26,7 @@ The product is proposed, but not yet published. ___ -#### PUBLISHED +### PUBLISHED **PUBLISHED** = `"published"` @@ -34,7 +34,7 @@ The product is published. ___ -#### REJECTED +### REJECTED **REJECTED** = `"rejected"` diff --git a/www/apps/docs/content/references/services/enums/RequirementType.mdx b/www/apps/docs/content/references/services/enums/RequirementType.mdx index c20a45a9d6..8b7088ab57 100644 --- a/www/apps/docs/content/references/services/enums/RequirementType.mdx +++ b/www/apps/docs/content/references/services/enums/RequirementType.mdx @@ -10,7 +10,7 @@ The type of shipping option requirement. ## Enumeration Members -#### MAX\_SUBTOTAL +### MAX\_SUBTOTAL **MAX\_SUBTOTAL** = `"max_subtotal"` @@ -18,7 +18,7 @@ The shipping option can only be applied if the subtotal is less than the require ___ -#### MIN\_SUBTOTAL +### MIN\_SUBTOTAL **MIN\_SUBTOTAL** = `"min_subtotal"` diff --git a/www/apps/docs/content/references/services/enums/ReturnStatus.mdx b/www/apps/docs/content/references/services/enums/ReturnStatus.mdx index 1210bf14ad..9f01188f44 100644 --- a/www/apps/docs/content/references/services/enums/ReturnStatus.mdx +++ b/www/apps/docs/content/references/services/enums/ReturnStatus.mdx @@ -10,7 +10,7 @@ The return's status. ## Enumeration Members -#### CANCELED +### CANCELED **CANCELED** = `"canceled"` @@ -18,7 +18,7 @@ The return is canceled. ___ -#### RECEIVED +### RECEIVED **RECEIVED** = `"received"` @@ -26,7 +26,7 @@ The return is received. ___ -#### REQUESTED +### REQUESTED **REQUESTED** = `"requested"` @@ -34,7 +34,7 @@ The return is requested. ___ -#### REQUIRES\_ACTION +### REQUIRES\_ACTION **REQUIRES\_ACTION** = `"requires_action"` diff --git a/www/apps/docs/content/references/services/enums/ShippingOptionPriceType.mdx b/www/apps/docs/content/references/services/enums/ShippingOptionPriceType.mdx index 3a6ee88a10..be549e10c7 100644 --- a/www/apps/docs/content/references/services/enums/ShippingOptionPriceType.mdx +++ b/www/apps/docs/content/references/services/enums/ShippingOptionPriceType.mdx @@ -10,7 +10,7 @@ The type of the shipping option price. ## Enumeration Members -#### CALCULATED +### CALCULATED **CALCULATED** = `"calculated"` @@ -18,7 +18,7 @@ The shipping option's price is calculated. In this case, the `amount` field is t ___ -#### FLAT\_RATE +### FLAT\_RATE **FLAT\_RATE** = `"flat_rate"` diff --git a/www/apps/docs/content/references/services/enums/ShippingProfileType.mdx b/www/apps/docs/content/references/services/enums/ShippingProfileType.mdx index d85bd6af18..faf20e815f 100644 --- a/www/apps/docs/content/references/services/enums/ShippingProfileType.mdx +++ b/www/apps/docs/content/references/services/enums/ShippingProfileType.mdx @@ -10,7 +10,7 @@ The shipping profile's type. ## Enumeration Members -#### CUSTOM +### CUSTOM **CUSTOM** = `"custom"` @@ -18,7 +18,7 @@ The profile used to ship custom items. ___ -#### DEFAULT +### DEFAULT **DEFAULT** = `"default"` @@ -26,7 +26,7 @@ The default profile used to ship item. ___ -#### GIFT\_CARD +### GIFT\_CARD **GIFT\_CARD** = `"gift_card"` diff --git a/www/apps/docs/content/references/services/enums/SwapFulfillmentStatus.mdx b/www/apps/docs/content/references/services/enums/SwapFulfillmentStatus.mdx index 274f38c12f..0ecd3b6cc4 100644 --- a/www/apps/docs/content/references/services/enums/SwapFulfillmentStatus.mdx +++ b/www/apps/docs/content/references/services/enums/SwapFulfillmentStatus.mdx @@ -10,7 +10,7 @@ The swap's fulfillment status. ## Enumeration Members -#### CANCELED +### CANCELED **CANCELED** = `"canceled"` @@ -18,7 +18,7 @@ The swap's fulfillments are canceled. ___ -#### FULFILLED +### FULFILLED **FULFILLED** = `"fulfilled"` @@ -26,7 +26,7 @@ The swap's items are fulfilled. ___ -#### NOT\_FULFILLED +### NOT\_FULFILLED **NOT\_FULFILLED** = `"not_fulfilled"` @@ -34,7 +34,7 @@ The swap's items aren't fulfilled. ___ -#### PARTIALLY\_SHIPPED +### PARTIALLY\_SHIPPED **PARTIALLY\_SHIPPED** = `"partially_shipped"` @@ -42,7 +42,7 @@ Some of the swap's items are shipped. ___ -#### REQUIRES\_ACTION +### REQUIRES\_ACTION **REQUIRES\_ACTION** = `"requires_action"` @@ -50,7 +50,7 @@ The swap's fulfillments require an action. ___ -#### SHIPPED +### SHIPPED **SHIPPED** = `"shipped"` diff --git a/www/apps/docs/content/references/services/enums/SwapPaymentStatus.mdx b/www/apps/docs/content/references/services/enums/SwapPaymentStatus.mdx index ee25f72331..6770814b72 100644 --- a/www/apps/docs/content/references/services/enums/SwapPaymentStatus.mdx +++ b/www/apps/docs/content/references/services/enums/SwapPaymentStatus.mdx @@ -10,7 +10,7 @@ The swap's payment status. ## Enumeration Members -#### AWAITING +### AWAITING **AWAITING** = `"awaiting"` @@ -18,7 +18,7 @@ The swap is additional awaiting payment. ___ -#### CANCELED +### CANCELED **CANCELED** = `"canceled"` @@ -26,7 +26,7 @@ The swap's additional payment is canceled. ___ -#### CAPTURED +### CAPTURED **CAPTURED** = `"captured"` @@ -34,7 +34,7 @@ The swap's additional payment is captured. ___ -#### CONFIRMED +### CONFIRMED **CONFIRMED** = `"confirmed"` @@ -42,7 +42,7 @@ The swap's additional payment is confirmed. ___ -#### DIFFERENCE\_REFUNDED +### DIFFERENCE\_REFUNDED **DIFFERENCE\_REFUNDED** = `"difference_refunded"` @@ -50,7 +50,7 @@ The negative difference amount between the returned item(s) and the new one(s) h ___ -#### NOT\_PAID +### NOT\_PAID **NOT\_PAID** = `"not_paid"` @@ -58,7 +58,7 @@ The swap's additional payment isn't paid. ___ -#### PARTIALLY\_REFUNDED +### PARTIALLY\_REFUNDED **PARTIALLY\_REFUNDED** = `"partially_refunded"` @@ -66,7 +66,7 @@ Some of the negative difference amount between the returned item(s) and the new ___ -#### REFUNDED +### REFUNDED **REFUNDED** = `"refunded"` @@ -74,7 +74,7 @@ The amount in the associated order has been refunded. ___ -#### REQUIRES\_ACTION +### REQUIRES\_ACTION **REQUIRES\_ACTION** = `"requires_action"` diff --git a/www/apps/docs/content/references/services/enums/UserRoles.mdx b/www/apps/docs/content/references/services/enums/UserRoles.mdx index e7f9535e1d..0a7fc82ddb 100644 --- a/www/apps/docs/content/references/services/enums/UserRoles.mdx +++ b/www/apps/docs/content/references/services/enums/UserRoles.mdx @@ -10,7 +10,7 @@ The user's role. These roles don't change the user's capabilities or provide acc ## Enumeration Members -#### ADMIN +### ADMIN **ADMIN** = `"admin"` @@ -18,7 +18,7 @@ The user is an admin. ___ -#### DEVELOPER +### DEVELOPER **DEVELOPER** = `"developer"` @@ -26,7 +26,7 @@ The user is a developer. ___ -#### MEMBER +### MEMBER **MEMBER** = `"member"` diff --git a/www/apps/docs/content/references/services/index.md b/www/apps/docs/content/references/services/index.md index 9541af081e..8047c126d8 100644 --- a/www/apps/docs/content/references/services/index.md +++ b/www/apps/docs/content/references/services/index.md @@ -604,245 +604,249 @@ import ParameterTypes from "@site/src/components/ParameterTypes" - [middlewareHandlerType](types/middlewareHandlerType.mdx) - [middlewareType](types/middlewareType.mdx) +___ + ## Enumeration Members -#### DEFAULT +### DEFAULT **DEFAULT**: `"default"` ___ -#### EXTERNAL +### EXTERNAL **EXTERNAL**: `"external"` ___ -#### INTERNAL +### INTERNAL **INTERNAL**: `"internal"` ___ -#### ORDER\_EDIT +### ORDER\_EDIT **ORDER\_EDIT**: `"order_edit"` The payment collection is used for an order edit. +___ + ## Variables -#### AddressRepository +### AddressRepository `Const` **AddressRepository**: Repository<[Address](classes/Address.mdx)> ___ -#### AnalyticsConfigRepository +### AnalyticsConfigRepository `Const` **AnalyticsConfigRepository**: Repository<[AnalyticsConfig](classes/AnalyticsConfig.mdx)> ___ -#### BatchJobRepository +### BatchJobRepository `Const` **BatchJobRepository**: Repository<[BatchJob](classes/BatchJob.mdx)> ___ -#### Buffer +### Buffer **Buffer**: [BufferConstructor](interfaces/BufferConstructor.mdx) ___ -#### CartRepository +### CartRepository `Const` **CartRepository**: Repository<[Cart](classes/Cart.mdx)> & ``{ findOneWithRelations: Method findOneWithRelations ; findWithRelations: Method findWithRelations }`` ___ -#### ClaimRepository +### ClaimRepository `Const` **ClaimRepository**: Repository<[ClaimOrder](classes/ClaimOrder.mdx)> ___ -#### CountryRepository +### CountryRepository `Const` **CountryRepository**: Repository<[Country](classes/Country.mdx)> ___ -#### CurrencyRepository +### CurrencyRepository `Const` **CurrencyRepository**: Repository<[Currency](classes/Currency.mdx)> ___ -#### CustomShippingOptionRepository +### CustomShippingOptionRepository `Const` **CustomShippingOptionRepository**: Repository<[CustomShippingOption](classes/CustomShippingOption.mdx)> ___ -#### CustomerGroupRepository +### CustomerGroupRepository `Const` **CustomerGroupRepository**: Repository<[CustomerGroup](classes/CustomerGroup.mdx)> & ``{ addCustomers: Method addCustomers ; findWithRelationsAndCount: Method findWithRelationsAndCount ; removeCustomers: Method removeCustomers }`` ___ -#### CustomerRepository +### CustomerRepository `Const` **CustomerRepository**: Repository<[Customer](classes/Customer.mdx)> & ``{ listAndCount: Method listAndCount }`` ___ -#### DiscountConditionRepository +### DiscountConditionRepository `Const` **DiscountConditionRepository**: Repository<[DiscountCondition](classes/DiscountCondition.mdx)> & ``{ addConditionResources: Method addConditionResources ; canApplyForCustomer: Method canApplyForCustomer ; findOneWithDiscount: Method findOneWithDiscount ; getJoinTableResourceIdentifiers: Method getJoinTableResourceIdentifiers ; isValidForProduct: Method isValidForProduct ; queryConditionTable: Method queryConditionTable ; removeConditionResources: Method removeConditionResources }`` ___ -#### DraftOrderRepository +### DraftOrderRepository `Const` **DraftOrderRepository**: Repository<[DraftOrder](classes/DraftOrder.mdx)> ___ -#### FulfillmentProviderRepository +### FulfillmentProviderRepository `Const` **FulfillmentProviderRepository**: Repository<[FulfillmentProvider](classes/FulfillmentProvider.mdx)> ___ -#### FulfillmentRepository +### FulfillmentRepository `Const` **FulfillmentRepository**: Repository<[Fulfillment](classes/Fulfillment.mdx)> ___ -#### GiftCardRepository +### GiftCardRepository `Const` **GiftCardRepository**: Repository<[GiftCard](classes/GiftCard.mdx)> & ``{ listGiftCardsAndCount: Method listGiftCardsAndCount }`` ___ -#### GiftCardTransactionRepository +### GiftCardTransactionRepository `Const` **GiftCardTransactionRepository**: Repository<[GiftCardTransaction](classes/GiftCardTransaction.mdx)> ___ -#### IdempotencyKeyRepository +### IdempotencyKeyRepository `Const` **IdempotencyKeyRepository**: Repository<[IdempotencyKey](classes/IdempotencyKey.mdx)> ___ -#### ImageRepository +### ImageRepository `Const` **ImageRepository**: Repository<[Image](classes/Image.mdx)> & ``{ insertBulk: Method insertBulk ; upsertImages: Method upsertImages }`` ___ -#### LineItemAdjustmentRepository +### LineItemAdjustmentRepository `Const` **LineItemAdjustmentRepository**: Repository<[LineItemAdjustment](classes/LineItemAdjustment.mdx)> ___ -#### LineItemRepository +### LineItemRepository `Const` **LineItemRepository**: Repository<[LineItem](classes/LineItem.mdx)> & ``{ findByReturn: Method findByReturn }`` ___ -#### LineItemTaxLineRepository +### LineItemTaxLineRepository `Const` **LineItemTaxLineRepository**: Repository<[LineItemTaxLine](classes/LineItemTaxLine.mdx)> & ``{ deleteForCart: Method deleteForCart ; upsertLines: Method upsertLines }`` ___ -#### MoneyAmountRepository +### MoneyAmountRepository `Const` **MoneyAmountRepository**: Repository<[MoneyAmount](classes/MoneyAmount.mdx)> & ``{ addPriceListPrices: Method addPriceListPrices ; createProductVariantMoneyAmounts: Method createProductVariantMoneyAmounts ; deletePriceListPrices: Method deletePriceListPrices ; deleteVariantPricesNotIn: Method deleteVariantPricesNotIn ; findCurrencyMoneyAmounts: Method findCurrencyMoneyAmounts ; findManyForVariantInPriceList: Method findManyForVariantInPriceList ; findManyForVariantInRegion: Method findManyForVariantInRegion ; findManyForVariantsInRegion: Method findManyForVariantsInRegion ; findRegionMoneyAmounts: Method findRegionMoneyAmounts ; findVariantPricesNotIn: Method findVariantPricesNotIn ; getPricesForVariantInRegion: Method getPricesForVariantInRegion ; insertBulk: Method insertBulk ; updatePriceListPrices: Method updatePriceListPrices ; upsertVariantCurrencyPrice: Method upsertVariantCurrencyPrice }`` ___ -#### NoteRepository +### NoteRepository `Const` **NoteRepository**: Repository<[Note](classes/Note.mdx)> ___ -#### NotificationProviderRepository +### NotificationProviderRepository `Const` **NotificationProviderRepository**: Repository<[NotificationProvider](classes/NotificationProvider.mdx)> ___ -#### NotificationRepository +### NotificationRepository `Const` **NotificationRepository**: Repository<[Notification](classes/Notification.mdx)> ___ -#### OauthRepository +### OauthRepository `Const` **OauthRepository**: Repository<[Oauth](classes/Oauth.mdx)> ___ -#### OrderEditRepository +### OrderEditRepository `Const` **OrderEditRepository**: Repository<[OrderEdit](classes/OrderEdit.mdx)> ___ -#### OrderItemChangeRepository +### OrderItemChangeRepository `Const` **OrderItemChangeRepository**: Repository<[OrderItemChange](classes/OrderItemChange.mdx)> ___ -#### OrderRepository +### OrderRepository `Const` **OrderRepository**: Repository<[Order](classes/Order.mdx)> & ``{ findOneWithRelations: Method findOneWithRelations ; findWithRelations: Method findWithRelations }`` ___ -#### PaymentCollectionRepository +### PaymentCollectionRepository `Const` **PaymentCollectionRepository**: Repository<[PaymentCollection](classes/PaymentCollection.mdx)> & ``{ getPaymentCollectionIdByPaymentId: Method getPaymentCollectionIdByPaymentId ; getPaymentCollectionIdBySessionId: Method getPaymentCollectionIdBySessionId }`` ___ -#### PaymentProviderRepository +### PaymentProviderRepository `Const` **PaymentProviderRepository**: Repository<[PaymentProvider](classes/PaymentProvider.mdx)> ___ -#### PaymentRepository +### PaymentRepository `Const` **PaymentRepository**: Repository<[Payment](classes/Payment.mdx)> ___ -#### PaymentSessionRepository +### PaymentSessionRepository `Const` **PaymentSessionRepository**: Repository<[PaymentSession](classes/PaymentSession.mdx)> ___ -#### PriceListRepository +### PriceListRepository `Const` **PriceListRepository**: Repository<[PriceList](classes/PriceList.mdx)> & ``{ listAndCount: Method listAndCount ; listPriceListsVariantIdsMap: Method listPriceListsVariantIdsMap }`` ___ -#### PriceType +### PriceType **PriceType**: `Object` @@ -880,155 +884,157 @@ ___ ___ -#### ProductCategoryRepository +### ProductCategoryRepository `Const` **ProductCategoryRepository**: TreeRepository<[ProductCategory](classes/ProductCategory.mdx)> & ``{ addProducts: Method addProducts ; findOneWithDescendants: Method findOneWithDescendants ; getFreeTextSearchResultsAndCount: Method getFreeTextSearchResultsAndCount ; removeProducts: Method removeProducts }`` ___ -#### ProductCollectionRepository +### ProductCollectionRepository `Const` **ProductCollectionRepository**: Repository<[ProductCollection](classes/ProductCollection.mdx)> & ``{ findAndCountByDiscountConditionId: Method findAndCountByDiscountConditionId }`` ___ -#### ProductOptionRepository +### ProductOptionRepository `Const` **ProductOptionRepository**: Repository<[ProductOption](classes/ProductOption.mdx)> ___ -#### ProductRepository +### ProductRepository `Const` **ProductRepository**: Repository<[Product](classes/Product.mdx)> & ``{ _applyCategoriesQuery: Method _applyCategoriesQuery ; _findWithRelations: Method _findWithRelations ; bulkAddToCollection: Method bulkAddToCollection ; bulkRemoveFromCollection: Method bulkRemoveFromCollection ; findOneWithRelations: Method findOneWithRelations ; findWithRelations: Method findWithRelations ; findWithRelationsAndCount: Method findWithRelationsAndCount ; getCategoryIdsFromInput: Method getCategoryIdsFromInput ; getCategoryIdsRecursively: Method getCategoryIdsRecursively ; getFreeTextSearchResultsAndCount: Method getFreeTextSearchResultsAndCount ; isProductInSalesChannels: Method isProductInSalesChannels ; queryProducts: Method queryProducts ; queryProductsWithIds: Method queryProductsWithIds }`` ___ -#### ProductTagRepository +### ProductTagRepository `Const` **ProductTagRepository**: Repository<[ProductTag](classes/ProductTag.mdx)> & ``{ findAndCountByDiscountConditionId: Method findAndCountByDiscountConditionId ; insertBulk: Method insertBulk ; listTagsByUsage: Method listTagsByUsage ; upsertTags: Method upsertTags }`` ___ -#### ProductTypeRepository +### ProductTypeRepository `Const` **ProductTypeRepository**: Repository<[ProductType](classes/ProductType.mdx)> & ``{ findAndCountByDiscountConditionId: Method findAndCountByDiscountConditionId ; upsertType: Method upsertType }`` ___ -#### ProductVariantRepository +### ProductVariantRepository `Const` **ProductVariantRepository**: Repository<[ProductVariant](classes/ProductVariant.mdx)> ___ -#### RefundRepository +### RefundRepository `Const` **RefundRepository**: Repository<[Refund](classes/Refund.mdx)> ___ -#### RegionRepository +### RegionRepository `Const` **RegionRepository**: Repository<[Region](classes/Region.mdx)> ___ -#### ReturnItemRepository +### ReturnItemRepository `Const` **ReturnItemRepository**: Repository<[ReturnItem](classes/ReturnItem.mdx)> ___ -#### ReturnReasonRepository +### ReturnReasonRepository `Const` **ReturnReasonRepository**: Repository<[ReturnReason](classes/ReturnReason.mdx)> ___ -#### ReturnRepository +### ReturnRepository `Const` **ReturnRepository**: Repository<[Return](classes/Return.mdx)> ___ -#### SalesChannelRepository +### SalesChannelRepository `Const` **SalesChannelRepository**: Repository<[SalesChannel](classes/SalesChannel.mdx)> & ``{ addProducts: Method addProducts ; getFreeTextSearchResultsAndCount: Method getFreeTextSearchResultsAndCount ; listProductIdsBySalesChannelIds: Method listProductIdsBySalesChannelIds ; removeProducts: Method removeProducts }`` ___ -#### SharedArrayBuffer +### SharedArrayBuffer **SharedArrayBuffer**: [SharedArrayBufferConstructor](interfaces/SharedArrayBufferConstructor.mdx) ___ -#### ShippingMethodRepository +### ShippingMethodRepository `Const` **ShippingMethodRepository**: Repository<[ShippingMethod](classes/ShippingMethod.mdx)> ___ -#### ShippingOptionRepository +### ShippingOptionRepository `Const` **ShippingOptionRepository**: Repository<[ShippingOption](classes/ShippingOption.mdx)> & ``{ upsertShippingProfile: Method upsertShippingProfile }`` ___ -#### ShippingOptionRequirementRepository +### ShippingOptionRequirementRepository `Const` **ShippingOptionRequirementRepository**: Repository<[ShippingOptionRequirement](classes/ShippingOptionRequirement.mdx)> ___ -#### ShippingProfileRepository +### ShippingProfileRepository `Const` **ShippingProfileRepository**: Repository<[ShippingProfile](classes/ShippingProfile.mdx)> & ``{ findByProducts: Method findByProducts }`` ___ -#### StagedJobRepository +### StagedJobRepository `Const` **StagedJobRepository**: Repository<[StagedJob](classes/StagedJob.mdx)> & ``{ insertBulk: Method insertBulk }`` ___ -#### StoreRepository +### StoreRepository `Const` **StoreRepository**: Repository<[Store](classes/Store.mdx)> ___ -#### SwapRepository +### SwapRepository `Const` **SwapRepository**: Repository<[Swap](classes/Swap.mdx)> ___ -#### TaxProviderRepository +### TaxProviderRepository `Const` **TaxProviderRepository**: Repository<[TaxProvider](classes/TaxProvider.mdx)> ___ -#### TrackingLinkRepository +### TrackingLinkRepository `Const` **TrackingLinkRepository**: Repository<[TrackingLink](classes/TrackingLink.mdx)> ___ -#### UserRepository +### UserRepository `Const` **UserRepository**: Repository<[User](classes/User.mdx)> +___ + ## Functions -#### Boolean +### Boolean `**Boolean**(value?): boolean` -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` diff --git a/www/apps/docs/content/references/services/interfaces/Boolean.mdx b/www/apps/docs/content/references/services/interfaces/Boolean.mdx index 99cbfdad2e..4214f3a38e 100644 --- a/www/apps/docs/content/references/services/interfaces/Boolean.mdx +++ b/www/apps/docs/content/references/services/interfaces/Boolean.mdx @@ -8,13 +8,13 @@ import ParameterTypes from "@site/src/components/ParameterTypes" ## Methods -#### valueOf +### valueOf `**valueOf**(): boolean` Returns the primitive value of the specified object. -##### Returns +#### Returns `boolean` diff --git a/www/apps/docs/content/references/services/interfaces/Buffer.mdx b/www/apps/docs/content/references/services/interfaces/Buffer.mdx index 1d8696685d..4a102357ff 100644 --- a/www/apps/docs/content/references/services/interfaces/Buffer.mdx +++ b/www/apps/docs/content/references/services/interfaces/Buffer.mdx @@ -65,13 +65,15 @@ import ParameterTypes from "@site/src/components/ParameterTypes" } ]} /> +___ + ## Methods -#### [iterator] +### [iterator] `**[iterator]**(): [IterableIterator](IterableIterator.mdx)<number>` -##### Returns +#### Returns [IterableIterator](IterableIterator.mdx)<number> @@ -89,13 +91,13 @@ import ParameterTypes from "@site/src/components/ParameterTypes" ___ -#### at +### at `**at**(index): undefined \| number` Returns the item located at the specified index. -##### Parameters +#### Parameters -##### Returns +#### Returns `undefined` \| `number` @@ -127,7 +129,7 @@ Returns the item located at the specified index. ___ -#### compare +### compare `**compare**(target, targetStart?, targetEnd?, sourceStart?, sourceEnd?): 0 \| 1 \| -1` @@ -178,7 +180,7 @@ console.log(buf1.compare(buf2, 5, 6, 5)); `ERR_OUT_OF_RANGE` is thrown if `targetStart < 0`, `sourceStart < 0`,`targetEnd > target.byteLength`, or `sourceEnd > source.byteLength`. -##### Parameters +#### Parameters -##### Returns +#### Returns `0` \| `1` \| `-1` @@ -250,7 +252,7 @@ v0.11.13 ___ -#### copy +### copy `**copy**(target, targetStart?, sourceStart?, sourceEnd?): number` @@ -300,7 +302,7 @@ console.log(buf.toString()); // Prints: efghijghijklmnopqrstuvwxyz ``` -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -363,14 +365,14 @@ v0.1.90 ___ -#### copyWithin +### copyWithin `**copyWithin**(target, start, end?): [Buffer](../index.md#buffer)` Returns the this object after copying a section of the array identified by start and end to the same array starting at position target -##### Parameters +#### Parameters -##### Returns +#### Returns [Buffer](../index.md#buffer) @@ -420,7 +422,7 @@ to the same array starting at position target ___ -#### entries +### entries `**entries**(): [IterableIterator](IterableIterator.mdx)<[number, number]>` @@ -446,7 +448,7 @@ for (const pair of buf.entries()) { // [5, 114] ``` -##### Returns +#### Returns [IterableIterator](IterableIterator.mdx)<[number, number]> @@ -468,7 +470,7 @@ v1.1.0 ___ -#### equals +### equals `**equals**(otherBuffer): boolean` @@ -487,7 +489,7 @@ console.log(buf1.equals(buf3)); // Prints: false ``` -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` @@ -523,13 +525,13 @@ v0.11.13 ___ -#### every +### every `**every**(predicate, thisArg?): boolean` Determines whether all the members of an array satisfy the specified test. -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` @@ -570,7 +572,7 @@ Determines whether all the members of an array satisfy the specified test. ___ -#### fill +### fill `**fill**(value, offset?, end?, encoding?): [Buffer](../index.md#buffer)` @@ -626,7 +628,7 @@ console.log(buf.fill('zz', 'hex')); // Throws an exception. ``` -##### Parameters +#### Parameters -##### Returns +#### Returns [Buffer](../index.md#buffer) @@ -689,13 +691,13 @@ v0.5.0 ___ -#### filter +### filter `**filter**(predicate, thisArg?): Uint8Array` Returns the elements of an array that meet the condition specified in a callback function. -##### Parameters +#### Parameters -##### Returns +#### Returns Uint8Array @@ -736,14 +738,14 @@ Uint8Array ___ -#### find +### find `**find**(predicate, thisArg?): undefined \| number` Returns the value of the first element in the array where predicate is true, and undefined otherwise. -##### Parameters +#### Parameters -##### Returns +#### Returns `undefined` \| `number` @@ -784,14 +786,14 @@ otherwise. ___ -#### findIndex +### findIndex `**findIndex**(predicate, thisArg?): number` Returns the index of the first element in the array where predicate is true, and -1 otherwise. -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -832,14 +834,14 @@ otherwise. ___ -#### findLast +### findLast `**findLast**(predicate, thisArg?): undefined \| S` Returns the value of the last element in the array where predicate is true, and undefined otherwise. -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns `undefined` \| `S` @@ -894,7 +896,7 @@ otherwise. `**findLast**(predicate, thisArg?): undefined \| number` -##### Parameters +#### Parameters -##### Returns +#### Returns `undefined` \| `number` @@ -935,14 +937,14 @@ otherwise. ___ -#### findLastIndex +### findLastIndex `**findLastIndex**(predicate, thisArg?): number` Returns the index of the last element in the array where predicate is true, and -1 otherwise. -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -983,13 +985,13 @@ otherwise. ___ -#### forEach +### forEach `**forEach**(callbackfn, thisArg?): void` Performs the specified action for each element in an array. -##### Parameters +#### Parameters -##### Returns +#### Returns `void` @@ -1030,7 +1032,7 @@ Performs the specified action for each element in an array. ___ -#### includes +### includes `**includes**(value, byteOffset?, encoding?): boolean` @@ -1057,7 +1059,7 @@ console.log(buf.includes('this', 4)); // Prints: false ``` -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` @@ -1111,7 +1113,7 @@ v5.3.0 ___ -#### indexOf +### indexOf `**indexOf**(value, byteOffset?, encoding?): number` @@ -1177,7 +1179,7 @@ console.log(b.indexOf('b', [])); If `value` is an empty string or empty `Buffer` and `byteOffset` is less than `buf.length`, `byteOffset` will be returned. If `value` is empty and`byteOffset` is at least `buf.length`, `buf.length` will be returned. -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -1231,13 +1233,13 @@ v1.5.0 ___ -#### join +### join `**join**(separator?): string` Adds all the elements of an array separated by the specified separator string. -##### Parameters +#### Parameters -##### Returns +#### Returns `string` @@ -1269,7 +1271,7 @@ Adds all the elements of an array separated by the specified separator string. ___ -#### keys +### keys `**keys**(): [IterableIterator](IterableIterator.mdx)<number>` @@ -1292,7 +1294,7 @@ for (const key of buf.keys()) { // 5 ``` -##### Returns +#### Returns [IterableIterator](IterableIterator.mdx)<number> @@ -1314,7 +1316,7 @@ v1.1.0 ___ -#### lastIndexOf +### lastIndexOf `**lastIndexOf**(value, byteOffset?, encoding?): number` @@ -1379,7 +1381,7 @@ console.log(b.lastIndexOf('b', [])); If `value` is an empty string or empty `Buffer`, `byteOffset` will be returned. -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -1433,14 +1435,14 @@ v6.0.0 ___ -#### map +### map `**map**(callbackfn, thisArg?): Uint8Array` Calls a defined callback function on each element of an array, and returns an array that contains the results. -##### Parameters +#### Parameters -##### Returns +#### Returns Uint8Array @@ -1481,7 +1483,7 @@ Uint8Array ___ -#### readBigInt64BE +### readBigInt64BE `**readBigInt64BE**(offset?): bigint` @@ -1490,7 +1492,7 @@ Reads a signed, big-endian 64-bit integer from `buf` at the specified `offset`. Integers read from a `Buffer` are interpreted as two's complement signed values. -##### Parameters +#### Parameters -##### Returns +#### Returns `bigint` @@ -1526,7 +1528,7 @@ v12.0.0, v10.20.0 ___ -#### readBigInt64LE +### readBigInt64LE `**readBigInt64LE**(offset?): bigint` @@ -1535,7 +1537,7 @@ Reads a signed, little-endian 64-bit integer from `buf` at the specified`offset` Integers read from a `Buffer` are interpreted as two's complement signed values. -##### Parameters +#### Parameters -##### Returns +#### Returns `bigint` @@ -1571,7 +1573,7 @@ v12.0.0, v10.20.0 ___ -#### readBigUInt64BE +### readBigUInt64BE `**readBigUInt64BE**(offset?): bigint` @@ -1588,7 +1590,7 @@ console.log(buf.readBigUInt64BE(0)); // Prints: 4294967295n ``` -##### Parameters +#### Parameters -##### Returns +#### Returns `bigint` @@ -1624,7 +1626,7 @@ v12.0.0, v10.20.0 ___ -#### readBigUInt64LE +### readBigUInt64LE `**readBigUInt64LE**(offset?): bigint` @@ -1641,7 +1643,7 @@ console.log(buf.readBigUInt64LE(0)); // Prints: 18446744069414584320n ``` -##### Parameters +#### Parameters -##### Returns +#### Returns `bigint` @@ -1677,11 +1679,11 @@ v12.0.0, v10.20.0 ___ -#### readBigUint64BE +### readBigUint64BE `**readBigUint64BE**(offset?): bigint` -##### Parameters +#### Parameters -##### Returns +#### Returns `bigint` @@ -1721,11 +1723,11 @@ v14.10.0, v12.19.0 ___ -#### readBigUint64LE +### readBigUint64LE `**readBigUint64LE**(offset?): bigint` -##### Parameters +#### Parameters -##### Returns +#### Returns `bigint` @@ -1765,7 +1767,7 @@ v14.10.0, v12.19.0 ___ -#### readDoubleBE +### readDoubleBE `**readDoubleBE**(offset?): number` @@ -1780,7 +1782,7 @@ console.log(buf.readDoubleBE(0)); // Prints: 8.20788039913184e-304 ``` -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -1816,7 +1818,7 @@ v0.11.15 ___ -#### readDoubleLE +### readDoubleLE `**readDoubleLE**(offset?): number` @@ -1833,7 +1835,7 @@ console.log(buf.readDoubleLE(1)); // Throws ERR_OUT_OF_RANGE. ``` -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -1869,7 +1871,7 @@ v0.11.15 ___ -#### readFloatBE +### readFloatBE `**readFloatBE**(offset?): number` @@ -1884,7 +1886,7 @@ console.log(buf.readFloatBE(0)); // Prints: 2.387939260590663e-38 ``` -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -1920,7 +1922,7 @@ v0.11.15 ___ -#### readFloatLE +### readFloatLE `**readFloatLE**(offset?): number` @@ -1937,7 +1939,7 @@ console.log(buf.readFloatLE(1)); // Throws ERR_OUT_OF_RANGE. ``` -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -1973,7 +1975,7 @@ v0.11.15 ___ -#### readInt16BE +### readInt16BE `**readInt16BE**(offset?): number` @@ -1990,7 +1992,7 @@ console.log(buf.readInt16BE(0)); // Prints: 5 ``` -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -2026,7 +2028,7 @@ v0.5.5 ___ -#### readInt16LE +### readInt16LE `**readInt16LE**(offset?): number` @@ -2045,7 +2047,7 @@ console.log(buf.readInt16LE(1)); // Throws ERR_OUT_OF_RANGE. ``` -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -2081,7 +2083,7 @@ v0.5.5 ___ -#### readInt32BE +### readInt32BE `**readInt32BE**(offset?): number` @@ -2098,7 +2100,7 @@ console.log(buf.readInt32BE(0)); // Prints: 5 ``` -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -2134,7 +2136,7 @@ v0.5.5 ___ -#### readInt32LE +### readInt32LE `**readInt32LE**(offset?): number` @@ -2153,7 +2155,7 @@ console.log(buf.readInt32LE(1)); // Throws ERR_OUT_OF_RANGE. ``` -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -2189,7 +2191,7 @@ v0.5.5 ___ -#### readInt8 +### readInt8 `**readInt8**(offset?): number` @@ -2210,7 +2212,7 @@ console.log(buf.readInt8(2)); // Throws ERR_OUT_OF_RANGE. ``` -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -2246,7 +2248,7 @@ v0.5.0 ___ -#### readIntBE +### readIntBE `**readIntBE**(offset, byteLength): number` @@ -2266,7 +2268,7 @@ console.log(buf.readIntBE(1, 0).toString(16)); // Throws ERR_OUT_OF_RANGE. ``` -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -2311,7 +2313,7 @@ v0.11.15 ___ -#### readIntLE +### readIntLE `**readIntLE**(offset, byteLength): number` @@ -2327,7 +2329,7 @@ console.log(buf.readIntLE(0, 6).toString(16)); // Prints: -546f87a9cbee ``` -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -2372,7 +2374,7 @@ v0.11.15 ___ -#### readUInt16BE +### readUInt16BE `**readUInt16BE**(offset?): number` @@ -2391,7 +2393,7 @@ console.log(buf.readUInt16BE(1).toString(16)); // Prints: 3456 ``` -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -2427,7 +2429,7 @@ v0.5.5 ___ -#### readUInt16LE +### readUInt16LE `**readUInt16LE**(offset?): number` @@ -2448,7 +2450,7 @@ console.log(buf.readUInt16LE(2).toString(16)); // Throws ERR_OUT_OF_RANGE. ``` -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -2484,7 +2486,7 @@ v0.5.5 ___ -#### readUInt32BE +### readUInt32BE `**readUInt32BE**(offset?): number` @@ -2501,7 +2503,7 @@ console.log(buf.readUInt32BE(0).toString(16)); // Prints: 12345678 ``` -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -2537,7 +2539,7 @@ v0.5.5 ___ -#### readUInt32LE +### readUInt32LE `**readUInt32LE**(offset?): number` @@ -2556,7 +2558,7 @@ console.log(buf.readUInt32LE(1).toString(16)); // Throws ERR_OUT_OF_RANGE. ``` -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -2592,7 +2594,7 @@ v0.5.5 ___ -#### readUInt8 +### readUInt8 `**readUInt8**(offset?): number` @@ -2613,7 +2615,7 @@ console.log(buf.readUInt8(2)); // Throws ERR_OUT_OF_RANGE. ``` -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -2649,7 +2651,7 @@ v0.5.0 ___ -#### readUIntBE +### readUIntBE `**readUIntBE**(offset, byteLength): number` @@ -2669,7 +2671,7 @@ console.log(buf.readUIntBE(1, 6).toString(16)); // Throws ERR_OUT_OF_RANGE. ``` -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -2714,7 +2716,7 @@ v0.11.15 ___ -#### readUIntLE +### readUIntLE `**readUIntLE**(offset, byteLength): number` @@ -2732,7 +2734,7 @@ console.log(buf.readUIntLE(0, 6).toString(16)); // Prints: ab9078563412 ``` -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -2777,11 +2779,11 @@ v0.11.15 ___ -#### readUint16BE +### readUint16BE `**readUint16BE**(offset?): number` -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -2821,11 +2823,11 @@ v14.9.0, v12.19.0 ___ -#### readUint16LE +### readUint16LE `**readUint16LE**(offset?): number` -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -2865,11 +2867,11 @@ v14.9.0, v12.19.0 ___ -#### readUint32BE +### readUint32BE `**readUint32BE**(offset?): number` -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -2909,11 +2911,11 @@ v14.9.0, v12.19.0 ___ -#### readUint32LE +### readUint32LE `**readUint32LE**(offset?): number` -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -2953,11 +2955,11 @@ v14.9.0, v12.19.0 ___ -#### readUint8 +### readUint8 `**readUint8**(offset?): number` -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -2997,11 +2999,11 @@ v14.9.0, v12.19.0 ___ -#### readUintBE +### readUintBE `**readUintBE**(offset, byteLength): number` -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -3050,11 +3052,11 @@ v14.9.0, v12.19.0 ___ -#### readUintLE +### readUintLE `**readUintLE**(offset, byteLength): number` -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -3103,7 +3105,7 @@ v14.9.0, v12.19.0 ___ -#### reduce +### reduce `**reduce**(callbackfn): number` @@ -3111,7 +3113,7 @@ Calls the specified callback function for all the elements in an array. The retu the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -3143,7 +3145,7 @@ call to the callback function. `**reduce**(callbackfn, initialValue): number` -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -3188,7 +3190,7 @@ Calls the specified callback function for all the elements in an array. The retu the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns `U` @@ -3243,7 +3245,7 @@ call to the callback function. ___ -#### reduceRight +### reduceRight `**reduceRight**(callbackfn): number` @@ -3251,7 +3253,7 @@ Calls the specified callback function for all the elements in an array, in desce The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -3283,7 +3285,7 @@ argument in the next call to the callback function. `**reduceRight**(callbackfn, initialValue): number` -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -3328,7 +3330,7 @@ Calls the specified callback function for all the elements in an array, in desce The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns `U` @@ -3383,11 +3385,11 @@ argument in the next call to the callback function. ___ -#### reverse +### reverse `**reverse**(): [Buffer](../index.md#buffer)` -##### Returns +#### Returns [Buffer](../index.md#buffer) @@ -3405,13 +3407,13 @@ ___ ___ -#### set +### set `**set**(array, offset?): void` Sets a value or an array of values. -##### Parameters +#### Parameters -##### Returns +#### Returns `void` @@ -3452,7 +3454,7 @@ Sets a value or an array of values. ___ -#### slice +### slice `**slice**(start?, end?): [Buffer](../index.md#buffer)` @@ -3484,7 +3486,7 @@ console.log(buf.toString()); // Also prints: cuffer (!) ``` -##### Parameters +#### Parameters -##### Returns +#### Returns [Buffer](../index.md#buffer) @@ -3533,13 +3535,13 @@ Use `subarray` instead. ___ -#### some +### some `**some**(predicate, thisArg?): boolean` Determines whether the specified callback function returns true for any element of an array. -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` @@ -3580,13 +3582,13 @@ Determines whether the specified callback function returns true for any element ___ -#### sort +### sort `**sort**(compareFn?): [Buffer](../index.md#buffer)` Sorts an array. -##### Parameters +#### Parameters -##### Returns +#### Returns [Buffer](../index.md#buffer) @@ -3618,7 +3620,7 @@ Sorts an array. ___ -#### subarray +### subarray `**subarray**(start?, end?): [Buffer](../index.md#buffer)` @@ -3677,7 +3679,7 @@ console.log(buf.subarray(-5, -2).toString()); // (Equivalent to buf.subarray(1, 4).) ``` -##### Parameters +#### Parameters -##### Returns +#### Returns [Buffer](../index.md#buffer) @@ -3722,7 +3724,7 @@ v3.0.0 ___ -#### swap16 +### swap16 `**swap16**(): [Buffer](../index.md#buffer)` @@ -3758,7 +3760,7 @@ const buf = Buffer.from('This is little-endian UTF-16', 'utf16le'); buf.swap16(); // Convert to big-endian UTF-16 text. ``` -##### Returns +#### Returns [Buffer](../index.md#buffer) @@ -3780,7 +3782,7 @@ v5.10.0 ___ -#### swap32 +### swap32 `**swap32**(): [Buffer](../index.md#buffer)` @@ -3806,7 +3808,7 @@ buf2.swap32(); // Throws ERR_INVALID_BUFFER_SIZE. ``` -##### Returns +#### Returns [Buffer](../index.md#buffer) @@ -3828,7 +3830,7 @@ v5.10.0 ___ -#### swap64 +### swap64 `**swap64**(): [Buffer](../index.md#buffer)` @@ -3854,7 +3856,7 @@ buf2.swap64(); // Throws ERR_INVALID_BUFFER_SIZE. ``` -##### Returns +#### Returns [Buffer](../index.md#buffer) @@ -3876,7 +3878,7 @@ v6.3.0 ___ -#### toJSON +### toJSON `**toJSON**(): { data: number[] ; type: "Buffer" }` @@ -3905,7 +3907,7 @@ console.log(copy); // Prints: ``` -##### Returns +#### Returns `object` @@ -3948,13 +3950,13 @@ v0.9.2 ___ -#### toLocaleString +### toLocaleString `**toLocaleString**(): string` Converts a number to a string by using the current locale. -##### Returns +#### Returns `string` @@ -3972,13 +3974,13 @@ Converts a number to a string by using the current locale. ___ -#### toReversed +### toReversed `**toReversed**(): Uint8Array` Copies the array and returns the copy with the elements in reverse order. -##### Returns +#### Returns Uint8Array @@ -3996,13 +3998,13 @@ Uint8Array ___ -#### toSorted +### toSorted `**toSorted**(compareFn?): Uint8Array` Copies and sorts the array. -##### Parameters +#### Parameters -##### Returns +#### Returns Uint8Array @@ -4034,7 +4036,7 @@ Uint8Array ___ -#### toString +### toString `**toString**(encoding?, start?, end?): string` @@ -4071,7 +4073,7 @@ console.log(buf2.toString(undefined, 0, 3)); // Prints: té ``` -##### Parameters +#### Parameters -##### Returns +#### Returns `string` @@ -4125,13 +4127,13 @@ v0.1.90 ___ -#### valueOf +### valueOf `**valueOf**(): Uint8Array` Returns the primitive value of the specified object. -##### Returns +#### Returns Uint8Array @@ -4149,7 +4151,7 @@ Uint8Array ___ -#### values +### values `**values**(): [IterableIterator](IterableIterator.mdx)<number>` @@ -4184,7 +4186,7 @@ for (const value of buf) { // 114 ``` -##### Returns +#### Returns [IterableIterator](IterableIterator.mdx)<number> @@ -4206,13 +4208,13 @@ v1.1.0 ___ -#### with +### with `**with**(index, value): Uint8Array` Copies the array and inserts the given number at the provided index. -##### Parameters +#### Parameters -##### Returns +#### Returns Uint8Array @@ -4253,7 +4255,7 @@ Uint8Array ___ -#### write +### write `**write**(string, encoding?): number` @@ -4279,7 +4281,7 @@ console.log(`${length} bytes: ${buffer.toString('utf8', 8, 10)}`); // Prints: 2 bytes : ab ``` -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -4324,7 +4326,7 @@ v0.1.90 `**write**(string, offset, encoding?): number` -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -4374,7 +4376,7 @@ v0.1.90 `**write**(string, offset, length, encoding?): number` -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -4433,7 +4435,7 @@ v0.1.90 ___ -#### writeBigInt64BE +### writeBigInt64BE `**writeBigInt64BE**(value, offset?): number` @@ -4452,7 +4454,7 @@ console.log(buf); // Prints: ``` -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -4497,7 +4499,7 @@ v12.0.0, v10.20.0 ___ -#### writeBigInt64LE +### writeBigInt64LE `**writeBigInt64LE**(value, offset?): number` @@ -4516,7 +4518,7 @@ console.log(buf); // Prints: ``` -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -4561,7 +4563,7 @@ v12.0.0, v10.20.0 ___ -#### writeBigUInt64BE +### writeBigUInt64BE `**writeBigUInt64BE**(value, offset?): number` @@ -4580,7 +4582,7 @@ console.log(buf); // Prints: ``` -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -4625,7 +4627,7 @@ v12.0.0, v10.20.0 ___ -#### writeBigUInt64LE +### writeBigUInt64LE `**writeBigUInt64LE**(value, offset?): number` @@ -4644,7 +4646,7 @@ console.log(buf); This function is also available under the `writeBigUint64LE` alias. -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -4689,11 +4691,11 @@ v12.0.0, v10.20.0 ___ -#### writeBigUint64BE +### writeBigUint64BE `**writeBigUint64BE**(value, offset?): number` -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -4742,11 +4744,11 @@ v14.10.0, v12.19.0 ___ -#### writeBigUint64LE +### writeBigUint64LE `**writeBigUint64LE**(value, offset?): number` -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -4795,7 +4797,7 @@ v14.10.0, v12.19.0 ___ -#### writeDoubleBE +### writeDoubleBE `**writeDoubleBE**(value, offset?): number` @@ -4813,7 +4815,7 @@ console.log(buf); // Prints: ``` -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -4858,7 +4860,7 @@ v0.11.15 ___ -#### writeDoubleLE +### writeDoubleLE `**writeDoubleLE**(value, offset?): number` @@ -4876,7 +4878,7 @@ console.log(buf); // Prints: ``` -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -4921,7 +4923,7 @@ v0.11.15 ___ -#### writeFloatBE +### writeFloatBE `**writeFloatBE**(value, offset?): number` @@ -4939,7 +4941,7 @@ console.log(buf); // Prints: ``` -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -4984,7 +4986,7 @@ v0.11.15 ___ -#### writeFloatLE +### writeFloatLE `**writeFloatLE**(value, offset?): number` @@ -5002,7 +5004,7 @@ console.log(buf); // Prints: ``` -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -5047,7 +5049,7 @@ v0.11.15 ___ -#### writeInt16BE +### writeInt16BE `**writeInt16BE**(value, offset?): number` @@ -5067,7 +5069,7 @@ console.log(buf); // Prints: ``` -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -5112,7 +5114,7 @@ v0.5.5 ___ -#### writeInt16LE +### writeInt16LE `**writeInt16LE**(value, offset?): number` @@ -5132,7 +5134,7 @@ console.log(buf); // Prints: ``` -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -5177,7 +5179,7 @@ v0.5.5 ___ -#### writeInt32BE +### writeInt32BE `**writeInt32BE**(value, offset?): number` @@ -5197,7 +5199,7 @@ console.log(buf); // Prints: ``` -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -5242,7 +5244,7 @@ v0.5.5 ___ -#### writeInt32LE +### writeInt32LE `**writeInt32LE**(value, offset?): number` @@ -5262,7 +5264,7 @@ console.log(buf); // Prints: ``` -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -5307,7 +5309,7 @@ v0.5.5 ___ -#### writeInt8 +### writeInt8 `**writeInt8**(value, offset?): number` @@ -5329,7 +5331,7 @@ console.log(buf); // Prints: ``` -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -5374,7 +5376,7 @@ v0.5.0 ___ -#### writeIntBE +### writeIntBE `**writeIntBE**(value, offset, byteLength): number` @@ -5392,7 +5394,7 @@ console.log(buf); // Prints: ``` -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -5446,7 +5448,7 @@ v0.11.15 ___ -#### writeIntLE +### writeIntLE `**writeIntLE**(value, offset, byteLength): number` @@ -5464,7 +5466,7 @@ console.log(buf); // Prints: ``` -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -5518,7 +5520,7 @@ v0.11.15 ___ -#### writeUInt16BE +### writeUInt16BE `**writeUInt16BE**(value, offset?): number` @@ -5539,7 +5541,7 @@ console.log(buf); // Prints: ``` -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -5584,7 +5586,7 @@ v0.5.5 ___ -#### writeUInt16LE +### writeUInt16LE `**writeUInt16LE**(value, offset?): number` @@ -5605,7 +5607,7 @@ console.log(buf); // Prints: ``` -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -5650,7 +5652,7 @@ v0.5.5 ___ -#### writeUInt32BE +### writeUInt32BE `**writeUInt32BE**(value, offset?): number` @@ -5670,7 +5672,7 @@ console.log(buf); // Prints: ``` -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -5715,7 +5717,7 @@ v0.5.5 ___ -#### writeUInt32LE +### writeUInt32LE `**writeUInt32LE**(value, offset?): number` @@ -5735,7 +5737,7 @@ console.log(buf); // Prints: ``` -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -5780,7 +5782,7 @@ v0.5.5 ___ -#### writeUInt8 +### writeUInt8 `**writeUInt8**(value, offset?): number` @@ -5804,7 +5806,7 @@ console.log(buf); // Prints: ``` -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -5849,7 +5851,7 @@ v0.5.0 ___ -#### writeUIntBE +### writeUIntBE `**writeUIntBE**(value, offset, byteLength): number` @@ -5869,7 +5871,7 @@ console.log(buf); // Prints: ``` -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -5923,7 +5925,7 @@ v0.5.5 ___ -#### writeUIntLE +### writeUIntLE `**writeUIntLE**(value, offset, byteLength): number` @@ -5943,7 +5945,7 @@ console.log(buf); // Prints: ``` -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -5997,11 +5999,11 @@ v0.5.5 ___ -#### writeUint16BE +### writeUint16BE `**writeUint16BE**(value, offset?): number` -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -6050,11 +6052,11 @@ v14.9.0, v12.19.0 ___ -#### writeUint16LE +### writeUint16LE `**writeUint16LE**(value, offset?): number` -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -6103,11 +6105,11 @@ v14.9.0, v12.19.0 ___ -#### writeUint32BE +### writeUint32BE `**writeUint32BE**(value, offset?): number` -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -6156,11 +6158,11 @@ v14.9.0, v12.19.0 ___ -#### writeUint32LE +### writeUint32LE `**writeUint32LE**(value, offset?): number` -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -6209,11 +6211,11 @@ v14.9.0, v12.19.0 ___ -#### writeUint8 +### writeUint8 `**writeUint8**(value, offset?): number` -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -6262,11 +6264,11 @@ v14.9.0, v12.19.0 ___ -#### writeUintBE +### writeUintBE `**writeUintBE**(value, offset, byteLength): number` -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -6324,11 +6326,11 @@ v14.9.0, v12.19.0 ___ -#### writeUintLE +### writeUintLE `**writeUintLE**(value, offset, byteLength): number` -##### Parameters +#### Parameters -##### Returns +#### Returns `number` diff --git a/www/apps/docs/content/references/services/interfaces/BufferConstructor.mdx b/www/apps/docs/content/references/services/interfaces/BufferConstructor.mdx index bc494bc893..23f891b8d1 100644 --- a/www/apps/docs/content/references/services/interfaces/BufferConstructor.mdx +++ b/www/apps/docs/content/references/services/interfaces/BufferConstructor.mdx @@ -10,15 +10,13 @@ Raw data is stored in instances of the Buffer class. A Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized. Valid string encodings: 'ascii'\|'utf8'\|'utf16le'\|'ucs2'(alias of 'utf16le')\|'base64'\|'base64url'\|'binary'(deprecated)\|'hex' -## Constructors - -#### constructor +## constructor `**new BufferConstructor**(str, encoding?)` Allocates a new buffer containing the given {str}. -##### Parameters +### Parameters -#### Deprecated +### Deprecated since v10.0.0 - Use `Buffer.from(string[, encoding])` instead. @@ -49,7 +47,7 @@ since v10.0.0 - Use `Buffer.from(string[, encoding])` instead. Allocates a new buffer of {size} octets. -##### Parameters +### Parameters -#### Deprecated +### Deprecated since v10.0.0 - Use `Buffer.alloc()` instead (also see `Buffer.allocUnsafe()`). @@ -71,7 +69,7 @@ since v10.0.0 - Use `Buffer.alloc()` instead (also see `Buffer.allocUnsafe()`). Allocates a new buffer containing the given {array} of octets. -##### Parameters +### Parameters -#### Deprecated +### Deprecated since v10.0.0 - Use `Buffer.from(array)` instead. @@ -94,7 +92,7 @@ since v10.0.0 - Use `Buffer.from(array)` instead. Produces a Buffer backed by the same allocated memory as the given {ArrayBuffer}/{SharedArrayBuffer}. -##### Parameters +### Parameters -#### Deprecated +### Deprecated since v10.0.0 - Use `Buffer.from(arrayBuffer[, byteOffset[, length]])` instead. @@ -116,7 +114,7 @@ since v10.0.0 - Use `Buffer.from(arrayBuffer[, byteOffset[, length]])` instead. Allocates a new buffer containing the given {array} of octets. -##### Parameters +### Parameters -#### Deprecated +### Deprecated since v10.0.0 - Use `Buffer.from(array)` instead. @@ -138,7 +136,7 @@ since v10.0.0 - Use `Buffer.from(array)` instead. Copies the passed {buffer} data onto a new {Buffer} instance. -##### Parameters +### Parameters -#### Deprecated +### Deprecated since v10.0.0 - Use `Buffer.from(buffer)` instead. +___ + ## Properties +___ + ## Methods -#### alloc +### alloc `**alloc**(size, fill?, encoding?): [Buffer](../index.md#buffer)` @@ -218,7 +220,7 @@ data that might not have been allocated for `Buffer`s. A `TypeError` will be thrown if `size` is not a number. -##### Parameters +#### Parameters -##### Returns +#### Returns [Buffer](../index.md#buffer) @@ -272,7 +274,7 @@ v5.10.0 ___ -#### allocUnsafe +### allocUnsafe `**allocUnsafe**(size): [Buffer](../index.md#buffer)` @@ -308,7 +310,7 @@ than or equal to half `Buffer.poolSize`. The difference is subtle but can be important when an application requires the additional performance that `Buffer.allocUnsafe()` provides. -##### Parameters +#### Parameters -##### Returns +#### Returns [Buffer](../index.md#buffer) @@ -344,7 +346,7 @@ v5.10.0 ___ -#### allocUnsafeSlow +### allocUnsafeSlow `**allocUnsafeSlow**(size): [Buffer](../index.md#buffer)` @@ -389,7 +391,7 @@ socket.on('readable', () => { A `TypeError` will be thrown if `size` is not a number. -##### Parameters +#### Parameters -##### Returns +#### Returns [Buffer](../index.md#buffer) @@ -425,7 +427,7 @@ v5.12.0 ___ -#### byteLength +### byteLength `**byteLength**(string, encoding?): number` @@ -453,7 +455,7 @@ When `string` is a Reference/Global\_Objects/TypedArray)/[`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global\_Objects/ArrayBuffer)/[`SharedArrayBuffer`](https://develop- er.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global\_Objects/SharedArrayBuffer), the byte length as reported by `.byteLength`is returned. -##### Parameters +#### Parameters -##### Returns +#### Returns `number` @@ -498,7 +500,7 @@ v0.1.90 ___ -#### compare +### compare `**compare**(buf1, buf2): 0 \| 1 \| -1` @@ -516,7 +518,7 @@ console.log(arr.sort(Buffer.compare)); // (This result is equal to: [buf2, buf1].) ``` -##### Parameters +#### Parameters -##### Returns +#### Returns `0` \| `1` \| `-1` @@ -561,7 +563,7 @@ v0.11.13 ___ -#### concat +### concat `**concat**(list, totalLength?): [Buffer](../index.md#buffer)` @@ -599,7 +601,7 @@ console.log(bufA.length); `Buffer.concat()` may also use the internal `Buffer` pool like `Buffer.allocUnsafe()` does. -##### Parameters +#### Parameters -##### Returns +#### Returns [Buffer](../index.md#buffer) @@ -644,7 +646,7 @@ v0.7.11 ___ -#### copyBytesFrom +### copyBytesFrom `**copyBytesFrom**(view, offset?, length?): [Buffer](../index.md#buffer)` @@ -659,7 +661,7 @@ console.log(buf[0]); // 255 console.log(buf[1]); // 255 ``` -##### Parameters +#### Parameters -##### Returns +#### Returns [Buffer](../index.md#buffer) @@ -713,7 +715,7 @@ v19.8.0 ___ -#### from +### from `**from**(arrayBuffer, byteOffset?, length?): [Buffer](../index.md#buffer)` @@ -736,7 +738,7 @@ appropriate for `Buffer.from()` variants. `Buffer.from(array)` and `Buffer.from(string)` may also use the internal`Buffer` pool like `Buffer.allocUnsafe()` does. -##### Parameters +#### Parameters -##### Returns +#### Returns [Buffer](../index.md#buffer) @@ -792,7 +794,7 @@ v5.10.0 Creates a new Buffer using the passed {data} -##### Parameters +#### Parameters -##### Returns +#### Returns [Buffer](../index.md#buffer) @@ -824,7 +826,7 @@ Creates a new Buffer using the passed {data} `**from**(data): [Buffer](../index.md#buffer)` -##### Parameters +#### Parameters -##### Returns +#### Returns [Buffer](../index.md#buffer) @@ -860,7 +862,7 @@ Creates a new Buffer containing the given JavaScript string {str}. If provided, the {encoding} parameter identifies the character encoding. If not provided, {encoding} defaults to 'utf8'. -##### Parameters +#### Parameters -##### Returns +#### Returns [Buffer](../index.md#buffer) @@ -901,7 +903,7 @@ If not provided, {encoding} defaults to 'utf8'. ___ -#### isBuffer +### isBuffer `**isBuffer**(obj): obj is Buffer` @@ -917,7 +919,7 @@ Buffer.isBuffer([]); // false Buffer.isBuffer(new Uint8Array(1024)); // false ``` -##### Parameters +#### Parameters -##### Returns +#### Returns obj is Buffer @@ -953,7 +955,7 @@ v0.1.101 ___ -#### isEncoding +### isEncoding `**isEncoding**(encoding): encoding is BufferEncoding` @@ -976,7 +978,7 @@ console.log(Buffer.isEncoding('')); // Prints: false ``` -##### Parameters +#### Parameters -##### Returns +#### Returns encoding is BufferEncoding @@ -1012,13 +1014,13 @@ v0.9.1 ___ -#### of +### of `**of**(...items): [Buffer](../index.md#buffer)` Creates a new Buffer using the passed {data} -##### Parameters +#### Parameters -##### Returns +#### Returns [Buffer](../index.md#buffer) diff --git a/www/apps/docs/content/references/services/interfaces/FilterablePriceListProps-1.mdx b/www/apps/docs/content/references/services/interfaces/FilterablePriceListProps-1.mdx index c21b65a34b..f613319be6 100644 --- a/www/apps/docs/content/references/services/interfaces/FilterablePriceListProps-1.mdx +++ b/www/apps/docs/content/references/services/interfaces/FilterablePriceListProps-1.mdx @@ -6,7 +6,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes" # FilterablePriceListProps -#### Inteface +## Inteface Filters to apply on price lists. diff --git a/www/apps/docs/content/references/services/interfaces/IBatchJobStrategy.mdx b/www/apps/docs/content/references/services/interfaces/IBatchJobStrategy.mdx index a7f58a902c..5ce34d3fd1 100644 --- a/www/apps/docs/content/references/services/interfaces/IBatchJobStrategy.mdx +++ b/www/apps/docs/content/references/services/interfaces/IBatchJobStrategy.mdx @@ -56,15 +56,35 @@ import ParameterTypes from "@site/src/components/ParameterTypes" } ]} /> +___ + ## Accessors -#### activeManager\_ +### activeManager\_ - `Protected` **activeManager\_**: [object Object] +`Protected get**activeManager_**(): EntityManager` + +#### Returns + +EntityManager + + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ `Protected **atomicPhase_**(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise<TResult>` @@ -72,7 +92,7 @@ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<TResult> @@ -145,13 +165,13 @@ Promise<TResult> ___ -#### buildTemplate +### buildTemplate `**buildTemplate**(): Promise<string>` Builds and returns a template file that can be downloaded and filled in -##### Returns +#### Returns Promise<string> @@ -169,13 +189,13 @@ Promise<string> ___ -#### preProcessBatchJob +### preProcessBatchJob `**preProcessBatchJob**(batchJobId): Promise<void>` Method for pre-processing a batch job -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -207,13 +227,13 @@ Promise<void> ___ -#### prepareBatchJobForProcessing +### prepareBatchJobForProcessing `**prepareBatchJobForProcessing**(batchJobEntity, req): Promise<[CreateBatchJobInput](../types/CreateBatchJobInput.mdx)>` Method for preparing a batch job for processing -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[CreateBatchJobInput](../types/CreateBatchJobInput.mdx)> @@ -254,13 +274,13 @@ Promise<[CreateBatchJobInput](../types/CreateBatchJobInput.mdx)> ___ -#### processJob +### processJob `**processJob**(batchJobId): Promise<void>` Method does the actual processing of the job. Should report back on the progress of the operation. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -292,11 +312,11 @@ Promise<void> ___ -#### shouldRetryTransaction\_ +### shouldRetryTransaction\_ `Protected **shouldRetryTransaction_**(err): boolean` -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` @@ -328,11 +348,11 @@ ___ ___ -#### withTransaction +### withTransaction `**withTransaction**(transactionManager?): [IBatchJobStrategy](IBatchJobStrategy.mdx)` -##### Parameters +#### Parameters -##### Returns +#### Returns [IBatchJobStrategy](IBatchJobStrategy.mdx) diff --git a/www/apps/docs/content/references/services/interfaces/ICacheService.mdx b/www/apps/docs/content/references/services/interfaces/ICacheService.mdx index a0912ec28b..222e2f252c 100644 --- a/www/apps/docs/content/references/services/interfaces/ICacheService.mdx +++ b/www/apps/docs/content/references/services/interfaces/ICacheService.mdx @@ -8,11 +8,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes" ## Methods -#### get +### get `**get**(key): Promise<null \| T>` -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<null \| T> @@ -58,11 +58,11 @@ Promise<null \| T> ___ -#### invalidate +### invalidate `**invalidate**(key): Promise<void>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -94,11 +94,11 @@ Promise<void> ___ -#### set +### set `**set**(key, data, ttl?): Promise<void>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> diff --git a/www/apps/docs/content/references/services/interfaces/IEventBusModuleService.mdx b/www/apps/docs/content/references/services/interfaces/IEventBusModuleService.mdx index 068337cd1c..97d5ff1d18 100644 --- a/www/apps/docs/content/references/services/interfaces/IEventBusModuleService.mdx +++ b/www/apps/docs/content/references/services/interfaces/IEventBusModuleService.mdx @@ -8,11 +8,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes" ## Methods -#### emit +### emit `**emit**(eventName, data, options?): Promise<void>` -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -76,7 +76,7 @@ Promise<void> `**emit**(data): Promise<void>` -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -122,11 +122,11 @@ Promise<void> ___ -#### subscribe +### subscribe `**subscribe**(eventName, subscriber, context?): [IEventBusModuleService](IEventBusModuleService.mdx)` -##### Parameters +#### Parameters -##### Returns +#### Returns [IEventBusModuleService](IEventBusModuleService.mdx) @@ -176,11 +176,11 @@ ___ ___ -#### unsubscribe +### unsubscribe `**unsubscribe**(eventName, subscriber, context?): [IEventBusModuleService](IEventBusModuleService.mdx)` -##### Parameters +#### Parameters -##### Returns +#### Returns [IEventBusModuleService](IEventBusModuleService.mdx) diff --git a/www/apps/docs/content/references/services/interfaces/IEventBusService.mdx b/www/apps/docs/content/references/services/interfaces/IEventBusService.mdx index 6b762829b6..cf5561f429 100644 --- a/www/apps/docs/content/references/services/interfaces/IEventBusService.mdx +++ b/www/apps/docs/content/references/services/interfaces/IEventBusService.mdx @@ -8,11 +8,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes" ## Methods -#### emit +### emit `**emit**(event, data, options?): Promise<unknown>` -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<unknown> @@ -76,11 +76,11 @@ Promise<unknown> ___ -#### subscribe +### subscribe `**subscribe**(eventName, subscriber, context?): [IEventBusService](IEventBusService.mdx)` -##### Parameters +#### Parameters -##### Returns +#### Returns [IEventBusService](IEventBusService.mdx) @@ -130,11 +130,11 @@ ___ ___ -#### unsubscribe +### unsubscribe `**unsubscribe**(eventName, subscriber, context?): [IEventBusService](IEventBusService.mdx)` -##### Parameters +#### Parameters -##### Returns +#### Returns [IEventBusService](IEventBusService.mdx) @@ -184,11 +184,11 @@ ___ ___ -#### withTransaction +### withTransaction `**withTransaction**(transactionManager?): [IEventBusService](IEventBusService.mdx)` -##### Parameters +#### Parameters -##### Returns +#### Returns [IEventBusService](IEventBusService.mdx) diff --git a/www/apps/docs/content/references/services/interfaces/IInventoryService.mdx b/www/apps/docs/content/references/services/interfaces/IInventoryService.mdx index 042887c7c2..6885974bfb 100644 --- a/www/apps/docs/content/references/services/interfaces/IInventoryService.mdx +++ b/www/apps/docs/content/references/services/interfaces/IInventoryService.mdx @@ -8,13 +8,13 @@ import ParameterTypes from "@site/src/components/ParameterTypes" ## Methods -#### adjustInventory +### adjustInventory `**adjustInventory**(inventoryItemId, locationId, adjustment, context?): Promise<[InventoryLevelDTO](../types/InventoryLevelDTO.mdx)>` This method is used to adjust the inventory level's stocked quantity. The inventory level is identified by the IDs of its associated inventory item and location. -##### Example +#### Example ```ts import { @@ -38,7 +38,7 @@ async function adjustInventory ( } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[InventoryLevelDTO](../types/InventoryLevelDTO.mdx)> @@ -97,13 +97,13 @@ Promise<[InventoryLevelDTO](../types/InventoryLevelDTO.mdx)> ___ -#### confirmInventory +### confirmInventory `**confirmInventory**(inventoryItemId, locationIds, quantity, context?): Promise<boolean>` This method is used to confirm whether the specified quantity of an inventory item is available in the specified locations. -##### Example +#### Example ```ts import { @@ -125,7 +125,7 @@ async function confirmInventory ( } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<boolean> @@ -184,13 +184,13 @@ Promise<boolean> ___ -#### createInventoryItem +### createInventoryItem `**createInventoryItem**(input, context?): Promise<[InventoryItemDTO](../types/InventoryItemDTO.mdx)>` This method is used to create an inventory item. -##### Example +#### Example ```ts import { @@ -211,7 +211,7 @@ async function createInventoryItem (item: { } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[InventoryItemDTO](../types/InventoryItemDTO.mdx)> @@ -252,13 +252,13 @@ Promise<[InventoryItemDTO](../types/InventoryItemDTO.mdx)> ___ -#### createInventoryItems +### createInventoryItems `**createInventoryItems**(input, context?): Promise<[InventoryItemDTO](../types/InventoryItemDTO.mdx)[]>` This method is used to create inventory items. -##### Example +#### Example ```ts import { @@ -279,7 +279,7 @@ async function createInventoryItems (items: { } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[InventoryItemDTO](../types/InventoryItemDTO.mdx)[]> @@ -320,13 +320,13 @@ Promise<[InventoryItemDTO](../types/InventoryItemDTO.mdx)[]> ___ -#### createInventoryLevel +### createInventoryLevel `**createInventoryLevel**(data, context?): Promise<[InventoryLevelDTO](../types/InventoryLevelDTO.mdx)>` This method is used to create inventory level. -##### Example +#### Example ```ts import { @@ -348,7 +348,7 @@ async function createInventoryLevel (item: { } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[InventoryLevelDTO](../types/InventoryLevelDTO.mdx)> @@ -389,13 +389,13 @@ Promise<[InventoryLevelDTO](../types/InventoryLevelDTO.mdx)> ___ -#### createInventoryLevels +### createInventoryLevels `**createInventoryLevels**(data, context?): Promise<[InventoryLevelDTO](../types/InventoryLevelDTO.mdx)[]>` This method is used to create inventory levels. -##### Example +#### Example ```ts import { @@ -417,7 +417,7 @@ async function createInventoryLevels (items: { } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[InventoryLevelDTO](../types/InventoryLevelDTO.mdx)[]> @@ -458,13 +458,13 @@ Promise<[InventoryLevelDTO](../types/InventoryLevelDTO.mdx)[]> ___ -#### createReservationItem +### createReservationItem `**createReservationItem**(input, context?): Promise<[ReservationItemDTO](../types/ReservationItemDTO.mdx)>` This method is used to create a reservation item. -##### Example +#### Example ```ts import { @@ -486,7 +486,7 @@ async function createReservationItem (item: { } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ReservationItemDTO](../types/ReservationItemDTO.mdx)> @@ -527,13 +527,13 @@ Promise<[ReservationItemDTO](../types/ReservationItemDTO.mdx)> ___ -#### createReservationItems +### createReservationItems `**createReservationItems**(input, context?): Promise<[ReservationItemDTO](../types/ReservationItemDTO.mdx)[]>` This method is used to create reservation items. -##### Example +#### Example ```ts import { @@ -555,7 +555,7 @@ async function createReservationItems (items: { } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ReservationItemDTO](../types/ReservationItemDTO.mdx)[]> @@ -596,14 +596,14 @@ Promise<[ReservationItemDTO](../types/ReservationItemDTO.mdx)[]> ___ -#### deleteInventoryItem +### deleteInventoryItem `**deleteInventoryItem**(inventoryItemId, context?): Promise<void>` This method is used to delete an inventory item or multiple inventory items. The inventory items are only soft deleted and can be restored using the [restoreInventoryItem](IInventoryService.mdx#restoreinventoryitem) method. -##### Example +#### Example ```ts import { @@ -621,7 +621,7 @@ async function deleteInventoryItem ( } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -662,13 +662,13 @@ Promise<void> ___ -#### deleteInventoryItemLevelByLocationId +### deleteInventoryItemLevelByLocationId `**deleteInventoryItemLevelByLocationId**(locationId, context?): Promise<void>` This method deletes the inventory item level(s) for the ID(s) of associated location(s). -##### Example +#### Example ```ts import { @@ -686,7 +686,7 @@ async function deleteInventoryItemLevelByLocationId ( } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -727,13 +727,13 @@ Promise<void> ___ -#### deleteInventoryLevel +### deleteInventoryLevel `**deleteInventoryLevel**(inventoryItemId, locationId, context?): Promise<void>` This method is used to delete an inventory level. The inventory level is identified by the IDs of its associated inventory item and location. -##### Example +#### Example ```ts import { @@ -753,7 +753,7 @@ async function deleteInventoryLevel ( } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -803,13 +803,13 @@ Promise<void> ___ -#### deleteReservationItem +### deleteReservationItem `**deleteReservationItem**(reservationItemId, context?): Promise<void>` This method is used to delete a reservation item or multiple reservation items by their IDs. -##### Example +#### Example ```ts import { @@ -827,7 +827,7 @@ async function deleteReservationItems ( } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -868,13 +868,13 @@ Promise<void> ___ -#### deleteReservationItemByLocationId +### deleteReservationItemByLocationId `**deleteReservationItemByLocationId**(locationId, context?): Promise<void>` This method deletes reservation item(s) by the ID(s) of associated location(s). -##### Example +#### Example ```ts import { @@ -892,7 +892,7 @@ async function deleteReservationItemByLocationId ( } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -933,13 +933,13 @@ Promise<void> ___ -#### deleteReservationItemsByLineItem +### deleteReservationItemsByLineItem `**deleteReservationItemsByLineItem**(lineItemId, context?): Promise<void>` This method is used to delete the reservation items associated with a line item or multiple line items. -##### Example +#### Example ```ts import { @@ -957,7 +957,7 @@ async function deleteReservationItemsByLineItem ( } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -998,13 +998,13 @@ Promise<void> ___ -#### listInventoryItems +### listInventoryItems `**listInventoryItems**(selector, config?, context?): Promise<[[InventoryItemDTO](../types/InventoryItemDTO.mdx)[], number]>` This method is used to retrieve a paginated list of inventory items along with the total count of available inventory items satisfying the provided filters. -##### Example +#### Example To retrieve a list of inventory items using their IDs: @@ -1066,7 +1066,7 @@ async function retrieveInventoryItems (ids: string[], skip: number, take: number } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[[InventoryItemDTO](../types/InventoryItemDTO.mdx)[], number]> @@ -1116,13 +1116,13 @@ Promise<[[InventoryItemDTO](../types/InventoryItemDTO.mdx)[], number]> ___ -#### listInventoryLevels +### listInventoryLevels `**listInventoryLevels**(selector, config?, context?): Promise<[[InventoryLevelDTO](../types/InventoryLevelDTO.mdx)[], number]>` This method is used to retrieve a paginated list of inventory levels along with the total count of available inventory levels satisfying the provided filters. -##### Example +#### Example To retrieve a list of inventory levels using their IDs: @@ -1184,7 +1184,7 @@ async function retrieveInventoryLevels (inventoryItemIds: string[], skip: number } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[[InventoryLevelDTO](../types/InventoryLevelDTO.mdx)[], number]> @@ -1234,13 +1234,13 @@ Promise<[[InventoryLevelDTO](../types/InventoryLevelDTO.mdx)[], number]> ___ -#### listReservationItems +### listReservationItems `**listReservationItems**(selector, config?, context?): Promise<[[ReservationItemDTO](../types/ReservationItemDTO.mdx)[], number]>` This method is used to retrieve a paginated list of reservation items along with the total count of available reservation items satisfying the provided filters. -##### Example +#### Example To retrieve a list of reservation items using their IDs: @@ -1302,7 +1302,7 @@ async function retrieveReservationItems (ids: string[], skip: number, take: numb } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[[ReservationItemDTO](../types/ReservationItemDTO.mdx)[], number]> @@ -1352,13 +1352,13 @@ Promise<[[ReservationItemDTO](../types/ReservationItemDTO.mdx)[], number] ___ -#### restoreInventoryItem +### restoreInventoryItem `**restoreInventoryItem**(inventoryItemId, context?): Promise<void>` This method is used to restore an inventory item or multiple inventory items that were previously deleted using the [deleteInventoryItem](IInventoryService.mdx#deleteinventoryitem) method. -##### Example +#### Example ```ts import { @@ -1376,7 +1376,7 @@ async function restoreInventoryItem ( } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -1417,13 +1417,13 @@ Promise<void> ___ -#### retrieveAvailableQuantity +### retrieveAvailableQuantity `**retrieveAvailableQuantity**(inventoryItemId, locationIds, context?): Promise<number>` This method is used to retrieve the available quantity of an inventory item within the specified locations. -##### Example +#### Example ```ts import { @@ -1445,7 +1445,7 @@ async function retrieveAvailableQuantity ( } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<number> @@ -1495,13 +1495,13 @@ Promise<number> ___ -#### retrieveInventoryItem +### retrieveInventoryItem `**retrieveInventoryItem**(inventoryItemId, config?, context?): Promise<[InventoryItemDTO](../types/InventoryItemDTO.mdx)>` This method is used to retrieve an inventory item by its ID -##### Example +#### Example A simple example that retrieves a inventory item by its ID: @@ -1537,7 +1537,7 @@ async function retrieveInventoryItem (id: string) { } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[InventoryItemDTO](../types/InventoryItemDTO.mdx)> @@ -1587,13 +1587,13 @@ Promise<[InventoryItemDTO](../types/InventoryItemDTO.mdx)> ___ -#### retrieveInventoryLevel +### retrieveInventoryLevel `**retrieveInventoryLevel**(inventoryItemId, locationId, context?): Promise<[InventoryLevelDTO](../types/InventoryLevelDTO.mdx)>` This method is used to retrieve an inventory level for an inventory item and a location. -##### Example +#### Example ```ts import { @@ -1615,7 +1615,7 @@ async function retrieveInventoryLevel ( } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[InventoryLevelDTO](../types/InventoryLevelDTO.mdx)> @@ -1665,13 +1665,13 @@ Promise<[InventoryLevelDTO](../types/InventoryLevelDTO.mdx)> ___ -#### retrieveReservationItem +### retrieveReservationItem `**retrieveReservationItem**(reservationId, context?): Promise<[ReservationItemDTO](../types/ReservationItemDTO.mdx)>` This method is used to retrieve a reservation item by its ID. -##### Example +#### Example ```ts import { @@ -1687,7 +1687,7 @@ async function retrieveReservationItem (id: string) { } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ReservationItemDTO](../types/ReservationItemDTO.mdx)> @@ -1728,13 +1728,13 @@ Promise<[ReservationItemDTO](../types/ReservationItemDTO.mdx)> ___ -#### retrieveReservedQuantity +### retrieveReservedQuantity `**retrieveReservedQuantity**(inventoryItemId, locationIds, context?): Promise<number>` This method is used to retrieve the reserved quantity of an inventory item within the specified locations. -##### Example +#### Example ```ts import { @@ -1756,7 +1756,7 @@ async function retrieveReservedQuantity ( } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<number> @@ -1806,13 +1806,13 @@ Promise<number> ___ -#### retrieveStockedQuantity +### retrieveStockedQuantity `**retrieveStockedQuantity**(inventoryItemId, locationIds, context?): Promise<number>` This method is used to retrieve the stocked quantity of an inventory item within the specified locations. -##### Example +#### Example ```ts import { @@ -1834,7 +1834,7 @@ async function retrieveStockedQuantity ( } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<number> @@ -1884,13 +1884,13 @@ Promise<number> ___ -#### updateInventoryItem +### updateInventoryItem `**updateInventoryItem**(inventoryItemId, input, context?): Promise<[InventoryItemDTO](../types/InventoryItemDTO.mdx)>` This method is used to update an inventory item. -##### Example +#### Example ```ts import { @@ -1914,7 +1914,7 @@ async function updateInventoryItem ( } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[InventoryItemDTO](../types/InventoryItemDTO.mdx)> @@ -1964,13 +1964,13 @@ Promise<[InventoryItemDTO](../types/InventoryItemDTO.mdx)> ___ -#### updateInventoryLevel +### updateInventoryLevel `**updateInventoryLevel**(inventoryItemId, locationId, update, context?): Promise<[InventoryLevelDTO](../types/InventoryLevelDTO.mdx)>` This method is used to update an inventory level. The inventory level is identified by the IDs of its associated inventory item and location. -##### Example +#### Example ```ts import { @@ -1996,7 +1996,7 @@ async function updateInventoryLevel ( } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[InventoryLevelDTO](../types/InventoryLevelDTO.mdx)> @@ -2055,13 +2055,13 @@ Promise<[InventoryLevelDTO](../types/InventoryLevelDTO.mdx)> ___ -#### updateInventoryLevels +### updateInventoryLevels `**updateInventoryLevels**(updates, context?): Promise<[InventoryLevelDTO](../types/InventoryLevelDTO.mdx)[]>` This method is used to update inventory levels. Each inventory level is identified by the IDs of its associated inventory item and location. -##### Example +#### Example ```ts import { @@ -2083,7 +2083,7 @@ async function updateInventoryLevels (items: { } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[InventoryLevelDTO](../types/InventoryLevelDTO.mdx)[]> @@ -2124,13 +2124,13 @@ Promise<[InventoryLevelDTO](../types/InventoryLevelDTO.mdx)[]> ___ -#### updateReservationItem +### updateReservationItem `**updateReservationItem**(reservationItemId, input, context?): Promise<[ReservationItemDTO](../types/ReservationItemDTO.mdx)>` This method is used to update a reservation item. -##### Example +#### Example ```ts import { @@ -2154,7 +2154,7 @@ async function updateReservationItem ( } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ReservationItemDTO](../types/ReservationItemDTO.mdx)> diff --git a/www/apps/docs/content/references/services/interfaces/INotificationService.mdx b/www/apps/docs/content/references/services/interfaces/INotificationService.mdx index 8a97bdac99..01fd4f7bbd 100644 --- a/www/apps/docs/content/references/services/interfaces/INotificationService.mdx +++ b/www/apps/docs/content/references/services/interfaces/INotificationService.mdx @@ -56,15 +56,35 @@ import ParameterTypes from "@site/src/components/ParameterTypes" } ]} /> +___ + ## Accessors -#### activeManager\_ +### activeManager\_ - `Protected` **activeManager\_**: [object Object] +`Protected get**activeManager_**(): EntityManager` + +#### Returns + +EntityManager + + + +___ ## Methods -#### atomicPhase\_ +### atomicPhase\_ `Protected **atomicPhase_**(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise<TResult>` @@ -72,7 +92,7 @@ Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. -##### Type Parameters +#### Type Parameters -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<TResult> @@ -145,11 +165,11 @@ Promise<TResult> ___ -#### resendNotification +### resendNotification `**resendNotification**(notification, config, attachmentGenerator): Promise<[ReturnedData](../types/ReturnedData.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ReturnedData](../types/ReturnedData.mdx)> @@ -199,11 +219,11 @@ Promise<[ReturnedData](../types/ReturnedData.mdx)> ___ -#### sendNotification +### sendNotification `**sendNotification**(event, data, attachmentGenerator): Promise<[ReturnedData](../types/ReturnedData.mdx)>` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ReturnedData](../types/ReturnedData.mdx)> @@ -253,11 +273,11 @@ Promise<[ReturnedData](../types/ReturnedData.mdx)> ___ -#### shouldRetryTransaction\_ +### shouldRetryTransaction\_ `Protected **shouldRetryTransaction_**(err): boolean` -##### Parameters +#### Parameters -##### Returns +#### Returns `boolean` @@ -289,11 +309,11 @@ ___ ___ -#### withTransaction +### withTransaction `**withTransaction**(transactionManager?): [INotificationService](INotificationService.mdx)` -##### Parameters +#### Parameters -##### Returns +#### Returns [INotificationService](INotificationService.mdx) diff --git a/www/apps/docs/content/references/services/interfaces/IPriceSelectionStrategy.mdx b/www/apps/docs/content/references/services/interfaces/IPriceSelectionStrategy.mdx index cdc977cc88..7398c36935 100644 --- a/www/apps/docs/content/references/services/interfaces/IPriceSelectionStrategy.mdx +++ b/www/apps/docs/content/references/services/interfaces/IPriceSelectionStrategy.mdx @@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes" ## Methods -#### calculateVariantPrice +### calculateVariantPrice `**calculateVariantPrice**(data, context): Promise<Map<string, [PriceSelectionResult](../types/PriceSelectionResult.mdx)>>` Calculate the original and discount price for a given variant in a set of circumstances described in the context. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<Map<string, [PriceSelectionResult](../types/PriceSelectionResult.mdx)>> @@ -56,13 +56,13 @@ Promise<Map<string, [PriceSelectionResult](../types/PriceSelectionResult ___ -#### onVariantsPricesUpdate +### onVariantsPricesUpdate `**onVariantsPricesUpdate**(variantIds): Promise<void>` Notify price selection strategy that variants prices have been updated. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -94,11 +94,11 @@ Promise<void> ___ -#### withTransaction +### withTransaction `**withTransaction**(transactionManager?): [IPriceSelectionStrategy](IPriceSelectionStrategy.mdx)` -##### Parameters +#### Parameters -##### Returns +#### Returns [IPriceSelectionStrategy](IPriceSelectionStrategy.mdx) diff --git a/www/apps/docs/content/references/services/interfaces/IPricingModuleService.mdx b/www/apps/docs/content/references/services/interfaces/IPricingModuleService.mdx index bba08db426..3542322a19 100644 --- a/www/apps/docs/content/references/services/interfaces/IPricingModuleService.mdx +++ b/www/apps/docs/content/references/services/interfaces/IPricingModuleService.mdx @@ -8,13 +8,13 @@ import ParameterTypes from "@site/src/components/ParameterTypes" ## Methods -#### addPriceListPrices +### addPriceListPrices `**addPriceListPrices**(data, sharedContext?): Promise<[PriceListDTO](PriceListDTO.mdx)[]>` This method is used to add prices to price lists. -##### Example +#### Example ```ts import { @@ -37,7 +37,7 @@ async function addPriceListPrices (items: { } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[PriceListDTO](PriceListDTO.mdx)[]> @@ -78,13 +78,13 @@ Promise<[PriceListDTO](PriceListDTO.mdx)[]> ___ -#### addPrices +### addPrices `**addPrices**(data, sharedContext?): Promise<[PriceSetDTO](PriceSetDTO.mdx)>` This method adds prices to a price set. -##### Example +#### Example To add a default price to a price set, don't pass it any rules and make sure to pass it the `currency_code`: @@ -155,7 +155,7 @@ async function addPricesToPriceSet (priceSetId: string) { } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[PriceSetDTO](PriceSetDTO.mdx)> @@ -198,7 +198,7 @@ Promise<[PriceSetDTO](PriceSetDTO.mdx)> This method adds prices to multiple price sets. -##### Example +#### Example To add a default price to a price set, don't pass it any rules and make sure to pass it the `currency_code`: @@ -269,7 +269,7 @@ async function addPricesToPriceSet (priceSetId: string) { } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[PriceSetDTO](PriceSetDTO.mdx)[]> @@ -310,13 +310,13 @@ Promise<[PriceSetDTO](PriceSetDTO.mdx)[]> ___ -#### addRules +### addRules `**addRules**(data, sharedContext?): Promise<[PriceSetDTO](PriceSetDTO.mdx)>` This method adds rules to a price set. -##### Example +#### Example ```ts import { @@ -337,7 +337,7 @@ async function addRulesToPriceSet (priceSetId: string) { } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[PriceSetDTO](PriceSetDTO.mdx)> @@ -380,7 +380,7 @@ Promise<[PriceSetDTO](PriceSetDTO.mdx)> This method adds rules to multiple price sets. -##### Example +#### Example ```ts import { @@ -401,7 +401,7 @@ async function addRulesToPriceSet (priceSetId: string) { } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[PriceSetDTO](PriceSetDTO.mdx)[]> @@ -442,13 +442,13 @@ Promise<[PriceSetDTO](PriceSetDTO.mdx)[]> ___ -#### calculatePrices +### calculatePrices `**calculatePrices**(filters, context?, sharedContext?): Promise<[CalculatedPriceSet](CalculatedPriceSet.mdx)[]>` This method is used to calculate prices based on the provided filters and context. -##### Example +#### Example When you calculate prices, you must at least specify the currency code: @@ -518,7 +518,7 @@ async function calculatePrice (priceSetId: string, currencyCode: string) { } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[CalculatedPriceSet](CalculatedPriceSet.mdx)[]> @@ -568,13 +568,13 @@ Promise<[CalculatedPriceSet](CalculatedPriceSet.mdx)[]> ___ -#### create +### create `**create**(data, sharedContext?): Promise<[PriceSetDTO](PriceSetDTO.mdx)>` This method is used to create a new price set. -##### Example +#### Example To create a default price set, don't pass any rules. For example: @@ -648,7 +648,7 @@ async function createPriceSet() { } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[PriceSetDTO](PriceSetDTO.mdx)> @@ -691,7 +691,7 @@ Promise<[PriceSetDTO](PriceSetDTO.mdx)> This method is used to create multiple price sets. -##### Example +#### Example To create price sets with a default price, don't pass any rules and make sure to pass the `currency_code` of the price. For example: @@ -762,7 +762,7 @@ async function createPriceSets() { } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[PriceSetDTO](PriceSetDTO.mdx)[]> @@ -803,13 +803,13 @@ Promise<[PriceSetDTO](PriceSetDTO.mdx)[]> ___ -#### createCurrencies +### createCurrencies `**createCurrencies**(data, sharedContext?): Promise<[CurrencyDTO](CurrencyDTO.mdx)[]>` This method is used to create new currencies. -##### Example +#### Example ```ts import { initialize as initializePricingModule } from "@medusajs/pricing" @@ -830,7 +830,7 @@ async function createCurrencies() { } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[CurrencyDTO](CurrencyDTO.mdx)[]> @@ -871,13 +871,13 @@ Promise<[CurrencyDTO](CurrencyDTO.mdx)[]> ___ -#### createMoneyAmounts +### createMoneyAmounts `**createMoneyAmounts**(data, sharedContext?): Promise<[MoneyAmountDTO](MoneyAmountDTO.mdx)[]>` This method creates money amounts. -##### Example +#### Example ```ts import { initialize as initializePricingModule } from "@medusajs/pricing" @@ -902,7 +902,7 @@ async function retrieveMoneyAmounts() { } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[MoneyAmountDTO](MoneyAmountDTO.mdx)[]> @@ -943,13 +943,13 @@ Promise<[MoneyAmountDTO](MoneyAmountDTO.mdx)[]> ___ -#### createPriceListRules +### createPriceListRules `**createPriceListRules**(data, sharedContext?): Promise<[PriceListRuleDTO](PriceListRuleDTO.mdx)[]>` This method is used to create price list rules. -##### Example +#### Example ```ts import { @@ -968,7 +968,7 @@ async function createPriceListRules (items: { } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[PriceListRuleDTO](PriceListRuleDTO.mdx)[]> @@ -1009,13 +1009,13 @@ Promise<[PriceListRuleDTO](PriceListRuleDTO.mdx)[]> ___ -#### createPriceLists +### createPriceLists `**createPriceLists**(data, sharedContext?): Promise<[PriceListDTO](PriceListDTO.mdx)[]>` This method is used to create price lists. -##### Example +#### Example ```ts import { @@ -1036,7 +1036,7 @@ async function createPriceList (items: { } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[PriceListDTO](PriceListDTO.mdx)[]> @@ -1077,13 +1077,13 @@ Promise<[PriceListDTO](PriceListDTO.mdx)[]> ___ -#### createPriceRules +### createPriceRules `**createPriceRules**(data, sharedContext?): Promise<[PriceRuleDTO](PriceRuleDTO.mdx)[]>` This method is used to create new price rules based on the provided data. -##### Example +#### Example ```ts import { @@ -1115,7 +1115,7 @@ async function createPriceRules ( } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[PriceRuleDTO](PriceRuleDTO.mdx)[]> @@ -1156,14 +1156,14 @@ Promise<[PriceRuleDTO](PriceRuleDTO.mdx)[]> ___ -#### createPriceSetMoneyAmountRules +### createPriceSetMoneyAmountRules `**createPriceSetMoneyAmountRules**(data, sharedContext?): Promise<[PriceSetMoneyAmountRulesDTO](PriceSetMoneyAmountRulesDTO.mdx)[]>` This method is used to create new price set money amount rules. A price set money amount rule creates an association between a price set money amount and a rule type. -##### Example +#### Example ```ts import { @@ -1185,7 +1185,7 @@ async function createPriceSetMoneyAmountRules (priceSetMoneyAmountId: string, ru } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[PriceSetMoneyAmountRulesDTO](PriceSetMoneyAmountRulesDTO.mdx)[]> @@ -1226,13 +1226,13 @@ Promise<[PriceSetMoneyAmountRulesDTO](PriceSetMoneyAmountRulesDTO.mdx)[]> ___ -#### createRuleTypes +### createRuleTypes `**createRuleTypes**(data, sharedContext?): Promise<[RuleTypeDTO](RuleTypeDTO.mdx)[]>` This method is used to create new rule types. -##### Example +#### Example ```ts import { initialize as initializePricingModule } from "@medusajs/pricing" @@ -1251,7 +1251,7 @@ async function createRuleTypes() { } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[RuleTypeDTO](RuleTypeDTO.mdx)[]> @@ -1292,13 +1292,13 @@ Promise<[RuleTypeDTO](RuleTypeDTO.mdx)[]> ___ -#### delete +### delete `**delete**(ids, sharedContext?): Promise<void>` This method deletes price sets by their IDs. -##### Example +#### Example ```ts import { @@ -1312,7 +1312,7 @@ async function removePriceSetRule (priceSetIds: string[]) { } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -1353,13 +1353,13 @@ Promise<void> ___ -#### deleteCurrencies +### deleteCurrencies `**deleteCurrencies**(currencyCodes, sharedContext?): Promise<void>` This method is used to delete currencies based on their currency code. -##### Example +#### Example ```ts import { initialize as initializePricingModule } from "@medusajs/pricing" @@ -1371,7 +1371,7 @@ async function deleteCurrencies() { } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -1412,13 +1412,13 @@ Promise<void> ___ -#### deleteMoneyAmounts +### deleteMoneyAmounts `**deleteMoneyAmounts**(ids, sharedContext?): Promise<void>` This method deletes money amounts by their IDs. -##### Example +#### Example ```ts import { @@ -1434,7 +1434,7 @@ async function deleteMoneyAmounts (moneyAmountIds: string[]) { } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -1475,13 +1475,13 @@ Promise<void> ___ -#### deletePriceListRules +### deletePriceListRules `**deletePriceListRules**(priceListRuleIds, sharedContext?): Promise<void>` This method is used to delete price list rules. -##### Example +#### Example ```ts import { @@ -1495,7 +1495,7 @@ async function deletePriceListRules (priceListRuleIds: string[]) { } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -1536,13 +1536,13 @@ Promise<void> ___ -#### deletePriceLists +### deletePriceLists `**deletePriceLists**(priceListIds, sharedContext?): Promise<void>` This method is used to delete price lists. -##### Example +#### Example ```ts import { @@ -1556,7 +1556,7 @@ async function deletePriceLists (ids: string[]) { } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -1597,13 +1597,13 @@ Promise<void> ___ -#### deletePriceRules +### deletePriceRules `**deletePriceRules**(priceRuleIds, sharedContext?): Promise<void>` This method is used to delete price rules based on the specified IDs. -##### Example +#### Example ```ts import { @@ -1619,7 +1619,7 @@ async function deletePriceRules ( } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -1660,13 +1660,13 @@ Promise<void> ___ -#### deletePriceSetMoneyAmountRules +### deletePriceSetMoneyAmountRules `**deletePriceSetMoneyAmountRules**(ids, sharedContext?): Promise<void>` This method is used to delete price set money amount rules based on the specified IDs. -##### Example +#### Example ```ts import { @@ -1680,7 +1680,7 @@ async function deletePriceSetMoneyAmountRule (id: string) { } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -1721,13 +1721,13 @@ Promise<void> ___ -#### deleteRuleTypes +### deleteRuleTypes `**deleteRuleTypes**(ruleTypeIds, sharedContext?): Promise<void>` This method is used to delete rule types based on the provided IDs. -##### Example +#### Example ```ts import { @@ -1741,7 +1741,7 @@ async function deleteRuleTypes (ruleTypeId: string) { } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -1782,13 +1782,13 @@ Promise<void> ___ -#### list +### list `**list**(filters?, config?, sharedContext?): Promise<[PriceSetDTO](PriceSetDTO.mdx)[]>` This method is used to retrieve a paginated list of price sets based on optional filters and configuration. -##### Example +#### Example To retrieve a list of price sets using their IDs: @@ -1892,7 +1892,7 @@ async function retrievePriceSets (priceSetIds: string[], moneyAmountIds: string[ } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[PriceSetDTO](PriceSetDTO.mdx)[]> @@ -1942,13 +1942,13 @@ Promise<[PriceSetDTO](PriceSetDTO.mdx)[]> ___ -#### listAndCount +### listAndCount `**listAndCount**(filters?, config?, sharedContext?): Promise<[[PriceSetDTO](PriceSetDTO.mdx)[], number]>` This method is used to retrieve a paginated list of price sets along with the total count of available price sets satisfying the provided filters. -##### Example +#### Example To retrieve a list of prices sets using their IDs: @@ -2052,7 +2052,7 @@ async function retrievePriceSets (priceSetIds: string[], moneyAmountIds: string[ } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[[PriceSetDTO](PriceSetDTO.mdx)[], number]> @@ -2102,13 +2102,13 @@ Promise<[[PriceSetDTO](PriceSetDTO.mdx)[], number]> ___ -#### listAndCountCurrencies +### listAndCountCurrencies `**listAndCountCurrencies**(filters?, config?, sharedContext?): Promise<[[CurrencyDTO](CurrencyDTO.mdx)[], number]>` This method is used to retrieve a paginated list of currencies along with the total count of available currencies satisfying the provided filters. -##### Example +#### Example To retrieve a list of currencies using their codes: @@ -2178,7 +2178,7 @@ async function retrieveCurrencies (codes: string[], skip: number, take: number) } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[[CurrencyDTO](CurrencyDTO.mdx)[], number]> @@ -2228,13 +2228,13 @@ Promise<[[CurrencyDTO](CurrencyDTO.mdx)[], number]> ___ -#### listAndCountMoneyAmounts +### listAndCountMoneyAmounts `**listAndCountMoneyAmounts**(filters?, config?, sharedContext?): Promise<[[MoneyAmountDTO](MoneyAmountDTO.mdx)[], number]>` This method is used to retrieve a paginated list of money amounts along with the total count of available money amounts satisfying the provided filters. -##### Example +#### Example To retrieve a list of money amounts using their IDs: @@ -2336,7 +2336,7 @@ async function retrieveMoneyAmounts (moneyAmountIds: string[], currencyCode: str } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[[MoneyAmountDTO](MoneyAmountDTO.mdx)[], number]> @@ -2386,13 +2386,13 @@ Promise<[[MoneyAmountDTO](MoneyAmountDTO.mdx)[], number]> ___ -#### listAndCountPriceListRules +### listAndCountPriceListRules `**listAndCountPriceListRules**(filters?, config?, sharedContext?): Promise<[[PriceListRuleDTO](PriceListRuleDTO.mdx)[], number]>` This method is used to retrieve a paginated list of price list ruless along with the total count of available price list ruless satisfying the provided filters. -##### Example +#### Example To retrieve a list of price list vs using their IDs: @@ -2494,7 +2494,7 @@ async function listAndCountPriceListRules (priceListRuleIds: string[], ruleTypeI } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[[PriceListRuleDTO](PriceListRuleDTO.mdx)[], number]> @@ -2544,13 +2544,13 @@ Promise<[[PriceListRuleDTO](PriceListRuleDTO.mdx)[], number]> ___ -#### listAndCountPriceLists +### listAndCountPriceLists `**listAndCountPriceLists**(filters?, config?, sharedContext?): Promise<[[PriceListDTO](PriceListDTO.mdx)[], number]>` This method is used to retrieve a paginated list of price lists along with the total count of available price lists satisfying the provided filters. -##### Example +#### Example To retrieve a list of price lists using their IDs: @@ -2652,7 +2652,7 @@ async function retrievePriceLists (priceListIds: string[], titles: string[], ski } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[[PriceListDTO](PriceListDTO.mdx)[], number]> @@ -2702,13 +2702,13 @@ Promise<[[PriceListDTO](PriceListDTO.mdx)[], number]> ___ -#### listAndCountPriceRules +### listAndCountPriceRules `**listAndCountPriceRules**(filters?, config?, sharedContext?): Promise<[[PriceRuleDTO](PriceRuleDTO.mdx)[], number]>` This method is used to retrieve a paginated list of price rules along with the total count of available price rules satisfying the provided filters. -##### Example +#### Example To retrieve a list of price rules using their IDs: @@ -2799,7 +2799,7 @@ async function retrievePriceRules (ids: string[], name: string[], skip: number, } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[[PriceRuleDTO](PriceRuleDTO.mdx)[], number]> @@ -2849,14 +2849,14 @@ Promise<[[PriceRuleDTO](PriceRuleDTO.mdx)[], number]> ___ -#### listAndCountPriceSetMoneyAmountRules +### listAndCountPriceSetMoneyAmountRules `**listAndCountPriceSetMoneyAmountRules**(filters?, config?, sharedContext?): Promise<[[PriceSetMoneyAmountRulesDTO](PriceSetMoneyAmountRulesDTO.mdx)[], number]>` This method is used to retrieve a paginated list of price set money amount rules along with the total count of available price set money amount rules satisfying the provided filters. -##### Example +#### Example To retrieve a list of price set money amounts using their IDs: @@ -2947,7 +2947,7 @@ async function retrievePriceSetMoneyAmountRules (ids: string[], ruleTypeId: stri } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[[PriceSetMoneyAmountRulesDTO](PriceSetMoneyAmountRulesDTO.mdx)[], number]> @@ -2997,14 +2997,14 @@ Promise<[[PriceSetMoneyAmountRulesDTO](PriceSetMoneyAmountRulesDTO.mdx)[], n ___ -#### listAndCountPriceSetMoneyAmounts +### listAndCountPriceSetMoneyAmounts `**listAndCountPriceSetMoneyAmounts**(filters?, config?, sharedContext?): Promise<[[PriceSetMoneyAmountDTO](PriceSetMoneyAmountDTO.mdx)[], number]>` This method is used to retrieve a paginated list of price set money amounts along with the total count of available price set money amounts satisfying the provided filters. -##### Example +#### Example To retrieve a list of price set money amounts using their IDs: @@ -3095,7 +3095,7 @@ async function retrievePriceSetMoneyAmounts (ids: string[], titles: string[], sk } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[[PriceSetMoneyAmountDTO](PriceSetMoneyAmountDTO.mdx)[], number]> @@ -3145,13 +3145,13 @@ Promise<[[PriceSetMoneyAmountDTO](PriceSetMoneyAmountDTO.mdx)[], number]> ___ -#### listAndCountRuleTypes +### listAndCountRuleTypes `**listAndCountRuleTypes**(filters?, config?, sharedContext?): Promise<[[RuleTypeDTO](RuleTypeDTO.mdx)[], number]>` This method is used to retrieve a paginated list of rule types along with the total count of available rule types satisfying the provided filters. -##### Example +#### Example To retrieve a list of rule types using their IDs: @@ -3248,7 +3248,7 @@ async function retrieveRuleTypes (ruleTypeId: string[], name: string[], skip: nu } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[[RuleTypeDTO](RuleTypeDTO.mdx)[], number]> @@ -3298,13 +3298,13 @@ Promise<[[RuleTypeDTO](RuleTypeDTO.mdx)[], number]> ___ -#### listCurrencies +### listCurrencies `**listCurrencies**(filters?, config?, sharedContext?): Promise<[CurrencyDTO](CurrencyDTO.mdx)[]>` This method is used to retrieve a paginated list of currencies based on optional filters and configuration. -##### Example +#### Example To retrieve a list of currencies using their codes: @@ -3374,7 +3374,7 @@ async function retrieveCurrencies (codes: string[], skip: number, take: number) } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[CurrencyDTO](CurrencyDTO.mdx)[]> @@ -3424,13 +3424,13 @@ Promise<[CurrencyDTO](CurrencyDTO.mdx)[]> ___ -#### listMoneyAmounts +### listMoneyAmounts `**listMoneyAmounts**(filters?, config?, sharedContext?): Promise<[MoneyAmountDTO](MoneyAmountDTO.mdx)[]>` This method is used to retrieve a paginated list of money amounts based on optional filters and configuration. -##### Example +#### Example To retrieve a list of money amounts using their IDs: @@ -3532,7 +3532,7 @@ async function retrieveMoneyAmounts (moneyAmountIds: string[], currencyCode: str } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[MoneyAmountDTO](MoneyAmountDTO.mdx)[]> @@ -3582,13 +3582,13 @@ Promise<[MoneyAmountDTO](MoneyAmountDTO.mdx)[]> ___ -#### listPriceListRules +### listPriceListRules `**listPriceListRules**(filters?, config?, sharedContext?): Promise<[PriceListRuleDTO](PriceListRuleDTO.mdx)[]>` This method is used to retrieve a paginated list of price list rules based on optional filters and configuration. -##### Example +#### Example To retrieve a list of price list vs using their IDs: @@ -3690,7 +3690,7 @@ async function listPriceListRules (priceListRuleIds: string[], ruleTypeIDs: stri } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[PriceListRuleDTO](PriceListRuleDTO.mdx)[]> @@ -3740,13 +3740,13 @@ Promise<[PriceListRuleDTO](PriceListRuleDTO.mdx)[]> ___ -#### listPriceLists +### listPriceLists `**listPriceLists**(filters?, config?, sharedContext?): Promise<[PriceListDTO](PriceListDTO.mdx)[]>` This method is used to retrieve a paginated list of price lists based on optional filters and configuration. -##### Example +#### Example To retrieve a list of price lists using their IDs: @@ -3848,7 +3848,7 @@ async function listPriceLists (priceListIds: string[], titles: string[], skip: n } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[PriceListDTO](PriceListDTO.mdx)[]> @@ -3898,13 +3898,13 @@ Promise<[PriceListDTO](PriceListDTO.mdx)[]> ___ -#### listPriceRules +### listPriceRules `**listPriceRules**(filters?, config?, sharedContext?): Promise<[PriceRuleDTO](PriceRuleDTO.mdx)[]>` This method is used to retrieve a paginated list of price rules based on optional filters and configuration. -##### Example +#### Example To retrieve a list of price rules using their IDs: @@ -3995,7 +3995,7 @@ async function retrievePriceRules (ids: string[], name: string[], skip: number, } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[PriceRuleDTO](PriceRuleDTO.mdx)[]> @@ -4045,13 +4045,13 @@ Promise<[PriceRuleDTO](PriceRuleDTO.mdx)[]> ___ -#### listPriceSetMoneyAmountRules +### listPriceSetMoneyAmountRules `**listPriceSetMoneyAmountRules**(filters?, config?, sharedContext?): Promise<[PriceSetMoneyAmountRulesDTO](PriceSetMoneyAmountRulesDTO.mdx)[]>` This method is used to retrieve a paginated list of price set money amount rules based on optional filters and configuration. -##### Example +#### Example To retrieve a list of price set money amount rules using their IDs: @@ -4142,7 +4142,7 @@ async function retrievePriceSetMoneyAmountRules (ids: string[], ruleTypeId: stri } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[PriceSetMoneyAmountRulesDTO](PriceSetMoneyAmountRulesDTO.mdx)[]> @@ -4192,13 +4192,13 @@ Promise<[PriceSetMoneyAmountRulesDTO](PriceSetMoneyAmountRulesDTO.mdx)[]> ___ -#### listPriceSetMoneyAmounts +### listPriceSetMoneyAmounts `**listPriceSetMoneyAmounts**(filters?, config?, sharedContext?): Promise<[PriceSetMoneyAmountDTO](PriceSetMoneyAmountDTO.mdx)[]>` This method is used to retrieve a paginated list of price set money amounts based on optional filters and configuration. -##### Example +#### Example To retrieve a list of price set money amounts using their IDs: @@ -4289,7 +4289,7 @@ async function retrievePriceSetMoneyAmounts (ids: string[], titles: string[], sk } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[PriceSetMoneyAmountDTO](PriceSetMoneyAmountDTO.mdx)[]> @@ -4339,13 +4339,13 @@ Promise<[PriceSetMoneyAmountDTO](PriceSetMoneyAmountDTO.mdx)[]> ___ -#### listRuleTypes +### listRuleTypes `**listRuleTypes**(filters?, config?, sharedContext?): Promise<[RuleTypeDTO](RuleTypeDTO.mdx)[]>` This method is used to retrieve a paginated list of rule types based on optional filters and configuration. -##### Example +#### Example To retrieve a list of rule types using their IDs: @@ -4442,7 +4442,7 @@ async function retrieveRuleTypes (ruleTypeId: string[], name: string[], skip: nu } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[RuleTypeDTO](RuleTypeDTO.mdx)[]> @@ -4492,13 +4492,13 @@ Promise<[RuleTypeDTO](RuleTypeDTO.mdx)[]> ___ -#### removePriceListRules +### removePriceListRules `**removePriceListRules**(data, sharedContext?): Promise<[PriceListDTO](PriceListDTO.mdx)>` This method is used to remove rules from a price list. -##### Example +#### Example ```ts import { @@ -4517,7 +4517,7 @@ async function setPriceListRules (priceListId: string) { } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[PriceListDTO](PriceListDTO.mdx)> @@ -4558,13 +4558,13 @@ Promise<[PriceListDTO](PriceListDTO.mdx)> ___ -#### removeRules +### removeRules `**removeRules**(data, sharedContext?): Promise<void>` This method remove rules from a price set. -##### Example +#### Example ```ts import { @@ -4583,7 +4583,7 @@ async function removePriceSetRule (priceSetId: string, ruleAttributes: []) { } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -4624,13 +4624,13 @@ Promise<void> ___ -#### retrieve +### retrieve `**retrieve**(id, config?, sharedContext?): Promise<[PriceSetDTO](PriceSetDTO.mdx)>` This method is used to retrieve a price set by its ID. -##### Example +#### Example A simple example that retrieves a price set by its ID: @@ -4671,7 +4671,7 @@ async function retrievePriceSet (priceSetId: string) { } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[PriceSetDTO](PriceSetDTO.mdx)> @@ -4721,13 +4721,13 @@ Promise<[PriceSetDTO](PriceSetDTO.mdx)> ___ -#### retrieveCurrency +### retrieveCurrency `**retrieveCurrency**(code, config?, sharedContext?): Promise<[CurrencyDTO](CurrencyDTO.mdx)>` This method retrieves a currency by its code and and optionally based on the provided configurations. -##### Example +#### Example A simple example that retrieves a currency by its code: @@ -4768,7 +4768,7 @@ async function retrieveCurrency (code: string) { } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[CurrencyDTO](CurrencyDTO.mdx)> @@ -4818,13 +4818,13 @@ Promise<[CurrencyDTO](CurrencyDTO.mdx)> ___ -#### retrieveMoneyAmount +### retrieveMoneyAmount `**retrieveMoneyAmount**(id, config?, sharedContext?): Promise<[MoneyAmountDTO](MoneyAmountDTO.mdx)>` This method retrieves a money amount by its ID. -##### Example +#### Example To retrieve a money amount by its ID: @@ -4865,7 +4865,7 @@ async function retrieveMoneyAmount (moneyAmountId: string) { } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[MoneyAmountDTO](MoneyAmountDTO.mdx)> @@ -4915,13 +4915,13 @@ Promise<[MoneyAmountDTO](MoneyAmountDTO.mdx)> ___ -#### retrievePriceList +### retrievePriceList `**retrievePriceList**(id, config?, sharedContext?): Promise<[PriceListDTO](PriceListDTO.mdx)>` This method is used to retrieve a price list by its ID. -##### Example +#### Example A simple example that retrieves a price list by its ID: @@ -4962,7 +4962,7 @@ async function retrievePriceList (priceListId: string) { } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[PriceListDTO](PriceListDTO.mdx)> @@ -5012,13 +5012,13 @@ Promise<[PriceListDTO](PriceListDTO.mdx)> ___ -#### retrievePriceListRule +### retrievePriceListRule `**retrievePriceListRule**(id, config?, sharedContext?): Promise<[PriceListRuleDTO](PriceListRuleDTO.mdx)>` This method is used to retrieve a price list rule by its ID. -##### Example +#### Example A simple example that retrieves a price list rule by its ID: @@ -5059,7 +5059,7 @@ async function retrievePriceListRule (priceListRuleId: string) { } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[PriceListRuleDTO](PriceListRuleDTO.mdx)> @@ -5109,13 +5109,13 @@ Promise<[PriceListRuleDTO](PriceListRuleDTO.mdx)> ___ -#### retrievePriceRule +### retrievePriceRule `**retrievePriceRule**(id, config?, sharedContext?): Promise<[PriceRuleDTO](PriceRuleDTO.mdx)>` This method is used to retrieve a price rule by its ID. -##### Example +#### Example A simple example that retrieves a price rule by its ID: @@ -5151,7 +5151,7 @@ async function retrievePriceRule (id: string) { } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[PriceRuleDTO](PriceRuleDTO.mdx)> @@ -5201,13 +5201,13 @@ Promise<[PriceRuleDTO](PriceRuleDTO.mdx)> ___ -#### retrievePriceSetMoneyAmountRules +### retrievePriceSetMoneyAmountRules `**retrievePriceSetMoneyAmountRules**(id, config?, sharedContext?): Promise<[PriceSetMoneyAmountRulesDTO](PriceSetMoneyAmountRulesDTO.mdx)>` This method is used to a price set money amount rule by its ID based on the provided configuration. -##### Example +#### Example A simple example that retrieves a price set money amount rule by its ID: @@ -5243,7 +5243,7 @@ async function retrievePriceSetMoneyAmountRule (id: string) { } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[PriceSetMoneyAmountRulesDTO](PriceSetMoneyAmountRulesDTO.mdx)> @@ -5293,13 +5293,13 @@ Promise<[PriceSetMoneyAmountRulesDTO](PriceSetMoneyAmountRulesDTO.mdx)> ___ -#### retrieveRuleType +### retrieveRuleType `**retrieveRuleType**(id, config?, sharedContext?): Promise<[RuleTypeDTO](RuleTypeDTO.mdx)>` This method is used to retrieve a rule type by its ID and and optionally based on the provided configurations. -##### Example +#### Example A simple example that retrieves a rule type by its code: @@ -5335,7 +5335,7 @@ async function retrieveRuleType (ruleTypeId: string) { } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[RuleTypeDTO](RuleTypeDTO.mdx)> @@ -5385,13 +5385,13 @@ Promise<[RuleTypeDTO](RuleTypeDTO.mdx)> ___ -#### setPriceListRules +### setPriceListRules `**setPriceListRules**(data, sharedContext?): Promise<[PriceListDTO](PriceListDTO.mdx)>` This method is used to set the rules of a price list. -##### Example +#### Example ```ts import { @@ -5412,7 +5412,7 @@ async function setPriceListRules (priceListId: string) { } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[PriceListDTO](PriceListDTO.mdx)> @@ -5453,13 +5453,13 @@ Promise<[PriceListDTO](PriceListDTO.mdx)> ___ -#### updateCurrencies +### updateCurrencies `**updateCurrencies**(data, sharedContext?): Promise<[CurrencyDTO](CurrencyDTO.mdx)[]>` This method is used to update existing currencies with the provided data. In each currency object, the currency code must be provided to identify which currency to update. -##### Example +#### Example ```ts import { initialize as initializePricingModule } from "@medusajs/pricing" @@ -5478,7 +5478,7 @@ async function updateCurrencies() { } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[CurrencyDTO](CurrencyDTO.mdx)[]> @@ -5519,13 +5519,13 @@ Promise<[CurrencyDTO](CurrencyDTO.mdx)[]> ___ -#### updateMoneyAmounts +### updateMoneyAmounts `**updateMoneyAmounts**(data, sharedContext?): Promise<[MoneyAmountDTO](MoneyAmountDTO.mdx)[]>` This method updates existing money amounts. -##### Example +#### Example ```ts import { @@ -5546,7 +5546,7 @@ async function updateMoneyAmounts (moneyAmountId: string, amount: number) { } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[MoneyAmountDTO](MoneyAmountDTO.mdx)[]> @@ -5587,13 +5587,13 @@ Promise<[MoneyAmountDTO](MoneyAmountDTO.mdx)[]> ___ -#### updatePriceListRules +### updatePriceListRules `**updatePriceListRules**(data, sharedContext?): Promise<[PriceListRuleDTO](PriceListRuleDTO.mdx)[]>` This method is used to update price list rules. -##### Example +#### Example ```ts import { @@ -5613,7 +5613,7 @@ async function updatePriceListRules (items: { } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[PriceListRuleDTO](PriceListRuleDTO.mdx)[]> @@ -5654,13 +5654,13 @@ Promise<[PriceListRuleDTO](PriceListRuleDTO.mdx)[]> ___ -#### updatePriceLists +### updatePriceLists `**updatePriceLists**(data, sharedContext?): Promise<[PriceListDTO](PriceListDTO.mdx)[]>` This method is used to update price lists. -##### Example +#### Example ```ts import { @@ -5682,7 +5682,7 @@ async function updatePriceLists (items: { } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[PriceListDTO](PriceListDTO.mdx)[]> @@ -5723,13 +5723,13 @@ Promise<[PriceListDTO](PriceListDTO.mdx)[]> ___ -#### updatePriceRules +### updatePriceRules `**updatePriceRules**(data, sharedContext?): Promise<[PriceRuleDTO](PriceRuleDTO.mdx)[]>` This method is used to update price rules, each with their provided data. -##### Example +#### Example ```ts import { @@ -5753,7 +5753,7 @@ async function updatePriceRules ( } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[PriceRuleDTO](PriceRuleDTO.mdx)[]> @@ -5794,13 +5794,13 @@ Promise<[PriceRuleDTO](PriceRuleDTO.mdx)[]> ___ -#### updatePriceSetMoneyAmountRules +### updatePriceSetMoneyAmountRules `**updatePriceSetMoneyAmountRules**(data, sharedContext?): Promise<[PriceSetMoneyAmountRulesDTO](PriceSetMoneyAmountRulesDTO.mdx)[]>` This method is used to update price set money amount rules, each with their provided data. -##### Example +#### Example ```ts import { @@ -5821,7 +5821,7 @@ async function updatePriceSetMoneyAmountRules (id: string, value: string) { } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[PriceSetMoneyAmountRulesDTO](PriceSetMoneyAmountRulesDTO.mdx)[]> @@ -5862,13 +5862,13 @@ Promise<[PriceSetMoneyAmountRulesDTO](PriceSetMoneyAmountRulesDTO.mdx)[]> ___ -#### updateRuleTypes +### updateRuleTypes `**updateRuleTypes**(data, sharedContext?): Promise<[RuleTypeDTO](RuleTypeDTO.mdx)[]>` This method is used to update existing rule types with the provided data. -##### Example +#### Example ```ts import { @@ -5889,7 +5889,7 @@ async function updateRuleTypes (ruleTypeId: string) { } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[RuleTypeDTO](RuleTypeDTO.mdx)[]> diff --git a/www/apps/docs/content/references/services/interfaces/ISearchService.mdx b/www/apps/docs/content/references/services/interfaces/ISearchService.mdx index a45c2e7557..19147817c0 100644 --- a/www/apps/docs/content/references/services/interfaces/ISearchService.mdx +++ b/www/apps/docs/content/references/services/interfaces/ISearchService.mdx @@ -20,15 +20,17 @@ import ParameterTypes from "@site/src/components/ParameterTypes" } ]} /> +___ + ## Methods -#### addDocuments +### addDocuments `**addDocuments**(indexName, documents, type): unknown` Used to index documents by the search engine provider -##### Parameters +#### Parameters -##### Returns +#### Returns `unknown` @@ -78,13 +80,13 @@ Used to index documents by the search engine provider ___ -#### createIndex +### createIndex `**createIndex**(indexName, options): unknown` Used to create an index -##### Parameters +#### Parameters -##### Returns +#### Returns `unknown` @@ -125,13 +127,13 @@ Used to create an index ___ -#### deleteAllDocuments +### deleteAllDocuments `**deleteAllDocuments**(indexName): unknown` Used to delete all documents -##### Parameters +#### Parameters -##### Returns +#### Returns `unknown` @@ -163,13 +165,13 @@ Used to delete all documents ___ -#### deleteDocument +### deleteDocument `**deleteDocument**(indexName, document_id): unknown` Used to delete document -##### Parameters +#### Parameters -##### Returns +#### Returns `unknown` @@ -210,13 +212,13 @@ Used to delete document ___ -#### getIndex +### getIndex `**getIndex**(indexName): unknown` Used to get an index -##### Parameters +#### Parameters -##### Returns +#### Returns `unknown` @@ -248,13 +250,13 @@ Used to get an index ___ -#### replaceDocuments +### replaceDocuments `**replaceDocuments**(indexName, documents, type): unknown` Used to replace documents -##### Parameters +#### Parameters -##### Returns +#### Returns `unknown` @@ -304,13 +306,13 @@ Used to replace documents ___ -#### search +### search `**search**(indexName, query, options): unknown` Used to search for a document in an index -##### Parameters +#### Parameters -##### Returns +#### Returns `unknown` @@ -360,13 +362,13 @@ Used to search for a document in an index ___ -#### updateSettings +### updateSettings `**updateSettings**(indexName, settings): unknown` Used to update the settings of an index -##### Parameters +#### Parameters -##### Returns +#### Returns `unknown` diff --git a/www/apps/docs/content/references/services/interfaces/IStockLocationService.mdx b/www/apps/docs/content/references/services/interfaces/IStockLocationService.mdx index 87797b796c..78f08d379d 100644 --- a/www/apps/docs/content/references/services/interfaces/IStockLocationService.mdx +++ b/www/apps/docs/content/references/services/interfaces/IStockLocationService.mdx @@ -8,13 +8,13 @@ import ParameterTypes from "@site/src/components/ParameterTypes" ## Methods -#### create +### create `**create**(input, context?): Promise<[StockLocationDTO](../types/StockLocationDTO.mdx)>` This method is used to create a stock location. -##### Example +#### Example ```ts import { @@ -32,7 +32,7 @@ async function createStockLocation (name: string) { } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[StockLocationDTO](../types/StockLocationDTO.mdx)> @@ -73,13 +73,13 @@ Promise<[StockLocationDTO](../types/StockLocationDTO.mdx)> ___ -#### delete +### delete `**delete**(id, context?): Promise<void>` This method is used to delete a stock location. -##### Example +#### Example ```ts import { @@ -93,7 +93,7 @@ async function deleteStockLocation (id:string) { } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void> @@ -134,13 +134,13 @@ Promise<void> ___ -#### list +### list `**list**(selector, config?, context?): Promise<[StockLocationDTO](../types/StockLocationDTO.mdx)[]>` This method is used to retrieve a paginated list of stock locations based on optional filters and configuration. -##### Example +#### Example To retrieve a list of stock locations using their IDs: @@ -202,7 +202,7 @@ async function listStockLocations (ids: string[], skip: number, take: number) { } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[StockLocationDTO](../types/StockLocationDTO.mdx)[]> @@ -252,13 +252,13 @@ Promise<[StockLocationDTO](../types/StockLocationDTO.mdx)[]> ___ -#### listAndCount +### listAndCount `**listAndCount**(selector, config?, context?): Promise<[[StockLocationDTO](../types/StockLocationDTO.mdx)[], number]>` This method is used to retrieve a paginated list of stock locations along with the total count of available stock locations satisfying the provided filters. -##### Example +#### Example To retrieve a list of stock locations using their IDs: @@ -320,7 +320,7 @@ async function listStockLocations (ids: string[], skip: number, take: number) { } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[[StockLocationDTO](../types/StockLocationDTO.mdx)[], number]> @@ -370,13 +370,13 @@ Promise<[[StockLocationDTO](../types/StockLocationDTO.mdx)[], number]> ___ -#### retrieve +### retrieve `**retrieve**(id, config?, context?): Promise<[StockLocationDTO](../types/StockLocationDTO.mdx)>` This method is used to retrieve a stock location by its ID -##### Example +#### Example A simple example that retrieves a inventory item by its ID: @@ -412,7 +412,7 @@ async function retrieveStockLocation (id: string) { } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[StockLocationDTO](../types/StockLocationDTO.mdx)> @@ -462,13 +462,13 @@ Promise<[StockLocationDTO](../types/StockLocationDTO.mdx)> ___ -#### update +### update `**update**(id, input, context?): Promise<[StockLocationDTO](../types/StockLocationDTO.mdx)>` This method is used to update a stock location. -##### Example +#### Example ```ts import { @@ -486,7 +486,7 @@ async function updateStockLocation (id:string, name: string) { } ``` -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[StockLocationDTO](../types/StockLocationDTO.mdx)> diff --git a/www/apps/docs/content/references/services/interfaces/ITaxCalculationStrategy.mdx b/www/apps/docs/content/references/services/interfaces/ITaxCalculationStrategy.mdx index d8461dbc8d..8dc8e5a82b 100644 --- a/www/apps/docs/content/references/services/interfaces/ITaxCalculationStrategy.mdx +++ b/www/apps/docs/content/references/services/interfaces/ITaxCalculationStrategy.mdx @@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes" ## Methods -#### calculate +### calculate `**calculate**(items, taxLines, calculationContext): Promise<number>` Calculates the tax amount for a given set of line items under applicable tax conditions and calculation contexts. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<number> diff --git a/www/apps/docs/content/references/services/interfaces/ITaxService.mdx b/www/apps/docs/content/references/services/interfaces/ITaxService.mdx index 482245f39a..d187c941eb 100644 --- a/www/apps/docs/content/references/services/interfaces/ITaxService.mdx +++ b/www/apps/docs/content/references/services/interfaces/ITaxService.mdx @@ -12,13 +12,13 @@ items and shipping methods. ## Methods -#### getTaxLines +### getTaxLines `**getTaxLines**(itemLines, shippingLines, context): Promise<[ProviderTaxLine](../types/ProviderTaxLine.mdx)[]>` Retrieves the numerical tax lines for a calculation context. -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[ProviderTaxLine](../types/ProviderTaxLine.mdx)[]> diff --git a/www/apps/docs/content/references/services/interfaces/ITransactionBaseService.mdx b/www/apps/docs/content/references/services/interfaces/ITransactionBaseService.mdx index 4e77545917..a2823f087c 100644 --- a/www/apps/docs/content/references/services/interfaces/ITransactionBaseService.mdx +++ b/www/apps/docs/content/references/services/interfaces/ITransactionBaseService.mdx @@ -8,11 +8,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes" ## Methods -#### withTransaction +### withTransaction `**withTransaction**(transactionManager?): [ITransactionBaseService](ITransactionBaseService.mdx)` -##### Parameters +#### Parameters -##### Returns +#### Returns [ITransactionBaseService](ITransactionBaseService.mdx) diff --git a/www/apps/docs/content/references/services/interfaces/IterableIterator.mdx b/www/apps/docs/content/references/services/interfaces/IterableIterator.mdx index 7b539c9041..c66547097e 100644 --- a/www/apps/docs/content/references/services/interfaces/IterableIterator.mdx +++ b/www/apps/docs/content/references/services/interfaces/IterableIterator.mdx @@ -22,11 +22,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes" ## Methods -#### [iterator] +### [iterator] `**[iterator]**(): [IterableIterator](IterableIterator.mdx)<T>` -##### Returns +#### Returns [IterableIterator](IterableIterator.mdx)<T> @@ -44,11 +44,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes" ___ -#### next +### next `**next**(...args): [IteratorResult](../types/IteratorResult.mdx)<T, any>` -##### Parameters +#### Parameters -##### Returns +#### Returns [IteratorResult](../types/IteratorResult.mdx)<T, any> @@ -80,11 +80,11 @@ ___ ___ -#### return +### return `Optional **return**(value?): [IteratorResult](../types/IteratorResult.mdx)<T, any>` -##### Parameters +#### Parameters -##### Returns +#### Returns [IteratorResult](../types/IteratorResult.mdx)<T, any> @@ -116,11 +116,11 @@ ___ ___ -#### throw +### throw `Optional **throw**(e?): [IteratorResult](../types/IteratorResult.mdx)<T, any>` -##### Parameters +#### Parameters -##### Returns +#### Returns [IteratorResult](../types/IteratorResult.mdx)<T, any> diff --git a/www/apps/docs/content/references/services/interfaces/Iterator.mdx b/www/apps/docs/content/references/services/interfaces/Iterator.mdx index 6ab66e8cd3..9e22e7a648 100644 --- a/www/apps/docs/content/references/services/interfaces/Iterator.mdx +++ b/www/apps/docs/content/references/services/interfaces/Iterator.mdx @@ -40,11 +40,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes" ## Methods -#### next +### next `**next**(...args): [IteratorResult](../types/IteratorResult.mdx)<T, TReturn>` -##### Parameters +#### Parameters -##### Returns +#### Returns [IteratorResult](../types/IteratorResult.mdx)<T, TReturn> @@ -76,11 +76,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes" ___ -#### return +### return `Optional **return**(value?): [IteratorResult](../types/IteratorResult.mdx)<T, TReturn>` -##### Parameters +#### Parameters -##### Returns +#### Returns [IteratorResult](../types/IteratorResult.mdx)<T, TReturn> @@ -112,11 +112,11 @@ ___ ___ -#### throw +### throw `Optional **throw**(e?): [IteratorResult](../types/IteratorResult.mdx)<T, TReturn>` -##### Parameters +#### Parameters -##### Returns +#### Returns [IteratorResult](../types/IteratorResult.mdx)<T, TReturn> diff --git a/www/apps/docs/content/references/services/interfaces/PaymentProcessor.mdx b/www/apps/docs/content/references/services/interfaces/PaymentProcessor.mdx index 1c20de71e0..02d11df082 100644 --- a/www/apps/docs/content/references/services/interfaces/PaymentProcessor.mdx +++ b/www/apps/docs/content/references/services/interfaces/PaymentProcessor.mdx @@ -11,13 +11,13 @@ This work is still experimental and can be changed until it becomes stable ## Methods -#### authorizePayment +### authorizePayment `**authorizePayment**(paymentSessionData, context): Promise<[PaymentProcessorError](PaymentProcessorError.mdx) \| { data: Record<string, unknown> ; status: [PaymentSessionStatus](../enums/PaymentSessionStatus.mdx) }>` Authorize an existing session if it is not already authorized -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[PaymentProcessorError](PaymentProcessorError.mdx) \| { data: Record<string, unknown> ; status: [PaymentSessionStatus](../enums/PaymentSessionStatus.mdx) }> @@ -58,13 +58,13 @@ Promise<[PaymentProcessorError](PaymentProcessorError.mdx) \| { data: R ___ -#### cancelPayment +### cancelPayment `**cancelPayment**(paymentSessionData): Promise<Record<string, unknown> \| [PaymentProcessorError](PaymentProcessorError.mdx)>` Cancel an existing session -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<Record<string, unknown> \| [PaymentProcessorError](PaymentProcessorError.mdx)> @@ -96,13 +96,13 @@ Promise<Record<string, unknown> \| [PaymentProcessorError](PaymentPr ___ -#### capturePayment +### capturePayment `**capturePayment**(paymentSessionData): Promise<Record<string, unknown> \| [PaymentProcessorError](PaymentProcessorError.mdx)>` Capture an existing session -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<Record<string, unknown> \| [PaymentProcessorError](PaymentProcessorError.mdx)> @@ -134,13 +134,13 @@ Promise<Record<string, unknown> \| [PaymentProcessorError](PaymentPr ___ -#### deletePayment +### deletePayment `**deletePayment**(paymentSessionData): Promise<Record<string, unknown> \| [PaymentProcessorError](PaymentProcessorError.mdx)>` Delete an existing session -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<Record<string, unknown> \| [PaymentProcessorError](PaymentProcessorError.mdx)> @@ -172,13 +172,13 @@ Promise<Record<string, unknown> \| [PaymentProcessorError](PaymentPr ___ -#### getIdentifier +### getIdentifier `**getIdentifier**(): string` Return a unique identifier to retrieve the payment plugin provider -##### Returns +#### Returns `string` @@ -196,13 +196,13 @@ Return a unique identifier to retrieve the payment plugin provider ___ -#### getPaymentStatus +### getPaymentStatus `**getPaymentStatus**(paymentSessionData): Promise<[PaymentSessionStatus](../enums/PaymentSessionStatus.mdx)>` Return the status of the session -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[PaymentSessionStatus](../enums/PaymentSessionStatus.mdx)> @@ -234,13 +234,13 @@ Promise<[PaymentSessionStatus](../enums/PaymentSessionStatus.mdx)> ___ -#### initiatePayment +### initiatePayment `**initiatePayment**(context): Promise<[PaymentProcessorError](PaymentProcessorError.mdx) \| [PaymentProcessorSessionResponse](../types/PaymentProcessorSessionResponse.mdx)>` Initiate a payment session with the external provider -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<[PaymentProcessorError](PaymentProcessorError.mdx) \| [PaymentProcessorSessionResponse](../types/PaymentProcessorSessionResponse.mdx)> @@ -272,13 +272,13 @@ Promise<[PaymentProcessorError](PaymentProcessorError.mdx) \| [PaymentProces ___ -#### refundPayment +### refundPayment `**refundPayment**(paymentSessionData, refundAmount): Promise<Record<string, unknown> \| [PaymentProcessorError](PaymentProcessorError.mdx)>` Refund an existing session -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<Record<string, unknown> \| [PaymentProcessorError](PaymentProcessorError.mdx)> @@ -319,13 +319,13 @@ Promise<Record<string, unknown> \| [PaymentProcessorError](PaymentPr ___ -#### retrievePayment +### retrievePayment `**retrievePayment**(paymentSessionData): Promise<Record<string, unknown> \| [PaymentProcessorError](PaymentProcessorError.mdx)>` Retrieve an existing session -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<Record<string, unknown> \| [PaymentProcessorError](PaymentProcessorError.mdx)> @@ -357,13 +357,13 @@ Promise<Record<string, unknown> \| [PaymentProcessorError](PaymentPr ___ -#### updatePayment +### updatePayment `**updatePayment**(context): Promise<void \| [PaymentProcessorError](PaymentProcessorError.mdx) \| [PaymentProcessorSessionResponse](../types/PaymentProcessorSessionResponse.mdx)>` Update an existing payment session -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<void \| [PaymentProcessorError](PaymentProcessorError.mdx) \| [PaymentProcessorSessionResponse](../types/PaymentProcessorSessionResponse.mdx)> @@ -395,13 +395,13 @@ Promise<void \| [PaymentProcessorError](PaymentProcessorError.mdx) \| [Payme ___ -#### updatePaymentData +### updatePaymentData `**updatePaymentData**(sessionId, data): Promise<Record<string, unknown> \| [PaymentProcessorError](PaymentProcessorError.mdx)>` Update the session data for a payment session -##### Parameters +#### Parameters -##### Returns +#### Returns Promise<Record<string, unknown> \| [PaymentProcessorError](PaymentProcessorError.mdx)> diff --git a/www/apps/docs/content/references/services/interfaces/SharedArrayBuffer.mdx b/www/apps/docs/content/references/services/interfaces/SharedArrayBuffer.mdx index b1f7bb5733..977387bd15 100644 --- a/www/apps/docs/content/references/services/interfaces/SharedArrayBuffer.mdx +++ b/www/apps/docs/content/references/services/interfaces/SharedArrayBuffer.mdx @@ -38,15 +38,17 @@ import ParameterTypes from "@site/src/components/ParameterTypes" } ]} /> +___ + ## Methods -#### slice +### slice `**slice**(begin, end?): [SharedArrayBuffer](../index.md#sharedarraybuffer)` Returns a section of an SharedArrayBuffer. -##### Parameters +#### Parameters -##### Returns +#### Returns [SharedArrayBuffer](../index.md#sharedarraybuffer) diff --git a/www/apps/docs/content/references/services/interfaces/SharedArrayBufferConstructor.mdx b/www/apps/docs/content/references/services/interfaces/SharedArrayBufferConstructor.mdx index fd941271b9..af9100acce 100644 --- a/www/apps/docs/content/references/services/interfaces/SharedArrayBufferConstructor.mdx +++ b/www/apps/docs/content/references/services/interfaces/SharedArrayBufferConstructor.mdx @@ -6,13 +6,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes" # SharedArrayBufferConstructor -## Constructors - -#### constructor +## constructor `**new SharedArrayBufferConstructor**(byteLength)` -##### Parameters +### Parameters +___ + ## Properties -#### Type declaration +## Type declaration `) => Promise<any> \| `null` -#### Type declaration +## Type declaration `(query, variables?): Promise<any> \| null` -##### Parameters +### Parameters -##### Returns +### Returns Promise<any> \| `null` diff --git a/www/apps/docs/content/references/services/types/ReorderConditions.mdx b/www/apps/docs/content/references/services/types/ReorderConditions.mdx index 93f506ab62..96e0591929 100644 --- a/www/apps/docs/content/references/services/types/ReorderConditions.mdx +++ b/www/apps/docs/content/references/services/types/ReorderConditions.mdx @@ -8,7 +8,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes" **ReorderConditions**: `Object` -#### Type declaration +## Type declaration Promise<void> -#### Type Parameters +## Type Parameters -#### Type declaration +## Type declaration `(data, eventName): Promise<void>` -##### Parameters +### Parameters -##### Returns +### Returns Promise<void> diff --git a/www/apps/docs/content/references/services/types/SubscriberContext.mdx b/www/apps/docs/content/references/services/types/SubscriberContext.mdx index ab4165ae84..8efb8eee65 100644 --- a/www/apps/docs/content/references/services/types/SubscriberContext.mdx +++ b/www/apps/docs/content/references/services/types/SubscriberContext.mdx @@ -8,7 +8,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes" **SubscriberContext**: `Object` -#### Type declaration +## Type declaration Promise<DeepPartial<[LineItem](../classes/LineItem.mdx)>> \| DeepPartial<[LineItem](../classes/LineItem.mdx)> -#### Type declaration +## Type declaration `(item?, quantity?, additional?): Promise<DeepPartial<[LineItem](../classes/LineItem.mdx)>> \| DeepPartial<[LineItem](../classes/LineItem.mdx)>` -##### Parameters +### Parameters -##### Returns +### Returns Promise<DeepPartial<[LineItem](../classes/LineItem.mdx)>> \| DeepPartial<[LineItem](../classes/LineItem.mdx)> diff --git a/www/apps/docs/content/references/services/types/TreeQuerySelector.mdx b/www/apps/docs/content/references/services/types/TreeQuerySelector.mdx index bf3d867adf..183a46c41e 100644 --- a/www/apps/docs/content/references/services/types/TreeQuerySelector.mdx +++ b/www/apps/docs/content/references/services/types/TreeQuerySelector.mdx @@ -8,7 +8,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes" **TreeQuerySelector**: [QuerySelector](QuerySelector.mdx)<TEntity> & ``{ include_descendants_tree?: boolean }`` -#### Type Parameters +## Type Parameters `) => `RequestHandler` -#### Type declaration +## Type declaration `(options): RequestHandler` -##### Parameters +### Parameters -##### Returns +### Returns `RequestHandler` diff --git a/www/apps/docs/content/references/services/types/middlewareType.mdx b/www/apps/docs/content/references/services/types/middlewareType.mdx index 8a071cb6b1..5fc953028b 100644 --- a/www/apps/docs/content/references/services/types/middlewareType.mdx +++ b/www/apps/docs/content/references/services/types/middlewareType.mdx @@ -8,7 +8,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes" **middlewareType**: `Object` -#### Type declaration +## Type declaration +___ + -## isPartiallyCompleted +___ - **isPartiallyCompleted**: [object Object] +## isPartiallyCompleted diff --git a/www/apps/docs/content/references/workflows/classes/LocalWorkflow.mdx b/www/apps/docs/content/references/workflows/classes/LocalWorkflow.mdx index 5a722f12c9..ec3610bd39 100644 --- a/www/apps/docs/content/references/workflows/classes/LocalWorkflow.mdx +++ b/www/apps/docs/content/references/workflows/classes/LocalWorkflow.mdx @@ -50,6 +50,8 @@ import ParameterTypes from "@site/src/components/ParameterTypes" } ]} /> +___ + +___ + -## hasChanges +___ - **hasChanges**: [object Object] +## hasChanges diff --git a/www/apps/docs/content/references/workflows/classes/TransactionCheckpoint.mdx b/www/apps/docs/content/references/workflows/classes/TransactionCheckpoint.mdx index 0e4375c749..987a0da598 100644 --- a/www/apps/docs/content/references/workflows/classes/TransactionCheckpoint.mdx +++ b/www/apps/docs/content/references/workflows/classes/TransactionCheckpoint.mdx @@ -160,6 +160,8 @@ import ParameterTypes from "@site/src/components/ParameterTypes" } ]} /> +___ + +___ + +___ + +___ + +___ + diff --git a/www/apps/docs/src/utils/specs.ts b/www/apps/docs/src/utils/specs.ts new file mode 100644 index 0000000000..c14866720c --- /dev/null +++ b/www/apps/docs/src/utils/specs.ts @@ -0,0 +1 @@ +export const specs = {}