chore: added tsdocs to the Inventory Next Module (#6814)
This commit is contained in:
@@ -1,89 +1,97 @@
|
||||
import { StringComparisonOperator } from "../../common"
|
||||
|
||||
/**
|
||||
* @schema InventoryItemDTO
|
||||
* 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
|
||||
* The inventory item details.
|
||||
*/
|
||||
export interface InventoryItemDTO {
|
||||
/**
|
||||
* The ID of the inventory item.
|
||||
*/
|
||||
id: string
|
||||
|
||||
/**
|
||||
* The SKU of the inventory item.
|
||||
*/
|
||||
sku?: string | null
|
||||
|
||||
/**
|
||||
* The origin country of the inventory item.
|
||||
*/
|
||||
origin_country?: string | null
|
||||
|
||||
/**
|
||||
* The HS code of the inventory item.
|
||||
*/
|
||||
hs_code?: string | null
|
||||
|
||||
/**
|
||||
* Whether the inventory item requires shipping.
|
||||
*/
|
||||
requires_shipping: boolean
|
||||
|
||||
/**
|
||||
* The mid code of the inventory item.
|
||||
*/
|
||||
mid_code?: string | null
|
||||
|
||||
/**
|
||||
* The material of the inventory item.
|
||||
*/
|
||||
material?: string | null
|
||||
|
||||
/**
|
||||
* The weight of the inventory item.
|
||||
*/
|
||||
weight?: number | null
|
||||
|
||||
/**
|
||||
* The length of the inventory item.
|
||||
*/
|
||||
length?: number | null
|
||||
|
||||
/**
|
||||
* The height of the inventory item.
|
||||
*/
|
||||
height?: number | null
|
||||
|
||||
/**
|
||||
* The width of the inventory item.
|
||||
*/
|
||||
width?: number | null
|
||||
|
||||
/**
|
||||
* The title of the inventory item.
|
||||
*/
|
||||
title?: string | null
|
||||
|
||||
/**
|
||||
* The description of the inventory item.
|
||||
*/
|
||||
description?: string | null
|
||||
|
||||
/**
|
||||
* The thumbnail of the inventory item.
|
||||
*/
|
||||
thumbnail?: string | null
|
||||
|
||||
/**
|
||||
* Holds custom data in key-value pairs.
|
||||
*/
|
||||
metadata?: Record<string, unknown> | null
|
||||
|
||||
/**
|
||||
* The creation date of the inventory item.
|
||||
*/
|
||||
created_at: string | Date
|
||||
|
||||
/**
|
||||
* The update date of the inventory item.
|
||||
*/
|
||||
updated_at: string | Date
|
||||
|
||||
/**
|
||||
* The deletion date of the inventory item.
|
||||
*/
|
||||
deleted_at: string | Date | null
|
||||
}
|
||||
|
||||
@@ -97,26 +105,32 @@ export interface FilterableInventoryItemProps {
|
||||
* The IDs to filter inventory items by.
|
||||
*/
|
||||
id?: string | string[]
|
||||
|
||||
/**
|
||||
* Filter inventory items by the ID of their associated location.
|
||||
*/
|
||||
location_id?: string | string[]
|
||||
|
||||
/**
|
||||
* Search term to search inventory items' attributes.
|
||||
*/
|
||||
q?: string
|
||||
|
||||
/**
|
||||
* The SKUs to filter inventory items by.
|
||||
*/
|
||||
sku?: string | string[] | StringComparisonOperator
|
||||
|
||||
/**
|
||||
* The origin country to filter inventory items by.
|
||||
*/
|
||||
origin_country?: string | string[]
|
||||
|
||||
/**
|
||||
* The HS Codes to filter inventory items by.
|
||||
*/
|
||||
hs_code?: string | string[] | StringComparisonOperator
|
||||
|
||||
/**
|
||||
* Filter inventory items by whether they require shipping.
|
||||
*/
|
||||
|
||||
@@ -3,76 +3,90 @@ import { BaseFilterable, OperatorMap } from "../../dal"
|
||||
import { NumericalComparisonOperator } from "../../common"
|
||||
|
||||
/**
|
||||
* @schema InventoryLevelDTO
|
||||
* 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
|
||||
* The inventory level details.
|
||||
*/
|
||||
export interface InventoryLevelDTO {
|
||||
/**
|
||||
* The ID of the inventory level.
|
||||
*/
|
||||
id: string
|
||||
|
||||
/**
|
||||
* The associated inventory item's ID.
|
||||
*/
|
||||
inventory_item_id: string
|
||||
|
||||
/**
|
||||
* The associated location's ID.
|
||||
*/
|
||||
location_id: string
|
||||
|
||||
/**
|
||||
* The stocked quantity of the inventory level.
|
||||
*/
|
||||
stocked_quantity: number
|
||||
|
||||
/**
|
||||
* The reserved quantity of the inventory level.
|
||||
*/
|
||||
reserved_quantity: number
|
||||
|
||||
/**
|
||||
* The incoming quantity of the inventory level.
|
||||
*/
|
||||
incoming_quantity: number
|
||||
|
||||
/**
|
||||
* The available quantity of the inventory level.
|
||||
*/
|
||||
available_quantity: number
|
||||
|
||||
/**
|
||||
* Holds custom data in key-value pairs.
|
||||
*/
|
||||
metadata: Record<string, unknown> | null
|
||||
|
||||
/**
|
||||
* The creation date of the inventory level.
|
||||
*/
|
||||
created_at: string | Date
|
||||
|
||||
/**
|
||||
* The update date of the inventory level.
|
||||
*/
|
||||
updated_at: string | Date
|
||||
|
||||
/**
|
||||
* The deletion date of the inventory level.
|
||||
*/
|
||||
deleted_at: string | Date | null
|
||||
}
|
||||
|
||||
/**
|
||||
* The filters to apply on the retrieved inventory levels.
|
||||
*/
|
||||
export interface FilterableInventoryLevelProps
|
||||
extends BaseFilterable<FilterableInventoryLevelProps> {
|
||||
/**
|
||||
* Filter inventory levels by the ID of their associated inventory item.
|
||||
*/
|
||||
inventory_item_id?: string | string[]
|
||||
|
||||
/**
|
||||
* Filter inventory levels by the ID of their associated inventory location.
|
||||
*/
|
||||
location_id?: string | string[]
|
||||
|
||||
/**
|
||||
* Filters to apply on inventory levels' `stocked_quantity` attribute.
|
||||
*/
|
||||
stocked_quantity?: number | OperatorMap<Number>
|
||||
|
||||
/**
|
||||
* Filters to apply on inventory levels' `reserved_quantity` attribute.
|
||||
*/
|
||||
reserved_quantity?: number | OperatorMap<Number>
|
||||
|
||||
/**
|
||||
* Filters to apply on inventory levels' `incoming_quantity` attribute.
|
||||
*/
|
||||
|
||||
@@ -4,62 +4,62 @@ import {
|
||||
} from "../../common"
|
||||
|
||||
/**
|
||||
* @schema ReservationItemDTO
|
||||
* 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
|
||||
* The reservation item details.
|
||||
*/
|
||||
export interface ReservationItemDTO {
|
||||
/**
|
||||
* The ID of the reservation item.
|
||||
*/
|
||||
id: string
|
||||
|
||||
/**
|
||||
* The associated location's ID.
|
||||
*/
|
||||
location_id: string
|
||||
|
||||
/**
|
||||
* The associated inventory item's ID.
|
||||
*/
|
||||
inventory_item_id: string
|
||||
|
||||
/**
|
||||
* The quantity of the reservation item.
|
||||
*/
|
||||
quantity: number
|
||||
|
||||
/**
|
||||
* The associated line item's ID.
|
||||
*/
|
||||
line_item_id?: string | null
|
||||
|
||||
/**
|
||||
* The description of the reservation item.
|
||||
*/
|
||||
description?: string | null
|
||||
|
||||
/**
|
||||
* The created by of the reservation item.
|
||||
*/
|
||||
created_by?: string | null
|
||||
|
||||
/**
|
||||
* Holds custom data in key-value pairs.
|
||||
*/
|
||||
metadata: Record<string, unknown> | null
|
||||
|
||||
/**
|
||||
* The creation date of the reservation item.
|
||||
*/
|
||||
created_at: string | Date
|
||||
|
||||
/**
|
||||
* The update date of the reservation item.
|
||||
*/
|
||||
updated_at: string | Date
|
||||
|
||||
/**
|
||||
* The deletion date of the reservation item.
|
||||
*/
|
||||
deleted_at: string | Date | null
|
||||
}
|
||||
|
||||
@@ -73,6 +73,7 @@ export interface FilterableReservationItemProps {
|
||||
* The IDs to filter reservation items by.
|
||||
*/
|
||||
id?: string | string[]
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*
|
||||
@@ -80,26 +81,32 @@ export interface FilterableReservationItemProps {
|
||||
* This property is not used.
|
||||
*/
|
||||
type?: string | string[]
|
||||
|
||||
/**
|
||||
* Filter reservation items by the ID of their associated line item.
|
||||
*/
|
||||
line_item_id?: string | string[]
|
||||
|
||||
/**
|
||||
* Filter reservation items by the ID of their associated inventory item.
|
||||
*/
|
||||
inventory_item_id?: string | string[]
|
||||
|
||||
/**
|
||||
* Filter reservation items by the ID of their associated location.
|
||||
*/
|
||||
location_id?: string | string[]
|
||||
|
||||
/**
|
||||
* Description filters to apply on the reservation items' `description` attribute.
|
||||
*/
|
||||
description?: string | StringComparisonOperator
|
||||
|
||||
/**
|
||||
* The "created by" values to filter reservation items by.
|
||||
*/
|
||||
created_by?: string | string[]
|
||||
|
||||
/**
|
||||
* 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