@commercelayer/sdk 4.33.0 → 4.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/api.d.ts +3 -22
- package/lib/cjs/api.js +17 -1
- package/lib/cjs/client.d.ts +8 -15
- package/lib/cjs/client.js +10 -42
- package/lib/cjs/commercelayer.d.ts +5 -4
- package/lib/cjs/commercelayer.js +4 -3
- package/lib/cjs/common.d.ts +0 -1
- package/lib/cjs/common.js +2 -11
- package/lib/cjs/config.d.ts +0 -1
- package/lib/cjs/config.js +0 -1
- package/lib/cjs/debug.js +4 -0
- package/lib/cjs/error.d.ts +0 -1
- package/lib/cjs/error.js +6 -2
- package/lib/cjs/index.d.ts +1 -1
- package/lib/cjs/index.js +16 -0
- package/lib/cjs/interceptor.d.ts +2 -6
- package/lib/cjs/jsonapi.js +2 -9
- package/lib/cjs/model.d.ts +1 -0
- package/lib/cjs/query.d.ts +15 -9
- package/lib/cjs/query.js +2 -3
- package/lib/cjs/resource.d.ts +19 -29
- package/lib/cjs/resource.js +9 -34
- package/lib/cjs/resources/addresses.d.ts +75 -73
- package/lib/cjs/resources/addresses.js +15 -3
- package/lib/cjs/resources/adjustments.d.ts +21 -19
- package/lib/cjs/resources/adjustments.js +15 -3
- package/lib/cjs/resources/adyen_gateways.d.ts +36 -34
- package/lib/cjs/resources/adyen_gateways.js +15 -3
- package/lib/cjs/resources/adyen_payments.d.ts +29 -27
- package/lib/cjs/resources/adyen_payments.js +15 -3
- package/lib/cjs/resources/application.d.ts +13 -14
- package/lib/cjs/resources/application.js +6 -1
- package/lib/cjs/resources/attachments.d.ts +80 -81
- package/lib/cjs/resources/attachments.js +11 -3
- package/lib/cjs/resources/authorizations.d.ts +45 -43
- package/lib/cjs/resources/authorizations.js +13 -1
- package/lib/cjs/resources/avalara_accounts.d.ts +33 -31
- package/lib/cjs/resources/avalara_accounts.js +15 -3
- package/lib/cjs/resources/axerve_gateways.d.ts +25 -22
- package/lib/cjs/resources/axerve_gateways.js +15 -3
- package/lib/cjs/resources/axerve_payments.d.ts +28 -26
- package/lib/cjs/resources/axerve_payments.js +15 -3
- package/lib/cjs/resources/billing_info_validation_rules.d.ts +18 -16
- package/lib/cjs/resources/billing_info_validation_rules.js +15 -3
- package/lib/cjs/resources/bing_geocoders.d.ts +15 -16
- package/lib/cjs/resources/bing_geocoders.js +11 -3
- package/lib/cjs/resources/braintree_gateways.d.ts +35 -33
- package/lib/cjs/resources/braintree_gateways.js +15 -3
- package/lib/cjs/resources/braintree_payments.d.ts +31 -29
- package/lib/cjs/resources/braintree_payments.js +15 -3
- package/lib/cjs/resources/bundles.d.ts +56 -54
- package/lib/cjs/resources/bundles.js +15 -3
- package/lib/cjs/resources/captures.d.ts +36 -34
- package/lib/cjs/resources/captures.js +13 -1
- package/lib/cjs/resources/carrier_accounts.d.ts +17 -15
- package/lib/cjs/resources/carrier_accounts.js +12 -0
- package/lib/cjs/resources/checkout_com_gateways.d.ts +26 -24
- package/lib/cjs/resources/checkout_com_gateways.js +15 -3
- package/lib/cjs/resources/checkout_com_payments.d.ts +40 -38
- package/lib/cjs/resources/checkout_com_payments.js +15 -3
- package/lib/cjs/resources/cleanups.d.ts +25 -23
- package/lib/cjs/resources/cleanups.js +14 -2
- package/lib/cjs/resources/coupon_codes_promotion_rules.d.ts +32 -30
- package/lib/cjs/resources/coupon_codes_promotion_rules.js +15 -3
- package/lib/cjs/resources/coupon_recipients.d.ts +27 -25
- package/lib/cjs/resources/coupon_recipients.js +15 -3
- package/lib/cjs/resources/coupons.d.ts +40 -38
- package/lib/cjs/resources/coupons.js +15 -3
- package/lib/cjs/resources/customer_addresses.d.ts +24 -22
- package/lib/cjs/resources/customer_addresses.js +15 -3
- package/lib/cjs/resources/customer_groups.d.ts +18 -16
- package/lib/cjs/resources/customer_groups.js +15 -3
- package/lib/cjs/resources/customer_password_resets.d.ts +17 -18
- package/lib/cjs/resources/customer_password_resets.js +11 -3
- package/lib/cjs/resources/customer_payment_sources.d.ts +39 -45
- package/lib/cjs/resources/customer_payment_sources.js +15 -3
- package/lib/cjs/resources/customer_subscriptions.d.ts +16 -14
- package/lib/cjs/resources/customer_subscriptions.js +15 -3
- package/lib/cjs/resources/customers.d.ts +36 -37
- package/lib/cjs/resources/customers.js +11 -3
- package/lib/cjs/resources/delivery_lead_times.d.ts +28 -26
- package/lib/cjs/resources/delivery_lead_times.js +15 -3
- package/lib/cjs/resources/event_callbacks.d.ts +14 -15
- package/lib/cjs/resources/event_callbacks.js +8 -0
- package/lib/cjs/resources/events.d.ts +12 -13
- package/lib/cjs/resources/events.js +8 -0
- package/lib/cjs/resources/exports.d.ts +26 -27
- package/lib/cjs/resources/exports.js +10 -2
- package/lib/cjs/resources/external_gateways.d.ts +33 -31
- package/lib/cjs/resources/external_gateways.js +15 -3
- package/lib/cjs/resources/external_payments.d.ts +24 -22
- package/lib/cjs/resources/external_payments.js +15 -3
- package/lib/cjs/resources/external_promotions.d.ts +70 -60
- package/lib/cjs/resources/external_promotions.js +19 -3
- package/lib/cjs/resources/external_tax_calculators.d.ts +20 -18
- package/lib/cjs/resources/external_tax_calculators.js +15 -3
- package/lib/cjs/resources/fixed_amount_promotions.d.ts +71 -61
- package/lib/cjs/resources/fixed_amount_promotions.js +19 -3
- package/lib/cjs/resources/fixed_price_promotions.d.ts +75 -65
- package/lib/cjs/resources/fixed_price_promotions.js +19 -3
- package/lib/cjs/resources/free_gift_promotions.d.ts +74 -64
- package/lib/cjs/resources/free_gift_promotions.js +19 -3
- package/lib/cjs/resources/free_shipping_promotions.d.ts +67 -57
- package/lib/cjs/resources/free_shipping_promotions.js +19 -3
- package/lib/cjs/resources/geocoders.d.ts +12 -13
- package/lib/cjs/resources/geocoders.js +8 -0
- package/lib/cjs/resources/gift_card_recipients.d.ts +27 -25
- package/lib/cjs/resources/gift_card_recipients.js +15 -3
- package/lib/cjs/resources/gift_cards.d.ts +68 -66
- package/lib/cjs/resources/gift_cards.js +15 -3
- package/lib/cjs/resources/google_geocoders.d.ts +15 -16
- package/lib/cjs/resources/google_geocoders.js +11 -3
- package/lib/cjs/resources/imports.d.ts +31 -29
- package/lib/cjs/resources/imports.js +10 -2
- package/lib/cjs/resources/in_stock_subscriptions.d.ts +37 -35
- package/lib/cjs/resources/in_stock_subscriptions.js +15 -3
- package/lib/cjs/resources/inventory_models.d.ts +27 -25
- package/lib/cjs/resources/inventory_models.js +15 -3
- package/lib/cjs/resources/inventory_return_locations.d.ts +23 -21
- package/lib/cjs/resources/inventory_return_locations.js +15 -3
- package/lib/cjs/resources/inventory_stock_locations.d.ts +26 -24
- package/lib/cjs/resources/inventory_stock_locations.js +15 -3
- package/lib/cjs/resources/klarna_gateways.d.ts +24 -22
- package/lib/cjs/resources/klarna_gateways.js +15 -3
- package/lib/cjs/resources/klarna_payments.d.ts +29 -27
- package/lib/cjs/resources/klarna_payments.js +15 -3
- package/lib/cjs/resources/line_item_options.d.ts +40 -41
- package/lib/cjs/resources/line_item_options.js +11 -3
- package/lib/cjs/resources/line_items.d.ts +93 -90
- package/lib/cjs/resources/line_items.js +11 -3
- package/lib/cjs/resources/manual_gateways.d.ts +16 -14
- package/lib/cjs/resources/manual_gateways.js +15 -3
- package/lib/cjs/resources/manual_tax_calculators.d.ts +22 -20
- package/lib/cjs/resources/manual_tax_calculators.js +15 -3
- package/lib/cjs/resources/markets.d.ts +61 -59
- package/lib/cjs/resources/markets.js +15 -3
- package/lib/cjs/resources/merchants.d.ts +20 -18
- package/lib/cjs/resources/merchants.js +15 -3
- package/lib/cjs/resources/order_amount_promotion_rules.d.ts +35 -33
- package/lib/cjs/resources/order_amount_promotion_rules.js +15 -3
- package/lib/cjs/resources/order_copies.d.ts +28 -29
- package/lib/cjs/resources/order_copies.js +11 -3
- package/lib/cjs/resources/order_factories.d.ts +20 -21
- package/lib/cjs/resources/order_factories.js +8 -0
- package/lib/cjs/resources/order_subscription_items.d.ts +41 -35
- package/lib/cjs/resources/order_subscription_items.js +15 -3
- package/lib/cjs/resources/order_subscriptions.d.ts +53 -51
- package/lib/cjs/resources/order_subscriptions.js +15 -3
- package/lib/cjs/resources/order_validation_rules.d.ts +14 -12
- package/lib/cjs/resources/order_validation_rules.js +12 -0
- package/lib/cjs/resources/orders.d.ts +238 -231
- package/lib/cjs/resources/orders.js +15 -3
- package/lib/cjs/resources/organization.d.ts +24 -25
- package/lib/cjs/resources/organization.js +6 -1
- package/lib/cjs/resources/packages.d.ts +32 -30
- package/lib/cjs/resources/packages.js +15 -3
- package/lib/cjs/resources/parcel_line_items.d.ts +24 -22
- package/lib/cjs/resources/parcel_line_items.js +15 -3
- package/lib/cjs/resources/parcels.d.ts +95 -93
- package/lib/cjs/resources/parcels.js +15 -3
- package/lib/cjs/resources/payment_gateways.d.ts +14 -12
- package/lib/cjs/resources/payment_gateways.js +12 -0
- package/lib/cjs/resources/payment_methods.d.ts +50 -48
- package/lib/cjs/resources/payment_methods.js +15 -3
- package/lib/cjs/resources/paypal_gateways.d.ts +19 -17
- package/lib/cjs/resources/paypal_gateways.js +15 -3
- package/lib/cjs/resources/paypal_payments.d.ts +33 -31
- package/lib/cjs/resources/paypal_payments.js +15 -3
- package/lib/cjs/resources/percentage_discount_promotions.d.ts +74 -64
- package/lib/cjs/resources/percentage_discount_promotions.js +19 -3
- package/lib/cjs/resources/price_frequency_tiers.d.ts +28 -26
- package/lib/cjs/resources/price_frequency_tiers.js +15 -3
- package/lib/cjs/resources/price_lists.d.ts +22 -20
- package/lib/cjs/resources/price_lists.js +15 -3
- package/lib/cjs/resources/price_tiers.d.ts +19 -17
- package/lib/cjs/resources/price_tiers.js +12 -0
- package/lib/cjs/resources/price_volume_tiers.d.ts +28 -26
- package/lib/cjs/resources/price_volume_tiers.js +15 -3
- package/lib/cjs/resources/prices.d.ts +41 -39
- package/lib/cjs/resources/prices.js +15 -3
- package/lib/cjs/resources/promotion_rules.d.ts +13 -10
- package/lib/cjs/resources/promotion_rules.js +12 -0
- package/lib/cjs/resources/promotions.d.ts +31 -26
- package/lib/cjs/resources/promotions.js +16 -0
- package/lib/cjs/resources/recurring_order_copies.d.ts +28 -29
- package/lib/cjs/resources/recurring_order_copies.js +11 -3
- package/lib/cjs/resources/refunds.d.ts +27 -25
- package/lib/cjs/resources/refunds.js +12 -0
- package/lib/cjs/resources/reserved_stocks.d.ts +13 -14
- package/lib/cjs/resources/reserved_stocks.js +8 -0
- package/lib/cjs/resources/return_line_items.d.ts +27 -28
- package/lib/cjs/resources/return_line_items.js +11 -3
- package/lib/cjs/resources/returns.d.ts +51 -49
- package/lib/cjs/resources/returns.js +15 -3
- package/lib/cjs/resources/satispay_gateways.d.ts +24 -22
- package/lib/cjs/resources/satispay_gateways.js +15 -3
- package/lib/cjs/resources/satispay_payments.d.ts +31 -28
- package/lib/cjs/resources/satispay_payments.js +15 -3
- package/lib/cjs/resources/shipments.d.ts +59 -52
- package/lib/cjs/resources/shipments.js +13 -1
- package/lib/cjs/resources/shipping_categories.d.ts +17 -15
- package/lib/cjs/resources/shipping_categories.js +15 -3
- package/lib/cjs/resources/shipping_method_tiers.d.ts +19 -17
- package/lib/cjs/resources/shipping_method_tiers.js +12 -0
- package/lib/cjs/resources/shipping_methods.d.ts +79 -77
- package/lib/cjs/resources/shipping_methods.js +15 -3
- package/lib/cjs/resources/shipping_weight_tiers.d.ts +27 -25
- package/lib/cjs/resources/shipping_weight_tiers.js +15 -3
- package/lib/cjs/resources/shipping_zones.d.ts +34 -32
- package/lib/cjs/resources/shipping_zones.js +15 -3
- package/lib/cjs/resources/sku_list_items.d.ts +28 -26
- package/lib/cjs/resources/sku_list_items.js +15 -3
- package/lib/cjs/resources/sku_list_promotion_rules.d.ts +39 -37
- package/lib/cjs/resources/sku_list_promotion_rules.js +15 -3
- package/lib/cjs/resources/sku_lists.d.ts +37 -35
- package/lib/cjs/resources/sku_lists.js +15 -3
- package/lib/cjs/resources/sku_options.d.ts +45 -43
- package/lib/cjs/resources/sku_options.js +15 -3
- package/lib/cjs/resources/skus.d.ts +58 -56
- package/lib/cjs/resources/skus.js +15 -3
- package/lib/cjs/resources/stock_items.d.ts +30 -28
- package/lib/cjs/resources/stock_items.js +15 -3
- package/lib/cjs/resources/stock_line_items.d.ts +19 -17
- package/lib/cjs/resources/stock_line_items.js +12 -0
- package/lib/cjs/resources/stock_locations.d.ts +31 -29
- package/lib/cjs/resources/stock_locations.js +15 -3
- package/lib/cjs/resources/stock_reservations.d.ts +17 -18
- package/lib/cjs/resources/stock_reservations.js +8 -0
- package/lib/cjs/resources/stock_transfers.d.ts +44 -42
- package/lib/cjs/resources/stock_transfers.js +15 -3
- package/lib/cjs/resources/stripe_gateways.d.ts +24 -22
- package/lib/cjs/resources/stripe_gateways.js +15 -3
- package/lib/cjs/resources/stripe_payments.d.ts +34 -29
- package/lib/cjs/resources/stripe_payments.js +15 -3
- package/lib/cjs/resources/subscription_models.d.ts +26 -27
- package/lib/cjs/resources/subscription_models.js +11 -3
- package/lib/cjs/resources/tags.d.ts +12 -13
- package/lib/cjs/resources/tags.js +11 -3
- package/lib/cjs/resources/tax_calculators.d.ts +15 -13
- package/lib/cjs/resources/tax_calculators.js +12 -0
- package/lib/cjs/resources/tax_categories.d.ts +32 -30
- package/lib/cjs/resources/tax_categories.js +15 -3
- package/lib/cjs/resources/tax_rules.d.ts +53 -51
- package/lib/cjs/resources/tax_rules.js +15 -3
- package/lib/cjs/resources/taxjar_accounts.d.ts +23 -21
- package/lib/cjs/resources/taxjar_accounts.js +15 -3
- package/lib/cjs/resources/transactions.d.ts +25 -23
- package/lib/cjs/resources/transactions.js +12 -0
- package/lib/cjs/resources/versions.d.ts +22 -0
- package/lib/cjs/resources/versions.js +24 -0
- package/lib/cjs/resources/voids.d.ts +27 -25
- package/lib/cjs/resources/voids.js +12 -0
- package/lib/cjs/resources/webhooks.d.ts +28 -26
- package/lib/cjs/resources/webhooks.js +15 -3
- package/lib/cjs/resources/wire_transfers.d.ts +18 -16
- package/lib/cjs/resources/wire_transfers.js +15 -3
- package/lib/cjs/static.d.ts +1 -1
- package/lib/cjs/util.d.ts +3 -1
- package/lib/esm/api.d.ts +3 -22
- package/lib/esm/api.js +15 -0
- package/lib/esm/client.d.ts +8 -15
- package/lib/esm/client.js +10 -42
- package/lib/esm/commercelayer.d.ts +5 -4
- package/lib/esm/commercelayer.js +4 -3
- package/lib/esm/common.d.ts +0 -1
- package/lib/esm/common.js +2 -11
- package/lib/esm/config.d.ts +0 -1
- package/lib/esm/config.js +0 -1
- package/lib/esm/debug.js +4 -0
- package/lib/esm/error.d.ts +0 -1
- package/lib/esm/error.js +4 -1
- package/lib/esm/index.d.ts +1 -1
- package/lib/esm/index.js +2 -0
- package/lib/esm/interceptor.d.ts +2 -6
- package/lib/esm/jsonapi.js +2 -9
- package/lib/esm/model.d.ts +1 -0
- package/lib/esm/query.d.ts +15 -9
- package/lib/esm/query.js +2 -2
- package/lib/esm/resource.d.ts +19 -29
- package/lib/esm/resource.js +10 -34
- package/lib/esm/resources/addresses.d.ts +75 -73
- package/lib/esm/resources/addresses.js +15 -3
- package/lib/esm/resources/adjustments.d.ts +21 -19
- package/lib/esm/resources/adjustments.js +15 -3
- package/lib/esm/resources/adyen_gateways.d.ts +36 -34
- package/lib/esm/resources/adyen_gateways.js +15 -3
- package/lib/esm/resources/adyen_payments.d.ts +29 -27
- package/lib/esm/resources/adyen_payments.js +15 -3
- package/lib/esm/resources/application.d.ts +13 -14
- package/lib/esm/resources/application.js +7 -2
- package/lib/esm/resources/attachments.d.ts +80 -81
- package/lib/esm/resources/attachments.js +11 -3
- package/lib/esm/resources/authorizations.d.ts +45 -43
- package/lib/esm/resources/authorizations.js +13 -1
- package/lib/esm/resources/avalara_accounts.d.ts +33 -31
- package/lib/esm/resources/avalara_accounts.js +15 -3
- package/lib/esm/resources/axerve_gateways.d.ts +25 -22
- package/lib/esm/resources/axerve_gateways.js +15 -3
- package/lib/esm/resources/axerve_payments.d.ts +28 -26
- package/lib/esm/resources/axerve_payments.js +15 -3
- package/lib/esm/resources/billing_info_validation_rules.d.ts +18 -16
- package/lib/esm/resources/billing_info_validation_rules.js +15 -3
- package/lib/esm/resources/bing_geocoders.d.ts +15 -16
- package/lib/esm/resources/bing_geocoders.js +11 -3
- package/lib/esm/resources/braintree_gateways.d.ts +35 -33
- package/lib/esm/resources/braintree_gateways.js +15 -3
- package/lib/esm/resources/braintree_payments.d.ts +31 -29
- package/lib/esm/resources/braintree_payments.js +15 -3
- package/lib/esm/resources/bundles.d.ts +56 -54
- package/lib/esm/resources/bundles.js +15 -3
- package/lib/esm/resources/captures.d.ts +36 -34
- package/lib/esm/resources/captures.js +13 -1
- package/lib/esm/resources/carrier_accounts.d.ts +17 -15
- package/lib/esm/resources/carrier_accounts.js +12 -0
- package/lib/esm/resources/checkout_com_gateways.d.ts +26 -24
- package/lib/esm/resources/checkout_com_gateways.js +15 -3
- package/lib/esm/resources/checkout_com_payments.d.ts +40 -38
- package/lib/esm/resources/checkout_com_payments.js +15 -3
- package/lib/esm/resources/cleanups.d.ts +25 -23
- package/lib/esm/resources/cleanups.js +14 -2
- package/lib/esm/resources/coupon_codes_promotion_rules.d.ts +32 -30
- package/lib/esm/resources/coupon_codes_promotion_rules.js +15 -3
- package/lib/esm/resources/coupon_recipients.d.ts +27 -25
- package/lib/esm/resources/coupon_recipients.js +15 -3
- package/lib/esm/resources/coupons.d.ts +40 -38
- package/lib/esm/resources/coupons.js +15 -3
- package/lib/esm/resources/customer_addresses.d.ts +24 -22
- package/lib/esm/resources/customer_addresses.js +15 -3
- package/lib/esm/resources/customer_groups.d.ts +18 -16
- package/lib/esm/resources/customer_groups.js +15 -3
- package/lib/esm/resources/customer_password_resets.d.ts +17 -18
- package/lib/esm/resources/customer_password_resets.js +11 -3
- package/lib/esm/resources/customer_payment_sources.d.ts +39 -45
- package/lib/esm/resources/customer_payment_sources.js +15 -3
- package/lib/esm/resources/customer_subscriptions.d.ts +16 -14
- package/lib/esm/resources/customer_subscriptions.js +15 -3
- package/lib/esm/resources/customers.d.ts +36 -37
- package/lib/esm/resources/customers.js +11 -3
- package/lib/esm/resources/delivery_lead_times.d.ts +28 -26
- package/lib/esm/resources/delivery_lead_times.js +15 -3
- package/lib/esm/resources/event_callbacks.d.ts +14 -15
- package/lib/esm/resources/event_callbacks.js +8 -0
- package/lib/esm/resources/events.d.ts +12 -13
- package/lib/esm/resources/events.js +8 -0
- package/lib/esm/resources/exports.d.ts +26 -27
- package/lib/esm/resources/exports.js +10 -2
- package/lib/esm/resources/external_gateways.d.ts +33 -31
- package/lib/esm/resources/external_gateways.js +15 -3
- package/lib/esm/resources/external_payments.d.ts +24 -22
- package/lib/esm/resources/external_payments.js +15 -3
- package/lib/esm/resources/external_promotions.d.ts +70 -60
- package/lib/esm/resources/external_promotions.js +19 -3
- package/lib/esm/resources/external_tax_calculators.d.ts +20 -18
- package/lib/esm/resources/external_tax_calculators.js +15 -3
- package/lib/esm/resources/fixed_amount_promotions.d.ts +71 -61
- package/lib/esm/resources/fixed_amount_promotions.js +19 -3
- package/lib/esm/resources/fixed_price_promotions.d.ts +75 -65
- package/lib/esm/resources/fixed_price_promotions.js +19 -3
- package/lib/esm/resources/free_gift_promotions.d.ts +74 -64
- package/lib/esm/resources/free_gift_promotions.js +19 -3
- package/lib/esm/resources/free_shipping_promotions.d.ts +67 -57
- package/lib/esm/resources/free_shipping_promotions.js +19 -3
- package/lib/esm/resources/geocoders.d.ts +12 -13
- package/lib/esm/resources/geocoders.js +8 -0
- package/lib/esm/resources/gift_card_recipients.d.ts +27 -25
- package/lib/esm/resources/gift_card_recipients.js +15 -3
- package/lib/esm/resources/gift_cards.d.ts +68 -66
- package/lib/esm/resources/gift_cards.js +15 -3
- package/lib/esm/resources/google_geocoders.d.ts +15 -16
- package/lib/esm/resources/google_geocoders.js +11 -3
- package/lib/esm/resources/imports.d.ts +31 -29
- package/lib/esm/resources/imports.js +10 -2
- package/lib/esm/resources/in_stock_subscriptions.d.ts +37 -35
- package/lib/esm/resources/in_stock_subscriptions.js +15 -3
- package/lib/esm/resources/inventory_models.d.ts +27 -25
- package/lib/esm/resources/inventory_models.js +15 -3
- package/lib/esm/resources/inventory_return_locations.d.ts +23 -21
- package/lib/esm/resources/inventory_return_locations.js +15 -3
- package/lib/esm/resources/inventory_stock_locations.d.ts +26 -24
- package/lib/esm/resources/inventory_stock_locations.js +15 -3
- package/lib/esm/resources/klarna_gateways.d.ts +24 -22
- package/lib/esm/resources/klarna_gateways.js +15 -3
- package/lib/esm/resources/klarna_payments.d.ts +29 -27
- package/lib/esm/resources/klarna_payments.js +15 -3
- package/lib/esm/resources/line_item_options.d.ts +40 -41
- package/lib/esm/resources/line_item_options.js +11 -3
- package/lib/esm/resources/line_items.d.ts +93 -90
- package/lib/esm/resources/line_items.js +11 -3
- package/lib/esm/resources/manual_gateways.d.ts +16 -14
- package/lib/esm/resources/manual_gateways.js +15 -3
- package/lib/esm/resources/manual_tax_calculators.d.ts +22 -20
- package/lib/esm/resources/manual_tax_calculators.js +15 -3
- package/lib/esm/resources/markets.d.ts +61 -59
- package/lib/esm/resources/markets.js +15 -3
- package/lib/esm/resources/merchants.d.ts +20 -18
- package/lib/esm/resources/merchants.js +15 -3
- package/lib/esm/resources/order_amount_promotion_rules.d.ts +35 -33
- package/lib/esm/resources/order_amount_promotion_rules.js +15 -3
- package/lib/esm/resources/order_copies.d.ts +28 -29
- package/lib/esm/resources/order_copies.js +11 -3
- package/lib/esm/resources/order_factories.d.ts +20 -21
- package/lib/esm/resources/order_factories.js +8 -0
- package/lib/esm/resources/order_subscription_items.d.ts +41 -35
- package/lib/esm/resources/order_subscription_items.js +15 -3
- package/lib/esm/resources/order_subscriptions.d.ts +53 -51
- package/lib/esm/resources/order_subscriptions.js +15 -3
- package/lib/esm/resources/order_validation_rules.d.ts +14 -12
- package/lib/esm/resources/order_validation_rules.js +12 -0
- package/lib/esm/resources/orders.d.ts +238 -231
- package/lib/esm/resources/orders.js +15 -3
- package/lib/esm/resources/organization.d.ts +24 -25
- package/lib/esm/resources/organization.js +7 -2
- package/lib/esm/resources/packages.d.ts +32 -30
- package/lib/esm/resources/packages.js +15 -3
- package/lib/esm/resources/parcel_line_items.d.ts +24 -22
- package/lib/esm/resources/parcel_line_items.js +15 -3
- package/lib/esm/resources/parcels.d.ts +95 -93
- package/lib/esm/resources/parcels.js +15 -3
- package/lib/esm/resources/payment_gateways.d.ts +14 -12
- package/lib/esm/resources/payment_gateways.js +12 -0
- package/lib/esm/resources/payment_methods.d.ts +50 -48
- package/lib/esm/resources/payment_methods.js +15 -3
- package/lib/esm/resources/paypal_gateways.d.ts +19 -17
- package/lib/esm/resources/paypal_gateways.js +15 -3
- package/lib/esm/resources/paypal_payments.d.ts +33 -31
- package/lib/esm/resources/paypal_payments.js +15 -3
- package/lib/esm/resources/percentage_discount_promotions.d.ts +74 -64
- package/lib/esm/resources/percentage_discount_promotions.js +19 -3
- package/lib/esm/resources/price_frequency_tiers.d.ts +28 -26
- package/lib/esm/resources/price_frequency_tiers.js +15 -3
- package/lib/esm/resources/price_lists.d.ts +22 -20
- package/lib/esm/resources/price_lists.js +15 -3
- package/lib/esm/resources/price_tiers.d.ts +19 -17
- package/lib/esm/resources/price_tiers.js +12 -0
- package/lib/esm/resources/price_volume_tiers.d.ts +28 -26
- package/lib/esm/resources/price_volume_tiers.js +15 -3
- package/lib/esm/resources/prices.d.ts +41 -39
- package/lib/esm/resources/prices.js +15 -3
- package/lib/esm/resources/promotion_rules.d.ts +13 -10
- package/lib/esm/resources/promotion_rules.js +12 -0
- package/lib/esm/resources/promotions.d.ts +31 -26
- package/lib/esm/resources/promotions.js +16 -0
- package/lib/esm/resources/recurring_order_copies.d.ts +28 -29
- package/lib/esm/resources/recurring_order_copies.js +11 -3
- package/lib/esm/resources/refunds.d.ts +27 -25
- package/lib/esm/resources/refunds.js +12 -0
- package/lib/esm/resources/reserved_stocks.d.ts +13 -14
- package/lib/esm/resources/reserved_stocks.js +8 -0
- package/lib/esm/resources/return_line_items.d.ts +27 -28
- package/lib/esm/resources/return_line_items.js +11 -3
- package/lib/esm/resources/returns.d.ts +51 -49
- package/lib/esm/resources/returns.js +15 -3
- package/lib/esm/resources/satispay_gateways.d.ts +24 -22
- package/lib/esm/resources/satispay_gateways.js +15 -3
- package/lib/esm/resources/satispay_payments.d.ts +31 -28
- package/lib/esm/resources/satispay_payments.js +15 -3
- package/lib/esm/resources/shipments.d.ts +59 -52
- package/lib/esm/resources/shipments.js +13 -1
- package/lib/esm/resources/shipping_categories.d.ts +17 -15
- package/lib/esm/resources/shipping_categories.js +15 -3
- package/lib/esm/resources/shipping_method_tiers.d.ts +19 -17
- package/lib/esm/resources/shipping_method_tiers.js +12 -0
- package/lib/esm/resources/shipping_methods.d.ts +79 -77
- package/lib/esm/resources/shipping_methods.js +15 -3
- package/lib/esm/resources/shipping_weight_tiers.d.ts +27 -25
- package/lib/esm/resources/shipping_weight_tiers.js +15 -3
- package/lib/esm/resources/shipping_zones.d.ts +34 -32
- package/lib/esm/resources/shipping_zones.js +15 -3
- package/lib/esm/resources/sku_list_items.d.ts +28 -26
- package/lib/esm/resources/sku_list_items.js +15 -3
- package/lib/esm/resources/sku_list_promotion_rules.d.ts +39 -37
- package/lib/esm/resources/sku_list_promotion_rules.js +15 -3
- package/lib/esm/resources/sku_lists.d.ts +37 -35
- package/lib/esm/resources/sku_lists.js +15 -3
- package/lib/esm/resources/sku_options.d.ts +45 -43
- package/lib/esm/resources/sku_options.js +15 -3
- package/lib/esm/resources/skus.d.ts +58 -56
- package/lib/esm/resources/skus.js +15 -3
- package/lib/esm/resources/stock_items.d.ts +30 -28
- package/lib/esm/resources/stock_items.js +15 -3
- package/lib/esm/resources/stock_line_items.d.ts +19 -17
- package/lib/esm/resources/stock_line_items.js +12 -0
- package/lib/esm/resources/stock_locations.d.ts +31 -29
- package/lib/esm/resources/stock_locations.js +15 -3
- package/lib/esm/resources/stock_reservations.d.ts +17 -18
- package/lib/esm/resources/stock_reservations.js +8 -0
- package/lib/esm/resources/stock_transfers.d.ts +44 -42
- package/lib/esm/resources/stock_transfers.js +15 -3
- package/lib/esm/resources/stripe_gateways.d.ts +24 -22
- package/lib/esm/resources/stripe_gateways.js +15 -3
- package/lib/esm/resources/stripe_payments.d.ts +34 -29
- package/lib/esm/resources/stripe_payments.js +15 -3
- package/lib/esm/resources/subscription_models.d.ts +26 -27
- package/lib/esm/resources/subscription_models.js +11 -3
- package/lib/esm/resources/tags.d.ts +12 -13
- package/lib/esm/resources/tags.js +11 -3
- package/lib/esm/resources/tax_calculators.d.ts +15 -13
- package/lib/esm/resources/tax_calculators.js +12 -0
- package/lib/esm/resources/tax_categories.d.ts +32 -30
- package/lib/esm/resources/tax_categories.js +15 -3
- package/lib/esm/resources/tax_rules.d.ts +53 -51
- package/lib/esm/resources/tax_rules.js +15 -3
- package/lib/esm/resources/taxjar_accounts.d.ts +23 -21
- package/lib/esm/resources/taxjar_accounts.js +15 -3
- package/lib/esm/resources/transactions.d.ts +25 -23
- package/lib/esm/resources/transactions.js +12 -0
- package/lib/esm/resources/versions.d.ts +22 -0
- package/lib/esm/resources/versions.js +22 -0
- package/lib/esm/resources/voids.d.ts +27 -25
- package/lib/esm/resources/voids.js +12 -0
- package/lib/esm/resources/webhooks.d.ts +28 -26
- package/lib/esm/resources/webhooks.js +15 -3
- package/lib/esm/resources/wire_transfers.d.ts +18 -16
- package/lib/esm/resources/wire_transfers.js +15 -3
- package/lib/esm/static.d.ts +1 -1
- package/lib/esm/util.d.ts +3 -1
- package/lib/tsconfig.esm.tsbuildinfo +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +9 -9
@@ -1,41 +1,40 @@
|
|
1
|
-
import { ApiResource } from '../resource';
|
2
|
-
import type {
|
3
|
-
import type { QueryParamsRetrieve, QueryParamsList } from '../query';
|
1
|
+
import { ApiResource, Resource, ResourceCreate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
2
|
+
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
4
3
|
import type { Event } from './events';
|
5
|
-
type ExportType = 'exports';
|
6
4
|
type ExportRel = ResourceRel & {
|
7
|
-
type:
|
5
|
+
type: typeof Exports.TYPE;
|
8
6
|
};
|
9
7
|
interface Export extends Resource {
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
events?: Event[] | null;
|
8
|
+
resource_type?: string;
|
9
|
+
format?: string;
|
10
|
+
status?: string;
|
11
|
+
includes?: string[];
|
12
|
+
filters?: object;
|
13
|
+
dry_data?: boolean;
|
14
|
+
started_at?: string;
|
15
|
+
completed_at?: string;
|
16
|
+
interrupted_at?: string;
|
17
|
+
records_count?: number;
|
18
|
+
attachment_url?: string;
|
19
|
+
events?: Event[];
|
23
20
|
}
|
24
21
|
interface ExportCreate extends ResourceCreate {
|
25
22
|
resource_type: string;
|
26
|
-
format?: string
|
27
|
-
includes?: string[]
|
28
|
-
filters?:
|
29
|
-
dry_data?: boolean
|
23
|
+
format?: string;
|
24
|
+
includes?: string[];
|
25
|
+
filters?: object;
|
26
|
+
dry_data?: boolean;
|
30
27
|
}
|
31
|
-
declare class Exports extends ApiResource
|
32
|
-
static readonly TYPE:
|
28
|
+
declare class Exports extends ApiResource {
|
29
|
+
static readonly TYPE: 'exports';
|
30
|
+
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Export>>;
|
33
31
|
create(resource: ExportCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Export>;
|
34
|
-
|
32
|
+
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Export>;
|
33
|
+
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
35
34
|
events(exportId: string | Export, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
36
35
|
isExport(resource: any): resource is Export;
|
37
36
|
relationship(id: string | ResourceId | null): ExportRel;
|
38
|
-
type():
|
37
|
+
type(): string;
|
39
38
|
}
|
40
39
|
export default Exports;
|
41
|
-
export
|
40
|
+
export { Export, ExportCreate };
|
@@ -1,15 +1,23 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
2
|
class Exports extends ApiResource {
|
3
|
+
// static readonly PATH = 'exports'
|
4
|
+
async list(params, options) {
|
5
|
+
return this.resources.list({ type: Exports.TYPE }, params, options);
|
6
|
+
}
|
3
7
|
async create(resource, params, options) {
|
4
|
-
return this.resources.create({
|
8
|
+
return this.resources.create(Object.assign(Object.assign({}, resource), { type: Exports.TYPE }), params, options);
|
9
|
+
}
|
10
|
+
async retrieve(id, params, options) {
|
11
|
+
return this.resources.retrieve({ type: Exports.TYPE, id }, params, options);
|
5
12
|
}
|
6
13
|
async delete(id, options) {
|
7
|
-
await this.resources.delete(
|
14
|
+
await this.resources.delete({ type: Exports.TYPE, id }, options);
|
8
15
|
}
|
9
16
|
async events(exportId, params, options) {
|
10
17
|
const _exportId = exportId.id || exportId;
|
11
18
|
return this.resources.fetch({ type: 'events' }, `exports/${_exportId}/events`, params, options);
|
12
19
|
}
|
20
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
13
21
|
isExport(resource) {
|
14
22
|
return resource.type && (resource.type === Exports.TYPE);
|
15
23
|
}
|
@@ -1,50 +1,52 @@
|
|
1
|
-
import { ApiResource } from '../resource';
|
2
|
-
import type {
|
3
|
-
import type { QueryParamsRetrieve, QueryParamsList } from '../query';
|
1
|
+
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
2
|
+
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
4
3
|
import type { PaymentMethod } from './payment_methods';
|
4
|
+
import type { Version } from './versions';
|
5
5
|
import type { ExternalPayment } from './external_payments';
|
6
|
-
type ExternalGatewayType = 'external_gateways';
|
7
6
|
type ExternalGatewayRel = ResourceRel & {
|
8
|
-
type:
|
7
|
+
type: typeof ExternalGateways.TYPE;
|
9
8
|
};
|
10
9
|
interface ExternalGateway extends Resource {
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
external_payments?: ExternalPayment[]
|
10
|
+
name?: string;
|
11
|
+
shared_secret?: string;
|
12
|
+
authorize_url?: string;
|
13
|
+
capture_url?: string;
|
14
|
+
void_url?: string;
|
15
|
+
refund_url?: string;
|
16
|
+
token_url?: string;
|
17
|
+
payment_methods?: PaymentMethod[];
|
18
|
+
versions?: Version[];
|
19
|
+
external_payments?: ExternalPayment[];
|
21
20
|
}
|
22
21
|
interface ExternalGatewayCreate extends ResourceCreate {
|
23
22
|
name: string;
|
24
|
-
authorize_url?: string
|
25
|
-
capture_url?: string
|
26
|
-
void_url?: string
|
27
|
-
refund_url?: string
|
28
|
-
token_url?: string
|
23
|
+
authorize_url?: string;
|
24
|
+
capture_url?: string;
|
25
|
+
void_url?: string;
|
26
|
+
refund_url?: string;
|
27
|
+
token_url?: string;
|
29
28
|
}
|
30
29
|
interface ExternalGatewayUpdate extends ResourceUpdate {
|
31
|
-
name?: string
|
32
|
-
authorize_url?: string
|
33
|
-
capture_url?: string
|
34
|
-
void_url?: string
|
35
|
-
refund_url?: string
|
36
|
-
token_url?: string
|
30
|
+
name?: string;
|
31
|
+
authorize_url?: string;
|
32
|
+
capture_url?: string;
|
33
|
+
void_url?: string;
|
34
|
+
refund_url?: string;
|
35
|
+
token_url?: string;
|
37
36
|
}
|
38
|
-
declare class ExternalGateways extends ApiResource
|
39
|
-
static readonly TYPE:
|
37
|
+
declare class ExternalGateways extends ApiResource {
|
38
|
+
static readonly TYPE: 'external_gateways';
|
39
|
+
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<ExternalGateway>>;
|
40
40
|
create(resource: ExternalGatewayCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ExternalGateway>;
|
41
|
+
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ExternalGateway>;
|
41
42
|
update(resource: ExternalGatewayUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ExternalGateway>;
|
42
|
-
delete(id: string
|
43
|
+
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
43
44
|
payment_methods(externalGatewayId: string | ExternalGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>>;
|
45
|
+
versions(externalGatewayId: string | ExternalGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
44
46
|
external_payments(externalGatewayId: string | ExternalGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<ExternalPayment>>;
|
45
47
|
isExternalGateway(resource: any): resource is ExternalGateway;
|
46
48
|
relationship(id: string | ResourceId | null): ExternalGatewayRel;
|
47
|
-
type():
|
49
|
+
type(): string;
|
48
50
|
}
|
49
51
|
export default ExternalGateways;
|
50
|
-
export
|
52
|
+
export { ExternalGateway, ExternalGatewayCreate, ExternalGatewayUpdate };
|
@@ -1,22 +1,34 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
2
|
class ExternalGateways extends ApiResource {
|
3
|
+
// static readonly PATH = 'external_gateways'
|
4
|
+
async list(params, options) {
|
5
|
+
return this.resources.list({ type: ExternalGateways.TYPE }, params, options);
|
6
|
+
}
|
3
7
|
async create(resource, params, options) {
|
4
|
-
return this.resources.create({
|
8
|
+
return this.resources.create(Object.assign(Object.assign({}, resource), { type: ExternalGateways.TYPE }), params, options);
|
9
|
+
}
|
10
|
+
async retrieve(id, params, options) {
|
11
|
+
return this.resources.retrieve({ type: ExternalGateways.TYPE, id }, params, options);
|
5
12
|
}
|
6
13
|
async update(resource, params, options) {
|
7
|
-
return this.resources.update({
|
14
|
+
return this.resources.update(Object.assign(Object.assign({}, resource), { type: ExternalGateways.TYPE }), params, options);
|
8
15
|
}
|
9
16
|
async delete(id, options) {
|
10
|
-
await this.resources.delete(
|
17
|
+
await this.resources.delete({ type: ExternalGateways.TYPE, id }, options);
|
11
18
|
}
|
12
19
|
async payment_methods(externalGatewayId, params, options) {
|
13
20
|
const _externalGatewayId = externalGatewayId.id || externalGatewayId;
|
14
21
|
return this.resources.fetch({ type: 'payment_methods' }, `external_gateways/${_externalGatewayId}/payment_methods`, params, options);
|
15
22
|
}
|
23
|
+
async versions(externalGatewayId, params, options) {
|
24
|
+
const _externalGatewayId = externalGatewayId.id || externalGatewayId;
|
25
|
+
return this.resources.fetch({ type: 'versions' }, `external_gateways/${_externalGatewayId}/versions`, params, options);
|
26
|
+
}
|
16
27
|
async external_payments(externalGatewayId, params, options) {
|
17
28
|
const _externalGatewayId = externalGatewayId.id || externalGatewayId;
|
18
29
|
return this.resources.fetch({ type: 'external_payments' }, `external_gateways/${_externalGatewayId}/external_payments`, params, options);
|
19
30
|
}
|
31
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
20
32
|
isExternalGateway(resource) {
|
21
33
|
return resource.type && (resource.type === ExternalGateways.TYPE);
|
22
34
|
}
|
@@ -1,45 +1,47 @@
|
|
1
|
-
import { ApiResource } from '../resource';
|
2
|
-
import type {
|
3
|
-
import type {
|
4
|
-
import type { Order, OrderType } from './orders';
|
1
|
+
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
2
|
+
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
|
+
import type { Order } from './orders';
|
5
4
|
import type { PaymentGateway } from './payment_gateways';
|
6
5
|
import type { CustomerPaymentSource } from './customer_payment_sources';
|
7
|
-
type
|
6
|
+
import type { Version } from './versions';
|
8
7
|
type ExternalPaymentRel = ResourceRel & {
|
9
|
-
type:
|
8
|
+
type: typeof ExternalPayments.TYPE;
|
10
9
|
};
|
11
10
|
type OrderRel = ResourceRel & {
|
12
|
-
type:
|
11
|
+
type: 'orders';
|
13
12
|
};
|
14
13
|
interface ExternalPayment extends Resource {
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
14
|
+
payment_source_token?: string;
|
15
|
+
options?: object;
|
16
|
+
payment_instrument?: object;
|
17
|
+
order?: Order;
|
18
|
+
payment_gateway?: PaymentGateway;
|
19
|
+
wallet?: CustomerPaymentSource;
|
20
|
+
versions?: Version[];
|
22
21
|
}
|
23
22
|
interface ExternalPaymentCreate extends ResourceCreate {
|
24
23
|
payment_source_token: string;
|
25
|
-
options?:
|
24
|
+
options?: object;
|
26
25
|
order: OrderRel;
|
27
26
|
}
|
28
27
|
interface ExternalPaymentUpdate extends ResourceUpdate {
|
29
|
-
options?:
|
30
|
-
order?: OrderRel
|
28
|
+
options?: object;
|
29
|
+
order?: OrderRel;
|
31
30
|
}
|
32
|
-
declare class ExternalPayments extends ApiResource
|
33
|
-
static readonly TYPE:
|
31
|
+
declare class ExternalPayments extends ApiResource {
|
32
|
+
static readonly TYPE: 'external_payments';
|
33
|
+
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<ExternalPayment>>;
|
34
34
|
create(resource: ExternalPaymentCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ExternalPayment>;
|
35
|
+
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ExternalPayment>;
|
35
36
|
update(resource: ExternalPaymentUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ExternalPayment>;
|
36
|
-
delete(id: string
|
37
|
+
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
37
38
|
order(externalPaymentId: string | ExternalPayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
38
39
|
payment_gateway(externalPaymentId: string | ExternalPayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaymentGateway>;
|
39
40
|
wallet(externalPaymentId: string | ExternalPayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CustomerPaymentSource>;
|
41
|
+
versions(externalPaymentId: string | ExternalPayment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
40
42
|
isExternalPayment(resource: any): resource is ExternalPayment;
|
41
43
|
relationship(id: string | ResourceId | null): ExternalPaymentRel;
|
42
|
-
type():
|
44
|
+
type(): string;
|
43
45
|
}
|
44
46
|
export default ExternalPayments;
|
45
|
-
export
|
47
|
+
export { ExternalPayment, ExternalPaymentCreate, ExternalPaymentUpdate };
|
@@ -1,13 +1,20 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
2
|
class ExternalPayments extends ApiResource {
|
3
|
+
// static readonly PATH = 'external_payments'
|
4
|
+
async list(params, options) {
|
5
|
+
return this.resources.list({ type: ExternalPayments.TYPE }, params, options);
|
6
|
+
}
|
3
7
|
async create(resource, params, options) {
|
4
|
-
return this.resources.create({
|
8
|
+
return this.resources.create(Object.assign(Object.assign({}, resource), { type: ExternalPayments.TYPE }), params, options);
|
9
|
+
}
|
10
|
+
async retrieve(id, params, options) {
|
11
|
+
return this.resources.retrieve({ type: ExternalPayments.TYPE, id }, params, options);
|
5
12
|
}
|
6
13
|
async update(resource, params, options) {
|
7
|
-
return this.resources.update({
|
14
|
+
return this.resources.update(Object.assign(Object.assign({}, resource), { type: ExternalPayments.TYPE }), params, options);
|
8
15
|
}
|
9
16
|
async delete(id, options) {
|
10
|
-
await this.resources.delete(
|
17
|
+
await this.resources.delete({ type: ExternalPayments.TYPE, id }, options);
|
11
18
|
}
|
12
19
|
async order(externalPaymentId, params, options) {
|
13
20
|
const _externalPaymentId = externalPaymentId.id || externalPaymentId;
|
@@ -21,6 +28,11 @@ class ExternalPayments extends ApiResource {
|
|
21
28
|
const _externalPaymentId = externalPaymentId.id || externalPaymentId;
|
22
29
|
return this.resources.fetch({ type: 'customer_payment_sources' }, `external_payments/${_externalPaymentId}/wallet`, params, options);
|
23
30
|
}
|
31
|
+
async versions(externalPaymentId, params, options) {
|
32
|
+
const _externalPaymentId = externalPaymentId.id || externalPaymentId;
|
33
|
+
return this.resources.fetch({ type: 'versions' }, `external_payments/${_externalPaymentId}/versions`, params, options);
|
34
|
+
}
|
35
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
24
36
|
isExternalPayment(resource) {
|
25
37
|
return resource.type && (resource.type === ExternalPayments.TYPE);
|
26
38
|
}
|
@@ -1,102 +1,112 @@
|
|
1
|
-
import { ApiResource } from '../resource';
|
2
|
-
import type {
|
3
|
-
import type {
|
4
|
-
import type {
|
5
|
-
import type {
|
6
|
-
import type {
|
7
|
-
import type {
|
8
|
-
import type {
|
1
|
+
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
2
|
+
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
|
+
import type { Market } from './markets';
|
4
|
+
import type { PromotionRule } from './promotion_rules';
|
5
|
+
import type { OrderAmountPromotionRule } from './order_amount_promotion_rules';
|
6
|
+
import type { SkuListPromotionRule } from './sku_list_promotion_rules';
|
7
|
+
import type { CouponCodesPromotionRule } from './coupon_codes_promotion_rules';
|
8
|
+
import type { Coupon } from './coupons';
|
9
9
|
import type { SkuList } from './sku_lists';
|
10
10
|
import type { Attachment } from './attachments';
|
11
11
|
import type { Event } from './events';
|
12
|
-
import type { Tag
|
13
|
-
type
|
12
|
+
import type { Tag } from './tags';
|
13
|
+
import type { Version } from './versions';
|
14
14
|
type ExternalPromotionRel = ResourceRel & {
|
15
|
-
type:
|
15
|
+
type: typeof ExternalPromotions.TYPE;
|
16
16
|
};
|
17
17
|
type MarketRel = ResourceRel & {
|
18
|
-
type:
|
18
|
+
type: 'markets';
|
19
19
|
};
|
20
20
|
type PromotionRuleRel = ResourceRel & {
|
21
|
-
type:
|
21
|
+
type: 'promotion_rules';
|
22
22
|
};
|
23
23
|
type OrderAmountPromotionRuleRel = ResourceRel & {
|
24
|
-
type:
|
24
|
+
type: 'order_amount_promotion_rules';
|
25
25
|
};
|
26
26
|
type SkuListPromotionRuleRel = ResourceRel & {
|
27
|
-
type:
|
27
|
+
type: 'sku_list_promotion_rules';
|
28
28
|
};
|
29
29
|
type CouponCodesPromotionRuleRel = ResourceRel & {
|
30
|
-
type:
|
30
|
+
type: 'coupon_codes_promotion_rules';
|
31
|
+
};
|
32
|
+
type CouponRel = ResourceRel & {
|
33
|
+
type: 'coupons';
|
31
34
|
};
|
32
35
|
type TagRel = ResourceRel & {
|
33
|
-
type:
|
36
|
+
type: 'tags';
|
34
37
|
};
|
35
38
|
interface ExternalPromotion extends Resource {
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
sku_list?: SkuList
|
52
|
-
attachments?: Attachment[]
|
53
|
-
events?: Event[]
|
54
|
-
tags?: Tag[]
|
39
|
+
name?: string;
|
40
|
+
currency_code?: string;
|
41
|
+
starts_at?: string;
|
42
|
+
expires_at?: string;
|
43
|
+
total_usage_limit?: number;
|
44
|
+
total_usage_count?: number;
|
45
|
+
active?: boolean;
|
46
|
+
promotion_url?: string;
|
47
|
+
shared_secret?: string;
|
48
|
+
market?: Market;
|
49
|
+
promotion_rules?: PromotionRule[];
|
50
|
+
order_amount_promotion_rule?: OrderAmountPromotionRule;
|
51
|
+
sku_list_promotion_rule?: SkuListPromotionRule;
|
52
|
+
coupon_codes_promotion_rule?: CouponCodesPromotionRule;
|
53
|
+
coupons?: Coupon[];
|
54
|
+
sku_list?: SkuList;
|
55
|
+
attachments?: Attachment[];
|
56
|
+
events?: Event[];
|
57
|
+
tags?: Tag[];
|
58
|
+
versions?: Version[];
|
55
59
|
}
|
56
60
|
interface ExternalPromotionCreate extends ResourceCreate {
|
57
61
|
name: string;
|
58
|
-
currency_code?: string
|
62
|
+
currency_code?: string;
|
59
63
|
starts_at: string;
|
60
64
|
expires_at: string;
|
61
65
|
total_usage_limit: number;
|
62
66
|
promotion_url: string;
|
63
|
-
market?: MarketRel
|
64
|
-
promotion_rules?: PromotionRuleRel[]
|
65
|
-
order_amount_promotion_rule?: OrderAmountPromotionRuleRel
|
66
|
-
sku_list_promotion_rule?: SkuListPromotionRuleRel
|
67
|
-
coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel
|
68
|
-
|
67
|
+
market?: MarketRel;
|
68
|
+
promotion_rules?: PromotionRuleRel[];
|
69
|
+
order_amount_promotion_rule?: OrderAmountPromotionRuleRel;
|
70
|
+
sku_list_promotion_rule?: SkuListPromotionRuleRel;
|
71
|
+
coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel;
|
72
|
+
coupons?: CouponRel[];
|
73
|
+
tags?: TagRel[];
|
69
74
|
}
|
70
75
|
interface ExternalPromotionUpdate extends ResourceUpdate {
|
71
|
-
name?: string
|
72
|
-
currency_code?: string
|
73
|
-
starts_at?: string
|
74
|
-
expires_at?: string
|
75
|
-
total_usage_limit?: number
|
76
|
-
promotion_url?: string
|
77
|
-
market?: MarketRel
|
78
|
-
promotion_rules?: PromotionRuleRel[]
|
79
|
-
order_amount_promotion_rule?: OrderAmountPromotionRuleRel
|
80
|
-
sku_list_promotion_rule?: SkuListPromotionRuleRel
|
81
|
-
coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel
|
82
|
-
|
76
|
+
name?: string;
|
77
|
+
currency_code?: string;
|
78
|
+
starts_at?: string;
|
79
|
+
expires_at?: string;
|
80
|
+
total_usage_limit?: number;
|
81
|
+
promotion_url?: string;
|
82
|
+
market?: MarketRel;
|
83
|
+
promotion_rules?: PromotionRuleRel[];
|
84
|
+
order_amount_promotion_rule?: OrderAmountPromotionRuleRel;
|
85
|
+
sku_list_promotion_rule?: SkuListPromotionRuleRel;
|
86
|
+
coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel;
|
87
|
+
coupons?: CouponRel[];
|
88
|
+
tags?: TagRel[];
|
83
89
|
}
|
84
|
-
declare class ExternalPromotions extends ApiResource
|
85
|
-
static readonly TYPE:
|
90
|
+
declare class ExternalPromotions extends ApiResource {
|
91
|
+
static readonly TYPE: 'external_promotions';
|
92
|
+
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<ExternalPromotion>>;
|
86
93
|
create(resource: ExternalPromotionCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ExternalPromotion>;
|
94
|
+
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ExternalPromotion>;
|
87
95
|
update(resource: ExternalPromotionUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ExternalPromotion>;
|
88
|
-
delete(id: string
|
96
|
+
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
89
97
|
market(externalPromotionId: string | ExternalPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Market>;
|
90
98
|
order_amount_promotion_rule(externalPromotionId: string | ExternalPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderAmountPromotionRule>;
|
91
99
|
sku_list_promotion_rule(externalPromotionId: string | ExternalPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuListPromotionRule>;
|
92
100
|
coupon_codes_promotion_rule(externalPromotionId: string | ExternalPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CouponCodesPromotionRule>;
|
101
|
+
coupons(externalPromotionId: string | ExternalPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Coupon>>;
|
93
102
|
sku_list(externalPromotionId: string | ExternalPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
|
94
103
|
attachments(externalPromotionId: string | ExternalPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
95
104
|
events(externalPromotionId: string | ExternalPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
96
105
|
tags(externalPromotionId: string | ExternalPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
|
106
|
+
versions(externalPromotionId: string | ExternalPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
97
107
|
isExternalPromotion(resource: any): resource is ExternalPromotion;
|
98
108
|
relationship(id: string | ResourceId | null): ExternalPromotionRel;
|
99
|
-
type():
|
109
|
+
type(): string;
|
100
110
|
}
|
101
111
|
export default ExternalPromotions;
|
102
|
-
export
|
112
|
+
export { ExternalPromotion, ExternalPromotionCreate, ExternalPromotionUpdate };
|
@@ -1,13 +1,20 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
2
|
class ExternalPromotions extends ApiResource {
|
3
|
+
// static readonly PATH = 'external_promotions'
|
4
|
+
async list(params, options) {
|
5
|
+
return this.resources.list({ type: ExternalPromotions.TYPE }, params, options);
|
6
|
+
}
|
3
7
|
async create(resource, params, options) {
|
4
|
-
return this.resources.create({
|
8
|
+
return this.resources.create(Object.assign(Object.assign({}, resource), { type: ExternalPromotions.TYPE }), params, options);
|
9
|
+
}
|
10
|
+
async retrieve(id, params, options) {
|
11
|
+
return this.resources.retrieve({ type: ExternalPromotions.TYPE, id }, params, options);
|
5
12
|
}
|
6
13
|
async update(resource, params, options) {
|
7
|
-
return this.resources.update({
|
14
|
+
return this.resources.update(Object.assign(Object.assign({}, resource), { type: ExternalPromotions.TYPE }), params, options);
|
8
15
|
}
|
9
16
|
async delete(id, options) {
|
10
|
-
await this.resources.delete(
|
17
|
+
await this.resources.delete({ type: ExternalPromotions.TYPE, id }, options);
|
11
18
|
}
|
12
19
|
async market(externalPromotionId, params, options) {
|
13
20
|
const _externalPromotionId = externalPromotionId.id || externalPromotionId;
|
@@ -25,6 +32,10 @@ class ExternalPromotions extends ApiResource {
|
|
25
32
|
const _externalPromotionId = externalPromotionId.id || externalPromotionId;
|
26
33
|
return this.resources.fetch({ type: 'coupon_codes_promotion_rules' }, `external_promotions/${_externalPromotionId}/coupon_codes_promotion_rule`, params, options);
|
27
34
|
}
|
35
|
+
async coupons(externalPromotionId, params, options) {
|
36
|
+
const _externalPromotionId = externalPromotionId.id || externalPromotionId;
|
37
|
+
return this.resources.fetch({ type: 'coupons' }, `external_promotions/${_externalPromotionId}/coupons`, params, options);
|
38
|
+
}
|
28
39
|
async sku_list(externalPromotionId, params, options) {
|
29
40
|
const _externalPromotionId = externalPromotionId.id || externalPromotionId;
|
30
41
|
return this.resources.fetch({ type: 'sku_lists' }, `external_promotions/${_externalPromotionId}/sku_list`, params, options);
|
@@ -41,6 +52,11 @@ class ExternalPromotions extends ApiResource {
|
|
41
52
|
const _externalPromotionId = externalPromotionId.id || externalPromotionId;
|
42
53
|
return this.resources.fetch({ type: 'tags' }, `external_promotions/${_externalPromotionId}/tags`, params, options);
|
43
54
|
}
|
55
|
+
async versions(externalPromotionId, params, options) {
|
56
|
+
const _externalPromotionId = externalPromotionId.id || externalPromotionId;
|
57
|
+
return this.resources.fetch({ type: 'versions' }, `external_promotions/${_externalPromotionId}/versions`, params, options);
|
58
|
+
}
|
59
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
44
60
|
isExternalPromotion(resource) {
|
45
61
|
return resource.type && (resource.type === ExternalPromotions.TYPE);
|
46
62
|
}
|
@@ -1,38 +1,40 @@
|
|
1
|
-
import { ApiResource } from '../resource';
|
2
|
-
import type {
|
3
|
-
import type { QueryParamsRetrieve, QueryParamsList } from '../query';
|
1
|
+
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
2
|
+
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
4
3
|
import type { Market } from './markets';
|
5
4
|
import type { Attachment } from './attachments';
|
6
|
-
type
|
5
|
+
import type { Version } from './versions';
|
7
6
|
type ExternalTaxCalculatorRel = ResourceRel & {
|
8
|
-
type:
|
7
|
+
type: typeof ExternalTaxCalculators.TYPE;
|
9
8
|
};
|
10
9
|
interface ExternalTaxCalculator extends Resource {
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
10
|
+
name?: string;
|
11
|
+
tax_calculator_url?: string;
|
12
|
+
shared_secret?: string;
|
13
|
+
markets?: Market[];
|
14
|
+
attachments?: Attachment[];
|
15
|
+
versions?: Version[];
|
17
16
|
}
|
18
17
|
interface ExternalTaxCalculatorCreate extends ResourceCreate {
|
19
18
|
name: string;
|
20
19
|
tax_calculator_url: string;
|
21
20
|
}
|
22
21
|
interface ExternalTaxCalculatorUpdate extends ResourceUpdate {
|
23
|
-
name?: string
|
24
|
-
tax_calculator_url?: string
|
22
|
+
name?: string;
|
23
|
+
tax_calculator_url?: string;
|
25
24
|
}
|
26
|
-
declare class ExternalTaxCalculators extends ApiResource
|
27
|
-
static readonly TYPE:
|
25
|
+
declare class ExternalTaxCalculators extends ApiResource {
|
26
|
+
static readonly TYPE: 'external_tax_calculators';
|
27
|
+
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<ExternalTaxCalculator>>;
|
28
28
|
create(resource: ExternalTaxCalculatorCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ExternalTaxCalculator>;
|
29
|
+
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ExternalTaxCalculator>;
|
29
30
|
update(resource: ExternalTaxCalculatorUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ExternalTaxCalculator>;
|
30
|
-
delete(id: string
|
31
|
+
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
31
32
|
markets(externalTaxCalculatorId: string | ExternalTaxCalculator, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Market>>;
|
32
33
|
attachments(externalTaxCalculatorId: string | ExternalTaxCalculator, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
34
|
+
versions(externalTaxCalculatorId: string | ExternalTaxCalculator, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
33
35
|
isExternalTaxCalculator(resource: any): resource is ExternalTaxCalculator;
|
34
36
|
relationship(id: string | ResourceId | null): ExternalTaxCalculatorRel;
|
35
|
-
type():
|
37
|
+
type(): string;
|
36
38
|
}
|
37
39
|
export default ExternalTaxCalculators;
|
38
|
-
export
|
40
|
+
export { ExternalTaxCalculator, ExternalTaxCalculatorCreate, ExternalTaxCalculatorUpdate };
|