@commercelayer/sdk 5.12.5 → 5.13.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 +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 +11 -11
package/lib/cjs/api.d.ts
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
import type { Resource, ResourceRel } from './resource';
|
2
2
|
import type { TagType } from './resources/tags';
|
3
|
+
import type { VersionType } from './resources/versions';
|
3
4
|
/**
|
4
5
|
* ©2023 Commerce Layer Inc.
|
5
6
|
**/
|
@@ -116,11 +117,12 @@ export { default as TaxCategories } from './resources/tax_categories';
|
|
116
117
|
export { default as TaxRules } from './resources/tax_rules';
|
117
118
|
export { default as TaxjarAccounts } from './resources/taxjar_accounts';
|
118
119
|
export { default as Transactions } from './resources/transactions';
|
120
|
+
export { default as Versions } from './resources/versions';
|
119
121
|
export { default as Voids } from './resources/voids';
|
120
122
|
export { default as Webhooks } from './resources/webhooks';
|
121
123
|
export { default as WireTransfers } from './resources/wire_transfers';
|
122
|
-
export type ResourceTypeLock = 'addresses' | 'adjustments' | 'adyen_gateways' | 'adyen_payments' | 'application' | 'attachments' | 'authorizations' | 'avalara_accounts' | 'axerve_gateways' | 'axerve_payments' | 'billing_info_validation_rules' | 'bing_geocoders' | 'braintree_gateways' | 'braintree_payments' | 'bundles' | 'captures' | 'carrier_accounts' | 'checkout_com_gateways' | 'checkout_com_payments' | 'cleanups' | 'coupon_codes_promotion_rules' | 'coupon_recipients' | 'coupons' | 'customer_addresses' | 'customer_groups' | 'customer_password_resets' | 'customer_payment_sources' | 'customer_subscriptions' | 'customers' | 'delivery_lead_times' | 'event_callbacks' | 'events' | 'exports' | 'external_gateways' | 'external_payments' | 'external_promotions' | 'external_tax_calculators' | 'fixed_amount_promotions' | 'fixed_price_promotions' | 'free_gift_promotions' | 'free_shipping_promotions' | 'geocoders' | 'gift_card_recipients' | 'gift_cards' | 'google_geocoders' | 'imports' | 'in_stock_subscriptions' | 'inventory_models' | 'inventory_return_locations' | 'inventory_stock_locations' | 'klarna_gateways' | 'klarna_payments' | 'line_item_options' | 'line_items' | 'manual_gateways' | 'manual_tax_calculators' | 'markets' | 'merchants' | 'order_amount_promotion_rules' | 'order_copies' | 'order_factories' | 'order_subscription_items' | 'order_subscriptions' | 'order_validation_rules' | 'orders' | 'organization' | 'packages' | 'parcel_line_items' | 'parcels' | 'payment_gateways' | 'payment_methods' | 'paypal_gateways' | 'paypal_payments' | 'percentage_discount_promotions' | 'price_frequency_tiers' | 'price_lists' | 'price_tiers' | 'price_volume_tiers' | 'prices' | 'promotion_rules' | 'promotions' | 'recurring_order_copies' | 'refunds' | 'reserved_stocks' | 'return_line_items' | 'returns' | 'satispay_gateways' | 'satispay_payments' | 'shipments' | 'shipping_categories' | 'shipping_method_tiers' | 'shipping_methods' | 'shipping_weight_tiers' | 'shipping_zones' | 'sku_list_items' | 'sku_list_promotion_rules' | 'sku_lists' | 'sku_options' | 'skus' | 'stock_items' | 'stock_line_items' | 'stock_locations' | 'stock_reservations' | 'stock_transfers' | 'stripe_gateways' | 'stripe_payments' | 'subscription_models' | 'tags' | 'tax_calculators' | 'tax_categories' | 'tax_rules' | 'taxjar_accounts' | 'transactions' | 'voids' | 'webhooks' | 'wire_transfers';
|
123
|
-
export declare const resourceList: readonly ["addresses", "adjustments", "adyen_gateways", "adyen_payments", "application", "attachments", "authorizations", "avalara_accounts", "axerve_gateways", "axerve_payments", "billing_info_validation_rules", "bing_geocoders", "braintree_gateways", "braintree_payments", "bundles", "captures", "carrier_accounts", "checkout_com_gateways", "checkout_com_payments", "cleanups", "coupon_codes_promotion_rules", "coupon_recipients", "coupons", "customer_addresses", "customer_groups", "customer_password_resets", "customer_payment_sources", "customer_subscriptions", "customers", "delivery_lead_times", "event_callbacks", "events", "exports", "external_gateways", "external_payments", "external_promotions", "external_tax_calculators", "fixed_amount_promotions", "fixed_price_promotions", "free_gift_promotions", "free_shipping_promotions", "geocoders", "gift_card_recipients", "gift_cards", "google_geocoders", "imports", "in_stock_subscriptions", "inventory_models", "inventory_return_locations", "inventory_stock_locations", "klarna_gateways", "klarna_payments", "line_item_options", "line_items", "manual_gateways", "manual_tax_calculators", "markets", "merchants", "order_amount_promotion_rules", "order_copies", "order_factories", "order_subscription_items", "order_subscriptions", "order_validation_rules", "orders", "organization", "packages", "parcel_line_items", "parcels", "payment_gateways", "payment_methods", "paypal_gateways", "paypal_payments", "percentage_discount_promotions", "price_frequency_tiers", "price_lists", "price_tiers", "price_volume_tiers", "prices", "promotion_rules", "promotions", "recurring_order_copies", "refunds", "reserved_stocks", "return_line_items", "returns", "satispay_gateways", "satispay_payments", "shipments", "shipping_categories", "shipping_method_tiers", "shipping_methods", "shipping_weight_tiers", "shipping_zones", "sku_list_items", "sku_list_promotion_rules", "sku_lists", "sku_options", "skus", "stock_items", "stock_line_items", "stock_locations", "stock_reservations", "stock_transfers", "stripe_gateways", "stripe_payments", "subscription_models", "tags", "tax_calculators", "tax_categories", "tax_rules", "taxjar_accounts", "transactions", "voids", "webhooks", "wire_transfers"];
|
124
|
+
export type ResourceTypeLock = 'addresses' | 'adjustments' | 'adyen_gateways' | 'adyen_payments' | 'application' | 'attachments' | 'authorizations' | 'avalara_accounts' | 'axerve_gateways' | 'axerve_payments' | 'billing_info_validation_rules' | 'bing_geocoders' | 'braintree_gateways' | 'braintree_payments' | 'bundles' | 'captures' | 'carrier_accounts' | 'checkout_com_gateways' | 'checkout_com_payments' | 'cleanups' | 'coupon_codes_promotion_rules' | 'coupon_recipients' | 'coupons' | 'customer_addresses' | 'customer_groups' | 'customer_password_resets' | 'customer_payment_sources' | 'customer_subscriptions' | 'customers' | 'delivery_lead_times' | 'event_callbacks' | 'events' | 'exports' | 'external_gateways' | 'external_payments' | 'external_promotions' | 'external_tax_calculators' | 'fixed_amount_promotions' | 'fixed_price_promotions' | 'free_gift_promotions' | 'free_shipping_promotions' | 'geocoders' | 'gift_card_recipients' | 'gift_cards' | 'google_geocoders' | 'imports' | 'in_stock_subscriptions' | 'inventory_models' | 'inventory_return_locations' | 'inventory_stock_locations' | 'klarna_gateways' | 'klarna_payments' | 'line_item_options' | 'line_items' | 'manual_gateways' | 'manual_tax_calculators' | 'markets' | 'merchants' | 'order_amount_promotion_rules' | 'order_copies' | 'order_factories' | 'order_subscription_items' | 'order_subscriptions' | 'order_validation_rules' | 'orders' | 'organization' | 'packages' | 'parcel_line_items' | 'parcels' | 'payment_gateways' | 'payment_methods' | 'paypal_gateways' | 'paypal_payments' | 'percentage_discount_promotions' | 'price_frequency_tiers' | 'price_lists' | 'price_tiers' | 'price_volume_tiers' | 'prices' | 'promotion_rules' | 'promotions' | 'recurring_order_copies' | 'refunds' | 'reserved_stocks' | 'return_line_items' | 'returns' | 'satispay_gateways' | 'satispay_payments' | 'shipments' | 'shipping_categories' | 'shipping_method_tiers' | 'shipping_methods' | 'shipping_weight_tiers' | 'shipping_zones' | 'sku_list_items' | 'sku_list_promotion_rules' | 'sku_lists' | 'sku_options' | 'skus' | 'stock_items' | 'stock_line_items' | 'stock_locations' | 'stock_reservations' | 'stock_transfers' | 'stripe_gateways' | 'stripe_payments' | 'subscription_models' | 'tags' | 'tax_calculators' | 'tax_categories' | 'tax_rules' | 'taxjar_accounts' | 'transactions' | 'versions' | 'voids' | 'webhooks' | 'wire_transfers';
|
125
|
+
export declare const resourceList: readonly ["addresses", "adjustments", "adyen_gateways", "adyen_payments", "application", "attachments", "authorizations", "avalara_accounts", "axerve_gateways", "axerve_payments", "billing_info_validation_rules", "bing_geocoders", "braintree_gateways", "braintree_payments", "bundles", "captures", "carrier_accounts", "checkout_com_gateways", "checkout_com_payments", "cleanups", "coupon_codes_promotion_rules", "coupon_recipients", "coupons", "customer_addresses", "customer_groups", "customer_password_resets", "customer_payment_sources", "customer_subscriptions", "customers", "delivery_lead_times", "event_callbacks", "events", "exports", "external_gateways", "external_payments", "external_promotions", "external_tax_calculators", "fixed_amount_promotions", "fixed_price_promotions", "free_gift_promotions", "free_shipping_promotions", "geocoders", "gift_card_recipients", "gift_cards", "google_geocoders", "imports", "in_stock_subscriptions", "inventory_models", "inventory_return_locations", "inventory_stock_locations", "klarna_gateways", "klarna_payments", "line_item_options", "line_items", "manual_gateways", "manual_tax_calculators", "markets", "merchants", "order_amount_promotion_rules", "order_copies", "order_factories", "order_subscription_items", "order_subscriptions", "order_validation_rules", "orders", "organization", "packages", "parcel_line_items", "parcels", "payment_gateways", "payment_methods", "paypal_gateways", "paypal_payments", "percentage_discount_promotions", "price_frequency_tiers", "price_lists", "price_tiers", "price_volume_tiers", "prices", "promotion_rules", "promotions", "recurring_order_copies", "refunds", "reserved_stocks", "return_line_items", "returns", "satispay_gateways", "satispay_payments", "shipments", "shipping_categories", "shipping_method_tiers", "shipping_methods", "shipping_weight_tiers", "shipping_zones", "sku_list_items", "sku_list_promotion_rules", "sku_lists", "sku_options", "skus", "stock_items", "stock_line_items", "stock_locations", "stock_reservations", "stock_transfers", "stripe_gateways", "stripe_payments", "subscription_models", "tags", "tax_calculators", "tax_categories", "tax_rules", "taxjar_accounts", "transactions", "versions", "voids", "webhooks", "wire_transfers"];
|
124
126
|
export type RetrievableResourceType = ResourceTypeLock;
|
125
127
|
export type RetrievableResource = Resource & {
|
126
128
|
type: RetrievableResourceType;
|
@@ -148,3 +150,10 @@ export type TaggableResource = Resource & {
|
|
148
150
|
type: TagType;
|
149
151
|
}> | null;
|
150
152
|
};
|
153
|
+
export type VersionableResourceType = 'addresses' | 'adjustments' | 'adyen_gateways' | 'adyen_payments' | 'authorizations' | 'avalara_accounts' | 'axerve_gateways' | 'axerve_payments' | 'billing_info_validation_rules' | 'braintree_gateways' | 'braintree_payments' | 'bundles' | 'captures' | 'carrier_accounts' | 'checkout_com_gateways' | 'checkout_com_payments' | 'cleanups' | 'coupon_codes_promotion_rules' | 'coupon_recipients' | 'coupons' | 'customer_addresses' | 'customer_groups' | 'customer_payment_sources' | 'customer_subscriptions' | 'delivery_lead_times' | 'external_gateways' | 'external_payments' | 'external_promotions' | 'external_tax_calculators' | 'fixed_amount_promotions' | 'fixed_price_promotions' | 'free_gift_promotions' | 'free_shipping_promotions' | 'gift_card_recipients' | 'gift_cards' | 'in_stock_subscriptions' | 'inventory_models' | 'inventory_return_locations' | 'inventory_stock_locations' | 'klarna_gateways' | 'klarna_payments' | 'manual_gateways' | 'manual_tax_calculators' | 'markets' | 'merchants' | 'order_amount_promotion_rules' | 'order_subscriptions' | 'order_validation_rules' | 'orders' | 'packages' | 'parcel_line_items' | 'parcels' | 'payment_gateways' | 'payment_methods' | 'paypal_gateways' | 'paypal_payments' | 'percentage_discount_promotions' | 'price_frequency_tiers' | 'price_lists' | 'price_tiers' | 'price_volume_tiers' | 'prices' | 'promotion_rules' | 'promotions' | 'refunds' | 'returns' | 'satispay_gateways' | 'satispay_payments' | 'shipments' | 'shipping_categories' | 'shipping_method_tiers' | 'shipping_methods' | 'shipping_weight_tiers' | 'shipping_zones' | 'sku_list_items' | 'sku_list_promotion_rules' | 'sku_lists' | 'sku_options' | 'skus' | 'stock_items' | 'stock_line_items' | 'stock_locations' | 'stock_transfers' | 'stripe_gateways' | 'stripe_payments' | 'tax_calculators' | 'tax_categories' | 'tax_rules' | 'taxjar_accounts' | 'transactions' | 'voids' | 'webhooks' | 'wire_transfers';
|
154
|
+
export type VersionableResource = Resource & {
|
155
|
+
type: VersionableResourceType;
|
156
|
+
versions?: Array<ResourceRel & {
|
157
|
+
type: VersionType;
|
158
|
+
}> | null;
|
159
|
+
};
|
package/lib/cjs/api.js
CHANGED
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
6
|
exports.InventoryStockLocations = exports.InventoryReturnLocations = exports.InventoryModels = exports.InStockSubscriptions = exports.Imports = exports.GoogleGeocoders = exports.GiftCards = exports.GiftCardRecipients = exports.Geocoders = exports.FreeShippingPromotions = exports.FreeGiftPromotions = exports.FixedPricePromotions = exports.FixedAmountPromotions = exports.ExternalTaxCalculators = exports.ExternalPromotions = exports.ExternalPayments = exports.ExternalGateways = exports.Exports = exports.Events = exports.EventCallbacks = exports.DeliveryLeadTimes = exports.Customers = exports.CustomerSubscriptions = exports.CustomerPaymentSources = exports.CustomerPasswordResets = exports.CustomerGroups = exports.CustomerAddresses = exports.Coupons = exports.CouponRecipients = exports.CouponCodesPromotionRules = exports.Cleanups = exports.CheckoutComPayments = exports.CheckoutComGateways = exports.CarrierAccounts = exports.Captures = exports.Bundles = exports.BraintreePayments = exports.BraintreeGateways = exports.BingGeocoders = exports.BillingInfoValidationRules = exports.AxervePayments = exports.AxerveGateways = exports.AvalaraAccounts = exports.Authorizations = exports.Attachments = exports.Applications = exports.AdyenPayments = exports.AdyenGateways = exports.Adjustments = exports.Addresses = void 0;
|
7
7
|
exports.StockItems = exports.Skus = exports.SkuOptions = exports.SkuLists = exports.SkuListPromotionRules = exports.SkuListItems = exports.ShippingZones = exports.ShippingWeightTiers = exports.ShippingMethods = exports.ShippingMethodTiers = exports.ShippingCategories = exports.Shipments = exports.SatispayPayments = exports.SatispayGateways = exports.Returns = exports.ReturnLineItems = exports.ReservedStocks = exports.Refunds = exports.RecurringOrderCopies = exports.Promotions = exports.PromotionRules = exports.Prices = exports.PriceVolumeTiers = exports.PriceTiers = exports.PriceLists = exports.PriceFrequencyTiers = exports.PercentageDiscountPromotions = exports.PaypalPayments = exports.PaypalGateways = exports.PaymentMethods = exports.PaymentGateways = exports.Parcels = exports.ParcelLineItems = exports.Packages = exports.Organizations = exports.Orders = exports.OrderValidationRules = exports.OrderSubscriptions = exports.OrderSubscriptionItems = exports.OrderFactories = exports.OrderCopies = exports.OrderAmountPromotionRules = exports.Merchants = exports.Markets = exports.ManualTaxCalculators = exports.ManualGateways = exports.LineItems = exports.LineItemOptions = exports.KlarnaPayments = exports.KlarnaGateways = void 0;
|
8
|
-
exports.resourceList = exports.WireTransfers = exports.Webhooks = exports.Voids = exports.Transactions = exports.TaxjarAccounts = exports.TaxRules = exports.TaxCategories = exports.TaxCalculators = exports.Tags = exports.SubscriptionModels = exports.StripePayments = exports.StripeGateways = exports.StockTransfers = exports.StockReservations = exports.StockLocations = exports.StockLineItems = void 0;
|
8
|
+
exports.resourceList = exports.WireTransfers = exports.Webhooks = exports.Voids = exports.Versions = exports.Transactions = exports.TaxjarAccounts = exports.TaxRules = exports.TaxCategories = exports.TaxCalculators = exports.Tags = exports.SubscriptionModels = exports.StripePayments = exports.StripeGateways = exports.StockTransfers = exports.StockReservations = exports.StockLocations = exports.StockLineItems = void 0;
|
9
9
|
// ##__API_RESOURCES_START__##
|
10
10
|
// ##__API_RESOURCES_TEMPLATE:: export { default as ##__RESOURCE_CLASS__## } from './resources/##__RESOURCE_TYPE__##'
|
11
11
|
/**
|
@@ -237,6 +237,8 @@ var taxjar_accounts_1 = require("./resources/taxjar_accounts");
|
|
237
237
|
Object.defineProperty(exports, "TaxjarAccounts", { enumerable: true, get: function () { return __importDefault(taxjar_accounts_1).default; } });
|
238
238
|
var transactions_1 = require("./resources/transactions");
|
239
239
|
Object.defineProperty(exports, "Transactions", { enumerable: true, get: function () { return __importDefault(transactions_1).default; } });
|
240
|
+
var versions_1 = require("./resources/versions");
|
241
|
+
Object.defineProperty(exports, "Versions", { enumerable: true, get: function () { return __importDefault(versions_1).default; } });
|
240
242
|
var voids_1 = require("./resources/voids");
|
241
243
|
Object.defineProperty(exports, "Voids", { enumerable: true, get: function () { return __importDefault(voids_1).default; } });
|
242
244
|
var webhooks_1 = require("./resources/webhooks");
|
@@ -359,6 +361,7 @@ exports.resourceList = [
|
|
359
361
|
'tax_rules',
|
360
362
|
'taxjar_accounts',
|
361
363
|
'transactions',
|
364
|
+
'versions',
|
362
365
|
'voids',
|
363
366
|
'webhooks',
|
364
367
|
'wire_transfers'
|
@@ -2,14 +2,14 @@ import * as api from './api';
|
|
2
2
|
import type { ApiError } from './error';
|
3
3
|
import type { ErrorInterceptor, InterceptorType, RawResponseReader, RequestInterceptor, ResponseInterceptor } from './interceptor';
|
4
4
|
import { type ResourcesInitConfig } from './resource';
|
5
|
-
declare const OPEN_API_SCHEMA_VERSION = "4.
|
5
|
+
declare const OPEN_API_SCHEMA_VERSION = "4.11.0";
|
6
6
|
export { OPEN_API_SCHEMA_VERSION };
|
7
7
|
type SdkConfig = {};
|
8
8
|
type CommerceLayerInitConfig = SdkConfig & ResourcesInitConfig;
|
9
9
|
type CommerceLayerConfig = Partial<CommerceLayerInitConfig>;
|
10
10
|
declare class CommerceLayerClient {
|
11
11
|
#private;
|
12
|
-
readonly openApiSchemaVersion = "4.
|
12
|
+
readonly openApiSchemaVersion = "4.11.0";
|
13
13
|
addresses: api.Addresses;
|
14
14
|
adjustments: api.Adjustments;
|
15
15
|
adyen_gateways: api.AdyenGateways;
|
@@ -123,13 +123,14 @@ declare class CommerceLayerClient {
|
|
123
123
|
tax_rules: api.TaxRules;
|
124
124
|
taxjar_accounts: api.TaxjarAccounts;
|
125
125
|
transactions: api.Transactions;
|
126
|
+
versions: api.Versions;
|
126
127
|
voids: api.Voids;
|
127
128
|
webhooks: api.Webhooks;
|
128
129
|
wire_transfers: api.WireTransfers;
|
129
130
|
constructor(config: CommerceLayerInitConfig);
|
130
131
|
get currentOrganization(): string;
|
131
132
|
private localConfig;
|
132
|
-
config(config: CommerceLayerConfig):
|
133
|
+
config(config: CommerceLayerConfig): CommerceLayerClient;
|
133
134
|
resources(): readonly string[];
|
134
135
|
isApiError(error: any): error is ApiError;
|
135
136
|
addRequestInterceptor(onFulfilled?: RequestInterceptor, onRejected?: ErrorInterceptor): number;
|
package/lib/cjs/commercelayer.js
CHANGED
@@ -45,7 +45,7 @@ const resource_1 = __importDefault(require("./resource"));
|
|
45
45
|
const debug_1 = __importDefault(require("./debug"));
|
46
46
|
const debug = (0, debug_1.default)('commercelayer');
|
47
47
|
// Autogenerated schema version number, do not remove this line
|
48
|
-
const OPEN_API_SCHEMA_VERSION = '4.
|
48
|
+
const OPEN_API_SCHEMA_VERSION = '4.11.0';
|
49
49
|
exports.OPEN_API_SCHEMA_VERSION = OPEN_API_SCHEMA_VERSION;
|
50
50
|
class CommerceLayerClient {
|
51
51
|
// ##__CL_RESOURCES_DEF_STOP__##
|
@@ -57,6 +57,7 @@ class CommerceLayerClient {
|
|
57
57
|
debug('new commercelayer instance %O', config);
|
58
58
|
__classPrivateFieldSet(this, _CommerceLayerClient_adapter, new resource_1.default(config), "f");
|
59
59
|
__classPrivateFieldSet(this, _CommerceLayerClient_organization, config.organization, "f");
|
60
|
+
// this.#environment = 'test'
|
60
61
|
// ##__CL_RESOURCES_INIT_START__##
|
61
62
|
// ##__CL_RESOURCES_INIT_TEMPLATE:: ##__TAB__####__TAB__##this.##__RESOURCE_TYPE__## = new api.##__RESOURCE_CLASS__##(this.#adapter)
|
62
63
|
this.addresses = new api.Addresses(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
@@ -172,12 +173,15 @@ class CommerceLayerClient {
|
|
172
173
|
this.tax_rules = new api.TaxRules(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
173
174
|
this.taxjar_accounts = new api.TaxjarAccounts(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
174
175
|
this.transactions = new api.Transactions(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
176
|
+
this.versions = new api.Versions(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
175
177
|
this.voids = new api.Voids(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
176
178
|
this.webhooks = new api.Webhooks(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
177
179
|
this.wire_transfers = new api.WireTransfers(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
178
180
|
// ##__CL_RESOURCES_INIT_STOP__##
|
179
181
|
}
|
180
182
|
get currentOrganization() { return __classPrivateFieldGet(this, _CommerceLayerClient_organization, "f"); }
|
183
|
+
// get currentAccessToken(): string { return this.#adapter?.clientInstance?.currentAccessToken}
|
184
|
+
// get environment(): ApiMode { return this.#environment }
|
181
185
|
localConfig(config) {
|
182
186
|
if (config.organization)
|
183
187
|
__classPrivateFieldSet(this, _CommerceLayerClient_organization, config.organization, "f");
|
@@ -191,6 +195,7 @@ class CommerceLayerClient {
|
|
191
195
|
if (!config.organization)
|
192
196
|
config.organization = this.currentOrganization;
|
193
197
|
__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f").config(config);
|
198
|
+
return this;
|
194
199
|
}
|
195
200
|
resources() {
|
196
201
|
return static_1.CommerceLayerStatic.resources();
|
package/lib/cjs/config.js
CHANGED
@@ -1,14 +1,16 @@
|
|
1
1
|
"use strict";
|
2
|
+
// export type ApiMode = 'test' | 'live'
|
2
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
4
|
const config = {
|
4
5
|
default: {
|
6
|
+
// environment: 'test',
|
5
7
|
domain: 'commercelayer.io',
|
6
8
|
pageNumber: 1,
|
7
9
|
pageSize: 10,
|
8
10
|
},
|
9
11
|
client: {
|
10
12
|
timeout: 15000,
|
11
|
-
requiredAttributes: ['organization', 'accessToken']
|
13
|
+
requiredAttributes: ['organization', 'accessToken'],
|
12
14
|
}
|
13
15
|
};
|
14
16
|
exports.default = config;
|
package/lib/cjs/model.d.ts
CHANGED
@@ -114,6 +114,7 @@ export type { TaxCategory, TaxCategoryCreate, TaxCategoryUpdate } from './resour
|
|
114
114
|
export type { TaxRule, TaxRuleCreate, TaxRuleUpdate } from './resources/tax_rules';
|
115
115
|
export type { TaxjarAccount, TaxjarAccountCreate, TaxjarAccountUpdate } from './resources/taxjar_accounts';
|
116
116
|
export type { Transaction } from './resources/transactions';
|
117
|
+
export type { Version } from './resources/versions';
|
117
118
|
export type { Void } from './resources/voids';
|
118
119
|
export type { Webhook, WebhookCreate, WebhookUpdate } from './resources/webhooks';
|
119
120
|
export type { WireTransfer, WireTransferCreate, WireTransferUpdate } from './resources/wire_transfers';
|
package/lib/cjs/resource.d.ts
CHANGED
@@ -55,7 +55,7 @@ declare class ResourceAdapter {
|
|
55
55
|
constructor(config: ResourcesInitConfig);
|
56
56
|
get interceptors(): InterceptorManager;
|
57
57
|
private localConfig;
|
58
|
-
config(config: ResourcesConfig):
|
58
|
+
config(config: ResourcesConfig): ResourceAdapter;
|
59
59
|
singleton<R extends Resource>(resource: ResourceType, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<R>;
|
60
60
|
retrieve<R extends Resource>(resource: ResourceId, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<R>;
|
61
61
|
list<R extends Resource>(resource: ResourceType, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<R>>;
|
package/lib/cjs/resource.js
CHANGED
@@ -55,7 +55,13 @@ class ResourceAdapter {
|
|
55
55
|
this.localConfig(config);
|
56
56
|
// Client config
|
57
57
|
__classPrivateFieldGet(this, _ResourceAdapter_client, "f").config(config);
|
58
|
+
return this;
|
58
59
|
}
|
60
|
+
/*
|
61
|
+
get clientInstance(): ApiClient {
|
62
|
+
return this.#client
|
63
|
+
}
|
64
|
+
*/
|
59
65
|
async singleton(resource, params, options) {
|
60
66
|
debug('singleton: %o, %O, %O', resource, params || {}, options || {});
|
61
67
|
const queryParams = (0, query_1.generateQueryStringParams)(params, resource);
|
@@ -4,6 +4,7 @@ import type { QueryParamsRetrieve, QueryParamsList } from '../query';
|
|
4
4
|
import type { Geocoder, GeocoderType } from './geocoders';
|
5
5
|
import type { Event } from './events';
|
6
6
|
import type { Tag, TagType } from './tags';
|
7
|
+
import type { Version } from './versions';
|
7
8
|
type AddressType = 'addresses';
|
8
9
|
type AddressRel = ResourceRel & {
|
9
10
|
type: AddressType;
|
@@ -43,6 +44,7 @@ interface Address extends Resource {
|
|
43
44
|
geocoder?: Geocoder | null;
|
44
45
|
events?: Event[] | null;
|
45
46
|
tags?: Tag[] | null;
|
47
|
+
versions?: Version[] | null;
|
46
48
|
}
|
47
49
|
interface AddressCreate extends ResourceCreate {
|
48
50
|
business?: boolean | null;
|
@@ -92,6 +94,7 @@ declare class Addresses extends ApiResource<Address> {
|
|
92
94
|
geocoder(addressId: string | Address, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Geocoder>;
|
93
95
|
events(addressId: string | Address, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
94
96
|
tags(addressId: string | Address, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
|
97
|
+
versions(addressId: string | Address, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
95
98
|
isAddress(resource: any): resource is Address;
|
96
99
|
relationship(id: string | ResourceId | null): AddressRel;
|
97
100
|
type(): AddressType;
|
@@ -23,6 +23,10 @@ class Addresses extends resource_1.ApiResource {
|
|
23
23
|
const _addressId = addressId.id || addressId;
|
24
24
|
return this.resources.fetch({ type: 'tags' }, `addresses/${_addressId}/tags`, params, options);
|
25
25
|
}
|
26
|
+
async versions(addressId, params, options) {
|
27
|
+
const _addressId = addressId.id || addressId;
|
28
|
+
return this.resources.fetch({ type: 'versions' }, `addresses/${_addressId}/versions`, params, options);
|
29
|
+
}
|
26
30
|
isAddress(resource) {
|
27
31
|
return resource.type && (resource.type === Addresses.TYPE);
|
28
32
|
}
|
@@ -1,6 +1,7 @@
|
|
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
|
+
import type { Version } from './versions';
|
4
5
|
type AdjustmentType = 'adjustments';
|
5
6
|
type AdjustmentRel = ResourceRel & {
|
6
7
|
type: AdjustmentType;
|
@@ -12,6 +13,7 @@ interface Adjustment extends Resource {
|
|
12
13
|
amount_cents: number;
|
13
14
|
amount_float: number;
|
14
15
|
formatted_amount: string;
|
16
|
+
versions?: Version[] | null;
|
15
17
|
}
|
16
18
|
interface AdjustmentCreate extends ResourceCreate {
|
17
19
|
name: string;
|
@@ -28,6 +30,7 @@ declare class Adjustments extends ApiResource<Adjustment> {
|
|
28
30
|
create(resource: AdjustmentCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Adjustment>;
|
29
31
|
update(resource: AdjustmentUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Adjustment>;
|
30
32
|
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
33
|
+
versions(adjustmentId: string | Adjustment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
31
34
|
isAdjustment(resource: any): resource is Adjustment;
|
32
35
|
relationship(id: string | ResourceId | null): AdjustmentRel;
|
33
36
|
type(): AdjustmentType;
|
@@ -11,6 +11,10 @@ class Adjustments extends resource_1.ApiResource {
|
|
11
11
|
async delete(id, options) {
|
12
12
|
await this.resources.delete((typeof id === 'string') ? { id, type: Adjustments.TYPE } : id, options);
|
13
13
|
}
|
14
|
+
async versions(adjustmentId, params, options) {
|
15
|
+
const _adjustmentId = adjustmentId.id || adjustmentId;
|
16
|
+
return this.resources.fetch({ type: 'versions' }, `adjustments/${_adjustmentId}/versions`, params, options);
|
17
|
+
}
|
14
18
|
isAdjustment(resource) {
|
15
19
|
return resource.type && (resource.type === Adjustments.TYPE);
|
16
20
|
}
|
@@ -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 { PaymentMethod } from './payment_methods';
|
5
|
+
import type { Version } from './versions';
|
5
6
|
import type { AdyenPayment, AdyenPaymentType } from './adyen_payments';
|
6
7
|
type AdyenGatewayType = 'adyen_gateways';
|
7
8
|
type AdyenGatewayRel = ResourceRel & {
|
@@ -18,6 +19,7 @@ interface AdyenGateway extends Resource {
|
|
18
19
|
webhook_endpoint_secret?: string | null;
|
19
20
|
webhook_endpoint_url?: string | null;
|
20
21
|
payment_methods?: PaymentMethod[] | null;
|
22
|
+
versions?: Version[] | null;
|
21
23
|
adyen_payments?: AdyenPayment[] | null;
|
22
24
|
}
|
23
25
|
interface AdyenGatewayCreate extends ResourceCreate {
|
@@ -48,6 +50,7 @@ declare class AdyenGateways extends ApiResource<AdyenGateway> {
|
|
48
50
|
update(resource: AdyenGatewayUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<AdyenGateway>;
|
49
51
|
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
50
52
|
payment_methods(adyenGatewayId: string | AdyenGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>>;
|
53
|
+
versions(adyenGatewayId: string | AdyenGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
51
54
|
adyen_payments(adyenGatewayId: string | AdyenGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<AdyenPayment>>;
|
52
55
|
isAdyenGateway(resource: any): resource is AdyenGateway;
|
53
56
|
relationship(id: string | ResourceId | null): AdyenGatewayRel;
|
@@ -15,6 +15,10 @@ class AdyenGateways extends resource_1.ApiResource {
|
|
15
15
|
const _adyenGatewayId = adyenGatewayId.id || adyenGatewayId;
|
16
16
|
return this.resources.fetch({ type: 'payment_methods' }, `adyen_gateways/${_adyenGatewayId}/payment_methods`, params, options);
|
17
17
|
}
|
18
|
+
async versions(adyenGatewayId, params, options) {
|
19
|
+
const _adyenGatewayId = adyenGatewayId.id || adyenGatewayId;
|
20
|
+
return this.resources.fetch({ type: 'versions' }, `adyen_gateways/${_adyenGatewayId}/versions`, params, options);
|
21
|
+
}
|
18
22
|
async adyen_payments(adyenGatewayId, params, options) {
|
19
23
|
const _adyenGatewayId = adyenGatewayId.id || adyenGatewayId;
|
20
24
|
return this.resources.fetch({ type: 'adyen_payments' }, `adyen_gateways/${_adyenGatewayId}/adyen_payments`, params, options);
|
@@ -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 AdyenPaymentType = 'adyen_payments';
|
7
8
|
type AdyenPaymentRel = ResourceRel & {
|
8
9
|
type: AdyenPaymentType;
|
@@ -21,6 +22,7 @@ interface AdyenPayment extends Resource {
|
|
21
22
|
payment_instrument?: Record<string, any> | null;
|
22
23
|
order?: Order | null;
|
23
24
|
payment_gateway?: PaymentGateway | null;
|
25
|
+
versions?: Version[] | null;
|
24
26
|
}
|
25
27
|
interface AdyenPaymentCreate extends ResourceCreate {
|
26
28
|
order: OrderRel;
|
@@ -39,6 +41,7 @@ declare class AdyenPayments extends ApiResource<AdyenPayment> {
|
|
39
41
|
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
40
42
|
order(adyenPaymentId: string | AdyenPayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
41
43
|
payment_gateway(adyenPaymentId: string | AdyenPayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaymentGateway>;
|
44
|
+
versions(adyenPaymentId: string | AdyenPayment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
42
45
|
_details(id: string | AdyenPayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<AdyenPayment>;
|
43
46
|
isAdyenPayment(resource: any): resource is AdyenPayment;
|
44
47
|
relationship(id: string | ResourceId | null): AdyenPaymentRel;
|
@@ -19,6 +19,10 @@ class AdyenPayments extends resource_1.ApiResource {
|
|
19
19
|
const _adyenPaymentId = adyenPaymentId.id || adyenPaymentId;
|
20
20
|
return this.resources.fetch({ type: 'payment_gateways' }, `adyen_payments/${_adyenPaymentId}/payment_gateway`, params, options);
|
21
21
|
}
|
22
|
+
async versions(adyenPaymentId, params, options) {
|
23
|
+
const _adyenPaymentId = adyenPaymentId.id || adyenPaymentId;
|
24
|
+
return this.resources.fetch({ type: 'versions' }, `adyen_payments/${_adyenPaymentId}/versions`, params, options);
|
25
|
+
}
|
22
26
|
async _details(id, params, options) {
|
23
27
|
return this.resources.update({ id: (typeof id === 'string') ? id : id.id, type: AdyenPayments.TYPE, _details: true }, params, options);
|
24
28
|
}
|
@@ -3,6 +3,7 @@ import type { Resource, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel
|
|
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 { Capture } from './captures';
|
7
8
|
import type { Void } from './voids';
|
8
9
|
import type { Event } from './events';
|
@@ -39,6 +40,7 @@ interface Authorization extends Resource {
|
|
39
40
|
formatted_void_balance?: string | null;
|
40
41
|
order?: Order | null;
|
41
42
|
attachments?: Attachment[] | null;
|
43
|
+
versions?: Version[] | null;
|
42
44
|
captures?: Capture[] | null;
|
43
45
|
voids?: Void[] | null;
|
44
46
|
events?: Event[] | null;
|
@@ -53,6 +55,7 @@ declare class Authorizations extends ApiResource<Authorization> {
|
|
53
55
|
update(resource: AuthorizationUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Authorization>;
|
54
56
|
order(authorizationId: string | Authorization, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
55
57
|
attachments(authorizationId: string | Authorization, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
58
|
+
versions(authorizationId: string | Authorization, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
56
59
|
captures(authorizationId: string | Authorization, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Capture>>;
|
57
60
|
voids(authorizationId: string | Authorization, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Void>>;
|
58
61
|
events(authorizationId: string | Authorization, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
@@ -13,6 +13,10 @@ class Authorizations extends resource_1.ApiResource {
|
|
13
13
|
const _authorizationId = authorizationId.id || authorizationId;
|
14
14
|
return this.resources.fetch({ type: 'attachments' }, `authorizations/${_authorizationId}/attachments`, params, options);
|
15
15
|
}
|
16
|
+
async versions(authorizationId, params, options) {
|
17
|
+
const _authorizationId = authorizationId.id || authorizationId;
|
18
|
+
return this.resources.fetch({ type: 'versions' }, `authorizations/${_authorizationId}/versions`, params, options);
|
19
|
+
}
|
16
20
|
async captures(authorizationId, params, options) {
|
17
21
|
const _authorizationId = authorizationId.id || authorizationId;
|
18
22
|
return this.resources.fetch({ type: 'captures' }, `authorizations/${_authorizationId}/captures`, params, options);
|
@@ -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 AvalaraAccountType = 'avalara_accounts';
|
8
9
|
type AvalaraAccountRel = ResourceRel & {
|
@@ -20,6 +21,7 @@ interface AvalaraAccount extends Resource {
|
|
20
21
|
ddp?: string | null;
|
21
22
|
markets?: Market[] | null;
|
22
23
|
attachments?: Attachment[] | null;
|
24
|
+
versions?: Version[] | null;
|
23
25
|
tax_categories?: TaxCategory[] | null;
|
24
26
|
}
|
25
27
|
interface AvalaraAccountCreate extends ResourceCreate {
|
@@ -47,6 +49,7 @@ declare class AvalaraAccounts extends ApiResource<AvalaraAccount> {
|
|
47
49
|
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
48
50
|
markets(avalaraAccountId: string | AvalaraAccount, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Market>>;
|
49
51
|
attachments(avalaraAccountId: string | AvalaraAccount, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
52
|
+
versions(avalaraAccountId: string | AvalaraAccount, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
50
53
|
tax_categories(avalaraAccountId: string | AvalaraAccount, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<TaxCategory>>;
|
51
54
|
isAvalaraAccount(resource: any): resource is AvalaraAccount;
|
52
55
|
relationship(id: string | ResourceId | null): AvalaraAccountRel;
|
@@ -19,6 +19,10 @@ class AvalaraAccounts extends resource_1.ApiResource {
|
|
19
19
|
const _avalaraAccountId = avalaraAccountId.id || avalaraAccountId;
|
20
20
|
return this.resources.fetch({ type: 'attachments' }, `avalara_accounts/${_avalaraAccountId}/attachments`, params, options);
|
21
21
|
}
|
22
|
+
async versions(avalaraAccountId, params, options) {
|
23
|
+
const _avalaraAccountId = avalaraAccountId.id || avalaraAccountId;
|
24
|
+
return this.resources.fetch({ type: 'versions' }, `avalara_accounts/${_avalaraAccountId}/versions`, params, options);
|
25
|
+
}
|
22
26
|
async tax_categories(avalaraAccountId, params, options) {
|
23
27
|
const _avalaraAccountId = avalaraAccountId.id || avalaraAccountId;
|
24
28
|
return this.resources.fetch({ type: 'tax_categories' }, `avalara_accounts/${_avalaraAccountId}/tax_categories`, 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 { PaymentMethod } from './payment_methods';
|
5
|
+
import type { Version } from './versions';
|
5
6
|
import type { AxervePayment, AxervePaymentType } from './axerve_payments';
|
6
7
|
type AxerveGatewayType = 'axerve_gateways';
|
7
8
|
type AxerveGatewayRel = ResourceRel & {
|
@@ -14,7 +15,9 @@ interface AxerveGateway extends Resource {
|
|
14
15
|
readonly type: AxerveGatewayType;
|
15
16
|
name: string;
|
16
17
|
login: string;
|
18
|
+
webhook_endpoint_url?: string | null;
|
17
19
|
payment_methods?: PaymentMethod[] | null;
|
20
|
+
versions?: Version[] | null;
|
18
21
|
axerve_payments?: AxervePayment[] | null;
|
19
22
|
}
|
20
23
|
interface AxerveGatewayCreate extends ResourceCreate {
|
@@ -35,6 +38,7 @@ declare class AxerveGateways extends ApiResource<AxerveGateway> {
|
|
35
38
|
update(resource: AxerveGatewayUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<AxerveGateway>;
|
36
39
|
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
37
40
|
payment_methods(axerveGatewayId: string | AxerveGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>>;
|
41
|
+
versions(axerveGatewayId: string | AxerveGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
38
42
|
axerve_payments(axerveGatewayId: string | AxerveGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<AxervePayment>>;
|
39
43
|
isAxerveGateway(resource: any): resource is AxerveGateway;
|
40
44
|
relationship(id: string | ResourceId | null): AxerveGatewayRel;
|
@@ -15,6 +15,10 @@ class AxerveGateways extends resource_1.ApiResource {
|
|
15
15
|
const _axerveGatewayId = axerveGatewayId.id || axerveGatewayId;
|
16
16
|
return this.resources.fetch({ type: 'payment_methods' }, `axerve_gateways/${_axerveGatewayId}/payment_methods`, params, options);
|
17
17
|
}
|
18
|
+
async versions(axerveGatewayId, params, options) {
|
19
|
+
const _axerveGatewayId = axerveGatewayId.id || axerveGatewayId;
|
20
|
+
return this.resources.fetch({ type: 'versions' }, `axerve_gateways/${_axerveGatewayId}/versions`, params, options);
|
21
|
+
}
|
18
22
|
async axerve_payments(axerveGatewayId, params, options) {
|
19
23
|
const _axerveGatewayId = axerveGatewayId.id || axerveGatewayId;
|
20
24
|
return this.resources.fetch({ type: 'axerve_payments' }, `axerve_gateways/${_axerveGatewayId}/axerve_payments`, params, options);
|
@@ -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 AxervePaymentType = 'axerve_payments';
|
7
8
|
type AxervePaymentRel = ResourceRel & {
|
8
9
|
type: AxervePaymentType;
|
@@ -22,6 +23,7 @@ interface AxervePayment extends Resource {
|
|
22
23
|
payment_instrument?: Record<string, any> | null;
|
23
24
|
order?: Order | null;
|
24
25
|
payment_gateway?: PaymentGateway | null;
|
26
|
+
versions?: Version[] | null;
|
25
27
|
}
|
26
28
|
interface AxervePaymentCreate extends ResourceCreate {
|
27
29
|
return_url: string;
|
@@ -39,6 +41,7 @@ declare class AxervePayments extends ApiResource<AxervePayment> {
|
|
39
41
|
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
40
42
|
order(axervePaymentId: string | AxervePayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
41
43
|
payment_gateway(axervePaymentId: string | AxervePayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaymentGateway>;
|
44
|
+
versions(axervePaymentId: string | AxervePayment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
42
45
|
_update(id: string | AxervePayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<AxervePayment>;
|
43
46
|
isAxervePayment(resource: any): resource is AxervePayment;
|
44
47
|
relationship(id: string | ResourceId | null): AxervePaymentRel;
|
@@ -19,6 +19,10 @@ class AxervePayments extends resource_1.ApiResource {
|
|
19
19
|
const _axervePaymentId = axervePaymentId.id || axervePaymentId;
|
20
20
|
return this.resources.fetch({ type: 'payment_gateways' }, `axerve_payments/${_axervePaymentId}/payment_gateway`, params, options);
|
21
21
|
}
|
22
|
+
async versions(axervePaymentId, params, options) {
|
23
|
+
const _axervePaymentId = axervePaymentId.id || axervePaymentId;
|
24
|
+
return this.resources.fetch({ type: 'versions' }, `axerve_payments/${_axervePaymentId}/versions`, params, options);
|
25
|
+
}
|
22
26
|
async _update(id, params, options) {
|
23
27
|
return this.resources.update({ id: (typeof id === 'string') ? id : id.id, type: AxervePayments.TYPE, _update: true }, params, options);
|
24
28
|
}
|
@@ -3,6 +3,7 @@ import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesCon
|
|
3
3
|
import type { QueryParamsRetrieve, QueryParamsList } from '../query';
|
4
4
|
import type { Market, MarketType } from './markets';
|
5
5
|
import type { Attachment } from './attachments';
|
6
|
+
import type { Version } from './versions';
|
6
7
|
type BillingInfoValidationRuleType = 'billing_info_validation_rules';
|
7
8
|
type BillingInfoValidationRuleRel = ResourceRel & {
|
8
9
|
type: BillingInfoValidationRuleType;
|
@@ -14,6 +15,7 @@ interface BillingInfoValidationRule extends Resource {
|
|
14
15
|
readonly type: BillingInfoValidationRuleType;
|
15
16
|
market?: Market | null;
|
16
17
|
attachments?: Attachment[] | null;
|
18
|
+
versions?: Version[] | null;
|
17
19
|
}
|
18
20
|
interface BillingInfoValidationRuleCreate extends ResourceCreate {
|
19
21
|
market: MarketRel;
|
@@ -28,6 +30,7 @@ declare class BillingInfoValidationRules extends ApiResource<BillingInfoValidati
|
|
28
30
|
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
29
31
|
market(billingInfoValidationRuleId: string | BillingInfoValidationRule, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Market>;
|
30
32
|
attachments(billingInfoValidationRuleId: string | BillingInfoValidationRule, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
33
|
+
versions(billingInfoValidationRuleId: string | BillingInfoValidationRule, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
31
34
|
isBillingInfoValidationRule(resource: any): resource is BillingInfoValidationRule;
|
32
35
|
relationship(id: string | ResourceId | null): BillingInfoValidationRuleRel;
|
33
36
|
type(): BillingInfoValidationRuleType;
|
@@ -19,6 +19,10 @@ class BillingInfoValidationRules extends resource_1.ApiResource {
|
|
19
19
|
const _billingInfoValidationRuleId = billingInfoValidationRuleId.id || billingInfoValidationRuleId;
|
20
20
|
return this.resources.fetch({ type: 'attachments' }, `billing_info_validation_rules/${_billingInfoValidationRuleId}/attachments`, params, options);
|
21
21
|
}
|
22
|
+
async versions(billingInfoValidationRuleId, params, options) {
|
23
|
+
const _billingInfoValidationRuleId = billingInfoValidationRuleId.id || billingInfoValidationRuleId;
|
24
|
+
return this.resources.fetch({ type: 'versions' }, `billing_info_validation_rules/${_billingInfoValidationRuleId}/versions`, params, options);
|
25
|
+
}
|
22
26
|
isBillingInfoValidationRule(resource) {
|
23
27
|
return resource.type && (resource.type === BillingInfoValidationRules.TYPE);
|
24
28
|
}
|
@@ -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 { PaymentMethod } from './payment_methods';
|
5
|
+
import type { Version } from './versions';
|
5
6
|
import type { BraintreePayment, BraintreePaymentType } from './braintree_payments';
|
6
7
|
type BraintreeGatewayType = 'braintree_gateways';
|
7
8
|
type BraintreeGatewayRel = ResourceRel & {
|
@@ -18,6 +19,7 @@ interface BraintreeGateway extends Resource {
|
|
18
19
|
descriptor_url?: string | null;
|
19
20
|
webhook_endpoint_url?: string | null;
|
20
21
|
payment_methods?: PaymentMethod[] | null;
|
22
|
+
versions?: Version[] | null;
|
21
23
|
braintree_payments?: BraintreePayment[] | null;
|
22
24
|
}
|
23
25
|
interface BraintreeGatewayCreate extends ResourceCreate {
|
@@ -48,6 +50,7 @@ declare class BraintreeGateways extends ApiResource<BraintreeGateway> {
|
|
48
50
|
update(resource: BraintreeGatewayUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<BraintreeGateway>;
|
49
51
|
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
50
52
|
payment_methods(braintreeGatewayId: string | BraintreeGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>>;
|
53
|
+
versions(braintreeGatewayId: string | BraintreeGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
51
54
|
braintree_payments(braintreeGatewayId: string | BraintreeGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<BraintreePayment>>;
|
52
55
|
isBraintreeGateway(resource: any): resource is BraintreeGateway;
|
53
56
|
relationship(id: string | ResourceId | null): BraintreeGatewayRel;
|
@@ -15,6 +15,10 @@ class BraintreeGateways extends resource_1.ApiResource {
|
|
15
15
|
const _braintreeGatewayId = braintreeGatewayId.id || braintreeGatewayId;
|
16
16
|
return this.resources.fetch({ type: 'payment_methods' }, `braintree_gateways/${_braintreeGatewayId}/payment_methods`, params, options);
|
17
17
|
}
|
18
|
+
async versions(braintreeGatewayId, params, options) {
|
19
|
+
const _braintreeGatewayId = braintreeGatewayId.id || braintreeGatewayId;
|
20
|
+
return this.resources.fetch({ type: 'versions' }, `braintree_gateways/${_braintreeGatewayId}/versions`, params, options);
|
21
|
+
}
|
18
22
|
async braintree_payments(braintreeGatewayId, params, options) {
|
19
23
|
const _braintreeGatewayId = braintreeGatewayId.id || braintreeGatewayId;
|
20
24
|
return this.resources.fetch({ type: 'braintree_payments' }, `braintree_gateways/${_braintreeGatewayId}/braintree_payments`, params, options);
|