@commercelayer/sdk 4.27.0 → 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/micro.d.ts +4 -0
- package/lib/cjs/micro.js +13 -0
- 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/micro.d.ts +4 -0
- package/lib/esm/micro.js +7 -0
- 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 +20 -20
@@ -1,28 +1,31 @@
|
|
1
|
-
import { ApiResource
|
2
|
-
import type {
|
3
|
-
import type {
|
1
|
+
import { ApiResource } from '../resource';
|
2
|
+
import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse } from '../resource';
|
3
|
+
import type { QueryParamsRetrieve, QueryParamsList } from '../query';
|
4
|
+
import type { StockLocation, StockLocationType } from './stock_locations';
|
4
5
|
import type { Parcel } from './parcels';
|
5
6
|
import type { Attachment } from './attachments';
|
7
|
+
type PackageType = 'packages';
|
6
8
|
type PackageRel = ResourceRel & {
|
7
|
-
type:
|
9
|
+
type: PackageType;
|
8
10
|
};
|
9
11
|
type StockLocationRel = ResourceRel & {
|
10
|
-
type:
|
12
|
+
type: StockLocationType;
|
11
13
|
};
|
12
14
|
interface Package extends Resource {
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
15
|
+
readonly type: PackageType;
|
16
|
+
name: string;
|
17
|
+
code?: string | null;
|
18
|
+
length: number;
|
19
|
+
width: number;
|
20
|
+
height: number;
|
21
|
+
unit_of_length: string;
|
22
|
+
stock_location?: StockLocation | null;
|
23
|
+
parcels?: Parcel[] | null;
|
24
|
+
attachments?: Attachment[] | null;
|
22
25
|
}
|
23
26
|
interface PackageCreate extends ResourceCreate {
|
24
27
|
name: string;
|
25
|
-
code?: string;
|
28
|
+
code?: string | null;
|
26
29
|
length: number;
|
27
30
|
width: number;
|
28
31
|
height: number;
|
@@ -30,27 +33,25 @@ interface PackageCreate extends ResourceCreate {
|
|
30
33
|
stock_location: StockLocationRel;
|
31
34
|
}
|
32
35
|
interface PackageUpdate extends ResourceUpdate {
|
33
|
-
name?: string;
|
34
|
-
code?: string;
|
35
|
-
length?: number;
|
36
|
-
width?: number;
|
37
|
-
height?: number;
|
38
|
-
unit_of_length?: string;
|
39
|
-
stock_location?: StockLocationRel;
|
36
|
+
name?: string | null;
|
37
|
+
code?: string | null;
|
38
|
+
length?: number | null;
|
39
|
+
width?: number | null;
|
40
|
+
height?: number | null;
|
41
|
+
unit_of_length?: string | null;
|
42
|
+
stock_location?: StockLocationRel | null;
|
40
43
|
}
|
41
|
-
declare class Packages extends ApiResource {
|
42
|
-
static readonly TYPE:
|
43
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Package>>;
|
44
|
+
declare class Packages extends ApiResource<Package> {
|
45
|
+
static readonly TYPE: PackageType;
|
44
46
|
create(resource: PackageCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Package>;
|
45
|
-
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Package>;
|
46
47
|
update(resource: PackageUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Package>;
|
47
|
-
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
48
|
+
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
48
49
|
stock_location(packageId: string | Package, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockLocation>;
|
49
50
|
parcels(packageId: string | Package, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Parcel>>;
|
50
51
|
attachments(packageId: string | Package, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
51
52
|
isPackage(resource: any): resource is Package;
|
52
53
|
relationship(id: string | ResourceId | null): PackageRel;
|
53
|
-
type():
|
54
|
+
type(): PackageType;
|
54
55
|
}
|
55
56
|
export default Packages;
|
56
|
-
export { Package, PackageCreate, PackageUpdate };
|
57
|
+
export type { Package, PackageCreate, PackageUpdate, PackageType };
|
@@ -1,20 +1,13 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
2
|
class Packages extends ApiResource {
|
3
|
-
// static readonly PATH = 'packages'
|
4
|
-
async list(params, options) {
|
5
|
-
return this.resources.list({ type: Packages.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: Packages.TYPE, id }, params, options);
|
4
|
+
return this.resources.create({ ...resource, type: Packages.TYPE }, params, options);
|
12
5
|
}
|
13
6
|
async update(resource, params, options) {
|
14
|
-
return this.resources.update(
|
7
|
+
return this.resources.update({ ...resource, type: Packages.TYPE }, params, options);
|
15
8
|
}
|
16
9
|
async delete(id, options) {
|
17
|
-
await this.resources.delete({ type: Packages.TYPE
|
10
|
+
await this.resources.delete((typeof id === 'string') ? { id, type: Packages.TYPE } : id, options);
|
18
11
|
}
|
19
12
|
async stock_location(packageId, params, options) {
|
20
13
|
const _packageId = packageId.id || packageId;
|
@@ -28,7 +21,6 @@ class Packages extends ApiResource {
|
|
28
21
|
const _packageId = packageId.id || packageId;
|
29
22
|
return this.resources.fetch({ type: 'attachments' }, `packages/${_packageId}/attachments`, params, options);
|
30
23
|
}
|
31
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
32
24
|
isPackage(resource) {
|
33
25
|
return resource.type && (resource.type === Packages.TYPE);
|
34
26
|
}
|
@@ -1,30 +1,33 @@
|
|
1
|
-
import { ApiResource
|
2
|
-
import type {
|
3
|
-
import type {
|
4
|
-
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 { Parcel, ParcelType } from './parcels';
|
5
|
+
import type { StockLineItem, StockLineItemType } from './stock_line_items';
|
6
|
+
type ParcelLineItemType = 'parcel_line_items';
|
5
7
|
type ParcelLineItemRel = ResourceRel & {
|
6
|
-
type:
|
8
|
+
type: ParcelLineItemType;
|
7
9
|
};
|
8
10
|
type ParcelRel = ResourceRel & {
|
9
|
-
type:
|
11
|
+
type: ParcelType;
|
10
12
|
};
|
11
13
|
type StockLineItemRel = ResourceRel & {
|
12
|
-
type:
|
14
|
+
type: StockLineItemType;
|
13
15
|
};
|
14
16
|
interface ParcelLineItem extends Resource {
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
17
|
+
readonly type: ParcelLineItemType;
|
18
|
+
sku_code?: string | null;
|
19
|
+
quantity: number;
|
20
|
+
name: string;
|
21
|
+
image_url?: string | null;
|
22
|
+
parcel?: Parcel | null;
|
23
|
+
stock_line_item?: StockLineItem | null;
|
21
24
|
/**
|
22
25
|
* @deprecated This field should not be used as it may be removed in the future without notice
|
23
26
|
*/
|
24
27
|
shipment_line_item?: object;
|
25
28
|
}
|
26
29
|
interface ParcelLineItemCreate extends ResourceCreate {
|
27
|
-
sku_code?: string;
|
30
|
+
sku_code?: string | null;
|
28
31
|
quantity: number;
|
29
32
|
parcel: ParcelRel;
|
30
33
|
stock_line_item: StockLineItemRel;
|
@@ -34,18 +37,16 @@ interface ParcelLineItemCreate extends ResourceCreate {
|
|
34
37
|
shipment_line_item?: object;
|
35
38
|
}
|
36
39
|
type ParcelLineItemUpdate = ResourceUpdate;
|
37
|
-
declare class ParcelLineItems extends ApiResource {
|
38
|
-
static readonly TYPE:
|
39
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<ParcelLineItem>>;
|
40
|
+
declare class ParcelLineItems extends ApiResource<ParcelLineItem> {
|
41
|
+
static readonly TYPE: ParcelLineItemType;
|
40
42
|
create(resource: ParcelLineItemCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ParcelLineItem>;
|
41
|
-
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ParcelLineItem>;
|
42
43
|
update(resource: ParcelLineItemUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ParcelLineItem>;
|
43
|
-
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
44
|
+
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
44
45
|
parcel(parcelLineItemId: string | ParcelLineItem, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Parcel>;
|
45
46
|
stock_line_item(parcelLineItemId: string | ParcelLineItem, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockLineItem>;
|
46
47
|
isParcelLineItem(resource: any): resource is ParcelLineItem;
|
47
48
|
relationship(id: string | ResourceId | null): ParcelLineItemRel;
|
48
|
-
type():
|
49
|
+
type(): ParcelLineItemType;
|
49
50
|
}
|
50
51
|
export default ParcelLineItems;
|
51
|
-
export { ParcelLineItem, ParcelLineItemCreate, ParcelLineItemUpdate };
|
52
|
+
export type { ParcelLineItem, ParcelLineItemCreate, ParcelLineItemUpdate, ParcelLineItemType };
|
@@ -1,20 +1,13 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
2
|
class ParcelLineItems extends ApiResource {
|
3
|
-
// static readonly PATH = 'parcel_line_items'
|
4
|
-
async list(params, options) {
|
5
|
-
return this.resources.list({ type: ParcelLineItems.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: ParcelLineItems.TYPE, id }, params, options);
|
4
|
+
return this.resources.create({ ...resource, type: ParcelLineItems.TYPE }, params, options);
|
12
5
|
}
|
13
6
|
async update(resource, params, options) {
|
14
|
-
return this.resources.update(
|
7
|
+
return this.resources.update({ ...resource, type: ParcelLineItems.TYPE }, params, options);
|
15
8
|
}
|
16
9
|
async delete(id, options) {
|
17
|
-
await this.resources.delete({ type: ParcelLineItems.TYPE
|
10
|
+
await this.resources.delete((typeof id === 'string') ? { id, type: ParcelLineItems.TYPE } : id, options);
|
18
11
|
}
|
19
12
|
async parcel(parcelLineItemId, params, options) {
|
20
13
|
const _parcelLineItemId = parcelLineItemId.id || parcelLineItemId;
|
@@ -24,7 +17,6 @@ class ParcelLineItems extends ApiResource {
|
|
24
17
|
const _parcelLineItemId = parcelLineItemId.id || parcelLineItemId;
|
25
18
|
return this.resources.fetch({ type: 'stock_line_items' }, `parcel_line_items/${_parcelLineItemId}/stock_line_item`, params, options);
|
26
19
|
}
|
27
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
28
20
|
isParcelLineItem(resource) {
|
29
21
|
return resource.type && (resource.type === ParcelLineItems.TYPE);
|
30
22
|
}
|
@@ -1,111 +1,115 @@
|
|
1
|
-
import { ApiResource
|
2
|
-
import type {
|
3
|
-
import type {
|
4
|
-
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 { Shipment, ShipmentType } from './shipments';
|
5
|
+
import type { Package, PackageType } from './packages';
|
5
6
|
import type { ParcelLineItem } from './parcel_line_items';
|
6
7
|
import type { Attachment } from './attachments';
|
7
8
|
import type { Event } from './events';
|
9
|
+
type ParcelType = 'parcels';
|
8
10
|
type ParcelRel = ResourceRel & {
|
9
|
-
type:
|
11
|
+
type: ParcelType;
|
10
12
|
};
|
11
13
|
type ShipmentRel = ResourceRel & {
|
12
|
-
type:
|
14
|
+
type: ShipmentType;
|
13
15
|
};
|
14
16
|
type PackageRel = ResourceRel & {
|
15
|
-
type:
|
17
|
+
type: PackageType;
|
16
18
|
};
|
17
19
|
interface Parcel extends Resource {
|
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
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
20
|
+
readonly type: ParcelType;
|
21
|
+
number?: string | null;
|
22
|
+
weight: number;
|
23
|
+
unit_of_weight: string;
|
24
|
+
eel_pfc?: string | null;
|
25
|
+
contents_type?: string | null;
|
26
|
+
contents_explanation?: string | null;
|
27
|
+
customs_certify?: boolean | null;
|
28
|
+
customs_signer?: string | null;
|
29
|
+
non_delivery_option?: string | null;
|
30
|
+
restriction_type?: string | null;
|
31
|
+
restriction_comments?: string | null;
|
32
|
+
customs_info_required?: boolean | null;
|
33
|
+
shipping_label_url?: string | null;
|
34
|
+
shipping_label_file_type?: string | null;
|
35
|
+
shipping_label_size?: string | null;
|
36
|
+
shipping_label_resolution?: string | null;
|
37
|
+
tracking_number?: string | null;
|
38
|
+
tracking_status?: string | null;
|
39
|
+
tracking_status_detail?: string | null;
|
40
|
+
tracking_status_updated_at?: string | null;
|
41
|
+
tracking_details?: string | null;
|
42
|
+
carrier_weight_oz?: string | null;
|
43
|
+
signed_by?: string | null;
|
44
|
+
incoterm?: string | null;
|
45
|
+
delivery_confirmation?: string | null;
|
46
|
+
shipment?: Shipment | null;
|
47
|
+
package?: Package | null;
|
48
|
+
parcel_line_items?: ParcelLineItem[] | null;
|
49
|
+
attachments?: Attachment[] | null;
|
50
|
+
events?: Event[] | null;
|
47
51
|
}
|
48
52
|
interface ParcelCreate extends ResourceCreate {
|
49
53
|
weight: number;
|
50
54
|
unit_of_weight: string;
|
51
|
-
eel_pfc?: string;
|
52
|
-
contents_type?: string;
|
53
|
-
contents_explanation?: string;
|
54
|
-
customs_certify?: boolean;
|
55
|
-
customs_signer?: string;
|
56
|
-
non_delivery_option?: string;
|
57
|
-
restriction_type?: string;
|
58
|
-
restriction_comments?: string;
|
59
|
-
customs_info_required?: boolean;
|
60
|
-
shipping_label_url?: string;
|
61
|
-
shipping_label_file_type?: string;
|
62
|
-
shipping_label_size?: string;
|
63
|
-
shipping_label_resolution?: string;
|
64
|
-
tracking_number?: string;
|
65
|
-
tracking_status?: string;
|
66
|
-
tracking_status_detail?: string;
|
67
|
-
tracking_status_updated_at?: string;
|
68
|
-
tracking_details?: string;
|
69
|
-
carrier_weight_oz?: string;
|
70
|
-
signed_by?: string;
|
71
|
-
incoterm?: string;
|
55
|
+
eel_pfc?: string | null;
|
56
|
+
contents_type?: string | null;
|
57
|
+
contents_explanation?: string | null;
|
58
|
+
customs_certify?: boolean | null;
|
59
|
+
customs_signer?: string | null;
|
60
|
+
non_delivery_option?: string | null;
|
61
|
+
restriction_type?: string | null;
|
62
|
+
restriction_comments?: string | null;
|
63
|
+
customs_info_required?: boolean | null;
|
64
|
+
shipping_label_url?: string | null;
|
65
|
+
shipping_label_file_type?: string | null;
|
66
|
+
shipping_label_size?: string | null;
|
67
|
+
shipping_label_resolution?: string | null;
|
68
|
+
tracking_number?: string | null;
|
69
|
+
tracking_status?: string | null;
|
70
|
+
tracking_status_detail?: string | null;
|
71
|
+
tracking_status_updated_at?: string | null;
|
72
|
+
tracking_details?: string | null;
|
73
|
+
carrier_weight_oz?: string | null;
|
74
|
+
signed_by?: string | null;
|
75
|
+
incoterm?: string | null;
|
76
|
+
delivery_confirmation?: string | null;
|
72
77
|
shipment: ShipmentRel;
|
73
78
|
package: PackageRel;
|
74
79
|
}
|
75
80
|
interface ParcelUpdate extends ResourceUpdate {
|
76
|
-
weight?: number;
|
77
|
-
unit_of_weight?: string;
|
78
|
-
eel_pfc?: string;
|
79
|
-
contents_type?: string;
|
80
|
-
contents_explanation?: string;
|
81
|
-
customs_certify?: boolean;
|
82
|
-
customs_signer?: string;
|
83
|
-
non_delivery_option?: string;
|
84
|
-
restriction_type?: string;
|
85
|
-
restriction_comments?: string;
|
86
|
-
customs_info_required?: boolean;
|
87
|
-
shipping_label_url?: string;
|
88
|
-
shipping_label_file_type?: string;
|
89
|
-
shipping_label_size?: string;
|
90
|
-
shipping_label_resolution?: string;
|
91
|
-
tracking_number?: string;
|
92
|
-
tracking_status?: string;
|
93
|
-
tracking_status_detail?: string;
|
94
|
-
tracking_status_updated_at?: string;
|
95
|
-
tracking_details?: string;
|
96
|
-
carrier_weight_oz?: string;
|
97
|
-
signed_by?: string;
|
98
|
-
incoterm?: string;
|
99
|
-
|
100
|
-
|
81
|
+
weight?: number | null;
|
82
|
+
unit_of_weight?: string | null;
|
83
|
+
eel_pfc?: string | null;
|
84
|
+
contents_type?: string | null;
|
85
|
+
contents_explanation?: string | null;
|
86
|
+
customs_certify?: boolean | null;
|
87
|
+
customs_signer?: string | null;
|
88
|
+
non_delivery_option?: string | null;
|
89
|
+
restriction_type?: string | null;
|
90
|
+
restriction_comments?: string | null;
|
91
|
+
customs_info_required?: boolean | null;
|
92
|
+
shipping_label_url?: string | null;
|
93
|
+
shipping_label_file_type?: string | null;
|
94
|
+
shipping_label_size?: string | null;
|
95
|
+
shipping_label_resolution?: string | null;
|
96
|
+
tracking_number?: string | null;
|
97
|
+
tracking_status?: string | null;
|
98
|
+
tracking_status_detail?: string | null;
|
99
|
+
tracking_status_updated_at?: string | null;
|
100
|
+
tracking_details?: string | null;
|
101
|
+
carrier_weight_oz?: string | null;
|
102
|
+
signed_by?: string | null;
|
103
|
+
incoterm?: string | null;
|
104
|
+
delivery_confirmation?: string | null;
|
105
|
+
shipment?: ShipmentRel | null;
|
106
|
+
package?: PackageRel | null;
|
101
107
|
}
|
102
|
-
declare class Parcels extends ApiResource {
|
103
|
-
static readonly TYPE:
|
104
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Parcel>>;
|
108
|
+
declare class Parcels extends ApiResource<Parcel> {
|
109
|
+
static readonly TYPE: ParcelType;
|
105
110
|
create(resource: ParcelCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Parcel>;
|
106
|
-
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Parcel>;
|
107
111
|
update(resource: ParcelUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Parcel>;
|
108
|
-
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
112
|
+
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
109
113
|
shipment(parcelId: string | Parcel, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Shipment>;
|
110
114
|
package(parcelId: string | Parcel, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Package>;
|
111
115
|
parcel_line_items(parcelId: string | Parcel, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<ParcelLineItem>>;
|
@@ -113,7 +117,7 @@ declare class Parcels extends ApiResource {
|
|
113
117
|
events(parcelId: string | Parcel, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
114
118
|
isParcel(resource: any): resource is Parcel;
|
115
119
|
relationship(id: string | ResourceId | null): ParcelRel;
|
116
|
-
type():
|
120
|
+
type(): ParcelType;
|
117
121
|
}
|
118
122
|
export default Parcels;
|
119
|
-
export { Parcel, ParcelCreate, ParcelUpdate };
|
123
|
+
export type { Parcel, ParcelCreate, ParcelUpdate, ParcelType };
|
@@ -1,20 +1,13 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
2
|
class Parcels extends ApiResource {
|
3
|
-
// static readonly PATH = 'parcels'
|
4
|
-
async list(params, options) {
|
5
|
-
return this.resources.list({ type: Parcels.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: Parcels.TYPE, id }, params, options);
|
4
|
+
return this.resources.create({ ...resource, type: Parcels.TYPE }, params, options);
|
12
5
|
}
|
13
6
|
async update(resource, params, options) {
|
14
|
-
return this.resources.update(
|
7
|
+
return this.resources.update({ ...resource, type: Parcels.TYPE }, params, options);
|
15
8
|
}
|
16
9
|
async delete(id, options) {
|
17
|
-
await this.resources.delete({ type: Parcels.TYPE
|
10
|
+
await this.resources.delete((typeof id === 'string') ? { id, type: Parcels.TYPE } : id, options);
|
18
11
|
}
|
19
12
|
async shipment(parcelId, params, options) {
|
20
13
|
const _parcelId = parcelId.id || parcelId;
|
@@ -36,7 +29,6 @@ class Parcels extends ApiResource {
|
|
36
29
|
const _parcelId = parcelId.id || parcelId;
|
37
30
|
return this.resources.fetch({ type: 'events' }, `parcels/${_parcelId}/events`, params, options);
|
38
31
|
}
|
39
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
40
32
|
isParcel(resource) {
|
41
33
|
return resource.type && (resource.type === Parcels.TYPE);
|
42
34
|
}
|
@@ -1,21 +1,22 @@
|
|
1
|
-
import { ApiResource
|
2
|
-
import type {
|
1
|
+
import { ApiResource } from '../resource';
|
2
|
+
import type { Resource, ResourceId, ResourcesConfig, ResourceRel, ListResponse } from '../resource';
|
3
|
+
import type { QueryParamsList } from '../query';
|
3
4
|
import type { PaymentMethod } from './payment_methods';
|
5
|
+
type PaymentGatewayType = 'payment_gateways';
|
4
6
|
type PaymentGatewayRel = ResourceRel & {
|
5
|
-
type:
|
7
|
+
type: PaymentGatewayType;
|
6
8
|
};
|
7
9
|
interface PaymentGateway extends Resource {
|
8
|
-
|
9
|
-
|
10
|
+
readonly type: PaymentGatewayType;
|
11
|
+
name: string;
|
12
|
+
payment_methods?: PaymentMethod[] | null;
|
10
13
|
}
|
11
|
-
declare class PaymentGateways extends ApiResource {
|
12
|
-
static readonly TYPE:
|
13
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PaymentGateway>>;
|
14
|
-
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaymentGateway>;
|
14
|
+
declare class PaymentGateways extends ApiResource<PaymentGateway> {
|
15
|
+
static readonly TYPE: PaymentGatewayType;
|
15
16
|
payment_methods(paymentGatewayId: string | PaymentGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>>;
|
16
17
|
isPaymentGateway(resource: any): resource is PaymentGateway;
|
17
18
|
relationship(id: string | ResourceId | null): PaymentGatewayRel;
|
18
|
-
type():
|
19
|
+
type(): PaymentGatewayType;
|
19
20
|
}
|
20
21
|
export default PaymentGateways;
|
21
|
-
export { PaymentGateway };
|
22
|
+
export type { PaymentGateway, PaymentGatewayType };
|
@@ -1,17 +1,9 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
2
|
class PaymentGateways extends ApiResource {
|
3
|
-
// static readonly PATH = 'payment_gateways'
|
4
|
-
async list(params, options) {
|
5
|
-
return this.resources.list({ type: PaymentGateways.TYPE }, params, options);
|
6
|
-
}
|
7
|
-
async retrieve(id, params, options) {
|
8
|
-
return this.resources.retrieve({ type: PaymentGateways.TYPE, id }, params, options);
|
9
|
-
}
|
10
3
|
async payment_methods(paymentGatewayId, params, options) {
|
11
4
|
const _paymentGatewayId = paymentGatewayId.id || paymentGatewayId;
|
12
5
|
return this.resources.fetch({ type: 'payment_methods' }, `payment_gateways/${_paymentGatewayId}/payment_methods`, params, options);
|
13
6
|
}
|
14
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
15
7
|
isPaymentGateway(resource) {
|
16
8
|
return resource.type && (resource.type === PaymentGateways.TYPE);
|
17
9
|
}
|
@@ -1,72 +1,73 @@
|
|
1
|
-
import { ApiResource
|
2
|
-
import type {
|
3
|
-
import type {
|
4
|
-
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 { PaymentGateway, PaymentGatewayType } from './payment_gateways';
|
5
6
|
import type { Attachment } from './attachments';
|
7
|
+
type PaymentMethodType = 'payment_methods';
|
6
8
|
type PaymentMethodRel = ResourceRel & {
|
7
|
-
type:
|
9
|
+
type: PaymentMethodType;
|
8
10
|
};
|
9
11
|
type MarketRel = ResourceRel & {
|
10
|
-
type:
|
12
|
+
type: MarketType;
|
11
13
|
};
|
12
14
|
type PaymentGatewayRel = ResourceRel & {
|
13
|
-
type:
|
15
|
+
type: PaymentGatewayType;
|
14
16
|
};
|
15
17
|
interface PaymentMethod extends Resource {
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
18
|
+
readonly type: PaymentMethodType;
|
19
|
+
payment_source_type: string;
|
20
|
+
name?: string | null;
|
21
|
+
currency_code?: string | null;
|
22
|
+
moto?: boolean | null;
|
23
|
+
require_capture?: boolean | null;
|
24
|
+
auto_capture?: boolean | null;
|
25
|
+
disabled_at?: string | null;
|
26
|
+
price_amount_cents: number;
|
27
|
+
price_amount_float?: number | null;
|
28
|
+
formatted_price_amount?: string | null;
|
29
|
+
auto_capture_max_amount_cents?: number | null;
|
30
|
+
auto_capture_max_amount_float?: number | null;
|
31
|
+
formatted_auto_capture_max_amount?: string | null;
|
32
|
+
market?: Market | null;
|
33
|
+
payment_gateway?: PaymentGateway | null;
|
34
|
+
attachments?: Attachment[] | null;
|
32
35
|
}
|
33
36
|
interface PaymentMethodCreate extends ResourceCreate {
|
34
37
|
payment_source_type: string;
|
35
|
-
currency_code?: string;
|
36
|
-
moto?: boolean;
|
37
|
-
require_capture?: boolean;
|
38
|
-
auto_capture?: boolean;
|
38
|
+
currency_code?: string | null;
|
39
|
+
moto?: boolean | null;
|
40
|
+
require_capture?: boolean | null;
|
41
|
+
auto_capture?: boolean | null;
|
39
42
|
price_amount_cents: number;
|
40
|
-
auto_capture_max_amount_cents?: number;
|
41
|
-
market?: MarketRel;
|
43
|
+
auto_capture_max_amount_cents?: number | null;
|
44
|
+
market?: MarketRel | null;
|
42
45
|
payment_gateway: PaymentGatewayRel;
|
43
46
|
}
|
44
47
|
interface PaymentMethodUpdate extends ResourceUpdate {
|
45
|
-
payment_source_type?: string;
|
46
|
-
currency_code?: string;
|
47
|
-
moto?: boolean;
|
48
|
-
require_capture?: boolean;
|
49
|
-
auto_capture?: boolean;
|
50
|
-
_disable?: boolean;
|
51
|
-
_enable?: boolean;
|
52
|
-
price_amount_cents?: number;
|
53
|
-
auto_capture_max_amount_cents?: number;
|
54
|
-
market?: MarketRel;
|
55
|
-
payment_gateway?: PaymentGatewayRel;
|
48
|
+
payment_source_type?: string | null;
|
49
|
+
currency_code?: string | null;
|
50
|
+
moto?: boolean | null;
|
51
|
+
require_capture?: boolean | null;
|
52
|
+
auto_capture?: boolean | null;
|
53
|
+
_disable?: boolean | null;
|
54
|
+
_enable?: boolean | null;
|
55
|
+
price_amount_cents?: number | null;
|
56
|
+
auto_capture_max_amount_cents?: number | null;
|
57
|
+
market?: MarketRel | null;
|
58
|
+
payment_gateway?: PaymentGatewayRel | null;
|
56
59
|
}
|
57
|
-
declare class PaymentMethods extends ApiResource {
|
58
|
-
static readonly TYPE:
|
59
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>>;
|
60
|
+
declare class PaymentMethods extends ApiResource<PaymentMethod> {
|
61
|
+
static readonly TYPE: PaymentMethodType;
|
60
62
|
create(resource: PaymentMethodCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaymentMethod>;
|
61
|
-
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaymentMethod>;
|
62
63
|
update(resource: PaymentMethodUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaymentMethod>;
|
63
|
-
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
64
|
+
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
64
65
|
market(paymentMethodId: string | PaymentMethod, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Market>;
|
65
66
|
payment_gateway(paymentMethodId: string | PaymentMethod, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaymentGateway>;
|
66
67
|
attachments(paymentMethodId: string | PaymentMethod, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
67
68
|
isPaymentMethod(resource: any): resource is PaymentMethod;
|
68
69
|
relationship(id: string | ResourceId | null): PaymentMethodRel;
|
69
|
-
type():
|
70
|
+
type(): PaymentMethodType;
|
70
71
|
}
|
71
72
|
export default PaymentMethods;
|
72
|
-
export { PaymentMethod, PaymentMethodCreate, PaymentMethodUpdate };
|
73
|
+
export type { PaymentMethod, PaymentMethodCreate, PaymentMethodUpdate, PaymentMethodType };
|