chore: added tsdocs to the Inventory Next Module (#6814)
This commit is contained in:
@@ -1,89 +1,97 @@
|
|||||||
import { StringComparisonOperator } from "../../common"
|
import { StringComparisonOperator } from "../../common"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @schema InventoryItemDTO
|
* The inventory item details.
|
||||||
* type: object
|
|
||||||
* required:
|
|
||||||
* - sku
|
|
||||||
* properties:
|
|
||||||
* id:
|
|
||||||
* description: The inventory item's ID.
|
|
||||||
* type: string
|
|
||||||
* example: "iitem_12334"
|
|
||||||
* sku:
|
|
||||||
* description: The Stock Keeping Unit (SKU) code of the Inventory Item.
|
|
||||||
* type: string
|
|
||||||
* hs_code:
|
|
||||||
* description: The Harmonized System code of the Inventory Item. May be used by Fulfillment Providers to pass customs information to shipping carriers.
|
|
||||||
* type: string
|
|
||||||
* origin_country:
|
|
||||||
* description: The country in which the Inventory Item was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.
|
|
||||||
* type: string
|
|
||||||
* mid_code:
|
|
||||||
* 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.
|
|
||||||
* type: string
|
|
||||||
* title:
|
|
||||||
* description: "Title of the inventory item"
|
|
||||||
* type: string
|
|
||||||
* description:
|
|
||||||
* description: "Description of the inventory item"
|
|
||||||
* type: string
|
|
||||||
* thumbnail:
|
|
||||||
* description: "Thumbnail for the inventory item"
|
|
||||||
* type: string
|
|
||||||
* material:
|
|
||||||
* 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.
|
|
||||||
* type: string
|
|
||||||
* weight:
|
|
||||||
* description: The weight of the Inventory Item. May be used in shipping rate calculations.
|
|
||||||
* type: number
|
|
||||||
* height:
|
|
||||||
* description: The height of the Inventory Item. May be used in shipping rate calculations.
|
|
||||||
* type: number
|
|
||||||
* width:
|
|
||||||
* description: The width of the Inventory Item. May be used in shipping rate calculations.
|
|
||||||
* type: number
|
|
||||||
* length:
|
|
||||||
* description: The length of the Inventory Item. May be used in shipping rate calculations.
|
|
||||||
* type: number
|
|
||||||
* requires_shipping:
|
|
||||||
* description: Whether the item requires shipping.
|
|
||||||
* type: boolean
|
|
||||||
* metadata:
|
|
||||||
* type: object
|
|
||||||
* description: An optional key-value map with additional details
|
|
||||||
* example: {car: "white"}
|
|
||||||
* created_at:
|
|
||||||
* type: string
|
|
||||||
* description: "The date with timezone at which the resource was created."
|
|
||||||
* format: date-time
|
|
||||||
* updated_at:
|
|
||||||
* type: string
|
|
||||||
* description: "The date with timezone at which the resource was updated."
|
|
||||||
* format: date-time
|
|
||||||
* deleted_at:
|
|
||||||
* type: string
|
|
||||||
* description: "The date with timezone at which the resource was deleted."
|
|
||||||
* format: date-time
|
|
||||||
*/
|
*/
|
||||||
export interface InventoryItemDTO {
|
export interface InventoryItemDTO {
|
||||||
|
/**
|
||||||
|
* The ID of the inventory item.
|
||||||
|
*/
|
||||||
id: string
|
id: string
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The SKU of the inventory item.
|
||||||
|
*/
|
||||||
sku?: string | null
|
sku?: string | null
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The origin country of the inventory item.
|
||||||
|
*/
|
||||||
origin_country?: string | null
|
origin_country?: string | null
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The HS code of the inventory item.
|
||||||
|
*/
|
||||||
hs_code?: string | null
|
hs_code?: string | null
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether the inventory item requires shipping.
|
||||||
|
*/
|
||||||
requires_shipping: boolean
|
requires_shipping: boolean
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The mid code of the inventory item.
|
||||||
|
*/
|
||||||
mid_code?: string | null
|
mid_code?: string | null
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The material of the inventory item.
|
||||||
|
*/
|
||||||
material?: string | null
|
material?: string | null
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The weight of the inventory item.
|
||||||
|
*/
|
||||||
weight?: number | null
|
weight?: number | null
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The length of the inventory item.
|
||||||
|
*/
|
||||||
length?: number | null
|
length?: number | null
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The height of the inventory item.
|
||||||
|
*/
|
||||||
height?: number | null
|
height?: number | null
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The width of the inventory item.
|
||||||
|
*/
|
||||||
width?: number | null
|
width?: number | null
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The title of the inventory item.
|
||||||
|
*/
|
||||||
title?: string | null
|
title?: string | null
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The description of the inventory item.
|
||||||
|
*/
|
||||||
description?: string | null
|
description?: string | null
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The thumbnail of the inventory item.
|
||||||
|
*/
|
||||||
thumbnail?: string | null
|
thumbnail?: string | null
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds custom data in key-value pairs.
|
||||||
|
*/
|
||||||
metadata?: Record<string, unknown> | null
|
metadata?: Record<string, unknown> | null
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The creation date of the inventory item.
|
||||||
|
*/
|
||||||
created_at: string | Date
|
created_at: string | Date
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The update date of the inventory item.
|
||||||
|
*/
|
||||||
updated_at: string | Date
|
updated_at: string | Date
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The deletion date of the inventory item.
|
||||||
|
*/
|
||||||
deleted_at: string | Date | null
|
deleted_at: string | Date | null
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -97,26 +105,32 @@ export interface FilterableInventoryItemProps {
|
|||||||
* The IDs to filter inventory items by.
|
* The IDs to filter inventory items by.
|
||||||
*/
|
*/
|
||||||
id?: string | string[]
|
id?: string | string[]
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter inventory items by the ID of their associated location.
|
* Filter inventory items by the ID of their associated location.
|
||||||
*/
|
*/
|
||||||
location_id?: string | string[]
|
location_id?: string | string[]
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Search term to search inventory items' attributes.
|
* Search term to search inventory items' attributes.
|
||||||
*/
|
*/
|
||||||
q?: string
|
q?: string
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The SKUs to filter inventory items by.
|
* The SKUs to filter inventory items by.
|
||||||
*/
|
*/
|
||||||
sku?: string | string[] | StringComparisonOperator
|
sku?: string | string[] | StringComparisonOperator
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The origin country to filter inventory items by.
|
* The origin country to filter inventory items by.
|
||||||
*/
|
*/
|
||||||
origin_country?: string | string[]
|
origin_country?: string | string[]
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The HS Codes to filter inventory items by.
|
* The HS Codes to filter inventory items by.
|
||||||
*/
|
*/
|
||||||
hs_code?: string | string[] | StringComparisonOperator
|
hs_code?: string | string[] | StringComparisonOperator
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter inventory items by whether they require shipping.
|
* Filter inventory items by whether they require shipping.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -3,76 +3,90 @@ import { BaseFilterable, OperatorMap } from "../../dal"
|
|||||||
import { NumericalComparisonOperator } from "../../common"
|
import { NumericalComparisonOperator } from "../../common"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @schema InventoryLevelDTO
|
* The inventory level details.
|
||||||
* type: object
|
|
||||||
* required:
|
|
||||||
* - inventory_item_id
|
|
||||||
* - location_id
|
|
||||||
* - stocked_quantity
|
|
||||||
* - reserved_quantity
|
|
||||||
* - incoming_quantity
|
|
||||||
* properties:
|
|
||||||
* location_id:
|
|
||||||
* description: the item location ID
|
|
||||||
* type: string
|
|
||||||
* stocked_quantity:
|
|
||||||
* description: the total stock quantity of an inventory item at the given location ID
|
|
||||||
* type: number
|
|
||||||
* reserved_quantity:
|
|
||||||
* description: the reserved stock quantity of an inventory item at the given location ID
|
|
||||||
* type: number
|
|
||||||
* incoming_quantity:
|
|
||||||
* description: the incoming stock quantity of an inventory item at the given location ID
|
|
||||||
* type: number
|
|
||||||
* metadata:
|
|
||||||
* type: object
|
|
||||||
* description: An optional key-value map with additional details
|
|
||||||
* example: {car: "white"}
|
|
||||||
* created_at:
|
|
||||||
* type: string
|
|
||||||
* description: "The date with timezone at which the resource was created."
|
|
||||||
* format: date-time
|
|
||||||
* updated_at:
|
|
||||||
* type: string
|
|
||||||
* description: "The date with timezone at which the resource was updated."
|
|
||||||
* format: date-time
|
|
||||||
* deleted_at:
|
|
||||||
* type: string
|
|
||||||
* description: "The date with timezone at which the resource was deleted."
|
|
||||||
* format: date-time
|
|
||||||
*/
|
*/
|
||||||
export interface InventoryLevelDTO {
|
export interface InventoryLevelDTO {
|
||||||
|
/**
|
||||||
|
* The ID of the inventory level.
|
||||||
|
*/
|
||||||
id: string
|
id: string
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The associated inventory item's ID.
|
||||||
|
*/
|
||||||
inventory_item_id: string
|
inventory_item_id: string
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The associated location's ID.
|
||||||
|
*/
|
||||||
location_id: string
|
location_id: string
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The stocked quantity of the inventory level.
|
||||||
|
*/
|
||||||
stocked_quantity: number
|
stocked_quantity: number
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The reserved quantity of the inventory level.
|
||||||
|
*/
|
||||||
reserved_quantity: number
|
reserved_quantity: number
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The incoming quantity of the inventory level.
|
||||||
|
*/
|
||||||
incoming_quantity: number
|
incoming_quantity: number
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The available quantity of the inventory level.
|
||||||
|
*/
|
||||||
available_quantity: number
|
available_quantity: number
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds custom data in key-value pairs.
|
||||||
|
*/
|
||||||
metadata: Record<string, unknown> | null
|
metadata: Record<string, unknown> | null
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The creation date of the inventory level.
|
||||||
|
*/
|
||||||
created_at: string | Date
|
created_at: string | Date
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The update date of the inventory level.
|
||||||
|
*/
|
||||||
updated_at: string | Date
|
updated_at: string | Date
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The deletion date of the inventory level.
|
||||||
|
*/
|
||||||
deleted_at: string | Date | null
|
deleted_at: string | Date | null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The filters to apply on the retrieved inventory levels.
|
||||||
|
*/
|
||||||
export interface FilterableInventoryLevelProps
|
export interface FilterableInventoryLevelProps
|
||||||
extends BaseFilterable<FilterableInventoryLevelProps> {
|
extends BaseFilterable<FilterableInventoryLevelProps> {
|
||||||
/**
|
/**
|
||||||
* Filter inventory levels by the ID of their associated inventory item.
|
* Filter inventory levels by the ID of their associated inventory item.
|
||||||
*/
|
*/
|
||||||
inventory_item_id?: string | string[]
|
inventory_item_id?: string | string[]
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter inventory levels by the ID of their associated inventory location.
|
* Filter inventory levels by the ID of their associated inventory location.
|
||||||
*/
|
*/
|
||||||
location_id?: string | string[]
|
location_id?: string | string[]
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filters to apply on inventory levels' `stocked_quantity` attribute.
|
* Filters to apply on inventory levels' `stocked_quantity` attribute.
|
||||||
*/
|
*/
|
||||||
stocked_quantity?: number | OperatorMap<Number>
|
stocked_quantity?: number | OperatorMap<Number>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filters to apply on inventory levels' `reserved_quantity` attribute.
|
* Filters to apply on inventory levels' `reserved_quantity` attribute.
|
||||||
*/
|
*/
|
||||||
reserved_quantity?: number | OperatorMap<Number>
|
reserved_quantity?: number | OperatorMap<Number>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filters to apply on inventory levels' `incoming_quantity` attribute.
|
* Filters to apply on inventory levels' `incoming_quantity` attribute.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -4,62 +4,62 @@ import {
|
|||||||
} from "../../common"
|
} from "../../common"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @schema ReservationItemDTO
|
* The reservation item details.
|
||||||
* title: "Reservation item"
|
|
||||||
* description: "Represents a reservation of an inventory item at a stock location"
|
|
||||||
* type: object
|
|
||||||
* required:
|
|
||||||
* - id
|
|
||||||
* - location_id
|
|
||||||
* - inventory_item_id
|
|
||||||
* - quantity
|
|
||||||
* properties:
|
|
||||||
* id:
|
|
||||||
* description: "The id of the reservation item"
|
|
||||||
* type: string
|
|
||||||
* location_id:
|
|
||||||
* description: "The id of the location of the reservation"
|
|
||||||
* type: string
|
|
||||||
* inventory_item_id:
|
|
||||||
* description: "The id of the inventory item the reservation relates to"
|
|
||||||
* type: string
|
|
||||||
* description:
|
|
||||||
* description: "Description of the reservation item"
|
|
||||||
* type: string
|
|
||||||
* created_by:
|
|
||||||
* description: "UserId of user who created the reservation item"
|
|
||||||
* type: string
|
|
||||||
* quantity:
|
|
||||||
* description: "The id of the reservation item"
|
|
||||||
* type: number
|
|
||||||
* metadata:
|
|
||||||
* type: object
|
|
||||||
* description: An optional key-value map with additional details
|
|
||||||
* example: {car: "white"}
|
|
||||||
* created_at:
|
|
||||||
* type: string
|
|
||||||
* description: "The date with timezone at which the resource was created."
|
|
||||||
* format: date-time
|
|
||||||
* updated_at:
|
|
||||||
* type: string
|
|
||||||
* description: "The date with timezone at which the resource was updated."
|
|
||||||
* format: date-time
|
|
||||||
* deleted_at:
|
|
||||||
* type: string
|
|
||||||
* description: "The date with timezone at which the resource was deleted."
|
|
||||||
* format: date-time
|
|
||||||
*/
|
*/
|
||||||
export interface ReservationItemDTO {
|
export interface ReservationItemDTO {
|
||||||
|
/**
|
||||||
|
* The ID of the reservation item.
|
||||||
|
*/
|
||||||
id: string
|
id: string
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The associated location's ID.
|
||||||
|
*/
|
||||||
location_id: string
|
location_id: string
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The associated inventory item's ID.
|
||||||
|
*/
|
||||||
inventory_item_id: string
|
inventory_item_id: string
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The quantity of the reservation item.
|
||||||
|
*/
|
||||||
quantity: number
|
quantity: number
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The associated line item's ID.
|
||||||
|
*/
|
||||||
line_item_id?: string | null
|
line_item_id?: string | null
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The description of the reservation item.
|
||||||
|
*/
|
||||||
description?: string | null
|
description?: string | null
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The created by of the reservation item.
|
||||||
|
*/
|
||||||
created_by?: string | null
|
created_by?: string | null
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds custom data in key-value pairs.
|
||||||
|
*/
|
||||||
metadata: Record<string, unknown> | null
|
metadata: Record<string, unknown> | null
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The creation date of the reservation item.
|
||||||
|
*/
|
||||||
created_at: string | Date
|
created_at: string | Date
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The update date of the reservation item.
|
||||||
|
*/
|
||||||
updated_at: string | Date
|
updated_at: string | Date
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The deletion date of the reservation item.
|
||||||
|
*/
|
||||||
deleted_at: string | Date | null
|
deleted_at: string | Date | null
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -73,6 +73,7 @@ export interface FilterableReservationItemProps {
|
|||||||
* The IDs to filter reservation items by.
|
* The IDs to filter reservation items by.
|
||||||
*/
|
*/
|
||||||
id?: string | string[]
|
id?: string | string[]
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ignore
|
* @ignore
|
||||||
*
|
*
|
||||||
@@ -80,26 +81,32 @@ export interface FilterableReservationItemProps {
|
|||||||
* This property is not used.
|
* This property is not used.
|
||||||
*/
|
*/
|
||||||
type?: string | string[]
|
type?: string | string[]
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter reservation items by the ID of their associated line item.
|
* Filter reservation items by the ID of their associated line item.
|
||||||
*/
|
*/
|
||||||
line_item_id?: string | string[]
|
line_item_id?: string | string[]
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter reservation items by the ID of their associated inventory item.
|
* Filter reservation items by the ID of their associated inventory item.
|
||||||
*/
|
*/
|
||||||
inventory_item_id?: string | string[]
|
inventory_item_id?: string | string[]
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter reservation items by the ID of their associated location.
|
* Filter reservation items by the ID of their associated location.
|
||||||
*/
|
*/
|
||||||
location_id?: string | string[]
|
location_id?: string | string[]
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Description filters to apply on the reservation items' `description` attribute.
|
* Description filters to apply on the reservation items' `description` attribute.
|
||||||
*/
|
*/
|
||||||
description?: string | StringComparisonOperator
|
description?: string | StringComparisonOperator
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The "created by" values to filter reservation items by.
|
* The "created by" values to filter reservation items by.
|
||||||
*/
|
*/
|
||||||
created_by?: string | string[]
|
created_by?: string | string[]
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filters to apply on the reservation items' `quantity` attribute.
|
* Filters to apply on the reservation items' `quantity` attribute.
|
||||||
*/
|
*/
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user