@commercelayer/sdk 7.0.0-beta.16 → 7.0.0-beta.18
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/lib/{api-Cxxi3g4i.d.cts → api-CRmSToGa.d.cts} +1 -1
- package/lib/{api-CsxHP9zh.d.ts → api-CUXmETkx.d.ts} +1 -1
- package/lib/api.cjs +7460 -792
- package/lib/api.d.cts +1 -1
- package/lib/api.d.ts +1 -1
- package/lib/api.js +7331 -132
- package/lib/client.cjs +253 -78
- package/lib/client.js +252 -72
- package/lib/commercelayer.cjs +778 -34
- package/lib/commercelayer.d.cts +1 -2
- package/lib/commercelayer.d.ts +1 -2
- package/lib/commercelayer.js +777 -29
- package/lib/common.cjs +143 -7
- package/lib/common.d.cts +1 -1
- package/lib/common.d.ts +1 -1
- package/lib/common.js +141 -5
- package/lib/config.cjs +2 -3
- package/lib/config.js +2 -3
- package/lib/debug.cjs +12 -6
- package/lib/debug.js +12 -6
- package/lib/enum.cjs +9 -10
- package/lib/enum.d.cts +1 -1
- package/lib/enum.d.ts +1 -1
- package/lib/enum.js +9 -10
- package/lib/error.cjs +75 -26
- package/lib/error.js +74 -25
- package/lib/fetch.cjs +85 -33
- package/lib/fetch.js +87 -31
- package/lib/index.cjs +8104 -23
- package/lib/index.d.cts +2 -2
- package/lib/index.d.ts +2 -2
- package/lib/index.js +7977 -4
- package/lib/jsonapi.cjs +188 -21
- package/lib/jsonapi.d.cts +1 -1
- package/lib/jsonapi.d.ts +1 -1
- package/lib/jsonapi.js +186 -14
- package/lib/model.d.cts +1 -1
- package/lib/model.d.ts +1 -1
- package/lib/query.cjs +75 -17
- package/lib/query.d.cts +1 -1
- package/lib/query.d.ts +1 -1
- package/lib/query.js +77 -15
- package/lib/resource.cjs +660 -71
- package/lib/resource.d.cts +1 -1
- package/lib/resource.d.ts +1 -1
- package/lib/resource.js +646 -51
- package/lib/resources/addresses.cjs +794 -6
- package/lib/resources/addresses.d.cts +1 -1
- package/lib/resources/addresses.d.ts +1 -1
- package/lib/resources/addresses.js +794 -6
- package/lib/resources/adjustments.cjs +794 -6
- package/lib/resources/adjustments.d.cts +1 -1
- package/lib/resources/adjustments.d.ts +1 -1
- package/lib/resources/adjustments.js +794 -6
- package/lib/resources/adyen_gateways.cjs +794 -6
- package/lib/resources/adyen_gateways.d.cts +1 -1
- package/lib/resources/adyen_gateways.d.ts +1 -1
- package/lib/resources/adyen_gateways.js +794 -6
- package/lib/resources/adyen_payments.cjs +794 -6
- package/lib/resources/adyen_payments.d.cts +1 -1
- package/lib/resources/adyen_payments.d.ts +1 -1
- package/lib/resources/adyen_payments.js +794 -6
- package/lib/resources/applications.cjs +786 -6
- package/lib/resources/applications.d.cts +1 -1
- package/lib/resources/applications.d.ts +1 -1
- package/lib/resources/applications.js +786 -6
- package/lib/resources/attachments.cjs +794 -6
- package/lib/resources/attachments.d.cts +1 -1
- package/lib/resources/attachments.d.ts +1 -1
- package/lib/resources/attachments.js +794 -6
- package/lib/resources/authorizations.cjs +794 -6
- package/lib/resources/authorizations.d.cts +1 -1
- package/lib/resources/authorizations.d.ts +1 -1
- package/lib/resources/authorizations.js +794 -6
- package/lib/resources/avalara_accounts.cjs +794 -6
- package/lib/resources/avalara_accounts.d.cts +1 -1
- package/lib/resources/avalara_accounts.d.ts +1 -1
- package/lib/resources/avalara_accounts.js +794 -6
- package/lib/resources/axerve_gateways.cjs +794 -6
- package/lib/resources/axerve_gateways.d.cts +1 -1
- package/lib/resources/axerve_gateways.d.ts +1 -1
- package/lib/resources/axerve_gateways.js +794 -6
- package/lib/resources/axerve_payments.cjs +794 -6
- package/lib/resources/axerve_payments.d.cts +1 -1
- package/lib/resources/axerve_payments.d.ts +1 -1
- package/lib/resources/axerve_payments.js +794 -6
- package/lib/resources/bing_geocoders.cjs +794 -6
- package/lib/resources/bing_geocoders.d.cts +1 -1
- package/lib/resources/bing_geocoders.d.ts +1 -1
- package/lib/resources/bing_geocoders.js +794 -6
- package/lib/resources/braintree_gateways.cjs +794 -6
- package/lib/resources/braintree_gateways.d.cts +1 -1
- package/lib/resources/braintree_gateways.d.ts +1 -1
- package/lib/resources/braintree_gateways.js +794 -6
- package/lib/resources/braintree_payments.cjs +794 -6
- package/lib/resources/braintree_payments.d.cts +1 -1
- package/lib/resources/braintree_payments.d.ts +1 -1
- package/lib/resources/braintree_payments.js +794 -6
- package/lib/resources/bundles.cjs +794 -6
- package/lib/resources/bundles.d.cts +1 -1
- package/lib/resources/bundles.d.ts +1 -1
- package/lib/resources/bundles.js +794 -6
- package/lib/resources/buy_x_pay_y_promotions.cjs +794 -6
- package/lib/resources/buy_x_pay_y_promotions.d.cts +1 -1
- package/lib/resources/buy_x_pay_y_promotions.d.ts +1 -1
- package/lib/resources/buy_x_pay_y_promotions.js +794 -6
- package/lib/resources/captures.cjs +794 -6
- package/lib/resources/captures.d.cts +1 -1
- package/lib/resources/captures.d.ts +1 -1
- package/lib/resources/captures.js +794 -6
- package/lib/resources/carrier_accounts.cjs +794 -6
- package/lib/resources/carrier_accounts.d.cts +1 -1
- package/lib/resources/carrier_accounts.d.ts +1 -1
- package/lib/resources/carrier_accounts.js +794 -6
- package/lib/resources/checkout_com_gateways.cjs +794 -6
- package/lib/resources/checkout_com_gateways.d.cts +1 -1
- package/lib/resources/checkout_com_gateways.d.ts +1 -1
- package/lib/resources/checkout_com_gateways.js +794 -6
- package/lib/resources/checkout_com_payments.cjs +794 -6
- package/lib/resources/checkout_com_payments.d.cts +1 -1
- package/lib/resources/checkout_com_payments.d.ts +1 -1
- package/lib/resources/checkout_com_payments.js +794 -6
- package/lib/resources/cleanups.cjs +794 -6
- package/lib/resources/cleanups.d.cts +1 -1
- package/lib/resources/cleanups.d.ts +1 -1
- package/lib/resources/cleanups.js +794 -6
- package/lib/resources/coupon_codes_promotion_rules.cjs +794 -6
- package/lib/resources/coupon_codes_promotion_rules.d.cts +1 -1
- package/lib/resources/coupon_codes_promotion_rules.d.ts +1 -1
- package/lib/resources/coupon_codes_promotion_rules.js +794 -6
- package/lib/resources/coupon_recipients.cjs +794 -6
- package/lib/resources/coupon_recipients.d.cts +1 -1
- package/lib/resources/coupon_recipients.d.ts +1 -1
- package/lib/resources/coupon_recipients.js +794 -6
- package/lib/resources/coupons.cjs +794 -6
- package/lib/resources/coupons.d.cts +1 -1
- package/lib/resources/coupons.d.ts +1 -1
- package/lib/resources/coupons.js +794 -6
- package/lib/resources/custom_promotion_rules.cjs +794 -6
- package/lib/resources/custom_promotion_rules.d.cts +1 -1
- package/lib/resources/custom_promotion_rules.d.ts +1 -1
- package/lib/resources/custom_promotion_rules.js +794 -6
- package/lib/resources/customer_addresses.cjs +794 -6
- package/lib/resources/customer_addresses.d.cts +1 -1
- package/lib/resources/customer_addresses.d.ts +1 -1
- package/lib/resources/customer_addresses.js +794 -6
- package/lib/resources/customer_groups.cjs +794 -6
- package/lib/resources/customer_groups.d.cts +1 -1
- package/lib/resources/customer_groups.d.ts +1 -1
- package/lib/resources/customer_groups.js +794 -6
- package/lib/resources/customer_password_resets.cjs +794 -6
- package/lib/resources/customer_password_resets.d.cts +1 -1
- package/lib/resources/customer_password_resets.d.ts +1 -1
- package/lib/resources/customer_password_resets.js +794 -6
- package/lib/resources/customer_payment_sources.cjs +794 -6
- package/lib/resources/customer_payment_sources.d.cts +1 -1
- package/lib/resources/customer_payment_sources.d.ts +1 -1
- package/lib/resources/customer_payment_sources.js +794 -6
- package/lib/resources/customer_subscriptions.cjs +794 -6
- package/lib/resources/customer_subscriptions.d.cts +1 -1
- package/lib/resources/customer_subscriptions.d.ts +1 -1
- package/lib/resources/customer_subscriptions.js +794 -6
- package/lib/resources/customers.cjs +794 -6
- package/lib/resources/customers.d.cts +1 -1
- package/lib/resources/customers.d.ts +1 -1
- package/lib/resources/customers.js +794 -6
- package/lib/resources/delivery_lead_times.cjs +794 -6
- package/lib/resources/delivery_lead_times.d.cts +1 -1
- package/lib/resources/delivery_lead_times.d.ts +1 -1
- package/lib/resources/delivery_lead_times.js +794 -6
- package/lib/resources/discount_engine_items.cjs +794 -6
- package/lib/resources/discount_engine_items.d.cts +1 -1
- package/lib/resources/discount_engine_items.d.ts +1 -1
- package/lib/resources/discount_engine_items.js +794 -6
- package/lib/resources/discount_engines.cjs +794 -6
- package/lib/resources/discount_engines.d.cts +1 -1
- package/lib/resources/discount_engines.d.ts +1 -1
- package/lib/resources/discount_engines.js +794 -6
- package/lib/resources/easypost_pickups.cjs +794 -6
- package/lib/resources/easypost_pickups.d.cts +1 -1
- package/lib/resources/easypost_pickups.d.ts +1 -1
- package/lib/resources/easypost_pickups.js +794 -6
- package/lib/resources/event_callbacks.cjs +794 -6
- package/lib/resources/event_callbacks.d.cts +1 -1
- package/lib/resources/event_callbacks.d.ts +1 -1
- package/lib/resources/event_callbacks.js +794 -6
- package/lib/resources/events.cjs +794 -6
- package/lib/resources/events.d.cts +1 -1
- package/lib/resources/events.d.ts +1 -1
- package/lib/resources/events.js +794 -6
- package/lib/resources/exports.cjs +794 -6
- package/lib/resources/exports.d.cts +1 -1
- package/lib/resources/exports.d.ts +1 -1
- package/lib/resources/exports.js +794 -6
- package/lib/resources/external_gateways.cjs +794 -6
- package/lib/resources/external_gateways.d.cts +1 -1
- package/lib/resources/external_gateways.d.ts +1 -1
- package/lib/resources/external_gateways.js +794 -6
- package/lib/resources/external_payments.cjs +794 -6
- package/lib/resources/external_payments.d.cts +1 -1
- package/lib/resources/external_payments.d.ts +1 -1
- package/lib/resources/external_payments.js +794 -6
- package/lib/resources/external_promotions.cjs +794 -6
- package/lib/resources/external_promotions.d.cts +1 -1
- package/lib/resources/external_promotions.d.ts +1 -1
- package/lib/resources/external_promotions.js +794 -6
- package/lib/resources/external_tax_calculators.cjs +794 -6
- package/lib/resources/external_tax_calculators.d.cts +1 -1
- package/lib/resources/external_tax_calculators.d.ts +1 -1
- package/lib/resources/external_tax_calculators.js +794 -6
- package/lib/resources/fixed_amount_promotions.cjs +794 -6
- package/lib/resources/fixed_amount_promotions.d.cts +1 -1
- package/lib/resources/fixed_amount_promotions.d.ts +1 -1
- package/lib/resources/fixed_amount_promotions.js +794 -6
- package/lib/resources/fixed_price_promotions.cjs +794 -6
- package/lib/resources/fixed_price_promotions.d.cts +1 -1
- package/lib/resources/fixed_price_promotions.d.ts +1 -1
- package/lib/resources/fixed_price_promotions.js +794 -6
- package/lib/resources/flex_promotions.cjs +794 -6
- package/lib/resources/flex_promotions.d.cts +1 -1
- package/lib/resources/flex_promotions.d.ts +1 -1
- package/lib/resources/flex_promotions.js +794 -6
- package/lib/resources/free_gift_promotions.cjs +794 -6
- package/lib/resources/free_gift_promotions.d.cts +1 -1
- package/lib/resources/free_gift_promotions.d.ts +1 -1
- package/lib/resources/free_gift_promotions.js +794 -6
- package/lib/resources/free_shipping_promotions.cjs +794 -6
- package/lib/resources/free_shipping_promotions.d.cts +1 -1
- package/lib/resources/free_shipping_promotions.d.ts +1 -1
- package/lib/resources/free_shipping_promotions.js +794 -6
- package/lib/resources/geocoders.cjs +794 -6
- package/lib/resources/geocoders.d.cts +1 -1
- package/lib/resources/geocoders.d.ts +1 -1
- package/lib/resources/geocoders.js +794 -6
- package/lib/resources/gift_card_recipients.cjs +794 -6
- package/lib/resources/gift_card_recipients.d.cts +1 -1
- package/lib/resources/gift_card_recipients.d.ts +1 -1
- package/lib/resources/gift_card_recipients.js +794 -6
- package/lib/resources/gift_cards.cjs +794 -6
- package/lib/resources/gift_cards.d.cts +1 -1
- package/lib/resources/gift_cards.d.ts +1 -1
- package/lib/resources/gift_cards.js +794 -6
- package/lib/resources/google_geocoders.cjs +794 -6
- package/lib/resources/google_geocoders.d.cts +1 -1
- package/lib/resources/google_geocoders.d.ts +1 -1
- package/lib/resources/google_geocoders.js +794 -6
- package/lib/resources/imports.cjs +794 -6
- package/lib/resources/imports.d.cts +1 -1
- package/lib/resources/imports.d.ts +1 -1
- package/lib/resources/imports.js +794 -6
- package/lib/resources/in_stock_subscriptions.cjs +794 -6
- package/lib/resources/in_stock_subscriptions.d.cts +1 -1
- package/lib/resources/in_stock_subscriptions.d.ts +1 -1
- package/lib/resources/in_stock_subscriptions.js +794 -6
- package/lib/resources/inventory_models.cjs +794 -6
- package/lib/resources/inventory_models.d.cts +1 -1
- package/lib/resources/inventory_models.d.ts +1 -1
- package/lib/resources/inventory_models.js +794 -6
- package/lib/resources/inventory_return_locations.cjs +794 -6
- package/lib/resources/inventory_return_locations.d.cts +1 -1
- package/lib/resources/inventory_return_locations.d.ts +1 -1
- package/lib/resources/inventory_return_locations.js +794 -6
- package/lib/resources/inventory_stock_locations.cjs +794 -6
- package/lib/resources/inventory_stock_locations.d.cts +1 -1
- package/lib/resources/inventory_stock_locations.d.ts +1 -1
- package/lib/resources/inventory_stock_locations.js +794 -6
- package/lib/resources/klarna_gateways.cjs +794 -6
- package/lib/resources/klarna_gateways.d.cts +1 -1
- package/lib/resources/klarna_gateways.d.ts +1 -1
- package/lib/resources/klarna_gateways.js +794 -6
- package/lib/resources/klarna_payments.cjs +794 -6
- package/lib/resources/klarna_payments.d.cts +1 -1
- package/lib/resources/klarna_payments.d.ts +1 -1
- package/lib/resources/klarna_payments.js +794 -6
- package/lib/resources/line_item_options.cjs +794 -6
- package/lib/resources/line_item_options.d.cts +1 -1
- package/lib/resources/line_item_options.d.ts +1 -1
- package/lib/resources/line_item_options.js +794 -6
- package/lib/resources/line_items.cjs +794 -6
- package/lib/resources/line_items.d.cts +1 -1
- package/lib/resources/line_items.d.ts +1 -1
- package/lib/resources/line_items.js +794 -6
- package/lib/resources/links.cjs +794 -6
- package/lib/resources/links.d.cts +1 -1
- package/lib/resources/links.d.ts +1 -1
- package/lib/resources/links.js +794 -6
- package/lib/resources/manual_gateways.cjs +794 -6
- package/lib/resources/manual_gateways.d.cts +1 -1
- package/lib/resources/manual_gateways.d.ts +1 -1
- package/lib/resources/manual_gateways.js +794 -6
- package/lib/resources/manual_tax_calculators.cjs +794 -6
- package/lib/resources/manual_tax_calculators.d.cts +1 -1
- package/lib/resources/manual_tax_calculators.d.ts +1 -1
- package/lib/resources/manual_tax_calculators.js +794 -6
- package/lib/resources/markets.cjs +794 -6
- package/lib/resources/markets.d.cts +1 -1
- package/lib/resources/markets.d.ts +1 -1
- package/lib/resources/markets.js +794 -6
- package/lib/resources/merchants.cjs +794 -6
- package/lib/resources/merchants.d.cts +1 -1
- package/lib/resources/merchants.d.ts +1 -1
- package/lib/resources/merchants.js +794 -6
- package/lib/resources/notifications.cjs +794 -6
- package/lib/resources/notifications.d.cts +1 -1
- package/lib/resources/notifications.d.ts +1 -1
- package/lib/resources/notifications.js +794 -6
- package/lib/resources/order_amount_promotion_rules.cjs +794 -6
- package/lib/resources/order_amount_promotion_rules.d.cts +1 -1
- package/lib/resources/order_amount_promotion_rules.d.ts +1 -1
- package/lib/resources/order_amount_promotion_rules.js +794 -6
- package/lib/resources/order_copies.cjs +794 -6
- package/lib/resources/order_copies.d.cts +1 -1
- package/lib/resources/order_copies.d.ts +1 -1
- package/lib/resources/order_copies.js +794 -6
- package/lib/resources/order_factories.cjs +794 -6
- package/lib/resources/order_factories.d.cts +1 -1
- package/lib/resources/order_factories.d.ts +1 -1
- package/lib/resources/order_factories.js +794 -6
- package/lib/resources/order_subscription_items.cjs +794 -6
- package/lib/resources/order_subscription_items.d.cts +1 -1
- package/lib/resources/order_subscription_items.d.ts +1 -1
- package/lib/resources/order_subscription_items.js +794 -6
- package/lib/resources/order_subscriptions.cjs +794 -6
- package/lib/resources/order_subscriptions.d.cts +1 -1
- package/lib/resources/order_subscriptions.d.ts +1 -1
- package/lib/resources/order_subscriptions.js +794 -6
- package/lib/resources/orders.cjs +794 -6
- package/lib/resources/orders.d.cts +1 -1
- package/lib/resources/orders.d.ts +1 -1
- package/lib/resources/orders.js +794 -6
- package/lib/resources/organizations.cjs +786 -6
- package/lib/resources/organizations.d.cts +1 -1
- package/lib/resources/organizations.d.ts +1 -1
- package/lib/resources/organizations.js +786 -6
- package/lib/resources/packages.cjs +794 -6
- package/lib/resources/packages.d.cts +1 -1
- package/lib/resources/packages.d.ts +1 -1
- package/lib/resources/packages.js +794 -6
- package/lib/resources/parcel_line_items.cjs +794 -6
- package/lib/resources/parcel_line_items.d.cts +1 -1
- package/lib/resources/parcel_line_items.d.ts +1 -1
- package/lib/resources/parcel_line_items.js +794 -6
- package/lib/resources/parcels.cjs +794 -6
- package/lib/resources/parcels.d.cts +1 -1
- package/lib/resources/parcels.d.ts +1 -1
- package/lib/resources/parcels.js +794 -6
- package/lib/resources/payment_gateways.cjs +794 -6
- package/lib/resources/payment_gateways.d.cts +1 -1
- package/lib/resources/payment_gateways.d.ts +1 -1
- package/lib/resources/payment_gateways.js +794 -6
- package/lib/resources/payment_methods.cjs +794 -6
- package/lib/resources/payment_methods.d.cts +1 -1
- package/lib/resources/payment_methods.d.ts +1 -1
- package/lib/resources/payment_methods.js +794 -6
- package/lib/resources/payment_options.cjs +794 -6
- package/lib/resources/payment_options.d.cts +1 -1
- package/lib/resources/payment_options.d.ts +1 -1
- package/lib/resources/payment_options.js +794 -6
- package/lib/resources/paypal_gateways.cjs +794 -6
- package/lib/resources/paypal_gateways.d.cts +1 -1
- package/lib/resources/paypal_gateways.d.ts +1 -1
- package/lib/resources/paypal_gateways.js +794 -6
- package/lib/resources/paypal_payments.cjs +794 -6
- package/lib/resources/paypal_payments.d.cts +1 -1
- package/lib/resources/paypal_payments.d.ts +1 -1
- package/lib/resources/paypal_payments.js +794 -6
- package/lib/resources/percentage_discount_promotions.cjs +794 -6
- package/lib/resources/percentage_discount_promotions.d.cts +1 -1
- package/lib/resources/percentage_discount_promotions.d.ts +1 -1
- package/lib/resources/percentage_discount_promotions.js +794 -6
- package/lib/resources/pickups.cjs +794 -6
- package/lib/resources/pickups.d.cts +1 -1
- package/lib/resources/pickups.d.ts +1 -1
- package/lib/resources/pickups.js +794 -6
- package/lib/resources/price_frequency_tiers.cjs +794 -6
- package/lib/resources/price_frequency_tiers.d.cts +1 -1
- package/lib/resources/price_frequency_tiers.d.ts +1 -1
- package/lib/resources/price_frequency_tiers.js +794 -6
- package/lib/resources/price_list_schedulers.cjs +794 -6
- package/lib/resources/price_list_schedulers.d.cts +1 -1
- package/lib/resources/price_list_schedulers.d.ts +1 -1
- package/lib/resources/price_list_schedulers.js +794 -6
- package/lib/resources/price_lists.cjs +794 -6
- package/lib/resources/price_lists.d.cts +1 -1
- package/lib/resources/price_lists.d.ts +1 -1
- package/lib/resources/price_lists.js +794 -6
- package/lib/resources/price_tiers.cjs +794 -6
- package/lib/resources/price_tiers.d.cts +1 -1
- package/lib/resources/price_tiers.d.ts +1 -1
- package/lib/resources/price_tiers.js +794 -6
- package/lib/resources/price_volume_tiers.cjs +794 -6
- package/lib/resources/price_volume_tiers.d.cts +1 -1
- package/lib/resources/price_volume_tiers.d.ts +1 -1
- package/lib/resources/price_volume_tiers.js +794 -6
- package/lib/resources/prices.cjs +794 -6
- package/lib/resources/prices.d.cts +1 -1
- package/lib/resources/prices.d.ts +1 -1
- package/lib/resources/prices.js +794 -6
- package/lib/resources/promotion_rules.cjs +794 -6
- package/lib/resources/promotion_rules.d.cts +1 -1
- package/lib/resources/promotion_rules.d.ts +1 -1
- package/lib/resources/promotion_rules.js +794 -6
- package/lib/resources/promotions.cjs +794 -6
- package/lib/resources/promotions.d.cts +1 -1
- package/lib/resources/promotions.d.ts +1 -1
- package/lib/resources/promotions.js +794 -6
- package/lib/resources/recurring_order_copies.cjs +794 -6
- package/lib/resources/recurring_order_copies.d.cts +1 -1
- package/lib/resources/recurring_order_copies.d.ts +1 -1
- package/lib/resources/recurring_order_copies.js +794 -6
- package/lib/resources/refunds.cjs +794 -6
- package/lib/resources/refunds.d.cts +1 -1
- package/lib/resources/refunds.d.ts +1 -1
- package/lib/resources/refunds.js +794 -6
- package/lib/resources/reserved_stocks.cjs +794 -6
- package/lib/resources/reserved_stocks.d.cts +1 -1
- package/lib/resources/reserved_stocks.d.ts +1 -1
- package/lib/resources/reserved_stocks.js +794 -6
- package/lib/resources/resource_errors.cjs +794 -6
- package/lib/resources/resource_errors.d.cts +1 -1
- package/lib/resources/resource_errors.d.ts +1 -1
- package/lib/resources/resource_errors.js +794 -6
- package/lib/resources/return_line_items.cjs +794 -6
- package/lib/resources/return_line_items.d.cts +1 -1
- package/lib/resources/return_line_items.d.ts +1 -1
- package/lib/resources/return_line_items.js +794 -6
- package/lib/resources/returns.cjs +794 -6
- package/lib/resources/returns.d.cts +1 -1
- package/lib/resources/returns.d.ts +1 -1
- package/lib/resources/returns.js +794 -6
- package/lib/resources/satispay_gateways.cjs +794 -6
- package/lib/resources/satispay_gateways.d.cts +1 -1
- package/lib/resources/satispay_gateways.d.ts +1 -1
- package/lib/resources/satispay_gateways.js +794 -6
- package/lib/resources/satispay_payments.cjs +794 -6
- package/lib/resources/satispay_payments.d.cts +1 -1
- package/lib/resources/satispay_payments.d.ts +1 -1
- package/lib/resources/satispay_payments.js +794 -6
- package/lib/resources/shipments.cjs +794 -6
- package/lib/resources/shipments.d.cts +1 -1
- package/lib/resources/shipments.d.ts +1 -1
- package/lib/resources/shipments.js +794 -6
- package/lib/resources/shipping_categories.cjs +794 -6
- package/lib/resources/shipping_categories.d.cts +1 -1
- package/lib/resources/shipping_categories.d.ts +1 -1
- package/lib/resources/shipping_categories.js +794 -6
- package/lib/resources/shipping_method_tiers.cjs +794 -6
- package/lib/resources/shipping_method_tiers.d.cts +1 -1
- package/lib/resources/shipping_method_tiers.d.ts +1 -1
- package/lib/resources/shipping_method_tiers.js +794 -6
- package/lib/resources/shipping_methods.cjs +794 -6
- package/lib/resources/shipping_methods.d.cts +1 -1
- package/lib/resources/shipping_methods.d.ts +1 -1
- package/lib/resources/shipping_methods.js +794 -6
- package/lib/resources/shipping_weight_tiers.cjs +794 -6
- package/lib/resources/shipping_weight_tiers.d.cts +1 -1
- package/lib/resources/shipping_weight_tiers.d.ts +1 -1
- package/lib/resources/shipping_weight_tiers.js +794 -6
- package/lib/resources/shipping_zones.cjs +794 -6
- package/lib/resources/shipping_zones.d.cts +1 -1
- package/lib/resources/shipping_zones.d.ts +1 -1
- package/lib/resources/shipping_zones.js +794 -6
- package/lib/resources/sku_list_items.cjs +794 -6
- package/lib/resources/sku_list_items.d.cts +1 -1
- package/lib/resources/sku_list_items.d.ts +1 -1
- package/lib/resources/sku_list_items.js +794 -6
- package/lib/resources/sku_list_promotion_rules.cjs +794 -6
- package/lib/resources/sku_list_promotion_rules.d.cts +1 -1
- package/lib/resources/sku_list_promotion_rules.d.ts +1 -1
- package/lib/resources/sku_list_promotion_rules.js +794 -6
- package/lib/resources/sku_lists.cjs +794 -6
- package/lib/resources/sku_lists.d.cts +1 -1
- package/lib/resources/sku_lists.d.ts +1 -1
- package/lib/resources/sku_lists.js +794 -6
- package/lib/resources/sku_options.cjs +794 -6
- package/lib/resources/sku_options.d.cts +1 -1
- package/lib/resources/sku_options.d.ts +1 -1
- package/lib/resources/sku_options.js +794 -6
- package/lib/resources/skus.cjs +794 -6
- package/lib/resources/skus.d.cts +1 -1
- package/lib/resources/skus.d.ts +1 -1
- package/lib/resources/skus.js +794 -6
- package/lib/resources/stock_items.cjs +794 -6
- package/lib/resources/stock_items.d.cts +1 -1
- package/lib/resources/stock_items.d.ts +1 -1
- package/lib/resources/stock_items.js +794 -6
- package/lib/resources/stock_line_items.cjs +794 -6
- package/lib/resources/stock_line_items.d.cts +1 -1
- package/lib/resources/stock_line_items.d.ts +1 -1
- package/lib/resources/stock_line_items.js +794 -6
- package/lib/resources/stock_locations.cjs +794 -6
- package/lib/resources/stock_locations.d.cts +1 -1
- package/lib/resources/stock_locations.d.ts +1 -1
- package/lib/resources/stock_locations.js +794 -6
- package/lib/resources/stock_reservations.cjs +794 -6
- package/lib/resources/stock_reservations.d.cts +1 -1
- package/lib/resources/stock_reservations.d.ts +1 -1
- package/lib/resources/stock_reservations.js +794 -6
- package/lib/resources/stock_transfers.cjs +794 -6
- package/lib/resources/stock_transfers.d.cts +1 -1
- package/lib/resources/stock_transfers.d.ts +1 -1
- package/lib/resources/stock_transfers.js +794 -6
- package/lib/resources/stores.cjs +794 -6
- package/lib/resources/stores.d.cts +1 -1
- package/lib/resources/stores.d.ts +1 -1
- package/lib/resources/stores.js +794 -6
- package/lib/resources/stripe_gateways.cjs +794 -6
- package/lib/resources/stripe_gateways.d.cts +1 -1
- package/lib/resources/stripe_gateways.d.ts +1 -1
- package/lib/resources/stripe_gateways.js +794 -6
- package/lib/resources/stripe_payments.cjs +794 -6
- package/lib/resources/stripe_payments.d.cts +1 -1
- package/lib/resources/stripe_payments.d.ts +1 -1
- package/lib/resources/stripe_payments.js +794 -6
- package/lib/resources/stripe_tax_accounts.cjs +794 -6
- package/lib/resources/stripe_tax_accounts.d.cts +1 -1
- package/lib/resources/stripe_tax_accounts.d.ts +1 -1
- package/lib/resources/stripe_tax_accounts.js +794 -6
- package/lib/resources/subscription_models.cjs +794 -6
- package/lib/resources/subscription_models.d.cts +1 -1
- package/lib/resources/subscription_models.d.ts +1 -1
- package/lib/resources/subscription_models.js +794 -6
- package/lib/resources/tags.cjs +794 -6
- package/lib/resources/tags.d.cts +1 -1
- package/lib/resources/tags.d.ts +1 -1
- package/lib/resources/tags.js +794 -6
- package/lib/resources/talon_one_accounts.cjs +794 -6
- package/lib/resources/talon_one_accounts.d.cts +1 -1
- package/lib/resources/talon_one_accounts.d.ts +1 -1
- package/lib/resources/talon_one_accounts.js +794 -6
- package/lib/resources/tax_calculators.cjs +794 -6
- package/lib/resources/tax_calculators.d.cts +1 -1
- package/lib/resources/tax_calculators.d.ts +1 -1
- package/lib/resources/tax_calculators.js +794 -6
- package/lib/resources/tax_categories.cjs +794 -6
- package/lib/resources/tax_categories.d.cts +1 -1
- package/lib/resources/tax_categories.d.ts +1 -1
- package/lib/resources/tax_categories.js +794 -6
- package/lib/resources/tax_rules.cjs +794 -6
- package/lib/resources/tax_rules.d.cts +1 -1
- package/lib/resources/tax_rules.d.ts +1 -1
- package/lib/resources/tax_rules.js +794 -6
- package/lib/resources/taxjar_accounts.cjs +794 -6
- package/lib/resources/taxjar_accounts.d.cts +1 -1
- package/lib/resources/taxjar_accounts.d.ts +1 -1
- package/lib/resources/taxjar_accounts.js +794 -6
- package/lib/resources/transactions.cjs +794 -6
- package/lib/resources/transactions.d.cts +1 -1
- package/lib/resources/transactions.d.ts +1 -1
- package/lib/resources/transactions.js +794 -6
- package/lib/resources/versions.cjs +794 -6
- package/lib/resources/versions.d.cts +1 -1
- package/lib/resources/versions.d.ts +1 -1
- package/lib/resources/versions.js +794 -6
- package/lib/resources/vertex_accounts.cjs +794 -6
- package/lib/resources/vertex_accounts.d.cts +1 -1
- package/lib/resources/vertex_accounts.d.ts +1 -1
- package/lib/resources/vertex_accounts.js +794 -6
- package/lib/resources/voids.cjs +794 -6
- package/lib/resources/voids.d.cts +1 -1
- package/lib/resources/voids.d.ts +1 -1
- package/lib/resources/voids.js +794 -6
- package/lib/resources/webhooks.cjs +794 -6
- package/lib/resources/webhooks.d.cts +1 -1
- package/lib/resources/webhooks.d.ts +1 -1
- package/lib/resources/webhooks.js +794 -6
- package/lib/resources/wire_transfers.cjs +794 -6
- package/lib/resources/wire_transfers.d.cts +1 -1
- package/lib/resources/wire_transfers.d.ts +1 -1
- package/lib/resources/wire_transfers.js +794 -6
- package/lib/static.cjs +753 -20
- package/lib/static.d.cts +1 -1
- package/lib/static.d.ts +1 -1
- package/lib/static.js +739 -6
- package/lib/util.cjs +5 -6
- package/lib/util.js +5 -6
- package/package.json +1 -1
- package/lib/chunk-AQ5VUG5P.js +0 -12
- package/lib/chunk-JE77HYXB.cjs +0 -17
package/lib/query.cjs
CHANGED
@@ -1,27 +1,85 @@
|
|
1
1
|
'use strict';
|
2
2
|
|
3
|
-
require(
|
4
|
-
|
5
|
-
|
3
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
4
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
5
|
+
}) : x)(function(x) {
|
6
|
+
if (typeof require !== "undefined") return require.apply(this, arguments);
|
7
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
8
|
+
});
|
6
9
|
|
7
|
-
|
10
|
+
// src/debug.ts
|
11
|
+
var debuggerFunction = (_pattern, ..._args) => {
|
12
|
+
};
|
13
|
+
var debuggerFactory = (_namespace) => debuggerFunction;
|
14
|
+
try {
|
15
|
+
const debugModule = __require("debug");
|
16
|
+
if (debugModule && typeof debugModule === "function") debuggerFactory = debugModule;
|
17
|
+
} catch (error) {
|
18
|
+
}
|
19
|
+
var debugPrefix = "clsdk";
|
20
|
+
var debug = (namespace) => {
|
21
|
+
return debuggerFactory(`${debugPrefix}:${namespace}`);
|
22
|
+
};
|
23
|
+
var debug_default = debug;
|
8
24
|
|
9
|
-
|
25
|
+
// src/error.ts
|
26
|
+
var ErrorType = /* @__PURE__ */ ((ErrorType2) => {
|
27
|
+
ErrorType2["CLIENT"] = "client";
|
28
|
+
ErrorType2["REQUEST"] = "request";
|
29
|
+
ErrorType2["RESPONSE"] = "response";
|
30
|
+
ErrorType2["CANCEL"] = "cancel";
|
31
|
+
ErrorType2["PARSE"] = "parse";
|
32
|
+
ErrorType2["TIMEOUT"] = "timeout";
|
33
|
+
ErrorType2["TOKEN_REFRESH"] = "token-refresh";
|
34
|
+
return ErrorType2;
|
35
|
+
})(ErrorType || {});
|
36
|
+
var SdkError = class _SdkError extends Error {
|
37
|
+
static NAME = "SdkError";
|
38
|
+
static isSdkError(error) {
|
39
|
+
return error && [_SdkError.NAME, ApiError.NAME].includes(error.name) && Object.values(ErrorType).includes(error.type);
|
40
|
+
}
|
41
|
+
type;
|
42
|
+
code;
|
43
|
+
source;
|
44
|
+
constructor(error) {
|
45
|
+
super(error.message);
|
46
|
+
this.name = _SdkError.NAME;
|
47
|
+
this.type = error.type || "client" /* CLIENT */;
|
48
|
+
}
|
49
|
+
};
|
50
|
+
var ApiError = class _ApiError extends SdkError {
|
51
|
+
static NAME = "ApiError";
|
52
|
+
static isApiError(error) {
|
53
|
+
return SdkError.isSdkError(error) && error.name === _ApiError.NAME && error.type === "response" /* RESPONSE */;
|
54
|
+
}
|
55
|
+
errors = [];
|
56
|
+
status;
|
57
|
+
statusText;
|
58
|
+
// constructor(error: SdkError)
|
59
|
+
constructor(error) {
|
60
|
+
super({ ...error, type: "response" /* RESPONSE */ });
|
61
|
+
this.name = _ApiError.NAME;
|
62
|
+
}
|
63
|
+
first() {
|
64
|
+
return this.errors?.length > 0 ? this.errors[0] : void 0;
|
65
|
+
}
|
66
|
+
};
|
10
67
|
|
11
|
-
|
12
|
-
|
13
|
-
|
68
|
+
// src/query.ts
|
69
|
+
var debug2 = debug_default("query");
|
70
|
+
var arrayFilters = ["_any", "_all", "_in", "_not_in_or_null"];
|
71
|
+
var isArrayFilter = (filter) => {
|
14
72
|
return arrayFilters.some((f) => filter.endsWith(f));
|
15
73
|
};
|
16
|
-
|
17
|
-
|
74
|
+
var objectFilters = ["_jcont"];
|
75
|
+
var isObjectFilter = (filter) => {
|
18
76
|
return objectFilters.some((f) => filter.endsWith(f));
|
19
77
|
};
|
20
|
-
|
78
|
+
var isParamsList = (params) => {
|
21
79
|
return params && (params.filters || params.pageNumber || params.pageSize || params.sort);
|
22
80
|
};
|
23
|
-
|
24
|
-
|
81
|
+
var generateQueryStringParams = (params, res) => {
|
82
|
+
debug2("generate query string params: %O, %O", params, res);
|
25
83
|
const qp = {};
|
26
84
|
if (!params) return qp;
|
27
85
|
if (params.include) qp.include = params.include.join(",");
|
@@ -42,20 +100,20 @@ const generateQueryStringParams = (params, res) => {
|
|
42
100
|
Object.entries(params.filters).forEach(([p, v]) => {
|
43
101
|
let val;
|
44
102
|
if (Array.isArray(v)) {
|
45
|
-
if (!isArrayFilter(p)) throw new
|
103
|
+
if (!isArrayFilter(p)) throw new SdkError({ message: `Incorrect filter [${p}]: Array value is supported only for the following filters: ${arrayFilters.join(", ")}`, type: "request" /* REQUEST */ });
|
46
104
|
val = v.join(",");
|
47
105
|
} else if (typeof v === "object") {
|
48
|
-
if (!isObjectFilter(p)) throw new
|
106
|
+
if (!isObjectFilter(p)) throw new SdkError({ message: `Incorrect filter [${p}]: Object value is supported only for the following filters: ${objectFilters.join(", ")}`, type: "request" /* REQUEST */ });
|
49
107
|
val = JSON.stringify(v);
|
50
108
|
} else val = String(v);
|
51
109
|
qp[`filter[q][${p}]`] = val;
|
52
110
|
});
|
53
111
|
}
|
54
112
|
}
|
55
|
-
|
113
|
+
debug2("query string params: %O", qp);
|
56
114
|
return qp;
|
57
115
|
};
|
58
|
-
|
116
|
+
var generateSearchString = (params, questionMark = true) => {
|
59
117
|
if (!params || Object.keys(params).length === 0) return "";
|
60
118
|
return `${questionMark ? "?" : ""}${Object.entries(params).map(([key, val]) => `${key}=${String(val)}`).join("&")}`;
|
61
119
|
};
|
package/lib/query.d.cts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { a as QueryFields, h as QueryFilter, Q as QueryInclude, e as QueryPageNumber, f as QueryPageSize, d as QueryParams, c as QueryParamsList, b as QueryParamsRetrieve, g as QuerySort, lH as generateQueryStringParams, lJ as generateSearchString, lI as isParamsList } from './api-CRmSToGa.cjs';
|
2
2
|
import './types.cjs';
|
3
3
|
import './client.cjs';
|
4
4
|
import './interceptor-5MISI1yn.cjs';
|
package/lib/query.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { a as QueryFields, h as QueryFilter, Q as QueryInclude, e as QueryPageNumber, f as QueryPageSize, d as QueryParams, c as QueryParamsList, b as QueryParamsRetrieve, g as QuerySort, lH as generateQueryStringParams, lJ as generateSearchString, lI as isParamsList } from './api-CUXmETkx.js';
|
2
2
|
import './types.js';
|
3
3
|
import './client.js';
|
4
4
|
import './interceptor-5MISI1yn.js';
|
package/lib/query.js
CHANGED
@@ -1,21 +1,83 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
2
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
3
|
+
}) : x)(function(x) {
|
4
|
+
if (typeof require !== "undefined") return require.apply(this, arguments);
|
5
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
6
|
+
});
|
4
7
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
+
// src/debug.ts
|
9
|
+
var debuggerFunction = (_pattern, ..._args) => {
|
10
|
+
};
|
11
|
+
var debuggerFactory = (_namespace) => debuggerFunction;
|
12
|
+
try {
|
13
|
+
const debugModule = __require("debug");
|
14
|
+
if (debugModule && typeof debugModule === "function") debuggerFactory = debugModule;
|
15
|
+
} catch (error) {
|
16
|
+
}
|
17
|
+
var debugPrefix = "clsdk";
|
18
|
+
var debug = (namespace) => {
|
19
|
+
return debuggerFactory(`${debugPrefix}:${namespace}`);
|
20
|
+
};
|
21
|
+
var debug_default = debug;
|
22
|
+
|
23
|
+
// src/error.ts
|
24
|
+
var ErrorType = /* @__PURE__ */ ((ErrorType2) => {
|
25
|
+
ErrorType2["CLIENT"] = "client";
|
26
|
+
ErrorType2["REQUEST"] = "request";
|
27
|
+
ErrorType2["RESPONSE"] = "response";
|
28
|
+
ErrorType2["CANCEL"] = "cancel";
|
29
|
+
ErrorType2["PARSE"] = "parse";
|
30
|
+
ErrorType2["TIMEOUT"] = "timeout";
|
31
|
+
ErrorType2["TOKEN_REFRESH"] = "token-refresh";
|
32
|
+
return ErrorType2;
|
33
|
+
})(ErrorType || {});
|
34
|
+
var SdkError = class _SdkError extends Error {
|
35
|
+
static NAME = "SdkError";
|
36
|
+
static isSdkError(error) {
|
37
|
+
return error && [_SdkError.NAME, ApiError.NAME].includes(error.name) && Object.values(ErrorType).includes(error.type);
|
38
|
+
}
|
39
|
+
type;
|
40
|
+
code;
|
41
|
+
source;
|
42
|
+
constructor(error) {
|
43
|
+
super(error.message);
|
44
|
+
this.name = _SdkError.NAME;
|
45
|
+
this.type = error.type || "client" /* CLIENT */;
|
46
|
+
}
|
47
|
+
};
|
48
|
+
var ApiError = class _ApiError extends SdkError {
|
49
|
+
static NAME = "ApiError";
|
50
|
+
static isApiError(error) {
|
51
|
+
return SdkError.isSdkError(error) && error.name === _ApiError.NAME && error.type === "response" /* RESPONSE */;
|
52
|
+
}
|
53
|
+
errors = [];
|
54
|
+
status;
|
55
|
+
statusText;
|
56
|
+
// constructor(error: SdkError)
|
57
|
+
constructor(error) {
|
58
|
+
super({ ...error, type: "response" /* RESPONSE */ });
|
59
|
+
this.name = _ApiError.NAME;
|
60
|
+
}
|
61
|
+
first() {
|
62
|
+
return this.errors?.length > 0 ? this.errors[0] : void 0;
|
63
|
+
}
|
64
|
+
};
|
65
|
+
|
66
|
+
// src/query.ts
|
67
|
+
var debug2 = debug_default("query");
|
68
|
+
var arrayFilters = ["_any", "_all", "_in", "_not_in_or_null"];
|
69
|
+
var isArrayFilter = (filter) => {
|
8
70
|
return arrayFilters.some((f) => filter.endsWith(f));
|
9
71
|
};
|
10
|
-
|
11
|
-
|
72
|
+
var objectFilters = ["_jcont"];
|
73
|
+
var isObjectFilter = (filter) => {
|
12
74
|
return objectFilters.some((f) => filter.endsWith(f));
|
13
75
|
};
|
14
|
-
|
76
|
+
var isParamsList = (params) => {
|
15
77
|
return params && (params.filters || params.pageNumber || params.pageSize || params.sort);
|
16
78
|
};
|
17
|
-
|
18
|
-
|
79
|
+
var generateQueryStringParams = (params, res) => {
|
80
|
+
debug2("generate query string params: %O, %O", params, res);
|
19
81
|
const qp = {};
|
20
82
|
if (!params) return qp;
|
21
83
|
if (params.include) qp.include = params.include.join(",");
|
@@ -36,20 +98,20 @@ const generateQueryStringParams = (params, res) => {
|
|
36
98
|
Object.entries(params.filters).forEach(([p, v]) => {
|
37
99
|
let val;
|
38
100
|
if (Array.isArray(v)) {
|
39
|
-
if (!isArrayFilter(p)) throw new SdkError({ message: `Incorrect filter [${p}]: Array value is supported only for the following filters: ${arrayFilters.join(", ")}`, type:
|
101
|
+
if (!isArrayFilter(p)) throw new SdkError({ message: `Incorrect filter [${p}]: Array value is supported only for the following filters: ${arrayFilters.join(", ")}`, type: "request" /* REQUEST */ });
|
40
102
|
val = v.join(",");
|
41
103
|
} else if (typeof v === "object") {
|
42
|
-
if (!isObjectFilter(p)) throw new SdkError({ message: `Incorrect filter [${p}]: Object value is supported only for the following filters: ${objectFilters.join(", ")}`, type:
|
104
|
+
if (!isObjectFilter(p)) throw new SdkError({ message: `Incorrect filter [${p}]: Object value is supported only for the following filters: ${objectFilters.join(", ")}`, type: "request" /* REQUEST */ });
|
43
105
|
val = JSON.stringify(v);
|
44
106
|
} else val = String(v);
|
45
107
|
qp[`filter[q][${p}]`] = val;
|
46
108
|
});
|
47
109
|
}
|
48
110
|
}
|
49
|
-
|
111
|
+
debug2("query string params: %O", qp);
|
50
112
|
return qp;
|
51
113
|
};
|
52
|
-
|
114
|
+
var generateSearchString = (params, questionMark = true) => {
|
53
115
|
if (!params || Object.keys(params).length === 0) return "";
|
54
116
|
return `${questionMark ? "?" : ""}${Object.entries(params).map(([key, val]) => `${key}=${String(val)}`).join("&")}`;
|
55
117
|
};
|