docs: generate medusa-react reference (#6004)
* add new plugin for better organization * added handling in theme for mutations and query types * added tsdoc to hooks * added tsdocs to utility functions * added tsdoc to providers * generated reference * general fixes for generated reference * generated api reference specs + general fixes * add missing import react * split utilities into different directories * added overview page * added link to customer authentication section * fix lint errors * added changeset * fix readme * fixed build error * added expand fields + other sections to overview * updated what's new section * general refactoring * remove unnecessary query field * fix links * added ignoreApi option
This commit is contained in:
@@ -10,159 +10,13 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "__namedParameters",
|
||||
"type": "`InjectedDependencies`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} />
|
||||
|
||||
___
|
||||
|
||||
## Properties
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "__configModule__",
|
||||
"type": "`Record<string, unknown>`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "__container__",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "__moduleDeclaration__",
|
||||
"type": "`Record<string, unknown>`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "cartRepository_",
|
||||
"type": "Repository<[Cart](../../entities/classes/entities.Cart.mdx)> & `object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "featureFlagRouter_",
|
||||
"type": "`FlagRouter`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "itemTaxLineRepo_",
|
||||
"type": "Repository<[LineItemTaxLine](../../entities/classes/entities.LineItemTaxLine.mdx)> & `object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "lineItemAdjustmentService_",
|
||||
"type": "[LineItemAdjustmentService](services.LineItemAdjustmentService.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "lineItemRepository_",
|
||||
"type": "Repository<[LineItem](../../entities/classes/entities.LineItem.mdx)> & `object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "manager_",
|
||||
"type": "`EntityManager`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "pricingService_",
|
||||
"type": "[PricingService](services.PricingService.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "productService_",
|
||||
"type": "[ProductService](services.ProductService.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "productVariantService_",
|
||||
"type": "[ProductVariantService](services.ProductVariantService.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "regionService_",
|
||||
"type": "[RegionService](services.RegionService.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "taxProviderService_",
|
||||
"type": "[TaxProviderService](services.TaxProviderService.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "transactionManager_",
|
||||
"type": "`undefined` \\| `EntityManager`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"name":"__container__","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cartRepository_","type":"Repository<[Cart](../../entities/classes/entities.Cart.mdx)> & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"featureFlagRouter_","type":"`FlagRouter`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"itemTaxLineRepo_","type":"Repository<[LineItemTaxLine](../../entities/classes/entities.LineItemTaxLine.mdx)> & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItemAdjustmentService_","type":"[LineItemAdjustmentService](services.LineItemAdjustmentService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItemRepository_","type":"Repository<[LineItem](../../entities/classes/entities.LineItem.mdx)> & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"manager_","type":"`EntityManager`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"pricingService_","type":"[PricingService](services.PricingService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productService_","type":"[ProductService](services.ProductService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productVariantService_","type":"[ProductVariantService](services.ProductVariantService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"regionService_","type":"[RegionService](services.RegionService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"taxProviderService_","type":"[TaxProviderService](services.TaxProviderService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager_","type":"`undefined` \\| `EntityManager`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__configModule__","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"__moduleDeclaration__","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} />
|
||||
|
||||
___
|
||||
|
||||
@@ -172,17 +26,7 @@ ___
|
||||
|
||||
#### Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "EntityManager",
|
||||
"type": "`EntityManager`",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"name":"EntityManager","type":"`EntityManager`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} />
|
||||
|
||||
___
|
||||
|
||||
@@ -196,72 +40,15 @@ transaction manager is created.
|
||||
|
||||
#### Type Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "TResult",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "TError",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"name":"TResult","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"TError","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} />
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "work",
|
||||
"type": "(`transactionManager`: `EntityManager`) => Promise<TResult>",
|
||||
"description": "the transactional work to be done",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "isolationOrErrorHandler",
|
||||
"type": "`IsolationLevel` \\| (`error`: `TError`) => Promise<void \\| TResult>",
|
||||
"description": "the isolation level to be used for the work.",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "maybeErrorHandlerOrDontFail",
|
||||
"type": "(`error`: `TError`) => Promise<void \\| TResult>",
|
||||
"description": "Potential error handler",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"name":"work","type":"(`transactionManager`: `EntityManager`) => Promise<TResult>","description":"the transactional work to be done","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationOrErrorHandler","type":"`IsolationLevel` \\| (`error`: `TError`) => Promise<void \\| TResult>","description":"the isolation level to be used for the work.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"maybeErrorHandlerOrDontFail","type":"(`error`: `TError`) => Promise<void \\| TResult>","description":"Potential error handler","optional":true,"defaultValue":"","expandable":false,"children":[]}]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "Promise<TResult>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "the result of the transactional work",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"name":"Promise","type":"Promise<TResult>","optional":false,"defaultValue":"","description":"the result of the transactional work","expandable":false,"children":[]}]} />
|
||||
|
||||
___
|
||||
|
||||
@@ -269,58 +56,11 @@ ___
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "ids",
|
||||
"type": "`string` \\| `string`[]",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "data",
|
||||
"type": "DeepPartial<[LineItem](../../entities/classes/entities.LineItem.mdx)>",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "{}",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "options",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "options.setOriginalLineItemId",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"name":"ids","type":"`string` \\| `string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"DeepPartial<[LineItem](../../entities/classes/entities.LineItem.mdx)>","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"options","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options.setOriginalLineItemId","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "Promise<[LineItem](../../entities/classes/entities.LineItem.mdx)[]>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"name":"Promise","type":"Promise<[LineItem](../../entities/classes/entities.LineItem.mdx)[]>","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} />
|
||||
|
||||
___
|
||||
|
||||
@@ -330,54 +70,15 @@ Create a line item
|
||||
|
||||
#### Type Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "T",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "TResult",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"name":"T","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"TResult","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} />
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "data",
|
||||
"type": "`T`",
|
||||
"description": "the line item object to create",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"name":"data","type":"`T`","description":"the line item object to create","optional":false,"defaultValue":"","expandable":false,"children":[]}]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "Promise<TResult>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "the created line item",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"name":"Promise","type":"Promise<TResult>","optional":false,"defaultValue":"","description":"the created line item","expandable":false,"children":[]}]} />
|
||||
|
||||
___
|
||||
|
||||
@@ -388,40 +89,11 @@ return.
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "returnId",
|
||||
"type": "`string`",
|
||||
"description": "the id to generate return items from.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "cartId",
|
||||
"type": "`string`",
|
||||
"description": "the cart to assign the return line items to.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"name":"returnId","type":"`string`","description":"the id to generate return items from.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cartId","type":"`string`","description":"the cart to assign the return line items to.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "Promise<[LineItem](../../entities/classes/entities.LineItem.mdx)[]>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "the created line items",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"name":"Promise","type":"Promise<[LineItem](../../entities/classes/entities.LineItem.mdx)[]>","optional":false,"defaultValue":"","description":"the created line items","expandable":false,"children":[]}]} />
|
||||
|
||||
___
|
||||
|
||||
@@ -431,31 +103,11 @@ Create a line item tax line.
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "args",
|
||||
"type": "DeepPartial<[LineItemTaxLine](../../entities/classes/entities.LineItemTaxLine.mdx)>",
|
||||
"description": "tax line partial passed to the repo create method",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"name":"args","type":"DeepPartial<[LineItemTaxLine](../../entities/classes/entities.LineItemTaxLine.mdx)>","description":"tax line partial passed to the repo create method","optional":false,"defaultValue":"","expandable":false,"children":[]}]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "LineItemTaxLine",
|
||||
"type": "`object`",
|
||||
"description": "A Line Item Tax Line represents the taxes applied on a line item.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"name":"LineItemTaxLine","type":"`object`","description":"A Line Item Tax Line represents the taxes applied on a line item.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} />
|
||||
|
||||
___
|
||||
|
||||
@@ -465,31 +117,11 @@ Deletes a line item.
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "id",
|
||||
"type": "`string`",
|
||||
"description": "the id of the line item to delete",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"name":"id","type":"`string`","description":"the id of the line item to delete","optional":false,"defaultValue":"","expandable":false,"children":[]}]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "Promise<undefined \\| null \\| [LineItem](../../entities/classes/entities.LineItem.mdx)>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "the result of the delete operation",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"name":"Promise","type":"Promise<undefined \\| null \\| [LineItem](../../entities/classes/entities.LineItem.mdx)>","optional":false,"defaultValue":"","description":"the result of the delete operation","expandable":false,"children":[]}]} />
|
||||
|
||||
___
|
||||
|
||||
@@ -497,31 +129,11 @@ ___
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "id",
|
||||
"type": "`string`",
|
||||
"description": "the id of the line item to delete",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"name":"id","type":"`string`","description":"the id of the line item to delete","optional":false,"defaultValue":"","expandable":false,"children":[]}]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "Promise<undefined \\| null \\| [LineItem](../../entities/classes/entities.LineItem.mdx)>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "the result of the delete operation",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"name":"Promise","type":"Promise<undefined \\| null \\| [LineItem](../../entities/classes/entities.LineItem.mdx)>","optional":false,"defaultValue":"","description":"the result of the delete operation","expandable":false,"children":[]}]} />
|
||||
|
||||
#### Deprecated
|
||||
|
||||
@@ -536,81 +148,15 @@ Generate a single or multiple line item without persisting the data into the db
|
||||
|
||||
#### Type Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "T",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "TResult",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"name":"T","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"TResult","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} />
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "variantIdOrData",
|
||||
"type": "`T`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "regionIdOrContext",
|
||||
"type": "`T` extends `string` ? `string` : `GenerateLineItemContext`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "quantity",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "context",
|
||||
"type": "`GenerateLineItemContext`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "{}",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"name":"variantIdOrData","type":"`T`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"regionIdOrContext","type":"`T` extends `string` ? `string` : `GenerateLineItemContext`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"`GenerateLineItemContext`","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"quantity","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "Promise<TResult>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"name":"Promise","type":"Promise<TResult>","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} />
|
||||
|
||||
___
|
||||
|
||||
@@ -618,121 +164,11 @@ ___
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "variant",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "variant.id",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "variant.product",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "variant.product.discountable",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "variant.product.is_giftcard",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "variant.product.thumbnail",
|
||||
"type": "`null` \\| `string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "variant.product.title",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "variant.product_id",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "variant.title",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "quantity",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "context",
|
||||
"type": "`GenerateLineItemContext` & `object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"name":"variant","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"variant.id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"variant.product","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"variant.product.discountable","type":"`boolean`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"variant.product.is_giftcard","type":"`boolean`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"variant.product.thumbnail","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"variant.product.title","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"variant.product_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"variant.title","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"`GenerateLineItemContext` & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "Promise<[LineItem](../../entities/classes/entities.LineItem.mdx)>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"name":"Promise","type":"Promise<[LineItem](../../entities/classes/entities.LineItem.mdx)>","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} />
|
||||
|
||||
___
|
||||
|
||||
@@ -740,40 +176,11 @@ ___
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "selector",
|
||||
"type": "[Selector](../../medusa/types/medusa.Selector.mdx)<[LineItem](../../entities/classes/entities.LineItem.mdx)>",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "config",
|
||||
"type": "[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)<[LineItem](../../entities/classes/entities.LineItem.mdx)>",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)<[LineItem](../../entities/classes/entities.LineItem.mdx)>","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)<[LineItem](../../entities/classes/entities.LineItem.mdx)>","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "Promise<[LineItem](../../entities/classes/entities.LineItem.mdx)[]>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"name":"Promise","type":"Promise<[LineItem](../../entities/classes/entities.LineItem.mdx)[]>","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} />
|
||||
|
||||
___
|
||||
|
||||
@@ -783,40 +190,11 @@ Retrieves a line item by its id.
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "id",
|
||||
"type": "`string`",
|
||||
"description": "the id of the line item to retrieve",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "config",
|
||||
"type": "`object`",
|
||||
"description": "the config to be used at query building",
|
||||
"optional": false,
|
||||
"defaultValue": "{}",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"name":"id","type":"`string`","description":"the id of the line item to retrieve","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"`object`","description":"the config to be used at query building","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "Promise<[LineItem](../../entities/classes/entities.LineItem.mdx)>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "the line item",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"name":"Promise","type":"Promise<[LineItem](../../entities/classes/entities.LineItem.mdx)>","optional":false,"defaultValue":"","description":"the line item","expandable":false,"children":[]}]} />
|
||||
|
||||
___
|
||||
|
||||
@@ -824,31 +202,11 @@ ___
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "err",
|
||||
"type": "`Record<string, unknown>` \\| `object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"name":"err","type":"`Record<string, unknown>` \\| `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "boolean",
|
||||
"type": "`boolean`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"name":"boolean","type":"`boolean`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} />
|
||||
|
||||
___
|
||||
|
||||
@@ -858,40 +216,11 @@ Updates a line item
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "idOrSelector",
|
||||
"type": "`string` \\| [Selector](../../medusa/types/medusa.Selector.mdx)<[LineItem](../../entities/classes/entities.LineItem.mdx)>",
|
||||
"description": "the id or selector of the line item(s) to update",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "data",
|
||||
"type": "Partial<[LineItem](../../entities/classes/entities.LineItem.mdx)>",
|
||||
"description": "the properties to update the line item(s)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"name":"idOrSelector","type":"`string` \\| [Selector](../../medusa/types/medusa.Selector.mdx)<[LineItem](../../entities/classes/entities.LineItem.mdx)>","description":"the id or selector of the line item(s) to update","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"Partial<[LineItem](../../entities/classes/entities.LineItem.mdx)>","description":"the properties to update the line item(s)","optional":false,"defaultValue":"","expandable":false,"children":[]}]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "Promise<[LineItem](../../entities/classes/entities.LineItem.mdx)[]>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "the updated line item(s)",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"name":"Promise","type":"Promise<[LineItem](../../entities/classes/entities.LineItem.mdx)[]>","optional":false,"defaultValue":"","description":"the updated line item(s)","expandable":false,"children":[]}]} />
|
||||
|
||||
___
|
||||
|
||||
@@ -899,72 +228,15 @@ ___
|
||||
|
||||
#### Type Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "T",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "TResult",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"name":"T","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"TResult","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} />
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "variantIdOrData",
|
||||
"type": "`string` \\| `T`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "regionIdOrContext",
|
||||
"type": "`T` extends `string` ? `string` : `GenerateLineItemContext`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "quantity",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"name":"variantIdOrData","type":"`string` \\| `T`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"regionIdOrContext","type":"`T` extends `string` ? `string` : `GenerateLineItemContext`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "void",
|
||||
"type": "`void`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"name":"void","type":"`void`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} />
|
||||
|
||||
___
|
||||
|
||||
@@ -972,28 +244,8 @@ ___
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "transactionManager",
|
||||
"type": "`EntityManager`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"name":"transactionManager","type":"`EntityManager`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "LineItemService",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"name":"LineItemService","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} />
|
||||
|
||||
Reference in New Issue
Block a user