@commercelayer/sdk 7.0.0-beta.1 → 7.0.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/lib/api-BYcswOJ0.d.cts +16784 -0
- package/lib/api-Cknm0QL_.d.ts +16784 -0
- package/lib/api.cjs +936 -0
- package/lib/api.d.cts +4 -0
- package/lib/api.d.ts +4 -0
- package/lib/api.js +275 -0
- package/lib/client.cjs +170 -0
- package/lib/client.d.cts +36 -0
- package/lib/client.d.ts +36 -0
- package/lib/client.js +161 -0
- package/lib/commercelayer.cjs +798 -0
- package/lib/commercelayer.d.cts +167 -0
- package/lib/commercelayer.d.ts +167 -0
- package/lib/commercelayer.js +768 -0
- package/lib/common.cjs +17 -0
- package/lib/common.d.cts +13 -0
- package/lib/common.d.ts +13 -0
- package/lib/common.js +13 -0
- package/lib/config.cjs +21 -0
- package/lib/config.d.cts +19 -0
- package/lib/config.d.ts +19 -0
- package/lib/config.js +17 -0
- package/lib/debug.cjs +19 -0
- package/lib/debug.d.cts +4 -0
- package/lib/debug.d.ts +4 -0
- package/lib/debug.js +15 -0
- package/lib/error.cjs +97 -0
- package/lib/error.d.cts +35 -0
- package/lib/error.d.ts +35 -0
- package/lib/error.js +91 -0
- package/lib/fetch.cjs +83 -0
- package/lib/fetch.d.cts +1 -0
- package/lib/fetch.d.ts +1 -0
- package/lib/fetch.js +76 -0
- package/lib/index.cjs +32 -2
- package/lib/index.d.cts +8 -16916
- package/lib/index.d.ts +8 -16916
- package/lib/index.js +3 -2
- package/lib/instance.cjs +272 -0
- package/lib/instance.d.cts +141 -0
- package/lib/instance.d.ts +141 -0
- package/lib/instance.js +139 -0
- package/lib/interceptor-5MISI1yn.d.cts +54 -0
- package/lib/interceptor-5MISI1yn.d.ts +54 -0
- package/lib/interceptor.cjs +2 -0
- package/lib/interceptor.d.cts +1 -0
- package/lib/interceptor.d.ts +1 -0
- package/lib/interceptor.js +1 -0
- package/lib/jsonapi.cjs +79 -0
- package/lib/jsonapi.d.cts +11 -0
- package/lib/jsonapi.d.ts +11 -0
- package/lib/jsonapi.js +71 -0
- package/lib/model.cjs +2 -0
- package/lib/model.d.cts +4 -0
- package/lib/model.d.ts +4 -0
- package/lib/model.js +1 -0
- package/lib/query.cjs +64 -0
- package/lib/query.d.cts +4 -0
- package/lib/query.d.ts +4 -0
- package/lib/query.js +56 -0
- package/lib/resource.cjs +222 -0
- package/lib/resource.d.cts +4 -0
- package/lib/resource.d.ts +4 -0
- package/lib/resource.js +209 -0
- package/lib/resources/addresses.cjs +53 -0
- package/lib/resources/addresses.d.cts +4 -0
- package/lib/resources/addresses.d.ts +4 -0
- package/lib/resources/addresses.js +49 -0
- package/lib/resources/adjustments.cjs +41 -0
- package/lib/resources/adjustments.d.cts +4 -0
- package/lib/resources/adjustments.d.ts +4 -0
- package/lib/resources/adjustments.js +37 -0
- package/lib/resources/adyen_gateways.cjs +49 -0
- package/lib/resources/adyen_gateways.d.cts +4 -0
- package/lib/resources/adyen_gateways.d.ts +4 -0
- package/lib/resources/adyen_gateways.js +45 -0
- package/lib/resources/adyen_payments.cjs +55 -0
- package/lib/resources/adyen_payments.d.cts +4 -0
- package/lib/resources/adyen_payments.d.ts +4 -0
- package/lib/resources/adyen_payments.js +51 -0
- package/lib/resources/applications.cjs +31 -0
- package/lib/resources/applications.d.cts +4 -0
- package/lib/resources/applications.d.ts +4 -0
- package/lib/resources/applications.js +27 -0
- package/lib/resources/attachments.cjs +37 -0
- package/lib/resources/attachments.d.cts +4 -0
- package/lib/resources/attachments.d.ts +4 -0
- package/lib/resources/attachments.js +33 -0
- package/lib/resources/authorizations.cjs +70 -0
- package/lib/resources/authorizations.d.cts +4 -0
- package/lib/resources/authorizations.d.ts +4 -0
- package/lib/resources/authorizations.js +66 -0
- package/lib/resources/avalara_accounts.cjs +57 -0
- package/lib/resources/avalara_accounts.d.cts +4 -0
- package/lib/resources/avalara_accounts.d.ts +4 -0
- package/lib/resources/avalara_accounts.js +53 -0
- package/lib/resources/axerve_gateways.cjs +49 -0
- package/lib/resources/axerve_gateways.d.cts +4 -0
- package/lib/resources/axerve_gateways.d.ts +4 -0
- package/lib/resources/axerve_gateways.js +45 -0
- package/lib/resources/axerve_payments.cjs +52 -0
- package/lib/resources/axerve_payments.d.cts +4 -0
- package/lib/resources/axerve_payments.d.ts +4 -0
- package/lib/resources/axerve_payments.js +48 -0
- package/lib/resources/bing_geocoders.cjs +49 -0
- package/lib/resources/bing_geocoders.d.cts +4 -0
- package/lib/resources/bing_geocoders.d.ts +4 -0
- package/lib/resources/bing_geocoders.js +45 -0
- package/lib/resources/braintree_gateways.cjs +49 -0
- package/lib/resources/braintree_gateways.d.cts +4 -0
- package/lib/resources/braintree_gateways.d.ts +4 -0
- package/lib/resources/braintree_gateways.js +45 -0
- package/lib/resources/braintree_payments.cjs +49 -0
- package/lib/resources/braintree_payments.d.cts +4 -0
- package/lib/resources/braintree_payments.d.ts +4 -0
- package/lib/resources/braintree_payments.js +45 -0
- package/lib/resources/bundles.cjs +71 -0
- package/lib/resources/bundles.d.cts +4 -0
- package/lib/resources/bundles.d.ts +4 -0
- package/lib/resources/bundles.js +67 -0
- package/lib/resources/buy_x_pay_y_promotions.cjs +91 -0
- package/lib/resources/buy_x_pay_y_promotions.d.cts +4 -0
- package/lib/resources/buy_x_pay_y_promotions.d.ts +4 -0
- package/lib/resources/buy_x_pay_y_promotions.js +87 -0
- package/lib/resources/captures.cjs +71 -0
- package/lib/resources/captures.d.cts +4 -0
- package/lib/resources/captures.d.ts +4 -0
- package/lib/resources/captures.js +67 -0
- package/lib/resources/carrier_accounts.cjs +49 -0
- package/lib/resources/carrier_accounts.d.cts +4 -0
- package/lib/resources/carrier_accounts.d.ts +4 -0
- package/lib/resources/carrier_accounts.js +45 -0
- package/lib/resources/checkout_com_gateways.cjs +49 -0
- package/lib/resources/checkout_com_gateways.d.cts +4 -0
- package/lib/resources/checkout_com_gateways.d.ts +4 -0
- package/lib/resources/checkout_com_gateways.js +45 -0
- package/lib/resources/checkout_com_payments.cjs +55 -0
- package/lib/resources/checkout_com_payments.d.cts +4 -0
- package/lib/resources/checkout_com_payments.d.ts +4 -0
- package/lib/resources/checkout_com_payments.js +51 -0
- package/lib/resources/cleanups.cjs +48 -0
- package/lib/resources/cleanups.d.cts +4 -0
- package/lib/resources/cleanups.d.ts +4 -0
- package/lib/resources/cleanups.js +44 -0
- package/lib/resources/coupon_codes_promotion_rules.cjs +45 -0
- package/lib/resources/coupon_codes_promotion_rules.d.cts +4 -0
- package/lib/resources/coupon_codes_promotion_rules.d.ts +4 -0
- package/lib/resources/coupon_codes_promotion_rules.js +41 -0
- package/lib/resources/coupon_recipients.cjs +49 -0
- package/lib/resources/coupon_recipients.d.cts +4 -0
- package/lib/resources/coupon_recipients.d.ts +4 -0
- package/lib/resources/coupon_recipients.js +45 -0
- package/lib/resources/coupons.cjs +57 -0
- package/lib/resources/coupons.d.cts +4 -0
- package/lib/resources/coupons.d.ts +4 -0
- package/lib/resources/coupons.js +53 -0
- package/lib/resources/custom_promotion_rules.cjs +41 -0
- package/lib/resources/custom_promotion_rules.d.cts +4 -0
- package/lib/resources/custom_promotion_rules.d.ts +4 -0
- package/lib/resources/custom_promotion_rules.js +37 -0
- package/lib/resources/customer_addresses.cjs +53 -0
- package/lib/resources/customer_addresses.d.cts +4 -0
- package/lib/resources/customer_addresses.d.ts +4 -0
- package/lib/resources/customer_addresses.js +49 -0
- package/lib/resources/customer_groups.cjs +53 -0
- package/lib/resources/customer_groups.d.cts +4 -0
- package/lib/resources/customer_groups.d.ts +4 -0
- package/lib/resources/customer_groups.js +49 -0
- package/lib/resources/customer_password_resets.cjs +48 -0
- package/lib/resources/customer_password_resets.d.cts +4 -0
- package/lib/resources/customer_password_resets.d.ts +4 -0
- package/lib/resources/customer_password_resets.js +44 -0
- package/lib/resources/customer_payment_sources.cjs +49 -0
- package/lib/resources/customer_payment_sources.d.cts +4 -0
- package/lib/resources/customer_payment_sources.d.ts +4 -0
- package/lib/resources/customer_payment_sources.js +45 -0
- package/lib/resources/customer_subscriptions.cjs +49 -0
- package/lib/resources/customer_subscriptions.d.cts +4 -0
- package/lib/resources/customer_subscriptions.d.ts +4 -0
- package/lib/resources/customer_subscriptions.js +45 -0
- package/lib/resources/customers.cjs +81 -0
- package/lib/resources/customers.d.cts +4 -0
- package/lib/resources/customers.d.ts +4 -0
- package/lib/resources/customers.js +77 -0
- package/lib/resources/delivery_lead_times.cjs +53 -0
- package/lib/resources/delivery_lead_times.d.cts +4 -0
- package/lib/resources/delivery_lead_times.d.ts +4 -0
- package/lib/resources/delivery_lead_times.js +49 -0
- package/lib/resources/discount_engine_items.cjs +36 -0
- package/lib/resources/discount_engine_items.d.cts +4 -0
- package/lib/resources/discount_engine_items.d.ts +4 -0
- package/lib/resources/discount_engine_items.js +32 -0
- package/lib/resources/discount_engines.cjs +44 -0
- package/lib/resources/discount_engines.d.cts +4 -0
- package/lib/resources/discount_engines.d.ts +4 -0
- package/lib/resources/discount_engines.js +40 -0
- package/lib/resources/easypost_pickups.cjs +52 -0
- package/lib/resources/easypost_pickups.d.cts +4 -0
- package/lib/resources/easypost_pickups.d.ts +4 -0
- package/lib/resources/easypost_pickups.js +48 -0
- package/lib/resources/event_callbacks.cjs +32 -0
- package/lib/resources/event_callbacks.d.cts +4 -0
- package/lib/resources/event_callbacks.d.ts +4 -0
- package/lib/resources/event_callbacks.js +28 -0
- package/lib/resources/events.cjs +42 -0
- package/lib/resources/events.d.cts +4 -0
- package/lib/resources/events.d.ts +4 -0
- package/lib/resources/events.js +38 -0
- package/lib/resources/exports.cjs +48 -0
- package/lib/resources/exports.d.cts +4 -0
- package/lib/resources/exports.d.ts +4 -0
- package/lib/resources/exports.js +44 -0
- package/lib/resources/external_gateways.cjs +52 -0
- package/lib/resources/external_gateways.d.cts +4 -0
- package/lib/resources/external_gateways.d.ts +4 -0
- package/lib/resources/external_gateways.js +48 -0
- package/lib/resources/external_payments.cjs +53 -0
- package/lib/resources/external_payments.d.cts +4 -0
- package/lib/resources/external_payments.d.ts +4 -0
- package/lib/resources/external_payments.js +49 -0
- package/lib/resources/external_promotions.cjs +94 -0
- package/lib/resources/external_promotions.d.cts +4 -0
- package/lib/resources/external_promotions.d.ts +4 -0
- package/lib/resources/external_promotions.js +90 -0
- package/lib/resources/external_tax_calculators.cjs +56 -0
- package/lib/resources/external_tax_calculators.d.cts +4 -0
- package/lib/resources/external_tax_calculators.d.ts +4 -0
- package/lib/resources/external_tax_calculators.js +52 -0
- package/lib/resources/fixed_amount_promotions.cjs +91 -0
- package/lib/resources/fixed_amount_promotions.d.cts +4 -0
- package/lib/resources/fixed_amount_promotions.d.ts +4 -0
- package/lib/resources/fixed_amount_promotions.js +87 -0
- package/lib/resources/fixed_price_promotions.cjs +91 -0
- package/lib/resources/fixed_price_promotions.d.cts +4 -0
- package/lib/resources/fixed_price_promotions.d.ts +4 -0
- package/lib/resources/fixed_price_promotions.js +87 -0
- package/lib/resources/flex_promotions.cjs +67 -0
- package/lib/resources/flex_promotions.d.cts +4 -0
- package/lib/resources/flex_promotions.d.ts +4 -0
- package/lib/resources/flex_promotions.js +63 -0
- package/lib/resources/free_gift_promotions.cjs +91 -0
- package/lib/resources/free_gift_promotions.d.cts +4 -0
- package/lib/resources/free_gift_promotions.d.ts +4 -0
- package/lib/resources/free_gift_promotions.js +87 -0
- package/lib/resources/free_shipping_promotions.cjs +87 -0
- package/lib/resources/free_shipping_promotions.d.cts +4 -0
- package/lib/resources/free_shipping_promotions.d.ts +4 -0
- package/lib/resources/free_shipping_promotions.js +83 -0
- package/lib/resources/geocoders.cjs +40 -0
- package/lib/resources/geocoders.d.cts +4 -0
- package/lib/resources/geocoders.d.ts +4 -0
- package/lib/resources/geocoders.js +36 -0
- package/lib/resources/gift_card_recipients.cjs +49 -0
- package/lib/resources/gift_card_recipients.d.cts +4 -0
- package/lib/resources/gift_card_recipients.d.ts +4 -0
- package/lib/resources/gift_card_recipients.js +45 -0
- package/lib/resources/gift_cards.cjs +73 -0
- package/lib/resources/gift_cards.d.cts +4 -0
- package/lib/resources/gift_cards.d.ts +4 -0
- package/lib/resources/gift_cards.js +69 -0
- package/lib/resources/google_geocoders.cjs +49 -0
- package/lib/resources/google_geocoders.d.cts +4 -0
- package/lib/resources/google_geocoders.d.ts +4 -0
- package/lib/resources/google_geocoders.js +45 -0
- package/lib/resources/imports.cjs +44 -0
- package/lib/resources/imports.d.cts +4 -0
- package/lib/resources/imports.d.ts +4 -0
- package/lib/resources/imports.js +40 -0
- package/lib/resources/in_stock_subscriptions.cjs +63 -0
- package/lib/resources/in_stock_subscriptions.d.cts +4 -0
- package/lib/resources/in_stock_subscriptions.d.ts +4 -0
- package/lib/resources/in_stock_subscriptions.js +59 -0
- package/lib/resources/inventory_models.cjs +53 -0
- package/lib/resources/inventory_models.d.cts +4 -0
- package/lib/resources/inventory_models.d.ts +4 -0
- package/lib/resources/inventory_models.js +49 -0
- package/lib/resources/inventory_return_locations.cjs +49 -0
- package/lib/resources/inventory_return_locations.d.cts +4 -0
- package/lib/resources/inventory_return_locations.d.ts +4 -0
- package/lib/resources/inventory_return_locations.js +45 -0
- package/lib/resources/inventory_stock_locations.cjs +49 -0
- package/lib/resources/inventory_stock_locations.d.cts +4 -0
- package/lib/resources/inventory_stock_locations.d.ts +4 -0
- package/lib/resources/inventory_stock_locations.js +45 -0
- package/lib/resources/klarna_gateways.cjs +49 -0
- package/lib/resources/klarna_gateways.d.cts +4 -0
- package/lib/resources/klarna_gateways.d.ts +4 -0
- package/lib/resources/klarna_gateways.js +45 -0
- package/lib/resources/klarna_payments.cjs +52 -0
- package/lib/resources/klarna_payments.d.cts +4 -0
- package/lib/resources/klarna_payments.d.ts +4 -0
- package/lib/resources/klarna_payments.js +48 -0
- package/lib/resources/line_item_options.cjs +53 -0
- package/lib/resources/line_item_options.d.cts +4 -0
- package/lib/resources/line_item_options.d.ts +4 -0
- package/lib/resources/line_item_options.js +49 -0
- package/lib/resources/line_items.cjs +82 -0
- package/lib/resources/line_items.d.cts +4 -0
- package/lib/resources/line_items.d.ts +4 -0
- package/lib/resources/line_items.js +78 -0
- package/lib/resources/links.cjs +47 -0
- package/lib/resources/links.d.cts +4 -0
- package/lib/resources/links.d.ts +4 -0
- package/lib/resources/links.js +43 -0
- package/lib/resources/manual_gateways.cjs +45 -0
- package/lib/resources/manual_gateways.d.cts +4 -0
- package/lib/resources/manual_gateways.d.ts +4 -0
- package/lib/resources/manual_gateways.js +41 -0
- package/lib/resources/manual_tax_calculators.cjs +57 -0
- package/lib/resources/manual_tax_calculators.d.cts +4 -0
- package/lib/resources/manual_tax_calculators.d.ts +4 -0
- package/lib/resources/manual_tax_calculators.js +53 -0
- package/lib/resources/markets.cjs +91 -0
- package/lib/resources/markets.d.cts +4 -0
- package/lib/resources/markets.d.ts +4 -0
- package/lib/resources/markets.js +87 -0
- package/lib/resources/merchants.cjs +49 -0
- package/lib/resources/merchants.d.cts +4 -0
- package/lib/resources/merchants.d.ts +4 -0
- package/lib/resources/merchants.js +45 -0
- package/lib/resources/notifications.cjs +37 -0
- package/lib/resources/notifications.d.cts +4 -0
- package/lib/resources/notifications.d.ts +4 -0
- package/lib/resources/notifications.js +33 -0
- package/lib/resources/order_amount_promotion_rules.cjs +41 -0
- package/lib/resources/order_amount_promotion_rules.d.cts +4 -0
- package/lib/resources/order_amount_promotion_rules.d.ts +4 -0
- package/lib/resources/order_amount_promotion_rules.js +37 -0
- package/lib/resources/order_copies.cjs +53 -0
- package/lib/resources/order_copies.d.cts +4 -0
- package/lib/resources/order_copies.d.ts +4 -0
- package/lib/resources/order_copies.js +49 -0
- package/lib/resources/order_factories.cjs +40 -0
- package/lib/resources/order_factories.d.cts +4 -0
- package/lib/resources/order_factories.d.ts +4 -0
- package/lib/resources/order_factories.js +36 -0
- package/lib/resources/order_subscription_items.cjs +45 -0
- package/lib/resources/order_subscription_items.d.cts +4 -0
- package/lib/resources/order_subscription_items.d.ts +4 -0
- package/lib/resources/order_subscription_items.js +41 -0
- package/lib/resources/order_subscriptions.cjs +97 -0
- package/lib/resources/order_subscriptions.d.cts +4 -0
- package/lib/resources/order_subscriptions.d.ts +4 -0
- package/lib/resources/order_subscriptions.js +93 -0
- package/lib/resources/orders.cjs +266 -0
- package/lib/resources/orders.d.cts +4 -0
- package/lib/resources/orders.d.ts +4 -0
- package/lib/resources/orders.js +262 -0
- package/lib/resources/organizations.cjs +31 -0
- package/lib/resources/organizations.d.cts +4 -0
- package/lib/resources/organizations.d.ts +4 -0
- package/lib/resources/organizations.js +27 -0
- package/lib/resources/packages.cjs +53 -0
- package/lib/resources/packages.d.cts +4 -0
- package/lib/resources/packages.d.ts +4 -0
- package/lib/resources/packages.js +49 -0
- package/lib/resources/parcel_line_items.cjs +49 -0
- package/lib/resources/parcel_line_items.d.cts +4 -0
- package/lib/resources/parcel_line_items.d.ts +4 -0
- package/lib/resources/parcel_line_items.js +45 -0
- package/lib/resources/parcels.cjs +61 -0
- package/lib/resources/parcels.d.cts +4 -0
- package/lib/resources/parcels.d.ts +4 -0
- package/lib/resources/parcels.js +57 -0
- package/lib/resources/payment_gateways.cjs +36 -0
- package/lib/resources/payment_gateways.d.cts +4 -0
- package/lib/resources/payment_gateways.d.ts +4 -0
- package/lib/resources/payment_gateways.js +32 -0
- package/lib/resources/payment_methods.cjs +67 -0
- package/lib/resources/payment_methods.d.cts +4 -0
- package/lib/resources/payment_methods.d.ts +4 -0
- package/lib/resources/payment_methods.js +63 -0
- package/lib/resources/payment_options.cjs +45 -0
- package/lib/resources/payment_options.d.cts +4 -0
- package/lib/resources/payment_options.d.ts +4 -0
- package/lib/resources/payment_options.js +41 -0
- package/lib/resources/paypal_gateways.cjs +49 -0
- package/lib/resources/paypal_gateways.d.cts +4 -0
- package/lib/resources/paypal_gateways.d.ts +4 -0
- package/lib/resources/paypal_gateways.js +45 -0
- package/lib/resources/paypal_payments.cjs +49 -0
- package/lib/resources/paypal_payments.d.cts +4 -0
- package/lib/resources/paypal_payments.d.ts +4 -0
- package/lib/resources/paypal_payments.js +45 -0
- package/lib/resources/percentage_discount_promotions.cjs +91 -0
- package/lib/resources/percentage_discount_promotions.d.cts +4 -0
- package/lib/resources/percentage_discount_promotions.d.ts +4 -0
- package/lib/resources/percentage_discount_promotions.js +87 -0
- package/lib/resources/pickups.cjs +40 -0
- package/lib/resources/pickups.d.cts +4 -0
- package/lib/resources/pickups.d.ts +4 -0
- package/lib/resources/pickups.js +36 -0
- package/lib/resources/price_frequency_tiers.cjs +53 -0
- package/lib/resources/price_frequency_tiers.d.cts +4 -0
- package/lib/resources/price_frequency_tiers.d.ts +4 -0
- package/lib/resources/price_frequency_tiers.js +49 -0
- package/lib/resources/price_list_schedulers.cjs +59 -0
- package/lib/resources/price_list_schedulers.d.cts +4 -0
- package/lib/resources/price_list_schedulers.d.ts +4 -0
- package/lib/resources/price_list_schedulers.js +55 -0
- package/lib/resources/price_lists.cjs +53 -0
- package/lib/resources/price_lists.d.cts +4 -0
- package/lib/resources/price_lists.d.ts +4 -0
- package/lib/resources/price_lists.js +49 -0
- package/lib/resources/price_tiers.cjs +40 -0
- package/lib/resources/price_tiers.d.cts +4 -0
- package/lib/resources/price_tiers.d.ts +4 -0
- package/lib/resources/price_tiers.js +36 -0
- package/lib/resources/price_volume_tiers.cjs +53 -0
- package/lib/resources/price_volume_tiers.d.cts +4 -0
- package/lib/resources/price_volume_tiers.d.ts +4 -0
- package/lib/resources/price_volume_tiers.js +49 -0
- package/lib/resources/prices.cjs +77 -0
- package/lib/resources/prices.d.cts +4 -0
- package/lib/resources/prices.d.ts +4 -0
- package/lib/resources/prices.js +73 -0
- package/lib/resources/promotion_rules.cjs +32 -0
- package/lib/resources/promotion_rules.d.cts +4 -0
- package/lib/resources/promotion_rules.d.ts +4 -0
- package/lib/resources/promotion_rules.js +28 -0
- package/lib/resources/promotions.cjs +72 -0
- package/lib/resources/promotions.d.cts +4 -0
- package/lib/resources/promotions.d.ts +4 -0
- package/lib/resources/promotions.js +68 -0
- package/lib/resources/recurring_order_copies.cjs +53 -0
- package/lib/resources/recurring_order_copies.d.cts +4 -0
- package/lib/resources/recurring_order_copies.d.ts +4 -0
- package/lib/resources/recurring_order_copies.js +49 -0
- package/lib/resources/refunds.cjs +58 -0
- package/lib/resources/refunds.d.cts +4 -0
- package/lib/resources/refunds.d.ts +4 -0
- package/lib/resources/refunds.js +54 -0
- package/lib/resources/reserved_stocks.cjs +44 -0
- package/lib/resources/reserved_stocks.d.cts +4 -0
- package/lib/resources/reserved_stocks.d.ts +4 -0
- package/lib/resources/reserved_stocks.js +40 -0
- package/lib/resources/resource_errors.cjs +28 -0
- package/lib/resources/resource_errors.d.cts +4 -0
- package/lib/resources/resource_errors.d.ts +4 -0
- package/lib/resources/resource_errors.js +24 -0
- package/lib/resources/return_line_items.cjs +48 -0
- package/lib/resources/return_line_items.d.cts +4 -0
- package/lib/resources/return_line_items.d.ts +4 -0
- package/lib/resources/return_line_items.js +44 -0
- package/lib/resources/returns.cjs +122 -0
- package/lib/resources/returns.d.cts +4 -0
- package/lib/resources/returns.d.ts +4 -0
- package/lib/resources/returns.js +118 -0
- package/lib/resources/satispay_gateways.cjs +49 -0
- package/lib/resources/satispay_gateways.d.cts +4 -0
- package/lib/resources/satispay_gateways.d.ts +4 -0
- package/lib/resources/satispay_gateways.js +45 -0
- package/lib/resources/satispay_payments.cjs +52 -0
- package/lib/resources/satispay_payments.d.cts +4 -0
- package/lib/resources/satispay_payments.d.ts +4 -0
- package/lib/resources/satispay_payments.js +48 -0
- package/lib/resources/shipments.cjs +152 -0
- package/lib/resources/shipments.d.cts +4 -0
- package/lib/resources/shipments.d.ts +4 -0
- package/lib/resources/shipments.js +148 -0
- package/lib/resources/shipping_categories.cjs +49 -0
- package/lib/resources/shipping_categories.d.cts +4 -0
- package/lib/resources/shipping_categories.d.ts +4 -0
- package/lib/resources/shipping_categories.js +45 -0
- package/lib/resources/shipping_method_tiers.cjs +40 -0
- package/lib/resources/shipping_method_tiers.d.cts +4 -0
- package/lib/resources/shipping_method_tiers.d.ts +4 -0
- package/lib/resources/shipping_method_tiers.js +36 -0
- package/lib/resources/shipping_methods.cjs +86 -0
- package/lib/resources/shipping_methods.d.cts +4 -0
- package/lib/resources/shipping_methods.d.ts +4 -0
- package/lib/resources/shipping_methods.js +82 -0
- package/lib/resources/shipping_weight_tiers.cjs +49 -0
- package/lib/resources/shipping_weight_tiers.d.cts +4 -0
- package/lib/resources/shipping_weight_tiers.d.ts +4 -0
- package/lib/resources/shipping_weight_tiers.js +45 -0
- package/lib/resources/shipping_zones.cjs +45 -0
- package/lib/resources/shipping_zones.d.cts +4 -0
- package/lib/resources/shipping_zones.d.ts +4 -0
- package/lib/resources/shipping_zones.js +41 -0
- package/lib/resources/sku_list_items.cjs +49 -0
- package/lib/resources/sku_list_items.d.cts +4 -0
- package/lib/resources/sku_list_items.d.ts +4 -0
- package/lib/resources/sku_list_items.js +45 -0
- package/lib/resources/sku_list_promotion_rules.cjs +49 -0
- package/lib/resources/sku_list_promotion_rules.d.cts +4 -0
- package/lib/resources/sku_list_promotion_rules.d.ts +4 -0
- package/lib/resources/sku_list_promotion_rules.js +45 -0
- package/lib/resources/sku_lists.cjs +65 -0
- package/lib/resources/sku_lists.d.cts +4 -0
- package/lib/resources/sku_lists.d.ts +4 -0
- package/lib/resources/sku_lists.js +61 -0
- package/lib/resources/sku_options.cjs +57 -0
- package/lib/resources/sku_options.d.cts +4 -0
- package/lib/resources/sku_options.d.ts +4 -0
- package/lib/resources/sku_options.js +53 -0
- package/lib/resources/skus.cjs +101 -0
- package/lib/resources/skus.d.cts +4 -0
- package/lib/resources/skus.d.ts +4 -0
- package/lib/resources/skus.js +97 -0
- package/lib/resources/stock_items.cjs +64 -0
- package/lib/resources/stock_items.d.cts +4 -0
- package/lib/resources/stock_items.d.ts +4 -0
- package/lib/resources/stock_items.js +60 -0
- package/lib/resources/stock_line_items.cjs +70 -0
- package/lib/resources/stock_line_items.d.cts +4 -0
- package/lib/resources/stock_line_items.d.ts +4 -0
- package/lib/resources/stock_line_items.js +66 -0
- package/lib/resources/stock_locations.cjs +69 -0
- package/lib/resources/stock_locations.d.cts +4 -0
- package/lib/resources/stock_locations.d.ts +4 -0
- package/lib/resources/stock_locations.js +65 -0
- package/lib/resources/stock_reservations.cjs +68 -0
- package/lib/resources/stock_reservations.d.cts +4 -0
- package/lib/resources/stock_reservations.d.ts +4 -0
- package/lib/resources/stock_reservations.js +64 -0
- package/lib/resources/stock_transfers.cjs +91 -0
- package/lib/resources/stock_transfers.d.cts +4 -0
- package/lib/resources/stock_transfers.d.ts +4 -0
- package/lib/resources/stock_transfers.js +87 -0
- package/lib/resources/stores.cjs +65 -0
- package/lib/resources/stores.d.cts +4 -0
- package/lib/resources/stores.d.ts +4 -0
- package/lib/resources/stores.js +61 -0
- package/lib/resources/stripe_gateways.cjs +49 -0
- package/lib/resources/stripe_gateways.d.cts +4 -0
- package/lib/resources/stripe_gateways.d.ts +4 -0
- package/lib/resources/stripe_gateways.js +45 -0
- package/lib/resources/stripe_payments.cjs +55 -0
- package/lib/resources/stripe_payments.d.cts +4 -0
- package/lib/resources/stripe_payments.d.ts +4 -0
- package/lib/resources/stripe_payments.js +51 -0
- package/lib/resources/stripe_tax_accounts.cjs +57 -0
- package/lib/resources/stripe_tax_accounts.d.cts +4 -0
- package/lib/resources/stripe_tax_accounts.d.ts +4 -0
- package/lib/resources/stripe_tax_accounts.js +53 -0
- package/lib/resources/subscription_models.cjs +49 -0
- package/lib/resources/subscription_models.d.cts +4 -0
- package/lib/resources/subscription_models.d.ts +4 -0
- package/lib/resources/subscription_models.js +45 -0
- package/lib/resources/tags.cjs +37 -0
- package/lib/resources/tags.d.cts +4 -0
- package/lib/resources/tags.d.ts +4 -0
- package/lib/resources/tags.js +33 -0
- package/lib/resources/talon_one_accounts.cjs +53 -0
- package/lib/resources/talon_one_accounts.d.cts +4 -0
- package/lib/resources/talon_one_accounts.d.ts +4 -0
- package/lib/resources/talon_one_accounts.js +49 -0
- package/lib/resources/tax_calculators.cjs +44 -0
- package/lib/resources/tax_calculators.d.cts +4 -0
- package/lib/resources/tax_calculators.d.ts +4 -0
- package/lib/resources/tax_calculators.js +40 -0
- package/lib/resources/tax_categories.cjs +49 -0
- package/lib/resources/tax_categories.d.cts +4 -0
- package/lib/resources/tax_categories.d.ts +4 -0
- package/lib/resources/tax_categories.js +45 -0
- package/lib/resources/tax_rules.cjs +45 -0
- package/lib/resources/tax_rules.d.cts +4 -0
- package/lib/resources/tax_rules.d.ts +4 -0
- package/lib/resources/tax_rules.js +41 -0
- package/lib/resources/taxjar_accounts.cjs +57 -0
- package/lib/resources/taxjar_accounts.d.cts +4 -0
- package/lib/resources/taxjar_accounts.d.ts +4 -0
- package/lib/resources/taxjar_accounts.js +53 -0
- package/lib/resources/transactions.cjs +44 -0
- package/lib/resources/transactions.d.cts +4 -0
- package/lib/resources/transactions.d.ts +4 -0
- package/lib/resources/transactions.js +40 -0
- package/lib/resources/versions.cjs +28 -0
- package/lib/resources/versions.d.cts +4 -0
- package/lib/resources/versions.d.ts +4 -0
- package/lib/resources/versions.js +24 -0
- package/lib/resources/vertex_accounts.cjs +56 -0
- package/lib/resources/vertex_accounts.d.cts +4 -0
- package/lib/resources/vertex_accounts.d.ts +4 -0
- package/lib/resources/vertex_accounts.js +52 -0
- package/lib/resources/voids.cjs +54 -0
- package/lib/resources/voids.d.cts +4 -0
- package/lib/resources/voids.d.ts +4 -0
- package/lib/resources/voids.js +50 -0
- package/lib/resources/webhooks.cjs +54 -0
- package/lib/resources/webhooks.d.cts +4 -0
- package/lib/resources/webhooks.d.ts +4 -0
- package/lib/resources/webhooks.js +50 -0
- package/lib/resources/wire_transfers.cjs +45 -0
- package/lib/resources/wire_transfers.d.cts +4 -0
- package/lib/resources/wire_transfers.d.ts +4 -0
- package/lib/resources/wire_transfers.js +41 -0
- package/lib/static.cjs +39 -0
- package/lib/static.d.cts +19 -0
- package/lib/static.d.ts +19 -0
- package/lib/static.js +33 -0
- package/lib/types.cjs +2 -0
- package/lib/types.d.cts +7 -0
- package/lib/types.d.ts +7 -0
- package/lib/types.js +1 -0
- package/lib/util.cjs +37 -0
- package/lib/util.d.cts +13 -0
- package/lib/util.d.ts +13 -0
- package/lib/util.js +32 -0
- package/package.json +12 -10
@@ -0,0 +1,152 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
var resource = require('../resource');
|
4
|
+
|
5
|
+
var __defProp = Object.defineProperty;
|
6
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
7
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, key + "" , value);
|
8
|
+
const _Shipments = class _Shipments extends resource.ApiResource {
|
9
|
+
async create(resource, params, options) {
|
10
|
+
return this.resources.create({ ...resource, type: _Shipments.TYPE }, params, options);
|
11
|
+
}
|
12
|
+
async update(resource, params, options) {
|
13
|
+
return this.resources.update({ ...resource, type: _Shipments.TYPE }, params, options);
|
14
|
+
}
|
15
|
+
async delete(id, options) {
|
16
|
+
await this.resources.delete(typeof id === "string" ? { id, type: _Shipments.TYPE } : id, options);
|
17
|
+
}
|
18
|
+
async order(shipmentId, params, options) {
|
19
|
+
const _shipmentId = shipmentId.id || shipmentId;
|
20
|
+
return this.resources.fetch({ type: "orders" }, `shipments/${_shipmentId}/order`, params, options);
|
21
|
+
}
|
22
|
+
async shipping_category(shipmentId, params, options) {
|
23
|
+
const _shipmentId = shipmentId.id || shipmentId;
|
24
|
+
return this.resources.fetch({ type: "shipping_categories" }, `shipments/${_shipmentId}/shipping_category`, params, options);
|
25
|
+
}
|
26
|
+
async inventory_stock_location(shipmentId, params, options) {
|
27
|
+
const _shipmentId = shipmentId.id || shipmentId;
|
28
|
+
return this.resources.fetch({ type: "inventory_stock_locations" }, `shipments/${_shipmentId}/inventory_stock_location`, params, options);
|
29
|
+
}
|
30
|
+
async stock_location(shipmentId, params, options) {
|
31
|
+
const _shipmentId = shipmentId.id || shipmentId;
|
32
|
+
return this.resources.fetch({ type: "stock_locations" }, `shipments/${_shipmentId}/stock_location`, params, options);
|
33
|
+
}
|
34
|
+
async origin_address(shipmentId, params, options) {
|
35
|
+
const _shipmentId = shipmentId.id || shipmentId;
|
36
|
+
return this.resources.fetch({ type: "addresses" }, `shipments/${_shipmentId}/origin_address`, params, options);
|
37
|
+
}
|
38
|
+
async shipping_address(shipmentId, params, options) {
|
39
|
+
const _shipmentId = shipmentId.id || shipmentId;
|
40
|
+
return this.resources.fetch({ type: "addresses" }, `shipments/${_shipmentId}/shipping_address`, params, options);
|
41
|
+
}
|
42
|
+
async shipping_method(shipmentId, params, options) {
|
43
|
+
const _shipmentId = shipmentId.id || shipmentId;
|
44
|
+
return this.resources.fetch({ type: "shipping_methods" }, `shipments/${_shipmentId}/shipping_method`, params, options);
|
45
|
+
}
|
46
|
+
async delivery_lead_time(shipmentId, params, options) {
|
47
|
+
const _shipmentId = shipmentId.id || shipmentId;
|
48
|
+
return this.resources.fetch({ type: "delivery_lead_times" }, `shipments/${_shipmentId}/delivery_lead_time`, params, options);
|
49
|
+
}
|
50
|
+
async pickup(shipmentId, params, options) {
|
51
|
+
const _shipmentId = shipmentId.id || shipmentId;
|
52
|
+
return this.resources.fetch({ type: "pickups" }, `shipments/${_shipmentId}/pickup`, params, options);
|
53
|
+
}
|
54
|
+
async stock_line_items(shipmentId, params, options) {
|
55
|
+
const _shipmentId = shipmentId.id || shipmentId;
|
56
|
+
return this.resources.fetch({ type: "stock_line_items" }, `shipments/${_shipmentId}/stock_line_items`, params, options);
|
57
|
+
}
|
58
|
+
async stock_transfers(shipmentId, params, options) {
|
59
|
+
const _shipmentId = shipmentId.id || shipmentId;
|
60
|
+
return this.resources.fetch({ type: "stock_transfers" }, `shipments/${_shipmentId}/stock_transfers`, params, options);
|
61
|
+
}
|
62
|
+
async line_items(shipmentId, params, options) {
|
63
|
+
const _shipmentId = shipmentId.id || shipmentId;
|
64
|
+
return this.resources.fetch({ type: "line_items" }, `shipments/${_shipmentId}/line_items`, params, options);
|
65
|
+
}
|
66
|
+
async available_shipping_methods(shipmentId, params, options) {
|
67
|
+
const _shipmentId = shipmentId.id || shipmentId;
|
68
|
+
return this.resources.fetch({ type: "shipping_methods" }, `shipments/${_shipmentId}/available_shipping_methods`, params, options);
|
69
|
+
}
|
70
|
+
async carrier_accounts(shipmentId, params, options) {
|
71
|
+
const _shipmentId = shipmentId.id || shipmentId;
|
72
|
+
return this.resources.fetch({ type: "carrier_accounts" }, `shipments/${_shipmentId}/carrier_accounts`, params, options);
|
73
|
+
}
|
74
|
+
async parcels(shipmentId, params, options) {
|
75
|
+
const _shipmentId = shipmentId.id || shipmentId;
|
76
|
+
return this.resources.fetch({ type: "parcels" }, `shipments/${_shipmentId}/parcels`, params, options);
|
77
|
+
}
|
78
|
+
async attachments(shipmentId, params, options) {
|
79
|
+
const _shipmentId = shipmentId.id || shipmentId;
|
80
|
+
return this.resources.fetch({ type: "attachments" }, `shipments/${_shipmentId}/attachments`, params, options);
|
81
|
+
}
|
82
|
+
async events(shipmentId, params, options) {
|
83
|
+
const _shipmentId = shipmentId.id || shipmentId;
|
84
|
+
return this.resources.fetch({ type: "events" }, `shipments/${_shipmentId}/events`, params, options);
|
85
|
+
}
|
86
|
+
async tags(shipmentId, params, options) {
|
87
|
+
const _shipmentId = shipmentId.id || shipmentId;
|
88
|
+
return this.resources.fetch({ type: "tags" }, `shipments/${_shipmentId}/tags`, params, options);
|
89
|
+
}
|
90
|
+
async versions(shipmentId, params, options) {
|
91
|
+
const _shipmentId = shipmentId.id || shipmentId;
|
92
|
+
return this.resources.fetch({ type: "versions" }, `shipments/${_shipmentId}/versions`, params, options);
|
93
|
+
}
|
94
|
+
async _upcoming(id, params, options) {
|
95
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Shipments.TYPE, _upcoming: true }, params, options);
|
96
|
+
}
|
97
|
+
async _cancel(id, params, options) {
|
98
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Shipments.TYPE, _cancel: true }, params, options);
|
99
|
+
}
|
100
|
+
async _on_hold(id, params, options) {
|
101
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Shipments.TYPE, _on_hold: true }, params, options);
|
102
|
+
}
|
103
|
+
async _picking(id, params, options) {
|
104
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Shipments.TYPE, _picking: true }, params, options);
|
105
|
+
}
|
106
|
+
async _packing(id, params, options) {
|
107
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Shipments.TYPE, _packing: true }, params, options);
|
108
|
+
}
|
109
|
+
async _ready_to_ship(id, params, options) {
|
110
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Shipments.TYPE, _ready_to_ship: true }, params, options);
|
111
|
+
}
|
112
|
+
async _ship(id, params, options) {
|
113
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Shipments.TYPE, _ship: true }, params, options);
|
114
|
+
}
|
115
|
+
async _deliver(id, params, options) {
|
116
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Shipments.TYPE, _deliver: true }, params, options);
|
117
|
+
}
|
118
|
+
async _reserve_stock(id, params, options) {
|
119
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Shipments.TYPE, _reserve_stock: true }, params, options);
|
120
|
+
}
|
121
|
+
async _release_stock(id, params, options) {
|
122
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Shipments.TYPE, _release_stock: true }, params, options);
|
123
|
+
}
|
124
|
+
async _decrement_stock(id, params, options) {
|
125
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Shipments.TYPE, _decrement_stock: true }, params, options);
|
126
|
+
}
|
127
|
+
async _get_rates(id, params, options) {
|
128
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Shipments.TYPE, _get_rates: true }, params, options);
|
129
|
+
}
|
130
|
+
async _purchase(id, params, options) {
|
131
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Shipments.TYPE, _purchase: true }, params, options);
|
132
|
+
}
|
133
|
+
isShipment(resource) {
|
134
|
+
return resource.type && resource.type === _Shipments.TYPE;
|
135
|
+
}
|
136
|
+
relationship(id) {
|
137
|
+
return super.relationshipOneToOne(id);
|
138
|
+
}
|
139
|
+
relationshipToMany(...ids) {
|
140
|
+
return super.relationshipOneToMany(...ids);
|
141
|
+
}
|
142
|
+
type() {
|
143
|
+
return _Shipments.TYPE;
|
144
|
+
}
|
145
|
+
};
|
146
|
+
__publicField(_Shipments, "TYPE", "shipments");
|
147
|
+
let Shipments = _Shipments;
|
148
|
+
var shipments_default = Shipments;
|
149
|
+
|
150
|
+
module.exports = shipments_default;
|
151
|
+
|
152
|
+
module.exports = exports.default;
|
@@ -0,0 +1,148 @@
|
|
1
|
+
import { ApiResource } from '../resource';
|
2
|
+
|
3
|
+
var __defProp = Object.defineProperty;
|
4
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
5
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, key + "" , value);
|
6
|
+
const _Shipments = class _Shipments extends ApiResource {
|
7
|
+
async create(resource, params, options) {
|
8
|
+
return this.resources.create({ ...resource, type: _Shipments.TYPE }, params, options);
|
9
|
+
}
|
10
|
+
async update(resource, params, options) {
|
11
|
+
return this.resources.update({ ...resource, type: _Shipments.TYPE }, params, options);
|
12
|
+
}
|
13
|
+
async delete(id, options) {
|
14
|
+
await this.resources.delete(typeof id === "string" ? { id, type: _Shipments.TYPE } : id, options);
|
15
|
+
}
|
16
|
+
async order(shipmentId, params, options) {
|
17
|
+
const _shipmentId = shipmentId.id || shipmentId;
|
18
|
+
return this.resources.fetch({ type: "orders" }, `shipments/${_shipmentId}/order`, params, options);
|
19
|
+
}
|
20
|
+
async shipping_category(shipmentId, params, options) {
|
21
|
+
const _shipmentId = shipmentId.id || shipmentId;
|
22
|
+
return this.resources.fetch({ type: "shipping_categories" }, `shipments/${_shipmentId}/shipping_category`, params, options);
|
23
|
+
}
|
24
|
+
async inventory_stock_location(shipmentId, params, options) {
|
25
|
+
const _shipmentId = shipmentId.id || shipmentId;
|
26
|
+
return this.resources.fetch({ type: "inventory_stock_locations" }, `shipments/${_shipmentId}/inventory_stock_location`, params, options);
|
27
|
+
}
|
28
|
+
async stock_location(shipmentId, params, options) {
|
29
|
+
const _shipmentId = shipmentId.id || shipmentId;
|
30
|
+
return this.resources.fetch({ type: "stock_locations" }, `shipments/${_shipmentId}/stock_location`, params, options);
|
31
|
+
}
|
32
|
+
async origin_address(shipmentId, params, options) {
|
33
|
+
const _shipmentId = shipmentId.id || shipmentId;
|
34
|
+
return this.resources.fetch({ type: "addresses" }, `shipments/${_shipmentId}/origin_address`, params, options);
|
35
|
+
}
|
36
|
+
async shipping_address(shipmentId, params, options) {
|
37
|
+
const _shipmentId = shipmentId.id || shipmentId;
|
38
|
+
return this.resources.fetch({ type: "addresses" }, `shipments/${_shipmentId}/shipping_address`, params, options);
|
39
|
+
}
|
40
|
+
async shipping_method(shipmentId, params, options) {
|
41
|
+
const _shipmentId = shipmentId.id || shipmentId;
|
42
|
+
return this.resources.fetch({ type: "shipping_methods" }, `shipments/${_shipmentId}/shipping_method`, params, options);
|
43
|
+
}
|
44
|
+
async delivery_lead_time(shipmentId, params, options) {
|
45
|
+
const _shipmentId = shipmentId.id || shipmentId;
|
46
|
+
return this.resources.fetch({ type: "delivery_lead_times" }, `shipments/${_shipmentId}/delivery_lead_time`, params, options);
|
47
|
+
}
|
48
|
+
async pickup(shipmentId, params, options) {
|
49
|
+
const _shipmentId = shipmentId.id || shipmentId;
|
50
|
+
return this.resources.fetch({ type: "pickups" }, `shipments/${_shipmentId}/pickup`, params, options);
|
51
|
+
}
|
52
|
+
async stock_line_items(shipmentId, params, options) {
|
53
|
+
const _shipmentId = shipmentId.id || shipmentId;
|
54
|
+
return this.resources.fetch({ type: "stock_line_items" }, `shipments/${_shipmentId}/stock_line_items`, params, options);
|
55
|
+
}
|
56
|
+
async stock_transfers(shipmentId, params, options) {
|
57
|
+
const _shipmentId = shipmentId.id || shipmentId;
|
58
|
+
return this.resources.fetch({ type: "stock_transfers" }, `shipments/${_shipmentId}/stock_transfers`, params, options);
|
59
|
+
}
|
60
|
+
async line_items(shipmentId, params, options) {
|
61
|
+
const _shipmentId = shipmentId.id || shipmentId;
|
62
|
+
return this.resources.fetch({ type: "line_items" }, `shipments/${_shipmentId}/line_items`, params, options);
|
63
|
+
}
|
64
|
+
async available_shipping_methods(shipmentId, params, options) {
|
65
|
+
const _shipmentId = shipmentId.id || shipmentId;
|
66
|
+
return this.resources.fetch({ type: "shipping_methods" }, `shipments/${_shipmentId}/available_shipping_methods`, params, options);
|
67
|
+
}
|
68
|
+
async carrier_accounts(shipmentId, params, options) {
|
69
|
+
const _shipmentId = shipmentId.id || shipmentId;
|
70
|
+
return this.resources.fetch({ type: "carrier_accounts" }, `shipments/${_shipmentId}/carrier_accounts`, params, options);
|
71
|
+
}
|
72
|
+
async parcels(shipmentId, params, options) {
|
73
|
+
const _shipmentId = shipmentId.id || shipmentId;
|
74
|
+
return this.resources.fetch({ type: "parcels" }, `shipments/${_shipmentId}/parcels`, params, options);
|
75
|
+
}
|
76
|
+
async attachments(shipmentId, params, options) {
|
77
|
+
const _shipmentId = shipmentId.id || shipmentId;
|
78
|
+
return this.resources.fetch({ type: "attachments" }, `shipments/${_shipmentId}/attachments`, params, options);
|
79
|
+
}
|
80
|
+
async events(shipmentId, params, options) {
|
81
|
+
const _shipmentId = shipmentId.id || shipmentId;
|
82
|
+
return this.resources.fetch({ type: "events" }, `shipments/${_shipmentId}/events`, params, options);
|
83
|
+
}
|
84
|
+
async tags(shipmentId, params, options) {
|
85
|
+
const _shipmentId = shipmentId.id || shipmentId;
|
86
|
+
return this.resources.fetch({ type: "tags" }, `shipments/${_shipmentId}/tags`, params, options);
|
87
|
+
}
|
88
|
+
async versions(shipmentId, params, options) {
|
89
|
+
const _shipmentId = shipmentId.id || shipmentId;
|
90
|
+
return this.resources.fetch({ type: "versions" }, `shipments/${_shipmentId}/versions`, params, options);
|
91
|
+
}
|
92
|
+
async _upcoming(id, params, options) {
|
93
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Shipments.TYPE, _upcoming: true }, params, options);
|
94
|
+
}
|
95
|
+
async _cancel(id, params, options) {
|
96
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Shipments.TYPE, _cancel: true }, params, options);
|
97
|
+
}
|
98
|
+
async _on_hold(id, params, options) {
|
99
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Shipments.TYPE, _on_hold: true }, params, options);
|
100
|
+
}
|
101
|
+
async _picking(id, params, options) {
|
102
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Shipments.TYPE, _picking: true }, params, options);
|
103
|
+
}
|
104
|
+
async _packing(id, params, options) {
|
105
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Shipments.TYPE, _packing: true }, params, options);
|
106
|
+
}
|
107
|
+
async _ready_to_ship(id, params, options) {
|
108
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Shipments.TYPE, _ready_to_ship: true }, params, options);
|
109
|
+
}
|
110
|
+
async _ship(id, params, options) {
|
111
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Shipments.TYPE, _ship: true }, params, options);
|
112
|
+
}
|
113
|
+
async _deliver(id, params, options) {
|
114
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Shipments.TYPE, _deliver: true }, params, options);
|
115
|
+
}
|
116
|
+
async _reserve_stock(id, params, options) {
|
117
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Shipments.TYPE, _reserve_stock: true }, params, options);
|
118
|
+
}
|
119
|
+
async _release_stock(id, params, options) {
|
120
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Shipments.TYPE, _release_stock: true }, params, options);
|
121
|
+
}
|
122
|
+
async _decrement_stock(id, params, options) {
|
123
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Shipments.TYPE, _decrement_stock: true }, params, options);
|
124
|
+
}
|
125
|
+
async _get_rates(id, params, options) {
|
126
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Shipments.TYPE, _get_rates: true }, params, options);
|
127
|
+
}
|
128
|
+
async _purchase(id, params, options) {
|
129
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Shipments.TYPE, _purchase: true }, params, options);
|
130
|
+
}
|
131
|
+
isShipment(resource) {
|
132
|
+
return resource.type && resource.type === _Shipments.TYPE;
|
133
|
+
}
|
134
|
+
relationship(id) {
|
135
|
+
return super.relationshipOneToOne(id);
|
136
|
+
}
|
137
|
+
relationshipToMany(...ids) {
|
138
|
+
return super.relationshipOneToMany(...ids);
|
139
|
+
}
|
140
|
+
type() {
|
141
|
+
return _Shipments.TYPE;
|
142
|
+
}
|
143
|
+
};
|
144
|
+
__publicField(_Shipments, "TYPE", "shipments");
|
145
|
+
let Shipments = _Shipments;
|
146
|
+
var shipments_default = Shipments;
|
147
|
+
|
148
|
+
export { shipments_default as default };
|
@@ -0,0 +1,49 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
var resource = require('../resource');
|
4
|
+
|
5
|
+
var __defProp = Object.defineProperty;
|
6
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
7
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, key + "" , value);
|
8
|
+
const _ShippingCategories = class _ShippingCategories extends resource.ApiResource {
|
9
|
+
async create(resource, params, options) {
|
10
|
+
return this.resources.create({ ...resource, type: _ShippingCategories.TYPE }, params, options);
|
11
|
+
}
|
12
|
+
async update(resource, params, options) {
|
13
|
+
return this.resources.update({ ...resource, type: _ShippingCategories.TYPE }, params, options);
|
14
|
+
}
|
15
|
+
async delete(id, options) {
|
16
|
+
await this.resources.delete(typeof id === "string" ? { id, type: _ShippingCategories.TYPE } : id, options);
|
17
|
+
}
|
18
|
+
async skus(shippingCategoryId, params, options) {
|
19
|
+
const _shippingCategoryId = shippingCategoryId.id || shippingCategoryId;
|
20
|
+
return this.resources.fetch({ type: "skus" }, `shipping_categories/${_shippingCategoryId}/skus`, params, options);
|
21
|
+
}
|
22
|
+
async attachments(shippingCategoryId, params, options) {
|
23
|
+
const _shippingCategoryId = shippingCategoryId.id || shippingCategoryId;
|
24
|
+
return this.resources.fetch({ type: "attachments" }, `shipping_categories/${_shippingCategoryId}/attachments`, params, options);
|
25
|
+
}
|
26
|
+
async versions(shippingCategoryId, params, options) {
|
27
|
+
const _shippingCategoryId = shippingCategoryId.id || shippingCategoryId;
|
28
|
+
return this.resources.fetch({ type: "versions" }, `shipping_categories/${_shippingCategoryId}/versions`, params, options);
|
29
|
+
}
|
30
|
+
isShippingCategory(resource) {
|
31
|
+
return resource.type && resource.type === _ShippingCategories.TYPE;
|
32
|
+
}
|
33
|
+
relationship(id) {
|
34
|
+
return super.relationshipOneToOne(id);
|
35
|
+
}
|
36
|
+
relationshipToMany(...ids) {
|
37
|
+
return super.relationshipOneToMany(...ids);
|
38
|
+
}
|
39
|
+
type() {
|
40
|
+
return _ShippingCategories.TYPE;
|
41
|
+
}
|
42
|
+
};
|
43
|
+
__publicField(_ShippingCategories, "TYPE", "shipping_categories");
|
44
|
+
let ShippingCategories = _ShippingCategories;
|
45
|
+
var shipping_categories_default = ShippingCategories;
|
46
|
+
|
47
|
+
module.exports = shipping_categories_default;
|
48
|
+
|
49
|
+
module.exports = exports.default;
|
@@ -0,0 +1,4 @@
|
|
1
|
+
export { fo as ShippingCategory, fp as ShippingCategoryCreate, fr as ShippingCategorySort, jF as ShippingCategoryType, fq as ShippingCategoryUpdate, j7 as default } from '../api-BYcswOJ0.cjs';
|
2
|
+
import '../client.cjs';
|
3
|
+
import '../interceptor-5MISI1yn.cjs';
|
4
|
+
import '../types.cjs';
|
@@ -0,0 +1,4 @@
|
|
1
|
+
export { fo as ShippingCategory, fp as ShippingCategoryCreate, fr as ShippingCategorySort, jF as ShippingCategoryType, fq as ShippingCategoryUpdate, j7 as default } from '../api-Cknm0QL_.js';
|
2
|
+
import '../client.js';
|
3
|
+
import '../interceptor-5MISI1yn.js';
|
4
|
+
import '../types.js';
|
@@ -0,0 +1,45 @@
|
|
1
|
+
import { ApiResource } from '../resource';
|
2
|
+
|
3
|
+
var __defProp = Object.defineProperty;
|
4
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
5
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, key + "" , value);
|
6
|
+
const _ShippingCategories = class _ShippingCategories extends ApiResource {
|
7
|
+
async create(resource, params, options) {
|
8
|
+
return this.resources.create({ ...resource, type: _ShippingCategories.TYPE }, params, options);
|
9
|
+
}
|
10
|
+
async update(resource, params, options) {
|
11
|
+
return this.resources.update({ ...resource, type: _ShippingCategories.TYPE }, params, options);
|
12
|
+
}
|
13
|
+
async delete(id, options) {
|
14
|
+
await this.resources.delete(typeof id === "string" ? { id, type: _ShippingCategories.TYPE } : id, options);
|
15
|
+
}
|
16
|
+
async skus(shippingCategoryId, params, options) {
|
17
|
+
const _shippingCategoryId = shippingCategoryId.id || shippingCategoryId;
|
18
|
+
return this.resources.fetch({ type: "skus" }, `shipping_categories/${_shippingCategoryId}/skus`, params, options);
|
19
|
+
}
|
20
|
+
async attachments(shippingCategoryId, params, options) {
|
21
|
+
const _shippingCategoryId = shippingCategoryId.id || shippingCategoryId;
|
22
|
+
return this.resources.fetch({ type: "attachments" }, `shipping_categories/${_shippingCategoryId}/attachments`, params, options);
|
23
|
+
}
|
24
|
+
async versions(shippingCategoryId, params, options) {
|
25
|
+
const _shippingCategoryId = shippingCategoryId.id || shippingCategoryId;
|
26
|
+
return this.resources.fetch({ type: "versions" }, `shipping_categories/${_shippingCategoryId}/versions`, params, options);
|
27
|
+
}
|
28
|
+
isShippingCategory(resource) {
|
29
|
+
return resource.type && resource.type === _ShippingCategories.TYPE;
|
30
|
+
}
|
31
|
+
relationship(id) {
|
32
|
+
return super.relationshipOneToOne(id);
|
33
|
+
}
|
34
|
+
relationshipToMany(...ids) {
|
35
|
+
return super.relationshipOneToMany(...ids);
|
36
|
+
}
|
37
|
+
type() {
|
38
|
+
return _ShippingCategories.TYPE;
|
39
|
+
}
|
40
|
+
};
|
41
|
+
__publicField(_ShippingCategories, "TYPE", "shipping_categories");
|
42
|
+
let ShippingCategories = _ShippingCategories;
|
43
|
+
var shipping_categories_default = ShippingCategories;
|
44
|
+
|
45
|
+
export { shipping_categories_default as default };
|
@@ -0,0 +1,40 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
var resource = require('../resource');
|
4
|
+
|
5
|
+
var __defProp = Object.defineProperty;
|
6
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
7
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, key + "" , value);
|
8
|
+
const _ShippingMethodTiers = class _ShippingMethodTiers extends resource.ApiResource {
|
9
|
+
async shipping_method(shippingMethodTierId, params, options) {
|
10
|
+
const _shippingMethodTierId = shippingMethodTierId.id || shippingMethodTierId;
|
11
|
+
return this.resources.fetch({ type: "shipping_methods" }, `shipping_method_tiers/${_shippingMethodTierId}/shipping_method`, params, options);
|
12
|
+
}
|
13
|
+
async attachments(shippingMethodTierId, params, options) {
|
14
|
+
const _shippingMethodTierId = shippingMethodTierId.id || shippingMethodTierId;
|
15
|
+
return this.resources.fetch({ type: "attachments" }, `shipping_method_tiers/${_shippingMethodTierId}/attachments`, params, options);
|
16
|
+
}
|
17
|
+
async versions(shippingMethodTierId, params, options) {
|
18
|
+
const _shippingMethodTierId = shippingMethodTierId.id || shippingMethodTierId;
|
19
|
+
return this.resources.fetch({ type: "versions" }, `shipping_method_tiers/${_shippingMethodTierId}/versions`, params, options);
|
20
|
+
}
|
21
|
+
isShippingMethodTier(resource) {
|
22
|
+
return resource.type && resource.type === _ShippingMethodTiers.TYPE;
|
23
|
+
}
|
24
|
+
relationship(id) {
|
25
|
+
return super.relationshipOneToOne(id);
|
26
|
+
}
|
27
|
+
relationshipToMany(...ids) {
|
28
|
+
return super.relationshipOneToMany(...ids);
|
29
|
+
}
|
30
|
+
type() {
|
31
|
+
return _ShippingMethodTiers.TYPE;
|
32
|
+
}
|
33
|
+
};
|
34
|
+
__publicField(_ShippingMethodTiers, "TYPE", "shipping_method_tiers");
|
35
|
+
let ShippingMethodTiers = _ShippingMethodTiers;
|
36
|
+
var shipping_method_tiers_default = ShippingMethodTiers;
|
37
|
+
|
38
|
+
module.exports = shipping_method_tiers_default;
|
39
|
+
|
40
|
+
module.exports = exports.default;
|
@@ -0,0 +1,36 @@
|
|
1
|
+
import { ApiResource } from '../resource';
|
2
|
+
|
3
|
+
var __defProp = Object.defineProperty;
|
4
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
5
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, key + "" , value);
|
6
|
+
const _ShippingMethodTiers = class _ShippingMethodTiers extends ApiResource {
|
7
|
+
async shipping_method(shippingMethodTierId, params, options) {
|
8
|
+
const _shippingMethodTierId = shippingMethodTierId.id || shippingMethodTierId;
|
9
|
+
return this.resources.fetch({ type: "shipping_methods" }, `shipping_method_tiers/${_shippingMethodTierId}/shipping_method`, params, options);
|
10
|
+
}
|
11
|
+
async attachments(shippingMethodTierId, params, options) {
|
12
|
+
const _shippingMethodTierId = shippingMethodTierId.id || shippingMethodTierId;
|
13
|
+
return this.resources.fetch({ type: "attachments" }, `shipping_method_tiers/${_shippingMethodTierId}/attachments`, params, options);
|
14
|
+
}
|
15
|
+
async versions(shippingMethodTierId, params, options) {
|
16
|
+
const _shippingMethodTierId = shippingMethodTierId.id || shippingMethodTierId;
|
17
|
+
return this.resources.fetch({ type: "versions" }, `shipping_method_tiers/${_shippingMethodTierId}/versions`, params, options);
|
18
|
+
}
|
19
|
+
isShippingMethodTier(resource) {
|
20
|
+
return resource.type && resource.type === _ShippingMethodTiers.TYPE;
|
21
|
+
}
|
22
|
+
relationship(id) {
|
23
|
+
return super.relationshipOneToOne(id);
|
24
|
+
}
|
25
|
+
relationshipToMany(...ids) {
|
26
|
+
return super.relationshipOneToMany(...ids);
|
27
|
+
}
|
28
|
+
type() {
|
29
|
+
return _ShippingMethodTiers.TYPE;
|
30
|
+
}
|
31
|
+
};
|
32
|
+
__publicField(_ShippingMethodTiers, "TYPE", "shipping_method_tiers");
|
33
|
+
let ShippingMethodTiers = _ShippingMethodTiers;
|
34
|
+
var shipping_method_tiers_default = ShippingMethodTiers;
|
35
|
+
|
36
|
+
export { shipping_method_tiers_default as default };
|
@@ -0,0 +1,86 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
var resource = require('../resource');
|
4
|
+
|
5
|
+
var __defProp = Object.defineProperty;
|
6
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
7
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, key + "" , value);
|
8
|
+
const _ShippingMethods = class _ShippingMethods extends resource.ApiResource {
|
9
|
+
async create(resource, params, options) {
|
10
|
+
return this.resources.create({ ...resource, type: _ShippingMethods.TYPE }, params, options);
|
11
|
+
}
|
12
|
+
async update(resource, params, options) {
|
13
|
+
return this.resources.update({ ...resource, type: _ShippingMethods.TYPE }, params, options);
|
14
|
+
}
|
15
|
+
async delete(id, options) {
|
16
|
+
await this.resources.delete(typeof id === "string" ? { id, type: _ShippingMethods.TYPE } : id, options);
|
17
|
+
}
|
18
|
+
async market(shippingMethodId, params, options) {
|
19
|
+
const _shippingMethodId = shippingMethodId.id || shippingMethodId;
|
20
|
+
return this.resources.fetch({ type: "markets" }, `shipping_methods/${_shippingMethodId}/market`, params, options);
|
21
|
+
}
|
22
|
+
async shipping_zone(shippingMethodId, params, options) {
|
23
|
+
const _shippingMethodId = shippingMethodId.id || shippingMethodId;
|
24
|
+
return this.resources.fetch({ type: "shipping_zones" }, `shipping_methods/${_shippingMethodId}/shipping_zone`, params, options);
|
25
|
+
}
|
26
|
+
async shipping_category(shippingMethodId, params, options) {
|
27
|
+
const _shippingMethodId = shippingMethodId.id || shippingMethodId;
|
28
|
+
return this.resources.fetch({ type: "shipping_categories" }, `shipping_methods/${_shippingMethodId}/shipping_category`, params, options);
|
29
|
+
}
|
30
|
+
async stock_location(shippingMethodId, params, options) {
|
31
|
+
const _shippingMethodId = shippingMethodId.id || shippingMethodId;
|
32
|
+
return this.resources.fetch({ type: "stock_locations" }, `shipping_methods/${_shippingMethodId}/stock_location`, params, options);
|
33
|
+
}
|
34
|
+
async delivery_lead_time_for_shipment(shippingMethodId, params, options) {
|
35
|
+
const _shippingMethodId = shippingMethodId.id || shippingMethodId;
|
36
|
+
return this.resources.fetch({ type: "delivery_lead_times" }, `shipping_methods/${_shippingMethodId}/delivery_lead_time_for_shipment`, params, options);
|
37
|
+
}
|
38
|
+
async shipping_method_tiers(shippingMethodId, params, options) {
|
39
|
+
const _shippingMethodId = shippingMethodId.id || shippingMethodId;
|
40
|
+
return this.resources.fetch({ type: "shipping_method_tiers" }, `shipping_methods/${_shippingMethodId}/shipping_method_tiers`, params, options);
|
41
|
+
}
|
42
|
+
async shipping_weight_tiers(shippingMethodId, params, options) {
|
43
|
+
const _shippingMethodId = shippingMethodId.id || shippingMethodId;
|
44
|
+
return this.resources.fetch({ type: "shipping_weight_tiers" }, `shipping_methods/${_shippingMethodId}/shipping_weight_tiers`, params, options);
|
45
|
+
}
|
46
|
+
async attachments(shippingMethodId, params, options) {
|
47
|
+
const _shippingMethodId = shippingMethodId.id || shippingMethodId;
|
48
|
+
return this.resources.fetch({ type: "attachments" }, `shipping_methods/${_shippingMethodId}/attachments`, params, options);
|
49
|
+
}
|
50
|
+
async notifications(shippingMethodId, params, options) {
|
51
|
+
const _shippingMethodId = shippingMethodId.id || shippingMethodId;
|
52
|
+
return this.resources.fetch({ type: "notifications" }, `shipping_methods/${_shippingMethodId}/notifications`, params, options);
|
53
|
+
}
|
54
|
+
async versions(shippingMethodId, params, options) {
|
55
|
+
const _shippingMethodId = shippingMethodId.id || shippingMethodId;
|
56
|
+
return this.resources.fetch({ type: "versions" }, `shipping_methods/${_shippingMethodId}/versions`, params, options);
|
57
|
+
}
|
58
|
+
async _disable(id, params, options) {
|
59
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _ShippingMethods.TYPE, _disable: true }, params, options);
|
60
|
+
}
|
61
|
+
async _enable(id, params, options) {
|
62
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _ShippingMethods.TYPE, _enable: true }, params, options);
|
63
|
+
}
|
64
|
+
async _reset_circuit(id, params, options) {
|
65
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _ShippingMethods.TYPE, _reset_circuit: true }, params, options);
|
66
|
+
}
|
67
|
+
isShippingMethod(resource) {
|
68
|
+
return resource.type && resource.type === _ShippingMethods.TYPE;
|
69
|
+
}
|
70
|
+
relationship(id) {
|
71
|
+
return super.relationshipOneToOne(id);
|
72
|
+
}
|
73
|
+
relationshipToMany(...ids) {
|
74
|
+
return super.relationshipOneToMany(...ids);
|
75
|
+
}
|
76
|
+
type() {
|
77
|
+
return _ShippingMethods.TYPE;
|
78
|
+
}
|
79
|
+
};
|
80
|
+
__publicField(_ShippingMethods, "TYPE", "shipping_methods");
|
81
|
+
let ShippingMethods = _ShippingMethods;
|
82
|
+
var shipping_methods_default = ShippingMethods;
|
83
|
+
|
84
|
+
module.exports = shipping_methods_default;
|
85
|
+
|
86
|
+
module.exports = exports.default;
|