@medusajs/types 1.12.0-snapshot-20240607093839 → 1.12.0-snapshot-20240701122250
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 +6 -55
- 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 +6 -6
- 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,5 +1,5 @@
|
|
1
1
|
import { RestoreReturn, SoftDeleteReturn } from "../dal";
|
2
|
-
import { CreateProductCategoryDTO, CreateProductCollectionDTO, CreateProductDTO, CreateProductOptionDTO, CreateProductTagDTO, CreateProductTypeDTO, CreateProductVariantDTO, FilterableProductCategoryProps, FilterableProductCollectionProps, FilterableProductOptionProps, FilterableProductProps, FilterableProductTagProps, FilterableProductTypeProps, FilterableProductVariantProps, ProductCategoryDTO, ProductCollectionDTO, ProductDTO, ProductOptionDTO, ProductTagDTO, ProductTypeDTO, ProductVariantDTO, UpdateProductCategoryDTO, UpdateProductCollectionDTO, UpdateProductDTO, UpdateProductOptionDTO, UpdateProductTagDTO, UpdateProductTypeDTO, UpdateProductVariantDTO, UpsertProductCollectionDTO, UpsertProductDTO, UpsertProductOptionDTO, UpsertProductTagDTO, UpsertProductTypeDTO, UpsertProductVariantDTO } from "./common";
|
2
|
+
import { CreateProductCategoryDTO, CreateProductCollectionDTO, CreateProductDTO, CreateProductOptionDTO, CreateProductTagDTO, CreateProductTypeDTO, CreateProductVariantDTO, FilterableProductCategoryProps, FilterableProductCollectionProps, FilterableProductOptionProps, FilterableProductProps, FilterableProductTagProps, FilterableProductTypeProps, FilterableProductVariantProps, ProductCategoryDTO, ProductCollectionDTO, ProductDTO, ProductOptionDTO, ProductTagDTO, ProductTypeDTO, ProductVariantDTO, UpdateProductCategoryDTO, UpdateProductCollectionDTO, UpdateProductDTO, UpdateProductOptionDTO, UpdateProductTagDTO, UpdateProductTypeDTO, UpdateProductVariantDTO, UpsertProductCategoryDTO, UpsertProductCollectionDTO, UpsertProductDTO, UpsertProductOptionDTO, UpsertProductTagDTO, UpsertProductTypeDTO, UpsertProductVariantDTO } from "./common";
|
3
3
|
import { FindConfig } from "../common";
|
4
4
|
import { IModuleService } from "../modules-sdk";
|
5
5
|
import { Context } from "../shared-context";
|
@@ -22,13 +22,13 @@ export interface IProductModuleService extends IModuleService {
|
|
22
22
|
*
|
23
23
|
* ```ts
|
24
24
|
* const product =
|
25
|
-
* await productModuleService.
|
25
|
+
* await productModuleService.retrieveProduct("prod_123")
|
26
26
|
* ```
|
27
27
|
*
|
28
28
|
* To specify relations that should be retrieved:
|
29
29
|
*
|
30
30
|
* ```ts
|
31
|
-
* const product = await productModuleService.
|
31
|
+
* const product = await productModuleService.retrieveProduct(
|
32
32
|
* "prod_123",
|
33
33
|
* {
|
34
34
|
* relations: ["categories"],
|
@@ -36,7 +36,7 @@ export interface IProductModuleService extends IModuleService {
|
|
36
36
|
* )
|
37
37
|
* ```
|
38
38
|
*/
|
39
|
-
|
39
|
+
retrieveProduct(productId: string, config?: FindConfig<ProductDTO>, sharedContext?: Context): Promise<ProductDTO>;
|
40
40
|
/**
|
41
41
|
* This method is used to retrieve a paginated list of products based on optional filters and configuration.
|
42
42
|
*
|
@@ -51,7 +51,7 @@ export interface IProductModuleService extends IModuleService {
|
|
51
51
|
* To retrieve a list of products using their IDs:
|
52
52
|
*
|
53
53
|
* ```ts
|
54
|
-
* const products = await productModuleService.
|
54
|
+
* const products = await productModuleService.listProducts({
|
55
55
|
* id: ["prod_123", "prod_321"],
|
56
56
|
* })
|
57
57
|
* ```
|
@@ -59,7 +59,7 @@ export interface IProductModuleService extends IModuleService {
|
|
59
59
|
* To specify relations that should be retrieved within the products:
|
60
60
|
*
|
61
61
|
* ```ts
|
62
|
-
* const products = await productModuleService.
|
62
|
+
* const products = await productModuleService.listProducts(
|
63
63
|
* {
|
64
64
|
* id: ["prod_123", "prod_321"],
|
65
65
|
* },
|
@@ -72,7 +72,7 @@ export interface IProductModuleService extends IModuleService {
|
|
72
72
|
* By default, only the first `15` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
|
73
73
|
*
|
74
74
|
* ```ts
|
75
|
-
* const products = await productModuleService.
|
75
|
+
* const products = await productModuleService.listProducts(
|
76
76
|
* {
|
77
77
|
* id: ["prod_123", "prod_321"],
|
78
78
|
* },
|
@@ -84,7 +84,7 @@ export interface IProductModuleService extends IModuleService {
|
|
84
84
|
* )
|
85
85
|
* ```
|
86
86
|
*/
|
87
|
-
|
87
|
+
listProducts(filters?: FilterableProductProps, config?: FindConfig<ProductDTO>, sharedContext?: Context): Promise<ProductDTO[]>;
|
88
88
|
/**
|
89
89
|
* This method is used to retrieve a paginated list of products along with the total count of available products satisfying the provided filters.
|
90
90
|
*
|
@@ -100,7 +100,7 @@ export interface IProductModuleService extends IModuleService {
|
|
100
100
|
*
|
101
101
|
* ```ts
|
102
102
|
* const [products, count] =
|
103
|
-
* await productModuleService.
|
103
|
+
* await productModuleService.listAndCountProducts({
|
104
104
|
* id: ["prod_123", "prod_321"],
|
105
105
|
* })
|
106
106
|
* ```
|
@@ -109,7 +109,7 @@ export interface IProductModuleService extends IModuleService {
|
|
109
109
|
*
|
110
110
|
* ```ts
|
111
111
|
* const [products, count] =
|
112
|
-
* await productModuleService.
|
112
|
+
* await productModuleService.listAndCountProducts(
|
113
113
|
* {
|
114
114
|
* id: ["prod_123", "prod_321"],
|
115
115
|
* },
|
@@ -123,7 +123,7 @@ export interface IProductModuleService extends IModuleService {
|
|
123
123
|
*
|
124
124
|
* ```ts
|
125
125
|
* const [products, count] =
|
126
|
-
* await productModuleService.
|
126
|
+
* await productModuleService.listAndCountProducts(
|
127
127
|
* {
|
128
128
|
* id: ["prod_123", "prod_321"],
|
129
129
|
* },
|
@@ -135,7 +135,7 @@ export interface IProductModuleService extends IModuleService {
|
|
135
135
|
* )
|
136
136
|
* ```
|
137
137
|
*/
|
138
|
-
|
138
|
+
listAndCountProducts(filters?: FilterableProductProps, config?: FindConfig<ProductDTO>, sharedContext?: Context): Promise<[ProductDTO[], number]>;
|
139
139
|
/**
|
140
140
|
* This method is used to create a list of products.
|
141
141
|
*
|
@@ -144,7 +144,7 @@ export interface IProductModuleService extends IModuleService {
|
|
144
144
|
* @returns {Promise<ProductDTO[]>} The list of created products.
|
145
145
|
*
|
146
146
|
* @example
|
147
|
-
* const products = await productModuleService.
|
147
|
+
* const products = await productModuleService.createProducts([
|
148
148
|
* {
|
149
149
|
* title: "Shirt",
|
150
150
|
* },
|
@@ -154,7 +154,7 @@ export interface IProductModuleService extends IModuleService {
|
|
154
154
|
* },
|
155
155
|
* ])
|
156
156
|
*/
|
157
|
-
|
157
|
+
createProducts(data: CreateProductDTO[], sharedContext?: Context): Promise<ProductDTO[]>;
|
158
158
|
/**
|
159
159
|
* This method is used to create a product.
|
160
160
|
*
|
@@ -163,11 +163,11 @@ export interface IProductModuleService extends IModuleService {
|
|
163
163
|
* @returns {Promise<ProductDTO>} The created product.
|
164
164
|
*
|
165
165
|
* @example
|
166
|
-
* const product = await productModuleService.
|
166
|
+
* const product = await productModuleService.createProducts({
|
167
167
|
* title: "Shirt",
|
168
168
|
* })
|
169
169
|
*/
|
170
|
-
|
170
|
+
createProducts(data: CreateProductDTO, sharedContext?: Context): Promise<ProductDTO>;
|
171
171
|
/**
|
172
172
|
* This method updates existing products, or creates new ones if they don't exist.
|
173
173
|
*
|
@@ -176,7 +176,7 @@ export interface IProductModuleService extends IModuleService {
|
|
176
176
|
* @returns {Promise<ProductDTO[]>} The updated and created products.
|
177
177
|
*
|
178
178
|
* @example
|
179
|
-
* const products = await productModuleService.
|
179
|
+
* const products = await productModuleService.upsertProducts([
|
180
180
|
* {
|
181
181
|
* id: "prod_123",
|
182
182
|
* handle: "pant",
|
@@ -186,7 +186,7 @@ export interface IProductModuleService extends IModuleService {
|
|
186
186
|
* },
|
187
187
|
* ])
|
188
188
|
*/
|
189
|
-
|
189
|
+
upsertProducts(data: UpsertProductDTO[], sharedContext?: Context): Promise<ProductDTO[]>;
|
190
190
|
/**
|
191
191
|
* This method updates the product if it exists, or creates a new ones if it doesn't.
|
192
192
|
*
|
@@ -195,11 +195,11 @@ export interface IProductModuleService extends IModuleService {
|
|
195
195
|
* @returns {Promise<ProductDTO>} The updated or created product.
|
196
196
|
*
|
197
197
|
* @example
|
198
|
-
* const product = await productModuleService.
|
198
|
+
* const product = await productModuleService.upsertProducts({
|
199
199
|
* title: "Shirt",
|
200
200
|
* })
|
201
201
|
*/
|
202
|
-
|
202
|
+
upsertProducts(data: UpsertProductDTO, sharedContext?: Context): Promise<ProductDTO>;
|
203
203
|
/**
|
204
204
|
* This method is used to update a product.
|
205
205
|
*
|
@@ -209,14 +209,14 @@ export interface IProductModuleService extends IModuleService {
|
|
209
209
|
* @returns {Promise<ProductDTO>} The updated product.
|
210
210
|
*
|
211
211
|
* @example
|
212
|
-
* const product = await productModuleService.
|
212
|
+
* const product = await productModuleService.updateProducts(
|
213
213
|
* "prod_123",
|
214
214
|
* {
|
215
215
|
* handle: "pant",
|
216
216
|
* }
|
217
217
|
* )
|
218
218
|
*/
|
219
|
-
|
219
|
+
updateProducts(id: string, data: UpdateProductDTO, sharedContext?: Context): Promise<ProductDTO>;
|
220
220
|
/**
|
221
221
|
* This method is used to update a list of products matching the specified filters.
|
222
222
|
*
|
@@ -226,7 +226,7 @@ export interface IProductModuleService extends IModuleService {
|
|
226
226
|
* @returns {Promise<ProductDTO[]>} The updated products.
|
227
227
|
*
|
228
228
|
* @example
|
229
|
-
* const products = await productModuleService.
|
229
|
+
* const products = await productModuleService.updateProducts(
|
230
230
|
* {
|
231
231
|
* title: "Pant",
|
232
232
|
* },
|
@@ -235,7 +235,7 @@ export interface IProductModuleService extends IModuleService {
|
|
235
235
|
* }
|
236
236
|
* )
|
237
237
|
*/
|
238
|
-
|
238
|
+
updateProducts(selector: FilterableProductProps, data: UpdateProductDTO, sharedContext?: Context): Promise<ProductDTO[]>;
|
239
239
|
/**
|
240
240
|
* This method is used to delete products. Unlike the {@link softDelete} method, this method will completely remove the products and they can no longer be accessed or retrieved.
|
241
241
|
*
|
@@ -244,9 +244,9 @@ export interface IProductModuleService extends IModuleService {
|
|
244
244
|
* @returns {Promise<void>} Resolves when the products are successfully deleted.
|
245
245
|
*
|
246
246
|
* @example
|
247
|
-
* await productModuleService.
|
247
|
+
* await productModuleService.deleteProducts(["prod_123", "prod_321"])
|
248
248
|
*/
|
249
|
-
|
249
|
+
deleteProducts(productIds: string[], sharedContext?: Context): Promise<void>;
|
250
250
|
/**
|
251
251
|
* This method is used to delete products. Unlike the {@link delete} method, this method won't completely remove the product. It can still be accessed or retrieved using methods like {@link retrieve} if you pass the `withDeleted` property to the `config` object parameter.
|
252
252
|
*
|
@@ -263,12 +263,12 @@ export interface IProductModuleService extends IModuleService {
|
|
263
263
|
* If there are no related records, the promise resolved to `void`.
|
264
264
|
*
|
265
265
|
* @example
|
266
|
-
* await productModuleService.
|
266
|
+
* await productModuleService.softDeleteProducts([
|
267
267
|
* "prod_123",
|
268
268
|
* "prod_321",
|
269
269
|
* ])
|
270
270
|
*/
|
271
|
-
|
271
|
+
softDeleteProducts<TReturnableLinkableKeys extends string = string>(productIds: string[], config?: SoftDeleteReturn<TReturnableLinkableKeys>, sharedContext?: Context): Promise<Record<string, string[]> | void>;
|
272
272
|
/**
|
273
273
|
* This method is used to restore products which were deleted using the {@link softDelete} method.
|
274
274
|
*
|
@@ -283,9 +283,9 @@ export interface IProductModuleService extends IModuleService {
|
|
283
283
|
* If there are no related records that were restored, the promise resolved to `void`.
|
284
284
|
*
|
285
285
|
* @example
|
286
|
-
* await productModuleService.
|
286
|
+
* await productModuleService.restoreProducts(["prod_123", "prod_321"])
|
287
287
|
*/
|
288
|
-
|
288
|
+
restoreProducts<TReturnableLinkableKeys extends string = string>(productIds: string[], config?: RestoreReturn<TReturnableLinkableKeys>, sharedContext?: Context): Promise<Record<string, string[]> | void>;
|
289
289
|
/**
|
290
290
|
* This method is used to retrieve a tag by its ID.
|
291
291
|
*
|
@@ -300,13 +300,13 @@ export interface IProductModuleService extends IModuleService {
|
|
300
300
|
* A simple example that retrieves a product tag by its ID:
|
301
301
|
*
|
302
302
|
* ```ts
|
303
|
-
* const tag = await productModuleService.
|
303
|
+
* const tag = await productModuleService.retrieveProductTag("ptag_123")
|
304
304
|
* ```
|
305
305
|
*
|
306
306
|
* To specify relations that should be retrieved:
|
307
307
|
*
|
308
308
|
* ```ts
|
309
|
-
* const tag = await productModuleService.
|
309
|
+
* const tag = await productModuleService.retrieveProductTag(
|
310
310
|
* "ptag_123",
|
311
311
|
* {
|
312
312
|
* relations: ["products"],
|
@@ -314,7 +314,7 @@ export interface IProductModuleService extends IModuleService {
|
|
314
314
|
* )
|
315
315
|
* ```
|
316
316
|
*/
|
317
|
-
|
317
|
+
retrieveProductTag(tagId: string, config?: FindConfig<ProductTagDTO>, sharedContext?: Context): Promise<ProductTagDTO>;
|
318
318
|
/**
|
319
319
|
* This method is used to retrieve a paginated list of tags based on optional filters and configuration.
|
320
320
|
*
|
@@ -329,7 +329,7 @@ export interface IProductModuleService extends IModuleService {
|
|
329
329
|
* To retrieve a list of product tags using their IDs:
|
330
330
|
*
|
331
331
|
* ```ts
|
332
|
-
* const tags = await productModuleService.
|
332
|
+
* const tags = await productModuleService.listProductTags({
|
333
333
|
* id: ["ptag_123", "ptag_321"],
|
334
334
|
* })
|
335
335
|
* ```
|
@@ -337,7 +337,7 @@ export interface IProductModuleService extends IModuleService {
|
|
337
337
|
* To specify relations that should be retrieved within the product tags:
|
338
338
|
*
|
339
339
|
* ```ts
|
340
|
-
* const tags = await productModuleService.
|
340
|
+
* const tags = await productModuleService.listProductTags(
|
341
341
|
* {
|
342
342
|
* id: ["ptag_123", "ptag_321"],
|
343
343
|
* },
|
@@ -350,7 +350,7 @@ export interface IProductModuleService extends IModuleService {
|
|
350
350
|
* By default, only the first `15` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
|
351
351
|
*
|
352
352
|
* ```ts
|
353
|
-
* const tags = await productModuleService.
|
353
|
+
* const tags = await productModuleService.listProductTags(
|
354
354
|
* {
|
355
355
|
* id: ["ptag_123", "ptag_321"],
|
356
356
|
* },
|
@@ -362,7 +362,7 @@ export interface IProductModuleService extends IModuleService {
|
|
362
362
|
* )
|
363
363
|
* ```
|
364
364
|
*/
|
365
|
-
|
365
|
+
listProductTags(filters?: FilterableProductTagProps, config?: FindConfig<ProductTagDTO>, sharedContext?: Context): Promise<ProductTagDTO[]>;
|
366
366
|
/**
|
367
367
|
* This method is used to retrieve a paginated list of product tags along with the total count of available product tags satisfying the provided filters.
|
368
368
|
*
|
@@ -378,7 +378,7 @@ export interface IProductModuleService extends IModuleService {
|
|
378
378
|
*
|
379
379
|
* ```ts
|
380
380
|
* const [tags, count] =
|
381
|
-
* await productModuleService.
|
381
|
+
* await productModuleService.listAndCountProductTags({
|
382
382
|
* id: ["ptag_123", "ptag_321"],
|
383
383
|
* })
|
384
384
|
* ```
|
@@ -387,7 +387,7 @@ export interface IProductModuleService extends IModuleService {
|
|
387
387
|
*
|
388
388
|
* ```ts
|
389
389
|
* const [tags, count] =
|
390
|
-
* await productModuleService.
|
390
|
+
* await productModuleService.listAndCountProductTags(
|
391
391
|
* {
|
392
392
|
* id: ["ptag_123", "ptag_321"],
|
393
393
|
* },
|
@@ -401,7 +401,7 @@ export interface IProductModuleService extends IModuleService {
|
|
401
401
|
*
|
402
402
|
* ```ts
|
403
403
|
* const [tags, count] =
|
404
|
-
* await productModuleService.
|
404
|
+
* await productModuleService.listAndCountProductTags(
|
405
405
|
* {
|
406
406
|
* id: ["ptag_123", "ptag_321"],
|
407
407
|
* },
|
@@ -413,7 +413,7 @@ export interface IProductModuleService extends IModuleService {
|
|
413
413
|
* )
|
414
414
|
* ```
|
415
415
|
*/
|
416
|
-
|
416
|
+
listAndCountProductTags(filters?: FilterableProductTagProps, config?: FindConfig<ProductTagDTO>, sharedContext?: Context): Promise<[ProductTagDTO[], number]>;
|
417
417
|
/**
|
418
418
|
* This method is used to create a product tag.
|
419
419
|
*
|
@@ -422,13 +422,13 @@ export interface IProductModuleService extends IModuleService {
|
|
422
422
|
* @return {Promise<ProductTagDTO[]>} The list of created product tags.
|
423
423
|
*
|
424
424
|
* @example
|
425
|
-
* const productTags = await productModuleService.
|
425
|
+
* const productTags = await productModuleService.createProductTags([
|
426
426
|
* {
|
427
427
|
* value: "digital",
|
428
428
|
* },
|
429
429
|
* ])
|
430
430
|
*/
|
431
|
-
|
431
|
+
createProductTags(data: CreateProductTagDTO[], sharedContext?: Context): Promise<ProductTagDTO[]>;
|
432
432
|
/**
|
433
433
|
* This method is used to create a product tag.
|
434
434
|
*
|
@@ -437,12 +437,12 @@ export interface IProductModuleService extends IModuleService {
|
|
437
437
|
* @returns {Promise<ProductTagDTO>} The created product tag.
|
438
438
|
*
|
439
439
|
* @example
|
440
|
-
* const productTag = await productModuleService.
|
440
|
+
* const productTag = await productModuleService.createProductTags({
|
441
441
|
* value: "digital",
|
442
442
|
* })
|
443
443
|
*
|
444
444
|
*/
|
445
|
-
|
445
|
+
createProductTags(data: CreateProductTagDTO, sharedContext?: Context): Promise<ProductTagDTO>;
|
446
446
|
/**
|
447
447
|
* This method updates existing tags, or creates new ones if they don't exist.
|
448
448
|
*
|
@@ -451,7 +451,7 @@ export interface IProductModuleService extends IModuleService {
|
|
451
451
|
* @returns {Promise<ProductTagDTO[]>} The updated and created tags.
|
452
452
|
*
|
453
453
|
* @example
|
454
|
-
* const productTags = await productModuleService.
|
454
|
+
* const productTags = await productModuleService.upsertProductTags([
|
455
455
|
* {
|
456
456
|
* id: "ptag_123",
|
457
457
|
* metadata: {
|
@@ -463,7 +463,7 @@ export interface IProductModuleService extends IModuleService {
|
|
463
463
|
* },
|
464
464
|
* ])
|
465
465
|
*/
|
466
|
-
|
466
|
+
upsertProductTags(data: UpsertProductTagDTO[], sharedContext?: Context): Promise<ProductTagDTO[]>;
|
467
467
|
/**
|
468
468
|
* This method updates an existing tag, or creates a new one if it doesn't exist.
|
469
469
|
*
|
@@ -472,14 +472,14 @@ export interface IProductModuleService extends IModuleService {
|
|
472
472
|
* @returns {Promise<ProductTagDTO>} The updated or created tag.
|
473
473
|
*
|
474
474
|
* @example
|
475
|
-
* const productTag = await productModuleService.
|
475
|
+
* const productTag = await productModuleService.upsertProductTags({
|
476
476
|
* id: "ptag_123",
|
477
477
|
* metadata: {
|
478
478
|
* test: true,
|
479
479
|
* },
|
480
480
|
* })
|
481
481
|
*/
|
482
|
-
|
482
|
+
upsertProductTags(data: UpsertProductTagDTO, sharedContext?: Context): Promise<ProductTagDTO>;
|
483
483
|
/**
|
484
484
|
* This method is used to update a tag.
|
485
485
|
*
|
@@ -489,14 +489,14 @@ export interface IProductModuleService extends IModuleService {
|
|
489
489
|
* @returns {Promise<ProductTagDTO>} The updated tag.
|
490
490
|
*
|
491
491
|
* @example
|
492
|
-
* const productTag = await productModuleService.
|
492
|
+
* const productTag = await productModuleService.updateProductTags(
|
493
493
|
* "ptag_123",
|
494
494
|
* {
|
495
495
|
* value: "Digital",
|
496
496
|
* }
|
497
497
|
* )
|
498
498
|
*/
|
499
|
-
|
499
|
+
updateProductTags(id: string, data: UpdateProductTagDTO, sharedContext?: Context): Promise<ProductTagDTO>;
|
500
500
|
/**
|
501
501
|
* This method is used to update a list of tags matching the specified filters.
|
502
502
|
*
|
@@ -506,7 +506,7 @@ export interface IProductModuleService extends IModuleService {
|
|
506
506
|
* @returns {Promise<ProductTagDTO[]>} The updated tags.
|
507
507
|
*
|
508
508
|
* @example
|
509
|
-
* const productTags = await productModuleService.
|
509
|
+
* const productTags = await productModuleService.updateProductTags(
|
510
510
|
* {
|
511
511
|
* id: ["ptag_123", "ptag_321"],
|
512
512
|
* },
|
@@ -515,7 +515,7 @@ export interface IProductModuleService extends IModuleService {
|
|
515
515
|
* }
|
516
516
|
* )
|
517
517
|
*/
|
518
|
-
|
518
|
+
updateProductTags(selector: FilterableProductTagProps, data: UpdateProductTagDTO, sharedContext?: Context): Promise<ProductTagDTO[]>;
|
519
519
|
/**
|
520
520
|
* This method is used to delete product tags by their ID.
|
521
521
|
*
|
@@ -524,12 +524,12 @@ export interface IProductModuleService extends IModuleService {
|
|
524
524
|
* @returns {Promise<void>} Resolves when the product tags are successfully deleted.
|
525
525
|
*
|
526
526
|
* @example
|
527
|
-
* await productModuleService.
|
527
|
+
* await productModuleService.deleteProductTags([
|
528
528
|
* "ptag_123",
|
529
529
|
* "ptag_321",
|
530
530
|
* ])
|
531
531
|
*/
|
532
|
-
|
532
|
+
deleteProductTags(productTagIds: string[], sharedContext?: Context): Promise<void>;
|
533
533
|
/**
|
534
534
|
* This method is used to delete tags. Unlike the {@link delete} method, this method won't completely remove the tag. It can still be accessed or retrieved using methods like {@link retrieve} if you pass the `withDeleted` property to the `config` object parameter.
|
535
535
|
*
|
@@ -546,12 +546,12 @@ export interface IProductModuleService extends IModuleService {
|
|
546
546
|
* If there are no related records, the promise resolved to `void`.
|
547
547
|
*
|
548
548
|
* @example
|
549
|
-
* await productModuleService.
|
549
|
+
* await productModuleService.softDeleteProductTags([
|
550
550
|
* "ptag_123",
|
551
551
|
* "ptag_321",
|
552
552
|
* ])
|
553
553
|
*/
|
554
|
-
|
554
|
+
softDeleteProductTags<TReturnableLinkableKeys extends string = string>(tagIds: string[], config?: SoftDeleteReturn<TReturnableLinkableKeys>, sharedContext?: Context): Promise<Record<string, string[]> | void>;
|
555
555
|
/**
|
556
556
|
* This method is used to restore tags which were deleted using the {@link softDelete} method.
|
557
557
|
*
|
@@ -566,12 +566,12 @@ export interface IProductModuleService extends IModuleService {
|
|
566
566
|
* If there are no related records that were restored, the promise resolved to `void`.
|
567
567
|
*
|
568
568
|
* @example
|
569
|
-
* await productModuleService.
|
569
|
+
* await productModuleService.restoreProductTags([
|
570
570
|
* "ptag_123",
|
571
571
|
* "ptag_321",
|
572
572
|
* ])
|
573
573
|
*/
|
574
|
-
|
574
|
+
restoreProductTags<TReturnableLinkableKeys extends string = string>(tagIds: string[], config?: RestoreReturn<TReturnableLinkableKeys>, sharedContext?: Context): Promise<Record<string, string[]> | void>;
|
575
575
|
/**
|
576
576
|
* This method is used to retrieve a product type by its ID.
|
577
577
|
*
|
@@ -584,9 +584,9 @@ export interface IProductModuleService extends IModuleService {
|
|
584
584
|
*
|
585
585
|
* @example
|
586
586
|
* const productType =
|
587
|
-
* await productModuleService.
|
587
|
+
* await productModuleService.retrieveProductType("ptyp_123")
|
588
588
|
*/
|
589
|
-
|
589
|
+
retrieveProductType(typeId: string, config?: FindConfig<ProductTypeDTO>, sharedContext?: Context): Promise<ProductTypeDTO>;
|
590
590
|
/**
|
591
591
|
* This method is used to retrieve a paginated list of product types based on optional filters and configuration.
|
592
592
|
*
|
@@ -601,7 +601,7 @@ export interface IProductModuleService extends IModuleService {
|
|
601
601
|
* To retrieve a list of product types using their IDs:
|
602
602
|
*
|
603
603
|
* ```ts
|
604
|
-
* const productTypes = await productModuleService.
|
604
|
+
* const productTypes = await productModuleService.listProductTypes({
|
605
605
|
* id: ["ptyp_123", "ptyp_321"],
|
606
606
|
* })
|
607
607
|
* ```
|
@@ -609,7 +609,7 @@ export interface IProductModuleService extends IModuleService {
|
|
609
609
|
* By default, only the first `15` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
|
610
610
|
*
|
611
611
|
* ```ts
|
612
|
-
* const productTypes = await productModuleService.
|
612
|
+
* const productTypes = await productModuleService.listProductTypes(
|
613
613
|
* {
|
614
614
|
* id: ["ptyp_123", "ptyp_321"],
|
615
615
|
* },
|
@@ -620,7 +620,7 @@ export interface IProductModuleService extends IModuleService {
|
|
620
620
|
* )
|
621
621
|
* ```
|
622
622
|
*/
|
623
|
-
|
623
|
+
listProductTypes(filters?: FilterableProductTypeProps, config?: FindConfig<ProductTypeDTO>, sharedContext?: Context): Promise<ProductTypeDTO[]>;
|
624
624
|
/**
|
625
625
|
* This method is used to retrieve a paginated list of product types along with the total count of available product types satisfying the provided filters.
|
626
626
|
*
|
@@ -636,7 +636,7 @@ export interface IProductModuleService extends IModuleService {
|
|
636
636
|
*
|
637
637
|
* ```ts
|
638
638
|
* const [productTypes, count] =
|
639
|
-
* await productModuleService.
|
639
|
+
* await productModuleService.listAndCountProductTypes({
|
640
640
|
* id: ["ptyp_123", "ptyp_321"],
|
641
641
|
* })
|
642
642
|
* ```
|
@@ -645,7 +645,7 @@ export interface IProductModuleService extends IModuleService {
|
|
645
645
|
*
|
646
646
|
* ```ts
|
647
647
|
* const [productTypes, count] =
|
648
|
-
* await productModuleService.
|
648
|
+
* await productModuleService.listAndCountProductTypes(
|
649
649
|
* {
|
650
650
|
* id: ["ptyp_123", "ptyp_321"],
|
651
651
|
* },
|
@@ -656,7 +656,7 @@ export interface IProductModuleService extends IModuleService {
|
|
656
656
|
* )
|
657
657
|
* ```
|
658
658
|
*/
|
659
|
-
|
659
|
+
listAndCountProductTypes(filters?: FilterableProductTypeProps, config?: FindConfig<ProductTypeDTO>, sharedContext?: Context): Promise<[ProductTypeDTO[], number]>;
|
660
660
|
/**
|
661
661
|
* This method is used to create a product type.
|
662
662
|
*
|
@@ -665,13 +665,13 @@ export interface IProductModuleService extends IModuleService {
|
|
665
665
|
* @return {Promise<ProductTypeDTO[]>} The list of created product types.
|
666
666
|
*
|
667
667
|
* @example
|
668
|
-
* const productTypes = await productModuleService.
|
668
|
+
* const productTypes = await productModuleService.createProductTypes([
|
669
669
|
* {
|
670
670
|
* value: "digital",
|
671
671
|
* },
|
672
672
|
* ])
|
673
673
|
*/
|
674
|
-
|
674
|
+
createProductTypes(data: CreateProductTypeDTO[], sharedContext?: Context): Promise<ProductTypeDTO[]>;
|
675
675
|
/**
|
676
676
|
* This method is used to create a product type.
|
677
677
|
*
|
@@ -680,12 +680,12 @@ export interface IProductModuleService extends IModuleService {
|
|
680
680
|
* @returns {Promise<ProductTypeDTO>} The created product type.
|
681
681
|
*
|
682
682
|
* @example
|
683
|
-
* const productType = await productModuleService.
|
683
|
+
* const productType = await productModuleService.createProductTypes({
|
684
684
|
* value: "digital",
|
685
685
|
* })
|
686
686
|
*
|
687
687
|
*/
|
688
|
-
|
688
|
+
createProductTypes(data: CreateProductTypeDTO, sharedContext?: Context): Promise<ProductTypeDTO>;
|
689
689
|
/**
|
690
690
|
* This method updates existing types, or creates new ones if they don't exist.
|
691
691
|
*
|
@@ -694,7 +694,7 @@ export interface IProductModuleService extends IModuleService {
|
|
694
694
|
* @returns {Promise<ProductTypeDTO[]>} The updated and created types.
|
695
695
|
*
|
696
696
|
* @example
|
697
|
-
* const productTypes = await productModuleService.
|
697
|
+
* const productTypes = await productModuleService.upsertProductTypes([
|
698
698
|
* {
|
699
699
|
* id: "ptyp_123",
|
700
700
|
* metadata: {
|
@@ -706,7 +706,7 @@ export interface IProductModuleService extends IModuleService {
|
|
706
706
|
* },
|
707
707
|
* ])
|
708
708
|
*/
|
709
|
-
|
709
|
+
upsertProductTypes(data: UpsertProductTypeDTO[], sharedContext?: Context): Promise<ProductTypeDTO[]>;
|
710
710
|
/**
|
711
711
|
* This method updates an existing type, or creates a new one if it doesn't exist.
|
712
712
|
*
|
@@ -715,14 +715,14 @@ export interface IProductModuleService extends IModuleService {
|
|
715
715
|
* @returns {Promise<ProductTypeDTO>} The updated or created type.
|
716
716
|
*
|
717
717
|
* @example
|
718
|
-
* const productType = await productModuleService.
|
718
|
+
* const productType = await productModuleService.upsertProductTypes({
|
719
719
|
* id: "ptyp_123",
|
720
720
|
* metadata: {
|
721
721
|
* test: true,
|
722
722
|
* },
|
723
723
|
* })
|
724
724
|
*/
|
725
|
-
|
725
|
+
upsertProductTypes(data: UpsertProductTypeDTO, sharedContext?: Context): Promise<ProductTypeDTO>;
|
726
726
|
/**
|
727
727
|
* This method is used to update a type.
|
728
728
|
*
|
@@ -732,14 +732,14 @@ export interface IProductModuleService extends IModuleService {
|
|
732
732
|
* @returns {Promise<ProductTypeDTO>} The updated type.
|
733
733
|
*
|
734
734
|
* @example
|
735
|
-
* const productType = await productModuleService.
|
735
|
+
* const productType = await productModuleService.updateProductTypes(
|
736
736
|
* "ptyp_123",
|
737
737
|
* {
|
738
738
|
* value: "Digital",
|
739
739
|
* }
|
740
740
|
* )
|
741
741
|
*/
|
742
|
-
|
742
|
+
updateProductTypes(id: string, data: UpdateProductTypeDTO, sharedContext?: Context): Promise<ProductTypeDTO>;
|
743
743
|
/**
|
744
744
|
* This method is used to update a list of types matching the specified filters.
|
745
745
|
*
|
@@ -749,7 +749,7 @@ export interface IProductModuleService extends IModuleService {
|
|
749
749
|
* @returns {Promise<ProductTypeDTO[]>} The updated types.
|
750
750
|
*
|
751
751
|
* @example
|
752
|
-
* const productTypes = await productModuleService.
|
752
|
+
* const productTypes = await productModuleService.updateProductTypes(
|
753
753
|
* {
|
754
754
|
* id: ["ptyp_123", "ptyp_321"],
|
755
755
|
* },
|
@@ -758,7 +758,7 @@ export interface IProductModuleService extends IModuleService {
|
|
758
758
|
* }
|
759
759
|
* )
|
760
760
|
*/
|
761
|
-
|
761
|
+
updateProductTypes(selector: FilterableProductTypeProps, data: UpdateProductTypeDTO, sharedContext?: Context): Promise<ProductTypeDTO[]>;
|
762
762
|
/**
|
763
763
|
* This method is used to delete a product type.
|
764
764
|
*
|
@@ -767,12 +767,12 @@ export interface IProductModuleService extends IModuleService {
|
|
767
767
|
* @returns {Promise<void>} Resolves when the product types are successfully deleted.
|
768
768
|
*
|
769
769
|
* @example
|
770
|
-
* await productModuleService.
|
770
|
+
* await productModuleService.deleteProductTypes([
|
771
771
|
* "ptyp_123",
|
772
772
|
* "ptyp_321",
|
773
773
|
* ])
|
774
774
|
*/
|
775
|
-
|
775
|
+
deleteProductTypes(productTypeIds: string[], sharedContext?: Context): Promise<void>;
|
776
776
|
/**
|
777
777
|
* This method is used to delete types. Unlike the {@link delete} method, this method won't completely remove the type. It can still be accessed or retrieved using methods like {@link retrieve} if you pass the `withDeleted` property to the `config` object parameter.
|
778
778
|
*
|
@@ -789,12 +789,12 @@ export interface IProductModuleService extends IModuleService {
|
|
789
789
|
* If there are no related records, the promise resolved to `void`.
|
790
790
|
*
|
791
791
|
* @example
|
792
|
-
* await productModuleService.
|
792
|
+
* await productModuleService.softDeleteProductTypes([
|
793
793
|
* "ptyp_123",
|
794
794
|
* "ptyp_321",
|
795
795
|
* ])
|
796
796
|
*/
|
797
|
-
|
797
|
+
softDeleteProductTypes<TReturnableLinkableKeys extends string = string>(typeIds: string[], config?: SoftDeleteReturn<TReturnableLinkableKeys>, sharedContext?: Context): Promise<Record<string, string[]> | void>;
|
798
798
|
/**
|
799
799
|
* This method is used to restore types which were deleted using the {@link softDelete} method.
|
800
800
|
*
|
@@ -809,12 +809,12 @@ export interface IProductModuleService extends IModuleService {
|
|
809
809
|
* If there are no related records that were restored, the promise resolved to `void`.
|
810
810
|
*
|
811
811
|
* @example
|
812
|
-
* await productModuleService.
|
812
|
+
* await productModuleService.restoreProductTypes([
|
813
813
|
* "ptyp_123",
|
814
814
|
* "ptyp_321",
|
815
815
|
* ])
|
816
816
|
*/
|
817
|
-
|
817
|
+
restoreProductTypes<TReturnableLinkableKeys extends string = string>(typeIds: string[], config?: RestoreReturn<TReturnableLinkableKeys>, sharedContext?: Context): Promise<Record<string, string[]> | void>;
|
818
818
|
/**
|
819
819
|
* This method is used to retrieve a product option by its ID.
|
820
820
|
*
|
@@ -830,13 +830,13 @@ export interface IProductModuleService extends IModuleService {
|
|
830
830
|
*
|
831
831
|
* ```ts
|
832
832
|
* const option =
|
833
|
-
* await productModuleService.
|
833
|
+
* await productModuleService.retrieveProductOption("opt_123")
|
834
834
|
* ```
|
835
835
|
*
|
836
836
|
* To specify relations that should be retrieved:
|
837
837
|
*
|
838
838
|
* ```ts
|
839
|
-
* const option = await productModuleService.
|
839
|
+
* const option = await productModuleService.retrieveProductOption(
|
840
840
|
* "opt_123",
|
841
841
|
* {
|
842
842
|
* relations: ["product"],
|
@@ -844,7 +844,7 @@ export interface IProductModuleService extends IModuleService {
|
|
844
844
|
* )
|
845
845
|
* ```
|
846
846
|
*/
|
847
|
-
|
847
|
+
retrieveProductOption(optionId: string, config?: FindConfig<ProductOptionDTO>, sharedContext?: Context): Promise<ProductOptionDTO>;
|
848
848
|
/**
|
849
849
|
* This method is used to retrieve a paginated list of product options based on optional filters and configuration.
|
850
850
|
*
|
@@ -859,7 +859,7 @@ export interface IProductModuleService extends IModuleService {
|
|
859
859
|
* To retrieve a list of product options using their IDs:
|
860
860
|
*
|
861
861
|
* ```ts
|
862
|
-
* const options = await productModuleService.
|
862
|
+
* const options = await productModuleService.listProductOptions({
|
863
863
|
id: ["opt_123", "opt_321"],
|
864
864
|
* })
|
865
865
|
* ```
|
@@ -867,7 +867,7 @@ export interface IProductModuleService extends IModuleService {
|
|
867
867
|
* To specify relations that should be retrieved within the product options:
|
868
868
|
*
|
869
869
|
* ```ts
|
870
|
-
* const options = await productModuleService.
|
870
|
+
* const options = await productModuleService.listProductOptions(
|
871
871
|
* {
|
872
872
|
* id: ["opt_123", "opt_321"],
|
873
873
|
* },
|
@@ -880,7 +880,7 @@ export interface IProductModuleService extends IModuleService {
|
|
880
880
|
* By default, only the first `15` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
|
881
881
|
*
|
882
882
|
* ```ts
|
883
|
-
* const options = await productModuleService.
|
883
|
+
* const options = await productModuleService.listProductOptions(
|
884
884
|
* {
|
885
885
|
* id: ["opt_123", "opt_321"],
|
886
886
|
* },
|
@@ -893,7 +893,7 @@ export interface IProductModuleService extends IModuleService {
|
|
893
893
|
* ```
|
894
894
|
*
|
895
895
|
*/
|
896
|
-
|
896
|
+
listProductOptions(filters?: FilterableProductOptionProps, config?: FindConfig<ProductOptionDTO>, sharedContext?: Context): Promise<ProductOptionDTO[]>;
|
897
897
|
/**
|
898
898
|
* This method is used to retrieve a paginated list of product options along with the total count of available product options satisfying the provided filters.
|
899
899
|
*
|
@@ -909,7 +909,7 @@ export interface IProductModuleService extends IModuleService {
|
|
909
909
|
*
|
910
910
|
* ```ts
|
911
911
|
* const [options, count] =
|
912
|
-
* await productModuleService.
|
912
|
+
* await productModuleService.listAndCountProductOptions({
|
913
913
|
* id: ["opt_123", "opt_321"],
|
914
914
|
* })
|
915
915
|
* ```
|
@@ -918,7 +918,7 @@ export interface IProductModuleService extends IModuleService {
|
|
918
918
|
*
|
919
919
|
* ```ts
|
920
920
|
* const [options, count] =
|
921
|
-
* await productModuleService.
|
921
|
+
* await productModuleService.listAndCountProductOptions(
|
922
922
|
* {
|
923
923
|
* id: ["opt_123", "opt_321"],
|
924
924
|
* },
|
@@ -932,7 +932,7 @@ export interface IProductModuleService extends IModuleService {
|
|
932
932
|
*
|
933
933
|
* ```ts
|
934
934
|
* const [options, count] =
|
935
|
-
* await productModuleService.
|
935
|
+
* await productModuleService.listAndCountProductOptions(
|
936
936
|
* {
|
937
937
|
* id: ["opt_123", "opt_321"],
|
938
938
|
* },
|
@@ -944,7 +944,7 @@ export interface IProductModuleService extends IModuleService {
|
|
944
944
|
* )
|
945
945
|
* ```
|
946
946
|
*/
|
947
|
-
|
947
|
+
listAndCountProductOptions(filters?: FilterableProductOptionProps, config?: FindConfig<ProductOptionDTO>, sharedContext?: Context): Promise<[ProductOptionDTO[], number]>;
|
948
948
|
/**
|
949
949
|
* This method is used to create product options.
|
950
950
|
*
|
@@ -953,7 +953,7 @@ export interface IProductModuleService extends IModuleService {
|
|
953
953
|
* @returns {Promise<ProductOptionDTO[]>} The list of created product options.
|
954
954
|
*
|
955
955
|
* @example
|
956
|
-
* const options = await productModuleService.
|
956
|
+
* const options = await productModuleService.createProductOptions([
|
957
957
|
* {
|
958
958
|
* title: "Color",
|
959
959
|
* values: ["Blue", "Green"],
|
@@ -967,7 +967,7 @@ export interface IProductModuleService extends IModuleService {
|
|
967
967
|
* ])
|
968
968
|
*
|
969
969
|
*/
|
970
|
-
|
970
|
+
createProductOptions(data: CreateProductOptionDTO[], sharedContext?: Context): Promise<ProductOptionDTO[]>;
|
971
971
|
/**
|
972
972
|
* This method is used to create a product option.
|
973
973
|
*
|
@@ -976,14 +976,14 @@ export interface IProductModuleService extends IModuleService {
|
|
976
976
|
* @returns {Promise<ProductOptionDTO>} The created product option.
|
977
977
|
*
|
978
978
|
* @example
|
979
|
-
* const option = await productModuleService.
|
979
|
+
* const option = await productModuleService.createProductOptions({
|
980
980
|
* title: "Color",
|
981
981
|
* values: ["Blue", "Green"],
|
982
982
|
* product_id: "prod_123",
|
983
983
|
* })
|
984
984
|
*
|
985
985
|
*/
|
986
|
-
|
986
|
+
createProductOptions(data: CreateProductOptionDTO, sharedContext?: Context): Promise<ProductOptionDTO>;
|
987
987
|
/**
|
988
988
|
* This method updates existing options, or creates new ones if they don't exist.
|
989
989
|
*
|
@@ -992,7 +992,7 @@ export interface IProductModuleService extends IModuleService {
|
|
992
992
|
* @returns {Promise<ProductOptionDTO[]>} The updated and created options.
|
993
993
|
*
|
994
994
|
* @example
|
995
|
-
* const options = await productModuleService.
|
995
|
+
* const options = await productModuleService.upsertProductOptions([
|
996
996
|
* {
|
997
997
|
* id: "opt_123",
|
998
998
|
* title: "Color",
|
@@ -1004,7 +1004,7 @@ export interface IProductModuleService extends IModuleService {
|
|
1004
1004
|
* },
|
1005
1005
|
* ])
|
1006
1006
|
*/
|
1007
|
-
|
1007
|
+
upsertProductOptions(data: UpsertProductOptionDTO[], sharedContext?: Context): Promise<ProductOptionDTO[]>;
|
1008
1008
|
/**
|
1009
1009
|
* This method updates an existing option, or creates a new one if it doesn't exist.
|
1010
1010
|
*
|
@@ -1013,12 +1013,12 @@ export interface IProductModuleService extends IModuleService {
|
|
1013
1013
|
* @returns {Promise<ProductOptionDTO>} The updated or created option.
|
1014
1014
|
*
|
1015
1015
|
* @example
|
1016
|
-
* const option = await productModuleService.
|
1016
|
+
* const option = await productModuleService.upsertProductOptions({
|
1017
1017
|
* id: "opt_123",
|
1018
1018
|
* title: "Color",
|
1019
1019
|
* })
|
1020
1020
|
*/
|
1021
|
-
|
1021
|
+
upsertProductOptions(data: UpsertProductOptionDTO, sharedContext?: Context): Promise<ProductOptionDTO>;
|
1022
1022
|
/**
|
1023
1023
|
* This method is used to update a option.
|
1024
1024
|
*
|
@@ -1028,14 +1028,14 @@ export interface IProductModuleService extends IModuleService {
|
|
1028
1028
|
* @returns {Promise<ProductOptionDTO>} The updated option.
|
1029
1029
|
*
|
1030
1030
|
* @example
|
1031
|
-
* const option = await productModuleService.
|
1031
|
+
* const option = await productModuleService.updateProductOptions(
|
1032
1032
|
* "opt_123",
|
1033
1033
|
* {
|
1034
1034
|
* title: "Color",
|
1035
1035
|
* }
|
1036
1036
|
* )
|
1037
1037
|
*/
|
1038
|
-
|
1038
|
+
updateProductOptions(id: string, data: UpdateProductOptionDTO, sharedContext?: Context): Promise<ProductOptionDTO>;
|
1039
1039
|
/**
|
1040
1040
|
* This method is used to update a list of options matching the specified filters.
|
1041
1041
|
*
|
@@ -1045,7 +1045,7 @@ export interface IProductModuleService extends IModuleService {
|
|
1045
1045
|
* @returns {Promise<ProductOptionDTO[]>} The updated options.
|
1046
1046
|
*
|
1047
1047
|
* @example
|
1048
|
-
* const options = await productModuleService.
|
1048
|
+
* const options = await productModuleService.updateProductOptions(
|
1049
1049
|
* {
|
1050
1050
|
* title: "Color",
|
1051
1051
|
* },
|
@@ -1054,7 +1054,7 @@ export interface IProductModuleService extends IModuleService {
|
|
1054
1054
|
* }
|
1055
1055
|
* )
|
1056
1056
|
*/
|
1057
|
-
|
1057
|
+
updateProductOptions(selector: FilterableProductOptionProps, data: UpdateProductOptionDTO, sharedContext?: Context): Promise<ProductOptionDTO[]>;
|
1058
1058
|
/**
|
1059
1059
|
* This method is used to delete a product option.
|
1060
1060
|
*
|
@@ -1063,12 +1063,12 @@ export interface IProductModuleService extends IModuleService {
|
|
1063
1063
|
* @returns {Promise<void>} Resolves when the product options are successfully deleted.
|
1064
1064
|
*
|
1065
1065
|
* @example
|
1066
|
-
* await productModuleService.
|
1066
|
+
* await productModuleService.deleteProductOptions([
|
1067
1067
|
* "opt_123",
|
1068
1068
|
* "opt_321",
|
1069
1069
|
* ])
|
1070
1070
|
*/
|
1071
|
-
|
1071
|
+
deleteProductOptions(productOptionIds: string[], sharedContext?: Context): Promise<void>;
|
1072
1072
|
/**
|
1073
1073
|
* This method is used to delete options. Unlike the {@link delete} method, this method won't completely remove the option. It can still be accessed or retrieved using methods like {@link retrieve} if you pass the `withDeleted` property to the `config` object parameter.
|
1074
1074
|
*
|
@@ -1085,12 +1085,12 @@ export interface IProductModuleService extends IModuleService {
|
|
1085
1085
|
* If there are no related records, the promise resolved to `void`.
|
1086
1086
|
*
|
1087
1087
|
* @example
|
1088
|
-
* await productModuleService.
|
1088
|
+
* await productModuleService.softDeleteProductOptions([
|
1089
1089
|
* "opt_123",
|
1090
1090
|
* "opt_321",
|
1091
1091
|
* ])
|
1092
1092
|
*/
|
1093
|
-
|
1093
|
+
softDeleteProductOptions<TReturnableLinkableKeys extends string = string>(optionIds: string[], config?: SoftDeleteReturn<TReturnableLinkableKeys>, sharedContext?: Context): Promise<Record<string, string[]> | void>;
|
1094
1094
|
/**
|
1095
1095
|
* This method is used to restore options which were deleted using the {@link softDelete} method.
|
1096
1096
|
*
|
@@ -1105,12 +1105,12 @@ export interface IProductModuleService extends IModuleService {
|
|
1105
1105
|
* If there are no related records that were restored, the promise resolved to `void`.
|
1106
1106
|
*
|
1107
1107
|
* @example
|
1108
|
-
* await productModuleService.
|
1108
|
+
* await productModuleService.restoreProductOptions([
|
1109
1109
|
* "opt_123",
|
1110
1110
|
* "opt_321",
|
1111
1111
|
* ])
|
1112
1112
|
*/
|
1113
|
-
|
1113
|
+
restoreProductOptions<TReturnableLinkableKeys extends string = string>(optionIds: string[], config?: RestoreReturn<TReturnableLinkableKeys>, sharedContext?: Context): Promise<Record<string, string[]> | void>;
|
1114
1114
|
/**
|
1115
1115
|
* This method is used to retrieve a product variant by its ID.
|
1116
1116
|
*
|
@@ -1126,13 +1126,13 @@ export interface IProductModuleService extends IModuleService {
|
|
1126
1126
|
*
|
1127
1127
|
* ```ts
|
1128
1128
|
* const variant =
|
1129
|
-
* await productModuleService.
|
1129
|
+
* await productModuleService.retrieveProductVariant("variant_123")
|
1130
1130
|
* ```
|
1131
1131
|
*
|
1132
1132
|
* To specify relations that should be retrieved:
|
1133
1133
|
*
|
1134
1134
|
* ```ts
|
1135
|
-
* const variant = await productModuleService.
|
1135
|
+
* const variant = await productModuleService.retrieveProductVariant(
|
1136
1136
|
* "variant_123",
|
1137
1137
|
* {
|
1138
1138
|
* relations: ["options"],
|
@@ -1140,7 +1140,7 @@ export interface IProductModuleService extends IModuleService {
|
|
1140
1140
|
* )
|
1141
1141
|
* ```
|
1142
1142
|
*/
|
1143
|
-
|
1143
|
+
retrieveProductVariant(productVariantId: string, config?: FindConfig<ProductVariantDTO>, sharedContext?: Context): Promise<ProductVariantDTO>;
|
1144
1144
|
/**
|
1145
1145
|
* This method is used to retrieve a paginated list of product variants based on optional filters and configuration.
|
1146
1146
|
*
|
@@ -1155,7 +1155,7 @@ export interface IProductModuleService extends IModuleService {
|
|
1155
1155
|
* To retrieve a list of product variants using their IDs:
|
1156
1156
|
*
|
1157
1157
|
* ```ts
|
1158
|
-
* const variants = await productModuleService.
|
1158
|
+
* const variants = await productModuleService.listProductVariants({
|
1159
1159
|
* id: ["variant_123", "variant_321"],
|
1160
1160
|
* })
|
1161
1161
|
* ```
|
@@ -1163,7 +1163,7 @@ export interface IProductModuleService extends IModuleService {
|
|
1163
1163
|
* To specify relations that should be retrieved within the product variants:
|
1164
1164
|
*
|
1165
1165
|
* ```ts
|
1166
|
-
* const variants = await productModuleService.
|
1166
|
+
* const variants = await productModuleService.listProductVariants(
|
1167
1167
|
* {
|
1168
1168
|
* id: ["variant_123", "variant_321"],
|
1169
1169
|
* },
|
@@ -1176,7 +1176,7 @@ export interface IProductModuleService extends IModuleService {
|
|
1176
1176
|
* By default, only the first `15` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
|
1177
1177
|
*
|
1178
1178
|
* ```ts
|
1179
|
-
* const variants = await productModuleService.
|
1179
|
+
* const variants = await productModuleService.listProductVariants(
|
1180
1180
|
* {
|
1181
1181
|
* id: ["variant_123", "variant_321"],
|
1182
1182
|
* },
|
@@ -1188,7 +1188,7 @@ export interface IProductModuleService extends IModuleService {
|
|
1188
1188
|
* )
|
1189
1189
|
* ```
|
1190
1190
|
*/
|
1191
|
-
|
1191
|
+
listProductVariants(filters?: FilterableProductVariantProps, config?: FindConfig<ProductVariantDTO>, sharedContext?: Context): Promise<ProductVariantDTO[]>;
|
1192
1192
|
/**
|
1193
1193
|
* This method is used to retrieve a paginated list of product variants along with the total count of available product variants satisfying the provided filters.
|
1194
1194
|
*
|
@@ -1204,7 +1204,7 @@ export interface IProductModuleService extends IModuleService {
|
|
1204
1204
|
*
|
1205
1205
|
* ```ts
|
1206
1206
|
* const [variants, count] =
|
1207
|
-
* await productModuleService.
|
1207
|
+
* await productModuleService.listAndCountProductVariants({
|
1208
1208
|
* id: ["variant_123", "variant_321"],
|
1209
1209
|
* })
|
1210
1210
|
* ```
|
@@ -1213,7 +1213,7 @@ export interface IProductModuleService extends IModuleService {
|
|
1213
1213
|
*
|
1214
1214
|
* ```ts
|
1215
1215
|
* const [variants, count] =
|
1216
|
-
* await productModuleService.
|
1216
|
+
* await productModuleService.listAndCountProductVariants(
|
1217
1217
|
* {
|
1218
1218
|
* id: ["variant_123", "variant_321"],
|
1219
1219
|
* },
|
@@ -1227,7 +1227,7 @@ export interface IProductModuleService extends IModuleService {
|
|
1227
1227
|
*
|
1228
1228
|
* ```ts
|
1229
1229
|
* const [variants, count] =
|
1230
|
-
* await productModuleService.
|
1230
|
+
* await productModuleService.listAndCountProductVariants(
|
1231
1231
|
* {
|
1232
1232
|
* id: ["variant_123", "variant_321"],
|
1233
1233
|
* },
|
@@ -1239,7 +1239,7 @@ export interface IProductModuleService extends IModuleService {
|
|
1239
1239
|
* )
|
1240
1240
|
* ```
|
1241
1241
|
*/
|
1242
|
-
|
1242
|
+
listAndCountProductVariants(filters?: FilterableProductVariantProps, config?: FindConfig<ProductVariantDTO>, sharedContext?: Context): Promise<[ProductVariantDTO[], number]>;
|
1243
1243
|
/**
|
1244
1244
|
* This method is used to create product variants.
|
1245
1245
|
*
|
@@ -1248,7 +1248,7 @@ export interface IProductModuleService extends IModuleService {
|
|
1248
1248
|
* @returns {Promise<ProductVariantDTO[]>} The list of created product variants.
|
1249
1249
|
*
|
1250
1250
|
* @example
|
1251
|
-
* const variants = await productModuleService.
|
1251
|
+
* const variants = await productModuleService.createProductVariants([
|
1252
1252
|
* {
|
1253
1253
|
* title: "Blue Shirt",
|
1254
1254
|
* product_id: "prod_123",
|
@@ -1266,7 +1266,7 @@ export interface IProductModuleService extends IModuleService {
|
|
1266
1266
|
* ])
|
1267
1267
|
*
|
1268
1268
|
*/
|
1269
|
-
|
1269
|
+
createProductVariants(data: CreateProductVariantDTO[], sharedContext?: Context): Promise<ProductVariantDTO[]>;
|
1270
1270
|
/**
|
1271
1271
|
* This method is used to create a product variant.
|
1272
1272
|
*
|
@@ -1275,7 +1275,7 @@ export interface IProductModuleService extends IModuleService {
|
|
1275
1275
|
* @returns {Promise<ProductVariantDTO>} The created product variant.
|
1276
1276
|
*
|
1277
1277
|
* @example
|
1278
|
-
* const variant = await productModuleService.
|
1278
|
+
* const variant = await productModuleService.createProductVariants({
|
1279
1279
|
* title: "Blue Shirt",
|
1280
1280
|
* product_id: "prod_123",
|
1281
1281
|
* options: {
|
@@ -1284,7 +1284,7 @@ export interface IProductModuleService extends IModuleService {
|
|
1284
1284
|
* })
|
1285
1285
|
*
|
1286
1286
|
*/
|
1287
|
-
|
1287
|
+
createProductVariants(data: CreateProductVariantDTO, sharedContext?: Context): Promise<ProductVariantDTO>;
|
1288
1288
|
/**
|
1289
1289
|
* This method updates existing variants, or creates new ones if they don't exist.
|
1290
1290
|
*
|
@@ -1293,7 +1293,7 @@ export interface IProductModuleService extends IModuleService {
|
|
1293
1293
|
* @returns {Promise<ProductVariantDTO[]>} The updated and created variants.
|
1294
1294
|
*
|
1295
1295
|
* @example
|
1296
|
-
* const variants = await productModuleService.
|
1296
|
+
* const variants = await productModuleService.upsertProductVariants([
|
1297
1297
|
* {
|
1298
1298
|
* id: "variant_123",
|
1299
1299
|
* title: "Green Shirt",
|
@@ -1306,7 +1306,7 @@ export interface IProductModuleService extends IModuleService {
|
|
1306
1306
|
* },
|
1307
1307
|
* ])
|
1308
1308
|
*/
|
1309
|
-
|
1309
|
+
upsertProductVariants(data: UpsertProductVariantDTO[], sharedContext?: Context): Promise<ProductVariantDTO[]>;
|
1310
1310
|
/**
|
1311
1311
|
* This method updates an existing variant, or creates a new one if it doesn't exist.
|
1312
1312
|
*
|
@@ -1315,12 +1315,12 @@ export interface IProductModuleService extends IModuleService {
|
|
1315
1315
|
* @returns {Promise<ProductVariantDTO>} The updated or created variant.
|
1316
1316
|
*
|
1317
1317
|
* @example
|
1318
|
-
* const variant = await productModuleService.
|
1318
|
+
* const variant = await productModuleService.upsertProductVariants({
|
1319
1319
|
* id: "variant_123",
|
1320
1320
|
* title: "Green Shirt",
|
1321
1321
|
* })
|
1322
1322
|
*/
|
1323
|
-
|
1323
|
+
upsertProductVariants(data: UpsertProductVariantDTO, sharedContext?: Context): Promise<ProductVariantDTO>;
|
1324
1324
|
/**
|
1325
1325
|
* This method is used to update a variant.
|
1326
1326
|
*
|
@@ -1330,14 +1330,14 @@ export interface IProductModuleService extends IModuleService {
|
|
1330
1330
|
* @returns {Promise<ProductVariantDTO>} The updated variant.
|
1331
1331
|
*
|
1332
1332
|
* @example
|
1333
|
-
* const variant = await productModuleService.
|
1333
|
+
* const variant = await productModuleService.updateProductVariants(
|
1334
1334
|
* "variant_123",
|
1335
1335
|
* {
|
1336
1336
|
* title: "Blue Shirt",
|
1337
1337
|
* }
|
1338
1338
|
* )
|
1339
1339
|
*/
|
1340
|
-
|
1340
|
+
updateProductVariants(id: string, data: UpdateProductVariantDTO, sharedContext?: Context): Promise<ProductVariantDTO>;
|
1341
1341
|
/**
|
1342
1342
|
* This method is used to update a list of variants matching the specified filters.
|
1343
1343
|
*
|
@@ -1347,7 +1347,7 @@ export interface IProductModuleService extends IModuleService {
|
|
1347
1347
|
* @returns {Promise<ProductVariantDTO[]>} The updated variants.
|
1348
1348
|
*
|
1349
1349
|
* @example
|
1350
|
-
* const variants = await productModuleService.
|
1350
|
+
* const variants = await productModuleService.updateProductVariants(
|
1351
1351
|
* {
|
1352
1352
|
* id: ["variant_123", "variant_321"],
|
1353
1353
|
* },
|
@@ -1356,7 +1356,7 @@ export interface IProductModuleService extends IModuleService {
|
|
1356
1356
|
* }
|
1357
1357
|
* )
|
1358
1358
|
*/
|
1359
|
-
|
1359
|
+
updateProductVariants(selector: FilterableProductVariantProps, data: UpdateProductVariantDTO, sharedContext?: Context): Promise<ProductVariantDTO[]>;
|
1360
1360
|
/**
|
1361
1361
|
* This method is used to delete ProductVariant. This method will completely remove the ProductVariant and they can no longer be accessed or retrieved.
|
1362
1362
|
*
|
@@ -1365,12 +1365,12 @@ export interface IProductModuleService extends IModuleService {
|
|
1365
1365
|
* @returns {Promise<void>} Resolves when the ProductVariant are successfully deleted.
|
1366
1366
|
*
|
1367
1367
|
* @example
|
1368
|
-
* await productModuleService.
|
1368
|
+
* await productModuleService.deleteProductVariants([
|
1369
1369
|
* "variant_123",
|
1370
1370
|
* "variant_321",
|
1371
1371
|
* ])
|
1372
1372
|
*/
|
1373
|
-
|
1373
|
+
deleteProductVariants(productVariantIds: string[], sharedContext?: Context): Promise<void>;
|
1374
1374
|
/**
|
1375
1375
|
* This method is used to delete variants. Unlike the {@link delete} method, this method won't completely remove the variant. It can still be accessed or retrieved using methods like {@link retrieve} if you pass the `withDeleted` property to the `config` object parameter.
|
1376
1376
|
*
|
@@ -1387,12 +1387,12 @@ export interface IProductModuleService extends IModuleService {
|
|
1387
1387
|
* If there are no related records, the promise resolved to `void`.
|
1388
1388
|
*
|
1389
1389
|
* @example
|
1390
|
-
* await productModuleService.
|
1390
|
+
* await productModuleService.softDeleteProductVariants([
|
1391
1391
|
* "variant_123",
|
1392
1392
|
* "variant_321",
|
1393
1393
|
* ])
|
1394
1394
|
*/
|
1395
|
-
|
1395
|
+
softDeleteProductVariants<TReturnableLinkableKeys extends string = string>(variantIds: string[], config?: SoftDeleteReturn<TReturnableLinkableKeys>, sharedContext?: Context): Promise<Record<string, string[]> | void>;
|
1396
1396
|
/**
|
1397
1397
|
* This method is used to restore variants which were deleted using the {@link softDelete} method.
|
1398
1398
|
*
|
@@ -1407,12 +1407,12 @@ export interface IProductModuleService extends IModuleService {
|
|
1407
1407
|
* If there are no related records that were restored, the promise resolved to `void`.
|
1408
1408
|
*
|
1409
1409
|
* @example
|
1410
|
-
* await productModuleService.
|
1410
|
+
* await productModuleService.restoreProductVariants([
|
1411
1411
|
* "variant_123",
|
1412
1412
|
* "variant_321",
|
1413
1413
|
* ])
|
1414
1414
|
*/
|
1415
|
-
|
1415
|
+
restoreProductVariants<TReturnableLinkableKeys extends string = string>(variantIds: string[], config?: RestoreReturn<TReturnableLinkableKeys>, sharedContext?: Context): Promise<Record<string, string[]> | void>;
|
1416
1416
|
/**
|
1417
1417
|
* This method is used to retrieve a product collection by its ID.
|
1418
1418
|
*
|
@@ -1428,19 +1428,19 @@ export interface IProductModuleService extends IModuleService {
|
|
1428
1428
|
*
|
1429
1429
|
* ```ts
|
1430
1430
|
* const collection =
|
1431
|
-
* await productModuleService.
|
1431
|
+
* await productModuleService.retrieveProductCollection("pcol_123")
|
1432
1432
|
* ```
|
1433
1433
|
*
|
1434
1434
|
* To specify relations that should be retrieved:
|
1435
1435
|
*
|
1436
1436
|
* ```ts
|
1437
1437
|
* const collection =
|
1438
|
-
* await productModuleService.
|
1438
|
+
* await productModuleService.retrieveProductCollection("pcol_123", {
|
1439
1439
|
* relations: ["products"],
|
1440
1440
|
* })
|
1441
1441
|
* ```
|
1442
1442
|
*/
|
1443
|
-
|
1443
|
+
retrieveProductCollection(productCollectionId: string, config?: FindConfig<ProductCollectionDTO>, sharedContext?: Context): Promise<ProductCollectionDTO>;
|
1444
1444
|
/**
|
1445
1445
|
* This method is used to retrieve a paginated list of product collections based on optional filters and configuration.
|
1446
1446
|
*
|
@@ -1456,7 +1456,7 @@ export interface IProductModuleService extends IModuleService {
|
|
1456
1456
|
*
|
1457
1457
|
* ```ts
|
1458
1458
|
* const collections =
|
1459
|
-
* await productModuleService.
|
1459
|
+
* await productModuleService.listProductCollections({
|
1460
1460
|
* id: ["pcol_123", "pcol_321"],
|
1461
1461
|
* })
|
1462
1462
|
* ```
|
@@ -1465,7 +1465,7 @@ export interface IProductModuleService extends IModuleService {
|
|
1465
1465
|
*
|
1466
1466
|
* ```ts
|
1467
1467
|
* const collections =
|
1468
|
-
* await productModuleService.
|
1468
|
+
* await productModuleService.listProductCollections(
|
1469
1469
|
* {
|
1470
1470
|
* id: ["pcol_123", "pcol_321"],
|
1471
1471
|
* },
|
@@ -1479,7 +1479,7 @@ export interface IProductModuleService extends IModuleService {
|
|
1479
1479
|
*
|
1480
1480
|
* ```ts
|
1481
1481
|
* const collections =
|
1482
|
-
* await productModuleService.
|
1482
|
+
* await productModuleService.listProductCollections(
|
1483
1483
|
* {
|
1484
1484
|
* id: ["pcol_123", "pcol_321"],
|
1485
1485
|
* },
|
@@ -1491,7 +1491,7 @@ export interface IProductModuleService extends IModuleService {
|
|
1491
1491
|
* )
|
1492
1492
|
* ```
|
1493
1493
|
*/
|
1494
|
-
|
1494
|
+
listProductCollections(filters?: FilterableProductCollectionProps, config?: FindConfig<ProductCollectionDTO>, sharedContext?: Context): Promise<ProductCollectionDTO[]>;
|
1495
1495
|
/**
|
1496
1496
|
* This method is used to retrieve a paginated list of product collections along with the total count of available product collections satisfying the provided filters.
|
1497
1497
|
*
|
@@ -1507,7 +1507,7 @@ export interface IProductModuleService extends IModuleService {
|
|
1507
1507
|
*
|
1508
1508
|
* ```ts
|
1509
1509
|
* const [collections, count] =
|
1510
|
-
* await productModuleService.
|
1510
|
+
* await productModuleService.listAndCountProductCollections({
|
1511
1511
|
* id: ["pcol_123", "pcol_321"],
|
1512
1512
|
* })
|
1513
1513
|
* ```
|
@@ -1516,7 +1516,7 @@ export interface IProductModuleService extends IModuleService {
|
|
1516
1516
|
*
|
1517
1517
|
* ```ts
|
1518
1518
|
* const [collections, count] =
|
1519
|
-
* await productModuleService.
|
1519
|
+
* await productModuleService.listAndCountProductCollections(
|
1520
1520
|
* {
|
1521
1521
|
* id: ["pcol_123", "pcol_321"],
|
1522
1522
|
* },
|
@@ -1530,7 +1530,7 @@ export interface IProductModuleService extends IModuleService {
|
|
1530
1530
|
*
|
1531
1531
|
* ```ts
|
1532
1532
|
* const [collections, count] =
|
1533
|
-
* await productModuleService.
|
1533
|
+
* await productModuleService.listAndCountProductCollections(
|
1534
1534
|
* {
|
1535
1535
|
* id: ["pcol_123", "pcol_321"],
|
1536
1536
|
* },
|
@@ -1542,7 +1542,7 @@ export interface IProductModuleService extends IModuleService {
|
|
1542
1542
|
* )
|
1543
1543
|
* ```
|
1544
1544
|
*/
|
1545
|
-
|
1545
|
+
listAndCountProductCollections(filters?: FilterableProductCollectionProps, config?: FindConfig<ProductCollectionDTO>, sharedContext?: Context): Promise<[ProductCollectionDTO[], number]>;
|
1546
1546
|
/**
|
1547
1547
|
* This method is used to create product collections.
|
1548
1548
|
*
|
@@ -1552,7 +1552,7 @@ export interface IProductModuleService extends IModuleService {
|
|
1552
1552
|
*
|
1553
1553
|
* @example
|
1554
1554
|
* const collections =
|
1555
|
-
* await productModuleService.
|
1555
|
+
* await productModuleService.createProductCollections([
|
1556
1556
|
* {
|
1557
1557
|
* title: "Summer Collection",
|
1558
1558
|
* },
|
@@ -1562,7 +1562,7 @@ export interface IProductModuleService extends IModuleService {
|
|
1562
1562
|
* ])
|
1563
1563
|
*
|
1564
1564
|
*/
|
1565
|
-
|
1565
|
+
createProductCollections(data: CreateProductCollectionDTO[], sharedContext?: Context): Promise<ProductCollectionDTO[]>;
|
1566
1566
|
/**
|
1567
1567
|
* This method is used to create a product collection.
|
1568
1568
|
*
|
@@ -1572,12 +1572,12 @@ export interface IProductModuleService extends IModuleService {
|
|
1572
1572
|
*
|
1573
1573
|
* @example
|
1574
1574
|
* const collection =
|
1575
|
-
* await productModuleService.
|
1575
|
+
* await productModuleService.createProductCollections({
|
1576
1576
|
* title: "Summer Collection",
|
1577
1577
|
* })
|
1578
1578
|
*
|
1579
1579
|
*/
|
1580
|
-
|
1580
|
+
createProductCollections(data: CreateProductCollectionDTO, sharedContext?: Context): Promise<ProductCollectionDTO>;
|
1581
1581
|
/**
|
1582
1582
|
* This method updates existing collections, or creates new ones if they don't exist.
|
1583
1583
|
*
|
@@ -1587,7 +1587,7 @@ export interface IProductModuleService extends IModuleService {
|
|
1587
1587
|
*
|
1588
1588
|
* @example
|
1589
1589
|
* const collections =
|
1590
|
-
* await productModuleService.
|
1590
|
+
* await productModuleService.upsertProductCollections([
|
1591
1591
|
* {
|
1592
1592
|
* id: "pcol_123",
|
1593
1593
|
* title: "Winter Collection",
|
@@ -1597,7 +1597,7 @@ export interface IProductModuleService extends IModuleService {
|
|
1597
1597
|
* },
|
1598
1598
|
* ])
|
1599
1599
|
*/
|
1600
|
-
|
1600
|
+
upsertProductCollections(data: UpsertProductCollectionDTO[], sharedContext?: Context): Promise<ProductCollectionDTO[]>;
|
1601
1601
|
/**
|
1602
1602
|
* This method updates an existing collection, or creates a new one if it doesn't exist.
|
1603
1603
|
*
|
@@ -1607,12 +1607,12 @@ export interface IProductModuleService extends IModuleService {
|
|
1607
1607
|
*
|
1608
1608
|
* @example
|
1609
1609
|
* const collection =
|
1610
|
-
* await productModuleService.
|
1610
|
+
* await productModuleService.upsertProductCollections({
|
1611
1611
|
* id: "pcol_123",
|
1612
1612
|
* title: "Winter Collection",
|
1613
1613
|
* })
|
1614
1614
|
*/
|
1615
|
-
|
1615
|
+
upsertProductCollections(data: UpsertProductCollectionDTO, sharedContext?: Context): Promise<ProductCollectionDTO>;
|
1616
1616
|
/**
|
1617
1617
|
* This method is used to update a collection.
|
1618
1618
|
*
|
@@ -1623,11 +1623,11 @@ export interface IProductModuleService extends IModuleService {
|
|
1623
1623
|
*
|
1624
1624
|
* @example
|
1625
1625
|
* const collection =
|
1626
|
-
* await productModuleService.
|
1626
|
+
* await productModuleService.updateProductCollections("pcol_123", {
|
1627
1627
|
* title: "Summer Collection",
|
1628
1628
|
* })
|
1629
1629
|
*/
|
1630
|
-
|
1630
|
+
updateProductCollections(id: string, data: UpdateProductCollectionDTO, sharedContext?: Context): Promise<ProductCollectionDTO>;
|
1631
1631
|
/**
|
1632
1632
|
* This method is used to update a list of collections matching the specified filters.
|
1633
1633
|
*
|
@@ -1638,7 +1638,7 @@ export interface IProductModuleService extends IModuleService {
|
|
1638
1638
|
*
|
1639
1639
|
* @example
|
1640
1640
|
* const collections =
|
1641
|
-
* await productModuleService.
|
1641
|
+
* await productModuleService.updateProductCollections(
|
1642
1642
|
* {
|
1643
1643
|
* id: ["pcol_123", "pcol_321"],
|
1644
1644
|
* },
|
@@ -1647,7 +1647,7 @@ export interface IProductModuleService extends IModuleService {
|
|
1647
1647
|
* }
|
1648
1648
|
* )
|
1649
1649
|
*/
|
1650
|
-
|
1650
|
+
updateProductCollections(selector: FilterableProductCollectionProps, data: UpdateProductCollectionDTO, sharedContext?: Context): Promise<ProductCollectionDTO[]>;
|
1651
1651
|
/**
|
1652
1652
|
* This method is used to delete collections by their ID.
|
1653
1653
|
*
|
@@ -1656,13 +1656,13 @@ export interface IProductModuleService extends IModuleService {
|
|
1656
1656
|
* @returns {Promise<void>} Resolves when the product options are successfully deleted.
|
1657
1657
|
*
|
1658
1658
|
* @example
|
1659
|
-
* await productModuleService.
|
1659
|
+
* await productModuleService.deleteProductCollections([
|
1660
1660
|
* "pcol_123",
|
1661
1661
|
* "pcol_321",
|
1662
1662
|
* ])
|
1663
1663
|
*
|
1664
1664
|
*/
|
1665
|
-
|
1665
|
+
deleteProductCollections(productCollectionIds: string[], sharedContext?: Context): Promise<void>;
|
1666
1666
|
/**
|
1667
1667
|
* This method is used to delete product collections. Unlike the {@link deleteCollections} method, this method won't completely remove the collection. It can still be accessed or retrieved using methods like {@link retrieveCollections} if you pass the `withDeleted` property to the `config` object parameter.
|
1668
1668
|
*
|
@@ -1679,12 +1679,12 @@ export interface IProductModuleService extends IModuleService {
|
|
1679
1679
|
* If there are no related records, the promise resolved to `void`.
|
1680
1680
|
*
|
1681
1681
|
* @example
|
1682
|
-
* await productModuleService.
|
1682
|
+
* await productModuleService.softDeleteProductCollections([
|
1683
1683
|
* "pcol_123",
|
1684
1684
|
* "pcol_321",
|
1685
1685
|
* ])
|
1686
1686
|
*/
|
1687
|
-
|
1687
|
+
softDeleteProductCollections<TReturnableLinkableKeys extends string = string>(collectionIds: string[], config?: SoftDeleteReturn<TReturnableLinkableKeys>, sharedContext?: Context): Promise<Record<string, string[]> | void>;
|
1688
1688
|
/**
|
1689
1689
|
* This method is used to restore collections which were deleted using the {@link softDelete} method.
|
1690
1690
|
*
|
@@ -1699,12 +1699,12 @@ export interface IProductModuleService extends IModuleService {
|
|
1699
1699
|
* If there are no related records that were restored, the promise resolved to `void`.
|
1700
1700
|
*
|
1701
1701
|
* @example
|
1702
|
-
* await productModuleService.
|
1702
|
+
* await productModuleService.restoreProductCollections([
|
1703
1703
|
* "pcol_123",
|
1704
1704
|
* "pcol_321",
|
1705
1705
|
* ])
|
1706
1706
|
*/
|
1707
|
-
|
1707
|
+
restoreProductCollections<TReturnableLinkableKeys extends string = string>(collectionIds: string[], config?: RestoreReturn<TReturnableLinkableKeys>, sharedContext?: Context): Promise<Record<string, string[]> | void>;
|
1708
1708
|
/**
|
1709
1709
|
* This method is used to retrieve a product category by its ID.
|
1710
1710
|
*
|
@@ -1720,13 +1720,13 @@ export interface IProductModuleService extends IModuleService {
|
|
1720
1720
|
*
|
1721
1721
|
* ```ts
|
1722
1722
|
* const category =
|
1723
|
-
* await productModuleService.
|
1723
|
+
* await productModuleService.retrieveProductCategory("pcat_123")
|
1724
1724
|
* ```
|
1725
1725
|
*
|
1726
1726
|
* To specify relations that should be retrieved:
|
1727
1727
|
*
|
1728
1728
|
* ```ts
|
1729
|
-
* const category = await productModuleService.
|
1729
|
+
* const category = await productModuleService.retrieveProductCategory(
|
1730
1730
|
* "pcat_123",
|
1731
1731
|
* {
|
1732
1732
|
* relations: ["products"],
|
@@ -1734,7 +1734,7 @@ export interface IProductModuleService extends IModuleService {
|
|
1734
1734
|
* )
|
1735
1735
|
* ```
|
1736
1736
|
*/
|
1737
|
-
|
1737
|
+
retrieveProductCategory(productCategoryId: string, config?: FindConfig<ProductCategoryDTO>, sharedContext?: Context): Promise<ProductCategoryDTO>;
|
1738
1738
|
/**
|
1739
1739
|
* This method is used to retrieve a paginated list of product categories based on optional filters and configuration.
|
1740
1740
|
*
|
@@ -1749,7 +1749,7 @@ export interface IProductModuleService extends IModuleService {
|
|
1749
1749
|
* To retrieve a list of product categories using their IDs:
|
1750
1750
|
*
|
1751
1751
|
* ```ts
|
1752
|
-
* const categories = await productModuleService.
|
1752
|
+
* const categories = await productModuleService.listProductCategories({
|
1753
1753
|
* id: ["pcat_123", "pcat_321"],
|
1754
1754
|
* })
|
1755
1755
|
* ```
|
@@ -1757,7 +1757,7 @@ export interface IProductModuleService extends IModuleService {
|
|
1757
1757
|
* To specify relations that should be retrieved within the product categories:
|
1758
1758
|
*
|
1759
1759
|
* ```ts
|
1760
|
-
* const categories = await productModuleService.
|
1760
|
+
* const categories = await productModuleService.listProductCategories(
|
1761
1761
|
* {
|
1762
1762
|
* id: ["pcat_123", "pcat_321"],
|
1763
1763
|
* },
|
@@ -1770,7 +1770,7 @@ export interface IProductModuleService extends IModuleService {
|
|
1770
1770
|
* By default, only the first `15` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
|
1771
1771
|
*
|
1772
1772
|
* ```ts
|
1773
|
-
* const categories = await productModuleService.
|
1773
|
+
* const categories = await productModuleService.listProductCategories(
|
1774
1774
|
* {
|
1775
1775
|
* id: ["pcat_123", "pcat_321"],
|
1776
1776
|
* },
|
@@ -1782,7 +1782,7 @@ export interface IProductModuleService extends IModuleService {
|
|
1782
1782
|
* )
|
1783
1783
|
* ```
|
1784
1784
|
*/
|
1785
|
-
|
1785
|
+
listProductCategories(filters?: FilterableProductCategoryProps, config?: FindConfig<ProductCategoryDTO>, sharedContext?: Context): Promise<ProductCategoryDTO[]>;
|
1786
1786
|
/**
|
1787
1787
|
* This method is used to retrieve a paginated list of product categories along with the total count of available product categories satisfying the provided filters.
|
1788
1788
|
*
|
@@ -1798,7 +1798,7 @@ export interface IProductModuleService extends IModuleService {
|
|
1798
1798
|
*
|
1799
1799
|
* ```ts
|
1800
1800
|
* const [categories, count] =
|
1801
|
-
* await productModuleService.
|
1801
|
+
* await productModuleService.listAndCountProductCategories({
|
1802
1802
|
* id: ["pcat_123", "pcat_321"],
|
1803
1803
|
* })
|
1804
1804
|
* ```
|
@@ -1807,7 +1807,7 @@ export interface IProductModuleService extends IModuleService {
|
|
1807
1807
|
*
|
1808
1808
|
* ```ts
|
1809
1809
|
* const [categories, count] =
|
1810
|
-
* await productModuleService.
|
1810
|
+
* await productModuleService.listAndCountProductCategories(
|
1811
1811
|
* {
|
1812
1812
|
* id: ["pcat_123", "pcat_321"],
|
1813
1813
|
* },
|
@@ -1821,7 +1821,7 @@ export interface IProductModuleService extends IModuleService {
|
|
1821
1821
|
*
|
1822
1822
|
* ```ts
|
1823
1823
|
* const [categories, count] =
|
1824
|
-
* await productModuleService.
|
1824
|
+
* await productModuleService.listAndCountProductCategories(
|
1825
1825
|
* {
|
1826
1826
|
* id: ["pcat_123", "pcat_321"],
|
1827
1827
|
* },
|
@@ -1833,7 +1833,27 @@ export interface IProductModuleService extends IModuleService {
|
|
1833
1833
|
* )
|
1834
1834
|
* ```
|
1835
1835
|
*/
|
1836
|
-
|
1836
|
+
listAndCountProductCategories(filters?: FilterableProductCategoryProps, config?: FindConfig<ProductCategoryDTO>, sharedContext?: Context): Promise<[ProductCategoryDTO[], number]>;
|
1837
|
+
/**
|
1838
|
+
* This method is used to create product categories.
|
1839
|
+
*
|
1840
|
+
* @param {CreateProductCategoryDTO[]} data - The product categories to be created.
|
1841
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
1842
|
+
* @returns {Promise<ProductCategoryDTO[]>} The list of created product categories.
|
1843
|
+
*
|
1844
|
+
* @example
|
1845
|
+
* const categories =
|
1846
|
+
* await productModuleService.createProductCategories([
|
1847
|
+
* {
|
1848
|
+
* name: "Tools",
|
1849
|
+
* },
|
1850
|
+
* {
|
1851
|
+
* name: "Clothing",
|
1852
|
+
* },
|
1853
|
+
* ])
|
1854
|
+
*
|
1855
|
+
*/
|
1856
|
+
createProductCategories(data: CreateProductCategoryDTO[], sharedContext?: Context): Promise<ProductCategoryDTO[]>;
|
1837
1857
|
/**
|
1838
1858
|
* This method is used to create a product category.
|
1839
1859
|
*
|
@@ -1842,40 +1862,139 @@ export interface IProductModuleService extends IModuleService {
|
|
1842
1862
|
* @returns {Promise<ProductCategoryDTO>} The created product category.
|
1843
1863
|
*
|
1844
1864
|
* @example
|
1845
|
-
* const category =
|
1846
|
-
*
|
1847
|
-
*
|
1848
|
-
*
|
1865
|
+
* const category =
|
1866
|
+
* await productModuleService.createProductCategories({
|
1867
|
+
* name: "Tools",
|
1868
|
+
* })
|
1869
|
+
*
|
1870
|
+
*/
|
1871
|
+
createProductCategories(data: CreateProductCategoryDTO, sharedContext?: Context): Promise<ProductCategoryDTO>;
|
1872
|
+
/**
|
1873
|
+
* This method updates existing categories, or creates new ones if they don't exist.
|
1874
|
+
*
|
1875
|
+
* @param {UpsertProductCategoryDTO[]} data - The attributes to update or create for each category.
|
1876
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
1877
|
+
* @returns {Promise<ProductCategoryDTO[]>} The updated and created categories.
|
1878
|
+
*
|
1879
|
+
* @example
|
1880
|
+
* const categories =
|
1881
|
+
* await productModuleService.upsertProductCategories([
|
1882
|
+
* {
|
1883
|
+
* id: "pcat_123",
|
1884
|
+
* name: "Clothing",
|
1885
|
+
* },
|
1886
|
+
* {
|
1887
|
+
* name: "Tools",
|
1888
|
+
* },
|
1889
|
+
* ])
|
1890
|
+
*/
|
1891
|
+
upsertProductCategories(data: UpsertProductCategoryDTO[], sharedContext?: Context): Promise<ProductCategoryDTO[]>;
|
1892
|
+
/**
|
1893
|
+
* This method updates an existing category, or creates a new one if it doesn't exist.
|
1894
|
+
*
|
1895
|
+
* @param {UpsertProductCategoryDTO} data - The attributes to update or create for the category.
|
1896
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
1897
|
+
* @returns {Promise<ProductCategoryDTO>} The updated or created category.
|
1898
|
+
*
|
1899
|
+
* @example
|
1900
|
+
* const category =
|
1901
|
+
* await productModuleService.upsertProductCategories({
|
1902
|
+
* id: "pcat_123",
|
1903
|
+
* name: "Clothing",
|
1904
|
+
* })
|
1905
|
+
*/
|
1906
|
+
upsertProductCategories(data: UpsertProductCategoryDTO, sharedContext?: Context): Promise<ProductCategoryDTO>;
|
1907
|
+
/**
|
1908
|
+
* This method is used to update a category.
|
1909
|
+
*
|
1910
|
+
* @param {string} id - The ID of the category to be updated.
|
1911
|
+
* @param {UpdateProductCategoryDTO} data - The attributes of the category to be updated
|
1912
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
1913
|
+
* @returns {Promise<ProductCategoryDTO>} The updated category.
|
1914
|
+
*
|
1915
|
+
* @example
|
1916
|
+
* const category =
|
1917
|
+
* await productModuleService.updateProductCategories("pcat_123", {
|
1918
|
+
* title: "Tools",
|
1919
|
+
* })
|
1920
|
+
*/
|
1921
|
+
updateProductCategories(id: string, data: UpdateProductCategoryDTO, sharedContext?: Context): Promise<ProductCategoryDTO>;
|
1922
|
+
/**
|
1923
|
+
* This method is used to update a list of categories matching the specified filters.
|
1849
1924
|
*
|
1925
|
+
* @param {FilterableProductCategoryProps} selector - The filters specifying which categories to update.
|
1926
|
+
* @param {UpdateProductCategoryDTO} data - The attributes to be updated on the selected categories
|
1927
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
1928
|
+
* @returns {Promise<ProductCategoryDTO[]>} The updated categories.
|
1929
|
+
*
|
1930
|
+
* @example
|
1931
|
+
* const categories =
|
1932
|
+
* await productModuleService.updateProductCategories(
|
1933
|
+
* {
|
1934
|
+
* id: ["pcat_123", "pcat_321"],
|
1935
|
+
* },
|
1936
|
+
* {
|
1937
|
+
* title: "Tools",
|
1938
|
+
* }
|
1939
|
+
* )
|
1850
1940
|
*/
|
1851
|
-
|
1941
|
+
updateProductCategories(selector: FilterableProductCategoryProps, data: UpdateProductCategoryDTO, sharedContext?: Context): Promise<ProductCategoryDTO[]>;
|
1852
1942
|
/**
|
1853
|
-
* This method is used to
|
1943
|
+
* This method is used to delete categories by their ID.
|
1854
1944
|
*
|
1855
|
-
* @param {string}
|
1856
|
-
* @param {UpdateProductCategoryDTO} data - The attributes to update in th product category.
|
1945
|
+
* @param {string[]} productCategoryIds - The IDs of the product categories to be updated.
|
1857
1946
|
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
1858
|
-
* @returns {Promise<
|
1947
|
+
* @returns {Promise<void>} Resolves when the product options are successfully deleted.
|
1859
1948
|
*
|
1860
1949
|
* @example
|
1861
|
-
*
|
1950
|
+
* await productModuleService.deleteProductCategories([
|
1862
1951
|
* "pcat_123",
|
1863
|
-
*
|
1864
|
-
*
|
1865
|
-
*
|
1866
|
-
* )
|
1952
|
+
* "pcat_321",
|
1953
|
+
* ])
|
1954
|
+
*
|
1867
1955
|
*/
|
1868
|
-
|
1956
|
+
deleteProductCategories(productCategoryIds: string[], sharedContext?: Context): Promise<void>;
|
1869
1957
|
/**
|
1870
|
-
* This method is used to delete
|
1958
|
+
* This method is used to delete product categories. Unlike the {@link deleteCategories} method, this method won't completely remove the category. It can still be accessed or retrieved using methods like {@link retrieveCategories} if you pass the `withDeleted` property to the `config` object parameter.
|
1871
1959
|
*
|
1872
|
-
*
|
1960
|
+
* The soft-deleted categories can be restored using the {@link restoreCategories} method.
|
1961
|
+
*
|
1962
|
+
* @param {string[]} categoryIds - The IDs of the categories to soft-delete.
|
1963
|
+
* @param {SoftDeleteReturn<TReturnableLinkableKeys>} config -
|
1964
|
+
* Configurations determining which relations to soft delete along with the each of the categories. You can pass to its `returnLinkableKeys`
|
1965
|
+
* property any of the category's relation attribute names.
|
1966
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
1967
|
+
* @returns {Promise<Record<string, string[]> | void>}
|
1968
|
+
* An object that includes the IDs of related records that were also soft deleted. The object's keys are the ID attribute names of the category entity's relations.
|
1969
|
+
*
|
1970
|
+
* If there are no related records, the promise resolved to `void`.
|
1971
|
+
*
|
1972
|
+
* @example
|
1973
|
+
* await productModuleService.softDeleteProductCategories([
|
1974
|
+
* "pcat_123",
|
1975
|
+
* "pcat_321",
|
1976
|
+
* ])
|
1977
|
+
*/
|
1978
|
+
softDeleteProductCategories<TReturnableLinkableKeys extends string = string>(categoryIds: string[], config?: SoftDeleteReturn<TReturnableLinkableKeys>, sharedContext?: Context): Promise<Record<string, string[]> | void>;
|
1979
|
+
/**
|
1980
|
+
* This method is used to restore categories which were deleted using the {@link softDelete} method.
|
1981
|
+
*
|
1982
|
+
* @param {string[]} categoryIds - The IDs of the categories to restore.
|
1983
|
+
* @param {RestoreReturn<TReturnableLinkableKeys>} config -
|
1984
|
+
* Configurations determining which relations to restore along with each of the categories. You can pass to its `returnLinkableKeys`
|
1985
|
+
* property any of the category's relation attribute names.
|
1873
1986
|
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
1874
|
-
* @returns {Promise<void>}
|
1987
|
+
* @returns {Promise<Record<string, string[]> | void>}
|
1988
|
+
* An object that includes the IDs of related records that were restored. The object's keys are the ID attribute names of the product entity's relations.
|
1989
|
+
*
|
1990
|
+
* If there are no related records that were restored, the promise resolved to `void`.
|
1875
1991
|
*
|
1876
1992
|
* @example
|
1877
|
-
* await productModuleService.
|
1993
|
+
* await productModuleService.restoreProductCategories([
|
1994
|
+
* "pcat_123",
|
1995
|
+
* "pcat_321",
|
1996
|
+
* ])
|
1878
1997
|
*/
|
1879
|
-
|
1998
|
+
restoreProductCategories<TReturnableLinkableKeys extends string = string>(categoryIds: string[], config?: RestoreReturn<TReturnableLinkableKeys>, sharedContext?: Context): Promise<Record<string, string[]> | void>;
|
1880
1999
|
}
|
1881
2000
|
//# sourceMappingURL=service.d.ts.map
|