@commercelayer/sdk 7.0.0-rc.3 → 7.0.0-rc.4
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/README.md +2 -1
- package/lib/{api-DDgIE2i8.d.ts → api-F1F37Dud.d.ts} +27 -8
- package/lib/{api-DmIZO_Np.d.cts → api-IwWtsAqE.d.cts} +27 -8
- package/lib/api.d.cts +1 -1
- package/lib/api.d.ts +1 -1
- package/lib/bundle.cjs +568 -0
- package/lib/bundle.cjs.map +1 -0
- package/lib/bundle.d.cts +145 -0
- package/lib/bundle.d.ts +145 -0
- package/lib/bundle.js +546 -0
- package/lib/bundle.js.map +1 -0
- package/lib/commercelayer.cjs +2 -1
- package/lib/commercelayer.cjs.map +1 -1
- package/lib/commercelayer.d.cts +4 -4
- package/lib/commercelayer.d.ts +4 -4
- package/lib/commercelayer.js +2 -2
- package/lib/commercelayer.js.map +1 -1
- package/lib/enum.d.cts +1 -1
- package/lib/enum.d.ts +1 -1
- package/lib/index.d.cts +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/jsonapi.d.cts +1 -1
- package/lib/jsonapi.d.ts +1 -1
- package/lib/model.d.cts +1 -1
- package/lib/model.d.ts +1 -1
- package/lib/query.d.cts +1 -1
- package/lib/query.d.ts +1 -1
- package/lib/resource.cjs +7 -6
- package/lib/resource.cjs.map +1 -1
- package/lib/resource.d.cts +1 -1
- package/lib/resource.d.ts +1 -1
- package/lib/resource.js +7 -6
- package/lib/resource.js.map +1 -1
- package/lib/resources/addresses.cjs.map +1 -1
- package/lib/resources/addresses.d.cts +1 -1
- package/lib/resources/addresses.d.ts +1 -1
- package/lib/resources/addresses.js.map +1 -1
- package/lib/resources/adjustments.cjs.map +1 -1
- package/lib/resources/adjustments.d.cts +1 -1
- package/lib/resources/adjustments.d.ts +1 -1
- package/lib/resources/adjustments.js.map +1 -1
- package/lib/resources/adyen_gateways.cjs.map +1 -1
- package/lib/resources/adyen_gateways.d.cts +1 -1
- package/lib/resources/adyen_gateways.d.ts +1 -1
- package/lib/resources/adyen_gateways.js.map +1 -1
- package/lib/resources/adyen_payments.cjs.map +1 -1
- package/lib/resources/adyen_payments.d.cts +1 -1
- package/lib/resources/adyen_payments.d.ts +1 -1
- package/lib/resources/adyen_payments.js.map +1 -1
- package/lib/resources/applications.cjs.map +1 -1
- package/lib/resources/applications.d.cts +1 -1
- package/lib/resources/applications.d.ts +1 -1
- package/lib/resources/applications.js.map +1 -1
- package/lib/resources/attachments.cjs.map +1 -1
- package/lib/resources/attachments.d.cts +1 -1
- package/lib/resources/attachments.d.ts +1 -1
- package/lib/resources/attachments.js.map +1 -1
- package/lib/resources/authorizations.cjs.map +1 -1
- package/lib/resources/authorizations.d.cts +1 -1
- package/lib/resources/authorizations.d.ts +1 -1
- package/lib/resources/authorizations.js.map +1 -1
- package/lib/resources/avalara_accounts.cjs.map +1 -1
- package/lib/resources/avalara_accounts.d.cts +1 -1
- package/lib/resources/avalara_accounts.d.ts +1 -1
- package/lib/resources/avalara_accounts.js.map +1 -1
- package/lib/resources/axerve_gateways.cjs.map +1 -1
- package/lib/resources/axerve_gateways.d.cts +1 -1
- package/lib/resources/axerve_gateways.d.ts +1 -1
- package/lib/resources/axerve_gateways.js.map +1 -1
- package/lib/resources/axerve_payments.cjs.map +1 -1
- package/lib/resources/axerve_payments.d.cts +1 -1
- package/lib/resources/axerve_payments.d.ts +1 -1
- package/lib/resources/axerve_payments.js.map +1 -1
- package/lib/resources/bing_geocoders.cjs.map +1 -1
- package/lib/resources/bing_geocoders.d.cts +1 -1
- package/lib/resources/bing_geocoders.d.ts +1 -1
- package/lib/resources/bing_geocoders.js.map +1 -1
- package/lib/resources/braintree_gateways.cjs.map +1 -1
- package/lib/resources/braintree_gateways.d.cts +1 -1
- package/lib/resources/braintree_gateways.d.ts +1 -1
- package/lib/resources/braintree_gateways.js.map +1 -1
- package/lib/resources/braintree_payments.cjs.map +1 -1
- package/lib/resources/braintree_payments.d.cts +1 -1
- package/lib/resources/braintree_payments.d.ts +1 -1
- package/lib/resources/braintree_payments.js.map +1 -1
- package/lib/resources/bundles.cjs.map +1 -1
- package/lib/resources/bundles.d.cts +1 -1
- package/lib/resources/bundles.d.ts +1 -1
- package/lib/resources/bundles.js.map +1 -1
- package/lib/resources/buy_x_pay_y_promotions.cjs.map +1 -1
- package/lib/resources/buy_x_pay_y_promotions.d.cts +1 -1
- package/lib/resources/buy_x_pay_y_promotions.d.ts +1 -1
- package/lib/resources/buy_x_pay_y_promotions.js.map +1 -1
- package/lib/resources/captures.cjs.map +1 -1
- package/lib/resources/captures.d.cts +1 -1
- package/lib/resources/captures.d.ts +1 -1
- package/lib/resources/captures.js.map +1 -1
- package/lib/resources/carrier_accounts.cjs.map +1 -1
- package/lib/resources/carrier_accounts.d.cts +1 -1
- package/lib/resources/carrier_accounts.d.ts +1 -1
- package/lib/resources/carrier_accounts.js.map +1 -1
- package/lib/resources/checkout_com_gateways.cjs.map +1 -1
- package/lib/resources/checkout_com_gateways.d.cts +1 -1
- package/lib/resources/checkout_com_gateways.d.ts +1 -1
- package/lib/resources/checkout_com_gateways.js.map +1 -1
- package/lib/resources/checkout_com_payments.cjs.map +1 -1
- package/lib/resources/checkout_com_payments.d.cts +1 -1
- package/lib/resources/checkout_com_payments.d.ts +1 -1
- package/lib/resources/checkout_com_payments.js.map +1 -1
- package/lib/resources/cleanups.cjs.map +1 -1
- package/lib/resources/cleanups.d.cts +1 -1
- package/lib/resources/cleanups.d.ts +1 -1
- package/lib/resources/cleanups.js.map +1 -1
- package/lib/resources/coupon_codes_promotion_rules.cjs.map +1 -1
- package/lib/resources/coupon_codes_promotion_rules.d.cts +1 -1
- package/lib/resources/coupon_codes_promotion_rules.d.ts +1 -1
- package/lib/resources/coupon_codes_promotion_rules.js.map +1 -1
- package/lib/resources/coupon_recipients.cjs.map +1 -1
- package/lib/resources/coupon_recipients.d.cts +1 -1
- package/lib/resources/coupon_recipients.d.ts +1 -1
- package/lib/resources/coupon_recipients.js.map +1 -1
- package/lib/resources/coupons.cjs.map +1 -1
- package/lib/resources/coupons.d.cts +1 -1
- package/lib/resources/coupons.d.ts +1 -1
- package/lib/resources/coupons.js.map +1 -1
- package/lib/resources/custom_promotion_rules.cjs.map +1 -1
- package/lib/resources/custom_promotion_rules.d.cts +1 -1
- package/lib/resources/custom_promotion_rules.d.ts +1 -1
- package/lib/resources/custom_promotion_rules.js.map +1 -1
- package/lib/resources/customer_addresses.cjs.map +1 -1
- package/lib/resources/customer_addresses.d.cts +1 -1
- package/lib/resources/customer_addresses.d.ts +1 -1
- package/lib/resources/customer_addresses.js.map +1 -1
- package/lib/resources/customer_groups.cjs.map +1 -1
- package/lib/resources/customer_groups.d.cts +1 -1
- package/lib/resources/customer_groups.d.ts +1 -1
- package/lib/resources/customer_groups.js.map +1 -1
- package/lib/resources/customer_password_resets.cjs.map +1 -1
- package/lib/resources/customer_password_resets.d.cts +1 -1
- package/lib/resources/customer_password_resets.d.ts +1 -1
- package/lib/resources/customer_password_resets.js.map +1 -1
- package/lib/resources/customer_payment_sources.cjs.map +1 -1
- package/lib/resources/customer_payment_sources.d.cts +1 -1
- package/lib/resources/customer_payment_sources.d.ts +1 -1
- package/lib/resources/customer_payment_sources.js.map +1 -1
- package/lib/resources/customer_subscriptions.cjs.map +1 -1
- package/lib/resources/customer_subscriptions.d.cts +1 -1
- package/lib/resources/customer_subscriptions.d.ts +1 -1
- package/lib/resources/customer_subscriptions.js.map +1 -1
- package/lib/resources/customers.cjs.map +1 -1
- package/lib/resources/customers.d.cts +1 -1
- package/lib/resources/customers.d.ts +1 -1
- package/lib/resources/customers.js.map +1 -1
- package/lib/resources/delivery_lead_times.cjs.map +1 -1
- package/lib/resources/delivery_lead_times.d.cts +1 -1
- package/lib/resources/delivery_lead_times.d.ts +1 -1
- package/lib/resources/delivery_lead_times.js.map +1 -1
- package/lib/resources/discount_engine_items.cjs.map +1 -1
- package/lib/resources/discount_engine_items.d.cts +1 -1
- package/lib/resources/discount_engine_items.d.ts +1 -1
- package/lib/resources/discount_engine_items.js.map +1 -1
- package/lib/resources/discount_engines.cjs.map +1 -1
- package/lib/resources/discount_engines.d.cts +1 -1
- package/lib/resources/discount_engines.d.ts +1 -1
- package/lib/resources/discount_engines.js.map +1 -1
- package/lib/resources/easypost_pickups.cjs.map +1 -1
- package/lib/resources/easypost_pickups.d.cts +1 -1
- package/lib/resources/easypost_pickups.d.ts +1 -1
- package/lib/resources/easypost_pickups.js.map +1 -1
- package/lib/resources/event_callbacks.cjs.map +1 -1
- package/lib/resources/event_callbacks.d.cts +1 -1
- package/lib/resources/event_callbacks.d.ts +1 -1
- package/lib/resources/event_callbacks.js.map +1 -1
- package/lib/resources/events.cjs.map +1 -1
- package/lib/resources/events.d.cts +1 -1
- package/lib/resources/events.d.ts +1 -1
- package/lib/resources/events.js.map +1 -1
- package/lib/resources/exports.cjs.map +1 -1
- package/lib/resources/exports.d.cts +1 -1
- package/lib/resources/exports.d.ts +1 -1
- package/lib/resources/exports.js.map +1 -1
- package/lib/resources/external_gateways.cjs.map +1 -1
- package/lib/resources/external_gateways.d.cts +1 -1
- package/lib/resources/external_gateways.d.ts +1 -1
- package/lib/resources/external_gateways.js.map +1 -1
- package/lib/resources/external_payments.cjs.map +1 -1
- package/lib/resources/external_payments.d.cts +1 -1
- package/lib/resources/external_payments.d.ts +1 -1
- package/lib/resources/external_payments.js.map +1 -1
- package/lib/resources/external_promotions.cjs.map +1 -1
- package/lib/resources/external_promotions.d.cts +1 -1
- package/lib/resources/external_promotions.d.ts +1 -1
- package/lib/resources/external_promotions.js.map +1 -1
- package/lib/resources/external_tax_calculators.cjs.map +1 -1
- package/lib/resources/external_tax_calculators.d.cts +1 -1
- package/lib/resources/external_tax_calculators.d.ts +1 -1
- package/lib/resources/external_tax_calculators.js.map +1 -1
- package/lib/resources/fixed_amount_promotions.cjs.map +1 -1
- package/lib/resources/fixed_amount_promotions.d.cts +1 -1
- package/lib/resources/fixed_amount_promotions.d.ts +1 -1
- package/lib/resources/fixed_amount_promotions.js.map +1 -1
- package/lib/resources/fixed_price_promotions.cjs.map +1 -1
- package/lib/resources/fixed_price_promotions.d.cts +1 -1
- package/lib/resources/fixed_price_promotions.d.ts +1 -1
- package/lib/resources/fixed_price_promotions.js.map +1 -1
- package/lib/resources/flex_promotions.cjs.map +1 -1
- package/lib/resources/flex_promotions.d.cts +1 -1
- package/lib/resources/flex_promotions.d.ts +1 -1
- package/lib/resources/flex_promotions.js.map +1 -1
- package/lib/resources/free_gift_promotions.cjs.map +1 -1
- package/lib/resources/free_gift_promotions.d.cts +1 -1
- package/lib/resources/free_gift_promotions.d.ts +1 -1
- package/lib/resources/free_gift_promotions.js.map +1 -1
- package/lib/resources/free_shipping_promotions.cjs.map +1 -1
- package/lib/resources/free_shipping_promotions.d.cts +1 -1
- package/lib/resources/free_shipping_promotions.d.ts +1 -1
- package/lib/resources/free_shipping_promotions.js.map +1 -1
- package/lib/resources/geocoders.cjs.map +1 -1
- package/lib/resources/geocoders.d.cts +1 -1
- package/lib/resources/geocoders.d.ts +1 -1
- package/lib/resources/geocoders.js.map +1 -1
- package/lib/resources/gift_card_recipients.cjs.map +1 -1
- package/lib/resources/gift_card_recipients.d.cts +1 -1
- package/lib/resources/gift_card_recipients.d.ts +1 -1
- package/lib/resources/gift_card_recipients.js.map +1 -1
- package/lib/resources/gift_cards.cjs.map +1 -1
- package/lib/resources/gift_cards.d.cts +1 -1
- package/lib/resources/gift_cards.d.ts +1 -1
- package/lib/resources/gift_cards.js.map +1 -1
- package/lib/resources/google_geocoders.cjs.map +1 -1
- package/lib/resources/google_geocoders.d.cts +1 -1
- package/lib/resources/google_geocoders.d.ts +1 -1
- package/lib/resources/google_geocoders.js.map +1 -1
- package/lib/resources/imports.cjs.map +1 -1
- package/lib/resources/imports.d.cts +1 -1
- package/lib/resources/imports.d.ts +1 -1
- package/lib/resources/imports.js.map +1 -1
- package/lib/resources/in_stock_subscriptions.cjs.map +1 -1
- package/lib/resources/in_stock_subscriptions.d.cts +1 -1
- package/lib/resources/in_stock_subscriptions.d.ts +1 -1
- package/lib/resources/in_stock_subscriptions.js.map +1 -1
- package/lib/resources/inventory_models.cjs.map +1 -1
- package/lib/resources/inventory_models.d.cts +1 -1
- package/lib/resources/inventory_models.d.ts +1 -1
- package/lib/resources/inventory_models.js.map +1 -1
- package/lib/resources/inventory_return_locations.cjs.map +1 -1
- package/lib/resources/inventory_return_locations.d.cts +1 -1
- package/lib/resources/inventory_return_locations.d.ts +1 -1
- package/lib/resources/inventory_return_locations.js.map +1 -1
- package/lib/resources/inventory_stock_locations.cjs.map +1 -1
- package/lib/resources/inventory_stock_locations.d.cts +1 -1
- package/lib/resources/inventory_stock_locations.d.ts +1 -1
- package/lib/resources/inventory_stock_locations.js.map +1 -1
- package/lib/resources/klarna_gateways.cjs.map +1 -1
- package/lib/resources/klarna_gateways.d.cts +1 -1
- package/lib/resources/klarna_gateways.d.ts +1 -1
- package/lib/resources/klarna_gateways.js.map +1 -1
- package/lib/resources/klarna_payments.cjs.map +1 -1
- package/lib/resources/klarna_payments.d.cts +1 -1
- package/lib/resources/klarna_payments.d.ts +1 -1
- package/lib/resources/klarna_payments.js.map +1 -1
- package/lib/resources/line_item_options.cjs.map +1 -1
- package/lib/resources/line_item_options.d.cts +1 -1
- package/lib/resources/line_item_options.d.ts +1 -1
- package/lib/resources/line_item_options.js.map +1 -1
- package/lib/resources/line_items.cjs.map +1 -1
- package/lib/resources/line_items.d.cts +1 -1
- package/lib/resources/line_items.d.ts +1 -1
- package/lib/resources/line_items.js.map +1 -1
- package/lib/resources/links.cjs.map +1 -1
- package/lib/resources/links.d.cts +1 -1
- package/lib/resources/links.d.ts +1 -1
- package/lib/resources/links.js.map +1 -1
- package/lib/resources/manual_gateways.cjs.map +1 -1
- package/lib/resources/manual_gateways.d.cts +1 -1
- package/lib/resources/manual_gateways.d.ts +1 -1
- package/lib/resources/manual_gateways.js.map +1 -1
- package/lib/resources/manual_tax_calculators.cjs.map +1 -1
- package/lib/resources/manual_tax_calculators.d.cts +1 -1
- package/lib/resources/manual_tax_calculators.d.ts +1 -1
- package/lib/resources/manual_tax_calculators.js.map +1 -1
- package/lib/resources/markets.cjs +4 -0
- package/lib/resources/markets.cjs.map +1 -1
- package/lib/resources/markets.d.cts +1 -1
- package/lib/resources/markets.d.ts +1 -1
- package/lib/resources/markets.js +4 -0
- package/lib/resources/markets.js.map +1 -1
- package/lib/resources/merchants.cjs.map +1 -1
- package/lib/resources/merchants.d.cts +1 -1
- package/lib/resources/merchants.d.ts +1 -1
- package/lib/resources/merchants.js.map +1 -1
- package/lib/resources/notifications.cjs.map +1 -1
- package/lib/resources/notifications.d.cts +1 -1
- package/lib/resources/notifications.d.ts +1 -1
- package/lib/resources/notifications.js.map +1 -1
- package/lib/resources/order_amount_promotion_rules.cjs.map +1 -1
- package/lib/resources/order_amount_promotion_rules.d.cts +1 -1
- package/lib/resources/order_amount_promotion_rules.d.ts +1 -1
- package/lib/resources/order_amount_promotion_rules.js.map +1 -1
- package/lib/resources/order_copies.cjs.map +1 -1
- package/lib/resources/order_copies.d.cts +1 -1
- package/lib/resources/order_copies.d.ts +1 -1
- package/lib/resources/order_copies.js.map +1 -1
- package/lib/resources/order_factories.cjs.map +1 -1
- package/lib/resources/order_factories.d.cts +1 -1
- package/lib/resources/order_factories.d.ts +1 -1
- package/lib/resources/order_factories.js.map +1 -1
- package/lib/resources/order_subscription_items.cjs.map +1 -1
- package/lib/resources/order_subscription_items.d.cts +1 -1
- package/lib/resources/order_subscription_items.d.ts +1 -1
- package/lib/resources/order_subscription_items.js.map +1 -1
- package/lib/resources/order_subscriptions.cjs.map +1 -1
- package/lib/resources/order_subscriptions.d.cts +1 -1
- package/lib/resources/order_subscriptions.d.ts +1 -1
- package/lib/resources/order_subscriptions.js.map +1 -1
- package/lib/resources/orders.cjs +4 -0
- package/lib/resources/orders.cjs.map +1 -1
- package/lib/resources/orders.d.cts +1 -1
- package/lib/resources/orders.d.ts +1 -1
- package/lib/resources/orders.js +4 -0
- package/lib/resources/orders.js.map +1 -1
- package/lib/resources/organizations.cjs.map +1 -1
- package/lib/resources/organizations.d.cts +1 -1
- package/lib/resources/organizations.d.ts +1 -1
- package/lib/resources/organizations.js.map +1 -1
- package/lib/resources/packages.cjs.map +1 -1
- package/lib/resources/packages.d.cts +1 -1
- package/lib/resources/packages.d.ts +1 -1
- package/lib/resources/packages.js.map +1 -1
- package/lib/resources/parcel_line_items.cjs.map +1 -1
- package/lib/resources/parcel_line_items.d.cts +1 -1
- package/lib/resources/parcel_line_items.d.ts +1 -1
- package/lib/resources/parcel_line_items.js.map +1 -1
- package/lib/resources/parcels.cjs.map +1 -1
- package/lib/resources/parcels.d.cts +1 -1
- package/lib/resources/parcels.d.ts +1 -1
- package/lib/resources/parcels.js.map +1 -1
- package/lib/resources/payment_gateways.cjs.map +1 -1
- package/lib/resources/payment_gateways.d.cts +1 -1
- package/lib/resources/payment_gateways.d.ts +1 -1
- package/lib/resources/payment_gateways.js.map +1 -1
- package/lib/resources/payment_methods.cjs.map +1 -1
- package/lib/resources/payment_methods.d.cts +1 -1
- package/lib/resources/payment_methods.d.ts +1 -1
- package/lib/resources/payment_methods.js.map +1 -1
- package/lib/resources/payment_options.cjs.map +1 -1
- package/lib/resources/payment_options.d.cts +1 -1
- package/lib/resources/payment_options.d.ts +1 -1
- package/lib/resources/payment_options.js.map +1 -1
- package/lib/resources/paypal_gateways.cjs.map +1 -1
- package/lib/resources/paypal_gateways.d.cts +1 -1
- package/lib/resources/paypal_gateways.d.ts +1 -1
- package/lib/resources/paypal_gateways.js.map +1 -1
- package/lib/resources/paypal_payments.cjs.map +1 -1
- package/lib/resources/paypal_payments.d.cts +1 -1
- package/lib/resources/paypal_payments.d.ts +1 -1
- package/lib/resources/paypal_payments.js.map +1 -1
- package/lib/resources/percentage_discount_promotions.cjs.map +1 -1
- package/lib/resources/percentage_discount_promotions.d.cts +1 -1
- package/lib/resources/percentage_discount_promotions.d.ts +1 -1
- package/lib/resources/percentage_discount_promotions.js.map +1 -1
- package/lib/resources/pickups.cjs.map +1 -1
- package/lib/resources/pickups.d.cts +1 -1
- package/lib/resources/pickups.d.ts +1 -1
- package/lib/resources/pickups.js.map +1 -1
- package/lib/resources/price_frequency_tiers.cjs.map +1 -1
- package/lib/resources/price_frequency_tiers.d.cts +1 -1
- package/lib/resources/price_frequency_tiers.d.ts +1 -1
- package/lib/resources/price_frequency_tiers.js.map +1 -1
- package/lib/resources/price_list_schedulers.cjs.map +1 -1
- package/lib/resources/price_list_schedulers.d.cts +1 -1
- package/lib/resources/price_list_schedulers.d.ts +1 -1
- package/lib/resources/price_list_schedulers.js.map +1 -1
- package/lib/resources/price_lists.cjs.map +1 -1
- package/lib/resources/price_lists.d.cts +1 -1
- package/lib/resources/price_lists.d.ts +1 -1
- package/lib/resources/price_lists.js.map +1 -1
- package/lib/resources/price_tiers.cjs.map +1 -1
- package/lib/resources/price_tiers.d.cts +1 -1
- package/lib/resources/price_tiers.d.ts +1 -1
- package/lib/resources/price_tiers.js.map +1 -1
- package/lib/resources/price_volume_tiers.cjs.map +1 -1
- package/lib/resources/price_volume_tiers.d.cts +1 -1
- package/lib/resources/price_volume_tiers.d.ts +1 -1
- package/lib/resources/price_volume_tiers.js.map +1 -1
- package/lib/resources/prices.cjs.map +1 -1
- package/lib/resources/prices.d.cts +1 -1
- package/lib/resources/prices.d.ts +1 -1
- package/lib/resources/prices.js.map +1 -1
- package/lib/resources/promotion_rules.cjs.map +1 -1
- package/lib/resources/promotion_rules.d.cts +1 -1
- package/lib/resources/promotion_rules.d.ts +1 -1
- package/lib/resources/promotion_rules.js.map +1 -1
- package/lib/resources/promotions.cjs.map +1 -1
- package/lib/resources/promotions.d.cts +1 -1
- package/lib/resources/promotions.d.ts +1 -1
- package/lib/resources/promotions.js.map +1 -1
- package/lib/resources/recurring_order_copies.cjs.map +1 -1
- package/lib/resources/recurring_order_copies.d.cts +1 -1
- package/lib/resources/recurring_order_copies.d.ts +1 -1
- package/lib/resources/recurring_order_copies.js.map +1 -1
- package/lib/resources/refunds.cjs.map +1 -1
- package/lib/resources/refunds.d.cts +1 -1
- package/lib/resources/refunds.d.ts +1 -1
- package/lib/resources/refunds.js.map +1 -1
- package/lib/resources/reserved_stocks.cjs.map +1 -1
- package/lib/resources/reserved_stocks.d.cts +1 -1
- package/lib/resources/reserved_stocks.d.ts +1 -1
- package/lib/resources/reserved_stocks.js.map +1 -1
- package/lib/resources/resource_errors.cjs.map +1 -1
- package/lib/resources/resource_errors.d.cts +1 -1
- package/lib/resources/resource_errors.d.ts +1 -1
- package/lib/resources/resource_errors.js.map +1 -1
- package/lib/resources/return_line_items.cjs.map +1 -1
- package/lib/resources/return_line_items.d.cts +1 -1
- package/lib/resources/return_line_items.d.ts +1 -1
- package/lib/resources/return_line_items.js.map +1 -1
- package/lib/resources/returns.cjs.map +1 -1
- package/lib/resources/returns.d.cts +1 -1
- package/lib/resources/returns.d.ts +1 -1
- package/lib/resources/returns.js.map +1 -1
- package/lib/resources/satispay_gateways.cjs.map +1 -1
- package/lib/resources/satispay_gateways.d.cts +1 -1
- package/lib/resources/satispay_gateways.d.ts +1 -1
- package/lib/resources/satispay_gateways.js.map +1 -1
- package/lib/resources/satispay_payments.cjs.map +1 -1
- package/lib/resources/satispay_payments.d.cts +1 -1
- package/lib/resources/satispay_payments.d.ts +1 -1
- package/lib/resources/satispay_payments.js.map +1 -1
- package/lib/resources/shipments.cjs.map +1 -1
- package/lib/resources/shipments.d.cts +1 -1
- package/lib/resources/shipments.d.ts +1 -1
- package/lib/resources/shipments.js.map +1 -1
- package/lib/resources/shipping_categories.cjs.map +1 -1
- package/lib/resources/shipping_categories.d.cts +1 -1
- package/lib/resources/shipping_categories.d.ts +1 -1
- package/lib/resources/shipping_categories.js.map +1 -1
- package/lib/resources/shipping_method_tiers.cjs.map +1 -1
- package/lib/resources/shipping_method_tiers.d.cts +1 -1
- package/lib/resources/shipping_method_tiers.d.ts +1 -1
- package/lib/resources/shipping_method_tiers.js.map +1 -1
- package/lib/resources/shipping_methods.cjs.map +1 -1
- package/lib/resources/shipping_methods.d.cts +1 -1
- package/lib/resources/shipping_methods.d.ts +1 -1
- package/lib/resources/shipping_methods.js.map +1 -1
- package/lib/resources/shipping_weight_tiers.cjs.map +1 -1
- package/lib/resources/shipping_weight_tiers.d.cts +1 -1
- package/lib/resources/shipping_weight_tiers.d.ts +1 -1
- package/lib/resources/shipping_weight_tiers.js.map +1 -1
- package/lib/resources/shipping_zones.cjs.map +1 -1
- package/lib/resources/shipping_zones.d.cts +1 -1
- package/lib/resources/shipping_zones.d.ts +1 -1
- package/lib/resources/shipping_zones.js.map +1 -1
- package/lib/resources/sku_list_items.cjs.map +1 -1
- package/lib/resources/sku_list_items.d.cts +1 -1
- package/lib/resources/sku_list_items.d.ts +1 -1
- package/lib/resources/sku_list_items.js.map +1 -1
- package/lib/resources/sku_list_promotion_rules.cjs.map +1 -1
- package/lib/resources/sku_list_promotion_rules.d.cts +1 -1
- package/lib/resources/sku_list_promotion_rules.d.ts +1 -1
- package/lib/resources/sku_list_promotion_rules.js.map +1 -1
- package/lib/resources/sku_lists.cjs.map +1 -1
- package/lib/resources/sku_lists.d.cts +1 -1
- package/lib/resources/sku_lists.d.ts +1 -1
- package/lib/resources/sku_lists.js.map +1 -1
- package/lib/resources/sku_options.cjs.map +1 -1
- package/lib/resources/sku_options.d.cts +1 -1
- package/lib/resources/sku_options.d.ts +1 -1
- package/lib/resources/sku_options.js.map +1 -1
- package/lib/resources/skus.cjs.map +1 -1
- package/lib/resources/skus.d.cts +1 -1
- package/lib/resources/skus.d.ts +1 -1
- package/lib/resources/skus.js.map +1 -1
- package/lib/resources/stock_items.cjs.map +1 -1
- package/lib/resources/stock_items.d.cts +1 -1
- package/lib/resources/stock_items.d.ts +1 -1
- package/lib/resources/stock_items.js.map +1 -1
- package/lib/resources/stock_line_items.cjs.map +1 -1
- package/lib/resources/stock_line_items.d.cts +1 -1
- package/lib/resources/stock_line_items.d.ts +1 -1
- package/lib/resources/stock_line_items.js.map +1 -1
- package/lib/resources/stock_locations.cjs.map +1 -1
- package/lib/resources/stock_locations.d.cts +1 -1
- package/lib/resources/stock_locations.d.ts +1 -1
- package/lib/resources/stock_locations.js.map +1 -1
- package/lib/resources/stock_reservations.cjs.map +1 -1
- package/lib/resources/stock_reservations.d.cts +1 -1
- package/lib/resources/stock_reservations.d.ts +1 -1
- package/lib/resources/stock_reservations.js.map +1 -1
- package/lib/resources/stock_transfers.cjs.map +1 -1
- package/lib/resources/stock_transfers.d.cts +1 -1
- package/lib/resources/stock_transfers.d.ts +1 -1
- package/lib/resources/stock_transfers.js.map +1 -1
- package/lib/resources/stores.cjs.map +1 -1
- package/lib/resources/stores.d.cts +1 -1
- package/lib/resources/stores.d.ts +1 -1
- package/lib/resources/stores.js.map +1 -1
- package/lib/resources/stripe_gateways.cjs.map +1 -1
- package/lib/resources/stripe_gateways.d.cts +1 -1
- package/lib/resources/stripe_gateways.d.ts +1 -1
- package/lib/resources/stripe_gateways.js.map +1 -1
- package/lib/resources/stripe_payments.cjs.map +1 -1
- package/lib/resources/stripe_payments.d.cts +1 -1
- package/lib/resources/stripe_payments.d.ts +1 -1
- package/lib/resources/stripe_payments.js.map +1 -1
- package/lib/resources/stripe_tax_accounts.cjs.map +1 -1
- package/lib/resources/stripe_tax_accounts.d.cts +1 -1
- package/lib/resources/stripe_tax_accounts.d.ts +1 -1
- package/lib/resources/stripe_tax_accounts.js.map +1 -1
- package/lib/resources/subscription_models.cjs.map +1 -1
- package/lib/resources/subscription_models.d.cts +1 -1
- package/lib/resources/subscription_models.d.ts +1 -1
- package/lib/resources/subscription_models.js.map +1 -1
- package/lib/resources/tags.cjs.map +1 -1
- package/lib/resources/tags.d.cts +1 -1
- package/lib/resources/tags.d.ts +1 -1
- package/lib/resources/tags.js.map +1 -1
- package/lib/resources/talon_one_accounts.cjs.map +1 -1
- package/lib/resources/talon_one_accounts.d.cts +1 -1
- package/lib/resources/talon_one_accounts.d.ts +1 -1
- package/lib/resources/talon_one_accounts.js.map +1 -1
- package/lib/resources/tax_calculators.cjs.map +1 -1
- package/lib/resources/tax_calculators.d.cts +1 -1
- package/lib/resources/tax_calculators.d.ts +1 -1
- package/lib/resources/tax_calculators.js.map +1 -1
- package/lib/resources/tax_categories.cjs.map +1 -1
- package/lib/resources/tax_categories.d.cts +1 -1
- package/lib/resources/tax_categories.d.ts +1 -1
- package/lib/resources/tax_categories.js.map +1 -1
- package/lib/resources/tax_rules.cjs.map +1 -1
- package/lib/resources/tax_rules.d.cts +1 -1
- package/lib/resources/tax_rules.d.ts +1 -1
- package/lib/resources/tax_rules.js.map +1 -1
- package/lib/resources/taxjar_accounts.cjs.map +1 -1
- package/lib/resources/taxjar_accounts.d.cts +1 -1
- package/lib/resources/taxjar_accounts.d.ts +1 -1
- package/lib/resources/taxjar_accounts.js.map +1 -1
- package/lib/resources/transactions.cjs.map +1 -1
- package/lib/resources/transactions.d.cts +1 -1
- package/lib/resources/transactions.d.ts +1 -1
- package/lib/resources/transactions.js.map +1 -1
- package/lib/resources/versions.cjs.map +1 -1
- package/lib/resources/versions.d.cts +1 -1
- package/lib/resources/versions.d.ts +1 -1
- package/lib/resources/versions.js.map +1 -1
- package/lib/resources/vertex_accounts.cjs.map +1 -1
- package/lib/resources/vertex_accounts.d.cts +1 -1
- package/lib/resources/vertex_accounts.d.ts +1 -1
- package/lib/resources/vertex_accounts.js.map +1 -1
- package/lib/resources/voids.cjs.map +1 -1
- package/lib/resources/voids.d.cts +1 -1
- package/lib/resources/voids.d.ts +1 -1
- package/lib/resources/voids.js.map +1 -1
- package/lib/resources/webhooks.cjs.map +1 -1
- package/lib/resources/webhooks.d.cts +1 -1
- package/lib/resources/webhooks.d.ts +1 -1
- package/lib/resources/webhooks.js.map +1 -1
- package/lib/resources/wire_transfers.cjs.map +1 -1
- package/lib/resources/wire_transfers.d.cts +1 -1
- package/lib/resources/wire_transfers.d.ts +1 -1
- package/lib/resources/wire_transfers.js.map +1 -1
- package/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GAAG,GAAG,CAAA;AAAA;AACvD,EAGA,IAAqB,GAAA;AACpB,IAAA,OAAO,SAAU,CAAA,IAAA;AAAA;AAGnB;AAGA,MAAM,QAAA,GAAW,IAAI,SAAU,EAAA;AAC/B,IAAO,iBAAQ,GAAA","file":"shipments.cjs","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Order, OrderType } from './orders'\nimport type { ShippingCategory, ShippingCategoryType } from './shipping_categories'\nimport type { InventoryStockLocation, InventoryStockLocationType } from './inventory_stock_locations'\nimport type { StockLocation } from './stock_locations'\nimport type { Address, AddressType } from './addresses'\nimport type { ShippingMethod, ShippingMethodType } from './shipping_methods'\nimport type { DeliveryLeadTime } from './delivery_lead_times'\nimport type { Pickup } from './pickups'\nimport type { StockLineItem } from './stock_line_items'\nimport type { StockTransfer } from './stock_transfers'\nimport type { LineItem } from './line_items'\nimport type { CarrierAccount } from './carrier_accounts'\nimport type { Parcel } from './parcels'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Tag, TagType } from './tags'\nimport type { Version } from './versions'\n\n\ntype ShipmentType = 'shipments'\ntype ShipmentRel = ResourceRel & { type: ShipmentType }\ntype OrderRel = ResourceRel & { type: OrderType }\ntype ShippingCategoryRel = ResourceRel & { type: ShippingCategoryType }\ntype InventoryStockLocationRel = ResourceRel & { type: InventoryStockLocationType }\ntype AddressRel = ResourceRel & { type: AddressType }\ntype ShippingMethodRel = ResourceRel & { type: ShippingMethodType }\ntype TagRel = ResourceRel & { type: TagType }\n\n\nexport type ShipmentSort = Pick<Shipment, 'id' | 'number' | 'status' | 'cost_amount_cents' | 'get_rates_started_at' | 'get_rates_completed_at' | 'purchase_started_at' | 'purchase_completed_at' | 'purchase_failed_at' | 'on_hold_at' | 'picking_at' | 'packing_at' | 'ready_to_ship_at' | 'shipped_at'> & ResourceSort\n// export type ShipmentFilter = Pick<Shipment, 'id' | 'number' | 'status' | 'cost_amount_cents' | 'get_rates_started_at' | 'get_rates_completed_at' | 'purchase_started_at' | 'purchase_completed_at' | 'purchase_failed_at' | 'on_hold_at' | 'picking_at' | 'packing_at' | 'ready_to_ship_at' | 'shipped_at'> & ResourceFilter\n\n\ninterface Shipment extends Resource {\n\t\n\treadonly type: ShipmentType\n\n\t/** \n\t * Unique identifier for the shipment. Cannot be passed by sales channels.\n\t * @example ```\"#1234/S/001\"```\n\t */\n\tnumber: string\n\t/** \n\t * The shipment status. One of 'draft' (default), 'upcoming', 'cancelled', 'on_hold', 'picking', 'packing', 'ready_to_ship', 'shipped', or 'delivered'.\n\t * @example ```\"draft\"```\n\t */\n\tstatus: 'draft' | 'upcoming' | 'cancelled' | 'on_hold' | 'picking' | 'packing' | 'ready_to_ship' | 'shipped' | 'delivered'\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard, automatically inherited from the associated order.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * The cost of this shipment from the selected carrier account, in cents.\n\t * @example ```1000```\n\t */\n\tcost_amount_cents?: number | null\n\t/** \n\t * The cost of this shipment from the selected carrier account, float.\n\t * @example ```10```\n\t */\n\tcost_amount_float?: number | null\n\t/** \n\t * The cost of this shipment from the selected carrier account, formatted.\n\t * @example ```\"€10,00\"```\n\t */\n\tformatted_cost_amount?: string | null\n\t/** \n\t * The total number of SKUs in the shipment's line items. This can be useful to display a preview of the shipment content.\n\t * @example ```2```\n\t */\n\tskus_count?: number | null\n\t/** \n\t * The selected purchase rate from the available shipping rates.\n\t * @example ```\"rate_f89e4663c3ed47ee94d37763f6d21d54\"```\n\t */\n\tselected_rate_id?: string | null\n\t/** \n\t * The available shipping rates.\n\t * @example ```[{\"id\":\"rate_f89e4663c3ed47ee94d37763f6d21d54\",\"rate\":\"45.59\",\"carrier\":\"DHLExpress\",\"service\":\"MedicalExpress\"}]```\n\t */\n\trates?: Array<Record<string, any>> | null\n\t/** \n\t * The shipping rate purchase error code, if any.\n\t * @example ```\"SHIPMENT.POSTAGE.FAILURE\"```\n\t */\n\tpurchase_error_code?: string | null\n\t/** \n\t * The shipping rate purchase error message, if any.\n\t * @example ```\"Account not allowed for this service.\"```\n\t */\n\tpurchase_error_message?: string | null\n\t/** \n\t * Any errors collected when fetching shipping rates.\n\t * @example ```[{\"carrier\":\"DHLExpress\",\"message\":\"to_address.postal_code: Shorter than minimum length 3\",\"type\":\"rate_error\"}]```\n\t */\n\tget_rates_errors?: Array<Record<string, any>> | null\n\t/** \n\t * Time at which the getting of the shipping rates started.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tget_rates_started_at?: string | null\n\t/** \n\t * Time at which the getting of the shipping rates completed.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tget_rates_completed_at?: string | null\n\t/** \n\t * Time at which the purchasing of the shipping rate started.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tpurchase_started_at?: string | null\n\t/** \n\t * Time at which the purchasing of the shipping rate completed.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tpurchase_completed_at?: string | null\n\t/** \n\t * Time at which the purchasing of the shipping rate failed.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tpurchase_failed_at?: string | null\n\t/** \n\t * Time at which the shipment was put on hold.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\ton_hold_at?: string | null\n\t/** \n\t * Time at which the shipment was picking.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tpicking_at?: string | null\n\t/** \n\t * Time at which the shipment was packing.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tpacking_at?: string | null\n\t/** \n\t * Time at which the shipment was ready to ship.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tready_to_ship_at?: string | null\n\t/** \n\t * Time at which the shipment was shipped.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tshipped_at?: string | null\n\n\torder?: Order | null\n\tshipping_category?: ShippingCategory | null\n\tinventory_stock_location?: InventoryStockLocation | null\n\tstock_location?: StockLocation | null\n\torigin_address?: Address | null\n\tshipping_address?: Address | null\n\tshipping_method?: ShippingMethod | null\n\tdelivery_lead_time?: DeliveryLeadTime | null\n\tpickup?: Pickup | null\n\tstock_line_items?: StockLineItem[] | null\n\tstock_transfers?: StockTransfer[] | null\n\tline_items?: LineItem[] | null\n\tavailable_shipping_methods?: ShippingMethod[] | null\n\tcarrier_accounts?: CarrierAccount[] | null\n\tparcels?: Parcel[] | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\ttags?: Tag[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface ShipmentCreate extends ResourceCreate {\n\t\n\torder: OrderRel\n\tshipping_category?: ShippingCategoryRel | null\n\tinventory_stock_location: InventoryStockLocationRel\n\tshipping_address?: AddressRel | null\n\tshipping_method?: ShippingMethodRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\ninterface ShipmentUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * Unique identifier for the shipment. Cannot be passed by sales channels.\n\t * @example ```\"#1234/S/001\"```\n\t */\n\tnumber?: string | null\n\t/** \n\t * Send this attribute if you want to mark this shipment as upcoming. Cannot be passed by sales channels.\n\t * @example ```true```\n\t */\n\t_upcoming?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this shipment as cancelled (unless already shipped or delivered). Cannot be passed by sales channels.\n\t * @example ```true```\n\t */\n\t_cancel?: boolean | null\n\t/** \n\t * Send this attribute if you want to put this shipment on hold.\n\t * @example ```true```\n\t */\n\t_on_hold?: boolean | null\n\t/** \n\t * Send this attribute if you want to start picking this shipment.\n\t * @example ```true```\n\t */\n\t_picking?: boolean | null\n\t/** \n\t * Send this attribute if you want to start packing this shipment.\n\t * @example ```true```\n\t */\n\t_packing?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this shipment as ready to ship.\n\t * @example ```true```\n\t */\n\t_ready_to_ship?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this shipment as shipped.\n\t * @example ```true```\n\t */\n\t_ship?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this shipment as delivered.\n\t * @example ```true```\n\t */\n\t_deliver?: boolean | null\n\t/** \n\t * Send this attribute if you want to automatically reserve the stock for each of the associated stock line item. Can be done only when fulfillment is in progress. Cannot be passed by sales channels.\n\t * @example ```true```\n\t */\n\t_reserve_stock?: boolean | null\n\t/** \n\t * Send this attribute if you want to automatically destroy the stock reservations for each of the associated stock line item. Can be done only when fulfillment is in progress. Cannot be passed by sales channels.\n\t * @example ```true```\n\t */\n\t_release_stock?: boolean | null\n\t/** \n\t * Send this attribute if you want to automatically decrement and release the stock for each of the associated stock line item. Can be done only when fulfillment is in progress. Cannot be passed by sales channels.\n\t * @example ```true```\n\t */\n\t_decrement_stock?: boolean | null\n\t/** \n\t * Send this attribute if you want get the shipping rates from the associated carrier accounts.\n\t * @example ```true```\n\t */\n\t_get_rates?: boolean | null\n\t/** \n\t * The selected purchase rate from the available shipping rates.\n\t * @example ```\"rate_f89e4663c3ed47ee94d37763f6d21d54\"```\n\t */\n\tselected_rate_id?: string | null\n\t/** \n\t * Send this attribute if you want to purchase this shipment with the selected rate.\n\t * @example ```true```\n\t */\n\t_purchase?: boolean | null\n\t/** \n\t * Comma separated list of tags to be added. Duplicates, invalid and non existing ones are discarded. Cannot be passed by sales channels.\n\t */\n\t_add_tags?: string | null\n\t/** \n\t * Comma separated list of tags to be removed. Duplicates, invalid and non existing ones are discarded. Cannot be passed by sales channels.\n\t */\n\t_remove_tags?: string | null\n\n\tshipping_category?: ShippingCategoryRel | null\n\tinventory_stock_location?: InventoryStockLocationRel | null\n\tshipping_address?: AddressRel | null\n\tshipping_method?: ShippingMethodRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\nclass Shipments extends ApiResource<Shipment> {\n\n\tstatic readonly TYPE: ShipmentType = 'shipments' as const\n\n\tasync create(resource: ShipmentCreate, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.create<ShipmentCreate, Shipment>({ ...resource, type: Shipments.TYPE }, params, options)\n\t}\n\n\tasync update(resource: ShipmentUpdate, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ ...resource, type: Shipments.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: Shipments.TYPE } : id, options)\n\t}\n\n\tasync order(shipmentId: string | Shipment, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `shipments/${_shipmentId}/order`, params, options) as unknown as Order\n\t}\n\n\tasync shipping_category(shipmentId: string | Shipment, params?: QueryParamsRetrieve<ShippingCategory>, options?: ResourcesConfig): Promise<ShippingCategory> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<ShippingCategory>({ type: 'shipping_categories' }, `shipments/${_shipmentId}/shipping_category`, params, options) as unknown as ShippingCategory\n\t}\n\n\tasync inventory_stock_location(shipmentId: string | Shipment, params?: QueryParamsRetrieve<InventoryStockLocation>, options?: ResourcesConfig): Promise<InventoryStockLocation> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<InventoryStockLocation>({ type: 'inventory_stock_locations' }, `shipments/${_shipmentId}/inventory_stock_location`, params, options) as unknown as InventoryStockLocation\n\t}\n\n\tasync stock_location(shipmentId: string | Shipment, params?: QueryParamsRetrieve<StockLocation>, options?: ResourcesConfig): Promise<StockLocation> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<StockLocation>({ type: 'stock_locations' }, `shipments/${_shipmentId}/stock_location`, params, options) as unknown as StockLocation\n\t}\n\n\tasync origin_address(shipmentId: string | Shipment, params?: QueryParamsRetrieve<Address>, options?: ResourcesConfig): Promise<Address> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<Address>({ type: 'addresses' }, `shipments/${_shipmentId}/origin_address`, params, options) as unknown as Address\n\t}\n\n\tasync shipping_address(shipmentId: string | Shipment, params?: QueryParamsRetrieve<Address>, options?: ResourcesConfig): Promise<Address> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<Address>({ type: 'addresses' }, `shipments/${_shipmentId}/shipping_address`, params, options) as unknown as Address\n\t}\n\n\tasync shipping_method(shipmentId: string | Shipment, params?: QueryParamsRetrieve<ShippingMethod>, options?: ResourcesConfig): Promise<ShippingMethod> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<ShippingMethod>({ type: 'shipping_methods' }, `shipments/${_shipmentId}/shipping_method`, params, options) as unknown as ShippingMethod\n\t}\n\n\tasync delivery_lead_time(shipmentId: string | Shipment, params?: QueryParamsRetrieve<DeliveryLeadTime>, options?: ResourcesConfig): Promise<DeliveryLeadTime> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<DeliveryLeadTime>({ type: 'delivery_lead_times' }, `shipments/${_shipmentId}/delivery_lead_time`, params, options) as unknown as DeliveryLeadTime\n\t}\n\n\tasync pickup(shipmentId: string | Shipment, params?: QueryParamsRetrieve<Pickup>, options?: ResourcesConfig): Promise<Pickup> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<Pickup>({ type: 'pickups' }, `shipments/${_shipmentId}/pickup`, params, options) as unknown as Pickup\n\t}\n\n\tasync stock_line_items(shipmentId: string | Shipment, params?: QueryParamsList<StockLineItem>, options?: ResourcesConfig): Promise<ListResponse<StockLineItem>> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<StockLineItem>({ type: 'stock_line_items' }, `shipments/${_shipmentId}/stock_line_items`, params, options) as unknown as ListResponse<StockLineItem>\n\t}\n\n\tasync stock_transfers(shipmentId: string | Shipment, params?: QueryParamsList<StockTransfer>, options?: ResourcesConfig): Promise<ListResponse<StockTransfer>> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<StockTransfer>({ type: 'stock_transfers' }, `shipments/${_shipmentId}/stock_transfers`, params, options) as unknown as ListResponse<StockTransfer>\n\t}\n\n\tasync line_items(shipmentId: string | Shipment, params?: QueryParamsList<LineItem>, options?: ResourcesConfig): Promise<ListResponse<LineItem>> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<LineItem>({ type: 'line_items' }, `shipments/${_shipmentId}/line_items`, params, options) as unknown as ListResponse<LineItem>\n\t}\n\n\tasync available_shipping_methods(shipmentId: string | Shipment, params?: QueryParamsList<ShippingMethod>, options?: ResourcesConfig): Promise<ListResponse<ShippingMethod>> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<ShippingMethod>({ type: 'shipping_methods' }, `shipments/${_shipmentId}/available_shipping_methods`, params, options) as unknown as ListResponse<ShippingMethod>\n\t}\n\n\tasync carrier_accounts(shipmentId: string | Shipment, params?: QueryParamsList<CarrierAccount>, options?: ResourcesConfig): Promise<ListResponse<CarrierAccount>> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<CarrierAccount>({ type: 'carrier_accounts' }, `shipments/${_shipmentId}/carrier_accounts`, params, options) as unknown as ListResponse<CarrierAccount>\n\t}\n\n\tasync parcels(shipmentId: string | Shipment, params?: QueryParamsList<Parcel>, options?: ResourcesConfig): Promise<ListResponse<Parcel>> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<Parcel>({ type: 'parcels' }, `shipments/${_shipmentId}/parcels`, params, options) as unknown as ListResponse<Parcel>\n\t}\n\n\tasync attachments(shipmentId: string | Shipment, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `shipments/${_shipmentId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(shipmentId: string | Shipment, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `shipments/${_shipmentId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync tags(shipmentId: string | Shipment, params?: QueryParamsList<Tag>, options?: ResourcesConfig): Promise<ListResponse<Tag>> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<Tag>({ type: 'tags' }, `shipments/${_shipmentId}/tags`, params, options) as unknown as ListResponse<Tag>\n\t}\n\n\tasync versions(shipmentId: string | Shipment, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `shipments/${_shipmentId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _upcoming(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _upcoming: true }, params, options)\n\t}\n\n\tasync _cancel(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _cancel: true }, params, options)\n\t}\n\n\tasync _on_hold(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _on_hold: true }, params, options)\n\t}\n\n\tasync _picking(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _picking: true }, params, options)\n\t}\n\n\tasync _packing(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _packing: true }, params, options)\n\t}\n\n\tasync _ready_to_ship(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _ready_to_ship: true }, params, options)\n\t}\n\n\tasync _ship(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _ship: true }, params, options)\n\t}\n\n\tasync _deliver(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _deliver: true }, params, options)\n\t}\n\n\tasync _reserve_stock(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _reserve_stock: true }, params, options)\n\t}\n\n\tasync _release_stock(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _release_stock: true }, params, options)\n\t}\n\n\tasync _decrement_stock(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _decrement_stock: true }, params, options)\n\t}\n\n\tasync _get_rates(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _get_rates: true }, params, options)\n\t}\n\n\tasync _purchase(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _purchase: true }, params, options)\n\t}\n\n\tasync _add_tags(id: string | Shipment, triggerValue: string, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _add_tags: triggerValue }, params, options)\n\t}\n\n\tasync _remove_tags(id: string | Shipment, triggerValue: string, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _remove_tags: triggerValue }, params, options)\n\t}\n\n\n\tisShipment(resource: any): resource is Shipment {\n\t\treturn resource.type && (resource.type === Shipments.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): ShipmentRel {\n\t\treturn super.relationshipOneToOne<ShipmentRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): ShipmentRel[] {\n\t\treturn super.relationshipOneToMany<ShipmentRel>(...ids)\n\t}\n\n\n\ttype(): ShipmentType {\n\t\treturn Shipments.TYPE\n\t}\n\n}\n\n\nconst instance = new Shipments()\nexport default instance\n\nexport type { Shipment, ShipmentCreate, ShipmentUpdate, ShipmentType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/shipments.ts"],"names":["ApiResource"],"mappings":";;;;AA0RA,MAAM,kBAAkBA,oBAAsB,CAAA;AAAA,EAE7C,OAAgB,IAAqB,GAAA,WAAA;AAAA,EAErC,MAAM,MAAA,CAAO,QAA0B,EAAA,MAAA,EAAwC,OAA8C,EAAA;AAC5H,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAiC,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,SAAU,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC9G,EAEA,MAAM,MAAA,CAAO,QAA0B,EAAA,MAAA,EAAwC,OAA8C,EAAA;AAC5H,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAiC,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,SAAU,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC9G,EAEA,MAAM,MAAO,CAAA,EAAA,EAAyB,OAA0C,EAAA;AAC/E,IAAA,MAAM,IAAK,CAAA,SAAA,CAAU,MAAQ,CAAA,OAAO,EAAO,KAAA,QAAA,GAAW,EAAE,EAAA,EAAI,IAAM,EAAA,SAAA,CAAU,IAAK,EAA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AI,MAAM,SAAU,CAAA,IAAA,EAAM,cAAc,YAAa,EAAA,EAAG,QAAQ,OAAO,CAAA;AAAA;AACtK,EAGA,WAAW,QAAqC,EAAA;AAC/C,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,SAAU,CAAA,IAAA;AAAA;AACtD,EAGA,aAAa,EAA6C,EAAA;AACzD,IAAO,OAAA,KAAA,CAAM,qBAAkC,EAAE,CAAA;AAAA;AAClD,EAEA,sBAAsB,GAA8B,EAAA;AACnD,IAAO,OAAA,KAAA,CAAM,qBAAmC,CAAA,GAAG,GAAG,CAAA;AAAA;AACvD,EAGA,IAAqB,GAAA;AACpB,IAAA,OAAO,SAAU,CAAA,IAAA;AAAA;AAGnB;AAGA,MAAM,QAAA,GAAW,IAAI,SAAU,EAAA;AAC/B,IAAO,iBAAQ,GAAA","file":"shipments.cjs","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Order, OrderType } from './orders'\nimport type { ShippingCategory, ShippingCategoryType } from './shipping_categories'\nimport type { InventoryStockLocation, InventoryStockLocationType } from './inventory_stock_locations'\nimport type { StockLocation } from './stock_locations'\nimport type { Address, AddressType } from './addresses'\nimport type { ShippingMethod, ShippingMethodType } from './shipping_methods'\nimport type { DeliveryLeadTime } from './delivery_lead_times'\nimport type { Pickup } from './pickups'\nimport type { StockLineItem } from './stock_line_items'\nimport type { StockTransfer } from './stock_transfers'\nimport type { LineItem } from './line_items'\nimport type { CarrierAccount } from './carrier_accounts'\nimport type { Parcel } from './parcels'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Tag, TagType } from './tags'\nimport type { Version } from './versions'\n\n\ntype ShipmentType = 'shipments'\ntype ShipmentRel = ResourceRel & { type: ShipmentType }\ntype OrderRel = ResourceRel & { type: OrderType }\ntype ShippingCategoryRel = ResourceRel & { type: ShippingCategoryType }\ntype InventoryStockLocationRel = ResourceRel & { type: InventoryStockLocationType }\ntype AddressRel = ResourceRel & { type: AddressType }\ntype ShippingMethodRel = ResourceRel & { type: ShippingMethodType }\ntype TagRel = ResourceRel & { type: TagType }\n\n\nexport type ShipmentSort = Pick<Shipment, 'id' | 'number' | 'status' | 'cost_amount_cents' | 'get_rates_started_at' | 'get_rates_completed_at' | 'purchase_started_at' | 'purchase_completed_at' | 'purchase_failed_at' | 'on_hold_at' | 'picking_at' | 'packing_at' | 'ready_to_ship_at' | 'shipped_at'> & ResourceSort\n// export type ShipmentFilter = Pick<Shipment, 'id' | 'number' | 'status' | 'cost_amount_cents' | 'get_rates_started_at' | 'get_rates_completed_at' | 'purchase_started_at' | 'purchase_completed_at' | 'purchase_failed_at' | 'on_hold_at' | 'picking_at' | 'packing_at' | 'ready_to_ship_at' | 'shipped_at'> & ResourceFilter\n\n\ninterface Shipment extends Resource {\n\t\n\treadonly type: ShipmentType\n\n\t/** \n\t * Unique identifier for the shipment. Cannot be passed by sales channels.\n\t * @example ```\"#1234/S/001\"```\n\t */\n\tnumber: string\n\t/** \n\t * The shipment status. One of 'draft' (default), 'upcoming', 'cancelled', 'on_hold', 'picking', 'packing', 'ready_to_ship', 'shipped', or 'delivered'.\n\t * @example ```\"draft\"```\n\t */\n\tstatus: 'draft' | 'upcoming' | 'cancelled' | 'on_hold' | 'picking' | 'packing' | 'ready_to_ship' | 'shipped' | 'delivered'\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard, automatically inherited from the associated order.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * The cost of this shipment from the selected carrier account, in cents.\n\t * @example ```1000```\n\t */\n\tcost_amount_cents?: number | null\n\t/** \n\t * The cost of this shipment from the selected carrier account, float.\n\t * @example ```10```\n\t */\n\tcost_amount_float?: number | null\n\t/** \n\t * The cost of this shipment from the selected carrier account, formatted.\n\t * @example ```\"€10,00\"```\n\t */\n\tformatted_cost_amount?: string | null\n\t/** \n\t * The total number of SKUs in the shipment's line items. This can be useful to display a preview of the shipment content.\n\t * @example ```2```\n\t */\n\tskus_count?: number | null\n\t/** \n\t * The selected purchase rate from the available shipping rates.\n\t * @example ```\"rate_f89e4663c3ed47ee94d37763f6d21d54\"```\n\t */\n\tselected_rate_id?: string | null\n\t/** \n\t * The available shipping rates.\n\t * @example ```[{\"id\":\"rate_f89e4663c3ed47ee94d37763f6d21d54\",\"rate\":\"45.59\",\"carrier\":\"DHLExpress\",\"service\":\"MedicalExpress\"}]```\n\t */\n\trates?: Array<Record<string, any>> | null\n\t/** \n\t * The shipping rate purchase error code, if any.\n\t * @example ```\"SHIPMENT.POSTAGE.FAILURE\"```\n\t */\n\tpurchase_error_code?: string | null\n\t/** \n\t * The shipping rate purchase error message, if any.\n\t * @example ```\"Account not allowed for this service.\"```\n\t */\n\tpurchase_error_message?: string | null\n\t/** \n\t * Any errors collected when fetching shipping rates.\n\t * @example ```[{\"carrier\":\"DHLExpress\",\"message\":\"to_address.postal_code: Shorter than minimum length 3\",\"type\":\"rate_error\"}]```\n\t */\n\tget_rates_errors?: Array<Record<string, any>> | null\n\t/** \n\t * Time at which the getting of the shipping rates started.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tget_rates_started_at?: string | null\n\t/** \n\t * Time at which the getting of the shipping rates completed.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tget_rates_completed_at?: string | null\n\t/** \n\t * Time at which the purchasing of the shipping rate started.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tpurchase_started_at?: string | null\n\t/** \n\t * Time at which the purchasing of the shipping rate completed.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tpurchase_completed_at?: string | null\n\t/** \n\t * Time at which the purchasing of the shipping rate failed.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tpurchase_failed_at?: string | null\n\t/** \n\t * Time at which the shipment was put on hold.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\ton_hold_at?: string | null\n\t/** \n\t * Time at which the shipment was picking.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tpicking_at?: string | null\n\t/** \n\t * Time at which the shipment was packing.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tpacking_at?: string | null\n\t/** \n\t * Time at which the shipment was ready to ship.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tready_to_ship_at?: string | null\n\t/** \n\t * Time at which the shipment was shipped.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tshipped_at?: string | null\n\n\torder?: Order | null\n\tshipping_category?: ShippingCategory | null\n\tinventory_stock_location?: InventoryStockLocation | null\n\tstock_location?: StockLocation | null\n\torigin_address?: Address | null\n\tshipping_address?: Address | null\n\tshipping_method?: ShippingMethod | null\n\tdelivery_lead_time?: DeliveryLeadTime | null\n\tpickup?: Pickup | null\n\tstock_line_items?: StockLineItem[] | null\n\tstock_transfers?: StockTransfer[] | null\n\tline_items?: LineItem[] | null\n\tavailable_shipping_methods?: ShippingMethod[] | null\n\tcarrier_accounts?: CarrierAccount[] | null\n\tparcels?: Parcel[] | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\ttags?: Tag[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface ShipmentCreate extends ResourceCreate {\n\t\n\torder: OrderRel\n\tshipping_category?: ShippingCategoryRel | null\n\tinventory_stock_location: InventoryStockLocationRel\n\tshipping_address?: AddressRel | null\n\tshipping_method?: ShippingMethodRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\ninterface ShipmentUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * Unique identifier for the shipment. Cannot be passed by sales channels.\n\t * @example ```\"#1234/S/001\"```\n\t */\n\tnumber?: string | null\n\t/** \n\t * Send this attribute if you want to mark this shipment as upcoming. Cannot be passed by sales channels.\n\t * @example ```true```\n\t */\n\t_upcoming?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this shipment as cancelled (unless already shipped or delivered). Cannot be passed by sales channels.\n\t * @example ```true```\n\t */\n\t_cancel?: boolean | null\n\t/** \n\t * Send this attribute if you want to put this shipment on hold.\n\t * @example ```true```\n\t */\n\t_on_hold?: boolean | null\n\t/** \n\t * Send this attribute if you want to start picking this shipment.\n\t * @example ```true```\n\t */\n\t_picking?: boolean | null\n\t/** \n\t * Send this attribute if you want to start packing this shipment.\n\t * @example ```true```\n\t */\n\t_packing?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this shipment as ready to ship.\n\t * @example ```true```\n\t */\n\t_ready_to_ship?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this shipment as shipped.\n\t * @example ```true```\n\t */\n\t_ship?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this shipment as delivered.\n\t * @example ```true```\n\t */\n\t_deliver?: boolean | null\n\t/** \n\t * Send this attribute if you want to automatically reserve the stock for each of the associated stock line item. Can be done only when fulfillment is in progress. Cannot be passed by sales channels.\n\t * @example ```true```\n\t */\n\t_reserve_stock?: boolean | null\n\t/** \n\t * Send this attribute if you want to automatically destroy the stock reservations for each of the associated stock line item. Can be done only when fulfillment is in progress. Cannot be passed by sales channels.\n\t * @example ```true```\n\t */\n\t_release_stock?: boolean | null\n\t/** \n\t * Send this attribute if you want to automatically decrement and release the stock for each of the associated stock line item. Can be done only when fulfillment is in progress. Cannot be passed by sales channels.\n\t * @example ```true```\n\t */\n\t_decrement_stock?: boolean | null\n\t/** \n\t * Send this attribute if you want get the shipping rates from the associated carrier accounts.\n\t * @example ```true```\n\t */\n\t_get_rates?: boolean | null\n\t/** \n\t * The selected purchase rate from the available shipping rates.\n\t * @example ```\"rate_f89e4663c3ed47ee94d37763f6d21d54\"```\n\t */\n\tselected_rate_id?: string | null\n\t/** \n\t * Send this attribute if you want to purchase this shipment with the selected rate.\n\t * @example ```true```\n\t */\n\t_purchase?: boolean | null\n\t/** \n\t * Comma separated list of tags to be added. Duplicates, invalid and non existing ones are discarded. Cannot be passed by sales channels.\n\t */\n\t_add_tags?: string | null\n\t/** \n\t * Comma separated list of tags to be removed. Duplicates, invalid and non existing ones are discarded. Cannot be passed by sales channels.\n\t */\n\t_remove_tags?: string | null\n\n\tshipping_category?: ShippingCategoryRel | null\n\tinventory_stock_location?: InventoryStockLocationRel | null\n\tshipping_address?: AddressRel | null\n\tshipping_method?: ShippingMethodRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\nclass Shipments extends ApiResource<Shipment> {\n\n\tstatic readonly TYPE: ShipmentType = 'shipments' as const\n\n\tasync create(resource: ShipmentCreate, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.create<ShipmentCreate, Shipment>({ ...resource, type: Shipments.TYPE }, params, options)\n\t}\n\n\tasync update(resource: ShipmentUpdate, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ ...resource, type: Shipments.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: Shipments.TYPE } : id, options)\n\t}\n\n\tasync order(shipmentId: string | Shipment, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `shipments/${_shipmentId}/order`, params, options) as unknown as Order\n\t}\n\n\tasync shipping_category(shipmentId: string | Shipment, params?: QueryParamsRetrieve<ShippingCategory>, options?: ResourcesConfig): Promise<ShippingCategory> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<ShippingCategory>({ type: 'shipping_categories' }, `shipments/${_shipmentId}/shipping_category`, params, options) as unknown as ShippingCategory\n\t}\n\n\tasync inventory_stock_location(shipmentId: string | Shipment, params?: QueryParamsRetrieve<InventoryStockLocation>, options?: ResourcesConfig): Promise<InventoryStockLocation> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<InventoryStockLocation>({ type: 'inventory_stock_locations' }, `shipments/${_shipmentId}/inventory_stock_location`, params, options) as unknown as InventoryStockLocation\n\t}\n\n\tasync stock_location(shipmentId: string | Shipment, params?: QueryParamsRetrieve<StockLocation>, options?: ResourcesConfig): Promise<StockLocation> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<StockLocation>({ type: 'stock_locations' }, `shipments/${_shipmentId}/stock_location`, params, options) as unknown as StockLocation\n\t}\n\n\tasync origin_address(shipmentId: string | Shipment, params?: QueryParamsRetrieve<Address>, options?: ResourcesConfig): Promise<Address> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<Address>({ type: 'addresses' }, `shipments/${_shipmentId}/origin_address`, params, options) as unknown as Address\n\t}\n\n\tasync shipping_address(shipmentId: string | Shipment, params?: QueryParamsRetrieve<Address>, options?: ResourcesConfig): Promise<Address> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<Address>({ type: 'addresses' }, `shipments/${_shipmentId}/shipping_address`, params, options) as unknown as Address\n\t}\n\n\tasync shipping_method(shipmentId: string | Shipment, params?: QueryParamsRetrieve<ShippingMethod>, options?: ResourcesConfig): Promise<ShippingMethod> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<ShippingMethod>({ type: 'shipping_methods' }, `shipments/${_shipmentId}/shipping_method`, params, options) as unknown as ShippingMethod\n\t}\n\n\tasync delivery_lead_time(shipmentId: string | Shipment, params?: QueryParamsRetrieve<DeliveryLeadTime>, options?: ResourcesConfig): Promise<DeliveryLeadTime> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<DeliveryLeadTime>({ type: 'delivery_lead_times' }, `shipments/${_shipmentId}/delivery_lead_time`, params, options) as unknown as DeliveryLeadTime\n\t}\n\n\tasync pickup(shipmentId: string | Shipment, params?: QueryParamsRetrieve<Pickup>, options?: ResourcesConfig): Promise<Pickup> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<Pickup>({ type: 'pickups' }, `shipments/${_shipmentId}/pickup`, params, options) as unknown as Pickup\n\t}\n\n\tasync stock_line_items(shipmentId: string | Shipment, params?: QueryParamsList<StockLineItem>, options?: ResourcesConfig): Promise<ListResponse<StockLineItem>> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<StockLineItem>({ type: 'stock_line_items' }, `shipments/${_shipmentId}/stock_line_items`, params, options) as unknown as ListResponse<StockLineItem>\n\t}\n\n\tasync stock_transfers(shipmentId: string | Shipment, params?: QueryParamsList<StockTransfer>, options?: ResourcesConfig): Promise<ListResponse<StockTransfer>> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<StockTransfer>({ type: 'stock_transfers' }, `shipments/${_shipmentId}/stock_transfers`, params, options) as unknown as ListResponse<StockTransfer>\n\t}\n\n\tasync line_items(shipmentId: string | Shipment, params?: QueryParamsList<LineItem>, options?: ResourcesConfig): Promise<ListResponse<LineItem>> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<LineItem>({ type: 'line_items' }, `shipments/${_shipmentId}/line_items`, params, options) as unknown as ListResponse<LineItem>\n\t}\n\n\tasync available_shipping_methods(shipmentId: string | Shipment, params?: QueryParamsList<ShippingMethod>, options?: ResourcesConfig): Promise<ListResponse<ShippingMethod>> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<ShippingMethod>({ type: 'shipping_methods' }, `shipments/${_shipmentId}/available_shipping_methods`, params, options) as unknown as ListResponse<ShippingMethod>\n\t}\n\n\tasync carrier_accounts(shipmentId: string | Shipment, params?: QueryParamsList<CarrierAccount>, options?: ResourcesConfig): Promise<ListResponse<CarrierAccount>> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<CarrierAccount>({ type: 'carrier_accounts' }, `shipments/${_shipmentId}/carrier_accounts`, params, options) as unknown as ListResponse<CarrierAccount>\n\t}\n\n\tasync parcels(shipmentId: string | Shipment, params?: QueryParamsList<Parcel>, options?: ResourcesConfig): Promise<ListResponse<Parcel>> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<Parcel>({ type: 'parcels' }, `shipments/${_shipmentId}/parcels`, params, options) as unknown as ListResponse<Parcel>\n\t}\n\n\tasync attachments(shipmentId: string | Shipment, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `shipments/${_shipmentId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(shipmentId: string | Shipment, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `shipments/${_shipmentId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync tags(shipmentId: string | Shipment, params?: QueryParamsList<Tag>, options?: ResourcesConfig): Promise<ListResponse<Tag>> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<Tag>({ type: 'tags' }, `shipments/${_shipmentId}/tags`, params, options) as unknown as ListResponse<Tag>\n\t}\n\n\tasync versions(shipmentId: string | Shipment, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `shipments/${_shipmentId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _upcoming(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _upcoming: true }, params, options)\n\t}\n\n\tasync _cancel(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _cancel: true }, params, options)\n\t}\n\n\tasync _on_hold(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _on_hold: true }, params, options)\n\t}\n\n\tasync _picking(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _picking: true }, params, options)\n\t}\n\n\tasync _packing(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _packing: true }, params, options)\n\t}\n\n\tasync _ready_to_ship(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _ready_to_ship: true }, params, options)\n\t}\n\n\tasync _ship(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _ship: true }, params, options)\n\t}\n\n\tasync _deliver(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _deliver: true }, params, options)\n\t}\n\n\tasync _reserve_stock(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _reserve_stock: true }, params, options)\n\t}\n\n\tasync _release_stock(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _release_stock: true }, params, options)\n\t}\n\n\tasync _decrement_stock(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _decrement_stock: true }, params, options)\n\t}\n\n\tasync _get_rates(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _get_rates: true }, params, options)\n\t}\n\n\tasync _purchase(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _purchase: true }, params, options)\n\t}\n\n\tasync _add_tags(id: string | Shipment, triggerValue: string, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _add_tags: triggerValue }, params, options)\n\t}\n\n\tasync _remove_tags(id: string | Shipment, triggerValue: string, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _remove_tags: triggerValue }, params, options)\n\t}\n\n\n\tisShipment(resource: any): resource is Shipment {\n\t\treturn resource.type && (resource.type === Shipments.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): ShipmentRel {\n\t\treturn super.relationshipOneToOne<ShipmentRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): ShipmentRel[] {\n\t\treturn super.relationshipOneToMany<ShipmentRel>(...ids)\n\t}\n\n\n\ttype(): ShipmentType {\n\t\treturn Shipments.TYPE\n\t}\n\n}\n\n\nconst instance = new Shipments()\nexport default instance\n\nexport type { Shipments, Shipment, ShipmentCreate, ShipmentUpdate, ShipmentType }\n"]}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { jw as Shipment, jx as ShipmentCreate, jz as ShipmentSort, mK as ShipmentType, jy as ShipmentUpdate, cQ as Shipments, cP as default } from '../api-IwWtsAqE.cjs';
|
2
2
|
import '../client.cjs';
|
3
3
|
import '../interceptor-k15jXzf0.cjs';
|
4
4
|
import '../types.cjs';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { jw as Shipment, jx as ShipmentCreate, jz as ShipmentSort, mK as ShipmentType, jy as ShipmentUpdate, cQ as Shipments, cP as default } from '../api-F1F37Dud.js';
|
2
2
|
import '../client.js';
|
3
3
|
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A;AACvD,EAGA,IAAqB,GAAA;AACpB,IAAA,OAAO,SAAU,CAAA,IAAA;AAAA;AAGnB;AAGA,MAAM,QAAA,GAAW,IAAI,SAAU,EAAA;AAC/B,IAAO,iBAAQ,GAAA","file":"shipments.js","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Order, OrderType } from './orders'\nimport type { ShippingCategory, ShippingCategoryType } from './shipping_categories'\nimport type { InventoryStockLocation, InventoryStockLocationType } from './inventory_stock_locations'\nimport type { StockLocation } from './stock_locations'\nimport type { Address, AddressType } from './addresses'\nimport type { ShippingMethod, ShippingMethodType } from './shipping_methods'\nimport type { DeliveryLeadTime } from './delivery_lead_times'\nimport type { Pickup } from './pickups'\nimport type { StockLineItem } from './stock_line_items'\nimport type { StockTransfer } from './stock_transfers'\nimport type { LineItem } from './line_items'\nimport type { CarrierAccount } from './carrier_accounts'\nimport type { Parcel } from './parcels'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Tag, TagType } from './tags'\nimport type { Version } from './versions'\n\n\ntype ShipmentType = 'shipments'\ntype ShipmentRel = ResourceRel & { type: ShipmentType }\ntype OrderRel = ResourceRel & { type: OrderType }\ntype ShippingCategoryRel = ResourceRel & { type: ShippingCategoryType }\ntype InventoryStockLocationRel = ResourceRel & { type: InventoryStockLocationType }\ntype AddressRel = ResourceRel & { type: AddressType }\ntype ShippingMethodRel = ResourceRel & { type: ShippingMethodType }\ntype TagRel = ResourceRel & { type: TagType }\n\n\nexport type ShipmentSort = Pick<Shipment, 'id' | 'number' | 'status' | 'cost_amount_cents' | 'get_rates_started_at' | 'get_rates_completed_at' | 'purchase_started_at' | 'purchase_completed_at' | 'purchase_failed_at' | 'on_hold_at' | 'picking_at' | 'packing_at' | 'ready_to_ship_at' | 'shipped_at'> & ResourceSort\n// export type ShipmentFilter = Pick<Shipment, 'id' | 'number' | 'status' | 'cost_amount_cents' | 'get_rates_started_at' | 'get_rates_completed_at' | 'purchase_started_at' | 'purchase_completed_at' | 'purchase_failed_at' | 'on_hold_at' | 'picking_at' | 'packing_at' | 'ready_to_ship_at' | 'shipped_at'> & ResourceFilter\n\n\ninterface Shipment extends Resource {\n\t\n\treadonly type: ShipmentType\n\n\t/** \n\t * Unique identifier for the shipment. Cannot be passed by sales channels.\n\t * @example ```\"#1234/S/001\"```\n\t */\n\tnumber: string\n\t/** \n\t * The shipment status. One of 'draft' (default), 'upcoming', 'cancelled', 'on_hold', 'picking', 'packing', 'ready_to_ship', 'shipped', or 'delivered'.\n\t * @example ```\"draft\"```\n\t */\n\tstatus: 'draft' | 'upcoming' | 'cancelled' | 'on_hold' | 'picking' | 'packing' | 'ready_to_ship' | 'shipped' | 'delivered'\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard, automatically inherited from the associated order.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * The cost of this shipment from the selected carrier account, in cents.\n\t * @example ```1000```\n\t */\n\tcost_amount_cents?: number | null\n\t/** \n\t * The cost of this shipment from the selected carrier account, float.\n\t * @example ```10```\n\t */\n\tcost_amount_float?: number | null\n\t/** \n\t * The cost of this shipment from the selected carrier account, formatted.\n\t * @example ```\"€10,00\"```\n\t */\n\tformatted_cost_amount?: string | null\n\t/** \n\t * The total number of SKUs in the shipment's line items. This can be useful to display a preview of the shipment content.\n\t * @example ```2```\n\t */\n\tskus_count?: number | null\n\t/** \n\t * The selected purchase rate from the available shipping rates.\n\t * @example ```\"rate_f89e4663c3ed47ee94d37763f6d21d54\"```\n\t */\n\tselected_rate_id?: string | null\n\t/** \n\t * The available shipping rates.\n\t * @example ```[{\"id\":\"rate_f89e4663c3ed47ee94d37763f6d21d54\",\"rate\":\"45.59\",\"carrier\":\"DHLExpress\",\"service\":\"MedicalExpress\"}]```\n\t */\n\trates?: Array<Record<string, any>> | null\n\t/** \n\t * The shipping rate purchase error code, if any.\n\t * @example ```\"SHIPMENT.POSTAGE.FAILURE\"```\n\t */\n\tpurchase_error_code?: string | null\n\t/** \n\t * The shipping rate purchase error message, if any.\n\t * @example ```\"Account not allowed for this service.\"```\n\t */\n\tpurchase_error_message?: string | null\n\t/** \n\t * Any errors collected when fetching shipping rates.\n\t * @example ```[{\"carrier\":\"DHLExpress\",\"message\":\"to_address.postal_code: Shorter than minimum length 3\",\"type\":\"rate_error\"}]```\n\t */\n\tget_rates_errors?: Array<Record<string, any>> | null\n\t/** \n\t * Time at which the getting of the shipping rates started.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tget_rates_started_at?: string | null\n\t/** \n\t * Time at which the getting of the shipping rates completed.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tget_rates_completed_at?: string | null\n\t/** \n\t * Time at which the purchasing of the shipping rate started.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tpurchase_started_at?: string | null\n\t/** \n\t * Time at which the purchasing of the shipping rate completed.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tpurchase_completed_at?: string | null\n\t/** \n\t * Time at which the purchasing of the shipping rate failed.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tpurchase_failed_at?: string | null\n\t/** \n\t * Time at which the shipment was put on hold.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\ton_hold_at?: string | null\n\t/** \n\t * Time at which the shipment was picking.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tpicking_at?: string | null\n\t/** \n\t * Time at which the shipment was packing.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tpacking_at?: string | null\n\t/** \n\t * Time at which the shipment was ready to ship.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tready_to_ship_at?: string | null\n\t/** \n\t * Time at which the shipment was shipped.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tshipped_at?: string | null\n\n\torder?: Order | null\n\tshipping_category?: ShippingCategory | null\n\tinventory_stock_location?: InventoryStockLocation | null\n\tstock_location?: StockLocation | null\n\torigin_address?: Address | null\n\tshipping_address?: Address | null\n\tshipping_method?: ShippingMethod | null\n\tdelivery_lead_time?: DeliveryLeadTime | null\n\tpickup?: Pickup | null\n\tstock_line_items?: StockLineItem[] | null\n\tstock_transfers?: StockTransfer[] | null\n\tline_items?: LineItem[] | null\n\tavailable_shipping_methods?: ShippingMethod[] | null\n\tcarrier_accounts?: CarrierAccount[] | null\n\tparcels?: Parcel[] | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\ttags?: Tag[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface ShipmentCreate extends ResourceCreate {\n\t\n\torder: OrderRel\n\tshipping_category?: ShippingCategoryRel | null\n\tinventory_stock_location: InventoryStockLocationRel\n\tshipping_address?: AddressRel | null\n\tshipping_method?: ShippingMethodRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\ninterface ShipmentUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * Unique identifier for the shipment. Cannot be passed by sales channels.\n\t * @example ```\"#1234/S/001\"```\n\t */\n\tnumber?: string | null\n\t/** \n\t * Send this attribute if you want to mark this shipment as upcoming. Cannot be passed by sales channels.\n\t * @example ```true```\n\t */\n\t_upcoming?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this shipment as cancelled (unless already shipped or delivered). Cannot be passed by sales channels.\n\t * @example ```true```\n\t */\n\t_cancel?: boolean | null\n\t/** \n\t * Send this attribute if you want to put this shipment on hold.\n\t * @example ```true```\n\t */\n\t_on_hold?: boolean | null\n\t/** \n\t * Send this attribute if you want to start picking this shipment.\n\t * @example ```true```\n\t */\n\t_picking?: boolean | null\n\t/** \n\t * Send this attribute if you want to start packing this shipment.\n\t * @example ```true```\n\t */\n\t_packing?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this shipment as ready to ship.\n\t * @example ```true```\n\t */\n\t_ready_to_ship?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this shipment as shipped.\n\t * @example ```true```\n\t */\n\t_ship?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this shipment as delivered.\n\t * @example ```true```\n\t */\n\t_deliver?: boolean | null\n\t/** \n\t * Send this attribute if you want to automatically reserve the stock for each of the associated stock line item. Can be done only when fulfillment is in progress. Cannot be passed by sales channels.\n\t * @example ```true```\n\t */\n\t_reserve_stock?: boolean | null\n\t/** \n\t * Send this attribute if you want to automatically destroy the stock reservations for each of the associated stock line item. Can be done only when fulfillment is in progress. Cannot be passed by sales channels.\n\t * @example ```true```\n\t */\n\t_release_stock?: boolean | null\n\t/** \n\t * Send this attribute if you want to automatically decrement and release the stock for each of the associated stock line item. Can be done only when fulfillment is in progress. Cannot be passed by sales channels.\n\t * @example ```true```\n\t */\n\t_decrement_stock?: boolean | null\n\t/** \n\t * Send this attribute if you want get the shipping rates from the associated carrier accounts.\n\t * @example ```true```\n\t */\n\t_get_rates?: boolean | null\n\t/** \n\t * The selected purchase rate from the available shipping rates.\n\t * @example ```\"rate_f89e4663c3ed47ee94d37763f6d21d54\"```\n\t */\n\tselected_rate_id?: string | null\n\t/** \n\t * Send this attribute if you want to purchase this shipment with the selected rate.\n\t * @example ```true```\n\t */\n\t_purchase?: boolean | null\n\t/** \n\t * Comma separated list of tags to be added. Duplicates, invalid and non existing ones are discarded. Cannot be passed by sales channels.\n\t */\n\t_add_tags?: string | null\n\t/** \n\t * Comma separated list of tags to be removed. Duplicates, invalid and non existing ones are discarded. Cannot be passed by sales channels.\n\t */\n\t_remove_tags?: string | null\n\n\tshipping_category?: ShippingCategoryRel | null\n\tinventory_stock_location?: InventoryStockLocationRel | null\n\tshipping_address?: AddressRel | null\n\tshipping_method?: ShippingMethodRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\nclass Shipments extends ApiResource<Shipment> {\n\n\tstatic readonly TYPE: ShipmentType = 'shipments' as const\n\n\tasync create(resource: ShipmentCreate, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.create<ShipmentCreate, Shipment>({ ...resource, type: Shipments.TYPE }, params, options)\n\t}\n\n\tasync update(resource: ShipmentUpdate, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ ...resource, type: Shipments.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: Shipments.TYPE } : id, options)\n\t}\n\n\tasync order(shipmentId: string | Shipment, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `shipments/${_shipmentId}/order`, params, options) as unknown as Order\n\t}\n\n\tasync shipping_category(shipmentId: string | Shipment, params?: QueryParamsRetrieve<ShippingCategory>, options?: ResourcesConfig): Promise<ShippingCategory> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<ShippingCategory>({ type: 'shipping_categories' }, `shipments/${_shipmentId}/shipping_category`, params, options) as unknown as ShippingCategory\n\t}\n\n\tasync inventory_stock_location(shipmentId: string | Shipment, params?: QueryParamsRetrieve<InventoryStockLocation>, options?: ResourcesConfig): Promise<InventoryStockLocation> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<InventoryStockLocation>({ type: 'inventory_stock_locations' }, `shipments/${_shipmentId}/inventory_stock_location`, params, options) as unknown as InventoryStockLocation\n\t}\n\n\tasync stock_location(shipmentId: string | Shipment, params?: QueryParamsRetrieve<StockLocation>, options?: ResourcesConfig): Promise<StockLocation> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<StockLocation>({ type: 'stock_locations' }, `shipments/${_shipmentId}/stock_location`, params, options) as unknown as StockLocation\n\t}\n\n\tasync origin_address(shipmentId: string | Shipment, params?: QueryParamsRetrieve<Address>, options?: ResourcesConfig): Promise<Address> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<Address>({ type: 'addresses' }, `shipments/${_shipmentId}/origin_address`, params, options) as unknown as Address\n\t}\n\n\tasync shipping_address(shipmentId: string | Shipment, params?: QueryParamsRetrieve<Address>, options?: ResourcesConfig): Promise<Address> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<Address>({ type: 'addresses' }, `shipments/${_shipmentId}/shipping_address`, params, options) as unknown as Address\n\t}\n\n\tasync shipping_method(shipmentId: string | Shipment, params?: QueryParamsRetrieve<ShippingMethod>, options?: ResourcesConfig): Promise<ShippingMethod> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<ShippingMethod>({ type: 'shipping_methods' }, `shipments/${_shipmentId}/shipping_method`, params, options) as unknown as ShippingMethod\n\t}\n\n\tasync delivery_lead_time(shipmentId: string | Shipment, params?: QueryParamsRetrieve<DeliveryLeadTime>, options?: ResourcesConfig): Promise<DeliveryLeadTime> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<DeliveryLeadTime>({ type: 'delivery_lead_times' }, `shipments/${_shipmentId}/delivery_lead_time`, params, options) as unknown as DeliveryLeadTime\n\t}\n\n\tasync pickup(shipmentId: string | Shipment, params?: QueryParamsRetrieve<Pickup>, options?: ResourcesConfig): Promise<Pickup> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<Pickup>({ type: 'pickups' }, `shipments/${_shipmentId}/pickup`, params, options) as unknown as Pickup\n\t}\n\n\tasync stock_line_items(shipmentId: string | Shipment, params?: QueryParamsList<StockLineItem>, options?: ResourcesConfig): Promise<ListResponse<StockLineItem>> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<StockLineItem>({ type: 'stock_line_items' }, `shipments/${_shipmentId}/stock_line_items`, params, options) as unknown as ListResponse<StockLineItem>\n\t}\n\n\tasync stock_transfers(shipmentId: string | Shipment, params?: QueryParamsList<StockTransfer>, options?: ResourcesConfig): Promise<ListResponse<StockTransfer>> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<StockTransfer>({ type: 'stock_transfers' }, `shipments/${_shipmentId}/stock_transfers`, params, options) as unknown as ListResponse<StockTransfer>\n\t}\n\n\tasync line_items(shipmentId: string | Shipment, params?: QueryParamsList<LineItem>, options?: ResourcesConfig): Promise<ListResponse<LineItem>> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<LineItem>({ type: 'line_items' }, `shipments/${_shipmentId}/line_items`, params, options) as unknown as ListResponse<LineItem>\n\t}\n\n\tasync available_shipping_methods(shipmentId: string | Shipment, params?: QueryParamsList<ShippingMethod>, options?: ResourcesConfig): Promise<ListResponse<ShippingMethod>> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<ShippingMethod>({ type: 'shipping_methods' }, `shipments/${_shipmentId}/available_shipping_methods`, params, options) as unknown as ListResponse<ShippingMethod>\n\t}\n\n\tasync carrier_accounts(shipmentId: string | Shipment, params?: QueryParamsList<CarrierAccount>, options?: ResourcesConfig): Promise<ListResponse<CarrierAccount>> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<CarrierAccount>({ type: 'carrier_accounts' }, `shipments/${_shipmentId}/carrier_accounts`, params, options) as unknown as ListResponse<CarrierAccount>\n\t}\n\n\tasync parcels(shipmentId: string | Shipment, params?: QueryParamsList<Parcel>, options?: ResourcesConfig): Promise<ListResponse<Parcel>> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<Parcel>({ type: 'parcels' }, `shipments/${_shipmentId}/parcels`, params, options) as unknown as ListResponse<Parcel>\n\t}\n\n\tasync attachments(shipmentId: string | Shipment, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `shipments/${_shipmentId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(shipmentId: string | Shipment, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `shipments/${_shipmentId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync tags(shipmentId: string | Shipment, params?: QueryParamsList<Tag>, options?: ResourcesConfig): Promise<ListResponse<Tag>> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<Tag>({ type: 'tags' }, `shipments/${_shipmentId}/tags`, params, options) as unknown as ListResponse<Tag>\n\t}\n\n\tasync versions(shipmentId: string | Shipment, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `shipments/${_shipmentId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _upcoming(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _upcoming: true }, params, options)\n\t}\n\n\tasync _cancel(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _cancel: true }, params, options)\n\t}\n\n\tasync _on_hold(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _on_hold: true }, params, options)\n\t}\n\n\tasync _picking(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _picking: true }, params, options)\n\t}\n\n\tasync _packing(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _packing: true }, params, options)\n\t}\n\n\tasync _ready_to_ship(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _ready_to_ship: true }, params, options)\n\t}\n\n\tasync _ship(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _ship: true }, params, options)\n\t}\n\n\tasync _deliver(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _deliver: true }, params, options)\n\t}\n\n\tasync _reserve_stock(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _reserve_stock: true }, params, options)\n\t}\n\n\tasync _release_stock(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _release_stock: true }, params, options)\n\t}\n\n\tasync _decrement_stock(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _decrement_stock: true }, params, options)\n\t}\n\n\tasync _get_rates(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _get_rates: true }, params, options)\n\t}\n\n\tasync _purchase(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _purchase: true }, params, options)\n\t}\n\n\tasync _add_tags(id: string | Shipment, triggerValue: string, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _add_tags: triggerValue }, params, options)\n\t}\n\n\tasync _remove_tags(id: string | Shipment, triggerValue: string, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _remove_tags: triggerValue }, params, options)\n\t}\n\n\n\tisShipment(resource: any): resource is Shipment {\n\t\treturn resource.type && (resource.type === Shipments.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): ShipmentRel {\n\t\treturn super.relationshipOneToOne<ShipmentRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): ShipmentRel[] {\n\t\treturn super.relationshipOneToMany<ShipmentRel>(...ids)\n\t}\n\n\n\ttype(): ShipmentType {\n\t\treturn Shipments.TYPE\n\t}\n\n}\n\n\nconst instance = new Shipments()\nexport default instance\n\nexport type { Shipment, ShipmentCreate, ShipmentUpdate, ShipmentType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/shipments.ts"],"names":[],"mappings":";;AA0RA,MAAM,kBAAkB,WAAsB,CAAA;AAAA,EAE7C,OAAgB,IAAqB,GAAA,WAAA;AAAA,EAErC,MAAM,MAAA,CAAO,QAA0B,EAAA,MAAA,EAAwC,OAA8C,EAAA;AAC5H,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAiC,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,SAAU,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC9G,EAEA,MAAM,MAAA,CAAO,QAA0B,EAAA,MAAA,EAAwC,OAA8C,EAAA;AAC5H,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAiC,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,SAAU,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC9G,EAEA,MAAM,MAAO,CAAA,EAAA,EAAyB,OAA0C,EAAA;AAC/E,IAAA,MAAM,IAAK,CAAA,SAAA,CAAU,MAAQ,CAAA,OAAO,EAAO,KAAA,QAAA,GAAW,EAAE,EAAA,EAAI,IAAM,EAAA,SAAA,CAAU,IAAK,EAAA,GAAI,IAAI,OAAO,CAAA;AAAA;AACj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Ac,YAAa,EAAA,EAAG,QAAQ,OAAO,CAAA;AAAA;AACtK,EAGA,WAAW,QAAqC,EAAA;AAC/C,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,SAAU,CAAA,IAAA;AAAA;AACtD,EAGA,aAAa,EAA6C,EAAA;AACzD,IAAO,OAAA,KAAA,CAAM,qBAAkC,EAAE,CAAA;AAAA;AAClD,EAEA,sBAAsB,GAA8B,EAAA;AACnD,IAAO,OAAA,KAAA,CAAM,qBAAmC,CAAA,GAAG,GAAG,CAAA;AAAA;AACvD,EAGA,IAAqB,GAAA;AACpB,IAAA,OAAO,SAAU,CAAA,IAAA;AAAA;AAGnB;AAGA,MAAM,QAAA,GAAW,IAAI,SAAU,EAAA;AAC/B,IAAO,iBAAQ,GAAA","file":"shipments.js","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Order, OrderType } from './orders'\nimport type { ShippingCategory, ShippingCategoryType } from './shipping_categories'\nimport type { InventoryStockLocation, InventoryStockLocationType } from './inventory_stock_locations'\nimport type { StockLocation } from './stock_locations'\nimport type { Address, AddressType } from './addresses'\nimport type { ShippingMethod, ShippingMethodType } from './shipping_methods'\nimport type { DeliveryLeadTime } from './delivery_lead_times'\nimport type { Pickup } from './pickups'\nimport type { StockLineItem } from './stock_line_items'\nimport type { StockTransfer } from './stock_transfers'\nimport type { LineItem } from './line_items'\nimport type { CarrierAccount } from './carrier_accounts'\nimport type { Parcel } from './parcels'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Tag, TagType } from './tags'\nimport type { Version } from './versions'\n\n\ntype ShipmentType = 'shipments'\ntype ShipmentRel = ResourceRel & { type: ShipmentType }\ntype OrderRel = ResourceRel & { type: OrderType }\ntype ShippingCategoryRel = ResourceRel & { type: ShippingCategoryType }\ntype InventoryStockLocationRel = ResourceRel & { type: InventoryStockLocationType }\ntype AddressRel = ResourceRel & { type: AddressType }\ntype ShippingMethodRel = ResourceRel & { type: ShippingMethodType }\ntype TagRel = ResourceRel & { type: TagType }\n\n\nexport type ShipmentSort = Pick<Shipment, 'id' | 'number' | 'status' | 'cost_amount_cents' | 'get_rates_started_at' | 'get_rates_completed_at' | 'purchase_started_at' | 'purchase_completed_at' | 'purchase_failed_at' | 'on_hold_at' | 'picking_at' | 'packing_at' | 'ready_to_ship_at' | 'shipped_at'> & ResourceSort\n// export type ShipmentFilter = Pick<Shipment, 'id' | 'number' | 'status' | 'cost_amount_cents' | 'get_rates_started_at' | 'get_rates_completed_at' | 'purchase_started_at' | 'purchase_completed_at' | 'purchase_failed_at' | 'on_hold_at' | 'picking_at' | 'packing_at' | 'ready_to_ship_at' | 'shipped_at'> & ResourceFilter\n\n\ninterface Shipment extends Resource {\n\t\n\treadonly type: ShipmentType\n\n\t/** \n\t * Unique identifier for the shipment. Cannot be passed by sales channels.\n\t * @example ```\"#1234/S/001\"```\n\t */\n\tnumber: string\n\t/** \n\t * The shipment status. One of 'draft' (default), 'upcoming', 'cancelled', 'on_hold', 'picking', 'packing', 'ready_to_ship', 'shipped', or 'delivered'.\n\t * @example ```\"draft\"```\n\t */\n\tstatus: 'draft' | 'upcoming' | 'cancelled' | 'on_hold' | 'picking' | 'packing' | 'ready_to_ship' | 'shipped' | 'delivered'\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard, automatically inherited from the associated order.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * The cost of this shipment from the selected carrier account, in cents.\n\t * @example ```1000```\n\t */\n\tcost_amount_cents?: number | null\n\t/** \n\t * The cost of this shipment from the selected carrier account, float.\n\t * @example ```10```\n\t */\n\tcost_amount_float?: number | null\n\t/** \n\t * The cost of this shipment from the selected carrier account, formatted.\n\t * @example ```\"€10,00\"```\n\t */\n\tformatted_cost_amount?: string | null\n\t/** \n\t * The total number of SKUs in the shipment's line items. This can be useful to display a preview of the shipment content.\n\t * @example ```2```\n\t */\n\tskus_count?: number | null\n\t/** \n\t * The selected purchase rate from the available shipping rates.\n\t * @example ```\"rate_f89e4663c3ed47ee94d37763f6d21d54\"```\n\t */\n\tselected_rate_id?: string | null\n\t/** \n\t * The available shipping rates.\n\t * @example ```[{\"id\":\"rate_f89e4663c3ed47ee94d37763f6d21d54\",\"rate\":\"45.59\",\"carrier\":\"DHLExpress\",\"service\":\"MedicalExpress\"}]```\n\t */\n\trates?: Array<Record<string, any>> | null\n\t/** \n\t * The shipping rate purchase error code, if any.\n\t * @example ```\"SHIPMENT.POSTAGE.FAILURE\"```\n\t */\n\tpurchase_error_code?: string | null\n\t/** \n\t * The shipping rate purchase error message, if any.\n\t * @example ```\"Account not allowed for this service.\"```\n\t */\n\tpurchase_error_message?: string | null\n\t/** \n\t * Any errors collected when fetching shipping rates.\n\t * @example ```[{\"carrier\":\"DHLExpress\",\"message\":\"to_address.postal_code: Shorter than minimum length 3\",\"type\":\"rate_error\"}]```\n\t */\n\tget_rates_errors?: Array<Record<string, any>> | null\n\t/** \n\t * Time at which the getting of the shipping rates started.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tget_rates_started_at?: string | null\n\t/** \n\t * Time at which the getting of the shipping rates completed.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tget_rates_completed_at?: string | null\n\t/** \n\t * Time at which the purchasing of the shipping rate started.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tpurchase_started_at?: string | null\n\t/** \n\t * Time at which the purchasing of the shipping rate completed.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tpurchase_completed_at?: string | null\n\t/** \n\t * Time at which the purchasing of the shipping rate failed.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tpurchase_failed_at?: string | null\n\t/** \n\t * Time at which the shipment was put on hold.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\ton_hold_at?: string | null\n\t/** \n\t * Time at which the shipment was picking.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tpicking_at?: string | null\n\t/** \n\t * Time at which the shipment was packing.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tpacking_at?: string | null\n\t/** \n\t * Time at which the shipment was ready to ship.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tready_to_ship_at?: string | null\n\t/** \n\t * Time at which the shipment was shipped.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tshipped_at?: string | null\n\n\torder?: Order | null\n\tshipping_category?: ShippingCategory | null\n\tinventory_stock_location?: InventoryStockLocation | null\n\tstock_location?: StockLocation | null\n\torigin_address?: Address | null\n\tshipping_address?: Address | null\n\tshipping_method?: ShippingMethod | null\n\tdelivery_lead_time?: DeliveryLeadTime | null\n\tpickup?: Pickup | null\n\tstock_line_items?: StockLineItem[] | null\n\tstock_transfers?: StockTransfer[] | null\n\tline_items?: LineItem[] | null\n\tavailable_shipping_methods?: ShippingMethod[] | null\n\tcarrier_accounts?: CarrierAccount[] | null\n\tparcels?: Parcel[] | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\ttags?: Tag[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface ShipmentCreate extends ResourceCreate {\n\t\n\torder: OrderRel\n\tshipping_category?: ShippingCategoryRel | null\n\tinventory_stock_location: InventoryStockLocationRel\n\tshipping_address?: AddressRel | null\n\tshipping_method?: ShippingMethodRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\ninterface ShipmentUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * Unique identifier for the shipment. Cannot be passed by sales channels.\n\t * @example ```\"#1234/S/001\"```\n\t */\n\tnumber?: string | null\n\t/** \n\t * Send this attribute if you want to mark this shipment as upcoming. Cannot be passed by sales channels.\n\t * @example ```true```\n\t */\n\t_upcoming?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this shipment as cancelled (unless already shipped or delivered). Cannot be passed by sales channels.\n\t * @example ```true```\n\t */\n\t_cancel?: boolean | null\n\t/** \n\t * Send this attribute if you want to put this shipment on hold.\n\t * @example ```true```\n\t */\n\t_on_hold?: boolean | null\n\t/** \n\t * Send this attribute if you want to start picking this shipment.\n\t * @example ```true```\n\t */\n\t_picking?: boolean | null\n\t/** \n\t * Send this attribute if you want to start packing this shipment.\n\t * @example ```true```\n\t */\n\t_packing?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this shipment as ready to ship.\n\t * @example ```true```\n\t */\n\t_ready_to_ship?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this shipment as shipped.\n\t * @example ```true```\n\t */\n\t_ship?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this shipment as delivered.\n\t * @example ```true```\n\t */\n\t_deliver?: boolean | null\n\t/** \n\t * Send this attribute if you want to automatically reserve the stock for each of the associated stock line item. Can be done only when fulfillment is in progress. Cannot be passed by sales channels.\n\t * @example ```true```\n\t */\n\t_reserve_stock?: boolean | null\n\t/** \n\t * Send this attribute if you want to automatically destroy the stock reservations for each of the associated stock line item. Can be done only when fulfillment is in progress. Cannot be passed by sales channels.\n\t * @example ```true```\n\t */\n\t_release_stock?: boolean | null\n\t/** \n\t * Send this attribute if you want to automatically decrement and release the stock for each of the associated stock line item. Can be done only when fulfillment is in progress. Cannot be passed by sales channels.\n\t * @example ```true```\n\t */\n\t_decrement_stock?: boolean | null\n\t/** \n\t * Send this attribute if you want get the shipping rates from the associated carrier accounts.\n\t * @example ```true```\n\t */\n\t_get_rates?: boolean | null\n\t/** \n\t * The selected purchase rate from the available shipping rates.\n\t * @example ```\"rate_f89e4663c3ed47ee94d37763f6d21d54\"```\n\t */\n\tselected_rate_id?: string | null\n\t/** \n\t * Send this attribute if you want to purchase this shipment with the selected rate.\n\t * @example ```true```\n\t */\n\t_purchase?: boolean | null\n\t/** \n\t * Comma separated list of tags to be added. Duplicates, invalid and non existing ones are discarded. Cannot be passed by sales channels.\n\t */\n\t_add_tags?: string | null\n\t/** \n\t * Comma separated list of tags to be removed. Duplicates, invalid and non existing ones are discarded. Cannot be passed by sales channels.\n\t */\n\t_remove_tags?: string | null\n\n\tshipping_category?: ShippingCategoryRel | null\n\tinventory_stock_location?: InventoryStockLocationRel | null\n\tshipping_address?: AddressRel | null\n\tshipping_method?: ShippingMethodRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\nclass Shipments extends ApiResource<Shipment> {\n\n\tstatic readonly TYPE: ShipmentType = 'shipments' as const\n\n\tasync create(resource: ShipmentCreate, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.create<ShipmentCreate, Shipment>({ ...resource, type: Shipments.TYPE }, params, options)\n\t}\n\n\tasync update(resource: ShipmentUpdate, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ ...resource, type: Shipments.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: Shipments.TYPE } : id, options)\n\t}\n\n\tasync order(shipmentId: string | Shipment, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `shipments/${_shipmentId}/order`, params, options) as unknown as Order\n\t}\n\n\tasync shipping_category(shipmentId: string | Shipment, params?: QueryParamsRetrieve<ShippingCategory>, options?: ResourcesConfig): Promise<ShippingCategory> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<ShippingCategory>({ type: 'shipping_categories' }, `shipments/${_shipmentId}/shipping_category`, params, options) as unknown as ShippingCategory\n\t}\n\n\tasync inventory_stock_location(shipmentId: string | Shipment, params?: QueryParamsRetrieve<InventoryStockLocation>, options?: ResourcesConfig): Promise<InventoryStockLocation> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<InventoryStockLocation>({ type: 'inventory_stock_locations' }, `shipments/${_shipmentId}/inventory_stock_location`, params, options) as unknown as InventoryStockLocation\n\t}\n\n\tasync stock_location(shipmentId: string | Shipment, params?: QueryParamsRetrieve<StockLocation>, options?: ResourcesConfig): Promise<StockLocation> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<StockLocation>({ type: 'stock_locations' }, `shipments/${_shipmentId}/stock_location`, params, options) as unknown as StockLocation\n\t}\n\n\tasync origin_address(shipmentId: string | Shipment, params?: QueryParamsRetrieve<Address>, options?: ResourcesConfig): Promise<Address> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<Address>({ type: 'addresses' }, `shipments/${_shipmentId}/origin_address`, params, options) as unknown as Address\n\t}\n\n\tasync shipping_address(shipmentId: string | Shipment, params?: QueryParamsRetrieve<Address>, options?: ResourcesConfig): Promise<Address> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<Address>({ type: 'addresses' }, `shipments/${_shipmentId}/shipping_address`, params, options) as unknown as Address\n\t}\n\n\tasync shipping_method(shipmentId: string | Shipment, params?: QueryParamsRetrieve<ShippingMethod>, options?: ResourcesConfig): Promise<ShippingMethod> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<ShippingMethod>({ type: 'shipping_methods' }, `shipments/${_shipmentId}/shipping_method`, params, options) as unknown as ShippingMethod\n\t}\n\n\tasync delivery_lead_time(shipmentId: string | Shipment, params?: QueryParamsRetrieve<DeliveryLeadTime>, options?: ResourcesConfig): Promise<DeliveryLeadTime> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<DeliveryLeadTime>({ type: 'delivery_lead_times' }, `shipments/${_shipmentId}/delivery_lead_time`, params, options) as unknown as DeliveryLeadTime\n\t}\n\n\tasync pickup(shipmentId: string | Shipment, params?: QueryParamsRetrieve<Pickup>, options?: ResourcesConfig): Promise<Pickup> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<Pickup>({ type: 'pickups' }, `shipments/${_shipmentId}/pickup`, params, options) as unknown as Pickup\n\t}\n\n\tasync stock_line_items(shipmentId: string | Shipment, params?: QueryParamsList<StockLineItem>, options?: ResourcesConfig): Promise<ListResponse<StockLineItem>> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<StockLineItem>({ type: 'stock_line_items' }, `shipments/${_shipmentId}/stock_line_items`, params, options) as unknown as ListResponse<StockLineItem>\n\t}\n\n\tasync stock_transfers(shipmentId: string | Shipment, params?: QueryParamsList<StockTransfer>, options?: ResourcesConfig): Promise<ListResponse<StockTransfer>> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<StockTransfer>({ type: 'stock_transfers' }, `shipments/${_shipmentId}/stock_transfers`, params, options) as unknown as ListResponse<StockTransfer>\n\t}\n\n\tasync line_items(shipmentId: string | Shipment, params?: QueryParamsList<LineItem>, options?: ResourcesConfig): Promise<ListResponse<LineItem>> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<LineItem>({ type: 'line_items' }, `shipments/${_shipmentId}/line_items`, params, options) as unknown as ListResponse<LineItem>\n\t}\n\n\tasync available_shipping_methods(shipmentId: string | Shipment, params?: QueryParamsList<ShippingMethod>, options?: ResourcesConfig): Promise<ListResponse<ShippingMethod>> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<ShippingMethod>({ type: 'shipping_methods' }, `shipments/${_shipmentId}/available_shipping_methods`, params, options) as unknown as ListResponse<ShippingMethod>\n\t}\n\n\tasync carrier_accounts(shipmentId: string | Shipment, params?: QueryParamsList<CarrierAccount>, options?: ResourcesConfig): Promise<ListResponse<CarrierAccount>> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<CarrierAccount>({ type: 'carrier_accounts' }, `shipments/${_shipmentId}/carrier_accounts`, params, options) as unknown as ListResponse<CarrierAccount>\n\t}\n\n\tasync parcels(shipmentId: string | Shipment, params?: QueryParamsList<Parcel>, options?: ResourcesConfig): Promise<ListResponse<Parcel>> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<Parcel>({ type: 'parcels' }, `shipments/${_shipmentId}/parcels`, params, options) as unknown as ListResponse<Parcel>\n\t}\n\n\tasync attachments(shipmentId: string | Shipment, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `shipments/${_shipmentId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(shipmentId: string | Shipment, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `shipments/${_shipmentId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync tags(shipmentId: string | Shipment, params?: QueryParamsList<Tag>, options?: ResourcesConfig): Promise<ListResponse<Tag>> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<Tag>({ type: 'tags' }, `shipments/${_shipmentId}/tags`, params, options) as unknown as ListResponse<Tag>\n\t}\n\n\tasync versions(shipmentId: string | Shipment, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `shipments/${_shipmentId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _upcoming(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _upcoming: true }, params, options)\n\t}\n\n\tasync _cancel(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _cancel: true }, params, options)\n\t}\n\n\tasync _on_hold(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _on_hold: true }, params, options)\n\t}\n\n\tasync _picking(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _picking: true }, params, options)\n\t}\n\n\tasync _packing(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _packing: true }, params, options)\n\t}\n\n\tasync _ready_to_ship(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _ready_to_ship: true }, params, options)\n\t}\n\n\tasync _ship(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _ship: true }, params, options)\n\t}\n\n\tasync _deliver(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _deliver: true }, params, options)\n\t}\n\n\tasync _reserve_stock(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _reserve_stock: true }, params, options)\n\t}\n\n\tasync _release_stock(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _release_stock: true }, params, options)\n\t}\n\n\tasync _decrement_stock(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _decrement_stock: true }, params, options)\n\t}\n\n\tasync _get_rates(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _get_rates: true }, params, options)\n\t}\n\n\tasync _purchase(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _purchase: true }, params, options)\n\t}\n\n\tasync _add_tags(id: string | Shipment, triggerValue: string, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _add_tags: triggerValue }, params, options)\n\t}\n\n\tasync _remove_tags(id: string | Shipment, triggerValue: string, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _remove_tags: triggerValue }, params, options)\n\t}\n\n\n\tisShipment(resource: any): resource is Shipment {\n\t\treturn resource.type && (resource.type === Shipments.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): ShipmentRel {\n\t\treturn super.relationshipOneToOne<ShipmentRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): ShipmentRel[] {\n\t\treturn super.relationshipOneToMany<ShipmentRel>(...ids)\n\t}\n\n\n\ttype(): ShipmentType {\n\t\treturn Shipments.TYPE\n\t}\n\n}\n\n\nconst instance = new Shipments()\nexport default instance\n\nexport type { Shipments, Shipment, ShipmentCreate, ShipmentUpdate, ShipmentType }\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/resources/shipping_categories.ts"],"names":["ApiResource"],"mappings":";;;;AAuEA,MAAM,2BAA2BA,oBAA8B,CAAA;AAAA,EAE9D,OAAgB,IAA6B,GAAA,qBAAA;AAAA,EAE7C,MAAM,MAAA,CAAO,QAAkC,EAAA,MAAA,EAAgD,OAAsD,EAAA;AACpJ,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAiD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,kBAAmB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACvI,EAEA,MAAM,MAAA,CAAO,QAAkC,EAAA,MAAA,EAAgD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,EAAA,EAAG,CAAuB,oBAAA,EAAA,mBAAmB,CAAa,SAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAClI,EAGA,mBAAmB,QAA6C,EAAA;AAC/D,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,kBAAmB,CAAA,IAAA;AAAA;AAC/D,EAGA,aAAa,EAAqD,EAAA;AACjE,IAAO,OAAA,KAAA,CAAM,qBAA0C,EAAE,CAAA;AAAA;AAC1D,EAEA,sBAAsB,GAAsC,EAAA;AAC3D,IAAO,OAAA,KAAA,CAAM,qBAA2C,CAAA,GAAG,GAAG,CAAA;AAAA;AAC/D,EAGA,IAA6B,GAAA;AAC5B,IAAA,OAAO,kBAAmB,CAAA,IAAA;AAAA;AAG5B;AAGA,MAAM,QAAA,GAAW,IAAI,kBAAmB,EAAA;AACxC,IAAO,2BAAQ,GAAA","file":"shipping_categories.cjs","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Sku } from './skus'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype ShippingCategoryType = 'shipping_categories'\ntype ShippingCategoryRel = ResourceRel & { type: ShippingCategoryType }\n\n\nexport type ShippingCategorySort = Pick<ShippingCategory, 'id' | 'name' | 'code'> & ResourceSort\n// export type ShippingCategoryFilter = Pick<ShippingCategory, 'id' | 'name' | 'code'> & ResourceFilter\n\n\ninterface ShippingCategory extends Resource {\n\t\n\treadonly type: ShippingCategoryType\n\n\t/** \n\t * The shipping category name.\n\t * @example ```\"Merchandise\"```\n\t */\n\tname: string\n\t/** \n\t * A string that you can use to identify the shipping category (must be unique within the environment).\n\t * @example ```\"europe1\"```\n\t */\n\tcode?: string | null\n\n\tskus?: Sku[] | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface ShippingCategoryCreate extends ResourceCreate {\n\t\n\t/** \n\t * The shipping category name.\n\t * @example ```\"Merchandise\"```\n\t */\n\tname: string\n\t/** \n\t * A string that you can use to identify the shipping category (must be unique within the environment).\n\t * @example ```\"europe1\"```\n\t */\n\tcode?: string | null\n\t\n}\n\n\ninterface ShippingCategoryUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The shipping category name.\n\t * @example ```\"Merchandise\"```\n\t */\n\tname?: string | null\n\t/** \n\t * A string that you can use to identify the shipping category (must be unique within the environment).\n\t * @example ```\"europe1\"```\n\t */\n\tcode?: string | null\n\t\n}\n\n\nclass ShippingCategories extends ApiResource<ShippingCategory> {\n\n\tstatic readonly TYPE: ShippingCategoryType = 'shipping_categories' as const\n\n\tasync create(resource: ShippingCategoryCreate, params?: QueryParamsRetrieve<ShippingCategory>, options?: ResourcesConfig): Promise<ShippingCategory> {\n\t\treturn this.resources.create<ShippingCategoryCreate, ShippingCategory>({ ...resource, type: ShippingCategories.TYPE }, params, options)\n\t}\n\n\tasync update(resource: ShippingCategoryUpdate, params?: QueryParamsRetrieve<ShippingCategory>, options?: ResourcesConfig): Promise<ShippingCategory> {\n\t\treturn this.resources.update<ShippingCategoryUpdate, ShippingCategory>({ ...resource, type: ShippingCategories.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: ShippingCategories.TYPE } : id, options)\n\t}\n\n\tasync skus(shippingCategoryId: string | ShippingCategory, params?: QueryParamsList<Sku>, options?: ResourcesConfig): Promise<ListResponse<Sku>> {\n\t\tconst _shippingCategoryId = (shippingCategoryId as ShippingCategory).id || shippingCategoryId as string\n\t\treturn this.resources.fetch<Sku>({ type: 'skus' }, `shipping_categories/${_shippingCategoryId}/skus`, params, options) as unknown as ListResponse<Sku>\n\t}\n\n\tasync attachments(shippingCategoryId: string | ShippingCategory, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _shippingCategoryId = (shippingCategoryId as ShippingCategory).id || shippingCategoryId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `shipping_categories/${_shippingCategoryId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(shippingCategoryId: string | ShippingCategory, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _shippingCategoryId = (shippingCategoryId as ShippingCategory).id || shippingCategoryId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `shipping_categories/${_shippingCategoryId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisShippingCategory(resource: any): resource is ShippingCategory {\n\t\treturn resource.type && (resource.type === ShippingCategories.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): ShippingCategoryRel {\n\t\treturn super.relationshipOneToOne<ShippingCategoryRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): ShippingCategoryRel[] {\n\t\treturn super.relationshipOneToMany<ShippingCategoryRel>(...ids)\n\t}\n\n\n\ttype(): ShippingCategoryType {\n\t\treturn ShippingCategories.TYPE\n\t}\n\n}\n\n\nconst instance = new ShippingCategories()\nexport default instance\n\nexport type { ShippingCategory, ShippingCategoryCreate, ShippingCategoryUpdate, ShippingCategoryType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/shipping_categories.ts"],"names":["ApiResource"],"mappings":";;;;AAuEA,MAAM,2BAA2BA,oBAA8B,CAAA;AAAA,EAE9D,OAAgB,IAA6B,GAAA,qBAAA;AAAA,EAE7C,MAAM,MAAA,CAAO,QAAkC,EAAA,MAAA,EAAgD,OAAsD,EAAA;AACpJ,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAiD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,kBAAmB,CAAA,IAAA,EAAQ,EAAA,MA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BAAA;AAC3E,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAe,EAAE,IAAA,EAAM,UAAW,EAAA,EAAG,CAAuB,oBAAA,EAAA,mBAAmB,CAAa,SAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAClI,EAGA,mBAAmB,QAA6C,EAAA;AAC/D,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,kBAAmB,CAAA,IAAA;AAAA;AAC/D,EAGA,aAAa,EAAqD,EAAA;AACjE,IAAO,OAAA,KAAA,CAAM,qBAA0C,EAAE,CAAA;AAAA;AAC1D,EAEA,sBAAsB,GAAsC,EAAA;AAC3D,IAAO,OAAA,KAAA,CAAM,qBAA2C,CAAA,GAAG,GAAG,CAAA;AAAA;AAC/D,EAGA,IAA6B,GAAA;AAC5B,IAAA,OAAO,kBAAmB,CAAA,IAAA;AAAA;AAG5B;AAGA,MAAM,QAAA,GAAW,IAAI,kBAAmB,EAAA;AACxC,IAAO,2BAAQ,GAAA","file":"shipping_categories.cjs","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Sku } from './skus'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype ShippingCategoryType = 'shipping_categories'\ntype ShippingCategoryRel = ResourceRel & { type: ShippingCategoryType }\n\n\nexport type ShippingCategorySort = Pick<ShippingCategory, 'id' | 'name' | 'code'> & ResourceSort\n// export type ShippingCategoryFilter = Pick<ShippingCategory, 'id' | 'name' | 'code'> & ResourceFilter\n\n\ninterface ShippingCategory extends Resource {\n\t\n\treadonly type: ShippingCategoryType\n\n\t/** \n\t * The shipping category name.\n\t * @example ```\"Merchandise\"```\n\t */\n\tname: string\n\t/** \n\t * A string that you can use to identify the shipping category (must be unique within the environment).\n\t * @example ```\"europe1\"```\n\t */\n\tcode?: string | null\n\n\tskus?: Sku[] | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface ShippingCategoryCreate extends ResourceCreate {\n\t\n\t/** \n\t * The shipping category name.\n\t * @example ```\"Merchandise\"```\n\t */\n\tname: string\n\t/** \n\t * A string that you can use to identify the shipping category (must be unique within the environment).\n\t * @example ```\"europe1\"```\n\t */\n\tcode?: string | null\n\t\n}\n\n\ninterface ShippingCategoryUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The shipping category name.\n\t * @example ```\"Merchandise\"```\n\t */\n\tname?: string | null\n\t/** \n\t * A string that you can use to identify the shipping category (must be unique within the environment).\n\t * @example ```\"europe1\"```\n\t */\n\tcode?: string | null\n\t\n}\n\n\nclass ShippingCategories extends ApiResource<ShippingCategory> {\n\n\tstatic readonly TYPE: ShippingCategoryType = 'shipping_categories' as const\n\n\tasync create(resource: ShippingCategoryCreate, params?: QueryParamsRetrieve<ShippingCategory>, options?: ResourcesConfig): Promise<ShippingCategory> {\n\t\treturn this.resources.create<ShippingCategoryCreate, ShippingCategory>({ ...resource, type: ShippingCategories.TYPE }, params, options)\n\t}\n\n\tasync update(resource: ShippingCategoryUpdate, params?: QueryParamsRetrieve<ShippingCategory>, options?: ResourcesConfig): Promise<ShippingCategory> {\n\t\treturn this.resources.update<ShippingCategoryUpdate, ShippingCategory>({ ...resource, type: ShippingCategories.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: ShippingCategories.TYPE } : id, options)\n\t}\n\n\tasync skus(shippingCategoryId: string | ShippingCategory, params?: QueryParamsList<Sku>, options?: ResourcesConfig): Promise<ListResponse<Sku>> {\n\t\tconst _shippingCategoryId = (shippingCategoryId as ShippingCategory).id || shippingCategoryId as string\n\t\treturn this.resources.fetch<Sku>({ type: 'skus' }, `shipping_categories/${_shippingCategoryId}/skus`, params, options) as unknown as ListResponse<Sku>\n\t}\n\n\tasync attachments(shippingCategoryId: string | ShippingCategory, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _shippingCategoryId = (shippingCategoryId as ShippingCategory).id || shippingCategoryId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `shipping_categories/${_shippingCategoryId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(shippingCategoryId: string | ShippingCategory, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _shippingCategoryId = (shippingCategoryId as ShippingCategory).id || shippingCategoryId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `shipping_categories/${_shippingCategoryId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisShippingCategory(resource: any): resource is ShippingCategory {\n\t\treturn resource.type && (resource.type === ShippingCategories.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): ShippingCategoryRel {\n\t\treturn super.relationshipOneToOne<ShippingCategoryRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): ShippingCategoryRel[] {\n\t\treturn super.relationshipOneToMany<ShippingCategoryRel>(...ids)\n\t}\n\n\n\ttype(): ShippingCategoryType {\n\t\treturn ShippingCategories.TYPE\n\t}\n\n}\n\n\nconst instance = new ShippingCategories()\nexport default instance\n\nexport type { ShippingCategories, ShippingCategory, ShippingCategoryCreate, ShippingCategoryUpdate, ShippingCategoryType }\n"]}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { cS as ShippingCategories, jA as ShippingCategory, jB as ShippingCategoryCreate, jD as ShippingCategorySort, lv as ShippingCategoryType, jC as ShippingCategoryUpdate, cR as default } from '../api-IwWtsAqE.cjs';
|
2
2
|
import '../client.cjs';
|
3
3
|
import '../interceptor-k15jXzf0.cjs';
|
4
4
|
import '../types.cjs';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { cS as ShippingCategories, jA as ShippingCategory, jB as ShippingCategoryCreate, jD as ShippingCategorySort, lv as ShippingCategoryType, jC as ShippingCategoryUpdate, cR as default } from '../api-F1F37Dud.js';
|
2
2
|
import '../client.js';
|
3
3
|
import '../interceptor-k15jXzf0.js';
|
4
4
|
import '../types.js';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/resources/shipping_categories.ts"],"names":[],"mappings":";;AAuEA,MAAM,2BAA2B,WAA8B,CAAA;AAAA,EAE9D,OAAgB,IAA6B,GAAA,qBAAA;AAAA,EAE7C,MAAM,MAAA,CAAO,QAAkC,EAAA,MAAA,EAAgD,OAAsD,EAAA;AACpJ,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAiD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,kBAAmB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACvI,EAEA,MAAM,MAAA,CAAO,QAAkC,EAAA,MAAA,EAAgD,OAAsD,EAAA;AACpJ,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAiD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,kBAAmB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACvI,EAEA,MAAM,MAAO,CAAA,EAAA,EAAyB,OAA0C,EAAA;AAC/E,IAAA,MAAM,IAAK,CAAA,SAAA,CAAU,MAAQ,CAAA,OAAO,EAAO,KAAA,QAAA,GAAW,EAAE,EAAA,EAAI,IAAM,EAAA,kBAAA,CAAmB,IAAK,EAAA,GAAI,IAAI,OAAO,CAAA;AAAA;AAC1G,EAEA,MAAM,IAAA,CAAK,kBAA+C,EAAA,MAAA,EAA+B,OAAuD,EAAA;AAC/I,IAAM,MAAA,mBAAA,GAAuB,mBAAwC,EAAM,IAAA,kBAAA;AAC3E,IAAO,OAAA,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2BAAQ,GAAA","file":"shipping_categories.js","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Sku } from './skus'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype ShippingCategoryType = 'shipping_categories'\ntype ShippingCategoryRel = ResourceRel & { type: ShippingCategoryType }\n\n\nexport type ShippingCategorySort = Pick<ShippingCategory, 'id' | 'name' | 'code'> & ResourceSort\n// export type ShippingCategoryFilter = Pick<ShippingCategory, 'id' | 'name' | 'code'> & ResourceFilter\n\n\ninterface ShippingCategory extends Resource {\n\t\n\treadonly type: ShippingCategoryType\n\n\t/** \n\t * The shipping category name.\n\t * @example ```\"Merchandise\"```\n\t */\n\tname: string\n\t/** \n\t * A string that you can use to identify the shipping category (must be unique within the environment).\n\t * @example ```\"europe1\"```\n\t */\n\tcode?: string | null\n\n\tskus?: Sku[] | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface ShippingCategoryCreate extends ResourceCreate {\n\t\n\t/** \n\t * The shipping category name.\n\t * @example ```\"Merchandise\"```\n\t */\n\tname: string\n\t/** \n\t * A string that you can use to identify the shipping category (must be unique within the environment).\n\t * @example ```\"europe1\"```\n\t */\n\tcode?: string | null\n\t\n}\n\n\ninterface ShippingCategoryUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The shipping category name.\n\t * @example ```\"Merchandise\"```\n\t */\n\tname?: string | null\n\t/** \n\t * A string that you can use to identify the shipping category (must be unique within the environment).\n\t * @example ```\"europe1\"```\n\t */\n\tcode?: string | null\n\t\n}\n\n\nclass ShippingCategories extends ApiResource<ShippingCategory> {\n\n\tstatic readonly TYPE: ShippingCategoryType = 'shipping_categories' as const\n\n\tasync create(resource: ShippingCategoryCreate, params?: QueryParamsRetrieve<ShippingCategory>, options?: ResourcesConfig): Promise<ShippingCategory> {\n\t\treturn this.resources.create<ShippingCategoryCreate, ShippingCategory>({ ...resource, type: ShippingCategories.TYPE }, params, options)\n\t}\n\n\tasync update(resource: ShippingCategoryUpdate, params?: QueryParamsRetrieve<ShippingCategory>, options?: ResourcesConfig): Promise<ShippingCategory> {\n\t\treturn this.resources.update<ShippingCategoryUpdate, ShippingCategory>({ ...resource, type: ShippingCategories.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: ShippingCategories.TYPE } : id, options)\n\t}\n\n\tasync skus(shippingCategoryId: string | ShippingCategory, params?: QueryParamsList<Sku>, options?: ResourcesConfig): Promise<ListResponse<Sku>> {\n\t\tconst _shippingCategoryId = (shippingCategoryId as ShippingCategory).id || shippingCategoryId as string\n\t\treturn this.resources.fetch<Sku>({ type: 'skus' }, `shipping_categories/${_shippingCategoryId}/skus`, params, options) as unknown as ListResponse<Sku>\n\t}\n\n\tasync attachments(shippingCategoryId: string | ShippingCategory, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _shippingCategoryId = (shippingCategoryId as ShippingCategory).id || shippingCategoryId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `shipping_categories/${_shippingCategoryId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(shippingCategoryId: string | ShippingCategory, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _shippingCategoryId = (shippingCategoryId as ShippingCategory).id || shippingCategoryId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `shipping_categories/${_shippingCategoryId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisShippingCategory(resource: any): resource is ShippingCategory {\n\t\treturn resource.type && (resource.type === ShippingCategories.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): ShippingCategoryRel {\n\t\treturn super.relationshipOneToOne<ShippingCategoryRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): ShippingCategoryRel[] {\n\t\treturn super.relationshipOneToMany<ShippingCategoryRel>(...ids)\n\t}\n\n\n\ttype(): ShippingCategoryType {\n\t\treturn ShippingCategories.TYPE\n\t}\n\n}\n\n\nconst instance = new ShippingCategories()\nexport default instance\n\nexport type { ShippingCategory, ShippingCategoryCreate, ShippingCategoryUpdate, ShippingCategoryType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/shipping_categories.ts"],"names":[],"mappings":";;AAuEA,MAAM,2BAA2B,WAA8B,CAAA;AAAA,EAE9D,OAAgB,IAA6B,GAAA,qBAAA;AAAA,EAE7C,MAAM,MAAA,CAAO,QAAkC,EAAA,MAAA,EAAgD,OAAsD,EAAA;AACpJ,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAiD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,kBAAmB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACvI,EAEA,MAAM,MAAA,CAAO,QAAkC,EAAA,MAAA,EAAgD,OAAsD,EAAA;AACpJ,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAiD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,kBAAmB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACvI,EAEA,MAAM,MAAO,CAAA,EAAA,EAAyB,OAA0C,EAAA;AAC/E,IAAA,MAAM,IAAK,CAAA,SAAA,CAAU,MAAQ,CAAA,OAAO,EAAO,KAAA,QAAA,GAAW,EAAE,EAAA,EAAI,IAAM,EAAA,kBAAA,CAAmB,IAAK,EAAA,GAAI,IAAI,OAAO,CAAA;AAAA;AAC1G,EAEA,MAAM,IAAA,CAAK,kBAA+C,EAAA,MAAA,EAA+B,OAAuD,EAAA;AAC/I,IAA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AAAA;AAG5B;AAGA,MAAM,QAAA,GAAW,IAAI,kBAAmB,EAAA;AACxC,IAAO,2BAAQ,GAAA","file":"shipping_categories.js","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Sku } from './skus'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype ShippingCategoryType = 'shipping_categories'\ntype ShippingCategoryRel = ResourceRel & { type: ShippingCategoryType }\n\n\nexport type ShippingCategorySort = Pick<ShippingCategory, 'id' | 'name' | 'code'> & ResourceSort\n// export type ShippingCategoryFilter = Pick<ShippingCategory, 'id' | 'name' | 'code'> & ResourceFilter\n\n\ninterface ShippingCategory extends Resource {\n\t\n\treadonly type: ShippingCategoryType\n\n\t/** \n\t * The shipping category name.\n\t * @example ```\"Merchandise\"```\n\t */\n\tname: string\n\t/** \n\t * A string that you can use to identify the shipping category (must be unique within the environment).\n\t * @example ```\"europe1\"```\n\t */\n\tcode?: string | null\n\n\tskus?: Sku[] | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface ShippingCategoryCreate extends ResourceCreate {\n\t\n\t/** \n\t * The shipping category name.\n\t * @example ```\"Merchandise\"```\n\t */\n\tname: string\n\t/** \n\t * A string that you can use to identify the shipping category (must be unique within the environment).\n\t * @example ```\"europe1\"```\n\t */\n\tcode?: string | null\n\t\n}\n\n\ninterface ShippingCategoryUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The shipping category name.\n\t * @example ```\"Merchandise\"```\n\t */\n\tname?: string | null\n\t/** \n\t * A string that you can use to identify the shipping category (must be unique within the environment).\n\t * @example ```\"europe1\"```\n\t */\n\tcode?: string | null\n\t\n}\n\n\nclass ShippingCategories extends ApiResource<ShippingCategory> {\n\n\tstatic readonly TYPE: ShippingCategoryType = 'shipping_categories' as const\n\n\tasync create(resource: ShippingCategoryCreate, params?: QueryParamsRetrieve<ShippingCategory>, options?: ResourcesConfig): Promise<ShippingCategory> {\n\t\treturn this.resources.create<ShippingCategoryCreate, ShippingCategory>({ ...resource, type: ShippingCategories.TYPE }, params, options)\n\t}\n\n\tasync update(resource: ShippingCategoryUpdate, params?: QueryParamsRetrieve<ShippingCategory>, options?: ResourcesConfig): Promise<ShippingCategory> {\n\t\treturn this.resources.update<ShippingCategoryUpdate, ShippingCategory>({ ...resource, type: ShippingCategories.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: ShippingCategories.TYPE } : id, options)\n\t}\n\n\tasync skus(shippingCategoryId: string | ShippingCategory, params?: QueryParamsList<Sku>, options?: ResourcesConfig): Promise<ListResponse<Sku>> {\n\t\tconst _shippingCategoryId = (shippingCategoryId as ShippingCategory).id || shippingCategoryId as string\n\t\treturn this.resources.fetch<Sku>({ type: 'skus' }, `shipping_categories/${_shippingCategoryId}/skus`, params, options) as unknown as ListResponse<Sku>\n\t}\n\n\tasync attachments(shippingCategoryId: string | ShippingCategory, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _shippingCategoryId = (shippingCategoryId as ShippingCategory).id || shippingCategoryId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `shipping_categories/${_shippingCategoryId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(shippingCategoryId: string | ShippingCategory, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _shippingCategoryId = (shippingCategoryId as ShippingCategory).id || shippingCategoryId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `shipping_categories/${_shippingCategoryId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisShippingCategory(resource: any): resource is ShippingCategory {\n\t\treturn resource.type && (resource.type === ShippingCategories.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): ShippingCategoryRel {\n\t\treturn super.relationshipOneToOne<ShippingCategoryRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): ShippingCategoryRel[] {\n\t\treturn super.relationshipOneToMany<ShippingCategoryRel>(...ids)\n\t}\n\n\n\ttype(): ShippingCategoryType {\n\t\treturn ShippingCategories.TYPE\n\t}\n\n}\n\n\nconst instance = new ShippingCategories()\nexport default instance\n\nexport type { ShippingCategories, ShippingCategory, ShippingCategoryCreate, ShippingCategoryUpdate, ShippingCategoryType }\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/resources/shipping_method_tiers.ts"],"names":["ApiResource"],"mappings":";;;;AAsDA,MAAM,4BAA4BA,oBAAgC,CAAA;AAAA,EAEjE,OAAgB,IAA+B,GAAA,uBAAA;AAAA,EAE/C,MAAM,eAAA,CAAgB,oBAAmD,EAAA,MAAA,EAA8C,OAAoD,EAAA;AAC1K,IAAM,MAAA,qBAAA,GAAyB,qBAA4C,EAAM,IAAA,oBAAA;AACjF,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAsB,EAAE,IAAA,EAAM,kBAAmB,EAAA,EAAG,CAAyB,sBAAA,EAAA,qBAAqB,CAAoB,gBAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC5J,EAEA,MAAM,WAAA,CAAY,oBAAmD,EAAA,MAAA,EAAsC,OAA8D,EAAA;AACxK,IAAM,MAAA,qBAAA,GAAyB,qBAA4C,EAAM,IAAA,oBAAA;AACjF,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAkB,EAAE,IAAA,EAAM,aAAc,EAAA,EAAG,CAAyB,sBAAA,EAAA,qBAAqB,CAAgB,YAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC/I,EAEA,MAAM,QAAA,CAAS,oBAAmD,EAAA,MAAA,EAAmC,OAA2D,EAAA;AAC/J,IAAM,MAAA,qBAAA,GAAyB,qBAA4C,EAAM,IAAA,oBAAA;AACjF,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAe,EAAE,IAAA,EAAM,UAAW,EAAA,EAAG,CAAyB,sBAAA,EAAA,qBAAqB,CAAa,SAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACtI,EAGA,qBAAqB,QAA+C,EAAA;AACnE,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,mBAAoB,CAAA,IAAA;AAAA;AAChE,EAGA,aAAa,EAAuD,EAAA;AACnE,IAAO,OAAA,KAAA,CAAM,qBAA4C,EAAE,CAAA;AAAA;AAC5D,EAEA,sBAAsB,GAAwC,EAAA;AAC7D,IAAO,OAAA,KAAA,CAAM,qBAA6C,CAAA,GAAG,GAAG,CAAA;AAAA;AACjE,EAGA,IAA+B,GAAA;AAC9B,IAAA,OAAO,mBAAoB,CAAA,IAAA;AAAA;AAG7B;AAGA,MAAM,QAAA,GAAW,IAAI,mBAAoB,EAAA;AACzC,IAAO,6BAAQ,GAAA","file":"shipping_method_tiers.cjs","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { ShippingMethod } from './shipping_methods'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype ShippingMethodTierType = 'shipping_method_tiers'\ntype ShippingMethodTierRel = ResourceRel & { type: ShippingMethodTierType }\n\n\nexport type ShippingMethodTierSort = Pick<ShippingMethodTier, 'id' | 'name' | 'up_to' | 'price_amount_cents'> & ResourceSort\n// export type ShippingMethodTierFilter = Pick<ShippingMethodTier, 'id' | 'name' | 'up_to' | 'price_amount_cents'> & ResourceFilter\n\n\ninterface ShippingMethodTier extends Resource {\n\t\n\treadonly type: ShippingMethodTierType\n\n\t/** \n\t * The shipping method tier's name.\n\t * @example ```\"Light shipping under 3kg\"```\n\t */\n\tname: string\n\t/** \n\t * The tier upper limit. When 'null' it means infinity (useful to have an always matching tier).\n\t * @example ```20.5```\n\t */\n\tup_to?: number | null\n\t/** \n\t * The price of this shipping method tier, in cents.\n\t * @example ```1000```\n\t */\n\tprice_amount_cents: number\n\t/** \n\t * The price of this shipping method tier, float.\n\t * @example ```10```\n\t */\n\tprice_amount_float?: number | null\n\t/** \n\t * The price of this shipping method tier, formatted.\n\t * @example ```\"€10,00\"```\n\t */\n\tformatted_price_amount?: string | null\n\n\tshipping_method?: ShippingMethod | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\nclass ShippingMethodTiers extends ApiResource<ShippingMethodTier> {\n\n\tstatic readonly TYPE: ShippingMethodTierType = 'shipping_method_tiers' as const\n\n\tasync shipping_method(shippingMethodTierId: string | ShippingMethodTier, params?: QueryParamsRetrieve<ShippingMethod>, options?: ResourcesConfig): Promise<ShippingMethod> {\n\t\tconst _shippingMethodTierId = (shippingMethodTierId as ShippingMethodTier).id || shippingMethodTierId as string\n\t\treturn this.resources.fetch<ShippingMethod>({ type: 'shipping_methods' }, `shipping_method_tiers/${_shippingMethodTierId}/shipping_method`, params, options) as unknown as ShippingMethod\n\t}\n\n\tasync attachments(shippingMethodTierId: string | ShippingMethodTier, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _shippingMethodTierId = (shippingMethodTierId as ShippingMethodTier).id || shippingMethodTierId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `shipping_method_tiers/${_shippingMethodTierId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(shippingMethodTierId: string | ShippingMethodTier, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _shippingMethodTierId = (shippingMethodTierId as ShippingMethodTier).id || shippingMethodTierId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `shipping_method_tiers/${_shippingMethodTierId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisShippingMethodTier(resource: any): resource is ShippingMethodTier {\n\t\treturn resource.type && (resource.type === ShippingMethodTiers.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): ShippingMethodTierRel {\n\t\treturn super.relationshipOneToOne<ShippingMethodTierRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): ShippingMethodTierRel[] {\n\t\treturn super.relationshipOneToMany<ShippingMethodTierRel>(...ids)\n\t}\n\n\n\ttype(): ShippingMethodTierType {\n\t\treturn ShippingMethodTiers.TYPE\n\t}\n\n}\n\n\nconst instance = new ShippingMethodTiers()\nexport default instance\n\nexport type { ShippingMethodTier, ShippingMethodTierType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/shipping_method_tiers.ts"],"names":["ApiResource"],"mappings":";;;;AAsDA,MAAM,4BAA4BA,oBAAgC,CAAA;AAAA,EAEjE,OAAgB,IAA+B,GAAA,uBAAA;AAAA,EAE/C,MAAM,eAAA,CAAgB,oBAAmD,EAAA,MAAA,EAA8C,OAAoD,EAAA;AAC1K,IAAM,MAAA,qBAAA,GAAyB,qBAA4C,EAAM,IAAA,oBAAA;AACjF,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAsB,EAAE,IAAA,EAAM,kBAAmB,EAAA,EAAG,CAAyB,sBAAA,EAAA,qBAAqB,CAAoB,gBAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC5J,EAEA,MAAM,WAAA,CAAY,oBAAmD,EAAA,MAAA,EAAsC,OAA8D,EAAA;AACxK,IAAM,MAAA,qBAAA,GAAyB,qBAA4C,EAAM,IAAA,oBAAA;AACjF,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAkB,EAAE,IAAA,EAAM,aAAc,EAAA,EAAG,CAAyB,sBAAA,EAAA,qBAAqB,CAAgB,YAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC/I,EAEA,MAAM,QAAA,CAAS,oBAAmD,EAAA,MAAA,EAAmC,OAA2D,EAAA;AAC/J,IAAM,MAAA,qBAAA,GAAyB,qBAA4C,EAAM,IAAA,oBAAA;AACjF,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAe,EAAE,IAAA,EAAM,UAAW,EAAA,EAAG,CAAyB,sBAAA,EAAA,qBAAqB,CAAa,SAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACtI,EAGA,qBAAqB,QAA+C,EAAA;AACnE,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,mBAAoB,CAAA,IAAA;AAAA;AAChE,EAGA,aAAa,EAAuD,EAAA;AACnE,IAAO,OAAA,KAAA,CAAM,qBAA4C,EAAE,CAAA;AAAA;AAC5D,EAEA,sBAAsB,GAAwC,EAAA;AAC7D,IAAO,OAAA,KAAA,CAAM,qBAA6C,CAAA,GAAG,GAAG,CAAA;AAAA;AACjE,EAGA,IAA+B,GAAA;AAC9B,IAAA,OAAO,mBAAoB,CAAA,IAAA;AAAA;AAG7B;AAGA,MAAM,QAAA,GAAW,IAAI,mBAAoB,EAAA;AACzC,IAAO,6BAAQ,GAAA","file":"shipping_method_tiers.cjs","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { ShippingMethod } from './shipping_methods'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype ShippingMethodTierType = 'shipping_method_tiers'\ntype ShippingMethodTierRel = ResourceRel & { type: ShippingMethodTierType }\n\n\nexport type ShippingMethodTierSort = Pick<ShippingMethodTier, 'id' | 'name' | 'up_to' | 'price_amount_cents'> & ResourceSort\n// export type ShippingMethodTierFilter = Pick<ShippingMethodTier, 'id' | 'name' | 'up_to' | 'price_amount_cents'> & ResourceFilter\n\n\ninterface ShippingMethodTier extends Resource {\n\t\n\treadonly type: ShippingMethodTierType\n\n\t/** \n\t * The shipping method tier's name.\n\t * @example ```\"Light shipping under 3kg\"```\n\t */\n\tname: string\n\t/** \n\t * The tier upper limit. When 'null' it means infinity (useful to have an always matching tier).\n\t * @example ```20.5```\n\t */\n\tup_to?: number | null\n\t/** \n\t * The price of this shipping method tier, in cents.\n\t * @example ```1000```\n\t */\n\tprice_amount_cents: number\n\t/** \n\t * The price of this shipping method tier, float.\n\t * @example ```10```\n\t */\n\tprice_amount_float?: number | null\n\t/** \n\t * The price of this shipping method tier, formatted.\n\t * @example ```\"€10,00\"```\n\t */\n\tformatted_price_amount?: string | null\n\n\tshipping_method?: ShippingMethod | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\nclass ShippingMethodTiers extends ApiResource<ShippingMethodTier> {\n\n\tstatic readonly TYPE: ShippingMethodTierType = 'shipping_method_tiers' as const\n\n\tasync shipping_method(shippingMethodTierId: string | ShippingMethodTier, params?: QueryParamsRetrieve<ShippingMethod>, options?: ResourcesConfig): Promise<ShippingMethod> {\n\t\tconst _shippingMethodTierId = (shippingMethodTierId as ShippingMethodTier).id || shippingMethodTierId as string\n\t\treturn this.resources.fetch<ShippingMethod>({ type: 'shipping_methods' }, `shipping_method_tiers/${_shippingMethodTierId}/shipping_method`, params, options) as unknown as ShippingMethod\n\t}\n\n\tasync attachments(shippingMethodTierId: string | ShippingMethodTier, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _shippingMethodTierId = (shippingMethodTierId as ShippingMethodTier).id || shippingMethodTierId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `shipping_method_tiers/${_shippingMethodTierId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(shippingMethodTierId: string | ShippingMethodTier, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _shippingMethodTierId = (shippingMethodTierId as ShippingMethodTier).id || shippingMethodTierId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `shipping_method_tiers/${_shippingMethodTierId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisShippingMethodTier(resource: any): resource is ShippingMethodTier {\n\t\treturn resource.type && (resource.type === ShippingMethodTiers.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): ShippingMethodTierRel {\n\t\treturn super.relationshipOneToOne<ShippingMethodTierRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): ShippingMethodTierRel[] {\n\t\treturn super.relationshipOneToMany<ShippingMethodTierRel>(...ids)\n\t}\n\n\n\ttype(): ShippingMethodTierType {\n\t\treturn ShippingMethodTiers.TYPE\n\t}\n\n}\n\n\nconst instance = new ShippingMethodTiers()\nexport default instance\n\nexport type { ShippingMethodTiers, ShippingMethodTier, ShippingMethodTierType }\n"]}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { jE as ShippingMethodTier, jF as ShippingMethodTierSort, m4 as ShippingMethodTierType, cU as ShippingMethodTiers, cT as default } from '../api-IwWtsAqE.cjs';
|
2
2
|
import '../client.cjs';
|
3
3
|
import '../interceptor-k15jXzf0.cjs';
|
4
4
|
import '../types.cjs';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { jE as ShippingMethodTier, jF as ShippingMethodTierSort, m4 as ShippingMethodTierType, cU as ShippingMethodTiers, cT as default } from '../api-F1F37Dud.js';
|
2
2
|
import '../client.js';
|
3
3
|
import '../interceptor-k15jXzf0.js';
|
4
4
|
import '../types.js';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/resources/shipping_method_tiers.ts"],"names":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;AAC5D,EAEA,sBAAsB,GAAwC,EAAA;AAC7D,IAAO,OAAA,KAAA,CAAM,qBAA6C,CAAA,GAAG,GAAG,CAAA;AAAA;AACjE,EAGA,IAA+B,GAAA;AAC9B,IAAA,OAAO,mBAAoB,CAAA,IAAA;AAAA;AAG7B;AAGA,MAAM,QAAA,GAAW,IAAI,mBAAoB,EAAA;AACzC,IAAO,6BAAQ,GAAA","file":"shipping_method_tiers.js","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { ShippingMethod } from './shipping_methods'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype ShippingMethodTierType = 'shipping_method_tiers'\ntype ShippingMethodTierRel = ResourceRel & { type: ShippingMethodTierType }\n\n\nexport type ShippingMethodTierSort = Pick<ShippingMethodTier, 'id' | 'name' | 'up_to' | 'price_amount_cents'> & ResourceSort\n// export type ShippingMethodTierFilter = Pick<ShippingMethodTier, 'id' | 'name' | 'up_to' | 'price_amount_cents'> & ResourceFilter\n\n\ninterface ShippingMethodTier extends Resource {\n\t\n\treadonly type: ShippingMethodTierType\n\n\t/** \n\t * The shipping method tier's name.\n\t * @example ```\"Light shipping under 3kg\"```\n\t */\n\tname: string\n\t/** \n\t * The tier upper limit. When 'null' it means infinity (useful to have an always matching tier).\n\t * @example ```20.5```\n\t */\n\tup_to?: number | null\n\t/** \n\t * The price of this shipping method tier, in cents.\n\t * @example ```1000```\n\t */\n\tprice_amount_cents: number\n\t/** \n\t * The price of this shipping method tier, float.\n\t * @example ```10```\n\t */\n\tprice_amount_float?: number | null\n\t/** \n\t * The price of this shipping method tier, formatted.\n\t * @example ```\"€10,00\"```\n\t */\n\tformatted_price_amount?: string | null\n\n\tshipping_method?: ShippingMethod | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\nclass ShippingMethodTiers extends ApiResource<ShippingMethodTier> {\n\n\tstatic readonly TYPE: ShippingMethodTierType = 'shipping_method_tiers' as const\n\n\tasync shipping_method(shippingMethodTierId: string | ShippingMethodTier, params?: QueryParamsRetrieve<ShippingMethod>, options?: ResourcesConfig): Promise<ShippingMethod> {\n\t\tconst _shippingMethodTierId = (shippingMethodTierId as ShippingMethodTier).id || shippingMethodTierId as string\n\t\treturn this.resources.fetch<ShippingMethod>({ type: 'shipping_methods' }, `shipping_method_tiers/${_shippingMethodTierId}/shipping_method`, params, options) as unknown as ShippingMethod\n\t}\n\n\tasync attachments(shippingMethodTierId: string | ShippingMethodTier, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _shippingMethodTierId = (shippingMethodTierId as ShippingMethodTier).id || shippingMethodTierId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `shipping_method_tiers/${_shippingMethodTierId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(shippingMethodTierId: string | ShippingMethodTier, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _shippingMethodTierId = (shippingMethodTierId as ShippingMethodTier).id || shippingMethodTierId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `shipping_method_tiers/${_shippingMethodTierId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisShippingMethodTier(resource: any): resource is ShippingMethodTier {\n\t\treturn resource.type && (resource.type === ShippingMethodTiers.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): ShippingMethodTierRel {\n\t\treturn super.relationshipOneToOne<ShippingMethodTierRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): ShippingMethodTierRel[] {\n\t\treturn super.relationshipOneToMany<ShippingMethodTierRel>(...ids)\n\t}\n\n\n\ttype(): ShippingMethodTierType {\n\t\treturn ShippingMethodTiers.TYPE\n\t}\n\n}\n\n\nconst instance = new ShippingMethodTiers()\nexport default instance\n\nexport type { ShippingMethodTier, ShippingMethodTierType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/shipping_method_tiers.ts"],"names":[],"mappings":";;AAsDA,MAAM,4BAA4B,WAAgC,CAAA;AAAA,EAEjE,OAAgB,IAA+B,GAAA,uBAAA;AAAA,EAE/C,MAAM,eAAA,CAAgB,oBAAmD,EAAA,MAAA,EAA8C,OAAoD,EAAA;AAC1K,IAAM,MAAA,qBAAA,GAAyB,qBAA4C,EAAM,IAAA,oBAAA;AACjF,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAsB,EAAE,IAAA,EAAM,kBAAmB,EAAA,EAAG,CAAyB,sBAAA,EAAA,qBAAqB,CAAoB,gBAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC5J,EAEA,MAAM,WAAA,CAAY,oBAAmD,EAAA,MAAA,EAAsC,OAA8D,EAAA;AACxK,IAAM,MAAA,qBAAA,GAAyB,qBAA4C,EAAM,IAAA,oBAAA;AACjF,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAkB,EAAE,IAAA,EAAM,aAAc,EAAA,EAAG,CAAyB,sBAAA,EAAA,qBAAqB,CAAgB,YAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC/I,EAEA,MAAM,QAAA,CAAS,oBAAmD,EAAA,MAAA,EAAmC,OAA2D,EAAA;AAC/J,IAAM,MAAA,qBAAA,GAAyB,qBAA4C,EAAM,IAAA,oBAAA;AACjF,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAe,EAAE,IAAA,EAAM,UAAW,EAAA,EAAG,CAAyB,sBAAA,EAAA,qBAAqB,CAAa,SAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACtI,EAGA,qBAAqB,QAA+C,EAAA;AACnE,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,mBAAoB,CAAA,IAAA;AAAA;AAChE,EAGA,aAAa,EAAuD,EAAA;AACnE,IAAO,OAAA,KAAA,CAAM,qBAA4C,EAAE,CAAA;AAAA;AAC5D,EAEA,sBAAsB,GAAwC,EAAA;AAC7D,IAAO,OAAA,KAAA,CAAM,qBAA6C,CAAA,GAAG,GAAG,CAAA;AAAA;AACjE,EAGA,IAA+B,GAAA;AAC9B,IAAA,OAAO,mBAAoB,CAAA,IAAA;AAAA;AAG7B;AAGA,MAAM,QAAA,GAAW,IAAI,mBAAoB,EAAA;AACzC,IAAO,6BAAQ,GAAA","file":"shipping_method_tiers.js","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { ShippingMethod } from './shipping_methods'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype ShippingMethodTierType = 'shipping_method_tiers'\ntype ShippingMethodTierRel = ResourceRel & { type: ShippingMethodTierType }\n\n\nexport type ShippingMethodTierSort = Pick<ShippingMethodTier, 'id' | 'name' | 'up_to' | 'price_amount_cents'> & ResourceSort\n// export type ShippingMethodTierFilter = Pick<ShippingMethodTier, 'id' | 'name' | 'up_to' | 'price_amount_cents'> & ResourceFilter\n\n\ninterface ShippingMethodTier extends Resource {\n\t\n\treadonly type: ShippingMethodTierType\n\n\t/** \n\t * The shipping method tier's name.\n\t * @example ```\"Light shipping under 3kg\"```\n\t */\n\tname: string\n\t/** \n\t * The tier upper limit. When 'null' it means infinity (useful to have an always matching tier).\n\t * @example ```20.5```\n\t */\n\tup_to?: number | null\n\t/** \n\t * The price of this shipping method tier, in cents.\n\t * @example ```1000```\n\t */\n\tprice_amount_cents: number\n\t/** \n\t * The price of this shipping method tier, float.\n\t * @example ```10```\n\t */\n\tprice_amount_float?: number | null\n\t/** \n\t * The price of this shipping method tier, formatted.\n\t * @example ```\"€10,00\"```\n\t */\n\tformatted_price_amount?: string | null\n\n\tshipping_method?: ShippingMethod | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\nclass ShippingMethodTiers extends ApiResource<ShippingMethodTier> {\n\n\tstatic readonly TYPE: ShippingMethodTierType = 'shipping_method_tiers' as const\n\n\tasync shipping_method(shippingMethodTierId: string | ShippingMethodTier, params?: QueryParamsRetrieve<ShippingMethod>, options?: ResourcesConfig): Promise<ShippingMethod> {\n\t\tconst _shippingMethodTierId = (shippingMethodTierId as ShippingMethodTier).id || shippingMethodTierId as string\n\t\treturn this.resources.fetch<ShippingMethod>({ type: 'shipping_methods' }, `shipping_method_tiers/${_shippingMethodTierId}/shipping_method`, params, options) as unknown as ShippingMethod\n\t}\n\n\tasync attachments(shippingMethodTierId: string | ShippingMethodTier, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _shippingMethodTierId = (shippingMethodTierId as ShippingMethodTier).id || shippingMethodTierId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `shipping_method_tiers/${_shippingMethodTierId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(shippingMethodTierId: string | ShippingMethodTier, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _shippingMethodTierId = (shippingMethodTierId as ShippingMethodTier).id || shippingMethodTierId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `shipping_method_tiers/${_shippingMethodTierId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisShippingMethodTier(resource: any): resource is ShippingMethodTier {\n\t\treturn resource.type && (resource.type === ShippingMethodTiers.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): ShippingMethodTierRel {\n\t\treturn super.relationshipOneToOne<ShippingMethodTierRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): ShippingMethodTierRel[] {\n\t\treturn super.relationshipOneToMany<ShippingMethodTierRel>(...ids)\n\t}\n\n\n\ttype(): ShippingMethodTierType {\n\t\treturn ShippingMethodTiers.TYPE\n\t}\n\n}\n\n\nconst instance = new ShippingMethodTiers()\nexport default instance\n\nexport type { ShippingMethodTiers, ShippingMethodTier, ShippingMethodTierType }\n"]}
|