Skip to main content
Skip to main content

IInventoryService

admin/discounts.internal.IInventoryService

Methods

__joinerConfig

__joinerConfig(): ModuleJoinerConfig

Returns

ModuleJoinerConfig

ModuleJoinerConfigOmit<JoinerServiceConfig, "serviceName" | "primaryKeys" | "relationships" | "extends"> & { databaseConfig?: { extraFields?: Record<string, { defaultValue?: string ; nullable?: boolean ; options?: Record<string, unknown> ; type: "date" | "time" | "datetime" | "bigint" | "blob" | "uint8array" | "array" | "enumArray" | "enum" | "json" | "integer" | "smallint" | "tinyint" | "mediumint" | "float" | "double" | "boolean" | "decimal" | "string" | "uuid" | "text" }> ; idPrefix?: string ; tableName?: string } ; extends?: { fieldAlias?: Record<string, string | { forwardArgumentsOnPath: string[] ; path: string }> ; relationship: ModuleJoinerRelationship ; serviceName: string }[] ; isLink?: boolean ; isReadOnlyLink?: boolean ; linkableKeys?: Record<string, string> ; primaryKeys?: string[] ; relationships?: ModuleJoinerRelationship[] ; schema?: string ; serviceName?: string }Required

adjustInventory

adjustInventory(inventoryItemId, locationId, adjustment, context?): Promise<InventoryLevelDTO>

Parameters

inventoryItemIdstringRequired
locationIdstringRequired
adjustmentnumberRequired

Returns

Promise<InventoryLevelDTO>

PromisePromise<InventoryLevelDTO>Required

confirmInventory

confirmInventory(inventoryItemId, locationIds, quantity, context?): Promise<boolean>

Parameters

inventoryItemIdstringRequired
locationIdsstring[]Required
quantitynumberRequired

Returns

Promise<boolean>

PromisePromise<boolean>Required

createInventoryItem

createInventoryItem(input, context?): Promise<InventoryItemDTO>

Parameters

Returns

Promise<InventoryItemDTO>

PromisePromise<InventoryItemDTO>Required

createInventoryItems

createInventoryItems(input, context?): Promise<InventoryItemDTO[]>

Parameters

Returns

Promise<InventoryItemDTO[]>

PromisePromise<InventoryItemDTO[]>Required

createInventoryLevel

createInventoryLevel(data, context?): Promise<InventoryLevelDTO>

Parameters

Returns

Promise<InventoryLevelDTO>

PromisePromise<InventoryLevelDTO>Required

createInventoryLevels

createInventoryLevels(data, context?): Promise<InventoryLevelDTO[]>

Parameters

Returns

Promise<InventoryLevelDTO[]>

PromisePromise<InventoryLevelDTO[]>Required

createReservationItem

createReservationItem(input, context?): Promise<ReservationItemDTO>

Parameters

Returns

Promise<ReservationItemDTO>

PromisePromise<ReservationItemDTO>Required

createReservationItems

createReservationItems(input, context?): Promise<ReservationItemDTO[]>

Parameters

Returns

Promise<ReservationItemDTO[]>

PromisePromise<ReservationItemDTO[]>Required

deleteInventoryItem

deleteInventoryItem(inventoryItemId, context?): Promise<void>

Parameters

inventoryItemIdstring | string[]Required

Returns

Promise<void>

PromisePromise<void>Required

deleteInventoryItemLevelByLocationId

deleteInventoryItemLevelByLocationId(locationId, context?): Promise<void>

Parameters

locationIdstring | string[]Required

Returns

Promise<void>

PromisePromise<void>Required

deleteInventoryLevel

deleteInventoryLevel(inventoryLevelId, locationId, context?): Promise<void>

Parameters

inventoryLevelIdstringRequired
locationIdstringRequired

Returns

Promise<void>

PromisePromise<void>Required

deleteReservationItem

deleteReservationItem(reservationItemId, context?): Promise<void>

Parameters

reservationItemIdstring | string[]Required

Returns

Promise<void>

PromisePromise<void>Required

deleteReservationItemByLocationId

deleteReservationItemByLocationId(locationId, context?): Promise<void>

