@commercelayer/sdk 5.0.0-beta.7 → 5.0.0-beta.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/api.d.ts +15 -0
- package/lib/cjs/api.js +0 -13
- package/lib/cjs/commercelayer.d.ts +2 -2
- package/lib/cjs/index.d.ts +1 -0
- package/lib/cjs/query.d.ts +1 -1
- package/lib/cjs/resource.d.ts +10 -13
- package/lib/cjs/resource.js +3 -0
- package/lib/cjs/resources/addresses.d.ts +2 -3
- package/lib/cjs/resources/addresses.js +0 -3
- package/lib/cjs/resources/adjustments.d.ts +2 -3
- package/lib/cjs/resources/adjustments.js +0 -3
- package/lib/cjs/resources/adyen_gateways.d.ts +0 -1
- package/lib/cjs/resources/adyen_gateways.js +0 -3
- package/lib/cjs/resources/adyen_payments.d.ts +2 -3
- package/lib/cjs/resources/adyen_payments.js +0 -3
- package/lib/cjs/resources/attachments.d.ts +2 -3
- package/lib/cjs/resources/attachments.js +0 -3
- package/lib/cjs/resources/authorizations.d.ts +0 -1
- package/lib/cjs/resources/authorizations.js +0 -3
- package/lib/cjs/resources/avalara_accounts.d.ts +0 -1
- package/lib/cjs/resources/avalara_accounts.js +0 -3
- package/lib/cjs/resources/axerve_gateways.d.ts +0 -1
- package/lib/cjs/resources/axerve_gateways.js +0 -3
- package/lib/cjs/resources/axerve_payments.d.ts +2 -3
- package/lib/cjs/resources/axerve_payments.js +0 -3
- package/lib/cjs/resources/billing_info_validation_rules.d.ts +0 -1
- package/lib/cjs/resources/billing_info_validation_rules.js +0 -3
- package/lib/cjs/resources/bing_geocoders.d.ts +0 -1
- package/lib/cjs/resources/bing_geocoders.js +0 -3
- package/lib/cjs/resources/braintree_gateways.d.ts +0 -1
- package/lib/cjs/resources/braintree_gateways.js +0 -3
- package/lib/cjs/resources/braintree_payments.d.ts +2 -3
- package/lib/cjs/resources/braintree_payments.js +0 -3
- package/lib/cjs/resources/bundles.d.ts +0 -1
- package/lib/cjs/resources/bundles.js +0 -3
- package/lib/cjs/resources/captures.d.ts +0 -1
- package/lib/cjs/resources/captures.js +0 -3
- package/lib/cjs/resources/carrier_accounts.d.ts +0 -1
- package/lib/cjs/resources/carrier_accounts.js +0 -3
- package/lib/cjs/resources/checkout_com_gateways.d.ts +0 -1
- package/lib/cjs/resources/checkout_com_gateways.js +0 -3
- package/lib/cjs/resources/checkout_com_payments.d.ts +2 -3
- package/lib/cjs/resources/checkout_com_payments.js +0 -3
- package/lib/cjs/resources/cleanups.d.ts +0 -1
- package/lib/cjs/resources/cleanups.js +0 -3
- package/lib/cjs/resources/coupon_codes_promotion_rules.d.ts +0 -1
- package/lib/cjs/resources/coupon_codes_promotion_rules.js +0 -3
- package/lib/cjs/resources/coupon_recipients.d.ts +0 -1
- package/lib/cjs/resources/coupon_recipients.js +0 -3
- package/lib/cjs/resources/coupons.d.ts +2 -3
- package/lib/cjs/resources/coupons.js +0 -3
- package/lib/cjs/resources/customer_addresses.d.ts +0 -1
- package/lib/cjs/resources/customer_addresses.js +0 -3
- package/lib/cjs/resources/customer_groups.d.ts +0 -1
- package/lib/cjs/resources/customer_groups.js +0 -3
- package/lib/cjs/resources/customer_password_resets.d.ts +0 -1
- package/lib/cjs/resources/customer_password_resets.js +0 -3
- package/lib/cjs/resources/customer_payment_sources.d.ts +2 -3
- package/lib/cjs/resources/customer_payment_sources.js +0 -3
- package/lib/cjs/resources/customer_subscriptions.d.ts +0 -1
- package/lib/cjs/resources/customer_subscriptions.js +0 -3
- package/lib/cjs/resources/customers.d.ts +0 -1
- package/lib/cjs/resources/customers.js +0 -3
- package/lib/cjs/resources/delivery_lead_times.d.ts +0 -1
- package/lib/cjs/resources/delivery_lead_times.js +0 -3
- package/lib/cjs/resources/event_callbacks.d.ts +2 -3
- package/lib/cjs/resources/event_callbacks.js +0 -3
- package/lib/cjs/resources/events.d.ts +0 -1
- package/lib/cjs/resources/events.js +0 -3
- package/lib/cjs/resources/exports.d.ts +0 -1
- package/lib/cjs/resources/exports.js +0 -3
- package/lib/cjs/resources/external_gateways.d.ts +0 -1
- package/lib/cjs/resources/external_gateways.js +0 -3
- package/lib/cjs/resources/external_payments.d.ts +2 -3
- package/lib/cjs/resources/external_payments.js +0 -3
- package/lib/cjs/resources/external_promotions.d.ts +0 -1
- package/lib/cjs/resources/external_promotions.js +0 -3
- package/lib/cjs/resources/external_tax_calculators.d.ts +0 -1
- package/lib/cjs/resources/external_tax_calculators.js +0 -3
- package/lib/cjs/resources/fixed_amount_promotions.d.ts +0 -1
- package/lib/cjs/resources/fixed_amount_promotions.js +0 -3
- package/lib/cjs/resources/fixed_price_promotions.d.ts +0 -1
- package/lib/cjs/resources/fixed_price_promotions.js +0 -3
- package/lib/cjs/resources/free_gift_promotions.d.ts +0 -1
- package/lib/cjs/resources/free_gift_promotions.js +0 -3
- package/lib/cjs/resources/free_shipping_promotions.d.ts +0 -1
- package/lib/cjs/resources/free_shipping_promotions.js +0 -3
- package/lib/cjs/resources/geocoders.d.ts +0 -1
- package/lib/cjs/resources/geocoders.js +0 -3
- package/lib/cjs/resources/gift_card_recipients.d.ts +0 -1
- package/lib/cjs/resources/gift_card_recipients.js +0 -3
- package/lib/cjs/resources/gift_cards.d.ts +0 -1
- package/lib/cjs/resources/gift_cards.js +0 -3
- package/lib/cjs/resources/google_geocoders.d.ts +0 -1
- package/lib/cjs/resources/google_geocoders.js +0 -3
- package/lib/cjs/resources/imports.d.ts +0 -1
- package/lib/cjs/resources/imports.js +0 -3
- package/lib/cjs/resources/in_stock_subscriptions.d.ts +0 -1
- package/lib/cjs/resources/in_stock_subscriptions.js +0 -3
- package/lib/cjs/resources/inventory_models.d.ts +0 -1
- package/lib/cjs/resources/inventory_models.js +0 -3
- package/lib/cjs/resources/inventory_return_locations.d.ts +2 -3
- package/lib/cjs/resources/inventory_return_locations.js +0 -3
- package/lib/cjs/resources/inventory_stock_locations.d.ts +2 -3
- package/lib/cjs/resources/inventory_stock_locations.js +0 -3
- package/lib/cjs/resources/klarna_gateways.d.ts +0 -1
- package/lib/cjs/resources/klarna_gateways.js +0 -3
- package/lib/cjs/resources/klarna_payments.d.ts +2 -3
- package/lib/cjs/resources/klarna_payments.js +0 -3
- package/lib/cjs/resources/line_item_options.d.ts +2 -3
- package/lib/cjs/resources/line_item_options.js +0 -3
- package/lib/cjs/resources/line_items.d.ts +0 -1
- package/lib/cjs/resources/line_items.js +0 -3
- package/lib/cjs/resources/manual_gateways.d.ts +0 -1
- package/lib/cjs/resources/manual_gateways.js +0 -3
- package/lib/cjs/resources/manual_tax_calculators.d.ts +0 -1
- package/lib/cjs/resources/manual_tax_calculators.js +0 -3
- package/lib/cjs/resources/markets.d.ts +0 -1
- package/lib/cjs/resources/markets.js +0 -3
- package/lib/cjs/resources/merchants.d.ts +0 -1
- package/lib/cjs/resources/merchants.js +0 -3
- package/lib/cjs/resources/order_amount_promotion_rules.d.ts +2 -3
- package/lib/cjs/resources/order_amount_promotion_rules.js +0 -3
- package/lib/cjs/resources/order_copies.d.ts +0 -1
- package/lib/cjs/resources/order_copies.js +0 -3
- package/lib/cjs/resources/order_subscriptions.d.ts +0 -1
- package/lib/cjs/resources/order_subscriptions.js +0 -3
- package/lib/cjs/resources/order_validation_rules.d.ts +0 -1
- package/lib/cjs/resources/order_validation_rules.js +0 -3
- package/lib/cjs/resources/orders.d.ts +0 -1
- package/lib/cjs/resources/orders.js +0 -3
- package/lib/cjs/resources/packages.d.ts +0 -1
- package/lib/cjs/resources/packages.js +0 -3
- package/lib/cjs/resources/parcel_line_items.d.ts +2 -3
- package/lib/cjs/resources/parcel_line_items.js +0 -3
- package/lib/cjs/resources/parcels.d.ts +0 -1
- package/lib/cjs/resources/parcels.js +0 -3
- package/lib/cjs/resources/payment_gateways.d.ts +0 -1
- package/lib/cjs/resources/payment_gateways.js +0 -3
- package/lib/cjs/resources/payment_methods.d.ts +0 -1
- package/lib/cjs/resources/payment_methods.js +0 -3
- package/lib/cjs/resources/paypal_gateways.d.ts +0 -1
- package/lib/cjs/resources/paypal_gateways.js +0 -3
- package/lib/cjs/resources/paypal_payments.d.ts +2 -3
- package/lib/cjs/resources/paypal_payments.js +0 -3
- package/lib/cjs/resources/percentage_discount_promotions.d.ts +0 -1
- package/lib/cjs/resources/percentage_discount_promotions.js +0 -3
- package/lib/cjs/resources/price_lists.d.ts +0 -1
- package/lib/cjs/resources/price_lists.js +0 -3
- package/lib/cjs/resources/price_tiers.d.ts +0 -1
- package/lib/cjs/resources/price_tiers.js +0 -3
- package/lib/cjs/resources/price_volume_tiers.d.ts +0 -1
- package/lib/cjs/resources/price_volume_tiers.js +0 -3
- package/lib/cjs/resources/prices.d.ts +0 -1
- package/lib/cjs/resources/prices.js +0 -3
- package/lib/cjs/resources/promotion_rules.d.ts +1 -3
- package/lib/cjs/resources/promotion_rules.js +0 -3
- package/lib/cjs/resources/promotions.d.ts +0 -1
- package/lib/cjs/resources/promotions.js +0 -3
- package/lib/cjs/resources/refunds.d.ts +0 -1
- package/lib/cjs/resources/refunds.js +0 -3
- package/lib/cjs/resources/return_line_items.d.ts +2 -3
- package/lib/cjs/resources/return_line_items.js +0 -3
- package/lib/cjs/resources/returns.d.ts +0 -1
- package/lib/cjs/resources/returns.js +0 -3
- package/lib/cjs/resources/satispay_gateways.d.ts +0 -1
- package/lib/cjs/resources/satispay_gateways.js +0 -3
- package/lib/cjs/resources/satispay_payments.d.ts +2 -3
- package/lib/cjs/resources/satispay_payments.js +0 -3
- package/lib/cjs/resources/shipments.d.ts +0 -1
- package/lib/cjs/resources/shipments.js +0 -3
- package/lib/cjs/resources/shipping_categories.d.ts +0 -1
- package/lib/cjs/resources/shipping_categories.js +0 -3
- package/lib/cjs/resources/shipping_method_tiers.d.ts +0 -1
- package/lib/cjs/resources/shipping_method_tiers.js +0 -3
- package/lib/cjs/resources/shipping_methods.d.ts +0 -1
- package/lib/cjs/resources/shipping_methods.js +0 -3
- package/lib/cjs/resources/shipping_weight_tiers.d.ts +0 -1
- package/lib/cjs/resources/shipping_weight_tiers.js +0 -3
- package/lib/cjs/resources/shipping_zones.d.ts +0 -1
- package/lib/cjs/resources/shipping_zones.js +0 -3
- package/lib/cjs/resources/sku_list_items.d.ts +2 -3
- package/lib/cjs/resources/sku_list_items.js +0 -3
- package/lib/cjs/resources/sku_list_promotion_rules.d.ts +0 -1
- package/lib/cjs/resources/sku_list_promotion_rules.js +0 -3
- package/lib/cjs/resources/sku_lists.d.ts +0 -1
- package/lib/cjs/resources/sku_lists.js +0 -3
- package/lib/cjs/resources/sku_options.d.ts +0 -1
- package/lib/cjs/resources/sku_options.js +0 -3
- package/lib/cjs/resources/skus.d.ts +0 -1
- package/lib/cjs/resources/skus.js +0 -3
- package/lib/cjs/resources/stock_items.d.ts +0 -1
- package/lib/cjs/resources/stock_items.js +0 -3
- package/lib/cjs/resources/stock_line_items.d.ts +2 -3
- package/lib/cjs/resources/stock_line_items.js +0 -3
- package/lib/cjs/resources/stock_locations.d.ts +0 -1
- package/lib/cjs/resources/stock_locations.js +0 -3
- package/lib/cjs/resources/stock_transfers.d.ts +0 -1
- package/lib/cjs/resources/stock_transfers.js +0 -3
- package/lib/cjs/resources/stripe_gateways.d.ts +0 -1
- package/lib/cjs/resources/stripe_gateways.js +0 -3
- package/lib/cjs/resources/stripe_payments.d.ts +2 -3
- package/lib/cjs/resources/stripe_payments.js +0 -3
- package/lib/cjs/resources/tax_calculators.d.ts +0 -1
- package/lib/cjs/resources/tax_calculators.js +0 -3
- package/lib/cjs/resources/tax_categories.d.ts +0 -1
- package/lib/cjs/resources/tax_categories.js +0 -3
- package/lib/cjs/resources/tax_rules.d.ts +2 -3
- package/lib/cjs/resources/tax_rules.js +0 -3
- package/lib/cjs/resources/taxjar_accounts.d.ts +0 -1
- package/lib/cjs/resources/taxjar_accounts.js +0 -3
- package/lib/cjs/resources/transactions.d.ts +2 -3
- package/lib/cjs/resources/transactions.js +0 -3
- package/lib/cjs/resources/voids.d.ts +0 -1
- package/lib/cjs/resources/voids.js +0 -3
- package/lib/cjs/resources/webhooks.d.ts +0 -1
- package/lib/cjs/resources/webhooks.js +0 -3
- package/lib/cjs/resources/wire_transfers.d.ts +2 -3
- package/lib/cjs/resources/wire_transfers.js +0 -3
- package/lib/cjs/static.d.ts +1 -1
- package/lib/esm/api.d.ts +15 -0
- package/lib/esm/api.js +0 -13
- package/lib/esm/commercelayer.d.ts +2 -2
- package/lib/esm/index.d.ts +1 -0
- package/lib/esm/query.d.ts +1 -1
- package/lib/esm/resource.d.ts +10 -13
- package/lib/esm/resource.js +3 -0
- package/lib/esm/resources/addresses.d.ts +2 -3
- package/lib/esm/resources/addresses.js +0 -3
- package/lib/esm/resources/adjustments.d.ts +2 -3
- package/lib/esm/resources/adjustments.js +0 -3
- package/lib/esm/resources/adyen_gateways.d.ts +0 -1
- package/lib/esm/resources/adyen_gateways.js +0 -3
- package/lib/esm/resources/adyen_payments.d.ts +2 -3
- package/lib/esm/resources/adyen_payments.js +0 -3
- package/lib/esm/resources/attachments.d.ts +2 -3
- package/lib/esm/resources/attachments.js +0 -3
- package/lib/esm/resources/authorizations.d.ts +0 -1
- package/lib/esm/resources/authorizations.js +0 -3
- package/lib/esm/resources/avalara_accounts.d.ts +0 -1
- package/lib/esm/resources/avalara_accounts.js +0 -3
- package/lib/esm/resources/axerve_gateways.d.ts +0 -1
- package/lib/esm/resources/axerve_gateways.js +0 -3
- package/lib/esm/resources/axerve_payments.d.ts +2 -3
- package/lib/esm/resources/axerve_payments.js +0 -3
- package/lib/esm/resources/billing_info_validation_rules.d.ts +0 -1
- package/lib/esm/resources/billing_info_validation_rules.js +0 -3
- package/lib/esm/resources/bing_geocoders.d.ts +0 -1
- package/lib/esm/resources/bing_geocoders.js +0 -3
- package/lib/esm/resources/braintree_gateways.d.ts +0 -1
- package/lib/esm/resources/braintree_gateways.js +0 -3
- package/lib/esm/resources/braintree_payments.d.ts +2 -3
- package/lib/esm/resources/braintree_payments.js +0 -3
- package/lib/esm/resources/bundles.d.ts +0 -1
- package/lib/esm/resources/bundles.js +0 -3
- package/lib/esm/resources/captures.d.ts +0 -1
- package/lib/esm/resources/captures.js +0 -3
- package/lib/esm/resources/carrier_accounts.d.ts +0 -1
- package/lib/esm/resources/carrier_accounts.js +0 -3
- package/lib/esm/resources/checkout_com_gateways.d.ts +0 -1
- package/lib/esm/resources/checkout_com_gateways.js +0 -3
- package/lib/esm/resources/checkout_com_payments.d.ts +2 -3
- package/lib/esm/resources/checkout_com_payments.js +0 -3
- package/lib/esm/resources/cleanups.d.ts +0 -1
- package/lib/esm/resources/cleanups.js +0 -3
- package/lib/esm/resources/coupon_codes_promotion_rules.d.ts +0 -1
- package/lib/esm/resources/coupon_codes_promotion_rules.js +0 -3
- package/lib/esm/resources/coupon_recipients.d.ts +0 -1
- package/lib/esm/resources/coupon_recipients.js +0 -3
- package/lib/esm/resources/coupons.d.ts +2 -3
- package/lib/esm/resources/coupons.js +0 -3
- package/lib/esm/resources/customer_addresses.d.ts +0 -1
- package/lib/esm/resources/customer_addresses.js +0 -3
- package/lib/esm/resources/customer_groups.d.ts +0 -1
- package/lib/esm/resources/customer_groups.js +0 -3
- package/lib/esm/resources/customer_password_resets.d.ts +0 -1
- package/lib/esm/resources/customer_password_resets.js +0 -3
- package/lib/esm/resources/customer_payment_sources.d.ts +2 -3
- package/lib/esm/resources/customer_payment_sources.js +0 -3
- package/lib/esm/resources/customer_subscriptions.d.ts +0 -1
- package/lib/esm/resources/customer_subscriptions.js +0 -3
- package/lib/esm/resources/customers.d.ts +0 -1
- package/lib/esm/resources/customers.js +0 -3
- package/lib/esm/resources/delivery_lead_times.d.ts +0 -1
- package/lib/esm/resources/delivery_lead_times.js +0 -3
- package/lib/esm/resources/event_callbacks.d.ts +2 -3
- package/lib/esm/resources/event_callbacks.js +0 -3
- package/lib/esm/resources/events.d.ts +0 -1
- package/lib/esm/resources/events.js +0 -3
- package/lib/esm/resources/exports.d.ts +0 -1
- package/lib/esm/resources/exports.js +0 -3
- package/lib/esm/resources/external_gateways.d.ts +0 -1
- package/lib/esm/resources/external_gateways.js +0 -3
- package/lib/esm/resources/external_payments.d.ts +2 -3
- package/lib/esm/resources/external_payments.js +0 -3
- package/lib/esm/resources/external_promotions.d.ts +0 -1
- package/lib/esm/resources/external_promotions.js +0 -3
- package/lib/esm/resources/external_tax_calculators.d.ts +0 -1
- package/lib/esm/resources/external_tax_calculators.js +0 -3
- package/lib/esm/resources/fixed_amount_promotions.d.ts +0 -1
- package/lib/esm/resources/fixed_amount_promotions.js +0 -3
- package/lib/esm/resources/fixed_price_promotions.d.ts +0 -1
- package/lib/esm/resources/fixed_price_promotions.js +0 -3
- package/lib/esm/resources/free_gift_promotions.d.ts +0 -1
- package/lib/esm/resources/free_gift_promotions.js +0 -3
- package/lib/esm/resources/free_shipping_promotions.d.ts +0 -1
- package/lib/esm/resources/free_shipping_promotions.js +0 -3
- package/lib/esm/resources/geocoders.d.ts +0 -1
- package/lib/esm/resources/geocoders.js +0 -3
- package/lib/esm/resources/gift_card_recipients.d.ts +0 -1
- package/lib/esm/resources/gift_card_recipients.js +0 -3
- package/lib/esm/resources/gift_cards.d.ts +0 -1
- package/lib/esm/resources/gift_cards.js +0 -3
- package/lib/esm/resources/google_geocoders.d.ts +0 -1
- package/lib/esm/resources/google_geocoders.js +0 -3
- package/lib/esm/resources/imports.d.ts +0 -1
- package/lib/esm/resources/imports.js +0 -3
- package/lib/esm/resources/in_stock_subscriptions.d.ts +0 -1
- package/lib/esm/resources/in_stock_subscriptions.js +0 -3
- package/lib/esm/resources/inventory_models.d.ts +0 -1
- package/lib/esm/resources/inventory_models.js +0 -3
- package/lib/esm/resources/inventory_return_locations.d.ts +2 -3
- package/lib/esm/resources/inventory_return_locations.js +0 -3
- package/lib/esm/resources/inventory_stock_locations.d.ts +2 -3
- package/lib/esm/resources/inventory_stock_locations.js +0 -3
- package/lib/esm/resources/klarna_gateways.d.ts +0 -1
- package/lib/esm/resources/klarna_gateways.js +0 -3
- package/lib/esm/resources/klarna_payments.d.ts +2 -3
- package/lib/esm/resources/klarna_payments.js +0 -3
- package/lib/esm/resources/line_item_options.d.ts +2 -3
- package/lib/esm/resources/line_item_options.js +0 -3
- package/lib/esm/resources/line_items.d.ts +0 -1
- package/lib/esm/resources/line_items.js +0 -3
- package/lib/esm/resources/manual_gateways.d.ts +0 -1
- package/lib/esm/resources/manual_gateways.js +0 -3
- package/lib/esm/resources/manual_tax_calculators.d.ts +0 -1
- package/lib/esm/resources/manual_tax_calculators.js +0 -3
- package/lib/esm/resources/markets.d.ts +0 -1
- package/lib/esm/resources/markets.js +0 -3
- package/lib/esm/resources/merchants.d.ts +0 -1
- package/lib/esm/resources/merchants.js +0 -3
- package/lib/esm/resources/order_amount_promotion_rules.d.ts +2 -3
- package/lib/esm/resources/order_amount_promotion_rules.js +0 -3
- package/lib/esm/resources/order_copies.d.ts +0 -1
- package/lib/esm/resources/order_copies.js +0 -3
- package/lib/esm/resources/order_subscriptions.d.ts +0 -1
- package/lib/esm/resources/order_subscriptions.js +0 -3
- package/lib/esm/resources/order_validation_rules.d.ts +0 -1
- package/lib/esm/resources/order_validation_rules.js +0 -3
- package/lib/esm/resources/orders.d.ts +0 -1
- package/lib/esm/resources/orders.js +0 -3
- package/lib/esm/resources/packages.d.ts +0 -1
- package/lib/esm/resources/packages.js +0 -3
- package/lib/esm/resources/parcel_line_items.d.ts +2 -3
- package/lib/esm/resources/parcel_line_items.js +0 -3
- package/lib/esm/resources/parcels.d.ts +0 -1
- package/lib/esm/resources/parcels.js +0 -3
- package/lib/esm/resources/payment_gateways.d.ts +0 -1
- package/lib/esm/resources/payment_gateways.js +0 -3
- package/lib/esm/resources/payment_methods.d.ts +0 -1
- package/lib/esm/resources/payment_methods.js +0 -3
- package/lib/esm/resources/paypal_gateways.d.ts +0 -1
- package/lib/esm/resources/paypal_gateways.js +0 -3
- package/lib/esm/resources/paypal_payments.d.ts +2 -3
- package/lib/esm/resources/paypal_payments.js +0 -3
- package/lib/esm/resources/percentage_discount_promotions.d.ts +0 -1
- package/lib/esm/resources/percentage_discount_promotions.js +0 -3
- package/lib/esm/resources/price_lists.d.ts +0 -1
- package/lib/esm/resources/price_lists.js +0 -3
- package/lib/esm/resources/price_tiers.d.ts +0 -1
- package/lib/esm/resources/price_tiers.js +0 -3
- package/lib/esm/resources/price_volume_tiers.d.ts +0 -1
- package/lib/esm/resources/price_volume_tiers.js +0 -3
- package/lib/esm/resources/prices.d.ts +0 -1
- package/lib/esm/resources/prices.js +0 -3
- package/lib/esm/resources/promotion_rules.d.ts +1 -3
- package/lib/esm/resources/promotion_rules.js +0 -3
- package/lib/esm/resources/promotions.d.ts +0 -1
- package/lib/esm/resources/promotions.js +0 -3
- package/lib/esm/resources/refunds.d.ts +0 -1
- package/lib/esm/resources/refunds.js +0 -3
- package/lib/esm/resources/return_line_items.d.ts +2 -3
- package/lib/esm/resources/return_line_items.js +0 -3
- package/lib/esm/resources/returns.d.ts +0 -1
- package/lib/esm/resources/returns.js +0 -3
- package/lib/esm/resources/satispay_gateways.d.ts +0 -1
- package/lib/esm/resources/satispay_gateways.js +0 -3
- package/lib/esm/resources/satispay_payments.d.ts +2 -3
- package/lib/esm/resources/satispay_payments.js +0 -3
- package/lib/esm/resources/shipments.d.ts +0 -1
- package/lib/esm/resources/shipments.js +0 -3
- package/lib/esm/resources/shipping_categories.d.ts +0 -1
- package/lib/esm/resources/shipping_categories.js +0 -3
- package/lib/esm/resources/shipping_method_tiers.d.ts +0 -1
- package/lib/esm/resources/shipping_method_tiers.js +0 -3
- package/lib/esm/resources/shipping_methods.d.ts +0 -1
- package/lib/esm/resources/shipping_methods.js +0 -3
- package/lib/esm/resources/shipping_weight_tiers.d.ts +0 -1
- package/lib/esm/resources/shipping_weight_tiers.js +0 -3
- package/lib/esm/resources/shipping_zones.d.ts +0 -1
- package/lib/esm/resources/shipping_zones.js +0 -3
- package/lib/esm/resources/sku_list_items.d.ts +2 -3
- package/lib/esm/resources/sku_list_items.js +0 -3
- package/lib/esm/resources/sku_list_promotion_rules.d.ts +0 -1
- package/lib/esm/resources/sku_list_promotion_rules.js +0 -3
- package/lib/esm/resources/sku_lists.d.ts +0 -1
- package/lib/esm/resources/sku_lists.js +0 -3
- package/lib/esm/resources/sku_options.d.ts +0 -1
- package/lib/esm/resources/sku_options.js +0 -3
- package/lib/esm/resources/skus.d.ts +0 -1
- package/lib/esm/resources/skus.js +0 -3
- package/lib/esm/resources/stock_items.d.ts +0 -1
- package/lib/esm/resources/stock_items.js +0 -3
- package/lib/esm/resources/stock_line_items.d.ts +2 -3
- package/lib/esm/resources/stock_line_items.js +0 -3
- package/lib/esm/resources/stock_locations.d.ts +0 -1
- package/lib/esm/resources/stock_locations.js +0 -3
- package/lib/esm/resources/stock_transfers.d.ts +0 -1
- package/lib/esm/resources/stock_transfers.js +0 -3
- package/lib/esm/resources/stripe_gateways.d.ts +0 -1
- package/lib/esm/resources/stripe_gateways.js +0 -3
- package/lib/esm/resources/stripe_payments.d.ts +2 -3
- package/lib/esm/resources/stripe_payments.js +0 -3
- package/lib/esm/resources/tax_calculators.d.ts +0 -1
- package/lib/esm/resources/tax_calculators.js +0 -3
- package/lib/esm/resources/tax_categories.d.ts +0 -1
- package/lib/esm/resources/tax_categories.js +0 -3
- package/lib/esm/resources/tax_rules.d.ts +2 -3
- package/lib/esm/resources/tax_rules.js +0 -3
- package/lib/esm/resources/taxjar_accounts.d.ts +0 -1
- package/lib/esm/resources/taxjar_accounts.js +0 -3
- package/lib/esm/resources/transactions.d.ts +2 -3
- package/lib/esm/resources/transactions.js +0 -3
- package/lib/esm/resources/voids.d.ts +0 -1
- package/lib/esm/resources/voids.js +0 -3
- package/lib/esm/resources/webhooks.d.ts +0 -1
- package/lib/esm/resources/webhooks.js +0 -3
- package/lib/esm/resources/wire_transfers.d.ts +2 -3
- package/lib/esm/resources/wire_transfers.js +0 -3
- package/lib/esm/static.d.ts +1 -1
- package/lib/tsconfig.esm.tsbuildinfo +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
@@ -1,5 +1,5 @@
|
|
1
|
-
import { ApiResource, Resource, ResourceId, ResourcesConfig, ResourceRel
|
2
|
-
import type { QueryParamsRetrieve
|
1
|
+
import { ApiResource, Resource, ResourceId, ResourcesConfig, ResourceRel } from '../resource';
|
2
|
+
import type { QueryParamsRetrieve } from '../query';
|
3
3
|
import type { Order } from './orders';
|
4
4
|
type TransactionType = 'transactions';
|
5
5
|
type TransactionRel = ResourceRel & {
|
@@ -22,7 +22,6 @@ interface Transaction extends Resource {
|
|
22
22
|
}
|
23
23
|
declare class Transactions extends ApiResource<Transaction> {
|
24
24
|
static readonly TYPE: TransactionType;
|
25
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Transaction>>;
|
26
25
|
order(transactionId: string | Transaction, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
27
26
|
isTransaction(resource: any): resource is Transaction;
|
28
27
|
relationship(id: string | ResourceId | null): TransactionRel;
|
@@ -2,9 +2,6 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
const resource_1 = require("../resource");
|
4
4
|
class Transactions extends resource_1.ApiResource {
|
5
|
-
async list(params, options) {
|
6
|
-
return this.resources.list({ type: Transactions.TYPE }, params, options);
|
7
|
-
}
|
8
5
|
async order(transactionId, params, options) {
|
9
6
|
const _transactionId = transactionId.id || transactionId;
|
10
7
|
return this.resources.fetch({ type: 'orders' }, `transactions/${_transactionId}/order`, params, options);
|
@@ -26,7 +26,6 @@ interface Void extends Resource {
|
|
26
26
|
}
|
27
27
|
declare class Voids extends ApiResource<Void> {
|
28
28
|
static readonly TYPE: VoidType;
|
29
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Void>>;
|
30
29
|
order(voidId: string | Void, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
31
30
|
reference_authorization(voidId: string | Void, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Authorization>;
|
32
31
|
events(voidId: string | Void, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
@@ -2,9 +2,6 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
const resource_1 = require("../resource");
|
4
4
|
class Voids extends resource_1.ApiResource {
|
5
|
-
async list(params, options) {
|
6
|
-
return this.resources.list({ type: Voids.TYPE }, params, options);
|
7
|
-
}
|
8
5
|
async order(voidId, params, options) {
|
9
6
|
const _voidId = voidId.id || voidId;
|
10
7
|
return this.resources.fetch({ type: 'orders' }, `voids/${_voidId}/order`, params, options);
|
@@ -31,7 +31,6 @@ interface WebhookUpdate extends ResourceUpdate {
|
|
31
31
|
}
|
32
32
|
declare class Webhooks extends ApiResource<Webhook> {
|
33
33
|
static readonly TYPE: WebhookType;
|
34
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Webhook>>;
|
35
34
|
create(resource: WebhookCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Webhook>;
|
36
35
|
update(resource: WebhookUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Webhook>;
|
37
36
|
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
@@ -2,9 +2,6 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
const resource_1 = require("../resource");
|
4
4
|
class Webhooks extends resource_1.ApiResource {
|
5
|
-
async list(params, options) {
|
6
|
-
return this.resources.list({ type: Webhooks.TYPE }, params, options);
|
7
|
-
}
|
8
5
|
async create(resource, params, options) {
|
9
6
|
return this.resources.create({ ...resource, type: Webhooks.TYPE }, params, options);
|
10
7
|
}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel
|
2
|
-
import type { QueryParamsRetrieve
|
1
|
+
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel } from '../resource';
|
2
|
+
import type { QueryParamsRetrieve } from '../query';
|
3
3
|
import type { Order, OrderType } from './orders';
|
4
4
|
type WireTransferType = 'wire_transfers';
|
5
5
|
type WireTransferRel = ResourceRel & {
|
@@ -21,7 +21,6 @@ interface WireTransferUpdate extends ResourceUpdate {
|
|
21
21
|
}
|
22
22
|
declare class WireTransfers extends ApiResource<WireTransfer> {
|
23
23
|
static readonly TYPE: WireTransferType;
|
24
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<WireTransfer>>;
|
25
24
|
create(resource: WireTransferCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<WireTransfer>;
|
26
25
|
update(resource: WireTransferUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<WireTransfer>;
|
27
26
|
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
@@ -2,9 +2,6 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
const resource_1 = require("../resource");
|
4
4
|
class WireTransfers extends resource_1.ApiResource {
|
5
|
-
async list(params, options) {
|
6
|
-
return this.resources.list({ type: WireTransfers.TYPE }, params, options);
|
7
|
-
}
|
8
5
|
async create(resource, params, options) {
|
9
6
|
return this.resources.create({ ...resource, type: WireTransfers.TYPE }, params, options);
|
10
7
|
}
|
package/lib/cjs/static.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { SdkError, ApiError } from './error';
|
2
|
-
import { CommerceLayerClient, CommerceLayerInitConfig } from './commercelayer';
|
2
|
+
import type { CommerceLayerClient, CommerceLayerInitConfig } from './commercelayer';
|
3
3
|
export declare const CommerceLayerStatic: {
|
4
4
|
resources: () => readonly string[];
|
5
5
|
isSdkError: (error: unknown) => error is SdkError;
|
package/lib/esm/api.d.ts
CHANGED
@@ -111,3 +111,18 @@ export { default as Webhooks } from './resources/webhooks';
|
|
111
111
|
export { default as WireTransfers } from './resources/wire_transfers';
|
112
112
|
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_subscriptions' | 'order_validation_rules' | 'orders' | 'organization' | 'packages' | 'parcel_line_items' | 'parcels' | 'payment_gateways' | 'payment_methods' | 'paypal_gateways' | 'paypal_payments' | 'percentage_discount_promotions' | 'price_lists' | 'price_tiers' | 'price_volume_tiers' | 'prices' | 'promotion_rules' | 'promotions' | 'refunds' | '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_transfers' | 'stripe_gateways' | 'stripe_payments' | 'tax_calculators' | 'tax_categories' | 'tax_rules' | 'taxjar_accounts' | 'transactions' | 'voids' | 'webhooks' | 'wire_transfers';
|
113
113
|
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_subscriptions", "order_validation_rules", "orders", "organization", "packages", "parcel_line_items", "parcels", "payment_gateways", "payment_methods", "paypal_gateways", "paypal_payments", "percentage_discount_promotions", "price_lists", "price_tiers", "price_volume_tiers", "prices", "promotion_rules", "promotions", "refunds", "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_transfers", "stripe_gateways", "stripe_payments", "tax_calculators", "tax_categories", "tax_rules", "taxjar_accounts", "transactions", "voids", "webhooks", "wire_transfers"];
|
114
|
+
export type ResourceRetrievable = {
|
115
|
+
type: ResourceTypeLock;
|
116
|
+
};
|
117
|
+
export type ResourceListable = {
|
118
|
+
type: Exclude<ResourceTypeLock, 'application' | 'organization'>;
|
119
|
+
};
|
120
|
+
export type ResourceCreatable = {
|
121
|
+
type: 'addresses' | 'adjustments' | 'adyen_gateways' | 'adyen_payments' | 'attachments' | 'avalara_accounts' | 'axerve_gateways' | 'axerve_payments' | 'billing_info_validation_rules' | 'bing_geocoders' | 'braintree_gateways' | 'braintree_payments' | 'bundles' | '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' | 'exports' | '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' | '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_subscriptions' | 'orders' | 'packages' | 'parcel_line_items' | 'parcels' | 'payment_methods' | 'paypal_gateways' | 'paypal_payments' | 'percentage_discount_promotions' | 'price_lists' | 'price_volume_tiers' | 'prices' | 'return_line_items' | 'returns' | 'satispay_gateways' | 'satispay_payments' | 'shipping_categories' | 'shipping_methods' | 'shipping_weight_tiers' | 'shipping_zones' | 'sku_list_items' | 'sku_list_promotion_rules' | 'sku_lists' | 'sku_options' | 'skus' | 'stock_items' | 'stock_locations' | 'stock_transfers' | 'stripe_gateways' | 'stripe_payments' | 'tax_categories' | 'tax_rules' | 'taxjar_accounts' | 'webhooks' | 'wire_transfers';
|
122
|
+
};
|
123
|
+
export type ResourceUpdatable = {
|
124
|
+
type: 'addresses' | 'adjustments' | 'adyen_gateways' | 'adyen_payments' | 'attachments' | 'authorizations' | 'avalara_accounts' | 'axerve_gateways' | 'axerve_payments' | 'billing_info_validation_rules' | 'bing_geocoders' | 'braintree_gateways' | 'braintree_payments' | 'bundles' | 'captures' | 'checkout_com_gateways' | 'checkout_com_payments' | 'coupon_codes_promotion_rules' | 'coupon_recipients' | 'coupons' | 'customer_addresses' | 'customer_groups' | 'customer_password_resets' | 'customer_payment_sources' | 'customer_subscriptions' | 'customers' | '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' | 'google_geocoders' | '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_subscriptions' | 'orders' | 'packages' | 'parcel_line_items' | 'parcels' | 'payment_methods' | 'paypal_gateways' | 'paypal_payments' | 'percentage_discount_promotions' | 'price_lists' | 'price_volume_tiers' | 'prices' | 'return_line_items' | 'returns' | 'satispay_gateways' | 'satispay_payments' | 'shipments' | 'shipping_categories' | 'shipping_methods' | 'shipping_weight_tiers' | 'shipping_zones' | 'sku_list_items' | 'sku_list_promotion_rules' | 'sku_lists' | 'sku_options' | 'skus' | 'stock_items' | 'stock_locations' | 'stock_transfers' | 'stripe_gateways' | 'stripe_payments' | 'tax_categories' | 'tax_rules' | 'taxjar_accounts' | 'webhooks' | 'wire_transfers';
|
125
|
+
};
|
126
|
+
export type ResourceDeletable = {
|
127
|
+
type: 'addresses' | 'adjustments' | 'adyen_gateways' | 'adyen_payments' | 'attachments' | 'avalara_accounts' | 'axerve_gateways' | 'axerve_payments' | 'billing_info_validation_rules' | 'bing_geocoders' | 'braintree_gateways' | 'braintree_payments' | 'bundles' | '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' | 'exports' | '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' | '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_subscriptions' | 'orders' | 'packages' | 'parcel_line_items' | 'parcels' | 'payment_methods' | 'paypal_gateways' | 'paypal_payments' | 'percentage_discount_promotions' | 'price_lists' | 'price_volume_tiers' | 'prices' | 'return_line_items' | 'returns' | 'satispay_gateways' | 'satispay_payments' | 'shipping_categories' | 'shipping_methods' | 'shipping_weight_tiers' | 'shipping_zones' | 'sku_list_items' | 'sku_list_promotion_rules' | 'sku_lists' | 'sku_options' | 'skus' | 'stock_items' | 'stock_locations' | 'stock_transfers' | 'stripe_gateways' | 'stripe_payments' | 'tax_categories' | 'tax_rules' | 'taxjar_accounts' | 'webhooks' | 'wire_transfers';
|
128
|
+
};
|
package/lib/esm/api.js
CHANGED
@@ -224,16 +224,3 @@ export const resourceList = [
|
|
224
224
|
'wire_transfers'
|
225
225
|
// ##__API_RESOURCE_LIST_STOP__##
|
226
226
|
];
|
227
|
-
/*
|
228
|
-
type ResourceInfo = {
|
229
|
-
name: string;
|
230
|
-
type: string;
|
231
|
-
api: string;
|
232
|
-
}
|
233
|
-
|
234
|
-
|
235
|
-
export const resourceMap: { [res: string]: ResourceInfo } = {
|
236
|
-
// ##__API_RESOURCE_MAP_START__##
|
237
|
-
// ##__API_RESOURCE_MAP_STOP__##
|
238
|
-
} as const
|
239
|
-
*/
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import * as api from './api';
|
2
|
-
import { ApiError } from './error';
|
2
|
+
import type { ApiError } from './error';
|
3
3
|
import type { ErrorInterceptor, InterceptorType, RawResponseReader, RequestInterceptor, ResponseInterceptor } from './interceptor';
|
4
|
-
import { ResourcesInitConfig } from './resource';
|
4
|
+
import type { ResourcesInitConfig } from './resource';
|
5
5
|
declare const OPEN_API_SCHEMA_VERSION = "4.0.1";
|
6
6
|
export { OPEN_API_SCHEMA_VERSION };
|
7
7
|
type SdkConfig = {};
|
package/lib/esm/index.d.ts
CHANGED
@@ -5,3 +5,4 @@ export type { QueryParamsRetrieve, QueryParamsList, QueryParams } from './query'
|
|
5
5
|
export * from './model';
|
6
6
|
export type { RequestObj, ResponseObj, ErrorObj, HeadersObj } from './interceptor';
|
7
7
|
export type { SdkError, ApiError, ErrorType } from './error';
|
8
|
+
export type { ResourceRetrievable, ResourceListable, ResourceCreatable, ResourceUpdatable, ResourceDeletable } from './api';
|
package/lib/esm/query.d.ts
CHANGED
package/lib/esm/resource.d.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
import { ApiClientInitConfig } from './client';
|
2
|
-
import { QueryParamsRetrieve, QueryParamsList, QueryFilter } from './query';
|
3
|
-
import { ResourceTypeLock } from './api';
|
4
|
-
import { InterceptorManager } from './interceptor';
|
1
|
+
import type { ApiClientInitConfig } from './client';
|
2
|
+
import type { QueryParamsRetrieve, QueryParamsList, QueryFilter } from './query';
|
3
|
+
import type { ResourceTypeLock } from './api';
|
4
|
+
import type { InterceptorManager } from './interceptor';
|
5
5
|
import { QueryParams } from '.';
|
6
6
|
type ResourceNull = {
|
7
7
|
id: null;
|
@@ -16,23 +16,19 @@ interface ResourceType {
|
|
16
16
|
interface ResourceId extends ResourceType {
|
17
17
|
readonly id: string;
|
18
18
|
}
|
19
|
-
interface
|
19
|
+
interface ResourceBase {
|
20
20
|
reference?: string;
|
21
21
|
reference_origin?: string;
|
22
22
|
metadata?: Metadata;
|
23
|
+
}
|
24
|
+
interface Resource extends ResourceBase, ResourceId {
|
23
25
|
readonly created_at: string;
|
24
26
|
readonly updated_at: string;
|
25
27
|
}
|
26
|
-
interface ResourceCreate {
|
27
|
-
reference?: string;
|
28
|
-
reference_origin?: string;
|
29
|
-
metadata?: Metadata;
|
28
|
+
interface ResourceCreate extends ResourceBase {
|
30
29
|
}
|
31
|
-
interface ResourceUpdate {
|
30
|
+
interface ResourceUpdate extends ResourceBase {
|
32
31
|
readonly id: string;
|
33
|
-
reference?: string;
|
34
|
-
reference_origin?: string;
|
35
|
-
metadata?: Metadata;
|
36
32
|
}
|
37
33
|
type ListMeta = {
|
38
34
|
readonly pageCount: number;
|
@@ -82,6 +78,7 @@ declare abstract class ApiResourceBase<R extends Resource> {
|
|
82
78
|
}
|
83
79
|
declare abstract class ApiResource<R extends Resource> extends ApiResourceBase<R> {
|
84
80
|
retrieve(id: string | ResourceId, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<R>;
|
81
|
+
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<R>>;
|
85
82
|
}
|
86
83
|
declare abstract class ApiSingleton<R extends Resource> extends ApiResourceBase<R> {
|
87
84
|
retrieve(params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<R>;
|
package/lib/esm/resource.js
CHANGED
@@ -150,6 +150,9 @@ class ApiResource extends ApiResourceBase {
|
|
150
150
|
async retrieve(id, params, options) {
|
151
151
|
return this.resources.retrieve((typeof id === 'string') ? { type: this.type(), id } : id, params, options);
|
152
152
|
}
|
153
|
+
async list(params, options) {
|
154
|
+
return this.resources.list({ type: this.type() }, params, options);
|
155
|
+
}
|
153
156
|
}
|
154
157
|
class ApiSingleton extends ApiResourceBase {
|
155
158
|
async retrieve(params, options) {
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel
|
2
|
-
import type { QueryParamsRetrieve
|
1
|
+
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel } from '../resource';
|
2
|
+
import type { QueryParamsRetrieve } from '../query';
|
3
3
|
import type { Geocoder, GeocoderType } from './geocoders';
|
4
4
|
type AddressType = 'addresses';
|
5
5
|
type AddressRel = ResourceRel & {
|
@@ -76,7 +76,6 @@ interface AddressUpdate extends ResourceUpdate {
|
|
76
76
|
}
|
77
77
|
declare class Addresses extends ApiResource<Address> {
|
78
78
|
static readonly TYPE: AddressType;
|
79
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Address>>;
|
80
79
|
create(resource: AddressCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Address>;
|
81
80
|
update(resource: AddressUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Address>;
|
82
81
|
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
@@ -1,8 +1,5 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
2
|
class Addresses extends ApiResource {
|
3
|
-
async list(params, options) {
|
4
|
-
return this.resources.list({ type: Addresses.TYPE }, params, options);
|
5
|
-
}
|
6
3
|
async create(resource, params, options) {
|
7
4
|
return this.resources.create({ ...resource, type: Addresses.TYPE }, params, options);
|
8
5
|
}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel
|
2
|
-
import type { QueryParamsRetrieve
|
1
|
+
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel } from '../resource';
|
2
|
+
import type { QueryParamsRetrieve } from '../query';
|
3
3
|
type AdjustmentType = 'adjustments';
|
4
4
|
type AdjustmentRel = ResourceRel & {
|
5
5
|
type: AdjustmentType;
|
@@ -24,7 +24,6 @@ interface AdjustmentUpdate extends ResourceUpdate {
|
|
24
24
|
}
|
25
25
|
declare class Adjustments extends ApiResource<Adjustment> {
|
26
26
|
static readonly TYPE: AdjustmentType;
|
27
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Adjustment>>;
|
28
27
|
create(resource: AdjustmentCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Adjustment>;
|
29
28
|
update(resource: AdjustmentUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Adjustment>;
|
30
29
|
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
@@ -1,8 +1,5 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
2
|
class Adjustments extends ApiResource {
|
3
|
-
async list(params, options) {
|
4
|
-
return this.resources.list({ type: Adjustments.TYPE }, params, options);
|
5
|
-
}
|
6
3
|
async create(resource, params, options) {
|
7
4
|
return this.resources.create({ ...resource, type: Adjustments.TYPE }, params, options);
|
8
5
|
}
|
@@ -43,7 +43,6 @@ interface AdyenGatewayUpdate extends ResourceUpdate {
|
|
43
43
|
}
|
44
44
|
declare class AdyenGateways extends ApiResource<AdyenGateway> {
|
45
45
|
static readonly TYPE: AdyenGatewayType;
|
46
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<AdyenGateway>>;
|
47
46
|
create(resource: AdyenGatewayCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<AdyenGateway>;
|
48
47
|
update(resource: AdyenGatewayUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<AdyenGateway>;
|
49
48
|
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
@@ -1,8 +1,5 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
2
|
class AdyenGateways extends ApiResource {
|
3
|
-
async list(params, options) {
|
4
|
-
return this.resources.list({ type: AdyenGateways.TYPE }, params, options);
|
5
|
-
}
|
6
3
|
async create(resource, params, options) {
|
7
4
|
return this.resources.create({ ...resource, type: AdyenGateways.TYPE }, params, options);
|
8
5
|
}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel
|
2
|
-
import type { QueryParamsRetrieve
|
1
|
+
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel } from '../resource';
|
2
|
+
import type { QueryParamsRetrieve } from '../query';
|
3
3
|
import type { Order, OrderType } from './orders';
|
4
4
|
import type { PaymentGateway } from './payment_gateways';
|
5
5
|
type AdyenPaymentType = 'adyen_payments';
|
@@ -33,7 +33,6 @@ interface AdyenPaymentUpdate extends ResourceUpdate {
|
|
33
33
|
}
|
34
34
|
declare class AdyenPayments extends ApiResource<AdyenPayment> {
|
35
35
|
static readonly TYPE: AdyenPaymentType;
|
36
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<AdyenPayment>>;
|
37
36
|
create(resource: AdyenPaymentCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<AdyenPayment>;
|
38
37
|
update(resource: AdyenPaymentUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<AdyenPayment>;
|
39
38
|
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
@@ -1,8 +1,5 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
2
|
class AdyenPayments extends ApiResource {
|
3
|
-
async list(params, options) {
|
4
|
-
return this.resources.list({ type: AdyenPayments.TYPE }, params, options);
|
5
|
-
}
|
6
3
|
async create(resource, params, options) {
|
7
4
|
return this.resources.create({ ...resource, type: AdyenPayments.TYPE }, params, options);
|
8
5
|
}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel
|
2
|
-
import type { QueryParamsRetrieve
|
1
|
+
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel } from '../resource';
|
2
|
+
import type { QueryParamsRetrieve } from '../query';
|
3
3
|
import type { Bundle, BundleType } from './bundles';
|
4
4
|
import type { CarrierAccount, CarrierAccountType } from './carrier_accounts';
|
5
5
|
import type { CustomerGroup, CustomerGroupType } from './customer_groups';
|
@@ -145,7 +145,6 @@ interface AttachmentUpdate extends ResourceUpdate {
|
|
145
145
|
}
|
146
146
|
declare class Attachments extends ApiResource<Attachment> {
|
147
147
|
static readonly TYPE: AttachmentType;
|
148
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
149
148
|
create(resource: AttachmentCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Attachment>;
|
150
149
|
update(resource: AttachmentUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Attachment>;
|
151
150
|
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
@@ -1,8 +1,5 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
2
|
class Attachments extends ApiResource {
|
3
|
-
async list(params, options) {
|
4
|
-
return this.resources.list({ type: Attachments.TYPE }, params, options);
|
5
|
-
}
|
6
3
|
async create(resource, params, options) {
|
7
4
|
return this.resources.create({ ...resource, type: Attachments.TYPE }, params, options);
|
8
5
|
}
|
@@ -47,7 +47,6 @@ interface AuthorizationUpdate extends ResourceUpdate {
|
|
47
47
|
}
|
48
48
|
declare class Authorizations extends ApiResource<Authorization> {
|
49
49
|
static readonly TYPE: AuthorizationType;
|
50
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Authorization>>;
|
51
50
|
update(resource: AuthorizationUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Authorization>;
|
52
51
|
order(authorizationId: string | Authorization, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
53
52
|
captures(authorizationId: string | Authorization, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Capture>>;
|
@@ -1,8 +1,5 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
2
|
class Authorizations extends ApiResource {
|
3
|
-
async list(params, options) {
|
4
|
-
return this.resources.list({ type: Authorizations.TYPE }, params, options);
|
5
|
-
}
|
6
3
|
async update(resource, params, options) {
|
7
4
|
return this.resources.update({ ...resource, type: Authorizations.TYPE }, params, options);
|
8
5
|
}
|
@@ -41,7 +41,6 @@ interface AvalaraAccountUpdate extends ResourceUpdate {
|
|
41
41
|
}
|
42
42
|
declare class AvalaraAccounts extends ApiResource<AvalaraAccount> {
|
43
43
|
static readonly TYPE: AvalaraAccountType;
|
44
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<AvalaraAccount>>;
|
45
44
|
create(resource: AvalaraAccountCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<AvalaraAccount>;
|
46
45
|
update(resource: AvalaraAccountUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<AvalaraAccount>;
|
47
46
|
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
@@ -1,8 +1,5 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
2
|
class AvalaraAccounts extends ApiResource {
|
3
|
-
async list(params, options) {
|
4
|
-
return this.resources.list({ type: AvalaraAccounts.TYPE }, params, options);
|
5
|
-
}
|
6
3
|
async create(resource, params, options) {
|
7
4
|
return this.resources.create({ ...resource, type: AvalaraAccounts.TYPE }, params, options);
|
8
5
|
}
|
@@ -30,7 +30,6 @@ interface AxerveGatewayUpdate extends ResourceUpdate {
|
|
30
30
|
}
|
31
31
|
declare class AxerveGateways extends ApiResource<AxerveGateway> {
|
32
32
|
static readonly TYPE: AxerveGatewayType;
|
33
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<AxerveGateway>>;
|
34
33
|
create(resource: AxerveGatewayCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<AxerveGateway>;
|
35
34
|
update(resource: AxerveGatewayUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<AxerveGateway>;
|
36
35
|
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
@@ -1,8 +1,5 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
2
|
class AxerveGateways extends ApiResource {
|
3
|
-
async list(params, options) {
|
4
|
-
return this.resources.list({ type: AxerveGateways.TYPE }, params, options);
|
5
|
-
}
|
6
3
|
async create(resource, params, options) {
|
7
4
|
return this.resources.create({ ...resource, type: AxerveGateways.TYPE }, params, options);
|
8
5
|
}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel
|
2
|
-
import type { QueryParamsRetrieve
|
1
|
+
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel } from '../resource';
|
2
|
+
import type { QueryParamsRetrieve } from '../query';
|
3
3
|
import type { Order, OrderType } from './orders';
|
4
4
|
import type { PaymentGateway } from './payment_gateways';
|
5
5
|
type AxervePaymentType = 'axerve_payments';
|
@@ -33,7 +33,6 @@ interface AxervePaymentUpdate extends ResourceUpdate {
|
|
33
33
|
}
|
34
34
|
declare class AxervePayments extends ApiResource<AxervePayment> {
|
35
35
|
static readonly TYPE: AxervePaymentType;
|
36
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<AxervePayment>>;
|
37
36
|
create(resource: AxervePaymentCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<AxervePayment>;
|
38
37
|
update(resource: AxervePaymentUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<AxervePayment>;
|
39
38
|
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
@@ -1,8 +1,5 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
2
|
class AxervePayments extends ApiResource {
|
3
|
-
async list(params, options) {
|
4
|
-
return this.resources.list({ type: AxervePayments.TYPE }, params, options);
|
5
|
-
}
|
6
3
|
async create(resource, params, options) {
|
7
4
|
return this.resources.create({ ...resource, type: AxervePayments.TYPE }, params, options);
|
8
5
|
}
|
@@ -22,7 +22,6 @@ interface BillingInfoValidationRuleUpdate extends ResourceUpdate {
|
|
22
22
|
}
|
23
23
|
declare class BillingInfoValidationRules extends ApiResource<BillingInfoValidationRule> {
|
24
24
|
static readonly TYPE: BillingInfoValidationRuleType;
|
25
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<BillingInfoValidationRule>>;
|
26
25
|
create(resource: BillingInfoValidationRuleCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<BillingInfoValidationRule>;
|
27
26
|
update(resource: BillingInfoValidationRuleUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<BillingInfoValidationRule>;
|
28
27
|
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
@@ -1,8 +1,5 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
2
|
class BillingInfoValidationRules extends ApiResource {
|
3
|
-
async list(params, options) {
|
4
|
-
return this.resources.list({ type: BillingInfoValidationRules.TYPE }, params, options);
|
5
|
-
}
|
6
3
|
async create(resource, params, options) {
|
7
4
|
return this.resources.create({ ...resource, type: BillingInfoValidationRules.TYPE }, params, options);
|
8
5
|
}
|
@@ -22,7 +22,6 @@ interface BingGeocoderUpdate extends ResourceUpdate {
|
|
22
22
|
}
|
23
23
|
declare class BingGeocoders extends ApiResource<BingGeocoder> {
|
24
24
|
static readonly TYPE: BingGeocoderType;
|
25
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<BingGeocoder>>;
|
26
25
|
create(resource: BingGeocoderCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<BingGeocoder>;
|
27
26
|
update(resource: BingGeocoderUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<BingGeocoder>;
|
28
27
|
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
@@ -1,8 +1,5 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
2
|
class BingGeocoders extends ApiResource {
|
3
|
-
async list(params, options) {
|
4
|
-
return this.resources.list({ type: BingGeocoders.TYPE }, params, options);
|
5
|
-
}
|
6
3
|
async create(resource, params, options) {
|
7
4
|
return this.resources.create({ ...resource, type: BingGeocoders.TYPE }, params, options);
|
8
5
|
}
|
@@ -43,7 +43,6 @@ interface BraintreeGatewayUpdate extends ResourceUpdate {
|
|
43
43
|
}
|
44
44
|
declare class BraintreeGateways extends ApiResource<BraintreeGateway> {
|
45
45
|
static readonly TYPE: BraintreeGatewayType;
|
46
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<BraintreeGateway>>;
|
47
46
|
create(resource: BraintreeGatewayCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<BraintreeGateway>;
|
48
47
|
update(resource: BraintreeGatewayUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<BraintreeGateway>;
|
49
48
|
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
@@ -1,8 +1,5 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
2
|
class BraintreeGateways extends ApiResource {
|
3
|
-
async list(params, options) {
|
4
|
-
return this.resources.list({ type: BraintreeGateways.TYPE }, params, options);
|
5
|
-
}
|
6
3
|
async create(resource, params, options) {
|
7
4
|
return this.resources.create({ ...resource, type: BraintreeGateways.TYPE }, params, options);
|
8
5
|
}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel
|
2
|
-
import type { QueryParamsRetrieve
|
1
|
+
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel } from '../resource';
|
2
|
+
import type { QueryParamsRetrieve } from '../query';
|
3
3
|
import type { Order, OrderType } from './orders';
|
4
4
|
import type { PaymentGateway } from './payment_gateways';
|
5
5
|
type BraintreePaymentType = 'braintree_payments';
|
@@ -35,7 +35,6 @@ interface BraintreePaymentUpdate extends ResourceUpdate {
|
|
35
35
|
}
|
36
36
|
declare class BraintreePayments extends ApiResource<BraintreePayment> {
|
37
37
|
static readonly TYPE: BraintreePaymentType;
|
38
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<BraintreePayment>>;
|
39
38
|
create(resource: BraintreePaymentCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<BraintreePayment>;
|
40
39
|
update(resource: BraintreePaymentUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<BraintreePayment>;
|
41
40
|
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
@@ -1,8 +1,5 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
2
|
class BraintreePayments extends ApiResource {
|
3
|
-
async list(params, options) {
|
4
|
-
return this.resources.list({ type: BraintreePayments.TYPE }, params, options);
|
5
|
-
}
|
6
3
|
async create(resource, params, options) {
|
7
4
|
return this.resources.create({ ...resource, type: BraintreePayments.TYPE }, params, options);
|
8
5
|
}
|
@@ -61,7 +61,6 @@ interface BundleUpdate extends ResourceUpdate {
|
|
61
61
|
}
|
62
62
|
declare class Bundles extends ApiResource<Bundle> {
|
63
63
|
static readonly TYPE: BundleType;
|
64
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Bundle>>;
|
65
64
|
create(resource: BundleCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Bundle>;
|
66
65
|
update(resource: BundleUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Bundle>;
|
67
66
|
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
@@ -1,8 +1,5 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
2
|
class Bundles extends ApiResource {
|
3
|
-
async list(params, options) {
|
4
|
-
return this.resources.list({ type: Bundles.TYPE }, params, options);
|
5
|
-
}
|
6
3
|
async create(resource, params, options) {
|
7
4
|
return this.resources.create({ ...resource, type: Bundles.TYPE }, params, options);
|
8
5
|
}
|
@@ -38,7 +38,6 @@ interface CaptureUpdate extends ResourceUpdate {
|
|
38
38
|
}
|
39
39
|
declare class Captures extends ApiResource<Capture> {
|
40
40
|
static readonly TYPE: CaptureType;
|
41
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Capture>>;
|
42
41
|
update(resource: CaptureUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Capture>;
|
43
42
|
order(captureId: string | Capture, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
44
43
|
reference_authorization(captureId: string | Capture, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Authorization>;
|
@@ -1,8 +1,5 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
2
|
class Captures extends ApiResource {
|
3
|
-
async list(params, options) {
|
4
|
-
return this.resources.list({ type: Captures.TYPE }, params, options);
|
5
|
-
}
|
6
3
|
async update(resource, params, options) {
|
7
4
|
return this.resources.update({ ...resource, type: Captures.TYPE }, params, options);
|
8
5
|
}
|
@@ -16,7 +16,6 @@ interface CarrierAccount extends Resource {
|
|
16
16
|
}
|
17
17
|
declare class CarrierAccounts extends ApiResource<CarrierAccount> {
|
18
18
|
static readonly TYPE: CarrierAccountType;
|
19
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<CarrierAccount>>;
|
20
19
|
market(carrierAccountId: string | CarrierAccount, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Market>;
|
21
20
|
attachments(carrierAccountId: string | CarrierAccount, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
22
21
|
isCarrierAccount(resource: any): resource is CarrierAccount;
|
@@ -1,8 +1,5 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
2
|
class CarrierAccounts extends ApiResource {
|
3
|
-
async list(params, options) {
|
4
|
-
return this.resources.list({ type: CarrierAccounts.TYPE }, params, options);
|
5
|
-
}
|
6
3
|
async market(carrierAccountId, params, options) {
|
7
4
|
const _carrierAccountId = carrierAccountId.id || carrierAccountId;
|
8
5
|
return this.resources.fetch({ type: 'markets' }, `carrier_accounts/${_carrierAccountId}/market`, params, options);
|