@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,156 +1,157 @@
|
|
1
|
-
import { ApiResource
|
2
|
-
import type {
|
3
|
-
import type {
|
4
|
-
import type {
|
5
|
-
import type {
|
6
|
-
import type {
|
7
|
-
import type {
|
8
|
-
import type {
|
9
|
-
import type {
|
10
|
-
import type {
|
11
|
-
import type {
|
12
|
-
import type {
|
13
|
-
import type {
|
14
|
-
import type {
|
15
|
-
import type {
|
16
|
-
import type {
|
17
|
-
import type {
|
18
|
-
import type {
|
19
|
-
import type {
|
20
|
-
import type {
|
21
|
-
import type {
|
22
|
-
import type {
|
23
|
-
import type {
|
24
|
-
import type {
|
25
|
-
import type {
|
26
|
-
import type {
|
27
|
-
import type {
|
28
|
-
import type {
|
29
|
-
import type {
|
30
|
-
import type {
|
31
|
-
import type {
|
32
|
-
import type {
|
1
|
+
import { ApiResource } from '../resource';
|
2
|
+
import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel } from '../resource';
|
3
|
+
import type { QueryParamsRetrieve } from '../query';
|
4
|
+
import type { Bundle, BundleType } from './bundles';
|
5
|
+
import type { CarrierAccount, CarrierAccountType } from './carrier_accounts';
|
6
|
+
import type { CustomerGroup, CustomerGroupType } from './customer_groups';
|
7
|
+
import type { Customer, CustomerType } from './customers';
|
8
|
+
import type { DeliveryLeadTime, DeliveryLeadTimeType } from './delivery_lead_times';
|
9
|
+
import type { Geocoder, GeocoderType } from './geocoders';
|
10
|
+
import type { GiftCardRecipient, GiftCardRecipientType } from './gift_card_recipients';
|
11
|
+
import type { GiftCard, GiftCardType } from './gift_cards';
|
12
|
+
import type { InventoryModel, InventoryModelType } from './inventory_models';
|
13
|
+
import type { Market, MarketType } from './markets';
|
14
|
+
import type { Merchant, MerchantType } from './merchants';
|
15
|
+
import type { BillingInfoValidationRule, BillingInfoValidationRuleType } from './billing_info_validation_rules';
|
16
|
+
import type { Order, OrderType } from './orders';
|
17
|
+
import type { Package, PackageType } from './packages';
|
18
|
+
import type { Parcel, ParcelType } from './parcels';
|
19
|
+
import type { PaymentMethod, PaymentMethodType } from './payment_methods';
|
20
|
+
import type { PriceList, PriceListType } from './price_lists';
|
21
|
+
import type { Price, PriceType } from './prices';
|
22
|
+
import type { Promotion, PromotionType } from './promotions';
|
23
|
+
import type { Return, ReturnType } from './returns';
|
24
|
+
import type { Shipment, ShipmentType } from './shipments';
|
25
|
+
import type { ShippingCategory, ShippingCategoryType } from './shipping_categories';
|
26
|
+
import type { ShippingMethod, ShippingMethodType } from './shipping_methods';
|
27
|
+
import type { ShippingZone, ShippingZoneType } from './shipping_zones';
|
28
|
+
import type { SkuOption, SkuOptionType } from './sku_options';
|
29
|
+
import type { Sku, SkuType } from './skus';
|
30
|
+
import type { StockItem, StockItemType } from './stock_items';
|
31
|
+
import type { StockLocation, StockLocationType } from './stock_locations';
|
32
|
+
import type { TaxCalculator, TaxCalculatorType } from './tax_calculators';
|
33
|
+
import type { TaxCategory, TaxCategoryType } from './tax_categories';
|
34
|
+
type AttachmentType = 'attachments';
|
33
35
|
type AttachmentRel = ResourceRel & {
|
34
|
-
type:
|
36
|
+
type: AttachmentType;
|
35
37
|
};
|
36
38
|
type BundleRel = ResourceRel & {
|
37
|
-
type:
|
39
|
+
type: BundleType;
|
38
40
|
};
|
39
41
|
type CarrierAccountRel = ResourceRel & {
|
40
|
-
type:
|
42
|
+
type: CarrierAccountType;
|
41
43
|
};
|
42
44
|
type CustomerGroupRel = ResourceRel & {
|
43
|
-
type:
|
45
|
+
type: CustomerGroupType;
|
44
46
|
};
|
45
47
|
type CustomerRel = ResourceRel & {
|
46
|
-
type:
|
48
|
+
type: CustomerType;
|
47
49
|
};
|
48
50
|
type DeliveryLeadTimeRel = ResourceRel & {
|
49
|
-
type:
|
51
|
+
type: DeliveryLeadTimeType;
|
50
52
|
};
|
51
53
|
type GeocoderRel = ResourceRel & {
|
52
|
-
type:
|
54
|
+
type: GeocoderType;
|
53
55
|
};
|
54
56
|
type GiftCardRecipientRel = ResourceRel & {
|
55
|
-
type:
|
57
|
+
type: GiftCardRecipientType;
|
56
58
|
};
|
57
59
|
type GiftCardRel = ResourceRel & {
|
58
|
-
type:
|
60
|
+
type: GiftCardType;
|
59
61
|
};
|
60
62
|
type InventoryModelRel = ResourceRel & {
|
61
|
-
type:
|
63
|
+
type: InventoryModelType;
|
62
64
|
};
|
63
65
|
type MarketRel = ResourceRel & {
|
64
|
-
type:
|
66
|
+
type: MarketType;
|
65
67
|
};
|
66
68
|
type MerchantRel = ResourceRel & {
|
67
|
-
type:
|
69
|
+
type: MerchantType;
|
68
70
|
};
|
69
71
|
type BillingInfoValidationRuleRel = ResourceRel & {
|
70
|
-
type:
|
72
|
+
type: BillingInfoValidationRuleType;
|
71
73
|
};
|
72
74
|
type OrderRel = ResourceRel & {
|
73
|
-
type:
|
75
|
+
type: OrderType;
|
74
76
|
};
|
75
77
|
type PackageRel = ResourceRel & {
|
76
|
-
type:
|
78
|
+
type: PackageType;
|
77
79
|
};
|
78
80
|
type ParcelRel = ResourceRel & {
|
79
|
-
type:
|
81
|
+
type: ParcelType;
|
80
82
|
};
|
81
83
|
type PaymentMethodRel = ResourceRel & {
|
82
|
-
type:
|
84
|
+
type: PaymentMethodType;
|
83
85
|
};
|
84
86
|
type PriceListRel = ResourceRel & {
|
85
|
-
type:
|
87
|
+
type: PriceListType;
|
86
88
|
};
|
87
89
|
type PriceRel = ResourceRel & {
|
88
|
-
type:
|
90
|
+
type: PriceType;
|
89
91
|
};
|
90
92
|
type PromotionRel = ResourceRel & {
|
91
|
-
type:
|
93
|
+
type: PromotionType;
|
92
94
|
};
|
93
95
|
type ReturnRel = ResourceRel & {
|
94
|
-
type:
|
96
|
+
type: ReturnType;
|
95
97
|
};
|
96
98
|
type ShipmentRel = ResourceRel & {
|
97
|
-
type:
|
99
|
+
type: ShipmentType;
|
98
100
|
};
|
99
101
|
type ShippingCategoryRel = ResourceRel & {
|
100
|
-
type:
|
102
|
+
type: ShippingCategoryType;
|
101
103
|
};
|
102
104
|
type ShippingMethodRel = ResourceRel & {
|
103
|
-
type:
|
105
|
+
type: ShippingMethodType;
|
104
106
|
};
|
105
107
|
type ShippingZoneRel = ResourceRel & {
|
106
|
-
type:
|
108
|
+
type: ShippingZoneType;
|
107
109
|
};
|
108
110
|
type SkuOptionRel = ResourceRel & {
|
109
|
-
type:
|
111
|
+
type: SkuOptionType;
|
110
112
|
};
|
111
113
|
type SkuRel = ResourceRel & {
|
112
|
-
type:
|
114
|
+
type: SkuType;
|
113
115
|
};
|
114
116
|
type StockItemRel = ResourceRel & {
|
115
|
-
type:
|
117
|
+
type: StockItemType;
|
116
118
|
};
|
117
119
|
type StockLocationRel = ResourceRel & {
|
118
|
-
type:
|
120
|
+
type: StockLocationType;
|
119
121
|
};
|
120
122
|
type TaxCalculatorRel = ResourceRel & {
|
121
|
-
type:
|
123
|
+
type: TaxCalculatorType;
|
122
124
|
};
|
123
125
|
type TaxCategoryRel = ResourceRel & {
|
124
|
-
type:
|
126
|
+
type: TaxCategoryType;
|
125
127
|
};
|
126
128
|
interface Attachment extends Resource {
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
129
|
+
readonly type: AttachmentType;
|
130
|
+
name: string;
|
131
|
+
description?: string | null;
|
132
|
+
url?: string | null;
|
133
|
+
attachable?: Bundle | CarrierAccount | CustomerGroup | Customer | DeliveryLeadTime | Geocoder | GiftCardRecipient | GiftCard | InventoryModel | Market | Merchant | BillingInfoValidationRule | Order | Package | Parcel | PaymentMethod | PriceList | Price | Promotion | Return | Shipment | ShippingCategory | ShippingMethod | ShippingZone | SkuOption | Sku | StockItem | StockLocation | TaxCalculator | TaxCategory | null;
|
131
134
|
}
|
132
135
|
interface AttachmentCreate extends ResourceCreate {
|
133
136
|
name: string;
|
134
|
-
description?: string;
|
135
|
-
url?: string;
|
137
|
+
description?: string | null;
|
138
|
+
url?: string | null;
|
136
139
|
attachable: BundleRel | CarrierAccountRel | CustomerGroupRel | CustomerRel | DeliveryLeadTimeRel | GeocoderRel | GiftCardRecipientRel | GiftCardRel | InventoryModelRel | MarketRel | MerchantRel | BillingInfoValidationRuleRel | OrderRel | PackageRel | ParcelRel | PaymentMethodRel | PriceListRel | PriceRel | PromotionRel | ReturnRel | ShipmentRel | ShippingCategoryRel | ShippingMethodRel | ShippingZoneRel | SkuOptionRel | SkuRel | StockItemRel | StockLocationRel | TaxCalculatorRel | TaxCategoryRel;
|
137
140
|
}
|
138
141
|
interface AttachmentUpdate extends ResourceUpdate {
|
139
|
-
name?: string;
|
140
|
-
description?: string;
|
141
|
-
url?: string;
|
142
|
-
attachable?: BundleRel | CarrierAccountRel | CustomerGroupRel | CustomerRel | DeliveryLeadTimeRel | GeocoderRel | GiftCardRecipientRel | GiftCardRel | InventoryModelRel | MarketRel | MerchantRel | BillingInfoValidationRuleRel | OrderRel | PackageRel | ParcelRel | PaymentMethodRel | PriceListRel | PriceRel | PromotionRel | ReturnRel | ShipmentRel | ShippingCategoryRel | ShippingMethodRel | ShippingZoneRel | SkuOptionRel | SkuRel | StockItemRel | StockLocationRel | TaxCalculatorRel | TaxCategoryRel;
|
142
|
+
name?: string | null;
|
143
|
+
description?: string | null;
|
144
|
+
url?: string | null;
|
145
|
+
attachable?: BundleRel | CarrierAccountRel | CustomerGroupRel | CustomerRel | DeliveryLeadTimeRel | GeocoderRel | GiftCardRecipientRel | GiftCardRel | InventoryModelRel | MarketRel | MerchantRel | BillingInfoValidationRuleRel | OrderRel | PackageRel | ParcelRel | PaymentMethodRel | PriceListRel | PriceRel | PromotionRel | ReturnRel | ShipmentRel | ShippingCategoryRel | ShippingMethodRel | ShippingZoneRel | SkuOptionRel | SkuRel | StockItemRel | StockLocationRel | TaxCalculatorRel | TaxCategoryRel | null;
|
143
146
|
}
|
144
|
-
declare class Attachments extends ApiResource {
|
145
|
-
static readonly TYPE:
|
146
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
147
|
+
declare class Attachments extends ApiResource<Attachment> {
|
148
|
+
static readonly TYPE: AttachmentType;
|
147
149
|
create(resource: AttachmentCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Attachment>;
|
148
|
-
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Attachment>;
|
149
150
|
update(resource: AttachmentUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Attachment>;
|
150
|
-
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
151
|
+
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
151
152
|
isAttachment(resource: any): resource is Attachment;
|
152
153
|
relationship(id: string | ResourceId | null): AttachmentRel;
|
153
|
-
type():
|
154
|
+
type(): AttachmentType;
|
154
155
|
}
|
155
156
|
export default Attachments;
|
156
|
-
export { Attachment, AttachmentCreate, AttachmentUpdate };
|
157
|
+
export type { Attachment, AttachmentCreate, AttachmentUpdate, AttachmentType };
|
@@ -1,22 +1,14 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
2
|
class Attachments extends ApiResource {
|
3
|
-
// static readonly PATH = 'attachments'
|
4
|
-
async list(params, options) {
|
5
|
-
return this.resources.list({ type: Attachments.TYPE }, params, options);
|
6
|
-
}
|
7
3
|
async create(resource, params, options) {
|
8
|
-
return this.resources.create(
|
9
|
-
}
|
10
|
-
async retrieve(id, params, options) {
|
11
|
-
return this.resources.retrieve({ type: Attachments.TYPE, id }, params, options);
|
4
|
+
return this.resources.create({ ...resource, type: Attachments.TYPE }, params, options);
|
12
5
|
}
|
13
6
|
async update(resource, params, options) {
|
14
|
-
return this.resources.update(
|
7
|
+
return this.resources.update({ ...resource, type: Attachments.TYPE }, params, options);
|
15
8
|
}
|
16
9
|
async delete(id, options) {
|
17
|
-
await this.resources.delete({ type: Attachments.TYPE
|
10
|
+
await this.resources.delete((typeof id === 'string') ? { id, type: Attachments.TYPE } : id, options);
|
18
11
|
}
|
19
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
20
12
|
isAttachment(resource) {
|
21
13
|
return resource.type && (resource.type === Attachments.TYPE);
|
22
14
|
}
|
@@ -1,56 +1,57 @@
|
|
1
|
-
import { ApiResource
|
2
|
-
import type {
|
1
|
+
import { ApiResource } from '../resource';
|
2
|
+
import type { Resource, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse } from '../resource';
|
3
|
+
import type { QueryParamsRetrieve, QueryParamsList } from '../query';
|
3
4
|
import type { Order } from './orders';
|
4
5
|
import type { Attachment } from './attachments';
|
5
6
|
import type { Version } from './versions';
|
6
7
|
import type { Capture } from './captures';
|
7
8
|
import type { Void } from './voids';
|
8
9
|
import type { Event } from './events';
|
10
|
+
type AuthorizationType = 'authorizations';
|
9
11
|
type AuthorizationRel = ResourceRel & {
|
10
|
-
type:
|
12
|
+
type: AuthorizationType;
|
11
13
|
};
|
12
14
|
interface Authorization extends Resource {
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
15
|
+
readonly type: AuthorizationType;
|
16
|
+
number: string;
|
17
|
+
currency_code: string;
|
18
|
+
amount_cents: number;
|
19
|
+
amount_float: number;
|
20
|
+
formatted_amount: string;
|
21
|
+
succeeded: boolean;
|
22
|
+
message?: string | null;
|
23
|
+
error_code?: string | null;
|
24
|
+
error_detail?: string | null;
|
25
|
+
token?: string | null;
|
26
|
+
gateway_transaction_id?: string | null;
|
27
|
+
cvv_code?: string | null;
|
28
|
+
cvv_message?: string | null;
|
29
|
+
avs_code?: string | null;
|
30
|
+
avs_message?: string | null;
|
31
|
+
fraud_review?: string | null;
|
32
|
+
capture_amount_cents?: number | null;
|
33
|
+
capture_amount_float?: number | null;
|
34
|
+
formatted_capture_amount?: string | null;
|
35
|
+
capture_balance_cents?: number | null;
|
36
|
+
capture_balance_float?: number | null;
|
37
|
+
formatted_capture_balance?: string | null;
|
38
|
+
void_balance_cents?: number | null;
|
39
|
+
void_balance_float?: number | null;
|
40
|
+
formatted_void_balance?: string | null;
|
41
|
+
order?: Order | null;
|
42
|
+
attachments?: Attachment[] | null;
|
43
|
+
versions?: Version[] | null;
|
44
|
+
captures?: Capture[] | null;
|
45
|
+
voids?: Void[] | null;
|
46
|
+
events?: Event[] | null;
|
44
47
|
}
|
45
48
|
interface AuthorizationUpdate extends ResourceUpdate {
|
46
|
-
_capture?: boolean;
|
47
|
-
_capture_amount_cents?: number;
|
48
|
-
_void?: boolean;
|
49
|
+
_capture?: boolean | null;
|
50
|
+
_capture_amount_cents?: number | null;
|
51
|
+
_void?: boolean | null;
|
49
52
|
}
|
50
|
-
declare class Authorizations extends ApiResource {
|
51
|
-
static readonly TYPE:
|
52
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Authorization>>;
|
53
|
-
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Authorization>;
|
53
|
+
declare class Authorizations extends ApiResource<Authorization> {
|
54
|
+
static readonly TYPE: AuthorizationType;
|
54
55
|
update(resource: AuthorizationUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Authorization>;
|
55
56
|
order(authorizationId: string | Authorization, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
56
57
|
attachments(authorizationId: string | Authorization, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
@@ -58,9 +59,12 @@ declare class Authorizations extends ApiResource {
|
|
58
59
|
captures(authorizationId: string | Authorization, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Capture>>;
|
59
60
|
voids(authorizationId: string | Authorization, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Void>>;
|
60
61
|
events(authorizationId: string | Authorization, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
62
|
+
_capture(id: string | Authorization, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Authorization>;
|
63
|
+
_capture_amount_cents(id: string | Authorization, triggerValue: number, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Authorization>;
|
64
|
+
_void(id: string | Authorization, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Authorization>;
|
61
65
|
isAuthorization(resource: any): resource is Authorization;
|
62
66
|
relationship(id: string | ResourceId | null): AuthorizationRel;
|
63
|
-
type():
|
67
|
+
type(): AuthorizationType;
|
64
68
|
}
|
65
69
|
export default Authorizations;
|
66
|
-
export { Authorization, AuthorizationUpdate };
|
70
|
+
export type { Authorization, AuthorizationUpdate, AuthorizationType };
|
@@ -1,14 +1,7 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
2
|
class Authorizations extends ApiResource {
|
3
|
-
// static readonly PATH = 'authorizations'
|
4
|
-
async list(params, options) {
|
5
|
-
return this.resources.list({ type: Authorizations.TYPE }, params, options);
|
6
|
-
}
|
7
|
-
async retrieve(id, params, options) {
|
8
|
-
return this.resources.retrieve({ type: Authorizations.TYPE, id }, params, options);
|
9
|
-
}
|
10
3
|
async update(resource, params, options) {
|
11
|
-
return this.resources.update(
|
4
|
+
return this.resources.update({ ...resource, type: Authorizations.TYPE }, params, options);
|
12
5
|
}
|
13
6
|
async order(authorizationId, params, options) {
|
14
7
|
const _authorizationId = authorizationId.id || authorizationId;
|
@@ -34,7 +27,15 @@ class Authorizations extends ApiResource {
|
|
34
27
|
const _authorizationId = authorizationId.id || authorizationId;
|
35
28
|
return this.resources.fetch({ type: 'events' }, `authorizations/${_authorizationId}/events`, params, options);
|
36
29
|
}
|
37
|
-
|
30
|
+
async _capture(id, params, options) {
|
31
|
+
return this.resources.update({ id: (typeof id === 'string') ? id : id.id, type: Authorizations.TYPE, _capture: true }, params, options);
|
32
|
+
}
|
33
|
+
async _capture_amount_cents(id, triggerValue, params, options) {
|
34
|
+
return this.resources.update({ id: (typeof id === 'string') ? id : id.id, type: Authorizations.TYPE, _capture_amount_cents: triggerValue }, params, options);
|
35
|
+
}
|
36
|
+
async _void(id, params, options) {
|
37
|
+
return this.resources.update({ id: (typeof id === 'string') ? id : id.id, type: Authorizations.TYPE, _void: true }, params, options);
|
38
|
+
}
|
38
39
|
isAuthorization(resource) {
|
39
40
|
return resource.type && (resource.type === Authorizations.TYPE);
|
40
41
|
}
|
@@ -1,58 +1,59 @@
|
|
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 { TaxCategory } from './tax_categories';
|
7
|
+
import type { TaxCategory, TaxCategoryType } from './tax_categories';
|
8
|
+
type AvalaraAccountType = 'avalara_accounts';
|
7
9
|
type AvalaraAccountRel = ResourceRel & {
|
8
|
-
type:
|
10
|
+
type: AvalaraAccountType;
|
9
11
|
};
|
10
12
|
type TaxCategoryRel = ResourceRel & {
|
11
|
-
type:
|
13
|
+
type: TaxCategoryType;
|
12
14
|
};
|
13
15
|
interface AvalaraAccount extends Resource {
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
16
|
+
readonly type: AvalaraAccountType;
|
17
|
+
name: string;
|
18
|
+
username: string;
|
19
|
+
company_code: string;
|
20
|
+
commit_invoice?: string | null;
|
21
|
+
ddp?: string | null;
|
22
|
+
markets?: Market[] | null;
|
23
|
+
attachments?: Attachment[] | null;
|
24
|
+
versions?: Version[] | null;
|
25
|
+
tax_categories?: TaxCategory[] | null;
|
23
26
|
}
|
24
27
|
interface AvalaraAccountCreate extends ResourceCreate {
|
25
28
|
name: string;
|
26
29
|
username: string;
|
27
30
|
password: string;
|
28
31
|
company_code: string;
|
29
|
-
commit_invoice?: string;
|
30
|
-
ddp?: string;
|
31
|
-
tax_categories?: TaxCategoryRel[];
|
32
|
+
commit_invoice?: string | null;
|
33
|
+
ddp?: string | null;
|
34
|
+
tax_categories?: TaxCategoryRel[] | null;
|
32
35
|
}
|
33
36
|
interface AvalaraAccountUpdate extends ResourceUpdate {
|
34
|
-
name?: string;
|
35
|
-
username?: string;
|
36
|
-
password?: string;
|
37
|
-
company_code?: string;
|
38
|
-
commit_invoice?: string;
|
39
|
-
ddp?: string;
|
40
|
-
tax_categories?: TaxCategoryRel[];
|
37
|
+
name?: string | null;
|
38
|
+
username?: string | null;
|
39
|
+
password?: string | null;
|
40
|
+
company_code?: string | null;
|
41
|
+
commit_invoice?: string | null;
|
42
|
+
ddp?: string | null;
|
43
|
+
tax_categories?: TaxCategoryRel[] | null;
|
41
44
|
}
|
42
|
-
declare class AvalaraAccounts extends ApiResource {
|
43
|
-
static readonly TYPE:
|
44
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<AvalaraAccount>>;
|
45
|
+
declare class AvalaraAccounts extends ApiResource<AvalaraAccount> {
|
46
|
+
static readonly TYPE: AvalaraAccountType;
|
45
47
|
create(resource: AvalaraAccountCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<AvalaraAccount>;
|
46
|
-
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<AvalaraAccount>;
|
47
48
|
update(resource: AvalaraAccountUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<AvalaraAccount>;
|
48
|
-
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
49
|
+
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
49
50
|
markets(avalaraAccountId: string | AvalaraAccount, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Market>>;
|
50
51
|
attachments(avalaraAccountId: string | AvalaraAccount, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
51
52
|
versions(avalaraAccountId: string | AvalaraAccount, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
52
53
|
tax_categories(avalaraAccountId: string | AvalaraAccount, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<TaxCategory>>;
|
53
54
|
isAvalaraAccount(resource: any): resource is AvalaraAccount;
|
54
55
|
relationship(id: string | ResourceId | null): AvalaraAccountRel;
|
55
|
-
type():
|
56
|
+
type(): AvalaraAccountType;
|
56
57
|
}
|
57
58
|
export default AvalaraAccounts;
|
58
|
-
export { AvalaraAccount, AvalaraAccountCreate, AvalaraAccountUpdate };
|
59
|
+
export type { AvalaraAccount, AvalaraAccountCreate, AvalaraAccountUpdate, AvalaraAccountType };
|
@@ -1,20 +1,13 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
2
|
class AvalaraAccounts extends ApiResource {
|
3
|
-
// static readonly PATH = 'avalara_accounts'
|
4
|
-
async list(params, options) {
|
5
|
-
return this.resources.list({ type: AvalaraAccounts.TYPE }, params, options);
|
6
|
-
}
|
7
3
|
async create(resource, params, options) {
|
8
|
-
return this.resources.create(
|
9
|
-
}
|
10
|
-
async retrieve(id, params, options) {
|
11
|
-
return this.resources.retrieve({ type: AvalaraAccounts.TYPE, id }, params, options);
|
4
|
+
return this.resources.create({ ...resource, type: AvalaraAccounts.TYPE }, params, options);
|
12
5
|
}
|
13
6
|
async update(resource, params, options) {
|
14
|
-
return this.resources.update(
|
7
|
+
return this.resources.update({ ...resource, type: AvalaraAccounts.TYPE }, params, options);
|
15
8
|
}
|
16
9
|
async delete(id, options) {
|
17
|
-
await this.resources.delete({ type: AvalaraAccounts.TYPE
|
10
|
+
await this.resources.delete((typeof id === 'string') ? { id, type: AvalaraAccounts.TYPE } : id, options);
|
18
11
|
}
|
19
12
|
async markets(avalaraAccountId, params, options) {
|
20
13
|
const _avalaraAccountId = avalaraAccountId.id || avalaraAccountId;
|
@@ -32,7 +25,6 @@ class AvalaraAccounts extends ApiResource {
|
|
32
25
|
const _avalaraAccountId = avalaraAccountId.id || avalaraAccountId;
|
33
26
|
return this.resources.fetch({ type: 'tax_categories' }, `avalara_accounts/${_avalaraAccountId}/tax_categories`, params, options);
|
34
27
|
}
|
35
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
36
28
|
isAvalaraAccount(resource) {
|
37
29
|
return resource.type && (resource.type === AvalaraAccounts.TYPE);
|
38
30
|
}
|
@@ -1,47 +1,48 @@
|
|
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 { PaymentMethod } from './payment_methods';
|
4
5
|
import type { Version } from './versions';
|
5
|
-
import type { AxervePayment } from './axerve_payments';
|
6
|
+
import type { AxervePayment, AxervePaymentType } from './axerve_payments';
|
7
|
+
type AxerveGatewayType = 'axerve_gateways';
|
6
8
|
type AxerveGatewayRel = ResourceRel & {
|
7
|
-
type:
|
9
|
+
type: AxerveGatewayType;
|
8
10
|
};
|
9
11
|
type AxervePaymentRel = ResourceRel & {
|
10
|
-
type:
|
12
|
+
type: AxervePaymentType;
|
11
13
|
};
|
12
14
|
interface AxerveGateway extends Resource {
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
15
|
+
readonly type: AxerveGatewayType;
|
16
|
+
name: string;
|
17
|
+
login: string;
|
18
|
+
webhook_endpoint_url?: string | null;
|
19
|
+
payment_methods?: PaymentMethod[] | null;
|
20
|
+
versions?: Version[] | null;
|
21
|
+
axerve_payments?: AxervePayment[] | null;
|
19
22
|
}
|
20
23
|
interface AxerveGatewayCreate extends ResourceCreate {
|
21
24
|
name: string;
|
22
25
|
login: string;
|
23
26
|
api_key: string;
|
24
|
-
axerve_payments?: AxervePaymentRel[];
|
27
|
+
axerve_payments?: AxervePaymentRel[] | null;
|
25
28
|
}
|
26
29
|
interface AxerveGatewayUpdate extends ResourceUpdate {
|
27
|
-
name?: string;
|
28
|
-
login?: string;
|
29
|
-
api_key?: string;
|
30
|
-
axerve_payments?: AxervePaymentRel[];
|
30
|
+
name?: string | null;
|
31
|
+
login?: string | null;
|
32
|
+
api_key?: string | null;
|
33
|
+
axerve_payments?: AxervePaymentRel[] | null;
|
31
34
|
}
|
32
|
-
declare class AxerveGateways extends ApiResource {
|
33
|
-
static readonly TYPE:
|
34
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<AxerveGateway>>;
|
35
|
+
declare class AxerveGateways extends ApiResource<AxerveGateway> {
|
36
|
+
static readonly TYPE: AxerveGatewayType;
|
35
37
|
create(resource: AxerveGatewayCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<AxerveGateway>;
|
36
|
-
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<AxerveGateway>;
|
37
38
|
update(resource: AxerveGatewayUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<AxerveGateway>;
|
38
|
-
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
39
|
+
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
39
40
|
payment_methods(axerveGatewayId: string | AxerveGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>>;
|
40
41
|
versions(axerveGatewayId: string | AxerveGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
41
42
|
axerve_payments(axerveGatewayId: string | AxerveGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<AxervePayment>>;
|
42
43
|
isAxerveGateway(resource: any): resource is AxerveGateway;
|
43
44
|
relationship(id: string | ResourceId | null): AxerveGatewayRel;
|
44
|
-
type():
|
45
|
+
type(): AxerveGatewayType;
|
45
46
|
}
|
46
47
|
export default AxerveGateways;
|
47
|
-
export { AxerveGateway, AxerveGatewayCreate, AxerveGatewayUpdate };
|
48
|
+
export type { AxerveGateway, AxerveGatewayCreate, AxerveGatewayUpdate, AxerveGatewayType };
|