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:
+45
@@ -0,0 +1,45 @@
|
||||
---
|
||||
displayed_sidebar: inventoryReference
|
||||
slug: /references/inventory/adjustInventory
|
||||
sidebar_label: adjustInventory
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# adjustInventory - Inventory Module Reference
|
||||
|
||||
This documentation provides a reference to the `adjustInventory` method. This belongs to the Inventory Module.
|
||||
|
||||
This method is used to adjust the inventory level's stocked quantity. The inventory level is identified by the IDs of its associated inventory item and location.
|
||||
|
||||
## Example
|
||||
|
||||
```ts
|
||||
import {
|
||||
initialize as initializeInventoryModule,
|
||||
} from "@medusajs/inventory"
|
||||
|
||||
async function adjustInventory (
|
||||
inventoryItemId: string,
|
||||
locationId: string,
|
||||
adjustment: number
|
||||
) {
|
||||
const inventoryModule = await initializeInventoryModule({})
|
||||
|
||||
const inventoryLevel = await inventoryModule.adjustInventory(
|
||||
inventoryItemId,
|
||||
locationId,
|
||||
adjustment
|
||||
)
|
||||
|
||||
// do something with the inventory level or return it.
|
||||
}
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[{"name":"inventoryItemId","type":"`string`","description":"The ID of the associated inventory item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"locationId","type":"`string`","description":"The ID of the associated location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"adjustment","type":"`number`","description":"A positive or negative number used to adjust the inventory level's stocked quantity.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[SharedContext](../../interfaces/inventory.SharedContext.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"manager","type":"`EntityManager`","description":"An instance of an entity manager.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager","type":"`EntityManager`","description":"An instance of a transaction manager.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[{"name":"Promise","type":"Promise<[InventoryLevelDTO](../../types/inventory.InventoryLevelDTO.mdx)>","optional":false,"defaultValue":"","description":"The inventory level's details.","expandable":false,"children":[{"name":"created_at","type":"`string` \\| `Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`string` \\| `Date` \\| `null`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"incoming_quantity","type":"`number`","description":"the incoming stock quantity of an inventory item at the given location ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_item_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"the item location ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>` \\| `null`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reserved_quantity","type":"`number`","description":"the reserved stock quantity of an inventory item at the given location ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"stocked_quantity","type":"`number`","description":"the total stock quantity of an inventory item at the given location ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} />
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
---
|
||||
displayed_sidebar: inventoryReference
|
||||
slug: /references/inventory/confirmInventory
|
||||
sidebar_label: confirmInventory
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# confirmInventory - Inventory Module Reference
|
||||
|
||||
This documentation provides a reference to the `confirmInventory` method. This belongs to the Inventory Module.
|
||||
|
||||
This method is used to confirm whether the specified quantity of an inventory item is available in the specified locations.
|
||||
|
||||
## Example
|
||||
|
||||
```ts
|
||||
import {
|
||||
initialize as initializeInventoryModule,
|
||||
} from "@medusajs/inventory"
|
||||
|
||||
async function confirmInventory (
|
||||
inventoryItemId: string,
|
||||
locationIds: string[],
|
||||
quantity: number
|
||||
) {
|
||||
const inventoryModule = await initializeInventoryModule({})
|
||||
|
||||
return await inventoryModule.confirmInventory(
|
||||
inventoryItemId,
|
||||
locationIds,
|
||||
quantity
|
||||
)
|
||||
}
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[{"name":"inventoryItemId","type":"`string`","description":"The ID of the inventory item to check its availability.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"locationIds","type":"`string`[]","description":"The IDs of the locations to check the quantity availability in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`number`","description":"The quantity to check if available for the inventory item in the specified locations.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[SharedContext](../../interfaces/inventory.SharedContext.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"manager","type":"`EntityManager`","description":"An instance of an entity manager.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager","type":"`EntityManager`","description":"An instance of a transaction manager.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[{"name":"Promise","type":"Promise<boolean>","optional":false,"defaultValue":"","description":"Whether the specified quantity is available for the inventory item in the specified locations.","expandable":false,"children":[{"name":"boolean","type":"`boolean`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} />
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
---
|
||||
displayed_sidebar: inventoryReference
|
||||
slug: /references/inventory/createInventoryItem
|
||||
sidebar_label: createInventoryItem
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# createInventoryItem - Inventory Module Reference
|
||||
|
||||
This documentation provides a reference to the `createInventoryItem` method. This belongs to the Inventory Module.
|
||||
|
||||
This method is used to create an inventory item.
|
||||
|
||||
## Example
|
||||
|
||||
```ts
|
||||
import {
|
||||
initialize as initializeInventoryModule,
|
||||
} from "@medusajs/inventory"
|
||||
|
||||
async function createInventoryItem (item: {
|
||||
sku: string,
|
||||
requires_shipping: boolean
|
||||
}) {
|
||||
const inventoryModule = await initializeInventoryModule({})
|
||||
|
||||
const inventoryItem = await inventoryModule.createInventoryItem(
|
||||
item
|
||||
)
|
||||
|
||||
// do something with the inventory item or return it
|
||||
}
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[{"name":"input","type":"[CreateInventoryItemInput](../../interfaces/inventory.CreateInventoryItemInput.mdx)","description":"The details of the inventory item to create.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"description","type":"`null` \\| `string`","description":"The description 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":"hs_code","type":"`null` \\| `string`","description":"The HS code 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":"material","type":"`null` \\| `string`","description":"The material 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":"mid_code","type":"`null` \\| `string`","description":"The MID code 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":"requires_shipping","type":"`boolean`","description":"Whether the inventory item requires shipping.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sku","type":"`null` \\| `string`","description":"The SKU 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":"title","type":"`null` \\| `string`","description":"The title 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":"width","type":"`null` \\| `number`","description":"The width of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"context","type":"[SharedContext](../../interfaces/inventory.SharedContext.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"manager","type":"`EntityManager`","description":"An instance of an entity manager.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager","type":"`EntityManager`","description":"An instance of a transaction manager.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[{"name":"Promise","type":"Promise<[InventoryItemDTO](../../types/inventory.InventoryItemDTO.mdx)>","optional":false,"defaultValue":"","description":"The created inventory item's details.","expandable":false,"children":[{"name":"created_at","type":"`string` \\| `Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`string` \\| `Date` \\| `null`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The inventory item's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"requires_shipping","type":"`boolean`","description":"Whether the item requires shipping.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string` \\| `null`","description":"Description of the inventory item","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"height","type":"`number` \\| `null`","description":"The height of the Inventory Item. May be used in shipping rate calculations.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"hs_code","type":"`string` \\| `null`","description":"The Harmonized System code of the Inventory Item. May be used by Fulfillment Providers to pass customs information to shipping carriers.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"length","type":"`number` \\| `null`","description":"The length of the Inventory Item. May be used in shipping rate calculations.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"material","type":"`string` \\| `null`","description":"The material and composition that the Inventory Item is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>` \\| `null`","description":"An optional key-value map with additional details","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"mid_code","type":"`string` \\| `null`","description":"The Manufacturers Identification code that identifies the manufacturer of the Inventory Item. May be used by Fulfillment Providers to pass customs information to shipping carriers.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"origin_country","type":"`string` \\| `null`","description":"The country in which the Inventory Item was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sku","type":"`string` \\| `null`","description":"The Stock Keeping Unit (SKU) code of the Inventory Item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"thumbnail","type":"`string` \\| `null`","description":"Thumbnail for the inventory item","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string` \\| `null`","description":"Title of the inventory item","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"weight","type":"`number` \\| `null`","description":"The weight of the Inventory Item. May be used in shipping rate calculations.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"width","type":"`number` \\| `null`","description":"The width of the Inventory Item. May be used in shipping rate calculations.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} />
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
---
|
||||
displayed_sidebar: inventoryReference
|
||||
slug: /references/inventory/createInventoryItems
|
||||
sidebar_label: createInventoryItems
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# createInventoryItems - Inventory Module Reference
|
||||
|
||||
This documentation provides a reference to the `createInventoryItems` method. This belongs to the Inventory Module.
|
||||
|
||||
This method is used to create inventory items.
|
||||
|
||||
## Example
|
||||
|
||||
```ts
|
||||
import {
|
||||
initialize as initializeInventoryModule,
|
||||
} from "@medusajs/inventory"
|
||||
|
||||
async function createInventoryItems (items: {
|
||||
sku: string,
|
||||
requires_shipping: boolean
|
||||
}[]) {
|
||||
const inventoryModule = await initializeInventoryModule({})
|
||||
|
||||
const inventoryItems = await inventoryModule.createInventoryItems(
|
||||
items
|
||||
)
|
||||
|
||||
// do something with the inventory items or return them
|
||||
}
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[{"name":"input","type":"[CreateInventoryItemInput](../../interfaces/inventory.CreateInventoryItemInput.mdx)[]","description":"The details of the inventory items to create.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"description","type":"`null` \\| `string`","description":"The description 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":"hs_code","type":"`null` \\| `string`","description":"The HS code 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":"material","type":"`null` \\| `string`","description":"The material 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":"mid_code","type":"`null` \\| `string`","description":"The MID code 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":"requires_shipping","type":"`boolean`","description":"Whether the inventory item requires shipping.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sku","type":"`null` \\| `string`","description":"The SKU 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":"title","type":"`null` \\| `string`","description":"The title 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":"width","type":"`null` \\| `number`","description":"The width of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"context","type":"[SharedContext](../../interfaces/inventory.SharedContext.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"manager","type":"`EntityManager`","description":"An instance of an entity manager.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager","type":"`EntityManager`","description":"An instance of a transaction manager.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[{"name":"Promise","type":"Promise<[InventoryItemDTO](../../types/inventory.InventoryItemDTO.mdx)[]>","optional":false,"defaultValue":"","description":"The created inventory items' details.","expandable":false,"children":[{"name":"InventoryItemDTO[]","type":"[InventoryItemDTO](../../types/inventory.InventoryItemDTO.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"InventoryItemDTO","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} />
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
---
|
||||
displayed_sidebar: inventoryReference
|
||||
slug: /references/inventory/createInventoryLevel
|
||||
sidebar_label: createInventoryLevel
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# createInventoryLevel - Inventory Module Reference
|
||||
|
||||
This documentation provides a reference to the `createInventoryLevel` method. This belongs to the Inventory Module.
|
||||
|
||||
This method is used to create inventory level.
|
||||
|
||||
## Example
|
||||
|
||||
```ts
|
||||
import {
|
||||
initialize as initializeInventoryModule,
|
||||
} from "@medusajs/inventory"
|
||||
|
||||
async function createInventoryLevel (item: {
|
||||
inventory_item_id: string
|
||||
location_id: string
|
||||
stocked_quantity: number
|
||||
}) {
|
||||
const inventoryModule = await initializeInventoryModule({})
|
||||
|
||||
const inventoryLevel = await inventoryModule.createInventoryLevel(
|
||||
item
|
||||
)
|
||||
|
||||
// do something with the inventory level or return it
|
||||
}
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[{"name":"data","type":"[CreateInventoryLevelInput](../../interfaces/inventory.CreateInventoryLevelInput.mdx)","description":"The details of the inventory level to create.","optional":false,"defaultValue":"","expandable":false,"children":[{"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":"incoming_quantity","type":"`number`","description":"The incoming quantity of the associated inventory item in the associated location.","optional":true,"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":"context","type":"[SharedContext](../../interfaces/inventory.SharedContext.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"manager","type":"`EntityManager`","description":"An instance of an entity manager.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager","type":"`EntityManager`","description":"An instance of a transaction manager.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[{"name":"Promise","type":"Promise<[InventoryLevelDTO](../../types/inventory.InventoryLevelDTO.mdx)>","optional":false,"defaultValue":"","description":"The created inventory level's details.","expandable":false,"children":[{"name":"created_at","type":"`string` \\| `Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`string` \\| `Date` \\| `null`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"incoming_quantity","type":"`number`","description":"the incoming stock quantity of an inventory item at the given location ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_item_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"the item location ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>` \\| `null`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reserved_quantity","type":"`number`","description":"the reserved stock quantity of an inventory item at the given location ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"stocked_quantity","type":"`number`","description":"the total stock quantity of an inventory item at the given location ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} />
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
---
|
||||
displayed_sidebar: inventoryReference
|
||||
slug: /references/inventory/createInventoryLevels
|
||||
sidebar_label: createInventoryLevels
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# createInventoryLevels - Inventory Module Reference
|
||||
|
||||
This documentation provides a reference to the `createInventoryLevels` method. This belongs to the Inventory Module.
|
||||
|
||||
This method is used to create inventory levels.
|
||||
|
||||
## Example
|
||||
|
||||
```ts
|
||||
import {
|
||||
initialize as initializeInventoryModule,
|
||||
} from "@medusajs/inventory"
|
||||
|
||||
async function createInventoryLevels (items: {
|
||||
inventory_item_id: string
|
||||
location_id: string
|
||||
stocked_quantity: number
|
||||
}[]) {
|
||||
const inventoryModule = await initializeInventoryModule({})
|
||||
|
||||
const inventoryLevels = await inventoryModule.createInventoryLevels(
|
||||
items
|
||||
)
|
||||
|
||||
// do something with the inventory levels or return them
|
||||
}
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[{"name":"data","type":"[CreateInventoryLevelInput](../../interfaces/inventory.CreateInventoryLevelInput.mdx)[]","description":"The details of the inventory levels to create.","optional":false,"defaultValue":"","expandable":false,"children":[{"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":"incoming_quantity","type":"`number`","description":"The incoming quantity of the associated inventory item in the associated location.","optional":true,"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":"context","type":"[SharedContext](../../interfaces/inventory.SharedContext.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"manager","type":"`EntityManager`","description":"An instance of an entity manager.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager","type":"`EntityManager`","description":"An instance of a transaction manager.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[{"name":"Promise","type":"Promise<[InventoryLevelDTO](../../types/inventory.InventoryLevelDTO.mdx)[]>","optional":false,"defaultValue":"","description":"The created inventory levels' details.","expandable":false,"children":[{"name":"InventoryLevelDTO[]","type":"[InventoryLevelDTO](../../types/inventory.InventoryLevelDTO.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"InventoryLevelDTO","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} />
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
---
|
||||
displayed_sidebar: inventoryReference
|
||||
slug: /references/inventory/createReservationItem
|
||||
sidebar_label: createReservationItem
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# createReservationItem - Inventory Module Reference
|
||||
|
||||
This documentation provides a reference to the `createReservationItem` method. This belongs to the Inventory Module.
|
||||
|
||||
This method is used to create a reservation item.
|
||||
|
||||
## Example
|
||||
|
||||
```ts
|
||||
import {
|
||||
initialize as initializeInventoryModule,
|
||||
} from "@medusajs/inventory"
|
||||
|
||||
async function createReservationItem (item: {
|
||||
inventory_item_id: string,
|
||||
location_id: string,
|
||||
quantity: number
|
||||
}) {
|
||||
const inventoryModule = await initializeInventoryModule({})
|
||||
|
||||
const reservationItem = await inventoryModule.createReservationItems(
|
||||
item
|
||||
)
|
||||
|
||||
// do something with the reservation item or return them
|
||||
}
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[{"name":"input","type":"[CreateReservationItemInput](../../interfaces/inventory.CreateReservationItemInput.mdx)","description":"The details of the reservation item to create.","optional":false,"defaultValue":"","expandable":false,"children":[{"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":"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":"description","type":"`string`","description":"The description of the reservation.","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":"line_item_id","type":"`string`","description":"The ID of the associated line 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":"context","type":"[SharedContext](../../interfaces/inventory.SharedContext.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"manager","type":"`EntityManager`","description":"An instance of an entity manager.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager","type":"`EntityManager`","description":"An instance of a transaction manager.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[{"name":"Promise","type":"Promise<[ReservationItemDTO](../../types/inventory.ReservationItemDTO.mdx)>","optional":false,"defaultValue":"","description":"The created reservation item's details.","expandable":false,"children":[{"name":"created_at","type":"`string` \\| `Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`string` \\| `Date` \\| `null`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The id of the reservation item","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_item_id","type":"`string`","description":"The id of the inventory item the reservation relates to","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The id of the location of the reservation","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>` \\| `null`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`number`","description":"The id of the reservation item","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`string` \\| `null`","description":"UserId of user who created the reservation item","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string` \\| `null`","description":"Description of the reservation item","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"line_item_id","type":"`string` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} />
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
---
|
||||
displayed_sidebar: inventoryReference
|
||||
slug: /references/inventory/createReservationItems
|
||||
sidebar_label: createReservationItems
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# createReservationItems - Inventory Module Reference
|
||||
|
||||
This documentation provides a reference to the `createReservationItems` method. This belongs to the Inventory Module.
|
||||
|
||||
This method is used to create reservation items.
|
||||
|
||||
## Example
|
||||
|
||||
```ts
|
||||
import {
|
||||
initialize as initializeInventoryModule,
|
||||
} from "@medusajs/inventory"
|
||||
|
||||
async function createReservationItems (items: {
|
||||
inventory_item_id: string,
|
||||
location_id: string,
|
||||
quantity: number
|
||||
}[]) {
|
||||
const inventoryModule = await initializeInventoryModule({})
|
||||
|
||||
const reservationItems = await inventoryModule.createReservationItems(
|
||||
items
|
||||
)
|
||||
|
||||
// do something with the reservation items or return them
|
||||
}
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[{"name":"input","type":"[CreateReservationItemInput](../../interfaces/inventory.CreateReservationItemInput.mdx)[]","description":"The details of the reservation items to create.","optional":false,"defaultValue":"","expandable":false,"children":[{"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":"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":"description","type":"`string`","description":"The description of the reservation.","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":"line_item_id","type":"`string`","description":"The ID of the associated line 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":"context","type":"[SharedContext](../../interfaces/inventory.SharedContext.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"manager","type":"`EntityManager`","description":"An instance of an entity manager.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager","type":"`EntityManager`","description":"An instance of a transaction manager.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[{"name":"Promise","type":"Promise<[ReservationItemDTO](../../types/inventory.ReservationItemDTO.mdx)[]>","optional":false,"defaultValue":"","description":"The created reservation items' details.","expandable":false,"children":[{"name":"ReservationItemDTO[]","type":"[ReservationItemDTO](../../types/inventory.ReservationItemDTO.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ReservationItemDTO","type":"`object`","description":"Represents a reservation of an inventory item at a stock location","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} />
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
---
|
||||
displayed_sidebar: inventoryReference
|
||||
slug: /references/inventory/deleteInventoryItem
|
||||
sidebar_label: deleteInventoryItem
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# deleteInventoryItem - Inventory Module Reference
|
||||
|
||||
This documentation provides a reference to the `deleteInventoryItem` method. This belongs to the Inventory Module.
|
||||
|
||||
This method is used to delete an inventory item or multiple inventory items. The inventory items are only soft deleted and can be restored using the
|
||||
[restoreInventoryItem](inventory.IInventoryService.restoreInventoryItem.mdx) method.
|
||||
|
||||
## Example
|
||||
|
||||
```ts
|
||||
import {
|
||||
initialize as initializeInventoryModule,
|
||||
} from "@medusajs/inventory"
|
||||
|
||||
async function deleteInventoryItem (
|
||||
inventoryItems: string[]
|
||||
) {
|
||||
const inventoryModule = await initializeInventoryModule({})
|
||||
|
||||
await inventoryModule.deleteInventoryItem(
|
||||
inventoryItems
|
||||
)
|
||||
}
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[{"name":"inventoryItemId","type":"`string` \\| `string`[]","description":"The ID(s) of the inventory item(s) to delete.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[SharedContext](../../interfaces/inventory.SharedContext.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"manager","type":"`EntityManager`","description":"An instance of an entity manager.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager","type":"`EntityManager`","description":"An instance of a transaction manager.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[{"name":"Promise","type":"Promise<void>","optional":false,"defaultValue":"","description":"Resolves when the inventory item(s) are successfully deleted.","expandable":false,"children":[]}]} />
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
---
|
||||
displayed_sidebar: inventoryReference
|
||||
slug: /references/inventory/deleteInventoryItemLevelByLocationId
|
||||
sidebar_label: deleteInventoryItemLevelByLocationId
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# deleteInventoryItemLevelByLocationId - Inventory Module Reference
|
||||
|
||||
This documentation provides a reference to the `deleteInventoryItemLevelByLocationId` method. This belongs to the Inventory Module.
|
||||
|
||||
This method deletes the inventory item level(s) for the ID(s) of associated location(s).
|
||||
|
||||
## Example
|
||||
|
||||
```ts
|
||||
import {
|
||||
initialize as initializeInventoryModule,
|
||||
} from "@medusajs/inventory"
|
||||
|
||||
async function deleteInventoryItemLevelByLocationId (
|
||||
locationIds: string[]
|
||||
) {
|
||||
const inventoryModule = await initializeInventoryModule({})
|
||||
|
||||
await inventoryModule.deleteInventoryItemLevelByLocationId(
|
||||
locationIds
|
||||
)
|
||||
}
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[{"name":"locationId","type":"`string` \\| `string`[]","description":"The ID(s) of the associated location(s).","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[SharedContext](../../interfaces/inventory.SharedContext.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"manager","type":"`EntityManager`","description":"An instance of an entity manager.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager","type":"`EntityManager`","description":"An instance of a transaction manager.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[{"name":"Promise","type":"Promise<void>","optional":false,"defaultValue":"","description":"Resolves when the inventory item level(s) are successfully restored.","expandable":false,"children":[]}]} />
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
---
|
||||
displayed_sidebar: inventoryReference
|
||||
slug: /references/inventory/deleteInventoryLevel
|
||||
sidebar_label: deleteInventoryLevel
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# deleteInventoryLevel - Inventory Module Reference
|
||||
|
||||
This documentation provides a reference to the `deleteInventoryLevel` method. This belongs to the Inventory Module.
|
||||
|
||||
This method is used to delete an inventory level. The inventory level is identified by the IDs of its associated inventory item and location.
|
||||
|
||||
## Example
|
||||
|
||||
```ts
|
||||
import {
|
||||
initialize as initializeInventoryModule,
|
||||
} from "@medusajs/inventory"
|
||||
|
||||
async function deleteInventoryLevel (
|
||||
inventoryItemId: string,
|
||||
locationId: string
|
||||
) {
|
||||
const inventoryModule = await initializeInventoryModule({})
|
||||
|
||||
await inventoryModule.deleteInventoryLevel(
|
||||
inventoryItemId,
|
||||
locationId
|
||||
)
|
||||
}
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[{"name":"inventoryItemId","type":"`string`","description":"The ID of the associated inventory item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"locationId","type":"`string`","description":"The ID of the associated location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[SharedContext](../../interfaces/inventory.SharedContext.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"manager","type":"`EntityManager`","description":"An instance of an entity manager.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager","type":"`EntityManager`","description":"An instance of a transaction manager.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[{"name":"Promise","type":"Promise<void>","optional":false,"defaultValue":"","description":"Resolves when the inventory level(s) are successfully restored.","expandable":false,"children":[]}]} />
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
---
|
||||
displayed_sidebar: inventoryReference
|
||||
slug: /references/inventory/deleteReservationItem
|
||||
sidebar_label: deleteReservationItem
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# deleteReservationItem - Inventory Module Reference
|
||||
|
||||
This documentation provides a reference to the `deleteReservationItem` method. This belongs to the Inventory Module.
|
||||
|
||||
This method is used to delete a reservation item or multiple reservation items by their IDs.
|
||||
|
||||
## Example
|
||||
|
||||
```ts
|
||||
import {
|
||||
initialize as initializeInventoryModule,
|
||||
} from "@medusajs/inventory"
|
||||
|
||||
async function deleteReservationItems (
|
||||
reservationItemIds: string[]
|
||||
) {
|
||||
const inventoryModule = await initializeInventoryModule({})
|
||||
|
||||
await inventoryModule.deleteReservationItem(
|
||||
reservationItemIds
|
||||
)
|
||||
}
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[{"name":"reservationItemId","type":"`string` \\| `string`[]","description":"The ID(s) of the reservation item(s) to delete.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[SharedContext](../../interfaces/inventory.SharedContext.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"manager","type":"`EntityManager`","description":"An instance of an entity manager.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager","type":"`EntityManager`","description":"An instance of a transaction manager.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[{"name":"Promise","type":"Promise<void>","optional":false,"defaultValue":"","description":"Resolves when the reservation item(s) are successfully deleted.","expandable":false,"children":[]}]} />
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
---
|
||||
displayed_sidebar: inventoryReference
|
||||
slug: /references/inventory/deleteReservationItemByLocationId
|
||||
sidebar_label: deleteReservationItemByLocationId
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# deleteReservationItemByLocationId - Inventory Module Reference
|
||||
|
||||
This documentation provides a reference to the `deleteReservationItemByLocationId` method. This belongs to the Inventory Module.
|
||||
|
||||
This method deletes reservation item(s) by the ID(s) of associated location(s).
|
||||
|
||||
## Example
|
||||
|
||||
```ts
|
||||
import {
|
||||
initialize as initializeInventoryModule,
|
||||
} from "@medusajs/inventory"
|
||||
|
||||
async function deleteReservationItemByLocationId (
|
||||
locationIds: string[]
|
||||
) {
|
||||
const inventoryModule = await initializeInventoryModule({})
|
||||
|
||||
await inventoryModule.deleteReservationItemByLocationId(
|
||||
locationIds
|
||||
)
|
||||
}
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[{"name":"locationId","type":"`string` \\| `string`[]","description":"The ID(s) of the associated location(s).","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[SharedContext](../../interfaces/inventory.SharedContext.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"manager","type":"`EntityManager`","description":"An instance of an entity manager.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager","type":"`EntityManager`","description":"An instance of a transaction manager.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[{"name":"Promise","type":"Promise<void>","optional":false,"defaultValue":"","description":"Resolves when the reservation item(s) are successfully restored.","expandable":false,"children":[]}]} />
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
---
|
||||
displayed_sidebar: inventoryReference
|
||||
slug: /references/inventory/deleteReservationItemsByLineItem
|
||||
sidebar_label: deleteReservationItemsByLineItem
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# deleteReservationItemsByLineItem - Inventory Module Reference
|
||||
|
||||
This documentation provides a reference to the `deleteReservationItemsByLineItem` method. This belongs to the Inventory Module.
|
||||
|
||||
This method is used to delete the reservation items associated with a line item or multiple line items.
|
||||
|
||||
## Example
|
||||
|
||||
```ts
|
||||
import {
|
||||
initialize as initializeInventoryModule,
|
||||
} from "@medusajs/inventory"
|
||||
|
||||
async function deleteReservationItemsByLineItem (
|
||||
lineItemIds: string[]
|
||||
) {
|
||||
const inventoryModule = await initializeInventoryModule({})
|
||||
|
||||
await inventoryModule.deleteReservationItemsByLineItem(
|
||||
lineItemIds
|
||||
)
|
||||
}
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[{"name":"lineItemId","type":"`string` \\| `string`[]","description":"The ID(s) of the line item(s).","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[SharedContext](../../interfaces/inventory.SharedContext.mdx)","description":"A context used to share re9sources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"manager","type":"`EntityManager`","description":"An instance of an entity manager.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager","type":"`EntityManager`","description":"An instance of a transaction manager.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[{"name":"Promise","type":"Promise<void>","optional":false,"defaultValue":"","description":"Resolves when the reservation items are successfully deleted.","expandable":false,"children":[]}]} />
|
||||
+83
@@ -0,0 +1,83 @@
|
||||
---
|
||||
displayed_sidebar: inventoryReference
|
||||
slug: /references/inventory/listInventoryItems
|
||||
sidebar_label: listInventoryItems
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# listInventoryItems - Inventory Module Reference
|
||||
|
||||
This documentation provides a reference to the `listInventoryItems` method. This belongs to the Inventory Module.
|
||||
|
||||
This method is used to retrieve a paginated list of inventory items along with the total count of available inventory items satisfying the provided filters.
|
||||
|
||||
## Example
|
||||
|
||||
To retrieve a list of inventory items using their IDs:
|
||||
|
||||
```ts
|
||||
import {
|
||||
initialize as initializeInventoryModule,
|
||||
} from "@medusajs/inventory"
|
||||
|
||||
async function retrieveInventoryItems (ids: string[]) {
|
||||
const inventoryModule = await initializeInventoryModule({})
|
||||
|
||||
const [inventoryItems, count] = await inventoryModule.listInventoryItems({
|
||||
id: ids
|
||||
})
|
||||
|
||||
// do something with the inventory items or return them
|
||||
}
|
||||
```
|
||||
|
||||
To specify relations that should be retrieved within the inventory items:
|
||||
|
||||
```ts
|
||||
import {
|
||||
initialize as initializeInventoryModule,
|
||||
} from "@medusajs/inventory"
|
||||
|
||||
async function retrieveInventoryItems (ids: string[]) {
|
||||
const inventoryModule = await initializeInventoryModule({})
|
||||
|
||||
const [inventoryItems, count] = await inventoryModule.listInventoryItems({
|
||||
id: ids
|
||||
}, {
|
||||
relations: ["inventory_level"]
|
||||
})
|
||||
|
||||
// do something with the inventory items or return them
|
||||
}
|
||||
```
|
||||
|
||||
By default, only the first `10` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
|
||||
|
||||
```ts
|
||||
import {
|
||||
initialize as initializeInventoryModule,
|
||||
} from "@medusajs/inventory"
|
||||
|
||||
async function retrieveInventoryItems (ids: string[], skip: number, take: number) {
|
||||
const inventoryModule = await initializeInventoryModule({})
|
||||
|
||||
const [inventoryItems, count] = await inventoryModule.listInventoryItems({
|
||||
id: ids
|
||||
}, {
|
||||
relations: ["inventory_level"],
|
||||
skip,
|
||||
take
|
||||
})
|
||||
|
||||
// do something with the inventory items or return them
|
||||
}
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[{"name":"selector","type":"[FilterableInventoryItemProps](../../interfaces/inventory.FilterableInventoryItemProps.mdx)","description":"The filters to apply on the retrieved inventory items.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"hs_code","type":"`string` \\| `string`[] \\| [StringComparisonOperator](../../interfaces/inventory.StringComparisonOperator.mdx)","description":"The HS Codes to filter inventory items by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"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":"origin_country","type":"`string` \\| `string`[]","description":"The origin country to filter inventory items by.","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":"requires_shipping","type":"`boolean`","description":"Filter inventory items by whether they require shipping.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sku","type":"`string` \\| `string`[] \\| [StringComparisonOperator](../../interfaces/inventory.StringComparisonOperator.mdx)","description":"The SKUs to filter inventory items by.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"config","type":"[FindConfig](../../interfaces/inventory.FindConfig.mdx)<[InventoryItemDTO](../../types/inventory.InventoryItemDTO.mdx)>","description":"The configurations determining how the inventory items are retrieved. Its properties, such as `select` or `relations`, accept the\nattributes or relations associated with a inventory item.","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":"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":"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":"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":[]}]},{"name":"context","type":"[SharedContext](../../interfaces/inventory.SharedContext.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"manager","type":"`EntityManager`","description":"An instance of an entity manager.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager","type":"`EntityManager`","description":"An instance of a transaction manager.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[{"name":"Promise","type":"Promise<[[InventoryItemDTO](../../types/inventory.InventoryItemDTO.mdx)[], number]>","optional":false,"defaultValue":"","description":"The list of inventory items along with the total count.","expandable":false,"children":[{"name":"InventoryItemDTO[]","type":"[InventoryItemDTO](../../types/inventory.InventoryItemDTO.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]},{"name":"number","type":"`number`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} />
|
||||
+83
@@ -0,0 +1,83 @@
|
||||
---
|
||||
displayed_sidebar: inventoryReference
|
||||
slug: /references/inventory/listInventoryLevels
|
||||
sidebar_label: listInventoryLevels
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# listInventoryLevels - Inventory Module Reference
|
||||
|
||||
This documentation provides a reference to the `listInventoryLevels` method. This belongs to the Inventory Module.
|
||||
|
||||
This method is used to retrieve a paginated list of inventory levels along with the total count of available inventory levels satisfying the provided filters.
|
||||
|
||||
## Example
|
||||
|
||||
To retrieve a list of inventory levels using their IDs:
|
||||
|
||||
```ts
|
||||
import {
|
||||
initialize as initializeInventoryModule,
|
||||
} from "@medusajs/inventory"
|
||||
|
||||
async function retrieveInventoryLevels (inventoryItemIds: string[]) {
|
||||
const inventoryModule = await initializeInventoryModule({})
|
||||
|
||||
const [inventoryLevels, count] = await inventoryModule.listInventoryLevels({
|
||||
inventory_item_id: inventoryItemIds
|
||||
})
|
||||
|
||||
// do something with the inventory levels or return them
|
||||
}
|
||||
```
|
||||
|
||||
To specify relations that should be retrieved within the inventory levels:
|
||||
|
||||
```ts
|
||||
import {
|
||||
initialize as initializeInventoryModule,
|
||||
} from "@medusajs/inventory"
|
||||
|
||||
async function retrieveInventoryLevels (inventoryItemIds: string[]) {
|
||||
const inventoryModule = await initializeInventoryModule({})
|
||||
|
||||
const [inventoryLevels, count] = await inventoryModule.listInventoryLevels({
|
||||
inventory_item_id: inventoryItemIds
|
||||
}, {
|
||||
relations: ["inventory_item"]
|
||||
})
|
||||
|
||||
// do something with the inventory levels or return them
|
||||
}
|
||||
```
|
||||
|
||||
By default, only the first `10` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
|
||||
|
||||
```ts
|
||||
import {
|
||||
initialize as initializeInventoryModule,
|
||||
} from "@medusajs/inventory"
|
||||
|
||||
async function retrieveInventoryLevels (inventoryItemIds: string[], skip: number, take: number) {
|
||||
const inventoryModule = await initializeInventoryModule({})
|
||||
|
||||
const [inventoryLevels, count] = await inventoryModule.listInventoryLevels({
|
||||
inventory_item_id: inventoryItemIds
|
||||
}, {
|
||||
relations: ["inventory_item"],
|
||||
skip,
|
||||
take
|
||||
})
|
||||
|
||||
// do something with the inventory levels or return them
|
||||
}
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[{"name":"selector","type":"[FilterableInventoryLevelProps](../../interfaces/inventory.FilterableInventoryLevelProps.mdx)","description":"The filters to apply on the retrieved inventory levels.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"incoming_quantity","type":"`number` \\| [NumericalComparisonOperator](../../interfaces/inventory.NumericalComparisonOperator.mdx)","description":"Filters to apply on inventory levels' `incoming_quantity` attribute.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"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":"reserved_quantity","type":"`number` \\| [NumericalComparisonOperator](../../interfaces/inventory.NumericalComparisonOperator.mdx)","description":"Filters to apply on inventory levels' `reserved_quantity` attribute.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"stocked_quantity","type":"`number` \\| [NumericalComparisonOperator](../../interfaces/inventory.NumericalComparisonOperator.mdx)","description":"Filters to apply on inventory levels' `stocked_quantity` attribute.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"config","type":"[FindConfig](../../interfaces/inventory.FindConfig.mdx)<[InventoryLevelDTO](../../types/inventory.InventoryLevelDTO.mdx)>","description":"The configurations determining how the inventory levels are retrieved. Its properties, such as `select` or `relations`, accept the\nattributes or relations associated with a inventory level.","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":"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":"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":"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":[]}]},{"name":"context","type":"[SharedContext](../../interfaces/inventory.SharedContext.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"manager","type":"`EntityManager`","description":"An instance of an entity manager.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager","type":"`EntityManager`","description":"An instance of a transaction manager.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[{"name":"Promise","type":"Promise<[[InventoryLevelDTO](../../types/inventory.InventoryLevelDTO.mdx)[], number]>","optional":false,"defaultValue":"","description":"The list of inventory levels along with the total count.","expandable":false,"children":[{"name":"InventoryLevelDTO[]","type":"[InventoryLevelDTO](../../types/inventory.InventoryLevelDTO.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]},{"name":"number","type":"`number`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} />
|
||||
+83
@@ -0,0 +1,83 @@
|
||||
---
|
||||
displayed_sidebar: inventoryReference
|
||||
slug: /references/inventory/listReservationItems
|
||||
sidebar_label: listReservationItems
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# listReservationItems - Inventory Module Reference
|
||||
|
||||
This documentation provides a reference to the `listReservationItems` method. This belongs to the Inventory Module.
|
||||
|
||||
This method is used to retrieve a paginated list of reservation items along with the total count of available reservation items satisfying the provided filters.
|
||||
|
||||
## Example
|
||||
|
||||
To retrieve a list of reservation items using their IDs:
|
||||
|
||||
```ts
|
||||
import {
|
||||
initialize as initializeInventoryModule,
|
||||
} from "@medusajs/inventory"
|
||||
|
||||
async function retrieveReservationItems (ids: string[]) {
|
||||
const inventoryModule = await initializeInventoryModule({})
|
||||
|
||||
const [reservationItems, count] = await inventoryModule.listReservationItems({
|
||||
id: ids
|
||||
})
|
||||
|
||||
// do something with the reservation items or return them
|
||||
}
|
||||
```
|
||||
|
||||
To specify relations that should be retrieved within the reservation items:
|
||||
|
||||
```ts
|
||||
import {
|
||||
initialize as initializeInventoryModule,
|
||||
} from "@medusajs/inventory"
|
||||
|
||||
async function retrieveReservationItems (ids: string[]) {
|
||||
const inventoryModule = await initializeInventoryModule({})
|
||||
|
||||
const [reservationItems, count] = await inventoryModule.listReservationItems({
|
||||
id: ids
|
||||
}, {
|
||||
relations: ["inventory_item"]
|
||||
})
|
||||
|
||||
// do something with the reservation items or return them
|
||||
}
|
||||
```
|
||||
|
||||
By default, only the first `10` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
|
||||
|
||||
```ts
|
||||
import {
|
||||
initialize as initializeInventoryModule,
|
||||
} from "@medusajs/inventory"
|
||||
|
||||
async function retrieveReservationItems (ids: string[], skip: number, take: number) {
|
||||
const inventoryModule = await initializeInventoryModule({})
|
||||
|
||||
const [reservationItems, count] = await inventoryModule.listReservationItems({
|
||||
id: ids
|
||||
}, {
|
||||
relations: ["inventory_item"],
|
||||
skip,
|
||||
take
|
||||
})
|
||||
|
||||
// do something with the reservation items or return them
|
||||
}
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[{"name":"selector","type":"[FilterableReservationItemProps](../../interfaces/inventory.FilterableReservationItemProps.mdx)","description":"The filters to apply on the retrieved reservation items.","optional":false,"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":"description","type":"`string` \\| [StringComparisonOperator](../../interfaces/inventory.StringComparisonOperator.mdx)","description":"Description filters to apply on the reservation items' `description` attribute.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[]","description":"The IDs to filter reservation items by.","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":"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":"location_id","type":"`string` \\| `string`[]","description":"Filter reservation items by the ID of their associated location.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`number` \\| [NumericalComparisonOperator](../../interfaces/inventory.NumericalComparisonOperator.mdx)","description":"Filters to apply on the reservation items' `quantity` attribute.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"config","type":"[FindConfig](../../interfaces/inventory.FindConfig.mdx)<[ReservationItemDTO](../../types/inventory.ReservationItemDTO.mdx)>","description":"The configurations determining how the reservation items are retrieved. Its properties, such as `select` or `relations`, accept the\nattributes or relations associated with a reservation item.","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":"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":"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":"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":[]}]},{"name":"context","type":"[SharedContext](../../interfaces/inventory.SharedContext.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"manager","type":"`EntityManager`","description":"An instance of an entity manager.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager","type":"`EntityManager`","description":"An instance of a transaction manager.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[{"name":"Promise","type":"Promise<[[ReservationItemDTO](../../types/inventory.ReservationItemDTO.mdx)[], number]>","optional":false,"defaultValue":"","description":"The list of reservation items along with the total count.","expandable":false,"children":[{"name":"ReservationItemDTO[]","type":"[ReservationItemDTO](../../types/inventory.ReservationItemDTO.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]},{"name":"number","type":"`number`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} />
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
---
|
||||
displayed_sidebar: inventoryReference
|
||||
slug: /references/inventory/restoreInventoryItem
|
||||
sidebar_label: restoreInventoryItem
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# restoreInventoryItem - Inventory Module Reference
|
||||
|
||||
This documentation provides a reference to the `restoreInventoryItem` method. This belongs to the Inventory Module.
|
||||
|
||||
This method is used to restore an inventory item or multiple inventory items that were previously deleted using the [deleteInventoryItem](inventory.IInventoryService.deleteInventoryItem.mdx) method.
|
||||
|
||||
## Example
|
||||
|
||||
```ts
|
||||
import {
|
||||
initialize as initializeInventoryModule,
|
||||
} from "@medusajs/inventory"
|
||||
|
||||
async function restoreInventoryItem (
|
||||
inventoryItems: string[]
|
||||
) {
|
||||
const inventoryModule = await initializeInventoryModule({})
|
||||
|
||||
await inventoryModule.restoreInventoryItem(
|
||||
inventoryItems
|
||||
)
|
||||
}
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[{"name":"inventoryItemId","type":"`string` \\| `string`[]","description":"The ID(s) of the inventory item(s) to restore.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[SharedContext](../../interfaces/inventory.SharedContext.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"manager","type":"`EntityManager`","description":"An instance of an entity manager.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager","type":"`EntityManager`","description":"An instance of a transaction manager.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[{"name":"Promise","type":"Promise<void>","optional":false,"defaultValue":"","description":"Resolves when the inventory item(s) are successfully restored.","expandable":false,"children":[]}]} />
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
---
|
||||
displayed_sidebar: inventoryReference
|
||||
slug: /references/inventory/retrieveAvailableQuantity
|
||||
sidebar_label: retrieveAvailableQuantity
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# retrieveAvailableQuantity - Inventory Module Reference
|
||||
|
||||
This documentation provides a reference to the `retrieveAvailableQuantity` method. This belongs to the Inventory Module.
|
||||
|
||||
This method is used to retrieve the available quantity of an inventory item within the specified locations.
|
||||
|
||||
## Example
|
||||
|
||||
```ts
|
||||
import {
|
||||
initialize as initializeInventoryModule,
|
||||
} from "@medusajs/inventory"
|
||||
|
||||
async function retrieveAvailableQuantity (
|
||||
inventoryItemId: string,
|
||||
locationIds: string[],
|
||||
) {
|
||||
const inventoryModule = await initializeInventoryModule({})
|
||||
|
||||
const quantity = await inventoryModule.retrieveAvailableQuantity(
|
||||
inventoryItemId,
|
||||
locationIds,
|
||||
)
|
||||
|
||||
// do something with the quantity or return it
|
||||
}
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[{"name":"inventoryItemId","type":"`string`","description":"The ID of the inventory item to retrieve its quantity.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"locationIds","type":"`string`[]","description":"The IDs of the locations to retrieve the available quantity from.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[SharedContext](../../interfaces/inventory.SharedContext.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"manager","type":"`EntityManager`","description":"An instance of an entity manager.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager","type":"`EntityManager`","description":"An instance of a transaction manager.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[{"name":"Promise","type":"Promise<number>","optional":false,"defaultValue":"","description":"The available quantity of the inventory item in the specified locations.","expandable":false,"children":[{"name":"number","type":"`number`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} />
|
||||
+57
@@ -0,0 +1,57 @@
|
||||
---
|
||||
displayed_sidebar: inventoryReference
|
||||
slug: /references/inventory/retrieveInventoryItem
|
||||
sidebar_label: retrieveInventoryItem
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# retrieveInventoryItem - Inventory Module Reference
|
||||
|
||||
This documentation provides a reference to the `retrieveInventoryItem` method. This belongs to the Inventory Module.
|
||||
|
||||
This method is used to retrieve an inventory item by its ID
|
||||
|
||||
## Example
|
||||
|
||||
A simple example that retrieves a inventory item by its ID:
|
||||
|
||||
```ts
|
||||
import {
|
||||
initialize as initializeInventoryModule,
|
||||
} from "@medusajs/inventory"
|
||||
|
||||
async function retrieveInventoryItem (id: string) {
|
||||
const inventoryModule = await initializeInventoryModule({})
|
||||
|
||||
const inventoryItem = await inventoryModule.retrieveInventoryItem(id)
|
||||
|
||||
// do something with the inventory item or return it
|
||||
}
|
||||
```
|
||||
|
||||
To specify relations that should be retrieved:
|
||||
|
||||
```ts
|
||||
import {
|
||||
initialize as initializeInventoryModule,
|
||||
} from "@medusajs/inventory"
|
||||
|
||||
async function retrieveInventoryItem (id: string) {
|
||||
const inventoryModule = await initializeInventoryModule({})
|
||||
|
||||
const inventoryItem = await inventoryModule.retrieveInventoryItem(id, {
|
||||
relations: ["inventory_level"]
|
||||
})
|
||||
|
||||
// do something with the inventory item or return it
|
||||
}
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[{"name":"inventoryItemId","type":"`string`","description":"The ID of the inventory item to retrieve.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../interfaces/inventory.FindConfig.mdx)<[InventoryItemDTO](../../types/inventory.InventoryItemDTO.mdx)>","description":"The configurations determining how the inventory item is retrieved. Its properties, such as `select` or `relations`, accept the\nattributes or relations associated with a inventory item.","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":"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":"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":"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":[]}]},{"name":"context","type":"[SharedContext](../../interfaces/inventory.SharedContext.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"manager","type":"`EntityManager`","description":"An instance of an entity manager.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager","type":"`EntityManager`","description":"An instance of a transaction manager.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[{"name":"Promise","type":"Promise<[InventoryItemDTO](../../types/inventory.InventoryItemDTO.mdx)>","optional":false,"defaultValue":"","description":"The retrieved inventory item.","expandable":false,"children":[{"name":"created_at","type":"`string` \\| `Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`string` \\| `Date` \\| `null`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The inventory item's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"requires_shipping","type":"`boolean`","description":"Whether the item requires shipping.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string` \\| `null`","description":"Description of the inventory item","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"height","type":"`number` \\| `null`","description":"The height of the Inventory Item. May be used in shipping rate calculations.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"hs_code","type":"`string` \\| `null`","description":"The Harmonized System code of the Inventory Item. May be used by Fulfillment Providers to pass customs information to shipping carriers.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"length","type":"`number` \\| `null`","description":"The length of the Inventory Item. May be used in shipping rate calculations.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"material","type":"`string` \\| `null`","description":"The material and composition that the Inventory Item is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>` \\| `null`","description":"An optional key-value map with additional details","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"mid_code","type":"`string` \\| `null`","description":"The Manufacturers Identification code that identifies the manufacturer of the Inventory Item. May be used by Fulfillment Providers to pass customs information to shipping carriers.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"origin_country","type":"`string` \\| `null`","description":"The country in which the Inventory Item was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sku","type":"`string` \\| `null`","description":"The Stock Keeping Unit (SKU) code of the Inventory Item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"thumbnail","type":"`string` \\| `null`","description":"Thumbnail for the inventory item","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string` \\| `null`","description":"Title of the inventory item","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"weight","type":"`number` \\| `null`","description":"The weight of the Inventory Item. May be used in shipping rate calculations.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"width","type":"`number` \\| `null`","description":"The width of the Inventory Item. May be used in shipping rate calculations.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} />
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
---
|
||||
displayed_sidebar: inventoryReference
|
||||
slug: /references/inventory/retrieveInventoryLevel
|
||||
sidebar_label: retrieveInventoryLevel
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# retrieveInventoryLevel - Inventory Module Reference
|
||||
|
||||
This documentation provides a reference to the `retrieveInventoryLevel` method. This belongs to the Inventory Module.
|
||||
|
||||
This method is used to retrieve an inventory level for an inventory item and a location.
|
||||
|
||||
## Example
|
||||
|
||||
```ts
|
||||
import {
|
||||
initialize as initializeInventoryModule,
|
||||
} from "@medusajs/inventory"
|
||||
|
||||
async function retrieveInventoryLevel (
|
||||
inventoryItemId: string,
|
||||
locationId: string
|
||||
) {
|
||||
const inventoryModule = await initializeInventoryModule({})
|
||||
|
||||
const inventoryLevel = await inventoryModule.retrieveInventoryLevel(
|
||||
inventoryItemId,
|
||||
locationId
|
||||
)
|
||||
|
||||
// do something with the inventory level or return it
|
||||
}
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[{"name":"inventoryItemId","type":"`string`","description":"The ID of the inventory item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"locationId","type":"`string`","description":"The ID of the location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[SharedContext](../../interfaces/inventory.SharedContext.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"manager","type":"`EntityManager`","description":"An instance of an entity manager.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager","type":"`EntityManager`","description":"An instance of a transaction manager.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[{"name":"Promise","type":"Promise<[InventoryLevelDTO](../../types/inventory.InventoryLevelDTO.mdx)>","optional":false,"defaultValue":"","description":"The retrieved inventory level.","expandable":false,"children":[{"name":"created_at","type":"`string` \\| `Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`string` \\| `Date` \\| `null`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"incoming_quantity","type":"`number`","description":"the incoming stock quantity of an inventory item at the given location ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_item_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"the item location ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>` \\| `null`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reserved_quantity","type":"`number`","description":"the reserved stock quantity of an inventory item at the given location ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"stocked_quantity","type":"`number`","description":"the total stock quantity of an inventory item at the given location ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} />
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
---
|
||||
displayed_sidebar: inventoryReference
|
||||
slug: /references/inventory/retrieveReservationItem
|
||||
sidebar_label: retrieveReservationItem
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# retrieveReservationItem - Inventory Module Reference
|
||||
|
||||
This documentation provides a reference to the `retrieveReservationItem` method. This belongs to the Inventory Module.
|
||||
|
||||
This method is used to retrieve a reservation item by its ID.
|
||||
|
||||
## Example
|
||||
|
||||
```ts
|
||||
import {
|
||||
initialize as initializeInventoryModule,
|
||||
} from "@medusajs/inventory"
|
||||
|
||||
async function retrieveReservationItem (id: string) {
|
||||
const inventoryModule = await initializeInventoryModule({})
|
||||
|
||||
const reservationItem = await inventoryModule.retrieveReservationItem(id)
|
||||
|
||||
// do something with the reservation item or return it
|
||||
}
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[{"name":"reservationId","type":"`string`","description":"The ID of the reservation item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[SharedContext](../../interfaces/inventory.SharedContext.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"manager","type":"`EntityManager`","description":"An instance of an entity manager.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager","type":"`EntityManager`","description":"An instance of a transaction manager.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[{"name":"Promise","type":"Promise<[ReservationItemDTO](../../types/inventory.ReservationItemDTO.mdx)>","optional":false,"defaultValue":"","description":"The retrieved reservation item.","expandable":false,"children":[{"name":"created_at","type":"`string` \\| `Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`string` \\| `Date` \\| `null`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The id of the reservation item","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_item_id","type":"`string`","description":"The id of the inventory item the reservation relates to","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The id of the location of the reservation","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>` \\| `null`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`number`","description":"The id of the reservation item","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`string` \\| `null`","description":"UserId of user who created the reservation item","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string` \\| `null`","description":"Description of the reservation item","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"line_item_id","type":"`string` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} />
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
---
|
||||
displayed_sidebar: inventoryReference
|
||||
slug: /references/inventory/retrieveReservedQuantity
|
||||
sidebar_label: retrieveReservedQuantity
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# retrieveReservedQuantity - Inventory Module Reference
|
||||
|
||||
This documentation provides a reference to the `retrieveReservedQuantity` method. This belongs to the Inventory Module.
|
||||
|
||||
This method is used to retrieve the reserved quantity of an inventory item within the specified locations.
|
||||
|
||||
## Example
|
||||
|
||||
```ts
|
||||
import {
|
||||
initialize as initializeInventoryModule,
|
||||
} from "@medusajs/inventory"
|
||||
|
||||
async function retrieveReservedQuantity (
|
||||
inventoryItemId: string,
|
||||
locationIds: string[],
|
||||
) {
|
||||
const inventoryModule = await initializeInventoryModule({})
|
||||
|
||||
const quantity = await inventoryModule.retrieveReservedQuantity(
|
||||
inventoryItemId,
|
||||
locationIds,
|
||||
)
|
||||
|
||||
// do something with the quantity or return it
|
||||
}
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[{"name":"inventoryItemId","type":"`string`","description":"The ID of the inventory item to retrieve its reserved quantity.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"locationIds","type":"`string`[]","description":"The IDs of the locations to retrieve the reserved quantity from.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[SharedContext](../../interfaces/inventory.SharedContext.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"manager","type":"`EntityManager`","description":"An instance of an entity manager.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager","type":"`EntityManager`","description":"An instance of a transaction manager.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[{"name":"Promise","type":"Promise<number>","optional":false,"defaultValue":"","description":"The reserved quantity of the inventory item in the specified locations.","expandable":false,"children":[{"name":"number","type":"`number`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} />
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
---
|
||||
displayed_sidebar: inventoryReference
|
||||
slug: /references/inventory/retrieveStockedQuantity
|
||||
sidebar_label: retrieveStockedQuantity
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# retrieveStockedQuantity - Inventory Module Reference
|
||||
|
||||
This documentation provides a reference to the `retrieveStockedQuantity` method. This belongs to the Inventory Module.
|
||||
|
||||
This method is used to retrieve the stocked quantity of an inventory item within the specified locations.
|
||||
|
||||
## Example
|
||||
|
||||
```ts
|
||||
import {
|
||||
initialize as initializeInventoryModule,
|
||||
} from "@medusajs/inventory"
|
||||
|
||||
async function retrieveStockedQuantity (
|
||||
inventoryItemId: string,
|
||||
locationIds: string[],
|
||||
) {
|
||||
const inventoryModule = await initializeInventoryModule({})
|
||||
|
||||
const quantity = await inventoryModule.retrieveStockedQuantity(
|
||||
inventoryItemId,
|
||||
locationIds,
|
||||
)
|
||||
|
||||
// do something with the quantity or return it
|
||||
}
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[{"name":"inventoryItemId","type":"`string`","description":"The ID of the inventory item to retrieve its stocked quantity.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"locationIds","type":"`string`[]","description":"The IDs of the locations to retrieve the stocked quantity from.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[SharedContext](../../interfaces/inventory.SharedContext.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"manager","type":"`EntityManager`","description":"An instance of an entity manager.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager","type":"`EntityManager`","description":"An instance of a transaction manager.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[{"name":"Promise","type":"Promise<number>","optional":false,"defaultValue":"","description":"The stocked quantity of the inventory item in the specified locations.","expandable":false,"children":[{"name":"number","type":"`number`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} />
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
---
|
||||
displayed_sidebar: inventoryReference
|
||||
slug: /references/inventory/updateInventoryItem
|
||||
sidebar_label: updateInventoryItem
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# updateInventoryItem - Inventory Module Reference
|
||||
|
||||
This documentation provides a reference to the `updateInventoryItem` method. This belongs to the Inventory Module.
|
||||
|
||||
This method is used to update an inventory item.
|
||||
|
||||
## Example
|
||||
|
||||
```ts
|
||||
import {
|
||||
initialize as initializeInventoryModule,
|
||||
} from "@medusajs/inventory"
|
||||
|
||||
async function updateInventoryItem (
|
||||
inventoryItemId: string,
|
||||
sku: string
|
||||
) {
|
||||
const inventoryModule = await initializeInventoryModule({})
|
||||
|
||||
const inventoryItem = await inventoryModule.updateInventoryItem(
|
||||
inventoryItemId,
|
||||
{
|
||||
sku
|
||||
}
|
||||
)
|
||||
|
||||
// do something with the inventory item or return it
|
||||
}
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[{"name":"inventoryItemId","type":"`string`","description":"The ID of the inventory item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"input","type":"Partial<[CreateInventoryItemInput](../../interfaces/inventory.CreateInventoryItemInput.mdx)>","description":"The attributes to update in the inventory item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"description","type":"`null` \\| `string`","description":"The description 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":"hs_code","type":"`null` \\| `string`","description":"The HS code 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":"material","type":"`null` \\| `string`","description":"The material 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":"mid_code","type":"`null` \\| `string`","description":"The MID code 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":"requires_shipping","type":"`boolean`","description":"Whether the inventory item requires shipping.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sku","type":"`null` \\| `string`","description":"The SKU 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":"title","type":"`null` \\| `string`","description":"The title 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":"width","type":"`null` \\| `number`","description":"The width of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"context","type":"[SharedContext](../../interfaces/inventory.SharedContext.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"manager","type":"`EntityManager`","description":"An instance of an entity manager.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager","type":"`EntityManager`","description":"An instance of a transaction manager.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[{"name":"Promise","type":"Promise<[InventoryItemDTO](../../types/inventory.InventoryItemDTO.mdx)>","optional":false,"defaultValue":"","description":"The updated inventory item's details.","expandable":false,"children":[{"name":"created_at","type":"`string` \\| `Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`string` \\| `Date` \\| `null`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The inventory item's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"requires_shipping","type":"`boolean`","description":"Whether the item requires shipping.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string` \\| `null`","description":"Description of the inventory item","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"height","type":"`number` \\| `null`","description":"The height of the Inventory Item. May be used in shipping rate calculations.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"hs_code","type":"`string` \\| `null`","description":"The Harmonized System code of the Inventory Item. May be used by Fulfillment Providers to pass customs information to shipping carriers.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"length","type":"`number` \\| `null`","description":"The length of the Inventory Item. May be used in shipping rate calculations.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"material","type":"`string` \\| `null`","description":"The material and composition that the Inventory Item is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>` \\| `null`","description":"An optional key-value map with additional details","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"mid_code","type":"`string` \\| `null`","description":"The Manufacturers Identification code that identifies the manufacturer of the Inventory Item. May be used by Fulfillment Providers to pass customs information to shipping carriers.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"origin_country","type":"`string` \\| `null`","description":"The country in which the Inventory Item was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sku","type":"`string` \\| `null`","description":"The Stock Keeping Unit (SKU) code of the Inventory Item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"thumbnail","type":"`string` \\| `null`","description":"Thumbnail for the inventory item","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string` \\| `null`","description":"Title of the inventory item","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"weight","type":"`number` \\| `null`","description":"The weight of the Inventory Item. May be used in shipping rate calculations.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"width","type":"`number` \\| `null`","description":"The width of the Inventory Item. May be used in shipping rate calculations.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} />
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
---
|
||||
displayed_sidebar: inventoryReference
|
||||
slug: /references/inventory/updateInventoryLevel
|
||||
sidebar_label: updateInventoryLevel
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# updateInventoryLevel - Inventory Module Reference
|
||||
|
||||
This documentation provides a reference to the `updateInventoryLevel` method. This belongs to the Inventory Module.
|
||||
|
||||
This method is used to update an inventory level. The inventory level is identified by the IDs of its associated inventory item and location.
|
||||
|
||||
## Example
|
||||
|
||||
```ts
|
||||
import {
|
||||
initialize as initializeInventoryModule,
|
||||
} from "@medusajs/inventory"
|
||||
|
||||
async function updateInventoryLevel (
|
||||
inventoryItemId: string,
|
||||
locationId: string,
|
||||
stockedQuantity: number
|
||||
) {
|
||||
const inventoryModule = await initializeInventoryModule({})
|
||||
|
||||
const inventoryLevel = await inventoryModule.updateInventoryLevels(
|
||||
inventoryItemId,
|
||||
locationId,
|
||||
{
|
||||
stocked_quantity: stockedQuantity
|
||||
}
|
||||
)
|
||||
|
||||
// do something with the inventory level or return it
|
||||
}
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[{"name":"inventoryItemId","type":"`string`","description":"The ID of the inventory item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"locationId","type":"`string`","description":"The ID of the location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"update","type":"[UpdateInventoryLevelInput](../../interfaces/inventory.UpdateInventoryLevelInput.mdx)","description":"The attributes to update in the location level.","optional":false,"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":[]},{"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":"context","type":"[SharedContext](../../interfaces/inventory.SharedContext.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"manager","type":"`EntityManager`","description":"An instance of an entity manager.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager","type":"`EntityManager`","description":"An instance of a transaction manager.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[{"name":"Promise","type":"Promise<[InventoryLevelDTO](../../types/inventory.InventoryLevelDTO.mdx)>","optional":false,"defaultValue":"","description":"The updated inventory level's details.","expandable":false,"children":[{"name":"created_at","type":"`string` \\| `Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`string` \\| `Date` \\| `null`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"incoming_quantity","type":"`number`","description":"the incoming stock quantity of an inventory item at the given location ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_item_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"the item location ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>` \\| `null`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reserved_quantity","type":"`number`","description":"the reserved stock quantity of an inventory item at the given location ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"stocked_quantity","type":"`number`","description":"the total stock quantity of an inventory item at the given location ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} />
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
---
|
||||
displayed_sidebar: inventoryReference
|
||||
slug: /references/inventory/updateInventoryLevels
|
||||
sidebar_label: updateInventoryLevels
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# updateInventoryLevels - Inventory Module Reference
|
||||
|
||||
This documentation provides a reference to the `updateInventoryLevels` method. This belongs to the Inventory Module.
|
||||
|
||||
This method is used to update inventory levels. Each inventory level is identified by the IDs of its associated inventory item and location.
|
||||
|
||||
## Example
|
||||
|
||||
```ts
|
||||
import {
|
||||
initialize as initializeInventoryModule,
|
||||
} from "@medusajs/inventory"
|
||||
|
||||
async function updateInventoryLevels (items: {
|
||||
inventory_item_id: string,
|
||||
location_id: string,
|
||||
stocked_quantity: number
|
||||
}[]) {
|
||||
const inventoryModule = await initializeInventoryModule({})
|
||||
|
||||
const inventoryLevels = await inventoryModule.updateInventoryLevels(
|
||||
items
|
||||
)
|
||||
|
||||
// do something with the inventory levels or return them
|
||||
}
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[{"name":"updates","type":"[BulkUpdateInventoryLevelInput](../../interfaces/inventory.BulkUpdateInventoryLevelInput.mdx)[]","description":"The attributes to update in each inventory level.","optional":false,"defaultValue":"","expandable":false,"children":[{"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":"incoming_quantity","type":"`number`","description":"The incoming quantity of the associated inventory item in the associated location.","optional":true,"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":"context","type":"[SharedContext](../../interfaces/inventory.SharedContext.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"manager","type":"`EntityManager`","description":"An instance of an entity manager.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager","type":"`EntityManager`","description":"An instance of a transaction manager.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[{"name":"Promise","type":"Promise<[InventoryLevelDTO](../../types/inventory.InventoryLevelDTO.mdx)[]>","optional":false,"defaultValue":"","description":"The updated inventory levels' details.","expandable":false,"children":[{"name":"InventoryLevelDTO[]","type":"[InventoryLevelDTO](../../types/inventory.InventoryLevelDTO.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"InventoryLevelDTO","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} />
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
---
|
||||
displayed_sidebar: inventoryReference
|
||||
slug: /references/inventory/updateReservationItem
|
||||
sidebar_label: updateReservationItem
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# updateReservationItem - Inventory Module Reference
|
||||
|
||||
This documentation provides a reference to the `updateReservationItem` method. This belongs to the Inventory Module.
|
||||
|
||||
This method is used to update a reservation item.
|
||||
|
||||
## Example
|
||||
|
||||
```ts
|
||||
import {
|
||||
initialize as initializeInventoryModule,
|
||||
} from "@medusajs/inventory"
|
||||
|
||||
async function updateReservationItem (
|
||||
reservationItemId: string,
|
||||
quantity: number
|
||||
) {
|
||||
const inventoryModule = await initializeInventoryModule({})
|
||||
|
||||
const reservationItem = await inventoryModule.updateReservationItem(
|
||||
reservationItemId,
|
||||
{
|
||||
quantity
|
||||
}
|
||||
)
|
||||
|
||||
// do something with the reservation item or return it
|
||||
}
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[{"name":"reservationItemId","type":"`string`","description":"The ID of the reservation item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"input","type":"[UpdateReservationItemInput](../../interfaces/inventory.UpdateReservationItemInput.mdx)","description":"The attributes to update in the reservation item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"description","type":"`string`","description":"The description of the reservation item.","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":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`number`","description":"The reserved quantity.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"context","type":"[SharedContext](../../interfaces/inventory.SharedContext.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"manager","type":"`EntityManager`","description":"An instance of an entity manager.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager","type":"`EntityManager`","description":"An instance of a transaction manager.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[{"name":"Promise","type":"Promise<[ReservationItemDTO](../../types/inventory.ReservationItemDTO.mdx)>","optional":false,"defaultValue":"","description":"The updated reservation item.","expandable":false,"children":[{"name":"created_at","type":"`string` \\| `Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`string` \\| `Date` \\| `null`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The id of the reservation item","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_item_id","type":"`string`","description":"The id of the inventory item the reservation relates to","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The id of the location of the reservation","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>` \\| `null`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`number`","description":"The id of the reservation item","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`string` \\| `null`","description":"UserId of user who created the reservation item","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string` \\| `null`","description":"Description of the reservation item","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"line_item_id","type":"`string` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} />
|
||||
+1
-38
@@ -8,41 +8,4 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
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": "incoming_quantity",
|
||||
"type": "`number`",
|
||||
"description": "The incoming quantity of the associated inventory item in the associated location.",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"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": []
|
||||
}
|
||||
]} />
|
||||
<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":"incoming_quantity","type":"`number`","description":"The incoming quantity of the associated inventory item in the associated location.","optional":true,"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":[]}]} />
|
||||
|
||||
+1
-128
@@ -8,131 +8,4 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
The details of the inventory item to be created.
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "description",
|
||||
"type": "`null` \\| `string`",
|
||||
"description": "The description 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": "hs_code",
|
||||
"type": "`null` \\| `string`",
|
||||
"description": "The HS code 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": "material",
|
||||
"type": "`null` \\| `string`",
|
||||
"description": "The material 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": "mid_code",
|
||||
"type": "`null` \\| `string`",
|
||||
"description": "The MID code 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": "requires_shipping",
|
||||
"type": "`boolean`",
|
||||
"description": "Whether the inventory item requires shipping.",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "sku",
|
||||
"type": "`null` \\| `string`",
|
||||
"description": "The SKU 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": "title",
|
||||
"type": "`null` \\| `string`",
|
||||
"description": "The title 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": "width",
|
||||
"type": "`null` \\| `number`",
|
||||
"description": "The width of the inventory item.",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"name":"description","type":"`null` \\| `string`","description":"The description 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":"hs_code","type":"`null` \\| `string`","description":"The HS code 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":"material","type":"`null` \\| `string`","description":"The material 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":"mid_code","type":"`null` \\| `string`","description":"The MID code 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":"requires_shipping","type":"`boolean`","description":"Whether the inventory item requires shipping.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sku","type":"`null` \\| `string`","description":"The SKU 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":"title","type":"`null` \\| `string`","description":"The title 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":"width","type":"`null` \\| `number`","description":"The width of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} />
|
||||
|
||||
+1
-47
@@ -8,50 +8,4 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
The details of the inventory level to be created.
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "incoming_quantity",
|
||||
"type": "`number`",
|
||||
"description": "The incoming quantity of the associated inventory item in the associated location.",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"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": "reserved_quantity",
|
||||
"type": "`number`",
|
||||
"description": "The reserved quantity of the associated inventory item in the associated location.",
|
||||
"optional": true,
|
||||
"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": []
|
||||
}
|
||||
]} />
|
||||
<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":"incoming_quantity","type":"`number`","description":"The incoming quantity of the associated inventory item in the associated location.","optional":true,"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":[]}]} />
|
||||
|
||||
+1
-74
@@ -8,77 +8,4 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
The details of the reservation item to be created.
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"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": "description",
|
||||
"type": "`string`",
|
||||
"description": "The description of the reservation.",
|
||||
"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": "inventory_item_id",
|
||||
"type": "`string`",
|
||||
"description": "The ID of the associated inventory item.",
|
||||
"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": "location_id",
|
||||
"type": "`string`",
|
||||
"description": "The ID of the associated location.",
|
||||
"optional": false,
|
||||
"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": "quantity",
|
||||
"type": "`number`",
|
||||
"description": "The reserved quantity.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
<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":"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":"description","type":"`string`","description":"The description of the reservation.","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":"line_item_id","type":"`string`","description":"The ID of the associated line 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":[]}]} />
|
||||
|
||||
+1
-65
@@ -8,68 +8,4 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
The filters to apply on retrieved inventory items.
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"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": "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": "origin_country",
|
||||
"type": "`string` \\| `string`[]",
|
||||
"description": "The origin country to filter inventory items by.",
|
||||
"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": "requires_shipping",
|
||||
"type": "`boolean`",
|
||||
"description": "Filter inventory items by whether they require shipping.",
|
||||
"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": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"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":"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":"origin_country","type":"`string` \\| `string`[]","description":"The origin country to filter inventory items by.","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":"requires_shipping","type":"`boolean`","description":"Filter inventory items by whether they require shipping.","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":[]}]} />
|
||||
|
||||
+1
-47
@@ -8,50 +8,4 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
The filters to apply on retrieved inventory levels.
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"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": []
|
||||
},
|
||||
{
|
||||
"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": "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": "stocked_quantity",
|
||||
"type": "`number` \\| [NumericalComparisonOperator](inventory.NumericalComparisonOperator.mdx)",
|
||||
"description": "Filters to apply on inventory levels' `stocked_quantity` attribute.",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"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":[]},{"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":"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":"stocked_quantity","type":"`number` \\| [NumericalComparisonOperator](inventory.NumericalComparisonOperator.mdx)","description":"Filters to apply on inventory levels' `stocked_quantity` attribute.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} />
|
||||
|
||||
+1
-65
@@ -8,68 +8,4 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
The filters to apply on retrieved reservation items.
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "created_by",
|
||||
"type": "`string` \\| `string`[]",
|
||||
"description": "The \"created by\" values to filter reservation items by.",
|
||||
"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": "id",
|
||||
"type": "`string` \\| `string`[]",
|
||||
"description": "The IDs to filter reservation items by.",
|
||||
"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": "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": "location_id",
|
||||
"type": "`string` \\| `string`[]",
|
||||
"description": "Filter reservation items by the ID of their associated location.",
|
||||
"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": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"name":"created_by","type":"`string` \\| `string`[]","description":"The \"created by\" values to filter reservation items by.","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":"id","type":"`string` \\| `string`[]","description":"The IDs to filter reservation items by.","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":"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":"location_id","type":"`string` \\| `string`[]","description":"Filter reservation items by the ID of their associated location.","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":[]}]} />
|
||||
|
||||
@@ -11,71 +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": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"name":"Entity","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} />
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"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": "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": "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": "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": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"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":"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":"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":"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":[]}]} />
|
||||
|
||||
+28
-28
@@ -11,31 +11,31 @@ This section of the documentation provides a reference to the `IInventoryService
|
||||
|
||||
## Methods
|
||||
|
||||
- [adjustInventory](../../IInventoryService/methods/inventory.IInventoryService.adjustInventory.mdx)
|
||||
- [confirmInventory](../../IInventoryService/methods/inventory.IInventoryService.confirmInventory.mdx)
|
||||
- [createInventoryItem](../../IInventoryService/methods/inventory.IInventoryService.createInventoryItem.mdx)
|
||||
- [createInventoryItems](../../IInventoryService/methods/inventory.IInventoryService.createInventoryItems.mdx)
|
||||
- [createInventoryLevel](../../IInventoryService/methods/inventory.IInventoryService.createInventoryLevel.mdx)
|
||||
- [createInventoryLevels](../../IInventoryService/methods/inventory.IInventoryService.createInventoryLevels.mdx)
|
||||
- [createReservationItem](../../IInventoryService/methods/inventory.IInventoryService.createReservationItem.mdx)
|
||||
- [createReservationItems](../../IInventoryService/methods/inventory.IInventoryService.createReservationItems.mdx)
|
||||
- [deleteInventoryItem](../../IInventoryService/methods/inventory.IInventoryService.deleteInventoryItem.mdx)
|
||||
- [deleteInventoryItemLevelByLocationId](../../IInventoryService/methods/inventory.IInventoryService.deleteInventoryItemLevelByLocationId.mdx)
|
||||
- [deleteInventoryLevel](../../IInventoryService/methods/inventory.IInventoryService.deleteInventoryLevel.mdx)
|
||||
- [deleteReservationItem](../../IInventoryService/methods/inventory.IInventoryService.deleteReservationItem.mdx)
|
||||
- [deleteReservationItemByLocationId](../../IInventoryService/methods/inventory.IInventoryService.deleteReservationItemByLocationId.mdx)
|
||||
- [deleteReservationItemsByLineItem](../../IInventoryService/methods/inventory.IInventoryService.deleteReservationItemsByLineItem.mdx)
|
||||
- [listInventoryItems](../../IInventoryService/methods/inventory.IInventoryService.listInventoryItems.mdx)
|
||||
- [listInventoryLevels](../../IInventoryService/methods/inventory.IInventoryService.listInventoryLevels.mdx)
|
||||
- [listReservationItems](../../IInventoryService/methods/inventory.IInventoryService.listReservationItems.mdx)
|
||||
- [restoreInventoryItem](../../IInventoryService/methods/inventory.IInventoryService.restoreInventoryItem.mdx)
|
||||
- [retrieveAvailableQuantity](../../IInventoryService/methods/inventory.IInventoryService.retrieveAvailableQuantity.mdx)
|
||||
- [retrieveInventoryItem](../../IInventoryService/methods/inventory.IInventoryService.retrieveInventoryItem.mdx)
|
||||
- [retrieveInventoryLevel](../../IInventoryService/methods/inventory.IInventoryService.retrieveInventoryLevel.mdx)
|
||||
- [retrieveReservationItem](../../IInventoryService/methods/inventory.IInventoryService.retrieveReservationItem.mdx)
|
||||
- [retrieveReservedQuantity](../../IInventoryService/methods/inventory.IInventoryService.retrieveReservedQuantity.mdx)
|
||||
- [retrieveStockedQuantity](../../IInventoryService/methods/inventory.IInventoryService.retrieveStockedQuantity.mdx)
|
||||
- [updateInventoryItem](../../IInventoryService/methods/inventory.IInventoryService.updateInventoryItem.mdx)
|
||||
- [updateInventoryLevel](../../IInventoryService/methods/inventory.IInventoryService.updateInventoryLevel.mdx)
|
||||
- [updateInventoryLevels](../../IInventoryService/methods/inventory.IInventoryService.updateInventoryLevels.mdx)
|
||||
- [updateReservationItem](../../IInventoryService/methods/inventory.IInventoryService.updateReservationItem.mdx)
|
||||
- [adjustInventory](../IInventoryService/methods/inventory.IInventoryService.adjustInventory.mdx)
|
||||
- [confirmInventory](../IInventoryService/methods/inventory.IInventoryService.confirmInventory.mdx)
|
||||
- [createInventoryItem](../IInventoryService/methods/inventory.IInventoryService.createInventoryItem.mdx)
|
||||
- [createInventoryItems](../IInventoryService/methods/inventory.IInventoryService.createInventoryItems.mdx)
|
||||
- [createInventoryLevel](../IInventoryService/methods/inventory.IInventoryService.createInventoryLevel.mdx)
|
||||
- [createInventoryLevels](../IInventoryService/methods/inventory.IInventoryService.createInventoryLevels.mdx)
|
||||
- [createReservationItem](../IInventoryService/methods/inventory.IInventoryService.createReservationItem.mdx)
|
||||
- [createReservationItems](../IInventoryService/methods/inventory.IInventoryService.createReservationItems.mdx)
|
||||
- [deleteInventoryItem](../IInventoryService/methods/inventory.IInventoryService.deleteInventoryItem.mdx)
|
||||
- [deleteInventoryItemLevelByLocationId](../IInventoryService/methods/inventory.IInventoryService.deleteInventoryItemLevelByLocationId.mdx)
|
||||
- [deleteInventoryLevel](../IInventoryService/methods/inventory.IInventoryService.deleteInventoryLevel.mdx)
|
||||
- [deleteReservationItem](../IInventoryService/methods/inventory.IInventoryService.deleteReservationItem.mdx)
|
||||
- [deleteReservationItemByLocationId](../IInventoryService/methods/inventory.IInventoryService.deleteReservationItemByLocationId.mdx)
|
||||
- [deleteReservationItemsByLineItem](../IInventoryService/methods/inventory.IInventoryService.deleteReservationItemsByLineItem.mdx)
|
||||
- [listInventoryItems](../IInventoryService/methods/inventory.IInventoryService.listInventoryItems.mdx)
|
||||
- [listInventoryLevels](../IInventoryService/methods/inventory.IInventoryService.listInventoryLevels.mdx)
|
||||
- [listReservationItems](../IInventoryService/methods/inventory.IInventoryService.listReservationItems.mdx)
|
||||
- [restoreInventoryItem](../IInventoryService/methods/inventory.IInventoryService.restoreInventoryItem.mdx)
|
||||
- [retrieveAvailableQuantity](../IInventoryService/methods/inventory.IInventoryService.retrieveAvailableQuantity.mdx)
|
||||
- [retrieveInventoryItem](../IInventoryService/methods/inventory.IInventoryService.retrieveInventoryItem.mdx)
|
||||
- [retrieveInventoryLevel](../IInventoryService/methods/inventory.IInventoryService.retrieveInventoryLevel.mdx)
|
||||
- [retrieveReservationItem](../IInventoryService/methods/inventory.IInventoryService.retrieveReservationItem.mdx)
|
||||
- [retrieveReservedQuantity](../IInventoryService/methods/inventory.IInventoryService.retrieveReservedQuantity.mdx)
|
||||
- [retrieveStockedQuantity](../IInventoryService/methods/inventory.IInventoryService.retrieveStockedQuantity.mdx)
|
||||
- [updateInventoryItem](../IInventoryService/methods/inventory.IInventoryService.updateInventoryItem.mdx)
|
||||
- [updateInventoryLevel](../IInventoryService/methods/inventory.IInventoryService.updateInventoryLevel.mdx)
|
||||
- [updateInventoryLevels](../IInventoryService/methods/inventory.IInventoryService.updateInventoryLevels.mdx)
|
||||
- [updateReservationItem](../IInventoryService/methods/inventory.IInventoryService.updateReservationItem.mdx)
|
||||
|
||||
+1
-230
@@ -6,233 +6,4 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# JoinerServiceConfig
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"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": "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": "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": "args",
|
||||
"type": "`Record<string, any>`",
|
||||
"description": "Extra arguments to pass to the remoteFetchData callback",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "foreignKey",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"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": "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": "isList",
|
||||
"type": "`boolean`",
|
||||
"description": "Force the relationship to return a list",
|
||||
"optional": true,
|
||||
"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": "serviceName",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"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": "primaryKeys",
|
||||
"type": "`string`[]",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"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": "args",
|
||||
"type": "`Record<string, any>`",
|
||||
"description": "Extra arguments to pass to the remoteFetchData callback",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "foreignKey",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"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": "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": "isList",
|
||||
"type": "`boolean`",
|
||||
"description": "Force the relationship to return a list",
|
||||
"optional": true,
|
||||
"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": "serviceName",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"name":"primaryKeys","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"serviceName","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":"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":"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":"args","type":"`Record<string, any>`","description":"Extra arguments to pass to the remoteFetchData callback","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":"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":"isList","type":"`boolean`","description":"Force the relationship to return a list","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"serviceName","type":"`string`","description":"","optional":false,"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":"args","type":"`Record<string, any>`","description":"Extra arguments to pass to the remoteFetchData callback","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":"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":"isList","type":"`boolean`","description":"Force the relationship to return a list","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} />
|
||||
|
||||
+1
-20
@@ -6,23 +6,4 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# JoinerServiceConfigAlias
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "args",
|
||||
"type": "`Record<string, any>`",
|
||||
"description": "Extra arguments to pass to the remoteFetchData callback",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "name",
|
||||
"type": "`string` \\| `string`[]",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
<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":[]}]} />
|
||||
|
||||
+1
-38
@@ -6,41 +6,4 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# NumericalComparisonOperator
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "gt",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "gte",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "lt",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "lte",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"name":"gt","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"gte","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"lt","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"lte","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} />
|
||||
|
||||
@@ -8,23 +8,4 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
A shared context object that is used to share resources between the application and the module.
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "manager",
|
||||
"type": "`EntityManager`",
|
||||
"description": "An instance of an entity manager.",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "transactionManager",
|
||||
"type": "`EntityManager`",
|
||||
"description": "An instance of a transaction manager.",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"name":"manager","type":"`EntityManager`","description":"An instance of an entity manager.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager","type":"`EntityManager`","description":"An instance of a transaction manager.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} />
|
||||
|
||||
+1
-65
@@ -6,68 +6,4 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# StringComparisonOperator
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "contains",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "ends_with",
|
||||
"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": "lt",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "lte",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "starts_with",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"name":"contains","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"ends_with","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":"lt","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"lte","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"starts_with","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} />
|
||||
|
||||
+1
-20
@@ -8,23 +8,4 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
The attributes to update in an inventory level.
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "incoming_quantity",
|
||||
"type": "`number`",
|
||||
"description": "The incoming quantity of the associated inventory item in the associated location.",
|
||||
"optional": true,
|
||||
"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": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"name":"incoming_quantity","type":"`number`","description":"The incoming quantity of the associated inventory item in the associated location.","optional":true,"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":[]}]} />
|
||||
|
||||
+1
-38
@@ -8,41 +8,4 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
The attributes to update in a reservation item.
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "description",
|
||||
"type": "`string`",
|
||||
"description": "The description of the reservation item.",
|
||||
"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": "metadata",
|
||||
"type": "`null` \\| `Record<string, unknown>`",
|
||||
"description": "Holds custom data in key-value pairs.",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "quantity",
|
||||
"type": "`number`",
|
||||
"description": "The reserved quantity.",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"name":"description","type":"`string`","description":"The description of the reservation item.","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":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`number`","description":"The reserved quantity.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} />
|
||||
|
||||
@@ -10,167 +10,4 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
## Type declaration
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "created_at",
|
||||
"type": "`string` \\| `Date`",
|
||||
"description": "The date with timezone at which the resource was created.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "deleted_at",
|
||||
"type": "`string` \\| `Date` \\| `null`",
|
||||
"description": "The date with timezone at which the resource was deleted.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "description",
|
||||
"type": "`string` \\| `null`",
|
||||
"description": "Description of the inventory item",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "height",
|
||||
"type": "`number` \\| `null`",
|
||||
"description": "The height of the Inventory Item. May be used in shipping rate calculations.",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "hs_code",
|
||||
"type": "`string` \\| `null`",
|
||||
"description": "The Harmonized System code of the Inventory Item. May be used by Fulfillment Providers to pass customs information to shipping carriers.",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "id",
|
||||
"type": "`string`",
|
||||
"description": "The inventory item's ID.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "length",
|
||||
"type": "`number` \\| `null`",
|
||||
"description": "The length of the Inventory Item. May be used in shipping rate calculations.",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "material",
|
||||
"type": "`string` \\| `null`",
|
||||
"description": "The material and composition that the Inventory Item is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "metadata",
|
||||
"type": "`Record<string, unknown>` \\| `null`",
|
||||
"description": "An optional key-value map with additional details",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "mid_code",
|
||||
"type": "`string` \\| `null`",
|
||||
"description": "The Manufacturers Identification code that identifies the manufacturer of the Inventory Item. May be used by Fulfillment Providers to pass customs information to shipping carriers.",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "origin_country",
|
||||
"type": "`string` \\| `null`",
|
||||
"description": "The country in which the Inventory Item was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "requires_shipping",
|
||||
"type": "`boolean`",
|
||||
"description": "Whether the item requires shipping.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "sku",
|
||||
"type": "`string` \\| `null`",
|
||||
"description": "The Stock Keeping Unit (SKU) code of the Inventory Item.",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "thumbnail",
|
||||
"type": "`string` \\| `null`",
|
||||
"description": "Thumbnail for the inventory item",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "title",
|
||||
"type": "`string` \\| `null`",
|
||||
"description": "Title of the inventory item",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "updated_at",
|
||||
"type": "`string` \\| `Date`",
|
||||
"description": "The date with timezone at which the resource was updated.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "weight",
|
||||
"type": "`number` \\| `null`",
|
||||
"description": "The weight of the Inventory Item. May be used in shipping rate calculations.",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "width",
|
||||
"type": "`number` \\| `null`",
|
||||
"description": "The width of the Inventory Item. May be used in shipping rate calculations.",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"name":"created_at","type":"`string` \\| `Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`string` \\| `Date` \\| `null`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The inventory item's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"requires_shipping","type":"`boolean`","description":"Whether the item requires shipping.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string` \\| `null`","description":"Description of the inventory item","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"height","type":"`number` \\| `null`","description":"The height of the Inventory Item. May be used in shipping rate calculations.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"hs_code","type":"`string` \\| `null`","description":"The Harmonized System code of the Inventory Item. May be used by Fulfillment Providers to pass customs information to shipping carriers.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"length","type":"`number` \\| `null`","description":"The length of the Inventory Item. May be used in shipping rate calculations.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"material","type":"`string` \\| `null`","description":"The material and composition that the Inventory Item is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>` \\| `null`","description":"An optional key-value map with additional details","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"mid_code","type":"`string` \\| `null`","description":"The Manufacturers Identification code that identifies the manufacturer of the Inventory Item. May be used by Fulfillment Providers to pass customs information to shipping carriers.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"origin_country","type":"`string` \\| `null`","description":"The country in which the Inventory Item was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sku","type":"`string` \\| `null`","description":"The Stock Keeping Unit (SKU) code of the Inventory Item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"thumbnail","type":"`string` \\| `null`","description":"Thumbnail for the inventory item","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string` \\| `null`","description":"Title of the inventory item","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"weight","type":"`number` \\| `null`","description":"The weight of the Inventory Item. May be used in shipping rate calculations.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"width","type":"`number` \\| `null`","description":"The width of the Inventory Item. May be used in shipping rate calculations.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} />
|
||||
|
||||
@@ -10,95 +10,4 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
## Type declaration
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "created_at",
|
||||
"type": "`string` \\| `Date`",
|
||||
"description": "The date with timezone at which the resource was created.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "deleted_at",
|
||||
"type": "`string` \\| `Date` \\| `null`",
|
||||
"description": "The date with timezone at which the resource was deleted.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "id",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "incoming_quantity",
|
||||
"type": "`number`",
|
||||
"description": "the incoming stock quantity of an inventory item at the given location ID",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "inventory_item_id",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "location_id",
|
||||
"type": "`string`",
|
||||
"description": "the item location ID",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "metadata",
|
||||
"type": "`Record<string, unknown>` \\| `null`",
|
||||
"description": "An optional key-value map with additional details",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "reserved_quantity",
|
||||
"type": "`number`",
|
||||
"description": "the reserved stock quantity of an inventory item at the given location ID",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "stocked_quantity",
|
||||
"type": "`number`",
|
||||
"description": "the total stock quantity of an inventory item at the given location ID",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "updated_at",
|
||||
"type": "`string` \\| `Date`",
|
||||
"description": "The date with timezone at which the resource was updated.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"name":"created_at","type":"`string` \\| `Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`string` \\| `Date` \\| `null`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"incoming_quantity","type":"`number`","description":"the incoming stock quantity of an inventory item at the given location ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_item_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"the item location ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>` \\| `null`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reserved_quantity","type":"`number`","description":"the reserved stock quantity of an inventory item at the given location ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"stocked_quantity","type":"`number`","description":"the total stock quantity of an inventory item at the given location ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} />
|
||||
|
||||
@@ -10,77 +10,4 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
## Type declaration
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "alias",
|
||||
"type": "`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": []
|
||||
},
|
||||
{
|
||||
"name": "foreignKey",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"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": "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": "isList",
|
||||
"type": "`boolean`",
|
||||
"description": "Force the relationship to return a list",
|
||||
"optional": true,
|
||||
"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": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"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":"args","type":"`Record<string, any>`","description":"Extra arguments to pass to the remoteFetchData callback","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":"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":"isList","type":"`boolean`","description":"Force the relationship to return a list","optional":true,"defaultValue":"","expandable":false,"children":[]}]} />
|
||||
|
||||
@@ -12,104 +12,4 @@ Represents a reservation of an inventory item at a stock location
|
||||
|
||||
## Type declaration
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "created_at",
|
||||
"type": "`string` \\| `Date`",
|
||||
"description": "The date with timezone at which the resource was created.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "created_by",
|
||||
"type": "`string` \\| `null`",
|
||||
"description": "UserId of user who created the reservation item",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "deleted_at",
|
||||
"type": "`string` \\| `Date` \\| `null`",
|
||||
"description": "The date with timezone at which the resource was deleted.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "description",
|
||||
"type": "`string` \\| `null`",
|
||||
"description": "Description of the reservation item",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "id",
|
||||
"type": "`string`",
|
||||
"description": "The id of the reservation item",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "inventory_item_id",
|
||||
"type": "`string`",
|
||||
"description": "The id of the inventory item the reservation relates to",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "line_item_id",
|
||||
"type": "`string` \\| `null`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "location_id",
|
||||
"type": "`string`",
|
||||
"description": "The id of the location of the reservation",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "metadata",
|
||||
"type": "`Record<string, unknown>` \\| `null`",
|
||||
"description": "An optional key-value map with additional details",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "quantity",
|
||||
"type": "`number`",
|
||||
"description": "The id of the reservation item",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "updated_at",
|
||||
"type": "`string` \\| `Date`",
|
||||
"description": "The date with timezone at which the resource was updated.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"name":"created_at","type":"`string` \\| `Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`string` \\| `Date` \\| `null`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The id of the reservation item","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_item_id","type":"`string`","description":"The id of the inventory item the reservation relates to","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The id of the location of the reservation","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>` \\| `null`","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`number`","description":"The id of the reservation item","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`string` \\| `null`","description":"UserId of user who created the reservation item","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string` \\| `null`","description":"Description of the reservation item","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"line_item_id","type":"`string` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} />
|
||||
|
||||
Reference in New Issue
Block a user