@commercelayer/sdk 4.2.0 → 4.3.0-beta.11
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/LICENSE +1 -1
- package/README.md +4 -0
- package/lib/cjs/api.d.ts +1 -1
- package/lib/cjs/client.d.ts +3 -3
- package/lib/cjs/commercelayer.d.ts +2 -2
- package/lib/cjs/commercelayer.js +1 -1
- package/lib/cjs/common.js +1 -1
- package/lib/cjs/jsonapi.d.ts +2 -2
- package/lib/cjs/jsonapi.js +1 -1
- package/lib/cjs/model.d.ts +1 -1
- package/lib/cjs/resource.d.ts +9 -4
- package/lib/cjs/resource.js +1 -1
- package/lib/cjs/resources/addresses.d.ts +6 -5
- package/lib/cjs/resources/addresses.js +1 -1
- package/lib/cjs/resources/adjustments.d.ts +4 -4
- package/lib/cjs/resources/adjustments.js +1 -1
- package/lib/cjs/resources/adyen_gateways.d.ts +7 -5
- package/lib/cjs/resources/adyen_gateways.js +1 -1
- package/lib/cjs/resources/adyen_payments.d.ts +7 -5
- package/lib/cjs/resources/adyen_payments.js +1 -1
- package/lib/cjs/resources/application.d.ts +4 -4
- package/lib/cjs/resources/application.js +1 -1
- package/lib/cjs/resources/attachments.d.ts +34 -34
- package/lib/cjs/resources/attachments.js +1 -1
- package/lib/cjs/resources/authorizations.d.ts +7 -4
- package/lib/cjs/resources/authorizations.js +1 -1
- package/lib/cjs/resources/avalara_accounts.d.ts +8 -5
- package/lib/cjs/resources/avalara_accounts.js +1 -1
- package/lib/cjs/resources/billing_info_validation_rules.d.ts +6 -5
- package/lib/cjs/resources/billing_info_validation_rules.js +1 -1
- package/lib/cjs/resources/bing_geocoders.d.ts +6 -4
- package/lib/cjs/resources/bing_geocoders.js +1 -1
- package/lib/cjs/resources/braintree_gateways.d.ts +7 -5
- package/lib/cjs/resources/braintree_gateways.js +1 -1
- package/lib/cjs/resources/braintree_payments.d.ts +7 -5
- package/lib/cjs/resources/braintree_payments.js +1 -1
- package/lib/cjs/resources/bundles.d.ts +15 -6
- package/lib/cjs/resources/bundles.js +1 -1
- package/lib/cjs/resources/captures.d.ts +7 -4
- package/lib/cjs/resources/captures.js +1 -1
- package/lib/cjs/resources/carrier_accounts.d.ts +6 -4
- package/lib/cjs/resources/carrier_accounts.js +1 -1
- package/lib/cjs/resources/checkout_com_gateways.d.ts +7 -5
- package/lib/cjs/resources/checkout_com_gateways.js +1 -1
- package/lib/cjs/resources/checkout_com_payments.d.ts +7 -5
- package/lib/cjs/resources/checkout_com_payments.js +1 -1
- package/lib/cjs/resources/coupon_codes_promotion_rules.d.ts +12 -11
- package/lib/cjs/resources/coupon_codes_promotion_rules.js +1 -1
- package/lib/cjs/resources/coupon_recipients.d.ts +7 -5
- package/lib/cjs/resources/coupon_recipients.js +1 -1
- package/lib/cjs/resources/coupons.d.ts +6 -5
- package/lib/cjs/resources/coupons.js +1 -1
- package/lib/cjs/resources/customer_addresses.d.ts +8 -6
- package/lib/cjs/resources/customer_addresses.js +1 -1
- package/lib/cjs/resources/customer_groups.d.ts +7 -4
- package/lib/cjs/resources/customer_groups.js +1 -1
- package/lib/cjs/resources/customer_password_resets.d.ts +5 -4
- package/lib/cjs/resources/customer_password_resets.js +1 -1
- package/lib/cjs/resources/customer_payment_sources.d.ts +14 -13
- package/lib/cjs/resources/customer_payment_sources.js +1 -1
- package/lib/cjs/resources/customer_subscriptions.d.ts +5 -4
- package/lib/cjs/resources/customer_subscriptions.js +1 -1
- package/lib/cjs/resources/customers.d.ts +13 -5
- package/lib/cjs/resources/customers.js +1 -1
- package/lib/cjs/resources/delivery_lead_times.d.ts +9 -6
- package/lib/cjs/resources/delivery_lead_times.js +1 -1
- package/lib/cjs/resources/event_callbacks.d.ts +5 -4
- package/lib/cjs/resources/event_callbacks.js +1 -1
- package/lib/cjs/resources/external_gateways.d.ts +6 -4
- package/lib/cjs/resources/external_gateways.js +1 -1
- package/lib/cjs/resources/external_payments.d.ts +8 -5
- package/lib/cjs/resources/external_payments.js +1 -1
- package/lib/cjs/resources/external_promotions.d.ts +17 -9
- package/lib/cjs/resources/external_promotions.js +1 -1
- package/lib/cjs/resources/external_tax_calculators.d.ts +8 -5
- package/lib/cjs/resources/external_tax_calculators.js +1 -1
- package/lib/cjs/resources/fixed_amount_promotions.d.ts +17 -9
- package/lib/cjs/resources/fixed_amount_promotions.js +1 -1
- package/lib/cjs/resources/fixed_price_promotions.d.ts +20 -10
- package/lib/cjs/resources/fixed_price_promotions.js +1 -1
- package/lib/cjs/resources/free_gift_promotions.d.ts +20 -10
- package/lib/cjs/resources/free_gift_promotions.js +1 -1
- package/lib/cjs/resources/free_shipping_promotions.d.ts +17 -9
- package/lib/cjs/resources/free_shipping_promotions.js +1 -1
- package/lib/cjs/resources/geocoders.d.ts +6 -4
- package/lib/cjs/resources/geocoders.js +1 -1
- package/lib/cjs/resources/gift_card_recipients.d.ts +7 -5
- package/lib/cjs/resources/gift_card_recipients.js +1 -1
- package/lib/cjs/resources/gift_cards.d.ts +10 -7
- package/lib/cjs/resources/gift_cards.js +1 -1
- package/lib/cjs/resources/google_geocoders.d.ts +6 -4
- package/lib/cjs/resources/google_geocoders.js +1 -1
- package/lib/cjs/resources/imports.d.ts +4 -4
- package/lib/cjs/resources/imports.js +1 -1
- package/lib/cjs/resources/in_stock_subscriptions.d.ts +10 -7
- package/lib/cjs/resources/in_stock_subscriptions.js +1 -1
- package/lib/cjs/resources/inventory_models.d.ts +7 -4
- package/lib/cjs/resources/inventory_models.js +1 -1
- package/lib/cjs/resources/inventory_return_locations.d.ts +8 -6
- package/lib/cjs/resources/inventory_return_locations.js +1 -1
- package/lib/cjs/resources/inventory_stock_locations.d.ts +8 -6
- package/lib/cjs/resources/inventory_stock_locations.js +1 -1
- package/lib/cjs/resources/klarna_gateways.d.ts +7 -5
- package/lib/cjs/resources/klarna_gateways.js +1 -1
- package/lib/cjs/resources/klarna_payments.d.ts +7 -5
- package/lib/cjs/resources/klarna_payments.js +1 -1
- package/lib/cjs/resources/line_item_options.d.ts +8 -6
- package/lib/cjs/resources/line_item_options.js +1 -1
- package/lib/cjs/resources/line_items.d.ts +19 -15
- package/lib/cjs/resources/line_items.js +1 -1
- package/lib/cjs/resources/manual_gateways.d.ts +5 -4
- package/lib/cjs/resources/manual_gateways.js +1 -1
- package/lib/cjs/resources/manual_tax_calculators.d.ts +10 -6
- package/lib/cjs/resources/manual_tax_calculators.js +1 -1
- package/lib/cjs/resources/markets.d.ts +15 -9
- package/lib/cjs/resources/markets.js +1 -1
- package/lib/cjs/resources/merchants.d.ts +7 -5
- package/lib/cjs/resources/merchants.js +1 -1
- package/lib/cjs/resources/order_amount_promotion_rules.d.ts +10 -10
- package/lib/cjs/resources/order_amount_promotion_rules.js +1 -1
- package/lib/cjs/resources/order_copies.d.ts +8 -5
- package/lib/cjs/resources/order_copies.js +1 -1
- package/lib/cjs/resources/order_subscriptions.d.ts +11 -6
- package/lib/cjs/resources/order_subscriptions.js +1 -1
- package/lib/cjs/resources/order_validation_rules.d.ts +5 -4
- package/lib/cjs/resources/order_validation_rules.js +1 -1
- package/lib/cjs/resources/orders.d.ts +32 -16
- package/lib/cjs/resources/orders.js +1 -1
- package/lib/cjs/resources/organization.d.ts +4 -4
- package/lib/cjs/resources/organization.js +1 -1
- package/lib/cjs/resources/packages.d.ts +8 -5
- package/lib/cjs/resources/packages.js +1 -1
- package/lib/cjs/resources/parcel_line_items.d.ts +8 -6
- package/lib/cjs/resources/parcel_line_items.js +1 -1
- package/lib/cjs/resources/parcels.d.ts +10 -6
- package/lib/cjs/resources/parcels.js +1 -1
- package/lib/cjs/resources/payment_gateways.d.ts +5 -4
- package/lib/cjs/resources/payment_gateways.js +1 -1
- package/lib/cjs/resources/payment_methods.d.ts +13 -7
- package/lib/cjs/resources/payment_methods.js +1 -1
- package/lib/cjs/resources/paypal_gateways.d.ts +6 -4
- package/lib/cjs/resources/paypal_gateways.js +1 -1
- package/lib/cjs/resources/paypal_payments.d.ts +7 -5
- package/lib/cjs/resources/paypal_payments.js +1 -1
- package/lib/cjs/resources/percentage_discount_promotions.d.ts +20 -10
- package/lib/cjs/resources/percentage_discount_promotions.js +1 -1
- package/lib/cjs/resources/price_lists.d.ts +6 -4
- package/lib/cjs/resources/price_lists.js +1 -1
- package/lib/cjs/resources/prices.d.ts +9 -6
- package/lib/cjs/resources/prices.js +1 -1
- package/lib/cjs/resources/promotion_rules.d.ts +4 -4
- package/lib/cjs/resources/promotion_rules.js +1 -1
- package/lib/cjs/resources/promotions.d.ts +10 -4
- package/lib/cjs/resources/promotions.js +1 -1
- package/lib/cjs/resources/refunds.d.ts +6 -4
- package/lib/cjs/resources/refunds.js +1 -1
- package/lib/cjs/resources/return_line_items.d.ts +8 -6
- package/lib/cjs/resources/return_line_items.js +1 -1
- package/lib/cjs/resources/returns.d.ts +13 -6
- package/lib/cjs/resources/returns.js +1 -1
- package/lib/cjs/resources/shipments.d.ts +18 -5
- package/lib/cjs/resources/shipments.js +1 -1
- package/lib/cjs/resources/shipping_categories.d.ts +6 -4
- package/lib/cjs/resources/shipping_categories.js +1 -1
- package/lib/cjs/resources/shipping_methods.d.ts +16 -9
- package/lib/cjs/resources/shipping_methods.js +1 -1
- package/lib/cjs/resources/shipping_zones.d.ts +5 -4
- package/lib/cjs/resources/shipping_zones.js +1 -1
- package/lib/cjs/resources/sku_list_items.d.ts +8 -6
- package/lib/cjs/resources/sku_list_items.js +1 -1
- package/lib/cjs/resources/sku_list_promotion_rules.d.ts +13 -11
- package/lib/cjs/resources/sku_list_promotion_rules.js +1 -1
- package/lib/cjs/resources/sku_lists.d.ts +7 -4
- package/lib/cjs/resources/sku_lists.js +1 -1
- package/lib/cjs/resources/sku_options.d.ts +10 -5
- package/lib/cjs/resources/sku_options.js +1 -1
- package/lib/cjs/resources/skus.d.ts +11 -5
- package/lib/cjs/resources/skus.js +1 -1
- package/lib/cjs/resources/stock_items.d.ts +9 -6
- package/lib/cjs/resources/stock_items.js +1 -1
- package/lib/cjs/resources/stock_line_items.d.ts +7 -4
- package/lib/cjs/resources/stock_line_items.js +1 -1
- package/lib/cjs/resources/stock_locations.d.ts +11 -5
- package/lib/cjs/resources/stock_locations.js +1 -1
- package/lib/cjs/resources/stock_transfers.d.ts +13 -8
- package/lib/cjs/resources/stock_transfers.js +1 -1
- package/lib/cjs/resources/stripe_gateways.d.ts +6 -4
- package/lib/cjs/resources/stripe_gateways.js +1 -1
- package/lib/cjs/resources/stripe_payments.d.ts +7 -5
- package/lib/cjs/resources/stripe_payments.js +1 -1
- package/lib/cjs/resources/tax_calculators.d.ts +7 -4
- package/lib/cjs/resources/tax_calculators.js +1 -1
- package/lib/cjs/resources/tax_categories.d.ts +11 -9
- package/lib/cjs/resources/tax_categories.js +1 -1
- package/lib/cjs/resources/tax_rules.d.ts +6 -5
- package/lib/cjs/resources/tax_rules.js +1 -1
- package/lib/cjs/resources/taxjar_accounts.d.ts +8 -5
- package/lib/cjs/resources/taxjar_accounts.js +1 -1
- package/lib/cjs/resources/transactions.d.ts +5 -4
- package/lib/cjs/resources/transactions.js +1 -1
- package/lib/cjs/resources/voids.d.ts +6 -4
- package/lib/cjs/resources/voids.js +1 -1
- package/lib/cjs/resources/webhooks.d.ts +5 -4
- package/lib/cjs/resources/webhooks.js +1 -1
- package/lib/cjs/resources/wire_transfers.d.ts +6 -5
- package/lib/cjs/resources/wire_transfers.js +1 -1
- package/lib/esm/api.d.ts +1 -1
- package/lib/esm/client.d.ts +3 -3
- package/lib/esm/commercelayer.d.ts +2 -2
- package/lib/esm/commercelayer.js +1 -1
- package/lib/esm/common.js +1 -1
- package/lib/esm/jsonapi.d.ts +2 -2
- package/lib/esm/jsonapi.js +1 -1
- package/lib/esm/model.d.ts +1 -1
- package/lib/esm/resource.d.ts +9 -4
- package/lib/esm/resource.js +1 -1
- package/lib/esm/resources/addresses.d.ts +6 -5
- package/lib/esm/resources/addresses.js +1 -1
- package/lib/esm/resources/adjustments.d.ts +4 -4
- package/lib/esm/resources/adjustments.js +1 -1
- package/lib/esm/resources/adyen_gateways.d.ts +7 -5
- package/lib/esm/resources/adyen_gateways.js +1 -1
- package/lib/esm/resources/adyen_payments.d.ts +7 -5
- package/lib/esm/resources/adyen_payments.js +1 -1
- package/lib/esm/resources/application.d.ts +4 -4
- package/lib/esm/resources/application.js +1 -1
- package/lib/esm/resources/attachments.d.ts +34 -34
- package/lib/esm/resources/attachments.js +1 -1
- package/lib/esm/resources/authorizations.d.ts +7 -4
- package/lib/esm/resources/authorizations.js +1 -1
- package/lib/esm/resources/avalara_accounts.d.ts +8 -5
- package/lib/esm/resources/avalara_accounts.js +1 -1
- package/lib/esm/resources/billing_info_validation_rules.d.ts +6 -5
- package/lib/esm/resources/billing_info_validation_rules.js +1 -1
- package/lib/esm/resources/bing_geocoders.d.ts +6 -4
- package/lib/esm/resources/bing_geocoders.js +1 -1
- package/lib/esm/resources/braintree_gateways.d.ts +7 -5
- package/lib/esm/resources/braintree_gateways.js +1 -1
- package/lib/esm/resources/braintree_payments.d.ts +7 -5
- package/lib/esm/resources/braintree_payments.js +1 -1
- package/lib/esm/resources/bundles.d.ts +15 -6
- package/lib/esm/resources/bundles.js +1 -1
- package/lib/esm/resources/captures.d.ts +7 -4
- package/lib/esm/resources/captures.js +1 -1
- package/lib/esm/resources/carrier_accounts.d.ts +6 -4
- package/lib/esm/resources/carrier_accounts.js +1 -1
- package/lib/esm/resources/checkout_com_gateways.d.ts +7 -5
- package/lib/esm/resources/checkout_com_gateways.js +1 -1
- package/lib/esm/resources/checkout_com_payments.d.ts +7 -5
- package/lib/esm/resources/checkout_com_payments.js +1 -1
- package/lib/esm/resources/coupon_codes_promotion_rules.d.ts +12 -11
- package/lib/esm/resources/coupon_codes_promotion_rules.js +1 -1
- package/lib/esm/resources/coupon_recipients.d.ts +7 -5
- package/lib/esm/resources/coupon_recipients.js +1 -1
- package/lib/esm/resources/coupons.d.ts +6 -5
- package/lib/esm/resources/coupons.js +1 -1
- package/lib/esm/resources/customer_addresses.d.ts +8 -6
- package/lib/esm/resources/customer_addresses.js +1 -1
- package/lib/esm/resources/customer_groups.d.ts +7 -4
- package/lib/esm/resources/customer_groups.js +1 -1
- package/lib/esm/resources/customer_password_resets.d.ts +5 -4
- package/lib/esm/resources/customer_password_resets.js +1 -1
- package/lib/esm/resources/customer_payment_sources.d.ts +14 -13
- package/lib/esm/resources/customer_payment_sources.js +1 -1
- package/lib/esm/resources/customer_subscriptions.d.ts +5 -4
- package/lib/esm/resources/customer_subscriptions.js +1 -1
- package/lib/esm/resources/customers.d.ts +13 -5
- package/lib/esm/resources/customers.js +1 -1
- package/lib/esm/resources/delivery_lead_times.d.ts +9 -6
- package/lib/esm/resources/delivery_lead_times.js +1 -1
- package/lib/esm/resources/event_callbacks.d.ts +5 -4
- package/lib/esm/resources/event_callbacks.js +1 -1
- package/lib/esm/resources/external_gateways.d.ts +6 -4
- package/lib/esm/resources/external_gateways.js +1 -1
- package/lib/esm/resources/external_payments.d.ts +8 -5
- package/lib/esm/resources/external_payments.js +1 -1
- package/lib/esm/resources/external_promotions.d.ts +17 -9
- package/lib/esm/resources/external_promotions.js +1 -1
- package/lib/esm/resources/external_tax_calculators.d.ts +8 -5
- package/lib/esm/resources/external_tax_calculators.js +1 -1
- package/lib/esm/resources/fixed_amount_promotions.d.ts +17 -9
- package/lib/esm/resources/fixed_amount_promotions.js +1 -1
- package/lib/esm/resources/fixed_price_promotions.d.ts +20 -10
- package/lib/esm/resources/fixed_price_promotions.js +1 -1
- package/lib/esm/resources/free_gift_promotions.d.ts +20 -10
- package/lib/esm/resources/free_gift_promotions.js +1 -1
- package/lib/esm/resources/free_shipping_promotions.d.ts +17 -9
- package/lib/esm/resources/free_shipping_promotions.js +1 -1
- package/lib/esm/resources/geocoders.d.ts +6 -4
- package/lib/esm/resources/geocoders.js +1 -1
- package/lib/esm/resources/gift_card_recipients.d.ts +7 -5
- package/lib/esm/resources/gift_card_recipients.js +1 -1
- package/lib/esm/resources/gift_cards.d.ts +10 -7
- package/lib/esm/resources/gift_cards.js +1 -1
- package/lib/esm/resources/google_geocoders.d.ts +6 -4
- package/lib/esm/resources/google_geocoders.js +1 -1
- package/lib/esm/resources/imports.d.ts +4 -4
- package/lib/esm/resources/imports.js +1 -1
- package/lib/esm/resources/in_stock_subscriptions.d.ts +10 -7
- package/lib/esm/resources/in_stock_subscriptions.js +1 -1
- package/lib/esm/resources/inventory_models.d.ts +7 -4
- package/lib/esm/resources/inventory_models.js +1 -1
- package/lib/esm/resources/inventory_return_locations.d.ts +8 -6
- package/lib/esm/resources/inventory_return_locations.js +1 -1
- package/lib/esm/resources/inventory_stock_locations.d.ts +8 -6
- package/lib/esm/resources/inventory_stock_locations.js +1 -1
- package/lib/esm/resources/klarna_gateways.d.ts +7 -5
- package/lib/esm/resources/klarna_gateways.js +1 -1
- package/lib/esm/resources/klarna_payments.d.ts +7 -5
- package/lib/esm/resources/klarna_payments.js +1 -1
- package/lib/esm/resources/line_item_options.d.ts +8 -6
- package/lib/esm/resources/line_item_options.js +1 -1
- package/lib/esm/resources/line_items.d.ts +19 -15
- package/lib/esm/resources/line_items.js +1 -1
- package/lib/esm/resources/manual_gateways.d.ts +5 -4
- package/lib/esm/resources/manual_gateways.js +1 -1
- package/lib/esm/resources/manual_tax_calculators.d.ts +10 -6
- package/lib/esm/resources/manual_tax_calculators.js +1 -1
- package/lib/esm/resources/markets.d.ts +15 -9
- package/lib/esm/resources/markets.js +1 -1
- package/lib/esm/resources/merchants.d.ts +7 -5
- package/lib/esm/resources/merchants.js +1 -1
- package/lib/esm/resources/order_amount_promotion_rules.d.ts +10 -10
- package/lib/esm/resources/order_amount_promotion_rules.js +1 -1
- package/lib/esm/resources/order_copies.d.ts +8 -5
- package/lib/esm/resources/order_copies.js +1 -1
- package/lib/esm/resources/order_subscriptions.d.ts +11 -6
- package/lib/esm/resources/order_subscriptions.js +1 -1
- package/lib/esm/resources/order_validation_rules.d.ts +5 -4
- package/lib/esm/resources/order_validation_rules.js +1 -1
- package/lib/esm/resources/orders.d.ts +32 -16
- package/lib/esm/resources/orders.js +1 -1
- package/lib/esm/resources/organization.d.ts +4 -4
- package/lib/esm/resources/organization.js +1 -1
- package/lib/esm/resources/packages.d.ts +8 -5
- package/lib/esm/resources/packages.js +1 -1
- package/lib/esm/resources/parcel_line_items.d.ts +8 -6
- package/lib/esm/resources/parcel_line_items.js +1 -1
- package/lib/esm/resources/parcels.d.ts +10 -6
- package/lib/esm/resources/parcels.js +1 -1
- package/lib/esm/resources/payment_gateways.d.ts +5 -4
- package/lib/esm/resources/payment_gateways.js +1 -1
- package/lib/esm/resources/payment_methods.d.ts +13 -7
- package/lib/esm/resources/payment_methods.js +1 -1
- package/lib/esm/resources/paypal_gateways.d.ts +6 -4
- package/lib/esm/resources/paypal_gateways.js +1 -1
- package/lib/esm/resources/paypal_payments.d.ts +7 -5
- package/lib/esm/resources/paypal_payments.js +1 -1
- package/lib/esm/resources/percentage_discount_promotions.d.ts +20 -10
- package/lib/esm/resources/percentage_discount_promotions.js +1 -1
- package/lib/esm/resources/price_lists.d.ts +6 -4
- package/lib/esm/resources/price_lists.js +1 -1
- package/lib/esm/resources/prices.d.ts +9 -6
- package/lib/esm/resources/prices.js +1 -1
- package/lib/esm/resources/promotion_rules.d.ts +4 -4
- package/lib/esm/resources/promotion_rules.js +1 -1
- package/lib/esm/resources/promotions.d.ts +10 -4
- package/lib/esm/resources/promotions.js +1 -1
- package/lib/esm/resources/refunds.d.ts +6 -4
- package/lib/esm/resources/refunds.js +1 -1
- package/lib/esm/resources/return_line_items.d.ts +8 -6
- package/lib/esm/resources/return_line_items.js +1 -1
- package/lib/esm/resources/returns.d.ts +13 -6
- package/lib/esm/resources/returns.js +1 -1
- package/lib/esm/resources/shipments.d.ts +18 -5
- package/lib/esm/resources/shipments.js +1 -1
- package/lib/esm/resources/shipping_categories.d.ts +6 -4
- package/lib/esm/resources/shipping_categories.js +1 -1
- package/lib/esm/resources/shipping_methods.d.ts +16 -9
- package/lib/esm/resources/shipping_methods.js +1 -1
- package/lib/esm/resources/shipping_zones.d.ts +5 -4
- package/lib/esm/resources/shipping_zones.js +1 -1
- package/lib/esm/resources/sku_list_items.d.ts +8 -6
- package/lib/esm/resources/sku_list_items.js +1 -1
- package/lib/esm/resources/sku_list_promotion_rules.d.ts +13 -11
- package/lib/esm/resources/sku_list_promotion_rules.js +1 -1
- package/lib/esm/resources/sku_lists.d.ts +7 -4
- package/lib/esm/resources/sku_lists.js +1 -1
- package/lib/esm/resources/sku_options.d.ts +10 -5
- package/lib/esm/resources/sku_options.js +1 -1
- package/lib/esm/resources/skus.d.ts +11 -5
- package/lib/esm/resources/skus.js +1 -1
- package/lib/esm/resources/stock_items.d.ts +9 -6
- package/lib/esm/resources/stock_items.js +1 -1
- package/lib/esm/resources/stock_line_items.d.ts +7 -4
- package/lib/esm/resources/stock_line_items.js +1 -1
- package/lib/esm/resources/stock_locations.d.ts +11 -5
- package/lib/esm/resources/stock_locations.js +1 -1
- package/lib/esm/resources/stock_transfers.d.ts +13 -8
- package/lib/esm/resources/stock_transfers.js +1 -1
- package/lib/esm/resources/stripe_gateways.d.ts +6 -4
- package/lib/esm/resources/stripe_gateways.js +1 -1
- package/lib/esm/resources/stripe_payments.d.ts +7 -5
- package/lib/esm/resources/stripe_payments.js +1 -1
- package/lib/esm/resources/tax_calculators.d.ts +7 -4
- package/lib/esm/resources/tax_calculators.js +1 -1
- package/lib/esm/resources/tax_categories.d.ts +11 -9
- package/lib/esm/resources/tax_categories.js +1 -1
- package/lib/esm/resources/tax_rules.d.ts +6 -5
- package/lib/esm/resources/tax_rules.js +1 -1
- package/lib/esm/resources/taxjar_accounts.d.ts +8 -5
- package/lib/esm/resources/taxjar_accounts.js +1 -1
- package/lib/esm/resources/transactions.d.ts +5 -4
- package/lib/esm/resources/transactions.js +1 -1
- package/lib/esm/resources/voids.d.ts +6 -4
- package/lib/esm/resources/voids.js +1 -1
- package/lib/esm/resources/webhooks.d.ts +5 -4
- package/lib/esm/resources/webhooks.js +1 -1
- package/lib/esm/resources/wire_transfers.d.ts +6 -5
- package/lib/esm/resources/wire_transfers.js +1 -1
- package/lib/tsconfig.esm.tsbuildinfo +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +13 -13
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class Skus extends resource_1.ApiResource{async list(e,
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class Skus extends resource_1.ApiResource{async list(e,s){return this.resources.list({type:Skus.TYPE},e,s)}async create(e,s,t){return this.resources.create(Object.assign(Object.assign({},e),{type:Skus.TYPE}),s,t)}async retrieve(e,s,t){return this.resources.retrieve({type:Skus.TYPE,id:e},s,t)}async update(e,s,t){return this.resources.update(Object.assign(Object.assign({},e),{type:Skus.TYPE}),s,t)}async delete(e,s){await this.resources.delete({type:Skus.TYPE,id:e},s)}async shipping_category(e,s,t){return this.resources.fetch({type:"shipping_categories"},`skus/${e}/shipping_category`,s,t)}async prices(e,s,t){return this.resources.fetch({type:"prices"},`skus/${e}/prices`,s,t)}async stock_items(e,s,t){return this.resources.fetch({type:"stock_items"},`skus/${e}/stock_items`,s,t)}async delivery_lead_times(e,s,t){return this.resources.fetch({type:"delivery_lead_times"},`skus/${e}/delivery_lead_times`,s,t)}async sku_options(e,s,t){return this.resources.fetch({type:"sku_options"},`skus/${e}/sku_options`,s,t)}async attachments(e,s,t){return this.resources.fetch({type:"attachments"},`skus/${e}/attachments`,s,t)}isSku(e){return e.type&&e.type===Skus.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:Skus.TYPE}:{id:e.id,type:Skus.TYPE}}type(){return Skus.TYPE}}Skus.TYPE="skus",exports.default=Skus;
|
@@ -1,15 +1,15 @@
|
|
1
|
-
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
2
|
-
import {
|
1
|
+
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
2
|
+
import { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
3
|
import { StockLocation } from './stock_locations';
|
4
4
|
import { Sku } from './skus';
|
5
5
|
import { Attachment } from './attachments';
|
6
|
-
declare type StockItemRel =
|
6
|
+
declare type StockItemRel = ResourceRel & {
|
7
7
|
type: typeof StockItems.TYPE;
|
8
8
|
};
|
9
|
-
declare type StockLocationRel =
|
9
|
+
declare type StockLocationRel = ResourceRel & {
|
10
10
|
type: 'stock_locations';
|
11
11
|
};
|
12
|
-
declare type SkuRel =
|
12
|
+
declare type SkuRel = ResourceRel & {
|
13
13
|
type: 'skus';
|
14
14
|
};
|
15
15
|
interface StockItem extends Resource {
|
@@ -38,8 +38,11 @@ declare class StockItems extends ApiResource {
|
|
38
38
|
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockItem>;
|
39
39
|
update(resource: StockItemUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockItem>;
|
40
40
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
41
|
+
stock_location(stockItemId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockLocation>;
|
42
|
+
sku(stockItemId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Sku>;
|
43
|
+
attachments(stockItemId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
41
44
|
isStockItem(resource: any): resource is StockItem;
|
42
|
-
relationship(id: string | ResourceId): StockItemRel;
|
45
|
+
relationship(id: string | ResourceId | null): StockItemRel;
|
43
46
|
type(): string;
|
44
47
|
}
|
45
48
|
export default StockItems;
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class StockItems extends resource_1.ApiResource{async list(e,
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class StockItems extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:StockItems.TYPE},e,t)}async create(e,t,s){return this.resources.create(Object.assign(Object.assign({},e),{type:StockItems.TYPE}),t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:StockItems.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update(Object.assign(Object.assign({},e),{type:StockItems.TYPE}),t,s)}async delete(e,t){await this.resources.delete({type:StockItems.TYPE,id:e},t)}async stock_location(e,t,s){return this.resources.fetch({type:"stock_locations"},`stock_items/${e}/stock_location`,t,s)}async sku(e,t,s){return this.resources.fetch({type:"skus"},`stock_items/${e}/sku`,t,s)}async attachments(e,t,s){return this.resources.fetch({type:"attachments"},`stock_items/${e}/attachments`,t,s)}isStockItem(e){return e.type&&e.type===StockItems.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:StockItems.TYPE}:{id:e.id,type:StockItems.TYPE}}type(){return StockItems.TYPE}}StockItems.TYPE="stock_items",exports.default=StockItems;
|
@@ -1,9 +1,9 @@
|
|
1
|
-
import { ApiResource, Resource, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
2
|
-
import {
|
1
|
+
import { ApiResource, Resource, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
2
|
+
import { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
3
|
import { Shipment } from './shipments';
|
4
4
|
import { LineItem } from './line_items';
|
5
5
|
import { StockItem } from './stock_items';
|
6
|
-
declare type StockLineItemRel =
|
6
|
+
declare type StockLineItemRel = ResourceRel & {
|
7
7
|
type: typeof StockLineItems.TYPE;
|
8
8
|
};
|
9
9
|
interface StockLineItem extends Resource {
|
@@ -18,8 +18,11 @@ declare class StockLineItems extends ApiResource {
|
|
18
18
|
static readonly TYPE: 'stock_line_items';
|
19
19
|
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<StockLineItem>>;
|
20
20
|
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockLineItem>;
|
21
|
+
shipment(stockLineItemId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Shipment>;
|
22
|
+
line_item(stockLineItemId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<LineItem>;
|
23
|
+
stock_item(stockLineItemId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockItem>;
|
21
24
|
isStockLineItem(resource: any): resource is StockLineItem;
|
22
|
-
relationship(id: string | ResourceId): StockLineItemRel;
|
25
|
+
relationship(id: string | ResourceId | null): StockLineItemRel;
|
23
26
|
type(): string;
|
24
27
|
}
|
25
28
|
export default StockLineItems;
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class StockLineItems extends resource_1.ApiResource{async list(e,
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class StockLineItems extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:StockLineItems.TYPE},e,t)}async retrieve(e,t,s){return this.resources.retrieve({type:StockLineItems.TYPE,id:e},t,s)}async shipment(e,t,s){return this.resources.fetch({type:"shipments"},`stock_line_items/${e}/shipment`,t,s)}async line_item(e,t,s){return this.resources.fetch({type:"line_items"},`stock_line_items/${e}/line_item`,t,s)}async stock_item(e,t,s){return this.resources.fetch({type:"stock_items"},`stock_line_items/${e}/stock_item`,t,s)}isStockLineItem(e){return e.type&&e.type===StockLineItems.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:StockLineItems.TYPE}:{id:e.id,type:StockLineItems.TYPE}}type(){return StockLineItems.TYPE}}StockLineItems.TYPE="stock_line_items",exports.default=StockLineItems;
|
@@ -1,15 +1,15 @@
|
|
1
|
-
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
2
|
-
import {
|
1
|
+
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
2
|
+
import { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
3
|
import { Address } from './addresses';
|
4
4
|
import { InventoryStockLocation } from './inventory_stock_locations';
|
5
5
|
import { InventoryReturnLocation } from './inventory_return_locations';
|
6
6
|
import { StockItem } from './stock_items';
|
7
7
|
import { StockTransfer } from './stock_transfers';
|
8
8
|
import { Attachment } from './attachments';
|
9
|
-
declare type StockLocationRel =
|
9
|
+
declare type StockLocationRel = ResourceRel & {
|
10
10
|
type: typeof StockLocations.TYPE;
|
11
11
|
};
|
12
|
-
declare type AddressRel =
|
12
|
+
declare type AddressRel = ResourceRel & {
|
13
13
|
type: 'addresses';
|
14
14
|
};
|
15
15
|
interface StockLocation extends Resource {
|
@@ -43,8 +43,14 @@ declare class StockLocations extends ApiResource {
|
|
43
43
|
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockLocation>;
|
44
44
|
update(resource: StockLocationUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockLocation>;
|
45
45
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
46
|
+
address(stockLocationId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Address>;
|
47
|
+
inventory_stock_locations(stockLocationId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<InventoryStockLocation>>;
|
48
|
+
inventory_return_locations(stockLocationId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<InventoryReturnLocation>>;
|
49
|
+
stock_items(stockLocationId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<StockItem>>;
|
50
|
+
stock_transfers(stockLocationId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<StockTransfer>>;
|
51
|
+
attachments(stockLocationId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
46
52
|
isStockLocation(resource: any): resource is StockLocation;
|
47
|
-
relationship(id: string | ResourceId): StockLocationRel;
|
53
|
+
relationship(id: string | ResourceId | null): StockLocationRel;
|
48
54
|
type(): string;
|
49
55
|
}
|
50
56
|
export default StockLocations;
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class StockLocations extends resource_1.ApiResource{async list(e,
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class StockLocations extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:StockLocations.TYPE},e,t)}async create(e,t,s){return this.resources.create(Object.assign(Object.assign({},e),{type:StockLocations.TYPE}),t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:StockLocations.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update(Object.assign(Object.assign({},e),{type:StockLocations.TYPE}),t,s)}async delete(e,t){await this.resources.delete({type:StockLocations.TYPE,id:e},t)}async address(e,t,s){return this.resources.fetch({type:"addresses"},`stock_locations/${e}/address`,t,s)}async inventory_stock_locations(e,t,s){return this.resources.fetch({type:"inventory_stock_locations"},`stock_locations/${e}/inventory_stock_locations`,t,s)}async inventory_return_locations(e,t,s){return this.resources.fetch({type:"inventory_return_locations"},`stock_locations/${e}/inventory_return_locations`,t,s)}async stock_items(e,t,s){return this.resources.fetch({type:"stock_items"},`stock_locations/${e}/stock_items`,t,s)}async stock_transfers(e,t,s){return this.resources.fetch({type:"stock_transfers"},`stock_locations/${e}/stock_transfers`,t,s)}async attachments(e,t,s){return this.resources.fetch({type:"attachments"},`stock_locations/${e}/attachments`,t,s)}isStockLocation(e){return e.type&&e.type===StockLocations.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:StockLocations.TYPE}:{id:e.id,type:StockLocations.TYPE}}type(){return StockLocations.TYPE}}StockLocations.TYPE="stock_locations",exports.default=StockLocations;
|
@@ -1,22 +1,22 @@
|
|
1
|
-
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
2
|
-
import {
|
1
|
+
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
2
|
+
import { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
3
|
import { Sku } from './skus';
|
4
4
|
import { StockLocation } from './stock_locations';
|
5
5
|
import { Shipment } from './shipments';
|
6
6
|
import { LineItem } from './line_items';
|
7
|
-
declare type StockTransferRel =
|
7
|
+
declare type StockTransferRel = ResourceRel & {
|
8
8
|
type: typeof StockTransfers.TYPE;
|
9
9
|
};
|
10
|
-
declare type SkuRel =
|
10
|
+
declare type SkuRel = ResourceRel & {
|
11
11
|
type: 'skus';
|
12
12
|
};
|
13
|
-
declare type StockLocationRel =
|
13
|
+
declare type StockLocationRel = ResourceRel & {
|
14
14
|
type: 'stock_locations';
|
15
15
|
};
|
16
|
-
declare type ShipmentRel =
|
16
|
+
declare type ShipmentRel = ResourceRel & {
|
17
17
|
type: 'shipments';
|
18
18
|
};
|
19
|
-
declare type LineItemRel =
|
19
|
+
declare type LineItemRel = ResourceRel & {
|
20
20
|
type: 'line_items';
|
21
21
|
};
|
22
22
|
interface StockTransfer extends Resource {
|
@@ -58,8 +58,13 @@ declare class StockTransfers extends ApiResource {
|
|
58
58
|
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockTransfer>;
|
59
59
|
update(resource: StockTransferUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockTransfer>;
|
60
60
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
61
|
+
sku(stockTransferId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Sku>;
|
62
|
+
origin_stock_location(stockTransferId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockLocation>;
|
63
|
+
destination_stock_location(stockTransferId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockLocation>;
|
64
|
+
shipment(stockTransferId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Shipment>;
|
65
|
+
line_item(stockTransferId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<LineItem>;
|
61
66
|
isStockTransfer(resource: any): resource is StockTransfer;
|
62
|
-
relationship(id: string | ResourceId): StockTransferRel;
|
67
|
+
relationship(id: string | ResourceId | null): StockTransferRel;
|
63
68
|
type(): string;
|
64
69
|
}
|
65
70
|
export default StockTransfers;
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class StockTransfers extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:StockTransfers.TYPE},e,t)}async create(e,t,s){return this.resources.create(Object.assign(Object.assign({},e),{type:StockTransfers.TYPE}),t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:StockTransfers.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update(Object.assign(Object.assign({},e),{type:StockTransfers.TYPE}),t,s)}async delete(e,t){await this.resources.delete({type:StockTransfers.TYPE,id:e},t)}isStockTransfer(e){return e.type&&e.type===StockTransfers.TYPE}relationship(e){return typeof e=="string"?{id:e,type:StockTransfers.TYPE}:{id:e.id,type:StockTransfers.TYPE}}type(){return StockTransfers.TYPE}}StockTransfers.TYPE="stock_transfers",exports.default=StockTransfers;
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class StockTransfers extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:StockTransfers.TYPE},e,t)}async create(e,t,s){return this.resources.create(Object.assign(Object.assign({},e),{type:StockTransfers.TYPE}),t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:StockTransfers.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update(Object.assign(Object.assign({},e),{type:StockTransfers.TYPE}),t,s)}async delete(e,t){await this.resources.delete({type:StockTransfers.TYPE,id:e},t)}async sku(e,t,s){return this.resources.fetch({type:"skus"},`stock_transfers/${e}/sku`,t,s)}async origin_stock_location(e,t,s){return this.resources.fetch({type:"stock_locations"},`stock_transfers/${e}/origin_stock_location`,t,s)}async destination_stock_location(e,t,s){return this.resources.fetch({type:"stock_locations"},`stock_transfers/${e}/destination_stock_location`,t,s)}async shipment(e,t,s){return this.resources.fetch({type:"shipments"},`stock_transfers/${e}/shipment`,t,s)}async line_item(e,t,s){return this.resources.fetch({type:"line_items"},`stock_transfers/${e}/line_item`,t,s)}isStockTransfer(e){return e.type&&e.type===StockTransfers.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:StockTransfers.TYPE}:{id:e.id,type:StockTransfers.TYPE}}type(){return StockTransfers.TYPE}}StockTransfers.TYPE="stock_transfers",exports.default=StockTransfers;
|
@@ -1,8 +1,8 @@
|
|
1
|
-
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
2
|
-
import {
|
1
|
+
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
2
|
+
import { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
3
|
import { PaymentMethod } from './payment_methods';
|
4
4
|
import { StripePayment } from './stripe_payments';
|
5
|
-
declare type StripeGatewayRel =
|
5
|
+
declare type StripeGatewayRel = ResourceRel & {
|
6
6
|
type: typeof StripeGateways.TYPE;
|
7
7
|
};
|
8
8
|
interface StripeGateway extends Resource {
|
@@ -28,8 +28,10 @@ declare class StripeGateways extends ApiResource {
|
|
28
28
|
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StripeGateway>;
|
29
29
|
update(resource: StripeGatewayUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StripeGateway>;
|
30
30
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
31
|
+
payment_methods(stripeGatewayId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>>;
|
32
|
+
stripe_payments(stripeGatewayId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<StripePayment>>;
|
31
33
|
isStripeGateway(resource: any): resource is StripeGateway;
|
32
|
-
relationship(id: string | ResourceId): StripeGatewayRel;
|
34
|
+
relationship(id: string | ResourceId | null): StripeGatewayRel;
|
33
35
|
type(): string;
|
34
36
|
}
|
35
37
|
export default StripeGateways;
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class StripeGateways extends resource_1.ApiResource{async list(e,
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class StripeGateways extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:StripeGateways.TYPE},e,t)}async create(e,t,s){return this.resources.create(Object.assign(Object.assign({},e),{type:StripeGateways.TYPE}),t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:StripeGateways.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update(Object.assign(Object.assign({},e),{type:StripeGateways.TYPE}),t,s)}async delete(e,t){await this.resources.delete({type:StripeGateways.TYPE,id:e},t)}async payment_methods(e,t,s){return this.resources.fetch({type:"payment_methods"},`stripe_gateways/${e}/payment_methods`,t,s)}async stripe_payments(e,t,s){return this.resources.fetch({type:"stripe_payments"},`stripe_gateways/${e}/stripe_payments`,t,s)}isStripeGateway(e){return e.type&&e.type===StripeGateways.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:StripeGateways.TYPE}:{id:e.id,type:StripeGateways.TYPE}}type(){return StripeGateways.TYPE}}StripeGateways.TYPE="stripe_gateways",exports.default=StripeGateways;
|
@@ -1,11 +1,11 @@
|
|
1
|
-
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
2
|
-
import {
|
1
|
+
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
2
|
+
import { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
3
|
import { Order } from './orders';
|
4
4
|
import { PaymentGateway } from './payment_gateways';
|
5
|
-
declare type StripePaymentRel =
|
5
|
+
declare type StripePaymentRel = ResourceRel & {
|
6
6
|
type: typeof StripePayments.TYPE;
|
7
7
|
};
|
8
|
-
declare type OrderRel =
|
8
|
+
declare type OrderRel = ResourceRel & {
|
9
9
|
type: 'orders';
|
10
10
|
};
|
11
11
|
interface StripePayment extends Resource {
|
@@ -32,8 +32,10 @@ declare class StripePayments extends ApiResource {
|
|
32
32
|
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StripePayment>;
|
33
33
|
update(resource: StripePaymentUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StripePayment>;
|
34
34
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
35
|
+
order(stripePaymentId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
36
|
+
payment_gateway(stripePaymentId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaymentGateway>;
|
35
37
|
isStripePayment(resource: any): resource is StripePayment;
|
36
|
-
relationship(id: string | ResourceId): StripePaymentRel;
|
38
|
+
relationship(id: string | ResourceId | null): StripePaymentRel;
|
37
39
|
type(): string;
|
38
40
|
}
|
39
41
|
export default StripePayments;
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class StripePayments extends resource_1.ApiResource{async list(e,
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class StripePayments extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:StripePayments.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:StripePayments.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:StripePayments.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:StripePayments.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:StripePayments.TYPE,id:e},t)}async order(e,t,r){return this.resources.fetch({type:"orders"},`stripe_payments/${e}/order`,t,r)}async payment_gateway(e,t,r){return this.resources.fetch({type:"payment_gateways"},`stripe_payments/${e}/payment_gateway`,t,r)}isStripePayment(e){return e.type&&e.type===StripePayments.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:StripePayments.TYPE}:{id:e.id,type:StripePayments.TYPE}}type(){return StripePayments.TYPE}}StripePayments.TYPE="stripe_payments",exports.default=StripePayments;
|
@@ -1,9 +1,9 @@
|
|
1
|
-
import { ApiResource, Resource, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
2
|
-
import {
|
1
|
+
import { ApiResource, Resource, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
2
|
+
import { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
3
|
import { TaxCategory } from './tax_categories';
|
4
4
|
import { Market } from './markets';
|
5
5
|
import { Attachment } from './attachments';
|
6
|
-
declare type TaxCalculatorRel =
|
6
|
+
declare type TaxCalculatorRel = ResourceRel & {
|
7
7
|
type: typeof TaxCalculators.TYPE;
|
8
8
|
};
|
9
9
|
interface TaxCalculator extends Resource {
|
@@ -16,8 +16,11 @@ declare class TaxCalculators extends ApiResource {
|
|
16
16
|
static readonly TYPE: 'tax_calculators';
|
17
17
|
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<TaxCalculator>>;
|
18
18
|
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<TaxCalculator>;
|
19
|
+
tax_categories(taxCalculatorId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<TaxCategory>>;
|
20
|
+
markets(taxCalculatorId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Market>>;
|
21
|
+
attachments(taxCalculatorId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
19
22
|
isTaxCalculator(resource: any): resource is TaxCalculator;
|
20
|
-
relationship(id: string | ResourceId): TaxCalculatorRel;
|
23
|
+
relationship(id: string | ResourceId | null): TaxCalculatorRel;
|
21
24
|
type(): string;
|
22
25
|
}
|
23
26
|
export default TaxCalculators;
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class TaxCalculators extends resource_1.ApiResource{async list(e,
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class TaxCalculators extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:TaxCalculators.TYPE},e,t)}async retrieve(e,t,r){return this.resources.retrieve({type:TaxCalculators.TYPE,id:e},t,r)}async tax_categories(e,t,r){return this.resources.fetch({type:"tax_categories"},`tax_calculators/${e}/tax_categories`,t,r)}async markets(e,t,r){return this.resources.fetch({type:"markets"},`tax_calculators/${e}/markets`,t,r)}async attachments(e,t,r){return this.resources.fetch({type:"attachments"},`tax_calculators/${e}/attachments`,t,r)}isTaxCalculator(e){return e.type&&e.type===TaxCalculators.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:TaxCalculators.TYPE}:{id:e.id,type:TaxCalculators.TYPE}}type(){return TaxCalculators.TYPE}}TaxCalculators.TYPE="tax_calculators",exports.default=TaxCalculators;
|
@@ -1,27 +1,27 @@
|
|
1
|
-
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
2
|
-
import {
|
1
|
+
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
2
|
+
import { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
3
|
import { Sku } from './skus';
|
4
4
|
import { AvalaraAccount } from './avalara_accounts';
|
5
5
|
import { TaxjarAccount } from './taxjar_accounts';
|
6
6
|
import { ManualTaxCalculator } from './manual_tax_calculators';
|
7
7
|
import { ExternalTaxCalculator } from './external_tax_calculators';
|
8
8
|
import { Attachment } from './attachments';
|
9
|
-
declare type TaxCategoryRel =
|
9
|
+
declare type TaxCategoryRel = ResourceRel & {
|
10
10
|
type: typeof TaxCategories.TYPE;
|
11
11
|
};
|
12
|
-
declare type SkuRel =
|
12
|
+
declare type SkuRel = ResourceRel & {
|
13
13
|
type: 'skus';
|
14
14
|
};
|
15
|
-
declare type AvalaraAccountRel =
|
15
|
+
declare type AvalaraAccountRel = ResourceRel & {
|
16
16
|
type: 'avalara_accounts';
|
17
17
|
};
|
18
|
-
declare type TaxjarAccountRel =
|
18
|
+
declare type TaxjarAccountRel = ResourceRel & {
|
19
19
|
type: 'taxjar_accounts';
|
20
20
|
};
|
21
|
-
declare type ManualTaxCalculatorRel =
|
21
|
+
declare type ManualTaxCalculatorRel = ResourceRel & {
|
22
22
|
type: 'manual_tax_calculators';
|
23
23
|
};
|
24
|
-
declare type ExternalTaxCalculatorRel =
|
24
|
+
declare type ExternalTaxCalculatorRel = ResourceRel & {
|
25
25
|
type: 'external_tax_calculators';
|
26
26
|
};
|
27
27
|
interface TaxCategory extends Resource {
|
@@ -49,8 +49,10 @@ declare class TaxCategories extends ApiResource {
|
|
49
49
|
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<TaxCategory>;
|
50
50
|
update(resource: TaxCategoryUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<TaxCategory>;
|
51
51
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
52
|
+
sku(taxCategoryId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Sku>;
|
53
|
+
attachments(taxCategoryId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
52
54
|
isTaxCategory(resource: any): resource is TaxCategory;
|
53
|
-
relationship(id: string | ResourceId): TaxCategoryRel;
|
55
|
+
relationship(id: string | ResourceId | null): TaxCategoryRel;
|
54
56
|
type(): string;
|
55
57
|
}
|
56
58
|
export default TaxCategories;
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class TaxCategories extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:TaxCategories.TYPE},e,t)}async create(e,t,
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class TaxCategories extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:TaxCategories.TYPE},e,t)}async create(e,t,s){return this.resources.create(Object.assign(Object.assign({},e),{type:TaxCategories.TYPE}),t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:TaxCategories.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update(Object.assign(Object.assign({},e),{type:TaxCategories.TYPE}),t,s)}async delete(e,t){await this.resources.delete({type:TaxCategories.TYPE,id:e},t)}async sku(e,t,s){return this.resources.fetch({type:"skus"},`tax_categories/${e}/sku`,t,s)}async attachments(e,t,s){return this.resources.fetch({type:"attachments"},`tax_categories/${e}/attachments`,t,s)}isTaxCategory(e){return e.type&&e.type===TaxCategories.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:TaxCategories.TYPE}:{id:e.id,type:TaxCategories.TYPE}}type(){return TaxCategories.TYPE}}TaxCategories.TYPE="tax_categories",exports.default=TaxCategories;
|
@@ -1,10 +1,10 @@
|
|
1
|
-
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
2
|
-
import {
|
1
|
+
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
2
|
+
import { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
3
|
import { ManualTaxCalculator } from './manual_tax_calculators';
|
4
|
-
declare type TaxRuleRel =
|
4
|
+
declare type TaxRuleRel = ResourceRel & {
|
5
5
|
type: typeof TaxRules.TYPE;
|
6
6
|
};
|
7
|
-
declare type ManualTaxCalculatorRel =
|
7
|
+
declare type ManualTaxCalculatorRel = ResourceRel & {
|
8
8
|
type: 'manual_tax_calculators';
|
9
9
|
};
|
10
10
|
interface TaxRule extends Resource {
|
@@ -60,8 +60,9 @@ declare class TaxRules extends ApiResource {
|
|
60
60
|
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<TaxRule>;
|
61
61
|
update(resource: TaxRuleUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<TaxRule>;
|
62
62
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
63
|
+
manual_tax_calculator(taxRuleId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ManualTaxCalculator>;
|
63
64
|
isTaxRule(resource: any): resource is TaxRule;
|
64
|
-
relationship(id: string | ResourceId): TaxRuleRel;
|
65
|
+
relationship(id: string | ResourceId | null): TaxRuleRel;
|
65
66
|
type(): string;
|
66
67
|
}
|
67
68
|
export default TaxRules;
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class TaxRules extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:TaxRules.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:TaxRules.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:TaxRules.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:TaxRules.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:TaxRules.TYPE,id:e},t)}isTaxRule(e){return e.type&&e.type===TaxRules.TYPE}relationship(e){return typeof e=="string"?{id:e,type:TaxRules.TYPE}:{id:e.id,type:TaxRules.TYPE}}type(){return TaxRules.TYPE}}TaxRules.TYPE="tax_rules",exports.default=TaxRules;
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class TaxRules extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:TaxRules.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:TaxRules.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:TaxRules.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:TaxRules.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:TaxRules.TYPE,id:e},t)}async manual_tax_calculator(e,t,r){return this.resources.fetch({type:"manual_tax_calculators"},`tax_rules/${e}/manual_tax_calculator`,t,r)}isTaxRule(e){return e.type&&e.type===TaxRules.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:TaxRules.TYPE}:{id:e.id,type:TaxRules.TYPE}}type(){return TaxRules.TYPE}}TaxRules.TYPE="tax_rules",exports.default=TaxRules;
|
@@ -1,12 +1,12 @@
|
|
1
|
-
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
2
|
-
import {
|
1
|
+
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
2
|
+
import { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
3
|
import { TaxCategory } from './tax_categories';
|
4
4
|
import { Market } from './markets';
|
5
5
|
import { Attachment } from './attachments';
|
6
|
-
declare type TaxjarAccountRel =
|
6
|
+
declare type TaxjarAccountRel = ResourceRel & {
|
7
7
|
type: typeof TaxjarAccounts.TYPE;
|
8
8
|
};
|
9
|
-
declare type TaxCategoryRel =
|
9
|
+
declare type TaxCategoryRel = ResourceRel & {
|
10
10
|
type: 'tax_categories';
|
11
11
|
};
|
12
12
|
interface TaxjarAccount extends Resource {
|
@@ -32,8 +32,11 @@ declare class TaxjarAccounts extends ApiResource {
|
|
32
32
|
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<TaxjarAccount>;
|
33
33
|
update(resource: TaxjarAccountUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<TaxjarAccount>;
|
34
34
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
35
|
+
tax_categories(taxjarAccountId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<TaxCategory>>;
|
36
|
+
markets(taxjarAccountId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Market>>;
|
37
|
+
attachments(taxjarAccountId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
35
38
|
isTaxjarAccount(resource: any): resource is TaxjarAccount;
|
36
|
-
relationship(id: string | ResourceId): TaxjarAccountRel;
|
39
|
+
relationship(id: string | ResourceId | null): TaxjarAccountRel;
|
37
40
|
type(): string;
|
38
41
|
}
|
39
42
|
export default TaxjarAccounts;
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class TaxjarAccounts extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:TaxjarAccounts.TYPE},e,t)}async create(e,t,
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class TaxjarAccounts extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:TaxjarAccounts.TYPE},e,t)}async create(e,t,s){return this.resources.create(Object.assign(Object.assign({},e),{type:TaxjarAccounts.TYPE}),t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:TaxjarAccounts.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update(Object.assign(Object.assign({},e),{type:TaxjarAccounts.TYPE}),t,s)}async delete(e,t){await this.resources.delete({type:TaxjarAccounts.TYPE,id:e},t)}async tax_categories(e,t,s){return this.resources.fetch({type:"tax_categories"},`taxjar_accounts/${e}/tax_categories`,t,s)}async markets(e,t,s){return this.resources.fetch({type:"markets"},`taxjar_accounts/${e}/markets`,t,s)}async attachments(e,t,s){return this.resources.fetch({type:"attachments"},`taxjar_accounts/${e}/attachments`,t,s)}isTaxjarAccount(e){return e.type&&e.type===TaxjarAccounts.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:TaxjarAccounts.TYPE}:{id:e.id,type:TaxjarAccounts.TYPE}}type(){return TaxjarAccounts.TYPE}}TaxjarAccounts.TYPE="taxjar_accounts",exports.default=TaxjarAccounts;
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import { ApiResource, Resource, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
2
|
-
import {
|
1
|
+
import { ApiResource, Resource, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
2
|
+
import { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
3
|
import { Order } from './orders';
|
4
|
-
declare type TransactionRel =
|
4
|
+
declare type TransactionRel = ResourceRel & {
|
5
5
|
type: typeof Transactions.TYPE;
|
6
6
|
};
|
7
7
|
interface Transaction extends Resource {
|
@@ -22,8 +22,9 @@ declare class Transactions extends ApiResource {
|
|
22
22
|
static readonly TYPE: 'transactions';
|
23
23
|
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Transaction>>;
|
24
24
|
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Transaction>;
|
25
|
+
order(transactionId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
25
26
|
isTransaction(resource: any): resource is Transaction;
|
26
|
-
relationship(id: string | ResourceId): TransactionRel;
|
27
|
+
relationship(id: string | ResourceId | null): TransactionRel;
|
27
28
|
type(): string;
|
28
29
|
}
|
29
30
|
export default Transactions;
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class Transactions extends resource_1.ApiResource{async list(e,r){return this.resources.list({type:Transactions.TYPE},e,r)}async retrieve(e,r,t){return this.resources.retrieve({type:Transactions.TYPE,id:e},r,t)}isTransaction(e){return e.type&&e.type===Transactions.TYPE}relationship(e){return typeof e=="string"?{id:e,type:Transactions.TYPE}:{id:e.id,type:Transactions.TYPE}}type(){return Transactions.TYPE}}Transactions.TYPE="transactions",exports.default=Transactions;
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class Transactions extends resource_1.ApiResource{async list(e,r){return this.resources.list({type:Transactions.TYPE},e,r)}async retrieve(e,r,t){return this.resources.retrieve({type:Transactions.TYPE,id:e},r,t)}async order(e,r,t){return this.resources.fetch({type:"orders"},`transactions/${e}/order`,r,t)}isTransaction(e){return e.type&&e.type===Transactions.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:Transactions.TYPE}:{id:e.id,type:Transactions.TYPE}}type(){return Transactions.TYPE}}Transactions.TYPE="transactions",exports.default=Transactions;
|
@@ -1,8 +1,8 @@
|
|
1
|
-
import { ApiResource, Resource, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
2
|
-
import {
|
1
|
+
import { ApiResource, Resource, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
2
|
+
import { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
3
|
import { Order } from './orders';
|
4
4
|
import { Authorization } from './authorizations';
|
5
|
-
declare type VoidRel =
|
5
|
+
declare type VoidRel = ResourceRel & {
|
6
6
|
type: typeof Voids.TYPE;
|
7
7
|
};
|
8
8
|
interface Void extends Resource {
|
@@ -24,8 +24,10 @@ declare class Voids extends ApiResource {
|
|
24
24
|
static readonly TYPE: 'voids';
|
25
25
|
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Void>>;
|
26
26
|
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Void>;
|
27
|
+
order(voidId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
28
|
+
reference_authorization(voidId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Authorization>;
|
27
29
|
isVoid(resource: any): resource is Void;
|
28
|
-
relationship(id: string | ResourceId): VoidRel;
|
30
|
+
relationship(id: string | ResourceId | null): VoidRel;
|
29
31
|
type(): string;
|
30
32
|
}
|
31
33
|
export default Voids;
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class Voids extends resource_1.ApiResource{async list(e,r){return this.resources.list({type:Voids.TYPE},e,r)}async retrieve(e,r,t){return this.resources.retrieve({type:Voids.TYPE,id:e},r,t)}isVoid(e){return e.type&&e.type===Voids.TYPE}relationship(e){return typeof e=="string"?{id:e,type:Voids.TYPE}:{id:e.id,type:Voids.TYPE}}type(){return Voids.TYPE}}Voids.TYPE="voids",exports.default=Voids;
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class Voids extends resource_1.ApiResource{async list(e,r){return this.resources.list({type:Voids.TYPE},e,r)}async retrieve(e,r,t){return this.resources.retrieve({type:Voids.TYPE,id:e},r,t)}async order(e,r,t){return this.resources.fetch({type:"orders"},`voids/${e}/order`,r,t)}async reference_authorization(e,r,t){return this.resources.fetch({type:"authorizations"},`voids/${e}/reference_authorization`,r,t)}isVoid(e){return e.type&&e.type===Voids.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:Voids.TYPE}:{id:e.id,type:Voids.TYPE}}type(){return Voids.TYPE}}Voids.TYPE="voids",exports.default=Voids;
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
2
|
-
import {
|
1
|
+
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
2
|
+
import { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
3
|
import { EventCallback } from './event_callbacks';
|
4
|
-
declare type WebhookRel =
|
4
|
+
declare type WebhookRel = ResourceRel & {
|
5
5
|
type: typeof Webhooks.TYPE;
|
6
6
|
};
|
7
7
|
interface Webhook extends Resource {
|
@@ -33,8 +33,9 @@ declare class Webhooks extends ApiResource {
|
|
33
33
|
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Webhook>;
|
34
34
|
update(resource: WebhookUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Webhook>;
|
35
35
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
36
|
+
last_event_callbacks(webhookId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<EventCallback>>;
|
36
37
|
isWebhook(resource: any): resource is Webhook;
|
37
|
-
relationship(id: string | ResourceId): WebhookRel;
|
38
|
+
relationship(id: string | ResourceId | null): WebhookRel;
|
38
39
|
type(): string;
|
39
40
|
}
|
40
41
|
export default Webhooks;
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class Webhooks extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:Webhooks.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:Webhooks.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:Webhooks.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:Webhooks.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:Webhooks.TYPE,id:e},t)}isWebhook(e){return e.type&&e.type===Webhooks.TYPE}relationship(e){return typeof e=="string"?{id:e,type:Webhooks.TYPE}:{id:e.id,type:Webhooks.TYPE}}type(){return Webhooks.TYPE}}Webhooks.TYPE="webhooks",exports.default=Webhooks;
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class Webhooks extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:Webhooks.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:Webhooks.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:Webhooks.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:Webhooks.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:Webhooks.TYPE,id:e},t)}async last_event_callbacks(e,t,r){return this.resources.fetch({type:"event_callbacks"},`webhooks/${e}/last_event_callbacks`,t,r)}isWebhook(e){return e.type&&e.type===Webhooks.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:Webhooks.TYPE}:{id:e.id,type:Webhooks.TYPE}}type(){return Webhooks.TYPE}}Webhooks.TYPE="webhooks",exports.default=Webhooks;
|
@@ -1,10 +1,10 @@
|
|
1
|
-
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
2
|
-
import {
|
1
|
+
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
2
|
+
import { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
3
|
import { Order } from './orders';
|
4
|
-
declare type WireTransferRel =
|
4
|
+
declare type WireTransferRel = ResourceRel & {
|
5
5
|
type: typeof WireTransfers.TYPE;
|
6
6
|
};
|
7
|
-
declare type OrderRel =
|
7
|
+
declare type OrderRel = ResourceRel & {
|
8
8
|
type: 'orders';
|
9
9
|
};
|
10
10
|
interface WireTransfer extends Resource {
|
@@ -23,8 +23,9 @@ declare class WireTransfers extends ApiResource {
|
|
23
23
|
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<WireTransfer>;
|
24
24
|
update(resource: WireTransferUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<WireTransfer>;
|
25
25
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
26
|
+
order(wireTransferId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
26
27
|
isWireTransfer(resource: any): resource is WireTransfer;
|
27
|
-
relationship(id: string | ResourceId): WireTransferRel;
|
28
|
+
relationship(id: string | ResourceId | null): WireTransferRel;
|
28
29
|
type(): string;
|
29
30
|
}
|
30
31
|
export default WireTransfers;
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class WireTransfers extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:WireTransfers.TYPE},e,t)}async create(e,t,
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class WireTransfers extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:WireTransfers.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:WireTransfers.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:WireTransfers.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:WireTransfers.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:WireTransfers.TYPE,id:e},t)}async order(e,t,r){return this.resources.fetch({type:"orders"},`wire_transfers/${e}/order`,t,r)}isWireTransfer(e){return e.type&&e.type===WireTransfers.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:WireTransfers.TYPE}:{id:e.id,type:WireTransfers.TYPE}}type(){return WireTransfers.TYPE}}WireTransfers.TYPE="wire_transfers",exports.default=WireTransfers;
|
package/lib/esm/api.d.ts
CHANGED
package/lib/esm/client.d.ts
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
/// <reference types="node" />
|
2
2
|
import { AxiosProxyConfig, Method } from 'axios';
|
3
|
-
import type { DocWithData as JSONApiDocument, ResourceObject as JSONApiResource } from 'jsonapi-typescript';
|
4
3
|
import type { InterceptorManager } from './interceptor';
|
5
4
|
import type { Agent as HttpAgent } from 'http';
|
6
5
|
import type { Agent as HttpsAgent } from 'https';
|
6
|
+
declare type ProxyConfig = AxiosProxyConfig | false;
|
7
7
|
declare type RequestConfig = {
|
8
8
|
timeout?: number;
|
9
9
|
params?: {
|
@@ -11,7 +11,7 @@ declare type RequestConfig = {
|
|
11
11
|
};
|
12
12
|
httpAgent?: HttpAgent;
|
13
13
|
httpsAgent?: HttpsAgent;
|
14
|
-
proxy?:
|
14
|
+
proxy?: ProxyConfig;
|
15
15
|
};
|
16
16
|
declare type ApiClientInitConfig = {
|
17
17
|
organization: string;
|
@@ -26,7 +26,7 @@ declare class ApiClient {
|
|
26
26
|
interceptors: InterceptorManager;
|
27
27
|
private constructor();
|
28
28
|
config(config: ApiClientConfig): void;
|
29
|
-
request(method: Method, path: string, body?:
|
29
|
+
request(method: Method, path: string, body?: any, options?: ApiClientConfig): Promise<any>;
|
30
30
|
}
|
31
31
|
export default ApiClient;
|
32
32
|
export { ApiClientInitConfig, ApiClientConfig, RequestConfig };
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import * as api from './api';
|
2
2
|
import { ApiError } from './error';
|
3
3
|
import type { ErrorInterceptor, InterceptorType, RawResponseReader, RequestInterceptor, ResponseInterceptor } from './interceptor';
|
4
|
-
import {
|
4
|
+
import { ResourcesInitConfig } from './resource';
|
5
5
|
declare type SdkConfig = {};
|
6
6
|
declare type CommerceLayerInitConfig = SdkConfig & ResourcesInitConfig;
|
7
|
-
declare type CommerceLayerConfig =
|
7
|
+
declare type CommerceLayerConfig = Partial<CommerceLayerInitConfig>;
|
8
8
|
declare class CommerceLayerClient {
|
9
9
|
#private;
|
10
10
|
static get openApiSchemaVersion(): string;
|