@edgebound/bigcommerce 0.3.2 → 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 -371
- 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 +23 -67
- 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-V2WZ3SDN.mjs +0 -333
- package/dist/chunk-V2WZ3SDN.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 -346
- package/dist/companies.d.ts +0 -346
- package/dist/companies.js +0 -837
- package/dist/companies.js.map +0 -1
- package/dist/companies.mjs +0 -467
- 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 -235
- package/dist/customers.d.ts +0 -235
- package/dist/customers.js +0 -679
- package/dist/customers.js.map +0 -1
- package/dist/customers.mjs +0 -320
- 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 -723
- 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 -372
- 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 -465
- 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 -470
- 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 -426
- 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 -109
- package/dist/webhooks.d.ts +0 -109
- package/dist/webhooks.js +0 -157
- package/dist/webhooks.js.map +0 -1
- package/dist/webhooks.mjs +0 -79
- package/dist/webhooks.mjs.map +0 -1
|
@@ -0,0 +1,254 @@
|
|
|
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.BigCommerceCustomersService = 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 customers, customer groups, and addresses.
|
|
21
|
+
*
|
|
22
|
+
* Provides methods for creating customer groups, finding customers and addresses,
|
|
23
|
+
* and managing customer group price lists.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```typescript
|
|
27
|
+
* @Injectable()
|
|
28
|
+
* export class MyService {
|
|
29
|
+
* constructor(private readonly customersService: BigCommerceCustomersService) {}
|
|
30
|
+
*
|
|
31
|
+
* async createGroup() {
|
|
32
|
+
* const result = await this.customersService.createCustomerGroup({
|
|
33
|
+
* name: 'VIP Customers',
|
|
34
|
+
* discount_rules: [{ type: 'price_list', price_list_id: 1 }]
|
|
35
|
+
* });
|
|
36
|
+
* }
|
|
37
|
+
* }
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
let BigCommerceCustomersService = class BigCommerceCustomersService {
|
|
41
|
+
fetcher;
|
|
42
|
+
constructor(fetcher) {
|
|
43
|
+
this.fetcher = fetcher;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Creates a new customer group.
|
|
47
|
+
*
|
|
48
|
+
* @param data - Customer group details including name and discount rules
|
|
49
|
+
* @returns ResultAsync with the created customer group
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* ```typescript
|
|
53
|
+
* const result = await customersService.createCustomerGroup({
|
|
54
|
+
* name: 'VIP Customers',
|
|
55
|
+
* discount_rules: [{ type: 'price_list', price_list_id: 1 }]
|
|
56
|
+
* });
|
|
57
|
+
* ```
|
|
58
|
+
*/
|
|
59
|
+
createCustomerGroup(data) {
|
|
60
|
+
return (0, utils_1.validateInputData)(schemas_1.CreateCustomerGroupSchema, data).asyncAndThen((validatedInput) => this.fetcher.fetch({
|
|
61
|
+
body: validatedInput,
|
|
62
|
+
isB2B: false,
|
|
63
|
+
method: 'POST',
|
|
64
|
+
path: 'customer_groups',
|
|
65
|
+
resultSchema: schemas_1.CreateCustomerGroupResponseSchema,
|
|
66
|
+
version: 'v2',
|
|
67
|
+
}, { shouldRetry: true }));
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Finds customer addresses with pagination.
|
|
71
|
+
*
|
|
72
|
+
* @param criteria - Search criteria including customer IDs and pagination
|
|
73
|
+
* @returns ResultAsync with paginated customer addresses
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* ```typescript
|
|
77
|
+
* const result = await customersService.findCustomerAddresses({
|
|
78
|
+
* 'customer_id:in': [1, 2, 3],
|
|
79
|
+
* page: 1,
|
|
80
|
+
* limit: 50
|
|
81
|
+
* });
|
|
82
|
+
* ```
|
|
83
|
+
*/
|
|
84
|
+
findCustomerAddresses(criteria) {
|
|
85
|
+
return (0, utils_1.validateInputData)(schemas_1.FindCustomerAddressesCriteriaSchema, criteria ?? {}).asyncAndThen((validatedInput) => this.fetcher.fetch({
|
|
86
|
+
method: 'GET',
|
|
87
|
+
path: `customers/addresses`,
|
|
88
|
+
isB2B: false,
|
|
89
|
+
version: 'v3',
|
|
90
|
+
resultSchema: schemas_1.FindCustomerAddressesResponseSchema,
|
|
91
|
+
query: (0, node_querystring_1.stringify)(validatedInput),
|
|
92
|
+
}, { shouldRetry: true }));
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Retrieves all customer addresses by automatically handling pagination.
|
|
96
|
+
*
|
|
97
|
+
* @param criteria - Search criteria (excluding pagination params)
|
|
98
|
+
* @returns ResultAsync with all customer addresses
|
|
99
|
+
*
|
|
100
|
+
* @example
|
|
101
|
+
* ```typescript
|
|
102
|
+
* const result = await customersService.getAllCustomerAddressesBy({
|
|
103
|
+
* 'customer_id:in': [1, 2, 3]
|
|
104
|
+
* });
|
|
105
|
+
* ```
|
|
106
|
+
*/
|
|
107
|
+
getAllCustomerAddressesBy(criteria) {
|
|
108
|
+
return (0, while_1.whileLoop)({
|
|
109
|
+
initialParams: {
|
|
110
|
+
page: 1,
|
|
111
|
+
limit: constants_1.DEFAULTS.customers.getBatchSize,
|
|
112
|
+
},
|
|
113
|
+
step: (params) => this.findCustomerAddresses({
|
|
114
|
+
...criteria,
|
|
115
|
+
...params,
|
|
116
|
+
}),
|
|
117
|
+
condition: ({ meta: { pagination } }, params) => pagination.total_pages > params.page,
|
|
118
|
+
onStep: (_, params) => ({
|
|
119
|
+
...params,
|
|
120
|
+
page: params.page + 1,
|
|
121
|
+
}),
|
|
122
|
+
}).map((results) => results.flatMap((result) => result.data));
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Finds customers with pagination.
|
|
126
|
+
*
|
|
127
|
+
* @param criteria - Search criteria including filters and pagination
|
|
128
|
+
* @returns ResultAsync with paginated customers
|
|
129
|
+
*
|
|
130
|
+
* @example
|
|
131
|
+
* ```typescript
|
|
132
|
+
* const result = await customersService.findCustomers({
|
|
133
|
+
* 'email:in': ['john@example.com'],
|
|
134
|
+
* page: 1,
|
|
135
|
+
* limit: 50
|
|
136
|
+
* });
|
|
137
|
+
* ```
|
|
138
|
+
*/
|
|
139
|
+
findCustomers(criteria) {
|
|
140
|
+
return (0, utils_1.validateInputData)(schemas_1.FindCustomersCriteriaSchema, criteria ?? {}).asyncAndThen((validatedInput) => this.fetcher.fetch({
|
|
141
|
+
method: 'GET',
|
|
142
|
+
path: `customers`,
|
|
143
|
+
isB2B: false,
|
|
144
|
+
version: 'v3',
|
|
145
|
+
resultSchema: schemas_1.FindCustomerResponse,
|
|
146
|
+
query: (0, node_querystring_1.stringify)(validatedInput),
|
|
147
|
+
}, { shouldRetry: true }));
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Retrieves all customers by automatically handling pagination.
|
|
151
|
+
*
|
|
152
|
+
* @param criteria - Search criteria (excluding pagination params)
|
|
153
|
+
* @returns ResultAsync with all customers
|
|
154
|
+
*
|
|
155
|
+
* @example
|
|
156
|
+
* ```typescript
|
|
157
|
+
* const result = await customersService.getAllCustomersBy({
|
|
158
|
+
* 'company:in': ['Acme Corp']
|
|
159
|
+
* });
|
|
160
|
+
* ```
|
|
161
|
+
*/
|
|
162
|
+
getAllCustomersBy(criteria) {
|
|
163
|
+
return (0, while_1.whileLoop)({
|
|
164
|
+
initialParams: { page: 1, limit: constants_1.DEFAULTS.customers.getBatchSize },
|
|
165
|
+
step: (params) => this.findCustomers({
|
|
166
|
+
...criteria,
|
|
167
|
+
...params,
|
|
168
|
+
}),
|
|
169
|
+
condition: (data) => !!data.meta.pagination.links.next,
|
|
170
|
+
onStep: (_, params) => ({ page: params.page + 1, limit: constants_1.DEFAULTS.customers.getBatchSize }),
|
|
171
|
+
}).map((results) => results.flatMap((result) => result.data));
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Finds customer groups with pagination.
|
|
175
|
+
*
|
|
176
|
+
* @param criteria - Search criteria including pagination
|
|
177
|
+
* @returns ResultAsync with paginated customer groups
|
|
178
|
+
*/
|
|
179
|
+
findCustomersGroups(criteria) {
|
|
180
|
+
return (0, utils_1.validateInputData)(schemas_1.FindCustomerGroupsCriteriaSchema, criteria ?? {}).asyncAndThen((validatedInput) => this.fetcher.fetch({
|
|
181
|
+
method: 'GET',
|
|
182
|
+
path: `customers`,
|
|
183
|
+
isB2B: false,
|
|
184
|
+
version: 'v3',
|
|
185
|
+
resultSchema: schemas_1.FindCustomerResponse,
|
|
186
|
+
query: (0, node_querystring_1.stringify)(validatedInput),
|
|
187
|
+
}));
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Retrieves all customer groups by automatically handling pagination.
|
|
191
|
+
*
|
|
192
|
+
* @param criteria - Optional search criteria (excluding pagination params)
|
|
193
|
+
* @returns ResultAsync with all customer groups
|
|
194
|
+
*/
|
|
195
|
+
getAllCustomerGroupsBy = (criteria) => {
|
|
196
|
+
return (0, while_1.whileLoop)({
|
|
197
|
+
initialParams: { page: 1, limit: constants_1.DEFAULTS.customers.getBatchSize },
|
|
198
|
+
step: (params) => this.findCustomersGroups({
|
|
199
|
+
...criteria,
|
|
200
|
+
...params,
|
|
201
|
+
}),
|
|
202
|
+
onStep: (_, params) => ({ page: params.page + 1, limit: constants_1.DEFAULTS.customers.getBatchSize }),
|
|
203
|
+
condition: ({ meta }) => !!meta.pagination.links.next,
|
|
204
|
+
}).map((groups) => groups.flatMap((group) => group.data));
|
|
205
|
+
};
|
|
206
|
+
/**
|
|
207
|
+
* Retrieves a specific customer by ID.
|
|
208
|
+
*
|
|
209
|
+
* @param customerId - The customer ID
|
|
210
|
+
* @returns ResultAsync with customer details
|
|
211
|
+
*
|
|
212
|
+
* @example
|
|
213
|
+
* ```typescript
|
|
214
|
+
* const result = await customersService.getCustomer(123);
|
|
215
|
+
* ```
|
|
216
|
+
*/
|
|
217
|
+
getCustomer(customerId) {
|
|
218
|
+
return this.findCustomers({
|
|
219
|
+
'id:in': [customerId],
|
|
220
|
+
}).map((response) => response.data[0]);
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* Sets or updates the price list for a customer group.
|
|
224
|
+
*
|
|
225
|
+
* @param input - Customer group ID and price list configuration
|
|
226
|
+
* @returns ResultAsync with updated customer group
|
|
227
|
+
*
|
|
228
|
+
* @example
|
|
229
|
+
* ```typescript
|
|
230
|
+
* const result = await customersService.setCustomerGroupPriceList({
|
|
231
|
+
* customerGroupId: 1,
|
|
232
|
+
* data: {
|
|
233
|
+
* discount_rules: [{ type: 'price_list', price_list_id: 2 }]
|
|
234
|
+
* }
|
|
235
|
+
* });
|
|
236
|
+
* ```
|
|
237
|
+
*/
|
|
238
|
+
setCustomerGroupPriceList(input) {
|
|
239
|
+
return (0, utils_1.validateInputData)(schemas_1.SetCustomerGroupPriceListSchema, input).asyncAndThen(({ customerGroupId, data }) => this.fetcher.fetch({
|
|
240
|
+
body: data,
|
|
241
|
+
isB2B: false,
|
|
242
|
+
method: 'PUT',
|
|
243
|
+
path: `customer_groups/${customerGroupId}`,
|
|
244
|
+
resultSchema: schemas_1.SetCustomerGroupPriceListResponseSchema,
|
|
245
|
+
version: 'v2',
|
|
246
|
+
}, { shouldRetry: true }));
|
|
247
|
+
}
|
|
248
|
+
};
|
|
249
|
+
exports.BigCommerceCustomersService = BigCommerceCustomersService;
|
|
250
|
+
exports.BigCommerceCustomersService = BigCommerceCustomersService = __decorate([
|
|
251
|
+
(0, common_1.Injectable)(),
|
|
252
|
+
__metadata("design:paramtypes", [Function])
|
|
253
|
+
], BigCommerceCustomersService);
|
|
254
|
+
//# sourceMappingURL=customers.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customers.service.js","sourceRoot":"","sources":["../../../src/bigcommerce-entities/customers/customers.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,uDAA6C;AAE7C,+CAA2C;AAE3C,uCAAgD;AAChD,6CAA8C;AAC9C,uCAUmB;AACnB;;;;;;;;;;;;;;;;;;;;GAoBG;AAEI,IAAM,2BAA2B,GAAjC,MAAM,2BAA2B;IACT;IAA7B,YAA6B,OAAkC;QAAlC,YAAO,GAAP,OAAO,CAA2B;IAAG,CAAC;IAEnE;;;;;;;;;;;;;OAaG;IACH,mBAAmB,CAAC,IAA+C;QACjE,OAAO,IAAA,yBAAiB,EAAC,mCAAyB,EAAE,IAAI,CAAC,CAAC,Y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AAI;SACtD,CAAC,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;IAC5D,CAAC,CAAC;IAEF;;;;;;;;;;OAUG;IACH,WAAW,CAAC,UAAkB;QAC5B,OAAO,IAAI,CAAC,aAAa,CAAC;YACxB,OAAO,EAAE,CAAC,UAAU,CAAC;SACtB,CAAC,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IACzC,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,yBAAyB,CAAC,KAAsD;QAC9E,OAAO,IAAA,yBAAiB,EAAC,yCAA+B,EAAE,KAAK,CAAC,CAAC,YAAY,CAC3E,CAAC,EAAE,eAAe,EAAE,IAAI,EAAE,EAAE,EAAE,CAC5B,IAAI,CAAC,OAAO,CAAC,KAAK,CAChB;YACE,IAAI,EAAE,IAAI;YACV,KAAK,EAAE,KAAK;YACZ,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,mBAAmB,eAAe,EAAE;YAC1C,YAAY,EAAE,iDAAuC;YACrD,OAAO,EAAE,IAAI;SACd,EACD,EAAE,WAAW,EAAE,IAAI,EAAE,CACtB,CACJ,CAAC;IACJ,CAAC;CACF,CAAA;AArPY,kEAA2B;sCAA3B,2BAA2B;IADvC,IAAA,mBAAU,GAAE;;GACA,2BAA2B,CAqPvC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/bigcommerce-entities/customers/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,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("./customers.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/customers/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC;AACpC,4CAA0B"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as z from 'zod';
|
|
2
|
+
export declare const CreateCustomerGroupSchema: z.ZodObject<{
|
|
3
|
+
name: z.ZodString;
|
|
4
|
+
discount_rules: z.ZodArray<z.ZodObject<{
|
|
5
|
+
type: z.ZodLiteral<"price_list">;
|
|
6
|
+
price_list_id: z.ZodInt;
|
|
7
|
+
}, z.core.$strip>>;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
export declare const CreateCustomerGroupResponseSchema: z.ZodObject<{
|
|
10
|
+
id: z.ZodInt;
|
|
11
|
+
}, z.core.$strip>;
|
|
12
|
+
export declare const CustomerGroupSchema: z.ZodObject<{
|
|
13
|
+
id: z.ZodInt;
|
|
14
|
+
name: z.ZodString;
|
|
15
|
+
is_default: z.ZodBoolean;
|
|
16
|
+
is_group_for_guests: z.ZodBoolean;
|
|
17
|
+
}, z.core.$strip>;
|
|
18
|
+
export declare const FindCustomerGroupsCriteriaSchema: z.ZodObject<{
|
|
19
|
+
limit: z.ZodOptional<z.ZodInt>;
|
|
20
|
+
page: z.ZodOptional<z.ZodInt>;
|
|
21
|
+
}, z.core.$strip>;
|
|
22
|
+
export declare const SetCustomerGroupPriceListSchema: z.ZodObject<{
|
|
23
|
+
data: z.ZodObject<{
|
|
24
|
+
discount_rules: z.ZodArray<z.ZodObject<{
|
|
25
|
+
type: z.ZodLiteral<"price_list">;
|
|
26
|
+
price_list_id: z.ZodInt;
|
|
27
|
+
}, z.core.$strip>>;
|
|
28
|
+
}, z.core.$strip>;
|
|
29
|
+
customerGroupId: z.ZodInt;
|
|
30
|
+
}, z.core.$strip>;
|
|
31
|
+
export declare const SetCustomerGroupPriceListResponseSchema: z.ZodObject<{
|
|
32
|
+
id: z.ZodInt;
|
|
33
|
+
name: z.ZodString;
|
|
34
|
+
}, z.core.$strip>;
|
|
35
|
+
//# sourceMappingURL=customer-group.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customer-group.schema.d.ts","sourceRoot":"","sources":["../../../../src/bigcommerce-entities/customers/schemas/customer-group.schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,eAAO,MAAM,yBAAyB;;;;;;iBAQpC,CAAC;AAEH,eAAO,MAAM,iCAAiC;;iBAE5C,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;iBAK9B,CAAC;AAEH,eAAO,MAAM,gCAAgC;;;iBAG3C,CAAC;AAEH,eAAO,MAAM,+BAA+B;;;;;;;;iBAU1C,CAAC;AAEH,eAAO,MAAM,uCAAuC;;;iBAGlD,CAAC"}
|
|
@@ -0,0 +1,74 @@
|
|
|
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.SetCustomerGroupPriceListResponseSchema = exports.SetCustomerGroupPriceListSchema = exports.FindCustomerGroupsCriteriaSchema = exports.CustomerGroupSchema = exports.CreateCustomerGroupResponseSchema = exports.CreateCustomerGroupSchema = void 0;
|
|
37
|
+
const z = __importStar(require("zod"));
|
|
38
|
+
const constants_1 = require("../../../constants");
|
|
39
|
+
exports.CreateCustomerGroupSchema = z.object({
|
|
40
|
+
name: z.string(),
|
|
41
|
+
discount_rules: z.array(z.object({
|
|
42
|
+
type: z.literal('price_list'),
|
|
43
|
+
price_list_id: z.int(),
|
|
44
|
+
})),
|
|
45
|
+
});
|
|
46
|
+
exports.CreateCustomerGroupResponseSchema = z.object({
|
|
47
|
+
id: z.int(),
|
|
48
|
+
});
|
|
49
|
+
exports.CustomerGroupSchema = z.object({
|
|
50
|
+
id: z.int(),
|
|
51
|
+
name: z.string(),
|
|
52
|
+
is_default: z.boolean(),
|
|
53
|
+
is_group_for_guests: z.boolean(),
|
|
54
|
+
});
|
|
55
|
+
exports.FindCustomerGroupsCriteriaSchema = z.object({
|
|
56
|
+
limit: z.int().max(constants_1.DEFAULTS.customers.getBatchSize).optional(),
|
|
57
|
+
page: z.int().positive().optional(),
|
|
58
|
+
});
|
|
59
|
+
exports.SetCustomerGroupPriceListSchema = z.object({
|
|
60
|
+
data: z.object({
|
|
61
|
+
discount_rules: z
|
|
62
|
+
.object({
|
|
63
|
+
type: z.literal('price_list'),
|
|
64
|
+
price_list_id: z.int(),
|
|
65
|
+
})
|
|
66
|
+
.array(),
|
|
67
|
+
}),
|
|
68
|
+
customerGroupId: z.int(),
|
|
69
|
+
});
|
|
70
|
+
exports.SetCustomerGroupPriceListResponseSchema = z.object({
|
|
71
|
+
id: z.int(),
|
|
72
|
+
name: z.string(),
|
|
73
|
+
});
|
|
74
|
+
//# sourceMappingURL=customer-group.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customer-group.schema.js","sourceRoot":"","sources":["../../../../src/bigcommerce-entities/customers/schemas/customer-group.schema.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,kDAA8C;AACjC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EU,QAAA,uCAAuC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9D,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE;IACX,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;CACjB,CAAC,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import * as z from 'zod';
|
|
2
|
+
export declare const CustomerSchema: z.ZodObject<{
|
|
3
|
+
email: z.ZodEmail;
|
|
4
|
+
first_name: z.ZodString;
|
|
5
|
+
last_name: z.ZodString;
|
|
6
|
+
company: z.ZodOptional<z.ZodString>;
|
|
7
|
+
phone: z.ZodString;
|
|
8
|
+
customer_group_id: z.ZodInt;
|
|
9
|
+
id: z.ZodInt;
|
|
10
|
+
channel_ids: z.ZodArray<z.ZodInt>;
|
|
11
|
+
}, z.core.$strip>;
|
|
12
|
+
export declare const FindCustomerResponse: z.ZodObject<{
|
|
13
|
+
data: z.ZodArray<z.ZodObject<{
|
|
14
|
+
email: z.ZodEmail;
|
|
15
|
+
first_name: z.ZodString;
|
|
16
|
+
last_name: z.ZodString;
|
|
17
|
+
company: z.ZodOptional<z.ZodString>;
|
|
18
|
+
phone: z.ZodString;
|
|
19
|
+
customer_group_id: z.ZodInt;
|
|
20
|
+
id: z.ZodInt;
|
|
21
|
+
channel_ids: z.ZodArray<z.ZodInt>;
|
|
22
|
+
}, z.core.$strip>>;
|
|
23
|
+
meta: z.ZodObject<{
|
|
24
|
+
pagination: z.ZodObject<{
|
|
25
|
+
total: z.ZodInt;
|
|
26
|
+
count: z.ZodInt;
|
|
27
|
+
per_page: z.ZodInt;
|
|
28
|
+
current_page: z.ZodInt;
|
|
29
|
+
total_pages: z.ZodInt;
|
|
30
|
+
links: z.ZodObject<{
|
|
31
|
+
previous: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
32
|
+
current: z.ZodString;
|
|
33
|
+
next: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
34
|
+
}, z.core.$strip>;
|
|
35
|
+
}, z.core.$strip>;
|
|
36
|
+
}, z.core.$strip>;
|
|
37
|
+
}, z.core.$strip>;
|
|
38
|
+
//# sourceMappingURL=customer.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customer.schema.d.ts","sourceRoot":"","sources":["../../../../src/bigcommerce-entities/customers/schemas/customer.schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,eAAO,MAAM,cAAc;;;;;;;;;iBASzB,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;iBAgB/B,CAAC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
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.FindCustomerResponse = exports.CustomerSchema = void 0;
|
|
37
|
+
const z = __importStar(require("zod"));
|
|
38
|
+
exports.CustomerSchema = z.object({
|
|
39
|
+
email: z.email(),
|
|
40
|
+
first_name: z.string(),
|
|
41
|
+
last_name: z.string(),
|
|
42
|
+
company: z.string().optional(),
|
|
43
|
+
phone: z.string(),
|
|
44
|
+
customer_group_id: z.int(),
|
|
45
|
+
id: z.int(),
|
|
46
|
+
channel_ids: z.array(z.int()),
|
|
47
|
+
});
|
|
48
|
+
exports.FindCustomerResponse = z.object({
|
|
49
|
+
data: z.array(exports.CustomerSchema),
|
|
50
|
+
meta: z.object({
|
|
51
|
+
pagination: z.object({
|
|
52
|
+
total: z.int(),
|
|
53
|
+
count: z.int(),
|
|
54
|
+
per_page: z.int(),
|
|
55
|
+
current_page: z.int(),
|
|
56
|
+
total_pages: z.int(),
|
|
57
|
+
links: z.object({
|
|
58
|
+
previous: z.string().optional().nullable(),
|
|
59
|
+
current: z.string(),
|
|
60
|
+
next: z.string().optional().nullable(),
|
|
61
|
+
}),
|
|
62
|
+
}),
|
|
63
|
+
}),
|
|
64
|
+
});
|
|
65
|
+
//# sourceMappingURL=customer.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customer.schema.js","sourceRoot":"","sources":["../../../../src/bigcommerce-entities/customers/schemas/customer.schema.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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';
|
|
2
|
+
export declare const FindCustomerAddressesCriteriaSchema: z.ZodObject<{
|
|
3
|
+
'id:in': z.ZodOptional<z.ZodPipe<z.ZodArray<z.ZodInt>, z.ZodTransform<string, number[]>>>;
|
|
4
|
+
page: z.ZodOptional<z.ZodInt>;
|
|
5
|
+
limit: z.ZodOptional<z.ZodInt>;
|
|
6
|
+
'customer_id:in': z.ZodOptional<z.ZodPipe<z.ZodArray<z.ZodInt>, z.ZodTransform<string, number[]>>>;
|
|
7
|
+
}, z.core.$strip>;
|
|
8
|
+
export declare const FindCustomerAddressesResponseSchema: z.ZodObject<{
|
|
9
|
+
data: z.ZodArray<z.ZodObject<{
|
|
10
|
+
address1: z.ZodString;
|
|
11
|
+
address2: z.ZodString;
|
|
12
|
+
address_type: z.ZodString;
|
|
13
|
+
city: z.ZodString;
|
|
14
|
+
company: z.ZodString;
|
|
15
|
+
country: z.ZodString;
|
|
16
|
+
country_code: z.ZodString;
|
|
17
|
+
customer_id: z.ZodNumber;
|
|
18
|
+
first_name: z.ZodString;
|
|
19
|
+
id: z.ZodInt;
|
|
20
|
+
last_name: z.ZodString;
|
|
21
|
+
phone: z.ZodString;
|
|
22
|
+
postal_code: z.ZodString;
|
|
23
|
+
state_or_province: z.ZodString;
|
|
24
|
+
}, z.core.$strip>>;
|
|
25
|
+
meta: z.ZodObject<{
|
|
26
|
+
pagination: z.ZodObject<{
|
|
27
|
+
total: z.ZodInt;
|
|
28
|
+
count: z.ZodInt;
|
|
29
|
+
per_page: z.ZodInt;
|
|
30
|
+
current_page: z.ZodInt;
|
|
31
|
+
total_pages: z.ZodInt;
|
|
32
|
+
}, z.core.$strip>;
|
|
33
|
+
}, z.core.$strip>;
|
|
34
|
+
}, z.core.$strip>;
|
|
35
|
+
//# sourceMappingURL=find-addresses.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"find-addresses.schema.d.ts","sourceRoot":"","sources":["../../../../src/bigcommerce-entities/customers/schemas/find-addresses.schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,eAAO,MAAM,mCAAmC;;;;;iBAa9C,CAAC;AAEH,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;;;;;;;;;;;;iBA4B9C,CAAC"}
|
|
@@ -0,0 +1,81 @@
|
|
|
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.FindCustomerAddressesResponseSchema = exports.FindCustomerAddressesCriteriaSchema = void 0;
|
|
37
|
+
const z = __importStar(require("zod"));
|
|
38
|
+
exports.FindCustomerAddressesCriteriaSchema = z.object({
|
|
39
|
+
'id:in': z
|
|
40
|
+
.int()
|
|
41
|
+
.array()
|
|
42
|
+
.transform((ids) => ids.join(','))
|
|
43
|
+
.optional(),
|
|
44
|
+
page: z.int().optional(),
|
|
45
|
+
limit: z.int().optional(),
|
|
46
|
+
'customer_id:in': z
|
|
47
|
+
.int()
|
|
48
|
+
.array()
|
|
49
|
+
.transform((ids) => ids.join(','))
|
|
50
|
+
.optional(),
|
|
51
|
+
});
|
|
52
|
+
exports.FindCustomerAddressesResponseSchema = z.object({
|
|
53
|
+
data: z
|
|
54
|
+
.object({
|
|
55
|
+
address1: z.string(),
|
|
56
|
+
address2: z.string(),
|
|
57
|
+
address_type: z.string(),
|
|
58
|
+
city: z.string(),
|
|
59
|
+
company: z.string(),
|
|
60
|
+
country: z.string(),
|
|
61
|
+
country_code: z.string(),
|
|
62
|
+
customer_id: z.number(),
|
|
63
|
+
first_name: z.string(),
|
|
64
|
+
id: z.int(),
|
|
65
|
+
last_name: z.string(),
|
|
66
|
+
phone: z.string(),
|
|
67
|
+
postal_code: z.string(),
|
|
68
|
+
state_or_province: z.string(),
|
|
69
|
+
})
|
|
70
|
+
.array(),
|
|
71
|
+
meta: z.object({
|
|
72
|
+
pagination: z.object({
|
|
73
|
+
total: z.int(),
|
|
74
|
+
count: z.int(),
|
|
75
|
+
per_page: z.int(),
|
|
76
|
+
current_page: z.int(),
|
|
77
|
+
total_pages: z.int(),
|
|
78
|
+
}),
|
|
79
|
+
}),
|
|
80
|
+
});
|
|
81
|
+
//# sourceMappingURL=find-addresses.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"find-addresses.schema.js","sourceRoot":"","sources":["../../../../src/bigcommerce-entities/customers/schemas/find-addresses.schema.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACZ,QAAA,mCAAmC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1D,OAAO,EAAE,CAAC;SACP,GAAG,EAAE;SACL,KAAK,EAAE;SACP,SAAS,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SACjC,QAAQ,EAAE;IACb,IAAI,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IACxB,KAAK,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IACzB,gBAAgB,EAAE,CAAC;SAChB,GAAG,EAAE;SACL,KAAK,EAAE;SACP,SAAS,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SACjC,QAAQ,EAAE;CACd,CAAC,CAAC;AAEU,QAAA,mCAAmC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1D,IAAI,EAAE,CAAC;SACJ,MAAM,CAAC;QACN,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;QACpB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;QACpB,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;QACxB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;QAChB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;QACnB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;QACnB,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;QACxB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;QACvB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;QACtB,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE;QACX,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;QACrB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;QACjB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;QACvB,iBAAiB,EAAE,CAAC,CAAC,MAAM,EAAE;KAC9B,CAAC;SACD,KAAK,EAAE;IACV,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"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as z from 'zod';
|
|
2
|
+
export declare const FindCustomersCriteriaSchema: z.ZodObject<{
|
|
3
|
+
'id:in': z.ZodOptional<z.ZodPipe<z.ZodArray<z.ZodInt>, z.ZodTransform<string, number[]>>>;
|
|
4
|
+
page: z.ZodOptional<z.ZodInt>;
|
|
5
|
+
limit: z.ZodOptional<z.ZodInt>;
|
|
6
|
+
'company:in': z.ZodOptional<z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string, string[]>>>;
|
|
7
|
+
'customer_group_id:in': z.ZodOptional<z.ZodPipe<z.ZodArray<z.ZodInt>, z.ZodTransform<string, number[]>>>;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
//# sourceMappingURL=find-customer.criteria.d.ts.map
|