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:
Shahed Nasser
2024-01-05 17:03:38 +02:00
committed by GitHub
parent 6fc6a9de6a
commit 7d650771d1
2811 changed files with 231856 additions and 455063 deletions
@@ -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&#60;[Cart](../../entities/classes/entities.Cart.mdx)&#62; & `object`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "featureFlagRouter_",
"type": "`FlagRouter`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "itemTaxLineRepo_",
"type": "Repository&#60;[LineItemTaxLine](../../entities/classes/entities.LineItemTaxLine.mdx)&#62; & `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&#60;[LineItem](../../entities/classes/entities.LineItem.mdx)&#62; & `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&#60;[Cart](../../entities/classes/entities.Cart.mdx)&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"featureFlagRouter_","type":"`FlagRouter`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"itemTaxLineRepo_","type":"Repository&#60;[LineItemTaxLine](../../entities/classes/entities.LineItemTaxLine.mdx)&#62; & `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&#60;[LineItem](../../entities/classes/entities.LineItem.mdx)&#62; & `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&#60;TResult&#62;",
"description": "the transactional work to be done",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "isolationOrErrorHandler",
"type": "`IsolationLevel` \\| (`error`: `TError`) => Promise&#60;void \\| TResult&#62;",
"description": "the isolation level to be used for the work.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "maybeErrorHandlerOrDontFail",
"type": "(`error`: `TError`) => Promise&#60;void \\| TResult&#62;",
"description": "Potential error handler",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
<ParameterTypes parameters={[{"name":"work","type":"(`transactionManager`: `EntityManager`) => Promise&#60;TResult&#62;","description":"the transactional work to be done","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationOrErrorHandler","type":"`IsolationLevel` \\| (`error`: `TError`) => Promise&#60;void \\| TResult&#62;","description":"the isolation level to be used for the work.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"maybeErrorHandlerOrDontFail","type":"(`error`: `TError`) => Promise&#60;void \\| TResult&#62;","description":"Potential error handler","optional":true,"defaultValue":"","expandable":false,"children":[]}]} />
#### Returns
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "Promise&#60;TResult&#62;",
"optional": false,
"defaultValue": "",
"description": "the result of the transactional work",
"expandable": false,
"children": []
}
]} />
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;TResult&#62;","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&#60;[LineItem](../../entities/classes/entities.LineItem.mdx)&#62;",
"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&#60;[LineItem](../../entities/classes/entities.LineItem.mdx)&#62;","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&#60;[LineItem](../../entities/classes/entities.LineItem.mdx)[]&#62;",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[LineItem](../../entities/classes/entities.LineItem.mdx)[]&#62;","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&#60;TResult&#62;",
"optional": false,
"defaultValue": "",
"description": "the created line item",
"expandable": false,
"children": []
}
]} />
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;TResult&#62;","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&#60;[LineItem](../../entities/classes/entities.LineItem.mdx)[]&#62;",
"optional": false,
"defaultValue": "",
"description": "the created line items",
"expandable": false,
"children": []
}
]} />
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[LineItem](../../entities/classes/entities.LineItem.mdx)[]&#62;","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&#60;[LineItemTaxLine](../../entities/classes/entities.LineItemTaxLine.mdx)&#62;",
"description": "tax line partial passed to the repo create method",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
<ParameterTypes parameters={[{"name":"args","type":"DeepPartial&#60;[LineItemTaxLine](../../entities/classes/entities.LineItemTaxLine.mdx)&#62;","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&#60;undefined \\| null \\| [LineItem](../../entities/classes/entities.LineItem.mdx)&#62;",
"optional": false,
"defaultValue": "",
"description": "the result of the delete operation",
"expandable": false,
"children": []
}
]} />
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;undefined \\| null \\| [LineItem](../../entities/classes/entities.LineItem.mdx)&#62;","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&#60;undefined \\| null \\| [LineItem](../../entities/classes/entities.LineItem.mdx)&#62;",
"optional": false,
"defaultValue": "",
"description": "the result of the delete operation",
"expandable": false,
"children": []
}
]} />
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;undefined \\| null \\| [LineItem](../../entities/classes/entities.LineItem.mdx)&#62;","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&#60;TResult&#62;",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;TResult&#62;","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&#60;[LineItem](../../entities/classes/entities.LineItem.mdx)&#62;",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[LineItem](../../entities/classes/entities.LineItem.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} />
___
@@ -740,40 +176,11 @@ ___
#### Parameters
<ParameterTypes parameters={[
{
"name": "selector",
"type": "[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[LineItem](../../entities/classes/entities.LineItem.mdx)&#62;",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "config",
"type": "[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[LineItem](../../entities/classes/entities.LineItem.mdx)&#62;",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
<ParameterTypes parameters={[{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[LineItem](../../entities/classes/entities.LineItem.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[LineItem](../../entities/classes/entities.LineItem.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} />
#### Returns
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "Promise&#60;[LineItem](../../entities/classes/entities.LineItem.mdx)[]&#62;",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[LineItem](../../entities/classes/entities.LineItem.mdx)[]&#62;","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&#60;[LineItem](../../entities/classes/entities.LineItem.mdx)&#62;",
"optional": false,
"defaultValue": "",
"description": "the line item",
"expandable": false,
"children": []
}
]} />
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[LineItem](../../entities/classes/entities.LineItem.mdx)&#62;","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)&#60;[LineItem](../../entities/classes/entities.LineItem.mdx)&#62;",
"description": "the id or selector of the line item(s) to update",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "data",
"type": "Partial&#60;[LineItem](../../entities/classes/entities.LineItem.mdx)&#62;",
"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)&#60;[LineItem](../../entities/classes/entities.LineItem.mdx)&#62;","description":"the id or selector of the line item(s) to update","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"Partial&#60;[LineItem](../../entities/classes/entities.LineItem.mdx)&#62;","description":"the properties to update the line item(s)","optional":false,"defaultValue":"","expandable":false,"children":[]}]} />
#### Returns
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "Promise&#60;[LineItem](../../entities/classes/entities.LineItem.mdx)[]&#62;",
"optional": false,
"defaultValue": "",
"description": "the updated line item(s)",
"expandable": false,
"children": []
}
]} />
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[LineItem](../../entities/classes/entities.LineItem.mdx)[]&#62;","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":[]}]} />