@commercelayer/sdk 5.12.5 → 5.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/api.d.ts +11 -2
- package/lib/cjs/api.js +4 -1
- package/lib/cjs/commercelayer.d.ts +4 -3
- package/lib/cjs/commercelayer.js +6 -1
- package/lib/cjs/config.js +3 -1
- package/lib/cjs/model.d.ts +1 -0
- package/lib/cjs/resource.d.ts +1 -1
- package/lib/cjs/resource.js +6 -0
- package/lib/cjs/resources/addresses.d.ts +3 -0
- package/lib/cjs/resources/addresses.js +4 -0
- package/lib/cjs/resources/adjustments.d.ts +5 -2
- package/lib/cjs/resources/adjustments.js +4 -0
- package/lib/cjs/resources/adyen_gateways.d.ts +3 -0
- package/lib/cjs/resources/adyen_gateways.js +4 -0
- package/lib/cjs/resources/adyen_payments.d.ts +5 -2
- package/lib/cjs/resources/adyen_payments.js +4 -0
- package/lib/cjs/resources/authorizations.d.ts +3 -0
- package/lib/cjs/resources/authorizations.js +4 -0
- package/lib/cjs/resources/avalara_accounts.d.ts +3 -0
- 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 +5 -2
- 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 +5 -2
- package/lib/cjs/resources/braintree_payments.js +4 -0
- package/lib/cjs/resources/bundles.d.ts +3 -0
- package/lib/cjs/resources/bundles.js +4 -0
- package/lib/cjs/resources/captures.d.ts +3 -0
- package/lib/cjs/resources/captures.js +4 -0
- 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 +5 -2
- 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 +3 -0
- 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 +3 -0
- package/lib/cjs/resources/coupons.js +4 -0
- package/lib/cjs/resources/customer_addresses.d.ts +3 -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 +8 -13
- package/lib/cjs/resources/customer_payment_sources.js +4 -0
- package/lib/cjs/resources/customer_subscriptions.d.ts +3 -0
- package/lib/cjs/resources/customer_subscriptions.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 +5 -2
- package/lib/cjs/resources/external_payments.js +4 -0
- package/lib/cjs/resources/external_promotions.d.ts +3 -0
- package/lib/cjs/resources/external_promotions.js +4 -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 +3 -0
- package/lib/cjs/resources/fixed_amount_promotions.js +4 -0
- package/lib/cjs/resources/fixed_price_promotions.d.ts +3 -0
- package/lib/cjs/resources/fixed_price_promotions.js +4 -0
- package/lib/cjs/resources/free_gift_promotions.d.ts +3 -0
- package/lib/cjs/resources/free_gift_promotions.js +4 -0
- package/lib/cjs/resources/free_shipping_promotions.d.ts +3 -0
- package/lib/cjs/resources/free_shipping_promotions.js +4 -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 +3 -0
- package/lib/cjs/resources/gift_cards.js +4 -0
- 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 +3 -0
- package/lib/cjs/resources/inventory_models.js +4 -0
- package/lib/cjs/resources/inventory_return_locations.d.ts +5 -2
- package/lib/cjs/resources/inventory_return_locations.js +4 -0
- package/lib/cjs/resources/inventory_stock_locations.d.ts +5 -2
- 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 +5 -2
- package/lib/cjs/resources/klarna_payments.js +4 -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 +3 -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 +5 -2
- package/lib/cjs/resources/order_amount_promotion_rules.js +4 -0
- package/lib/cjs/resources/order_subscription_items.d.ts +3 -0
- package/lib/cjs/resources/order_subscription_items.js +4 -0
- package/lib/cjs/resources/order_subscriptions.d.ts +3 -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 +8 -2
- package/lib/cjs/resources/orders.js +4 -0
- 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 +5 -2
- package/lib/cjs/resources/parcel_line_items.js +4 -0
- package/lib/cjs/resources/parcels.d.ts +3 -0
- 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 +3 -0
- package/lib/cjs/resources/payment_methods.js +4 -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 +5 -2
- package/lib/cjs/resources/paypal_payments.js +4 -0
- package/lib/cjs/resources/percentage_discount_promotions.d.ts +3 -0
- package/lib/cjs/resources/percentage_discount_promotions.js +4 -0
- 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 +3 -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 +3 -0
- 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 +3 -0
- package/lib/cjs/resources/promotions.js +4 -0
- package/lib/cjs/resources/refunds.d.ts +3 -0
- package/lib/cjs/resources/refunds.js +4 -0
- package/lib/cjs/resources/returns.d.ts +3 -0
- package/lib/cjs/resources/returns.js +4 -0
- package/lib/cjs/resources/satispay_gateways.d.ts +3 -0
- package/lib/cjs/resources/satispay_gateways.js +4 -0
- package/lib/cjs/resources/satispay_payments.d.ts +6 -2
- package/lib/cjs/resources/satispay_payments.js +4 -0
- package/lib/cjs/resources/shipments.d.ts +3 -0
- package/lib/cjs/resources/shipments.js +4 -0
- package/lib/cjs/resources/shipping_categories.d.ts +3 -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 +3 -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 +5 -2
- package/lib/cjs/resources/sku_list_items.js +4 -0
- package/lib/cjs/resources/sku_list_promotion_rules.d.ts +3 -0
- 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 +3 -0
- package/lib/cjs/resources/sku_options.js +4 -0
- package/lib/cjs/resources/skus.d.ts +3 -0
- package/lib/cjs/resources/skus.js +4 -0
- package/lib/cjs/resources/stock_items.d.ts +3 -0
- package/lib/cjs/resources/stock_items.js +4 -0
- package/lib/cjs/resources/stock_line_items.d.ts +5 -2
- package/lib/cjs/resources/stock_line_items.js +4 -0
- package/lib/cjs/resources/stock_locations.d.ts +3 -0
- package/lib/cjs/resources/stock_locations.js +4 -0
- package/lib/cjs/resources/stock_transfers.d.ts +3 -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 +8 -2
- package/lib/cjs/resources/stripe_payments.js +4 -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 +5 -2
- 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 +3 -0
- package/lib/cjs/resources/transactions.js +4 -0
- package/lib/cjs/resources/versions.d.ts +22 -0
- package/lib/cjs/resources/versions.js +16 -0
- package/lib/cjs/resources/voids.d.ts +3 -0
- package/lib/cjs/resources/voids.js +4 -0
- package/lib/cjs/resources/webhooks.d.ts +3 -0
- package/lib/cjs/resources/webhooks.js +4 -0
- package/lib/cjs/resources/wire_transfers.d.ts +5 -2
- package/lib/cjs/resources/wire_transfers.js +4 -0
- package/lib/cjs/util.d.ts +1 -1
- package/lib/esm/api.d.ts +11 -2
- package/lib/esm/api.js +2 -0
- package/lib/esm/commercelayer.d.ts +4 -3
- package/lib/esm/commercelayer.js +6 -1
- package/lib/esm/config.js +3 -1
- package/lib/esm/model.d.ts +1 -0
- package/lib/esm/resource.d.ts +1 -1
- package/lib/esm/resource.js +6 -0
- package/lib/esm/resources/addresses.d.ts +3 -0
- package/lib/esm/resources/addresses.js +4 -0
- package/lib/esm/resources/adjustments.d.ts +5 -2
- package/lib/esm/resources/adjustments.js +4 -0
- package/lib/esm/resources/adyen_gateways.d.ts +3 -0
- package/lib/esm/resources/adyen_gateways.js +4 -0
- package/lib/esm/resources/adyen_payments.d.ts +5 -2
- package/lib/esm/resources/adyen_payments.js +4 -0
- package/lib/esm/resources/authorizations.d.ts +3 -0
- package/lib/esm/resources/authorizations.js +4 -0
- package/lib/esm/resources/avalara_accounts.d.ts +3 -0
- 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 +5 -2
- 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 +5 -2
- package/lib/esm/resources/braintree_payments.js +4 -0
- package/lib/esm/resources/bundles.d.ts +3 -0
- package/lib/esm/resources/bundles.js +4 -0
- package/lib/esm/resources/captures.d.ts +3 -0
- package/lib/esm/resources/captures.js +4 -0
- 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 +5 -2
- 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 +3 -0
- 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 +3 -0
- package/lib/esm/resources/coupons.js +4 -0
- package/lib/esm/resources/customer_addresses.d.ts +3 -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 +8 -13
- package/lib/esm/resources/customer_payment_sources.js +4 -0
- package/lib/esm/resources/customer_subscriptions.d.ts +3 -0
- package/lib/esm/resources/customer_subscriptions.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 +5 -2
- package/lib/esm/resources/external_payments.js +4 -0
- package/lib/esm/resources/external_promotions.d.ts +3 -0
- package/lib/esm/resources/external_promotions.js +4 -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 +3 -0
- package/lib/esm/resources/fixed_amount_promotions.js +4 -0
- package/lib/esm/resources/fixed_price_promotions.d.ts +3 -0
- package/lib/esm/resources/fixed_price_promotions.js +4 -0
- package/lib/esm/resources/free_gift_promotions.d.ts +3 -0
- package/lib/esm/resources/free_gift_promotions.js +4 -0
- package/lib/esm/resources/free_shipping_promotions.d.ts +3 -0
- package/lib/esm/resources/free_shipping_promotions.js +4 -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 +3 -0
- package/lib/esm/resources/gift_cards.js +4 -0
- 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 +3 -0
- package/lib/esm/resources/inventory_models.js +4 -0
- package/lib/esm/resources/inventory_return_locations.d.ts +5 -2
- package/lib/esm/resources/inventory_return_locations.js +4 -0
- package/lib/esm/resources/inventory_stock_locations.d.ts +5 -2
- 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 +5 -2
- package/lib/esm/resources/klarna_payments.js +4 -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 +3 -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 +5 -2
- package/lib/esm/resources/order_amount_promotion_rules.js +4 -0
- package/lib/esm/resources/order_subscription_items.d.ts +3 -0
- package/lib/esm/resources/order_subscription_items.js +4 -0
- package/lib/esm/resources/order_subscriptions.d.ts +3 -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 +8 -2
- package/lib/esm/resources/orders.js +4 -0
- 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 +5 -2
- package/lib/esm/resources/parcel_line_items.js +4 -0
- package/lib/esm/resources/parcels.d.ts +3 -0
- 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 +3 -0
- package/lib/esm/resources/payment_methods.js +4 -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 +5 -2
- package/lib/esm/resources/paypal_payments.js +4 -0
- package/lib/esm/resources/percentage_discount_promotions.d.ts +3 -0
- package/lib/esm/resources/percentage_discount_promotions.js +4 -0
- 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 +3 -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 +3 -0
- 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 +3 -0
- package/lib/esm/resources/promotions.js +4 -0
- package/lib/esm/resources/refunds.d.ts +3 -0
- package/lib/esm/resources/refunds.js +4 -0
- package/lib/esm/resources/returns.d.ts +3 -0
- package/lib/esm/resources/returns.js +4 -0
- package/lib/esm/resources/satispay_gateways.d.ts +3 -0
- package/lib/esm/resources/satispay_gateways.js +4 -0
- package/lib/esm/resources/satispay_payments.d.ts +6 -2
- package/lib/esm/resources/satispay_payments.js +4 -0
- package/lib/esm/resources/shipments.d.ts +3 -0
- package/lib/esm/resources/shipments.js +4 -0
- package/lib/esm/resources/shipping_categories.d.ts +3 -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 +3 -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 +5 -2
- package/lib/esm/resources/sku_list_items.js +4 -0
- package/lib/esm/resources/sku_list_promotion_rules.d.ts +3 -0
- 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 +3 -0
- package/lib/esm/resources/sku_options.js +4 -0
- package/lib/esm/resources/skus.d.ts +3 -0
- package/lib/esm/resources/skus.js +4 -0
- package/lib/esm/resources/stock_items.d.ts +3 -0
- package/lib/esm/resources/stock_items.js +4 -0
- package/lib/esm/resources/stock_line_items.d.ts +5 -2
- package/lib/esm/resources/stock_line_items.js +4 -0
- package/lib/esm/resources/stock_locations.d.ts +3 -0
- package/lib/esm/resources/stock_locations.js +4 -0
- package/lib/esm/resources/stock_transfers.d.ts +3 -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 +8 -2
- package/lib/esm/resources/stripe_payments.js +4 -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 +5 -2
- 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 +3 -0
- package/lib/esm/resources/transactions.js +4 -0
- package/lib/esm/resources/versions.d.ts +22 -0
- package/lib/esm/resources/versions.js +14 -0
- package/lib/esm/resources/voids.d.ts +3 -0
- package/lib/esm/resources/voids.js +4 -0
- package/lib/esm/resources/webhooks.d.ts +3 -0
- package/lib/esm/resources/webhooks.js +4 -0
- package/lib/esm/resources/wire_transfers.d.ts +5 -2
- package/lib/esm/resources/wire_transfers.js +4 -0
- package/lib/esm/util.d.ts +1 -1
- package/lib/tsconfig.esm.tsbuildinfo +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +10 -10
@@ -1,8 +1,9 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
|
-
import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel } from '../resource';
|
3
|
-
import type { QueryParamsRetrieve } from '../query';
|
2
|
+
import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse } from '../resource';
|
3
|
+
import type { QueryParamsRetrieve, QueryParamsList } from '../query';
|
4
4
|
import type { Order, OrderType } from './orders';
|
5
5
|
import type { PaymentGateway } from './payment_gateways';
|
6
|
+
import type { Version } from './versions';
|
6
7
|
type StripePaymentType = 'stripe_payments';
|
7
8
|
type StripePaymentRel = ResourceRel & {
|
8
9
|
type: StripePaymentType;
|
@@ -20,16 +21,20 @@ interface StripePayment extends Resource {
|
|
20
21
|
intent_amount_cents: number;
|
21
22
|
intent_amount_float?: number | null;
|
22
23
|
formatted_intent_amount?: string | null;
|
24
|
+
return_url?: string | null;
|
23
25
|
payment_instrument?: Record<string, any> | null;
|
24
26
|
order?: Order | null;
|
25
27
|
payment_gateway?: PaymentGateway | null;
|
28
|
+
versions?: Version[] | null;
|
26
29
|
}
|
27
30
|
interface StripePaymentCreate extends ResourceCreate {
|
28
31
|
options?: Record<string, any> | null;
|
32
|
+
return_url?: string | null;
|
29
33
|
order: OrderRel;
|
30
34
|
}
|
31
35
|
interface StripePaymentUpdate extends ResourceUpdate {
|
32
36
|
options?: Record<string, any> | null;
|
37
|
+
return_url?: string | null;
|
33
38
|
_update?: boolean | null;
|
34
39
|
_refresh?: boolean | null;
|
35
40
|
order?: OrderRel | null;
|
@@ -41,6 +46,7 @@ declare class StripePayments extends ApiResource<StripePayment> {
|
|
41
46
|
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
42
47
|
order(stripePaymentId: string | StripePayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
43
48
|
payment_gateway(stripePaymentId: string | StripePayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaymentGateway>;
|
49
|
+
versions(stripePaymentId: string | StripePayment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
44
50
|
_update(id: string | StripePayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StripePayment>;
|
45
51
|
_refresh(id: string | StripePayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StripePayment>;
|
46
52
|
isStripePayment(resource: any): resource is StripePayment;
|
@@ -17,6 +17,10 @@ class StripePayments extends ApiResource {
|
|
17
17
|
const _stripePaymentId = stripePaymentId.id || stripePaymentId;
|
18
18
|
return this.resources.fetch({ type: 'payment_gateways' }, `stripe_payments/${_stripePaymentId}/payment_gateway`, params, options);
|
19
19
|
}
|
20
|
+
async versions(stripePaymentId, params, options) {
|
21
|
+
const _stripePaymentId = stripePaymentId.id || stripePaymentId;
|
22
|
+
return this.resources.fetch({ type: 'versions' }, `stripe_payments/${_stripePaymentId}/versions`, params, options);
|
23
|
+
}
|
20
24
|
async _update(id, params, options) {
|
21
25
|
return this.resources.update({ id: (typeof id === 'string') ? id : id.id, type: StripePayments.TYPE, _update: true }, params, options);
|
22
26
|
}
|
@@ -3,6 +3,7 @@ import type { Resource, ResourceId, ResourcesConfig, ResourceRel, ListResponse }
|
|
3
3
|
import type { QueryParamsList } from '../query';
|
4
4
|
import type { Market } from './markets';
|
5
5
|
import type { Attachment } from './attachments';
|
6
|
+
import type { Version } from './versions';
|
6
7
|
type TaxCalculatorType = 'tax_calculators';
|
7
8
|
type TaxCalculatorRel = ResourceRel & {
|
8
9
|
type: TaxCalculatorType;
|
@@ -12,11 +13,13 @@ interface TaxCalculator extends Resource {
|
|
12
13
|
name: string;
|
13
14
|
markets?: Market[] | null;
|
14
15
|
attachments?: Attachment[] | null;
|
16
|
+
versions?: Version[] | null;
|
15
17
|
}
|
16
18
|
declare class TaxCalculators extends ApiResource<TaxCalculator> {
|
17
19
|
static readonly TYPE: TaxCalculatorType;
|
18
20
|
markets(taxCalculatorId: string | TaxCalculator, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Market>>;
|
19
21
|
attachments(taxCalculatorId: string | TaxCalculator, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
22
|
+
versions(taxCalculatorId: string | TaxCalculator, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
20
23
|
isTaxCalculator(resource: any): resource is TaxCalculator;
|
21
24
|
relationship(id: string | ResourceId | null): TaxCalculatorRel;
|
22
25
|
type(): TaxCalculatorType;
|
@@ -8,6 +8,10 @@ class TaxCalculators extends ApiResource {
|
|
8
8
|
const _taxCalculatorId = taxCalculatorId.id || taxCalculatorId;
|
9
9
|
return this.resources.fetch({ type: 'attachments' }, `tax_calculators/${_taxCalculatorId}/attachments`, params, options);
|
10
10
|
}
|
11
|
+
async versions(taxCalculatorId, params, options) {
|
12
|
+
const _taxCalculatorId = taxCalculatorId.id || taxCalculatorId;
|
13
|
+
return this.resources.fetch({ type: 'versions' }, `tax_calculators/${_taxCalculatorId}/versions`, params, options);
|
14
|
+
}
|
11
15
|
isTaxCalculator(resource) {
|
12
16
|
return resource.type && (resource.type === TaxCalculators.TYPE);
|
13
17
|
}
|
@@ -7,6 +7,7 @@ import type { TaxjarAccount, TaxjarAccountType } from './taxjar_accounts';
|
|
7
7
|
import type { ManualTaxCalculator, ManualTaxCalculatorType } from './manual_tax_calculators';
|
8
8
|
import type { ExternalTaxCalculator, ExternalTaxCalculatorType } from './external_tax_calculators';
|
9
9
|
import type { Attachment } from './attachments';
|
10
|
+
import type { Version } from './versions';
|
10
11
|
type TaxCategoryType = 'tax_categories';
|
11
12
|
type TaxCategoryRel = ResourceRel & {
|
12
13
|
type: TaxCategoryType;
|
@@ -33,6 +34,7 @@ interface TaxCategory extends Resource {
|
|
33
34
|
sku?: Sku | null;
|
34
35
|
tax_calculator?: AvalaraAccount | TaxjarAccount | ManualTaxCalculator | ExternalTaxCalculator | null;
|
35
36
|
attachments?: Attachment[] | null;
|
37
|
+
versions?: Version[] | null;
|
36
38
|
}
|
37
39
|
interface TaxCategoryCreate extends ResourceCreate {
|
38
40
|
code: string;
|
@@ -52,6 +54,7 @@ declare class TaxCategories extends ApiResource<TaxCategory> {
|
|
52
54
|
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
53
55
|
sku(taxCategoryId: string | TaxCategory, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Sku>;
|
54
56
|
attachments(taxCategoryId: string | TaxCategory, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
57
|
+
versions(taxCategoryId: string | TaxCategory, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
55
58
|
isTaxCategory(resource: any): resource is TaxCategory;
|
56
59
|
relationship(id: string | ResourceId | null): TaxCategoryRel;
|
57
60
|
type(): TaxCategoryType;
|
@@ -17,6 +17,10 @@ class TaxCategories extends ApiResource {
|
|
17
17
|
const _taxCategoryId = taxCategoryId.id || taxCategoryId;
|
18
18
|
return this.resources.fetch({ type: 'attachments' }, `tax_categories/${_taxCategoryId}/attachments`, params, options);
|
19
19
|
}
|
20
|
+
async versions(taxCategoryId, params, options) {
|
21
|
+
const _taxCategoryId = taxCategoryId.id || taxCategoryId;
|
22
|
+
return this.resources.fetch({ type: 'versions' }, `tax_categories/${_taxCategoryId}/versions`, params, options);
|
23
|
+
}
|
20
24
|
isTaxCategory(resource) {
|
21
25
|
return resource.type && (resource.type === TaxCategories.TYPE);
|
22
26
|
}
|
@@ -1,7 +1,8 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
|
-
import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel } from '../resource';
|
3
|
-
import type { QueryParamsRetrieve } from '../query';
|
2
|
+
import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse } from '../resource';
|
3
|
+
import type { QueryParamsRetrieve, QueryParamsList } from '../query';
|
4
4
|
import type { ManualTaxCalculator, ManualTaxCalculatorType } from './manual_tax_calculators';
|
5
|
+
import type { Version } from './versions';
|
5
6
|
type TaxRuleType = 'tax_rules';
|
6
7
|
type TaxRuleRel = ResourceRel & {
|
7
8
|
type: TaxRuleType;
|
@@ -25,6 +26,7 @@ interface TaxRule extends Resource {
|
|
25
26
|
adjustment_taxable?: boolean | null;
|
26
27
|
breakdown?: Record<string, any> | null;
|
27
28
|
manual_tax_calculator?: ManualTaxCalculator | null;
|
29
|
+
versions?: Version[] | null;
|
28
30
|
}
|
29
31
|
interface TaxRuleCreate extends ResourceCreate {
|
30
32
|
name: string;
|
@@ -62,6 +64,7 @@ declare class TaxRules extends ApiResource<TaxRule> {
|
|
62
64
|
update(resource: TaxRuleUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<TaxRule>;
|
63
65
|
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
64
66
|
manual_tax_calculator(taxRuleId: string | TaxRule, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ManualTaxCalculator>;
|
67
|
+
versions(taxRuleId: string | TaxRule, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
65
68
|
isTaxRule(resource: any): resource is TaxRule;
|
66
69
|
relationship(id: string | ResourceId | null): TaxRuleRel;
|
67
70
|
type(): TaxRuleType;
|
@@ -13,6 +13,10 @@ class TaxRules extends ApiResource {
|
|
13
13
|
const _taxRuleId = taxRuleId.id || taxRuleId;
|
14
14
|
return this.resources.fetch({ type: 'manual_tax_calculators' }, `tax_rules/${_taxRuleId}/manual_tax_calculator`, params, options);
|
15
15
|
}
|
16
|
+
async versions(taxRuleId, params, options) {
|
17
|
+
const _taxRuleId = taxRuleId.id || taxRuleId;
|
18
|
+
return this.resources.fetch({ type: 'versions' }, `tax_rules/${_taxRuleId}/versions`, params, options);
|
19
|
+
}
|
16
20
|
isTaxRule(resource) {
|
17
21
|
return resource.type && (resource.type === TaxRules.TYPE);
|
18
22
|
}
|
@@ -3,6 +3,7 @@ import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesCon
|
|
3
3
|
import type { QueryParamsRetrieve, QueryParamsList } from '../query';
|
4
4
|
import type { Market } from './markets';
|
5
5
|
import type { Attachment } from './attachments';
|
6
|
+
import type { Version } from './versions';
|
6
7
|
import type { TaxCategory, TaxCategoryType } from './tax_categories';
|
7
8
|
type TaxjarAccountType = 'taxjar_accounts';
|
8
9
|
type TaxjarAccountRel = ResourceRel & {
|
@@ -16,6 +17,7 @@ interface TaxjarAccount extends Resource {
|
|
16
17
|
name: string;
|
17
18
|
markets?: Market[] | null;
|
18
19
|
attachments?: Attachment[] | null;
|
20
|
+
versions?: Version[] | null;
|
19
21
|
tax_categories?: TaxCategory[] | null;
|
20
22
|
}
|
21
23
|
interface TaxjarAccountCreate extends ResourceCreate {
|
@@ -35,6 +37,7 @@ declare class TaxjarAccounts extends ApiResource<TaxjarAccount> {
|
|
35
37
|
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
36
38
|
markets(taxjarAccountId: string | TaxjarAccount, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Market>>;
|
37
39
|
attachments(taxjarAccountId: string | TaxjarAccount, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
40
|
+
versions(taxjarAccountId: string | TaxjarAccount, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
38
41
|
tax_categories(taxjarAccountId: string | TaxjarAccount, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<TaxCategory>>;
|
39
42
|
isTaxjarAccount(resource: any): resource is TaxjarAccount;
|
40
43
|
relationship(id: string | ResourceId | null): TaxjarAccountRel;
|
@@ -17,6 +17,10 @@ class TaxjarAccounts extends ApiResource {
|
|
17
17
|
const _taxjarAccountId = taxjarAccountId.id || taxjarAccountId;
|
18
18
|
return this.resources.fetch({ type: 'attachments' }, `taxjar_accounts/${_taxjarAccountId}/attachments`, params, options);
|
19
19
|
}
|
20
|
+
async versions(taxjarAccountId, params, options) {
|
21
|
+
const _taxjarAccountId = taxjarAccountId.id || taxjarAccountId;
|
22
|
+
return this.resources.fetch({ type: 'versions' }, `taxjar_accounts/${_taxjarAccountId}/versions`, params, options);
|
23
|
+
}
|
20
24
|
async tax_categories(taxjarAccountId, params, options) {
|
21
25
|
const _taxjarAccountId = taxjarAccountId.id || taxjarAccountId;
|
22
26
|
return this.resources.fetch({ type: 'tax_categories' }, `taxjar_accounts/${_taxjarAccountId}/tax_categories`, params, options);
|
@@ -3,6 +3,7 @@ import type { Resource, ResourceId, ResourcesConfig, ResourceRel, ListResponse }
|
|
3
3
|
import type { QueryParamsRetrieve, QueryParamsList } from '../query';
|
4
4
|
import type { Order } from './orders';
|
5
5
|
import type { Attachment } from './attachments';
|
6
|
+
import type { Version } from './versions';
|
6
7
|
type TransactionType = 'transactions';
|
7
8
|
type TransactionRel = ResourceRel & {
|
8
9
|
type: TransactionType;
|
@@ -22,11 +23,13 @@ interface Transaction extends Resource {
|
|
22
23
|
gateway_transaction_id?: string | null;
|
23
24
|
order?: Order | null;
|
24
25
|
attachments?: Attachment[] | null;
|
26
|
+
versions?: Version[] | null;
|
25
27
|
}
|
26
28
|
declare class Transactions extends ApiResource<Transaction> {
|
27
29
|
static readonly TYPE: TransactionType;
|
28
30
|
order(transactionId: string | Transaction, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
29
31
|
attachments(transactionId: string | Transaction, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
32
|
+
versions(transactionId: string | Transaction, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
30
33
|
isTransaction(resource: any): resource is Transaction;
|
31
34
|
relationship(id: string | ResourceId | null): TransactionRel;
|
32
35
|
type(): TransactionType;
|
@@ -8,6 +8,10 @@ class Transactions extends ApiResource {
|
|
8
8
|
const _transactionId = transactionId.id || transactionId;
|
9
9
|
return this.resources.fetch({ type: 'attachments' }, `transactions/${_transactionId}/attachments`, params, options);
|
10
10
|
}
|
11
|
+
async versions(transactionId, params, options) {
|
12
|
+
const _transactionId = transactionId.id || transactionId;
|
13
|
+
return this.resources.fetch({ type: 'versions' }, `transactions/${_transactionId}/versions`, params, options);
|
14
|
+
}
|
11
15
|
isTransaction(resource) {
|
12
16
|
return resource.type && (resource.type === Transactions.TYPE);
|
13
17
|
}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import { ApiResource } from '../resource';
|
2
|
+
import type { Resource, ResourceId, ResourceRel } from '../resource';
|
3
|
+
type VersionType = 'versions';
|
4
|
+
type VersionRel = ResourceRel & {
|
5
|
+
type: VersionType;
|
6
|
+
};
|
7
|
+
interface Version extends Resource {
|
8
|
+
readonly type: VersionType;
|
9
|
+
resource_type?: string | null;
|
10
|
+
resource_id?: string | null;
|
11
|
+
event?: string | null;
|
12
|
+
changes?: Record<string, any> | null;
|
13
|
+
who?: Record<string, any> | null;
|
14
|
+
}
|
15
|
+
declare class Versions extends ApiResource<Version> {
|
16
|
+
static readonly TYPE: VersionType;
|
17
|
+
isVersion(resource: any): resource is Version;
|
18
|
+
relationship(id: string | ResourceId | null): VersionRel;
|
19
|
+
type(): VersionType;
|
20
|
+
}
|
21
|
+
export default Versions;
|
22
|
+
export type { Version, VersionType };
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { ApiResource } from '../resource';
|
2
|
+
class Versions extends ApiResource {
|
3
|
+
isVersion(resource) {
|
4
|
+
return resource.type && (resource.type === Versions.TYPE);
|
5
|
+
}
|
6
|
+
relationship(id) {
|
7
|
+
return ((id === null) || (typeof id === 'string')) ? { id, type: Versions.TYPE } : { id: id.id, type: Versions.TYPE };
|
8
|
+
}
|
9
|
+
type() {
|
10
|
+
return Versions.TYPE;
|
11
|
+
}
|
12
|
+
}
|
13
|
+
Versions.TYPE = 'versions';
|
14
|
+
export default Versions;
|
@@ -3,6 +3,7 @@ import type { Resource, ResourceId, ResourcesConfig, ResourceRel, ListResponse }
|
|
3
3
|
import type { QueryParamsRetrieve, QueryParamsList } from '../query';
|
4
4
|
import type { Order } from './orders';
|
5
5
|
import type { Attachment } from './attachments';
|
6
|
+
import type { Version } from './versions';
|
6
7
|
import type { Authorization } from './authorizations';
|
7
8
|
import type { Event } from './events';
|
8
9
|
type VoidType = 'voids';
|
@@ -24,6 +25,7 @@ interface Void extends Resource {
|
|
24
25
|
gateway_transaction_id?: string | null;
|
25
26
|
order?: Order | null;
|
26
27
|
attachments?: Attachment[] | null;
|
28
|
+
versions?: Version[] | null;
|
27
29
|
reference_authorization?: Authorization | null;
|
28
30
|
events?: Event[] | null;
|
29
31
|
}
|
@@ -31,6 +33,7 @@ declare class Voids extends ApiResource<Void> {
|
|
31
33
|
static readonly TYPE: VoidType;
|
32
34
|
order(voidId: string | Void, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
33
35
|
attachments(voidId: string | Void, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
36
|
+
versions(voidId: string | Void, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
34
37
|
reference_authorization(voidId: string | Void, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Authorization>;
|
35
38
|
events(voidId: string | Void, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
36
39
|
isVoid(resource: any): resource is Void;
|
@@ -8,6 +8,10 @@ class Voids extends ApiResource {
|
|
8
8
|
const _voidId = voidId.id || voidId;
|
9
9
|
return this.resources.fetch({ type: 'attachments' }, `voids/${_voidId}/attachments`, params, options);
|
10
10
|
}
|
11
|
+
async versions(voidId, params, options) {
|
12
|
+
const _voidId = voidId.id || voidId;
|
13
|
+
return this.resources.fetch({ type: 'versions' }, `voids/${_voidId}/versions`, params, options);
|
14
|
+
}
|
11
15
|
async reference_authorization(voidId, params, options) {
|
12
16
|
const _voidId = voidId.id || voidId;
|
13
17
|
return this.resources.fetch({ type: 'authorizations' }, `voids/${_voidId}/reference_authorization`, params, options);
|
@@ -2,6 +2,7 @@ import { ApiResource } from '../resource';
|
|
2
2
|
import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse } from '../resource';
|
3
3
|
import type { QueryParamsRetrieve, QueryParamsList } from '../query';
|
4
4
|
import type { EventCallback } from './event_callbacks';
|
5
|
+
import type { Version } from './versions';
|
5
6
|
type WebhookType = 'webhooks';
|
6
7
|
type WebhookRel = ResourceRel & {
|
7
8
|
type: WebhookType;
|
@@ -16,6 +17,7 @@ interface Webhook extends Resource {
|
|
16
17
|
circuit_failure_count?: number | null;
|
17
18
|
shared_secret: string;
|
18
19
|
last_event_callbacks?: EventCallback[] | null;
|
20
|
+
versions?: Version[] | null;
|
19
21
|
}
|
20
22
|
interface WebhookCreate extends ResourceCreate {
|
21
23
|
name?: string | null;
|
@@ -36,6 +38,7 @@ declare class Webhooks extends ApiResource<Webhook> {
|
|
36
38
|
update(resource: WebhookUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Webhook>;
|
37
39
|
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
38
40
|
last_event_callbacks(webhookId: string | Webhook, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<EventCallback>>;
|
41
|
+
versions(webhookId: string | Webhook, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
39
42
|
_reset_circuit(id: string | Webhook, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Webhook>;
|
40
43
|
isWebhook(resource: any): resource is Webhook;
|
41
44
|
relationship(id: string | ResourceId | null): WebhookRel;
|
@@ -13,6 +13,10 @@ class Webhooks extends ApiResource {
|
|
13
13
|
const _webhookId = webhookId.id || webhookId;
|
14
14
|
return this.resources.fetch({ type: 'event_callbacks' }, `webhooks/${_webhookId}/last_event_callbacks`, params, options);
|
15
15
|
}
|
16
|
+
async versions(webhookId, params, options) {
|
17
|
+
const _webhookId = webhookId.id || webhookId;
|
18
|
+
return this.resources.fetch({ type: 'versions' }, `webhooks/${_webhookId}/versions`, params, options);
|
19
|
+
}
|
16
20
|
async _reset_circuit(id, params, options) {
|
17
21
|
return this.resources.update({ id: (typeof id === 'string') ? id : id.id, type: Webhooks.TYPE, _reset_circuit: true }, params, options);
|
18
22
|
}
|
@@ -1,7 +1,8 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
|
-
import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel } from '../resource';
|
3
|
-
import type { QueryParamsRetrieve } from '../query';
|
2
|
+
import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse } from '../resource';
|
3
|
+
import type { QueryParamsRetrieve, QueryParamsList } from '../query';
|
4
4
|
import type { Order, OrderType } from './orders';
|
5
|
+
import type { Version } from './versions';
|
5
6
|
type WireTransferType = 'wire_transfers';
|
6
7
|
type WireTransferRel = ResourceRel & {
|
7
8
|
type: WireTransferType;
|
@@ -13,6 +14,7 @@ interface WireTransfer extends Resource {
|
|
13
14
|
readonly type: WireTransferType;
|
14
15
|
payment_instrument?: Record<string, any> | null;
|
15
16
|
order?: Order | null;
|
17
|
+
versions?: Version[] | null;
|
16
18
|
}
|
17
19
|
interface WireTransferCreate extends ResourceCreate {
|
18
20
|
order: OrderRel;
|
@@ -26,6 +28,7 @@ declare class WireTransfers extends ApiResource<WireTransfer> {
|
|
26
28
|
update(resource: WireTransferUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<WireTransfer>;
|
27
29
|
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
28
30
|
order(wireTransferId: string | WireTransfer, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
31
|
+
versions(wireTransferId: string | WireTransfer, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
29
32
|
isWireTransfer(resource: any): resource is WireTransfer;
|
30
33
|
relationship(id: string | ResourceId | null): WireTransferRel;
|
31
34
|
type(): WireTransferType;
|
@@ -13,6 +13,10 @@ class WireTransfers extends ApiResource {
|
|
13
13
|
const _wireTransferId = wireTransferId.id || wireTransferId;
|
14
14
|
return this.resources.fetch({ type: 'orders' }, `wire_transfers/${_wireTransferId}/order`, params, options);
|
15
15
|
}
|
16
|
+
async versions(wireTransferId, params, options) {
|
17
|
+
const _wireTransferId = wireTransferId.id || wireTransferId;
|
18
|
+
return this.resources.fetch({ type: 'versions' }, `wire_transfers/${_wireTransferId}/versions`, params, options);
|
19
|
+
}
|
16
20
|
isWireTransfer(resource) {
|
17
21
|
return resource.type && (resource.type === WireTransfers.TYPE);
|
18
22
|
}
|
package/lib/esm/util.d.ts
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
/// <reference types="node" />
|
4
4
|
/// <reference types="node" />
|
5
5
|
/// <reference types="node" />
|
6
|
-
import type { ObjectType } from "
|
6
|
+
import type { ObjectType } from "../src/common";
|
7
7
|
declare const sleep: (ms: number) => Promise<NodeJS.Timeout>;
|
8
8
|
declare const sortObjectFields: (obj: ObjectType) => ObjectType;
|
9
9
|
export { sleep, sortObjectFields };
|