@commercelayer/sdk 4.27.1 → 4.28.1
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 +10 -3
- package/lib/cjs/api.js +25 -4
- package/lib/cjs/commercelayer.d.ts +9 -2
- package/lib/cjs/commercelayer.js +8 -1
- package/lib/cjs/model.d.ts +10 -3
- package/lib/cjs/resource.d.ts +7 -9
- package/lib/cjs/resources/addresses.d.ts +14 -0
- package/lib/cjs/resources/addresses.js +12 -0
- package/lib/cjs/resources/adjustments.d.ts +3 -0
- package/lib/cjs/resources/adjustments.js +4 -0
- package/lib/cjs/resources/adyen_gateways.d.ts +5 -2
- package/lib/cjs/resources/adyen_gateways.js +4 -0
- package/lib/cjs/resources/adyen_payments.d.ts +3 -0
- package/lib/cjs/resources/adyen_payments.js +4 -0
- package/lib/cjs/resources/authorizations.d.ts +9 -3
- package/lib/cjs/resources/authorizations.js +12 -4
- package/lib/cjs/resources/avalara_accounts.d.ts +9 -6
- package/lib/cjs/resources/avalara_accounts.js +4 -0
- package/lib/cjs/resources/axerve_gateways.d.ts +4 -0
- package/lib/cjs/resources/axerve_gateways.js +4 -0
- package/lib/cjs/resources/axerve_payments.d.ts +9 -0
- package/lib/cjs/resources/axerve_payments.js +4 -0
- package/lib/cjs/resources/billing_info_validation_rules.d.ts +3 -0
- package/lib/cjs/resources/billing_info_validation_rules.js +4 -0
- package/lib/cjs/resources/braintree_gateways.d.ts +3 -0
- package/lib/cjs/resources/braintree_gateways.js +4 -0
- package/lib/cjs/resources/braintree_payments.d.ts +3 -0
- package/lib/cjs/resources/braintree_payments.js +4 -0
- package/lib/cjs/resources/bundles.d.ts +16 -2
- package/lib/cjs/resources/bundles.js +12 -0
- package/lib/cjs/resources/buy_x_pay_y_promotions.d.ts +134 -0
- package/lib/cjs/resources/buy_x_pay_y_promotions.js +81 -0
- package/lib/cjs/resources/captures.d.ts +9 -3
- package/lib/cjs/resources/captures.js +12 -4
- package/lib/cjs/resources/carrier_accounts.d.ts +3 -0
- package/lib/cjs/resources/carrier_accounts.js +4 -0
- package/lib/cjs/resources/checkout_com_gateways.d.ts +3 -0
- package/lib/cjs/resources/checkout_com_gateways.js +4 -0
- package/lib/cjs/resources/checkout_com_payments.d.ts +3 -0
- package/lib/cjs/resources/checkout_com_payments.js +4 -0
- package/lib/cjs/resources/cleanups.d.ts +3 -0
- package/lib/cjs/resources/cleanups.js +4 -0
- package/lib/cjs/resources/coupon_codes_promotion_rules.d.ts +10 -3
- package/lib/cjs/resources/coupon_codes_promotion_rules.js +4 -0
- package/lib/cjs/resources/coupon_recipients.d.ts +3 -0
- package/lib/cjs/resources/coupon_recipients.js +4 -0
- package/lib/cjs/resources/coupons.d.ts +26 -1
- package/lib/cjs/resources/coupons.js +16 -0
- package/lib/cjs/resources/custom_promotion_rules.d.ts +61 -0
- package/lib/cjs/resources/custom_promotion_rules.js +37 -0
- package/lib/cjs/resources/customer_addresses.d.ts +5 -0
- package/lib/cjs/resources/customer_addresses.js +4 -0
- package/lib/cjs/resources/customer_groups.d.ts +3 -0
- package/lib/cjs/resources/customer_groups.js +4 -0
- package/lib/cjs/resources/customer_payment_sources.d.ts +18 -11
- package/lib/cjs/resources/customer_payment_sources.js +8 -0
- package/lib/cjs/resources/customer_subscriptions.d.ts +3 -0
- package/lib/cjs/resources/customer_subscriptions.js +4 -0
- package/lib/cjs/resources/customers.d.ts +9 -0
- package/lib/cjs/resources/customers.js +4 -0
- package/lib/cjs/resources/delivery_lead_times.d.ts +3 -0
- package/lib/cjs/resources/delivery_lead_times.js +4 -0
- package/lib/cjs/resources/external_gateways.d.ts +3 -0
- package/lib/cjs/resources/external_gateways.js +4 -0
- package/lib/cjs/resources/external_payments.d.ts +3 -0
- package/lib/cjs/resources/external_payments.js +4 -0
- package/lib/cjs/resources/external_promotions.d.ts +45 -6
- package/lib/cjs/resources/external_promotions.js +24 -0
- package/lib/cjs/resources/external_tax_calculators.d.ts +3 -0
- package/lib/cjs/resources/external_tax_calculators.js +4 -0
- package/lib/cjs/resources/fixed_amount_promotions.d.ts +45 -6
- package/lib/cjs/resources/fixed_amount_promotions.js +24 -0
- package/lib/cjs/resources/fixed_price_promotions.d.ts +37 -9
- package/lib/cjs/resources/fixed_price_promotions.js +18 -2
- package/lib/cjs/resources/free_gift_promotions.d.ts +37 -9
- package/lib/cjs/resources/free_gift_promotions.js +18 -2
- package/lib/cjs/resources/free_shipping_promotions.d.ts +42 -6
- package/lib/cjs/resources/free_shipping_promotions.js +20 -0
- package/lib/cjs/resources/gift_card_recipients.d.ts +3 -0
- package/lib/cjs/resources/gift_card_recipients.js +4 -0
- package/lib/cjs/resources/gift_cards.d.ts +11 -0
- package/lib/cjs/resources/gift_cards.js +8 -0
- package/lib/cjs/resources/imports.d.ts +1 -3
- package/lib/cjs/resources/in_stock_subscriptions.d.ts +3 -0
- package/lib/cjs/resources/in_stock_subscriptions.js +4 -0
- package/lib/cjs/resources/inventory_models.d.ts +12 -0
- package/lib/cjs/resources/inventory_models.js +4 -0
- package/lib/cjs/resources/inventory_return_locations.d.ts +3 -0
- package/lib/cjs/resources/inventory_return_locations.js +4 -0
- package/lib/cjs/resources/inventory_stock_locations.d.ts +3 -0
- package/lib/cjs/resources/inventory_stock_locations.js +4 -0
- package/lib/cjs/resources/klarna_gateways.d.ts +3 -0
- package/lib/cjs/resources/klarna_gateways.js +4 -0
- package/lib/cjs/resources/klarna_payments.d.ts +3 -0
- package/lib/cjs/resources/klarna_payments.js +4 -0
- package/lib/cjs/resources/line_item_options.d.ts +11 -0
- package/lib/cjs/resources/line_item_options.js +8 -0
- package/lib/cjs/resources/line_items.d.ts +30 -0
- package/lib/cjs/resources/line_items.js +16 -0
- package/lib/cjs/resources/manual_gateways.d.ts +3 -0
- package/lib/cjs/resources/manual_gateways.js +4 -0
- package/lib/cjs/resources/manual_tax_calculators.d.ts +3 -0
- package/lib/cjs/resources/manual_tax_calculators.js +4 -0
- package/lib/cjs/resources/markets.d.ts +8 -0
- package/lib/cjs/resources/markets.js +4 -0
- package/lib/cjs/resources/merchants.d.ts +3 -0
- package/lib/cjs/resources/merchants.js +4 -0
- package/lib/cjs/resources/order_amount_promotion_rules.d.ts +13 -3
- package/lib/cjs/resources/order_amount_promotion_rules.js +4 -0
- package/lib/cjs/resources/order_subscription_items.d.ts +7 -0
- package/lib/cjs/resources/order_subscription_items.js +4 -0
- package/lib/cjs/resources/order_subscriptions.d.ts +4 -0
- package/lib/cjs/resources/order_subscriptions.js +4 -0
- package/lib/cjs/resources/order_validation_rules.d.ts +3 -0
- package/lib/cjs/resources/order_validation_rules.js +4 -0
- package/lib/cjs/resources/orders.d.ts +50 -6
- package/lib/cjs/resources/orders.js +32 -0
- package/lib/cjs/resources/organization.d.ts +4 -4
- package/lib/cjs/resources/packages.d.ts +3 -0
- package/lib/cjs/resources/packages.js +4 -0
- package/lib/cjs/resources/parcel_line_items.d.ts +4 -1
- package/lib/cjs/resources/parcel_line_items.js +4 -0
- package/lib/cjs/resources/parcels.d.ts +9 -3
- package/lib/cjs/resources/parcels.js +4 -0
- package/lib/cjs/resources/payment_gateways.d.ts +3 -0
- package/lib/cjs/resources/payment_gateways.js +4 -0
- package/lib/cjs/resources/payment_methods.d.ts +9 -1
- package/lib/cjs/resources/payment_methods.js +4 -0
- package/lib/cjs/resources/payment_options.d.ts +43 -0
- package/lib/cjs/resources/payment_options.js +41 -0
- package/lib/cjs/resources/paypal_gateways.d.ts +3 -0
- package/lib/cjs/resources/paypal_gateways.js +4 -0
- package/lib/cjs/resources/paypal_payments.d.ts +3 -0
- package/lib/cjs/resources/paypal_payments.js +4 -0
- package/lib/cjs/resources/percentage_discount_promotions.d.ts +37 -9
- package/lib/cjs/resources/percentage_discount_promotions.js +18 -2
- package/lib/cjs/resources/price_frequency_tiers.d.ts +3 -0
- package/lib/cjs/resources/price_frequency_tiers.js +4 -0
- package/lib/cjs/resources/price_lists.d.ts +6 -0
- package/lib/cjs/resources/price_lists.js +4 -0
- package/lib/cjs/resources/price_tiers.d.ts +3 -0
- package/lib/cjs/resources/price_tiers.js +4 -0
- package/lib/cjs/resources/price_volume_tiers.d.ts +3 -0
- package/lib/cjs/resources/price_volume_tiers.js +4 -0
- package/lib/cjs/resources/prices.d.ts +4 -1
- package/lib/cjs/resources/prices.js +4 -0
- package/lib/cjs/resources/promotion_rules.d.ts +5 -1
- package/lib/cjs/resources/promotion_rules.js +4 -0
- package/lib/cjs/resources/promotions.d.ts +18 -0
- package/lib/cjs/resources/promotions.js +20 -0
- package/lib/cjs/resources/refunds.d.ts +9 -3
- package/lib/cjs/resources/refunds.js +10 -2
- package/lib/cjs/resources/reserved_stocks.d.ts +27 -0
- package/lib/cjs/resources/reserved_stocks.js +36 -0
- package/lib/cjs/resources/return_line_items.d.ts +2 -1
- package/lib/cjs/resources/returns.d.ts +11 -0
- package/lib/cjs/resources/returns.js +8 -0
- package/lib/cjs/resources/satispay_gateways.d.ts +6 -0
- package/lib/cjs/resources/satispay_gateways.js +4 -0
- package/lib/cjs/resources/satispay_payments.d.ts +11 -3
- package/lib/cjs/resources/satispay_payments.js +4 -0
- package/lib/cjs/resources/shipments.d.ts +49 -2
- package/lib/cjs/resources/shipments.js +18 -0
- package/lib/cjs/resources/shipping_categories.d.ts +6 -0
- package/lib/cjs/resources/shipping_categories.js +4 -0
- package/lib/cjs/resources/shipping_method_tiers.d.ts +3 -0
- package/lib/cjs/resources/shipping_method_tiers.js +4 -0
- package/lib/cjs/resources/shipping_methods.d.ts +11 -0
- package/lib/cjs/resources/shipping_methods.js +4 -0
- package/lib/cjs/resources/shipping_weight_tiers.d.ts +3 -0
- package/lib/cjs/resources/shipping_weight_tiers.js +4 -0
- package/lib/cjs/resources/shipping_zones.d.ts +3 -0
- package/lib/cjs/resources/shipping_zones.js +4 -0
- package/lib/cjs/resources/sku_list_items.d.ts +3 -0
- package/lib/cjs/resources/sku_list_items.js +4 -0
- package/lib/cjs/resources/sku_list_promotion_rules.d.ts +10 -3
- package/lib/cjs/resources/sku_list_promotion_rules.js +4 -0
- package/lib/cjs/resources/sku_lists.d.ts +3 -0
- package/lib/cjs/resources/sku_lists.js +4 -0
- package/lib/cjs/resources/sku_options.d.ts +14 -0
- package/lib/cjs/resources/sku_options.js +12 -0
- package/lib/cjs/resources/skus.d.ts +17 -0
- package/lib/cjs/resources/skus.js +16 -0
- package/lib/cjs/resources/stock_items.d.ts +9 -0
- package/lib/cjs/resources/stock_items.js +12 -0
- package/lib/cjs/resources/stock_line_items.d.ts +42 -2
- package/lib/cjs/resources/stock_line_items.js +17 -0
- package/lib/cjs/resources/stock_locations.d.ts +6 -0
- package/lib/cjs/resources/stock_locations.js +4 -0
- package/lib/cjs/resources/stock_reservations.d.ts +49 -0
- package/lib/cjs/resources/stock_reservations.js +53 -0
- package/lib/cjs/resources/stock_transfers.d.ts +5 -0
- package/lib/cjs/resources/stock_transfers.js +4 -0
- package/lib/cjs/resources/stripe_gateways.d.ts +3 -0
- package/lib/cjs/resources/stripe_gateways.js +4 -0
- package/lib/cjs/resources/stripe_payments.d.ts +12 -0
- package/lib/cjs/resources/stripe_payments.js +4 -0
- package/lib/cjs/resources/tags.d.ts +27 -0
- package/lib/cjs/resources/tags.js +33 -0
- package/lib/cjs/resources/tax_calculators.d.ts +3 -0
- package/lib/cjs/resources/tax_calculators.js +4 -0
- package/lib/cjs/resources/tax_categories.d.ts +3 -0
- package/lib/cjs/resources/tax_categories.js +4 -0
- package/lib/cjs/resources/tax_rules.d.ts +3 -0
- package/lib/cjs/resources/tax_rules.js +4 -0
- package/lib/cjs/resources/taxjar_accounts.d.ts +3 -0
- package/lib/cjs/resources/taxjar_accounts.js +4 -0
- package/lib/cjs/resources/transactions.d.ts +9 -0
- package/lib/cjs/resources/transactions.js +12 -0
- package/lib/cjs/resources/versions.d.ts +22 -0
- package/lib/cjs/resources/versions.js +24 -0
- package/lib/cjs/resources/voids.d.ts +9 -3
- package/lib/cjs/resources/voids.js +10 -2
- package/lib/cjs/resources/webhooks.d.ts +8 -0
- package/lib/cjs/resources/webhooks.js +4 -0
- package/lib/cjs/resources/wire_transfers.d.ts +3 -0
- package/lib/cjs/resources/wire_transfers.js +4 -0
- package/lib/cjs/util.d.ts +1 -0
- package/lib/esm/api.d.ts +10 -3
- package/lib/esm/api.js +15 -1
- package/lib/esm/commercelayer.d.ts +9 -2
- package/lib/esm/commercelayer.js +8 -1
- package/lib/esm/model.d.ts +10 -3
- package/lib/esm/resource.d.ts +7 -9
- package/lib/esm/resources/addresses.d.ts +14 -0
- package/lib/esm/resources/addresses.js +12 -0
- package/lib/esm/resources/adjustments.d.ts +3 -0
- package/lib/esm/resources/adjustments.js +4 -0
- package/lib/esm/resources/adyen_gateways.d.ts +5 -2
- package/lib/esm/resources/adyen_gateways.js +4 -0
- package/lib/esm/resources/adyen_payments.d.ts +3 -0
- package/lib/esm/resources/adyen_payments.js +4 -0
- package/lib/esm/resources/authorizations.d.ts +9 -3
- package/lib/esm/resources/authorizations.js +12 -4
- package/lib/esm/resources/avalara_accounts.d.ts +9 -6
- package/lib/esm/resources/avalara_accounts.js +4 -0
- package/lib/esm/resources/axerve_gateways.d.ts +4 -0
- package/lib/esm/resources/axerve_gateways.js +4 -0
- package/lib/esm/resources/axerve_payments.d.ts +9 -0
- package/lib/esm/resources/axerve_payments.js +4 -0
- package/lib/esm/resources/billing_info_validation_rules.d.ts +3 -0
- package/lib/esm/resources/billing_info_validation_rules.js +4 -0
- package/lib/esm/resources/braintree_gateways.d.ts +3 -0
- package/lib/esm/resources/braintree_gateways.js +4 -0
- package/lib/esm/resources/braintree_payments.d.ts +3 -0
- package/lib/esm/resources/braintree_payments.js +4 -0
- package/lib/esm/resources/bundles.d.ts +16 -2
- package/lib/esm/resources/bundles.js +12 -0
- package/lib/esm/resources/buy_x_pay_y_promotions.d.ts +134 -0
- package/lib/esm/resources/buy_x_pay_y_promotions.js +79 -0
- package/lib/esm/resources/captures.d.ts +9 -3
- package/lib/esm/resources/captures.js +12 -4
- package/lib/esm/resources/carrier_accounts.d.ts +3 -0
- package/lib/esm/resources/carrier_accounts.js +4 -0
- package/lib/esm/resources/checkout_com_gateways.d.ts +3 -0
- package/lib/esm/resources/checkout_com_gateways.js +4 -0
- package/lib/esm/resources/checkout_com_payments.d.ts +3 -0
- package/lib/esm/resources/checkout_com_payments.js +4 -0
- package/lib/esm/resources/cleanups.d.ts +3 -0
- package/lib/esm/resources/cleanups.js +4 -0
- package/lib/esm/resources/coupon_codes_promotion_rules.d.ts +10 -3
- package/lib/esm/resources/coupon_codes_promotion_rules.js +4 -0
- package/lib/esm/resources/coupon_recipients.d.ts +3 -0
- package/lib/esm/resources/coupon_recipients.js +4 -0
- package/lib/esm/resources/coupons.d.ts +26 -1
- package/lib/esm/resources/coupons.js +16 -0
- package/lib/esm/resources/custom_promotion_rules.d.ts +61 -0
- package/lib/esm/resources/custom_promotion_rules.js +35 -0
- package/lib/esm/resources/customer_addresses.d.ts +5 -0
- package/lib/esm/resources/customer_addresses.js +4 -0
- package/lib/esm/resources/customer_groups.d.ts +3 -0
- package/lib/esm/resources/customer_groups.js +4 -0
- package/lib/esm/resources/customer_payment_sources.d.ts +18 -11
- package/lib/esm/resources/customer_payment_sources.js +8 -0
- package/lib/esm/resources/customer_subscriptions.d.ts +3 -0
- package/lib/esm/resources/customer_subscriptions.js +4 -0
- package/lib/esm/resources/customers.d.ts +9 -0
- package/lib/esm/resources/customers.js +4 -0
- package/lib/esm/resources/delivery_lead_times.d.ts +3 -0
- package/lib/esm/resources/delivery_lead_times.js +4 -0
- package/lib/esm/resources/external_gateways.d.ts +3 -0
- package/lib/esm/resources/external_gateways.js +4 -0
- package/lib/esm/resources/external_payments.d.ts +3 -0
- package/lib/esm/resources/external_payments.js +4 -0
- package/lib/esm/resources/external_promotions.d.ts +45 -6
- package/lib/esm/resources/external_promotions.js +24 -0
- package/lib/esm/resources/external_tax_calculators.d.ts +3 -0
- package/lib/esm/resources/external_tax_calculators.js +4 -0
- package/lib/esm/resources/fixed_amount_promotions.d.ts +45 -6
- package/lib/esm/resources/fixed_amount_promotions.js +24 -0
- package/lib/esm/resources/fixed_price_promotions.d.ts +37 -9
- package/lib/esm/resources/fixed_price_promotions.js +18 -2
- package/lib/esm/resources/free_gift_promotions.d.ts +37 -9
- package/lib/esm/resources/free_gift_promotions.js +18 -2
- package/lib/esm/resources/free_shipping_promotions.d.ts +42 -6
- package/lib/esm/resources/free_shipping_promotions.js +20 -0
- package/lib/esm/resources/gift_card_recipients.d.ts +3 -0
- package/lib/esm/resources/gift_card_recipients.js +4 -0
- package/lib/esm/resources/gift_cards.d.ts +11 -0
- package/lib/esm/resources/gift_cards.js +8 -0
- package/lib/esm/resources/imports.d.ts +1 -3
- package/lib/esm/resources/in_stock_subscriptions.d.ts +3 -0
- package/lib/esm/resources/in_stock_subscriptions.js +4 -0
- package/lib/esm/resources/inventory_models.d.ts +12 -0
- package/lib/esm/resources/inventory_models.js +4 -0
- package/lib/esm/resources/inventory_return_locations.d.ts +3 -0
- package/lib/esm/resources/inventory_return_locations.js +4 -0
- package/lib/esm/resources/inventory_stock_locations.d.ts +3 -0
- package/lib/esm/resources/inventory_stock_locations.js +4 -0
- package/lib/esm/resources/klarna_gateways.d.ts +3 -0
- package/lib/esm/resources/klarna_gateways.js +4 -0
- package/lib/esm/resources/klarna_payments.d.ts +3 -0
- package/lib/esm/resources/klarna_payments.js +4 -0
- package/lib/esm/resources/line_item_options.d.ts +11 -0
- package/lib/esm/resources/line_item_options.js +8 -0
- package/lib/esm/resources/line_items.d.ts +30 -0
- package/lib/esm/resources/line_items.js +16 -0
- package/lib/esm/resources/manual_gateways.d.ts +3 -0
- package/lib/esm/resources/manual_gateways.js +4 -0
- package/lib/esm/resources/manual_tax_calculators.d.ts +3 -0
- package/lib/esm/resources/manual_tax_calculators.js +4 -0
- package/lib/esm/resources/markets.d.ts +8 -0
- package/lib/esm/resources/markets.js +4 -0
- package/lib/esm/resources/merchants.d.ts +3 -0
- package/lib/esm/resources/merchants.js +4 -0
- package/lib/esm/resources/order_amount_promotion_rules.d.ts +13 -3
- package/lib/esm/resources/order_amount_promotion_rules.js +4 -0
- package/lib/esm/resources/order_subscription_items.d.ts +7 -0
- package/lib/esm/resources/order_subscription_items.js +4 -0
- package/lib/esm/resources/order_subscriptions.d.ts +4 -0
- package/lib/esm/resources/order_subscriptions.js +4 -0
- package/lib/esm/resources/order_validation_rules.d.ts +3 -0
- package/lib/esm/resources/order_validation_rules.js +4 -0
- package/lib/esm/resources/orders.d.ts +50 -6
- package/lib/esm/resources/orders.js +32 -0
- package/lib/esm/resources/organization.d.ts +4 -4
- package/lib/esm/resources/packages.d.ts +3 -0
- package/lib/esm/resources/packages.js +4 -0
- package/lib/esm/resources/parcel_line_items.d.ts +4 -1
- package/lib/esm/resources/parcel_line_items.js +4 -0
- package/lib/esm/resources/parcels.d.ts +9 -3
- package/lib/esm/resources/parcels.js +4 -0
- package/lib/esm/resources/payment_gateways.d.ts +3 -0
- package/lib/esm/resources/payment_gateways.js +4 -0
- package/lib/esm/resources/payment_methods.d.ts +9 -1
- package/lib/esm/resources/payment_methods.js +4 -0
- package/lib/esm/resources/payment_options.d.ts +43 -0
- package/lib/esm/resources/payment_options.js +39 -0
- package/lib/esm/resources/paypal_gateways.d.ts +3 -0
- package/lib/esm/resources/paypal_gateways.js +4 -0
- package/lib/esm/resources/paypal_payments.d.ts +3 -0
- package/lib/esm/resources/paypal_payments.js +4 -0
- package/lib/esm/resources/percentage_discount_promotions.d.ts +37 -9
- package/lib/esm/resources/percentage_discount_promotions.js +18 -2
- package/lib/esm/resources/price_frequency_tiers.d.ts +3 -0
- package/lib/esm/resources/price_frequency_tiers.js +4 -0
- package/lib/esm/resources/price_lists.d.ts +6 -0
- package/lib/esm/resources/price_lists.js +4 -0
- package/lib/esm/resources/price_tiers.d.ts +3 -0
- package/lib/esm/resources/price_tiers.js +4 -0
- package/lib/esm/resources/price_volume_tiers.d.ts +3 -0
- package/lib/esm/resources/price_volume_tiers.js +4 -0
- package/lib/esm/resources/prices.d.ts +4 -1
- package/lib/esm/resources/prices.js +4 -0
- package/lib/esm/resources/promotion_rules.d.ts +5 -1
- package/lib/esm/resources/promotion_rules.js +4 -0
- package/lib/esm/resources/promotions.d.ts +18 -0
- package/lib/esm/resources/promotions.js +20 -0
- package/lib/esm/resources/refunds.d.ts +9 -3
- package/lib/esm/resources/refunds.js +10 -2
- package/lib/esm/resources/reserved_stocks.d.ts +27 -0
- package/lib/esm/resources/reserved_stocks.js +34 -0
- package/lib/esm/resources/return_line_items.d.ts +2 -1
- package/lib/esm/resources/returns.d.ts +11 -0
- package/lib/esm/resources/returns.js +8 -0
- package/lib/esm/resources/satispay_gateways.d.ts +6 -0
- package/lib/esm/resources/satispay_gateways.js +4 -0
- package/lib/esm/resources/satispay_payments.d.ts +11 -3
- package/lib/esm/resources/satispay_payments.js +4 -0
- package/lib/esm/resources/shipments.d.ts +49 -2
- package/lib/esm/resources/shipments.js +18 -0
- package/lib/esm/resources/shipping_categories.d.ts +6 -0
- package/lib/esm/resources/shipping_categories.js +4 -0
- package/lib/esm/resources/shipping_method_tiers.d.ts +3 -0
- package/lib/esm/resources/shipping_method_tiers.js +4 -0
- package/lib/esm/resources/shipping_methods.d.ts +11 -0
- package/lib/esm/resources/shipping_methods.js +4 -0
- package/lib/esm/resources/shipping_weight_tiers.d.ts +3 -0
- package/lib/esm/resources/shipping_weight_tiers.js +4 -0
- package/lib/esm/resources/shipping_zones.d.ts +3 -0
- package/lib/esm/resources/shipping_zones.js +4 -0
- package/lib/esm/resources/sku_list_items.d.ts +3 -0
- package/lib/esm/resources/sku_list_items.js +4 -0
- package/lib/esm/resources/sku_list_promotion_rules.d.ts +10 -3
- package/lib/esm/resources/sku_list_promotion_rules.js +4 -0
- package/lib/esm/resources/sku_lists.d.ts +3 -0
- package/lib/esm/resources/sku_lists.js +4 -0
- package/lib/esm/resources/sku_options.d.ts +14 -0
- package/lib/esm/resources/sku_options.js +12 -0
- package/lib/esm/resources/skus.d.ts +17 -0
- package/lib/esm/resources/skus.js +16 -0
- package/lib/esm/resources/stock_items.d.ts +9 -0
- package/lib/esm/resources/stock_items.js +12 -0
- package/lib/esm/resources/stock_line_items.d.ts +42 -2
- package/lib/esm/resources/stock_line_items.js +17 -0
- package/lib/esm/resources/stock_locations.d.ts +6 -0
- package/lib/esm/resources/stock_locations.js +4 -0
- package/lib/esm/resources/stock_reservations.d.ts +49 -0
- package/lib/esm/resources/stock_reservations.js +51 -0
- package/lib/esm/resources/stock_transfers.d.ts +5 -0
- package/lib/esm/resources/stock_transfers.js +4 -0
- package/lib/esm/resources/stripe_gateways.d.ts +3 -0
- package/lib/esm/resources/stripe_gateways.js +4 -0
- package/lib/esm/resources/stripe_payments.d.ts +12 -0
- package/lib/esm/resources/stripe_payments.js +4 -0
- package/lib/esm/resources/tags.d.ts +27 -0
- package/lib/esm/resources/tags.js +31 -0
- package/lib/esm/resources/tax_calculators.d.ts +3 -0
- package/lib/esm/resources/tax_calculators.js +4 -0
- package/lib/esm/resources/tax_categories.d.ts +3 -0
- package/lib/esm/resources/tax_categories.js +4 -0
- package/lib/esm/resources/tax_rules.d.ts +3 -0
- package/lib/esm/resources/tax_rules.js +4 -0
- package/lib/esm/resources/taxjar_accounts.d.ts +3 -0
- package/lib/esm/resources/taxjar_accounts.js +4 -0
- package/lib/esm/resources/transactions.d.ts +9 -0
- package/lib/esm/resources/transactions.js +12 -0
- package/lib/esm/resources/versions.d.ts +22 -0
- package/lib/esm/resources/versions.js +22 -0
- package/lib/esm/resources/voids.d.ts +9 -3
- package/lib/esm/resources/voids.js +10 -2
- package/lib/esm/resources/webhooks.d.ts +8 -0
- package/lib/esm/resources/webhooks.js +4 -0
- package/lib/esm/resources/wire_transfers.d.ts +3 -0
- package/lib/esm/resources/wire_transfers.js +4 -0
- package/lib/esm/util.d.ts +1 -0
- package/lib/tsconfig.esm.tsbuildinfo +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +25 -25
- package/lib/cjs/micro.d.ts +0 -4
- package/lib/cjs/micro.js +0 -13
- package/lib/esm/micro.d.ts +0 -4
- package/lib/esm/micro.js +0 -7
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
|
2
2
|
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
|
3
3
|
import type { PaymentMethod } from './payment_methods';
|
|
4
|
+
import type { Version } from './versions';
|
|
4
5
|
import type { StripePayment } from './stripe_payments';
|
|
5
6
|
type StripeGatewayRel = ResourceRel & {
|
|
6
7
|
type: typeof StripeGateways.TYPE;
|
|
@@ -12,6 +13,7 @@ interface StripeGateway extends Resource {
|
|
|
12
13
|
webhook_endpoint_secret?: string;
|
|
13
14
|
webhook_endpoint_url?: string;
|
|
14
15
|
payment_methods?: PaymentMethod[];
|
|
16
|
+
versions?: Version[];
|
|
15
17
|
stripe_payments?: StripePayment[];
|
|
16
18
|
}
|
|
17
19
|
interface StripeGatewayCreate extends ResourceCreate {
|
|
@@ -32,6 +34,7 @@ declare class StripeGateways extends ApiResource {
|
|
|
32
34
|
update(resource: StripeGatewayUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StripeGateway>;
|
|
33
35
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
|
34
36
|
payment_methods(stripeGatewayId: string | StripeGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>>;
|
|
37
|
+
versions(stripeGatewayId: string | StripeGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
|
35
38
|
stripe_payments(stripeGatewayId: string | StripeGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<StripePayment>>;
|
|
36
39
|
isStripeGateway(resource: any): resource is StripeGateway;
|
|
37
40
|
relationship(id: string | ResourceId | null): StripeGatewayRel;
|
|
@@ -20,6 +20,10 @@ class StripeGateways extends ApiResource {
|
|
|
20
20
|
const _stripeGatewayId = stripeGatewayId.id || stripeGatewayId;
|
|
21
21
|
return this.resources.fetch({ type: 'payment_methods' }, `stripe_gateways/${_stripeGatewayId}/payment_methods`, params, options);
|
|
22
22
|
}
|
|
23
|
+
async versions(stripeGatewayId, params, options) {
|
|
24
|
+
const _stripeGatewayId = stripeGatewayId.id || stripeGatewayId;
|
|
25
|
+
return this.resources.fetch({ type: 'versions' }, `stripe_gateways/${_stripeGatewayId}/versions`, params, options);
|
|
26
|
+
}
|
|
23
27
|
async stripe_payments(stripeGatewayId, params, options) {
|
|
24
28
|
const _stripeGatewayId = stripeGatewayId.id || stripeGatewayId;
|
|
25
29
|
return this.resources.fetch({ type: 'stripe_payments' }, `stripe_gateways/${_stripeGatewayId}/stripe_payments`, params, options);
|
|
@@ -2,6 +2,7 @@ import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig,
|
|
|
2
2
|
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
|
3
3
|
import type { Order } from './orders';
|
|
4
4
|
import type { PaymentGateway } from './payment_gateways';
|
|
5
|
+
import type { Version } from './versions';
|
|
5
6
|
type StripePaymentRel = ResourceRel & {
|
|
6
7
|
type: typeof StripePayments.TYPE;
|
|
7
8
|
};
|
|
@@ -9,6 +10,7 @@ type OrderRel = ResourceRel & {
|
|
|
9
10
|
type: 'orders';
|
|
10
11
|
};
|
|
11
12
|
interface StripePayment extends Resource {
|
|
13
|
+
stripe_id?: string;
|
|
12
14
|
client_secret?: string;
|
|
13
15
|
publishable_key?: string;
|
|
14
16
|
options?: object;
|
|
@@ -17,16 +19,25 @@ interface StripePayment extends Resource {
|
|
|
17
19
|
intent_amount_cents?: number;
|
|
18
20
|
intent_amount_float?: number;
|
|
19
21
|
formatted_intent_amount?: string;
|
|
22
|
+
return_url?: string;
|
|
23
|
+
receipt_email?: string;
|
|
20
24
|
payment_instrument?: object;
|
|
21
25
|
order?: Order;
|
|
22
26
|
payment_gateway?: PaymentGateway;
|
|
27
|
+
versions?: Version[];
|
|
23
28
|
}
|
|
24
29
|
interface StripePaymentCreate extends ResourceCreate {
|
|
30
|
+
stripe_id?: string;
|
|
31
|
+
client_secret?: string;
|
|
25
32
|
options?: object;
|
|
33
|
+
return_url?: string;
|
|
34
|
+
receipt_email?: string;
|
|
26
35
|
order: OrderRel;
|
|
27
36
|
}
|
|
28
37
|
interface StripePaymentUpdate extends ResourceUpdate {
|
|
29
38
|
options?: object;
|
|
39
|
+
return_url?: string;
|
|
40
|
+
_update?: boolean;
|
|
30
41
|
_refresh?: boolean;
|
|
31
42
|
order?: OrderRel;
|
|
32
43
|
}
|
|
@@ -39,6 +50,7 @@ declare class StripePayments extends ApiResource {
|
|
|
39
50
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
|
40
51
|
order(stripePaymentId: string | StripePayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
|
41
52
|
payment_gateway(stripePaymentId: string | StripePayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaymentGateway>;
|
|
53
|
+
versions(stripePaymentId: string | StripePayment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
|
42
54
|
isStripePayment(resource: any): resource is StripePayment;
|
|
43
55
|
relationship(id: string | ResourceId | null): StripePaymentRel;
|
|
44
56
|
type(): string;
|
|
@@ -24,6 +24,10 @@ class StripePayments extends ApiResource {
|
|
|
24
24
|
const _stripePaymentId = stripePaymentId.id || stripePaymentId;
|
|
25
25
|
return this.resources.fetch({ type: 'payment_gateways' }, `stripe_payments/${_stripePaymentId}/payment_gateway`, params, options);
|
|
26
26
|
}
|
|
27
|
+
async versions(stripePaymentId, params, options) {
|
|
28
|
+
const _stripePaymentId = stripePaymentId.id || stripePaymentId;
|
|
29
|
+
return this.resources.fetch({ type: 'versions' }, `stripe_payments/${_stripePaymentId}/versions`, params, options);
|
|
30
|
+
}
|
|
27
31
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
|
28
32
|
isStripePayment(resource) {
|
|
29
33
|
return resource.type && (resource.type === StripePayments.TYPE);
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
|
2
|
+
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
|
3
|
+
type TagRel = ResourceRel & {
|
|
4
|
+
type: typeof Tags.TYPE;
|
|
5
|
+
};
|
|
6
|
+
interface Tag extends Resource {
|
|
7
|
+
name?: string;
|
|
8
|
+
}
|
|
9
|
+
interface TagCreate extends ResourceCreate {
|
|
10
|
+
name: string;
|
|
11
|
+
}
|
|
12
|
+
interface TagUpdate extends ResourceUpdate {
|
|
13
|
+
name?: string;
|
|
14
|
+
}
|
|
15
|
+
declare class Tags extends ApiResource {
|
|
16
|
+
static readonly TYPE: 'tags';
|
|
17
|
+
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
|
|
18
|
+
create(resource: TagCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Tag>;
|
|
19
|
+
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Tag>;
|
|
20
|
+
update(resource: TagUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Tag>;
|
|
21
|
+
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
|
22
|
+
isTag(resource: any): resource is Tag;
|
|
23
|
+
relationship(id: string | ResourceId | null): TagRel;
|
|
24
|
+
type(): string;
|
|
25
|
+
}
|
|
26
|
+
export default Tags;
|
|
27
|
+
export { Tag, TagCreate, TagUpdate };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ApiResource } from '../resource';
|
|
2
|
+
class Tags extends ApiResource {
|
|
3
|
+
// static readonly PATH = 'tags'
|
|
4
|
+
async list(params, options) {
|
|
5
|
+
return this.resources.list({ type: Tags.TYPE }, params, options);
|
|
6
|
+
}
|
|
7
|
+
async create(resource, params, options) {
|
|
8
|
+
return this.resources.create(Object.assign(Object.assign({}, resource), { type: Tags.TYPE }), params, options);
|
|
9
|
+
}
|
|
10
|
+
async retrieve(id, params, options) {
|
|
11
|
+
return this.resources.retrieve({ type: Tags.TYPE, id }, params, options);
|
|
12
|
+
}
|
|
13
|
+
async update(resource, params, options) {
|
|
14
|
+
return this.resources.update(Object.assign(Object.assign({}, resource), { type: Tags.TYPE }), params, options);
|
|
15
|
+
}
|
|
16
|
+
async delete(id, options) {
|
|
17
|
+
await this.resources.delete({ type: Tags.TYPE, id }, options);
|
|
18
|
+
}
|
|
19
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
|
20
|
+
isTag(resource) {
|
|
21
|
+
return resource.type && (resource.type === Tags.TYPE);
|
|
22
|
+
}
|
|
23
|
+
relationship(id) {
|
|
24
|
+
return ((id === null) || (typeof id === 'string')) ? { id, type: Tags.TYPE } : { id: id.id, type: Tags.TYPE };
|
|
25
|
+
}
|
|
26
|
+
type() {
|
|
27
|
+
return Tags.TYPE;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
Tags.TYPE = 'tags';
|
|
31
|
+
export default Tags;
|
|
@@ -2,6 +2,7 @@ import { ApiResource, Resource, ResourcesConfig, ResourceId, ResourceRel, ListRe
|
|
|
2
2
|
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
|
3
3
|
import type { Market } from './markets';
|
|
4
4
|
import type { Attachment } from './attachments';
|
|
5
|
+
import type { Version } from './versions';
|
|
5
6
|
type TaxCalculatorRel = ResourceRel & {
|
|
6
7
|
type: typeof TaxCalculators.TYPE;
|
|
7
8
|
};
|
|
@@ -9,6 +10,7 @@ interface TaxCalculator extends Resource {
|
|
|
9
10
|
name?: string;
|
|
10
11
|
markets?: Market[];
|
|
11
12
|
attachments?: Attachment[];
|
|
13
|
+
versions?: Version[];
|
|
12
14
|
}
|
|
13
15
|
declare class TaxCalculators extends ApiResource {
|
|
14
16
|
static readonly TYPE: 'tax_calculators';
|
|
@@ -16,6 +18,7 @@ declare class TaxCalculators extends ApiResource {
|
|
|
16
18
|
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<TaxCalculator>;
|
|
17
19
|
markets(taxCalculatorId: string | TaxCalculator, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Market>>;
|
|
18
20
|
attachments(taxCalculatorId: string | TaxCalculator, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
|
21
|
+
versions(taxCalculatorId: string | TaxCalculator, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
|
19
22
|
isTaxCalculator(resource: any): resource is TaxCalculator;
|
|
20
23
|
relationship(id: string | ResourceId | null): TaxCalculatorRel;
|
|
21
24
|
type(): string;
|
|
@@ -15,6 +15,10 @@ class TaxCalculators extends ApiResource {
|
|
|
15
15
|
const _taxCalculatorId = taxCalculatorId.id || taxCalculatorId;
|
|
16
16
|
return this.resources.fetch({ type: 'attachments' }, `tax_calculators/${_taxCalculatorId}/attachments`, params, options);
|
|
17
17
|
}
|
|
18
|
+
async versions(taxCalculatorId, params, options) {
|
|
19
|
+
const _taxCalculatorId = taxCalculatorId.id || taxCalculatorId;
|
|
20
|
+
return this.resources.fetch({ type: 'versions' }, `tax_calculators/${_taxCalculatorId}/versions`, params, options);
|
|
21
|
+
}
|
|
18
22
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
|
19
23
|
isTaxCalculator(resource) {
|
|
20
24
|
return resource.type && (resource.type === TaxCalculators.TYPE);
|
|
@@ -6,6 +6,7 @@ import type { TaxjarAccount } from './taxjar_accounts';
|
|
|
6
6
|
import type { ManualTaxCalculator } from './manual_tax_calculators';
|
|
7
7
|
import type { ExternalTaxCalculator } from './external_tax_calculators';
|
|
8
8
|
import type { Attachment } from './attachments';
|
|
9
|
+
import type { Version } from './versions';
|
|
9
10
|
type TaxCategoryRel = ResourceRel & {
|
|
10
11
|
type: typeof TaxCategories.TYPE;
|
|
11
12
|
};
|
|
@@ -30,6 +31,7 @@ interface TaxCategory extends Resource {
|
|
|
30
31
|
sku?: Sku;
|
|
31
32
|
tax_calculator?: AvalaraAccount | TaxjarAccount | ManualTaxCalculator | ExternalTaxCalculator;
|
|
32
33
|
attachments?: Attachment[];
|
|
34
|
+
versions?: Version[];
|
|
33
35
|
}
|
|
34
36
|
interface TaxCategoryCreate extends ResourceCreate {
|
|
35
37
|
code: string;
|
|
@@ -51,6 +53,7 @@ declare class TaxCategories extends ApiResource {
|
|
|
51
53
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
|
52
54
|
sku(taxCategoryId: string | TaxCategory, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Sku>;
|
|
53
55
|
attachments(taxCategoryId: string | TaxCategory, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
|
56
|
+
versions(taxCategoryId: string | TaxCategory, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
|
54
57
|
isTaxCategory(resource: any): resource is TaxCategory;
|
|
55
58
|
relationship(id: string | ResourceId | null): TaxCategoryRel;
|
|
56
59
|
type(): string;
|
|
@@ -24,6 +24,10 @@ class TaxCategories extends ApiResource {
|
|
|
24
24
|
const _taxCategoryId = taxCategoryId.id || taxCategoryId;
|
|
25
25
|
return this.resources.fetch({ type: 'attachments' }, `tax_categories/${_taxCategoryId}/attachments`, params, options);
|
|
26
26
|
}
|
|
27
|
+
async versions(taxCategoryId, params, options) {
|
|
28
|
+
const _taxCategoryId = taxCategoryId.id || taxCategoryId;
|
|
29
|
+
return this.resources.fetch({ type: 'versions' }, `tax_categories/${_taxCategoryId}/versions`, params, options);
|
|
30
|
+
}
|
|
27
31
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
|
28
32
|
isTaxCategory(resource) {
|
|
29
33
|
return resource.type && (resource.type === TaxCategories.TYPE);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
|
2
2
|
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
|
3
3
|
import type { ManualTaxCalculator } from './manual_tax_calculators';
|
|
4
|
+
import type { Version } from './versions';
|
|
4
5
|
type TaxRuleRel = ResourceRel & {
|
|
5
6
|
type: typeof TaxRules.TYPE;
|
|
6
7
|
};
|
|
@@ -22,6 +23,7 @@ interface TaxRule extends Resource {
|
|
|
22
23
|
adjustment_taxable?: boolean;
|
|
23
24
|
breakdown?: object;
|
|
24
25
|
manual_tax_calculator?: ManualTaxCalculator;
|
|
26
|
+
versions?: Version[];
|
|
25
27
|
}
|
|
26
28
|
interface TaxRuleCreate extends ResourceCreate {
|
|
27
29
|
name: string;
|
|
@@ -61,6 +63,7 @@ declare class TaxRules extends ApiResource {
|
|
|
61
63
|
update(resource: TaxRuleUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<TaxRule>;
|
|
62
64
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
|
63
65
|
manual_tax_calculator(taxRuleId: string | TaxRule, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ManualTaxCalculator>;
|
|
66
|
+
versions(taxRuleId: string | TaxRule, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
|
64
67
|
isTaxRule(resource: any): resource is TaxRule;
|
|
65
68
|
relationship(id: string | ResourceId | null): TaxRuleRel;
|
|
66
69
|
type(): string;
|
|
@@ -20,6 +20,10 @@ class TaxRules extends ApiResource {
|
|
|
20
20
|
const _taxRuleId = taxRuleId.id || taxRuleId;
|
|
21
21
|
return this.resources.fetch({ type: 'manual_tax_calculators' }, `tax_rules/${_taxRuleId}/manual_tax_calculator`, params, options);
|
|
22
22
|
}
|
|
23
|
+
async versions(taxRuleId, params, options) {
|
|
24
|
+
const _taxRuleId = taxRuleId.id || taxRuleId;
|
|
25
|
+
return this.resources.fetch({ type: 'versions' }, `tax_rules/${_taxRuleId}/versions`, params, options);
|
|
26
|
+
}
|
|
23
27
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
|
24
28
|
isTaxRule(resource) {
|
|
25
29
|
return resource.type && (resource.type === TaxRules.TYPE);
|
|
@@ -2,6 +2,7 @@ import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig,
|
|
|
2
2
|
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
|
3
3
|
import type { Market } from './markets';
|
|
4
4
|
import type { Attachment } from './attachments';
|
|
5
|
+
import type { Version } from './versions';
|
|
5
6
|
import type { TaxCategory } from './tax_categories';
|
|
6
7
|
type TaxjarAccountRel = ResourceRel & {
|
|
7
8
|
type: typeof TaxjarAccounts.TYPE;
|
|
@@ -13,6 +14,7 @@ interface TaxjarAccount extends Resource {
|
|
|
13
14
|
name?: string;
|
|
14
15
|
markets?: Market[];
|
|
15
16
|
attachments?: Attachment[];
|
|
17
|
+
versions?: Version[];
|
|
16
18
|
tax_categories?: TaxCategory[];
|
|
17
19
|
}
|
|
18
20
|
interface TaxjarAccountCreate extends ResourceCreate {
|
|
@@ -34,6 +36,7 @@ declare class TaxjarAccounts extends ApiResource {
|
|
|
34
36
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
|
35
37
|
markets(taxjarAccountId: string | TaxjarAccount, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Market>>;
|
|
36
38
|
attachments(taxjarAccountId: string | TaxjarAccount, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
|
39
|
+
versions(taxjarAccountId: string | TaxjarAccount, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
|
37
40
|
tax_categories(taxjarAccountId: string | TaxjarAccount, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<TaxCategory>>;
|
|
38
41
|
isTaxjarAccount(resource: any): resource is TaxjarAccount;
|
|
39
42
|
relationship(id: string | ResourceId | null): TaxjarAccountRel;
|
|
@@ -24,6 +24,10 @@ class TaxjarAccounts extends ApiResource {
|
|
|
24
24
|
const _taxjarAccountId = taxjarAccountId.id || taxjarAccountId;
|
|
25
25
|
return this.resources.fetch({ type: 'attachments' }, `taxjar_accounts/${_taxjarAccountId}/attachments`, params, options);
|
|
26
26
|
}
|
|
27
|
+
async versions(taxjarAccountId, params, options) {
|
|
28
|
+
const _taxjarAccountId = taxjarAccountId.id || taxjarAccountId;
|
|
29
|
+
return this.resources.fetch({ type: 'versions' }, `taxjar_accounts/${_taxjarAccountId}/versions`, params, options);
|
|
30
|
+
}
|
|
27
31
|
async tax_categories(taxjarAccountId, params, options) {
|
|
28
32
|
const _taxjarAccountId = taxjarAccountId.id || taxjarAccountId;
|
|
29
33
|
return this.resources.fetch({ type: 'tax_categories' }, `taxjar_accounts/${_taxjarAccountId}/tax_categories`, params, options);
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { ApiResource, Resource, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
|
2
2
|
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
|
3
3
|
import type { Order } from './orders';
|
|
4
|
+
import type { Attachment } from './attachments';
|
|
5
|
+
import type { Event } from './events';
|
|
6
|
+
import type { Version } from './versions';
|
|
4
7
|
type TransactionRel = ResourceRel & {
|
|
5
8
|
type: typeof Transactions.TYPE;
|
|
6
9
|
};
|
|
@@ -17,12 +20,18 @@ interface Transaction extends Resource {
|
|
|
17
20
|
token?: string;
|
|
18
21
|
gateway_transaction_id?: string;
|
|
19
22
|
order?: Order;
|
|
23
|
+
attachments?: Attachment[];
|
|
24
|
+
events?: Event[];
|
|
25
|
+
versions?: Version[];
|
|
20
26
|
}
|
|
21
27
|
declare class Transactions extends ApiResource {
|
|
22
28
|
static readonly TYPE: 'transactions';
|
|
23
29
|
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Transaction>>;
|
|
24
30
|
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Transaction>;
|
|
25
31
|
order(transactionId: string | Transaction, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
|
32
|
+
attachments(transactionId: string | Transaction, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
|
33
|
+
events(transactionId: string | Transaction, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
|
34
|
+
versions(transactionId: string | Transaction, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
|
26
35
|
isTransaction(resource: any): resource is Transaction;
|
|
27
36
|
relationship(id: string | ResourceId | null): TransactionRel;
|
|
28
37
|
type(): string;
|
|
@@ -11,6 +11,18 @@ class Transactions extends ApiResource {
|
|
|
11
11
|
const _transactionId = transactionId.id || transactionId;
|
|
12
12
|
return this.resources.fetch({ type: 'orders' }, `transactions/${_transactionId}/order`, params, options);
|
|
13
13
|
}
|
|
14
|
+
async attachments(transactionId, params, options) {
|
|
15
|
+
const _transactionId = transactionId.id || transactionId;
|
|
16
|
+
return this.resources.fetch({ type: 'attachments' }, `transactions/${_transactionId}/attachments`, params, options);
|
|
17
|
+
}
|
|
18
|
+
async events(transactionId, params, options) {
|
|
19
|
+
const _transactionId = transactionId.id || transactionId;
|
|
20
|
+
return this.resources.fetch({ type: 'events' }, `transactions/${_transactionId}/events`, params, options);
|
|
21
|
+
}
|
|
22
|
+
async versions(transactionId, params, options) {
|
|
23
|
+
const _transactionId = transactionId.id || transactionId;
|
|
24
|
+
return this.resources.fetch({ type: 'versions' }, `transactions/${_transactionId}/versions`, params, options);
|
|
25
|
+
}
|
|
14
26
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
|
15
27
|
isTransaction(resource) {
|
|
16
28
|
return resource.type && (resource.type === Transactions.TYPE);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ApiResource, Resource, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
|
2
|
+
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
|
3
|
+
type VersionRel = ResourceRel & {
|
|
4
|
+
type: typeof Versions.TYPE;
|
|
5
|
+
};
|
|
6
|
+
interface Version extends Resource {
|
|
7
|
+
resource_type?: string;
|
|
8
|
+
resource_id?: string;
|
|
9
|
+
event?: string;
|
|
10
|
+
changes?: object;
|
|
11
|
+
who?: object;
|
|
12
|
+
}
|
|
13
|
+
declare class Versions extends ApiResource {
|
|
14
|
+
static readonly TYPE: 'versions';
|
|
15
|
+
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
|
16
|
+
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Version>;
|
|
17
|
+
isVersion(resource: any): resource is Version;
|
|
18
|
+
relationship(id: string | ResourceId | null): VersionRel;
|
|
19
|
+
type(): string;
|
|
20
|
+
}
|
|
21
|
+
export default Versions;
|
|
22
|
+
export { Version };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ApiResource } from '../resource';
|
|
2
|
+
class Versions extends ApiResource {
|
|
3
|
+
// static readonly PATH = 'versions'
|
|
4
|
+
async list(params, options) {
|
|
5
|
+
return this.resources.list({ type: Versions.TYPE }, params, options);
|
|
6
|
+
}
|
|
7
|
+
async retrieve(id, params, options) {
|
|
8
|
+
return this.resources.retrieve({ type: Versions.TYPE, id }, params, options);
|
|
9
|
+
}
|
|
10
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
|
11
|
+
isVersion(resource) {
|
|
12
|
+
return resource.type && (resource.type === Versions.TYPE);
|
|
13
|
+
}
|
|
14
|
+
relationship(id) {
|
|
15
|
+
return ((id === null) || (typeof id === 'string')) ? { id, type: Versions.TYPE } : { id: id.id, type: Versions.TYPE };
|
|
16
|
+
}
|
|
17
|
+
type() {
|
|
18
|
+
return Versions.TYPE;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
Versions.TYPE = 'versions';
|
|
22
|
+
export default Versions;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { ApiResource, Resource, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
|
2
2
|
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
|
3
3
|
import type { Order } from './orders';
|
|
4
|
-
import type {
|
|
4
|
+
import type { Attachment } from './attachments';
|
|
5
5
|
import type { Event } from './events';
|
|
6
|
+
import type { Version } from './versions';
|
|
7
|
+
import type { Authorization } from './authorizations';
|
|
6
8
|
type VoidRel = ResourceRel & {
|
|
7
9
|
type: typeof Voids.TYPE;
|
|
8
10
|
};
|
|
@@ -19,16 +21,20 @@ interface Void extends Resource {
|
|
|
19
21
|
token?: string;
|
|
20
22
|
gateway_transaction_id?: string;
|
|
21
23
|
order?: Order;
|
|
22
|
-
|
|
24
|
+
attachments?: Attachment[];
|
|
23
25
|
events?: Event[];
|
|
26
|
+
versions?: Version[];
|
|
27
|
+
reference_authorization?: Authorization;
|
|
24
28
|
}
|
|
25
29
|
declare class Voids extends ApiResource {
|
|
26
30
|
static readonly TYPE: 'voids';
|
|
27
31
|
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Void>>;
|
|
28
32
|
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Void>;
|
|
29
33
|
order(voidId: string | Void, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
|
30
|
-
|
|
34
|
+
attachments(voidId: string | Void, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
|
31
35
|
events(voidId: string | Void, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
|
36
|
+
versions(voidId: string | Void, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
|
37
|
+
reference_authorization(voidId: string | Void, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Authorization>;
|
|
32
38
|
isVoid(resource: any): resource is Void;
|
|
33
39
|
relationship(id: string | ResourceId | null): VoidRel;
|
|
34
40
|
type(): string;
|
|
@@ -11,14 +11,22 @@ class Voids extends ApiResource {
|
|
|
11
11
|
const _voidId = voidId.id || voidId;
|
|
12
12
|
return this.resources.fetch({ type: 'orders' }, `voids/${_voidId}/order`, params, options);
|
|
13
13
|
}
|
|
14
|
-
async
|
|
14
|
+
async attachments(voidId, params, options) {
|
|
15
15
|
const _voidId = voidId.id || voidId;
|
|
16
|
-
return this.resources.fetch({ type: '
|
|
16
|
+
return this.resources.fetch({ type: 'attachments' }, `voids/${_voidId}/attachments`, params, options);
|
|
17
17
|
}
|
|
18
18
|
async events(voidId, params, options) {
|
|
19
19
|
const _voidId = voidId.id || voidId;
|
|
20
20
|
return this.resources.fetch({ type: 'events' }, `voids/${_voidId}/events`, params, options);
|
|
21
21
|
}
|
|
22
|
+
async versions(voidId, params, options) {
|
|
23
|
+
const _voidId = voidId.id || voidId;
|
|
24
|
+
return this.resources.fetch({ type: 'versions' }, `voids/${_voidId}/versions`, params, options);
|
|
25
|
+
}
|
|
26
|
+
async reference_authorization(voidId, params, options) {
|
|
27
|
+
const _voidId = voidId.id || voidId;
|
|
28
|
+
return this.resources.fetch({ type: 'authorizations' }, `voids/${_voidId}/reference_authorization`, params, options);
|
|
29
|
+
}
|
|
22
30
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
|
23
31
|
isVoid(resource) {
|
|
24
32
|
return resource.type && (resource.type === Voids.TYPE);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
|
2
2
|
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
|
3
3
|
import type { EventCallback } from './event_callbacks';
|
|
4
|
+
import type { Version } from './versions';
|
|
4
5
|
type WebhookRel = ResourceRel & {
|
|
5
6
|
type: typeof Webhooks.TYPE;
|
|
6
7
|
};
|
|
@@ -12,13 +13,17 @@ interface Webhook extends Resource {
|
|
|
12
13
|
circuit_state?: string;
|
|
13
14
|
circuit_failure_count?: number;
|
|
14
15
|
shared_secret?: string;
|
|
16
|
+
disabled_at?: string;
|
|
15
17
|
last_event_callbacks?: EventCallback[];
|
|
18
|
+
versions?: Version[];
|
|
16
19
|
}
|
|
17
20
|
interface WebhookCreate extends ResourceCreate {
|
|
18
21
|
name?: string;
|
|
19
22
|
topic: string;
|
|
20
23
|
callback_url: string;
|
|
21
24
|
include_resources?: string[];
|
|
25
|
+
_disable?: boolean;
|
|
26
|
+
_enable?: boolean;
|
|
22
27
|
}
|
|
23
28
|
interface WebhookUpdate extends ResourceUpdate {
|
|
24
29
|
name?: string;
|
|
@@ -26,6 +31,8 @@ interface WebhookUpdate extends ResourceUpdate {
|
|
|
26
31
|
callback_url?: string;
|
|
27
32
|
include_resources?: string[];
|
|
28
33
|
_reset_circuit?: boolean;
|
|
34
|
+
_disable?: boolean;
|
|
35
|
+
_enable?: boolean;
|
|
29
36
|
}
|
|
30
37
|
declare class Webhooks extends ApiResource {
|
|
31
38
|
static readonly TYPE: 'webhooks';
|
|
@@ -35,6 +42,7 @@ declare class Webhooks extends ApiResource {
|
|
|
35
42
|
update(resource: WebhookUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Webhook>;
|
|
36
43
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
|
37
44
|
last_event_callbacks(webhookId: string | Webhook, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<EventCallback>>;
|
|
45
|
+
versions(webhookId: string | Webhook, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
|
38
46
|
isWebhook(resource: any): resource is Webhook;
|
|
39
47
|
relationship(id: string | ResourceId | null): WebhookRel;
|
|
40
48
|
type(): string;
|
|
@@ -20,6 +20,10 @@ class Webhooks extends ApiResource {
|
|
|
20
20
|
const _webhookId = webhookId.id || webhookId;
|
|
21
21
|
return this.resources.fetch({ type: 'event_callbacks' }, `webhooks/${_webhookId}/last_event_callbacks`, params, options);
|
|
22
22
|
}
|
|
23
|
+
async versions(webhookId, params, options) {
|
|
24
|
+
const _webhookId = webhookId.id || webhookId;
|
|
25
|
+
return this.resources.fetch({ type: 'versions' }, `webhooks/${_webhookId}/versions`, params, options);
|
|
26
|
+
}
|
|
23
27
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
|
24
28
|
isWebhook(resource) {
|
|
25
29
|
return resource.type && (resource.type === Webhooks.TYPE);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
|
2
2
|
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
|
3
3
|
import type { Order } from './orders';
|
|
4
|
+
import type { Version } from './versions';
|
|
4
5
|
type WireTransferRel = ResourceRel & {
|
|
5
6
|
type: typeof WireTransfers.TYPE;
|
|
6
7
|
};
|
|
@@ -10,6 +11,7 @@ type OrderRel = ResourceRel & {
|
|
|
10
11
|
interface WireTransfer extends Resource {
|
|
11
12
|
payment_instrument?: object;
|
|
12
13
|
order?: Order;
|
|
14
|
+
versions?: Version[];
|
|
13
15
|
}
|
|
14
16
|
interface WireTransferCreate extends ResourceCreate {
|
|
15
17
|
order: OrderRel;
|
|
@@ -25,6 +27,7 @@ declare class WireTransfers extends ApiResource {
|
|
|
25
27
|
update(resource: WireTransferUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<WireTransfer>;
|
|
26
28
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
|
27
29
|
order(wireTransferId: string | WireTransfer, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
|
30
|
+
versions(wireTransferId: string | WireTransfer, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
|
28
31
|
isWireTransfer(resource: any): resource is WireTransfer;
|
|
29
32
|
relationship(id: string | ResourceId | null): WireTransferRel;
|
|
30
33
|
type(): string;
|
|
@@ -20,6 +20,10 @@ class WireTransfers extends ApiResource {
|
|
|
20
20
|
const _wireTransferId = wireTransferId.id || wireTransferId;
|
|
21
21
|
return this.resources.fetch({ type: 'orders' }, `wire_transfers/${_wireTransferId}/order`, params, options);
|
|
22
22
|
}
|
|
23
|
+
async versions(wireTransferId, params, options) {
|
|
24
|
+
const _wireTransferId = wireTransferId.id || wireTransferId;
|
|
25
|
+
return this.resources.fetch({ type: 'versions' }, `wire_transfers/${_wireTransferId}/versions`, params, options);
|
|
26
|
+
}
|
|
23
27
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
|
24
28
|
isWireTransfer(resource) {
|
|
25
29
|
return resource.type && (resource.type === WireTransfers.TYPE);
|