docs: prep for v2 documentation (#6710)
This PR includes documentation that preps for v2 docs (but doesn't introduce new docs). _Note: The number of file changes in the PR is due to find-and-replace within the `references` which is unavoidable. Let me know if I should move it to another PR._ ## Changes - Change Medusa version in base OAS used for v2. - Fix to docblock generator related to not catching all path parameters. - Added typedoc plugin that generates ER Diagrams, which will be used specifically for data model references in commerce modules. - Changed OAS tool to output references in `www/apps/api-reference/specs-v2` directory when the `--v2` option is used. - Added a version switcher to the API reference to switch between V1 and V2. This switcher is enabled by an environment variable, so it won't be visible/usable at the moment. - Upgraded docusaurus to v3.0.1 - Added new Vale rules to ensure correct spelling of Medusa Admin and module names. - Added new components to the `docs-ui` package that will be used in future documentation changes.
This commit is contained in:
+2
-2
@@ -2,10 +2,10 @@
|
||||
displayed_sidebar: inventoryReference
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
import TypeList from "@site/src/components/TypeList"
|
||||
|
||||
# BulkUpdateInventoryLevelInput
|
||||
|
||||
The attributes to update in an inventory level. The inventory level is identified by the IDs of its associated inventory item and location.
|
||||
|
||||
<ParameterTypes parameters={[{"name":"inventory_item_id","type":"`string`","description":"The ID of the associated inventory level.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The ID of the associated location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"stocked_quantity","type":"`number`","description":"The stocked quantity of the associated inventory item in the associated location.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"incoming_quantity","type":"`number`","description":"The incoming quantity of the associated inventory item in the associated location.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="BulkUpdateInventoryLevelInput"/>
|
||||
<TypeList types={[{"name":"inventory_item_id","type":"`string`","description":"The ID of the associated inventory level.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The ID of the associated location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"stocked_quantity","type":"`number`","description":"The stocked quantity of the associated inventory item in the associated location.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"incoming_quantity","type":"`number`","description":"The incoming quantity of the associated inventory item in the associated location.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="BulkUpdateInventoryLevelInput"/>
|
||||
|
||||
+2
-2
@@ -2,10 +2,10 @@
|
||||
displayed_sidebar: inventoryReference
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
import TypeList from "@site/src/components/TypeList"
|
||||
|
||||
# CreateInventoryItemInput
|
||||
|
||||
The details of the inventory item to be created.
|
||||
|
||||
<ParameterTypes parameters={[{"name":"sku","type":"`null` \\| `string`","description":"The SKU of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"origin_country","type":"`null` \\| `string`","description":"The origin country of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"mid_code","type":"`null` \\| `string`","description":"The MID code of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"material","type":"`null` \\| `string`","description":"The material of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"weight","type":"`null` \\| `number`","description":"The weight of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"length","type":"`null` \\| `number`","description":"The length of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"height","type":"`null` \\| `number`","description":"The height of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"width","type":"`null` \\| `number`","description":"The width of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`null` \\| `string`","description":"The title of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"thumbnail","type":"`null` \\| `string`","description":"The thumbnail of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"hs_code","type":"`null` \\| `string`","description":"The HS code of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requires_shipping","type":"`boolean`","description":"Whether the inventory item requires shipping.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="CreateInventoryItemInput"/>
|
||||
<TypeList types={[{"name":"sku","type":"`null` \\| `string`","description":"The SKU of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"origin_country","type":"`null` \\| `string`","description":"The origin country of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"mid_code","type":"`null` \\| `string`","description":"The MID code of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"material","type":"`null` \\| `string`","description":"The material of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"weight","type":"`null` \\| `number`","description":"The weight of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"length","type":"`null` \\| `number`","description":"The length of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"height","type":"`null` \\| `number`","description":"The height of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"width","type":"`null` \\| `number`","description":"The width of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`null` \\| `string`","description":"The title of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"thumbnail","type":"`null` \\| `string`","description":"The thumbnail of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"hs_code","type":"`null` \\| `string`","description":"The HS code of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requires_shipping","type":"`boolean`","description":"Whether the inventory item requires shipping.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="CreateInventoryItemInput"/>
|
||||
|
||||
+2
-2
@@ -2,10 +2,10 @@
|
||||
displayed_sidebar: inventoryReference
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
import TypeList from "@site/src/components/TypeList"
|
||||
|
||||
# CreateInventoryLevelInput
|
||||
|
||||
The details of the inventory level to be created.
|
||||
|
||||
<ParameterTypes parameters={[{"name":"inventory_item_id","type":"`string`","description":"The ID of the associated inventory item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The ID of the associated location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"stocked_quantity","type":"`number`","description":"The stocked quantity of the associated inventory item in the associated location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reserved_quantity","type":"`number`","description":"The reserved quantity of the associated inventory item in the associated location.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"incoming_quantity","type":"`number`","description":"The incoming quantity of the associated inventory item in the associated location.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="CreateInventoryLevelInput"/>
|
||||
<TypeList types={[{"name":"inventory_item_id","type":"`string`","description":"The ID of the associated inventory item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The ID of the associated location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"stocked_quantity","type":"`number`","description":"The stocked quantity of the associated inventory item in the associated location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reserved_quantity","type":"`number`","description":"The reserved quantity of the associated inventory item in the associated location.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"incoming_quantity","type":"`number`","description":"The incoming quantity of the associated inventory item in the associated location.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="CreateInventoryLevelInput"/>
|
||||
|
||||
+2
-2
@@ -2,10 +2,10 @@
|
||||
displayed_sidebar: inventoryReference
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
import TypeList from "@site/src/components/TypeList"
|
||||
|
||||
# CreateReservationItemInput
|
||||
|
||||
The details of the reservation item to be created.
|
||||
|
||||
<ParameterTypes parameters={[{"name":"inventory_item_id","type":"`string`","description":"The ID of the associated inventory item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The ID of the associated location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`number`","description":"The reserved quantity.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"line_item_id","type":"`string`","description":"The ID of the associated line item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the reservation.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`string`","description":"The user or system that created the reservation. Can be any form of identification string.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"external_id","type":"`string`","description":"An ID associated with an external third-party system that the reservation item is connected to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="CreateReservationItemInput"/>
|
||||
<TypeList types={[{"name":"inventory_item_id","type":"`string`","description":"The ID of the associated inventory item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The ID of the associated location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`number`","description":"The reserved quantity.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"line_item_id","type":"`string`","description":"The ID of the associated line item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the reservation.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`string`","description":"The user or system that created the reservation. Can be any form of identification string.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"external_id","type":"`string`","description":"An ID associated with an external third-party system that the reservation item is connected to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="CreateReservationItemInput"/>
|
||||
|
||||
+2
-2
@@ -2,10 +2,10 @@
|
||||
displayed_sidebar: inventoryReference
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
import TypeList from "@site/src/components/TypeList"
|
||||
|
||||
# FilterableInventoryItemProps
|
||||
|
||||
The filters to apply on retrieved inventory items.
|
||||
|
||||
<ParameterTypes parameters={[{"name":"id","type":"`string` \\| `string`[]","description":"The IDs to filter inventory items by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string` \\| `string`[]","description":"Filter inventory items by the ID of their associated location.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"Search term to search inventory items' attributes.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sku","type":"`string` \\| `string`[] \\| [StringComparisonOperator](inventory.StringComparisonOperator.mdx)","description":"The SKUs to filter inventory items by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"origin_country","type":"`string` \\| `string`[]","description":"The origin country to filter inventory items by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"hs_code","type":"`string` \\| `string`[] \\| [StringComparisonOperator](inventory.StringComparisonOperator.mdx)","description":"The HS Codes to filter inventory items by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requires_shipping","type":"`boolean`","description":"Filter inventory items by whether they require shipping.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="FilterableInventoryItemProps"/>
|
||||
<TypeList types={[{"name":"id","type":"`string` \\| `string`[]","description":"The IDs to filter inventory items by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string` \\| `string`[]","description":"Filter inventory items by the ID of their associated location.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"Search term to search inventory items' attributes.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sku","type":"`string` \\| `string`[] \\| [StringComparisonOperator](inventory.StringComparisonOperator.mdx)","description":"The SKUs to filter inventory items by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"origin_country","type":"`string` \\| `string`[]","description":"The origin country to filter inventory items by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"hs_code","type":"`string` \\| `string`[] \\| [StringComparisonOperator](inventory.StringComparisonOperator.mdx)","description":"The HS Codes to filter inventory items by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requires_shipping","type":"`boolean`","description":"Filter inventory items by whether they require shipping.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="FilterableInventoryItemProps"/>
|
||||
|
||||
+2
-2
@@ -2,10 +2,10 @@
|
||||
displayed_sidebar: inventoryReference
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
import TypeList from "@site/src/components/TypeList"
|
||||
|
||||
# FilterableInventoryLevelProps
|
||||
|
||||
The filters to apply on retrieved inventory levels.
|
||||
|
||||
<ParameterTypes parameters={[{"name":"inventory_item_id","type":"`string` \\| `string`[]","description":"Filter inventory levels by the ID of their associated inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string` \\| `string`[]","description":"Filter inventory levels by the ID of their associated inventory location.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"stocked_quantity","type":"`number` \\| [NumericalComparisonOperator](inventory.NumericalComparisonOperator.mdx)","description":"Filters to apply on inventory levels' `stocked_quantity` attribute.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"reserved_quantity","type":"`number` \\| [NumericalComparisonOperator](inventory.NumericalComparisonOperator.mdx)","description":"Filters to apply on inventory levels' `reserved_quantity` attribute.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"incoming_quantity","type":"`number` \\| [NumericalComparisonOperator](inventory.NumericalComparisonOperator.mdx)","description":"Filters to apply on inventory levels' `incoming_quantity` attribute.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="FilterableInventoryLevelProps"/>
|
||||
<TypeList types={[{"name":"inventory_item_id","type":"`string` \\| `string`[]","description":"Filter inventory levels by the ID of their associated inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string` \\| `string`[]","description":"Filter inventory levels by the ID of their associated inventory location.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"stocked_quantity","type":"`number` \\| [NumericalComparisonOperator](inventory.NumericalComparisonOperator.mdx)","description":"Filters to apply on inventory levels' `stocked_quantity` attribute.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"reserved_quantity","type":"`number` \\| [NumericalComparisonOperator](inventory.NumericalComparisonOperator.mdx)","description":"Filters to apply on inventory levels' `reserved_quantity` attribute.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"incoming_quantity","type":"`number` \\| [NumericalComparisonOperator](inventory.NumericalComparisonOperator.mdx)","description":"Filters to apply on inventory levels' `incoming_quantity` attribute.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="FilterableInventoryLevelProps"/>
|
||||
|
||||
+2
-2
@@ -2,10 +2,10 @@
|
||||
displayed_sidebar: inventoryReference
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
import TypeList from "@site/src/components/TypeList"
|
||||
|
||||
# FilterableReservationItemProps
|
||||
|
||||
The filters to apply on retrieved reservation items.
|
||||
|
||||
<ParameterTypes parameters={[{"name":"id","type":"`string` \\| `string`[]","description":"The IDs to filter reservation items by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"line_item_id","type":"`string` \\| `string`[]","description":"Filter reservation items by the ID of their associated line item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_item_id","type":"`string` \\| `string`[]","description":"Filter reservation items by the ID of their associated inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string` \\| `string`[]","description":"Filter reservation items by the ID of their associated location.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string` \\| [StringComparisonOperator](inventory.StringComparisonOperator.mdx)","description":"Description filters to apply on the reservation items' `description` attribute.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`string` \\| `string`[]","description":"The \"created by\" values to filter reservation items by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`number` \\| [NumericalComparisonOperator](inventory.NumericalComparisonOperator.mdx)","description":"Filters to apply on the reservation items' `quantity` attribute.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="FilterableReservationItemProps"/>
|
||||
<TypeList types={[{"name":"id","type":"`string` \\| `string`[]","description":"The IDs to filter reservation items by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"line_item_id","type":"`string` \\| `string`[]","description":"Filter reservation items by the ID of their associated line item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_item_id","type":"`string` \\| `string`[]","description":"Filter reservation items by the ID of their associated inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string` \\| `string`[]","description":"Filter reservation items by the ID of their associated location.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string` \\| [StringComparisonOperator](inventory.StringComparisonOperator.mdx)","description":"Description filters to apply on the reservation items' `description` attribute.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`string` \\| `string`[]","description":"The \"created by\" values to filter reservation items by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`number` \\| [NumericalComparisonOperator](inventory.NumericalComparisonOperator.mdx)","description":"Filters to apply on the reservation items' `quantity` attribute.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="FilterableReservationItemProps"/>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
displayed_sidebar: inventoryReference
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
import TypeList from "@site/src/components/TypeList"
|
||||
|
||||
# FindConfig
|
||||
|
||||
@@ -11,6 +11,6 @@ which provides correct typing of field names in its properties.
|
||||
|
||||
## Type parameters
|
||||
|
||||
<ParameterTypes parameters={[{"name":"Entity","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="FindConfig"/>
|
||||
<TypeList types={[{"name":"Entity","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="FindConfig"/>
|
||||
|
||||
<ParameterTypes parameters={[{"name":"select","type":"(`string` \\| keyof Entity)[]","description":"An array of strings, each being attribute names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skip","type":"`null` \\| `number`","description":"A number indicating the number of records to skip before retrieving the results.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"take","type":"`null` \\| `number`","description":"A number indicating the number of records to return in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"An array of strings, each being relation names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`object`","description":"An object used to specify how to sort the returned records. Its keys are the names of attributes of the entity, and a key's value can either be `ASC`\nto sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"withDeleted","type":"`boolean`","description":"A boolean indicating whether deleted records should also be retrieved as part of the result. This only works if the entity extends the\n`SoftDeletableEntity` class.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="FindConfig"/>
|
||||
<TypeList types={[{"name":"select","type":"(`string` \\| keyof Entity)[]","description":"An array of strings, each being attribute names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skip","type":"`null` \\| `number`","description":"A number indicating the number of records to skip before retrieving the results.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"take","type":"`null` \\| `number`","description":"A number indicating the number of records to return in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"An array of strings, each being relation names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`object`","description":"An object used to specify how to sort the returned records. Its keys are the names of attributes of the entity, and a key's value can either be `ASC`\nto sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"withDeleted","type":"`boolean`","description":"A boolean indicating whether deleted records should also be retrieved as part of the result. This only works if the entity extends the\n`SoftDeletableEntity` class.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="FindConfig"/>
|
||||
|
||||
+2
-2
@@ -3,9 +3,9 @@ displayed_sidebar: inventoryReference
|
||||
slug: /references/inventory
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
import TypeList from "@site/src/components/TypeList"
|
||||
|
||||
# IInventoryService Reference
|
||||
# IInventoryService Reference
|
||||
|
||||
This section of the documentation provides a reference to the `IInventoryService` interface’s methods. This is the interface developers use to use the functionalities provided by the Inventory Module.
|
||||
|
||||
|
||||
@@ -2,6 +2,6 @@
|
||||
displayed_sidebar: inventoryReference
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
import TypeList from "@site/src/components/TypeList"
|
||||
|
||||
# IModuleService
|
||||
|
||||
+2
-2
@@ -2,8 +2,8 @@
|
||||
displayed_sidebar: inventoryReference
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
import TypeList from "@site/src/components/TypeList"
|
||||
|
||||
# JoinerServiceConfig
|
||||
|
||||
<ParameterTypes parameters={[{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"primaryKeys","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"alias","type":"[JoinerServiceConfigAlias](inventory.JoinerServiceConfigAlias.mdx) \\| [JoinerServiceConfigAlias](inventory.JoinerServiceConfigAlias.mdx)[]","description":"Property name to use as entrypoint to the service","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fieldAlias","type":"`Record<string, string \\| object>`","description":"alias for deeper nested relationships (e.g. { 'price': 'prices.calculated\\_price\\_set.amount' })","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relationships","type":"[JoinerRelationship](../types/inventory.JoinerRelationship.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"alias","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"foreignKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"primaryKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"isInternalService","type":"`boolean`","description":"If true, the relationship is an internal service from the medusa core\nTODO: Remove when there are no more \"internal\" services","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inverse","type":"`boolean`","description":"In an inverted relationship the foreign key is on the other service and the primary key is on the current service","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isList","type":"`boolean`","description":"Force the relationship to return a list","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"args","type":"`Record<string, any>`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"extends","type":"`object`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"relationship","type":"[JoinerRelationship](../types/inventory.JoinerRelationship.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"alias","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"foreignKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"primaryKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"isInternalService","type":"`boolean`","description":"If true, the relationship is an internal service from the medusa core\nTODO: Remove when there are no more \"internal\" services","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inverse","type":"`boolean`","description":"In an inverted relationship the foreign key is on the other service and the primary key is on the current service","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isList","type":"`boolean`","description":"Force the relationship to return a list","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"args","type":"`Record<string, any>`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"args","type":"`Record<string, any>`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="JoinerServiceConfig"/>
|
||||
<TypeList types={[{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"primaryKeys","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"alias","type":"[JoinerServiceConfigAlias](inventory.JoinerServiceConfigAlias.mdx) \\| [JoinerServiceConfigAlias](inventory.JoinerServiceConfigAlias.mdx)[]","description":"Property name to use as entrypoint to the service","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fieldAlias","type":"`Record<string, string \\| object>`","description":"alias for deeper nested relationships (e.g. { 'price': 'prices.calculated\\_price\\_set.amount' })","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relationships","type":"[JoinerRelationship](../types/inventory.JoinerRelationship.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"alias","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"foreignKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"primaryKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"isInternalService","type":"`boolean`","description":"If true, the relationship is an internal service from the medusa core\nTODO: Remove when there are no more \"internal\" services","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inverse","type":"`boolean`","description":"In an inverted relationship the foreign key is on the other service and the primary key is on the current service","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isList","type":"`boolean`","description":"Force the relationship to return a list","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"args","type":"`Record<string, any>`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"extends","type":"`object`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"relationship","type":"[JoinerRelationship](../types/inventory.JoinerRelationship.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"alias","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"foreignKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"primaryKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"isInternalService","type":"`boolean`","description":"If true, the relationship is an internal service from the medusa core\nTODO: Remove when there are no more \"internal\" services","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inverse","type":"`boolean`","description":"In an inverted relationship the foreign key is on the other service and the primary key is on the current service","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isList","type":"`boolean`","description":"Force the relationship to return a list","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"args","type":"`Record<string, any>`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"args","type":"`Record<string, any>`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="JoinerServiceConfig"/>
|
||||
|
||||
+2
-2
@@ -2,8 +2,8 @@
|
||||
displayed_sidebar: inventoryReference
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
import TypeList from "@site/src/components/TypeList"
|
||||
|
||||
# JoinerServiceConfigAlias
|
||||
|
||||
<ParameterTypes parameters={[{"name":"name","type":"`string` \\| `string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"args","type":"`Record<string, any>`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="JoinerServiceConfigAlias"/>
|
||||
<TypeList types={[{"name":"name","type":"`string` \\| `string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"args","type":"`Record<string, any>`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="JoinerServiceConfigAlias"/>
|
||||
|
||||
+2
-2
@@ -2,8 +2,8 @@
|
||||
displayed_sidebar: inventoryReference
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
import TypeList from "@site/src/components/TypeList"
|
||||
|
||||
# NumericalComparisonOperator
|
||||
|
||||
<ParameterTypes parameters={[{"name":"lt","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"gt","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"gte","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"lte","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="NumericalComparisonOperator"/>
|
||||
<TypeList types={[{"name":"lt","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"gt","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"gte","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"lte","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="NumericalComparisonOperator"/>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
displayed_sidebar: inventoryReference
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
import TypeList from "@site/src/components/TypeList"
|
||||
|
||||
# SharedContext
|
||||
|
||||
@@ -12,4 +12,4 @@ use `Context` instead
|
||||
|
||||
A context used to share resources, such as transaction manager, between the application and the module.
|
||||
|
||||
<ParameterTypes parameters={[{"name":"transactionManager","type":"`EntityManager`","description":"An instance of a transaction manager.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"`EntityManager`","description":"An instance of an entity manager.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="SharedContext"/>
|
||||
<TypeList types={[{"name":"transactionManager","type":"`EntityManager`","description":"An instance of a transaction manager.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"`EntityManager`","description":"An instance of an entity manager.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="SharedContext"/>
|
||||
|
||||
+2
-2
@@ -2,8 +2,8 @@
|
||||
displayed_sidebar: inventoryReference
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
import TypeList from "@site/src/components/TypeList"
|
||||
|
||||
# StringComparisonOperator
|
||||
|
||||
<ParameterTypes parameters={[{"name":"lt","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"gt","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"gte","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"lte","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"contains","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"starts_with","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"ends_with","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="StringComparisonOperator"/>
|
||||
<TypeList types={[{"name":"lt","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"gt","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"gte","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"lte","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"contains","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"starts_with","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"ends_with","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="StringComparisonOperator"/>
|
||||
|
||||
+2
-2
@@ -2,10 +2,10 @@
|
||||
displayed_sidebar: inventoryReference
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
import TypeList from "@site/src/components/TypeList"
|
||||
|
||||
# UpdateInventoryLevelInput
|
||||
|
||||
The attributes to update in an inventory level.
|
||||
|
||||
<ParameterTypes parameters={[{"name":"stocked_quantity","type":"`number`","description":"The stocked quantity of the associated inventory item in the associated location.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"incoming_quantity","type":"`number`","description":"The incoming quantity of the associated inventory item in the associated location.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="UpdateInventoryLevelInput"/>
|
||||
<TypeList types={[{"name":"stocked_quantity","type":"`number`","description":"The stocked quantity of the associated inventory item in the associated location.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"incoming_quantity","type":"`number`","description":"The incoming quantity of the associated inventory item in the associated location.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="UpdateInventoryLevelInput"/>
|
||||
|
||||
+2
-2
@@ -2,10 +2,10 @@
|
||||
displayed_sidebar: inventoryReference
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
import TypeList from "@site/src/components/TypeList"
|
||||
|
||||
# UpdateReservationItemInput
|
||||
|
||||
The attributes to update in a reservation item.
|
||||
|
||||
<ParameterTypes parameters={[{"name":"quantity","type":"`number`","description":"The reserved quantity.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The ID of the associated location.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the reservation item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="UpdateReservationItemInput"/>
|
||||
<TypeList types={[{"name":"quantity","type":"`number`","description":"The reserved quantity.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The ID of the associated location.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the reservation item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="UpdateReservationItemInput"/>
|
||||
|
||||
Reference in New Issue
Block a user