Parameters

locationIdstring | string[]Required

Returns

Promise<void>

PromisePromise<void>Required

deleteReservationItemsByLineItem

deleteReservationItemsByLineItem(lineItemId, context?): Promise<void>

Parameters

lineItemIdstring | string[]Required

Returns

Promise<void>

PromisePromise<void>Required

listInventoryItems

listInventoryItems(selector, config?, context?): Promise<[InventoryItemDTO[], number]>

Parameters

Returns

Promise<[InventoryItemDTO[], number]>

PromisePromise<[InventoryItemDTO[], number]>Required

listInventoryLevels

listInventoryLevels(selector, config?, context?): Promise<[InventoryLevelDTO[], number]>

Parameters

Returns

Promise<[InventoryLevelDTO[], number]>

PromisePromise<[InventoryLevelDTO[], number]>Required

listReservationItems

listReservationItems(selector, config?, context?): Promise<[ReservationItemDTO[], number]>

Parameters

Returns

Promise<[ReservationItemDTO[], number]>

PromisePromise<[ReservationItemDTO[], number]>Required

restoreInventoryItem

restoreInventoryItem(inventoryItemId, context?): Promise<void>

Parameters

inventoryItemIdstring | string[]Required

Returns

Promise<void>

PromisePromise<void>Required

retrieveAvailableQuantity

retrieveAvailableQuantity(inventoryItemId, locationIds, context?): Promise<number>

Parameters

inventoryItemIdstringRequired
locationIdsstring[]Required

Returns

Promise<number>

PromisePromise<number>Required

retrieveInventoryItem

retrieveInventoryItem(inventoryItemId, config?, context?): Promise<InventoryItemDTO>

Parameters

inventoryItemIdstringRequired

Returns

Promise<InventoryItemDTO>

PromisePromise<InventoryItemDTO>Required

retrieveInventoryLevel

retrieveInventoryLevel(inventoryItemId, locationId, context?): Promise<InventoryLevelDTO>

Parameters

inventoryItemIdstringRequired
locationIdstringRequired

Returns

Promise<InventoryLevelDTO>

PromisePromise<InventoryLevelDTO>Required

retrieveReservationItem

retrieveReservationItem(reservationId, context?): Promise<ReservationItemDTO>

Parameters

reservationIdstringRequired

Returns

Promise<ReservationItemDTO>

PromisePromise<ReservationItemDTO>Required

retrieveReservedQuantity

retrieveReservedQuantity(inventoryItemId, locationIds, context?): Promise<number>

Parameters

inventoryItemIdstringRequired
locationIdsstring[]Required

Returns

Promise<number>

PromisePromise<number>Required

retrieveStockedQuantity

retrieveStockedQuantity(inventoryItemId, locationIds, context?): Promise<number>

Parameters

inventoryItemIdstringRequired
locationIdsstring[]Required

Returns

Promise<number>

PromisePromise<number>Required

updateInventoryItem

updateInventoryItem(inventoryItemId, input, context?): Promise<InventoryItemDTO>

Parameters

inventoryItemIdstringRequired

Returns

Promise<InventoryItemDTO>

PromisePromise<InventoryItemDTO>Required

updateInventoryLevel

updateInventoryLevel(inventoryItemId, locationId, update, context?): Promise<InventoryLevelDTO>

Parameters

inventoryItemIdstringRequired
locationIdstringRequired

Returns

Promise<InventoryLevelDTO>

PromisePromise<InventoryLevelDTO>Required

updateInventoryLevels

updateInventoryLevels(updates, context?): Promise<InventoryLevelDTO[]>

Parameters

updates{ inventory_item_id: string ; location_id: string } & UpdateInventoryLevelInput[]Required

Returns

Promise<InventoryLevelDTO[]>

PromisePromise<InventoryLevelDTO[]>Required

updateReservationItem

updateReservationItem(reservationItemId, input, context?): Promise<ReservationItemDTO>

Parameters

reservationItemIdstringRequired

Returns

Promise<ReservationItemDTO>

PromisePromise<ReservationItemDTO>Required
Was this section helpful?