@commercelayer/sdk 6.0.0-alfa.1 → 6.0.0-alfa.3
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/commercelayer.d.ts +2 -2
- package/lib/cjs/commercelayer.js +1 -1
- package/lib/cjs/config.d.ts +3 -0
- package/lib/cjs/config.js +3 -0
- package/lib/cjs/jsonapi.js +10 -5
- package/lib/cjs/query.d.ts +1 -1
- package/lib/cjs/query.js +18 -1
- package/lib/cjs/resource.d.ts +7 -2
- package/lib/cjs/resource.js +20 -7
- package/lib/cjs/resources/addresses.d.ts +1 -0
- package/lib/cjs/resources/addresses.js +4 -1
- package/lib/cjs/resources/adjustments.d.ts +1 -0
- package/lib/cjs/resources/adjustments.js +4 -1
- package/lib/cjs/resources/adyen_gateways.d.ts +1 -0
- package/lib/cjs/resources/adyen_gateways.js +4 -1
- package/lib/cjs/resources/adyen_payments.d.ts +1 -0
- package/lib/cjs/resources/adyen_payments.js +4 -1
- package/lib/cjs/resources/application.d.ts +1 -0
- package/lib/cjs/resources/application.js +4 -1
- package/lib/cjs/resources/attachments.d.ts +1 -0
- package/lib/cjs/resources/attachments.js +4 -1
- package/lib/cjs/resources/authorizations.d.ts +1 -0
- package/lib/cjs/resources/authorizations.js +4 -1
- package/lib/cjs/resources/avalara_accounts.d.ts +1 -0
- package/lib/cjs/resources/avalara_accounts.js +4 -1
- package/lib/cjs/resources/axerve_gateways.d.ts +1 -0
- package/lib/cjs/resources/axerve_gateways.js +4 -1
- package/lib/cjs/resources/axerve_payments.d.ts +1 -0
- package/lib/cjs/resources/axerve_payments.js +4 -1
- package/lib/cjs/resources/billing_info_validation_rules.d.ts +1 -0
- package/lib/cjs/resources/billing_info_validation_rules.js +4 -1
- package/lib/cjs/resources/bing_geocoders.d.ts +1 -0
- package/lib/cjs/resources/bing_geocoders.js +4 -1
- package/lib/cjs/resources/braintree_gateways.d.ts +1 -0
- package/lib/cjs/resources/braintree_gateways.js +4 -1
- package/lib/cjs/resources/braintree_payments.d.ts +1 -0
- package/lib/cjs/resources/braintree_payments.js +4 -1
- package/lib/cjs/resources/bundles.d.ts +1 -0
- package/lib/cjs/resources/bundles.js +4 -1
- package/lib/cjs/resources/buy_x_pay_y_promotions.d.ts +1 -0
- package/lib/cjs/resources/buy_x_pay_y_promotions.js +4 -1
- package/lib/cjs/resources/captures.d.ts +1 -0
- package/lib/cjs/resources/captures.js +4 -1
- package/lib/cjs/resources/carrier_accounts.d.ts +1 -0
- package/lib/cjs/resources/carrier_accounts.js +4 -1
- package/lib/cjs/resources/checkout_com_gateways.d.ts +1 -0
- package/lib/cjs/resources/checkout_com_gateways.js +4 -1
- package/lib/cjs/resources/checkout_com_payments.d.ts +1 -0
- package/lib/cjs/resources/checkout_com_payments.js +4 -1
- package/lib/cjs/resources/cleanups.d.ts +1 -0
- package/lib/cjs/resources/cleanups.js +4 -1
- package/lib/cjs/resources/coupon_codes_promotion_rules.d.ts +1 -0
- package/lib/cjs/resources/coupon_codes_promotion_rules.js +4 -1
- package/lib/cjs/resources/coupon_recipients.d.ts +1 -0
- package/lib/cjs/resources/coupon_recipients.js +4 -1
- package/lib/cjs/resources/coupons.d.ts +1 -0
- package/lib/cjs/resources/coupons.js +4 -1
- package/lib/cjs/resources/custom_promotion_rules.d.ts +1 -0
- package/lib/cjs/resources/custom_promotion_rules.js +4 -1
- package/lib/cjs/resources/customer_addresses.d.ts +1 -0
- package/lib/cjs/resources/customer_addresses.js +4 -1
- package/lib/cjs/resources/customer_groups.d.ts +1 -0
- package/lib/cjs/resources/customer_groups.js +4 -1
- package/lib/cjs/resources/customer_password_resets.d.ts +1 -0
- package/lib/cjs/resources/customer_password_resets.js +4 -1
- package/lib/cjs/resources/customer_payment_sources.d.ts +1 -0
- package/lib/cjs/resources/customer_payment_sources.js +4 -1
- package/lib/cjs/resources/customer_subscriptions.d.ts +1 -0
- package/lib/cjs/resources/customer_subscriptions.js +4 -1
- package/lib/cjs/resources/customers.d.ts +1 -0
- package/lib/cjs/resources/customers.js +4 -1
- package/lib/cjs/resources/delivery_lead_times.d.ts +1 -0
- package/lib/cjs/resources/delivery_lead_times.js +4 -1
- package/lib/cjs/resources/event_callbacks.d.ts +1 -0
- package/lib/cjs/resources/event_callbacks.js +4 -1
- package/lib/cjs/resources/events.d.ts +4 -3
- package/lib/cjs/resources/events.js +8 -5
- package/lib/cjs/resources/exports.d.ts +1 -0
- package/lib/cjs/resources/exports.js +4 -1
- package/lib/cjs/resources/external_gateways.d.ts +1 -0
- package/lib/cjs/resources/external_gateways.js +4 -1
- package/lib/cjs/resources/external_payments.d.ts +1 -0
- package/lib/cjs/resources/external_payments.js +4 -1
- package/lib/cjs/resources/external_promotions.d.ts +1 -0
- package/lib/cjs/resources/external_promotions.js +4 -1
- package/lib/cjs/resources/external_tax_calculators.d.ts +1 -0
- package/lib/cjs/resources/external_tax_calculators.js +4 -1
- package/lib/cjs/resources/fixed_amount_promotions.d.ts +1 -0
- package/lib/cjs/resources/fixed_amount_promotions.js +4 -1
- package/lib/cjs/resources/fixed_price_promotions.d.ts +1 -0
- package/lib/cjs/resources/fixed_price_promotions.js +4 -1
- package/lib/cjs/resources/free_gift_promotions.d.ts +1 -0
- package/lib/cjs/resources/free_gift_promotions.js +4 -1
- package/lib/cjs/resources/free_shipping_promotions.d.ts +1 -0
- package/lib/cjs/resources/free_shipping_promotions.js +4 -1
- package/lib/cjs/resources/geocoders.d.ts +1 -0
- package/lib/cjs/resources/geocoders.js +4 -1
- package/lib/cjs/resources/gift_card_recipients.d.ts +1 -0
- package/lib/cjs/resources/gift_card_recipients.js +4 -1
- package/lib/cjs/resources/gift_cards.d.ts +1 -0
- package/lib/cjs/resources/gift_cards.js +4 -1
- package/lib/cjs/resources/google_geocoders.d.ts +1 -0
- package/lib/cjs/resources/google_geocoders.js +4 -1
- package/lib/cjs/resources/imports.d.ts +1 -0
- package/lib/cjs/resources/imports.js +4 -1
- package/lib/cjs/resources/in_stock_subscriptions.d.ts +1 -0
- package/lib/cjs/resources/in_stock_subscriptions.js +4 -1
- package/lib/cjs/resources/inventory_models.d.ts +1 -0
- package/lib/cjs/resources/inventory_models.js +4 -1
- package/lib/cjs/resources/inventory_return_locations.d.ts +1 -0
- package/lib/cjs/resources/inventory_return_locations.js +4 -1
- package/lib/cjs/resources/inventory_stock_locations.d.ts +1 -0
- package/lib/cjs/resources/inventory_stock_locations.js +4 -1
- package/lib/cjs/resources/klarna_gateways.d.ts +1 -0
- package/lib/cjs/resources/klarna_gateways.js +4 -1
- package/lib/cjs/resources/klarna_payments.d.ts +1 -0
- package/lib/cjs/resources/klarna_payments.js +4 -1
- package/lib/cjs/resources/line_item_options.d.ts +1 -0
- package/lib/cjs/resources/line_item_options.js +4 -1
- package/lib/cjs/resources/line_items.d.ts +1 -0
- package/lib/cjs/resources/line_items.js +4 -1
- package/lib/cjs/resources/manual_gateways.d.ts +1 -0
- package/lib/cjs/resources/manual_gateways.js +4 -1
- package/lib/cjs/resources/manual_tax_calculators.d.ts +1 -0
- package/lib/cjs/resources/manual_tax_calculators.js +4 -1
- package/lib/cjs/resources/markets.d.ts +1 -0
- package/lib/cjs/resources/markets.js +4 -1
- package/lib/cjs/resources/merchants.d.ts +1 -0
- package/lib/cjs/resources/merchants.js +4 -1
- package/lib/cjs/resources/order_amount_promotion_rules.d.ts +1 -0
- package/lib/cjs/resources/order_amount_promotion_rules.js +4 -1
- package/lib/cjs/resources/order_copies.d.ts +1 -0
- package/lib/cjs/resources/order_copies.js +4 -1
- package/lib/cjs/resources/order_factories.d.ts +1 -0
- package/lib/cjs/resources/order_factories.js +4 -1
- package/lib/cjs/resources/order_subscription_items.d.ts +1 -0
- package/lib/cjs/resources/order_subscription_items.js +4 -1
- package/lib/cjs/resources/order_subscriptions.d.ts +1 -0
- package/lib/cjs/resources/order_subscriptions.js +4 -1
- package/lib/cjs/resources/order_validation_rules.d.ts +1 -0
- package/lib/cjs/resources/order_validation_rules.js +4 -1
- package/lib/cjs/resources/orders.d.ts +1 -0
- package/lib/cjs/resources/orders.js +4 -1
- package/lib/cjs/resources/organization.d.ts +2 -0
- package/lib/cjs/resources/organization.js +4 -1
- package/lib/cjs/resources/packages.d.ts +1 -0
- package/lib/cjs/resources/packages.js +4 -1
- package/lib/cjs/resources/parcel_line_items.d.ts +1 -0
- package/lib/cjs/resources/parcel_line_items.js +4 -1
- package/lib/cjs/resources/parcels.d.ts +1 -0
- package/lib/cjs/resources/parcels.js +4 -1
- package/lib/cjs/resources/payment_gateways.d.ts +1 -0
- package/lib/cjs/resources/payment_gateways.js +4 -1
- package/lib/cjs/resources/payment_methods.d.ts +1 -0
- package/lib/cjs/resources/payment_methods.js +4 -1
- package/lib/cjs/resources/payment_options.d.ts +1 -0
- package/lib/cjs/resources/payment_options.js +4 -1
- package/lib/cjs/resources/paypal_gateways.d.ts +1 -0
- package/lib/cjs/resources/paypal_gateways.js +4 -1
- package/lib/cjs/resources/paypal_payments.d.ts +1 -0
- package/lib/cjs/resources/paypal_payments.js +4 -1
- package/lib/cjs/resources/percentage_discount_promotions.d.ts +1 -0
- package/lib/cjs/resources/percentage_discount_promotions.js +4 -1
- package/lib/cjs/resources/price_frequency_tiers.d.ts +1 -0
- package/lib/cjs/resources/price_frequency_tiers.js +4 -1
- package/lib/cjs/resources/price_lists.d.ts +1 -0
- package/lib/cjs/resources/price_lists.js +4 -1
- package/lib/cjs/resources/price_tiers.d.ts +1 -0
- package/lib/cjs/resources/price_tiers.js +4 -1
- package/lib/cjs/resources/price_volume_tiers.d.ts +1 -0
- package/lib/cjs/resources/price_volume_tiers.js +4 -1
- package/lib/cjs/resources/prices.d.ts +1 -0
- package/lib/cjs/resources/prices.js +4 -1
- package/lib/cjs/resources/promotion_rules.d.ts +1 -0
- package/lib/cjs/resources/promotion_rules.js +4 -1
- package/lib/cjs/resources/promotions.d.ts +1 -0
- package/lib/cjs/resources/promotions.js +4 -1
- package/lib/cjs/resources/recurring_order_copies.d.ts +1 -0
- package/lib/cjs/resources/recurring_order_copies.js +4 -1
- package/lib/cjs/resources/refunds.d.ts +1 -0
- package/lib/cjs/resources/refunds.js +4 -1
- package/lib/cjs/resources/reserved_stocks.d.ts +1 -0
- package/lib/cjs/resources/reserved_stocks.js +4 -1
- package/lib/cjs/resources/resource_errors.d.ts +1 -0
- package/lib/cjs/resources/resource_errors.js +4 -1
- package/lib/cjs/resources/return_line_items.d.ts +1 -0
- package/lib/cjs/resources/return_line_items.js +4 -1
- package/lib/cjs/resources/returns.d.ts +1 -0
- package/lib/cjs/resources/returns.js +4 -1
- package/lib/cjs/resources/satispay_gateways.d.ts +1 -0
- package/lib/cjs/resources/satispay_gateways.js +4 -1
- package/lib/cjs/resources/satispay_payments.d.ts +1 -0
- package/lib/cjs/resources/satispay_payments.js +4 -1
- package/lib/cjs/resources/shipments.d.ts +4 -0
- package/lib/cjs/resources/shipments.js +8 -1
- package/lib/cjs/resources/shipping_categories.d.ts +1 -0
- package/lib/cjs/resources/shipping_categories.js +4 -1
- package/lib/cjs/resources/shipping_method_tiers.d.ts +1 -0
- package/lib/cjs/resources/shipping_method_tiers.js +4 -1
- package/lib/cjs/resources/shipping_methods.d.ts +1 -0
- package/lib/cjs/resources/shipping_methods.js +4 -1
- package/lib/cjs/resources/shipping_weight_tiers.d.ts +1 -0
- package/lib/cjs/resources/shipping_weight_tiers.js +4 -1
- package/lib/cjs/resources/shipping_zones.d.ts +1 -0
- package/lib/cjs/resources/shipping_zones.js +4 -1
- package/lib/cjs/resources/sku_list_items.d.ts +1 -0
- package/lib/cjs/resources/sku_list_items.js +4 -1
- package/lib/cjs/resources/sku_list_promotion_rules.d.ts +1 -0
- package/lib/cjs/resources/sku_list_promotion_rules.js +4 -1
- package/lib/cjs/resources/sku_lists.d.ts +1 -0
- package/lib/cjs/resources/sku_lists.js +4 -1
- package/lib/cjs/resources/sku_options.d.ts +1 -0
- package/lib/cjs/resources/sku_options.js +4 -1
- package/lib/cjs/resources/skus.d.ts +1 -0
- package/lib/cjs/resources/skus.js +4 -1
- package/lib/cjs/resources/stock_items.d.ts +1 -0
- package/lib/cjs/resources/stock_items.js +4 -1
- package/lib/cjs/resources/stock_line_items.d.ts +1 -0
- package/lib/cjs/resources/stock_line_items.js +4 -1
- package/lib/cjs/resources/stock_locations.d.ts +1 -0
- package/lib/cjs/resources/stock_locations.js +4 -1
- package/lib/cjs/resources/stock_reservations.d.ts +1 -0
- package/lib/cjs/resources/stock_reservations.js +4 -1
- package/lib/cjs/resources/stock_transfers.d.ts +1 -0
- package/lib/cjs/resources/stock_transfers.js +4 -1
- package/lib/cjs/resources/stripe_gateways.d.ts +1 -0
- package/lib/cjs/resources/stripe_gateways.js +4 -1
- package/lib/cjs/resources/stripe_payments.d.ts +1 -0
- package/lib/cjs/resources/stripe_payments.js +4 -1
- package/lib/cjs/resources/subscription_models.d.ts +1 -0
- package/lib/cjs/resources/subscription_models.js +4 -1
- package/lib/cjs/resources/tags.d.ts +1 -0
- package/lib/cjs/resources/tags.js +4 -1
- package/lib/cjs/resources/tax_calculators.d.ts +1 -0
- package/lib/cjs/resources/tax_calculators.js +4 -1
- package/lib/cjs/resources/tax_categories.d.ts +1 -0
- package/lib/cjs/resources/tax_categories.js +4 -1
- package/lib/cjs/resources/tax_rules.d.ts +1 -0
- package/lib/cjs/resources/tax_rules.js +4 -1
- package/lib/cjs/resources/taxjar_accounts.d.ts +1 -0
- package/lib/cjs/resources/taxjar_accounts.js +4 -1
- package/lib/cjs/resources/transactions.d.ts +1 -0
- package/lib/cjs/resources/transactions.js +4 -1
- package/lib/cjs/resources/versions.d.ts +1 -0
- package/lib/cjs/resources/versions.js +4 -1
- package/lib/cjs/resources/voids.d.ts +1 -0
- package/lib/cjs/resources/voids.js +4 -1
- package/lib/cjs/resources/webhooks.d.ts +1 -0
- package/lib/cjs/resources/webhooks.js +4 -1
- package/lib/cjs/resources/wire_transfers.d.ts +1 -0
- package/lib/cjs/resources/wire_transfers.js +4 -1
- package/lib/esm/commercelayer.d.ts +2 -2
- package/lib/esm/commercelayer.js +1 -1
- package/lib/esm/config.d.ts +3 -0
- package/lib/esm/config.js +3 -0
- package/lib/esm/jsonapi.js +10 -5
- package/lib/esm/query.d.ts +1 -1
- package/lib/esm/query.js +18 -1
- package/lib/esm/resource.d.ts +7 -2
- package/lib/esm/resource.js +20 -7
- package/lib/esm/resources/addresses.d.ts +1 -0
- package/lib/esm/resources/addresses.js +4 -1
- package/lib/esm/resources/adjustments.d.ts +1 -0
- package/lib/esm/resources/adjustments.js +4 -1
- package/lib/esm/resources/adyen_gateways.d.ts +1 -0
- package/lib/esm/resources/adyen_gateways.js +4 -1
- package/lib/esm/resources/adyen_payments.d.ts +1 -0
- package/lib/esm/resources/adyen_payments.js +4 -1
- package/lib/esm/resources/application.d.ts +1 -0
- package/lib/esm/resources/application.js +4 -1
- package/lib/esm/resources/attachments.d.ts +1 -0
- package/lib/esm/resources/attachments.js +4 -1
- package/lib/esm/resources/authorizations.d.ts +1 -0
- package/lib/esm/resources/authorizations.js +4 -1
- package/lib/esm/resources/avalara_accounts.d.ts +1 -0
- package/lib/esm/resources/avalara_accounts.js +4 -1
- package/lib/esm/resources/axerve_gateways.d.ts +1 -0
- package/lib/esm/resources/axerve_gateways.js +4 -1
- package/lib/esm/resources/axerve_payments.d.ts +1 -0
- package/lib/esm/resources/axerve_payments.js +4 -1
- package/lib/esm/resources/billing_info_validation_rules.d.ts +1 -0
- package/lib/esm/resources/billing_info_validation_rules.js +4 -1
- package/lib/esm/resources/bing_geocoders.d.ts +1 -0
- package/lib/esm/resources/bing_geocoders.js +4 -1
- package/lib/esm/resources/braintree_gateways.d.ts +1 -0
- package/lib/esm/resources/braintree_gateways.js +4 -1
- package/lib/esm/resources/braintree_payments.d.ts +1 -0
- package/lib/esm/resources/braintree_payments.js +4 -1
- package/lib/esm/resources/bundles.d.ts +1 -0
- package/lib/esm/resources/bundles.js +4 -1
- package/lib/esm/resources/buy_x_pay_y_promotions.d.ts +1 -0
- package/lib/esm/resources/buy_x_pay_y_promotions.js +4 -1
- package/lib/esm/resources/captures.d.ts +1 -0
- package/lib/esm/resources/captures.js +4 -1
- package/lib/esm/resources/carrier_accounts.d.ts +1 -0
- package/lib/esm/resources/carrier_accounts.js +4 -1
- package/lib/esm/resources/checkout_com_gateways.d.ts +1 -0
- package/lib/esm/resources/checkout_com_gateways.js +4 -1
- package/lib/esm/resources/checkout_com_payments.d.ts +1 -0
- package/lib/esm/resources/checkout_com_payments.js +4 -1
- package/lib/esm/resources/cleanups.d.ts +1 -0
- package/lib/esm/resources/cleanups.js +4 -1
- package/lib/esm/resources/coupon_codes_promotion_rules.d.ts +1 -0
- package/lib/esm/resources/coupon_codes_promotion_rules.js +4 -1
- package/lib/esm/resources/coupon_recipients.d.ts +1 -0
- package/lib/esm/resources/coupon_recipients.js +4 -1
- package/lib/esm/resources/coupons.d.ts +1 -0
- package/lib/esm/resources/coupons.js +4 -1
- package/lib/esm/resources/custom_promotion_rules.d.ts +1 -0
- package/lib/esm/resources/custom_promotion_rules.js +4 -1
- package/lib/esm/resources/customer_addresses.d.ts +1 -0
- package/lib/esm/resources/customer_addresses.js +4 -1
- package/lib/esm/resources/customer_groups.d.ts +1 -0
- package/lib/esm/resources/customer_groups.js +4 -1
- package/lib/esm/resources/customer_password_resets.d.ts +1 -0
- package/lib/esm/resources/customer_password_resets.js +4 -1
- package/lib/esm/resources/customer_payment_sources.d.ts +1 -0
- package/lib/esm/resources/customer_payment_sources.js +4 -1
- package/lib/esm/resources/customer_subscriptions.d.ts +1 -0
- package/lib/esm/resources/customer_subscriptions.js +4 -1
- package/lib/esm/resources/customers.d.ts +1 -0
- package/lib/esm/resources/customers.js +4 -1
- package/lib/esm/resources/delivery_lead_times.d.ts +1 -0
- package/lib/esm/resources/delivery_lead_times.js +4 -1
- package/lib/esm/resources/event_callbacks.d.ts +1 -0
- package/lib/esm/resources/event_callbacks.js +4 -1
- package/lib/esm/resources/events.d.ts +4 -3
- package/lib/esm/resources/events.js +8 -5
- package/lib/esm/resources/exports.d.ts +1 -0
- package/lib/esm/resources/exports.js +4 -1
- package/lib/esm/resources/external_gateways.d.ts +1 -0
- package/lib/esm/resources/external_gateways.js +4 -1
- package/lib/esm/resources/external_payments.d.ts +1 -0
- package/lib/esm/resources/external_payments.js +4 -1
- package/lib/esm/resources/external_promotions.d.ts +1 -0
- package/lib/esm/resources/external_promotions.js +4 -1
- package/lib/esm/resources/external_tax_calculators.d.ts +1 -0
- package/lib/esm/resources/external_tax_calculators.js +4 -1
- package/lib/esm/resources/fixed_amount_promotions.d.ts +1 -0
- package/lib/esm/resources/fixed_amount_promotions.js +4 -1
- package/lib/esm/resources/fixed_price_promotions.d.ts +1 -0
- package/lib/esm/resources/fixed_price_promotions.js +4 -1
- package/lib/esm/resources/free_gift_promotions.d.ts +1 -0
- package/lib/esm/resources/free_gift_promotions.js +4 -1
- package/lib/esm/resources/free_shipping_promotions.d.ts +1 -0
- package/lib/esm/resources/free_shipping_promotions.js +4 -1
- package/lib/esm/resources/geocoders.d.ts +1 -0
- package/lib/esm/resources/geocoders.js +4 -1
- package/lib/esm/resources/gift_card_recipients.d.ts +1 -0
- package/lib/esm/resources/gift_card_recipients.js +4 -1
- package/lib/esm/resources/gift_cards.d.ts +1 -0
- package/lib/esm/resources/gift_cards.js +4 -1
- package/lib/esm/resources/google_geocoders.d.ts +1 -0
- package/lib/esm/resources/google_geocoders.js +4 -1
- package/lib/esm/resources/imports.d.ts +1 -0
- package/lib/esm/resources/imports.js +4 -1
- package/lib/esm/resources/in_stock_subscriptions.d.ts +1 -0
- package/lib/esm/resources/in_stock_subscriptions.js +4 -1
- package/lib/esm/resources/inventory_models.d.ts +1 -0
- package/lib/esm/resources/inventory_models.js +4 -1
- package/lib/esm/resources/inventory_return_locations.d.ts +1 -0
- package/lib/esm/resources/inventory_return_locations.js +4 -1
- package/lib/esm/resources/inventory_stock_locations.d.ts +1 -0
- package/lib/esm/resources/inventory_stock_locations.js +4 -1
- package/lib/esm/resources/klarna_gateways.d.ts +1 -0
- package/lib/esm/resources/klarna_gateways.js +4 -1
- package/lib/esm/resources/klarna_payments.d.ts +1 -0
- package/lib/esm/resources/klarna_payments.js +4 -1
- package/lib/esm/resources/line_item_options.d.ts +1 -0
- package/lib/esm/resources/line_item_options.js +4 -1
- package/lib/esm/resources/line_items.d.ts +1 -0
- package/lib/esm/resources/line_items.js +4 -1
- package/lib/esm/resources/manual_gateways.d.ts +1 -0
- package/lib/esm/resources/manual_gateways.js +4 -1
- package/lib/esm/resources/manual_tax_calculators.d.ts +1 -0
- package/lib/esm/resources/manual_tax_calculators.js +4 -1
- package/lib/esm/resources/markets.d.ts +1 -0
- package/lib/esm/resources/markets.js +4 -1
- package/lib/esm/resources/merchants.d.ts +1 -0
- package/lib/esm/resources/merchants.js +4 -1
- package/lib/esm/resources/order_amount_promotion_rules.d.ts +1 -0
- package/lib/esm/resources/order_amount_promotion_rules.js +4 -1
- package/lib/esm/resources/order_copies.d.ts +1 -0
- package/lib/esm/resources/order_copies.js +4 -1
- package/lib/esm/resources/order_factories.d.ts +1 -0
- package/lib/esm/resources/order_factories.js +4 -1
- package/lib/esm/resources/order_subscription_items.d.ts +1 -0
- package/lib/esm/resources/order_subscription_items.js +4 -1
- package/lib/esm/resources/order_subscriptions.d.ts +1 -0
- package/lib/esm/resources/order_subscriptions.js +4 -1
- package/lib/esm/resources/order_validation_rules.d.ts +1 -0
- package/lib/esm/resources/order_validation_rules.js +4 -1
- package/lib/esm/resources/orders.d.ts +1 -0
- package/lib/esm/resources/orders.js +4 -1
- package/lib/esm/resources/organization.d.ts +2 -0
- package/lib/esm/resources/organization.js +4 -1
- package/lib/esm/resources/packages.d.ts +1 -0
- package/lib/esm/resources/packages.js +4 -1
- package/lib/esm/resources/parcel_line_items.d.ts +1 -0
- package/lib/esm/resources/parcel_line_items.js +4 -1
- package/lib/esm/resources/parcels.d.ts +1 -0
- package/lib/esm/resources/parcels.js +4 -1
- package/lib/esm/resources/payment_gateways.d.ts +1 -0
- package/lib/esm/resources/payment_gateways.js +4 -1
- package/lib/esm/resources/payment_methods.d.ts +1 -0
- package/lib/esm/resources/payment_methods.js +4 -1
- package/lib/esm/resources/payment_options.d.ts +1 -0
- package/lib/esm/resources/payment_options.js +4 -1
- package/lib/esm/resources/paypal_gateways.d.ts +1 -0
- package/lib/esm/resources/paypal_gateways.js +4 -1
- package/lib/esm/resources/paypal_payments.d.ts +1 -0
- package/lib/esm/resources/paypal_payments.js +4 -1
- package/lib/esm/resources/percentage_discount_promotions.d.ts +1 -0
- package/lib/esm/resources/percentage_discount_promotions.js +4 -1
- package/lib/esm/resources/price_frequency_tiers.d.ts +1 -0
- package/lib/esm/resources/price_frequency_tiers.js +4 -1
- package/lib/esm/resources/price_lists.d.ts +1 -0
- package/lib/esm/resources/price_lists.js +4 -1
- package/lib/esm/resources/price_tiers.d.ts +1 -0
- package/lib/esm/resources/price_tiers.js +4 -1
- package/lib/esm/resources/price_volume_tiers.d.ts +1 -0
- package/lib/esm/resources/price_volume_tiers.js +4 -1
- package/lib/esm/resources/prices.d.ts +1 -0
- package/lib/esm/resources/prices.js +4 -1
- package/lib/esm/resources/promotion_rules.d.ts +1 -0
- package/lib/esm/resources/promotion_rules.js +4 -1
- package/lib/esm/resources/promotions.d.ts +1 -0
- package/lib/esm/resources/promotions.js +4 -1
- package/lib/esm/resources/recurring_order_copies.d.ts +1 -0
- package/lib/esm/resources/recurring_order_copies.js +4 -1
- package/lib/esm/resources/refunds.d.ts +1 -0
- package/lib/esm/resources/refunds.js +4 -1
- package/lib/esm/resources/reserved_stocks.d.ts +1 -0
- package/lib/esm/resources/reserved_stocks.js +4 -1
- package/lib/esm/resources/resource_errors.d.ts +1 -0
- package/lib/esm/resources/resource_errors.js +4 -1
- package/lib/esm/resources/return_line_items.d.ts +1 -0
- package/lib/esm/resources/return_line_items.js +4 -1
- package/lib/esm/resources/returns.d.ts +1 -0
- package/lib/esm/resources/returns.js +4 -1
- package/lib/esm/resources/satispay_gateways.d.ts +1 -0
- package/lib/esm/resources/satispay_gateways.js +4 -1
- package/lib/esm/resources/satispay_payments.d.ts +1 -0
- package/lib/esm/resources/satispay_payments.js +4 -1
- package/lib/esm/resources/shipments.d.ts +4 -0
- package/lib/esm/resources/shipments.js +8 -1
- package/lib/esm/resources/shipping_categories.d.ts +1 -0
- package/lib/esm/resources/shipping_categories.js +4 -1
- package/lib/esm/resources/shipping_method_tiers.d.ts +1 -0
- package/lib/esm/resources/shipping_method_tiers.js +4 -1
- package/lib/esm/resources/shipping_methods.d.ts +1 -0
- package/lib/esm/resources/shipping_methods.js +4 -1
- package/lib/esm/resources/shipping_weight_tiers.d.ts +1 -0
- package/lib/esm/resources/shipping_weight_tiers.js +4 -1
- package/lib/esm/resources/shipping_zones.d.ts +1 -0
- package/lib/esm/resources/shipping_zones.js +4 -1
- package/lib/esm/resources/sku_list_items.d.ts +1 -0
- package/lib/esm/resources/sku_list_items.js +4 -1
- package/lib/esm/resources/sku_list_promotion_rules.d.ts +1 -0
- package/lib/esm/resources/sku_list_promotion_rules.js +4 -1
- package/lib/esm/resources/sku_lists.d.ts +1 -0
- package/lib/esm/resources/sku_lists.js +4 -1
- package/lib/esm/resources/sku_options.d.ts +1 -0
- package/lib/esm/resources/sku_options.js +4 -1
- package/lib/esm/resources/skus.d.ts +1 -0
- package/lib/esm/resources/skus.js +4 -1
- package/lib/esm/resources/stock_items.d.ts +1 -0
- package/lib/esm/resources/stock_items.js +4 -1
- package/lib/esm/resources/stock_line_items.d.ts +1 -0
- package/lib/esm/resources/stock_line_items.js +4 -1
- package/lib/esm/resources/stock_locations.d.ts +1 -0
- package/lib/esm/resources/stock_locations.js +4 -1
- package/lib/esm/resources/stock_reservations.d.ts +1 -0
- package/lib/esm/resources/stock_reservations.js +4 -1
- package/lib/esm/resources/stock_transfers.d.ts +1 -0
- package/lib/esm/resources/stock_transfers.js +4 -1
- package/lib/esm/resources/stripe_gateways.d.ts +1 -0
- package/lib/esm/resources/stripe_gateways.js +4 -1
- package/lib/esm/resources/stripe_payments.d.ts +1 -0
- package/lib/esm/resources/stripe_payments.js +4 -1
- package/lib/esm/resources/subscription_models.d.ts +1 -0
- package/lib/esm/resources/subscription_models.js +4 -1
- package/lib/esm/resources/tags.d.ts +1 -0
- package/lib/esm/resources/tags.js +4 -1
- package/lib/esm/resources/tax_calculators.d.ts +1 -0
- package/lib/esm/resources/tax_calculators.js +4 -1
- package/lib/esm/resources/tax_categories.d.ts +1 -0
- package/lib/esm/resources/tax_categories.js +4 -1
- package/lib/esm/resources/tax_rules.d.ts +1 -0
- package/lib/esm/resources/tax_rules.js +4 -1
- package/lib/esm/resources/taxjar_accounts.d.ts +1 -0
- package/lib/esm/resources/taxjar_accounts.js +4 -1
- package/lib/esm/resources/transactions.d.ts +1 -0
- package/lib/esm/resources/transactions.js +4 -1
- package/lib/esm/resources/versions.d.ts +1 -0
- package/lib/esm/resources/versions.js +4 -1
- package/lib/esm/resources/voids.d.ts +1 -0
- package/lib/esm/resources/voids.js +4 -1
- package/lib/esm/resources/webhooks.d.ts +1 -0
- package/lib/esm/resources/webhooks.js +4 -1
- package/lib/esm/resources/wire_transfers.d.ts +1 -0
- package/lib/esm/resources/wire_transfers.js +4 -1
- package/lib/tsconfig.esm.tsbuildinfo +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
@@ -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 = "5.
|
5
|
+
declare const OPEN_API_SCHEMA_VERSION = "5.1.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 = "5.
|
12
|
+
readonly openApiSchemaVersion = "5.1.0";
|
13
13
|
addresses: api.Addresses;
|
14
14
|
adjustments: api.Adjustments;
|
15
15
|
adyen_gateways: api.AdyenGateways;
|
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 = '5.
|
48
|
+
const OPEN_API_SCHEMA_VERSION = '5.1.0';
|
49
49
|
exports.OPEN_API_SCHEMA_VERSION = OPEN_API_SCHEMA_VERSION;
|
50
50
|
class CommerceLayerClient {
|
51
51
|
// ##__CL_RESOURCES_DEF_STOP__##
|
package/lib/cjs/config.d.ts
CHANGED
package/lib/cjs/config.js
CHANGED
package/lib/cjs/jsonapi.js
CHANGED
@@ -5,6 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
6
|
exports.normalize = exports.denormalize = void 0;
|
7
7
|
const common_1 = require("./common");
|
8
|
+
const config_1 = __importDefault(require("./config"));
|
8
9
|
const debug_1 = __importDefault(require("./debug"));
|
9
10
|
const debug = (0, debug_1.default)('jsonapi');
|
10
11
|
// DENORMALIZATION
|
@@ -31,7 +32,7 @@ const findIncluded = (rel, included = []) => {
|
|
31
32
|
});
|
32
33
|
return inc || rel;
|
33
34
|
};
|
34
|
-
const denormalizeResource = (res, included) => {
|
35
|
+
const denormalizeResource = (res, included, chain = []) => {
|
35
36
|
debug('denormalize resource: %O, %o', res, included || {});
|
36
37
|
if (!res)
|
37
38
|
return res;
|
@@ -44,10 +45,14 @@ const denormalizeResource = (res, included) => {
|
|
44
45
|
Object.keys(res.relationships).forEach(key => {
|
45
46
|
const rel = res.relationships[key].data;
|
46
47
|
if (rel) {
|
47
|
-
if (
|
48
|
-
resource[key] = rel
|
49
|
-
else
|
50
|
-
|
48
|
+
if (chain.filter(r => (r.id === rel.id) && (r.type === rel.type)).length >= config_1.default.jsonapi.maxResourceIncluded)
|
49
|
+
resource[key] = rel;
|
50
|
+
else {
|
51
|
+
if (Array.isArray(rel))
|
52
|
+
resource[key] = rel.map((r) => denormalizeResource(findIncluded(r, included), included, [...chain, r]));
|
53
|
+
else
|
54
|
+
resource[key] = denormalizeResource(findIncluded(rel, included), included, [...chain, rel]);
|
55
|
+
}
|
51
56
|
}
|
52
57
|
else if (rel === null)
|
53
58
|
resource[key] = null;
|
package/lib/cjs/query.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import type { ResourceType } from "./resource";
|
2
|
-
type QueryFilter = Record<string, string | number | boolean | object
|
2
|
+
type QueryFilter = Record<string, string | number | boolean | object | Array<string | number>>;
|
3
3
|
interface QueryParamsRetrieve {
|
4
4
|
include?: string[];
|
5
5
|
fields?: string[] | Record<string, string[]>;
|
package/lib/cjs/query.js
CHANGED
@@ -5,7 +5,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
6
|
exports.isParamsList = exports.generateQueryStringParams = void 0;
|
7
7
|
const debug_1 = __importDefault(require("./debug"));
|
8
|
+
const error_1 = require("./error");
|
8
9
|
const debug = (0, debug_1.default)('query');
|
10
|
+
const arrayFilters = ['_any', '_all', '_in'];
|
11
|
+
const objectFilters = ['_jcont'];
|
9
12
|
const isParamsList = (params) => {
|
10
13
|
return params && (params.filters || params.pageNumber || params.pageSize || params.sort);
|
11
14
|
};
|
@@ -42,7 +45,21 @@ const generateQueryStringParams = (params, res) => {
|
|
42
45
|
// Filters
|
43
46
|
if (params.filters) {
|
44
47
|
Object.entries(params.filters).forEach(([p, v]) => {
|
45
|
-
|
48
|
+
const filter = p.substring(p.lastIndexOf('_'));
|
49
|
+
let val;
|
50
|
+
if (Array.isArray(v)) {
|
51
|
+
if (!arrayFilters.includes(filter))
|
52
|
+
throw new error_1.SdkError({ message: `Wrong ${filter} filter: Array value is supported only for the following filters: ${arrayFilters.join(', ')}`, type: error_1.ErrorType.REQUEST });
|
53
|
+
val = v.join(',');
|
54
|
+
}
|
55
|
+
else if (typeof v === 'object') {
|
56
|
+
if (!objectFilters.includes(filter))
|
57
|
+
throw new error_1.SdkError({ message: `Wrong ${filter} filter: Object value is supported only for the following filters: ${objectFilters.join(', ')}`, type: error_1.ErrorType.REQUEST });
|
58
|
+
val = JSON.stringify(v);
|
59
|
+
}
|
60
|
+
else
|
61
|
+
val = String(v);
|
62
|
+
qp[`filter[q][${p}]`] = val;
|
46
63
|
});
|
47
64
|
}
|
48
65
|
}
|
package/lib/cjs/resource.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { type ApiClientInitConfig } from './client';
|
1
|
+
import ApiClient, { type ApiClientInitConfig } from './client';
|
2
2
|
import type { QueryParamsRetrieve, QueryParamsList, QueryFilter, QueryParams } from './query';
|
3
3
|
import type { ResourceTypeLock } from './api';
|
4
4
|
import type { InterceptorManager } from './interceptor';
|
@@ -56,6 +56,7 @@ declare class ResourceAdapter {
|
|
56
56
|
get interceptors(): InterceptorManager;
|
57
57
|
private localConfig;
|
58
58
|
config(config: ResourcesConfig): ResourceAdapter;
|
59
|
+
get client(): Readonly<ApiClient>;
|
59
60
|
singleton<R extends Resource>(resource: ResourceType, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<R>;
|
60
61
|
retrieve<R extends Resource>(resource: ResourceId, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<R>;
|
61
62
|
list<R extends Resource>(resource: ResourceType, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<R>>;
|
@@ -69,8 +70,12 @@ declare abstract class ApiResourceBase<R extends Resource> {
|
|
69
70
|
protected readonly resources: ResourceAdapter;
|
70
71
|
constructor(adapter: ResourceAdapter);
|
71
72
|
abstract relationship(id: string | ResourceId | null): ResourceRel;
|
73
|
+
protected relationshipOneToOne<RR extends ResourceRel>(id: string | ResourceId | null): RR;
|
74
|
+
protected relationshipOneToMany<RR extends ResourceRel>(...ids: string[]): RR[];
|
72
75
|
abstract type(): ResourceTypeLock;
|
73
|
-
parse(resource: string
|
76
|
+
parse(resource: string, options?: {
|
77
|
+
ignoreSlug?: boolean;
|
78
|
+
}): R | R[];
|
74
79
|
update(resource: ResourceUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<R>;
|
75
80
|
}
|
76
81
|
declare abstract class ApiResource<R extends Resource> extends ApiResourceBase<R> {
|
package/lib/cjs/resource.js
CHANGED
@@ -57,11 +57,9 @@ class ResourceAdapter {
|
|
57
57
|
__classPrivateFieldGet(this, _ResourceAdapter_client, "f").config(config);
|
58
58
|
return this;
|
59
59
|
}
|
60
|
-
|
61
|
-
|
62
|
-
return this.#client
|
60
|
+
get client() {
|
61
|
+
return __classPrivateFieldGet(this, _ResourceAdapter_client, "f");
|
63
62
|
}
|
64
|
-
*/
|
65
63
|
async singleton(resource, params, options) {
|
66
64
|
debug('singleton: %o, %O, %O', resource, params || {}, options || {});
|
67
65
|
const queryParams = (0, query_1.generateQueryStringParams)(params, resource);
|
@@ -146,11 +144,26 @@ class ApiResourceBase {
|
|
146
144
|
debug('new resource instance: %s', this.type());
|
147
145
|
this.resources = adapter;
|
148
146
|
}
|
149
|
-
|
147
|
+
relationshipOneToOne(id) {
|
148
|
+
return (((id === null) || (typeof id === 'string')) ? { id, type: this.type() } : { id: id.id, type: this.type() });
|
149
|
+
}
|
150
|
+
relationshipOneToMany(...ids) {
|
151
|
+
return (((ids === null) || (ids.length === 0) || (ids[0] === null)) ? [{ id: null, type: this.type() }] : ids.map(id => { return { id, type: this.type() }; }));
|
152
|
+
}
|
153
|
+
parse(resource, options) {
|
150
154
|
try {
|
151
155
|
const res = JSON.parse(resource);
|
152
|
-
|
153
|
-
|
156
|
+
// Resource type always checked
|
157
|
+
const rtype = res.data?.type;
|
158
|
+
if (rtype !== this.type())
|
159
|
+
throw new error_1.SdkError({ message: `Invalid resource type [${rtype}]`, type: error_1.ErrorType.PARSE });
|
160
|
+
// Parse options
|
161
|
+
const { ignoreSlug } = options || {};
|
162
|
+
if (!ignoreSlug) {
|
163
|
+
const links = res.data.links.self;
|
164
|
+
if (!links || !String(links).match(`^${this.resources.client.baseUrl}/${this.type()}/*`))
|
165
|
+
throw new error_1.SdkError({ message: `Resource contains invalid links [${links}]`, type: error_1.ErrorType.PARSE });
|
166
|
+
}
|
154
167
|
return (0, jsonapi_1.denormalize)(res);
|
155
168
|
}
|
156
169
|
catch (error) {
|
@@ -97,6 +97,7 @@ declare class Addresses extends ApiResource<Address> {
|
|
97
97
|
versions(addressId: string | Address, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
98
98
|
isAddress(resource: any): resource is Address;
|
99
99
|
relationship(id: string | ResourceId | null): AddressRel;
|
100
|
+
relationshipToMany(...ids: string[]): AddressRel[];
|
100
101
|
type(): AddressType;
|
101
102
|
}
|
102
103
|
export default Addresses;
|
@@ -31,7 +31,10 @@ class Addresses extends resource_1.ApiResource {
|
|
31
31
|
return resource.type && (resource.type === Addresses.TYPE);
|
32
32
|
}
|
33
33
|
relationship(id) {
|
34
|
-
return (
|
34
|
+
return super.relationshipOneToOne(id);
|
35
|
+
}
|
36
|
+
relationshipToMany(...ids) {
|
37
|
+
return super.relationshipOneToMany(...ids);
|
35
38
|
}
|
36
39
|
type() {
|
37
40
|
return Addresses.TYPE;
|
@@ -36,6 +36,7 @@ declare class Adjustments extends ApiResource<Adjustment> {
|
|
36
36
|
versions(adjustmentId: string | Adjustment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
37
37
|
isAdjustment(resource: any): resource is Adjustment;
|
38
38
|
relationship(id: string | ResourceId | null): AdjustmentRel;
|
39
|
+
relationshipToMany(...ids: string[]): AdjustmentRel[];
|
39
40
|
type(): AdjustmentType;
|
40
41
|
}
|
41
42
|
export default Adjustments;
|
@@ -19,7 +19,10 @@ class Adjustments extends resource_1.ApiResource {
|
|
19
19
|
return resource.type && (resource.type === Adjustments.TYPE);
|
20
20
|
}
|
21
21
|
relationship(id) {
|
22
|
-
return (
|
22
|
+
return super.relationshipOneToOne(id);
|
23
|
+
}
|
24
|
+
relationshipToMany(...ids) {
|
25
|
+
return super.relationshipOneToMany(...ids);
|
23
26
|
}
|
24
27
|
type() {
|
25
28
|
return Adjustments.TYPE;
|
@@ -54,6 +54,7 @@ declare class AdyenGateways extends ApiResource<AdyenGateway> {
|
|
54
54
|
adyen_payments(adyenGatewayId: string | AdyenGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<AdyenPayment>>;
|
55
55
|
isAdyenGateway(resource: any): resource is AdyenGateway;
|
56
56
|
relationship(id: string | ResourceId | null): AdyenGatewayRel;
|
57
|
+
relationshipToMany(...ids: string[]): AdyenGatewayRel[];
|
57
58
|
type(): AdyenGatewayType;
|
58
59
|
}
|
59
60
|
export default AdyenGateways;
|
@@ -27,7 +27,10 @@ class AdyenGateways extends resource_1.ApiResource {
|
|
27
27
|
return resource.type && (resource.type === AdyenGateways.TYPE);
|
28
28
|
}
|
29
29
|
relationship(id) {
|
30
|
-
return (
|
30
|
+
return super.relationshipOneToOne(id);
|
31
|
+
}
|
32
|
+
relationshipToMany(...ids) {
|
33
|
+
return super.relationshipOneToMany(...ids);
|
31
34
|
}
|
32
35
|
type() {
|
33
36
|
return AdyenGateways.TYPE;
|
@@ -45,6 +45,7 @@ declare class AdyenPayments extends ApiResource<AdyenPayment> {
|
|
45
45
|
_details(id: string | AdyenPayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<AdyenPayment>;
|
46
46
|
isAdyenPayment(resource: any): resource is AdyenPayment;
|
47
47
|
relationship(id: string | ResourceId | null): AdyenPaymentRel;
|
48
|
+
relationshipToMany(...ids: string[]): AdyenPaymentRel[];
|
48
49
|
type(): AdyenPaymentType;
|
49
50
|
}
|
50
51
|
export default AdyenPayments;
|
@@ -30,7 +30,10 @@ class AdyenPayments extends resource_1.ApiResource {
|
|
30
30
|
return resource.type && (resource.type === AdyenPayments.TYPE);
|
31
31
|
}
|
32
32
|
relationship(id) {
|
33
|
-
return (
|
33
|
+
return super.relationshipOneToOne(id);
|
34
|
+
}
|
35
|
+
relationshipToMany(...ids) {
|
36
|
+
return super.relationshipOneToMany(...ids);
|
34
37
|
}
|
35
38
|
type() {
|
36
39
|
return AdyenPayments.TYPE;
|
@@ -16,6 +16,7 @@ declare class Applications extends ApiSingleton<Application> {
|
|
16
16
|
static readonly TYPE: ApplicationType;
|
17
17
|
isApplication(resource: any): resource is Application;
|
18
18
|
relationship(id: string | ResourceId | null): ApplicationRel;
|
19
|
+
relationshipToMany(...ids: string[]): ApplicationRel[];
|
19
20
|
type(): ApplicationType;
|
20
21
|
}
|
21
22
|
export default Applications;
|
@@ -6,7 +6,10 @@ class Applications extends resource_1.ApiSingleton {
|
|
6
6
|
return resource.type && (resource.type === Applications.TYPE);
|
7
7
|
}
|
8
8
|
relationship(id) {
|
9
|
-
return (
|
9
|
+
return super.relationshipOneToOne(id);
|
10
|
+
}
|
11
|
+
relationshipToMany(...ids) {
|
12
|
+
return super.relationshipOneToMany(...ids);
|
10
13
|
}
|
11
14
|
type() {
|
12
15
|
return Applications.TYPE;
|
@@ -151,6 +151,7 @@ declare class Attachments extends ApiResource<Attachment> {
|
|
151
151
|
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
152
152
|
isAttachment(resource: any): resource is Attachment;
|
153
153
|
relationship(id: string | ResourceId | null): AttachmentRel;
|
154
|
+
relationshipToMany(...ids: string[]): AttachmentRel[];
|
154
155
|
type(): AttachmentType;
|
155
156
|
}
|
156
157
|
export default Attachments;
|
@@ -15,7 +15,10 @@ class Attachments extends resource_1.ApiResource {
|
|
15
15
|
return resource.type && (resource.type === Attachments.TYPE);
|
16
16
|
}
|
17
17
|
relationship(id) {
|
18
|
-
return (
|
18
|
+
return super.relationshipOneToOne(id);
|
19
|
+
}
|
20
|
+
relationshipToMany(...ids) {
|
21
|
+
return super.relationshipOneToMany(...ids);
|
19
22
|
}
|
20
23
|
type() {
|
21
24
|
return Attachments.TYPE;
|
@@ -64,6 +64,7 @@ declare class Authorizations extends ApiResource<Authorization> {
|
|
64
64
|
_void(id: string | Authorization, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Authorization>;
|
65
65
|
isAuthorization(resource: any): resource is Authorization;
|
66
66
|
relationship(id: string | ResourceId | null): AuthorizationRel;
|
67
|
+
relationshipToMany(...ids: string[]): AuthorizationRel[];
|
67
68
|
type(): AuthorizationType;
|
68
69
|
}
|
69
70
|
export default Authorizations;
|
@@ -42,7 +42,10 @@ class Authorizations extends resource_1.ApiResource {
|
|
42
42
|
return resource.type && (resource.type === Authorizations.TYPE);
|
43
43
|
}
|
44
44
|
relationship(id) {
|
45
|
-
return (
|
45
|
+
return super.relationshipOneToOne(id);
|
46
|
+
}
|
47
|
+
relationshipToMany(...ids) {
|
48
|
+
return super.relationshipOneToMany(...ids);
|
46
49
|
}
|
47
50
|
type() {
|
48
51
|
return Authorizations.TYPE;
|
@@ -53,6 +53,7 @@ declare class AvalaraAccounts extends ApiResource<AvalaraAccount> {
|
|
53
53
|
tax_categories(avalaraAccountId: string | AvalaraAccount, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<TaxCategory>>;
|
54
54
|
isAvalaraAccount(resource: any): resource is AvalaraAccount;
|
55
55
|
relationship(id: string | ResourceId | null): AvalaraAccountRel;
|
56
|
+
relationshipToMany(...ids: string[]): AvalaraAccountRel[];
|
56
57
|
type(): AvalaraAccountType;
|
57
58
|
}
|
58
59
|
export default AvalaraAccounts;
|
@@ -31,7 +31,10 @@ class AvalaraAccounts extends resource_1.ApiResource {
|
|
31
31
|
return resource.type && (resource.type === AvalaraAccounts.TYPE);
|
32
32
|
}
|
33
33
|
relationship(id) {
|
34
|
-
return (
|
34
|
+
return super.relationshipOneToOne(id);
|
35
|
+
}
|
36
|
+
relationshipToMany(...ids) {
|
37
|
+
return super.relationshipOneToMany(...ids);
|
35
38
|
}
|
36
39
|
type() {
|
37
40
|
return AvalaraAccounts.TYPE;
|
@@ -42,6 +42,7 @@ declare class AxerveGateways extends ApiResource<AxerveGateway> {
|
|
42
42
|
axerve_payments(axerveGatewayId: string | AxerveGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<AxervePayment>>;
|
43
43
|
isAxerveGateway(resource: any): resource is AxerveGateway;
|
44
44
|
relationship(id: string | ResourceId | null): AxerveGatewayRel;
|
45
|
+
relationshipToMany(...ids: string[]): AxerveGatewayRel[];
|
45
46
|
type(): AxerveGatewayType;
|
46
47
|
}
|
47
48
|
export default AxerveGateways;
|
@@ -27,7 +27,10 @@ class AxerveGateways extends resource_1.ApiResource {
|
|
27
27
|
return resource.type && (resource.type === AxerveGateways.TYPE);
|
28
28
|
}
|
29
29
|
relationship(id) {
|
30
|
-
return (
|
30
|
+
return super.relationshipOneToOne(id);
|
31
|
+
}
|
32
|
+
relationshipToMany(...ids) {
|
33
|
+
return super.relationshipOneToMany(...ids);
|
31
34
|
}
|
32
35
|
type() {
|
33
36
|
return AxerveGateways.TYPE;
|
@@ -51,6 +51,7 @@ declare class AxervePayments extends ApiResource<AxervePayment> {
|
|
51
51
|
_update(id: string | AxervePayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<AxervePayment>;
|
52
52
|
isAxervePayment(resource: any): resource is AxervePayment;
|
53
53
|
relationship(id: string | ResourceId | null): AxervePaymentRel;
|
54
|
+
relationshipToMany(...ids: string[]): AxervePaymentRel[];
|
54
55
|
type(): AxervePaymentType;
|
55
56
|
}
|
56
57
|
export default AxervePayments;
|
@@ -30,7 +30,10 @@ class AxervePayments extends resource_1.ApiResource {
|
|
30
30
|
return resource.type && (resource.type === AxervePayments.TYPE);
|
31
31
|
}
|
32
32
|
relationship(id) {
|
33
|
-
return (
|
33
|
+
return super.relationshipOneToOne(id);
|
34
|
+
}
|
35
|
+
relationshipToMany(...ids) {
|
36
|
+
return super.relationshipOneToMany(...ids);
|
34
37
|
}
|
35
38
|
type() {
|
36
39
|
return AxervePayments.TYPE;
|
@@ -33,6 +33,7 @@ declare class BillingInfoValidationRules extends ApiResource<BillingInfoValidati
|
|
33
33
|
versions(billingInfoValidationRuleId: string | BillingInfoValidationRule, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
34
34
|
isBillingInfoValidationRule(resource: any): resource is BillingInfoValidationRule;
|
35
35
|
relationship(id: string | ResourceId | null): BillingInfoValidationRuleRel;
|
36
|
+
relationshipToMany(...ids: string[]): BillingInfoValidationRuleRel[];
|
36
37
|
type(): BillingInfoValidationRuleType;
|
37
38
|
}
|
38
39
|
export default BillingInfoValidationRules;
|
@@ -27,7 +27,10 @@ class BillingInfoValidationRules extends resource_1.ApiResource {
|
|
27
27
|
return resource.type && (resource.type === BillingInfoValidationRules.TYPE);
|
28
28
|
}
|
29
29
|
relationship(id) {
|
30
|
-
return (
|
30
|
+
return super.relationshipOneToOne(id);
|
31
|
+
}
|
32
|
+
relationshipToMany(...ids) {
|
33
|
+
return super.relationshipOneToMany(...ids);
|
31
34
|
}
|
32
35
|
type() {
|
33
36
|
return BillingInfoValidationRules.TYPE;
|
@@ -30,6 +30,7 @@ declare class BingGeocoders extends ApiResource<BingGeocoder> {
|
|
30
30
|
attachments(bingGeocoderId: string | BingGeocoder, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
31
31
|
isBingGeocoder(resource: any): resource is BingGeocoder;
|
32
32
|
relationship(id: string | ResourceId | null): BingGeocoderRel;
|
33
|
+
relationshipToMany(...ids: string[]): BingGeocoderRel[];
|
33
34
|
type(): BingGeocoderType;
|
34
35
|
}
|
35
36
|
export default BingGeocoders;
|
@@ -23,7 +23,10 @@ class BingGeocoders extends resource_1.ApiResource {
|
|
23
23
|
return resource.type && (resource.type === BingGeocoders.TYPE);
|
24
24
|
}
|
25
25
|
relationship(id) {
|
26
|
-
return (
|
26
|
+
return super.relationshipOneToOne(id);
|
27
|
+
}
|
28
|
+
relationshipToMany(...ids) {
|
29
|
+
return super.relationshipOneToMany(...ids);
|
27
30
|
}
|
28
31
|
type() {
|
29
32
|
return BingGeocoders.TYPE;
|
@@ -54,6 +54,7 @@ declare class BraintreeGateways extends ApiResource<BraintreeGateway> {
|
|
54
54
|
braintree_payments(braintreeGatewayId: string | BraintreeGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<BraintreePayment>>;
|
55
55
|
isBraintreeGateway(resource: any): resource is BraintreeGateway;
|
56
56
|
relationship(id: string | ResourceId | null): BraintreeGatewayRel;
|
57
|
+
relationshipToMany(...ids: string[]): BraintreeGatewayRel[];
|
57
58
|
type(): BraintreeGatewayType;
|
58
59
|
}
|
59
60
|
export default BraintreeGateways;
|
@@ -27,7 +27,10 @@ class BraintreeGateways extends resource_1.ApiResource {
|
|
27
27
|
return resource.type && (resource.type === BraintreeGateways.TYPE);
|
28
28
|
}
|
29
29
|
relationship(id) {
|
30
|
-
return (
|
30
|
+
return super.relationshipOneToOne(id);
|
31
|
+
}
|
32
|
+
relationshipToMany(...ids) {
|
33
|
+
return super.relationshipOneToMany(...ids);
|
31
34
|
}
|
32
35
|
type() {
|
33
36
|
return BraintreeGateways.TYPE;
|
@@ -46,6 +46,7 @@ declare class BraintreePayments extends ApiResource<BraintreePayment> {
|
|
46
46
|
versions(braintreePaymentId: string | BraintreePayment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
47
47
|
isBraintreePayment(resource: any): resource is BraintreePayment;
|
48
48
|
relationship(id: string | ResourceId | null): BraintreePaymentRel;
|
49
|
+
relationshipToMany(...ids: string[]): BraintreePaymentRel[];
|
49
50
|
type(): BraintreePaymentType;
|
50
51
|
}
|
51
52
|
export default BraintreePayments;
|
@@ -27,7 +27,10 @@ class BraintreePayments extends resource_1.ApiResource {
|
|
27
27
|
return resource.type && (resource.type === BraintreePayments.TYPE);
|
28
28
|
}
|
29
29
|
relationship(id) {
|
30
|
-
return (
|
30
|
+
return super.relationshipOneToOne(id);
|
31
|
+
}
|
32
|
+
relationshipToMany(...ids) {
|
33
|
+
return super.relationshipOneToMany(...ids);
|
31
34
|
}
|
32
35
|
type() {
|
33
36
|
return BraintreePayments.TYPE;
|
@@ -87,6 +87,7 @@ declare class Bundles extends ApiResource<Bundle> {
|
|
87
87
|
_compute_compare_at_amount(id: string | Bundle, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Bundle>;
|
88
88
|
isBundle(resource: any): resource is Bundle;
|
89
89
|
relationship(id: string | ResourceId | null): BundleRel;
|
90
|
+
relationshipToMany(...ids: string[]): BundleRel[];
|
90
91
|
type(): BundleType;
|
91
92
|
}
|
92
93
|
export default Bundles;
|
@@ -49,7 +49,10 @@ class Bundles extends resource_1.ApiResource {
|
|
49
49
|
return resource.type && (resource.type === Bundles.TYPE);
|
50
50
|
}
|
51
51
|
relationship(id) {
|
52
|
-
return (
|
52
|
+
return super.relationshipOneToOne(id);
|
53
|
+
}
|
54
|
+
relationshipToMany(...ids) {
|
55
|
+
return super.relationshipOneToMany(...ids);
|
53
56
|
}
|
54
57
|
type() {
|
55
58
|
return Bundles.TYPE;
|
@@ -131,6 +131,7 @@ declare class BuyXPayYPromotions extends ApiResource<BuyXPayYPromotion> {
|
|
131
131
|
_enable(id: string | BuyXPayYPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<BuyXPayYPromotion>;
|
132
132
|
isBuyXPayYPromotion(resource: any): resource is BuyXPayYPromotion;
|
133
133
|
relationship(id: string | ResourceId | null): BuyXPayYPromotionRel;
|
134
|
+
relationshipToMany(...ids: string[]): BuyXPayYPromotionRel[];
|
134
135
|
type(): BuyXPayYPromotionType;
|
135
136
|
}
|
136
137
|
export default BuyXPayYPromotions;
|
@@ -69,7 +69,10 @@ class BuyXPayYPromotions extends resource_1.ApiResource {
|
|
69
69
|
return resource.type && (resource.type === BuyXPayYPromotions.TYPE);
|
70
70
|
}
|
71
71
|
relationship(id) {
|
72
|
-
return (
|
72
|
+
return super.relationshipOneToOne(id);
|
73
|
+
}
|
74
|
+
relationshipToMany(...ids) {
|
75
|
+
return super.relationshipOneToMany(...ids);
|
73
76
|
}
|
74
77
|
type() {
|
75
78
|
return BuyXPayYPromotions.TYPE;
|
@@ -54,6 +54,7 @@ declare class Captures extends ApiResource<Capture> {
|
|
54
54
|
_refund_amount_cents(id: string | Capture, triggerValue: number, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Capture>;
|
55
55
|
isCapture(resource: any): resource is Capture;
|
56
56
|
relationship(id: string | ResourceId | null): CaptureRel;
|
57
|
+
relationshipToMany(...ids: string[]): CaptureRel[];
|
57
58
|
type(): CaptureType;
|
58
59
|
}
|
59
60
|
export default Captures;
|
@@ -39,7 +39,10 @@ class Captures extends resource_1.ApiResource {
|
|
39
39
|
return resource.type && (resource.type === Captures.TYPE);
|
40
40
|
}
|
41
41
|
relationship(id) {
|
42
|
-
return (
|
42
|
+
return super.relationshipOneToOne(id);
|
43
|
+
}
|
44
|
+
relationshipToMany(...ids) {
|
45
|
+
return super.relationshipOneToMany(...ids);
|
43
46
|
}
|
44
47
|
type() {
|
45
48
|
return Captures.TYPE;
|
@@ -24,6 +24,7 @@ declare class CarrierAccounts extends ApiResource<CarrierAccount> {
|
|
24
24
|
versions(carrierAccountId: string | CarrierAccount, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
25
25
|
isCarrierAccount(resource: any): resource is CarrierAccount;
|
26
26
|
relationship(id: string | ResourceId | null): CarrierAccountRel;
|
27
|
+
relationshipToMany(...ids: string[]): CarrierAccountRel[];
|
27
28
|
type(): CarrierAccountType;
|
28
29
|
}
|
29
30
|
export default CarrierAccounts;
|
@@ -18,7 +18,10 @@ class CarrierAccounts extends resource_1.ApiResource {
|
|
18
18
|
return resource.type && (resource.type === CarrierAccounts.TYPE);
|
19
19
|
}
|
20
20
|
relationship(id) {
|
21
|
-
return (
|
21
|
+
return super.relationshipOneToOne(id);
|
22
|
+
}
|
23
|
+
relationshipToMany(...ids) {
|
24
|
+
return super.relationshipOneToMany(...ids);
|
22
25
|
}
|
23
26
|
type() {
|
24
27
|
return CarrierAccounts.TYPE;
|
@@ -43,6 +43,7 @@ declare class CheckoutComGateways extends ApiResource<CheckoutComGateway> {
|
|
43
43
|
checkout_com_payments(checkoutComGatewayId: string | CheckoutComGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<CheckoutComPayment>>;
|
44
44
|
isCheckoutComGateway(resource: any): resource is CheckoutComGateway;
|
45
45
|
relationship(id: string | ResourceId | null): CheckoutComGatewayRel;
|
46
|
+
relationshipToMany(...ids: string[]): CheckoutComGatewayRel[];
|
46
47
|
type(): CheckoutComGatewayType;
|
47
48
|
}
|
48
49
|
export default CheckoutComGateways;
|
@@ -27,7 +27,10 @@ class CheckoutComGateways extends resource_1.ApiResource {
|
|
27
27
|
return resource.type && (resource.type === CheckoutComGateways.TYPE);
|
28
28
|
}
|
29
29
|
relationship(id) {
|
30
|
-
return (
|
30
|
+
return super.relationshipOneToOne(id);
|
31
|
+
}
|
32
|
+
relationshipToMany(...ids) {
|
33
|
+
return super.relationshipOneToMany(...ids);
|
31
34
|
}
|
32
35
|
type() {
|
33
36
|
return CheckoutComGateways.TYPE;
|