@commercelayer/sdk 4.27.1 → 4.28.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 +23 -2
- package/lib/cjs/api.js +4 -14
- package/lib/cjs/client.d.ts +3 -5
- package/lib/cjs/client.js +11 -8
- package/lib/cjs/commercelayer.d.ts +6 -5
- package/lib/cjs/commercelayer.js +4 -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 +1 -0
- package/lib/cjs/debug.js +0 -4
- package/lib/cjs/error.js +1 -4
- 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 +5 -1
- package/lib/cjs/model.d.ts +1 -0
- package/lib/cjs/query.d.ts +9 -15
- package/lib/cjs/query.js +3 -2
- package/lib/cjs/resource.d.ts +33 -25
- package/lib/cjs/resource.js +34 -9
- package/lib/cjs/resources/addresses.d.ts +78 -66
- package/lib/cjs/resources/addresses.js +11 -11
- package/lib/cjs/resources/adjustments.d.ts +19 -18
- package/lib/cjs/resources/adjustments.js +3 -11
- package/lib/cjs/resources/adyen_gateways.d.ts +34 -33
- package/lib/cjs/resources/adyen_gateways.js +3 -11
- package/lib/cjs/resources/adyen_payments.d.ts +27 -26
- package/lib/cjs/resources/adyen_payments.js +3 -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 +42 -41
- package/lib/cjs/resources/authorizations.js +1 -9
- package/lib/cjs/resources/avalara_accounts.d.ts +31 -30
- package/lib/cjs/resources/avalara_accounts.js +3 -11
- package/lib/cjs/resources/axerve_gateways.d.ts +22 -21
- package/lib/cjs/resources/axerve_gateways.js +3 -11
- package/lib/cjs/resources/axerve_payments.d.ts +26 -25
- package/lib/cjs/resources/axerve_payments.js +3 -11
- package/lib/cjs/resources/billing_info_validation_rules.d.ts +16 -15
- 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 +33 -32
- package/lib/cjs/resources/braintree_gateways.js +3 -11
- package/lib/cjs/resources/braintree_payments.d.ts +29 -28
- package/lib/cjs/resources/braintree_payments.js +3 -11
- package/lib/cjs/resources/bundles.d.ts +59 -47
- package/lib/cjs/resources/bundles.js +11 -11
- package/lib/cjs/resources/captures.d.ts +33 -32
- package/lib/cjs/resources/captures.js +1 -9
- package/lib/cjs/resources/carrier_accounts.d.ts +15 -14
- package/lib/cjs/resources/carrier_accounts.js +0 -8
- package/lib/cjs/resources/checkout_com_gateways.d.ts +24 -23
- package/lib/cjs/resources/checkout_com_gateways.js +3 -11
- package/lib/cjs/resources/checkout_com_payments.d.ts +38 -37
- package/lib/cjs/resources/checkout_com_payments.js +3 -11
- package/lib/cjs/resources/cleanups.d.ts +23 -22
- package/lib/cjs/resources/cleanups.js +2 -10
- package/lib/cjs/resources/coupon_codes_promotion_rules.d.ts +30 -29
- package/lib/cjs/resources/coupon_codes_promotion_rules.js +3 -11
- package/lib/cjs/resources/coupon_recipients.d.ts +25 -24
- package/lib/cjs/resources/coupon_recipients.js +3 -11
- package/lib/cjs/resources/coupons.d.ts +38 -26
- package/lib/cjs/resources/coupons.js +11 -11
- package/lib/cjs/resources/customer_addresses.d.ts +21 -20
- package/lib/cjs/resources/customer_addresses.js +3 -11
- package/lib/cjs/resources/customer_groups.d.ts +16 -15
- package/lib/cjs/resources/customer_groups.js +3 -11
- package/lib/cjs/resources/customer_password_resets.d.ts +18 -17
- package/lib/cjs/resources/customer_password_resets.js +3 -11
- package/lib/cjs/resources/customer_payment_sources.d.ts +40 -39
- package/lib/cjs/resources/customer_payment_sources.js +3 -11
- package/lib/cjs/resources/customer_subscriptions.d.ts +14 -13
- package/lib/cjs/resources/customer_subscriptions.js +3 -11
- package/lib/cjs/resources/customers.d.ts +39 -30
- package/lib/cjs/resources/customers.js +7 -11
- package/lib/cjs/resources/delivery_lead_times.d.ts +26 -25
- 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 +31 -30
- package/lib/cjs/resources/external_gateways.js +3 -11
- package/lib/cjs/resources/external_payments.d.ts +22 -21
- package/lib/cjs/resources/external_payments.js +3 -11
- package/lib/cjs/resources/external_promotions.d.ts +62 -53
- package/lib/cjs/resources/external_promotions.js +7 -11
- package/lib/cjs/resources/external_tax_calculators.d.ts +18 -17
- package/lib/cjs/resources/external_tax_calculators.js +3 -11
- package/lib/cjs/resources/fixed_amount_promotions.d.ts +63 -54
- package/lib/cjs/resources/fixed_amount_promotions.js +7 -11
- package/lib/cjs/resources/fixed_price_promotions.d.ts +68 -59
- package/lib/cjs/resources/fixed_price_promotions.js +7 -11
- package/lib/cjs/resources/free_gift_promotions.d.ts +67 -58
- package/lib/cjs/resources/free_gift_promotions.js +7 -11
- package/lib/cjs/resources/free_shipping_promotions.d.ts +59 -50
- package/lib/cjs/resources/free_shipping_promotions.js +7 -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 +25 -24
- package/lib/cjs/resources/gift_card_recipients.js +3 -11
- package/lib/cjs/resources/gift_cards.d.ts +69 -60
- package/lib/cjs/resources/gift_cards.js +7 -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 +35 -34
- package/lib/cjs/resources/in_stock_subscriptions.js +3 -11
- package/lib/cjs/resources/inventory_models.d.ts +22 -21
- package/lib/cjs/resources/inventory_models.js +3 -11
- package/lib/cjs/resources/inventory_return_locations.d.ts +21 -20
- package/lib/cjs/resources/inventory_return_locations.js +3 -11
- package/lib/cjs/resources/inventory_stock_locations.d.ts +24 -23
- package/lib/cjs/resources/inventory_stock_locations.js +3 -11
- package/lib/cjs/resources/klarna_gateways.d.ts +22 -21
- package/lib/cjs/resources/klarna_gateways.js +3 -11
- package/lib/cjs/resources/klarna_payments.d.ts +27 -26
- package/lib/cjs/resources/klarna_payments.js +3 -11
- package/lib/cjs/resources/line_item_options.d.ts +46 -34
- package/lib/cjs/resources/line_item_options.js +11 -11
- package/lib/cjs/resources/line_items.d.ts +92 -80
- package/lib/cjs/resources/line_items.js +11 -11
- package/lib/cjs/resources/manual_gateways.d.ts +14 -13
- package/lib/cjs/resources/manual_gateways.js +3 -11
- package/lib/cjs/resources/manual_tax_calculators.d.ts +20 -19
- package/lib/cjs/resources/manual_tax_calculators.js +3 -11
- package/lib/cjs/resources/markets.d.ts +59 -58
- package/lib/cjs/resources/markets.js +3 -11
- package/lib/cjs/resources/merchants.d.ts +18 -17
- package/lib/cjs/resources/merchants.js +3 -11
- package/lib/cjs/resources/order_amount_promotion_rules.d.ts +30 -29
- 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 +35 -34
- package/lib/cjs/resources/order_subscription_items.js +3 -11
- package/lib/cjs/resources/order_subscriptions.d.ts +51 -50
- package/lib/cjs/resources/order_subscriptions.js +3 -11
- package/lib/cjs/resources/order_validation_rules.d.ts +12 -11
- package/lib/cjs/resources/order_validation_rules.js +0 -8
- package/lib/cjs/resources/orders.d.ts +233 -224
- package/lib/cjs/resources/orders.js +7 -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 +30 -29
- package/lib/cjs/resources/packages.js +3 -11
- package/lib/cjs/resources/parcel_line_items.d.ts +22 -21
- package/lib/cjs/resources/parcel_line_items.js +3 -11
- package/lib/cjs/resources/parcels.d.ts +93 -89
- package/lib/cjs/resources/parcels.js +3 -11
- package/lib/cjs/resources/payment_gateways.d.ts +12 -11
- package/lib/cjs/resources/payment_gateways.js +0 -8
- package/lib/cjs/resources/payment_methods.d.ts +48 -47
- package/lib/cjs/resources/payment_methods.js +3 -11
- package/lib/cjs/resources/paypal_gateways.d.ts +17 -16
- package/lib/cjs/resources/paypal_gateways.js +3 -11
- package/lib/cjs/resources/paypal_payments.d.ts +31 -30
- package/lib/cjs/resources/paypal_payments.js +3 -11
- package/lib/cjs/resources/percentage_discount_promotions.d.ts +67 -58
- package/lib/cjs/resources/percentage_discount_promotions.js +7 -11
- package/lib/cjs/resources/price_frequency_tiers.d.ts +26 -25
- package/lib/cjs/resources/price_frequency_tiers.js +3 -11
- package/lib/cjs/resources/price_lists.d.ts +20 -19
- package/lib/cjs/resources/price_lists.js +3 -11
- package/lib/cjs/resources/price_tiers.d.ts +17 -16
- package/lib/cjs/resources/price_tiers.js +0 -8
- package/lib/cjs/resources/price_volume_tiers.d.ts +26 -25
- package/lib/cjs/resources/price_volume_tiers.js +3 -11
- package/lib/cjs/resources/prices.d.ts +39 -38
- package/lib/cjs/resources/prices.js +3 -11
- package/lib/cjs/resources/promotion_rules.d.ts +10 -10
- package/lib/cjs/resources/promotion_rules.js +0 -8
- package/lib/cjs/resources/promotions.d.ts +27 -23
- package/lib/cjs/resources/promotions.js +4 -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 +24 -23
- package/lib/cjs/resources/refunds.js +0 -8
- package/lib/cjs/resources/return_line_items.d.ts +27 -26
- package/lib/cjs/resources/return_line_items.js +3 -11
- package/lib/cjs/resources/returns.d.ts +52 -43
- package/lib/cjs/resources/returns.js +7 -11
- package/lib/cjs/resources/satispay_gateways.d.ts +23 -19
- package/lib/cjs/resources/satispay_gateways.js +3 -11
- package/lib/cjs/resources/satispay_payments.d.ts +21 -23
- package/lib/cjs/resources/satispay_payments.js +3 -11
- package/lib/cjs/resources/shipments.d.ts +52 -51
- package/lib/cjs/resources/shipments.js +1 -9
- package/lib/cjs/resources/shipping_categories.d.ts +15 -14
- package/lib/cjs/resources/shipping_categories.js +3 -11
- package/lib/cjs/resources/shipping_method_tiers.d.ts +17 -16
- package/lib/cjs/resources/shipping_method_tiers.js +0 -8
- package/lib/cjs/resources/shipping_methods.d.ts +71 -70
- package/lib/cjs/resources/shipping_methods.js +3 -11
- package/lib/cjs/resources/shipping_weight_tiers.d.ts +25 -24
- package/lib/cjs/resources/shipping_weight_tiers.js +3 -11
- package/lib/cjs/resources/shipping_zones.d.ts +32 -31
- package/lib/cjs/resources/shipping_zones.js +3 -11
- package/lib/cjs/resources/sku_list_items.d.ts +26 -25
- package/lib/cjs/resources/sku_list_items.js +3 -11
- package/lib/cjs/resources/sku_list_promotion_rules.d.ts +37 -36
- package/lib/cjs/resources/sku_list_promotion_rules.js +3 -11
- package/lib/cjs/resources/sku_lists.d.ts +35 -34
- package/lib/cjs/resources/sku_lists.js +3 -11
- package/lib/cjs/resources/sku_options.d.ts +48 -36
- package/lib/cjs/resources/sku_options.js +11 -11
- package/lib/cjs/resources/skus.d.ts +60 -48
- package/lib/cjs/resources/skus.js +11 -11
- package/lib/cjs/resources/stock_items.d.ts +26 -25
- package/lib/cjs/resources/stock_items.js +3 -11
- package/lib/cjs/resources/stock_line_items.d.ts +16 -15
- package/lib/cjs/resources/stock_line_items.js +0 -8
- package/lib/cjs/resources/stock_locations.d.ts +29 -28
- package/lib/cjs/resources/stock_locations.js +3 -11
- package/lib/cjs/resources/stock_transfers.d.ts +42 -41
- package/lib/cjs/resources/stock_transfers.js +3 -11
- package/lib/cjs/resources/stripe_gateways.d.ts +22 -21
- package/lib/cjs/resources/stripe_gateways.js +3 -11
- package/lib/cjs/resources/stripe_payments.d.ts +28 -27
- package/lib/cjs/resources/stripe_payments.js +3 -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 +28 -0
- package/lib/cjs/resources/tags.js +25 -0
- package/lib/cjs/resources/tax_calculators.d.ts +13 -12
- package/lib/cjs/resources/tax_calculators.js +0 -8
- package/lib/cjs/resources/tax_categories.d.ts +30 -29
- package/lib/cjs/resources/tax_categories.js +3 -11
- package/lib/cjs/resources/tax_rules.d.ts +51 -50
- package/lib/cjs/resources/tax_rules.js +3 -11
- package/lib/cjs/resources/taxjar_accounts.d.ts +21 -20
- package/lib/cjs/resources/taxjar_accounts.js +3 -11
- package/lib/cjs/resources/transactions.d.ts +22 -21
- package/lib/cjs/resources/transactions.js +0 -8
- package/lib/cjs/resources/voids.d.ts +24 -23
- package/lib/cjs/resources/voids.js +0 -8
- package/lib/cjs/resources/webhooks.d.ts +26 -25
- package/lib/cjs/resources/webhooks.js +3 -11
- package/lib/cjs/resources/wire_transfers.d.ts +16 -15
- 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 +23 -2
- package/lib/esm/api.js +2 -13
- package/lib/esm/client.d.ts +3 -5
- package/lib/esm/client.js +11 -8
- package/lib/esm/commercelayer.d.ts +6 -5
- package/lib/esm/commercelayer.js +4 -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 +1 -0
- package/lib/esm/debug.js +0 -4
- package/lib/esm/error.js +1 -4
- 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 +5 -1
- package/lib/esm/model.d.ts +1 -0
- package/lib/esm/query.d.ts +9 -15
- package/lib/esm/query.js +2 -2
- package/lib/esm/resource.d.ts +33 -25
- package/lib/esm/resource.js +34 -10
- package/lib/esm/resources/addresses.d.ts +78 -66
- package/lib/esm/resources/addresses.js +11 -11
- package/lib/esm/resources/adjustments.d.ts +19 -18
- package/lib/esm/resources/adjustments.js +3 -11
- package/lib/esm/resources/adyen_gateways.d.ts +34 -33
- package/lib/esm/resources/adyen_gateways.js +3 -11
- package/lib/esm/resources/adyen_payments.d.ts +27 -26
- package/lib/esm/resources/adyen_payments.js +3 -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 +42 -41
- package/lib/esm/resources/authorizations.js +1 -9
- package/lib/esm/resources/avalara_accounts.d.ts +31 -30
- package/lib/esm/resources/avalara_accounts.js +3 -11
- package/lib/esm/resources/axerve_gateways.d.ts +22 -21
- package/lib/esm/resources/axerve_gateways.js +3 -11
- package/lib/esm/resources/axerve_payments.d.ts +26 -25
- package/lib/esm/resources/axerve_payments.js +3 -11
- package/lib/esm/resources/billing_info_validation_rules.d.ts +16 -15
- 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 +33 -32
- package/lib/esm/resources/braintree_gateways.js +3 -11
- package/lib/esm/resources/braintree_payments.d.ts +29 -28
- package/lib/esm/resources/braintree_payments.js +3 -11
- package/lib/esm/resources/bundles.d.ts +59 -47
- package/lib/esm/resources/bundles.js +11 -11
- package/lib/esm/resources/captures.d.ts +33 -32
- package/lib/esm/resources/captures.js +1 -9
- package/lib/esm/resources/carrier_accounts.d.ts +15 -14
- package/lib/esm/resources/carrier_accounts.js +0 -8
- package/lib/esm/resources/checkout_com_gateways.d.ts +24 -23
- package/lib/esm/resources/checkout_com_gateways.js +3 -11
- package/lib/esm/resources/checkout_com_payments.d.ts +38 -37
- package/lib/esm/resources/checkout_com_payments.js +3 -11
- package/lib/esm/resources/cleanups.d.ts +23 -22
- package/lib/esm/resources/cleanups.js +2 -10
- package/lib/esm/resources/coupon_codes_promotion_rules.d.ts +30 -29
- package/lib/esm/resources/coupon_codes_promotion_rules.js +3 -11
- package/lib/esm/resources/coupon_recipients.d.ts +25 -24
- package/lib/esm/resources/coupon_recipients.js +3 -11
- package/lib/esm/resources/coupons.d.ts +38 -26
- package/lib/esm/resources/coupons.js +11 -11
- package/lib/esm/resources/customer_addresses.d.ts +21 -20
- package/lib/esm/resources/customer_addresses.js +3 -11
- package/lib/esm/resources/customer_groups.d.ts +16 -15
- package/lib/esm/resources/customer_groups.js +3 -11
- package/lib/esm/resources/customer_password_resets.d.ts +18 -17
- package/lib/esm/resources/customer_password_resets.js +3 -11
- package/lib/esm/resources/customer_payment_sources.d.ts +40 -39
- package/lib/esm/resources/customer_payment_sources.js +3 -11
- package/lib/esm/resources/customer_subscriptions.d.ts +14 -13
- package/lib/esm/resources/customer_subscriptions.js +3 -11
- package/lib/esm/resources/customers.d.ts +39 -30
- package/lib/esm/resources/customers.js +7 -11
- package/lib/esm/resources/delivery_lead_times.d.ts +26 -25
- 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 +31 -30
- package/lib/esm/resources/external_gateways.js +3 -11
- package/lib/esm/resources/external_payments.d.ts +22 -21
- package/lib/esm/resources/external_payments.js +3 -11
- package/lib/esm/resources/external_promotions.d.ts +62 -53
- package/lib/esm/resources/external_promotions.js +7 -11
- package/lib/esm/resources/external_tax_calculators.d.ts +18 -17
- package/lib/esm/resources/external_tax_calculators.js +3 -11
- package/lib/esm/resources/fixed_amount_promotions.d.ts +63 -54
- package/lib/esm/resources/fixed_amount_promotions.js +7 -11
- package/lib/esm/resources/fixed_price_promotions.d.ts +68 -59
- package/lib/esm/resources/fixed_price_promotions.js +7 -11
- package/lib/esm/resources/free_gift_promotions.d.ts +67 -58
- package/lib/esm/resources/free_gift_promotions.js +7 -11
- package/lib/esm/resources/free_shipping_promotions.d.ts +59 -50
- package/lib/esm/resources/free_shipping_promotions.js +7 -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 +25 -24
- package/lib/esm/resources/gift_card_recipients.js +3 -11
- package/lib/esm/resources/gift_cards.d.ts +69 -60
- package/lib/esm/resources/gift_cards.js +7 -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 +35 -34
- package/lib/esm/resources/in_stock_subscriptions.js +3 -11
- package/lib/esm/resources/inventory_models.d.ts +22 -21
- package/lib/esm/resources/inventory_models.js +3 -11
- package/lib/esm/resources/inventory_return_locations.d.ts +21 -20
- package/lib/esm/resources/inventory_return_locations.js +3 -11
- package/lib/esm/resources/inventory_stock_locations.d.ts +24 -23
- package/lib/esm/resources/inventory_stock_locations.js +3 -11
- package/lib/esm/resources/klarna_gateways.d.ts +22 -21
- package/lib/esm/resources/klarna_gateways.js +3 -11
- package/lib/esm/resources/klarna_payments.d.ts +27 -26
- package/lib/esm/resources/klarna_payments.js +3 -11
- package/lib/esm/resources/line_item_options.d.ts +46 -34
- package/lib/esm/resources/line_item_options.js +11 -11
- package/lib/esm/resources/line_items.d.ts +92 -80
- package/lib/esm/resources/line_items.js +11 -11
- package/lib/esm/resources/manual_gateways.d.ts +14 -13
- package/lib/esm/resources/manual_gateways.js +3 -11
- package/lib/esm/resources/manual_tax_calculators.d.ts +20 -19
- package/lib/esm/resources/manual_tax_calculators.js +3 -11
- package/lib/esm/resources/markets.d.ts +59 -58
- package/lib/esm/resources/markets.js +3 -11
- package/lib/esm/resources/merchants.d.ts +18 -17
- package/lib/esm/resources/merchants.js +3 -11
- package/lib/esm/resources/order_amount_promotion_rules.d.ts +30 -29
- 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 +35 -34
- package/lib/esm/resources/order_subscription_items.js +3 -11
- package/lib/esm/resources/order_subscriptions.d.ts +51 -50
- package/lib/esm/resources/order_subscriptions.js +3 -11
- package/lib/esm/resources/order_validation_rules.d.ts +12 -11
- package/lib/esm/resources/order_validation_rules.js +0 -8
- package/lib/esm/resources/orders.d.ts +233 -224
- package/lib/esm/resources/orders.js +7 -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 +30 -29
- package/lib/esm/resources/packages.js +3 -11
- package/lib/esm/resources/parcel_line_items.d.ts +22 -21
- package/lib/esm/resources/parcel_line_items.js +3 -11
- package/lib/esm/resources/parcels.d.ts +93 -89
- package/lib/esm/resources/parcels.js +3 -11
- package/lib/esm/resources/payment_gateways.d.ts +12 -11
- package/lib/esm/resources/payment_gateways.js +0 -8
- package/lib/esm/resources/payment_methods.d.ts +48 -47
- package/lib/esm/resources/payment_methods.js +3 -11
- package/lib/esm/resources/paypal_gateways.d.ts +17 -16
- package/lib/esm/resources/paypal_gateways.js +3 -11
- package/lib/esm/resources/paypal_payments.d.ts +31 -30
- package/lib/esm/resources/paypal_payments.js +3 -11
- package/lib/esm/resources/percentage_discount_promotions.d.ts +67 -58
- package/lib/esm/resources/percentage_discount_promotions.js +7 -11
- package/lib/esm/resources/price_frequency_tiers.d.ts +26 -25
- package/lib/esm/resources/price_frequency_tiers.js +3 -11
- package/lib/esm/resources/price_lists.d.ts +20 -19
- package/lib/esm/resources/price_lists.js +3 -11
- package/lib/esm/resources/price_tiers.d.ts +17 -16
- package/lib/esm/resources/price_tiers.js +0 -8
- package/lib/esm/resources/price_volume_tiers.d.ts +26 -25
- package/lib/esm/resources/price_volume_tiers.js +3 -11
- package/lib/esm/resources/prices.d.ts +39 -38
- package/lib/esm/resources/prices.js +3 -11
- package/lib/esm/resources/promotion_rules.d.ts +10 -10
- package/lib/esm/resources/promotion_rules.js +0 -8
- package/lib/esm/resources/promotions.d.ts +27 -23
- package/lib/esm/resources/promotions.js +4 -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 +24 -23
- package/lib/esm/resources/refunds.js +0 -8
- package/lib/esm/resources/return_line_items.d.ts +27 -26
- package/lib/esm/resources/return_line_items.js +3 -11
- package/lib/esm/resources/returns.d.ts +52 -43
- package/lib/esm/resources/returns.js +7 -11
- package/lib/esm/resources/satispay_gateways.d.ts +23 -19
- package/lib/esm/resources/satispay_gateways.js +3 -11
- package/lib/esm/resources/satispay_payments.d.ts +21 -23
- package/lib/esm/resources/satispay_payments.js +3 -11
- package/lib/esm/resources/shipments.d.ts +52 -51
- package/lib/esm/resources/shipments.js +1 -9
- package/lib/esm/resources/shipping_categories.d.ts +15 -14
- package/lib/esm/resources/shipping_categories.js +3 -11
- package/lib/esm/resources/shipping_method_tiers.d.ts +17 -16
- package/lib/esm/resources/shipping_method_tiers.js +0 -8
- package/lib/esm/resources/shipping_methods.d.ts +71 -70
- package/lib/esm/resources/shipping_methods.js +3 -11
- package/lib/esm/resources/shipping_weight_tiers.d.ts +25 -24
- package/lib/esm/resources/shipping_weight_tiers.js +3 -11
- package/lib/esm/resources/shipping_zones.d.ts +32 -31
- package/lib/esm/resources/shipping_zones.js +3 -11
- package/lib/esm/resources/sku_list_items.d.ts +26 -25
- package/lib/esm/resources/sku_list_items.js +3 -11
- package/lib/esm/resources/sku_list_promotion_rules.d.ts +37 -36
- package/lib/esm/resources/sku_list_promotion_rules.js +3 -11
- package/lib/esm/resources/sku_lists.d.ts +35 -34
- package/lib/esm/resources/sku_lists.js +3 -11
- package/lib/esm/resources/sku_options.d.ts +48 -36
- package/lib/esm/resources/sku_options.js +11 -11
- package/lib/esm/resources/skus.d.ts +60 -48
- package/lib/esm/resources/skus.js +11 -11
- package/lib/esm/resources/stock_items.d.ts +26 -25
- package/lib/esm/resources/stock_items.js +3 -11
- package/lib/esm/resources/stock_line_items.d.ts +16 -15
- package/lib/esm/resources/stock_line_items.js +0 -8
- package/lib/esm/resources/stock_locations.d.ts +29 -28
- package/lib/esm/resources/stock_locations.js +3 -11
- package/lib/esm/resources/stock_transfers.d.ts +42 -41
- package/lib/esm/resources/stock_transfers.js +3 -11
- package/lib/esm/resources/stripe_gateways.d.ts +22 -21
- package/lib/esm/resources/stripe_gateways.js +3 -11
- package/lib/esm/resources/stripe_payments.d.ts +28 -27
- package/lib/esm/resources/stripe_payments.js +3 -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 +28 -0
- package/lib/esm/resources/tags.js +23 -0
- package/lib/esm/resources/tax_calculators.d.ts +13 -12
- package/lib/esm/resources/tax_calculators.js +0 -8
- package/lib/esm/resources/tax_categories.d.ts +30 -29
- package/lib/esm/resources/tax_categories.js +3 -11
- package/lib/esm/resources/tax_rules.d.ts +51 -50
- package/lib/esm/resources/tax_rules.js +3 -11
- package/lib/esm/resources/taxjar_accounts.d.ts +21 -20
- package/lib/esm/resources/taxjar_accounts.js +3 -11
- package/lib/esm/resources/transactions.d.ts +22 -21
- package/lib/esm/resources/transactions.js +0 -8
- package/lib/esm/resources/voids.d.ts +24 -23
- package/lib/esm/resources/voids.js +0 -8
- package/lib/esm/resources/webhooks.d.ts +26 -25
- package/lib/esm/resources/webhooks.js +3 -11
- package/lib/esm/resources/wire_transfers.d.ts +16 -15
- 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 +1 -1
@@ -1,22 +1,23 @@
|
|
1
|
-
import { ApiResource
|
2
|
-
import type {
|
3
|
-
import type {
|
4
|
-
import type {
|
5
|
-
import type {
|
6
|
-
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 { Market, MarketType } from './markets';
|
5
|
+
import type { Customer, CustomerType } from './customers';
|
6
|
+
import type { Address, AddressType } from './addresses';
|
7
|
+
import type { PaymentMethod, PaymentMethodType } from './payment_methods';
|
7
8
|
import type { CustomerPaymentSource } from './customer_payment_sources';
|
8
9
|
import type { Sku } from './skus';
|
9
10
|
import type { Bundle } from './bundles';
|
10
|
-
import type { AdyenPayment } from './adyen_payments';
|
11
|
-
import type { AxervePayment } from './axerve_payments';
|
12
|
-
import type { BraintreePayment } from './braintree_payments';
|
13
|
-
import type { CheckoutComPayment } from './checkout_com_payments';
|
14
|
-
import type { ExternalPayment } from './external_payments';
|
15
|
-
import type { KlarnaPayment } from './klarna_payments';
|
16
|
-
import type { PaypalPayment } from './paypal_payments';
|
17
|
-
import type { SatispayPayment } from './satispay_payments';
|
18
|
-
import type { StripePayment } from './stripe_payments';
|
19
|
-
import type { WireTransfer } from './wire_transfers';
|
11
|
+
import type { AdyenPayment, AdyenPaymentType } from './adyen_payments';
|
12
|
+
import type { AxervePayment, AxervePaymentType } from './axerve_payments';
|
13
|
+
import type { BraintreePayment, BraintreePaymentType } from './braintree_payments';
|
14
|
+
import type { CheckoutComPayment, CheckoutComPaymentType } from './checkout_com_payments';
|
15
|
+
import type { ExternalPayment, ExternalPaymentType } from './external_payments';
|
16
|
+
import type { KlarnaPayment, KlarnaPaymentType } from './klarna_payments';
|
17
|
+
import type { PaypalPayment, PaypalPaymentType } from './paypal_payments';
|
18
|
+
import type { SatispayPayment, SatispayPaymentType } from './satispay_payments';
|
19
|
+
import type { StripePayment, StripePaymentType } from './stripe_payments';
|
20
|
+
import type { WireTransfer, WireTransferType } from './wire_transfers';
|
20
21
|
import type { LineItem } from './line_items';
|
21
22
|
import type { Shipment } from './shipments';
|
22
23
|
import type { Authorization } from './authorizations';
|
@@ -30,250 +31,257 @@ import type { OrderCopy } from './order_copies';
|
|
30
31
|
import type { RecurringOrderCopy } from './recurring_order_copies';
|
31
32
|
import type { Attachment } from './attachments';
|
32
33
|
import type { Event } from './events';
|
34
|
+
import type { Tag, TagType } from './tags';
|
35
|
+
type OrderType = 'orders';
|
33
36
|
type OrderRel = ResourceRel & {
|
34
|
-
type:
|
37
|
+
type: OrderType;
|
35
38
|
};
|
36
39
|
type MarketRel = ResourceRel & {
|
37
|
-
type:
|
40
|
+
type: MarketType;
|
38
41
|
};
|
39
42
|
type CustomerRel = ResourceRel & {
|
40
|
-
type:
|
43
|
+
type: CustomerType;
|
41
44
|
};
|
42
45
|
type AddressRel = ResourceRel & {
|
43
|
-
type:
|
46
|
+
type: AddressType;
|
44
47
|
};
|
45
48
|
type PaymentMethodRel = ResourceRel & {
|
46
|
-
type:
|
49
|
+
type: PaymentMethodType;
|
47
50
|
};
|
48
51
|
type AdyenPaymentRel = ResourceRel & {
|
49
|
-
type:
|
52
|
+
type: AdyenPaymentType;
|
50
53
|
};
|
51
54
|
type AxervePaymentRel = ResourceRel & {
|
52
|
-
type:
|
55
|
+
type: AxervePaymentType;
|
53
56
|
};
|
54
57
|
type BraintreePaymentRel = ResourceRel & {
|
55
|
-
type:
|
58
|
+
type: BraintreePaymentType;
|
56
59
|
};
|
57
60
|
type CheckoutComPaymentRel = ResourceRel & {
|
58
|
-
type:
|
61
|
+
type: CheckoutComPaymentType;
|
59
62
|
};
|
60
63
|
type ExternalPaymentRel = ResourceRel & {
|
61
|
-
type:
|
64
|
+
type: ExternalPaymentType;
|
62
65
|
};
|
63
66
|
type KlarnaPaymentRel = ResourceRel & {
|
64
|
-
type:
|
67
|
+
type: KlarnaPaymentType;
|
65
68
|
};
|
66
69
|
type PaypalPaymentRel = ResourceRel & {
|
67
|
-
type:
|
70
|
+
type: PaypalPaymentType;
|
68
71
|
};
|
69
72
|
type SatispayPaymentRel = ResourceRel & {
|
70
|
-
type:
|
73
|
+
type: SatispayPaymentType;
|
71
74
|
};
|
72
75
|
type StripePaymentRel = ResourceRel & {
|
73
|
-
type:
|
76
|
+
type: StripePaymentType;
|
74
77
|
};
|
75
78
|
type WireTransferRel = ResourceRel & {
|
76
|
-
type:
|
79
|
+
type: WireTransferType;
|
80
|
+
};
|
81
|
+
type TagRel = ResourceRel & {
|
82
|
+
type: TagType;
|
77
83
|
};
|
78
84
|
interface Order extends Resource {
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
85
|
+
readonly type: OrderType;
|
86
|
+
number?: number | null;
|
87
|
+
autorefresh?: boolean | null;
|
88
|
+
status: 'draft' | 'pending' | 'placed' | 'approved' | 'cancelled';
|
89
|
+
payment_status: 'unpaid' | 'authorized' | 'partially_authorized' | 'paid' | 'partially_paid' | 'voided' | 'partially_voided' | 'refunded' | 'partially_refunded' | 'free';
|
90
|
+
fulfillment_status: 'unfulfilled' | 'in_progress' | 'fulfilled' | 'not_required';
|
91
|
+
guest?: boolean | null;
|
92
|
+
editable?: boolean | null;
|
93
|
+
customer_email?: string | null;
|
94
|
+
language_code?: string | null;
|
95
|
+
currency_code?: string | null;
|
96
|
+
tax_included?: boolean | null;
|
97
|
+
tax_rate?: number | null;
|
98
|
+
freight_taxable?: boolean | null;
|
99
|
+
requires_billing_info?: boolean | null;
|
100
|
+
country_code?: string | null;
|
101
|
+
shipping_country_code_lock?: string | null;
|
102
|
+
coupon_code?: string | null;
|
103
|
+
gift_card_code?: string | null;
|
104
|
+
gift_card_or_coupon_code?: string | null;
|
105
|
+
subtotal_amount_cents?: number | null;
|
106
|
+
subtotal_amount_float?: number | null;
|
107
|
+
formatted_subtotal_amount?: string | null;
|
108
|
+
shipping_amount_cents?: number | null;
|
109
|
+
shipping_amount_float?: number | null;
|
110
|
+
formatted_shipping_amount?: string | null;
|
111
|
+
payment_method_amount_cents?: number | null;
|
112
|
+
payment_method_amount_float?: number | null;
|
113
|
+
formatted_payment_method_amount?: string | null;
|
114
|
+
discount_amount_cents?: number | null;
|
115
|
+
discount_amount_float?: number | null;
|
116
|
+
formatted_discount_amount?: string | null;
|
117
|
+
adjustment_amount_cents?: number | null;
|
118
|
+
adjustment_amount_float?: number | null;
|
119
|
+
formatted_adjustment_amount?: string | null;
|
120
|
+
gift_card_amount_cents?: number | null;
|
121
|
+
gift_card_amount_float?: number | null;
|
122
|
+
formatted_gift_card_amount?: string | null;
|
123
|
+
total_tax_amount_cents?: number | null;
|
124
|
+
total_tax_amount_float?: number | null;
|
125
|
+
formatted_total_tax_amount?: string | null;
|
126
|
+
subtotal_tax_amount_cents?: number | null;
|
127
|
+
subtotal_tax_amount_float?: number | null;
|
128
|
+
formatted_subtotal_tax_amount?: string | null;
|
129
|
+
shipping_tax_amount_cents?: number | null;
|
130
|
+
shipping_tax_amount_float?: number | null;
|
131
|
+
formatted_shipping_tax_amount?: string | null;
|
132
|
+
payment_method_tax_amount_cents?: number | null;
|
133
|
+
payment_method_tax_amount_float?: number | null;
|
134
|
+
formatted_payment_method_tax_amount?: string | null;
|
135
|
+
adjustment_tax_amount_cents?: number | null;
|
136
|
+
adjustment_tax_amount_float?: number | null;
|
137
|
+
formatted_adjustment_tax_amount?: string | null;
|
138
|
+
total_amount_cents?: number | null;
|
139
|
+
total_amount_float?: number | null;
|
140
|
+
formatted_total_amount?: string | null;
|
141
|
+
total_taxable_amount_cents?: number | null;
|
142
|
+
total_taxable_amount_float?: number | null;
|
143
|
+
formatted_total_taxable_amount?: string | null;
|
144
|
+
subtotal_taxable_amount_cents?: number | null;
|
145
|
+
subtotal_taxable_amount_float?: number | null;
|
146
|
+
formatted_subtotal_taxable_amount?: string | null;
|
147
|
+
shipping_taxable_amount_cents?: number | null;
|
148
|
+
shipping_taxable_amount_float?: number | null;
|
149
|
+
formatted_shipping_taxable_amount?: string | null;
|
150
|
+
payment_method_taxable_amount_cents?: number | null;
|
151
|
+
payment_method_taxable_amount_float?: number | null;
|
152
|
+
formatted_payment_method_taxable_amount?: string | null;
|
153
|
+
adjustment_taxable_amount_cents?: number | null;
|
154
|
+
adjustment_taxable_amount_float?: number | null;
|
155
|
+
formatted_adjustment_taxable_amount?: string | null;
|
156
|
+
total_amount_with_taxes_cents?: number | null;
|
157
|
+
total_amount_with_taxes_float?: number | null;
|
158
|
+
formatted_total_amount_with_taxes?: string | null;
|
159
|
+
fees_amount_cents?: number | null;
|
160
|
+
fees_amount_float?: number | null;
|
161
|
+
formatted_fees_amount?: string | null;
|
162
|
+
duty_amount_cents?: number | null;
|
163
|
+
duty_amount_float?: number | null;
|
164
|
+
formatted_duty_amount?: string | null;
|
165
|
+
skus_count?: number | null;
|
166
|
+
line_item_options_count?: number | null;
|
167
|
+
shipments_count?: number | null;
|
168
|
+
tax_calculations_count?: number | null;
|
169
|
+
payment_source_details?: Record<string, any> | null;
|
170
|
+
token?: string | null;
|
171
|
+
cart_url?: string | null;
|
172
|
+
return_url?: string | null;
|
173
|
+
terms_url?: string | null;
|
174
|
+
privacy_url?: string | null;
|
175
|
+
checkout_url?: string | null;
|
176
|
+
placed_at?: string | null;
|
177
|
+
approved_at?: string | null;
|
178
|
+
cancelled_at?: string | null;
|
179
|
+
payment_updated_at?: string | null;
|
180
|
+
fulfillment_updated_at?: string | null;
|
181
|
+
refreshed_at?: string | null;
|
182
|
+
archived_at?: string | null;
|
183
|
+
expires_at?: string | null;
|
184
|
+
subscription_created_at?: string | null;
|
185
|
+
market?: Market | null;
|
186
|
+
customer?: Customer | null;
|
187
|
+
shipping_address?: Address | null;
|
188
|
+
billing_address?: Address | null;
|
189
|
+
available_payment_methods?: PaymentMethod[] | null;
|
190
|
+
available_customer_payment_sources?: CustomerPaymentSource[] | null;
|
191
|
+
available_free_skus?: Sku[] | null;
|
192
|
+
available_free_bundles?: Bundle[] | null;
|
193
|
+
payment_method?: PaymentMethod | null;
|
194
|
+
payment_source?: AdyenPayment | AxervePayment | BraintreePayment | CheckoutComPayment | ExternalPayment | KlarnaPayment | PaypalPayment | SatispayPayment | StripePayment | WireTransfer | null;
|
195
|
+
line_items?: LineItem[] | null;
|
196
|
+
shipments?: Shipment[] | null;
|
197
|
+
transactions?: Array<Authorization | Void | Capture | Refund> | null;
|
198
|
+
authorizations?: Authorization[] | null;
|
199
|
+
captures?: Capture[] | null;
|
200
|
+
voids?: Void[] | null;
|
201
|
+
refunds?: Refund[] | null;
|
202
|
+
returns?: Return[] | null;
|
203
|
+
order_subscriptions?: OrderSubscription[] | null;
|
204
|
+
order_factories?: OrderFactory[] | null;
|
205
|
+
order_copies?: OrderCopy[] | null;
|
206
|
+
recurring_order_copies?: RecurringOrderCopy[] | null;
|
207
|
+
attachments?: Attachment[] | null;
|
208
|
+
events?: Event[] | null;
|
209
|
+
tags?: Tag[] | null;
|
202
210
|
}
|
203
211
|
interface OrderCreate extends ResourceCreate {
|
204
|
-
autorefresh?: boolean;
|
205
|
-
guest?: boolean;
|
206
|
-
customer_email?: string;
|
207
|
-
customer_password?: string;
|
208
|
-
language_code?: string;
|
209
|
-
shipping_country_code_lock?: string;
|
210
|
-
coupon_code?: string;
|
211
|
-
gift_card_code?: string;
|
212
|
-
gift_card_or_coupon_code?: string;
|
213
|
-
cart_url?: string;
|
214
|
-
return_url?: string;
|
215
|
-
terms_url?: string;
|
216
|
-
privacy_url?: string;
|
217
|
-
market?: MarketRel;
|
218
|
-
customer?: CustomerRel;
|
219
|
-
shipping_address?: AddressRel;
|
220
|
-
billing_address?: AddressRel;
|
221
|
-
payment_method?: PaymentMethodRel;
|
222
|
-
payment_source?: AdyenPaymentRel | AxervePaymentRel | BraintreePaymentRel | CheckoutComPaymentRel | ExternalPaymentRel | KlarnaPaymentRel | PaypalPaymentRel | SatispayPaymentRel | StripePaymentRel | WireTransferRel;
|
212
|
+
autorefresh?: boolean | null;
|
213
|
+
guest?: boolean | null;
|
214
|
+
customer_email?: string | null;
|
215
|
+
customer_password?: string | null;
|
216
|
+
language_code?: string | null;
|
217
|
+
shipping_country_code_lock?: string | null;
|
218
|
+
coupon_code?: string | null;
|
219
|
+
gift_card_code?: string | null;
|
220
|
+
gift_card_or_coupon_code?: string | null;
|
221
|
+
cart_url?: string | null;
|
222
|
+
return_url?: string | null;
|
223
|
+
terms_url?: string | null;
|
224
|
+
privacy_url?: string | null;
|
225
|
+
market?: MarketRel | null;
|
226
|
+
customer?: CustomerRel | null;
|
227
|
+
shipping_address?: AddressRel | null;
|
228
|
+
billing_address?: AddressRel | null;
|
229
|
+
payment_method?: PaymentMethodRel | null;
|
230
|
+
payment_source?: AdyenPaymentRel | AxervePaymentRel | BraintreePaymentRel | CheckoutComPaymentRel | ExternalPaymentRel | KlarnaPaymentRel | PaypalPaymentRel | SatispayPaymentRel | StripePaymentRel | WireTransferRel | null;
|
231
|
+
tags?: TagRel[] | null;
|
223
232
|
}
|
224
233
|
interface OrderUpdate extends ResourceUpdate {
|
225
|
-
autorefresh?: boolean;
|
226
|
-
guest?: boolean;
|
227
|
-
customer_email?: string;
|
228
|
-
customer_password?: string;
|
229
|
-
language_code?: string;
|
230
|
-
shipping_country_code_lock?: string;
|
231
|
-
coupon_code?: string;
|
232
|
-
gift_card_code?: string;
|
233
|
-
gift_card_or_coupon_code?: string;
|
234
|
-
cart_url?: string;
|
235
|
-
return_url?: string;
|
236
|
-
terms_url?: string;
|
237
|
-
privacy_url?: string;
|
238
|
-
_archive?: boolean;
|
239
|
-
_unarchive?: boolean;
|
240
|
-
_place?: boolean;
|
241
|
-
_cancel?: boolean;
|
242
|
-
_approve?: boolean;
|
243
|
-
_approve_and_capture?: boolean;
|
244
|
-
_authorize?: boolean;
|
245
|
-
_authorization_amount_cents?: number;
|
246
|
-
_capture?: boolean;
|
247
|
-
_refund?: boolean;
|
248
|
-
_update_taxes?: boolean;
|
249
|
-
_nullify_payment_source?: boolean;
|
250
|
-
_billing_address_clone_id?: string;
|
251
|
-
_shipping_address_clone_id?: string;
|
252
|
-
_customer_payment_source_id?: string;
|
253
|
-
_shipping_address_same_as_billing?: boolean;
|
254
|
-
_billing_address_same_as_shipping?: boolean;
|
255
|
-
_commit_invoice?: boolean;
|
256
|
-
_refund_invoice?: boolean;
|
257
|
-
_save_payment_source_to_customer_wallet?: boolean;
|
258
|
-
_save_shipping_address_to_customer_address_book?: boolean;
|
259
|
-
_save_billing_address_to_customer_address_book?: boolean;
|
260
|
-
_refresh?: boolean;
|
261
|
-
_validate?: boolean;
|
262
|
-
_create_subscriptions?: boolean;
|
263
|
-
market?: MarketRel;
|
264
|
-
customer?: CustomerRel;
|
265
|
-
shipping_address?: AddressRel;
|
266
|
-
billing_address?: AddressRel;
|
267
|
-
payment_method?: PaymentMethodRel;
|
268
|
-
payment_source?: AdyenPaymentRel | AxervePaymentRel | BraintreePaymentRel | CheckoutComPaymentRel | ExternalPaymentRel | KlarnaPaymentRel | PaypalPaymentRel | SatispayPaymentRel | StripePaymentRel | WireTransferRel;
|
234
|
+
autorefresh?: boolean | null;
|
235
|
+
guest?: boolean | null;
|
236
|
+
customer_email?: string | null;
|
237
|
+
customer_password?: string | null;
|
238
|
+
language_code?: string | null;
|
239
|
+
shipping_country_code_lock?: string | null;
|
240
|
+
coupon_code?: string | null;
|
241
|
+
gift_card_code?: string | null;
|
242
|
+
gift_card_or_coupon_code?: string | null;
|
243
|
+
cart_url?: string | null;
|
244
|
+
return_url?: string | null;
|
245
|
+
terms_url?: string | null;
|
246
|
+
privacy_url?: string | null;
|
247
|
+
_archive?: boolean | null;
|
248
|
+
_unarchive?: boolean | null;
|
249
|
+
_place?: boolean | null;
|
250
|
+
_cancel?: boolean | null;
|
251
|
+
_approve?: boolean | null;
|
252
|
+
_approve_and_capture?: boolean | null;
|
253
|
+
_authorize?: boolean | null;
|
254
|
+
_authorization_amount_cents?: number | null;
|
255
|
+
_capture?: boolean | null;
|
256
|
+
_refund?: boolean | null;
|
257
|
+
_update_taxes?: boolean | null;
|
258
|
+
_nullify_payment_source?: boolean | null;
|
259
|
+
_billing_address_clone_id?: string | null;
|
260
|
+
_shipping_address_clone_id?: string | null;
|
261
|
+
_customer_payment_source_id?: string | null;
|
262
|
+
_shipping_address_same_as_billing?: boolean | null;
|
263
|
+
_billing_address_same_as_shipping?: boolean | null;
|
264
|
+
_commit_invoice?: boolean | null;
|
265
|
+
_refund_invoice?: boolean | null;
|
266
|
+
_save_payment_source_to_customer_wallet?: boolean | null;
|
267
|
+
_save_shipping_address_to_customer_address_book?: boolean | null;
|
268
|
+
_save_billing_address_to_customer_address_book?: boolean | null;
|
269
|
+
_refresh?: boolean | null;
|
270
|
+
_validate?: boolean | null;
|
271
|
+
_create_subscriptions?: boolean | null;
|
272
|
+
market?: MarketRel | null;
|
273
|
+
customer?: CustomerRel | null;
|
274
|
+
shipping_address?: AddressRel | null;
|
275
|
+
billing_address?: AddressRel | null;
|
276
|
+
payment_method?: PaymentMethodRel | null;
|
277
|
+
payment_source?: AdyenPaymentRel | AxervePaymentRel | BraintreePaymentRel | CheckoutComPaymentRel | ExternalPaymentRel | KlarnaPaymentRel | PaypalPaymentRel | SatispayPaymentRel | StripePaymentRel | WireTransferRel | null;
|
278
|
+
tags?: TagRel[] | null;
|
269
279
|
}
|
270
|
-
declare class Orders extends ApiResource {
|
271
|
-
static readonly TYPE:
|
272
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Order>>;
|
280
|
+
declare class Orders extends ApiResource<Order> {
|
281
|
+
static readonly TYPE: OrderType;
|
273
282
|
create(resource: OrderCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
274
|
-
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
275
283
|
update(resource: OrderUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
276
|
-
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
284
|
+
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
277
285
|
market(orderId: string | Order, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Market>;
|
278
286
|
customer(orderId: string | Order, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Customer>;
|
279
287
|
shipping_address(orderId: string | Order, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Address>;
|
@@ -296,9 +304,10 @@ declare class Orders extends ApiResource {
|
|
296
304
|
recurring_order_copies(orderId: string | Order, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<RecurringOrderCopy>>;
|
297
305
|
attachments(orderId: string | Order, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
298
306
|
events(orderId: string | Order, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
307
|
+
tags(orderId: string | Order, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
|
299
308
|
isOrder(resource: any): resource is Order;
|
300
309
|
relationship(id: string | ResourceId | null): OrderRel;
|
301
|
-
type():
|
310
|
+
type(): OrderType;
|
302
311
|
}
|
303
312
|
export default Orders;
|
304
|
-
export { Order, OrderCreate, OrderUpdate };
|
313
|
+
export type { Order, OrderCreate, OrderUpdate, OrderType };
|
@@ -2,21 +2,14 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
const resource_1 = require("../resource");
|
4
4
|
class Orders extends resource_1.ApiResource {
|
5
|
-
// static readonly PATH = 'orders'
|
6
|
-
async list(params, options) {
|
7
|
-
return this.resources.list({ type: Orders.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: Orders.TYPE, id }, params, options);
|
6
|
+
return this.resources.create({ ...resource, type: Orders.TYPE }, params, options);
|
14
7
|
}
|
15
8
|
async update(resource, params, options) {
|
16
|
-
return this.resources.update(
|
9
|
+
return this.resources.update({ ...resource, type: Orders.TYPE }, params, options);
|
17
10
|
}
|
18
11
|
async delete(id, options) {
|
19
|
-
await this.resources.delete({ type: Orders.TYPE
|
12
|
+
await this.resources.delete((typeof id === 'string') ? { id, type: Orders.TYPE } : id, options);
|
20
13
|
}
|
21
14
|
async market(orderId, params, options) {
|
22
15
|
const _orderId = orderId.id || orderId;
|
@@ -106,7 +99,10 @@ class Orders extends resource_1.ApiResource {
|
|
106
99
|
const _orderId = orderId.id || orderId;
|
107
100
|
return this.resources.fetch({ type: 'events' }, `orders/${_orderId}/events`, params, options);
|
108
101
|
}
|
109
|
-
|
102
|
+
async tags(orderId, params, options) {
|
103
|
+
const _orderId = orderId.id || orderId;
|
104
|
+
return this.resources.fetch({ type: 'tags' }, `orders/${_orderId}/tags`, params, options);
|
105
|
+
}
|
110
106
|
isOrder(resource) {
|
111
107
|
return resource.type && (resource.type === Orders.TYPE);
|
112
108
|
}
|
@@ -1,32 +1,33 @@
|
|
1
|
-
import {
|
2
|
-
import type {
|
1
|
+
import { ApiSingleton } from '../resource';
|
2
|
+
import type { Resource, ResourceId, ResourceRel } from '../resource';
|
3
|
+
type OrganizationType = 'organization';
|
3
4
|
type OrganizationRel = ResourceRel & {
|
4
|
-
type:
|
5
|
+
type: OrganizationType;
|
5
6
|
};
|
6
7
|
interface Organization extends Resource {
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
8
|
+
readonly type: OrganizationType;
|
9
|
+
name?: string | null;
|
10
|
+
slug?: string | null;
|
11
|
+
domain?: string | null;
|
12
|
+
support_phone?: string | null;
|
13
|
+
support_email?: string | null;
|
14
|
+
logo_url?: string | null;
|
15
|
+
favicon_url?: string | null;
|
16
|
+
primary_color?: string | null;
|
17
|
+
contrast_color?: string | null;
|
18
|
+
gtm_id?: string | null;
|
19
|
+
gtm_id_test?: string | null;
|
20
|
+
discount_disabled?: boolean | null;
|
21
|
+
account_disabled?: boolean | null;
|
22
|
+
acceptance_disabled?: boolean | null;
|
23
|
+
max_concurrent_promotions?: number | null;
|
24
|
+
max_concurrent_imports?: number | null;
|
23
25
|
}
|
24
|
-
declare class Organizations extends
|
25
|
-
static readonly TYPE:
|
26
|
-
retrieve(params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Organization>;
|
26
|
+
declare class Organizations extends ApiSingleton<Organization> {
|
27
|
+
static readonly TYPE: OrganizationType;
|
27
28
|
isOrganization(resource: any): resource is Organization;
|
28
29
|
relationship(id: string | ResourceId | null): OrganizationRel;
|
29
|
-
type():
|
30
|
+
type(): OrganizationType;
|
30
31
|
}
|
31
32
|
export default Organizations;
|
32
|
-
export { Organization };
|
33
|
+
export type { Organization, OrganizationType };
|
@@ -1,12 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
const resource_1 = require("../resource");
|
4
|
-
class Organizations extends resource_1.
|
5
|
-
// static readonly PATH = 'organization'
|
6
|
-
async retrieve(params, options) {
|
7
|
-
return this.resources.singleton({ type: Organizations.TYPE }, params, options);
|
8
|
-
}
|
9
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
4
|
+
class Organizations extends resource_1.ApiSingleton {
|
10
5
|
isOrganization(resource) {
|
11
6
|
return resource.type && (resource.type === Organizations.TYPE);
|
12
7
|
}
|