@commercelayer/sdk 5.0.0-beta.1 → 5.0.0-beta.10
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 +15 -0
- package/lib/cjs/api.js +0 -13
- package/lib/cjs/client.js +11 -8
- package/lib/cjs/commercelayer.d.ts +4 -4
- package/lib/cjs/commercelayer.js +1 -1
- package/lib/cjs/common.js +0 -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 -0
- package/lib/cjs/jsonapi.js +5 -1
- package/lib/cjs/query.d.ts +3 -2
- package/lib/cjs/query.js +3 -2
- package/lib/cjs/resource.d.ts +12 -15
- package/lib/cjs/resource.js +11 -8
- package/lib/cjs/resources/addresses.d.ts +56 -57
- package/lib/cjs/resources/addresses.js +2 -6
- package/lib/cjs/resources/adjustments.d.ts +10 -11
- package/lib/cjs/resources/adjustments.js +2 -6
- package/lib/cjs/resources/adyen_gateways.d.ts +21 -22
- package/lib/cjs/resources/adyen_gateways.js +2 -6
- package/lib/cjs/resources/adyen_payments.d.ts +16 -17
- package/lib/cjs/resources/adyen_payments.js +2 -6
- package/lib/cjs/resources/application.d.ts +5 -5
- package/lib/cjs/resources/application.js +0 -1
- package/lib/cjs/resources/attachments.d.ts +12 -13
- package/lib/cjs/resources/attachments.js +2 -6
- package/lib/cjs/resources/authorizations.d.ts +32 -33
- package/lib/cjs/resources/authorizations.js +1 -5
- package/lib/cjs/resources/avalara_accounts.d.ts +18 -19
- package/lib/cjs/resources/avalara_accounts.js +2 -6
- package/lib/cjs/resources/axerve_gateways.d.ts +9 -10
- package/lib/cjs/resources/axerve_gateways.js +2 -6
- package/lib/cjs/resources/axerve_payments.d.ts +15 -16
- package/lib/cjs/resources/axerve_payments.js +2 -6
- package/lib/cjs/resources/billing_info_validation_rules.d.ts +3 -4
- package/lib/cjs/resources/billing_info_validation_rules.js +2 -6
- package/lib/cjs/resources/bing_geocoders.d.ts +5 -6
- package/lib/cjs/resources/bing_geocoders.js +2 -6
- package/lib/cjs/resources/braintree_gateways.d.ts +20 -21
- package/lib/cjs/resources/braintree_gateways.js +2 -6
- package/lib/cjs/resources/braintree_payments.d.ts +18 -19
- package/lib/cjs/resources/braintree_payments.js +2 -6
- package/lib/cjs/resources/bundles.d.ts +33 -34
- package/lib/cjs/resources/bundles.js +2 -6
- package/lib/cjs/resources/captures.d.ts +23 -24
- package/lib/cjs/resources/captures.js +1 -5
- package/lib/cjs/resources/carrier_accounts.d.ts +5 -6
- package/lib/cjs/resources/carrier_accounts.js +0 -4
- package/lib/cjs/resources/checkout_com_gateways.d.ts +11 -12
- package/lib/cjs/resources/checkout_com_gateways.js +2 -6
- package/lib/cjs/resources/checkout_com_payments.d.ts +27 -28
- package/lib/cjs/resources/checkout_com_payments.js +2 -6
- package/lib/cjs/resources/cleanups.d.ts +12 -13
- package/lib/cjs/resources/cleanups.js +1 -5
- package/lib/cjs/resources/coupon_codes_promotion_rules.d.ts +5 -6
- package/lib/cjs/resources/coupon_codes_promotion_rules.js +2 -6
- package/lib/cjs/resources/coupon_recipients.d.ts +12 -13
- package/lib/cjs/resources/coupon_recipients.js +2 -6
- package/lib/cjs/resources/coupons.d.ts +15 -16
- package/lib/cjs/resources/coupons.js +2 -6
- package/lib/cjs/resources/customer_addresses.d.ts +6 -7
- package/lib/cjs/resources/customer_addresses.js +2 -6
- package/lib/cjs/resources/customer_groups.d.ts +5 -6
- package/lib/cjs/resources/customer_groups.js +2 -6
- package/lib/cjs/resources/customer_password_resets.d.ts +7 -8
- package/lib/cjs/resources/customer_password_resets.js +2 -6
- package/lib/cjs/resources/customer_payment_sources.d.ts +9 -10
- package/lib/cjs/resources/customer_payment_sources.js +2 -6
- package/lib/cjs/resources/customer_subscriptions.d.ts +3 -4
- package/lib/cjs/resources/customer_subscriptions.js +2 -6
- package/lib/cjs/resources/customers.d.ts +18 -19
- package/lib/cjs/resources/customers.js +2 -6
- package/lib/cjs/resources/delivery_lead_times.d.ts +11 -12
- package/lib/cjs/resources/delivery_lead_times.js +2 -6
- package/lib/cjs/resources/event_callbacks.d.ts +7 -8
- package/lib/cjs/resources/event_callbacks.js +0 -4
- package/lib/cjs/resources/events.d.ts +3 -4
- package/lib/cjs/resources/events.js +0 -4
- package/lib/cjs/resources/exports.d.ts +16 -17
- package/lib/cjs/resources/exports.js +1 -5
- package/lib/cjs/resources/external_gateways.d.ts +20 -21
- package/lib/cjs/resources/external_gateways.js +2 -6
- package/lib/cjs/resources/external_payments.d.ts +11 -12
- package/lib/cjs/resources/external_payments.js +2 -6
- package/lib/cjs/resources/external_promotions.d.ts +33 -34
- package/lib/cjs/resources/external_promotions.js +2 -6
- package/lib/cjs/resources/external_tax_calculators.d.ts +7 -8
- package/lib/cjs/resources/external_tax_calculators.js +2 -6
- package/lib/cjs/resources/fixed_amount_promotions.d.ts +34 -35
- package/lib/cjs/resources/fixed_amount_promotions.js +2 -6
- package/lib/cjs/resources/fixed_price_promotions.d.ts +37 -38
- package/lib/cjs/resources/fixed_price_promotions.js +2 -6
- package/lib/cjs/resources/free_gift_promotions.d.ts +36 -37
- package/lib/cjs/resources/free_gift_promotions.js +2 -6
- package/lib/cjs/resources/free_shipping_promotions.d.ts +29 -30
- package/lib/cjs/resources/free_shipping_promotions.js +2 -6
- package/lib/cjs/resources/geocoders.d.ts +3 -4
- package/lib/cjs/resources/geocoders.js +0 -4
- package/lib/cjs/resources/gift_card_recipients.d.ts +12 -13
- package/lib/cjs/resources/gift_card_recipients.js +2 -6
- package/lib/cjs/resources/gift_cards.d.ts +46 -47
- package/lib/cjs/resources/gift_cards.js +2 -6
- package/lib/cjs/resources/google_geocoders.d.ts +5 -6
- package/lib/cjs/resources/google_geocoders.js +2 -6
- package/lib/cjs/resources/imports.d.ts +20 -21
- package/lib/cjs/resources/imports.js +1 -5
- package/lib/cjs/resources/in_stock_subscriptions.d.ts +18 -19
- package/lib/cjs/resources/in_stock_subscriptions.js +2 -6
- package/lib/cjs/resources/inventory_models.d.ts +11 -12
- package/lib/cjs/resources/inventory_models.js +2 -6
- package/lib/cjs/resources/inventory_return_locations.d.ts +8 -9
- package/lib/cjs/resources/inventory_return_locations.js +2 -6
- package/lib/cjs/resources/inventory_stock_locations.d.ts +11 -12
- package/lib/cjs/resources/inventory_stock_locations.js +2 -6
- package/lib/cjs/resources/klarna_gateways.d.ts +9 -10
- package/lib/cjs/resources/klarna_gateways.js +2 -6
- package/lib/cjs/resources/klarna_payments.d.ts +16 -17
- package/lib/cjs/resources/klarna_payments.js +2 -6
- package/lib/cjs/resources/line_item_options.d.ts +21 -22
- package/lib/cjs/resources/line_item_options.js +2 -6
- package/lib/cjs/resources/line_items.d.ts +45 -46
- package/lib/cjs/resources/line_items.js +2 -6
- package/lib/cjs/resources/manual_gateways.d.ts +3 -4
- package/lib/cjs/resources/manual_gateways.js +2 -6
- package/lib/cjs/resources/manual_tax_calculators.d.ts +7 -8
- package/lib/cjs/resources/manual_tax_calculators.js +2 -6
- package/lib/cjs/resources/markets.d.ts +33 -34
- package/lib/cjs/resources/markets.js +2 -6
- package/lib/cjs/resources/merchants.d.ts +5 -6
- package/lib/cjs/resources/merchants.js +2 -6
- package/lib/cjs/resources/order_amount_promotion_rules.d.ts +9 -10
- package/lib/cjs/resources/order_amount_promotion_rules.js +2 -6
- package/lib/cjs/resources/order_copies.d.ts +16 -17
- package/lib/cjs/resources/order_copies.js +1 -5
- package/lib/cjs/resources/order_subscriptions.d.ts +27 -28
- package/lib/cjs/resources/order_subscriptions.js +2 -6
- package/lib/cjs/resources/order_validation_rules.d.ts +2 -3
- package/lib/cjs/resources/order_validation_rules.js +0 -4
- package/lib/cjs/resources/orders.d.ts +182 -183
- package/lib/cjs/resources/orders.js +2 -6
- package/lib/cjs/resources/organization.d.ts +16 -16
- package/lib/cjs/resources/organization.js +0 -1
- package/lib/cjs/resources/packages.d.ts +17 -18
- package/lib/cjs/resources/packages.js +2 -6
- package/lib/cjs/resources/parcel_line_items.d.ts +9 -10
- package/lib/cjs/resources/parcel_line_items.js +2 -6
- package/lib/cjs/resources/parcels.d.ts +75 -76
- package/lib/cjs/resources/parcels.js +2 -6
- package/lib/cjs/resources/payment_gateways.d.ts +2 -3
- package/lib/cjs/resources/payment_gateways.js +0 -4
- package/lib/cjs/resources/payment_methods.d.ts +33 -34
- package/lib/cjs/resources/payment_methods.js +2 -6
- package/lib/cjs/resources/paypal_gateways.d.ts +6 -7
- package/lib/cjs/resources/paypal_gateways.js +2 -6
- package/lib/cjs/resources/paypal_payments.d.ts +20 -21
- package/lib/cjs/resources/paypal_payments.js +2 -6
- package/lib/cjs/resources/percentage_discount_promotions.d.ts +36 -37
- package/lib/cjs/resources/percentage_discount_promotions.js +2 -6
- package/lib/cjs/resources/price_lists.d.ts +9 -10
- package/lib/cjs/resources/price_lists.js +2 -6
- package/lib/cjs/resources/price_tiers.d.ts +7 -8
- package/lib/cjs/resources/price_tiers.js +0 -4
- package/lib/cjs/resources/price_volume_tiers.d.ts +12 -13
- package/lib/cjs/resources/price_volume_tiers.js +2 -6
- package/lib/cjs/resources/prices.d.ts +21 -22
- package/lib/cjs/resources/prices.js +2 -6
- package/lib/cjs/resources/promotion_rules.d.ts +2 -4
- package/lib/cjs/resources/promotion_rules.js +0 -4
- package/lib/cjs/resources/promotions.d.ts +13 -14
- package/lib/cjs/resources/promotions.js +0 -4
- package/lib/cjs/resources/refunds.d.ts +14 -15
- package/lib/cjs/resources/refunds.js +0 -4
- package/lib/cjs/resources/return_line_items.d.ts +14 -15
- package/lib/cjs/resources/return_line_items.js +2 -6
- package/lib/cjs/resources/returns.d.ts +29 -30
- package/lib/cjs/resources/returns.js +2 -6
- package/lib/cjs/resources/satispay_gateways.d.ts +7 -8
- package/lib/cjs/resources/satispay_gateways.js +2 -6
- package/lib/cjs/resources/satispay_payments.d.ts +13 -14
- package/lib/cjs/resources/satispay_payments.js +2 -6
- package/lib/cjs/resources/shipments.d.ts +40 -41
- package/lib/cjs/resources/shipments.js +1 -5
- package/lib/cjs/resources/shipping_categories.d.ts +4 -5
- package/lib/cjs/resources/shipping_categories.js +2 -6
- package/lib/cjs/resources/shipping_method_tiers.d.ts +7 -8
- package/lib/cjs/resources/shipping_method_tiers.js +0 -4
- package/lib/cjs/resources/shipping_methods.d.ts +50 -51
- package/lib/cjs/resources/shipping_methods.js +2 -6
- package/lib/cjs/resources/shipping_weight_tiers.d.ts +12 -13
- package/lib/cjs/resources/shipping_weight_tiers.js +2 -6
- package/lib/cjs/resources/shipping_zones.d.ts +21 -22
- package/lib/cjs/resources/shipping_zones.js +2 -6
- package/lib/cjs/resources/sku_list_items.d.ts +13 -14
- package/lib/cjs/resources/sku_list_items.js +2 -6
- package/lib/cjs/resources/sku_list_promotion_rules.d.ts +12 -13
- package/lib/cjs/resources/sku_list_promotion_rules.js +2 -6
- package/lib/cjs/resources/sku_lists.d.ts +22 -23
- package/lib/cjs/resources/sku_lists.js +2 -6
- package/lib/cjs/resources/sku_options.d.ts +24 -25
- package/lib/cjs/resources/sku_options.js +2 -6
- package/lib/cjs/resources/skus.d.ts +36 -37
- package/lib/cjs/resources/skus.js +2 -6
- package/lib/cjs/resources/stock_items.d.ts +11 -12
- package/lib/cjs/resources/stock_items.js +2 -6
- package/lib/cjs/resources/stock_line_items.d.ts +8 -9
- package/lib/cjs/resources/stock_line_items.js +0 -4
- package/lib/cjs/resources/stock_locations.d.ts +16 -17
- package/lib/cjs/resources/stock_locations.js +2 -6
- package/lib/cjs/resources/stock_transfers.d.ts +23 -24
- package/lib/cjs/resources/stock_transfers.js +2 -6
- package/lib/cjs/resources/stripe_gateways.d.ts +11 -12
- package/lib/cjs/resources/stripe_gateways.js +2 -6
- package/lib/cjs/resources/stripe_payments.d.ts +17 -18
- package/lib/cjs/resources/stripe_payments.js +2 -6
- package/lib/cjs/resources/tax_calculators.d.ts +3 -4
- package/lib/cjs/resources/tax_calculators.js +0 -4
- package/lib/cjs/resources/tax_categories.d.ts +9 -10
- package/lib/cjs/resources/tax_categories.js +2 -6
- package/lib/cjs/resources/tax_rules.d.ts +40 -41
- package/lib/cjs/resources/tax_rules.js +2 -6
- package/lib/cjs/resources/taxjar_accounts.d.ts +8 -9
- package/lib/cjs/resources/taxjar_accounts.js +2 -6
- package/lib/cjs/resources/transactions.d.ts +14 -15
- package/lib/cjs/resources/transactions.js +0 -4
- package/lib/cjs/resources/voids.d.ts +14 -15
- package/lib/cjs/resources/voids.js +0 -4
- package/lib/cjs/resources/webhooks.d.ts +15 -16
- package/lib/cjs/resources/webhooks.js +2 -6
- package/lib/cjs/resources/wire_transfers.d.ts +5 -6
- package/lib/cjs/resources/wire_transfers.js +2 -6
- package/lib/cjs/static.d.ts +1 -1
- package/lib/esm/api.d.ts +15 -0
- package/lib/esm/api.js +0 -13
- package/lib/esm/client.js +11 -8
- package/lib/esm/commercelayer.d.ts +4 -4
- package/lib/esm/commercelayer.js +1 -1
- package/lib/esm/common.js +0 -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 -0
- package/lib/esm/jsonapi.js +5 -1
- package/lib/esm/query.d.ts +3 -2
- package/lib/esm/query.js +2 -2
- package/lib/esm/resource.d.ts +12 -15
- package/lib/esm/resource.js +12 -9
- package/lib/esm/resources/addresses.d.ts +56 -57
- package/lib/esm/resources/addresses.js +2 -6
- package/lib/esm/resources/adjustments.d.ts +10 -11
- package/lib/esm/resources/adjustments.js +2 -6
- package/lib/esm/resources/adyen_gateways.d.ts +21 -22
- package/lib/esm/resources/adyen_gateways.js +2 -6
- package/lib/esm/resources/adyen_payments.d.ts +16 -17
- package/lib/esm/resources/adyen_payments.js +2 -6
- package/lib/esm/resources/application.d.ts +5 -5
- package/lib/esm/resources/application.js +0 -1
- package/lib/esm/resources/attachments.d.ts +12 -13
- package/lib/esm/resources/attachments.js +2 -6
- package/lib/esm/resources/authorizations.d.ts +32 -33
- package/lib/esm/resources/authorizations.js +1 -5
- package/lib/esm/resources/avalara_accounts.d.ts +18 -19
- package/lib/esm/resources/avalara_accounts.js +2 -6
- package/lib/esm/resources/axerve_gateways.d.ts +9 -10
- package/lib/esm/resources/axerve_gateways.js +2 -6
- package/lib/esm/resources/axerve_payments.d.ts +15 -16
- package/lib/esm/resources/axerve_payments.js +2 -6
- package/lib/esm/resources/billing_info_validation_rules.d.ts +3 -4
- package/lib/esm/resources/billing_info_validation_rules.js +2 -6
- package/lib/esm/resources/bing_geocoders.d.ts +5 -6
- package/lib/esm/resources/bing_geocoders.js +2 -6
- package/lib/esm/resources/braintree_gateways.d.ts +20 -21
- package/lib/esm/resources/braintree_gateways.js +2 -6
- package/lib/esm/resources/braintree_payments.d.ts +18 -19
- package/lib/esm/resources/braintree_payments.js +2 -6
- package/lib/esm/resources/bundles.d.ts +33 -34
- package/lib/esm/resources/bundles.js +2 -6
- package/lib/esm/resources/captures.d.ts +23 -24
- package/lib/esm/resources/captures.js +1 -5
- package/lib/esm/resources/carrier_accounts.d.ts +5 -6
- package/lib/esm/resources/carrier_accounts.js +0 -4
- package/lib/esm/resources/checkout_com_gateways.d.ts +11 -12
- package/lib/esm/resources/checkout_com_gateways.js +2 -6
- package/lib/esm/resources/checkout_com_payments.d.ts +27 -28
- package/lib/esm/resources/checkout_com_payments.js +2 -6
- package/lib/esm/resources/cleanups.d.ts +12 -13
- package/lib/esm/resources/cleanups.js +1 -5
- package/lib/esm/resources/coupon_codes_promotion_rules.d.ts +5 -6
- package/lib/esm/resources/coupon_codes_promotion_rules.js +2 -6
- package/lib/esm/resources/coupon_recipients.d.ts +12 -13
- package/lib/esm/resources/coupon_recipients.js +2 -6
- package/lib/esm/resources/coupons.d.ts +15 -16
- package/lib/esm/resources/coupons.js +2 -6
- package/lib/esm/resources/customer_addresses.d.ts +6 -7
- package/lib/esm/resources/customer_addresses.js +2 -6
- package/lib/esm/resources/customer_groups.d.ts +5 -6
- package/lib/esm/resources/customer_groups.js +2 -6
- package/lib/esm/resources/customer_password_resets.d.ts +7 -8
- package/lib/esm/resources/customer_password_resets.js +2 -6
- package/lib/esm/resources/customer_payment_sources.d.ts +9 -10
- package/lib/esm/resources/customer_payment_sources.js +2 -6
- package/lib/esm/resources/customer_subscriptions.d.ts +3 -4
- package/lib/esm/resources/customer_subscriptions.js +2 -6
- package/lib/esm/resources/customers.d.ts +18 -19
- package/lib/esm/resources/customers.js +2 -6
- package/lib/esm/resources/delivery_lead_times.d.ts +11 -12
- package/lib/esm/resources/delivery_lead_times.js +2 -6
- package/lib/esm/resources/event_callbacks.d.ts +7 -8
- package/lib/esm/resources/event_callbacks.js +0 -4
- package/lib/esm/resources/events.d.ts +3 -4
- package/lib/esm/resources/events.js +0 -4
- package/lib/esm/resources/exports.d.ts +16 -17
- package/lib/esm/resources/exports.js +1 -5
- package/lib/esm/resources/external_gateways.d.ts +20 -21
- package/lib/esm/resources/external_gateways.js +2 -6
- package/lib/esm/resources/external_payments.d.ts +11 -12
- package/lib/esm/resources/external_payments.js +2 -6
- package/lib/esm/resources/external_promotions.d.ts +33 -34
- package/lib/esm/resources/external_promotions.js +2 -6
- package/lib/esm/resources/external_tax_calculators.d.ts +7 -8
- package/lib/esm/resources/external_tax_calculators.js +2 -6
- package/lib/esm/resources/fixed_amount_promotions.d.ts +34 -35
- package/lib/esm/resources/fixed_amount_promotions.js +2 -6
- package/lib/esm/resources/fixed_price_promotions.d.ts +37 -38
- package/lib/esm/resources/fixed_price_promotions.js +2 -6
- package/lib/esm/resources/free_gift_promotions.d.ts +36 -37
- package/lib/esm/resources/free_gift_promotions.js +2 -6
- package/lib/esm/resources/free_shipping_promotions.d.ts +29 -30
- package/lib/esm/resources/free_shipping_promotions.js +2 -6
- package/lib/esm/resources/geocoders.d.ts +3 -4
- package/lib/esm/resources/geocoders.js +0 -4
- package/lib/esm/resources/gift_card_recipients.d.ts +12 -13
- package/lib/esm/resources/gift_card_recipients.js +2 -6
- package/lib/esm/resources/gift_cards.d.ts +46 -47
- package/lib/esm/resources/gift_cards.js +2 -6
- package/lib/esm/resources/google_geocoders.d.ts +5 -6
- package/lib/esm/resources/google_geocoders.js +2 -6
- package/lib/esm/resources/imports.d.ts +20 -21
- package/lib/esm/resources/imports.js +1 -5
- package/lib/esm/resources/in_stock_subscriptions.d.ts +18 -19
- package/lib/esm/resources/in_stock_subscriptions.js +2 -6
- package/lib/esm/resources/inventory_models.d.ts +11 -12
- package/lib/esm/resources/inventory_models.js +2 -6
- package/lib/esm/resources/inventory_return_locations.d.ts +8 -9
- package/lib/esm/resources/inventory_return_locations.js +2 -6
- package/lib/esm/resources/inventory_stock_locations.d.ts +11 -12
- package/lib/esm/resources/inventory_stock_locations.js +2 -6
- package/lib/esm/resources/klarna_gateways.d.ts +9 -10
- package/lib/esm/resources/klarna_gateways.js +2 -6
- package/lib/esm/resources/klarna_payments.d.ts +16 -17
- package/lib/esm/resources/klarna_payments.js +2 -6
- package/lib/esm/resources/line_item_options.d.ts +21 -22
- package/lib/esm/resources/line_item_options.js +2 -6
- package/lib/esm/resources/line_items.d.ts +45 -46
- package/lib/esm/resources/line_items.js +2 -6
- package/lib/esm/resources/manual_gateways.d.ts +3 -4
- package/lib/esm/resources/manual_gateways.js +2 -6
- package/lib/esm/resources/manual_tax_calculators.d.ts +7 -8
- package/lib/esm/resources/manual_tax_calculators.js +2 -6
- package/lib/esm/resources/markets.d.ts +33 -34
- package/lib/esm/resources/markets.js +2 -6
- package/lib/esm/resources/merchants.d.ts +5 -6
- package/lib/esm/resources/merchants.js +2 -6
- package/lib/esm/resources/order_amount_promotion_rules.d.ts +9 -10
- package/lib/esm/resources/order_amount_promotion_rules.js +2 -6
- package/lib/esm/resources/order_copies.d.ts +16 -17
- package/lib/esm/resources/order_copies.js +1 -5
- package/lib/esm/resources/order_subscriptions.d.ts +27 -28
- package/lib/esm/resources/order_subscriptions.js +2 -6
- package/lib/esm/resources/order_validation_rules.d.ts +2 -3
- package/lib/esm/resources/order_validation_rules.js +0 -4
- package/lib/esm/resources/orders.d.ts +182 -183
- package/lib/esm/resources/orders.js +2 -6
- package/lib/esm/resources/organization.d.ts +16 -16
- package/lib/esm/resources/organization.js +0 -1
- package/lib/esm/resources/packages.d.ts +17 -18
- package/lib/esm/resources/packages.js +2 -6
- package/lib/esm/resources/parcel_line_items.d.ts +9 -10
- package/lib/esm/resources/parcel_line_items.js +2 -6
- package/lib/esm/resources/parcels.d.ts +75 -76
- package/lib/esm/resources/parcels.js +2 -6
- package/lib/esm/resources/payment_gateways.d.ts +2 -3
- package/lib/esm/resources/payment_gateways.js +0 -4
- package/lib/esm/resources/payment_methods.d.ts +33 -34
- package/lib/esm/resources/payment_methods.js +2 -6
- package/lib/esm/resources/paypal_gateways.d.ts +6 -7
- package/lib/esm/resources/paypal_gateways.js +2 -6
- package/lib/esm/resources/paypal_payments.d.ts +20 -21
- package/lib/esm/resources/paypal_payments.js +2 -6
- package/lib/esm/resources/percentage_discount_promotions.d.ts +36 -37
- package/lib/esm/resources/percentage_discount_promotions.js +2 -6
- package/lib/esm/resources/price_lists.d.ts +9 -10
- package/lib/esm/resources/price_lists.js +2 -6
- package/lib/esm/resources/price_tiers.d.ts +7 -8
- package/lib/esm/resources/price_tiers.js +0 -4
- package/lib/esm/resources/price_volume_tiers.d.ts +12 -13
- package/lib/esm/resources/price_volume_tiers.js +2 -6
- package/lib/esm/resources/prices.d.ts +21 -22
- package/lib/esm/resources/prices.js +2 -6
- package/lib/esm/resources/promotion_rules.d.ts +2 -4
- package/lib/esm/resources/promotion_rules.js +0 -4
- package/lib/esm/resources/promotions.d.ts +13 -14
- package/lib/esm/resources/promotions.js +0 -4
- package/lib/esm/resources/refunds.d.ts +14 -15
- package/lib/esm/resources/refunds.js +0 -4
- package/lib/esm/resources/return_line_items.d.ts +14 -15
- package/lib/esm/resources/return_line_items.js +2 -6
- package/lib/esm/resources/returns.d.ts +29 -30
- package/lib/esm/resources/returns.js +2 -6
- package/lib/esm/resources/satispay_gateways.d.ts +7 -8
- package/lib/esm/resources/satispay_gateways.js +2 -6
- package/lib/esm/resources/satispay_payments.d.ts +13 -14
- package/lib/esm/resources/satispay_payments.js +2 -6
- package/lib/esm/resources/shipments.d.ts +40 -41
- package/lib/esm/resources/shipments.js +1 -5
- package/lib/esm/resources/shipping_categories.d.ts +4 -5
- package/lib/esm/resources/shipping_categories.js +2 -6
- package/lib/esm/resources/shipping_method_tiers.d.ts +7 -8
- package/lib/esm/resources/shipping_method_tiers.js +0 -4
- package/lib/esm/resources/shipping_methods.d.ts +50 -51
- package/lib/esm/resources/shipping_methods.js +2 -6
- package/lib/esm/resources/shipping_weight_tiers.d.ts +12 -13
- package/lib/esm/resources/shipping_weight_tiers.js +2 -6
- package/lib/esm/resources/shipping_zones.d.ts +21 -22
- package/lib/esm/resources/shipping_zones.js +2 -6
- package/lib/esm/resources/sku_list_items.d.ts +13 -14
- package/lib/esm/resources/sku_list_items.js +2 -6
- package/lib/esm/resources/sku_list_promotion_rules.d.ts +12 -13
- package/lib/esm/resources/sku_list_promotion_rules.js +2 -6
- package/lib/esm/resources/sku_lists.d.ts +22 -23
- package/lib/esm/resources/sku_lists.js +2 -6
- package/lib/esm/resources/sku_options.d.ts +24 -25
- package/lib/esm/resources/sku_options.js +2 -6
- package/lib/esm/resources/skus.d.ts +36 -37
- package/lib/esm/resources/skus.js +2 -6
- package/lib/esm/resources/stock_items.d.ts +11 -12
- package/lib/esm/resources/stock_items.js +2 -6
- package/lib/esm/resources/stock_line_items.d.ts +8 -9
- package/lib/esm/resources/stock_line_items.js +0 -4
- package/lib/esm/resources/stock_locations.d.ts +16 -17
- package/lib/esm/resources/stock_locations.js +2 -6
- package/lib/esm/resources/stock_transfers.d.ts +23 -24
- package/lib/esm/resources/stock_transfers.js +2 -6
- package/lib/esm/resources/stripe_gateways.d.ts +11 -12
- package/lib/esm/resources/stripe_gateways.js +2 -6
- package/lib/esm/resources/stripe_payments.d.ts +17 -18
- package/lib/esm/resources/stripe_payments.js +2 -6
- package/lib/esm/resources/tax_calculators.d.ts +3 -4
- package/lib/esm/resources/tax_calculators.js +0 -4
- package/lib/esm/resources/tax_categories.d.ts +9 -10
- package/lib/esm/resources/tax_categories.js +2 -6
- package/lib/esm/resources/tax_rules.d.ts +40 -41
- package/lib/esm/resources/tax_rules.js +2 -6
- package/lib/esm/resources/taxjar_accounts.d.ts +8 -9
- package/lib/esm/resources/taxjar_accounts.js +2 -6
- package/lib/esm/resources/transactions.d.ts +14 -15
- package/lib/esm/resources/transactions.js +0 -4
- package/lib/esm/resources/voids.d.ts +14 -15
- package/lib/esm/resources/voids.js +0 -4
- package/lib/esm/resources/webhooks.d.ts +15 -16
- package/lib/esm/resources/webhooks.js +2 -6
- package/lib/esm/resources/wire_transfers.d.ts +5 -6
- package/lib/esm/resources/wire_transfers.js +2 -6
- package/lib/esm/static.d.ts +1 -1
- package/lib/tsconfig.esm.tsbuildinfo +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +6 -6
@@ -1,5 +1,5 @@
|
|
1
|
-
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel
|
2
|
-
import type { QueryParamsRetrieve
|
1
|
+
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel } from '../resource';
|
2
|
+
import type { QueryParamsRetrieve } from '../query';
|
3
3
|
import type { Order, OrderType } from './orders';
|
4
4
|
import type { PaymentGateway } from './payment_gateways';
|
5
5
|
type StripePaymentType = 'stripe_payments';
|
@@ -11,30 +11,29 @@ type OrderRel = ResourceRel & {
|
|
11
11
|
};
|
12
12
|
interface StripePayment extends Resource {
|
13
13
|
readonly type: StripePaymentType;
|
14
|
-
client_secret
|
15
|
-
publishable_key?: string;
|
16
|
-
options?: object;
|
17
|
-
payment_method?: object;
|
18
|
-
mismatched_amounts?: boolean;
|
19
|
-
intent_amount_cents
|
20
|
-
intent_amount_float?: number;
|
21
|
-
formatted_intent_amount?: string;
|
22
|
-
payment_instrument?: object;
|
23
|
-
order?: Order;
|
24
|
-
payment_gateway?: PaymentGateway;
|
14
|
+
client_secret: string;
|
15
|
+
publishable_key?: string | null;
|
16
|
+
options?: object | null;
|
17
|
+
payment_method?: object | null;
|
18
|
+
mismatched_amounts?: boolean | null;
|
19
|
+
intent_amount_cents: number;
|
20
|
+
intent_amount_float?: number | null;
|
21
|
+
formatted_intent_amount?: string | null;
|
22
|
+
payment_instrument?: object | null;
|
23
|
+
order?: Order | null;
|
24
|
+
payment_gateway?: PaymentGateway | null;
|
25
25
|
}
|
26
26
|
interface StripePaymentCreate extends ResourceCreate {
|
27
|
-
options?: object;
|
27
|
+
options?: object | null;
|
28
28
|
order: OrderRel;
|
29
29
|
}
|
30
30
|
interface StripePaymentUpdate extends ResourceUpdate {
|
31
|
-
options?: object;
|
32
|
-
_refresh?: boolean;
|
33
|
-
order?: OrderRel;
|
31
|
+
options?: object | null;
|
32
|
+
_refresh?: boolean | null;
|
33
|
+
order?: OrderRel | null;
|
34
34
|
}
|
35
35
|
declare class StripePayments extends ApiResource<StripePayment> {
|
36
36
|
static readonly TYPE: StripePaymentType;
|
37
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<StripePayment>>;
|
38
37
|
create(resource: StripePaymentCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StripePayment>;
|
39
38
|
update(resource: StripePaymentUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StripePayment>;
|
40
39
|
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
@@ -1,14 +1,10 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
2
|
class StripePayments extends ApiResource {
|
3
|
-
// static readonly PATH = 'stripe_payments'
|
4
|
-
async list(params, options) {
|
5
|
-
return this.resources.list({ type: StripePayments.TYPE }, params, options);
|
6
|
-
}
|
7
3
|
async create(resource, params, options) {
|
8
|
-
return this.resources.create(
|
4
|
+
return this.resources.create({ ...resource, type: StripePayments.TYPE }, params, options);
|
9
5
|
}
|
10
6
|
async update(resource, params, options) {
|
11
|
-
return this.resources.update(
|
7
|
+
return this.resources.update({ ...resource, type: StripePayments.TYPE }, params, options);
|
12
8
|
}
|
13
9
|
async delete(id, options) {
|
14
10
|
await this.resources.delete((typeof id === 'string') ? { id, type: StripePayments.TYPE } : id, options);
|
@@ -8,13 +8,12 @@ type TaxCalculatorRel = ResourceRel & {
|
|
8
8
|
};
|
9
9
|
interface TaxCalculator extends Resource {
|
10
10
|
readonly type: TaxCalculatorType;
|
11
|
-
name
|
12
|
-
markets?: Market[];
|
13
|
-
attachments?: Attachment[];
|
11
|
+
name: string;
|
12
|
+
markets?: Market[] | null;
|
13
|
+
attachments?: Attachment[] | null;
|
14
14
|
}
|
15
15
|
declare class TaxCalculators extends ApiResource<TaxCalculator> {
|
16
16
|
static readonly TYPE: TaxCalculatorType;
|
17
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<TaxCalculator>>;
|
18
17
|
markets(taxCalculatorId: string | TaxCalculator, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Market>>;
|
19
18
|
attachments(taxCalculatorId: string | TaxCalculator, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
20
19
|
isTaxCalculator(resource: any): resource is TaxCalculator;
|
@@ -1,9 +1,5 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
2
|
class TaxCalculators extends ApiResource {
|
3
|
-
// static readonly PATH = 'tax_calculators'
|
4
|
-
async list(params, options) {
|
5
|
-
return this.resources.list({ type: TaxCalculators.TYPE }, params, options);
|
6
|
-
}
|
7
3
|
async markets(taxCalculatorId, params, options) {
|
8
4
|
const _taxCalculatorId = taxCalculatorId.id || taxCalculatorId;
|
9
5
|
return this.resources.fetch({ type: 'markets' }, `tax_calculators/${_taxCalculatorId}/markets`, params, options);
|
@@ -27,26 +27,25 @@ type ExternalTaxCalculatorRel = ResourceRel & {
|
|
27
27
|
};
|
28
28
|
interface TaxCategory extends Resource {
|
29
29
|
readonly type: TaxCategoryType;
|
30
|
-
code
|
31
|
-
sku_code?: string;
|
32
|
-
sku?: Sku;
|
33
|
-
tax_calculator?: AvalaraAccount | TaxjarAccount | ManualTaxCalculator | ExternalTaxCalculator;
|
34
|
-
attachments?: Attachment[];
|
30
|
+
code: string;
|
31
|
+
sku_code?: string | null;
|
32
|
+
sku?: Sku | null;
|
33
|
+
tax_calculator?: AvalaraAccount | TaxjarAccount | ManualTaxCalculator | ExternalTaxCalculator | null;
|
34
|
+
attachments?: Attachment[] | null;
|
35
35
|
}
|
36
36
|
interface TaxCategoryCreate extends ResourceCreate {
|
37
37
|
code: string;
|
38
|
-
sku_code?: string;
|
38
|
+
sku_code?: string | null;
|
39
39
|
sku: SkuRel;
|
40
40
|
tax_calculator: AvalaraAccountRel | TaxjarAccountRel | ManualTaxCalculatorRel | ExternalTaxCalculatorRel;
|
41
41
|
}
|
42
42
|
interface TaxCategoryUpdate extends ResourceUpdate {
|
43
|
-
code?: string;
|
44
|
-
sku_code?: string;
|
45
|
-
sku?: SkuRel;
|
43
|
+
code?: string | null;
|
44
|
+
sku_code?: string | null;
|
45
|
+
sku?: SkuRel | null;
|
46
46
|
}
|
47
47
|
declare class TaxCategories extends ApiResource<TaxCategory> {
|
48
48
|
static readonly TYPE: TaxCategoryType;
|
49
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<TaxCategory>>;
|
50
49
|
create(resource: TaxCategoryCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<TaxCategory>;
|
51
50
|
update(resource: TaxCategoryUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<TaxCategory>;
|
52
51
|
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
@@ -1,14 +1,10 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
2
|
class TaxCategories extends ApiResource {
|
3
|
-
// static readonly PATH = 'tax_categories'
|
4
|
-
async list(params, options) {
|
5
|
-
return this.resources.list({ type: TaxCategories.TYPE }, params, options);
|
6
|
-
}
|
7
3
|
async create(resource, params, options) {
|
8
|
-
return this.resources.create(
|
4
|
+
return this.resources.create({ ...resource, type: TaxCategories.TYPE }, params, options);
|
9
5
|
}
|
10
6
|
async update(resource, params, options) {
|
11
|
-
return this.resources.update(
|
7
|
+
return this.resources.update({ ...resource, type: TaxCategories.TYPE }, params, options);
|
12
8
|
}
|
13
9
|
async delete(id, options) {
|
14
10
|
await this.resources.delete((typeof id === 'string') ? { id, type: TaxCategories.TYPE } : id, options);
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel
|
2
|
-
import type { QueryParamsRetrieve
|
1
|
+
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel } from '../resource';
|
2
|
+
import type { QueryParamsRetrieve } from '../query';
|
3
3
|
import type { ManualTaxCalculator, ManualTaxCalculatorType } from './manual_tax_calculators';
|
4
4
|
type TaxRuleType = 'tax_rules';
|
5
5
|
type TaxRuleRel = ResourceRel & {
|
@@ -10,54 +10,53 @@ type ManualTaxCalculatorRel = ResourceRel & {
|
|
10
10
|
};
|
11
11
|
interface TaxRule extends Resource {
|
12
12
|
readonly type: TaxRuleType;
|
13
|
-
name
|
14
|
-
tax_rate?: number;
|
15
|
-
country_code_regex?: string;
|
16
|
-
not_country_code_regex?: string;
|
17
|
-
state_code_regex?: string;
|
18
|
-
not_state_code_regex?: string;
|
19
|
-
zip_code_regex?: string;
|
20
|
-
not_zip_code_regex?: string;
|
21
|
-
freight_taxable?: boolean;
|
22
|
-
payment_method_taxable?: boolean;
|
23
|
-
gift_card_taxable?: boolean;
|
24
|
-
adjustment_taxable?: boolean;
|
25
|
-
breakdown?: object;
|
26
|
-
manual_tax_calculator?: ManualTaxCalculator;
|
13
|
+
name: string;
|
14
|
+
tax_rate?: number | null;
|
15
|
+
country_code_regex?: string | null;
|
16
|
+
not_country_code_regex?: string | null;
|
17
|
+
state_code_regex?: string | null;
|
18
|
+
not_state_code_regex?: string | null;
|
19
|
+
zip_code_regex?: string | null;
|
20
|
+
not_zip_code_regex?: string | null;
|
21
|
+
freight_taxable?: boolean | null;
|
22
|
+
payment_method_taxable?: boolean | null;
|
23
|
+
gift_card_taxable?: boolean | null;
|
24
|
+
adjustment_taxable?: boolean | null;
|
25
|
+
breakdown?: object | null;
|
26
|
+
manual_tax_calculator?: ManualTaxCalculator | null;
|
27
27
|
}
|
28
28
|
interface TaxRuleCreate extends ResourceCreate {
|
29
29
|
name: string;
|
30
|
-
tax_rate?: number;
|
31
|
-
country_code_regex?: string;
|
32
|
-
not_country_code_regex?: string;
|
33
|
-
state_code_regex?: string;
|
34
|
-
not_state_code_regex?: string;
|
35
|
-
zip_code_regex?: string;
|
36
|
-
not_zip_code_regex?: string;
|
37
|
-
freight_taxable?: boolean;
|
38
|
-
payment_method_taxable?: boolean;
|
39
|
-
gift_card_taxable?: boolean;
|
40
|
-
adjustment_taxable?: boolean;
|
30
|
+
tax_rate?: number | null;
|
31
|
+
country_code_regex?: string | null;
|
32
|
+
not_country_code_regex?: string | null;
|
33
|
+
state_code_regex?: string | null;
|
34
|
+
not_state_code_regex?: string | null;
|
35
|
+
zip_code_regex?: string | null;
|
36
|
+
not_zip_code_regex?: string | null;
|
37
|
+
freight_taxable?: boolean | null;
|
38
|
+
payment_method_taxable?: boolean | null;
|
39
|
+
gift_card_taxable?: boolean | null;
|
40
|
+
adjustment_taxable?: boolean | null;
|
41
41
|
manual_tax_calculator: ManualTaxCalculatorRel;
|
42
42
|
}
|
43
43
|
interface TaxRuleUpdate extends ResourceUpdate {
|
44
|
-
name?: string;
|
45
|
-
tax_rate?: number;
|
46
|
-
country_code_regex?: string;
|
47
|
-
not_country_code_regex?: string;
|
48
|
-
state_code_regex?: string;
|
49
|
-
not_state_code_regex?: string;
|
50
|
-
zip_code_regex?: string;
|
51
|
-
not_zip_code_regex?: string;
|
52
|
-
freight_taxable?: boolean;
|
53
|
-
payment_method_taxable?: boolean;
|
54
|
-
gift_card_taxable?: boolean;
|
55
|
-
adjustment_taxable?: boolean;
|
56
|
-
manual_tax_calculator?: ManualTaxCalculatorRel;
|
44
|
+
name?: string | null;
|
45
|
+
tax_rate?: number | null;
|
46
|
+
country_code_regex?: string | null;
|
47
|
+
not_country_code_regex?: string | null;
|
48
|
+
state_code_regex?: string | null;
|
49
|
+
not_state_code_regex?: string | null;
|
50
|
+
zip_code_regex?: string | null;
|
51
|
+
not_zip_code_regex?: string | null;
|
52
|
+
freight_taxable?: boolean | null;
|
53
|
+
payment_method_taxable?: boolean | null;
|
54
|
+
gift_card_taxable?: boolean | null;
|
55
|
+
adjustment_taxable?: boolean | null;
|
56
|
+
manual_tax_calculator?: ManualTaxCalculatorRel | null;
|
57
57
|
}
|
58
58
|
declare class TaxRules extends ApiResource<TaxRule> {
|
59
59
|
static readonly TYPE: TaxRuleType;
|
60
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<TaxRule>>;
|
61
60
|
create(resource: TaxRuleCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<TaxRule>;
|
62
61
|
update(resource: TaxRuleUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<TaxRule>;
|
63
62
|
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
@@ -1,14 +1,10 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
2
|
class TaxRules extends ApiResource {
|
3
|
-
// static readonly PATH = 'tax_rules'
|
4
|
-
async list(params, options) {
|
5
|
-
return this.resources.list({ type: TaxRules.TYPE }, params, options);
|
6
|
-
}
|
7
3
|
async create(resource, params, options) {
|
8
|
-
return this.resources.create(
|
4
|
+
return this.resources.create({ ...resource, type: TaxRules.TYPE }, params, options);
|
9
5
|
}
|
10
6
|
async update(resource, params, options) {
|
11
|
-
return this.resources.update(
|
7
|
+
return this.resources.update({ ...resource, type: TaxRules.TYPE }, params, options);
|
12
8
|
}
|
13
9
|
async delete(id, options) {
|
14
10
|
await this.resources.delete((typeof id === 'string') ? { id, type: TaxRules.TYPE } : id, options);
|
@@ -12,24 +12,23 @@ type TaxCategoryRel = ResourceRel & {
|
|
12
12
|
};
|
13
13
|
interface TaxjarAccount extends Resource {
|
14
14
|
readonly type: TaxjarAccountType;
|
15
|
-
name
|
16
|
-
markets?: Market[];
|
17
|
-
attachments?: Attachment[];
|
18
|
-
tax_categories?: TaxCategory[];
|
15
|
+
name: string;
|
16
|
+
markets?: Market[] | null;
|
17
|
+
attachments?: Attachment[] | null;
|
18
|
+
tax_categories?: TaxCategory[] | null;
|
19
19
|
}
|
20
20
|
interface TaxjarAccountCreate extends ResourceCreate {
|
21
21
|
name: string;
|
22
22
|
api_key: string;
|
23
|
-
tax_categories?: TaxCategoryRel[];
|
23
|
+
tax_categories?: TaxCategoryRel[] | null;
|
24
24
|
}
|
25
25
|
interface TaxjarAccountUpdate extends ResourceUpdate {
|
26
|
-
name?: string;
|
27
|
-
api_key?: string;
|
28
|
-
tax_categories?: TaxCategoryRel[];
|
26
|
+
name?: string | null;
|
27
|
+
api_key?: string | null;
|
28
|
+
tax_categories?: TaxCategoryRel[] | null;
|
29
29
|
}
|
30
30
|
declare class TaxjarAccounts extends ApiResource<TaxjarAccount> {
|
31
31
|
static readonly TYPE: TaxjarAccountType;
|
32
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<TaxjarAccount>>;
|
33
32
|
create(resource: TaxjarAccountCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<TaxjarAccount>;
|
34
33
|
update(resource: TaxjarAccountUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<TaxjarAccount>;
|
35
34
|
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
@@ -1,14 +1,10 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
2
|
class TaxjarAccounts extends ApiResource {
|
3
|
-
// static readonly PATH = 'taxjar_accounts'
|
4
|
-
async list(params, options) {
|
5
|
-
return this.resources.list({ type: TaxjarAccounts.TYPE }, params, options);
|
6
|
-
}
|
7
3
|
async create(resource, params, options) {
|
8
|
-
return this.resources.create(
|
4
|
+
return this.resources.create({ ...resource, type: TaxjarAccounts.TYPE }, params, options);
|
9
5
|
}
|
10
6
|
async update(resource, params, options) {
|
11
|
-
return this.resources.update(
|
7
|
+
return this.resources.update({ ...resource, type: TaxjarAccounts.TYPE }, params, options);
|
12
8
|
}
|
13
9
|
async delete(id, options) {
|
14
10
|
await this.resources.delete((typeof id === 'string') ? { id, type: TaxjarAccounts.TYPE } : id, options);
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { ApiResource, Resource, ResourceId, ResourcesConfig, ResourceRel
|
2
|
-
import type { QueryParamsRetrieve
|
1
|
+
import { ApiResource, Resource, ResourceId, ResourcesConfig, ResourceRel } from '../resource';
|
2
|
+
import type { QueryParamsRetrieve } from '../query';
|
3
3
|
import type { Order } from './orders';
|
4
4
|
type TransactionType = 'transactions';
|
5
5
|
type TransactionRel = ResourceRel & {
|
@@ -7,22 +7,21 @@ type TransactionRel = ResourceRel & {
|
|
7
7
|
};
|
8
8
|
interface Transaction extends Resource {
|
9
9
|
readonly type: TransactionType;
|
10
|
-
number
|
11
|
-
currency_code
|
12
|
-
amount_cents
|
13
|
-
amount_float
|
14
|
-
formatted_amount
|
15
|
-
succeeded
|
16
|
-
message?: string;
|
17
|
-
error_code?: string;
|
18
|
-
error_detail?: string;
|
19
|
-
token?: string;
|
20
|
-
gateway_transaction_id?: string;
|
21
|
-
order?: Order;
|
10
|
+
number: string;
|
11
|
+
currency_code: string;
|
12
|
+
amount_cents: number;
|
13
|
+
amount_float: number;
|
14
|
+
formatted_amount: string;
|
15
|
+
succeeded: boolean;
|
16
|
+
message?: string | null;
|
17
|
+
error_code?: string | null;
|
18
|
+
error_detail?: string | null;
|
19
|
+
token?: string | null;
|
20
|
+
gateway_transaction_id?: string | null;
|
21
|
+
order?: Order | null;
|
22
22
|
}
|
23
23
|
declare class Transactions extends ApiResource<Transaction> {
|
24
24
|
static readonly TYPE: TransactionType;
|
25
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Transaction>>;
|
26
25
|
order(transactionId: string | Transaction, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
27
26
|
isTransaction(resource: any): resource is Transaction;
|
28
27
|
relationship(id: string | ResourceId | null): TransactionRel;
|
@@ -1,9 +1,5 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
2
|
class Transactions extends ApiResource {
|
3
|
-
// static readonly PATH = 'transactions'
|
4
|
-
async list(params, options) {
|
5
|
-
return this.resources.list({ type: Transactions.TYPE }, params, options);
|
6
|
-
}
|
7
3
|
async order(transactionId, params, options) {
|
8
4
|
const _transactionId = transactionId.id || transactionId;
|
9
5
|
return this.resources.fetch({ type: 'orders' }, `transactions/${_transactionId}/order`, params, options);
|
@@ -9,24 +9,23 @@ type VoidRel = ResourceRel & {
|
|
9
9
|
};
|
10
10
|
interface Void extends Resource {
|
11
11
|
readonly type: VoidType;
|
12
|
-
number
|
13
|
-
currency_code
|
14
|
-
amount_cents
|
15
|
-
amount_float
|
16
|
-
formatted_amount
|
17
|
-
succeeded
|
18
|
-
message?: string;
|
19
|
-
error_code?: string;
|
20
|
-
error_detail?: string;
|
21
|
-
token?: string;
|
22
|
-
gateway_transaction_id?: string;
|
23
|
-
order?: Order;
|
24
|
-
reference_authorization?: Authorization;
|
25
|
-
events?: Event[];
|
12
|
+
number: string;
|
13
|
+
currency_code: string;
|
14
|
+
amount_cents: number;
|
15
|
+
amount_float: number;
|
16
|
+
formatted_amount: string;
|
17
|
+
succeeded: boolean;
|
18
|
+
message?: string | null;
|
19
|
+
error_code?: string | null;
|
20
|
+
error_detail?: string | null;
|
21
|
+
token?: string | null;
|
22
|
+
gateway_transaction_id?: string | null;
|
23
|
+
order?: Order | null;
|
24
|
+
reference_authorization?: Authorization | null;
|
25
|
+
events?: Event[] | null;
|
26
26
|
}
|
27
27
|
declare class Voids extends ApiResource<Void> {
|
28
28
|
static readonly TYPE: VoidType;
|
29
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Void>>;
|
30
29
|
order(voidId: string | Void, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
31
30
|
reference_authorization(voidId: string | Void, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Authorization>;
|
32
31
|
events(voidId: string | Void, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
@@ -1,9 +1,5 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
2
|
class Voids extends ApiResource {
|
3
|
-
// static readonly PATH = 'voids'
|
4
|
-
async list(params, options) {
|
5
|
-
return this.resources.list({ type: Voids.TYPE }, params, options);
|
6
|
-
}
|
7
3
|
async order(voidId, params, options) {
|
8
4
|
const _voidId = voidId.id || voidId;
|
9
5
|
return this.resources.fetch({ type: 'orders' }, `voids/${_voidId}/order`, params, options);
|
@@ -7,31 +7,30 @@ type WebhookRel = ResourceRel & {
|
|
7
7
|
};
|
8
8
|
interface Webhook extends Resource {
|
9
9
|
readonly type: WebhookType;
|
10
|
-
name?: string;
|
11
|
-
topic
|
12
|
-
callback_url
|
13
|
-
include_resources?: string[];
|
14
|
-
circuit_state?: string;
|
15
|
-
circuit_failure_count?: number;
|
16
|
-
shared_secret
|
17
|
-
last_event_callbacks?: EventCallback[];
|
10
|
+
name?: string | null;
|
11
|
+
topic: string;
|
12
|
+
callback_url: string;
|
13
|
+
include_resources?: string[] | null;
|
14
|
+
circuit_state?: string | null;
|
15
|
+
circuit_failure_count?: number | null;
|
16
|
+
shared_secret: string;
|
17
|
+
last_event_callbacks?: EventCallback[] | null;
|
18
18
|
}
|
19
19
|
interface WebhookCreate extends ResourceCreate {
|
20
|
-
name?: string;
|
20
|
+
name?: string | null;
|
21
21
|
topic: string;
|
22
22
|
callback_url: string;
|
23
|
-
include_resources?: string[];
|
23
|
+
include_resources?: string[] | null;
|
24
24
|
}
|
25
25
|
interface WebhookUpdate extends ResourceUpdate {
|
26
|
-
name?: string;
|
27
|
-
topic?: string;
|
28
|
-
callback_url?: string;
|
29
|
-
include_resources?: string[];
|
30
|
-
_reset_circuit?: boolean;
|
26
|
+
name?: string | null;
|
27
|
+
topic?: string | null;
|
28
|
+
callback_url?: string | null;
|
29
|
+
include_resources?: string[] | null;
|
30
|
+
_reset_circuit?: boolean | null;
|
31
31
|
}
|
32
32
|
declare class Webhooks extends ApiResource<Webhook> {
|
33
33
|
static readonly TYPE: WebhookType;
|
34
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Webhook>>;
|
35
34
|
create(resource: WebhookCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Webhook>;
|
36
35
|
update(resource: WebhookUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Webhook>;
|
37
36
|
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
@@ -1,14 +1,10 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
2
|
class Webhooks extends ApiResource {
|
3
|
-
// static readonly PATH = 'webhooks'
|
4
|
-
async list(params, options) {
|
5
|
-
return this.resources.list({ type: Webhooks.TYPE }, params, options);
|
6
|
-
}
|
7
3
|
async create(resource, params, options) {
|
8
|
-
return this.resources.create(
|
4
|
+
return this.resources.create({ ...resource, type: Webhooks.TYPE }, params, options);
|
9
5
|
}
|
10
6
|
async update(resource, params, options) {
|
11
|
-
return this.resources.update(
|
7
|
+
return this.resources.update({ ...resource, type: Webhooks.TYPE }, params, options);
|
12
8
|
}
|
13
9
|
async delete(id, options) {
|
14
10
|
await this.resources.delete((typeof id === 'string') ? { id, type: Webhooks.TYPE } : id, options);
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel
|
2
|
-
import type { QueryParamsRetrieve
|
1
|
+
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel } from '../resource';
|
2
|
+
import type { QueryParamsRetrieve } from '../query';
|
3
3
|
import type { Order, OrderType } from './orders';
|
4
4
|
type WireTransferType = 'wire_transfers';
|
5
5
|
type WireTransferRel = ResourceRel & {
|
@@ -10,18 +10,17 @@ type OrderRel = ResourceRel & {
|
|
10
10
|
};
|
11
11
|
interface WireTransfer extends Resource {
|
12
12
|
readonly type: WireTransferType;
|
13
|
-
payment_instrument?: object;
|
14
|
-
order?: Order;
|
13
|
+
payment_instrument?: object | null;
|
14
|
+
order?: Order | null;
|
15
15
|
}
|
16
16
|
interface WireTransferCreate extends ResourceCreate {
|
17
17
|
order: OrderRel;
|
18
18
|
}
|
19
19
|
interface WireTransferUpdate extends ResourceUpdate {
|
20
|
-
order?: OrderRel;
|
20
|
+
order?: OrderRel | null;
|
21
21
|
}
|
22
22
|
declare class WireTransfers extends ApiResource<WireTransfer> {
|
23
23
|
static readonly TYPE: WireTransferType;
|
24
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<WireTransfer>>;
|
25
24
|
create(resource: WireTransferCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<WireTransfer>;
|
26
25
|
update(resource: WireTransferUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<WireTransfer>;
|
27
26
|
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
@@ -1,14 +1,10 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
2
|
class WireTransfers extends ApiResource {
|
3
|
-
// static readonly PATH = 'wire_transfers'
|
4
|
-
async list(params, options) {
|
5
|
-
return this.resources.list({ type: WireTransfers.TYPE }, params, options);
|
6
|
-
}
|
7
3
|
async create(resource, params, options) {
|
8
|
-
return this.resources.create(
|
4
|
+
return this.resources.create({ ...resource, type: WireTransfers.TYPE }, params, options);
|
9
5
|
}
|
10
6
|
async update(resource, params, options) {
|
11
|
-
return this.resources.update(
|
7
|
+
return this.resources.update({ ...resource, type: WireTransfers.TYPE }, params, options);
|
12
8
|
}
|
13
9
|
async delete(id, options) {
|
14
10
|
await this.resources.delete((typeof id === 'string') ? { id, type: WireTransfers.TYPE } : id, options);
|
package/lib/esm/static.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { SdkError, ApiError } from './error';
|
2
|
-
import { CommerceLayerClient, CommerceLayerInitConfig } from './commercelayer';
|
2
|
+
import type { CommerceLayerClient, CommerceLayerInitConfig } from './commercelayer';
|
3
3
|
export declare const CommerceLayerStatic: {
|
4
4
|
resources: () => readonly string[];
|
5
5
|
isSdkError: (error: unknown) => error is SdkError;
|