@commercelayer/sdk 4.35.0 → 4.37.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 +37 -0
- package/lib/cjs/api.js +0 -13
- package/lib/cjs/client.d.ts +15 -8
- package/lib/cjs/client.js +40 -40
- package/lib/cjs/commercelayer.d.ts +3 -4
- package/lib/cjs/commercelayer.js +7 -3
- package/lib/cjs/common.d.ts +1 -0
- package/lib/cjs/common.js +11 -2
- package/lib/cjs/config.d.ts +1 -0
- package/lib/cjs/config.js +3 -0
- package/lib/cjs/debug.js +0 -4
- package/lib/cjs/error.d.ts +3 -1
- package/lib/cjs/error.js +40 -7
- package/lib/cjs/index.d.ts +1 -1
- package/lib/cjs/index.js +0 -16
- package/lib/cjs/interceptor.d.ts +6 -2
- package/lib/cjs/jsonapi.js +9 -2
- package/lib/cjs/query.d.ts +9 -15
- package/lib/cjs/query.js +3 -2
- package/lib/cjs/resource.d.ts +30 -20
- package/lib/cjs/resource.js +40 -9
- package/lib/cjs/resources/addresses.d.ts +74 -73
- package/lib/cjs/resources/addresses.js +3 -11
- package/lib/cjs/resources/adjustments.d.ts +20 -19
- package/lib/cjs/resources/adjustments.js +3 -11
- package/lib/cjs/resources/adyen_gateways.d.ts +35 -34
- package/lib/cjs/resources/adyen_gateways.js +3 -11
- package/lib/cjs/resources/adyen_payments.d.ts +29 -27
- package/lib/cjs/resources/adyen_payments.js +6 -11
- package/lib/cjs/resources/application.d.ts +14 -13
- package/lib/cjs/resources/application.js +1 -6
- package/lib/cjs/resources/attachments.d.ts +81 -80
- package/lib/cjs/resources/attachments.js +3 -11
- package/lib/cjs/resources/authorizations.d.ts +47 -43
- package/lib/cjs/resources/authorizations.js +10 -9
- package/lib/cjs/resources/avalara_accounts.d.ts +32 -31
- package/lib/cjs/resources/avalara_accounts.js +3 -11
- package/lib/cjs/resources/axerve_gateways.d.ts +24 -23
- package/lib/cjs/resources/axerve_gateways.js +3 -11
- package/lib/cjs/resources/axerve_payments.d.ts +28 -26
- package/lib/cjs/resources/axerve_payments.js +6 -11
- package/lib/cjs/resources/billing_info_validation_rules.d.ts +17 -16
- package/lib/cjs/resources/billing_info_validation_rules.js +3 -11
- package/lib/cjs/resources/bing_geocoders.d.ts +16 -15
- package/lib/cjs/resources/bing_geocoders.js +3 -11
- package/lib/cjs/resources/braintree_gateways.d.ts +34 -33
- package/lib/cjs/resources/braintree_gateways.js +3 -11
- package/lib/cjs/resources/braintree_payments.d.ts +30 -29
- package/lib/cjs/resources/braintree_payments.js +3 -11
- package/lib/cjs/resources/bundles.d.ts +57 -54
- package/lib/cjs/resources/bundles.js +9 -11
- package/lib/cjs/resources/captures.d.ts +37 -34
- package/lib/cjs/resources/captures.js +7 -9
- package/lib/cjs/resources/carrier_accounts.d.ts +16 -15
- package/lib/cjs/resources/carrier_accounts.js +0 -8
- package/lib/cjs/resources/checkout_com_gateways.d.ts +25 -24
- package/lib/cjs/resources/checkout_com_gateways.js +3 -11
- package/lib/cjs/resources/checkout_com_payments.d.ts +41 -38
- package/lib/cjs/resources/checkout_com_payments.js +9 -11
- package/lib/cjs/resources/cleanups.d.ts +24 -23
- package/lib/cjs/resources/cleanups.js +2 -10
- package/lib/cjs/resources/coupon_codes_promotion_rules.d.ts +31 -30
- package/lib/cjs/resources/coupon_codes_promotion_rules.js +3 -11
- package/lib/cjs/resources/coupon_recipients.d.ts +26 -25
- package/lib/cjs/resources/coupon_recipients.js +3 -11
- package/lib/cjs/resources/coupons.d.ts +39 -38
- package/lib/cjs/resources/coupons.js +3 -11
- package/lib/cjs/resources/customer_addresses.d.ts +23 -22
- package/lib/cjs/resources/customer_addresses.js +3 -11
- package/lib/cjs/resources/customer_groups.d.ts +17 -16
- package/lib/cjs/resources/customer_groups.js +3 -11
- package/lib/cjs/resources/customer_password_resets.d.ts +19 -17
- package/lib/cjs/resources/customer_password_resets.js +6 -11
- package/lib/cjs/resources/customer_payment_sources.d.ts +37 -36
- package/lib/cjs/resources/customer_payment_sources.js +3 -11
- package/lib/cjs/resources/customer_subscriptions.d.ts +15 -14
- package/lib/cjs/resources/customer_subscriptions.js +3 -11
- package/lib/cjs/resources/customers.d.ts +37 -36
- package/lib/cjs/resources/customers.js +3 -11
- package/lib/cjs/resources/delivery_lead_times.d.ts +27 -26
- package/lib/cjs/resources/delivery_lead_times.js +3 -11
- package/lib/cjs/resources/event_callbacks.d.ts +15 -14
- package/lib/cjs/resources/event_callbacks.js +0 -8
- package/lib/cjs/resources/events.d.ts +13 -12
- package/lib/cjs/resources/events.js +0 -8
- package/lib/cjs/resources/exports.d.ts +27 -26
- package/lib/cjs/resources/exports.js +2 -10
- package/lib/cjs/resources/external_gateways.d.ts +32 -31
- package/lib/cjs/resources/external_gateways.js +3 -11
- package/lib/cjs/resources/external_payments.d.ts +23 -22
- package/lib/cjs/resources/external_payments.js +3 -11
- package/lib/cjs/resources/external_promotions.d.ts +66 -65
- package/lib/cjs/resources/external_promotions.js +3 -11
- package/lib/cjs/resources/external_tax_calculators.d.ts +19 -18
- package/lib/cjs/resources/external_tax_calculators.js +3 -11
- package/lib/cjs/resources/fixed_amount_promotions.d.ts +67 -66
- package/lib/cjs/resources/fixed_amount_promotions.js +3 -11
- package/lib/cjs/resources/fixed_price_promotions.d.ts +71 -70
- package/lib/cjs/resources/fixed_price_promotions.js +3 -11
- package/lib/cjs/resources/free_gift_promotions.d.ts +70 -69
- package/lib/cjs/resources/free_gift_promotions.js +3 -11
- package/lib/cjs/resources/free_shipping_promotions.d.ts +63 -62
- package/lib/cjs/resources/free_shipping_promotions.js +3 -11
- package/lib/cjs/resources/geocoders.d.ts +13 -12
- package/lib/cjs/resources/geocoders.js +0 -8
- package/lib/cjs/resources/gift_card_recipients.d.ts +26 -25
- package/lib/cjs/resources/gift_card_recipients.js +3 -11
- package/lib/cjs/resources/gift_cards.d.ts +71 -66
- package/lib/cjs/resources/gift_cards.js +15 -11
- package/lib/cjs/resources/google_geocoders.d.ts +16 -15
- package/lib/cjs/resources/google_geocoders.js +3 -11
- package/lib/cjs/resources/imports.d.ts +32 -31
- package/lib/cjs/resources/imports.js +2 -10
- package/lib/cjs/resources/in_stock_subscriptions.d.ts +38 -35
- package/lib/cjs/resources/in_stock_subscriptions.js +9 -11
- package/lib/cjs/resources/inventory_models.d.ts +26 -25
- package/lib/cjs/resources/inventory_models.js +3 -11
- package/lib/cjs/resources/inventory_return_locations.d.ts +22 -21
- package/lib/cjs/resources/inventory_return_locations.js +3 -11
- package/lib/cjs/resources/inventory_stock_locations.d.ts +25 -24
- package/lib/cjs/resources/inventory_stock_locations.js +3 -11
- package/lib/cjs/resources/klarna_gateways.d.ts +23 -22
- package/lib/cjs/resources/klarna_gateways.js +3 -11
- package/lib/cjs/resources/klarna_payments.d.ts +29 -27
- package/lib/cjs/resources/klarna_payments.js +6 -11
- package/lib/cjs/resources/line_item_options.d.ts +41 -40
- package/lib/cjs/resources/line_item_options.js +3 -11
- package/lib/cjs/resources/line_items.d.ts +96 -93
- package/lib/cjs/resources/line_items.js +9 -11
- package/lib/cjs/resources/manual_gateways.d.ts +15 -14
- package/lib/cjs/resources/manual_gateways.js +3 -11
- package/lib/cjs/resources/manual_tax_calculators.d.ts +21 -20
- package/lib/cjs/resources/manual_tax_calculators.js +3 -11
- package/lib/cjs/resources/markets.d.ts +62 -59
- package/lib/cjs/resources/markets.js +9 -11
- package/lib/cjs/resources/merchants.d.ts +19 -18
- package/lib/cjs/resources/merchants.js +3 -11
- package/lib/cjs/resources/order_amount_promotion_rules.d.ts +34 -33
- package/lib/cjs/resources/order_amount_promotion_rules.js +3 -11
- package/lib/cjs/resources/order_copies.d.ts +29 -28
- package/lib/cjs/resources/order_copies.js +3 -11
- package/lib/cjs/resources/order_factories.d.ts +21 -20
- package/lib/cjs/resources/order_factories.js +0 -8
- package/lib/cjs/resources/order_subscription_items.d.ts +40 -39
- package/lib/cjs/resources/order_subscription_items.js +3 -11
- package/lib/cjs/resources/order_subscriptions.d.ts +55 -51
- package/lib/cjs/resources/order_subscriptions.js +12 -11
- package/lib/cjs/resources/order_validation_rules.d.ts +13 -12
- package/lib/cjs/resources/order_validation_rules.js +0 -8
- package/lib/cjs/resources/orders.d.ts +263 -235
- package/lib/cjs/resources/orders.js +84 -11
- package/lib/cjs/resources/organization.d.ts +25 -24
- package/lib/cjs/resources/organization.js +1 -6
- package/lib/cjs/resources/packages.d.ts +31 -30
- package/lib/cjs/resources/packages.js +3 -11
- package/lib/cjs/resources/parcel_line_items.d.ts +23 -22
- package/lib/cjs/resources/parcel_line_items.js +3 -11
- package/lib/cjs/resources/parcels.d.ts +94 -93
- package/lib/cjs/resources/parcels.js +3 -11
- package/lib/cjs/resources/payment_gateways.d.ts +13 -12
- package/lib/cjs/resources/payment_gateways.js +0 -8
- package/lib/cjs/resources/payment_methods.d.ts +51 -48
- package/lib/cjs/resources/payment_methods.js +9 -11
- package/lib/cjs/resources/paypal_gateways.d.ts +18 -17
- package/lib/cjs/resources/paypal_gateways.js +3 -11
- package/lib/cjs/resources/paypal_payments.d.ts +32 -31
- package/lib/cjs/resources/paypal_payments.js +3 -11
- package/lib/cjs/resources/percentage_discount_promotions.d.ts +70 -69
- package/lib/cjs/resources/percentage_discount_promotions.js +3 -11
- package/lib/cjs/resources/price_frequency_tiers.d.ts +27 -26
- package/lib/cjs/resources/price_frequency_tiers.js +3 -11
- package/lib/cjs/resources/price_lists.d.ts +21 -20
- package/lib/cjs/resources/price_lists.js +3 -11
- package/lib/cjs/resources/price_tiers.d.ts +18 -17
- package/lib/cjs/resources/price_tiers.js +0 -8
- package/lib/cjs/resources/price_volume_tiers.d.ts +27 -26
- package/lib/cjs/resources/price_volume_tiers.js +3 -11
- package/lib/cjs/resources/prices.d.ts +40 -39
- package/lib/cjs/resources/prices.js +3 -11
- package/lib/cjs/resources/promotion_rules.d.ts +12 -11
- package/lib/cjs/resources/promotion_rules.js +0 -8
- package/lib/cjs/resources/promotions.d.ts +28 -27
- package/lib/cjs/resources/promotions.js +0 -8
- package/lib/cjs/resources/recurring_order_copies.d.ts +29 -28
- package/lib/cjs/resources/recurring_order_copies.js +3 -11
- package/lib/cjs/resources/refunds.d.ts +26 -25
- package/lib/cjs/resources/refunds.js +0 -8
- package/lib/cjs/resources/reserved_stocks.d.ts +14 -13
- package/lib/cjs/resources/reserved_stocks.js +0 -8
- package/lib/cjs/resources/return_line_items.d.ts +29 -27
- package/lib/cjs/resources/return_line_items.js +6 -11
- package/lib/cjs/resources/returns.d.ts +59 -49
- package/lib/cjs/resources/returns.js +30 -11
- package/lib/cjs/resources/satispay_gateways.d.ts +23 -22
- package/lib/cjs/resources/satispay_gateways.js +3 -11
- package/lib/cjs/resources/satispay_payments.d.ts +31 -29
- package/lib/cjs/resources/satispay_payments.js +6 -11
- package/lib/cjs/resources/shipments.d.ts +65 -57
- package/lib/cjs/resources/shipments.js +22 -9
- package/lib/cjs/resources/shipping_categories.d.ts +16 -15
- package/lib/cjs/resources/shipping_categories.js +3 -11
- package/lib/cjs/resources/shipping_method_tiers.d.ts +18 -17
- package/lib/cjs/resources/shipping_method_tiers.js +0 -8
- package/lib/cjs/resources/shipping_methods.d.ts +80 -77
- package/lib/cjs/resources/shipping_methods.js +9 -11
- package/lib/cjs/resources/shipping_weight_tiers.d.ts +26 -25
- package/lib/cjs/resources/shipping_weight_tiers.js +3 -11
- package/lib/cjs/resources/shipping_zones.d.ts +33 -32
- package/lib/cjs/resources/shipping_zones.js +3 -11
- package/lib/cjs/resources/sku_list_items.d.ts +27 -26
- package/lib/cjs/resources/sku_list_items.js +3 -11
- package/lib/cjs/resources/sku_list_promotion_rules.d.ts +38 -37
- package/lib/cjs/resources/sku_list_promotion_rules.js +3 -11
- package/lib/cjs/resources/sku_lists.d.ts +36 -35
- package/lib/cjs/resources/sku_lists.js +3 -11
- package/lib/cjs/resources/sku_options.d.ts +44 -43
- package/lib/cjs/resources/sku_options.js +3 -11
- package/lib/cjs/resources/skus.d.ts +57 -56
- package/lib/cjs/resources/skus.js +3 -11
- package/lib/cjs/resources/stock_items.d.ts +29 -28
- package/lib/cjs/resources/stock_items.js +3 -11
- package/lib/cjs/resources/stock_line_items.d.ts +18 -17
- package/lib/cjs/resources/stock_line_items.js +0 -8
- package/lib/cjs/resources/stock_locations.d.ts +30 -29
- package/lib/cjs/resources/stock_locations.js +3 -11
- package/lib/cjs/resources/stock_reservations.d.ts +18 -17
- package/lib/cjs/resources/stock_reservations.js +0 -8
- package/lib/cjs/resources/stock_transfers.d.ts +48 -42
- package/lib/cjs/resources/stock_transfers.js +18 -11
- package/lib/cjs/resources/stripe_gateways.d.ts +23 -22
- package/lib/cjs/resources/stripe_gateways.js +3 -11
- package/lib/cjs/resources/stripe_payments.d.ts +35 -32
- package/lib/cjs/resources/stripe_payments.js +9 -11
- package/lib/cjs/resources/subscription_models.d.ts +27 -26
- package/lib/cjs/resources/subscription_models.js +3 -11
- package/lib/cjs/resources/tags.d.ts +13 -12
- package/lib/cjs/resources/tags.js +3 -11
- package/lib/cjs/resources/tax_calculators.d.ts +14 -13
- package/lib/cjs/resources/tax_calculators.js +0 -8
- package/lib/cjs/resources/tax_categories.d.ts +31 -30
- package/lib/cjs/resources/tax_categories.js +3 -11
- package/lib/cjs/resources/tax_rules.d.ts +52 -51
- package/lib/cjs/resources/tax_rules.js +3 -11
- package/lib/cjs/resources/taxjar_accounts.d.ts +22 -21
- package/lib/cjs/resources/taxjar_accounts.js +3 -11
- package/lib/cjs/resources/transactions.d.ts +24 -23
- package/lib/cjs/resources/transactions.js +0 -8
- package/lib/cjs/resources/versions.d.ts +14 -14
- package/lib/cjs/resources/versions.js +0 -8
- package/lib/cjs/resources/voids.d.ts +26 -25
- package/lib/cjs/resources/voids.js +0 -8
- package/lib/cjs/resources/webhooks.d.ts +28 -26
- package/lib/cjs/resources/webhooks.js +6 -11
- package/lib/cjs/resources/wire_transfers.d.ts +17 -16
- package/lib/cjs/resources/wire_transfers.js +3 -11
- package/lib/cjs/static.d.ts +1 -1
- package/lib/cjs/util.d.ts +1 -3
- package/lib/esm/api.d.ts +37 -0
- package/lib/esm/api.js +0 -13
- package/lib/esm/client.d.ts +15 -8
- package/lib/esm/client.js +40 -40
- package/lib/esm/commercelayer.d.ts +3 -4
- package/lib/esm/commercelayer.js +7 -3
- package/lib/esm/common.d.ts +1 -0
- package/lib/esm/common.js +11 -2
- package/lib/esm/config.d.ts +1 -0
- package/lib/esm/config.js +3 -0
- package/lib/esm/debug.js +0 -4
- package/lib/esm/error.d.ts +3 -1
- package/lib/esm/error.js +35 -5
- package/lib/esm/index.d.ts +1 -1
- package/lib/esm/index.js +0 -2
- package/lib/esm/interceptor.d.ts +6 -2
- package/lib/esm/jsonapi.js +9 -2
- package/lib/esm/query.d.ts +9 -15
- package/lib/esm/query.js +2 -2
- package/lib/esm/resource.d.ts +30 -20
- package/lib/esm/resource.js +40 -10
- package/lib/esm/resources/addresses.d.ts +74 -73
- package/lib/esm/resources/addresses.js +3 -11
- package/lib/esm/resources/adjustments.d.ts +20 -19
- package/lib/esm/resources/adjustments.js +3 -11
- package/lib/esm/resources/adyen_gateways.d.ts +35 -34
- package/lib/esm/resources/adyen_gateways.js +3 -11
- package/lib/esm/resources/adyen_payments.d.ts +29 -27
- package/lib/esm/resources/adyen_payments.js +6 -11
- package/lib/esm/resources/application.d.ts +14 -13
- package/lib/esm/resources/application.js +2 -7
- package/lib/esm/resources/attachments.d.ts +81 -80
- package/lib/esm/resources/attachments.js +3 -11
- package/lib/esm/resources/authorizations.d.ts +47 -43
- package/lib/esm/resources/authorizations.js +10 -9
- package/lib/esm/resources/avalara_accounts.d.ts +32 -31
- package/lib/esm/resources/avalara_accounts.js +3 -11
- package/lib/esm/resources/axerve_gateways.d.ts +24 -23
- package/lib/esm/resources/axerve_gateways.js +3 -11
- package/lib/esm/resources/axerve_payments.d.ts +28 -26
- package/lib/esm/resources/axerve_payments.js +6 -11
- package/lib/esm/resources/billing_info_validation_rules.d.ts +17 -16
- package/lib/esm/resources/billing_info_validation_rules.js +3 -11
- package/lib/esm/resources/bing_geocoders.d.ts +16 -15
- package/lib/esm/resources/bing_geocoders.js +3 -11
- package/lib/esm/resources/braintree_gateways.d.ts +34 -33
- package/lib/esm/resources/braintree_gateways.js +3 -11
- package/lib/esm/resources/braintree_payments.d.ts +30 -29
- package/lib/esm/resources/braintree_payments.js +3 -11
- package/lib/esm/resources/bundles.d.ts +57 -54
- package/lib/esm/resources/bundles.js +9 -11
- package/lib/esm/resources/captures.d.ts +37 -34
- package/lib/esm/resources/captures.js +7 -9
- package/lib/esm/resources/carrier_accounts.d.ts +16 -15
- package/lib/esm/resources/carrier_accounts.js +0 -8
- package/lib/esm/resources/checkout_com_gateways.d.ts +25 -24
- package/lib/esm/resources/checkout_com_gateways.js +3 -11
- package/lib/esm/resources/checkout_com_payments.d.ts +41 -38
- package/lib/esm/resources/checkout_com_payments.js +9 -11
- package/lib/esm/resources/cleanups.d.ts +24 -23
- package/lib/esm/resources/cleanups.js +2 -10
- package/lib/esm/resources/coupon_codes_promotion_rules.d.ts +31 -30
- package/lib/esm/resources/coupon_codes_promotion_rules.js +3 -11
- package/lib/esm/resources/coupon_recipients.d.ts +26 -25
- package/lib/esm/resources/coupon_recipients.js +3 -11
- package/lib/esm/resources/coupons.d.ts +39 -38
- package/lib/esm/resources/coupons.js +3 -11
- package/lib/esm/resources/customer_addresses.d.ts +23 -22
- package/lib/esm/resources/customer_addresses.js +3 -11
- package/lib/esm/resources/customer_groups.d.ts +17 -16
- package/lib/esm/resources/customer_groups.js +3 -11
- package/lib/esm/resources/customer_password_resets.d.ts +19 -17
- package/lib/esm/resources/customer_password_resets.js +6 -11
- package/lib/esm/resources/customer_payment_sources.d.ts +37 -36
- package/lib/esm/resources/customer_payment_sources.js +3 -11
- package/lib/esm/resources/customer_subscriptions.d.ts +15 -14
- package/lib/esm/resources/customer_subscriptions.js +3 -11
- package/lib/esm/resources/customers.d.ts +37 -36
- package/lib/esm/resources/customers.js +3 -11
- package/lib/esm/resources/delivery_lead_times.d.ts +27 -26
- package/lib/esm/resources/delivery_lead_times.js +3 -11
- package/lib/esm/resources/event_callbacks.d.ts +15 -14
- package/lib/esm/resources/event_callbacks.js +0 -8
- package/lib/esm/resources/events.d.ts +13 -12
- package/lib/esm/resources/events.js +0 -8
- package/lib/esm/resources/exports.d.ts +27 -26
- package/lib/esm/resources/exports.js +2 -10
- package/lib/esm/resources/external_gateways.d.ts +32 -31
- package/lib/esm/resources/external_gateways.js +3 -11
- package/lib/esm/resources/external_payments.d.ts +23 -22
- package/lib/esm/resources/external_payments.js +3 -11
- package/lib/esm/resources/external_promotions.d.ts +66 -65
- package/lib/esm/resources/external_promotions.js +3 -11
- package/lib/esm/resources/external_tax_calculators.d.ts +19 -18
- package/lib/esm/resources/external_tax_calculators.js +3 -11
- package/lib/esm/resources/fixed_amount_promotions.d.ts +67 -66
- package/lib/esm/resources/fixed_amount_promotions.js +3 -11
- package/lib/esm/resources/fixed_price_promotions.d.ts +71 -70
- package/lib/esm/resources/fixed_price_promotions.js +3 -11
- package/lib/esm/resources/free_gift_promotions.d.ts +70 -69
- package/lib/esm/resources/free_gift_promotions.js +3 -11
- package/lib/esm/resources/free_shipping_promotions.d.ts +63 -62
- package/lib/esm/resources/free_shipping_promotions.js +3 -11
- package/lib/esm/resources/geocoders.d.ts +13 -12
- package/lib/esm/resources/geocoders.js +0 -8
- package/lib/esm/resources/gift_card_recipients.d.ts +26 -25
- package/lib/esm/resources/gift_card_recipients.js +3 -11
- package/lib/esm/resources/gift_cards.d.ts +71 -66
- package/lib/esm/resources/gift_cards.js +15 -11
- package/lib/esm/resources/google_geocoders.d.ts +16 -15
- package/lib/esm/resources/google_geocoders.js +3 -11
- package/lib/esm/resources/imports.d.ts +32 -31
- package/lib/esm/resources/imports.js +2 -10
- package/lib/esm/resources/in_stock_subscriptions.d.ts +38 -35
- package/lib/esm/resources/in_stock_subscriptions.js +9 -11
- package/lib/esm/resources/inventory_models.d.ts +26 -25
- package/lib/esm/resources/inventory_models.js +3 -11
- package/lib/esm/resources/inventory_return_locations.d.ts +22 -21
- package/lib/esm/resources/inventory_return_locations.js +3 -11
- package/lib/esm/resources/inventory_stock_locations.d.ts +25 -24
- package/lib/esm/resources/inventory_stock_locations.js +3 -11
- package/lib/esm/resources/klarna_gateways.d.ts +23 -22
- package/lib/esm/resources/klarna_gateways.js +3 -11
- package/lib/esm/resources/klarna_payments.d.ts +29 -27
- package/lib/esm/resources/klarna_payments.js +6 -11
- package/lib/esm/resources/line_item_options.d.ts +41 -40
- package/lib/esm/resources/line_item_options.js +3 -11
- package/lib/esm/resources/line_items.d.ts +96 -93
- package/lib/esm/resources/line_items.js +9 -11
- package/lib/esm/resources/manual_gateways.d.ts +15 -14
- package/lib/esm/resources/manual_gateways.js +3 -11
- package/lib/esm/resources/manual_tax_calculators.d.ts +21 -20
- package/lib/esm/resources/manual_tax_calculators.js +3 -11
- package/lib/esm/resources/markets.d.ts +62 -59
- package/lib/esm/resources/markets.js +9 -11
- package/lib/esm/resources/merchants.d.ts +19 -18
- package/lib/esm/resources/merchants.js +3 -11
- package/lib/esm/resources/order_amount_promotion_rules.d.ts +34 -33
- package/lib/esm/resources/order_amount_promotion_rules.js +3 -11
- package/lib/esm/resources/order_copies.d.ts +29 -28
- package/lib/esm/resources/order_copies.js +3 -11
- package/lib/esm/resources/order_factories.d.ts +21 -20
- package/lib/esm/resources/order_factories.js +0 -8
- package/lib/esm/resources/order_subscription_items.d.ts +40 -39
- package/lib/esm/resources/order_subscription_items.js +3 -11
- package/lib/esm/resources/order_subscriptions.d.ts +55 -51
- package/lib/esm/resources/order_subscriptions.js +12 -11
- package/lib/esm/resources/order_validation_rules.d.ts +13 -12
- package/lib/esm/resources/order_validation_rules.js +0 -8
- package/lib/esm/resources/orders.d.ts +263 -235
- package/lib/esm/resources/orders.js +84 -11
- package/lib/esm/resources/organization.d.ts +25 -24
- package/lib/esm/resources/organization.js +2 -7
- package/lib/esm/resources/packages.d.ts +31 -30
- package/lib/esm/resources/packages.js +3 -11
- package/lib/esm/resources/parcel_line_items.d.ts +23 -22
- package/lib/esm/resources/parcel_line_items.js +3 -11
- package/lib/esm/resources/parcels.d.ts +94 -93
- package/lib/esm/resources/parcels.js +3 -11
- package/lib/esm/resources/payment_gateways.d.ts +13 -12
- package/lib/esm/resources/payment_gateways.js +0 -8
- package/lib/esm/resources/payment_methods.d.ts +51 -48
- package/lib/esm/resources/payment_methods.js +9 -11
- package/lib/esm/resources/paypal_gateways.d.ts +18 -17
- package/lib/esm/resources/paypal_gateways.js +3 -11
- package/lib/esm/resources/paypal_payments.d.ts +32 -31
- package/lib/esm/resources/paypal_payments.js +3 -11
- package/lib/esm/resources/percentage_discount_promotions.d.ts +70 -69
- package/lib/esm/resources/percentage_discount_promotions.js +3 -11
- package/lib/esm/resources/price_frequency_tiers.d.ts +27 -26
- package/lib/esm/resources/price_frequency_tiers.js +3 -11
- package/lib/esm/resources/price_lists.d.ts +21 -20
- package/lib/esm/resources/price_lists.js +3 -11
- package/lib/esm/resources/price_tiers.d.ts +18 -17
- package/lib/esm/resources/price_tiers.js +0 -8
- package/lib/esm/resources/price_volume_tiers.d.ts +27 -26
- package/lib/esm/resources/price_volume_tiers.js +3 -11
- package/lib/esm/resources/prices.d.ts +40 -39
- package/lib/esm/resources/prices.js +3 -11
- package/lib/esm/resources/promotion_rules.d.ts +12 -11
- package/lib/esm/resources/promotion_rules.js +0 -8
- package/lib/esm/resources/promotions.d.ts +28 -27
- package/lib/esm/resources/promotions.js +0 -8
- package/lib/esm/resources/recurring_order_copies.d.ts +29 -28
- package/lib/esm/resources/recurring_order_copies.js +3 -11
- package/lib/esm/resources/refunds.d.ts +26 -25
- package/lib/esm/resources/refunds.js +0 -8
- package/lib/esm/resources/reserved_stocks.d.ts +14 -13
- package/lib/esm/resources/reserved_stocks.js +0 -8
- package/lib/esm/resources/return_line_items.d.ts +29 -27
- package/lib/esm/resources/return_line_items.js +6 -11
- package/lib/esm/resources/returns.d.ts +59 -49
- package/lib/esm/resources/returns.js +30 -11
- package/lib/esm/resources/satispay_gateways.d.ts +23 -22
- package/lib/esm/resources/satispay_gateways.js +3 -11
- package/lib/esm/resources/satispay_payments.d.ts +31 -29
- package/lib/esm/resources/satispay_payments.js +6 -11
- package/lib/esm/resources/shipments.d.ts +65 -57
- package/lib/esm/resources/shipments.js +22 -9
- package/lib/esm/resources/shipping_categories.d.ts +16 -15
- package/lib/esm/resources/shipping_categories.js +3 -11
- package/lib/esm/resources/shipping_method_tiers.d.ts +18 -17
- package/lib/esm/resources/shipping_method_tiers.js +0 -8
- package/lib/esm/resources/shipping_methods.d.ts +80 -77
- package/lib/esm/resources/shipping_methods.js +9 -11
- package/lib/esm/resources/shipping_weight_tiers.d.ts +26 -25
- package/lib/esm/resources/shipping_weight_tiers.js +3 -11
- package/lib/esm/resources/shipping_zones.d.ts +33 -32
- package/lib/esm/resources/shipping_zones.js +3 -11
- package/lib/esm/resources/sku_list_items.d.ts +27 -26
- package/lib/esm/resources/sku_list_items.js +3 -11
- package/lib/esm/resources/sku_list_promotion_rules.d.ts +38 -37
- package/lib/esm/resources/sku_list_promotion_rules.js +3 -11
- package/lib/esm/resources/sku_lists.d.ts +36 -35
- package/lib/esm/resources/sku_lists.js +3 -11
- package/lib/esm/resources/sku_options.d.ts +44 -43
- package/lib/esm/resources/sku_options.js +3 -11
- package/lib/esm/resources/skus.d.ts +57 -56
- package/lib/esm/resources/skus.js +3 -11
- package/lib/esm/resources/stock_items.d.ts +29 -28
- package/lib/esm/resources/stock_items.js +3 -11
- package/lib/esm/resources/stock_line_items.d.ts +18 -17
- package/lib/esm/resources/stock_line_items.js +0 -8
- package/lib/esm/resources/stock_locations.d.ts +30 -29
- package/lib/esm/resources/stock_locations.js +3 -11
- package/lib/esm/resources/stock_reservations.d.ts +18 -17
- package/lib/esm/resources/stock_reservations.js +0 -8
- package/lib/esm/resources/stock_transfers.d.ts +48 -42
- package/lib/esm/resources/stock_transfers.js +18 -11
- package/lib/esm/resources/stripe_gateways.d.ts +23 -22
- package/lib/esm/resources/stripe_gateways.js +3 -11
- package/lib/esm/resources/stripe_payments.d.ts +35 -32
- package/lib/esm/resources/stripe_payments.js +9 -11
- package/lib/esm/resources/subscription_models.d.ts +27 -26
- package/lib/esm/resources/subscription_models.js +3 -11
- package/lib/esm/resources/tags.d.ts +13 -12
- package/lib/esm/resources/tags.js +3 -11
- package/lib/esm/resources/tax_calculators.d.ts +14 -13
- package/lib/esm/resources/tax_calculators.js +0 -8
- package/lib/esm/resources/tax_categories.d.ts +31 -30
- package/lib/esm/resources/tax_categories.js +3 -11
- package/lib/esm/resources/tax_rules.d.ts +52 -51
- package/lib/esm/resources/tax_rules.js +3 -11
- package/lib/esm/resources/taxjar_accounts.d.ts +22 -21
- package/lib/esm/resources/taxjar_accounts.js +3 -11
- package/lib/esm/resources/transactions.d.ts +24 -23
- package/lib/esm/resources/transactions.js +0 -8
- package/lib/esm/resources/versions.d.ts +14 -14
- package/lib/esm/resources/versions.js +0 -8
- package/lib/esm/resources/voids.d.ts +26 -25
- package/lib/esm/resources/voids.js +0 -8
- package/lib/esm/resources/webhooks.d.ts +28 -26
- package/lib/esm/resources/webhooks.js +6 -11
- package/lib/esm/resources/wire_transfers.d.ts +17 -16
- package/lib/esm/resources/wire_transfers.js +3 -11
- package/lib/esm/static.d.ts +1 -1
- package/lib/esm/util.d.ts +1 -3
- package/lib/tsconfig.esm.tsbuildinfo +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +8 -8
- package/lib/cjs/micro.d.ts +0 -4
- package/lib/cjs/micro.js +0 -13
- package/lib/esm/micro.d.ts +0 -4
- package/lib/esm/micro.js +0 -7
@@ -1,44 +1,45 @@
|
|
1
|
-
import { ApiResource
|
2
|
-
import type {
|
1
|
+
import { ApiResource } from '../resource';
|
2
|
+
import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse } from '../resource';
|
3
|
+
import type { QueryParamsRetrieve, QueryParamsList } from '../query';
|
3
4
|
import type { Market } from './markets';
|
4
5
|
import type { Attachment } from './attachments';
|
5
6
|
import type { Version } from './versions';
|
6
|
-
import type { TaxRule } from './tax_rules';
|
7
|
+
import type { TaxRule, TaxRuleType } from './tax_rules';
|
8
|
+
type ManualTaxCalculatorType = 'manual_tax_calculators';
|
7
9
|
type ManualTaxCalculatorRel = ResourceRel & {
|
8
|
-
type:
|
10
|
+
type: ManualTaxCalculatorType;
|
9
11
|
};
|
10
12
|
type TaxRuleRel = ResourceRel & {
|
11
|
-
type:
|
13
|
+
type: TaxRuleType;
|
12
14
|
};
|
13
15
|
interface ManualTaxCalculator extends Resource {
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
16
|
+
readonly type: ManualTaxCalculatorType;
|
17
|
+
name: string;
|
18
|
+
markets?: Market[] | null;
|
19
|
+
attachments?: Attachment[] | null;
|
20
|
+
versions?: Version[] | null;
|
21
|
+
tax_rules?: TaxRule[] | null;
|
19
22
|
}
|
20
23
|
interface ManualTaxCalculatorCreate extends ResourceCreate {
|
21
24
|
name: string;
|
22
|
-
tax_rules?: TaxRuleRel[];
|
25
|
+
tax_rules?: TaxRuleRel[] | null;
|
23
26
|
}
|
24
27
|
interface ManualTaxCalculatorUpdate extends ResourceUpdate {
|
25
|
-
name?: string;
|
26
|
-
tax_rules?: TaxRuleRel[];
|
28
|
+
name?: string | null;
|
29
|
+
tax_rules?: TaxRuleRel[] | null;
|
27
30
|
}
|
28
|
-
declare class ManualTaxCalculators extends ApiResource {
|
29
|
-
static readonly TYPE:
|
30
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<ManualTaxCalculator>>;
|
31
|
+
declare class ManualTaxCalculators extends ApiResource<ManualTaxCalculator> {
|
32
|
+
static readonly TYPE: ManualTaxCalculatorType;
|
31
33
|
create(resource: ManualTaxCalculatorCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ManualTaxCalculator>;
|
32
|
-
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ManualTaxCalculator>;
|
33
34
|
update(resource: ManualTaxCalculatorUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ManualTaxCalculator>;
|
34
|
-
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
35
|
+
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
35
36
|
markets(manualTaxCalculatorId: string | ManualTaxCalculator, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Market>>;
|
36
37
|
attachments(manualTaxCalculatorId: string | ManualTaxCalculator, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
37
38
|
versions(manualTaxCalculatorId: string | ManualTaxCalculator, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
38
39
|
tax_rules(manualTaxCalculatorId: string | ManualTaxCalculator, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<TaxRule>>;
|
39
40
|
isManualTaxCalculator(resource: any): resource is ManualTaxCalculator;
|
40
41
|
relationship(id: string | ResourceId | null): ManualTaxCalculatorRel;
|
41
|
-
type():
|
42
|
+
type(): ManualTaxCalculatorType;
|
42
43
|
}
|
43
44
|
export default ManualTaxCalculators;
|
44
|
-
export { ManualTaxCalculator, ManualTaxCalculatorCreate, ManualTaxCalculatorUpdate };
|
45
|
+
export type { ManualTaxCalculator, ManualTaxCalculatorCreate, ManualTaxCalculatorUpdate, ManualTaxCalculatorType };
|
@@ -2,21 +2,14 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
const resource_1 = require("../resource");
|
4
4
|
class ManualTaxCalculators extends resource_1.ApiResource {
|
5
|
-
// static readonly PATH = 'manual_tax_calculators'
|
6
|
-
async list(params, options) {
|
7
|
-
return this.resources.list({ type: ManualTaxCalculators.TYPE }, params, options);
|
8
|
-
}
|
9
5
|
async create(resource, params, options) {
|
10
|
-
return this.resources.create(
|
11
|
-
}
|
12
|
-
async retrieve(id, params, options) {
|
13
|
-
return this.resources.retrieve({ type: ManualTaxCalculators.TYPE, id }, params, options);
|
6
|
+
return this.resources.create({ ...resource, type: ManualTaxCalculators.TYPE }, params, options);
|
14
7
|
}
|
15
8
|
async update(resource, params, options) {
|
16
|
-
return this.resources.update(
|
9
|
+
return this.resources.update({ ...resource, type: ManualTaxCalculators.TYPE }, params, options);
|
17
10
|
}
|
18
11
|
async delete(id, options) {
|
19
|
-
await this.resources.delete({ type: ManualTaxCalculators.TYPE
|
12
|
+
await this.resources.delete((typeof id === 'string') ? { id, type: ManualTaxCalculators.TYPE } : id, options);
|
20
13
|
}
|
21
14
|
async markets(manualTaxCalculatorId, params, options) {
|
22
15
|
const _manualTaxCalculatorId = manualTaxCalculatorId.id || manualTaxCalculatorId;
|
@@ -34,7 +27,6 @@ class ManualTaxCalculators extends resource_1.ApiResource {
|
|
34
27
|
const _manualTaxCalculatorId = manualTaxCalculatorId.id || manualTaxCalculatorId;
|
35
28
|
return this.resources.fetch({ type: 'tax_rules' }, `manual_tax_calculators/${_manualTaxCalculatorId}/tax_rules`, params, options);
|
36
29
|
}
|
37
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
38
30
|
isManualTaxCalculator(resource) {
|
39
31
|
return resource.type && (resource.type === ManualTaxCalculators.TYPE);
|
40
32
|
}
|
@@ -1,88 +1,89 @@
|
|
1
|
-
import { ApiResource
|
2
|
-
import type {
|
3
|
-
import type {
|
4
|
-
import type {
|
5
|
-
import type {
|
6
|
-
import type {
|
7
|
-
import type {
|
8
|
-
import type {
|
1
|
+
import { ApiResource } from '../resource';
|
2
|
+
import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse } from '../resource';
|
3
|
+
import type { QueryParamsRetrieve, QueryParamsList } from '../query';
|
4
|
+
import type { Merchant, MerchantType } from './merchants';
|
5
|
+
import type { PriceList, PriceListType } from './price_lists';
|
6
|
+
import type { InventoryModel, InventoryModelType } from './inventory_models';
|
7
|
+
import type { SubscriptionModel, SubscriptionModelType } from './subscription_models';
|
8
|
+
import type { TaxCalculator, TaxCalculatorType } from './tax_calculators';
|
9
|
+
import type { CustomerGroup, CustomerGroupType } from './customer_groups';
|
9
10
|
import type { Attachment } from './attachments';
|
10
11
|
import type { Version } from './versions';
|
12
|
+
type MarketType = 'markets';
|
11
13
|
type MarketRel = ResourceRel & {
|
12
|
-
type:
|
14
|
+
type: MarketType;
|
13
15
|
};
|
14
16
|
type MerchantRel = ResourceRel & {
|
15
|
-
type:
|
17
|
+
type: MerchantType;
|
16
18
|
};
|
17
19
|
type PriceListRel = ResourceRel & {
|
18
|
-
type:
|
20
|
+
type: PriceListType;
|
19
21
|
};
|
20
22
|
type InventoryModelRel = ResourceRel & {
|
21
|
-
type:
|
23
|
+
type: InventoryModelType;
|
22
24
|
};
|
23
25
|
type SubscriptionModelRel = ResourceRel & {
|
24
|
-
type:
|
26
|
+
type: SubscriptionModelType;
|
25
27
|
};
|
26
28
|
type TaxCalculatorRel = ResourceRel & {
|
27
|
-
type:
|
29
|
+
type: TaxCalculatorType;
|
28
30
|
};
|
29
31
|
type CustomerGroupRel = ResourceRel & {
|
30
|
-
type:
|
32
|
+
type: CustomerGroupType;
|
31
33
|
};
|
32
34
|
interface Market extends Resource {
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
35
|
+
readonly type: MarketType;
|
36
|
+
number?: number | null;
|
37
|
+
name: string;
|
38
|
+
facebook_pixel_id?: string | null;
|
39
|
+
checkout_url?: string | null;
|
40
|
+
external_prices_url?: string | null;
|
41
|
+
external_order_validation_url?: string | null;
|
42
|
+
shared_secret: string;
|
43
|
+
private?: boolean | null;
|
44
|
+
disabled_at?: string | null;
|
45
|
+
merchant?: Merchant | null;
|
46
|
+
price_list?: PriceList | null;
|
47
|
+
inventory_model?: InventoryModel | null;
|
48
|
+
subscription_model?: SubscriptionModel | null;
|
49
|
+
tax_calculator?: TaxCalculator | null;
|
50
|
+
customer_group?: CustomerGroup | null;
|
51
|
+
attachments?: Attachment[] | null;
|
52
|
+
versions?: Version[] | null;
|
50
53
|
}
|
51
54
|
interface MarketCreate extends ResourceCreate {
|
52
55
|
name: string;
|
53
|
-
facebook_pixel_id?: string;
|
54
|
-
checkout_url?: string;
|
55
|
-
external_prices_url?: string;
|
56
|
-
external_order_validation_url?: string;
|
56
|
+
facebook_pixel_id?: string | null;
|
57
|
+
checkout_url?: string | null;
|
58
|
+
external_prices_url?: string | null;
|
59
|
+
external_order_validation_url?: string | null;
|
57
60
|
merchant: MerchantRel;
|
58
61
|
price_list: PriceListRel;
|
59
62
|
inventory_model: InventoryModelRel;
|
60
|
-
subscription_model?: SubscriptionModelRel;
|
61
|
-
tax_calculator?: TaxCalculatorRel;
|
62
|
-
customer_group?: CustomerGroupRel;
|
63
|
+
subscription_model?: SubscriptionModelRel | null;
|
64
|
+
tax_calculator?: TaxCalculatorRel | null;
|
65
|
+
customer_group?: CustomerGroupRel | null;
|
63
66
|
}
|
64
67
|
interface MarketUpdate extends ResourceUpdate {
|
65
|
-
name?: string;
|
66
|
-
facebook_pixel_id?: string;
|
67
|
-
checkout_url?: string;
|
68
|
-
external_prices_url?: string;
|
69
|
-
external_order_validation_url?: string;
|
70
|
-
_disable?: boolean;
|
71
|
-
_enable?: boolean;
|
72
|
-
merchant?: MerchantRel;
|
73
|
-
price_list?: PriceListRel;
|
74
|
-
inventory_model?: InventoryModelRel;
|
75
|
-
subscription_model?: SubscriptionModelRel;
|
76
|
-
tax_calculator?: TaxCalculatorRel;
|
77
|
-
customer_group?: CustomerGroupRel;
|
68
|
+
name?: string | null;
|
69
|
+
facebook_pixel_id?: string | null;
|
70
|
+
checkout_url?: string | null;
|
71
|
+
external_prices_url?: string | null;
|
72
|
+
external_order_validation_url?: string | null;
|
73
|
+
_disable?: boolean | null;
|
74
|
+
_enable?: boolean | null;
|
75
|
+
merchant?: MerchantRel | null;
|
76
|
+
price_list?: PriceListRel | null;
|
77
|
+
inventory_model?: InventoryModelRel | null;
|
78
|
+
subscription_model?: SubscriptionModelRel | null;
|
79
|
+
tax_calculator?: TaxCalculatorRel | null;
|
80
|
+
customer_group?: CustomerGroupRel | null;
|
78
81
|
}
|
79
|
-
declare class Markets extends ApiResource {
|
80
|
-
static readonly TYPE:
|
81
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Market>>;
|
82
|
+
declare class Markets extends ApiResource<Market> {
|
83
|
+
static readonly TYPE: MarketType;
|
82
84
|
create(resource: MarketCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Market>;
|
83
|
-
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Market>;
|
84
85
|
update(resource: MarketUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Market>;
|
85
|
-
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
86
|
+
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
86
87
|
merchant(marketId: string | Market, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Merchant>;
|
87
88
|
price_list(marketId: string | Market, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PriceList>;
|
88
89
|
inventory_model(marketId: string | Market, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<InventoryModel>;
|
@@ -91,9 +92,11 @@ declare class Markets extends ApiResource {
|
|
91
92
|
customer_group(marketId: string | Market, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CustomerGroup>;
|
92
93
|
attachments(marketId: string | Market, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
93
94
|
versions(marketId: string | Market, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
95
|
+
_disable(id: string | Market, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Market>;
|
96
|
+
_enable(id: string | Market, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Market>;
|
94
97
|
isMarket(resource: any): resource is Market;
|
95
98
|
relationship(id: string | ResourceId | null): MarketRel;
|
96
|
-
type():
|
99
|
+
type(): MarketType;
|
97
100
|
}
|
98
101
|
export default Markets;
|
99
|
-
export { Market, MarketCreate, MarketUpdate };
|
102
|
+
export type { Market, MarketCreate, MarketUpdate, MarketType };
|
@@ -2,21 +2,14 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
const resource_1 = require("../resource");
|
4
4
|
class Markets extends resource_1.ApiResource {
|
5
|
-
// static readonly PATH = 'markets'
|
6
|
-
async list(params, options) {
|
7
|
-
return this.resources.list({ type: Markets.TYPE }, params, options);
|
8
|
-
}
|
9
5
|
async create(resource, params, options) {
|
10
|
-
return this.resources.create(
|
11
|
-
}
|
12
|
-
async retrieve(id, params, options) {
|
13
|
-
return this.resources.retrieve({ type: Markets.TYPE, id }, params, options);
|
6
|
+
return this.resources.create({ ...resource, type: Markets.TYPE }, params, options);
|
14
7
|
}
|
15
8
|
async update(resource, params, options) {
|
16
|
-
return this.resources.update(
|
9
|
+
return this.resources.update({ ...resource, type: Markets.TYPE }, params, options);
|
17
10
|
}
|
18
11
|
async delete(id, options) {
|
19
|
-
await this.resources.delete({ type: Markets.TYPE
|
12
|
+
await this.resources.delete((typeof id === 'string') ? { id, type: Markets.TYPE } : id, options);
|
20
13
|
}
|
21
14
|
async merchant(marketId, params, options) {
|
22
15
|
const _marketId = marketId.id || marketId;
|
@@ -50,7 +43,12 @@ class Markets extends resource_1.ApiResource {
|
|
50
43
|
const _marketId = marketId.id || marketId;
|
51
44
|
return this.resources.fetch({ type: 'versions' }, `markets/${_marketId}/versions`, params, options);
|
52
45
|
}
|
53
|
-
|
46
|
+
async _disable(id, params, options) {
|
47
|
+
return this.resources.update({ id: (typeof id === 'string') ? id : id.id, type: Markets.TYPE, _disable: true }, params, options);
|
48
|
+
}
|
49
|
+
async _enable(id, params, options) {
|
50
|
+
return this.resources.update({ id: (typeof id === 'string') ? id : id.id, type: Markets.TYPE, _enable: true }, params, options);
|
51
|
+
}
|
54
52
|
isMarket(resource) {
|
55
53
|
return resource.type && (resource.type === Markets.TYPE);
|
56
54
|
}
|
@@ -1,41 +1,42 @@
|
|
1
|
-
import { ApiResource
|
2
|
-
import type {
|
3
|
-
import type {
|
1
|
+
import { ApiResource } from '../resource';
|
2
|
+
import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse } from '../resource';
|
3
|
+
import type { QueryParamsRetrieve, QueryParamsList } from '../query';
|
4
|
+
import type { Address, AddressType } from './addresses';
|
4
5
|
import type { Attachment } from './attachments';
|
5
6
|
import type { Version } from './versions';
|
7
|
+
type MerchantType = 'merchants';
|
6
8
|
type MerchantRel = ResourceRel & {
|
7
|
-
type:
|
9
|
+
type: MerchantType;
|
8
10
|
};
|
9
11
|
type AddressRel = ResourceRel & {
|
10
|
-
type:
|
12
|
+
type: AddressType;
|
11
13
|
};
|
12
14
|
interface Merchant extends Resource {
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
15
|
+
readonly type: MerchantType;
|
16
|
+
name: string;
|
17
|
+
address?: Address | null;
|
18
|
+
attachments?: Attachment[] | null;
|
19
|
+
versions?: Version[] | null;
|
17
20
|
}
|
18
21
|
interface MerchantCreate extends ResourceCreate {
|
19
22
|
name: string;
|
20
23
|
address: AddressRel;
|
21
24
|
}
|
22
25
|
interface MerchantUpdate extends ResourceUpdate {
|
23
|
-
name?: string;
|
24
|
-
address?: AddressRel;
|
26
|
+
name?: string | null;
|
27
|
+
address?: AddressRel | null;
|
25
28
|
}
|
26
|
-
declare class Merchants extends ApiResource {
|
27
|
-
static readonly TYPE:
|
28
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Merchant>>;
|
29
|
+
declare class Merchants extends ApiResource<Merchant> {
|
30
|
+
static readonly TYPE: MerchantType;
|
29
31
|
create(resource: MerchantCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Merchant>;
|
30
|
-
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Merchant>;
|
31
32
|
update(resource: MerchantUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Merchant>;
|
32
|
-
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
33
|
+
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
33
34
|
address(merchantId: string | Merchant, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Address>;
|
34
35
|
attachments(merchantId: string | Merchant, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
35
36
|
versions(merchantId: string | Merchant, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
36
37
|
isMerchant(resource: any): resource is Merchant;
|
37
38
|
relationship(id: string | ResourceId | null): MerchantRel;
|
38
|
-
type():
|
39
|
+
type(): MerchantType;
|
39
40
|
}
|
40
41
|
export default Merchants;
|
41
|
-
export { Merchant, MerchantCreate, MerchantUpdate };
|
42
|
+
export type { Merchant, MerchantCreate, MerchantUpdate, MerchantType };
|
@@ -2,21 +2,14 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
const resource_1 = require("../resource");
|
4
4
|
class Merchants extends resource_1.ApiResource {
|
5
|
-
// static readonly PATH = 'merchants'
|
6
|
-
async list(params, options) {
|
7
|
-
return this.resources.list({ type: Merchants.TYPE }, params, options);
|
8
|
-
}
|
9
5
|
async create(resource, params, options) {
|
10
|
-
return this.resources.create(
|
11
|
-
}
|
12
|
-
async retrieve(id, params, options) {
|
13
|
-
return this.resources.retrieve({ type: Merchants.TYPE, id }, params, options);
|
6
|
+
return this.resources.create({ ...resource, type: Merchants.TYPE }, params, options);
|
14
7
|
}
|
15
8
|
async update(resource, params, options) {
|
16
|
-
return this.resources.update(
|
9
|
+
return this.resources.update({ ...resource, type: Merchants.TYPE }, params, options);
|
17
10
|
}
|
18
11
|
async delete(id, options) {
|
19
|
-
await this.resources.delete({ type: Merchants.TYPE
|
12
|
+
await this.resources.delete((typeof id === 'string') ? { id, type: Merchants.TYPE } : id, options);
|
20
13
|
}
|
21
14
|
async address(merchantId, params, options) {
|
22
15
|
const _merchantId = merchantId.id || merchantId;
|
@@ -30,7 +23,6 @@ class Merchants extends resource_1.ApiResource {
|
|
30
23
|
const _merchantId = merchantId.id || merchantId;
|
31
24
|
return this.resources.fetch({ type: 'versions' }, `merchants/${_merchantId}/versions`, params, options);
|
32
25
|
}
|
33
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
34
26
|
isMerchant(resource) {
|
35
27
|
return resource.type && (resource.type === Merchants.TYPE);
|
36
28
|
}
|
@@ -1,62 +1,63 @@
|
|
1
|
-
import { ApiResource
|
2
|
-
import type {
|
3
|
-
import type {
|
4
|
-
import type {
|
5
|
-
import type {
|
6
|
-
import type {
|
7
|
-
import type {
|
8
|
-
import type {
|
1
|
+
import { ApiResource } from '../resource';
|
2
|
+
import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse } from '../resource';
|
3
|
+
import type { QueryParamsRetrieve, QueryParamsList } from '../query';
|
4
|
+
import type { PercentageDiscountPromotion, PercentageDiscountPromotionType } from './percentage_discount_promotions';
|
5
|
+
import type { FreeShippingPromotion, FreeShippingPromotionType } from './free_shipping_promotions';
|
6
|
+
import type { FreeGiftPromotion, FreeGiftPromotionType } from './free_gift_promotions';
|
7
|
+
import type { FixedPricePromotion, FixedPricePromotionType } from './fixed_price_promotions';
|
8
|
+
import type { ExternalPromotion, ExternalPromotionType } from './external_promotions';
|
9
|
+
import type { FixedAmountPromotion, FixedAmountPromotionType } from './fixed_amount_promotions';
|
9
10
|
import type { Version } from './versions';
|
11
|
+
type OrderAmountPromotionRuleType = 'order_amount_promotion_rules';
|
10
12
|
type OrderAmountPromotionRuleRel = ResourceRel & {
|
11
|
-
type:
|
13
|
+
type: OrderAmountPromotionRuleType;
|
12
14
|
};
|
13
15
|
type PercentageDiscountPromotionRel = ResourceRel & {
|
14
|
-
type:
|
16
|
+
type: PercentageDiscountPromotionType;
|
15
17
|
};
|
16
18
|
type FreeShippingPromotionRel = ResourceRel & {
|
17
|
-
type:
|
19
|
+
type: FreeShippingPromotionType;
|
18
20
|
};
|
19
21
|
type FreeGiftPromotionRel = ResourceRel & {
|
20
|
-
type:
|
22
|
+
type: FreeGiftPromotionType;
|
21
23
|
};
|
22
24
|
type FixedPricePromotionRel = ResourceRel & {
|
23
|
-
type:
|
25
|
+
type: FixedPricePromotionType;
|
24
26
|
};
|
25
27
|
type ExternalPromotionRel = ResourceRel & {
|
26
|
-
type:
|
28
|
+
type: ExternalPromotionType;
|
27
29
|
};
|
28
30
|
type FixedAmountPromotionRel = ResourceRel & {
|
29
|
-
type:
|
31
|
+
type: FixedAmountPromotionType;
|
30
32
|
};
|
31
33
|
interface OrderAmountPromotionRule extends Resource {
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
34
|
+
readonly type: OrderAmountPromotionRuleType;
|
35
|
+
order_amount_cents?: number | null;
|
36
|
+
order_amount_float?: number | null;
|
37
|
+
formatted_order_amount?: string | null;
|
38
|
+
use_subtotal?: boolean | null;
|
39
|
+
promotion?: PercentageDiscountPromotion | FreeShippingPromotion | FreeGiftPromotion | FixedPricePromotion | ExternalPromotion | FixedAmountPromotion | null;
|
40
|
+
versions?: Version[] | null;
|
38
41
|
}
|
39
42
|
interface OrderAmountPromotionRuleCreate extends ResourceCreate {
|
40
|
-
order_amount_cents?: number;
|
41
|
-
use_subtotal?: boolean;
|
43
|
+
order_amount_cents?: number | null;
|
44
|
+
use_subtotal?: boolean | null;
|
42
45
|
promotion: PercentageDiscountPromotionRel | FreeShippingPromotionRel | FreeGiftPromotionRel | FixedPricePromotionRel | ExternalPromotionRel | FixedAmountPromotionRel;
|
43
46
|
}
|
44
47
|
interface OrderAmountPromotionRuleUpdate extends ResourceUpdate {
|
45
|
-
order_amount_cents?: number;
|
46
|
-
use_subtotal?: boolean;
|
47
|
-
promotion?: PercentageDiscountPromotionRel | FreeShippingPromotionRel | FreeGiftPromotionRel | FixedPricePromotionRel | ExternalPromotionRel | FixedAmountPromotionRel;
|
48
|
+
order_amount_cents?: number | null;
|
49
|
+
use_subtotal?: boolean | null;
|
50
|
+
promotion?: PercentageDiscountPromotionRel | FreeShippingPromotionRel | FreeGiftPromotionRel | FixedPricePromotionRel | ExternalPromotionRel | FixedAmountPromotionRel | null;
|
48
51
|
}
|
49
|
-
declare class OrderAmountPromotionRules extends ApiResource {
|
50
|
-
static readonly TYPE:
|
51
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<OrderAmountPromotionRule>>;
|
52
|
+
declare class OrderAmountPromotionRules extends ApiResource<OrderAmountPromotionRule> {
|
53
|
+
static readonly TYPE: OrderAmountPromotionRuleType;
|
52
54
|
create(resource: OrderAmountPromotionRuleCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderAmountPromotionRule>;
|
53
|
-
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderAmountPromotionRule>;
|
54
55
|
update(resource: OrderAmountPromotionRuleUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderAmountPromotionRule>;
|
55
|
-
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
56
|
+
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
56
57
|
versions(orderAmountPromotionRuleId: string | OrderAmountPromotionRule, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
57
58
|
isOrderAmountPromotionRule(resource: any): resource is OrderAmountPromotionRule;
|
58
59
|
relationship(id: string | ResourceId | null): OrderAmountPromotionRuleRel;
|
59
|
-
type():
|
60
|
+
type(): OrderAmountPromotionRuleType;
|
60
61
|
}
|
61
62
|
export default OrderAmountPromotionRules;
|
62
|
-
export { OrderAmountPromotionRule, OrderAmountPromotionRuleCreate, OrderAmountPromotionRuleUpdate };
|
63
|
+
export type { OrderAmountPromotionRule, OrderAmountPromotionRuleCreate, OrderAmountPromotionRuleUpdate, OrderAmountPromotionRuleType };
|
@@ -2,27 +2,19 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
const resource_1 = require("../resource");
|
4
4
|
class OrderAmountPromotionRules extends resource_1.ApiResource {
|
5
|
-
// static readonly PATH = 'order_amount_promotion_rules'
|
6
|
-
async list(params, options) {
|
7
|
-
return this.resources.list({ type: OrderAmountPromotionRules.TYPE }, params, options);
|
8
|
-
}
|
9
5
|
async create(resource, params, options) {
|
10
|
-
return this.resources.create(
|
11
|
-
}
|
12
|
-
async retrieve(id, params, options) {
|
13
|
-
return this.resources.retrieve({ type: OrderAmountPromotionRules.TYPE, id }, params, options);
|
6
|
+
return this.resources.create({ ...resource, type: OrderAmountPromotionRules.TYPE }, params, options);
|
14
7
|
}
|
15
8
|
async update(resource, params, options) {
|
16
|
-
return this.resources.update(
|
9
|
+
return this.resources.update({ ...resource, type: OrderAmountPromotionRules.TYPE }, params, options);
|
17
10
|
}
|
18
11
|
async delete(id, options) {
|
19
|
-
await this.resources.delete({ type: OrderAmountPromotionRules.TYPE
|
12
|
+
await this.resources.delete((typeof id === 'string') ? { id, type: OrderAmountPromotionRules.TYPE } : id, options);
|
20
13
|
}
|
21
14
|
async versions(orderAmountPromotionRuleId, params, options) {
|
22
15
|
const _orderAmountPromotionRuleId = orderAmountPromotionRuleId.id || orderAmountPromotionRuleId;
|
23
16
|
return this.resources.fetch({ type: 'versions' }, `order_amount_promotion_rules/${_orderAmountPromotionRuleId}/versions`, params, options);
|
24
17
|
}
|
25
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
26
18
|
isOrderAmountPromotionRule(resource) {
|
27
19
|
return resource.type && (resource.type === OrderAmountPromotionRules.TYPE);
|
28
20
|
}
|
@@ -1,50 +1,51 @@
|
|
1
|
-
import { ApiResource
|
2
|
-
import type {
|
3
|
-
import type {
|
1
|
+
import { ApiResource } from '../resource';
|
2
|
+
import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse } from '../resource';
|
3
|
+
import type { QueryParamsRetrieve, QueryParamsList } from '../query';
|
4
|
+
import type { Order, OrderType } from './orders';
|
4
5
|
import type { Event } from './events';
|
5
6
|
import type { OrderSubscription } from './order_subscriptions';
|
7
|
+
type OrderCopyType = 'order_copies';
|
6
8
|
type OrderCopyRel = ResourceRel & {
|
7
|
-
type:
|
9
|
+
type: OrderCopyType;
|
8
10
|
};
|
9
11
|
type OrderRel = ResourceRel & {
|
10
|
-
type:
|
12
|
+
type: OrderType;
|
11
13
|
};
|
12
14
|
interface OrderCopy extends Resource {
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
15
|
+
readonly type: OrderCopyType;
|
16
|
+
status: 'pending' | 'in_progress' | 'failed' | 'completed';
|
17
|
+
started_at?: string | null;
|
18
|
+
completed_at?: string | null;
|
19
|
+
failed_at?: string | null;
|
20
|
+
errors_log?: Record<string, any> | null;
|
21
|
+
errors_count?: number | null;
|
22
|
+
place_target_order?: boolean | null;
|
23
|
+
reuse_wallet?: boolean | null;
|
24
|
+
cancel_source_order?: boolean | null;
|
25
|
+
source_order?: Order | null;
|
26
|
+
target_order?: Order | null;
|
27
|
+
events?: Event[] | null;
|
28
|
+
order_subscription?: OrderSubscription | null;
|
26
29
|
}
|
27
30
|
interface OrderCopyCreate extends ResourceCreate {
|
28
|
-
place_target_order?: boolean;
|
29
|
-
reuse_wallet?: boolean;
|
30
|
-
cancel_source_order?: boolean;
|
31
|
+
place_target_order?: boolean | null;
|
32
|
+
reuse_wallet?: boolean | null;
|
33
|
+
cancel_source_order?: boolean | null;
|
31
34
|
source_order: OrderRel;
|
32
35
|
}
|
33
36
|
type OrderCopyUpdate = ResourceUpdate;
|
34
|
-
declare class OrderCopies extends ApiResource {
|
35
|
-
static readonly TYPE:
|
36
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<OrderCopy>>;
|
37
|
+
declare class OrderCopies extends ApiResource<OrderCopy> {
|
38
|
+
static readonly TYPE: OrderCopyType;
|
37
39
|
create(resource: OrderCopyCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderCopy>;
|
38
|
-
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderCopy>;
|
39
40
|
update(resource: OrderCopyUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderCopy>;
|
40
|
-
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
41
|
+
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
41
42
|
source_order(orderCopyId: string | OrderCopy, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
42
43
|
target_order(orderCopyId: string | OrderCopy, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
43
44
|
events(orderCopyId: string | OrderCopy, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
44
45
|
order_subscription(orderCopyId: string | OrderCopy, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderSubscription>;
|
45
46
|
isOrderCopy(resource: any): resource is OrderCopy;
|
46
47
|
relationship(id: string | ResourceId | null): OrderCopyRel;
|
47
|
-
type():
|
48
|
+
type(): OrderCopyType;
|
48
49
|
}
|
49
50
|
export default OrderCopies;
|
50
|
-
export { OrderCopy, OrderCopyCreate, OrderCopyUpdate };
|
51
|
+
export type { OrderCopy, OrderCopyCreate, OrderCopyUpdate, OrderCopyType };
|