@edgebound/bigcommerce 0.3.1 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +473 -0
- package/dist/bigcommerce-entities/addresses/index.d.ts +2 -0
- package/dist/bigcommerce-entities/addresses/index.d.ts.map +1 -0
- package/dist/bigcommerce-entities/addresses/index.js +18 -0
- package/dist/bigcommerce-entities/addresses/index.js.map +1 -0
- package/dist/{addresses.d.mts → bigcommerce-entities/addresses/schemas/address.schema.d.ts} +2 -9
- package/dist/bigcommerce-entities/addresses/schemas/address.schema.d.ts.map +1 -0
- package/dist/bigcommerce-entities/addresses/schemas/address.schema.js +54 -0
- package/dist/bigcommerce-entities/addresses/schemas/address.schema.js.map +1 -0
- package/dist/bigcommerce-entities/addresses/schemas/form-field.schema.d.ts +6 -0
- package/dist/bigcommerce-entities/addresses/schemas/form-field.schema.d.ts.map +1 -0
- package/dist/bigcommerce-entities/addresses/schemas/form-field.schema.js +42 -0
- package/dist/bigcommerce-entities/addresses/schemas/form-field.schema.js.map +1 -0
- package/dist/bigcommerce-entities/addresses/schemas/index.d.ts +3 -0
- package/dist/bigcommerce-entities/addresses/schemas/index.d.ts.map +1 -0
- package/dist/bigcommerce-entities/addresses/schemas/index.js +19 -0
- package/dist/bigcommerce-entities/addresses/schemas/index.js.map +1 -0
- package/dist/bigcommerce-entities/companies/companies.service.d.ts +309 -0
- package/dist/bigcommerce-entities/companies/companies.service.d.ts.map +1 -0
- package/dist/bigcommerce-entities/companies/companies.service.js +331 -0
- package/dist/bigcommerce-entities/companies/companies.service.js.map +1 -0
- package/dist/bigcommerce-entities/companies/index.d.ts +3 -0
- package/dist/bigcommerce-entities/companies/index.d.ts.map +1 -0
- package/dist/bigcommerce-entities/companies/index.js +19 -0
- package/dist/bigcommerce-entities/companies/index.js.map +1 -0
- package/dist/bigcommerce-entities/companies/schemas/company.schema.d.ts +63 -0
- package/dist/bigcommerce-entities/companies/schemas/company.schema.d.ts.map +1 -0
- package/dist/bigcommerce-entities/companies/schemas/company.schema.js +101 -0
- package/dist/bigcommerce-entities/companies/schemas/company.schema.js.map +1 -0
- package/dist/bigcommerce-entities/companies/schemas/credit.schemas.d.ts +15 -0
- package/dist/bigcommerce-entities/companies/schemas/credit.schemas.d.ts.map +1 -0
- package/dist/bigcommerce-entities/companies/schemas/credit.schemas.js +49 -0
- package/dist/bigcommerce-entities/companies/schemas/credit.schemas.js.map +1 -0
- package/dist/bigcommerce-entities/companies/schemas/extra-fields.schema.d.ts +28 -0
- package/dist/bigcommerce-entities/companies/schemas/extra-fields.schema.d.ts.map +1 -0
- package/dist/bigcommerce-entities/companies/schemas/extra-fields.schema.js +60 -0
- package/dist/bigcommerce-entities/companies/schemas/extra-fields.schema.js.map +1 -0
- package/dist/bigcommerce-entities/companies/schemas/index.d.ts +8 -0
- package/dist/bigcommerce-entities/companies/schemas/index.d.ts.map +1 -0
- package/dist/bigcommerce-entities/companies/schemas/index.js +24 -0
- package/dist/bigcommerce-entities/companies/schemas/index.js.map +1 -0
- package/dist/bigcommerce-entities/companies/schemas/payment-methods.schema.d.ts +12 -0
- package/dist/bigcommerce-entities/companies/schemas/payment-methods.schema.d.ts.map +1 -0
- package/dist/bigcommerce-entities/companies/schemas/payment-methods.schema.js +50 -0
- package/dist/bigcommerce-entities/companies/schemas/payment-methods.schema.js.map +1 -0
- package/dist/bigcommerce-entities/companies/schemas/roles.d.ts +28 -0
- package/dist/bigcommerce-entities/companies/schemas/roles.d.ts.map +1 -0
- package/dist/bigcommerce-entities/companies/schemas/roles.js +59 -0
- package/dist/bigcommerce-entities/companies/schemas/roles.js.map +1 -0
- package/dist/bigcommerce-entities/companies/schemas/sales-staff.schema.d.ts +15 -0
- package/dist/bigcommerce-entities/companies/schemas/sales-staff.schema.d.ts.map +1 -0
- package/dist/bigcommerce-entities/companies/schemas/sales-staff.schema.js +51 -0
- package/dist/bigcommerce-entities/companies/schemas/sales-staff.schema.js.map +1 -0
- package/dist/bigcommerce-entities/companies/schemas/user.schema.d.ts +51 -0
- package/dist/bigcommerce-entities/companies/schemas/user.schema.d.ts.map +1 -0
- package/dist/bigcommerce-entities/companies/schemas/user.schema.js +91 -0
- package/dist/bigcommerce-entities/companies/schemas/user.schema.js.map +1 -0
- package/dist/bigcommerce-entities/currencies/index.d.ts +2 -0
- package/dist/bigcommerce-entities/currencies/index.d.ts.map +1 -0
- package/dist/bigcommerce-entities/currencies/index.js +3 -0
- package/dist/bigcommerce-entities/currencies/index.js.map +1 -0
- package/dist/bigcommerce-entities/customers/customers.service.d.ts +270 -0
- package/dist/bigcommerce-entities/customers/customers.service.d.ts.map +1 -0
- package/dist/bigcommerce-entities/customers/customers.service.js +254 -0
- package/dist/bigcommerce-entities/customers/customers.service.js.map +1 -0
- package/dist/bigcommerce-entities/customers/index.d.ts +3 -0
- package/dist/bigcommerce-entities/customers/index.d.ts.map +1 -0
- package/dist/bigcommerce-entities/customers/index.js +19 -0
- package/dist/bigcommerce-entities/customers/index.js.map +1 -0
- package/dist/bigcommerce-entities/customers/schemas/customer-group.schema.d.ts +35 -0
- package/dist/bigcommerce-entities/customers/schemas/customer-group.schema.d.ts.map +1 -0
- package/dist/bigcommerce-entities/customers/schemas/customer-group.schema.js +74 -0
- package/dist/bigcommerce-entities/customers/schemas/customer-group.schema.js.map +1 -0
- package/dist/bigcommerce-entities/customers/schemas/customer.schema.d.ts +38 -0
- package/dist/bigcommerce-entities/customers/schemas/customer.schema.d.ts.map +1 -0
- package/dist/bigcommerce-entities/customers/schemas/customer.schema.js +65 -0
- package/dist/bigcommerce-entities/customers/schemas/customer.schema.js.map +1 -0
- package/dist/bigcommerce-entities/customers/schemas/find-addresses.schema.d.ts +35 -0
- package/dist/bigcommerce-entities/customers/schemas/find-addresses.schema.d.ts.map +1 -0
- package/dist/bigcommerce-entities/customers/schemas/find-addresses.schema.js +81 -0
- package/dist/bigcommerce-entities/customers/schemas/find-addresses.schema.js.map +1 -0
- package/dist/bigcommerce-entities/customers/schemas/find-customer.criteria.d.ts +9 -0
- package/dist/bigcommerce-entities/customers/schemas/find-customer.criteria.d.ts.map +1 -0
- package/dist/bigcommerce-entities/customers/schemas/find-customer.criteria.js +54 -0
- package/dist/bigcommerce-entities/customers/schemas/find-customer.criteria.js.map +1 -0
- package/dist/bigcommerce-entities/customers/schemas/index.d.ts +5 -0
- package/dist/bigcommerce-entities/customers/schemas/index.d.ts.map +1 -0
- package/dist/bigcommerce-entities/customers/schemas/index.js +21 -0
- package/dist/bigcommerce-entities/customers/schemas/index.js.map +1 -0
- package/dist/bigcommerce-entities/index.d.ts +11 -0
- package/dist/bigcommerce-entities/index.d.ts.map +1 -0
- package/dist/bigcommerce-entities/index.js +27 -0
- package/dist/bigcommerce-entities/index.js.map +1 -0
- package/dist/bigcommerce-entities/orders/index.d.ts +3 -0
- package/dist/bigcommerce-entities/orders/index.d.ts.map +1 -0
- package/dist/bigcommerce-entities/orders/index.js +19 -0
- package/dist/bigcommerce-entities/orders/index.js.map +1 -0
- package/dist/bigcommerce-entities/orders/orders.service.d.ts +470 -0
- package/dist/bigcommerce-entities/orders/orders.service.d.ts.map +1 -0
- package/dist/bigcommerce-entities/orders/orders.service.js +274 -0
- package/dist/bigcommerce-entities/orders/orders.service.js.map +1 -0
- package/dist/bigcommerce-entities/orders/schemas/find-orders.criteria.d.ts +17 -0
- package/dist/bigcommerce-entities/orders/schemas/find-orders.criteria.d.ts.map +1 -0
- package/dist/bigcommerce-entities/orders/schemas/find-orders.criteria.js +55 -0
- package/dist/bigcommerce-entities/orders/schemas/find-orders.criteria.js.map +1 -0
- package/dist/bigcommerce-entities/orders/schemas/index.d.ts +6 -0
- package/dist/bigcommerce-entities/orders/schemas/index.d.ts.map +1 -0
- package/dist/bigcommerce-entities/orders/schemas/index.js +22 -0
- package/dist/bigcommerce-entities/orders/schemas/index.js.map +1 -0
- package/dist/bigcommerce-entities/orders/schemas/order-product.schema.d.ts +31 -0
- package/dist/bigcommerce-entities/orders/schemas/order-product.schema.d.ts.map +1 -0
- package/dist/bigcommerce-entities/orders/schemas/order-product.schema.js +64 -0
- package/dist/bigcommerce-entities/orders/schemas/order-product.schema.js.map +1 -0
- package/dist/{addresses.d.ts → bigcommerce-entities/orders/schemas/order-shipping-address.schema.d.ts} +5 -9
- package/dist/bigcommerce-entities/orders/schemas/order-shipping-address.schema.d.ts.map +1 -0
- package/dist/bigcommerce-entities/orders/schemas/order-shipping-address.schema.js +44 -0
- package/dist/bigcommerce-entities/orders/schemas/order-shipping-address.schema.js.map +1 -0
- package/dist/bigcommerce-entities/orders/schemas/order.schema.d.ts +104 -0
- package/dist/bigcommerce-entities/orders/schemas/order.schema.d.ts.map +1 -0
- package/dist/bigcommerce-entities/orders/schemas/order.schema.js +109 -0
- package/dist/bigcommerce-entities/orders/schemas/order.schema.js.map +1 -0
- package/dist/{status.schema-BgztUtGy.d.mts → bigcommerce-entities/orders/schemas/status.schema.d.ts} +4 -6
- package/dist/bigcommerce-entities/orders/schemas/status.schema.d.ts.map +1 -0
- package/dist/bigcommerce-entities/orders/schemas/status.schema.js +74 -0
- package/dist/bigcommerce-entities/orders/schemas/status.schema.js.map +1 -0
- package/dist/bigcommerce-entities/payments/index.d.ts +3 -0
- package/dist/bigcommerce-entities/payments/index.d.ts.map +1 -0
- package/dist/bigcommerce-entities/payments/index.js +19 -0
- package/dist/bigcommerce-entities/payments/index.js.map +1 -0
- package/dist/bigcommerce-entities/payments/payments.service.d.ts +40 -0
- package/dist/bigcommerce-entities/payments/payments.service.d.ts.map +1 -0
- package/dist/bigcommerce-entities/payments/payments.service.js +66 -0
- package/dist/bigcommerce-entities/payments/payments.service.js.map +1 -0
- package/dist/bigcommerce-entities/payments/schemas/index.d.ts +2 -0
- package/dist/bigcommerce-entities/payments/schemas/index.d.ts.map +1 -0
- package/dist/bigcommerce-entities/payments/schemas/index.js +18 -0
- package/dist/bigcommerce-entities/payments/schemas/index.js.map +1 -0
- package/dist/bigcommerce-entities/payments/schemas/payment-methods.schema.d.ts +14 -0
- package/dist/bigcommerce-entities/payments/schemas/payment-methods.schema.d.ts.map +1 -0
- package/dist/bigcommerce-entities/payments/schemas/payment-methods.schema.js +46 -0
- package/dist/bigcommerce-entities/payments/schemas/payment-methods.schema.js.map +1 -0
- package/dist/bigcommerce-entities/price-lists/index.d.ts +3 -0
- package/dist/bigcommerce-entities/price-lists/index.d.ts.map +1 -0
- package/dist/bigcommerce-entities/price-lists/index.js +19 -0
- package/dist/bigcommerce-entities/price-lists/index.js.map +1 -0
- package/dist/bigcommerce-entities/price-lists/price-lists.service.d.ts +97 -0
- package/dist/bigcommerce-entities/price-lists/price-lists.service.d.ts.map +1 -0
- package/dist/bigcommerce-entities/price-lists/price-lists.service.js +126 -0
- package/dist/bigcommerce-entities/price-lists/price-lists.service.js.map +1 -0
- package/dist/bigcommerce-entities/price-lists/schemas/create-price-lists.schema.d.ts +11 -0
- package/dist/bigcommerce-entities/price-lists/schemas/create-price-lists.schema.d.ts.map +1 -0
- package/dist/bigcommerce-entities/price-lists/schemas/create-price-lists.schema.js +47 -0
- package/dist/bigcommerce-entities/price-lists/schemas/create-price-lists.schema.js.map +1 -0
- package/dist/bigcommerce-entities/price-lists/schemas/get-prices-lists.schema.d.ts +32 -0
- package/dist/bigcommerce-entities/price-lists/schemas/get-prices-lists.schema.d.ts.map +1 -0
- package/dist/bigcommerce-entities/price-lists/schemas/get-prices-lists.schema.js +66 -0
- package/dist/bigcommerce-entities/price-lists/schemas/get-prices-lists.schema.js.map +1 -0
- package/dist/bigcommerce-entities/price-lists/schemas/index.d.ts +3 -0
- package/dist/bigcommerce-entities/price-lists/schemas/index.d.ts.map +1 -0
- package/dist/bigcommerce-entities/price-lists/schemas/index.js +19 -0
- package/dist/bigcommerce-entities/price-lists/schemas/index.js.map +1 -0
- package/dist/bigcommerce-entities/products/index.d.ts +3 -0
- package/dist/bigcommerce-entities/products/index.d.ts.map +1 -0
- package/dist/bigcommerce-entities/products/index.js +19 -0
- package/dist/bigcommerce-entities/products/index.js.map +1 -0
- package/dist/bigcommerce-entities/products/products.service.d.ts +88 -0
- package/dist/bigcommerce-entities/products/products.service.d.ts.map +1 -0
- package/dist/bigcommerce-entities/products/products.service.js +165 -0
- package/dist/bigcommerce-entities/products/products.service.js.map +1 -0
- package/dist/bigcommerce-entities/products/schemas/index.d.ts +3 -0
- package/dist/bigcommerce-entities/products/schemas/index.d.ts.map +1 -0
- package/dist/bigcommerce-entities/products/schemas/index.js +19 -0
- package/dist/bigcommerce-entities/products/schemas/index.js.map +1 -0
- package/dist/bigcommerce-entities/products/schemas/set-inventory.schema.d.ts +26 -0
- package/dist/bigcommerce-entities/products/schemas/set-inventory.schema.d.ts.map +1 -0
- package/dist/bigcommerce-entities/products/schemas/set-inventory.schema.js +57 -0
- package/dist/bigcommerce-entities/products/schemas/set-inventory.schema.js.map +1 -0
- package/dist/bigcommerce-entities/products/schemas/update-products.schema.d.ts +11 -0
- package/dist/bigcommerce-entities/products/schemas/update-products.schema.d.ts.map +1 -0
- package/dist/bigcommerce-entities/products/schemas/update-products.schema.js +44 -0
- package/dist/bigcommerce-entities/products/schemas/update-products.schema.js.map +1 -0
- package/dist/bigcommerce-entities/sales-staff/index.d.ts +3 -0
- package/dist/bigcommerce-entities/sales-staff/index.d.ts.map +1 -0
- package/dist/bigcommerce-entities/sales-staff/index.js +19 -0
- package/dist/bigcommerce-entities/sales-staff/index.js.map +1 -0
- package/dist/bigcommerce-entities/sales-staff/sales-staff.service.d.ts +78 -0
- package/dist/bigcommerce-entities/sales-staff/sales-staff.service.d.ts.map +1 -0
- package/dist/bigcommerce-entities/sales-staff/sales-staff.service.js +102 -0
- package/dist/bigcommerce-entities/sales-staff/sales-staff.service.js.map +1 -0
- package/dist/bigcommerce-entities/sales-staff/schemas/get-sales-staff.schema.d.ts +31 -0
- package/dist/bigcommerce-entities/sales-staff/schemas/get-sales-staff.schema.d.ts.map +1 -0
- package/dist/bigcommerce-entities/sales-staff/schemas/get-sales-staff.schema.js +62 -0
- package/dist/bigcommerce-entities/sales-staff/schemas/get-sales-staff.schema.js.map +1 -0
- package/dist/bigcommerce-entities/sales-staff/schemas/index.d.ts +2 -0
- package/dist/bigcommerce-entities/sales-staff/schemas/index.d.ts.map +1 -0
- package/dist/bigcommerce-entities/sales-staff/schemas/index.js +18 -0
- package/dist/bigcommerce-entities/sales-staff/schemas/index.js.map +1 -0
- package/dist/bigcommerce-entities/webhooks/index.d.ts +2 -0
- package/dist/bigcommerce-entities/webhooks/index.d.ts.map +1 -0
- package/dist/bigcommerce-entities/webhooks/index.js +18 -0
- package/dist/bigcommerce-entities/webhooks/index.js.map +1 -0
- package/dist/bigcommerce-entities/webhooks/schemas/customer.scope.schema.d.ts +28 -0
- package/dist/bigcommerce-entities/webhooks/schemas/customer.scope.schema.d.ts.map +1 -0
- package/dist/bigcommerce-entities/webhooks/schemas/customer.scope.schema.js +64 -0
- package/dist/bigcommerce-entities/webhooks/schemas/customer.scope.schema.js.map +1 -0
- package/dist/bigcommerce-entities/webhooks/schemas/index.d.ts +4 -0
- package/dist/bigcommerce-entities/webhooks/schemas/index.d.ts.map +1 -0
- package/dist/bigcommerce-entities/webhooks/schemas/index.js +20 -0
- package/dist/bigcommerce-entities/webhooks/schemas/index.js.map +1 -0
- package/dist/bigcommerce-entities/webhooks/schemas/order.scope.schema.d.ts +26 -0
- package/dist/bigcommerce-entities/webhooks/schemas/order.scope.schema.d.ts.map +1 -0
- package/dist/bigcommerce-entities/webhooks/schemas/order.scope.schema.js +57 -0
- package/dist/bigcommerce-entities/webhooks/schemas/order.scope.schema.js.map +1 -0
- package/dist/bigcommerce-entities/webhooks/schemas/webhooks.schema.d.ts +54 -0
- package/dist/bigcommerce-entities/webhooks/schemas/webhooks.schema.d.ts.map +1 -0
- package/dist/bigcommerce-entities/webhooks/schemas/webhooks.schema.js +52 -0
- package/dist/bigcommerce-entities/webhooks/schemas/webhooks.schema.js.map +1 -0
- package/dist/bigcommerce.module.d.ts +16 -0
- package/dist/bigcommerce.module.d.ts.map +1 -0
- package/dist/bigcommerce.module.js +83 -0
- package/dist/bigcommerce.module.js.map +1 -0
- package/dist/constants.d.ts +52 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +55 -0
- package/dist/constants.js.map +1 -0
- package/dist/core/bigcommerce-fetcher.service.d.ts +40 -0
- package/dist/core/bigcommerce-fetcher.service.d.ts.map +1 -0
- package/dist/core/bigcommerce-fetcher.service.js +133 -0
- package/dist/core/bigcommerce-fetcher.service.js.map +1 -0
- package/dist/core/bigcommerce.error.d.ts +51 -0
- package/dist/core/bigcommerce.error.d.ts.map +1 -0
- package/dist/core/bigcommerce.error.js +160 -0
- package/dist/core/bigcommerce.error.js.map +1 -0
- package/dist/core/config.module.d.ts +12 -0
- package/dist/core/config.module.d.ts.map +1 -0
- package/dist/core/config.module.js +75 -0
- package/dist/core/config.module.js.map +1 -0
- package/dist/core/config.schema.d.ts +20 -0
- package/dist/core/config.schema.d.ts.map +1 -0
- package/dist/core/config.schema.js +74 -0
- package/dist/core/config.schema.js.map +1 -0
- package/dist/core/config.service.d.ts +13 -0
- package/dist/core/config.service.d.ts.map +1 -0
- package/dist/core/config.service.js +30 -0
- package/dist/core/config.service.js.map +1 -0
- package/dist/core/index.d.ts +6 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +22 -0
- package/dist/core/index.js.map +1 -0
- package/dist/index.d.ts +5 -36
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +18 -364
- package/dist/index.js.map +1 -1
- package/dist/utils/chunk.d.ts +2 -0
- package/dist/utils/chunk.d.ts.map +1 -0
- package/dist/utils/chunk.js +12 -0
- package/dist/utils/chunk.js.map +1 -0
- package/dist/utils/concurrency.d.ts +11 -0
- package/dist/utils/concurrency.d.ts.map +1 -0
- package/dist/utils/concurrency.js +20 -0
- package/dist/utils/concurrency.js.map +1 -0
- package/dist/utils/index.d.ts +5 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +10 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/validation.error.d.ts +6 -0
- package/dist/utils/validation.error.d.ts.map +1 -0
- package/dist/utils/validation.error.js +50 -0
- package/dist/utils/validation.error.js.map +1 -0
- package/dist/utils/while.d.ts +8 -0
- package/dist/utils/while.d.ts.map +1 -0
- package/dist/utils/while.js +23 -0
- package/dist/utils/while.js.map +1 -0
- package/package.json +21 -65
- package/dist/addresses.js +0 -69
- package/dist/addresses.js.map +0 -1
- package/dist/addresses.mjs +0 -9
- package/dist/addresses.mjs.map +0 -1
- package/dist/bigcommerce.fetcher-Ujztbs8P.d.mts +0 -90
- package/dist/bigcommerce.fetcher-Ujztbs8P.d.ts +0 -90
- package/dist/chunk-BWLQCNNX.mjs +0 -30
- package/dist/chunk-BWLQCNNX.mjs.map +0 -1
- package/dist/chunk-CERZFSUE.mjs +0 -20
- package/dist/chunk-CERZFSUE.mjs.map +0 -1
- package/dist/chunk-PAXNZ36X.mjs +0 -326
- package/dist/chunk-PAXNZ36X.mjs.map +0 -1
- package/dist/chunk-XONZC4AG.mjs +0 -45
- package/dist/chunk-XONZC4AG.mjs.map +0 -1
- package/dist/companies.d.mts +0 -232
- package/dist/companies.d.ts +0 -232
- package/dist/companies.js +0 -725
- package/dist/companies.js.map +0 -1
- package/dist/companies.mjs +0 -368
- package/dist/companies.mjs.map +0 -1
- package/dist/currencies.d.mts +0 -2
- package/dist/currencies.d.ts +0 -2
- package/dist/currencies.js +0 -2
- package/dist/currencies.js.map +0 -1
- package/dist/currencies.mjs +0 -1
- package/dist/currencies.mjs.map +0 -1
- package/dist/customers.d.mts +0 -157
- package/dist/customers.d.ts +0 -157
- package/dist/customers.js +0 -581
- package/dist/customers.js.map +0 -1
- package/dist/customers.mjs +0 -233
- package/dist/customers.mjs.map +0 -1
- package/dist/index.d.mts +0 -36
- package/dist/index.mjs +0 -39
- package/dist/index.mjs.map +0 -1
- package/dist/orders.d.mts +0 -492
- package/dist/orders.d.ts +0 -492
- package/dist/orders.js +0 -716
- package/dist/orders.js.map +0 -1
- package/dist/orders.mjs +0 -312
- package/dist/orders.mjs.map +0 -1
- package/dist/payments.d.mts +0 -28
- package/dist/payments.d.ts +0 -28
- package/dist/payments.js +0 -365
- package/dist/payments.js.map +0 -1
- package/dist/payments.mjs +0 -43
- package/dist/payments.mjs.map +0 -1
- package/dist/priceLists.d.mts +0 -81
- package/dist/priceLists.d.ts +0 -81
- package/dist/priceLists.js +0 -458
- package/dist/priceLists.js.map +0 -1
- package/dist/priceLists.mjs +0 -118
- package/dist/priceLists.mjs.map +0 -1
- package/dist/products.d.mts +0 -52
- package/dist/products.d.ts +0 -52
- package/dist/products.js +0 -463
- package/dist/products.js.map +0 -1
- package/dist/products.mjs +0 -120
- package/dist/products.mjs.map +0 -1
- package/dist/salesStaff.d.mts +0 -64
- package/dist/salesStaff.d.ts +0 -64
- package/dist/salesStaff.js +0 -419
- package/dist/salesStaff.js.map +0 -1
- package/dist/salesStaff.mjs +0 -82
- package/dist/salesStaff.mjs.map +0 -1
- package/dist/status.schema-BgztUtGy.d.ts +0 -39
- package/dist/validation.error-CHLpPYC_.d.mts +0 -14
- package/dist/validation.error-CHLpPYC_.d.ts +0 -14
- package/dist/webhooks.d.mts +0 -107
- package/dist/webhooks.d.ts +0 -107
- package/dist/webhooks.js +0 -155
- package/dist/webhooks.js.map +0 -1
- package/dist/webhooks.mjs +0 -77
- package/dist/webhooks.mjs.map +0 -1
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import * as z from 'zod';
|
|
2
|
+
import type { BigCommerceFetcherService } from '../../core';
|
|
3
|
+
import { CreatePriceListSchema, GetPriceListsCriteriaSchema } from './schemas';
|
|
4
|
+
/**
|
|
5
|
+
* Service for managing BigCommerce price lists.
|
|
6
|
+
*
|
|
7
|
+
* Provides methods for creating and retrieving price lists.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```typescript
|
|
11
|
+
* @Injectable()
|
|
12
|
+
* export class MyService {
|
|
13
|
+
* constructor(private readonly priceListsService: BigCommercePriceListsService) {}
|
|
14
|
+
*
|
|
15
|
+
* async createList() {
|
|
16
|
+
* const result = await this.priceListsService.createPriceList({
|
|
17
|
+
* name: 'Wholesale Prices',
|
|
18
|
+
* active: true
|
|
19
|
+
* });
|
|
20
|
+
* }
|
|
21
|
+
* }
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
export declare class BigCommercePriceListsService {
|
|
25
|
+
private readonly fetcher;
|
|
26
|
+
constructor(fetcher: BigCommerceFetcherService);
|
|
27
|
+
/**
|
|
28
|
+
* Creates a new price list.
|
|
29
|
+
*
|
|
30
|
+
* @param data - Price list details including name and active status
|
|
31
|
+
* @returns ResultAsync with the created price list
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```typescript
|
|
35
|
+
* const result = await priceListsService.createPriceList({
|
|
36
|
+
* name: 'Wholesale Prices',
|
|
37
|
+
* active: true
|
|
38
|
+
* });
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
createPriceList(data: z.input<typeof CreatePriceListSchema>): import("neverthrow").ResultAsync<{
|
|
42
|
+
data: {
|
|
43
|
+
id: number;
|
|
44
|
+
};
|
|
45
|
+
}, import("../../core").SomeBigCommerceError | import("../../utils/validation.error").InputDataValidationError>;
|
|
46
|
+
/**
|
|
47
|
+
* Finds price lists with pagination.
|
|
48
|
+
*
|
|
49
|
+
* @param criteria - Search criteria including pagination
|
|
50
|
+
* @returns ResultAsync with paginated price lists
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* ```typescript
|
|
54
|
+
* const result = await priceListsService.findPriceLists({
|
|
55
|
+
* page: 1,
|
|
56
|
+
* limit: 50
|
|
57
|
+
* });
|
|
58
|
+
* ```
|
|
59
|
+
*/
|
|
60
|
+
findPriceLists(criteria?: z.input<typeof GetPriceListsCriteriaSchema>): import("neverthrow").ResultAsync<{
|
|
61
|
+
data: {
|
|
62
|
+
id: number;
|
|
63
|
+
name: string;
|
|
64
|
+
date_created: string;
|
|
65
|
+
date_modified: string;
|
|
66
|
+
active: boolean;
|
|
67
|
+
}[];
|
|
68
|
+
meta: {
|
|
69
|
+
pagination: {
|
|
70
|
+
total: number;
|
|
71
|
+
count: number;
|
|
72
|
+
per_page: number;
|
|
73
|
+
current_page: number;
|
|
74
|
+
total_pages: number;
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
}, import("../../core").SomeBigCommerceError | import("../../utils/validation.error").InputDataValidationError>;
|
|
78
|
+
/**
|
|
79
|
+
* Retrieves all price lists by automatically handling pagination.
|
|
80
|
+
*
|
|
81
|
+
* @param criteria - Optional search criteria (excluding pagination params)
|
|
82
|
+
* @returns ResultAsync with all price lists
|
|
83
|
+
*
|
|
84
|
+
* @example
|
|
85
|
+
* ```typescript
|
|
86
|
+
* const result = await priceListsService.getAllPriceListsBy();
|
|
87
|
+
* ```
|
|
88
|
+
*/
|
|
89
|
+
getAllPriceListsBy(criteria?: Omit<z.input<typeof GetPriceListsCriteriaSchema>, 'limit' | 'page'>): import("neverthrow").ResultAsync<{
|
|
90
|
+
id: number;
|
|
91
|
+
name: string;
|
|
92
|
+
date_created: string;
|
|
93
|
+
date_modified: string;
|
|
94
|
+
active: boolean;
|
|
95
|
+
}[], import("../../core").SomeBigCommerceError | import("../../utils/validation.error").InputDataValidationError>;
|
|
96
|
+
}
|
|
97
|
+
//# sourceMappingURL=price-lists.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"price-lists.service.d.ts","sourceRoot":"","sources":["../../../src/bigcommerce-entities/price-lists/price-lists.service.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAC;AAG5D,OAAO,EAEL,qBAAqB,EACrB,2BAA2B,EAE5B,MAAM,WAAW,CAAC;AAEnB;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBACa,4BAA4B;IAC3B,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,EAAE,yBAAyB;IAE/D;;;;;;;;;;;;;OAaG;IACH,eAAe,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC;;;;;IAgB3D;;;;;;;;;;;;;OAaG;IACH,cAAc,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC;;;;;;;;;;;;;;;;;;IAiBrE;;;;;;;;;;OAUG;IACH,kBAAkB,CAChB,QAAQ,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;;;;;;;CAmBjF"}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.BigCommercePriceListsService = void 0;
|
|
13
|
+
const common_1 = require("@nestjs/common");
|
|
14
|
+
const node_querystring_1 = require("node:querystring");
|
|
15
|
+
const constants_1 = require("../../constants");
|
|
16
|
+
const utils_1 = require("../../utils");
|
|
17
|
+
const while_1 = require("../../utils/while");
|
|
18
|
+
const schemas_1 = require("./schemas");
|
|
19
|
+
/**
|
|
20
|
+
* Service for managing BigCommerce price lists.
|
|
21
|
+
*
|
|
22
|
+
* Provides methods for creating and retrieving price lists.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```typescript
|
|
26
|
+
* @Injectable()
|
|
27
|
+
* export class MyService {
|
|
28
|
+
* constructor(private readonly priceListsService: BigCommercePriceListsService) {}
|
|
29
|
+
*
|
|
30
|
+
* async createList() {
|
|
31
|
+
* const result = await this.priceListsService.createPriceList({
|
|
32
|
+
* name: 'Wholesale Prices',
|
|
33
|
+
* active: true
|
|
34
|
+
* });
|
|
35
|
+
* }
|
|
36
|
+
* }
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
let BigCommercePriceListsService = class BigCommercePriceListsService {
|
|
40
|
+
fetcher;
|
|
41
|
+
constructor(fetcher) {
|
|
42
|
+
this.fetcher = fetcher;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Creates a new price list.
|
|
46
|
+
*
|
|
47
|
+
* @param data - Price list details including name and active status
|
|
48
|
+
* @returns ResultAsync with the created price list
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* ```typescript
|
|
52
|
+
* const result = await priceListsService.createPriceList({
|
|
53
|
+
* name: 'Wholesale Prices',
|
|
54
|
+
* active: true
|
|
55
|
+
* });
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
58
|
+
createPriceList(data) {
|
|
59
|
+
return (0, utils_1.validateInputData)(schemas_1.CreatePriceListSchema, data).asyncAndThen((validatedData) => this.fetcher.fetch({
|
|
60
|
+
body: validatedData,
|
|
61
|
+
isB2B: false,
|
|
62
|
+
method: 'POST',
|
|
63
|
+
path: 'pricelists',
|
|
64
|
+
resultSchema: schemas_1.CreatePriceListResponseSchema,
|
|
65
|
+
version: 'v3',
|
|
66
|
+
}, { shouldRetry: true }));
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Finds price lists with pagination.
|
|
70
|
+
*
|
|
71
|
+
* @param criteria - Search criteria including pagination
|
|
72
|
+
* @returns ResultAsync with paginated price lists
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* ```typescript
|
|
76
|
+
* const result = await priceListsService.findPriceLists({
|
|
77
|
+
* page: 1,
|
|
78
|
+
* limit: 50
|
|
79
|
+
* });
|
|
80
|
+
* ```
|
|
81
|
+
*/
|
|
82
|
+
findPriceLists(criteria) {
|
|
83
|
+
return (0, utils_1.validateInputData)(schemas_1.GetPriceListsCriteriaSchema, criteria ?? {}).asyncAndThen((validatedCriteria) => this.fetcher.fetch({
|
|
84
|
+
isB2B: false,
|
|
85
|
+
method: 'GET',
|
|
86
|
+
query: (0, node_querystring_1.stringify)(validatedCriteria),
|
|
87
|
+
path: 'pricelists',
|
|
88
|
+
resultSchema: schemas_1.GetPriceListsResponseSchema,
|
|
89
|
+
version: 'v3',
|
|
90
|
+
}, { shouldRetry: true }));
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Retrieves all price lists by automatically handling pagination.
|
|
94
|
+
*
|
|
95
|
+
* @param criteria - Optional search criteria (excluding pagination params)
|
|
96
|
+
* @returns ResultAsync with all price lists
|
|
97
|
+
*
|
|
98
|
+
* @example
|
|
99
|
+
* ```typescript
|
|
100
|
+
* const result = await priceListsService.getAllPriceListsBy();
|
|
101
|
+
* ```
|
|
102
|
+
*/
|
|
103
|
+
getAllPriceListsBy(criteria) {
|
|
104
|
+
return (0, while_1.whileLoop)({
|
|
105
|
+
initialParams: {
|
|
106
|
+
page: 1,
|
|
107
|
+
limit: constants_1.DEFAULTS.priceLists.getAllBatchSize,
|
|
108
|
+
},
|
|
109
|
+
step: (params) => this.findPriceLists({
|
|
110
|
+
...criteria,
|
|
111
|
+
...params,
|
|
112
|
+
}),
|
|
113
|
+
condition: ({ data }) => data.length > 0,
|
|
114
|
+
onStep: (_, params) => ({
|
|
115
|
+
page: params.page + 1,
|
|
116
|
+
limit: constants_1.DEFAULTS.priceLists.getAllBatchSize,
|
|
117
|
+
}),
|
|
118
|
+
}).map((results) => results.flatMap((result) => result.data));
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
exports.BigCommercePriceListsService = BigCommercePriceListsService;
|
|
122
|
+
exports.BigCommercePriceListsService = BigCommercePriceListsService = __decorate([
|
|
123
|
+
(0, common_1.Injectable)(),
|
|
124
|
+
__metadata("design:paramtypes", [Function])
|
|
125
|
+
], BigCommercePriceListsService);
|
|
126
|
+
//# sourceMappingURL=price-lists.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"price-lists.service.js","sourceRoot":"","sources":["../../../src/bigcommerce-entities/price-lists/price-lists.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,uDAA6C;AAE7C,+CAA2C;AAE3C,uCAAgD;AAChD,6CAA8C;AAC9C,uCAKmB;AAEnB;;;;;;;;;;;;;;;;;;;GAmBG;AAEI,IAAM,4BAA4B,GAAlC,MAAM,4BAA4B;IACV;IAA7B,YAA6B,OAAkC;QAAlC,YAAO,GAAP,OAAO,CAA2B;IAAG,CAAC;IAEnE;;;;;;;;;;;;;OAaG;IACH,eAAe,CAAC,IAA2C;QACzD,OAAO,IAAA,yBAAiB,EAAC,+BAAqB,EAAE,IAAI,CAAC,CAAC,YAAY,CAAC,CAAC,aAAa,EAAE,EAAE,CACnF,IAAI,CAAC,OAAO,CAAC,KAAK,CAChB;YACE,IAAI,EAAE,aAAa;YACnB,KAAK,EAAE,KAAK;YACZ,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,YAAY;YAClB,YAAY,EAAE,uCAA6B;YAC3C,OAAO,EAAE,IAAI;SACd,EACD,EAAE,WAAW,EAAE,IAAI,EAAE,CACtB,CACF,CAAC;IACJ,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,cAAc,CAAC,QAAsD;QACnE,OAAO,IAAA,yBAAiB,EAAC,qCAA2B,EAAE,QAAQ,IAAI,EAAE,CAAC,CAAC,YAAY,CAChF,CAAC,iBAAiB,EAAE,EAAE,CACpB,IAAI,CAAC,OAAO,CAAC,KAAK,CAChB;YACE,KAAK,EAAE,KAAK;YACZ,MAAM,EAAE,KAAK;YACb,KAAK,EAAE,IAAA,4BAAS,EAAC,iBAAiB,CAAC;YACnC,IAAI,EAAE,YAAY;YAClB,YAAY,EAAE,qCAA2B;YACzC,OAAO,EAAE,IAAI;SACd,EACD,EAAE,WAAW,EAAE,IAAI,EAAE,CACtB,CACJ,CAAC;IACJ,CAAC;IAED;;;;;;;;;;OAUG;IACH,kBAAkB,CAChB,QAA8E;QAE9E,OAAO,IAAA,iBAAS,EAAC;YACf,aAAa,EAAE;gBACb,IAAI,EAAE,CAAC;gBACP,KAAK,EAAE,oBAAQ,CAAC,UAAU,CAAC,eAAe;aAC3C;YACD,IAAI,EAAE,CAAC,MAAM,EAAE,EAAE,CACf,IAAI,CAAC,cAAc,CAAC;gBAClB,GAAG,QAAQ;gBACX,GAAG,MAAM;aACV,CAAC;YACJ,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC;YACxC,MAAM,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC;gBACtB,IAAI,EAAE,MAAM,CAAC,IAAI,GAAG,CAAC;gBACrB,KAAK,EAAE,oBAAQ,CAAC,UAAU,CAAC,eAAe;aAC3C,CAAC;SACH,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;IAChE,CAAC;CACF,CAAA;AA/FY,oEAA4B;uCAA5B,4BAA4B;IADxC,IAAA,mBAAU,GAAE;;GACA,4BAA4B,CA+FxC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as z from 'zod';
|
|
2
|
+
export declare const CreatePriceListSchema: z.ZodObject<{
|
|
3
|
+
name: z.ZodString;
|
|
4
|
+
active: z.ZodBoolean;
|
|
5
|
+
}, z.core.$strip>;
|
|
6
|
+
export declare const CreatePriceListResponseSchema: z.ZodObject<{
|
|
7
|
+
data: z.ZodObject<{
|
|
8
|
+
id: z.ZodInt;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
//# sourceMappingURL=create-price-lists.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-price-lists.schema.d.ts","sourceRoot":"","sources":["../../../../src/bigcommerce-entities/price-lists/schemas/create-price-lists.schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,eAAO,MAAM,qBAAqB;;;iBAGhC,CAAC;AACH,eAAO,MAAM,6BAA6B;;;;iBAIxC,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.CreatePriceListResponseSchema = exports.CreatePriceListSchema = void 0;
|
|
37
|
+
const z = __importStar(require("zod"));
|
|
38
|
+
exports.CreatePriceListSchema = z.object({
|
|
39
|
+
name: z.string(),
|
|
40
|
+
active: z.boolean(),
|
|
41
|
+
});
|
|
42
|
+
exports.CreatePriceListResponseSchema = z.object({
|
|
43
|
+
data: z.object({
|
|
44
|
+
id: z.int(),
|
|
45
|
+
}),
|
|
46
|
+
});
|
|
47
|
+
//# sourceMappingURL=create-price-lists.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-price-lists.schema.js","sourceRoot":"","sources":["../../../../src/bigcommerce-entities/price-lists/schemas/create-price-lists.schema.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACZ,QAAA,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5C,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,MAAM,EAAE,CAAC,CAAC,OAAO,EAAE;CACpB,CAAC,CAAC;AACU,QAAA,6BAA6B,GAAG,CAAC,CAAC,MAAM,CAAC;IACpD,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC;QACb,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE;KACZ,CAAC;CACH,CAAC,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as z from 'zod';
|
|
2
|
+
export declare const PriceListSchema: z.ZodObject<{
|
|
3
|
+
id: z.ZodInt;
|
|
4
|
+
name: z.ZodString;
|
|
5
|
+
date_created: z.ZodString;
|
|
6
|
+
date_modified: z.ZodString;
|
|
7
|
+
active: z.ZodBoolean;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
export declare const GetPriceListsResponseSchema: z.ZodObject<{
|
|
10
|
+
data: z.ZodArray<z.ZodObject<{
|
|
11
|
+
id: z.ZodInt;
|
|
12
|
+
name: z.ZodString;
|
|
13
|
+
date_created: z.ZodString;
|
|
14
|
+
date_modified: z.ZodString;
|
|
15
|
+
active: z.ZodBoolean;
|
|
16
|
+
}, z.core.$strip>>;
|
|
17
|
+
meta: z.ZodObject<{
|
|
18
|
+
pagination: z.ZodObject<{
|
|
19
|
+
total: z.ZodInt;
|
|
20
|
+
count: z.ZodInt;
|
|
21
|
+
per_page: z.ZodInt;
|
|
22
|
+
current_page: z.ZodInt;
|
|
23
|
+
total_pages: z.ZodInt;
|
|
24
|
+
}, z.core.$strip>;
|
|
25
|
+
}, z.core.$strip>;
|
|
26
|
+
}, z.core.$strip>;
|
|
27
|
+
export declare const GetPriceListsCriteriaSchema: z.ZodObject<{
|
|
28
|
+
page: z.ZodOptional<z.ZodInt>;
|
|
29
|
+
limit: z.ZodOptional<z.ZodInt>;
|
|
30
|
+
'id:in': z.ZodOptional<z.ZodPipe<z.ZodArray<z.ZodInt>, z.ZodTransform<string, number[]>>>;
|
|
31
|
+
}, z.core.$strip>;
|
|
32
|
+
//# sourceMappingURL=get-prices-lists.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-prices-lists.schema.d.ts","sourceRoot":"","sources":["../../../../src/bigcommerce-entities/price-lists/schemas/get-prices-lists.schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,eAAO,MAAM,eAAe;;;;;;iBAM1B,CAAC;AAEH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;iBAWtC,CAAC;AAEH,eAAO,MAAM,2BAA2B;;;;iBAQtC,CAAC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.GetPriceListsCriteriaSchema = exports.GetPriceListsResponseSchema = exports.PriceListSchema = void 0;
|
|
37
|
+
const z = __importStar(require("zod"));
|
|
38
|
+
exports.PriceListSchema = z.object({
|
|
39
|
+
id: z.int(),
|
|
40
|
+
name: z.string(),
|
|
41
|
+
date_created: z.string(),
|
|
42
|
+
date_modified: z.string(),
|
|
43
|
+
active: z.boolean(),
|
|
44
|
+
});
|
|
45
|
+
exports.GetPriceListsResponseSchema = z.object({
|
|
46
|
+
data: exports.PriceListSchema.array(),
|
|
47
|
+
meta: z.object({
|
|
48
|
+
pagination: z.object({
|
|
49
|
+
total: z.int(),
|
|
50
|
+
count: z.int(),
|
|
51
|
+
per_page: z.int(),
|
|
52
|
+
current_page: z.int(),
|
|
53
|
+
total_pages: z.int(),
|
|
54
|
+
}),
|
|
55
|
+
}),
|
|
56
|
+
});
|
|
57
|
+
exports.GetPriceListsCriteriaSchema = z.object({
|
|
58
|
+
page: z.int().optional(),
|
|
59
|
+
limit: z.int().optional(),
|
|
60
|
+
'id:in': z
|
|
61
|
+
.int()
|
|
62
|
+
.array()
|
|
63
|
+
.transform((value) => value.join(','))
|
|
64
|
+
.optional(),
|
|
65
|
+
});
|
|
66
|
+
//# sourceMappingURL=get-prices-lists.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-prices-lists.schema.js","sourceRoot":"","sources":["../../../../src/bigcommerce-entities/price-lists/schemas/get-prices-lists.schema.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACZ,QAAA,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE;IACX,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;IACxB,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE;IACzB,MAAM,EAAE,CAAC,CAAC,OAAO,EAAE;CACpB,CAAC,CAAC;AAEU,QAAA,2BAA2B,GAAG,CAAC,CAAC,MAAM,CAAC;IAClD,IAAI,EAAE,uBAAe,CAAC,KAAK,EAAE;IAC7B,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC;QACb,UAAU,EAAE,CAAC,CAAC,MAAM,CAAC;YACnB,KAAK,EAAE,CAAC,CAAC,GAAG,EAAE;YACd,KAAK,EAAE,CAAC,CAAC,GAAG,EAAE;YACd,QAAQ,EAAE,CAAC,CAAC,GAAG,EAAE;YACjB,YAAY,EAAE,CAAC,CAAC,GAAG,EAAE;YACrB,WAAW,EAAE,CAAC,CAAC,GAAG,EAAE;SACrB,CAAC;KACH,CAAC;CACH,CAAC,CAAC;AAEU,QAAA,2BAA2B,GAAG,CAAC,CAAC,MAAM,CAAC;IAClD,IAAI,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IACxB,KAAK,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IACzB,OAAO,EAAE,CAAC;SACP,GAAG,EAAE;SACL,KAAK,EAAE;SACP,SAAS,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SACrC,QAAQ,EAAE;CACd,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/bigcommerce-entities/price-lists/schemas/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./create-price-lists.schema"), exports);
|
|
18
|
+
__exportStar(require("./get-prices-lists.schema"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/bigcommerce-entities/price-lists/schemas/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8DAA4C;AAC5C,4DAA0C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/bigcommerce-entities/products/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,WAAW,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./products.service"), exports);
|
|
18
|
+
__exportStar(require("./schemas"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/bigcommerce-entities/products/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAmC;AACnC,4CAA0B"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import * as z from 'zod';
|
|
2
|
+
import type { BigCommerceFetcherService } from '../../core';
|
|
3
|
+
import { SetProductInventoryItemSchema, UpdateProductSchema, UpdateProductVisibilitySchema } from './schemas';
|
|
4
|
+
/**
|
|
5
|
+
* Service for managing BigCommerce products.
|
|
6
|
+
*
|
|
7
|
+
* Provides methods for updating product inventory and visibility in batch operations.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```typescript
|
|
11
|
+
* @Injectable()
|
|
12
|
+
* export class MyService {
|
|
13
|
+
* constructor(private readonly productsService: BigCommerceProductsService) {}
|
|
14
|
+
*
|
|
15
|
+
* async updateStock() {
|
|
16
|
+
* const result = await this.productsService.setProductsInventory('Stock adjustment', [
|
|
17
|
+
* { product_id: 1, variant_id: 10, location_id: 1, quantity: 100 }
|
|
18
|
+
* ]);
|
|
19
|
+
* }
|
|
20
|
+
* }
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export declare class BigCommerceProductsService {
|
|
24
|
+
private readonly fetcher;
|
|
25
|
+
constructor(fetcher: BigCommerceFetcherService);
|
|
26
|
+
/**
|
|
27
|
+
* Sets product inventory levels in batch with automatic concurrency control.
|
|
28
|
+
*
|
|
29
|
+
* Processes inventory updates in batches with controlled concurrency for optimal performance.
|
|
30
|
+
*
|
|
31
|
+
* @param reason - Reason for the inventory adjustment
|
|
32
|
+
* @param items - Array of inventory items to update
|
|
33
|
+
* @returns ResultAsync with success/error results for each batch
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```typescript
|
|
37
|
+
* const result = await productsService.setProductsInventory('Stock adjustment', [
|
|
38
|
+
* { product_id: 1, variant_id: 10, location_id: 1, quantity: 100 },
|
|
39
|
+
* { product_id: 2, variant_id: 20, location_id: 1, quantity: 50 }
|
|
40
|
+
* ]);
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
setProductsInventory(reason: string, items: z.input<typeof SetProductInventoryItemSchema>[]): import("neverthrow").ResultAsync<{
|
|
44
|
+
success: {
|
|
45
|
+
transaction_id: string;
|
|
46
|
+
}[];
|
|
47
|
+
errors: (import("../../core").SomeBigCommerceError | import("../../utils/validation.error").InputDataValidationError)[];
|
|
48
|
+
}, never>;
|
|
49
|
+
/**
|
|
50
|
+
* Updates multiple products in batch with automatic concurrency control.
|
|
51
|
+
*
|
|
52
|
+
* Processes product updates in batches with controlled concurrency for optimal performance.
|
|
53
|
+
*
|
|
54
|
+
* @param dtos - Array of product update objects
|
|
55
|
+
* @returns ResultAsync with success/error results for each batch
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* ```typescript
|
|
59
|
+
* const result = await productsService.updateProducts([
|
|
60
|
+
* { id: 1, name: 'Updated Product Name', price: 29.99 },
|
|
61
|
+
* { id: 2, is_visible: true }
|
|
62
|
+
* ]);
|
|
63
|
+
* ```
|
|
64
|
+
*/
|
|
65
|
+
updateProducts(dtos: z.input<typeof UpdateProductSchema>[]): import("neverthrow").ResultAsync<{
|
|
66
|
+
success: any[];
|
|
67
|
+
errors: (import("../../core").SomeBigCommerceError | import("../../utils/validation.error").InputDataValidationError)[];
|
|
68
|
+
}, never>;
|
|
69
|
+
/**
|
|
70
|
+
* Sets product visibility for multiple products in batch.
|
|
71
|
+
*
|
|
72
|
+
* @param dtos - Array of product visibility updates
|
|
73
|
+
* @returns ResultAsync with success/error results for each batch
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* ```typescript
|
|
77
|
+
* const result = await productsService.setProductVisibility([
|
|
78
|
+
* { id: 1, is_visible: true },
|
|
79
|
+
* { id: 2, is_visible: false }
|
|
80
|
+
* ]);
|
|
81
|
+
* ```
|
|
82
|
+
*/
|
|
83
|
+
setProductVisibility(dtos: z.input<typeof UpdateProductVisibilitySchema>[]): import("neverthrow").ResultAsync<{
|
|
84
|
+
success: any[];
|
|
85
|
+
errors: (import("../../core").SomeBigCommerceError | import("../../utils/validation.error").InputDataValidationError)[];
|
|
86
|
+
}, never>;
|
|
87
|
+
}
|
|
88
|
+
//# sourceMappingURL=products.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"products.service.d.ts","sourceRoot":"","sources":["../../../src/bigcommerce-entities/products/products.service.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAC;AAG5D,OAAO,EAEL,6BAA6B,EAG7B,mBAAmB,EACnB,6BAA6B,EAC9B,MAAM,WAAW,CAAC;AAEnB;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBACa,0BAA0B;IACzB,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,EAAE,yBAAyB;IAE/D;;;;;;;;;;;;;;;;OAgBG;IACH,oBAAoB,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,EAAE;;;;;;IAyB3F;;;;;;;;;;;;;;;OAeG;IACH,cAAc,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,EAAE;;;;IAsB1D;;;;;;;;;;;;;OAaG;IACH,oBAAoB,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,EAAE;;;;CAG3E"}
|