@commercelayer/sdk 4.27.1 → 4.28.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/api.d.ts +10 -3
- package/lib/cjs/api.js +25 -4
- package/lib/cjs/commercelayer.d.ts +9 -2
- package/lib/cjs/commercelayer.js +8 -1
- package/lib/cjs/model.d.ts +10 -3
- package/lib/cjs/resource.d.ts +7 -9
- package/lib/cjs/resources/addresses.d.ts +14 -0
- package/lib/cjs/resources/addresses.js +12 -0
- package/lib/cjs/resources/adjustments.d.ts +3 -0
- package/lib/cjs/resources/adjustments.js +4 -0
- package/lib/cjs/resources/adyen_gateways.d.ts +5 -2
- package/lib/cjs/resources/adyen_gateways.js +4 -0
- package/lib/cjs/resources/adyen_payments.d.ts +3 -0
- package/lib/cjs/resources/adyen_payments.js +4 -0
- package/lib/cjs/resources/authorizations.d.ts +9 -3
- package/lib/cjs/resources/authorizations.js +12 -4
- package/lib/cjs/resources/avalara_accounts.d.ts +9 -6
- package/lib/cjs/resources/avalara_accounts.js +4 -0
- package/lib/cjs/resources/axerve_gateways.d.ts +4 -0
- package/lib/cjs/resources/axerve_gateways.js +4 -0
- package/lib/cjs/resources/axerve_payments.d.ts +9 -0
- package/lib/cjs/resources/axerve_payments.js +4 -0
- package/lib/cjs/resources/billing_info_validation_rules.d.ts +3 -0
- package/lib/cjs/resources/billing_info_validation_rules.js +4 -0
- package/lib/cjs/resources/braintree_gateways.d.ts +3 -0
- package/lib/cjs/resources/braintree_gateways.js +4 -0
- package/lib/cjs/resources/braintree_payments.d.ts +3 -0
- package/lib/cjs/resources/braintree_payments.js +4 -0
- package/lib/cjs/resources/bundles.d.ts +16 -2
- package/lib/cjs/resources/bundles.js +12 -0
- package/lib/cjs/resources/buy_x_pay_y_promotions.d.ts +134 -0
- package/lib/cjs/resources/buy_x_pay_y_promotions.js +81 -0
- package/lib/cjs/resources/captures.d.ts +9 -3
- package/lib/cjs/resources/captures.js +12 -4
- package/lib/cjs/resources/carrier_accounts.d.ts +3 -0
- package/lib/cjs/resources/carrier_accounts.js +4 -0
- package/lib/cjs/resources/checkout_com_gateways.d.ts +3 -0
- package/lib/cjs/resources/checkout_com_gateways.js +4 -0
- package/lib/cjs/resources/checkout_com_payments.d.ts +3 -0
- package/lib/cjs/resources/checkout_com_payments.js +4 -0
- package/lib/cjs/resources/cleanups.d.ts +3 -0
- package/lib/cjs/resources/cleanups.js +4 -0
- package/lib/cjs/resources/coupon_codes_promotion_rules.d.ts +10 -3
- package/lib/cjs/resources/coupon_codes_promotion_rules.js +4 -0
- package/lib/cjs/resources/coupon_recipients.d.ts +3 -0
- package/lib/cjs/resources/coupon_recipients.js +4 -0
- package/lib/cjs/resources/coupons.d.ts +26 -1
- package/lib/cjs/resources/coupons.js +16 -0
- package/lib/cjs/resources/custom_promotion_rules.d.ts +61 -0
- package/lib/cjs/resources/custom_promotion_rules.js +37 -0
- package/lib/cjs/resources/customer_addresses.d.ts +5 -0
- package/lib/cjs/resources/customer_addresses.js +4 -0
- package/lib/cjs/resources/customer_groups.d.ts +3 -0
- package/lib/cjs/resources/customer_groups.js +4 -0
- package/lib/cjs/resources/customer_payment_sources.d.ts +18 -11
- package/lib/cjs/resources/customer_payment_sources.js +8 -0
- package/lib/cjs/resources/customer_subscriptions.d.ts +3 -0
- package/lib/cjs/resources/customer_subscriptions.js +4 -0
- package/lib/cjs/resources/customers.d.ts +9 -0
- package/lib/cjs/resources/customers.js +4 -0
- package/lib/cjs/resources/delivery_lead_times.d.ts +3 -0
- package/lib/cjs/resources/delivery_lead_times.js +4 -0
- package/lib/cjs/resources/external_gateways.d.ts +3 -0
- package/lib/cjs/resources/external_gateways.js +4 -0
- package/lib/cjs/resources/external_payments.d.ts +3 -0
- package/lib/cjs/resources/external_payments.js +4 -0
- package/lib/cjs/resources/external_promotions.d.ts +45 -6
- package/lib/cjs/resources/external_promotions.js +24 -0
- package/lib/cjs/resources/external_tax_calculators.d.ts +3 -0
- package/lib/cjs/resources/external_tax_calculators.js +4 -0
- package/lib/cjs/resources/fixed_amount_promotions.d.ts +45 -6
- package/lib/cjs/resources/fixed_amount_promotions.js +24 -0
- package/lib/cjs/resources/fixed_price_promotions.d.ts +37 -9
- package/lib/cjs/resources/fixed_price_promotions.js +18 -2
- package/lib/cjs/resources/free_gift_promotions.d.ts +37 -9
- package/lib/cjs/resources/free_gift_promotions.js +18 -2
- package/lib/cjs/resources/free_shipping_promotions.d.ts +42 -6
- package/lib/cjs/resources/free_shipping_promotions.js +20 -0
- package/lib/cjs/resources/gift_card_recipients.d.ts +3 -0
- package/lib/cjs/resources/gift_card_recipients.js +4 -0
- package/lib/cjs/resources/gift_cards.d.ts +11 -0
- package/lib/cjs/resources/gift_cards.js +8 -0
- package/lib/cjs/resources/imports.d.ts +1 -3
- package/lib/cjs/resources/in_stock_subscriptions.d.ts +3 -0
- package/lib/cjs/resources/in_stock_subscriptions.js +4 -0
- package/lib/cjs/resources/inventory_models.d.ts +12 -0
- package/lib/cjs/resources/inventory_models.js +4 -0
- package/lib/cjs/resources/inventory_return_locations.d.ts +3 -0
- package/lib/cjs/resources/inventory_return_locations.js +4 -0
- package/lib/cjs/resources/inventory_stock_locations.d.ts +3 -0
- package/lib/cjs/resources/inventory_stock_locations.js +4 -0
- package/lib/cjs/resources/klarna_gateways.d.ts +3 -0
- package/lib/cjs/resources/klarna_gateways.js +4 -0
- package/lib/cjs/resources/klarna_payments.d.ts +3 -0
- package/lib/cjs/resources/klarna_payments.js +4 -0
- package/lib/cjs/resources/line_item_options.d.ts +11 -0
- package/lib/cjs/resources/line_item_options.js +8 -0
- package/lib/cjs/resources/line_items.d.ts +30 -0
- package/lib/cjs/resources/line_items.js +16 -0
- package/lib/cjs/resources/manual_gateways.d.ts +3 -0
- package/lib/cjs/resources/manual_gateways.js +4 -0
- package/lib/cjs/resources/manual_tax_calculators.d.ts +3 -0
- package/lib/cjs/resources/manual_tax_calculators.js +4 -0
- package/lib/cjs/resources/markets.d.ts +8 -0
- package/lib/cjs/resources/markets.js +4 -0
- package/lib/cjs/resources/merchants.d.ts +3 -0
- package/lib/cjs/resources/merchants.js +4 -0
- package/lib/cjs/resources/order_amount_promotion_rules.d.ts +13 -3
- package/lib/cjs/resources/order_amount_promotion_rules.js +4 -0
- package/lib/cjs/resources/order_subscription_items.d.ts +7 -0
- package/lib/cjs/resources/order_subscription_items.js +4 -0
- package/lib/cjs/resources/order_subscriptions.d.ts +4 -0
- package/lib/cjs/resources/order_subscriptions.js +4 -0
- package/lib/cjs/resources/order_validation_rules.d.ts +3 -0
- package/lib/cjs/resources/order_validation_rules.js +4 -0
- package/lib/cjs/resources/orders.d.ts +50 -6
- package/lib/cjs/resources/orders.js +32 -0
- package/lib/cjs/resources/organization.d.ts +4 -4
- package/lib/cjs/resources/packages.d.ts +3 -0
- package/lib/cjs/resources/packages.js +4 -0
- package/lib/cjs/resources/parcel_line_items.d.ts +4 -1
- package/lib/cjs/resources/parcel_line_items.js +4 -0
- package/lib/cjs/resources/parcels.d.ts +9 -3
- package/lib/cjs/resources/parcels.js +4 -0
- package/lib/cjs/resources/payment_gateways.d.ts +3 -0
- package/lib/cjs/resources/payment_gateways.js +4 -0
- package/lib/cjs/resources/payment_methods.d.ts +9 -1
- package/lib/cjs/resources/payment_methods.js +4 -0
- package/lib/cjs/resources/payment_options.d.ts +43 -0
- package/lib/cjs/resources/payment_options.js +41 -0
- package/lib/cjs/resources/paypal_gateways.d.ts +3 -0
- package/lib/cjs/resources/paypal_gateways.js +4 -0
- package/lib/cjs/resources/paypal_payments.d.ts +3 -0
- package/lib/cjs/resources/paypal_payments.js +4 -0
- package/lib/cjs/resources/percentage_discount_promotions.d.ts +37 -9
- package/lib/cjs/resources/percentage_discount_promotions.js +18 -2
- package/lib/cjs/resources/price_frequency_tiers.d.ts +3 -0
- package/lib/cjs/resources/price_frequency_tiers.js +4 -0
- package/lib/cjs/resources/price_lists.d.ts +6 -0
- package/lib/cjs/resources/price_lists.js +4 -0
- package/lib/cjs/resources/price_tiers.d.ts +3 -0
- package/lib/cjs/resources/price_tiers.js +4 -0
- package/lib/cjs/resources/price_volume_tiers.d.ts +3 -0
- package/lib/cjs/resources/price_volume_tiers.js +4 -0
- package/lib/cjs/resources/prices.d.ts +4 -1
- package/lib/cjs/resources/prices.js +4 -0
- package/lib/cjs/resources/promotion_rules.d.ts +5 -1
- package/lib/cjs/resources/promotion_rules.js +4 -0
- package/lib/cjs/resources/promotions.d.ts +18 -0
- package/lib/cjs/resources/promotions.js +20 -0
- package/lib/cjs/resources/refunds.d.ts +9 -3
- package/lib/cjs/resources/refunds.js +10 -2
- package/lib/cjs/resources/reserved_stocks.d.ts +27 -0
- package/lib/cjs/resources/reserved_stocks.js +36 -0
- package/lib/cjs/resources/return_line_items.d.ts +2 -1
- package/lib/cjs/resources/returns.d.ts +11 -0
- package/lib/cjs/resources/returns.js +8 -0
- package/lib/cjs/resources/satispay_gateways.d.ts +6 -0
- package/lib/cjs/resources/satispay_gateways.js +4 -0
- package/lib/cjs/resources/satispay_payments.d.ts +11 -3
- package/lib/cjs/resources/satispay_payments.js +4 -0
- package/lib/cjs/resources/shipments.d.ts +49 -2
- package/lib/cjs/resources/shipments.js +18 -0
- package/lib/cjs/resources/shipping_categories.d.ts +6 -0
- package/lib/cjs/resources/shipping_categories.js +4 -0
- package/lib/cjs/resources/shipping_method_tiers.d.ts +3 -0
- package/lib/cjs/resources/shipping_method_tiers.js +4 -0
- package/lib/cjs/resources/shipping_methods.d.ts +11 -0
- package/lib/cjs/resources/shipping_methods.js +4 -0
- package/lib/cjs/resources/shipping_weight_tiers.d.ts +3 -0
- package/lib/cjs/resources/shipping_weight_tiers.js +4 -0
- package/lib/cjs/resources/shipping_zones.d.ts +3 -0
- package/lib/cjs/resources/shipping_zones.js +4 -0
- package/lib/cjs/resources/sku_list_items.d.ts +3 -0
- package/lib/cjs/resources/sku_list_items.js +4 -0
- package/lib/cjs/resources/sku_list_promotion_rules.d.ts +10 -3
- package/lib/cjs/resources/sku_list_promotion_rules.js +4 -0
- package/lib/cjs/resources/sku_lists.d.ts +3 -0
- package/lib/cjs/resources/sku_lists.js +4 -0
- package/lib/cjs/resources/sku_options.d.ts +14 -0
- package/lib/cjs/resources/sku_options.js +12 -0
- package/lib/cjs/resources/skus.d.ts +17 -0
- package/lib/cjs/resources/skus.js +16 -0
- package/lib/cjs/resources/stock_items.d.ts +9 -0
- package/lib/cjs/resources/stock_items.js +12 -0
- package/lib/cjs/resources/stock_line_items.d.ts +42 -2
- package/lib/cjs/resources/stock_line_items.js +17 -0
- package/lib/cjs/resources/stock_locations.d.ts +6 -0
- package/lib/cjs/resources/stock_locations.js +4 -0
- package/lib/cjs/resources/stock_reservations.d.ts +49 -0
- package/lib/cjs/resources/stock_reservations.js +53 -0
- package/lib/cjs/resources/stock_transfers.d.ts +5 -0
- package/lib/cjs/resources/stock_transfers.js +4 -0
- package/lib/cjs/resources/stripe_gateways.d.ts +3 -0
- package/lib/cjs/resources/stripe_gateways.js +4 -0
- package/lib/cjs/resources/stripe_payments.d.ts +12 -0
- package/lib/cjs/resources/stripe_payments.js +4 -0
- package/lib/cjs/resources/tags.d.ts +27 -0
- package/lib/cjs/resources/tags.js +33 -0
- package/lib/cjs/resources/tax_calculators.d.ts +3 -0
- package/lib/cjs/resources/tax_calculators.js +4 -0
- package/lib/cjs/resources/tax_categories.d.ts +3 -0
- package/lib/cjs/resources/tax_categories.js +4 -0
- package/lib/cjs/resources/tax_rules.d.ts +3 -0
- package/lib/cjs/resources/tax_rules.js +4 -0
- package/lib/cjs/resources/taxjar_accounts.d.ts +3 -0
- package/lib/cjs/resources/taxjar_accounts.js +4 -0
- package/lib/cjs/resources/transactions.d.ts +9 -0
- package/lib/cjs/resources/transactions.js +12 -0
- package/lib/cjs/resources/versions.d.ts +22 -0
- package/lib/cjs/resources/versions.js +24 -0
- package/lib/cjs/resources/voids.d.ts +9 -3
- package/lib/cjs/resources/voids.js +10 -2
- package/lib/cjs/resources/webhooks.d.ts +8 -0
- package/lib/cjs/resources/webhooks.js +4 -0
- package/lib/cjs/resources/wire_transfers.d.ts +3 -0
- package/lib/cjs/resources/wire_transfers.js +4 -0
- package/lib/cjs/util.d.ts +1 -0
- package/lib/esm/api.d.ts +10 -3
- package/lib/esm/api.js +15 -1
- package/lib/esm/commercelayer.d.ts +9 -2
- package/lib/esm/commercelayer.js +8 -1
- package/lib/esm/model.d.ts +10 -3
- package/lib/esm/resource.d.ts +7 -9
- package/lib/esm/resources/addresses.d.ts +14 -0
- package/lib/esm/resources/addresses.js +12 -0
- package/lib/esm/resources/adjustments.d.ts +3 -0
- package/lib/esm/resources/adjustments.js +4 -0
- package/lib/esm/resources/adyen_gateways.d.ts +5 -2
- package/lib/esm/resources/adyen_gateways.js +4 -0
- package/lib/esm/resources/adyen_payments.d.ts +3 -0
- package/lib/esm/resources/adyen_payments.js +4 -0
- package/lib/esm/resources/authorizations.d.ts +9 -3
- package/lib/esm/resources/authorizations.js +12 -4
- package/lib/esm/resources/avalara_accounts.d.ts +9 -6
- package/lib/esm/resources/avalara_accounts.js +4 -0
- package/lib/esm/resources/axerve_gateways.d.ts +4 -0
- package/lib/esm/resources/axerve_gateways.js +4 -0
- package/lib/esm/resources/axerve_payments.d.ts +9 -0
- package/lib/esm/resources/axerve_payments.js +4 -0
- package/lib/esm/resources/billing_info_validation_rules.d.ts +3 -0
- package/lib/esm/resources/billing_info_validation_rules.js +4 -0
- package/lib/esm/resources/braintree_gateways.d.ts +3 -0
- package/lib/esm/resources/braintree_gateways.js +4 -0
- package/lib/esm/resources/braintree_payments.d.ts +3 -0
- package/lib/esm/resources/braintree_payments.js +4 -0
- package/lib/esm/resources/bundles.d.ts +16 -2
- package/lib/esm/resources/bundles.js +12 -0
- package/lib/esm/resources/buy_x_pay_y_promotions.d.ts +134 -0
- package/lib/esm/resources/buy_x_pay_y_promotions.js +79 -0
- package/lib/esm/resources/captures.d.ts +9 -3
- package/lib/esm/resources/captures.js +12 -4
- package/lib/esm/resources/carrier_accounts.d.ts +3 -0
- package/lib/esm/resources/carrier_accounts.js +4 -0
- package/lib/esm/resources/checkout_com_gateways.d.ts +3 -0
- package/lib/esm/resources/checkout_com_gateways.js +4 -0
- package/lib/esm/resources/checkout_com_payments.d.ts +3 -0
- package/lib/esm/resources/checkout_com_payments.js +4 -0
- package/lib/esm/resources/cleanups.d.ts +3 -0
- package/lib/esm/resources/cleanups.js +4 -0
- package/lib/esm/resources/coupon_codes_promotion_rules.d.ts +10 -3
- package/lib/esm/resources/coupon_codes_promotion_rules.js +4 -0
- package/lib/esm/resources/coupon_recipients.d.ts +3 -0
- package/lib/esm/resources/coupon_recipients.js +4 -0
- package/lib/esm/resources/coupons.d.ts +26 -1
- package/lib/esm/resources/coupons.js +16 -0
- package/lib/esm/resources/custom_promotion_rules.d.ts +61 -0
- package/lib/esm/resources/custom_promotion_rules.js +35 -0
- package/lib/esm/resources/customer_addresses.d.ts +5 -0
- package/lib/esm/resources/customer_addresses.js +4 -0
- package/lib/esm/resources/customer_groups.d.ts +3 -0
- package/lib/esm/resources/customer_groups.js +4 -0
- package/lib/esm/resources/customer_payment_sources.d.ts +18 -11
- package/lib/esm/resources/customer_payment_sources.js +8 -0
- package/lib/esm/resources/customer_subscriptions.d.ts +3 -0
- package/lib/esm/resources/customer_subscriptions.js +4 -0
- package/lib/esm/resources/customers.d.ts +9 -0
- package/lib/esm/resources/customers.js +4 -0
- package/lib/esm/resources/delivery_lead_times.d.ts +3 -0
- package/lib/esm/resources/delivery_lead_times.js +4 -0
- package/lib/esm/resources/external_gateways.d.ts +3 -0
- package/lib/esm/resources/external_gateways.js +4 -0
- package/lib/esm/resources/external_payments.d.ts +3 -0
- package/lib/esm/resources/external_payments.js +4 -0
- package/lib/esm/resources/external_promotions.d.ts +45 -6
- package/lib/esm/resources/external_promotions.js +24 -0
- package/lib/esm/resources/external_tax_calculators.d.ts +3 -0
- package/lib/esm/resources/external_tax_calculators.js +4 -0
- package/lib/esm/resources/fixed_amount_promotions.d.ts +45 -6
- package/lib/esm/resources/fixed_amount_promotions.js +24 -0
- package/lib/esm/resources/fixed_price_promotions.d.ts +37 -9
- package/lib/esm/resources/fixed_price_promotions.js +18 -2
- package/lib/esm/resources/free_gift_promotions.d.ts +37 -9
- package/lib/esm/resources/free_gift_promotions.js +18 -2
- package/lib/esm/resources/free_shipping_promotions.d.ts +42 -6
- package/lib/esm/resources/free_shipping_promotions.js +20 -0
- package/lib/esm/resources/gift_card_recipients.d.ts +3 -0
- package/lib/esm/resources/gift_card_recipients.js +4 -0
- package/lib/esm/resources/gift_cards.d.ts +11 -0
- package/lib/esm/resources/gift_cards.js +8 -0
- package/lib/esm/resources/imports.d.ts +1 -3
- package/lib/esm/resources/in_stock_subscriptions.d.ts +3 -0
- package/lib/esm/resources/in_stock_subscriptions.js +4 -0
- package/lib/esm/resources/inventory_models.d.ts +12 -0
- package/lib/esm/resources/inventory_models.js +4 -0
- package/lib/esm/resources/inventory_return_locations.d.ts +3 -0
- package/lib/esm/resources/inventory_return_locations.js +4 -0
- package/lib/esm/resources/inventory_stock_locations.d.ts +3 -0
- package/lib/esm/resources/inventory_stock_locations.js +4 -0
- package/lib/esm/resources/klarna_gateways.d.ts +3 -0
- package/lib/esm/resources/klarna_gateways.js +4 -0
- package/lib/esm/resources/klarna_payments.d.ts +3 -0
- package/lib/esm/resources/klarna_payments.js +4 -0
- package/lib/esm/resources/line_item_options.d.ts +11 -0
- package/lib/esm/resources/line_item_options.js +8 -0
- package/lib/esm/resources/line_items.d.ts +30 -0
- package/lib/esm/resources/line_items.js +16 -0
- package/lib/esm/resources/manual_gateways.d.ts +3 -0
- package/lib/esm/resources/manual_gateways.js +4 -0
- package/lib/esm/resources/manual_tax_calculators.d.ts +3 -0
- package/lib/esm/resources/manual_tax_calculators.js +4 -0
- package/lib/esm/resources/markets.d.ts +8 -0
- package/lib/esm/resources/markets.js +4 -0
- package/lib/esm/resources/merchants.d.ts +3 -0
- package/lib/esm/resources/merchants.js +4 -0
- package/lib/esm/resources/order_amount_promotion_rules.d.ts +13 -3
- package/lib/esm/resources/order_amount_promotion_rules.js +4 -0
- package/lib/esm/resources/order_subscription_items.d.ts +7 -0
- package/lib/esm/resources/order_subscription_items.js +4 -0
- package/lib/esm/resources/order_subscriptions.d.ts +4 -0
- package/lib/esm/resources/order_subscriptions.js +4 -0
- package/lib/esm/resources/order_validation_rules.d.ts +3 -0
- package/lib/esm/resources/order_validation_rules.js +4 -0
- package/lib/esm/resources/orders.d.ts +50 -6
- package/lib/esm/resources/orders.js +32 -0
- package/lib/esm/resources/organization.d.ts +4 -4
- package/lib/esm/resources/packages.d.ts +3 -0
- package/lib/esm/resources/packages.js +4 -0
- package/lib/esm/resources/parcel_line_items.d.ts +4 -1
- package/lib/esm/resources/parcel_line_items.js +4 -0
- package/lib/esm/resources/parcels.d.ts +9 -3
- package/lib/esm/resources/parcels.js +4 -0
- package/lib/esm/resources/payment_gateways.d.ts +3 -0
- package/lib/esm/resources/payment_gateways.js +4 -0
- package/lib/esm/resources/payment_methods.d.ts +9 -1
- package/lib/esm/resources/payment_methods.js +4 -0
- package/lib/esm/resources/payment_options.d.ts +43 -0
- package/lib/esm/resources/payment_options.js +39 -0
- package/lib/esm/resources/paypal_gateways.d.ts +3 -0
- package/lib/esm/resources/paypal_gateways.js +4 -0
- package/lib/esm/resources/paypal_payments.d.ts +3 -0
- package/lib/esm/resources/paypal_payments.js +4 -0
- package/lib/esm/resources/percentage_discount_promotions.d.ts +37 -9
- package/lib/esm/resources/percentage_discount_promotions.js +18 -2
- package/lib/esm/resources/price_frequency_tiers.d.ts +3 -0
- package/lib/esm/resources/price_frequency_tiers.js +4 -0
- package/lib/esm/resources/price_lists.d.ts +6 -0
- package/lib/esm/resources/price_lists.js +4 -0
- package/lib/esm/resources/price_tiers.d.ts +3 -0
- package/lib/esm/resources/price_tiers.js +4 -0
- package/lib/esm/resources/price_volume_tiers.d.ts +3 -0
- package/lib/esm/resources/price_volume_tiers.js +4 -0
- package/lib/esm/resources/prices.d.ts +4 -1
- package/lib/esm/resources/prices.js +4 -0
- package/lib/esm/resources/promotion_rules.d.ts +5 -1
- package/lib/esm/resources/promotion_rules.js +4 -0
- package/lib/esm/resources/promotions.d.ts +18 -0
- package/lib/esm/resources/promotions.js +20 -0
- package/lib/esm/resources/refunds.d.ts +9 -3
- package/lib/esm/resources/refunds.js +10 -2
- package/lib/esm/resources/reserved_stocks.d.ts +27 -0
- package/lib/esm/resources/reserved_stocks.js +34 -0
- package/lib/esm/resources/return_line_items.d.ts +2 -1
- package/lib/esm/resources/returns.d.ts +11 -0
- package/lib/esm/resources/returns.js +8 -0
- package/lib/esm/resources/satispay_gateways.d.ts +6 -0
- package/lib/esm/resources/satispay_gateways.js +4 -0
- package/lib/esm/resources/satispay_payments.d.ts +11 -3
- package/lib/esm/resources/satispay_payments.js +4 -0
- package/lib/esm/resources/shipments.d.ts +49 -2
- package/lib/esm/resources/shipments.js +18 -0
- package/lib/esm/resources/shipping_categories.d.ts +6 -0
- package/lib/esm/resources/shipping_categories.js +4 -0
- package/lib/esm/resources/shipping_method_tiers.d.ts +3 -0
- package/lib/esm/resources/shipping_method_tiers.js +4 -0
- package/lib/esm/resources/shipping_methods.d.ts +11 -0
- package/lib/esm/resources/shipping_methods.js +4 -0
- package/lib/esm/resources/shipping_weight_tiers.d.ts +3 -0
- package/lib/esm/resources/shipping_weight_tiers.js +4 -0
- package/lib/esm/resources/shipping_zones.d.ts +3 -0
- package/lib/esm/resources/shipping_zones.js +4 -0
- package/lib/esm/resources/sku_list_items.d.ts +3 -0
- package/lib/esm/resources/sku_list_items.js +4 -0
- package/lib/esm/resources/sku_list_promotion_rules.d.ts +10 -3
- package/lib/esm/resources/sku_list_promotion_rules.js +4 -0
- package/lib/esm/resources/sku_lists.d.ts +3 -0
- package/lib/esm/resources/sku_lists.js +4 -0
- package/lib/esm/resources/sku_options.d.ts +14 -0
- package/lib/esm/resources/sku_options.js +12 -0
- package/lib/esm/resources/skus.d.ts +17 -0
- package/lib/esm/resources/skus.js +16 -0
- package/lib/esm/resources/stock_items.d.ts +9 -0
- package/lib/esm/resources/stock_items.js +12 -0
- package/lib/esm/resources/stock_line_items.d.ts +42 -2
- package/lib/esm/resources/stock_line_items.js +17 -0
- package/lib/esm/resources/stock_locations.d.ts +6 -0
- package/lib/esm/resources/stock_locations.js +4 -0
- package/lib/esm/resources/stock_reservations.d.ts +49 -0
- package/lib/esm/resources/stock_reservations.js +51 -0
- package/lib/esm/resources/stock_transfers.d.ts +5 -0
- package/lib/esm/resources/stock_transfers.js +4 -0
- package/lib/esm/resources/stripe_gateways.d.ts +3 -0
- package/lib/esm/resources/stripe_gateways.js +4 -0
- package/lib/esm/resources/stripe_payments.d.ts +12 -0
- package/lib/esm/resources/stripe_payments.js +4 -0
- package/lib/esm/resources/tags.d.ts +27 -0
- package/lib/esm/resources/tags.js +31 -0
- package/lib/esm/resources/tax_calculators.d.ts +3 -0
- package/lib/esm/resources/tax_calculators.js +4 -0
- package/lib/esm/resources/tax_categories.d.ts +3 -0
- package/lib/esm/resources/tax_categories.js +4 -0
- package/lib/esm/resources/tax_rules.d.ts +3 -0
- package/lib/esm/resources/tax_rules.js +4 -0
- package/lib/esm/resources/taxjar_accounts.d.ts +3 -0
- package/lib/esm/resources/taxjar_accounts.js +4 -0
- package/lib/esm/resources/transactions.d.ts +9 -0
- package/lib/esm/resources/transactions.js +12 -0
- package/lib/esm/resources/versions.d.ts +22 -0
- package/lib/esm/resources/versions.js +22 -0
- package/lib/esm/resources/voids.d.ts +9 -3
- package/lib/esm/resources/voids.js +10 -2
- package/lib/esm/resources/webhooks.d.ts +8 -0
- package/lib/esm/resources/webhooks.js +4 -0
- package/lib/esm/resources/wire_transfers.d.ts +3 -0
- package/lib/esm/resources/wire_transfers.js +4 -0
- package/lib/esm/util.d.ts +1 -0
- package/lib/tsconfig.esm.tsbuildinfo +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +25 -25
- package/lib/cjs/micro.d.ts +0 -4
- package/lib/cjs/micro.js +0 -13
- package/lib/esm/micro.d.ts +0 -4
- package/lib/esm/micro.js +0 -7
@@ -0,0 +1,34 @@
|
|
1
|
+
import { ApiResource } from '../resource';
|
2
|
+
class ReservedStocks extends ApiResource {
|
3
|
+
// static readonly PATH = 'reserved_stocks'
|
4
|
+
async list(params, options) {
|
5
|
+
return this.resources.list({ type: ReservedStocks.TYPE }, params, options);
|
6
|
+
}
|
7
|
+
async retrieve(id, params, options) {
|
8
|
+
return this.resources.retrieve({ type: ReservedStocks.TYPE, id }, params, options);
|
9
|
+
}
|
10
|
+
async stock_item(reservedStockId, params, options) {
|
11
|
+
const _reservedStockId = reservedStockId.id || reservedStockId;
|
12
|
+
return this.resources.fetch({ type: 'stock_items' }, `reserved_stocks/${_reservedStockId}/stock_item`, params, options);
|
13
|
+
}
|
14
|
+
async sku(reservedStockId, params, options) {
|
15
|
+
const _reservedStockId = reservedStockId.id || reservedStockId;
|
16
|
+
return this.resources.fetch({ type: 'skus' }, `reserved_stocks/${_reservedStockId}/sku`, params, options);
|
17
|
+
}
|
18
|
+
async stock_reservations(reservedStockId, params, options) {
|
19
|
+
const _reservedStockId = reservedStockId.id || reservedStockId;
|
20
|
+
return this.resources.fetch({ type: 'stock_reservations' }, `reserved_stocks/${_reservedStockId}/stock_reservations`, params, options);
|
21
|
+
}
|
22
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
23
|
+
isReservedStock(resource) {
|
24
|
+
return resource.type && (resource.type === ReservedStocks.TYPE);
|
25
|
+
}
|
26
|
+
relationship(id) {
|
27
|
+
return ((id === null) || (typeof id === 'string')) ? { id, type: ReservedStocks.TYPE } : { id: id.id, type: ReservedStocks.TYPE };
|
28
|
+
}
|
29
|
+
type() {
|
30
|
+
return ReservedStocks.TYPE;
|
31
|
+
}
|
32
|
+
}
|
33
|
+
ReservedStocks.TYPE = 'reserved_stocks';
|
34
|
+
export default ReservedStocks;
|
@@ -14,8 +14,9 @@ type LineItemRel = ResourceRel & {
|
|
14
14
|
interface ReturnLineItem extends Resource {
|
15
15
|
sku_code?: string;
|
16
16
|
bundle_code?: string;
|
17
|
-
name?: string;
|
18
17
|
quantity?: number;
|
18
|
+
name?: string;
|
19
|
+
image_url?: string;
|
19
20
|
return_reason?: object;
|
20
21
|
restocked_at?: string;
|
21
22
|
return?: Return;
|
@@ -7,6 +7,8 @@ import type { Address } from './addresses';
|
|
7
7
|
import type { ReturnLineItem } from './return_line_items';
|
8
8
|
import type { Attachment } from './attachments';
|
9
9
|
import type { Event } from './events';
|
10
|
+
import type { Tag } from './tags';
|
11
|
+
import type { Version } from './versions';
|
10
12
|
type ReturnRel = ResourceRel & {
|
11
13
|
type: typeof Returns.TYPE;
|
12
14
|
};
|
@@ -16,6 +18,9 @@ type OrderRel = ResourceRel & {
|
|
16
18
|
type StockLocationRel = ResourceRel & {
|
17
19
|
type: 'stock_locations';
|
18
20
|
};
|
21
|
+
type TagRel = ResourceRel & {
|
22
|
+
type: 'tags';
|
23
|
+
};
|
19
24
|
interface Return extends Resource {
|
20
25
|
number?: string;
|
21
26
|
status?: string;
|
@@ -35,10 +40,13 @@ interface Return extends Resource {
|
|
35
40
|
return_line_items?: ReturnLineItem[];
|
36
41
|
attachments?: Attachment[];
|
37
42
|
events?: Event[];
|
43
|
+
tags?: Tag[];
|
44
|
+
versions?: Version[];
|
38
45
|
}
|
39
46
|
interface ReturnCreate extends ResourceCreate {
|
40
47
|
order: OrderRel;
|
41
48
|
stock_location?: StockLocationRel;
|
49
|
+
tags?: TagRel[];
|
42
50
|
}
|
43
51
|
interface ReturnUpdate extends ResourceUpdate {
|
44
52
|
_request?: boolean;
|
@@ -51,6 +59,7 @@ interface ReturnUpdate extends ResourceUpdate {
|
|
51
59
|
_archive?: boolean;
|
52
60
|
_unarchive?: boolean;
|
53
61
|
stock_location?: StockLocationRel;
|
62
|
+
tags?: TagRel[];
|
54
63
|
}
|
55
64
|
declare class Returns extends ApiResource {
|
56
65
|
static readonly TYPE: 'returns';
|
@@ -67,6 +76,8 @@ declare class Returns extends ApiResource {
|
|
67
76
|
return_line_items(returnId: string | Return, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<ReturnLineItem>>;
|
68
77
|
attachments(returnId: string | Return, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
69
78
|
events(returnId: string | Return, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
79
|
+
tags(returnId: string | Return, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
|
80
|
+
versions(returnId: string | Return, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
70
81
|
isReturn(resource: any): resource is Return;
|
71
82
|
relationship(id: string | ResourceId | null): ReturnRel;
|
72
83
|
type(): string;
|
@@ -48,6 +48,14 @@ class Returns extends ApiResource {
|
|
48
48
|
const _returnId = returnId.id || returnId;
|
49
49
|
return this.resources.fetch({ type: 'events' }, `returns/${_returnId}/events`, params, options);
|
50
50
|
}
|
51
|
+
async tags(returnId, params, options) {
|
52
|
+
const _returnId = returnId.id || returnId;
|
53
|
+
return this.resources.fetch({ type: 'tags' }, `returns/${_returnId}/tags`, params, options);
|
54
|
+
}
|
55
|
+
async versions(returnId, params, options) {
|
56
|
+
const _returnId = returnId.id || returnId;
|
57
|
+
return this.resources.fetch({ type: 'versions' }, `returns/${_returnId}/versions`, params, options);
|
58
|
+
}
|
51
59
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
52
60
|
isReturn(resource) {
|
53
61
|
return resource.type && (resource.type === Returns.TYPE);
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
2
2
|
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
3
|
import type { PaymentMethod } from './payment_methods';
|
4
|
+
import type { Version } from './versions';
|
4
5
|
import type { SatispayPayment } from './satispay_payments';
|
5
6
|
type SatispayGatewayRel = ResourceRel & {
|
6
7
|
type: typeof SatispayGateways.TYPE;
|
@@ -10,12 +11,16 @@ type SatispayPaymentRel = ResourceRel & {
|
|
10
11
|
};
|
11
12
|
interface SatispayGateway extends Resource {
|
12
13
|
name?: string;
|
14
|
+
token?: string;
|
15
|
+
key_id?: string;
|
13
16
|
webhook_endpoint_url?: string;
|
14
17
|
payment_methods?: PaymentMethod[];
|
18
|
+
versions?: Version[];
|
15
19
|
satispay_payments?: SatispayPayment[];
|
16
20
|
}
|
17
21
|
interface SatispayGatewayCreate extends ResourceCreate {
|
18
22
|
name: string;
|
23
|
+
token: string;
|
19
24
|
satispay_payments?: SatispayPaymentRel[];
|
20
25
|
}
|
21
26
|
interface SatispayGatewayUpdate extends ResourceUpdate {
|
@@ -30,6 +35,7 @@ declare class SatispayGateways extends ApiResource {
|
|
30
35
|
update(resource: SatispayGatewayUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SatispayGateway>;
|
31
36
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
32
37
|
payment_methods(satispayGatewayId: string | SatispayGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>>;
|
38
|
+
versions(satispayGatewayId: string | SatispayGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
33
39
|
satispay_payments(satispayGatewayId: string | SatispayGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<SatispayPayment>>;
|
34
40
|
isSatispayGateway(resource: any): resource is SatispayGateway;
|
35
41
|
relationship(id: string | ResourceId | null): SatispayGatewayRel;
|
@@ -20,6 +20,10 @@ class SatispayGateways extends ApiResource {
|
|
20
20
|
const _satispayGatewayId = satispayGatewayId.id || satispayGatewayId;
|
21
21
|
return this.resources.fetch({ type: 'payment_methods' }, `satispay_gateways/${_satispayGatewayId}/payment_methods`, params, options);
|
22
22
|
}
|
23
|
+
async versions(satispayGatewayId, params, options) {
|
24
|
+
const _satispayGatewayId = satispayGatewayId.id || satispayGatewayId;
|
25
|
+
return this.resources.fetch({ type: 'versions' }, `satispay_gateways/${_satispayGatewayId}/versions`, params, options);
|
26
|
+
}
|
23
27
|
async satispay_payments(satispayGatewayId, params, options) {
|
24
28
|
const _satispayGatewayId = satispayGatewayId.id || satispayGatewayId;
|
25
29
|
return this.resources.fetch({ type: 'satispay_payments' }, `satispay_gateways/${_satispayGatewayId}/satispay_payments`, params, options);
|
@@ -2,6 +2,7 @@ import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig,
|
|
2
2
|
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
3
|
import type { Order } from './orders';
|
4
4
|
import type { PaymentGateway } from './payment_gateways';
|
5
|
+
import type { Version } from './versions';
|
5
6
|
type SatispayPaymentRel = ResourceRel & {
|
6
7
|
type: typeof SatispayPayments.TYPE;
|
7
8
|
};
|
@@ -9,15 +10,21 @@ type OrderRel = ResourceRel & {
|
|
9
10
|
type: 'orders';
|
10
11
|
};
|
11
12
|
interface SatispayPayment extends Resource {
|
12
|
-
token?: string;
|
13
|
-
key_id?: string;
|
14
13
|
payment_id?: string;
|
14
|
+
flow?: string;
|
15
|
+
status?: string;
|
15
16
|
redirect_url?: string;
|
17
|
+
payment_url?: string;
|
18
|
+
intent_amount_cents?: number;
|
19
|
+
intent_amount_float?: number;
|
20
|
+
formatted_intent_amount?: string;
|
21
|
+
payment_response?: object;
|
16
22
|
order?: Order;
|
17
23
|
payment_gateway?: PaymentGateway;
|
24
|
+
versions?: Version[];
|
18
25
|
}
|
19
26
|
interface SatispayPaymentCreate extends ResourceCreate {
|
20
|
-
|
27
|
+
flow?: string;
|
21
28
|
redirect_url?: string;
|
22
29
|
order: OrderRel;
|
23
30
|
}
|
@@ -35,6 +42,7 @@ declare class SatispayPayments extends ApiResource {
|
|
35
42
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
36
43
|
order(satispayPaymentId: string | SatispayPayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
37
44
|
payment_gateway(satispayPaymentId: string | SatispayPayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaymentGateway>;
|
45
|
+
versions(satispayPaymentId: string | SatispayPayment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
38
46
|
isSatispayPayment(resource: any): resource is SatispayPayment;
|
39
47
|
relationship(id: string | ResourceId | null): SatispayPaymentRel;
|
40
48
|
type(): string;
|
@@ -24,6 +24,10 @@ class SatispayPayments extends ApiResource {
|
|
24
24
|
const _satispayPaymentId = satispayPaymentId.id || satispayPaymentId;
|
25
25
|
return this.resources.fetch({ type: 'payment_gateways' }, `satispay_payments/${_satispayPaymentId}/payment_gateway`, params, options);
|
26
26
|
}
|
27
|
+
async versions(satispayPaymentId, params, options) {
|
28
|
+
const _satispayPaymentId = satispayPaymentId.id || satispayPaymentId;
|
29
|
+
return this.resources.fetch({ type: 'versions' }, `satispay_payments/${_satispayPaymentId}/versions`, params, options);
|
30
|
+
}
|
27
31
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
28
32
|
isSatispayPayment(resource) {
|
29
33
|
return resource.type && (resource.type === SatispayPayments.TYPE);
|
@@ -1,7 +1,8 @@
|
|
1
|
-
import { ApiResource, Resource, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
1
|
+
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
2
2
|
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
3
|
import type { Order } from './orders';
|
4
4
|
import type { ShippingCategory } from './shipping_categories';
|
5
|
+
import type { InventoryStockLocation } from './inventory_stock_locations';
|
5
6
|
import type { StockLocation } from './stock_locations';
|
6
7
|
import type { Address } from './addresses';
|
7
8
|
import type { ShippingMethod } from './shipping_methods';
|
@@ -12,12 +13,29 @@ import type { CarrierAccount } from './carrier_accounts';
|
|
12
13
|
import type { Parcel } from './parcels';
|
13
14
|
import type { Attachment } from './attachments';
|
14
15
|
import type { Event } from './events';
|
16
|
+
import type { Tag } from './tags';
|
17
|
+
import type { Version } from './versions';
|
15
18
|
type ShipmentRel = ResourceRel & {
|
16
19
|
type: typeof Shipments.TYPE;
|
17
20
|
};
|
21
|
+
type OrderRel = ResourceRel & {
|
22
|
+
type: 'orders';
|
23
|
+
};
|
24
|
+
type ShippingCategoryRel = ResourceRel & {
|
25
|
+
type: 'shipping_categories';
|
26
|
+
};
|
27
|
+
type InventoryStockLocationRel = ResourceRel & {
|
28
|
+
type: 'inventory_stock_locations';
|
29
|
+
};
|
30
|
+
type AddressRel = ResourceRel & {
|
31
|
+
type: 'addresses';
|
32
|
+
};
|
18
33
|
type ShippingMethodRel = ResourceRel & {
|
19
34
|
type: 'shipping_methods';
|
20
35
|
};
|
36
|
+
type TagRel = ResourceRel & {
|
37
|
+
type: 'tags';
|
38
|
+
};
|
21
39
|
interface Shipment extends Resource {
|
22
40
|
number?: string;
|
23
41
|
status?: string;
|
@@ -36,8 +54,14 @@ interface Shipment extends Resource {
|
|
36
54
|
purchase_started_at?: string;
|
37
55
|
purchase_completed_at?: string;
|
38
56
|
purchase_failed_at?: string;
|
57
|
+
on_hold_at?: string;
|
58
|
+
picking_at?: string;
|
59
|
+
packing_at?: string;
|
60
|
+
ready_to_ship_at?: string;
|
61
|
+
shipped_at?: string;
|
39
62
|
order?: Order;
|
40
63
|
shipping_category?: ShippingCategory;
|
64
|
+
inventory_stock_location?: InventoryStockLocation;
|
41
65
|
stock_location?: StockLocation;
|
42
66
|
origin_address?: Address;
|
43
67
|
shipping_address?: Address;
|
@@ -54,25 +78,46 @@ interface Shipment extends Resource {
|
|
54
78
|
parcels?: Parcel[];
|
55
79
|
attachments?: Attachment[];
|
56
80
|
events?: Event[];
|
81
|
+
tags?: Tag[];
|
82
|
+
versions?: Version[];
|
83
|
+
}
|
84
|
+
interface ShipmentCreate extends ResourceCreate {
|
85
|
+
order: OrderRel;
|
86
|
+
shipping_category?: ShippingCategoryRel;
|
87
|
+
inventory_stock_location: InventoryStockLocationRel;
|
88
|
+
shipping_address?: AddressRel;
|
89
|
+
shipping_method?: ShippingMethodRel;
|
90
|
+
tags?: TagRel[];
|
57
91
|
}
|
58
92
|
interface ShipmentUpdate extends ResourceUpdate {
|
93
|
+
_upcoming?: boolean;
|
59
94
|
_on_hold?: boolean;
|
60
95
|
_picking?: boolean;
|
61
96
|
_packing?: boolean;
|
62
97
|
_ready_to_ship?: boolean;
|
63
98
|
_ship?: boolean;
|
99
|
+
_reserve_stock?: boolean;
|
100
|
+
_release_stock?: boolean;
|
101
|
+
_decrement_stock?: boolean;
|
64
102
|
_get_rates?: boolean;
|
65
103
|
selected_rate_id?: string;
|
66
104
|
_purchase?: boolean;
|
105
|
+
shipping_category?: ShippingCategoryRel;
|
106
|
+
inventory_stock_location?: InventoryStockLocationRel;
|
107
|
+
shipping_address?: AddressRel;
|
67
108
|
shipping_method?: ShippingMethodRel;
|
109
|
+
tags?: TagRel[];
|
68
110
|
}
|
69
111
|
declare class Shipments extends ApiResource {
|
70
112
|
static readonly TYPE: 'shipments';
|
71
113
|
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Shipment>>;
|
114
|
+
create(resource: ShipmentCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Shipment>;
|
72
115
|
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Shipment>;
|
73
116
|
update(resource: ShipmentUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Shipment>;
|
117
|
+
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
74
118
|
order(shipmentId: string | Shipment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
75
119
|
shipping_category(shipmentId: string | Shipment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingCategory>;
|
120
|
+
inventory_stock_location(shipmentId: string | Shipment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<InventoryStockLocation>;
|
76
121
|
stock_location(shipmentId: string | Shipment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockLocation>;
|
77
122
|
origin_address(shipmentId: string | Shipment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Address>;
|
78
123
|
shipping_address(shipmentId: string | Shipment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Address>;
|
@@ -85,9 +130,11 @@ declare class Shipments extends ApiResource {
|
|
85
130
|
parcels(shipmentId: string | Shipment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Parcel>>;
|
86
131
|
attachments(shipmentId: string | Shipment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
87
132
|
events(shipmentId: string | Shipment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
133
|
+
tags(shipmentId: string | Shipment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
|
134
|
+
versions(shipmentId: string | Shipment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
88
135
|
isShipment(resource: any): resource is Shipment;
|
89
136
|
relationship(id: string | ResourceId | null): ShipmentRel;
|
90
137
|
type(): string;
|
91
138
|
}
|
92
139
|
export default Shipments;
|
93
|
-
export { Shipment, ShipmentUpdate };
|
140
|
+
export { Shipment, ShipmentCreate, ShipmentUpdate };
|
@@ -4,12 +4,18 @@ class Shipments extends ApiResource {
|
|
4
4
|
async list(params, options) {
|
5
5
|
return this.resources.list({ type: Shipments.TYPE }, params, options);
|
6
6
|
}
|
7
|
+
async create(resource, params, options) {
|
8
|
+
return this.resources.create(Object.assign(Object.assign({}, resource), { type: Shipments.TYPE }), params, options);
|
9
|
+
}
|
7
10
|
async retrieve(id, params, options) {
|
8
11
|
return this.resources.retrieve({ type: Shipments.TYPE, id }, params, options);
|
9
12
|
}
|
10
13
|
async update(resource, params, options) {
|
11
14
|
return this.resources.update(Object.assign(Object.assign({}, resource), { type: Shipments.TYPE }), params, options);
|
12
15
|
}
|
16
|
+
async delete(id, options) {
|
17
|
+
await this.resources.delete({ type: Shipments.TYPE, id }, options);
|
18
|
+
}
|
13
19
|
async order(shipmentId, params, options) {
|
14
20
|
const _shipmentId = shipmentId.id || shipmentId;
|
15
21
|
return this.resources.fetch({ type: 'orders' }, `shipments/${_shipmentId}/order`, params, options);
|
@@ -18,6 +24,10 @@ class Shipments extends ApiResource {
|
|
18
24
|
const _shipmentId = shipmentId.id || shipmentId;
|
19
25
|
return this.resources.fetch({ type: 'shipping_categories' }, `shipments/${_shipmentId}/shipping_category`, params, options);
|
20
26
|
}
|
27
|
+
async inventory_stock_location(shipmentId, params, options) {
|
28
|
+
const _shipmentId = shipmentId.id || shipmentId;
|
29
|
+
return this.resources.fetch({ type: 'inventory_stock_locations' }, `shipments/${_shipmentId}/inventory_stock_location`, params, options);
|
30
|
+
}
|
21
31
|
async stock_location(shipmentId, params, options) {
|
22
32
|
const _shipmentId = shipmentId.id || shipmentId;
|
23
33
|
return this.resources.fetch({ type: 'stock_locations' }, `shipments/${_shipmentId}/stock_location`, params, options);
|
@@ -66,6 +76,14 @@ class Shipments extends ApiResource {
|
|
66
76
|
const _shipmentId = shipmentId.id || shipmentId;
|
67
77
|
return this.resources.fetch({ type: 'events' }, `shipments/${_shipmentId}/events`, params, options);
|
68
78
|
}
|
79
|
+
async tags(shipmentId, params, options) {
|
80
|
+
const _shipmentId = shipmentId.id || shipmentId;
|
81
|
+
return this.resources.fetch({ type: 'tags' }, `shipments/${_shipmentId}/tags`, params, options);
|
82
|
+
}
|
83
|
+
async versions(shipmentId, params, options) {
|
84
|
+
const _shipmentId = shipmentId.id || shipmentId;
|
85
|
+
return this.resources.fetch({ type: 'versions' }, `shipments/${_shipmentId}/versions`, params, options);
|
86
|
+
}
|
69
87
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
70
88
|
isShipment(resource) {
|
71
89
|
return resource.type && (resource.type === Shipments.TYPE);
|
@@ -2,19 +2,24 @@ import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig,
|
|
2
2
|
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
3
|
import type { Sku } from './skus';
|
4
4
|
import type { Attachment } from './attachments';
|
5
|
+
import type { Version } from './versions';
|
5
6
|
type ShippingCategoryRel = ResourceRel & {
|
6
7
|
type: typeof ShippingCategories.TYPE;
|
7
8
|
};
|
8
9
|
interface ShippingCategory extends Resource {
|
9
10
|
name?: string;
|
11
|
+
code?: string;
|
10
12
|
skus?: Sku[];
|
11
13
|
attachments?: Attachment[];
|
14
|
+
versions?: Version[];
|
12
15
|
}
|
13
16
|
interface ShippingCategoryCreate extends ResourceCreate {
|
14
17
|
name: string;
|
18
|
+
code?: string;
|
15
19
|
}
|
16
20
|
interface ShippingCategoryUpdate extends ResourceUpdate {
|
17
21
|
name?: string;
|
22
|
+
code?: string;
|
18
23
|
}
|
19
24
|
declare class ShippingCategories extends ApiResource {
|
20
25
|
static readonly TYPE: 'shipping_categories';
|
@@ -25,6 +30,7 @@ declare class ShippingCategories extends ApiResource {
|
|
25
30
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
26
31
|
skus(shippingCategoryId: string | ShippingCategory, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Sku>>;
|
27
32
|
attachments(shippingCategoryId: string | ShippingCategory, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
33
|
+
versions(shippingCategoryId: string | ShippingCategory, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
28
34
|
isShippingCategory(resource: any): resource is ShippingCategory;
|
29
35
|
relationship(id: string | ResourceId | null): ShippingCategoryRel;
|
30
36
|
type(): string;
|
@@ -24,6 +24,10 @@ class ShippingCategories extends ApiResource {
|
|
24
24
|
const _shippingCategoryId = shippingCategoryId.id || shippingCategoryId;
|
25
25
|
return this.resources.fetch({ type: 'attachments' }, `shipping_categories/${_shippingCategoryId}/attachments`, params, options);
|
26
26
|
}
|
27
|
+
async versions(shippingCategoryId, params, options) {
|
28
|
+
const _shippingCategoryId = shippingCategoryId.id || shippingCategoryId;
|
29
|
+
return this.resources.fetch({ type: 'versions' }, `shipping_categories/${_shippingCategoryId}/versions`, params, options);
|
30
|
+
}
|
27
31
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
28
32
|
isShippingCategory(resource) {
|
29
33
|
return resource.type && (resource.type === ShippingCategories.TYPE);
|
@@ -2,6 +2,7 @@ import { ApiResource, Resource, ResourcesConfig, ResourceId, ResourceRel, ListRe
|
|
2
2
|
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
3
|
import type { ShippingMethod } from './shipping_methods';
|
4
4
|
import type { Attachment } from './attachments';
|
5
|
+
import type { Version } from './versions';
|
5
6
|
type ShippingMethodTierRel = ResourceRel & {
|
6
7
|
type: typeof ShippingMethodTiers.TYPE;
|
7
8
|
};
|
@@ -13,6 +14,7 @@ interface ShippingMethodTier extends Resource {
|
|
13
14
|
formatted_price_amount?: string;
|
14
15
|
shipping_method?: ShippingMethod;
|
15
16
|
attachments?: Attachment[];
|
17
|
+
versions?: Version[];
|
16
18
|
}
|
17
19
|
declare class ShippingMethodTiers extends ApiResource {
|
18
20
|
static readonly TYPE: 'shipping_method_tiers';
|
@@ -20,6 +22,7 @@ declare class ShippingMethodTiers extends ApiResource {
|
|
20
22
|
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingMethodTier>;
|
21
23
|
shipping_method(shippingMethodTierId: string | ShippingMethodTier, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingMethod>;
|
22
24
|
attachments(shippingMethodTierId: string | ShippingMethodTier, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
25
|
+
versions(shippingMethodTierId: string | ShippingMethodTier, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
23
26
|
isShippingMethodTier(resource: any): resource is ShippingMethodTier;
|
24
27
|
relationship(id: string | ResourceId | null): ShippingMethodTierRel;
|
25
28
|
type(): string;
|
@@ -15,6 +15,10 @@ class ShippingMethodTiers extends ApiResource {
|
|
15
15
|
const _shippingMethodTierId = shippingMethodTierId.id || shippingMethodTierId;
|
16
16
|
return this.resources.fetch({ type: 'attachments' }, `shipping_method_tiers/${_shippingMethodTierId}/attachments`, params, options);
|
17
17
|
}
|
18
|
+
async versions(shippingMethodTierId, params, options) {
|
19
|
+
const _shippingMethodTierId = shippingMethodTierId.id || shippingMethodTierId;
|
20
|
+
return this.resources.fetch({ type: 'versions' }, `shipping_method_tiers/${_shippingMethodTierId}/versions`, params, options);
|
21
|
+
}
|
18
22
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
19
23
|
isShippingMethodTier(resource) {
|
20
24
|
return resource.type && (resource.type === ShippingMethodTiers.TYPE);
|
@@ -8,6 +8,7 @@ import type { DeliveryLeadTime } from './delivery_lead_times';
|
|
8
8
|
import type { ShippingMethodTier } from './shipping_method_tiers';
|
9
9
|
import type { ShippingWeightTier } from './shipping_weight_tiers';
|
10
10
|
import type { Attachment } from './attachments';
|
11
|
+
import type { Version } from './versions';
|
11
12
|
type ShippingMethodRel = ResourceRel & {
|
12
13
|
type: typeof ShippingMethods.TYPE;
|
13
14
|
};
|
@@ -30,6 +31,7 @@ interface ShippingMethod extends Resource {
|
|
30
31
|
name?: string;
|
31
32
|
scheme?: string;
|
32
33
|
currency_code?: string;
|
34
|
+
external_prices_url?: string;
|
33
35
|
disabled_at?: string;
|
34
36
|
price_amount_cents?: number;
|
35
37
|
price_amount_float?: number;
|
@@ -37,6 +39,7 @@ interface ShippingMethod extends Resource {
|
|
37
39
|
free_over_amount_cents?: number;
|
38
40
|
free_over_amount_float?: number;
|
39
41
|
formatted_free_over_amount?: string;
|
42
|
+
use_subtotal?: boolean;
|
40
43
|
price_amount_for_shipment_cents?: number;
|
41
44
|
price_amount_for_shipment_float?: number;
|
42
45
|
formatted_price_amount_for_shipment?: string;
|
@@ -51,13 +54,18 @@ interface ShippingMethod extends Resource {
|
|
51
54
|
shipping_method_tiers?: ShippingMethodTier[];
|
52
55
|
shipping_weight_tiers?: ShippingWeightTier[];
|
53
56
|
attachments?: Attachment[];
|
57
|
+
versions?: Version[];
|
54
58
|
}
|
55
59
|
interface ShippingMethodCreate extends ResourceCreate {
|
56
60
|
name: string;
|
57
61
|
scheme?: string;
|
58
62
|
currency_code?: string;
|
63
|
+
external_prices_url?: string;
|
64
|
+
_disable?: boolean;
|
65
|
+
_enable?: boolean;
|
59
66
|
price_amount_cents: number;
|
60
67
|
free_over_amount_cents?: number;
|
68
|
+
use_subtotal?: boolean;
|
61
69
|
min_weight?: number;
|
62
70
|
max_weight?: number;
|
63
71
|
unit_of_weight?: string;
|
@@ -71,10 +79,12 @@ interface ShippingMethodUpdate extends ResourceUpdate {
|
|
71
79
|
name?: string;
|
72
80
|
scheme?: string;
|
73
81
|
currency_code?: string;
|
82
|
+
external_prices_url?: string;
|
74
83
|
_disable?: boolean;
|
75
84
|
_enable?: boolean;
|
76
85
|
price_amount_cents?: number;
|
77
86
|
free_over_amount_cents?: number;
|
87
|
+
use_subtotal?: boolean;
|
78
88
|
min_weight?: number;
|
79
89
|
max_weight?: number;
|
80
90
|
unit_of_weight?: string;
|
@@ -99,6 +109,7 @@ declare class ShippingMethods extends ApiResource {
|
|
99
109
|
shipping_method_tiers(shippingMethodId: string | ShippingMethod, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<ShippingMethodTier>>;
|
100
110
|
shipping_weight_tiers(shippingMethodId: string | ShippingMethod, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<ShippingWeightTier>>;
|
101
111
|
attachments(shippingMethodId: string | ShippingMethod, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
112
|
+
versions(shippingMethodId: string | ShippingMethod, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
102
113
|
isShippingMethod(resource: any): resource is ShippingMethod;
|
103
114
|
relationship(id: string | ResourceId | null): ShippingMethodRel;
|
104
115
|
type(): string;
|
@@ -48,6 +48,10 @@ class ShippingMethods extends ApiResource {
|
|
48
48
|
const _shippingMethodId = shippingMethodId.id || shippingMethodId;
|
49
49
|
return this.resources.fetch({ type: 'attachments' }, `shipping_methods/${_shippingMethodId}/attachments`, params, options);
|
50
50
|
}
|
51
|
+
async versions(shippingMethodId, params, options) {
|
52
|
+
const _shippingMethodId = shippingMethodId.id || shippingMethodId;
|
53
|
+
return this.resources.fetch({ type: 'versions' }, `shipping_methods/${_shippingMethodId}/versions`, params, options);
|
54
|
+
}
|
51
55
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
52
56
|
isShippingMethod(resource) {
|
53
57
|
return resource.type && (resource.type === ShippingMethods.TYPE);
|
@@ -2,6 +2,7 @@ import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig,
|
|
2
2
|
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
3
|
import type { ShippingMethod } from './shipping_methods';
|
4
4
|
import type { Attachment } from './attachments';
|
5
|
+
import type { Version } from './versions';
|
5
6
|
type ShippingWeightTierRel = ResourceRel & {
|
6
7
|
type: typeof ShippingWeightTiers.TYPE;
|
7
8
|
};
|
@@ -16,6 +17,7 @@ interface ShippingWeightTier extends Resource {
|
|
16
17
|
formatted_price_amount?: string;
|
17
18
|
shipping_method?: ShippingMethod;
|
18
19
|
attachments?: Attachment[];
|
20
|
+
versions?: Version[];
|
19
21
|
}
|
20
22
|
interface ShippingWeightTierCreate extends ResourceCreate {
|
21
23
|
name: string;
|
@@ -38,6 +40,7 @@ declare class ShippingWeightTiers extends ApiResource {
|
|
38
40
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
39
41
|
shipping_method(shippingWeightTierId: string | ShippingWeightTier, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingMethod>;
|
40
42
|
attachments(shippingWeightTierId: string | ShippingWeightTier, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
43
|
+
versions(shippingWeightTierId: string | ShippingWeightTier, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
41
44
|
isShippingWeightTier(resource: any): resource is ShippingWeightTier;
|
42
45
|
relationship(id: string | ResourceId | null): ShippingWeightTierRel;
|
43
46
|
type(): string;
|
@@ -24,6 +24,10 @@ class ShippingWeightTiers extends ApiResource {
|
|
24
24
|
const _shippingWeightTierId = shippingWeightTierId.id || shippingWeightTierId;
|
25
25
|
return this.resources.fetch({ type: 'attachments' }, `shipping_weight_tiers/${_shippingWeightTierId}/attachments`, params, options);
|
26
26
|
}
|
27
|
+
async versions(shippingWeightTierId, params, options) {
|
28
|
+
const _shippingWeightTierId = shippingWeightTierId.id || shippingWeightTierId;
|
29
|
+
return this.resources.fetch({ type: 'versions' }, `shipping_weight_tiers/${_shippingWeightTierId}/versions`, params, options);
|
30
|
+
}
|
27
31
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
28
32
|
isShippingWeightTier(resource) {
|
29
33
|
return resource.type && (resource.type === ShippingWeightTiers.TYPE);
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
2
2
|
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
3
|
import type { Attachment } from './attachments';
|
4
|
+
import type { Version } from './versions';
|
4
5
|
type ShippingZoneRel = ResourceRel & {
|
5
6
|
type: typeof ShippingZones.TYPE;
|
6
7
|
};
|
@@ -13,6 +14,7 @@ interface ShippingZone extends Resource {
|
|
13
14
|
zip_code_regex?: string;
|
14
15
|
not_zip_code_regex?: string;
|
15
16
|
attachments?: Attachment[];
|
17
|
+
versions?: Version[];
|
16
18
|
}
|
17
19
|
interface ShippingZoneCreate extends ResourceCreate {
|
18
20
|
name: string;
|
@@ -40,6 +42,7 @@ declare class ShippingZones extends ApiResource {
|
|
40
42
|
update(resource: ShippingZoneUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingZone>;
|
41
43
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
42
44
|
attachments(shippingZoneId: string | ShippingZone, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
45
|
+
versions(shippingZoneId: string | ShippingZone, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
43
46
|
isShippingZone(resource: any): resource is ShippingZone;
|
44
47
|
relationship(id: string | ResourceId | null): ShippingZoneRel;
|
45
48
|
type(): string;
|
@@ -20,6 +20,10 @@ class ShippingZones extends ApiResource {
|
|
20
20
|
const _shippingZoneId = shippingZoneId.id || shippingZoneId;
|
21
21
|
return this.resources.fetch({ type: 'attachments' }, `shipping_zones/${_shippingZoneId}/attachments`, params, options);
|
22
22
|
}
|
23
|
+
async versions(shippingZoneId, params, options) {
|
24
|
+
const _shippingZoneId = shippingZoneId.id || shippingZoneId;
|
25
|
+
return this.resources.fetch({ type: 'versions' }, `shipping_zones/${_shippingZoneId}/versions`, params, options);
|
26
|
+
}
|
23
27
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
24
28
|
isShippingZone(resource) {
|
25
29
|
return resource.type && (resource.type === ShippingZones.TYPE);
|
@@ -2,6 +2,7 @@ import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig,
|
|
2
2
|
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
3
|
import type { SkuList } from './sku_lists';
|
4
4
|
import type { Sku } from './skus';
|
5
|
+
import type { Version } from './versions';
|
5
6
|
type SkuListItemRel = ResourceRel & {
|
6
7
|
type: typeof SkuListItems.TYPE;
|
7
8
|
};
|
@@ -17,6 +18,7 @@ interface SkuListItem extends Resource {
|
|
17
18
|
quantity?: number;
|
18
19
|
sku_list?: SkuList;
|
19
20
|
sku?: Sku;
|
21
|
+
versions?: Version[];
|
20
22
|
}
|
21
23
|
interface SkuListItemCreate extends ResourceCreate {
|
22
24
|
position?: number;
|
@@ -39,6 +41,7 @@ declare class SkuListItems extends ApiResource {
|
|
39
41
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
40
42
|
sku_list(skuListItemId: string | SkuListItem, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
|
41
43
|
sku(skuListItemId: string | SkuListItem, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Sku>;
|
44
|
+
versions(skuListItemId: string | SkuListItem, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
42
45
|
isSkuListItem(resource: any): resource is SkuListItem;
|
43
46
|
relationship(id: string | ResourceId | null): SkuListItemRel;
|
44
47
|
type(): string;
|
@@ -24,6 +24,10 @@ class SkuListItems extends ApiResource {
|
|
24
24
|
const _skuListItemId = skuListItemId.id || skuListItemId;
|
25
25
|
return this.resources.fetch({ type: 'skus' }, `sku_list_items/${_skuListItemId}/sku`, params, options);
|
26
26
|
}
|
27
|
+
async versions(skuListItemId, params, options) {
|
28
|
+
const _skuListItemId = skuListItemId.id || skuListItemId;
|
29
|
+
return this.resources.fetch({ type: 'versions' }, `sku_list_items/${_skuListItemId}/versions`, params, options);
|
30
|
+
}
|
27
31
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
28
32
|
isSkuListItem(resource) {
|
29
33
|
return resource.type && (resource.type === SkuListItems.TYPE);
|