@medusajs/types 1.12.0-snapshot-20240607093839 → 1.12.0-snapshot-20240703074611
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/api-key/service.d.ts +24 -24
- package/dist/api-key/service.d.ts.map +1 -1
- package/dist/auth/service.d.ts +18 -18
- package/dist/auth/service.d.ts.map +1 -1
- package/dist/bundles.d.ts +2 -1
- package/dist/bundles.d.ts.map +1 -1
- package/dist/bundles.js +3 -2
- package/dist/bundles.js.map +1 -1
- package/dist/cart/mutations.d.ts +8 -0
- package/dist/cart/mutations.d.ts.map +1 -1
- package/dist/cart/mutations.js.map +1 -1
- package/dist/cart/service.d.ts +30 -52
- package/dist/cart/service.d.ts.map +1 -1
- package/dist/common/common.d.ts +6 -1
- package/dist/common/common.d.ts.map +1 -1
- package/dist/currency/service.d.ts +9 -9
- package/dist/currency/service.d.ts.map +1 -1
- package/dist/customer/mutations.d.ts +27 -26
- package/dist/customer/mutations.d.ts.map +1 -1
- package/dist/customer/service.d.ts +40 -43
- package/dist/customer/service.d.ts.map +1 -1
- package/dist/dal/repository-service.d.ts +2 -2
- package/dist/dal/repository-service.d.ts.map +1 -1
- package/dist/dml/index.d.ts +161 -0
- package/dist/dml/index.d.ts.map +1 -0
- package/dist/dml/index.js +5 -0
- package/dist/dml/index.js.map +1 -0
- package/dist/event-bus/common.d.ts +12 -20
- package/dist/event-bus/common.d.ts.map +1 -1
- package/dist/event-bus/event-bus-module.d.ts +4 -4
- package/dist/event-bus/event-bus-module.d.ts.map +1 -1
- package/dist/event-bus/event-bus.d.ts +2 -4
- package/dist/event-bus/event-bus.d.ts.map +1 -1
- package/dist/file/service.d.ts +12 -12
- package/dist/file/service.d.ts.map +1 -1
- package/dist/fulfillment/mutations/service-zone.d.ts +1 -1
- package/dist/fulfillment/mutations/service-zone.d.ts.map +1 -1
- package/dist/fulfillment/service.d.ts +27 -27
- package/dist/fulfillment/service.d.ts.map +1 -1
- package/dist/http/currency/admin/entities.d.ts +14 -0
- package/dist/http/currency/admin/entities.d.ts.map +1 -0
- package/dist/http/currency/admin/entities.js +3 -0
- package/dist/http/currency/admin/entities.js.map +1 -0
- package/dist/http/currency/admin/index.d.ts +2 -0
- package/dist/http/currency/admin/index.d.ts.map +1 -0
- package/dist/{inventory/bundle.js → http/currency/admin/index.js} +2 -3
- package/dist/http/currency/admin/index.js.map +1 -0
- package/dist/http/currency/index.d.ts +2 -0
- package/dist/http/currency/index.d.ts.map +1 -0
- package/dist/{region__legacy → http/currency}/index.js +1 -1
- package/dist/http/currency/index.js.map +1 -0
- package/dist/http/fulfillment-provider/admin/entities.d.ts +1 -5
- package/dist/http/fulfillment-provider/admin/entities.d.ts.map +1 -1
- package/dist/http/fulfillment-set/admin/entities.d.ts +3 -1
- package/dist/http/fulfillment-set/admin/entities.d.ts.map +1 -1
- package/dist/http/index.d.ts +5 -0
- package/dist/http/index.d.ts.map +1 -1
- package/dist/http/index.js +5 -0
- package/dist/http/index.js.map +1 -1
- package/dist/http/inventory/{inventory.d.ts → admin/entities.d.ts} +2 -10
- package/dist/http/inventory/admin/entities.d.ts.map +1 -0
- package/dist/http/inventory/admin/entities.js +3 -0
- package/dist/http/inventory/admin/entities.js.map +1 -0
- package/dist/http/inventory/admin/index.d.ts +5 -0
- package/dist/http/inventory/admin/index.d.ts.map +1 -0
- package/dist/http/inventory/admin/index.js +21 -0
- package/dist/http/inventory/admin/index.js.map +1 -0
- package/dist/http/inventory/admin/payloads.d.ts +19 -0
- package/dist/http/inventory/admin/payloads.d.ts.map +1 -0
- package/dist/http/inventory/admin/payloads.js +3 -0
- package/dist/http/inventory/admin/payloads.js.map +1 -0
- package/dist/http/inventory/admin/queries.d.ts +18 -0
- package/dist/http/inventory/admin/queries.d.ts.map +1 -0
- package/dist/http/{product/store.js → inventory/admin/queries.js} +1 -1
- package/dist/http/inventory/admin/queries.js.map +1 -0
- package/dist/http/inventory/admin/responses.d.ts +10 -0
- package/dist/http/inventory/admin/responses.d.ts.map +1 -0
- package/dist/http/inventory/admin/responses.js +3 -0
- package/dist/http/inventory/admin/responses.js.map +1 -0
- package/dist/http/inventory/index.d.ts +1 -2
- package/dist/http/inventory/index.d.ts.map +1 -1
- package/dist/http/inventory/index.js +1 -2
- package/dist/http/inventory/index.js.map +1 -1
- package/dist/http/inventory-level/admin/entities.d.ts +11 -0
- package/dist/http/inventory-level/admin/entities.d.ts.map +1 -0
- package/dist/http/inventory-level/admin/entities.js +3 -0
- package/dist/http/inventory-level/admin/entities.js.map +1 -0
- package/dist/http/inventory-level/admin/index.d.ts +5 -0
- package/dist/http/inventory-level/admin/index.d.ts.map +1 -0
- package/dist/http/inventory-level/admin/index.js +21 -0
- package/dist/http/inventory-level/admin/index.js.map +1 -0
- package/dist/http/inventory-level/admin/payloads.d.ts +15 -0
- package/dist/http/inventory-level/admin/payloads.d.ts.map +1 -0
- package/dist/http/inventory-level/admin/payloads.js +3 -0
- package/dist/http/inventory-level/admin/payloads.js.map +1 -0
- package/dist/http/inventory-level/admin/queries.d.ts +5 -0
- package/dist/http/inventory-level/admin/queries.d.ts.map +1 -0
- package/dist/http/{product/admin.js → inventory-level/admin/queries.js} +1 -1
- package/dist/http/inventory-level/admin/queries.js.map +1 -0
- package/dist/http/inventory-level/admin/responses.d.ts +9 -0
- package/dist/http/inventory-level/admin/responses.d.ts.map +1 -0
- package/dist/http/{inventory/inventory.js → inventory-level/admin/responses.js} +1 -1
- package/dist/http/inventory-level/admin/responses.js.map +1 -0
- package/dist/http/inventory-level/index.d.ts +2 -0
- package/dist/http/inventory-level/index.d.ts.map +1 -0
- package/dist/http/inventory-level/index.js +18 -0
- package/dist/http/inventory-level/index.js.map +1 -0
- package/dist/http/order/common.d.ts +2 -0
- package/dist/http/order/common.d.ts.map +1 -1
- package/dist/http/price-list/admin/entities.d.ts +21 -0
- package/dist/http/price-list/admin/entities.d.ts.map +1 -0
- package/dist/http/price-list/admin/entities.js +3 -0
- package/dist/http/price-list/admin/entities.js.map +1 -0
- package/dist/http/price-list/admin/index.d.ts +5 -0
- package/dist/http/price-list/admin/index.d.ts.map +1 -0
- package/dist/http/price-list/admin/index.js +21 -0
- package/dist/http/price-list/admin/index.js.map +1 -0
- package/dist/http/price-list/admin/payloads.d.ts +46 -0
- package/dist/http/price-list/admin/payloads.d.ts.map +1 -0
- package/dist/http/price-list/admin/payloads.js +3 -0
- package/dist/http/price-list/admin/payloads.js.map +1 -0
- package/dist/http/price-list/admin/queries.d.ts +14 -0
- package/dist/http/price-list/admin/queries.d.ts.map +1 -0
- package/dist/http/{product-category/store.js → price-list/admin/queries.js} +1 -1
- package/dist/http/price-list/admin/queries.js.map +1 -0
- package/dist/http/price-list/admin/responses.d.ts +12 -0
- package/dist/http/price-list/admin/responses.d.ts.map +1 -0
- package/dist/http/price-list/admin/responses.js +3 -0
- package/dist/http/price-list/admin/responses.js.map +1 -0
- package/dist/http/price-list/index.d.ts +2 -0
- package/dist/http/price-list/index.d.ts.map +1 -0
- package/dist/http/price-list/index.js +18 -0
- package/dist/http/price-list/index.js.map +1 -0
- package/dist/http/pricing/admin/{entitites.d.ts → entities.d.ts} +1 -1
- package/dist/http/pricing/admin/entities.d.ts.map +1 -0
- package/dist/http/pricing/admin/entities.js +3 -0
- package/dist/http/pricing/admin/entities.js.map +1 -0
- package/dist/http/pricing/admin/index.d.ts +1 -1
- package/dist/http/pricing/admin/index.d.ts.map +1 -1
- package/dist/http/pricing/admin/index.js +1 -1
- package/dist/http/pricing/admin/index.js.map +1 -1
- package/dist/http/product/admin/entitites.d.ts +26 -0
- package/dist/http/product/admin/entitites.d.ts.map +1 -0
- package/dist/http/product/admin/entitites.js.map +1 -0
- package/dist/http/product/admin/index.d.ts +5 -0
- package/dist/http/product/admin/index.d.ts.map +1 -0
- package/dist/http/product/admin/index.js +21 -0
- package/dist/http/product/admin/index.js.map +1 -0
- package/dist/http/product/admin/payloads.d.ts +152 -0
- package/dist/http/product/admin/payloads.d.ts.map +1 -0
- package/dist/http/product/admin/payloads.js +3 -0
- package/dist/http/product/admin/payloads.js.map +1 -0
- package/dist/http/product/admin/queries.d.ts +12 -0
- package/dist/http/product/admin/queries.d.ts.map +1 -0
- package/dist/http/product/admin/queries.js +3 -0
- package/dist/http/product/admin/queries.js.map +1 -0
- package/dist/http/product/admin/responses.d.ts +35 -0
- package/dist/http/product/admin/responses.d.ts.map +1 -0
- package/dist/http/product/admin/responses.js +3 -0
- package/dist/http/product/admin/responses.js.map +1 -0
- package/dist/http/product/common.d.ts +72 -106
- package/dist/http/product/common.d.ts.map +1 -1
- package/dist/http/product/store/entitites.d.ts +19 -0
- package/dist/http/product/store/entitites.d.ts.map +1 -0
- package/dist/http/product/store/entitites.js +3 -0
- package/dist/http/product/store/entitites.js.map +1 -0
- package/dist/http/product/store/index.d.ts +4 -0
- package/dist/http/product/store/index.d.ts.map +1 -0
- package/dist/http/product/store/index.js +20 -0
- package/dist/http/product/store/index.js.map +1 -0
- package/dist/http/product/store/queries.d.ts +13 -0
- package/dist/http/product/store/queries.d.ts.map +1 -0
- package/dist/http/product/store/queries.js +3 -0
- package/dist/http/product/store/queries.js.map +1 -0
- package/dist/http/product/store/responses.d.ts +9 -0
- package/dist/http/product/store/responses.d.ts.map +1 -0
- package/dist/http/product/store/responses.js +3 -0
- package/dist/http/product/store/responses.js.map +1 -0
- package/dist/http/product-category/admin/entities.d.ts +8 -0
- package/dist/http/product-category/admin/entities.d.ts.map +1 -0
- package/dist/http/product-category/admin/entities.js +3 -0
- package/dist/http/product-category/admin/entities.js.map +1 -0
- package/dist/http/product-category/admin/index.d.ts +5 -0
- package/dist/http/product-category/admin/index.d.ts.map +1 -0
- package/dist/http/product-category/admin/index.js +21 -0
- package/dist/http/product-category/admin/index.js.map +1 -0
- package/dist/http/product-category/admin/payloads.d.ts +25 -0
- package/dist/http/product-category/admin/payloads.d.ts.map +1 -0
- package/dist/http/product-category/admin/payloads.js +3 -0
- package/dist/http/product-category/admin/payloads.js.map +1 -0
- package/dist/http/product-category/admin/queries.d.ts +8 -0
- package/dist/http/product-category/admin/queries.d.ts.map +1 -0
- package/dist/http/product-category/{admin.js → admin/queries.js} +1 -1
- package/dist/http/product-category/admin/queries.js.map +1 -0
- package/dist/http/product-category/admin/responses.d.ts +12 -0
- package/dist/http/product-category/admin/responses.d.ts.map +1 -0
- package/dist/http/product-category/admin/responses.js +3 -0
- package/dist/http/product-category/admin/responses.js.map +1 -0
- package/dist/http/product-category/common.d.ts +31 -7
- package/dist/http/product-category/common.d.ts.map +1 -1
- package/dist/http/product-category/store/entities.d.ts +6 -0
- package/dist/http/product-category/store/entities.d.ts.map +1 -0
- package/dist/http/product-category/store/entities.js +3 -0
- package/dist/http/product-category/store/entities.js.map +1 -0
- package/dist/http/product-category/store/index.d.ts +4 -0
- package/dist/http/product-category/store/index.d.ts.map +1 -0
- package/dist/http/product-category/store/index.js +20 -0
- package/dist/http/product-category/store/index.js.map +1 -0
- package/dist/http/product-category/store/queries.d.ts +6 -0
- package/dist/http/product-category/store/queries.d.ts.map +1 -0
- package/dist/http/product-category/store/queries.js +3 -0
- package/dist/http/product-category/store/queries.js.map +1 -0
- package/dist/http/product-category/store/responses.d.ts +10 -0
- package/dist/http/product-category/store/responses.d.ts.map +1 -0
- package/dist/http/product-category/store/responses.js +3 -0
- package/dist/http/product-category/store/responses.js.map +1 -0
- package/dist/http/product-type/admin/entities.d.ts +4 -0
- package/dist/http/product-type/admin/entities.d.ts.map +1 -0
- package/dist/http/product-type/admin/entities.js +3 -0
- package/dist/http/product-type/admin/entities.js.map +1 -0
- package/dist/http/product-type/admin/index.d.ts +5 -0
- package/dist/http/product-type/admin/index.d.ts.map +1 -0
- package/dist/http/product-type/admin/index.js +21 -0
- package/dist/http/product-type/admin/index.js.map +1 -0
- package/dist/http/product-type/admin/payloads.d.ts +9 -0
- package/dist/http/product-type/admin/payloads.d.ts.map +1 -0
- package/dist/http/product-type/admin/payloads.js +3 -0
- package/dist/http/product-type/admin/payloads.js.map +1 -0
- package/dist/http/product-type/admin/queries.d.ts +13 -0
- package/dist/http/product-type/admin/queries.d.ts.map +1 -0
- package/dist/http/product-type/admin/queries.js +3 -0
- package/dist/http/product-type/admin/queries.js.map +1 -0
- package/dist/http/product-type/admin/responses.d.ts +12 -0
- package/dist/http/product-type/admin/responses.d.ts.map +1 -0
- package/dist/http/product-type/admin/responses.js +3 -0
- package/dist/http/product-type/admin/responses.js.map +1 -0
- package/dist/http/product-type/common.d.ts +9 -0
- package/dist/http/product-type/common.d.ts.map +1 -0
- package/dist/{inventory → http/product-type}/common.js.map +1 -1
- package/dist/http/product-type/index.d.ts +3 -0
- package/dist/http/product-type/index.d.ts.map +1 -0
- package/dist/http/product-type/index.js +19 -0
- package/dist/http/product-type/index.js.map +1 -0
- package/dist/http/product-type/store/entities.d.ts +4 -0
- package/dist/http/product-type/store/entities.d.ts.map +1 -0
- package/dist/http/product-type/store/entities.js +3 -0
- package/dist/http/product-type/store/entities.js.map +1 -0
- package/dist/http/product-type/store/index.d.ts +2 -0
- package/dist/http/product-type/store/index.d.ts.map +1 -0
- package/dist/http/product-type/store/index.js +18 -0
- package/dist/http/product-type/store/index.js.map +1 -0
- package/dist/http/promotion/admin/rule-attribute-options.d.ts +5 -0
- package/dist/http/promotion/admin/rule-attribute-options.d.ts.map +1 -1
- package/dist/http/sales-channel/admin/queries.d.ts +2 -4
- package/dist/http/sales-channel/admin/queries.d.ts.map +1 -1
- package/dist/http/shipping-option/admin/entities.d.ts +9 -1
- package/dist/http/shipping-option/admin/entities.d.ts.map +1 -1
- package/dist/http/shipping-option/admin/payloads.d.ts +8 -9
- package/dist/http/shipping-option/admin/payloads.d.ts.map +1 -1
- package/dist/http/stock-locations/admin/entities.d.ts +2 -1
- package/dist/http/stock-locations/admin/entities.d.ts.map +1 -1
- package/dist/http/store/admin/entities.d.ts +23 -0
- package/dist/http/store/admin/entities.d.ts.map +1 -0
- package/dist/http/store/admin/entities.js +3 -0
- package/dist/http/store/admin/entities.js.map +1 -0
- package/dist/http/store/admin/index.d.ts +5 -0
- package/dist/http/store/admin/index.d.ts.map +1 -0
- package/dist/http/store/admin/index.js +21 -0
- package/dist/http/store/admin/index.js.map +1 -0
- package/dist/http/store/admin/payloads.d.ts +14 -0
- package/dist/http/store/admin/payloads.d.ts.map +1 -0
- package/dist/http/store/admin/payloads.js +3 -0
- package/dist/http/store/admin/payloads.js.map +1 -0
- package/dist/http/store/admin/queries.d.ts +10 -0
- package/dist/http/store/admin/queries.d.ts.map +1 -0
- package/dist/http/store/admin/queries.js +3 -0
- package/dist/http/store/admin/queries.js.map +1 -0
- package/dist/http/store/admin/responses.d.ts +10 -0
- package/dist/http/store/admin/responses.d.ts.map +1 -0
- package/dist/http/store/admin/responses.js +3 -0
- package/dist/http/store/admin/responses.js.map +1 -0
- package/dist/http/store/index.d.ts +2 -0
- package/dist/http/store/index.d.ts.map +1 -0
- package/dist/http/store/index.js +18 -0
- package/dist/http/store/index.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/inventory/common/reservation-item.d.ts +1 -1
- package/dist/inventory/index.d.ts +1 -2
- package/dist/inventory/index.d.ts.map +1 -1
- package/dist/inventory/index.js +1 -15
- package/dist/inventory/index.js.map +1 -1
- package/dist/inventory/mutations/reservation-item.d.ts +7 -7
- package/dist/inventory/mutations/reservation-item.d.ts.map +1 -1
- package/dist/inventory/service.d.ts +671 -640
- package/dist/inventory/service.d.ts.map +1 -1
- package/dist/joiner/index.d.ts +5 -2
- package/dist/joiner/index.d.ts.map +1 -1
- package/dist/modules-sdk/index.d.ts +12 -12
- package/dist/modules-sdk/index.d.ts.map +1 -1
- package/dist/modules-sdk/index.js +1 -1
- package/dist/modules-sdk/index.js.map +1 -1
- package/dist/modules-sdk/{internal-module-service.d.ts → medusa-internal-service.d.ts} +19 -18
- package/dist/modules-sdk/medusa-internal-service.d.ts.map +1 -0
- package/dist/{http/inventory/inventory-level.js → modules-sdk/medusa-internal-service.js} +1 -1
- package/dist/modules-sdk/medusa-internal-service.js.map +1 -0
- package/dist/notification/service.d.ts +15 -15
- package/dist/notification/service.d.ts.map +1 -1
- package/dist/order/common.d.ts +50 -1
- package/dist/order/common.d.ts.map +1 -1
- package/dist/order/mutations.d.ts +68 -17
- package/dist/order/mutations.d.ts.map +1 -1
- package/dist/order/service.d.ts +41 -30
- package/dist/order/service.d.ts.map +1 -1
- package/dist/pricing/common/index.d.ts +0 -2
- package/dist/pricing/common/index.d.ts.map +1 -1
- package/dist/pricing/common/index.js +0 -2
- package/dist/pricing/common/index.js.map +1 -1
- package/dist/pricing/common/money-amount.d.ts +2 -2
- package/dist/pricing/common/money-amount.d.ts.map +1 -1
- package/dist/pricing/common/price-list.d.ts +25 -125
- package/dist/pricing/common/price-list.d.ts.map +1 -1
- package/dist/pricing/common/price-rule.d.ts +8 -16
- package/dist/pricing/common/price-rule.d.ts.map +1 -1
- package/dist/pricing/common/price-set.d.ts +7 -56
- package/dist/pricing/common/price-set.d.ts.map +1 -1
- package/dist/pricing/service.d.ts +31 -290
- package/dist/pricing/service.d.ts.map +1 -1
- package/dist/pricing/workflows.d.ts +5 -5
- package/dist/pricing/workflows.d.ts.map +1 -1
- package/dist/product/common.d.ts +99 -79
- package/dist/product/common.d.ts.map +1 -1
- package/dist/product/service.d.ts +322 -203
- package/dist/product/service.d.ts.map +1 -1
- package/dist/promotion/common/application-method.d.ts +1 -1
- package/dist/promotion/common/application-method.d.ts.map +1 -1
- package/dist/promotion/mutations.d.ts +7 -7
- package/dist/promotion/mutations.d.ts.map +1 -1
- package/dist/promotion/service.d.ts +29 -29
- package/dist/promotion/service.d.ts.map +1 -1
- package/dist/region/common.d.ts.map +1 -1
- package/dist/region/mutations.d.ts +4 -3
- package/dist/region/mutations.d.ts.map +1 -1
- package/dist/region/service.d.ts +31 -31
- package/dist/region/service.d.ts.map +1 -1
- package/dist/sales-channel/mutations.d.ts +4 -3
- package/dist/sales-channel/mutations.d.ts.map +1 -1
- package/dist/sales-channel/service.d.ts +28 -28
- package/dist/sales-channel/service.d.ts.map +1 -1
- package/dist/shared-context.d.ts +2 -3
- package/dist/shared-context.d.ts.map +1 -1
- package/dist/stock-location/common.d.ts +12 -17
- package/dist/stock-location/common.d.ts.map +1 -1
- package/dist/stock-location/index.d.ts +0 -1
- package/dist/stock-location/index.d.ts.map +1 -1
- package/dist/stock-location/index.js +0 -1
- package/dist/stock-location/index.js.map +1 -1
- package/dist/stock-location/service.d.ts +193 -180
- package/dist/stock-location/service.d.ts.map +1 -1
- package/dist/store/common/store.d.ts +31 -5
- package/dist/store/common/store.d.ts.map +1 -1
- package/dist/store/mutations/store.d.ts +14 -40
- package/dist/store/mutations/store.d.ts.map +1 -1
- package/dist/store/service.d.ts +32 -37
- package/dist/store/service.d.ts.map +1 -1
- package/dist/tax/mutations.d.ts +7 -6
- package/dist/tax/mutations.d.ts.map +1 -1
- package/dist/tax/service.d.ts +35 -35
- package/dist/tax/service.d.ts.map +1 -1
- package/dist/user/service.d.ts +22 -22
- package/dist/user/service.d.ts.map +1 -1
- package/dist/workflow/fulfillment/service-zones.d.ts +1 -1
- package/dist/workflow/fulfillment/service-zones.d.ts.map +1 -1
- package/dist/workflow/order/create-fulfillment.d.ts +2 -2
- package/dist/workflow/order/create-fulfillment.d.ts.map +1 -1
- package/dist/workflow/order/create-return-order.d.ts +8 -7
- package/dist/workflow/order/create-return-order.d.ts.map +1 -1
- package/dist/workflow/order/create-shipment.d.ts +2 -1
- package/dist/workflow/order/create-shipment.d.ts.map +1 -1
- package/dist/workflow/order/index.d.ts +1 -0
- package/dist/workflow/order/index.d.ts.map +1 -1
- package/dist/workflow/order/index.js +1 -0
- package/dist/workflow/order/index.js.map +1 -1
- package/dist/workflow/order/receive-return.d.ts +17 -0
- package/dist/workflow/order/receive-return.d.ts.map +1 -0
- package/dist/workflow/order/receive-return.js +3 -0
- package/dist/workflow/order/receive-return.js.map +1 -0
- package/dist/workflow/price-list/create-price-list.d.ts +1 -2
- package/dist/workflow/price-list/create-price-list.d.ts.map +1 -1
- package/dist/workflow/product-category/index.d.ts +6 -6
- package/dist/workflow/product-category/index.d.ts.map +1 -1
- package/dist/workflow/reservation/create-reservations.d.ts +3 -3
- package/dist/workflow/reservation/create-reservations.d.ts.map +1 -1
- package/dist/workflow/reservation/update-reservations.d.ts +3 -3
- package/dist/workflow/reservation/update-reservations.d.ts.map +1 -1
- package/dist/workflows/products/mutations.d.ts +2 -2
- package/dist/workflows/products/mutations.d.ts.map +1 -1
- package/dist/workflows-sdk/service.d.ts +2 -2
- package/dist/workflows-sdk/service.d.ts.map +1 -1
- package/package.json +1 -2
- package/dist/http/inventory/inventory-level.d.ts +0 -20
- package/dist/http/inventory/inventory-level.d.ts.map +0 -1
- package/dist/http/inventory/inventory-level.js.map +0 -1
- package/dist/http/inventory/inventory.d.ts.map +0 -1
- package/dist/http/inventory/inventory.js.map +0 -1
- package/dist/http/pricing/admin/entitites.d.ts.map +0 -1
- package/dist/http/pricing/admin/entitites.js.map +0 -1
- package/dist/http/product/admin.d.ts +0 -99
- package/dist/http/product/admin.d.ts.map +0 -1
- package/dist/http/product/admin.js.map +0 -1
- package/dist/http/product/store.d.ts +0 -33
- package/dist/http/product/store.d.ts.map +0 -1
- package/dist/http/product/store.js.map +0 -1
- package/dist/http/product-category/admin.d.ts +0 -9
- package/dist/http/product-category/admin.d.ts.map +0 -1
- package/dist/http/product-category/admin.js.map +0 -1
- package/dist/http/product-category/store.d.ts +0 -9
- package/dist/http/product-category/store.d.ts.map +0 -1
- package/dist/http/product-category/store.js.map +0 -1
- package/dist/inventory/bundle.d.ts +0 -3
- package/dist/inventory/bundle.d.ts.map +0 -1
- package/dist/inventory/bundle.js.map +0 -1
- package/dist/inventory/common.d.ts +0 -495
- package/dist/inventory/common.d.ts.map +0 -1
- package/dist/inventory/service-next.d.ts +0 -937
- package/dist/inventory/service-next.d.ts.map +0 -1
- package/dist/inventory/service-next.js +0 -3
- package/dist/inventory/service-next.js.map +0 -1
- package/dist/modules-sdk/internal-module-service.d.ts.map +0 -1
- package/dist/modules-sdk/internal-module-service.js +0 -3
- package/dist/modules-sdk/internal-module-service.js.map +0 -1
- package/dist/modules-sdk/module-service.d.ts +0 -1
- package/dist/modules-sdk/module-service.d.ts.map +0 -1
- package/dist/modules-sdk/module-service.js +0 -1
- package/dist/modules-sdk/module-service.js.map +0 -1
- package/dist/pricing/common/price-set-rule-type.d.ts +0 -24
- package/dist/pricing/common/price-set-rule-type.d.ts.map +0 -1
- package/dist/pricing/common/price-set-rule-type.js +0 -3
- package/dist/pricing/common/price-set-rule-type.js.map +0 -1
- package/dist/pricing/common/rule-type.d.ts +0 -102
- package/dist/pricing/common/rule-type.d.ts.map +0 -1
- package/dist/pricing/common/rule-type.js +0 -3
- package/dist/pricing/common/rule-type.js.map +0 -1
- package/dist/region__legacy/common.d.ts +0 -44
- package/dist/region__legacy/common.d.ts.map +0 -1
- package/dist/region__legacy/common.js +0 -3
- package/dist/region__legacy/common.js.map +0 -1
- package/dist/region__legacy/index.d.ts +0 -2
- package/dist/region__legacy/index.d.ts.map +0 -1
- package/dist/region__legacy/index.js.map +0 -1
- package/dist/stock-location/service-next.d.ts +0 -279
- package/dist/stock-location/service-next.d.ts.map +0 -1
- package/dist/stock-location/service-next.js +0 -3
- package/dist/stock-location/service-next.js.map +0 -1
- /package/dist/http/{pricing → product}/admin/entitites.js +0 -0
- /package/dist/{inventory → http/product-type}/common.js +0 -0
@@ -1,601 +1,637 @@
|
|
1
|
-
import {
|
1
|
+
import { RestoreReturn, SoftDeleteReturn } from "../dal";
|
2
2
|
import { FindConfig } from "../common";
|
3
3
|
import { IModuleService } from "../modules-sdk";
|
4
|
-
import {
|
4
|
+
import { Context } from "../shared-context";
|
5
|
+
import { FilterableInventoryItemProps, FilterableInventoryLevelProps, FilterableReservationItemProps, InventoryItemDTO, InventoryLevelDTO, ReservationItemDTO } from "./common";
|
6
|
+
import { BulkUpdateInventoryLevelInput, CreateInventoryItemInput, CreateInventoryLevelInput, CreateReservationItemInput, UpdateInventoryItemInput, UpdateReservationItemInput } from "./mutations";
|
5
7
|
/**
|
6
|
-
* The main service interface for the
|
8
|
+
* The main service interface for the Inventory Module.
|
7
9
|
*/
|
8
10
|
export interface IInventoryService extends IModuleService {
|
9
11
|
/**
|
10
|
-
* This method
|
12
|
+
* This method retrieves a paginated list of inventory items based on optional filters and configuration.
|
13
|
+
*
|
11
14
|
* @param {FilterableInventoryItemProps} selector - The filters to apply on the retrieved inventory items.
|
12
|
-
* @param {FindConfig<InventoryItemDTO>} config -
|
13
|
-
* The configurations determining how the inventory items are retrieved. Its properties, such as `select` or `relations`, accept the
|
15
|
+
* @param {FindConfig<InventoryItemDTO>} config - The configurations determining how the inventory item is retrieved. Its properties, such as `select` or `relations`, accept the
|
14
16
|
* attributes or relations associated with a inventory item.
|
15
|
-
* @param {
|
16
|
-
* @
|
17
|
+
* @param {Context} context - A context used to share resources, such as transaction manager, between the application and the module.
|
18
|
+
* @returns {Promise<InventoryItemDTO[]>} The list of inventory items.
|
17
19
|
*
|
18
20
|
* @example
|
19
21
|
* To retrieve a list of inventory items using their IDs:
|
20
22
|
*
|
21
23
|
* ```ts
|
22
|
-
*
|
23
|
-
*
|
24
|
-
* }
|
25
|
-
*
|
26
|
-
* async function retrieveInventoryItems (ids: string[]) {
|
27
|
-
* const inventoryModule = await initializeInventoryModule({})
|
24
|
+
* const inventoryItems = await inventoryModuleService.listInventoryItems({
|
25
|
+
* id: ["iitem_123", "iitem_321"],
|
26
|
+
* })
|
27
|
+
* ```
|
28
28
|
*
|
29
|
-
*
|
30
|
-
* id: ids
|
31
|
-
* })
|
29
|
+
* To specify relations that should be retrieved within the inventory items:
|
32
30
|
*
|
33
|
-
*
|
34
|
-
*
|
31
|
+
* ```ts
|
32
|
+
* const inventoryItems = await inventoryModuleService.listInventoryItems(
|
33
|
+
* {
|
34
|
+
* id: ["iitem_123", "iitem_321"],
|
35
|
+
* },
|
36
|
+
* {
|
37
|
+
* relations: ["location_levels"],
|
38
|
+
* }
|
39
|
+
* )
|
35
40
|
* ```
|
36
41
|
*
|
37
|
-
*
|
42
|
+
* By default, only the first `10` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
|
38
43
|
*
|
39
44
|
* ```ts
|
40
|
-
*
|
41
|
-
*
|
42
|
-
*
|
45
|
+
* const inventoryItems = await inventoryModuleService.listInventoryItems(
|
46
|
+
* {
|
47
|
+
* id: ["iitem_123", "iitem_321"],
|
48
|
+
* },
|
49
|
+
* {
|
50
|
+
* relations: ["location_levels"],
|
51
|
+
* take: 20,
|
52
|
+
* skip: 2,
|
53
|
+
* }
|
54
|
+
* )
|
55
|
+
* ```
|
56
|
+
*/
|
57
|
+
listInventoryItems(selector: FilterableInventoryItemProps, config?: FindConfig<InventoryItemDTO>, context?: Context): Promise<InventoryItemDTO[]>;
|
58
|
+
/**
|
59
|
+
* This method retrieves a paginated list of inventory items along with the total count of available inventory items satisfying the provided filters.
|
43
60
|
*
|
44
|
-
*
|
45
|
-
*
|
61
|
+
* @param {FilterableInventoryItemProps} selector - The filters to apply on the retrieved inventory items.
|
62
|
+
* @param {FindConfig<InventoryItemDTO>} config - The configurations determining how the inventory item is retrieved. Its properties, such as `select` or `relations`, accept the
|
63
|
+
* attributes or relations associated with a inventory item.
|
64
|
+
* @param {Context} context - A context used to share resources, such as transaction manager, between the application and the module.
|
65
|
+
* @returns {Promise<[InventoryItemDTO[], number]>} The list of inventory items along with their total count.
|
46
66
|
*
|
47
|
-
*
|
48
|
-
*
|
49
|
-
* }, {
|
50
|
-
* relations: ["inventory_level"]
|
51
|
-
* })
|
67
|
+
* @example
|
68
|
+
* To retrieve a list of inventory items using their IDs:
|
52
69
|
*
|
53
|
-
*
|
54
|
-
*
|
70
|
+
* ```ts
|
71
|
+
* const [inventoryItems, count] =
|
72
|
+
* await inventoryModuleService.listAndCountInventoryItems({
|
73
|
+
* id: ["iitem_123", "iitem_321"],
|
74
|
+
* })
|
55
75
|
* ```
|
56
76
|
*
|
57
|
-
*
|
77
|
+
* To specify relations that should be retrieved within the inventory items:
|
58
78
|
*
|
59
79
|
* ```ts
|
60
|
-
*
|
61
|
-
*
|
62
|
-
*
|
63
|
-
*
|
64
|
-
*
|
65
|
-
*
|
80
|
+
* const [inventoryItems, count] =
|
81
|
+
* await inventoryModuleService.listAndCountInventoryItems(
|
82
|
+
* {
|
83
|
+
* id: ["iitem_123", "iitem_321"],
|
84
|
+
* },
|
85
|
+
* {
|
86
|
+
* relations: ["location_levels"],
|
87
|
+
* }
|
88
|
+
* )
|
89
|
+
* ```
|
66
90
|
*
|
67
|
-
*
|
68
|
-
* id: ids
|
69
|
-
* }, {
|
70
|
-
* relations: ["inventory_level"],
|
71
|
-
* skip,
|
72
|
-
* take
|
73
|
-
* })
|
91
|
+
* By default, only the first `10` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
|
74
92
|
*
|
75
|
-
*
|
76
|
-
*
|
93
|
+
* ```ts
|
94
|
+
* const [inventoryItems, count] =
|
95
|
+
* await inventoryModuleService.listAndCountInventoryItems(
|
96
|
+
* {
|
97
|
+
* id: ["iitem_123", "iitem_321"],
|
98
|
+
* },
|
99
|
+
* {
|
100
|
+
* relations: ["location_levels"],
|
101
|
+
* take: 20,
|
102
|
+
* skip: 2,
|
103
|
+
* }
|
104
|
+
* )
|
77
105
|
* ```
|
78
106
|
*/
|
79
|
-
|
107
|
+
listAndCountInventoryItems(selector: FilterableInventoryItemProps, config?: FindConfig<InventoryItemDTO>, context?: Context): Promise<[InventoryItemDTO[], number]>;
|
80
108
|
/**
|
81
|
-
* This method
|
109
|
+
* This method retrieves a paginated list of reservation items based on optional filters and configuration.
|
110
|
+
*
|
82
111
|
* @param {FilterableReservationItemProps} selector - The filters to apply on the retrieved reservation items.
|
83
|
-
* @param {FindConfig<ReservationItemDTO>} config -
|
84
|
-
* The configurations determining how the reservation items are retrieved. Its properties, such as `select` or `relations`, accept the
|
112
|
+
* @param {FindConfig<ReservationItemDTO>} config - The configurations determining how the reservation item is retrieved. Its properties, such as `select` or `relations`, accept the
|
85
113
|
* attributes or relations associated with a reservation item.
|
86
|
-
* @param {
|
87
|
-
* @
|
114
|
+
* @param {Context} context - A context used to share resources, such as transaction manager, between the application and the module.
|
115
|
+
* @returns {Promise<ReservationItemDTO[]>} The list of reservation items.
|
88
116
|
*
|
89
117
|
* @example
|
90
118
|
* To retrieve a list of reservation items using their IDs:
|
91
119
|
*
|
92
120
|
* ```ts
|
93
|
-
*
|
94
|
-
*
|
95
|
-
*
|
96
|
-
*
|
97
|
-
* async function retrieveReservationItems (ids: string[]) {
|
98
|
-
* const inventoryModule = await initializeInventoryModule({})
|
99
|
-
*
|
100
|
-
* const [reservationItems, count] = await inventoryModule.listReservationItems({
|
101
|
-
* id: ids
|
121
|
+
* const reservationItems =
|
122
|
+
* await inventoryModuleService.listReservationItems({
|
123
|
+
* id: ["resitem_123", "resitem_321"],
|
102
124
|
* })
|
103
|
-
*
|
104
|
-
* // do something with the reservation items or return them
|
105
|
-
* }
|
106
125
|
* ```
|
107
126
|
*
|
108
127
|
* To specify relations that should be retrieved within the reservation items:
|
109
128
|
*
|
110
129
|
* ```ts
|
111
|
-
*
|
112
|
-
*
|
113
|
-
*
|
114
|
-
*
|
115
|
-
*
|
116
|
-
*
|
117
|
-
*
|
118
|
-
*
|
119
|
-
*
|
120
|
-
* }, {
|
121
|
-
* relations: ["inventory_item"]
|
122
|
-
* })
|
123
|
-
*
|
124
|
-
* // do something with the reservation items or return them
|
125
|
-
* }
|
130
|
+
* const reservationItems =
|
131
|
+
* await inventoryModuleService.listReservationItems(
|
132
|
+
* {
|
133
|
+
* id: ["resitem_123", "resitem_321"],
|
134
|
+
* },
|
135
|
+
* {
|
136
|
+
* relations: ["inventory_item"],
|
137
|
+
* }
|
138
|
+
* )
|
126
139
|
* ```
|
127
140
|
*
|
128
141
|
* By default, only the first `10` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
|
129
142
|
*
|
130
143
|
* ```ts
|
131
|
-
*
|
132
|
-
*
|
133
|
-
*
|
144
|
+
* const reservationItems =
|
145
|
+
* await inventoryModuleService.listReservationItems(
|
146
|
+
* {
|
147
|
+
* id: ["resitem_123", "resitem_321"],
|
148
|
+
* },
|
149
|
+
* {
|
150
|
+
* relations: ["inventory_item"],
|
151
|
+
* take: 20,
|
152
|
+
* skip: 2,
|
153
|
+
* }
|
154
|
+
* )
|
155
|
+
* ```
|
156
|
+
*/
|
157
|
+
listReservationItems(selector: FilterableReservationItemProps, config?: FindConfig<ReservationItemDTO>, context?: Context): Promise<ReservationItemDTO[]>;
|
158
|
+
/**
|
159
|
+
* This method retrieves a paginated list of reservation items along with the total count of available reservation items satisfying the provided filters.
|
134
160
|
*
|
135
|
-
*
|
136
|
-
*
|
161
|
+
* @param {FilterableReservationItemProps} selector - The filters to apply on the retrieved reservation items.
|
162
|
+
* @param {FindConfig<ReservationItemDTO>} config - The configurations determining how the reservation item is retrieved. Its properties, such as `select` or `relations`, accept the
|
163
|
+
* attributes or relations associated with a reservation item.
|
164
|
+
* @param {Context} context - A context used to share resources, such as transaction manager, between the application and the module.
|
165
|
+
* @returns {Promise<[ReservationItemDTO[], number]>} The list of reservation items along with their total count.
|
137
166
|
*
|
138
|
-
*
|
139
|
-
*
|
140
|
-
*
|
141
|
-
*
|
142
|
-
*
|
143
|
-
*
|
167
|
+
* @example
|
168
|
+
* To retrieve a list of reservation items using their IDs:
|
169
|
+
*
|
170
|
+
* ```ts
|
171
|
+
* const [reservationItems, count] =
|
172
|
+
* await inventoryModuleService.listAndCountReservationItems({
|
173
|
+
* id: ["resitem_123", "resitem_321"],
|
144
174
|
* })
|
175
|
+
* ```
|
145
176
|
*
|
146
|
-
*
|
147
|
-
*
|
177
|
+
* To specify relations that should be retrieved within the reservation items:
|
178
|
+
*
|
179
|
+
* ```ts
|
180
|
+
* const [reservationItems, count] =
|
181
|
+
* await inventoryModuleService.listAndCountReservationItems(
|
182
|
+
* {
|
183
|
+
* id: ["resitem_123", "resitem_321"],
|
184
|
+
* },
|
185
|
+
* {
|
186
|
+
* relations: ["inventory_item"],
|
187
|
+
* }
|
188
|
+
* )
|
189
|
+
* ```
|
190
|
+
*
|
191
|
+
* By default, only the first `10` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
|
192
|
+
*
|
193
|
+
* ```ts
|
194
|
+
* const [reservationItems, count] =
|
195
|
+
* await inventoryModuleService.listAndCountReservationItems(
|
196
|
+
* {
|
197
|
+
* id: ["resitem_123", "resitem_321"],
|
198
|
+
* },
|
199
|
+
* {
|
200
|
+
* relations: ["inventory_item"],
|
201
|
+
* take: 20,
|
202
|
+
* skip: 2,
|
203
|
+
* }
|
204
|
+
* )
|
148
205
|
* ```
|
149
206
|
*/
|
150
|
-
|
207
|
+
listAndCountReservationItems(selector: FilterableReservationItemProps, config?: FindConfig<ReservationItemDTO>, context?: Context): Promise<[ReservationItemDTO[], number]>;
|
151
208
|
/**
|
152
|
-
* This method
|
209
|
+
* This method retrieves a paginated list of inventory levels based on optional filters and configuration.
|
210
|
+
*
|
153
211
|
* @param {FilterableInventoryLevelProps} selector - The filters to apply on the retrieved inventory levels.
|
154
|
-
* @param {FindConfig<InventoryLevelDTO>} config -
|
155
|
-
* The configurations determining how the inventory levels are retrieved. Its properties, such as `select` or `relations`, accept the
|
212
|
+
* @param {FindConfig<InventoryLevelDTO>} config - The configurations determining how the inventory level is retrieved. Its properties, such as `select` or `relations`, accept the
|
156
213
|
* attributes or relations associated with a inventory level.
|
157
|
-
* @param {
|
158
|
-
* @
|
214
|
+
* @param {Context} context - A context used to share resources, such as transaction manager, between the application and the module.
|
215
|
+
* @returns {Promise<InventoryLevelDTO[]>} The list of inventory levels.
|
159
216
|
*
|
160
217
|
* @example
|
161
|
-
* To retrieve a list of inventory levels using their
|
218
|
+
* To retrieve a list of inventory levels using the IDs of their associated inventory items:
|
162
219
|
*
|
163
220
|
* ```ts
|
164
|
-
*
|
165
|
-
*
|
166
|
-
*
|
167
|
-
*
|
168
|
-
* async function retrieveInventoryLevels (inventoryItemIds: string[]) {
|
169
|
-
* const inventoryModule = await initializeInventoryModule({})
|
170
|
-
*
|
171
|
-
* const [inventoryLevels, count] = await inventoryModule.listInventoryLevels({
|
172
|
-
* inventory_item_id: inventoryItemIds
|
221
|
+
* const inventoryLevels =
|
222
|
+
* await inventoryModuleService.listInventoryLevels({
|
223
|
+
* inventory_item_id: ["iitem_123", "iitem_321"],
|
173
224
|
* })
|
174
|
-
*
|
175
|
-
* // do something with the inventory levels or return them
|
176
|
-
* }
|
177
225
|
* ```
|
178
226
|
*
|
179
227
|
* To specify relations that should be retrieved within the inventory levels:
|
180
228
|
*
|
181
229
|
* ```ts
|
182
|
-
*
|
183
|
-
*
|
184
|
-
*
|
230
|
+
* const inventoryLevels =
|
231
|
+
* await inventoryModuleService.listInventoryLevels(
|
232
|
+
* {
|
233
|
+
* inventory_item_id: ["iitem_123", "iitem_321"],
|
234
|
+
* },
|
235
|
+
* {
|
236
|
+
* relations: ["inventory_item"],
|
237
|
+
* }
|
238
|
+
* )
|
239
|
+
* ```
|
185
240
|
*
|
186
|
-
*
|
187
|
-
* const inventoryModule = await initializeInventoryModule({})
|
241
|
+
* By default, only the first `10` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
|
188
242
|
*
|
189
|
-
*
|
190
|
-
*
|
191
|
-
*
|
192
|
-
*
|
193
|
-
*
|
243
|
+
* ```ts
|
244
|
+
* const inventoryLevels =
|
245
|
+
* await inventoryModuleService.listInventoryLevels(
|
246
|
+
* {
|
247
|
+
* inventory_item_id: ["iitem_123", "iitem_321"],
|
248
|
+
* },
|
249
|
+
* {
|
250
|
+
* relations: ["inventory_item"],
|
251
|
+
* take: 20,
|
252
|
+
* skip: 2,
|
253
|
+
* }
|
254
|
+
* )
|
255
|
+
* ```
|
256
|
+
*/
|
257
|
+
listInventoryLevels(selector: FilterableInventoryLevelProps, config?: FindConfig<InventoryLevelDTO>, context?: Context): Promise<InventoryLevelDTO[]>;
|
258
|
+
/**
|
259
|
+
* This method retrieves a paginated list of inventory levels along with the total count of available inventory levels satisfying the provided filters.
|
194
260
|
*
|
195
|
-
*
|
196
|
-
* }
|
261
|
+
* @param {FilterableInventoryLevelProps} selector - The filters to apply on the retrieved inventory levels.
|
262
|
+
* @param {FindConfig<InventoryLevelDTO>} config - The configurations determining how the inventory level is retrieved. Its properties, such as `select` or `relations`, accept the
|
263
|
+
* attributes or relations associated with a inventory level.
|
264
|
+
* @param {Context} context - A context used to share resources, such as transaction manager, between the application and the module.
|
265
|
+
* @returns {Promise<[InventoryLevelDTO[], number]>} The list of inventory levels along with their total count.
|
266
|
+
*
|
267
|
+
* @example
|
268
|
+
* To retrieve a list of inventory levels using the IDs of their associated inventory items:
|
269
|
+
*
|
270
|
+
* ```ts
|
271
|
+
* const [inventoryLevels, count] =
|
272
|
+
* await inventoryModuleService.listAndCountInventoryLevels(
|
273
|
+
* {
|
274
|
+
* inventory_item_id: ["iitem_123", "iitem_321"],
|
275
|
+
* },
|
276
|
+
* {
|
277
|
+
* relations: ["inventory_item"],
|
278
|
+
* take: 20,
|
279
|
+
* skip: 2,
|
280
|
+
* }
|
281
|
+
* )
|
197
282
|
* ```
|
198
283
|
*
|
199
|
-
*
|
284
|
+
* To specify relations that should be retrieved within the inventory levels:
|
200
285
|
*
|
201
286
|
* ```ts
|
202
|
-
*
|
203
|
-
*
|
204
|
-
*
|
287
|
+
* const [inventoryLevels, count] =
|
288
|
+
* await inventoryModuleService.listAndCountInventoryLevels(
|
289
|
+
* {
|
290
|
+
* inventory_item_id: ["iitem_123", "iitem_321"],
|
291
|
+
* },
|
292
|
+
* {
|
293
|
+
* relations: ["inventory_item"],
|
294
|
+
* }
|
295
|
+
* )
|
296
|
+
* ```
|
205
297
|
*
|
206
|
-
*
|
207
|
-
* const inventoryModule = await initializeInventoryModule({})
|
298
|
+
* By default, only the first `10` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
|
208
299
|
*
|
209
|
-
*
|
210
|
-
*
|
211
|
-
*
|
212
|
-
*
|
213
|
-
* skip,
|
214
|
-
* take
|
300
|
+
* ```ts
|
301
|
+
* const [inventoryLevels, count] =
|
302
|
+
* await inventoryModuleService.listAndCountInventoryLevels({
|
303
|
+
* inventory_item_id: ["iitem_123", "iitem_321"],
|
215
304
|
* })
|
216
|
-
*
|
217
|
-
* // do something with the inventory levels or return them
|
218
|
-
* }
|
219
305
|
* ```
|
220
306
|
*/
|
221
|
-
|
307
|
+
listAndCountInventoryLevels(selector: FilterableInventoryLevelProps, config?: FindConfig<InventoryLevelDTO>, context?: Context): Promise<[InventoryLevelDTO[], number]>;
|
222
308
|
/**
|
223
|
-
* This method
|
309
|
+
* This method retrieves an inventory item by its ID.
|
224
310
|
*
|
225
|
-
* @param {string} inventoryItemId - The
|
226
|
-
* @param {FindConfig<InventoryItemDTO>} config -
|
227
|
-
* The configurations determining how the inventory item is retrieved. Its properties, such as `select` or `relations`, accept the
|
311
|
+
* @param {string} inventoryItemId - The inventory item's ID.
|
312
|
+
* @param {FindConfig<InventoryItemDTO>} config - The configurations determining how the inventory item is retrieved. Its properties, such as `select` or `relations`, accept the
|
228
313
|
* attributes or relations associated with a inventory item.
|
229
|
-
* @param {
|
314
|
+
* @param {Context} context - A context used to share resources, such as transaction manager, between the application and the module.
|
230
315
|
* @returns {Promise<InventoryItemDTO>} The retrieved inventory item.
|
231
316
|
*
|
232
317
|
* @example
|
233
318
|
* A simple example that retrieves a inventory item by its ID:
|
234
319
|
*
|
235
320
|
* ```ts
|
236
|
-
*
|
237
|
-
*
|
238
|
-
* } from "@medusajs/inventory"
|
239
|
-
*
|
240
|
-
* async function retrieveInventoryItem (id: string) {
|
241
|
-
* const inventoryModule = await initializeInventoryModule({})
|
242
|
-
*
|
243
|
-
* const inventoryItem = await inventoryModule.retrieveInventoryItem(id)
|
244
|
-
*
|
245
|
-
* // do something with the inventory item or return it
|
246
|
-
* }
|
321
|
+
* const inventoryItem =
|
322
|
+
* await inventoryModuleService.retrieveInventoryItem("iitem_123")
|
247
323
|
* ```
|
248
324
|
*
|
249
325
|
* To specify relations that should be retrieved:
|
250
326
|
*
|
251
327
|
* ```ts
|
252
|
-
*
|
253
|
-
*
|
254
|
-
*
|
255
|
-
*
|
256
|
-
*
|
257
|
-
*
|
258
|
-
*
|
259
|
-
* const inventoryItem = await inventoryModule.retrieveInventoryItem(id, {
|
260
|
-
* relations: ["inventory_level"]
|
261
|
-
* })
|
262
|
-
*
|
263
|
-
* // do something with the inventory item or return it
|
264
|
-
* }
|
328
|
+
* const inventoryItem = await inventoryModuleService.retrieveInventoryItem(
|
329
|
+
* "iitem_123",
|
330
|
+
* {
|
331
|
+
* relations: ["location_levels"],
|
332
|
+
* }
|
333
|
+
* )
|
265
334
|
* ```
|
266
335
|
*/
|
267
|
-
retrieveInventoryItem(inventoryItemId: string, config?: FindConfig<InventoryItemDTO>, context?:
|
336
|
+
retrieveInventoryItem(inventoryItemId: string, config?: FindConfig<InventoryItemDTO>, context?: Context): Promise<InventoryItemDTO>;
|
268
337
|
/**
|
269
|
-
* This method
|
338
|
+
* This method retrieves an inventory level based on its associated inventory item and location.
|
270
339
|
*
|
271
|
-
* @param {string} inventoryItemId - The
|
272
|
-
* @param {string} locationId - The ID
|
273
|
-
* @param {
|
340
|
+
* @param {string} inventoryItemId - The inventory item's ID.
|
341
|
+
* @param {string} locationId - The location's ID.
|
342
|
+
* @param {Context} context - A context used to share resources, such as transaction manager, between the application and the module.
|
274
343
|
* @returns {Promise<InventoryLevelDTO>} The retrieved inventory level.
|
275
344
|
*
|
276
345
|
* @example
|
277
|
-
*
|
278
|
-
*
|
279
|
-
*
|
280
|
-
*
|
281
|
-
* async function retrieveInventoryLevel (
|
282
|
-
* inventoryItemId: string,
|
283
|
-
* locationId: string
|
284
|
-
* ) {
|
285
|
-
* const inventoryModule = await initializeInventoryModule({})
|
286
|
-
*
|
287
|
-
* const inventoryLevel = await inventoryModule.retrieveInventoryLevel(
|
288
|
-
* inventoryItemId,
|
289
|
-
* locationId
|
346
|
+
* const inventoryLevel =
|
347
|
+
* await inventoryModuleService.retrieveInventoryLevelByItemAndLocation(
|
348
|
+
* "iitem_123",
|
349
|
+
* "loc_123"
|
290
350
|
* )
|
291
|
-
*
|
292
|
-
* // do something with the inventory level or return it
|
293
|
-
* }
|
294
351
|
*/
|
295
|
-
|
352
|
+
retrieveInventoryLevelByItemAndLocation(inventoryItemId: string, locationId: string, context?: Context): Promise<InventoryLevelDTO>;
|
296
353
|
/**
|
297
|
-
* This method
|
354
|
+
* This method retrieves an inventory level by its ID.
|
298
355
|
*
|
299
|
-
* @param {string}
|
300
|
-
* @param {
|
301
|
-
*
|
356
|
+
* @param {string} inventoryLevelId - The inventory level's ID.
|
357
|
+
* @param {FindConfig<InventoryLevelDTO>} config - The configurations determining how the inventory level is retrieved. Its properties, such as `select` or `relations`, accept the
|
358
|
+
* attributes or relations associated with a inventory level.
|
359
|
+
* @param {Context} context - A context used to share resources, such as transaction manager, between the application and the module.
|
360
|
+
* @returns {Promise<InventoryLevelDTO>} The retrieved inventory level.
|
302
361
|
*
|
303
362
|
* @example
|
304
|
-
*
|
305
|
-
* initialize as initializeInventoryModule,
|
306
|
-
* } from "@medusajs/inventory"
|
363
|
+
* A simple example that retrieves a inventory level by its ID:
|
307
364
|
*
|
308
|
-
*
|
309
|
-
*
|
365
|
+
* ```ts
|
366
|
+
* const inventoryLevel =
|
367
|
+
* await inventoryModuleService.retrieveInventoryLevel(
|
368
|
+
* "iitem_123"
|
369
|
+
* )
|
370
|
+
* ```
|
310
371
|
*
|
311
|
-
*
|
372
|
+
* To specify relations that should be retrieved:
|
312
373
|
*
|
313
|
-
*
|
314
|
-
*
|
374
|
+
* ```ts
|
375
|
+
* const inventoryLevel =
|
376
|
+
* await inventoryModuleService.retrieveInventoryLevel(
|
377
|
+
* "iitem_123",
|
378
|
+
* {
|
379
|
+
* relations: ["inventory_item"],
|
380
|
+
* }
|
381
|
+
* )
|
382
|
+
* ```
|
315
383
|
*/
|
316
|
-
|
384
|
+
retrieveInventoryLevel(inventoryLevelId: string, config?: FindConfig<InventoryLevelDTO>, context?: Context): Promise<InventoryLevelDTO>;
|
317
385
|
/**
|
318
|
-
* This method
|
386
|
+
* This method retrieves a reservation item by its ID.
|
319
387
|
*
|
320
|
-
* @param {
|
321
|
-
* @param {
|
322
|
-
*
|
388
|
+
* @param {string} reservationId - The reservation's ID.
|
389
|
+
* @param {FindConfig<ReservationItemDTO>} config - The configurations determining how the reservation item is retrieved. Its properties, such as `select` or `relations`, accept the
|
390
|
+
* attributes or relations associated with a reservation item.
|
391
|
+
* @param {Context} context - A context used to share resources, such as transaction manager, between the application and the module.
|
392
|
+
* @returns {Promise<ReservationItemDTO>} The retrieved reservation item.
|
323
393
|
*
|
324
394
|
* @example
|
325
|
-
*
|
326
|
-
* initialize as initializeInventoryModule,
|
327
|
-
* } from "@medusajs/inventory"
|
395
|
+
* A simple example that retrieves a reservation item by its ID:
|
328
396
|
*
|
329
|
-
*
|
330
|
-
*
|
331
|
-
*
|
332
|
-
*
|
333
|
-
* }) {
|
334
|
-
* const inventoryModule = await initializeInventoryModule({})
|
335
|
-
*
|
336
|
-
* const reservationItem = await inventoryModule.createReservationItems(
|
337
|
-
* item
|
397
|
+
* ```ts
|
398
|
+
* const reservationItem =
|
399
|
+
* await inventoryModuleService.retrieveReservationItem(
|
400
|
+
* "resitem"
|
338
401
|
* )
|
402
|
+
* ```
|
339
403
|
*
|
340
|
-
*
|
341
|
-
*
|
404
|
+
* To specify relations that should be retrieved:
|
405
|
+
*
|
406
|
+
* ```ts
|
407
|
+
* const reservationItem =
|
408
|
+
* await inventoryModuleService.retrieveReservationItem(
|
409
|
+
* "resitem",
|
410
|
+
* {
|
411
|
+
* relations: ["inventory_item"],
|
412
|
+
* }
|
413
|
+
* )
|
414
|
+
* ```
|
342
415
|
*/
|
343
|
-
|
416
|
+
retrieveReservationItem(reservationId: string, config?: FindConfig<ReservationItemDTO>, context?: Context): Promise<ReservationItemDTO>;
|
344
417
|
/**
|
345
|
-
* This method
|
418
|
+
* This method creates reservation items.
|
346
419
|
*
|
347
|
-
* @param {CreateReservationItemInput[]} input - The details of the reservation items to
|
348
|
-
* @param {
|
349
|
-
* @returns {
|
420
|
+
* @param {CreateReservationItemInput[]} input - The details of the reservation items to be created.
|
421
|
+
* @param {Context} context - A context used to share resources, such as transaction manager, between the application and the module.
|
422
|
+
* @returns {Promise<ReservationItemDTO[]>} The created reservation items.
|
350
423
|
*
|
351
424
|
* @example
|
352
|
-
*
|
353
|
-
*
|
354
|
-
*
|
355
|
-
*
|
356
|
-
*
|
357
|
-
*
|
358
|
-
*
|
359
|
-
*
|
360
|
-
* }[]) {
|
361
|
-
* const inventoryModule = await initializeInventoryModule({})
|
362
|
-
*
|
363
|
-
* const reservationItems = await inventoryModule.createReservationItems(
|
364
|
-
* items
|
365
|
-
* )
|
366
|
-
*
|
367
|
-
* // do something with the reservation items or return them
|
368
|
-
* }
|
425
|
+
* const reservationItems =
|
426
|
+
* await inventoryModuleService.createReservationItems([
|
427
|
+
* {
|
428
|
+
* inventory_item_id: "iitem_123",
|
429
|
+
* location_id: "loc_123",
|
430
|
+
* quantity: 10,
|
431
|
+
* },
|
432
|
+
* ])
|
369
433
|
*/
|
370
|
-
createReservationItems(input: CreateReservationItemInput[], context?:
|
434
|
+
createReservationItems(input: CreateReservationItemInput[], context?: Context): Promise<ReservationItemDTO[]>;
|
371
435
|
/**
|
372
|
-
* This method
|
436
|
+
* This method creates a reservation item.
|
373
437
|
*
|
374
|
-
* @param {
|
375
|
-
* @param {
|
376
|
-
* @returns {Promise<
|
438
|
+
* @param {CreateReservationItemInput} input - The details of the reservation item to be created.
|
439
|
+
* @param {Context} context - A context used to share resources, such as transaction manager, between the application and the module.
|
440
|
+
* @returns {Promise<ReservationItemDTO>} The created reservation item.
|
377
441
|
*
|
378
442
|
* @example
|
379
|
-
*
|
380
|
-
*
|
381
|
-
*
|
382
|
-
*
|
383
|
-
*
|
384
|
-
*
|
385
|
-
* requires_shipping: boolean
|
386
|
-
* }) {
|
387
|
-
* const inventoryModule = await initializeInventoryModule({})
|
388
|
-
*
|
389
|
-
* const inventoryItem = await inventoryModule.createInventoryItem(
|
390
|
-
* item
|
391
|
-
* )
|
392
|
-
*
|
393
|
-
* // do something with the inventory item or return it
|
394
|
-
* }
|
443
|
+
* const reservationItem =
|
444
|
+
* await inventoryModuleService.createReservationItems({
|
445
|
+
* inventory_item_id: "iitem_123",
|
446
|
+
* location_id: "loc_123",
|
447
|
+
* quantity: 10,
|
448
|
+
* })
|
395
449
|
*/
|
396
|
-
|
450
|
+
createReservationItems(input: CreateReservationItemInput, context?: Context): Promise<ReservationItemDTO>;
|
397
451
|
/**
|
398
|
-
* This method
|
452
|
+
* This method creates inventory items.
|
399
453
|
*
|
400
|
-
* @param {CreateInventoryItemInput[]} input - The details of the inventory items to
|
401
|
-
* @param {
|
402
|
-
* @returns {Promise<InventoryItemDTO[]>} The created inventory items
|
454
|
+
* @param {CreateInventoryItemInput[]} input - The details of the inventory items to be created.
|
455
|
+
* @param {Context} context - A context used to share resources, such as transaction manager, between the application and the module.
|
456
|
+
* @returns {Promise<InventoryItemDTO[]>} The created inventory items.
|
403
457
|
*
|
404
458
|
* @example
|
405
|
-
*
|
406
|
-
*
|
407
|
-
*
|
408
|
-
*
|
409
|
-
*
|
410
|
-
* sku: string,
|
411
|
-
* requires_shipping: boolean
|
412
|
-
* }[]) {
|
413
|
-
* const inventoryModule = await initializeInventoryModule({})
|
414
|
-
*
|
415
|
-
* const inventoryItems = await inventoryModule.createInventoryItems(
|
416
|
-
* items
|
417
|
-
* )
|
418
|
-
*
|
419
|
-
* // do something with the inventory items or return them
|
420
|
-
* }
|
459
|
+
* const inventoryItems = await inventoryModuleService.createInventoryItems([
|
460
|
+
* {
|
461
|
+
* sku: "SHIRT",
|
462
|
+
* },
|
463
|
+
* ])
|
421
464
|
*/
|
422
|
-
createInventoryItems(input: CreateInventoryItemInput[], context?:
|
465
|
+
createInventoryItems(input: CreateInventoryItemInput[], context?: Context): Promise<InventoryItemDTO[]>;
|
423
466
|
/**
|
424
|
-
* This method
|
467
|
+
* This method creates an inventory item.
|
425
468
|
*
|
426
|
-
* @param {
|
427
|
-
* @param {
|
428
|
-
* @returns {Promise<
|
469
|
+
* @param {CreateInventoryItemInput} input - The details of the inventory item to be created.
|
470
|
+
* @param {Context} context - A context used to share resources, such as transaction manager, between the application and the module.
|
471
|
+
* @returns {Promise<InventoryItemDTO>} The created inventory item.
|
429
472
|
*
|
430
473
|
* @example
|
431
|
-
*
|
432
|
-
*
|
433
|
-
* }
|
434
|
-
*
|
435
|
-
* async function createInventoryLevel (item: {
|
436
|
-
* inventory_item_id: string
|
437
|
-
* location_id: string
|
438
|
-
* stocked_quantity: number
|
439
|
-
* }) {
|
440
|
-
* const inventoryModule = await initializeInventoryModule({})
|
441
|
-
*
|
442
|
-
* const inventoryLevel = await inventoryModule.createInventoryLevel(
|
443
|
-
* item
|
444
|
-
* )
|
445
|
-
*
|
446
|
-
* // do something with the inventory level or return it
|
447
|
-
* }
|
474
|
+
* const inventoryItem = await inventoryModuleService.createInventoryItems({
|
475
|
+
* sku: "SHIRT",
|
476
|
+
* })
|
448
477
|
*/
|
449
|
-
|
478
|
+
createInventoryItems(input: CreateInventoryItemInput, context?: Context): Promise<InventoryItemDTO>;
|
450
479
|
/**
|
451
|
-
* This method
|
480
|
+
* This method creates inventory levels.
|
452
481
|
*
|
453
|
-
* @param {CreateInventoryLevelInput[]} data - The details of the inventory levels to
|
454
|
-
* @param {
|
455
|
-
* @returns {Promise<InventoryLevelDTO[]>} The created inventory levels
|
482
|
+
* @param {CreateInventoryLevelInput[]} data - The details of the inventory levels to be created.
|
483
|
+
* @param {Context} context - A context used to share resources, such as transaction manager, between the application and the module.
|
484
|
+
* @returns {Promise<InventoryLevelDTO[]>} The created inventory levels.
|
456
485
|
*
|
457
486
|
* @example
|
458
|
-
*
|
459
|
-
*
|
460
|
-
*
|
461
|
-
*
|
462
|
-
*
|
463
|
-
*
|
464
|
-
*
|
465
|
-
*
|
466
|
-
*
|
467
|
-
*
|
468
|
-
*
|
469
|
-
*
|
470
|
-
*
|
471
|
-
* )
|
472
|
-
*
|
473
|
-
* // do something with the inventory levels or return them
|
474
|
-
* }
|
487
|
+
* const inventoryLevels =
|
488
|
+
* await inventoryModuleService.createInventoryLevels([
|
489
|
+
* {
|
490
|
+
* inventory_item_id: "iitem_123",
|
491
|
+
* location_id: "loc_123",
|
492
|
+
* stocked_quantity: 10,
|
493
|
+
* },
|
494
|
+
* {
|
495
|
+
* inventory_item_id: "iitem_321",
|
496
|
+
* location_id: "loc_321",
|
497
|
+
* stocked_quantity: 20,
|
498
|
+
* reserved_quantity: 10,
|
499
|
+
* },
|
500
|
+
* ])
|
475
501
|
*/
|
476
|
-
createInventoryLevels(data: CreateInventoryLevelInput[], context?:
|
502
|
+
createInventoryLevels(data: CreateInventoryLevelInput[], context?: Context): Promise<InventoryLevelDTO[]>;
|
477
503
|
/**
|
478
|
-
* This method
|
504
|
+
* This method creates an inventory level.
|
479
505
|
*
|
480
|
-
* @param {
|
481
|
-
* @param {
|
482
|
-
* @returns {Promise<InventoryLevelDTO
|
506
|
+
* @param {CreateInventoryLevelInput} data - The details of the inventory level to be created.
|
507
|
+
* @param {Context} context - A context used to share resources, such as transaction manager, between the application and the module.
|
508
|
+
* @returns {Promise<InventoryLevelDTO>} The created inventory level.
|
483
509
|
*
|
484
510
|
* @example
|
485
|
-
*
|
486
|
-
*
|
487
|
-
*
|
488
|
-
*
|
489
|
-
*
|
490
|
-
*
|
491
|
-
* location_id: string,
|
492
|
-
* stocked_quantity: number
|
493
|
-
* }[]) {
|
494
|
-
* const inventoryModule = await initializeInventoryModule({})
|
495
|
-
*
|
496
|
-
* const inventoryLevels = await inventoryModule.updateInventoryLevels(
|
497
|
-
* items
|
498
|
-
* )
|
499
|
-
*
|
500
|
-
* // do something with the inventory levels or return them
|
501
|
-
* }
|
511
|
+
* const inventoryLevels =
|
512
|
+
* await inventoryModuleService.createInventoryLevels({
|
513
|
+
* inventory_item_id: "iitem_123",
|
514
|
+
* location_id: "loc_123",
|
515
|
+
* stocked_quantity: 10,
|
516
|
+
* })
|
502
517
|
*/
|
503
|
-
|
518
|
+
createInventoryLevels(data: CreateInventoryLevelInput, context?: Context): Promise<InventoryLevelDTO>;
|
504
519
|
/**
|
505
|
-
* This method
|
520
|
+
* This method updates existing inventory levels.
|
506
521
|
*
|
507
|
-
* @param {
|
508
|
-
* @param {
|
509
|
-
* @
|
510
|
-
* @param {SharedContext} context - A context used to share resources, such as transaction manager, between the application and the module.
|
511
|
-
* @returns {Promise<InventoryLevelDTO>} The updated inventory level's details.
|
522
|
+
* @param {BulkUpdateInventoryLevelInput[]} updates - The list of The attributes to update in an inventory level. The inventory level is identified by the IDs of its associated inventory item and location.
|
523
|
+
* @param {Context} context - A context used to share resources, such as transaction manager, between the application and the module.
|
524
|
+
* @returns {Promise<InventoryLevelDTO[]>} The updated inventory levels.
|
512
525
|
*
|
513
526
|
* @example
|
514
|
-
*
|
515
|
-
*
|
516
|
-
* } from "@medusajs/inventory"
|
517
|
-
*
|
518
|
-
* async function updateInventoryLevel (
|
519
|
-
* inventoryItemId: string,
|
520
|
-
* locationId: string,
|
521
|
-
* stockedQuantity: number
|
522
|
-
* ) {
|
523
|
-
* const inventoryModule = await initializeInventoryModule({})
|
524
|
-
*
|
525
|
-
* const inventoryLevel = await inventoryModule.updateInventoryLevels(
|
526
|
-
* inventoryItemId,
|
527
|
-
* locationId,
|
527
|
+
* const inventoryLevels =
|
528
|
+
* await inventoryModuleService.updateInventoryLevels([
|
528
529
|
* {
|
529
|
-
*
|
530
|
-
*
|
531
|
-
*
|
532
|
-
*
|
533
|
-
*
|
534
|
-
*
|
530
|
+
* inventory_item_id: "iitem_123",
|
531
|
+
* location_id: "loc_123",
|
532
|
+
* id: "ilev_123",
|
533
|
+
* stocked_quantity: 20,
|
534
|
+
* },
|
535
|
+
* ])
|
535
536
|
*/
|
536
|
-
|
537
|
+
updateInventoryLevels(updates: BulkUpdateInventoryLevelInput[], context?: Context): Promise<InventoryLevelDTO[]>;
|
537
538
|
/**
|
538
|
-
* This method
|
539
|
+
* This method updates an existing inventory level.
|
539
540
|
*
|
540
|
-
* @param {
|
541
|
-
* @param {
|
542
|
-
* @
|
543
|
-
* @returns {Promise<InventoryItemDTO>} The updated inventory item's details.
|
541
|
+
* @param {BulkUpdateInventoryLevelInput} updates - The attributes to update in an inventory level. The inventory level is identified by the IDs of its associated inventory item and location.
|
542
|
+
* @param {Context} context - A context used to share resources, such as transaction manager, between the application and the module.
|
543
|
+
* @returns {Promise<InventoryLevelDTO>} The updated inventory level.
|
544
544
|
*
|
545
545
|
* @example
|
546
|
-
*
|
547
|
-
*
|
548
|
-
*
|
546
|
+
* const inventoryLevel =
|
547
|
+
* await inventoryModuleService.updateInventoryLevels({
|
548
|
+
* inventory_item_id: "iitem_123",
|
549
|
+
* location_id: "loc_123",
|
550
|
+
* stocked_quantity: 20,
|
551
|
+
* })
|
552
|
+
*/
|
553
|
+
updateInventoryLevels(updates: BulkUpdateInventoryLevelInput, context?: Context): Promise<InventoryLevelDTO>;
|
554
|
+
/**
|
555
|
+
* This method updates an existing inventory item.
|
549
556
|
*
|
550
|
-
*
|
551
|
-
*
|
552
|
-
*
|
553
|
-
* ) {
|
554
|
-
* const inventoryModule = await initializeInventoryModule({})
|
557
|
+
* @param {UpdateInventoryItemInput} input - The attributes to update in the inventory item.
|
558
|
+
* @param {Context} context - A context used to share resources, such as transaction manager, between the application and the module.
|
559
|
+
* @returns {Promise<InventoryItemDTO>} The updated inventory item.
|
555
560
|
*
|
556
|
-
*
|
557
|
-
*
|
558
|
-
*
|
559
|
-
*
|
560
|
-
*
|
561
|
-
|
561
|
+
* @example
|
562
|
+
* const inventoryItem = await inventoryModuleService.updateInventoryItems({
|
563
|
+
* id: "iitem_123",
|
564
|
+
* title: "Medusa Shirt Inventory",
|
565
|
+
* })
|
566
|
+
*/
|
567
|
+
updateInventoryItems(input: UpdateInventoryItemInput, context?: Context): Promise<InventoryItemDTO>;
|
568
|
+
/**
|
569
|
+
* This method updates existing inventory items.
|
562
570
|
*
|
563
|
-
*
|
564
|
-
* }
|
571
|
+
* @param {UpdateInventoryItemInput[]} input - The attributes to update in the inventory items.
|
572
|
+
* @param {Context} context - A context used to share resources, such as transaction manager, between the application and the module.
|
573
|
+
* @returns {Promise<InventoryItemDTO[]>} The updated inventory items.
|
574
|
+
*
|
575
|
+
* @example
|
576
|
+
* const inventoryItems = await inventoryModuleService.updateInventoryItems([
|
577
|
+
* {
|
578
|
+
* id: "iitem_123",
|
579
|
+
* title: "Medusa Shirt Inventory",
|
580
|
+
* },
|
581
|
+
* {
|
582
|
+
* id: "iitem_321",
|
583
|
+
* description: "The inventory of Medusa pants",
|
584
|
+
* },
|
585
|
+
* ])
|
565
586
|
*/
|
566
|
-
|
587
|
+
updateInventoryItems(input: UpdateInventoryItemInput[], context?: Context): Promise<InventoryItemDTO[]>;
|
567
588
|
/**
|
568
|
-
* This method
|
589
|
+
* This method updates an existing reservation item.
|
569
590
|
*
|
570
|
-
* @param {
|
571
|
-
* @param {
|
572
|
-
* @param {SharedContext} context - A context used to share resources, such as transaction manager, between the application and the module.
|
591
|
+
* @param {UpdateReservationItemInput} input - The attributes to update in a reservation item.
|
592
|
+
* @param {Context} context - A context used to share resources, such as transaction manager, between the application and the module.
|
573
593
|
* @returns {Promise<ReservationItemDTO>} The updated reservation item.
|
574
594
|
*
|
575
595
|
* @example
|
576
|
-
*
|
577
|
-
*
|
578
|
-
*
|
596
|
+
* const reservationItem =
|
597
|
+
* await inventoryModuleService.updateReservationItems({
|
598
|
+
* id: "resitem_123",
|
599
|
+
* quantity: 10,
|
600
|
+
* })
|
601
|
+
*/
|
602
|
+
updateReservationItems(input: UpdateReservationItemInput, context?: Context): Promise<ReservationItemDTO>;
|
603
|
+
/**
|
604
|
+
* This method updates existing reservation items.
|
579
605
|
*
|
580
|
-
*
|
581
|
-
*
|
582
|
-
*
|
583
|
-
* ) {
|
584
|
-
* const inventoryModule = await initializeInventoryModule({})
|
606
|
+
* @param {UpdateReservationItemInput[]} input - The attributes to update in the reservation items.
|
607
|
+
* @param {Context} context - A context used to share resources, such as transaction manager, between the application and the module.
|
608
|
+
* @returns {Promise<ReservationItemDTO[]>} The updated reservation items.
|
585
609
|
*
|
586
|
-
*
|
587
|
-
*
|
610
|
+
* @example
|
611
|
+
* const reservationItems =
|
612
|
+
* await inventoryModuleService.updateReservationItems([
|
588
613
|
* {
|
589
|
-
*
|
590
|
-
*
|
591
|
-
*
|
614
|
+
* id: "resitem_123",
|
615
|
+
* quantity: 10,
|
616
|
+
* },
|
617
|
+
* ])
|
618
|
+
*/
|
619
|
+
updateReservationItems(input: UpdateReservationItemInput[], context?: Context): Promise<ReservationItemDTO[]>;
|
620
|
+
/**
|
621
|
+
* This method deletes a reservation item by its associated line item.
|
592
622
|
*
|
593
|
-
*
|
594
|
-
* }
|
623
|
+
* @param {string | string[]} lineItemId - The line item's ID.
|
624
|
+
* @param {Context} context - A context used to share resources, such as transaction manager, between the application and the module.
|
625
|
+
* @returns {Promise<void>} Resolves when the reservation item is deleted.
|
626
|
+
*
|
627
|
+
* @example
|
628
|
+
* await inventoryModuleService.deleteReservationItemByLocationId(
|
629
|
+
* "cali_123"
|
630
|
+
* )
|
595
631
|
*/
|
596
|
-
|
632
|
+
deleteReservationItemsByLineItem(lineItemId: string | string[], context?: Context): Promise<void>;
|
597
633
|
/**
|
598
|
-
* This method is used to
|
634
|
+
* This method is used to restore the reservation items associated with a line item or multiple line items that were deleted.
|
599
635
|
*
|
600
636
|
* @param {string | string[]} lineItemId - The ID(s) of the line item(s).
|
601
637
|
* @param {SharedContext} context - A context used to share re9sources, such as transaction manager, between the application and the module.
|
@@ -606,302 +642,297 @@ export interface IInventoryService extends IModuleService {
|
|
606
642
|
* initialize as initializeInventoryModule,
|
607
643
|
* } from "@medusajs/inventory"
|
608
644
|
*
|
609
|
-
* async function
|
645
|
+
* async function restoreReservationItemsByLineItem (
|
610
646
|
* lineItemIds: string[]
|
611
647
|
* ) {
|
612
648
|
* const inventoryModule = await initializeInventoryModule({})
|
613
649
|
*
|
614
|
-
* await inventoryModule.
|
650
|
+
* await inventoryModule.restoreReservationItemsByLineItem(
|
615
651
|
* lineItemIds
|
616
652
|
* )
|
617
653
|
* }
|
618
654
|
*/
|
619
|
-
|
655
|
+
restoreReservationItemsByLineItem(lineItemId: string | string[], context?: Context): Promise<void>;
|
620
656
|
/**
|
621
|
-
* This method
|
657
|
+
* This method deletes reservation items by their IDs.
|
622
658
|
*
|
623
|
-
* @param {string | string[]} reservationItemId - The
|
624
|
-
* @param {
|
625
|
-
* @returns {Promise<void>} Resolves when the reservation item
|
659
|
+
* @param {string | string[]} reservationItemId - The reservation items' IDs.
|
660
|
+
* @param {Context} context - A context used to share resources, such as transaction manager, between the application and the module.
|
661
|
+
* @returns {Promise<void>} Resolves when the reservation item is deleted.
|
626
662
|
*
|
627
663
|
* @example
|
628
|
-
*
|
629
|
-
*
|
630
|
-
*
|
631
|
-
*
|
632
|
-
* async function deleteReservationItems (
|
633
|
-
* reservationItemIds: string[]
|
634
|
-
* ) {
|
635
|
-
* const inventoryModule = await initializeInventoryModule({})
|
636
|
-
*
|
637
|
-
* await inventoryModule.deleteReservationItem(
|
638
|
-
* reservationItemIds
|
639
|
-
* )
|
640
|
-
* }
|
664
|
+
* await inventoryModuleService.deleteReservationItems(
|
665
|
+
* "resitem_123"
|
666
|
+
* )
|
641
667
|
*/
|
642
|
-
|
668
|
+
deleteReservationItems(reservationItemId: string | string[], context?: Context): Promise<void>;
|
643
669
|
/**
|
644
|
-
* This method
|
645
|
-
* {@link restoreInventoryItem} method.
|
670
|
+
* This method soft deletes reservations by their IDs.
|
646
671
|
*
|
647
|
-
* @param {string
|
648
|
-
* @param {
|
649
|
-
* @
|
672
|
+
* @param {string[]} inventoryLevelIds - The reservations' IDs.
|
673
|
+
* @param {SoftDeleteReturn<TReturnableLinkableKeys>} config - An object that is used to specify an entity's related entities that should be soft-deleted when the main entity is soft-deleted.
|
674
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
675
|
+
* @returns {Promise<void | Record<string, string[]>>} An object that includes the IDs of related records that were also soft deleted.
|
676
|
+
* If there are no related records, the promise resolves to `void`.
|
650
677
|
*
|
651
678
|
* @example
|
652
|
-
*
|
653
|
-
*
|
654
|
-
*
|
679
|
+
* await inventoryModuleService.softDeleteReservationItems([
|
680
|
+
* "ilev_123",
|
681
|
+
* ])
|
682
|
+
*/
|
683
|
+
softDeleteReservationItems<TReturnableLinkableKeys extends string = string>(ReservationItemIds: string[], config?: SoftDeleteReturn<TReturnableLinkableKeys>, sharedContext?: Context): Promise<Record<string, string[]> | void>;
|
684
|
+
/**
|
685
|
+
* This method restores soft deleted reservations by their IDs.
|
655
686
|
*
|
656
|
-
*
|
657
|
-
*
|
658
|
-
*
|
659
|
-
*
|
687
|
+
* @param {string[]} ReservationItemIds - The reservations' IDs.
|
688
|
+
* @param {RestoreReturn<TReturnableLinkableKeys>} config - Configurations determining which relations to restore along with each of the reservation. You can pass to its `returnLinkableKeys`
|
689
|
+
* property any of the reservation's relation attribute names, such as `{type relation name}`.
|
690
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
691
|
+
* @returns {Promise<void | Record<string, string[]>>} An object that includes the IDs of related records that were restored.
|
692
|
+
* If there are no related records restored, the promise resolves to `void`.
|
660
693
|
*
|
661
|
-
*
|
662
|
-
*
|
663
|
-
*
|
664
|
-
*
|
694
|
+
* @example
|
695
|
+
* await inventoryModuleService.restoreReservationItems([
|
696
|
+
* "ilev_123",
|
697
|
+
* ])
|
665
698
|
*/
|
666
|
-
|
699
|
+
restoreReservationItems<TReturnableLinkableKeys extends string = string>(ReservationItemIds: string[], config?: RestoreReturn<TReturnableLinkableKeys>, sharedContext?: Context): Promise<Record<string, string[]> | void>;
|
667
700
|
/**
|
668
|
-
* This method
|
701
|
+
* This method deletes inventory items by their IDs.
|
669
702
|
*
|
670
|
-
* @param {string | string[]} inventoryItemId - The
|
671
|
-
* @param {
|
672
|
-
* @returns {Promise<void>} Resolves when the inventory
|
703
|
+
* @param {string | string[]} inventoryItemId - The inventory item's ID.
|
704
|
+
* @param {Context} context - A context used to share resources, such as transaction manager, between the application and the module.
|
705
|
+
* @returns {Promise<void>} Resolves when the inventory items are deleted.
|
673
706
|
*
|
674
707
|
* @example
|
675
|
-
*
|
676
|
-
|
677
|
-
|
708
|
+
* await inventoryModuleService.deleteInventoryItems("iitem_123")
|
709
|
+
*/
|
710
|
+
deleteInventoryItems(inventoryItemId: string | string[], context?: Context): Promise<void>;
|
711
|
+
/**
|
712
|
+
* This method soft deletes inventory items by their IDs.
|
678
713
|
*
|
679
|
-
*
|
680
|
-
*
|
681
|
-
*
|
682
|
-
*
|
714
|
+
* @param {string[]} inventoryItemIds - The inventory items' IDs.
|
715
|
+
* @param {SoftDeleteReturn<TReturnableLinkableKeys>} config - An object that is used to specify an entity's related entities that should be soft-deleted when the main entity is soft-deleted.
|
716
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
717
|
+
* @returns {Promise<void | Record<string, string[]>>} An object that includes the IDs of related records that were also soft deleted, such as the ID of the associated location levels.
|
718
|
+
* The object's keys are the ID attribute names of the inventory service next entity's relations, such as `location_level_id`, and its value is an array of strings, each being the ID of a record associated
|
719
|
+
* with the inventory item through this relation, such as the IDs of associated location levels.
|
683
720
|
*
|
684
|
-
*
|
685
|
-
*
|
686
|
-
*
|
687
|
-
*
|
721
|
+
* If there are no related records, the promise resolves to `void`.
|
722
|
+
*
|
723
|
+
* @example
|
724
|
+
* await inventoryModuleService.softDeleteInventoryItems(
|
725
|
+
* ["iitem_123", "iitem_321"],
|
726
|
+
* {
|
727
|
+
* returnLinkableKeys: ["location_level"],
|
728
|
+
* }
|
729
|
+
* )
|
688
730
|
*/
|
689
|
-
|
731
|
+
softDeleteInventoryItems<TReturnableLinkableKeys extends string = string>(inventoryItemIds: string[], config?: SoftDeleteReturn<TReturnableLinkableKeys>, sharedContext?: Context): Promise<Record<string, string[]> | void>;
|
690
732
|
/**
|
691
|
-
* This method
|
733
|
+
* This method restores soft deleted inventory items by their IDs.
|
692
734
|
*
|
693
|
-
* @param {string
|
694
|
-
* @param {
|
695
|
-
*
|
735
|
+
* @param {string[]} inventoryItemIds - The inventory items' IDs.
|
736
|
+
* @param {RestoreReturn<TReturnableLinkableKeys>} config - Configurations determining which relations to restore along with each of the inventory items. You can pass to its `returnLinkableKeys`
|
737
|
+
* property any of the inventory item's relation attribute names, such as `location_levels`.
|
738
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
739
|
+
* @returns {Promise<void | Record<string, string[]>>} An object that includes the IDs of related records that were restored, such as the ID of associated location levels.
|
740
|
+
* The object's keys are the ID attribute names of the inventory item entity's relations, such as `location_level_id`,
|
741
|
+
* and its value is an array of strings, each being the ID of the record associated with the inventory item through this relation,
|
742
|
+
* such as the IDs of associated location levels.
|
743
|
+
*
|
744
|
+
* If there are no related records restored, the promise resolves to `void`.
|
696
745
|
*
|
697
746
|
* @example
|
698
|
-
*
|
699
|
-
*
|
700
|
-
*
|
747
|
+
* await inventoryModuleService.restoreInventoryItems(
|
748
|
+
* ["iitem_123", "iitem_321"],
|
749
|
+
* {
|
750
|
+
* returnLinkableKeys: ["location_level"],
|
751
|
+
* }
|
752
|
+
* )
|
753
|
+
*/
|
754
|
+
restoreInventoryItems<TReturnableLinkableKeys extends string = string>(inventoryItemIds: string[], config?: RestoreReturn<TReturnableLinkableKeys>, sharedContext?: Context): Promise<Record<string, string[]> | void>;
|
755
|
+
/**
|
756
|
+
* This method soft deletes inventory item's level by the associated location.
|
701
757
|
*
|
702
|
-
*
|
703
|
-
*
|
704
|
-
*
|
705
|
-
*
|
758
|
+
* @param {string | string[]} locationId - The locations' IDs.
|
759
|
+
* @param {Context} context - A context used to share resources, such as transaction manager, between the application and the module.
|
760
|
+
* @returns {Promise<[object[], Record<string, unknown[]>]>} An array, where the first item is an array includes the soft-deleted inventory levels,
|
761
|
+
* and the second is an object that includes the IDs of related records that were soft-deleted.
|
706
762
|
*
|
707
|
-
*
|
708
|
-
*
|
709
|
-
*
|
710
|
-
*
|
763
|
+
* @example
|
764
|
+
* await inventoryModuleService.deleteInventoryItemLevelByLocationId(
|
765
|
+
* "loc_123"
|
766
|
+
* )
|
711
767
|
*/
|
712
|
-
deleteInventoryItemLevelByLocationId(locationId: string | string[], context?:
|
768
|
+
deleteInventoryItemLevelByLocationId(locationId: string | string[], context?: Context): Promise<[object[], Record<string, unknown[]>]>;
|
713
769
|
/**
|
714
|
-
* This method deletes reservation
|
770
|
+
* This method deletes reservation items by their associated location.
|
715
771
|
*
|
716
|
-
* @param {string | string[]} locationId - The
|
717
|
-
* @param {
|
718
|
-
* @returns {Promise<void>} Resolves when
|
772
|
+
* @param {string | string[]} locationId - The location's ID.
|
773
|
+
* @param {Context} context - A context used to share resources, such as transaction manager, between the application and the module.
|
774
|
+
* @returns {Promise<void>} Resolves when then reservation items are deleted successfully.
|
719
775
|
*
|
720
776
|
* @example
|
721
|
-
*
|
722
|
-
*
|
723
|
-
*
|
777
|
+
* await inventoryModuleService.deleteReservationItemByLocationId(
|
778
|
+
* "loc_123"
|
779
|
+
* )
|
780
|
+
*/
|
781
|
+
deleteReservationItemByLocationId(locationId: string | string[], context?: Context): Promise<void>;
|
782
|
+
/**
|
783
|
+
* This method deletes an inventory level by its associated inventory item and location.
|
724
784
|
*
|
725
|
-
*
|
726
|
-
*
|
727
|
-
*
|
728
|
-
*
|
785
|
+
* @param {string} inventoryItemId - The inventory item's ID.
|
786
|
+
* @param {string} locationId - The location's ID.
|
787
|
+
* @param {Context} context - A context used to share resources, such as transaction manager, between the application and the module.
|
788
|
+
* @returns {Promise<void>} Resolves when the inventory level is deleted successfully.
|
729
789
|
*
|
730
|
-
*
|
731
|
-
*
|
732
|
-
*
|
733
|
-
*
|
790
|
+
* @example
|
791
|
+
* await inventoryModuleService.deleteInventoryLevel(
|
792
|
+
* "iitem_123",
|
793
|
+
* "loc_123"
|
794
|
+
* )
|
734
795
|
*/
|
735
|
-
|
796
|
+
deleteInventoryLevel(inventoryItemId: string, locationId: string, context?: Context): Promise<void>;
|
736
797
|
/**
|
737
|
-
* This method
|
798
|
+
* This method deletes inventory levels by their IDs.
|
738
799
|
*
|
739
|
-
* @param {string}
|
740
|
-
* @param {
|
741
|
-
* @
|
742
|
-
* @returns {Promise<void>} Resolves when the inventory level(s) are successfully restored.
|
800
|
+
* @param {string | string[]} inventoryLevelIds - The inventory levels' IDs.
|
801
|
+
* @param {Context} context - A context used to share resources, such as transaction manager, between the application and the module.
|
802
|
+
* @returns {Promise<void>} Resolves when the inventory levels are deleted.
|
743
803
|
*
|
744
804
|
* @example
|
745
|
-
*
|
746
|
-
|
747
|
-
|
805
|
+
* await inventoryModuleService.deleteInventoryLevels("ilev_123")
|
806
|
+
*/
|
807
|
+
deleteInventoryLevels(inventoryLevelIds: string | string[], context?: Context): Promise<void>;
|
808
|
+
/**
|
809
|
+
* This method soft deletes inventory levels by their IDs.
|
748
810
|
*
|
749
|
-
*
|
750
|
-
*
|
751
|
-
*
|
752
|
-
*
|
753
|
-
*
|
811
|
+
* @param {string[]} inventoryLevelIds - The inventory levels' IDs.
|
812
|
+
* @param {SoftDeleteReturn<TReturnableLinkableKeys>} config - An object that is used to specify an entity's related entities that should be soft-deleted when the main entity is soft-deleted.
|
813
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
814
|
+
* @returns {Promise<void | Record<string, string[]>>} An object that includes the IDs of related records that were also soft deleted.
|
815
|
+
* If there are no related records, the promise resolves to `void`.
|
754
816
|
*
|
755
|
-
*
|
756
|
-
*
|
757
|
-
*
|
758
|
-
*
|
759
|
-
* }
|
817
|
+
* @example
|
818
|
+
* await inventoryModuleService.softDeleteInventoryLevels([
|
819
|
+
* "ilev_123",
|
820
|
+
* ])
|
760
821
|
*/
|
761
|
-
|
822
|
+
softDeleteInventoryLevels<TReturnableLinkableKeys extends string = string>(inventoryLevelIds: string[], config?: SoftDeleteReturn<TReturnableLinkableKeys>, sharedContext?: Context): Promise<Record<string, string[]> | void>;
|
762
823
|
/**
|
763
|
-
* This method
|
824
|
+
* This method restores soft deleted inventory levels by their IDs.
|
764
825
|
*
|
765
|
-
* @param {string}
|
766
|
-
* @param {
|
767
|
-
*
|
768
|
-
* @param {
|
769
|
-
* @returns {Promise<
|
826
|
+
* @param {string[]} inventoryLevelIds - The inventory levels' IDs.
|
827
|
+
* @param {RestoreReturn<TReturnableLinkableKeys>} config - Configurations determining which relations to restore along with each of the inventory level. You can pass to its `returnLinkableKeys`
|
828
|
+
* property any of the inventory level's relation attribute names, such as `{type relation name}`.
|
829
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
830
|
+
* @returns {Promise<void | Record<string, string[]>>} An object that includes the IDs of related records that were restored.
|
831
|
+
* If there are no related records restored, the promise resolves to `void`.
|
770
832
|
*
|
771
833
|
* @example
|
772
|
-
*
|
773
|
-
*
|
774
|
-
*
|
834
|
+
* await inventoryModuleService.restoreInventoryLevels([
|
835
|
+
* "ilev_123",
|
836
|
+
* ])
|
837
|
+
*/
|
838
|
+
restoreInventoryLevels<TReturnableLinkableKeys extends string = string>(inventoryLevelIds: string[], config?: RestoreReturn<TReturnableLinkableKeys>, sharedContext?: Context): Promise<Record<string, string[]> | void>;
|
839
|
+
/**
|
840
|
+
* This method adjusts the inventory quantity of an item in a location.
|
775
841
|
*
|
776
|
-
*
|
777
|
-
*
|
778
|
-
*
|
779
|
-
*
|
780
|
-
*
|
781
|
-
* const inventoryModule = await initializeInventoryModule({})
|
842
|
+
* @param {string} inventoryItemId - The inventory item's ID.
|
843
|
+
* @param {string} locationId - The location's ID.
|
844
|
+
* @param {number} adjustment - the adjustment to make to the quantity.
|
845
|
+
* @param {Context} context - A context used to share resources, such as transaction manager, between the application and the module.
|
846
|
+
* @returns {Promise<InventoryLevelDTO>} The updated inventory level.
|
782
847
|
*
|
783
|
-
*
|
784
|
-
*
|
785
|
-
*
|
786
|
-
*
|
848
|
+
* @example
|
849
|
+
* // add to the inventory quantity
|
850
|
+
* const inventoryLevel1 =
|
851
|
+
* await inventoryModuleService.adjustInventory(
|
852
|
+
* "iitem_123",
|
853
|
+
* "loc_123",
|
854
|
+
* 5
|
787
855
|
* )
|
788
856
|
*
|
789
|
-
*
|
790
|
-
*
|
857
|
+
* // subtract from the inventory quantity
|
858
|
+
* const inventoryLevel2 =
|
859
|
+
* await inventoryModuleService.adjustInventory(
|
860
|
+
* "iitem_123",
|
861
|
+
* "loc_123",
|
862
|
+
* -5
|
863
|
+
* )
|
791
864
|
*/
|
792
|
-
adjustInventory(
|
865
|
+
adjustInventory(data: {
|
866
|
+
inventoryItemId: string;
|
867
|
+
locationId: string;
|
868
|
+
adjustment: number;
|
869
|
+
}[], context?: Context): Promise<InventoryLevelDTO[]>;
|
870
|
+
adjustInventory(inventoryItemId: string, locationId: string, adjustment: number, context?: Context): Promise<InventoryLevelDTO>;
|
793
871
|
/**
|
794
|
-
* This method
|
872
|
+
* This method confirms that a quantity is available of an inventory item in the specified locations.
|
795
873
|
*
|
796
|
-
* @param {string} inventoryItemId - The
|
797
|
-
* @param {string[]} locationIds - The
|
798
|
-
* @param {number} quantity - The quantity to
|
799
|
-
* @param {
|
800
|
-
* @returns {Promise<boolean>} Whether the
|
874
|
+
* @param {string} inventoryItemId - The inventory item's ID.
|
875
|
+
* @param {string[]} locationIds - The locations' IDs.
|
876
|
+
* @param {number} quantity - The quantity to confirm its availability.
|
877
|
+
* @param {Context} context - A context used to share resources, such as transaction manager, between the application and the module.
|
878
|
+
* @returns {Promise<boolean>} Whether the quantity is available.
|
801
879
|
*
|
802
880
|
* @example
|
803
|
-
*
|
804
|
-
*
|
805
|
-
*
|
806
|
-
*
|
807
|
-
*
|
808
|
-
* inventoryItemId: string,
|
809
|
-
* locationIds: string[],
|
810
|
-
* quantity: number
|
811
|
-
* ) {
|
812
|
-
* const inventoryModule = await initializeInventoryModule({})
|
813
|
-
*
|
814
|
-
* return await inventoryModule.confirmInventory(
|
815
|
-
* inventoryItemId,
|
816
|
-
* locationIds,
|
817
|
-
* quantity
|
881
|
+
* const isAvailable =
|
882
|
+
* await inventoryModuleService.confirmInventory(
|
883
|
+
* "iitem_123",
|
884
|
+
* ["loc_123", "loc_321"],
|
885
|
+
* 10
|
818
886
|
* )
|
819
|
-
* }
|
820
887
|
*/
|
821
|
-
confirmInventory(inventoryItemId: string, locationIds: string[], quantity: number, context?:
|
888
|
+
confirmInventory(inventoryItemId: string, locationIds: string[], quantity: number, context?: Context): Promise<boolean>;
|
822
889
|
/**
|
823
|
-
* This method
|
890
|
+
* This method retrieves the available quantity of an inventory item in the specified locations.
|
824
891
|
*
|
825
|
-
* @param {string} inventoryItemId - The
|
826
|
-
* @param {string[]} locationIds - The
|
827
|
-
* @param {
|
828
|
-
* @returns {Promise<number>} The available quantity of the
|
892
|
+
* @param {string} inventoryItemId - The inventory item's ID.
|
893
|
+
* @param {string[]} locationIds - The locations' IDs.
|
894
|
+
* @param {Context} context - A context used to share resources, such as transaction manager, between the application and the module.
|
895
|
+
* @returns {Promise<number>} The available quantity of the item.
|
829
896
|
*
|
830
897
|
* @example
|
831
|
-
*
|
832
|
-
*
|
833
|
-
*
|
834
|
-
*
|
835
|
-
* async function retrieveAvailableQuantity (
|
836
|
-
* inventoryItemId: string,
|
837
|
-
* locationIds: string[],
|
838
|
-
* ) {
|
839
|
-
* const inventoryModule = await initializeInventoryModule({})
|
840
|
-
*
|
841
|
-
* const quantity = await inventoryModule.retrieveAvailableQuantity(
|
842
|
-
* inventoryItemId,
|
843
|
-
* locationIds,
|
898
|
+
* const availableQuantity =
|
899
|
+
* await inventoryModuleService.retrieveAvailableQuantity(
|
900
|
+
* "iitem_123",
|
901
|
+
* ["loc_123", "loc_321"]
|
844
902
|
* )
|
845
|
-
*
|
846
|
-
* // do something with the quantity or return it
|
847
|
-
* }
|
848
903
|
*/
|
849
|
-
retrieveAvailableQuantity(inventoryItemId: string, locationIds: string[], context?:
|
904
|
+
retrieveAvailableQuantity(inventoryItemId: string, locationIds: string[], context?: Context): Promise<number>;
|
850
905
|
/**
|
851
|
-
* This method
|
906
|
+
* This method retrieves the stocked quantity of an inventory item in the specified location.
|
852
907
|
*
|
853
|
-
* @param {string} inventoryItemId - The
|
854
|
-
* @param {string[]} locationIds - The
|
855
|
-
* @param {
|
856
|
-
* @returns {Promise<number>} The stocked quantity of the
|
908
|
+
* @param {string} inventoryItemId - The inventory item's ID.
|
909
|
+
* @param {string[]} locationIds - The locations' IDs.
|
910
|
+
* @param {Context} context - A context used to share resources, such as transaction manager, between the application and the module.
|
911
|
+
* @returns {Promise<number>} The stocked quantity of the item.
|
857
912
|
*
|
858
913
|
* @example
|
859
|
-
*
|
860
|
-
*
|
861
|
-
*
|
862
|
-
*
|
863
|
-
* async function retrieveStockedQuantity (
|
864
|
-
* inventoryItemId: string,
|
865
|
-
* locationIds: string[],
|
866
|
-
* ) {
|
867
|
-
* const inventoryModule = await initializeInventoryModule({})
|
868
|
-
*
|
869
|
-
* const quantity = await inventoryModule.retrieveStockedQuantity(
|
870
|
-
* inventoryItemId,
|
871
|
-
* locationIds,
|
914
|
+
* const stockedQuantity =
|
915
|
+
* await inventoryModuleService.retrieveStockedQuantity(
|
916
|
+
* "iitem_123",
|
917
|
+
* ["loc_123", "loc_321"]
|
872
918
|
* )
|
873
|
-
*
|
874
|
-
* // do something with the quantity or return it
|
875
|
-
* }
|
876
919
|
*/
|
877
|
-
retrieveStockedQuantity(inventoryItemId: string, locationIds: string[], context?:
|
920
|
+
retrieveStockedQuantity(inventoryItemId: string, locationIds: string[], context?: Context): Promise<number>;
|
878
921
|
/**
|
879
|
-
* This method
|
922
|
+
* This method retrieves the reserved quantity of an inventory item in the specified location.
|
880
923
|
*
|
881
|
-
* @param {string} inventoryItemId - The
|
882
|
-
* @param {string[]} locationIds - The
|
883
|
-
* @param {
|
884
|
-
* @returns {Promise<number>} The reserved quantity of the
|
924
|
+
* @param {string} inventoryItemId - The inventory item's ID.
|
925
|
+
* @param {string[]} locationIds - The locations' IDs.
|
926
|
+
* @param {Context} context - A context used to share resources, such as transaction manager, between the application and the module.
|
927
|
+
* @returns {Promise<number>} The reserved quantity of the item.
|
885
928
|
*
|
886
929
|
* @example
|
887
|
-
*
|
888
|
-
*
|
889
|
-
*
|
890
|
-
*
|
891
|
-
* async function retrieveReservedQuantity (
|
892
|
-
* inventoryItemId: string,
|
893
|
-
* locationIds: string[],
|
894
|
-
* ) {
|
895
|
-
* const inventoryModule = await initializeInventoryModule({})
|
896
|
-
*
|
897
|
-
* const quantity = await inventoryModule.retrieveReservedQuantity(
|
898
|
-
* inventoryItemId,
|
899
|
-
* locationIds,
|
930
|
+
* const reservedQuantity =
|
931
|
+
* await inventoryModuleService.retrieveReservedQuantity(
|
932
|
+
* "iitem_123",
|
933
|
+
* ["loc_123", "loc_321"]
|
900
934
|
* )
|
901
|
-
*
|
902
|
-
* // do something with the quantity or return it
|
903
|
-
* }
|
904
935
|
*/
|
905
|
-
retrieveReservedQuantity(inventoryItemId: string, locationIds: string[], context?:
|
936
|
+
retrieveReservedQuantity(inventoryItemId: string, locationIds: string[], context?: Context): Promise<number>;
|
906
937
|
}
|
907
938
|
//# sourceMappingURL=service.d.ts.map
|