@commercelayer/sdk 4.2.0-beta.1 → 4.3.0-alpha.1
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/LICENSE +1 -1
- package/lib/{cjs/api.d.ts → api.d.ts} +5 -3
- package/lib/api.js +1 -0
- package/lib/{esm/client.d.ts → client.d.ts} +8 -3
- package/lib/client.js +1 -0
- package/lib/{cjs/commercelayer.d.ts → commercelayer.d.ts} +4 -2
- package/lib/commercelayer.js +1 -0
- package/lib/{cjs/common.d.ts → common.d.ts} +0 -0
- package/lib/common.js +1 -0
- package/lib/{cjs/config.d.ts → config.d.ts} +0 -0
- package/lib/{esm/config.js → config.js} +0 -0
- package/lib/{cjs/debug.d.ts → debug.d.ts} +0 -0
- package/lib/{esm/debug.js → debug.js} +0 -0
- package/lib/{cjs/error.d.ts → error.d.ts} +0 -0
- package/lib/error.js +1 -0
- package/lib/{cjs/index.d.ts → index.d.ts} +0 -0
- package/lib/{esm/index.js → index.js} +0 -0
- package/lib/{cjs/interceptor.d.ts → interceptor.d.ts} +0 -0
- package/lib/{esm/interceptor.js → interceptor.js} +0 -0
- package/lib/{cjs/jsonapi.d.ts → jsonapi.d.ts} +2 -2
- package/lib/jsonapi.js +1 -0
- package/lib/{esm/model.d.ts → model.d.ts} +3 -1
- package/lib/{esm/model.js → model.js} +0 -0
- package/lib/{cjs/query.d.ts → query.d.ts} +0 -0
- package/lib/{esm/query.js → query.js} +0 -0
- package/lib/{esm/resource.d.ts → resource.d.ts} +9 -4
- package/lib/resource.js +1 -0
- package/lib/{esm/resources → resources}/addresses.d.ts +6 -5
- package/lib/resources/addresses.js +1 -0
- package/lib/{cjs/resources → resources}/adjustments.d.ts +4 -4
- package/lib/resources/adjustments.js +1 -0
- package/lib/{esm/resources → resources}/adyen_gateways.d.ts +7 -5
- package/lib/resources/adyen_gateways.js +1 -0
- package/lib/{cjs/resources → resources}/adyen_payments.d.ts +7 -5
- package/lib/resources/adyen_payments.js +1 -0
- package/lib/{cjs/resources → resources}/application.d.ts +4 -4
- package/lib/{esm/resources → resources}/application.js +1 -1
- package/lib/{esm/resources → resources}/attachments.d.ts +34 -34
- package/lib/resources/attachments.js +1 -0
- package/lib/{esm/resources → resources}/authorizations.d.ts +7 -4
- package/lib/resources/authorizations.js +1 -0
- package/lib/{cjs/resources → resources}/avalara_accounts.d.ts +8 -5
- package/lib/resources/avalara_accounts.js +1 -0
- package/lib/{cjs/resources → resources}/billing_info_validation_rules.d.ts +6 -5
- package/lib/resources/billing_info_validation_rules.js +1 -0
- package/lib/{esm/resources → resources}/bing_geocoders.d.ts +6 -4
- package/lib/resources/bing_geocoders.js +1 -0
- package/lib/{esm/resources → resources}/braintree_gateways.d.ts +7 -5
- package/lib/resources/braintree_gateways.js +1 -0
- package/lib/{cjs/resources → resources}/braintree_payments.d.ts +7 -5
- package/lib/resources/braintree_payments.js +1 -0
- package/lib/{esm/resources → resources}/bundles.d.ts +15 -6
- package/lib/resources/bundles.js +1 -0
- package/lib/{esm/resources → resources}/captures.d.ts +7 -4
- package/lib/resources/captures.js +1 -0
- package/lib/{esm/resources → resources}/carrier_accounts.d.ts +6 -4
- package/lib/resources/carrier_accounts.js +1 -0
- package/lib/{cjs/resources → resources}/checkout_com_gateways.d.ts +7 -5
- package/lib/resources/checkout_com_gateways.js +1 -0
- package/lib/{cjs/resources → resources}/checkout_com_payments.d.ts +7 -5
- package/lib/resources/checkout_com_payments.js +1 -0
- package/lib/{cjs/resources → resources}/coupon_codes_promotion_rules.d.ts +12 -11
- package/lib/resources/coupon_codes_promotion_rules.js +1 -0
- package/lib/{esm/resources → resources}/coupon_recipients.d.ts +7 -5
- package/lib/resources/coupon_recipients.js +1 -0
- package/lib/{cjs/resources → resources}/coupons.d.ts +6 -5
- package/lib/resources/coupons.js +1 -0
- package/lib/{esm/resources → resources}/customer_addresses.d.ts +8 -6
- package/lib/resources/customer_addresses.js +1 -0
- package/lib/{esm/resources → resources}/customer_groups.d.ts +7 -4
- package/lib/resources/customer_groups.js +1 -0
- package/lib/{esm/resources → resources}/customer_password_resets.d.ts +5 -4
- package/lib/resources/customer_password_resets.js +1 -0
- package/lib/{cjs/resources → resources}/customer_payment_sources.d.ts +20 -15
- package/lib/resources/customer_payment_sources.js +1 -0
- package/lib/{cjs/resources → resources}/customer_subscriptions.d.ts +5 -4
- package/lib/resources/customer_subscriptions.js +1 -0
- package/lib/{esm/resources → resources}/customers.d.ts +13 -5
- package/lib/resources/customers.js +1 -0
- package/lib/{esm/resources → resources}/delivery_lead_times.d.ts +9 -6
- package/lib/resources/delivery_lead_times.js +1 -0
- package/lib/{esm/resources → resources}/event_callbacks.d.ts +5 -4
- package/lib/resources/event_callbacks.js +1 -0
- package/lib/{cjs/resources → resources}/external_gateways.d.ts +9 -4
- package/lib/resources/external_gateways.js +1 -0
- package/lib/{esm/resources → resources}/external_payments.d.ts +10 -5
- package/lib/resources/external_payments.js +1 -0
- package/lib/{esm/resources → resources}/external_promotions.d.ts +17 -9
- package/lib/resources/external_promotions.js +1 -0
- package/lib/{cjs/resources → resources}/external_tax_calculators.d.ts +8 -5
- package/lib/resources/external_tax_calculators.js +1 -0
- package/lib/{esm/resources → resources}/fixed_amount_promotions.d.ts +17 -9
- package/lib/resources/fixed_amount_promotions.js +1 -0
- package/lib/{esm/resources → resources}/fixed_price_promotions.d.ts +20 -10
- package/lib/resources/fixed_price_promotions.js +1 -0
- package/lib/{cjs/resources → resources}/free_gift_promotions.d.ts +20 -10
- package/lib/resources/free_gift_promotions.js +1 -0
- package/lib/{cjs/resources → resources}/free_shipping_promotions.d.ts +17 -9
- package/lib/resources/free_shipping_promotions.js +1 -0
- package/lib/{cjs/resources → resources}/geocoders.d.ts +6 -4
- package/lib/resources/geocoders.js +1 -0
- package/lib/{cjs/resources → resources}/gift_card_recipients.d.ts +7 -5
- package/lib/resources/gift_card_recipients.js +1 -0
- package/lib/{cjs/resources → resources}/gift_cards.d.ts +10 -7
- package/lib/resources/gift_cards.js +1 -0
- package/lib/{esm/resources → resources}/google_geocoders.d.ts +6 -4
- package/lib/resources/google_geocoders.js +1 -0
- package/lib/{esm/resources → resources}/imports.d.ts +4 -4
- package/lib/resources/imports.js +1 -0
- package/lib/{esm/resources → resources}/in_stock_subscriptions.d.ts +10 -7
- package/lib/resources/in_stock_subscriptions.js +1 -0
- package/lib/{cjs/resources → resources}/inventory_models.d.ts +7 -4
- package/lib/resources/inventory_models.js +1 -0
- package/lib/{cjs/resources → resources}/inventory_return_locations.d.ts +8 -6
- package/lib/resources/inventory_return_locations.js +1 -0
- package/lib/{cjs/resources → resources}/inventory_stock_locations.d.ts +8 -6
- package/lib/resources/inventory_stock_locations.js +1 -0
- package/lib/resources/klarna_gateways.d.ts +44 -0
- package/lib/resources/klarna_gateways.js +1 -0
- package/lib/resources/klarna_payments.d.ts +41 -0
- package/lib/resources/klarna_payments.js +1 -0
- package/lib/{cjs/resources → resources}/line_item_options.d.ts +8 -6
- package/lib/resources/line_item_options.js +1 -0
- package/lib/{esm/resources → resources}/line_items.d.ts +19 -15
- package/lib/resources/line_items.js +1 -0
- package/lib/{cjs/resources → resources}/manual_gateways.d.ts +5 -4
- package/lib/resources/manual_gateways.js +1 -0
- package/lib/{cjs/resources → resources}/manual_tax_calculators.d.ts +10 -6
- package/lib/resources/manual_tax_calculators.js +1 -0
- package/lib/{esm/resources → resources}/markets.d.ts +15 -9
- package/lib/resources/markets.js +1 -0
- package/lib/{cjs/resources → resources}/merchants.d.ts +7 -5
- package/lib/resources/merchants.js +1 -0
- package/lib/{cjs/resources → resources}/order_amount_promotion_rules.d.ts +10 -10
- package/lib/resources/order_amount_promotion_rules.js +1 -0
- package/lib/{cjs/resources → resources}/order_copies.d.ts +8 -5
- package/lib/resources/order_copies.js +1 -0
- package/lib/{cjs/resources → resources}/order_subscriptions.d.ts +11 -6
- package/lib/resources/order_subscriptions.js +1 -0
- package/lib/{cjs/resources → resources}/order_validation_rules.d.ts +5 -4
- package/lib/resources/order_validation_rules.js +1 -0
- package/lib/{cjs/resources → resources}/orders.d.ts +38 -18
- package/lib/resources/orders.js +1 -0
- package/lib/{esm/resources → resources}/organization.d.ts +4 -4
- package/lib/{esm/resources → resources}/organization.js +1 -1
- package/lib/{esm/resources → resources}/packages.d.ts +8 -5
- package/lib/resources/packages.js +1 -0
- package/lib/{cjs/resources → resources}/parcel_line_items.d.ts +8 -6
- package/lib/resources/parcel_line_items.js +1 -0
- package/lib/{esm/resources → resources}/parcels.d.ts +10 -6
- package/lib/resources/parcels.js +1 -0
- package/lib/{esm/resources → resources}/payment_gateways.d.ts +5 -4
- package/lib/resources/payment_gateways.js +1 -0
- package/lib/{esm/resources → resources}/payment_methods.d.ts +13 -7
- package/lib/resources/payment_methods.js +1 -0
- package/lib/{esm/resources → resources}/paypal_gateways.d.ts +6 -4
- package/lib/resources/paypal_gateways.js +1 -0
- package/lib/{esm/resources → resources}/paypal_payments.d.ts +7 -5
- package/lib/resources/paypal_payments.js +1 -0
- package/lib/{esm/resources → resources}/percentage_discount_promotions.d.ts +20 -10
- package/lib/resources/percentage_discount_promotions.js +1 -0
- package/lib/{cjs/resources → resources}/price_lists.d.ts +6 -4
- package/lib/resources/price_lists.js +1 -0
- package/lib/{cjs/resources → resources}/prices.d.ts +9 -6
- package/lib/resources/prices.js +1 -0
- package/lib/{esm/resources → resources}/promotion_rules.d.ts +4 -4
- package/lib/{esm/resources → resources}/promotion_rules.js +1 -1
- package/lib/{esm/resources → resources}/promotions.d.ts +10 -4
- package/lib/resources/promotions.js +1 -0
- package/lib/{cjs/resources → resources}/refunds.d.ts +6 -4
- package/lib/resources/refunds.js +1 -0
- package/lib/{cjs/resources → resources}/return_line_items.d.ts +8 -6
- package/lib/resources/return_line_items.js +1 -0
- package/lib/{esm/resources → resources}/returns.d.ts +13 -6
- package/lib/resources/returns.js +1 -0
- package/lib/{cjs/resources → resources}/shipments.d.ts +18 -5
- package/lib/resources/shipments.js +1 -0
- package/lib/{cjs/resources → resources}/shipping_categories.d.ts +6 -4
- package/lib/resources/shipping_categories.js +1 -0
- package/lib/{esm/resources → resources}/shipping_methods.d.ts +16 -9
- package/lib/resources/shipping_methods.js +1 -0
- package/lib/{esm/resources → resources}/shipping_zones.d.ts +5 -4
- package/lib/resources/shipping_zones.js +1 -0
- package/lib/{cjs/resources → resources}/sku_list_items.d.ts +8 -6
- package/lib/resources/sku_list_items.js +1 -0
- package/lib/{cjs/resources → resources}/sku_list_promotion_rules.d.ts +13 -11
- package/lib/resources/sku_list_promotion_rules.js +1 -0
- package/lib/{esm/resources → resources}/sku_lists.d.ts +7 -4
- package/lib/resources/sku_lists.js +1 -0
- package/lib/{cjs/resources → resources}/sku_options.d.ts +10 -5
- package/lib/resources/sku_options.js +1 -0
- package/lib/{cjs/resources → resources}/skus.d.ts +11 -5
- package/lib/resources/skus.js +1 -0
- package/lib/{esm/resources → resources}/stock_items.d.ts +9 -6
- package/lib/resources/stock_items.js +1 -0
- package/lib/{esm/resources → resources}/stock_line_items.d.ts +7 -4
- package/lib/resources/stock_line_items.js +1 -0
- package/lib/{esm/resources → resources}/stock_locations.d.ts +11 -5
- package/lib/resources/stock_locations.js +1 -0
- package/lib/{esm/resources → resources}/stock_transfers.d.ts +13 -8
- package/lib/resources/stock_transfers.js +1 -0
- package/lib/{cjs/resources → resources}/stripe_gateways.d.ts +6 -4
- package/lib/resources/stripe_gateways.js +1 -0
- package/lib/{esm/resources → resources}/stripe_payments.d.ts +7 -5
- package/lib/resources/stripe_payments.js +1 -0
- package/lib/{esm/resources → resources}/tax_calculators.d.ts +7 -4
- package/lib/resources/tax_calculators.js +1 -0
- package/lib/{esm/resources → resources}/tax_categories.d.ts +11 -9
- package/lib/resources/tax_categories.js +1 -0
- package/lib/{cjs/resources → resources}/tax_rules.d.ts +6 -5
- package/lib/resources/tax_rules.js +1 -0
- package/lib/{esm/resources → resources}/taxjar_accounts.d.ts +8 -5
- package/lib/resources/taxjar_accounts.js +1 -0
- package/lib/{esm/resources → resources}/transactions.d.ts +5 -4
- package/lib/resources/transactions.js +1 -0
- package/lib/{esm/resources → resources}/voids.d.ts +6 -4
- package/lib/resources/voids.js +1 -0
- package/lib/{cjs/resources → resources}/webhooks.d.ts +5 -4
- package/lib/resources/webhooks.js +1 -0
- package/lib/{cjs/resources → resources}/wire_transfers.d.ts +6 -5
- package/lib/resources/wire_transfers.js +1 -0
- package/lib/{cjs/static.d.ts → static.d.ts} +0 -0
- package/lib/{esm/static.js → static.js} +0 -0
- package/lib/{cjs/util.d.ts → util.d.ts} +0 -0
- package/lib/{esm/util.js → util.js} +0 -0
- package/package.json +16 -17
- package/lib/cjs/api.js +0 -1
- package/lib/cjs/client.d.ts +0 -27
- package/lib/cjs/client.js +0 -1
- package/lib/cjs/commercelayer.js +0 -1
- package/lib/cjs/common.js +0 -1
- package/lib/cjs/config.js +0 -1
- package/lib/cjs/debug.js +0 -1
- package/lib/cjs/error.js +0 -1
- package/lib/cjs/index.js +0 -1
- package/lib/cjs/interceptor.js +0 -1
- package/lib/cjs/jsonapi.js +0 -1
- package/lib/cjs/model.d.ts +0 -99
- package/lib/cjs/model.js +0 -1
- package/lib/cjs/query.js +0 -1
- package/lib/cjs/resource.d.ts +0 -71
- package/lib/cjs/resource.js +0 -1
- package/lib/cjs/resources/addresses.d.ts +0 -87
- package/lib/cjs/resources/addresses.js +0 -1
- package/lib/cjs/resources/adjustments.js +0 -1
- package/lib/cjs/resources/adyen_gateways.d.ts +0 -45
- package/lib/cjs/resources/adyen_gateways.js +0 -1
- package/lib/cjs/resources/adyen_payments.js +0 -1
- package/lib/cjs/resources/application.js +0 -1
- package/lib/cjs/resources/attachments.d.ts +0 -156
- package/lib/cjs/resources/attachments.js +0 -1
- package/lib/cjs/resources/authorizations.d.ts +0 -54
- package/lib/cjs/resources/authorizations.js +0 -1
- package/lib/cjs/resources/avalara_accounts.js +0 -1
- package/lib/cjs/resources/billing_info_validation_rules.js +0 -1
- package/lib/cjs/resources/bing_geocoders.d.ts +0 -33
- package/lib/cjs/resources/bing_geocoders.js +0 -1
- package/lib/cjs/resources/braintree_gateways.d.ts +0 -54
- package/lib/cjs/resources/braintree_gateways.js +0 -1
- package/lib/cjs/resources/braintree_payments.js +0 -1
- package/lib/cjs/resources/bundles.d.ts +0 -65
- package/lib/cjs/resources/bundles.js +0 -1
- package/lib/cjs/resources/captures.d.ts +0 -45
- package/lib/cjs/resources/captures.js +0 -1
- package/lib/cjs/resources/carrier_accounts.d.ts +0 -24
- package/lib/cjs/resources/carrier_accounts.js +0 -1
- package/lib/cjs/resources/checkout_com_gateways.js +0 -1
- package/lib/cjs/resources/checkout_com_payments.js +0 -1
- package/lib/cjs/resources/coupon_codes_promotion_rules.js +0 -1
- package/lib/cjs/resources/coupon_recipients.d.ts +0 -42
- package/lib/cjs/resources/coupon_recipients.js +0 -1
- package/lib/cjs/resources/coupons.js +0 -1
- package/lib/cjs/resources/customer_addresses.d.ts +0 -39
- package/lib/cjs/resources/customer_addresses.js +0 -1
- package/lib/cjs/resources/customer_groups.d.ts +0 -33
- package/lib/cjs/resources/customer_groups.js +0 -1
- package/lib/cjs/resources/customer_password_resets.d.ts +0 -32
- package/lib/cjs/resources/customer_password_resets.js +0 -1
- package/lib/cjs/resources/customer_payment_sources.js +0 -1
- package/lib/cjs/resources/customer_subscriptions.js +0 -1
- package/lib/cjs/resources/customers.d.ts +0 -52
- package/lib/cjs/resources/customers.js +0 -1
- package/lib/cjs/resources/delivery_lead_times.d.ts +0 -48
- package/lib/cjs/resources/delivery_lead_times.js +0 -1
- package/lib/cjs/resources/event_callbacks.d.ts +0 -23
- package/lib/cjs/resources/event_callbacks.js +0 -1
- package/lib/cjs/resources/external_gateways.js +0 -1
- package/lib/cjs/resources/external_payments.d.ts +0 -38
- package/lib/cjs/resources/external_payments.js +0 -1
- package/lib/cjs/resources/external_promotions.d.ts +0 -78
- package/lib/cjs/resources/external_promotions.js +0 -1
- package/lib/cjs/resources/external_tax_calculators.js +0 -1
- package/lib/cjs/resources/fixed_amount_promotions.d.ts +0 -80
- package/lib/cjs/resources/fixed_amount_promotions.js +0 -1
- package/lib/cjs/resources/fixed_price_promotions.d.ts +0 -89
- package/lib/cjs/resources/fixed_price_promotions.js +0 -1
- package/lib/cjs/resources/free_gift_promotions.js +0 -1
- package/lib/cjs/resources/free_shipping_promotions.js +0 -1
- package/lib/cjs/resources/geocoders.js +0 -1
- package/lib/cjs/resources/gift_card_recipients.js +0 -1
- package/lib/cjs/resources/gift_cards.js +0 -1
- package/lib/cjs/resources/google_geocoders.d.ts +0 -33
- package/lib/cjs/resources/google_geocoders.js +0 -1
- package/lib/cjs/resources/imports.d.ts +0 -40
- package/lib/cjs/resources/imports.js +0 -1
- package/lib/cjs/resources/in_stock_subscriptions.d.ts +0 -56
- package/lib/cjs/resources/in_stock_subscriptions.js +0 -1
- package/lib/cjs/resources/inventory_models.js +0 -1
- package/lib/cjs/resources/inventory_return_locations.js +0 -1
- package/lib/cjs/resources/inventory_stock_locations.js +0 -1
- package/lib/cjs/resources/line_item_options.js +0 -1
- package/lib/cjs/resources/line_items.d.ts +0 -121
- package/lib/cjs/resources/line_items.js +0 -1
- package/lib/cjs/resources/manual_gateways.js +0 -1
- package/lib/cjs/resources/manual_tax_calculators.js +0 -1
- package/lib/cjs/resources/markets.d.ts +0 -75
- package/lib/cjs/resources/markets.js +0 -1
- package/lib/cjs/resources/merchants.js +0 -1
- package/lib/cjs/resources/order_amount_promotion_rules.js +0 -1
- package/lib/cjs/resources/order_copies.js +0 -1
- package/lib/cjs/resources/order_subscriptions.js +0 -1
- package/lib/cjs/resources/order_validation_rules.js +0 -1
- package/lib/cjs/resources/orders.js +0 -1
- package/lib/cjs/resources/organization.d.ts +0 -32
- package/lib/cjs/resources/organization.js +0 -1
- package/lib/cjs/resources/packages.d.ts +0 -53
- package/lib/cjs/resources/packages.js +0 -1
- package/lib/cjs/resources/parcel_line_items.js +0 -1
- package/lib/cjs/resources/parcels.d.ts +0 -104
- package/lib/cjs/resources/parcels.js +0 -1
- package/lib/cjs/resources/payment_gateways.d.ts +0 -20
- package/lib/cjs/resources/payment_gateways.js +0 -1
- package/lib/cjs/resources/payment_methods.d.ts +0 -53
- package/lib/cjs/resources/payment_methods.js +0 -1
- package/lib/cjs/resources/paypal_gateways.d.ts +0 -37
- package/lib/cjs/resources/paypal_gateways.js +0 -1
- package/lib/cjs/resources/paypal_payments.d.ts +0 -45
- package/lib/cjs/resources/paypal_payments.js +0 -1
- package/lib/cjs/resources/percentage_discount_promotions.d.ts +0 -87
- package/lib/cjs/resources/percentage_discount_promotions.js +0 -1
- package/lib/cjs/resources/price_lists.js +0 -1
- package/lib/cjs/resources/prices.js +0 -1
- package/lib/cjs/resources/promotion_rules.d.ts +0 -24
- package/lib/cjs/resources/promotion_rules.js +0 -1
- package/lib/cjs/resources/promotions.d.ts +0 -35
- package/lib/cjs/resources/promotions.js +0 -1
- package/lib/cjs/resources/refunds.js +0 -1
- package/lib/cjs/resources/return_line_items.js +0 -1
- package/lib/cjs/resources/returns.d.ts +0 -65
- package/lib/cjs/resources/returns.js +0 -1
- package/lib/cjs/resources/shipments.js +0 -1
- package/lib/cjs/resources/shipping_categories.js +0 -1
- package/lib/cjs/resources/shipping_methods.d.ts +0 -67
- package/lib/cjs/resources/shipping_methods.js +0 -1
- package/lib/cjs/resources/shipping_zones.d.ts +0 -47
- package/lib/cjs/resources/shipping_zones.js +0 -1
- package/lib/cjs/resources/sku_list_items.js +0 -1
- package/lib/cjs/resources/sku_list_promotion_rules.js +0 -1
- package/lib/cjs/resources/sku_lists.d.ts +0 -46
- package/lib/cjs/resources/sku_lists.js +0 -1
- package/lib/cjs/resources/sku_options.js +0 -1
- package/lib/cjs/resources/skus.js +0 -1
- package/lib/cjs/resources/stock_items.d.ts +0 -46
- package/lib/cjs/resources/stock_items.js +0 -1
- package/lib/cjs/resources/stock_line_items.d.ts +0 -26
- package/lib/cjs/resources/stock_line_items.js +0 -1
- package/lib/cjs/resources/stock_locations.d.ts +0 -51
- package/lib/cjs/resources/stock_locations.js +0 -1
- package/lib/cjs/resources/stock_transfers.d.ts +0 -66
- package/lib/cjs/resources/stock_transfers.js +0 -1
- package/lib/cjs/resources/stripe_gateways.js +0 -1
- package/lib/cjs/resources/stripe_payments.d.ts +0 -40
- package/lib/cjs/resources/stripe_payments.js +0 -1
- package/lib/cjs/resources/tax_calculators.d.ts +0 -24
- package/lib/cjs/resources/tax_calculators.js +0 -1
- package/lib/cjs/resources/tax_categories.d.ts +0 -57
- package/lib/cjs/resources/tax_categories.js +0 -1
- package/lib/cjs/resources/tax_rules.js +0 -1
- package/lib/cjs/resources/taxjar_accounts.d.ts +0 -40
- package/lib/cjs/resources/taxjar_accounts.js +0 -1
- package/lib/cjs/resources/transactions.d.ts +0 -30
- package/lib/cjs/resources/transactions.js +0 -1
- package/lib/cjs/resources/voids.d.ts +0 -32
- package/lib/cjs/resources/voids.js +0 -1
- package/lib/cjs/resources/webhooks.js +0 -1
- package/lib/cjs/resources/wire_transfers.js +0 -1
- package/lib/cjs/static.js +0 -1
- package/lib/cjs/util.js +0 -1
- package/lib/esm/api.d.ts +0 -101
- package/lib/esm/api.js +0 -1
- package/lib/esm/client.js +0 -1
- package/lib/esm/commercelayer.d.ts +0 -120
- package/lib/esm/commercelayer.js +0 -1
- package/lib/esm/common.d.ts +0 -4
- package/lib/esm/common.js +0 -1
- package/lib/esm/config.d.ts +0 -11
- package/lib/esm/debug.d.ts +0 -3
- package/lib/esm/error.d.ts +0 -26
- package/lib/esm/error.js +0 -1
- package/lib/esm/index.d.ts +0 -7
- package/lib/esm/interceptor.d.ts +0 -19
- package/lib/esm/jsonapi.d.ts +0 -5
- package/lib/esm/jsonapi.js +0 -1
- package/lib/esm/query.d.ts +0 -23
- package/lib/esm/resource.js +0 -1
- package/lib/esm/resources/addresses.js +0 -1
- package/lib/esm/resources/adjustments.d.ts +0 -35
- package/lib/esm/resources/adjustments.js +0 -1
- package/lib/esm/resources/adyen_gateways.js +0 -1
- package/lib/esm/resources/adyen_payments.d.ts +0 -42
- package/lib/esm/resources/adyen_payments.js +0 -1
- package/lib/esm/resources/application.d.ts +0 -21
- package/lib/esm/resources/attachments.js +0 -1
- package/lib/esm/resources/authorizations.js +0 -1
- package/lib/esm/resources/avalara_accounts.d.ts +0 -49
- package/lib/esm/resources/avalara_accounts.js +0 -1
- package/lib/esm/resources/billing_info_validation_rules.d.ts +0 -31
- package/lib/esm/resources/billing_info_validation_rules.js +0 -1
- package/lib/esm/resources/bing_geocoders.js +0 -1
- package/lib/esm/resources/braintree_gateways.js +0 -1
- package/lib/esm/resources/braintree_payments.d.ts +0 -45
- package/lib/esm/resources/braintree_payments.js +0 -1
- package/lib/esm/resources/bundles.js +0 -1
- package/lib/esm/resources/captures.js +0 -1
- package/lib/esm/resources/carrier_accounts.js +0 -1
- package/lib/esm/resources/checkout_com_gateways.d.ts +0 -43
- package/lib/esm/resources/checkout_com_gateways.js +0 -1
- package/lib/esm/resources/checkout_com_payments.d.ts +0 -48
- package/lib/esm/resources/checkout_com_payments.js +0 -1
- package/lib/esm/resources/coupon_codes_promotion_rules.d.ts +0 -58
- package/lib/esm/resources/coupon_codes_promotion_rules.js +0 -1
- package/lib/esm/resources/coupon_recipients.js +0 -1
- package/lib/esm/resources/coupons.d.ts +0 -44
- package/lib/esm/resources/coupons.js +0 -1
- package/lib/esm/resources/customer_addresses.js +0 -1
- package/lib/esm/resources/customer_groups.js +0 -1
- package/lib/esm/resources/customer_password_resets.js +0 -1
- package/lib/esm/resources/customer_payment_sources.d.ts +0 -65
- package/lib/esm/resources/customer_payment_sources.js +0 -1
- package/lib/esm/resources/customer_subscriptions.d.ts +0 -27
- package/lib/esm/resources/customer_subscriptions.js +0 -1
- package/lib/esm/resources/customers.js +0 -1
- package/lib/esm/resources/delivery_lead_times.js +0 -1
- package/lib/esm/resources/event_callbacks.js +0 -1
- package/lib/esm/resources/external_gateways.d.ts +0 -44
- package/lib/esm/resources/external_gateways.js +0 -1
- package/lib/esm/resources/external_payments.js +0 -1
- package/lib/esm/resources/external_promotions.js +0 -1
- package/lib/esm/resources/external_tax_calculators.d.ts +0 -41
- package/lib/esm/resources/external_tax_calculators.js +0 -1
- package/lib/esm/resources/fixed_amount_promotions.js +0 -1
- package/lib/esm/resources/fixed_price_promotions.js +0 -1
- package/lib/esm/resources/free_gift_promotions.d.ts +0 -87
- package/lib/esm/resources/free_gift_promotions.js +0 -1
- package/lib/esm/resources/free_shipping_promotions.d.ts +0 -75
- package/lib/esm/resources/free_shipping_promotions.js +0 -1
- package/lib/esm/resources/geocoders.d.ts +0 -22
- package/lib/esm/resources/geocoders.js +0 -1
- package/lib/esm/resources/gift_card_recipients.d.ts +0 -42
- package/lib/esm/resources/gift_card_recipients.js +0 -1
- package/lib/esm/resources/gift_cards.d.ts +0 -79
- package/lib/esm/resources/gift_cards.js +0 -1
- package/lib/esm/resources/google_geocoders.js +0 -1
- package/lib/esm/resources/imports.js +0 -1
- package/lib/esm/resources/in_stock_subscriptions.js +0 -1
- package/lib/esm/resources/inventory_models.d.ts +0 -39
- package/lib/esm/resources/inventory_models.js +0 -1
- package/lib/esm/resources/inventory_return_locations.d.ts +0 -41
- package/lib/esm/resources/inventory_return_locations.js +0 -1
- package/lib/esm/resources/inventory_stock_locations.d.ts +0 -44
- package/lib/esm/resources/inventory_stock_locations.js +0 -1
- package/lib/esm/resources/line_item_options.d.ts +0 -55
- package/lib/esm/resources/line_item_options.js +0 -1
- package/lib/esm/resources/line_items.js +0 -1
- package/lib/esm/resources/manual_gateways.d.ts +0 -32
- package/lib/esm/resources/manual_gateways.js +0 -1
- package/lib/esm/resources/manual_tax_calculators.d.ts +0 -45
- package/lib/esm/resources/manual_tax_calculators.js +0 -1
- package/lib/esm/resources/markets.js +0 -1
- package/lib/esm/resources/merchants.d.ts +0 -36
- package/lib/esm/resources/merchants.js +0 -1
- package/lib/esm/resources/order_amount_promotion_rules.d.ts +0 -56
- package/lib/esm/resources/order_amount_promotion_rules.js +0 -1
- package/lib/esm/resources/order_copies.d.ts +0 -42
- package/lib/esm/resources/order_copies.js +0 -1
- package/lib/esm/resources/order_subscriptions.d.ts +0 -62
- package/lib/esm/resources/order_subscriptions.js +0 -1
- package/lib/esm/resources/order_validation_rules.d.ts +0 -19
- package/lib/esm/resources/order_validation_rules.js +0 -1
- package/lib/esm/resources/orders.d.ts +0 -251
- package/lib/esm/resources/orders.js +0 -1
- package/lib/esm/resources/packages.js +0 -1
- package/lib/esm/resources/parcel_line_items.d.ts +0 -47
- package/lib/esm/resources/parcel_line_items.js +0 -1
- package/lib/esm/resources/parcels.js +0 -1
- package/lib/esm/resources/payment_gateways.js +0 -1
- package/lib/esm/resources/payment_methods.js +0 -1
- package/lib/esm/resources/paypal_gateways.js +0 -1
- package/lib/esm/resources/paypal_payments.js +0 -1
- package/lib/esm/resources/percentage_discount_promotions.js +0 -1
- package/lib/esm/resources/price_lists.d.ts +0 -37
- package/lib/esm/resources/price_lists.js +0 -1
- package/lib/esm/resources/prices.d.ts +0 -54
- package/lib/esm/resources/prices.js +0 -1
- package/lib/esm/resources/promotions.js +0 -1
- package/lib/esm/resources/refunds.d.ts +0 -32
- package/lib/esm/resources/refunds.js +0 -1
- package/lib/esm/resources/return_line_items.d.ts +0 -47
- package/lib/esm/resources/return_line_items.js +0 -1
- package/lib/esm/resources/returns.js +0 -1
- package/lib/esm/resources/shipments.d.ts +0 -76
- package/lib/esm/resources/shipments.js +0 -1
- package/lib/esm/resources/shipping_categories.d.ts +0 -31
- package/lib/esm/resources/shipping_categories.js +0 -1
- package/lib/esm/resources/shipping_methods.js +0 -1
- package/lib/esm/resources/shipping_zones.js +0 -1
- package/lib/esm/resources/sku_list_items.d.ts +0 -45
- package/lib/esm/resources/sku_list_items.js +0 -1
- package/lib/esm/resources/sku_list_promotion_rules.d.ts +0 -66
- package/lib/esm/resources/sku_list_promotion_rules.js +0 -1
- package/lib/esm/resources/sku_lists.js +0 -1
- package/lib/esm/resources/sku_options.d.ts +0 -51
- package/lib/esm/resources/sku_options.js +0 -1
- package/lib/esm/resources/skus.d.ts +0 -72
- package/lib/esm/resources/skus.js +0 -1
- package/lib/esm/resources/stock_items.js +0 -1
- package/lib/esm/resources/stock_line_items.js +0 -1
- package/lib/esm/resources/stock_locations.js +0 -1
- package/lib/esm/resources/stock_transfers.js +0 -1
- package/lib/esm/resources/stripe_gateways.d.ts +0 -36
- package/lib/esm/resources/stripe_gateways.js +0 -1
- package/lib/esm/resources/stripe_payments.js +0 -1
- package/lib/esm/resources/tax_calculators.js +0 -1
- package/lib/esm/resources/tax_categories.js +0 -1
- package/lib/esm/resources/tax_rules.d.ts +0 -68
- package/lib/esm/resources/tax_rules.js +0 -1
- package/lib/esm/resources/taxjar_accounts.js +0 -1
- package/lib/esm/resources/transactions.js +0 -1
- package/lib/esm/resources/voids.js +0 -1
- package/lib/esm/resources/webhooks.d.ts +0 -41
- package/lib/esm/resources/webhooks.js +0 -1
- package/lib/esm/resources/wire_transfers.d.ts +0 -31
- package/lib/esm/resources/wire_transfers.js +0 -1
- package/lib/esm/static.d.ts +0 -6
- package/lib/esm/util.d.ts +0 -3
- package/lib/tsconfig.esm.tsbuildinfo +0 -1
- package/lib/tsconfig.tsbuildinfo +0 -1
@@ -1,9 +1,9 @@
|
|
1
|
-
import { ApiResource, Resource, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
2
|
-
import {
|
1
|
+
import { ApiResource, Resource, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
2
|
+
import { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
3
|
import { TaxCategory } from './tax_categories';
|
4
4
|
import { Market } from './markets';
|
5
5
|
import { Attachment } from './attachments';
|
6
|
-
declare type TaxCalculatorRel =
|
6
|
+
declare type TaxCalculatorRel = ResourceRel & {
|
7
7
|
type: typeof TaxCalculators.TYPE;
|
8
8
|
};
|
9
9
|
interface TaxCalculator extends Resource {
|
@@ -16,8 +16,11 @@ declare class TaxCalculators extends ApiResource {
|
|
16
16
|
static readonly TYPE: 'tax_calculators';
|
17
17
|
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<TaxCalculator>>;
|
18
18
|
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<TaxCalculator>;
|
19
|
+
tax_categories(taxCalculatorId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<TaxCategory>>;
|
20
|
+
markets(taxCalculatorId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Market>>;
|
21
|
+
attachments(taxCalculatorId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
19
22
|
isTaxCalculator(resource: any): resource is TaxCalculator;
|
20
|
-
relationship(id: string | ResourceId): TaxCalculatorRel;
|
23
|
+
relationship(id: string | ResourceId | null): TaxCalculatorRel;
|
21
24
|
type(): string;
|
22
25
|
}
|
23
26
|
export default TaxCalculators;
|
@@ -0,0 +1 @@
|
|
1
|
+
import{ApiResource as s}from"../resource";class r extends s{async list(t,e){return this.resources.list({type:r.TYPE},t,e)}async retrieve(t,e,a){return this.resources.retrieve({type:r.TYPE,id:t},e,a)}async tax_categories(t,e,a){return this.resources.fetch({type:"tax_categories"},`tax_calculators/${t}/tax_categories`,e,a)}async markets(t,e,a){return this.resources.fetch({type:"markets"},`tax_calculators/${t}/markets`,e,a)}async attachments(t,e,a){return this.resources.fetch({type:"attachments"},`tax_calculators/${t}/attachments`,e,a)}isTaxCalculator(t){return t.type&&t.type===r.TYPE}relationship(t){return t===null||typeof t=="string"?{id:t,type:r.TYPE}:{id:t.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="tax_calculators";export default r;
|
@@ -1,27 +1,27 @@
|
|
1
|
-
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
2
|
-
import {
|
1
|
+
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
2
|
+
import { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
3
|
import { Sku } from './skus';
|
4
4
|
import { AvalaraAccount } from './avalara_accounts';
|
5
5
|
import { TaxjarAccount } from './taxjar_accounts';
|
6
6
|
import { ManualTaxCalculator } from './manual_tax_calculators';
|
7
7
|
import { ExternalTaxCalculator } from './external_tax_calculators';
|
8
8
|
import { Attachment } from './attachments';
|
9
|
-
declare type TaxCategoryRel =
|
9
|
+
declare type TaxCategoryRel = ResourceRel & {
|
10
10
|
type: typeof TaxCategories.TYPE;
|
11
11
|
};
|
12
|
-
declare type SkuRel =
|
12
|
+
declare type SkuRel = ResourceRel & {
|
13
13
|
type: 'skus';
|
14
14
|
};
|
15
|
-
declare type AvalaraAccountRel =
|
15
|
+
declare type AvalaraAccountRel = ResourceRel & {
|
16
16
|
type: 'avalara_accounts';
|
17
17
|
};
|
18
|
-
declare type TaxjarAccountRel =
|
18
|
+
declare type TaxjarAccountRel = ResourceRel & {
|
19
19
|
type: 'taxjar_accounts';
|
20
20
|
};
|
21
|
-
declare type ManualTaxCalculatorRel =
|
21
|
+
declare type ManualTaxCalculatorRel = ResourceRel & {
|
22
22
|
type: 'manual_tax_calculators';
|
23
23
|
};
|
24
|
-
declare type ExternalTaxCalculatorRel =
|
24
|
+
declare type ExternalTaxCalculatorRel = ResourceRel & {
|
25
25
|
type: 'external_tax_calculators';
|
26
26
|
};
|
27
27
|
interface TaxCategory extends Resource {
|
@@ -49,8 +49,10 @@ declare class TaxCategories extends ApiResource {
|
|
49
49
|
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<TaxCategory>;
|
50
50
|
update(resource: TaxCategoryUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<TaxCategory>;
|
51
51
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
52
|
+
sku(taxCategoryId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Sku>;
|
53
|
+
attachments(taxCategoryId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
52
54
|
isTaxCategory(resource: any): resource is TaxCategory;
|
53
|
-
relationship(id: string | ResourceId): TaxCategoryRel;
|
55
|
+
relationship(id: string | ResourceId | null): TaxCategoryRel;
|
54
56
|
type(): string;
|
55
57
|
}
|
56
58
|
export default TaxCategories;
|
@@ -0,0 +1 @@
|
|
1
|
+
import{ApiResource as a}from"../resource";class r extends a{async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async create(e,t,s){return this.resources.create({...e,type:r.TYPE},t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:r.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update({...e,type:r.TYPE},t,s)}async delete(e,t){await this.resources.delete({type:r.TYPE,id:e},t)}async sku(e,t,s){return this.resources.fetch({type:"skus"},`tax_categories/${e}/sku`,t,s)}async attachments(e,t,s){return this.resources.fetch({type:"attachments"},`tax_categories/${e}/attachments`,t,s)}isTaxCategory(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="tax_categories";export default r;
|
@@ -1,10 +1,10 @@
|
|
1
|
-
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
2
|
-
import {
|
1
|
+
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
2
|
+
import { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
3
|
import { ManualTaxCalculator } from './manual_tax_calculators';
|
4
|
-
declare type TaxRuleRel =
|
4
|
+
declare type TaxRuleRel = ResourceRel & {
|
5
5
|
type: typeof TaxRules.TYPE;
|
6
6
|
};
|
7
|
-
declare type ManualTaxCalculatorRel =
|
7
|
+
declare type ManualTaxCalculatorRel = ResourceRel & {
|
8
8
|
type: 'manual_tax_calculators';
|
9
9
|
};
|
10
10
|
interface TaxRule extends Resource {
|
@@ -60,8 +60,9 @@ declare class TaxRules extends ApiResource {
|
|
60
60
|
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<TaxRule>;
|
61
61
|
update(resource: TaxRuleUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<TaxRule>;
|
62
62
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
63
|
+
manual_tax_calculator(taxRuleId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ManualTaxCalculator>;
|
63
64
|
isTaxRule(resource: any): resource is TaxRule;
|
64
|
-
relationship(id: string | ResourceId): TaxRuleRel;
|
65
|
+
relationship(id: string | ResourceId | null): TaxRuleRel;
|
65
66
|
type(): string;
|
66
67
|
}
|
67
68
|
export default TaxRules;
|
@@ -0,0 +1 @@
|
|
1
|
+
import{ApiResource as a}from"../resource";class r extends a{async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async create(e,t,s){return this.resources.create({...e,type:r.TYPE},t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:r.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update({...e,type:r.TYPE},t,s)}async delete(e,t){await this.resources.delete({type:r.TYPE,id:e},t)}async manual_tax_calculator(e,t,s){return this.resources.fetch({type:"manual_tax_calculators"},`tax_rules/${e}/manual_tax_calculator`,t,s)}isTaxRule(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="tax_rules";export default r;
|
@@ -1,12 +1,12 @@
|
|
1
|
-
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
2
|
-
import {
|
1
|
+
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
2
|
+
import { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
3
|
import { TaxCategory } from './tax_categories';
|
4
4
|
import { Market } from './markets';
|
5
5
|
import { Attachment } from './attachments';
|
6
|
-
declare type TaxjarAccountRel =
|
6
|
+
declare type TaxjarAccountRel = ResourceRel & {
|
7
7
|
type: typeof TaxjarAccounts.TYPE;
|
8
8
|
};
|
9
|
-
declare type TaxCategoryRel =
|
9
|
+
declare type TaxCategoryRel = ResourceRel & {
|
10
10
|
type: 'tax_categories';
|
11
11
|
};
|
12
12
|
interface TaxjarAccount extends Resource {
|
@@ -32,8 +32,11 @@ declare class TaxjarAccounts extends ApiResource {
|
|
32
32
|
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<TaxjarAccount>;
|
33
33
|
update(resource: TaxjarAccountUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<TaxjarAccount>;
|
34
34
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
35
|
+
tax_categories(taxjarAccountId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<TaxCategory>>;
|
36
|
+
markets(taxjarAccountId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Market>>;
|
37
|
+
attachments(taxjarAccountId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
35
38
|
isTaxjarAccount(resource: any): resource is TaxjarAccount;
|
36
|
-
relationship(id: string | ResourceId): TaxjarAccountRel;
|
39
|
+
relationship(id: string | ResourceId | null): TaxjarAccountRel;
|
37
40
|
type(): string;
|
38
41
|
}
|
39
42
|
export default TaxjarAccounts;
|
@@ -0,0 +1 @@
|
|
1
|
+
import{ApiResource as s}from"../resource";class r extends s{async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async create(e,t,a){return this.resources.create({...e,type:r.TYPE},t,a)}async retrieve(e,t,a){return this.resources.retrieve({type:r.TYPE,id:e},t,a)}async update(e,t,a){return this.resources.update({...e,type:r.TYPE},t,a)}async delete(e,t){await this.resources.delete({type:r.TYPE,id:e},t)}async tax_categories(e,t,a){return this.resources.fetch({type:"tax_categories"},`taxjar_accounts/${e}/tax_categories`,t,a)}async markets(e,t,a){return this.resources.fetch({type:"markets"},`taxjar_accounts/${e}/markets`,t,a)}async attachments(e,t,a){return this.resources.fetch({type:"attachments"},`taxjar_accounts/${e}/attachments`,t,a)}isTaxjarAccount(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="taxjar_accounts";export default r;
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import { ApiResource, Resource, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
2
|
-
import {
|
1
|
+
import { ApiResource, Resource, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
2
|
+
import { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
3
|
import { Order } from './orders';
|
4
|
-
declare type TransactionRel =
|
4
|
+
declare type TransactionRel = ResourceRel & {
|
5
5
|
type: typeof Transactions.TYPE;
|
6
6
|
};
|
7
7
|
interface Transaction extends Resource {
|
@@ -22,8 +22,9 @@ declare class Transactions extends ApiResource {
|
|
22
22
|
static readonly TYPE: 'transactions';
|
23
23
|
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Transaction>>;
|
24
24
|
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Transaction>;
|
25
|
+
order(transactionId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
25
26
|
isTransaction(resource: any): resource is Transaction;
|
26
|
-
relationship(id: string | ResourceId): TransactionRel;
|
27
|
+
relationship(id: string | ResourceId | null): TransactionRel;
|
27
28
|
type(): string;
|
28
29
|
}
|
29
30
|
export default Transactions;
|
@@ -0,0 +1 @@
|
|
1
|
+
import{ApiResource as i}from"../resource";class e extends i{async list(r,t){return this.resources.list({type:e.TYPE},r,t)}async retrieve(r,t,s){return this.resources.retrieve({type:e.TYPE,id:r},t,s)}async order(r,t,s){return this.resources.fetch({type:"orders"},`transactions/${r}/order`,t,s)}isTransaction(r){return r.type&&r.type===e.TYPE}relationship(r){return r===null||typeof r=="string"?{id:r,type:e.TYPE}:{id:r.id,type:e.TYPE}}type(){return e.TYPE}}e.TYPE="transactions";export default e;
|
@@ -1,8 +1,8 @@
|
|
1
|
-
import { ApiResource, Resource, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
2
|
-
import {
|
1
|
+
import { ApiResource, Resource, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
2
|
+
import { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
3
|
import { Order } from './orders';
|
4
4
|
import { Authorization } from './authorizations';
|
5
|
-
declare type VoidRel =
|
5
|
+
declare type VoidRel = ResourceRel & {
|
6
6
|
type: typeof Voids.TYPE;
|
7
7
|
};
|
8
8
|
interface Void extends Resource {
|
@@ -24,8 +24,10 @@ declare class Voids extends ApiResource {
|
|
24
24
|
static readonly TYPE: 'voids';
|
25
25
|
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Void>>;
|
26
26
|
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Void>;
|
27
|
+
order(voidId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
28
|
+
reference_authorization(voidId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Authorization>;
|
27
29
|
isVoid(resource: any): resource is Void;
|
28
|
-
relationship(id: string | ResourceId): VoidRel;
|
30
|
+
relationship(id: string | ResourceId | null): VoidRel;
|
29
31
|
type(): string;
|
30
32
|
}
|
31
33
|
export default Voids;
|
@@ -0,0 +1 @@
|
|
1
|
+
import{ApiResource as i}from"../resource";class r extends i{async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async retrieve(e,t,s){return this.resources.retrieve({type:r.TYPE,id:e},t,s)}async order(e,t,s){return this.resources.fetch({type:"orders"},`voids/${e}/order`,t,s)}async reference_authorization(e,t,s){return this.resources.fetch({type:"authorizations"},`voids/${e}/reference_authorization`,t,s)}isVoid(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="voids";export default r;
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
2
|
-
import {
|
1
|
+
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
2
|
+
import { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
3
|
import { EventCallback } from './event_callbacks';
|
4
|
-
declare type WebhookRel =
|
4
|
+
declare type WebhookRel = ResourceRel & {
|
5
5
|
type: typeof Webhooks.TYPE;
|
6
6
|
};
|
7
7
|
interface Webhook extends Resource {
|
@@ -33,8 +33,9 @@ declare class Webhooks extends ApiResource {
|
|
33
33
|
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Webhook>;
|
34
34
|
update(resource: WebhookUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Webhook>;
|
35
35
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
36
|
+
last_event_callbacks(webhookId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<EventCallback>>;
|
36
37
|
isWebhook(resource: any): resource is Webhook;
|
37
|
-
relationship(id: string | ResourceId): WebhookRel;
|
38
|
+
relationship(id: string | ResourceId | null): WebhookRel;
|
38
39
|
type(): string;
|
39
40
|
}
|
40
41
|
export default Webhooks;
|
@@ -0,0 +1 @@
|
|
1
|
+
import{ApiResource as a}from"../resource";class t extends a{async list(e,r){return this.resources.list({type:t.TYPE},e,r)}async create(e,r,s){return this.resources.create({...e,type:t.TYPE},r,s)}async retrieve(e,r,s){return this.resources.retrieve({type:t.TYPE,id:e},r,s)}async update(e,r,s){return this.resources.update({...e,type:t.TYPE},r,s)}async delete(e,r){await this.resources.delete({type:t.TYPE,id:e},r)}async last_event_callbacks(e,r,s){return this.resources.fetch({type:"event_callbacks"},`webhooks/${e}/last_event_callbacks`,r,s)}isWebhook(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="webhooks";export default t;
|
@@ -1,10 +1,10 @@
|
|
1
|
-
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
2
|
-
import {
|
1
|
+
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
2
|
+
import { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
3
|
import { Order } from './orders';
|
4
|
-
declare type WireTransferRel =
|
4
|
+
declare type WireTransferRel = ResourceRel & {
|
5
5
|
type: typeof WireTransfers.TYPE;
|
6
6
|
};
|
7
|
-
declare type OrderRel =
|
7
|
+
declare type OrderRel = ResourceRel & {
|
8
8
|
type: 'orders';
|
9
9
|
};
|
10
10
|
interface WireTransfer extends Resource {
|
@@ -23,8 +23,9 @@ declare class WireTransfers extends ApiResource {
|
|
23
23
|
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<WireTransfer>;
|
24
24
|
update(resource: WireTransferUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<WireTransfer>;
|
25
25
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
26
|
+
order(wireTransferId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
26
27
|
isWireTransfer(resource: any): resource is WireTransfer;
|
27
|
-
relationship(id: string | ResourceId): WireTransferRel;
|
28
|
+
relationship(id: string | ResourceId | null): WireTransferRel;
|
28
29
|
type(): string;
|
29
30
|
}
|
30
31
|
export default WireTransfers;
|
@@ -0,0 +1 @@
|
|
1
|
+
import{ApiResource as i}from"../resource";class r extends i{async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async create(e,t,s){return this.resources.create({...e,type:r.TYPE},t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:r.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update({...e,type:r.TYPE},t,s)}async delete(e,t){await this.resources.delete({type:r.TYPE,id:e},t)}async order(e,t,s){return this.resources.fetch({type:"orders"},`wire_transfers/${e}/order`,t,s)}isWireTransfer(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="wire_transfers";export default r;
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
package/package.json
CHANGED
@@ -1,13 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "@commercelayer/sdk",
|
3
|
-
"version": "4.
|
4
|
-
"
|
5
|
-
"
|
6
|
-
"module": "lib/esm/index.js",
|
3
|
+
"version": "4.3.0-alpha.1",
|
4
|
+
"types": "lib/index.d.ts",
|
5
|
+
"module": "lib/index.js",
|
7
6
|
"scripts": {
|
8
7
|
"lint": "eslint ./src --ext .ts",
|
9
8
|
"lintspec": "eslint ./specs/resources/ --ext .spec.ts",
|
10
|
-
"build": "tsc -b tsconfig.json
|
9
|
+
"build": "tsc -b tsconfig.json --verbose",
|
11
10
|
"start": "ts-node src/index.ts",
|
12
11
|
"generate": "ts-node gen/generator.ts",
|
13
12
|
"prepare": "npm run build",
|
@@ -37,36 +36,36 @@
|
|
37
36
|
"lib/**/*"
|
38
37
|
],
|
39
38
|
"engines": {
|
40
|
-
"node": ">=
|
39
|
+
"node": ">=16"
|
41
40
|
},
|
42
41
|
"dependencies": {
|
43
|
-
"axios": "^0.
|
42
|
+
"axios": "^0.25.0"
|
44
43
|
},
|
45
44
|
"devDependencies": {
|
46
|
-
"@babel/preset-env": "^7.16.
|
47
|
-
"@babel/preset-typescript": "^7.16.
|
48
|
-
"@commercelayer/js-auth": "^2.2.
|
45
|
+
"@babel/preset-env": "^7.16.11",
|
46
|
+
"@babel/preset-typescript": "^7.16.7",
|
47
|
+
"@commercelayer/js-auth": "^2.2.9",
|
49
48
|
"@semantic-release/changelog": "^6.0.1",
|
50
49
|
"@semantic-release/git": "^10.0.1",
|
51
50
|
"@size-limit/preset-small-lib": "^6.0.4",
|
52
51
|
"@types/debug": "^4.1.7",
|
53
|
-
"@types/jest": "^27.0
|
52
|
+
"@types/jest": "^27.4.0",
|
54
53
|
"@types/lodash": "^4.14.178",
|
55
|
-
"@types/node": "^
|
54
|
+
"@types/node": "^17.0.17",
|
56
55
|
"@typescript-eslint/eslint-plugin": "^5.7.0",
|
57
56
|
"dotenv": "^10.0.0",
|
58
|
-
"eslint": "^8.
|
57
|
+
"eslint": "^8.8.0",
|
59
58
|
"husky": "^7.0.4",
|
60
59
|
"inflector-js": "^1.0.1",
|
61
|
-
"jest": "^27.
|
60
|
+
"jest": "^27.4.7",
|
62
61
|
"json-typescript": "^1.1.2",
|
63
62
|
"jsonapi-typescript": "^0.1.3",
|
64
63
|
"lodash": "^4.17.21",
|
65
64
|
"minimize-js": "^1.2.0",
|
66
|
-
"pretty-quick": "^3.1.
|
67
|
-
"semantic-release": "^
|
65
|
+
"pretty-quick": "^3.1.3",
|
66
|
+
"semantic-release": "^19.0.2",
|
68
67
|
"ts-node": "^10.4.0",
|
69
|
-
"typescript": "^4.5.
|
68
|
+
"typescript": "^4.5.5"
|
70
69
|
},
|
71
70
|
"repository": "github:commercelayer/commercelayer-sdk",
|
72
71
|
"publishConfig": {
|
package/lib/cjs/api.js
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";var __importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.Markets=exports.ManualTaxCalculators=exports.ManualGateways=exports.LineItems=exports.LineItemOptions=exports.InventoryStockLocations=exports.InventoryReturnLocations=exports.InventoryModels=exports.InStockSubscriptions=exports.Imports=exports.GoogleGeocoders=exports.GiftCards=exports.GiftCardRecipients=exports.Geocoders=exports.FreeShippingPromotions=exports.FreeGiftPromotions=exports.FixedPricePromotions=exports.FixedAmountPromotions=exports.ExternalTaxCalculators=exports.ExternalPromotions=exports.ExternalPayments=exports.ExternalGateways=exports.EventCallbacks=exports.DeliveryLeadTimes=exports.Customers=exports.CustomerSubscriptions=exports.CustomerPaymentSources=exports.CustomerPasswordResets=exports.CustomerGroups=exports.CustomerAddresses=exports.Coupons=exports.CouponRecipients=exports.CouponCodesPromotionRules=exports.CheckoutComPayments=exports.CheckoutComGateways=exports.CarrierAccounts=exports.Captures=exports.Bundles=exports.BraintreePayments=exports.BraintreeGateways=exports.BingGeocoders=exports.BillingInfoValidationRules=exports.AvalaraAccounts=exports.Authorizations=exports.Attachments=exports.Applications=exports.AdyenPayments=exports.AdyenGateways=exports.Adjustments=exports.Addresses=void 0,exports.resourceList=exports.WireTransfers=exports.Webhooks=exports.Voids=exports.Transactions=exports.TaxjarAccounts=exports.TaxRules=exports.TaxCategories=exports.TaxCalculators=exports.StripePayments=exports.StripeGateways=exports.StockTransfers=exports.StockLocations=exports.StockLineItems=exports.StockItems=exports.Skus=exports.SkuOptions=exports.SkuLists=exports.SkuListPromotionRules=exports.SkuListItems=exports.ShippingZones=exports.ShippingMethods=exports.ShippingCategories=exports.Shipments=exports.Returns=exports.ReturnLineItems=exports.Refunds=exports.Promotions=exports.PromotionRules=exports.Prices=exports.PriceLists=exports.PercentageDiscountPromotions=exports.PaypalPayments=exports.PaypalGateways=exports.PaymentMethods=exports.PaymentGateways=exports.Parcels=exports.ParcelLineItems=exports.Packages=exports.Organizations=exports.Orders=exports.OrderValidationRules=exports.OrderSubscriptions=exports.OrderCopies=exports.OrderAmountPromotionRules=exports.Merchants=void 0;var addresses_1=require("./resources/addresses");Object.defineProperty(exports,"Addresses",{enumerable:!0,get:function(){return __importDefault(addresses_1).default}});var adjustments_1=require("./resources/adjustments");Object.defineProperty(exports,"Adjustments",{enumerable:!0,get:function(){return __importDefault(adjustments_1).default}});var adyen_gateways_1=require("./resources/adyen_gateways");Object.defineProperty(exports,"AdyenGateways",{enumerable:!0,get:function(){return __importDefault(adyen_gateways_1).default}});var adyen_payments_1=require("./resources/adyen_payments");Object.defineProperty(exports,"AdyenPayments",{enumerable:!0,get:function(){return __importDefault(adyen_payments_1).default}});var application_1=require("./resources/application");Object.defineProperty(exports,"Applications",{enumerable:!0,get:function(){return __importDefault(application_1).default}});var attachments_1=require("./resources/attachments");Object.defineProperty(exports,"Attachments",{enumerable:!0,get:function(){return __importDefault(attachments_1).default}});var authorizations_1=require("./resources/authorizations");Object.defineProperty(exports,"Authorizations",{enumerable:!0,get:function(){return __importDefault(authorizations_1).default}});var avalara_accounts_1=require("./resources/avalara_accounts");Object.defineProperty(exports,"AvalaraAccounts",{enumerable:!0,get:function(){return __importDefault(avalara_accounts_1).default}});var billing_info_validation_rules_1=require("./resources/billing_info_validation_rules");Object.defineProperty(exports,"BillingInfoValidationRules",{enumerable:!0,get:function(){return __importDefault(billing_info_validation_rules_1).default}});var bing_geocoders_1=require("./resources/bing_geocoders");Object.defineProperty(exports,"BingGeocoders",{enumerable:!0,get:function(){return __importDefault(bing_geocoders_1).default}});var braintree_gateways_1=require("./resources/braintree_gateways");Object.defineProperty(exports,"BraintreeGateways",{enumerable:!0,get:function(){return __importDefault(braintree_gateways_1).default}});var braintree_payments_1=require("./resources/braintree_payments");Object.defineProperty(exports,"BraintreePayments",{enumerable:!0,get:function(){return __importDefault(braintree_payments_1).default}});var bundles_1=require("./resources/bundles");Object.defineProperty(exports,"Bundles",{enumerable:!0,get:function(){return __importDefault(bundles_1).default}});var captures_1=require("./resources/captures");Object.defineProperty(exports,"Captures",{enumerable:!0,get:function(){return __importDefault(captures_1).default}});var carrier_accounts_1=require("./resources/carrier_accounts");Object.defineProperty(exports,"CarrierAccounts",{enumerable:!0,get:function(){return __importDefault(carrier_accounts_1).default}});var checkout_com_gateways_1=require("./resources/checkout_com_gateways");Object.defineProperty(exports,"CheckoutComGateways",{enumerable:!0,get:function(){return __importDefault(checkout_com_gateways_1).default}});var checkout_com_payments_1=require("./resources/checkout_com_payments");Object.defineProperty(exports,"CheckoutComPayments",{enumerable:!0,get:function(){return __importDefault(checkout_com_payments_1).default}});var coupon_codes_promotion_rules_1=require("./resources/coupon_codes_promotion_rules");Object.defineProperty(exports,"CouponCodesPromotionRules",{enumerable:!0,get:function(){return __importDefault(coupon_codes_promotion_rules_1).default}});var coupon_recipients_1=require("./resources/coupon_recipients");Object.defineProperty(exports,"CouponRecipients",{enumerable:!0,get:function(){return __importDefault(coupon_recipients_1).default}});var coupons_1=require("./resources/coupons");Object.defineProperty(exports,"Coupons",{enumerable:!0,get:function(){return __importDefault(coupons_1).default}});var customer_addresses_1=require("./resources/customer_addresses");Object.defineProperty(exports,"CustomerAddresses",{enumerable:!0,get:function(){return __importDefault(customer_addresses_1).default}});var customer_groups_1=require("./resources/customer_groups");Object.defineProperty(exports,"CustomerGroups",{enumerable:!0,get:function(){return __importDefault(customer_groups_1).default}});var customer_password_resets_1=require("./resources/customer_password_resets");Object.defineProperty(exports,"CustomerPasswordResets",{enumerable:!0,get:function(){return __importDefault(customer_password_resets_1).default}});var customer_payment_sources_1=require("./resources/customer_payment_sources");Object.defineProperty(exports,"CustomerPaymentSources",{enumerable:!0,get:function(){return __importDefault(customer_payment_sources_1).default}});var customer_subscriptions_1=require("./resources/customer_subscriptions");Object.defineProperty(exports,"CustomerSubscriptions",{enumerable:!0,get:function(){return __importDefault(customer_subscriptions_1).default}});var customers_1=require("./resources/customers");Object.defineProperty(exports,"Customers",{enumerable:!0,get:function(){return __importDefault(customers_1).default}});var delivery_lead_times_1=require("./resources/delivery_lead_times");Object.defineProperty(exports,"DeliveryLeadTimes",{enumerable:!0,get:function(){return __importDefault(delivery_lead_times_1).default}});var event_callbacks_1=require("./resources/event_callbacks");Object.defineProperty(exports,"EventCallbacks",{enumerable:!0,get:function(){return __importDefault(event_callbacks_1).default}});var external_gateways_1=require("./resources/external_gateways");Object.defineProperty(exports,"ExternalGateways",{enumerable:!0,get:function(){return __importDefault(external_gateways_1).default}});var external_payments_1=require("./resources/external_payments");Object.defineProperty(exports,"ExternalPayments",{enumerable:!0,get:function(){return __importDefault(external_payments_1).default}});var external_promotions_1=require("./resources/external_promotions");Object.defineProperty(exports,"ExternalPromotions",{enumerable:!0,get:function(){return __importDefault(external_promotions_1).default}});var external_tax_calculators_1=require("./resources/external_tax_calculators");Object.defineProperty(exports,"ExternalTaxCalculators",{enumerable:!0,get:function(){return __importDefault(external_tax_calculators_1).default}});var fixed_amount_promotions_1=require("./resources/fixed_amount_promotions");Object.defineProperty(exports,"FixedAmountPromotions",{enumerable:!0,get:function(){return __importDefault(fixed_amount_promotions_1).default}});var fixed_price_promotions_1=require("./resources/fixed_price_promotions");Object.defineProperty(exports,"FixedPricePromotions",{enumerable:!0,get:function(){return __importDefault(fixed_price_promotions_1).default}});var free_gift_promotions_1=require("./resources/free_gift_promotions");Object.defineProperty(exports,"FreeGiftPromotions",{enumerable:!0,get:function(){return __importDefault(free_gift_promotions_1).default}});var free_shipping_promotions_1=require("./resources/free_shipping_promotions");Object.defineProperty(exports,"FreeShippingPromotions",{enumerable:!0,get:function(){return __importDefault(free_shipping_promotions_1).default}});var geocoders_1=require("./resources/geocoders");Object.defineProperty(exports,"Geocoders",{enumerable:!0,get:function(){return __importDefault(geocoders_1).default}});var gift_card_recipients_1=require("./resources/gift_card_recipients");Object.defineProperty(exports,"GiftCardRecipients",{enumerable:!0,get:function(){return __importDefault(gift_card_recipients_1).default}});var gift_cards_1=require("./resources/gift_cards");Object.defineProperty(exports,"GiftCards",{enumerable:!0,get:function(){return __importDefault(gift_cards_1).default}});var google_geocoders_1=require("./resources/google_geocoders");Object.defineProperty(exports,"GoogleGeocoders",{enumerable:!0,get:function(){return __importDefault(google_geocoders_1).default}});var imports_1=require("./resources/imports");Object.defineProperty(exports,"Imports",{enumerable:!0,get:function(){return __importDefault(imports_1).default}});var in_stock_subscriptions_1=require("./resources/in_stock_subscriptions");Object.defineProperty(exports,"InStockSubscriptions",{enumerable:!0,get:function(){return __importDefault(in_stock_subscriptions_1).default}});var inventory_models_1=require("./resources/inventory_models");Object.defineProperty(exports,"InventoryModels",{enumerable:!0,get:function(){return __importDefault(inventory_models_1).default}});var inventory_return_locations_1=require("./resources/inventory_return_locations");Object.defineProperty(exports,"InventoryReturnLocations",{enumerable:!0,get:function(){return __importDefault(inventory_return_locations_1).default}});var inventory_stock_locations_1=require("./resources/inventory_stock_locations");Object.defineProperty(exports,"InventoryStockLocations",{enumerable:!0,get:function(){return __importDefault(inventory_stock_locations_1).default}});var line_item_options_1=require("./resources/line_item_options");Object.defineProperty(exports,"LineItemOptions",{enumerable:!0,get:function(){return __importDefault(line_item_options_1).default}});var line_items_1=require("./resources/line_items");Object.defineProperty(exports,"LineItems",{enumerable:!0,get:function(){return __importDefault(line_items_1).default}});var manual_gateways_1=require("./resources/manual_gateways");Object.defineProperty(exports,"ManualGateways",{enumerable:!0,get:function(){return __importDefault(manual_gateways_1).default}});var manual_tax_calculators_1=require("./resources/manual_tax_calculators");Object.defineProperty(exports,"ManualTaxCalculators",{enumerable:!0,get:function(){return __importDefault(manual_tax_calculators_1).default}});var markets_1=require("./resources/markets");Object.defineProperty(exports,"Markets",{enumerable:!0,get:function(){return __importDefault(markets_1).default}});var merchants_1=require("./resources/merchants");Object.defineProperty(exports,"Merchants",{enumerable:!0,get:function(){return __importDefault(merchants_1).default}});var order_amount_promotion_rules_1=require("./resources/order_amount_promotion_rules");Object.defineProperty(exports,"OrderAmountPromotionRules",{enumerable:!0,get:function(){return __importDefault(order_amount_promotion_rules_1).default}});var order_copies_1=require("./resources/order_copies");Object.defineProperty(exports,"OrderCopies",{enumerable:!0,get:function(){return __importDefault(order_copies_1).default}});var order_subscriptions_1=require("./resources/order_subscriptions");Object.defineProperty(exports,"OrderSubscriptions",{enumerable:!0,get:function(){return __importDefault(order_subscriptions_1).default}});var order_validation_rules_1=require("./resources/order_validation_rules");Object.defineProperty(exports,"OrderValidationRules",{enumerable:!0,get:function(){return __importDefault(order_validation_rules_1).default}});var orders_1=require("./resources/orders");Object.defineProperty(exports,"Orders",{enumerable:!0,get:function(){return __importDefault(orders_1).default}});var organization_1=require("./resources/organization");Object.defineProperty(exports,"Organizations",{enumerable:!0,get:function(){return __importDefault(organization_1).default}});var packages_1=require("./resources/packages");Object.defineProperty(exports,"Packages",{enumerable:!0,get:function(){return __importDefault(packages_1).default}});var parcel_line_items_1=require("./resources/parcel_line_items");Object.defineProperty(exports,"ParcelLineItems",{enumerable:!0,get:function(){return __importDefault(parcel_line_items_1).default}});var parcels_1=require("./resources/parcels");Object.defineProperty(exports,"Parcels",{enumerable:!0,get:function(){return __importDefault(parcels_1).default}});var payment_gateways_1=require("./resources/payment_gateways");Object.defineProperty(exports,"PaymentGateways",{enumerable:!0,get:function(){return __importDefault(payment_gateways_1).default}});var payment_methods_1=require("./resources/payment_methods");Object.defineProperty(exports,"PaymentMethods",{enumerable:!0,get:function(){return __importDefault(payment_methods_1).default}});var paypal_gateways_1=require("./resources/paypal_gateways");Object.defineProperty(exports,"PaypalGateways",{enumerable:!0,get:function(){return __importDefault(paypal_gateways_1).default}});var paypal_payments_1=require("./resources/paypal_payments");Object.defineProperty(exports,"PaypalPayments",{enumerable:!0,get:function(){return __importDefault(paypal_payments_1).default}});var percentage_discount_promotions_1=require("./resources/percentage_discount_promotions");Object.defineProperty(exports,"PercentageDiscountPromotions",{enumerable:!0,get:function(){return __importDefault(percentage_discount_promotions_1).default}});var price_lists_1=require("./resources/price_lists");Object.defineProperty(exports,"PriceLists",{enumerable:!0,get:function(){return __importDefault(price_lists_1).default}});var prices_1=require("./resources/prices");Object.defineProperty(exports,"Prices",{enumerable:!0,get:function(){return __importDefault(prices_1).default}});var promotion_rules_1=require("./resources/promotion_rules");Object.defineProperty(exports,"PromotionRules",{enumerable:!0,get:function(){return __importDefault(promotion_rules_1).default}});var promotions_1=require("./resources/promotions");Object.defineProperty(exports,"Promotions",{enumerable:!0,get:function(){return __importDefault(promotions_1).default}});var refunds_1=require("./resources/refunds");Object.defineProperty(exports,"Refunds",{enumerable:!0,get:function(){return __importDefault(refunds_1).default}});var return_line_items_1=require("./resources/return_line_items");Object.defineProperty(exports,"ReturnLineItems",{enumerable:!0,get:function(){return __importDefault(return_line_items_1).default}});var returns_1=require("./resources/returns");Object.defineProperty(exports,"Returns",{enumerable:!0,get:function(){return __importDefault(returns_1).default}});var shipments_1=require("./resources/shipments");Object.defineProperty(exports,"Shipments",{enumerable:!0,get:function(){return __importDefault(shipments_1).default}});var shipping_categories_1=require("./resources/shipping_categories");Object.defineProperty(exports,"ShippingCategories",{enumerable:!0,get:function(){return __importDefault(shipping_categories_1).default}});var shipping_methods_1=require("./resources/shipping_methods");Object.defineProperty(exports,"ShippingMethods",{enumerable:!0,get:function(){return __importDefault(shipping_methods_1).default}});var shipping_zones_1=require("./resources/shipping_zones");Object.defineProperty(exports,"ShippingZones",{enumerable:!0,get:function(){return __importDefault(shipping_zones_1).default}});var sku_list_items_1=require("./resources/sku_list_items");Object.defineProperty(exports,"SkuListItems",{enumerable:!0,get:function(){return __importDefault(sku_list_items_1).default}});var sku_list_promotion_rules_1=require("./resources/sku_list_promotion_rules");Object.defineProperty(exports,"SkuListPromotionRules",{enumerable:!0,get:function(){return __importDefault(sku_list_promotion_rules_1).default}});var sku_lists_1=require("./resources/sku_lists");Object.defineProperty(exports,"SkuLists",{enumerable:!0,get:function(){return __importDefault(sku_lists_1).default}});var sku_options_1=require("./resources/sku_options");Object.defineProperty(exports,"SkuOptions",{enumerable:!0,get:function(){return __importDefault(sku_options_1).default}});var skus_1=require("./resources/skus");Object.defineProperty(exports,"Skus",{enumerable:!0,get:function(){return __importDefault(skus_1).default}});var stock_items_1=require("./resources/stock_items");Object.defineProperty(exports,"StockItems",{enumerable:!0,get:function(){return __importDefault(stock_items_1).default}});var stock_line_items_1=require("./resources/stock_line_items");Object.defineProperty(exports,"StockLineItems",{enumerable:!0,get:function(){return __importDefault(stock_line_items_1).default}});var stock_locations_1=require("./resources/stock_locations");Object.defineProperty(exports,"StockLocations",{enumerable:!0,get:function(){return __importDefault(stock_locations_1).default}});var stock_transfers_1=require("./resources/stock_transfers");Object.defineProperty(exports,"StockTransfers",{enumerable:!0,get:function(){return __importDefault(stock_transfers_1).default}});var stripe_gateways_1=require("./resources/stripe_gateways");Object.defineProperty(exports,"StripeGateways",{enumerable:!0,get:function(){return __importDefault(stripe_gateways_1).default}});var stripe_payments_1=require("./resources/stripe_payments");Object.defineProperty(exports,"StripePayments",{enumerable:!0,get:function(){return __importDefault(stripe_payments_1).default}});var tax_calculators_1=require("./resources/tax_calculators");Object.defineProperty(exports,"TaxCalculators",{enumerable:!0,get:function(){return __importDefault(tax_calculators_1).default}});var tax_categories_1=require("./resources/tax_categories");Object.defineProperty(exports,"TaxCategories",{enumerable:!0,get:function(){return __importDefault(tax_categories_1).default}});var tax_rules_1=require("./resources/tax_rules");Object.defineProperty(exports,"TaxRules",{enumerable:!0,get:function(){return __importDefault(tax_rules_1).default}});var taxjar_accounts_1=require("./resources/taxjar_accounts");Object.defineProperty(exports,"TaxjarAccounts",{enumerable:!0,get:function(){return __importDefault(taxjar_accounts_1).default}});var transactions_1=require("./resources/transactions");Object.defineProperty(exports,"Transactions",{enumerable:!0,get:function(){return __importDefault(transactions_1).default}});var voids_1=require("./resources/voids");Object.defineProperty(exports,"Voids",{enumerable:!0,get:function(){return __importDefault(voids_1).default}});var webhooks_1=require("./resources/webhooks");Object.defineProperty(exports,"Webhooks",{enumerable:!0,get:function(){return __importDefault(webhooks_1).default}});var wire_transfers_1=require("./resources/wire_transfers");Object.defineProperty(exports,"WireTransfers",{enumerable:!0,get:function(){return __importDefault(wire_transfers_1).default}}),exports.resourceList=["addresses","adjustments","adyen_gateways","adyen_payments","application","attachments","authorizations","avalara_accounts","billing_info_validation_rules","bing_geocoders","braintree_gateways","braintree_payments","bundles","captures","carrier_accounts","checkout_com_gateways","checkout_com_payments","coupon_codes_promotion_rules","coupon_recipients","coupons","customer_addresses","customer_groups","customer_password_resets","customer_payment_sources","customer_subscriptions","customers","delivery_lead_times","event_callbacks","external_gateways","external_payments","external_promotions","external_tax_calculators","fixed_amount_promotions","fixed_price_promotions","free_gift_promotions","free_shipping_promotions","geocoders","gift_card_recipients","gift_cards","google_geocoders","imports","in_stock_subscriptions","inventory_models","inventory_return_locations","inventory_stock_locations","line_item_options","line_items","manual_gateways","manual_tax_calculators","markets","merchants","order_amount_promotion_rules","order_copies","order_subscriptions","order_validation_rules","orders","organization","packages","parcel_line_items","parcels","payment_gateways","payment_methods","paypal_gateways","paypal_payments","percentage_discount_promotions","price_lists","prices","promotion_rules","promotions","refunds","return_line_items","returns","shipments","shipping_categories","shipping_methods","shipping_zones","sku_list_items","sku_list_promotion_rules","sku_lists","sku_options","skus","stock_items","stock_line_items","stock_locations","stock_transfers","stripe_gateways","stripe_payments","tax_calculators","tax_categories","tax_rules","taxjar_accounts","transactions","voids","webhooks","wire_transfers"];
|
package/lib/cjs/client.d.ts
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
import { AxiosProxyConfig, Method } from 'axios';
|
2
|
-
import type { DocWithData as JSONApiDocument, ResourceObject as JSONApiResource } from 'jsonapi-typescript';
|
3
|
-
import type { InterceptorManager } from './interceptor';
|
4
|
-
declare type RequestConfig = {
|
5
|
-
timeout?: number;
|
6
|
-
params?: {
|
7
|
-
[key: string]: string | number | boolean;
|
8
|
-
};
|
9
|
-
proxy?: AxiosProxyConfig | false;
|
10
|
-
};
|
11
|
-
declare type ApiClientInitConfig = {
|
12
|
-
organization: string;
|
13
|
-
domain?: string;
|
14
|
-
accessToken: string;
|
15
|
-
} & RequestConfig;
|
16
|
-
declare type ApiClientConfig = Partial<ApiClientInitConfig>;
|
17
|
-
declare class ApiClient {
|
18
|
-
#private;
|
19
|
-
static create(options: ApiClientInitConfig): ApiClient;
|
20
|
-
baseUrl: string;
|
21
|
-
interceptors: InterceptorManager;
|
22
|
-
private constructor();
|
23
|
-
config(config: ApiClientConfig): void;
|
24
|
-
request(method: Method, path: string, body?: JSONApiResource, options?: ApiClientConfig): Promise<JSONApiDocument>;
|
25
|
-
}
|
26
|
-
export default ApiClient;
|
27
|
-
export { ApiClientInitConfig, ApiClientConfig, RequestConfig };
|
package/lib/cjs/client.js
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";var __classPrivateFieldSet=this&&this.__classPrivateFieldSet||function(t,e,r,a,o){if(a==="m")throw new TypeError("Private method is not writable");if(a==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return a==="a"?o.call(t,r):o?o.value=r:e.set(t,r),r},__classPrivateFieldGet=this&&this.__classPrivateFieldGet||function(t,e,r,a){if(r==="a"&&!a)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!a:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?a:r==="a"?a.call(t):a?a.value:e.get(t)},__importDefault=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},_ApiClient_accessToken,_ApiClient_client;Object.defineProperty(exports,"__esModule",{value:!0});const axios_1=__importDefault(require("axios")),error_1=require("./error"),config_1=__importDefault(require("./config")),debug_1=__importDefault(require("./debug")),debug=(0,debug_1.default)(),baseURL=(t,e)=>`https://${t.toLowerCase()}.${e||config_1.default.default.domain}/api`,handleError=t=>{let e=new error_1.SdkError({message:t.message,type:error_1.ErrorType.GENERIC});if(axios_1.default.isAxiosError(t))if(t.response){const r=new error_1.ApiError(e);r.type=error_1.ErrorType.RESPONSE,r.status=t.response.status,r.code=String(r.status),r.errors=t.response.data.errors,e=r}else t.request?(e.type=error_1.ErrorType.REQUEST,e.request=t.request):e.type=error_1.ErrorType.CLIENT;else axios_1.default.isCancel(t)?e.type=error_1.ErrorType.CANCEL:e.source=t;throw e};class ApiClient{constructor(e){_ApiClient_accessToken.set(this,void 0),_ApiClient_client.set(this,void 0),debug("new client instance %O",e),this.baseUrl=baseURL(e.organization,e.domain),__classPrivateFieldSet(this,_ApiClient_accessToken,e.accessToken,"f");const r={timeout:e.timeout||config_1.default.client.timeout,proxy:e.proxy},a=Object.assign({baseURL:this.baseUrl,timeout:config_1.default.client.timeout,headers:{Accept:"application/vnd.api+json","Content-Type":"application/vnd.api+json",Authorization:"Bearer "+__classPrivateFieldGet(this,_ApiClient_accessToken,"f")}},r);debug("axios options: %O",a),__classPrivateFieldSet(this,_ApiClient_client,axios_1.default.create(a),"f"),this.interceptors=__classPrivateFieldGet(this,_ApiClient_client,"f").interceptors}static create(e){if(!(e==null?void 0:e.organization))throw new Error("Undefined 'organization' parameter");if(!(e==null?void 0:e.accessToken))throw new Error("Undefined 'accessToken' parameter");return new ApiClient(e)}config(e){debug("config %o",e);const r=__classPrivateFieldGet(this,_ApiClient_client,"f").defaults;e.timeout&&(r.timeout=e.timeout),e.proxy&&(r.proxy=e.proxy),e.organization&&(this.baseUrl=baseURL(e.organization,e.domain)),e.accessToken&&(__classPrivateFieldSet(this,_ApiClient_accessToken,e.accessToken,"f"),r.headers.common.Authorization="Bearer "+__classPrivateFieldGet(this,_ApiClient_accessToken,"f"))}async request(e,r,a,o){debug("request %s %s, %O, %O",e,r,a||{},o||{});const c=a?{data:a}:void 0,u=r,d=(o==null?void 0:o.organization)?baseURL(o.organization,o.domain):void 0,i=(o==null?void 0:o.accessToken)||__classPrivateFieldGet(this,_ApiClient_accessToken,"f"),l=i?{Authorization:"Bearer "+i}:void 0,n=Object.assign({method:e,baseURL:d,url:u,data:c,headers:l},o);return debug("request params: %O",n),__classPrivateFieldGet(this,_ApiClient_client,"f").request(n).then(s=>s.data).catch(s=>handleError(s))}}_ApiClient_accessToken=new WeakMap,_ApiClient_client=new WeakMap,exports.default=ApiClient;
|
package/lib/cjs/commercelayer.js
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(e,t,s,i){i===void 0&&(i=s),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[s]}})}:function(e,t,s,i){i===void 0&&(i=s),e[i]=t[s]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),__importStar=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)s!=="default"&&Object.prototype.hasOwnProperty.call(e,s)&&__createBinding(t,e,s);return __setModuleDefault(t,e),t},__classPrivateFieldSet=this&&this.__classPrivateFieldSet||function(e,t,s,i,n){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?n.call(e,s):n?n.value=s:t.set(e,s),s},__classPrivateFieldGet=this&&this.__classPrivateFieldGet||function(e,t,s,i){if(s==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return s==="m"?i:s==="a"?i.call(e):i?i.value:t.get(e)},__importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},_CommerceLayerClient_adapter,_CommerceLayerClient_organization;Object.defineProperty(exports,"__esModule",{value:!0});const api=__importStar(require("./api")),static_1=require("./static"),resource_1=__importDefault(require("./resource")),debug_1=__importDefault(require("./debug")),debug=(0,debug_1.default)(),OPEN_API_SCHEMA_VERSION="2.7.6";class CommerceLayerClient{constructor(t){_CommerceLayerClient_adapter.set(this,void 0),_CommerceLayerClient_organization.set(this,void 0),debug("new commercelayer instance %O",t),__classPrivateFieldSet(this,_CommerceLayerClient_adapter,new resource_1.default(t),"f"),__classPrivateFieldSet(this,_CommerceLayerClient_organization,t.organization,"f"),this.addresses=new api.Addresses(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.adjustments=new api.Adjustments(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.adyen_gateways=new api.AdyenGateways(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.adyen_payments=new api.AdyenPayments(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.application=new api.Applications(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.attachments=new api.Attachments(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.authorizations=new api.Authorizations(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.avalara_accounts=new api.AvalaraAccounts(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.billing_info_validation_rules=new api.BillingInfoValidationRules(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.bing_geocoders=new api.BingGeocoders(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.braintree_gateways=new api.BraintreeGateways(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.braintree_payments=new api.BraintreePayments(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.bundles=new api.Bundles(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.captures=new api.Captures(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.carrier_accounts=new api.CarrierAccounts(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.checkout_com_gateways=new api.CheckoutComGateways(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.checkout_com_payments=new api.CheckoutComPayments(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.coupon_codes_promotion_rules=new api.CouponCodesPromotionRules(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.coupon_recipients=new api.CouponRecipients(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.coupons=new api.Coupons(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.customer_addresses=new api.CustomerAddresses(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.customer_groups=new api.CustomerGroups(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.customer_password_resets=new api.CustomerPasswordResets(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.customer_payment_sources=new api.CustomerPaymentSources(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.customer_subscriptions=new api.CustomerSubscriptions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.customers=new api.Customers(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.delivery_lead_times=new api.DeliveryLeadTimes(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.event_callbacks=new api.EventCallbacks(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.external_gateways=new api.ExternalGateways(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.external_payments=new api.ExternalPayments(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.external_promotions=new api.ExternalPromotions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.external_tax_calculators=new api.ExternalTaxCalculators(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.fixed_amount_promotions=new api.FixedAmountPromotions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.fixed_price_promotions=new api.FixedPricePromotions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.free_gift_promotions=new api.FreeGiftPromotions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.free_shipping_promotions=new api.FreeShippingPromotions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.geocoders=new api.Geocoders(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.gift_card_recipients=new api.GiftCardRecipients(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.gift_cards=new api.GiftCards(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.google_geocoders=new api.GoogleGeocoders(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.imports=new api.Imports(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.in_stock_subscriptions=new api.InStockSubscriptions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.inventory_models=new api.InventoryModels(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.inventory_return_locations=new api.InventoryReturnLocations(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.inventory_stock_locations=new api.InventoryStockLocations(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.line_item_options=new api.LineItemOptions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.line_items=new api.LineItems(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.manual_gateways=new api.ManualGateways(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.manual_tax_calculators=new api.ManualTaxCalculators(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.markets=new api.Markets(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.merchants=new api.Merchants(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.order_amount_promotion_rules=new api.OrderAmountPromotionRules(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.order_copies=new api.OrderCopies(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.order_subscriptions=new api.OrderSubscriptions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.order_validation_rules=new api.OrderValidationRules(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.orders=new api.Orders(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.organization=new api.Organizations(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.packages=new api.Packages(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.parcel_line_items=new api.ParcelLineItems(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.parcels=new api.Parcels(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.payment_gateways=new api.PaymentGateways(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.payment_methods=new api.PaymentMethods(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.paypal_gateways=new api.PaypalGateways(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.paypal_payments=new api.PaypalPayments(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.percentage_discount_promotions=new api.PercentageDiscountPromotions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.price_lists=new api.PriceLists(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.prices=new api.Prices(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.promotion_rules=new api.PromotionRules(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.promotions=new api.Promotions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.refunds=new api.Refunds(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.return_line_items=new api.ReturnLineItems(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.returns=new api.Returns(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.shipments=new api.Shipments(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.shipping_categories=new api.ShippingCategories(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.shipping_methods=new api.ShippingMethods(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.shipping_zones=new api.ShippingZones(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.sku_list_items=new api.SkuListItems(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.sku_list_promotion_rules=new api.SkuListPromotionRules(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.sku_lists=new api.SkuLists(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.sku_options=new api.SkuOptions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.skus=new api.Skus(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.stock_items=new api.StockItems(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.stock_line_items=new api.StockLineItems(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.stock_locations=new api.StockLocations(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.stock_transfers=new api.StockTransfers(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.stripe_gateways=new api.StripeGateways(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.stripe_payments=new api.StripePayments(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.tax_calculators=new api.TaxCalculators(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.tax_categories=new api.TaxCategories(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.tax_rules=new api.TaxRules(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.taxjar_accounts=new api.TaxjarAccounts(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.transactions=new api.Transactions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.voids=new api.Voids(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.webhooks=new api.Webhooks(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.wire_transfers=new api.WireTransfers(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"))}static get openApiSchemaVersion(){return OPEN_API_SCHEMA_VERSION}get currentOrganization(){return __classPrivateFieldGet(this,_CommerceLayerClient_organization,"f")}localConfig(t){t.organization&&__classPrivateFieldSet(this,_CommerceLayerClient_organization,t.organization,"f")}config(t){debug("config %o",t),this.localConfig(t),__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f").config(t)}resources(){return static_1.CommerceLayerStatic.resources()}isApiError(t){return static_1.CommerceLayerStatic.isApiError(t)}addRequestInterceptor(t,s){return __classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f").interceptors.request.use(t,s)}addResponseInterceptor(t,s){return __classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f").interceptors.response.use(t,s)}removeInterceptor(t,s){return __classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f").interceptors[t].eject(s)}addRawResponseReader(){const t={id:void 0,rawResponse:void 0};function s(n){return t.rawResponse=n==null?void 0:n.data,n}const i=this.addResponseInterceptor(s);return t.id=i,t}removeRawResponseReader(t){const s=typeof t=="number"?t:t.id;if(s)return this.removeInterceptor("response",s)}}_CommerceLayerClient_adapter=new WeakMap,_CommerceLayerClient_organization=new WeakMap;const CommerceLayer=e=>new CommerceLayerClient(e);exports.default=CommerceLayer;
|
package/lib/cjs/common.js
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.isResourceType=exports.isResourceId=void 0;const api_1=require("./api"),isResourceId=e=>e&&e.type&&e.id&&api_1.resourceList.includes(e.type);exports.isResourceId=isResourceId;const isResourceType=e=>e&&typeof e.type!="undefined"&&e.type&&api_1.resourceList.includes(e.type);exports.isResourceType=isResourceType;
|
package/lib/cjs/config.js
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const config={default:{domain:"commercelayer.io",pageNumber:1,pageSize:10},client:{timeout:15e3}};exports.default=config;
|
package/lib/cjs/debug.js
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const debuggerFunction=(e,...r)=>{};let debuggerFactory=e=>debuggerFunction;try{const e=require("debug");e&&typeof e=="function"&&(debuggerFactory=e)}catch{}const debugPrefix="clsdk",caller=()=>{const e=new Error;Error.prepareStackTrace=(c,t)=>t;const r=e.stack;return Error.prepareStackTrace=void 0,(r[2].getFileName()||"/").replace(/^.*[\\/]/,"").replace(".ts","")},debug=e=>debuggerFactory(`${debugPrefix}:${e||caller()}`);exports.default=debug;
|
package/lib/cjs/error.js
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ErrorType=exports.ApiError=exports.SdkError=void 0;var ErrorType;(function(e){e.CLIENT="client",e.REQUEST="request",e.RESPONSE="response",e.GENERIC="generic",e.CANCEL="cancel"})(ErrorType||(ErrorType={})),exports.ErrorType=ErrorType;class SdkError extends Error{constructor(r){super(r.message);this.name=this.constructor.name,this.type=r.type||ErrorType.GENERIC}static isSdkError(r){return r&&["SdkError","ApiError"].includes(r.name)&&Object.values(ErrorType).includes(r.type)}}exports.SdkError=SdkError;class ApiError extends SdkError{constructor(r){super(Object.assign(Object.assign({},r),{type:ErrorType.RESPONSE}));this.errors=[],this.name=this.constructor.name}static isApiError(r){return SdkError.isSdkError(r)&&r.name==="ApiError"&&r.type===ErrorType.RESPONSE}first(){var r;return((r=this.errors)===null||r===void 0?void 0:r.length)>0?this.errors[0]:void 0}}exports.ApiError=ApiError;
|
package/lib/cjs/index.js
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(e,i,t,r){r===void 0&&(r=t),Object.defineProperty(e,r,{enumerable:!0,get:function(){return i[t]}})}:function(e,i,t,r){r===void 0&&(r=t),e[r]=i[t]}),__exportStar=this&&this.__exportStar||function(e,i){for(var t in e)t!=="default"&&!Object.prototype.hasOwnProperty.call(i,t)&&__createBinding(i,e,t)},__importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.CommerceLayerStatic=exports.default=void 0;var commercelayer_1=require("./commercelayer");Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return __importDefault(commercelayer_1).default}});var static_1=require("./static");Object.defineProperty(exports,"CommerceLayerStatic",{enumerable:!0,get:function(){return static_1.CommerceLayerStatic}}),__exportStar(require("./model"),exports);
|
package/lib/cjs/interceptor.js
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});
|
package/lib/cjs/jsonapi.js
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";var __importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.normalize=exports.denormalize=void 0;const common_1=require("./common"),debug_1=__importDefault(require("./debug")),debug=(0,debug_1.default)(),denormalize=e=>{let t;e.links&&delete e.links;const o=e.data,s=e.included;return Array.isArray(o)?t=o.map(i=>denormalizeResource(i,s)):t=denormalizeResource(o,s),t};exports.denormalize=denormalize;const findIncluded=(e,t=[])=>t.find(o=>e.id===o.id&&e.type===o.type)||e,denormalizeResource=(e,t)=>{debug("denormalize resource: %O, %o",e,t||{});const o=Object.assign({id:e.id,type:e.type},e.attributes);return e.relationships&&Object.keys(e.relationships).forEach(s=>{const i=e.relationships[s].data;i?Array.isArray(i)?o[s]=i.map(r=>denormalizeResource(findIncluded(r,t),t)):o[s]=denormalizeResource(findIncluded(i,t),t):i===null&&(o[s]=null)}),debug("denormalized resource: %O",o),o},normalize=e=>{debug("normalize resource: %O",e);const t={},o={};for(const i in e){if(["type","id"].includes(i))continue;const r=e[i];r&&((0,common_1.isResourceId)(r)||Array.isArray(r)&&(0,common_1.isResourceId)(r[0]))?o[i]={data:r}:t[i]=r}const s={type:e.type,attributes:t,relationships:o};return(0,common_1.isResourceId)(e)&&(s.id=e.id),debug("normalized resource: %O",s),s};exports.normalize=normalize;
|