@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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AA,IAAS,QAAS,CAAA,IAAA,KAAS,eAAgB,CAAA,IAAA;AAAA;AAC5D,EAGA,aAAa,EAAmD,EAAA;AAC/D,IAAO,OAAA,KAAA,CAAM,qBAAwC,EAAE,CAAA;AAAA;AACxD,EAEA,sBAAsB,GAAoC,EAAA;AACzD,IAAO,OAAA,KAAA,CAAM,qBAAyC,CAAA,GAAG,GAAG,CAAA;AAAA;AAC7D,EAGA,IAA2B,GAAA;AAC1B,IAAA,OAAO,eAAgB,CAAA,IAAA;AAAA;AAGzB;AAGA,MAAM,QAAA,GAAW,IAAI,eAAgB,EAAA;AACrC,IAAO,wBAAQ,GAAA","file":"shipping_methods.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 { Market, MarketType } from './markets'\nimport type { ShippingZone, ShippingZoneType } from './shipping_zones'\nimport type { ShippingCategory, ShippingCategoryType } from './shipping_categories'\nimport type { StockLocation, StockLocationType } from './stock_locations'\nimport type { DeliveryLeadTime } from './delivery_lead_times'\nimport type { ShippingMethodTier, ShippingMethodTierType } from './shipping_method_tiers'\nimport type { ShippingWeightTier } from './shipping_weight_tiers'\nimport type { Attachment } from './attachments'\nimport type { Notification } from './notifications'\nimport type { Version } from './versions'\n\n\ntype ShippingMethodType = 'shipping_methods'\ntype ShippingMethodRel = ResourceRel & { type: ShippingMethodType }\ntype MarketRel = ResourceRel & { type: MarketType }\ntype ShippingZoneRel = ResourceRel & { type: ShippingZoneType }\ntype ShippingCategoryRel = ResourceRel & { type: ShippingCategoryType }\ntype StockLocationRel = ResourceRel & { type: StockLocationType }\ntype ShippingMethodTierRel = ResourceRel & { type: ShippingMethodTierType }\n\n\nexport type ShippingMethodSort = Pick<ShippingMethod, 'id' | 'name' | 'scheme' | 'currency_code' | 'price_amount_cents' | 'free_over_amount_cents' | 'disabled_at' | 'circuit_state' | 'circuit_failure_count'> & ResourceSort\n// export type ShippingMethodFilter = Pick<ShippingMethod, 'id' | 'name' | 'scheme' | 'currency_code' | 'price_amount_cents' | 'free_over_amount_cents' | 'disabled_at' | 'circuit_state' | 'circuit_failure_count'> & ResourceFilter\n\n\ninterface ShippingMethod extends Resource {\n\t\n\treadonly type: ShippingMethodType\n\n\t/** \n\t * The shipping method's name.\n\t * @example ```\"Standard shipping\"```\n\t */\n\tname: string\n\t/** \n\t * The shipping method's scheme. One of 'flat', 'weight_tiered', or 'external'.\n\t * @example ```\"flat\"```\n\t */\n\tscheme?: 'flat' | 'weight_tiered' | 'external' | null\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * The URL used to overwrite prices by an external source.\n\t * @example ```\"https://external_prices.yourbrand.com\"```\n\t */\n\texternal_prices_url?: string | null\n\t/** \n\t * The price of this shipping method, in cents.\n\t * @example ```1000```\n\t */\n\tprice_amount_cents: number\n\t/** \n\t * The price of this shipping method, float.\n\t * @example ```10```\n\t */\n\tprice_amount_float?: number | null\n\t/** \n\t * The price of this shipping method, formatted.\n\t * @example ```\"€10,00\"```\n\t */\n\tformatted_price_amount?: string | null\n\t/** \n\t * Apply free shipping if the order amount is over this value, in cents.\n\t * @example ```9900```\n\t */\n\tfree_over_amount_cents?: number | null\n\t/** \n\t * Apply free shipping if the order amount is over this value, float.\n\t * @example ```99```\n\t */\n\tfree_over_amount_float?: number | null\n\t/** \n\t * Apply free shipping if the order amount is over this value, formatted.\n\t * @example ```\"€99,00\"```\n\t */\n\tformatted_free_over_amount?: string | null\n\t/** \n\t * Send this attribute if you want to compare the free over amount with order's subtotal (excluding discounts, if any).\n\t * @example ```true```\n\t */\n\tuse_subtotal?: boolean | null\n\t/** \n\t * The calculated price (zero or price amount) when associated to a shipment, in cents.\n\t */\n\tprice_amount_for_shipment_cents?: number | null\n\t/** \n\t * The calculated price (zero or price amount) when associated to a shipment, float.\n\t */\n\tprice_amount_for_shipment_float?: number | null\n\t/** \n\t * The calculated price (zero or price amount) when associated to a shipment, formatted.\n\t * @example ```\"€0,00\"```\n\t */\n\tformatted_price_amount_for_shipment?: string | null\n\t/** \n\t * The minimum weight for which this shipping method is available.\n\t * @example ```3```\n\t */\n\tmin_weight?: number | null\n\t/** \n\t * The maximum weight for which this shipping method is available.\n\t * @example ```300```\n\t */\n\tmax_weight?: number | null\n\t/** \n\t * The unit of weight. One of 'gr', 'oz', or 'lb'.\n\t * @example ```\"gr\"```\n\t */\n\tunit_of_weight?: 'gr' | 'oz' | 'lb' | null\n\t/** \n\t * The freight tax identifier code, specific for a particular tax calculator.\n\t * @example ```\"FR010000\"```\n\t */\n\ttax_code?: string | null\n\t/** \n\t * Time at which this resource was disabled.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tdisabled_at?: string | null\n\t/** \n\t * The circuit breaker state, by default it is 'closed'. It can become 'open' once the number of consecutive failures overlaps the specified threshold, in such case no further calls to the failing callback are made.\n\t * @example ```\"closed\"```\n\t */\n\tcircuit_state?: string | null\n\t/** \n\t * The number of consecutive failures recorded by the circuit breaker associated to this resource, will be reset on first successful call to callback.\n\t * @example ```5```\n\t */\n\tcircuit_failure_count?: number | null\n\n\tmarket?: Market | null\n\tshipping_zone?: ShippingZone | null\n\tshipping_category?: ShippingCategory | null\n\tstock_location?: StockLocation | null\n\tdelivery_lead_time_for_shipment?: DeliveryLeadTime | null\n\tshipping_method_tiers?: ShippingMethodTier[] | null\n\tshipping_weight_tiers?: ShippingWeightTier[] | null\n\tattachments?: Attachment[] | null\n\tnotifications?: Notification[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface ShippingMethodCreate extends ResourceCreate {\n\t\n\t/** \n\t * The shipping method's name.\n\t * @example ```\"Standard shipping\"```\n\t */\n\tname: string\n\t/** \n\t * The shipping method's scheme. One of 'flat', 'weight_tiered', or 'external'.\n\t * @example ```\"flat\"```\n\t */\n\tscheme?: 'flat' | 'weight_tiered' | 'external' | null\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * The URL used to overwrite prices by an external source.\n\t * @example ```\"https://external_prices.yourbrand.com\"```\n\t */\n\texternal_prices_url?: string | null\n\t/** \n\t * The price of this shipping method, in cents.\n\t * @example ```1000```\n\t */\n\tprice_amount_cents: number\n\t/** \n\t * Apply free shipping if the order amount is over this value, in cents.\n\t * @example ```9900```\n\t */\n\tfree_over_amount_cents?: number | null\n\t/** \n\t * Send this attribute if you want to compare the free over amount with order's subtotal (excluding discounts, if any).\n\t * @example ```true```\n\t */\n\tuse_subtotal?: boolean | null\n\t/** \n\t * The minimum weight for which this shipping method is available.\n\t * @example ```3```\n\t */\n\tmin_weight?: number | null\n\t/** \n\t * The maximum weight for which this shipping method is available.\n\t * @example ```300```\n\t */\n\tmax_weight?: number | null\n\t/** \n\t * The unit of weight. One of 'gr', 'oz', or 'lb'.\n\t * @example ```\"gr\"```\n\t */\n\tunit_of_weight?: 'gr' | 'oz' | 'lb' | null\n\t/** \n\t * The freight tax identifier code, specific for a particular tax calculator.\n\t * @example ```\"FR010000\"```\n\t */\n\ttax_code?: string | null\n\t/** \n\t * Send this attribute if you want to mark this resource as disabled.\n\t * @example ```true```\n\t */\n\t_disable?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this resource as enabled.\n\t * @example ```true```\n\t */\n\t_enable?: boolean | null\n\n\tmarket?: MarketRel | null\n\tshipping_zone?: ShippingZoneRel | null\n\tshipping_category?: ShippingCategoryRel | null\n\tstock_location?: StockLocationRel | null\n\tshipping_method_tiers?: ShippingMethodTierRel[] | null\n\n}\n\n\ninterface ShippingMethodUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The shipping method's name.\n\t * @example ```\"Standard shipping\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The shipping method's scheme. One of 'flat', 'weight_tiered', or 'external'.\n\t * @example ```\"flat\"```\n\t */\n\tscheme?: 'flat' | 'weight_tiered' | 'external' | null\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * The URL used to overwrite prices by an external source.\n\t * @example ```\"https://external_prices.yourbrand.com\"```\n\t */\n\texternal_prices_url?: string | null\n\t/** \n\t * The price of this shipping method, in cents.\n\t * @example ```1000```\n\t */\n\tprice_amount_cents?: number | null\n\t/** \n\t * Apply free shipping if the order amount is over this value, in cents.\n\t * @example ```9900```\n\t */\n\tfree_over_amount_cents?: number | null\n\t/** \n\t * Send this attribute if you want to compare the free over amount with order's subtotal (excluding discounts, if any).\n\t * @example ```true```\n\t */\n\tuse_subtotal?: boolean | null\n\t/** \n\t * The minimum weight for which this shipping method is available.\n\t * @example ```3```\n\t */\n\tmin_weight?: number | null\n\t/** \n\t * The maximum weight for which this shipping method is available.\n\t * @example ```300```\n\t */\n\tmax_weight?: number | null\n\t/** \n\t * The unit of weight. One of 'gr', 'oz', or 'lb'.\n\t * @example ```\"gr\"```\n\t */\n\tunit_of_weight?: 'gr' | 'oz' | 'lb' | null\n\t/** \n\t * The freight tax identifier code, specific for a particular tax calculator.\n\t * @example ```\"FR010000\"```\n\t */\n\ttax_code?: string | null\n\t/** \n\t * Send this attribute if you want to mark this resource as disabled.\n\t * @example ```true```\n\t */\n\t_disable?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this resource as enabled.\n\t * @example ```true```\n\t */\n\t_enable?: boolean | null\n\t/** \n\t * Send this attribute if you want to reset the circuit breaker associated to this resource to 'closed' state and zero failures count. Cannot be passed by sales channels.\n\t * @example ```true```\n\t */\n\t_reset_circuit?: boolean | null\n\n\tmarket?: MarketRel | null\n\tshipping_zone?: ShippingZoneRel | null\n\tshipping_category?: ShippingCategoryRel | null\n\tstock_location?: StockLocationRel | null\n\tshipping_method_tiers?: ShippingMethodTierRel[] | null\n\n}\n\n\nclass ShippingMethods extends ApiResource<ShippingMethod> {\n\n\tstatic readonly TYPE: ShippingMethodType = 'shipping_methods' as const\n\n\tasync create(resource: ShippingMethodCreate, params?: QueryParamsRetrieve<ShippingMethod>, options?: ResourcesConfig): Promise<ShippingMethod> {\n\t\treturn this.resources.create<ShippingMethodCreate, ShippingMethod>({ ...resource, type: ShippingMethods.TYPE }, params, options)\n\t}\n\n\tasync update(resource: ShippingMethodUpdate, params?: QueryParamsRetrieve<ShippingMethod>, options?: ResourcesConfig): Promise<ShippingMethod> {\n\t\treturn this.resources.update<ShippingMethodUpdate, ShippingMethod>({ ...resource, type: ShippingMethods.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: ShippingMethods.TYPE } : id, options)\n\t}\n\n\tasync market(shippingMethodId: string | ShippingMethod, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\tconst _shippingMethodId = (shippingMethodId as ShippingMethod).id || shippingMethodId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `shipping_methods/${_shippingMethodId}/market`, params, options) as unknown as Market\n\t}\n\n\tasync shipping_zone(shippingMethodId: string | ShippingMethod, params?: QueryParamsRetrieve<ShippingZone>, options?: ResourcesConfig): Promise<ShippingZone> {\n\t\tconst _shippingMethodId = (shippingMethodId as ShippingMethod).id || shippingMethodId as string\n\t\treturn this.resources.fetch<ShippingZone>({ type: 'shipping_zones' }, `shipping_methods/${_shippingMethodId}/shipping_zone`, params, options) as unknown as ShippingZone\n\t}\n\n\tasync shipping_category(shippingMethodId: string | ShippingMethod, params?: QueryParamsRetrieve<ShippingCategory>, options?: ResourcesConfig): Promise<ShippingCategory> {\n\t\tconst _shippingMethodId = (shippingMethodId as ShippingMethod).id || shippingMethodId as string\n\t\treturn this.resources.fetch<ShippingCategory>({ type: 'shipping_categories' }, `shipping_methods/${_shippingMethodId}/shipping_category`, params, options) as unknown as ShippingCategory\n\t}\n\n\tasync stock_location(shippingMethodId: string | ShippingMethod, params?: QueryParamsRetrieve<StockLocation>, options?: ResourcesConfig): Promise<StockLocation> {\n\t\tconst _shippingMethodId = (shippingMethodId as ShippingMethod).id || shippingMethodId as string\n\t\treturn this.resources.fetch<StockLocation>({ type: 'stock_locations' }, `shipping_methods/${_shippingMethodId}/stock_location`, params, options) as unknown as StockLocation\n\t}\n\n\tasync delivery_lead_time_for_shipment(shippingMethodId: string | ShippingMethod, params?: QueryParamsRetrieve<DeliveryLeadTime>, options?: ResourcesConfig): Promise<DeliveryLeadTime> {\n\t\tconst _shippingMethodId = (shippingMethodId as ShippingMethod).id || shippingMethodId as string\n\t\treturn this.resources.fetch<DeliveryLeadTime>({ type: 'delivery_lead_times' }, `shipping_methods/${_shippingMethodId}/delivery_lead_time_for_shipment`, params, options) as unknown as DeliveryLeadTime\n\t}\n\n\tasync shipping_method_tiers(shippingMethodId: string | ShippingMethod, params?: QueryParamsList<ShippingMethodTier>, options?: ResourcesConfig): Promise<ListResponse<ShippingMethodTier>> {\n\t\tconst _shippingMethodId = (shippingMethodId as ShippingMethod).id || shippingMethodId as string\n\t\treturn this.resources.fetch<ShippingMethodTier>({ type: 'shipping_method_tiers' }, `shipping_methods/${_shippingMethodId}/shipping_method_tiers`, params, options) as unknown as ListResponse<ShippingMethodTier>\n\t}\n\n\tasync shipping_weight_tiers(shippingMethodId: string | ShippingMethod, params?: QueryParamsList<ShippingWeightTier>, options?: ResourcesConfig): Promise<ListResponse<ShippingWeightTier>> {\n\t\tconst _shippingMethodId = (shippingMethodId as ShippingMethod).id || shippingMethodId as string\n\t\treturn this.resources.fetch<ShippingWeightTier>({ type: 'shipping_weight_tiers' }, `shipping_methods/${_shippingMethodId}/shipping_weight_tiers`, params, options) as unknown as ListResponse<ShippingWeightTier>\n\t}\n\n\tasync attachments(shippingMethodId: string | ShippingMethod, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _shippingMethodId = (shippingMethodId as ShippingMethod).id || shippingMethodId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `shipping_methods/${_shippingMethodId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync notifications(shippingMethodId: string | ShippingMethod, params?: QueryParamsList<Notification>, options?: ResourcesConfig): Promise<ListResponse<Notification>> {\n\t\tconst _shippingMethodId = (shippingMethodId as ShippingMethod).id || shippingMethodId as string\n\t\treturn this.resources.fetch<Notification>({ type: 'notifications' }, `shipping_methods/${_shippingMethodId}/notifications`, params, options) as unknown as ListResponse<Notification>\n\t}\n\n\tasync versions(shippingMethodId: string | ShippingMethod, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _shippingMethodId = (shippingMethodId as ShippingMethod).id || shippingMethodId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `shipping_methods/${_shippingMethodId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _disable(id: string | ShippingMethod, params?: QueryParamsRetrieve<ShippingMethod>, options?: ResourcesConfig): Promise<ShippingMethod> {\n\t\treturn this.resources.update<ShippingMethodUpdate, ShippingMethod>({ id: (typeof id === 'string')? id: id.id, type: ShippingMethods.TYPE, _disable: true }, params, options)\n\t}\n\n\tasync _enable(id: string | ShippingMethod, params?: QueryParamsRetrieve<ShippingMethod>, options?: ResourcesConfig): Promise<ShippingMethod> {\n\t\treturn this.resources.update<ShippingMethodUpdate, ShippingMethod>({ id: (typeof id === 'string')? id: id.id, type: ShippingMethods.TYPE, _enable: true }, params, options)\n\t}\n\n\tasync _reset_circuit(id: string | ShippingMethod, params?: QueryParamsRetrieve<ShippingMethod>, options?: ResourcesConfig): Promise<ShippingMethod> {\n\t\treturn this.resources.update<ShippingMethodUpdate, ShippingMethod>({ id: (typeof id === 'string')? id: id.id, type: ShippingMethods.TYPE, _reset_circuit: true }, params, options)\n\t}\n\n\n\tisShippingMethod(resource: any): resource is ShippingMethod {\n\t\treturn resource.type && (resource.type === ShippingMethods.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): ShippingMethodRel {\n\t\treturn super.relationshipOneToOne<ShippingMethodRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): ShippingMethodRel[] {\n\t\treturn super.relationshipOneToMany<ShippingMethodRel>(...ids)\n\t}\n\n\n\ttype(): ShippingMethodType {\n\t\treturn ShippingMethods.TYPE\n\t}\n\n}\n\n\nconst instance = new ShippingMethods()\nexport default instance\n\nexport type { ShippingMethod, ShippingMethodCreate, ShippingMethodUpdate, ShippingMethodType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/shipping_methods.ts"],"names":["ApiResource"],"mappings":";;;;AAsTA,MAAM,wBAAwBA,oBAA4B,CAAA;AAAA,EAEzD,OAAgB,IAA2B,GAAA,kBAAA;AAAA,EAE3C,MAAM,MAAA,CAAO,QAAgC,EAAA,MAAA,EAA8C,OAAoD,EAAA;AAC9I,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA6C,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,eAAgB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAChI,EAEA,MAAM,MAAA,CAAO,QAAgC,EAAA,MAAA,EAA8C,OAAoD,EAAA;AAC9I,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA6C,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,eAAgB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAChI,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,eAAA,CAAgB,IAAK,E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AAO,CAAA;AAAA;AAC3K,EAEA,MAAM,cAAA,CAAe,EAA6B,EAAA,MAAA,EAA8C,OAAoD,EAAA;AACnJ,IAAA,OAAO,KAAK,SAAU,CAAA,MAAA,CAA6C,EAAE,EAAK,EAAA,OAAO,OAAO,QAAW,GAAA,EAAA,GAAI,EAAG,CAAA,EAAA,EAAI,MAAM,eAAgB,CAAA,IAAA,EAAM,gBAAgB,IAAK,EAAA,EAAG,QAAQ,OAAO,CAAA;AAAA;AAClL,EAGA,iBAAiB,QAA2C,EAAA;AAC3D,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,eAAgB,CAAA,IAAA;AAAA;AAC5D,EAGA,aAAa,EAAmD,EAAA;AAC/D,IAAO,OAAA,KAAA,CAAM,qBAAwC,EAAE,CAAA;AAAA;AACxD,EAEA,sBAAsB,GAAoC,EAAA;AACzD,IAAO,OAAA,KAAA,CAAM,qBAAyC,CAAA,GAAG,GAAG,CAAA;AAAA;AAC7D,EAGA,IAA2B,GAAA;AAC1B,IAAA,OAAO,eAAgB,CAAA,IAAA;AAAA;AAGzB;AAGA,MAAM,QAAA,GAAW,IAAI,eAAgB,EAAA;AACrC,IAAO,wBAAQ,GAAA","file":"shipping_methods.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 { Market, MarketType } from './markets'\nimport type { ShippingZone, ShippingZoneType } from './shipping_zones'\nimport type { ShippingCategory, ShippingCategoryType } from './shipping_categories'\nimport type { StockLocation, StockLocationType } from './stock_locations'\nimport type { DeliveryLeadTime } from './delivery_lead_times'\nimport type { ShippingMethodTier, ShippingMethodTierType } from './shipping_method_tiers'\nimport type { ShippingWeightTier } from './shipping_weight_tiers'\nimport type { Attachment } from './attachments'\nimport type { Notification } from './notifications'\nimport type { Version } from './versions'\n\n\ntype ShippingMethodType = 'shipping_methods'\ntype ShippingMethodRel = ResourceRel & { type: ShippingMethodType }\ntype MarketRel = ResourceRel & { type: MarketType }\ntype ShippingZoneRel = ResourceRel & { type: ShippingZoneType }\ntype ShippingCategoryRel = ResourceRel & { type: ShippingCategoryType }\ntype StockLocationRel = ResourceRel & { type: StockLocationType }\ntype ShippingMethodTierRel = ResourceRel & { type: ShippingMethodTierType }\n\n\nexport type ShippingMethodSort = Pick<ShippingMethod, 'id' | 'name' | 'scheme' | 'currency_code' | 'price_amount_cents' | 'free_over_amount_cents' | 'disabled_at' | 'circuit_state' | 'circuit_failure_count'> & ResourceSort\n// export type ShippingMethodFilter = Pick<ShippingMethod, 'id' | 'name' | 'scheme' | 'currency_code' | 'price_amount_cents' | 'free_over_amount_cents' | 'disabled_at' | 'circuit_state' | 'circuit_failure_count'> & ResourceFilter\n\n\ninterface ShippingMethod extends Resource {\n\t\n\treadonly type: ShippingMethodType\n\n\t/** \n\t * The shipping method's name.\n\t * @example ```\"Standard shipping\"```\n\t */\n\tname: string\n\t/** \n\t * The shipping method's scheme. One of 'flat', 'weight_tiered', or 'external'.\n\t * @example ```\"flat\"```\n\t */\n\tscheme?: 'flat' | 'weight_tiered' | 'external' | null\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * The URL used to overwrite prices by an external source.\n\t * @example ```\"https://external_prices.yourbrand.com\"```\n\t */\n\texternal_prices_url?: string | null\n\t/** \n\t * The price of this shipping method, in cents.\n\t * @example ```1000```\n\t */\n\tprice_amount_cents: number\n\t/** \n\t * The price of this shipping method, float.\n\t * @example ```10```\n\t */\n\tprice_amount_float?: number | null\n\t/** \n\t * The price of this shipping method, formatted.\n\t * @example ```\"€10,00\"```\n\t */\n\tformatted_price_amount?: string | null\n\t/** \n\t * Apply free shipping if the order amount is over this value, in cents.\n\t * @example ```9900```\n\t */\n\tfree_over_amount_cents?: number | null\n\t/** \n\t * Apply free shipping if the order amount is over this value, float.\n\t * @example ```99```\n\t */\n\tfree_over_amount_float?: number | null\n\t/** \n\t * Apply free shipping if the order amount is over this value, formatted.\n\t * @example ```\"€99,00\"```\n\t */\n\tformatted_free_over_amount?: string | null\n\t/** \n\t * Send this attribute if you want to compare the free over amount with order's subtotal (excluding discounts, if any).\n\t * @example ```true```\n\t */\n\tuse_subtotal?: boolean | null\n\t/** \n\t * The calculated price (zero or price amount) when associated to a shipment, in cents.\n\t */\n\tprice_amount_for_shipment_cents?: number | null\n\t/** \n\t * The calculated price (zero or price amount) when associated to a shipment, float.\n\t */\n\tprice_amount_for_shipment_float?: number | null\n\t/** \n\t * The calculated price (zero or price amount) when associated to a shipment, formatted.\n\t * @example ```\"€0,00\"```\n\t */\n\tformatted_price_amount_for_shipment?: string | null\n\t/** \n\t * The minimum weight for which this shipping method is available.\n\t * @example ```3```\n\t */\n\tmin_weight?: number | null\n\t/** \n\t * The maximum weight for which this shipping method is available.\n\t * @example ```300```\n\t */\n\tmax_weight?: number | null\n\t/** \n\t * The unit of weight. One of 'gr', 'oz', or 'lb'.\n\t * @example ```\"gr\"```\n\t */\n\tunit_of_weight?: 'gr' | 'oz' | 'lb' | null\n\t/** \n\t * The freight tax identifier code, specific for a particular tax calculator.\n\t * @example ```\"FR010000\"```\n\t */\n\ttax_code?: string | null\n\t/** \n\t * Time at which this resource was disabled.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tdisabled_at?: string | null\n\t/** \n\t * The circuit breaker state, by default it is 'closed'. It can become 'open' once the number of consecutive failures overlaps the specified threshold, in such case no further calls to the failing callback are made.\n\t * @example ```\"closed\"```\n\t */\n\tcircuit_state?: string | null\n\t/** \n\t * The number of consecutive failures recorded by the circuit breaker associated to this resource, will be reset on first successful call to callback.\n\t * @example ```5```\n\t */\n\tcircuit_failure_count?: number | null\n\n\tmarket?: Market | null\n\tshipping_zone?: ShippingZone | null\n\tshipping_category?: ShippingCategory | null\n\tstock_location?: StockLocation | null\n\tdelivery_lead_time_for_shipment?: DeliveryLeadTime | null\n\tshipping_method_tiers?: ShippingMethodTier[] | null\n\tshipping_weight_tiers?: ShippingWeightTier[] | null\n\tattachments?: Attachment[] | null\n\tnotifications?: Notification[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface ShippingMethodCreate extends ResourceCreate {\n\t\n\t/** \n\t * The shipping method's name.\n\t * @example ```\"Standard shipping\"```\n\t */\n\tname: string\n\t/** \n\t * The shipping method's scheme. One of 'flat', 'weight_tiered', or 'external'.\n\t * @example ```\"flat\"```\n\t */\n\tscheme?: 'flat' | 'weight_tiered' | 'external' | null\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * The URL used to overwrite prices by an external source.\n\t * @example ```\"https://external_prices.yourbrand.com\"```\n\t */\n\texternal_prices_url?: string | null\n\t/** \n\t * The price of this shipping method, in cents.\n\t * @example ```1000```\n\t */\n\tprice_amount_cents: number\n\t/** \n\t * Apply free shipping if the order amount is over this value, in cents.\n\t * @example ```9900```\n\t */\n\tfree_over_amount_cents?: number | null\n\t/** \n\t * Send this attribute if you want to compare the free over amount with order's subtotal (excluding discounts, if any).\n\t * @example ```true```\n\t */\n\tuse_subtotal?: boolean | null\n\t/** \n\t * The minimum weight for which this shipping method is available.\n\t * @example ```3```\n\t */\n\tmin_weight?: number | null\n\t/** \n\t * The maximum weight for which this shipping method is available.\n\t * @example ```300```\n\t */\n\tmax_weight?: number | null\n\t/** \n\t * The unit of weight. One of 'gr', 'oz', or 'lb'.\n\t * @example ```\"gr\"```\n\t */\n\tunit_of_weight?: 'gr' | 'oz' | 'lb' | null\n\t/** \n\t * The freight tax identifier code, specific for a particular tax calculator.\n\t * @example ```\"FR010000\"```\n\t */\n\ttax_code?: string | null\n\t/** \n\t * Send this attribute if you want to mark this resource as disabled.\n\t * @example ```true```\n\t */\n\t_disable?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this resource as enabled.\n\t * @example ```true```\n\t */\n\t_enable?: boolean | null\n\n\tmarket?: MarketRel | null\n\tshipping_zone?: ShippingZoneRel | null\n\tshipping_category?: ShippingCategoryRel | null\n\tstock_location?: StockLocationRel | null\n\tshipping_method_tiers?: ShippingMethodTierRel[] | null\n\n}\n\n\ninterface ShippingMethodUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The shipping method's name.\n\t * @example ```\"Standard shipping\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The shipping method's scheme. One of 'flat', 'weight_tiered', or 'external'.\n\t * @example ```\"flat\"```\n\t */\n\tscheme?: 'flat' | 'weight_tiered' | 'external' | null\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * The URL used to overwrite prices by an external source.\n\t * @example ```\"https://external_prices.yourbrand.com\"```\n\t */\n\texternal_prices_url?: string | null\n\t/** \n\t * The price of this shipping method, in cents.\n\t * @example ```1000```\n\t */\n\tprice_amount_cents?: number | null\n\t/** \n\t * Apply free shipping if the order amount is over this value, in cents.\n\t * @example ```9900```\n\t */\n\tfree_over_amount_cents?: number | null\n\t/** \n\t * Send this attribute if you want to compare the free over amount with order's subtotal (excluding discounts, if any).\n\t * @example ```true```\n\t */\n\tuse_subtotal?: boolean | null\n\t/** \n\t * The minimum weight for which this shipping method is available.\n\t * @example ```3```\n\t */\n\tmin_weight?: number | null\n\t/** \n\t * The maximum weight for which this shipping method is available.\n\t * @example ```300```\n\t */\n\tmax_weight?: number | null\n\t/** \n\t * The unit of weight. One of 'gr', 'oz', or 'lb'.\n\t * @example ```\"gr\"```\n\t */\n\tunit_of_weight?: 'gr' | 'oz' | 'lb' | null\n\t/** \n\t * The freight tax identifier code, specific for a particular tax calculator.\n\t * @example ```\"FR010000\"```\n\t */\n\ttax_code?: string | null\n\t/** \n\t * Send this attribute if you want to mark this resource as disabled.\n\t * @example ```true```\n\t */\n\t_disable?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this resource as enabled.\n\t * @example ```true```\n\t */\n\t_enable?: boolean | null\n\t/** \n\t * Send this attribute if you want to reset the circuit breaker associated to this resource to 'closed' state and zero failures count. Cannot be passed by sales channels.\n\t * @example ```true```\n\t */\n\t_reset_circuit?: boolean | null\n\n\tmarket?: MarketRel | null\n\tshipping_zone?: ShippingZoneRel | null\n\tshipping_category?: ShippingCategoryRel | null\n\tstock_location?: StockLocationRel | null\n\tshipping_method_tiers?: ShippingMethodTierRel[] | null\n\n}\n\n\nclass ShippingMethods extends ApiResource<ShippingMethod> {\n\n\tstatic readonly TYPE: ShippingMethodType = 'shipping_methods' as const\n\n\tasync create(resource: ShippingMethodCreate, params?: QueryParamsRetrieve<ShippingMethod>, options?: ResourcesConfig): Promise<ShippingMethod> {\n\t\treturn this.resources.create<ShippingMethodCreate, ShippingMethod>({ ...resource, type: ShippingMethods.TYPE }, params, options)\n\t}\n\n\tasync update(resource: ShippingMethodUpdate, params?: QueryParamsRetrieve<ShippingMethod>, options?: ResourcesConfig): Promise<ShippingMethod> {\n\t\treturn this.resources.update<ShippingMethodUpdate, ShippingMethod>({ ...resource, type: ShippingMethods.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: ShippingMethods.TYPE } : id, options)\n\t}\n\n\tasync market(shippingMethodId: string | ShippingMethod, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\tconst _shippingMethodId = (shippingMethodId as ShippingMethod).id || shippingMethodId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `shipping_methods/${_shippingMethodId}/market`, params, options) as unknown as Market\n\t}\n\n\tasync shipping_zone(shippingMethodId: string | ShippingMethod, params?: QueryParamsRetrieve<ShippingZone>, options?: ResourcesConfig): Promise<ShippingZone> {\n\t\tconst _shippingMethodId = (shippingMethodId as ShippingMethod).id || shippingMethodId as string\n\t\treturn this.resources.fetch<ShippingZone>({ type: 'shipping_zones' }, `shipping_methods/${_shippingMethodId}/shipping_zone`, params, options) as unknown as ShippingZone\n\t}\n\n\tasync shipping_category(shippingMethodId: string | ShippingMethod, params?: QueryParamsRetrieve<ShippingCategory>, options?: ResourcesConfig): Promise<ShippingCategory> {\n\t\tconst _shippingMethodId = (shippingMethodId as ShippingMethod).id || shippingMethodId as string\n\t\treturn this.resources.fetch<ShippingCategory>({ type: 'shipping_categories' }, `shipping_methods/${_shippingMethodId}/shipping_category`, params, options) as unknown as ShippingCategory\n\t}\n\n\tasync stock_location(shippingMethodId: string | ShippingMethod, params?: QueryParamsRetrieve<StockLocation>, options?: ResourcesConfig): Promise<StockLocation> {\n\t\tconst _shippingMethodId = (shippingMethodId as ShippingMethod).id || shippingMethodId as string\n\t\treturn this.resources.fetch<StockLocation>({ type: 'stock_locations' }, `shipping_methods/${_shippingMethodId}/stock_location`, params, options) as unknown as StockLocation\n\t}\n\n\tasync delivery_lead_time_for_shipment(shippingMethodId: string | ShippingMethod, params?: QueryParamsRetrieve<DeliveryLeadTime>, options?: ResourcesConfig): Promise<DeliveryLeadTime> {\n\t\tconst _shippingMethodId = (shippingMethodId as ShippingMethod).id || shippingMethodId as string\n\t\treturn this.resources.fetch<DeliveryLeadTime>({ type: 'delivery_lead_times' }, `shipping_methods/${_shippingMethodId}/delivery_lead_time_for_shipment`, params, options) as unknown as DeliveryLeadTime\n\t}\n\n\tasync shipping_method_tiers(shippingMethodId: string | ShippingMethod, params?: QueryParamsList<ShippingMethodTier>, options?: ResourcesConfig): Promise<ListResponse<ShippingMethodTier>> {\n\t\tconst _shippingMethodId = (shippingMethodId as ShippingMethod).id || shippingMethodId as string\n\t\treturn this.resources.fetch<ShippingMethodTier>({ type: 'shipping_method_tiers' }, `shipping_methods/${_shippingMethodId}/shipping_method_tiers`, params, options) as unknown as ListResponse<ShippingMethodTier>\n\t}\n\n\tasync shipping_weight_tiers(shippingMethodId: string | ShippingMethod, params?: QueryParamsList<ShippingWeightTier>, options?: ResourcesConfig): Promise<ListResponse<ShippingWeightTier>> {\n\t\tconst _shippingMethodId = (shippingMethodId as ShippingMethod).id || shippingMethodId as string\n\t\treturn this.resources.fetch<ShippingWeightTier>({ type: 'shipping_weight_tiers' }, `shipping_methods/${_shippingMethodId}/shipping_weight_tiers`, params, options) as unknown as ListResponse<ShippingWeightTier>\n\t}\n\n\tasync attachments(shippingMethodId: string | ShippingMethod, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _shippingMethodId = (shippingMethodId as ShippingMethod).id || shippingMethodId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `shipping_methods/${_shippingMethodId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync notifications(shippingMethodId: string | ShippingMethod, params?: QueryParamsList<Notification>, options?: ResourcesConfig): Promise<ListResponse<Notification>> {\n\t\tconst _shippingMethodId = (shippingMethodId as ShippingMethod).id || shippingMethodId as string\n\t\treturn this.resources.fetch<Notification>({ type: 'notifications' }, `shipping_methods/${_shippingMethodId}/notifications`, params, options) as unknown as ListResponse<Notification>\n\t}\n\n\tasync versions(shippingMethodId: string | ShippingMethod, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _shippingMethodId = (shippingMethodId as ShippingMethod).id || shippingMethodId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `shipping_methods/${_shippingMethodId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _disable(id: string | ShippingMethod, params?: QueryParamsRetrieve<ShippingMethod>, options?: ResourcesConfig): Promise<ShippingMethod> {\n\t\treturn this.resources.update<ShippingMethodUpdate, ShippingMethod>({ id: (typeof id === 'string')? id: id.id, type: ShippingMethods.TYPE, _disable: true }, params, options)\n\t}\n\n\tasync _enable(id: string | ShippingMethod, params?: QueryParamsRetrieve<ShippingMethod>, options?: ResourcesConfig): Promise<ShippingMethod> {\n\t\treturn this.resources.update<ShippingMethodUpdate, ShippingMethod>({ id: (typeof id === 'string')? id: id.id, type: ShippingMethods.TYPE, _enable: true }, params, options)\n\t}\n\n\tasync _reset_circuit(id: string | ShippingMethod, params?: QueryParamsRetrieve<ShippingMethod>, options?: ResourcesConfig): Promise<ShippingMethod> {\n\t\treturn this.resources.update<ShippingMethodUpdate, ShippingMethod>({ id: (typeof id === 'string')? id: id.id, type: ShippingMethods.TYPE, _reset_circuit: true }, params, options)\n\t}\n\n\n\tisShippingMethod(resource: any): resource is ShippingMethod {\n\t\treturn resource.type && (resource.type === ShippingMethods.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): ShippingMethodRel {\n\t\treturn super.relationshipOneToOne<ShippingMethodRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): ShippingMethodRel[] {\n\t\treturn super.relationshipOneToMany<ShippingMethodRel>(...ids)\n\t}\n\n\n\ttype(): ShippingMethodType {\n\t\treturn ShippingMethods.TYPE\n\t}\n\n}\n\n\nconst instance = new ShippingMethods()\nexport default instance\n\nexport type { ShippingMethods, ShippingMethod, ShippingMethodCreate, ShippingMethodUpdate, ShippingMethodType }\n"]}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { jG as ShippingMethod, jH as ShippingMethodCreate, jJ as ShippingMethodSort, m6 as ShippingMethodType, jI as ShippingMethodUpdate, cW as ShippingMethods, cV 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 { jG as ShippingMethod, jH as ShippingMethodCreate, jJ as ShippingMethodSort, m6 as ShippingMethodType, jI as ShippingMethodUpdate, cW as ShippingMethods, cV as default } from '../api-F1F37Dud.js';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CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,eAAgB,CAAA,IAAA;AAAA;AAC5D,EAGA,aAAa,EAAmD,EAAA;AAC/D,IAAO,OAAA,KAAA,CAAM,qBAAwC,EAAE,CAAA;AAAA;AACxD,EAEA,sBAAsB,GAAoC,EAAA;AACzD,IAAO,OAAA,KAAA,CAAM,qBAAyC,CAAA,GAAG,GAAG,CAAA;AAAA;AAC7D,EAGA,IAA2B,GAAA;AAC1B,IAAA,OAAO,eAAgB,CAAA,IAAA;AAAA;AAGzB;AAGA,MAAM,QAAA,GAAW,IAAI,eAAgB,EAAA;AACrC,IAAO,wBAAQ,GAAA","file":"shipping_methods.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 { Market, MarketType } from './markets'\nimport type { ShippingZone, ShippingZoneType } from './shipping_zones'\nimport type { ShippingCategory, ShippingCategoryType } from './shipping_categories'\nimport type { StockLocation, StockLocationType } from './stock_locations'\nimport type { DeliveryLeadTime } from './delivery_lead_times'\nimport type { ShippingMethodTier, ShippingMethodTierType } from './shipping_method_tiers'\nimport type { ShippingWeightTier } from './shipping_weight_tiers'\nimport type { Attachment } from './attachments'\nimport type { Notification } from './notifications'\nimport type { Version } from './versions'\n\n\ntype ShippingMethodType = 'shipping_methods'\ntype ShippingMethodRel = ResourceRel & { type: ShippingMethodType }\ntype MarketRel = ResourceRel & { type: MarketType }\ntype ShippingZoneRel = ResourceRel & { type: ShippingZoneType }\ntype ShippingCategoryRel = ResourceRel & { type: ShippingCategoryType }\ntype StockLocationRel = ResourceRel & { type: StockLocationType }\ntype ShippingMethodTierRel = ResourceRel & { type: ShippingMethodTierType }\n\n\nexport type ShippingMethodSort = Pick<ShippingMethod, 'id' | 'name' | 'scheme' | 'currency_code' | 'price_amount_cents' | 'free_over_amount_cents' | 'disabled_at' | 'circuit_state' | 'circuit_failure_count'> & ResourceSort\n// export type ShippingMethodFilter = Pick<ShippingMethod, 'id' | 'name' | 'scheme' | 'currency_code' | 'price_amount_cents' | 'free_over_amount_cents' | 'disabled_at' | 'circuit_state' | 'circuit_failure_count'> & ResourceFilter\n\n\ninterface ShippingMethod extends Resource {\n\t\n\treadonly type: ShippingMethodType\n\n\t/** \n\t * The shipping method's name.\n\t * @example ```\"Standard shipping\"```\n\t */\n\tname: string\n\t/** \n\t * The shipping method's scheme. One of 'flat', 'weight_tiered', or 'external'.\n\t * @example ```\"flat\"```\n\t */\n\tscheme?: 'flat' | 'weight_tiered' | 'external' | null\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * The URL used to overwrite prices by an external source.\n\t * @example ```\"https://external_prices.yourbrand.com\"```\n\t */\n\texternal_prices_url?: string | null\n\t/** \n\t * The price of this shipping method, in cents.\n\t * @example ```1000```\n\t */\n\tprice_amount_cents: number\n\t/** \n\t * The price of this shipping method, float.\n\t * @example ```10```\n\t */\n\tprice_amount_float?: number | null\n\t/** \n\t * The price of this shipping method, formatted.\n\t * @example ```\"€10,00\"```\n\t */\n\tformatted_price_amount?: string | null\n\t/** \n\t * Apply free shipping if the order amount is over this value, in cents.\n\t * @example ```9900```\n\t */\n\tfree_over_amount_cents?: number | null\n\t/** \n\t * Apply free shipping if the order amount is over this value, float.\n\t * @example ```99```\n\t */\n\tfree_over_amount_float?: number | null\n\t/** \n\t * Apply free shipping if the order amount is over this value, formatted.\n\t * @example ```\"€99,00\"```\n\t */\n\tformatted_free_over_amount?: string | null\n\t/** \n\t * Send this attribute if you want to compare the free over amount with order's subtotal (excluding discounts, if any).\n\t * @example ```true```\n\t */\n\tuse_subtotal?: boolean | null\n\t/** \n\t * The calculated price (zero or price amount) when associated to a shipment, in cents.\n\t */\n\tprice_amount_for_shipment_cents?: number | null\n\t/** \n\t * The calculated price (zero or price amount) when associated to a shipment, float.\n\t */\n\tprice_amount_for_shipment_float?: number | null\n\t/** \n\t * The calculated price (zero or price amount) when associated to a shipment, formatted.\n\t * @example ```\"€0,00\"```\n\t */\n\tformatted_price_amount_for_shipment?: string | null\n\t/** \n\t * The minimum weight for which this shipping method is available.\n\t * @example ```3```\n\t */\n\tmin_weight?: number | null\n\t/** \n\t * The maximum weight for which this shipping method is available.\n\t * @example ```300```\n\t */\n\tmax_weight?: number | null\n\t/** \n\t * The unit of weight. One of 'gr', 'oz', or 'lb'.\n\t * @example ```\"gr\"```\n\t */\n\tunit_of_weight?: 'gr' | 'oz' | 'lb' | null\n\t/** \n\t * The freight tax identifier code, specific for a particular tax calculator.\n\t * @example ```\"FR010000\"```\n\t */\n\ttax_code?: string | null\n\t/** \n\t * Time at which this resource was disabled.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tdisabled_at?: string | null\n\t/** \n\t * The circuit breaker state, by default it is 'closed'. It can become 'open' once the number of consecutive failures overlaps the specified threshold, in such case no further calls to the failing callback are made.\n\t * @example ```\"closed\"```\n\t */\n\tcircuit_state?: string | null\n\t/** \n\t * The number of consecutive failures recorded by the circuit breaker associated to this resource, will be reset on first successful call to callback.\n\t * @example ```5```\n\t */\n\tcircuit_failure_count?: number | null\n\n\tmarket?: Market | null\n\tshipping_zone?: ShippingZone | null\n\tshipping_category?: ShippingCategory | null\n\tstock_location?: StockLocation | null\n\tdelivery_lead_time_for_shipment?: DeliveryLeadTime | null\n\tshipping_method_tiers?: ShippingMethodTier[] | null\n\tshipping_weight_tiers?: ShippingWeightTier[] | null\n\tattachments?: Attachment[] | null\n\tnotifications?: Notification[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface ShippingMethodCreate extends ResourceCreate {\n\t\n\t/** \n\t * The shipping method's name.\n\t * @example ```\"Standard shipping\"```\n\t */\n\tname: string\n\t/** \n\t * The shipping method's scheme. One of 'flat', 'weight_tiered', or 'external'.\n\t * @example ```\"flat\"```\n\t */\n\tscheme?: 'flat' | 'weight_tiered' | 'external' | null\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * The URL used to overwrite prices by an external source.\n\t * @example ```\"https://external_prices.yourbrand.com\"```\n\t */\n\texternal_prices_url?: string | null\n\t/** \n\t * The price of this shipping method, in cents.\n\t * @example ```1000```\n\t */\n\tprice_amount_cents: number\n\t/** \n\t * Apply free shipping if the order amount is over this value, in cents.\n\t * @example ```9900```\n\t */\n\tfree_over_amount_cents?: number | null\n\t/** \n\t * Send this attribute if you want to compare the free over amount with order's subtotal (excluding discounts, if any).\n\t * @example ```true```\n\t */\n\tuse_subtotal?: boolean | null\n\t/** \n\t * The minimum weight for which this shipping method is available.\n\t * @example ```3```\n\t */\n\tmin_weight?: number | null\n\t/** \n\t * The maximum weight for which this shipping method is available.\n\t * @example ```300```\n\t */\n\tmax_weight?: number | null\n\t/** \n\t * The unit of weight. One of 'gr', 'oz', or 'lb'.\n\t * @example ```\"gr\"```\n\t */\n\tunit_of_weight?: 'gr' | 'oz' | 'lb' | null\n\t/** \n\t * The freight tax identifier code, specific for a particular tax calculator.\n\t * @example ```\"FR010000\"```\n\t */\n\ttax_code?: string | null\n\t/** \n\t * Send this attribute if you want to mark this resource as disabled.\n\t * @example ```true```\n\t */\n\t_disable?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this resource as enabled.\n\t * @example ```true```\n\t */\n\t_enable?: boolean | null\n\n\tmarket?: MarketRel | null\n\tshipping_zone?: ShippingZoneRel | null\n\tshipping_category?: ShippingCategoryRel | null\n\tstock_location?: StockLocationRel | null\n\tshipping_method_tiers?: ShippingMethodTierRel[] | null\n\n}\n\n\ninterface ShippingMethodUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The shipping method's name.\n\t * @example ```\"Standard shipping\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The shipping method's scheme. One of 'flat', 'weight_tiered', or 'external'.\n\t * @example ```\"flat\"```\n\t */\n\tscheme?: 'flat' | 'weight_tiered' | 'external' | null\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * The URL used to overwrite prices by an external source.\n\t * @example ```\"https://external_prices.yourbrand.com\"```\n\t */\n\texternal_prices_url?: string | null\n\t/** \n\t * The price of this shipping method, in cents.\n\t * @example ```1000```\n\t */\n\tprice_amount_cents?: number | null\n\t/** \n\t * Apply free shipping if the order amount is over this value, in cents.\n\t * @example ```9900```\n\t */\n\tfree_over_amount_cents?: number | null\n\t/** \n\t * Send this attribute if you want to compare the free over amount with order's subtotal (excluding discounts, if any).\n\t * @example ```true```\n\t */\n\tuse_subtotal?: boolean | null\n\t/** \n\t * The minimum weight for which this shipping method is available.\n\t * @example ```3```\n\t */\n\tmin_weight?: number | null\n\t/** \n\t * The maximum weight for which this shipping method is available.\n\t * @example ```300```\n\t */\n\tmax_weight?: number | null\n\t/** \n\t * The unit of weight. One of 'gr', 'oz', or 'lb'.\n\t * @example ```\"gr\"```\n\t */\n\tunit_of_weight?: 'gr' | 'oz' | 'lb' | null\n\t/** \n\t * The freight tax identifier code, specific for a particular tax calculator.\n\t * @example ```\"FR010000\"```\n\t */\n\ttax_code?: string | null\n\t/** \n\t * Send this attribute if you want to mark this resource as disabled.\n\t * @example ```true```\n\t */\n\t_disable?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this resource as enabled.\n\t * @example ```true```\n\t */\n\t_enable?: boolean | null\n\t/** \n\t * Send this attribute if you want to reset the circuit breaker associated to this resource to 'closed' state and zero failures count. Cannot be passed by sales channels.\n\t * @example ```true```\n\t */\n\t_reset_circuit?: boolean | null\n\n\tmarket?: MarketRel | null\n\tshipping_zone?: ShippingZoneRel | null\n\tshipping_category?: ShippingCategoryRel | null\n\tstock_location?: StockLocationRel | null\n\tshipping_method_tiers?: ShippingMethodTierRel[] | null\n\n}\n\n\nclass ShippingMethods extends ApiResource<ShippingMethod> {\n\n\tstatic readonly TYPE: ShippingMethodType = 'shipping_methods' as const\n\n\tasync create(resource: ShippingMethodCreate, params?: QueryParamsRetrieve<ShippingMethod>, options?: ResourcesConfig): Promise<ShippingMethod> {\n\t\treturn this.resources.create<ShippingMethodCreate, ShippingMethod>({ ...resource, type: ShippingMethods.TYPE }, params, options)\n\t}\n\n\tasync update(resource: ShippingMethodUpdate, params?: QueryParamsRetrieve<ShippingMethod>, options?: ResourcesConfig): Promise<ShippingMethod> {\n\t\treturn this.resources.update<ShippingMethodUpdate, ShippingMethod>({ ...resource, type: ShippingMethods.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: ShippingMethods.TYPE } : id, options)\n\t}\n\n\tasync market(shippingMethodId: string | ShippingMethod, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\tconst _shippingMethodId = (shippingMethodId as ShippingMethod).id || shippingMethodId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `shipping_methods/${_shippingMethodId}/market`, params, options) as unknown as Market\n\t}\n\n\tasync shipping_zone(shippingMethodId: string | ShippingMethod, params?: QueryParamsRetrieve<ShippingZone>, options?: ResourcesConfig): Promise<ShippingZone> {\n\t\tconst _shippingMethodId = (shippingMethodId as ShippingMethod).id || shippingMethodId as string\n\t\treturn this.resources.fetch<ShippingZone>({ type: 'shipping_zones' }, `shipping_methods/${_shippingMethodId}/shipping_zone`, params, options) as unknown as ShippingZone\n\t}\n\n\tasync shipping_category(shippingMethodId: string | ShippingMethod, params?: QueryParamsRetrieve<ShippingCategory>, options?: ResourcesConfig): Promise<ShippingCategory> {\n\t\tconst _shippingMethodId = (shippingMethodId as ShippingMethod).id || shippingMethodId as string\n\t\treturn this.resources.fetch<ShippingCategory>({ type: 'shipping_categories' }, `shipping_methods/${_shippingMethodId}/shipping_category`, params, options) as unknown as ShippingCategory\n\t}\n\n\tasync stock_location(shippingMethodId: string | ShippingMethod, params?: QueryParamsRetrieve<StockLocation>, options?: ResourcesConfig): Promise<StockLocation> {\n\t\tconst _shippingMethodId = (shippingMethodId as ShippingMethod).id || shippingMethodId as string\n\t\treturn this.resources.fetch<StockLocation>({ type: 'stock_locations' }, `shipping_methods/${_shippingMethodId}/stock_location`, params, options) as unknown as StockLocation\n\t}\n\n\tasync delivery_lead_time_for_shipment(shippingMethodId: string | ShippingMethod, params?: QueryParamsRetrieve<DeliveryLeadTime>, options?: ResourcesConfig): Promise<DeliveryLeadTime> {\n\t\tconst _shippingMethodId = (shippingMethodId as ShippingMethod).id || shippingMethodId as string\n\t\treturn this.resources.fetch<DeliveryLeadTime>({ type: 'delivery_lead_times' }, `shipping_methods/${_shippingMethodId}/delivery_lead_time_for_shipment`, params, options) as unknown as DeliveryLeadTime\n\t}\n\n\tasync shipping_method_tiers(shippingMethodId: string | ShippingMethod, params?: QueryParamsList<ShippingMethodTier>, options?: ResourcesConfig): Promise<ListResponse<ShippingMethodTier>> {\n\t\tconst _shippingMethodId = (shippingMethodId as ShippingMethod).id || shippingMethodId as string\n\t\treturn this.resources.fetch<ShippingMethodTier>({ type: 'shipping_method_tiers' }, `shipping_methods/${_shippingMethodId}/shipping_method_tiers`, params, options) as unknown as ListResponse<ShippingMethodTier>\n\t}\n\n\tasync shipping_weight_tiers(shippingMethodId: string | ShippingMethod, params?: QueryParamsList<ShippingWeightTier>, options?: ResourcesConfig): Promise<ListResponse<ShippingWeightTier>> {\n\t\tconst _shippingMethodId = (shippingMethodId as ShippingMethod).id || shippingMethodId as string\n\t\treturn this.resources.fetch<ShippingWeightTier>({ type: 'shipping_weight_tiers' }, `shipping_methods/${_shippingMethodId}/shipping_weight_tiers`, params, options) as unknown as ListResponse<ShippingWeightTier>\n\t}\n\n\tasync attachments(shippingMethodId: string | ShippingMethod, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _shippingMethodId = (shippingMethodId as ShippingMethod).id || shippingMethodId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `shipping_methods/${_shippingMethodId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync notifications(shippingMethodId: string | ShippingMethod, params?: QueryParamsList<Notification>, options?: ResourcesConfig): Promise<ListResponse<Notification>> {\n\t\tconst _shippingMethodId = (shippingMethodId as ShippingMethod).id || shippingMethodId as string\n\t\treturn this.resources.fetch<Notification>({ type: 'notifications' }, `shipping_methods/${_shippingMethodId}/notifications`, params, options) as unknown as ListResponse<Notification>\n\t}\n\n\tasync versions(shippingMethodId: string | ShippingMethod, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _shippingMethodId = (shippingMethodId as ShippingMethod).id || shippingMethodId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `shipping_methods/${_shippingMethodId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _disable(id: string | ShippingMethod, params?: QueryParamsRetrieve<ShippingMethod>, options?: ResourcesConfig): Promise<ShippingMethod> {\n\t\treturn this.resources.update<ShippingMethodUpdate, ShippingMethod>({ id: (typeof id === 'string')? id: id.id, type: ShippingMethods.TYPE, _disable: true }, params, options)\n\t}\n\n\tasync _enable(id: string | ShippingMethod, params?: QueryParamsRetrieve<ShippingMethod>, options?: ResourcesConfig): Promise<ShippingMethod> {\n\t\treturn this.resources.update<ShippingMethodUpdate, ShippingMethod>({ id: (typeof id === 'string')? id: id.id, type: ShippingMethods.TYPE, _enable: true }, params, options)\n\t}\n\n\tasync _reset_circuit(id: string | ShippingMethod, params?: QueryParamsRetrieve<ShippingMethod>, options?: ResourcesConfig): Promise<ShippingMethod> {\n\t\treturn this.resources.update<ShippingMethodUpdate, ShippingMethod>({ id: (typeof id === 'string')? id: id.id, type: ShippingMethods.TYPE, _reset_circuit: true }, params, options)\n\t}\n\n\n\tisShippingMethod(resource: any): resource is ShippingMethod {\n\t\treturn resource.type && (resource.type === ShippingMethods.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): ShippingMethodRel {\n\t\treturn super.relationshipOneToOne<ShippingMethodRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): ShippingMethodRel[] {\n\t\treturn super.relationshipOneToMany<ShippingMethodRel>(...ids)\n\t}\n\n\n\ttype(): ShippingMethodType {\n\t\treturn ShippingMethods.TYPE\n\t}\n\n}\n\n\nconst instance = new ShippingMethods()\nexport default instance\n\nexport type { ShippingMethod, ShippingMethodCreate, ShippingMethodUpdate, ShippingMethodType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/shipping_methods.ts"],"names":[],"mappings":";;AAsTA,MAAM,wBAAwB,WAA4B,CAAA;AAAA,EAEzD,OAAgB,IAA2B,GAAA,kBAAA;AAAA,EAE3C,MAAM,MAAA,CAAO,QAAgC,EAAA,MAAA,EAA8C,OAAoD,EAAA;AAC9I,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA6C,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,eAAgB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAChI,EAEA,MAAM,MAAA,CAAO,QAAgC,EAAA,MAAA,EAA8C,OAAoD,EAAA;AAC9I,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA6C,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,eAAgB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAChI,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,eAAA,CAAgB,IAAK,EAAA,G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AAA;AAAA;AAC3K,EAEA,MAAM,cAAA,CAAe,EAA6B,EAAA,MAAA,EAA8C,OAAoD,EAAA;AACnJ,IAAA,OAAO,KAAK,SAAU,CAAA,MAAA,CAA6C,EAAE,EAAK,EAAA,OAAO,OAAO,QAAW,GAAA,EAAA,GAAI,EAAG,CAAA,EAAA,EAAI,MAAM,eAAgB,CAAA,IAAA,EAAM,gBAAgB,IAAK,EAAA,EAAG,QAAQ,OAAO,CAAA;AAAA;AAClL,EAGA,iBAAiB,QAA2C,EAAA;AAC3D,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,eAAgB,CAAA,IAAA;AAAA;AAC5D,EAGA,aAAa,EAAmD,EAAA;AAC/D,IAAO,OAAA,KAAA,CAAM,qBAAwC,EAAE,CAAA;AAAA;AACxD,EAEA,sBAAsB,GAAoC,EAAA;AACzD,IAAO,OAAA,KAAA,CAAM,qBAAyC,CAAA,GAAG,GAAG,CAAA;AAAA;AAC7D,EAGA,IAA2B,GAAA;AAC1B,IAAA,OAAO,eAAgB,CAAA,IAAA;AAAA;AAGzB;AAGA,MAAM,QAAA,GAAW,IAAI,eAAgB,EAAA;AACrC,IAAO,wBAAQ,GAAA","file":"shipping_methods.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 { Market, MarketType } from './markets'\nimport type { ShippingZone, ShippingZoneType } from './shipping_zones'\nimport type { ShippingCategory, ShippingCategoryType } from './shipping_categories'\nimport type { StockLocation, StockLocationType } from './stock_locations'\nimport type { DeliveryLeadTime } from './delivery_lead_times'\nimport type { ShippingMethodTier, ShippingMethodTierType } from './shipping_method_tiers'\nimport type { ShippingWeightTier } from './shipping_weight_tiers'\nimport type { Attachment } from './attachments'\nimport type { Notification } from './notifications'\nimport type { Version } from './versions'\n\n\ntype ShippingMethodType = 'shipping_methods'\ntype ShippingMethodRel = ResourceRel & { type: ShippingMethodType }\ntype MarketRel = ResourceRel & { type: MarketType }\ntype ShippingZoneRel = ResourceRel & { type: ShippingZoneType }\ntype ShippingCategoryRel = ResourceRel & { type: ShippingCategoryType }\ntype StockLocationRel = ResourceRel & { type: StockLocationType }\ntype ShippingMethodTierRel = ResourceRel & { type: ShippingMethodTierType }\n\n\nexport type ShippingMethodSort = Pick<ShippingMethod, 'id' | 'name' | 'scheme' | 'currency_code' | 'price_amount_cents' | 'free_over_amount_cents' | 'disabled_at' | 'circuit_state' | 'circuit_failure_count'> & ResourceSort\n// export type ShippingMethodFilter = Pick<ShippingMethod, 'id' | 'name' | 'scheme' | 'currency_code' | 'price_amount_cents' | 'free_over_amount_cents' | 'disabled_at' | 'circuit_state' | 'circuit_failure_count'> & ResourceFilter\n\n\ninterface ShippingMethod extends Resource {\n\t\n\treadonly type: ShippingMethodType\n\n\t/** \n\t * The shipping method's name.\n\t * @example ```\"Standard shipping\"```\n\t */\n\tname: string\n\t/** \n\t * The shipping method's scheme. One of 'flat', 'weight_tiered', or 'external'.\n\t * @example ```\"flat\"```\n\t */\n\tscheme?: 'flat' | 'weight_tiered' | 'external' | null\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * The URL used to overwrite prices by an external source.\n\t * @example ```\"https://external_prices.yourbrand.com\"```\n\t */\n\texternal_prices_url?: string | null\n\t/** \n\t * The price of this shipping method, in cents.\n\t * @example ```1000```\n\t */\n\tprice_amount_cents: number\n\t/** \n\t * The price of this shipping method, float.\n\t * @example ```10```\n\t */\n\tprice_amount_float?: number | null\n\t/** \n\t * The price of this shipping method, formatted.\n\t * @example ```\"€10,00\"```\n\t */\n\tformatted_price_amount?: string | null\n\t/** \n\t * Apply free shipping if the order amount is over this value, in cents.\n\t * @example ```9900```\n\t */\n\tfree_over_amount_cents?: number | null\n\t/** \n\t * Apply free shipping if the order amount is over this value, float.\n\t * @example ```99```\n\t */\n\tfree_over_amount_float?: number | null\n\t/** \n\t * Apply free shipping if the order amount is over this value, formatted.\n\t * @example ```\"€99,00\"```\n\t */\n\tformatted_free_over_amount?: string | null\n\t/** \n\t * Send this attribute if you want to compare the free over amount with order's subtotal (excluding discounts, if any).\n\t * @example ```true```\n\t */\n\tuse_subtotal?: boolean | null\n\t/** \n\t * The calculated price (zero or price amount) when associated to a shipment, in cents.\n\t */\n\tprice_amount_for_shipment_cents?: number | null\n\t/** \n\t * The calculated price (zero or price amount) when associated to a shipment, float.\n\t */\n\tprice_amount_for_shipment_float?: number | null\n\t/** \n\t * The calculated price (zero or price amount) when associated to a shipment, formatted.\n\t * @example ```\"€0,00\"```\n\t */\n\tformatted_price_amount_for_shipment?: string | null\n\t/** \n\t * The minimum weight for which this shipping method is available.\n\t * @example ```3```\n\t */\n\tmin_weight?: number | null\n\t/** \n\t * The maximum weight for which this shipping method is available.\n\t * @example ```300```\n\t */\n\tmax_weight?: number | null\n\t/** \n\t * The unit of weight. One of 'gr', 'oz', or 'lb'.\n\t * @example ```\"gr\"```\n\t */\n\tunit_of_weight?: 'gr' | 'oz' | 'lb' | null\n\t/** \n\t * The freight tax identifier code, specific for a particular tax calculator.\n\t * @example ```\"FR010000\"```\n\t */\n\ttax_code?: string | null\n\t/** \n\t * Time at which this resource was disabled.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tdisabled_at?: string | null\n\t/** \n\t * The circuit breaker state, by default it is 'closed'. It can become 'open' once the number of consecutive failures overlaps the specified threshold, in such case no further calls to the failing callback are made.\n\t * @example ```\"closed\"```\n\t */\n\tcircuit_state?: string | null\n\t/** \n\t * The number of consecutive failures recorded by the circuit breaker associated to this resource, will be reset on first successful call to callback.\n\t * @example ```5```\n\t */\n\tcircuit_failure_count?: number | null\n\n\tmarket?: Market | null\n\tshipping_zone?: ShippingZone | null\n\tshipping_category?: ShippingCategory | null\n\tstock_location?: StockLocation | null\n\tdelivery_lead_time_for_shipment?: DeliveryLeadTime | null\n\tshipping_method_tiers?: ShippingMethodTier[] | null\n\tshipping_weight_tiers?: ShippingWeightTier[] | null\n\tattachments?: Attachment[] | null\n\tnotifications?: Notification[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface ShippingMethodCreate extends ResourceCreate {\n\t\n\t/** \n\t * The shipping method's name.\n\t * @example ```\"Standard shipping\"```\n\t */\n\tname: string\n\t/** \n\t * The shipping method's scheme. One of 'flat', 'weight_tiered', or 'external'.\n\t * @example ```\"flat\"```\n\t */\n\tscheme?: 'flat' | 'weight_tiered' | 'external' | null\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * The URL used to overwrite prices by an external source.\n\t * @example ```\"https://external_prices.yourbrand.com\"```\n\t */\n\texternal_prices_url?: string | null\n\t/** \n\t * The price of this shipping method, in cents.\n\t * @example ```1000```\n\t */\n\tprice_amount_cents: number\n\t/** \n\t * Apply free shipping if the order amount is over this value, in cents.\n\t * @example ```9900```\n\t */\n\tfree_over_amount_cents?: number | null\n\t/** \n\t * Send this attribute if you want to compare the free over amount with order's subtotal (excluding discounts, if any).\n\t * @example ```true```\n\t */\n\tuse_subtotal?: boolean | null\n\t/** \n\t * The minimum weight for which this shipping method is available.\n\t * @example ```3```\n\t */\n\tmin_weight?: number | null\n\t/** \n\t * The maximum weight for which this shipping method is available.\n\t * @example ```300```\n\t */\n\tmax_weight?: number | null\n\t/** \n\t * The unit of weight. One of 'gr', 'oz', or 'lb'.\n\t * @example ```\"gr\"```\n\t */\n\tunit_of_weight?: 'gr' | 'oz' | 'lb' | null\n\t/** \n\t * The freight tax identifier code, specific for a particular tax calculator.\n\t * @example ```\"FR010000\"```\n\t */\n\ttax_code?: string | null\n\t/** \n\t * Send this attribute if you want to mark this resource as disabled.\n\t * @example ```true```\n\t */\n\t_disable?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this resource as enabled.\n\t * @example ```true```\n\t */\n\t_enable?: boolean | null\n\n\tmarket?: MarketRel | null\n\tshipping_zone?: ShippingZoneRel | null\n\tshipping_category?: ShippingCategoryRel | null\n\tstock_location?: StockLocationRel | null\n\tshipping_method_tiers?: ShippingMethodTierRel[] | null\n\n}\n\n\ninterface ShippingMethodUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The shipping method's name.\n\t * @example ```\"Standard shipping\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The shipping method's scheme. One of 'flat', 'weight_tiered', or 'external'.\n\t * @example ```\"flat\"```\n\t */\n\tscheme?: 'flat' | 'weight_tiered' | 'external' | null\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * The URL used to overwrite prices by an external source.\n\t * @example ```\"https://external_prices.yourbrand.com\"```\n\t */\n\texternal_prices_url?: string | null\n\t/** \n\t * The price of this shipping method, in cents.\n\t * @example ```1000```\n\t */\n\tprice_amount_cents?: number | null\n\t/** \n\t * Apply free shipping if the order amount is over this value, in cents.\n\t * @example ```9900```\n\t */\n\tfree_over_amount_cents?: number | null\n\t/** \n\t * Send this attribute if you want to compare the free over amount with order's subtotal (excluding discounts, if any).\n\t * @example ```true```\n\t */\n\tuse_subtotal?: boolean | null\n\t/** \n\t * The minimum weight for which this shipping method is available.\n\t * @example ```3```\n\t */\n\tmin_weight?: number | null\n\t/** \n\t * The maximum weight for which this shipping method is available.\n\t * @example ```300```\n\t */\n\tmax_weight?: number | null\n\t/** \n\t * The unit of weight. One of 'gr', 'oz', or 'lb'.\n\t * @example ```\"gr\"```\n\t */\n\tunit_of_weight?: 'gr' | 'oz' | 'lb' | null\n\t/** \n\t * The freight tax identifier code, specific for a particular tax calculator.\n\t * @example ```\"FR010000\"```\n\t */\n\ttax_code?: string | null\n\t/** \n\t * Send this attribute if you want to mark this resource as disabled.\n\t * @example ```true```\n\t */\n\t_disable?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this resource as enabled.\n\t * @example ```true```\n\t */\n\t_enable?: boolean | null\n\t/** \n\t * Send this attribute if you want to reset the circuit breaker associated to this resource to 'closed' state and zero failures count. Cannot be passed by sales channels.\n\t * @example ```true```\n\t */\n\t_reset_circuit?: boolean | null\n\n\tmarket?: MarketRel | null\n\tshipping_zone?: ShippingZoneRel | null\n\tshipping_category?: ShippingCategoryRel | null\n\tstock_location?: StockLocationRel | null\n\tshipping_method_tiers?: ShippingMethodTierRel[] | null\n\n}\n\n\nclass ShippingMethods extends ApiResource<ShippingMethod> {\n\n\tstatic readonly TYPE: ShippingMethodType = 'shipping_methods' as const\n\n\tasync create(resource: ShippingMethodCreate, params?: QueryParamsRetrieve<ShippingMethod>, options?: ResourcesConfig): Promise<ShippingMethod> {\n\t\treturn this.resources.create<ShippingMethodCreate, ShippingMethod>({ ...resource, type: ShippingMethods.TYPE }, params, options)\n\t}\n\n\tasync update(resource: ShippingMethodUpdate, params?: QueryParamsRetrieve<ShippingMethod>, options?: ResourcesConfig): Promise<ShippingMethod> {\n\t\treturn this.resources.update<ShippingMethodUpdate, ShippingMethod>({ ...resource, type: ShippingMethods.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: ShippingMethods.TYPE } : id, options)\n\t}\n\n\tasync market(shippingMethodId: string | ShippingMethod, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\tconst _shippingMethodId = (shippingMethodId as ShippingMethod).id || shippingMethodId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `shipping_methods/${_shippingMethodId}/market`, params, options) as unknown as Market\n\t}\n\n\tasync shipping_zone(shippingMethodId: string | ShippingMethod, params?: QueryParamsRetrieve<ShippingZone>, options?: ResourcesConfig): Promise<ShippingZone> {\n\t\tconst _shippingMethodId = (shippingMethodId as ShippingMethod).id || shippingMethodId as string\n\t\treturn this.resources.fetch<ShippingZone>({ type: 'shipping_zones' }, `shipping_methods/${_shippingMethodId}/shipping_zone`, params, options) as unknown as ShippingZone\n\t}\n\n\tasync shipping_category(shippingMethodId: string | ShippingMethod, params?: QueryParamsRetrieve<ShippingCategory>, options?: ResourcesConfig): Promise<ShippingCategory> {\n\t\tconst _shippingMethodId = (shippingMethodId as ShippingMethod).id || shippingMethodId as string\n\t\treturn this.resources.fetch<ShippingCategory>({ type: 'shipping_categories' }, `shipping_methods/${_shippingMethodId}/shipping_category`, params, options) as unknown as ShippingCategory\n\t}\n\n\tasync stock_location(shippingMethodId: string | ShippingMethod, params?: QueryParamsRetrieve<StockLocation>, options?: ResourcesConfig): Promise<StockLocation> {\n\t\tconst _shippingMethodId = (shippingMethodId as ShippingMethod).id || shippingMethodId as string\n\t\treturn this.resources.fetch<StockLocation>({ type: 'stock_locations' }, `shipping_methods/${_shippingMethodId}/stock_location`, params, options) as unknown as StockLocation\n\t}\n\n\tasync delivery_lead_time_for_shipment(shippingMethodId: string | ShippingMethod, params?: QueryParamsRetrieve<DeliveryLeadTime>, options?: ResourcesConfig): Promise<DeliveryLeadTime> {\n\t\tconst _shippingMethodId = (shippingMethodId as ShippingMethod).id || shippingMethodId as string\n\t\treturn this.resources.fetch<DeliveryLeadTime>({ type: 'delivery_lead_times' }, `shipping_methods/${_shippingMethodId}/delivery_lead_time_for_shipment`, params, options) as unknown as DeliveryLeadTime\n\t}\n\n\tasync shipping_method_tiers(shippingMethodId: string | ShippingMethod, params?: QueryParamsList<ShippingMethodTier>, options?: ResourcesConfig): Promise<ListResponse<ShippingMethodTier>> {\n\t\tconst _shippingMethodId = (shippingMethodId as ShippingMethod).id || shippingMethodId as string\n\t\treturn this.resources.fetch<ShippingMethodTier>({ type: 'shipping_method_tiers' }, `shipping_methods/${_shippingMethodId}/shipping_method_tiers`, params, options) as unknown as ListResponse<ShippingMethodTier>\n\t}\n\n\tasync shipping_weight_tiers(shippingMethodId: string | ShippingMethod, params?: QueryParamsList<ShippingWeightTier>, options?: ResourcesConfig): Promise<ListResponse<ShippingWeightTier>> {\n\t\tconst _shippingMethodId = (shippingMethodId as ShippingMethod).id || shippingMethodId as string\n\t\treturn this.resources.fetch<ShippingWeightTier>({ type: 'shipping_weight_tiers' }, `shipping_methods/${_shippingMethodId}/shipping_weight_tiers`, params, options) as unknown as ListResponse<ShippingWeightTier>\n\t}\n\n\tasync attachments(shippingMethodId: string | ShippingMethod, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _shippingMethodId = (shippingMethodId as ShippingMethod).id || shippingMethodId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `shipping_methods/${_shippingMethodId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync notifications(shippingMethodId: string | ShippingMethod, params?: QueryParamsList<Notification>, options?: ResourcesConfig): Promise<ListResponse<Notification>> {\n\t\tconst _shippingMethodId = (shippingMethodId as ShippingMethod).id || shippingMethodId as string\n\t\treturn this.resources.fetch<Notification>({ type: 'notifications' }, `shipping_methods/${_shippingMethodId}/notifications`, params, options) as unknown as ListResponse<Notification>\n\t}\n\n\tasync versions(shippingMethodId: string | ShippingMethod, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _shippingMethodId = (shippingMethodId as ShippingMethod).id || shippingMethodId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `shipping_methods/${_shippingMethodId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _disable(id: string | ShippingMethod, params?: QueryParamsRetrieve<ShippingMethod>, options?: ResourcesConfig): Promise<ShippingMethod> {\n\t\treturn this.resources.update<ShippingMethodUpdate, ShippingMethod>({ id: (typeof id === 'string')? id: id.id, type: ShippingMethods.TYPE, _disable: true }, params, options)\n\t}\n\n\tasync _enable(id: string | ShippingMethod, params?: QueryParamsRetrieve<ShippingMethod>, options?: ResourcesConfig): Promise<ShippingMethod> {\n\t\treturn this.resources.update<ShippingMethodUpdate, ShippingMethod>({ id: (typeof id === 'string')? id: id.id, type: ShippingMethods.TYPE, _enable: true }, params, options)\n\t}\n\n\tasync _reset_circuit(id: string | ShippingMethod, params?: QueryParamsRetrieve<ShippingMethod>, options?: ResourcesConfig): Promise<ShippingMethod> {\n\t\treturn this.resources.update<ShippingMethodUpdate, ShippingMethod>({ id: (typeof id === 'string')? id: id.id, type: ShippingMethods.TYPE, _reset_circuit: true }, params, options)\n\t}\n\n\n\tisShippingMethod(resource: any): resource is ShippingMethod {\n\t\treturn resource.type && (resource.type === ShippingMethods.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): ShippingMethodRel {\n\t\treturn super.relationshipOneToOne<ShippingMethodRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): ShippingMethodRel[] {\n\t\treturn super.relationshipOneToMany<ShippingMethodRel>(...ids)\n\t}\n\n\n\ttype(): ShippingMethodType {\n\t\treturn ShippingMethods.TYPE\n\t}\n\n}\n\n\nconst instance = new ShippingMethods()\nexport default instance\n\nexport type { ShippingMethods, ShippingMethod, ShippingMethodCreate, ShippingMethodUpdate, ShippingMethodType }\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/resources/shipping_weight_tiers.ts"],"names":["ApiResource"],"mappings":";;;;AAqGA,MAAM,4BAA4BA,oBAAgC,CAAA;AAAA,EAEjE,OAAgB,IAA+B,GAAA,uBAAA;AAAA,EAE/C,MAAM,MAAA,CAAO,QAAoC,EAAA,MAAA,EAAkD,OAAwD,EAAA;AAC1J,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAqD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,mBAAoB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC5I,EAEA,MAAM,MAAA,C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,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_weight_tiers.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 { ShippingMethod, ShippingMethodType } from './shipping_methods'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype ShippingWeightTierType = 'shipping_weight_tiers'\ntype ShippingWeightTierRel = ResourceRel & { type: ShippingWeightTierType }\ntype ShippingMethodRel = ResourceRel & { type: ShippingMethodType }\n\n\nexport type ShippingWeightTierSort = Pick<ShippingWeightTier, 'id' | 'name' | 'up_to' | 'price_amount_cents'> & ResourceSort\n// export type ShippingWeightTierFilter = Pick<ShippingWeightTier, 'id' | 'name' | 'up_to' | 'price_amount_cents'> & ResourceFilter\n\n\ninterface ShippingWeightTier extends Resource {\n\t\n\treadonly type: ShippingWeightTierType\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\ninterface ShippingWeightTierCreate extends ResourceCreate {\n\t\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\n\tshipping_method: ShippingMethodRel\n\n}\n\n\ninterface ShippingWeightTierUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The shipping method tier's name.\n\t * @example ```\"Light shipping under 3kg\"```\n\t */\n\tname?: string | null\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 | null\n\n\tshipping_method?: ShippingMethodRel | null\n\n}\n\n\nclass ShippingWeightTiers extends ApiResource<ShippingWeightTier> {\n\n\tstatic readonly TYPE: ShippingWeightTierType = 'shipping_weight_tiers' as const\n\n\tasync create(resource: ShippingWeightTierCreate, params?: QueryParamsRetrieve<ShippingWeightTier>, options?: ResourcesConfig): Promise<ShippingWeightTier> {\n\t\treturn this.resources.create<ShippingWeightTierCreate, ShippingWeightTier>({ ...resource, type: ShippingWeightTiers.TYPE }, params, options)\n\t}\n\n\tasync update(resource: ShippingWeightTierUpdate, params?: QueryParamsRetrieve<ShippingWeightTier>, options?: ResourcesConfig): Promise<ShippingWeightTier> {\n\t\treturn this.resources.update<ShippingWeightTierUpdate, ShippingWeightTier>({ ...resource, type: ShippingWeightTiers.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: ShippingWeightTiers.TYPE } : id, options)\n\t}\n\n\tasync shipping_method(shippingWeightTierId: string | ShippingWeightTier, params?: QueryParamsRetrieve<ShippingMethod>, options?: ResourcesConfig): Promise<ShippingMethod> {\n\t\tconst _shippingWeightTierId = (shippingWeightTierId as ShippingWeightTier).id || shippingWeightTierId as string\n\t\treturn this.resources.fetch<ShippingMethod>({ type: 'shipping_methods' }, `shipping_weight_tiers/${_shippingWeightTierId}/shipping_method`, params, options) as unknown as ShippingMethod\n\t}\n\n\tasync attachments(shippingWeightTierId: string | ShippingWeightTier, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _shippingWeightTierId = (shippingWeightTierId as ShippingWeightTier).id || shippingWeightTierId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `shipping_weight_tiers/${_shippingWeightTierId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(shippingWeightTierId: string | ShippingWeightTier, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _shippingWeightTierId = (shippingWeightTierId as ShippingWeightTier).id || shippingWeightTierId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `shipping_weight_tiers/${_shippingWeightTierId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisShippingWeightTier(resource: any): resource is ShippingWeightTier {\n\t\treturn resource.type && (resource.type === ShippingWeightTiers.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): ShippingWeightTierRel {\n\t\treturn super.relationshipOneToOne<ShippingWeightTierRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): ShippingWeightTierRel[] {\n\t\treturn super.relationshipOneToMany<ShippingWeightTierRel>(...ids)\n\t}\n\n\n\ttype(): ShippingWeightTierType {\n\t\treturn ShippingWeightTiers.TYPE\n\t}\n\n}\n\n\nconst instance = new ShippingWeightTiers()\nexport default instance\n\nexport type { ShippingWeightTier, ShippingWeightTierCreate, ShippingWeightTierUpdate, ShippingWeightTierType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/shipping_weight_tiers.ts"],"names":["ApiResource"],"mappings":";;;;AAqGA,MAAM,4BAA4BA,oBAAgC,CAAA;AAAA,EAEjE,OAAgB,IAA+B,GAAA,uBAAA;AAAA,EAE/C,MAAM,MAAA,CAAO,QAAoC,EAAA,MAAA,EAAkD,OAAwD,EAAA;AAC1J,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAqD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,mBAAoB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC5I,EAEA,MAAM,MAAA,CAAO,QAAoC,EAAA,MAAA,EAAkD,OAAwD,EAAA;AAC1J,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAqD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,mBAAoB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC5I,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,mBAAA,CAAoB,IAAK,EAAA,GAAI,IAAI,OAAO,CAAA;AAAA;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,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_weight_tiers.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 { ShippingMethod, ShippingMethodType } from './shipping_methods'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype ShippingWeightTierType = 'shipping_weight_tiers'\ntype ShippingWeightTierRel = ResourceRel & { type: ShippingWeightTierType }\ntype ShippingMethodRel = ResourceRel & { type: ShippingMethodType }\n\n\nexport type ShippingWeightTierSort = Pick<ShippingWeightTier, 'id' | 'name' | 'up_to' | 'price_amount_cents'> & ResourceSort\n// export type ShippingWeightTierFilter = Pick<ShippingWeightTier, 'id' | 'name' | 'up_to' | 'price_amount_cents'> & ResourceFilter\n\n\ninterface ShippingWeightTier extends Resource {\n\t\n\treadonly type: ShippingWeightTierType\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\ninterface ShippingWeightTierCreate extends ResourceCreate {\n\t\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\n\tshipping_method: ShippingMethodRel\n\n}\n\n\ninterface ShippingWeightTierUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The shipping method tier's name.\n\t * @example ```\"Light shipping under 3kg\"```\n\t */\n\tname?: string | null\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 | null\n\n\tshipping_method?: ShippingMethodRel | null\n\n}\n\n\nclass ShippingWeightTiers extends ApiResource<ShippingWeightTier> {\n\n\tstatic readonly TYPE: ShippingWeightTierType = 'shipping_weight_tiers' as const\n\n\tasync create(resource: ShippingWeightTierCreate, params?: QueryParamsRetrieve<ShippingWeightTier>, options?: ResourcesConfig): Promise<ShippingWeightTier> {\n\t\treturn this.resources.create<ShippingWeightTierCreate, ShippingWeightTier>({ ...resource, type: ShippingWeightTiers.TYPE }, params, options)\n\t}\n\n\tasync update(resource: ShippingWeightTierUpdate, params?: QueryParamsRetrieve<ShippingWeightTier>, options?: ResourcesConfig): Promise<ShippingWeightTier> {\n\t\treturn this.resources.update<ShippingWeightTierUpdate, ShippingWeightTier>({ ...resource, type: ShippingWeightTiers.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: ShippingWeightTiers.TYPE } : id, options)\n\t}\n\n\tasync shipping_method(shippingWeightTierId: string | ShippingWeightTier, params?: QueryParamsRetrieve<ShippingMethod>, options?: ResourcesConfig): Promise<ShippingMethod> {\n\t\tconst _shippingWeightTierId = (shippingWeightTierId as ShippingWeightTier).id || shippingWeightTierId as string\n\t\treturn this.resources.fetch<ShippingMethod>({ type: 'shipping_methods' }, `shipping_weight_tiers/${_shippingWeightTierId}/shipping_method`, params, options) as unknown as ShippingMethod\n\t}\n\n\tasync attachments(shippingWeightTierId: string | ShippingWeightTier, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _shippingWeightTierId = (shippingWeightTierId as ShippingWeightTier).id || shippingWeightTierId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `shipping_weight_tiers/${_shippingWeightTierId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(shippingWeightTierId: string | ShippingWeightTier, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _shippingWeightTierId = (shippingWeightTierId as ShippingWeightTier).id || shippingWeightTierId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `shipping_weight_tiers/${_shippingWeightTierId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisShippingWeightTier(resource: any): resource is ShippingWeightTier {\n\t\treturn resource.type && (resource.type === ShippingWeightTiers.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): ShippingWeightTierRel {\n\t\treturn super.relationshipOneToOne<ShippingWeightTierRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): ShippingWeightTierRel[] {\n\t\treturn super.relationshipOneToMany<ShippingWeightTierRel>(...ids)\n\t}\n\n\n\ttype(): ShippingWeightTierType {\n\t\treturn ShippingWeightTiers.TYPE\n\t}\n\n}\n\n\nconst instance = new ShippingWeightTiers()\nexport default instance\n\nexport type { ShippingWeightTiers, ShippingWeightTier, ShippingWeightTierCreate, ShippingWeightTierUpdate, ShippingWeightTierType }\n"]}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { jK as ShippingWeightTier, jL as ShippingWeightTierCreate, jN as ShippingWeightTierSort, m5 as ShippingWeightTierType, jM as ShippingWeightTierUpdate, cY as ShippingWeightTiers, cX 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 { jK as ShippingWeightTier, jL as ShippingWeightTierCreate, jN as ShippingWeightTierSort, m5 as ShippingWeightTierType, jM as ShippingWeightTierUpdate, cY as ShippingWeightTiers, cX 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_weight_tiers.ts"],"names":[],"mappings":";;AAqGA,MAAM,4BAA4B,WAAgC,CAAA;AAAA,EAEjE,OAAgB,IAA+B,GAAA,uBAAA;AAAA,EAE/C,MAAM,MAAA,CAAO,QAAoC,EAAA,MAAA,EAAkD,OAAwD,EAAA;AAC1J,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAqD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,mBAAoB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC5I,EAEA,MAAM,MAAA,CAAO,QAAoC,EAAA,MAAA,EAAkD,OAAwD,EAAA;AAC1J,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAqD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,mBAAoB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC5I,EAEA,MAAM,MAAO,CAAA,EAAA,EAAyB,OAA0C,EAAA;AAC/E,IAAA,MAAM,IAAK,CAAA,SAAA,CAAU,MAAQ,CAAA,OAAO,EAAO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C,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_weight_tiers.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 { ShippingMethod, ShippingMethodType } from './shipping_methods'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype ShippingWeightTierType = 'shipping_weight_tiers'\ntype ShippingWeightTierRel = ResourceRel & { type: ShippingWeightTierType }\ntype ShippingMethodRel = ResourceRel & { type: ShippingMethodType }\n\n\nexport type ShippingWeightTierSort = Pick<ShippingWeightTier, 'id' | 'name' | 'up_to' | 'price_amount_cents'> & ResourceSort\n// export type ShippingWeightTierFilter = Pick<ShippingWeightTier, 'id' | 'name' | 'up_to' | 'price_amount_cents'> & ResourceFilter\n\n\ninterface ShippingWeightTier extends Resource {\n\t\n\treadonly type: ShippingWeightTierType\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\ninterface ShippingWeightTierCreate extends ResourceCreate {\n\t\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\n\tshipping_method: ShippingMethodRel\n\n}\n\n\ninterface ShippingWeightTierUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The shipping method tier's name.\n\t * @example ```\"Light shipping under 3kg\"```\n\t */\n\tname?: string | null\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 | null\n\n\tshipping_method?: ShippingMethodRel | null\n\n}\n\n\nclass ShippingWeightTiers extends ApiResource<ShippingWeightTier> {\n\n\tstatic readonly TYPE: ShippingWeightTierType = 'shipping_weight_tiers' as const\n\n\tasync create(resource: ShippingWeightTierCreate, params?: QueryParamsRetrieve<ShippingWeightTier>, options?: ResourcesConfig): Promise<ShippingWeightTier> {\n\t\treturn this.resources.create<ShippingWeightTierCreate, ShippingWeightTier>({ ...resource, type: ShippingWeightTiers.TYPE }, params, options)\n\t}\n\n\tasync update(resource: ShippingWeightTierUpdate, params?: QueryParamsRetrieve<ShippingWeightTier>, options?: ResourcesConfig): Promise<ShippingWeightTier> {\n\t\treturn this.resources.update<ShippingWeightTierUpdate, ShippingWeightTier>({ ...resource, type: ShippingWeightTiers.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: ShippingWeightTiers.TYPE } : id, options)\n\t}\n\n\tasync shipping_method(shippingWeightTierId: string | ShippingWeightTier, params?: QueryParamsRetrieve<ShippingMethod>, options?: ResourcesConfig): Promise<ShippingMethod> {\n\t\tconst _shippingWeightTierId = (shippingWeightTierId as ShippingWeightTier).id || shippingWeightTierId as string\n\t\treturn this.resources.fetch<ShippingMethod>({ type: 'shipping_methods' }, `shipping_weight_tiers/${_shippingWeightTierId}/shipping_method`, params, options) as unknown as ShippingMethod\n\t}\n\n\tasync attachments(shippingWeightTierId: string | ShippingWeightTier, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _shippingWeightTierId = (shippingWeightTierId as ShippingWeightTier).id || shippingWeightTierId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `shipping_weight_tiers/${_shippingWeightTierId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(shippingWeightTierId: string | ShippingWeightTier, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _shippingWeightTierId = (shippingWeightTierId as ShippingWeightTier).id || shippingWeightTierId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `shipping_weight_tiers/${_shippingWeightTierId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisShippingWeightTier(resource: any): resource is ShippingWeightTier {\n\t\treturn resource.type && (resource.type === ShippingWeightTiers.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): ShippingWeightTierRel {\n\t\treturn super.relationshipOneToOne<ShippingWeightTierRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): ShippingWeightTierRel[] {\n\t\treturn super.relationshipOneToMany<ShippingWeightTierRel>(...ids)\n\t}\n\n\n\ttype(): ShippingWeightTierType {\n\t\treturn ShippingWeightTiers.TYPE\n\t}\n\n}\n\n\nconst instance = new ShippingWeightTiers()\nexport default instance\n\nexport type { Sh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AAY,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_weight_tiers.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 { ShippingMethod, ShippingMethodType } from './shipping_methods'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype ShippingWeightTierType = 'shipping_weight_tiers'\ntype ShippingWeightTierRel = ResourceRel & { type: ShippingWeightTierType }\ntype ShippingMethodRel = ResourceRel & { type: ShippingMethodType }\n\n\nexport type ShippingWeightTierSort = Pick<ShippingWeightTier, 'id' | 'name' | 'up_to' | 'price_amount_cents'> & ResourceSort\n// export type ShippingWeightTierFilter = Pick<ShippingWeightTier, 'id' | 'name' | 'up_to' | 'price_amount_cents'> & ResourceFilter\n\n\ninterface ShippingWeightTier extends Resource {\n\t\n\treadonly type: ShippingWeightTierType\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\ninterface ShippingWeightTierCreate extends ResourceCreate {\n\t\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\n\tshipping_method: ShippingMethodRel\n\n}\n\n\ninterface ShippingWeightTierUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The shipping method tier's name.\n\t * @example ```\"Light shipping under 3kg\"```\n\t */\n\tname?: string | null\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 | null\n\n\tshipping_method?: ShippingMethodRel | null\n\n}\n\n\nclass ShippingWeightTiers extends ApiResource<ShippingWeightTier> {\n\n\tstatic readonly TYPE: ShippingWeightTierType = 'shipping_weight_tiers' as const\n\n\tasync create(resource: ShippingWeightTierCreate, params?: QueryParamsRetrieve<ShippingWeightTier>, options?: ResourcesConfig): Promise<ShippingWeightTier> {\n\t\treturn this.resources.create<ShippingWeightTierCreate, ShippingWeightTier>({ ...resource, type: ShippingWeightTiers.TYPE }, params, options)\n\t}\n\n\tasync update(resource: ShippingWeightTierUpdate, params?: QueryParamsRetrieve<ShippingWeightTier>, options?: ResourcesConfig): Promise<ShippingWeightTier> {\n\t\treturn this.resources.update<ShippingWeightTierUpdate, ShippingWeightTier>({ ...resource, type: ShippingWeightTiers.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: ShippingWeightTiers.TYPE } : id, options)\n\t}\n\n\tasync shipping_method(shippingWeightTierId: string | ShippingWeightTier, params?: QueryParamsRetrieve<ShippingMethod>, options?: ResourcesConfig): Promise<ShippingMethod> {\n\t\tconst _shippingWeightTierId = (shippingWeightTierId as ShippingWeightTier).id || shippingWeightTierId as string\n\t\treturn this.resources.fetch<ShippingMethod>({ type: 'shipping_methods' }, `shipping_weight_tiers/${_shippingWeightTierId}/shipping_method`, params, options) as unknown as ShippingMethod\n\t}\n\n\tasync attachments(shippingWeightTierId: string | ShippingWeightTier, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _shippingWeightTierId = (shippingWeightTierId as ShippingWeightTier).id || shippingWeightTierId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `shipping_weight_tiers/${_shippingWeightTierId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(shippingWeightTierId: string | ShippingWeightTier, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _shippingWeightTierId = (shippingWeightTierId as ShippingWeightTier).id || shippingWeightTierId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `shipping_weight_tiers/${_shippingWeightTierId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisShippingWeightTier(resource: any): resource is ShippingWeightTier {\n\t\treturn resource.type && (resource.type === ShippingWeightTiers.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): ShippingWeightTierRel {\n\t\treturn super.relationshipOneToOne<ShippingWeightTierRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): ShippingWeightTierRel[] {\n\t\treturn super.relationshipOneToMany<ShippingWeightTierRel>(...ids)\n\t}\n\n\n\ttype(): ShippingWeightTierType {\n\t\treturn ShippingWeightTiers.TYPE\n\t}\n\n}\n\n\nconst instance = new ShippingWeightTiers()\nexport default instance\n\nexport type { ShippingWeightTiers, ShippingWeightTier, ShippingWeightTierCreate, ShippingWeightTierUpdate, ShippingWeightTierType }\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/resources/shipping_zones.ts"],"names":["ApiResource"],"mappings":";;;;AAgJA,MAAM,sBAAsBA,oBAA0B,CAAA;AAAA,EAErD,OAAgB,IAAyB,GAAA,gBAAA;AAAA,EAEzC,MAAM,MAAA,CAAO,QAA8B,EAAA,MAAA,EAA4C,OAAkD,EAAA;AACxI,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAyC,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,aAAc,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,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D,IAAO,OAAA,KAAA,CAAM,qBAAsC,EAAE,CAAA;AAAA;AACtD,EAEA,sBAAsB,GAAkC,EAAA;AACvD,IAAO,OAAA,KAAA,CAAM,qBAAuC,CAAA,GAAG,GAAG,CAAA;AAAA;AAC3D,EAGA,IAAyB,GAAA;AACxB,IAAA,OAAO,aAAc,CAAA,IAAA;AAAA;AAGvB;AAGA,MAAM,QAAA,GAAW,IAAI,aAAc,EAAA;AACnC,IAAO,sBAAQ,GAAA","file":"shipping_zones.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 { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype ShippingZoneType = 'shipping_zones'\ntype ShippingZoneRel = ResourceRel & { type: ShippingZoneType }\n\n\nexport type ShippingZoneSort = Pick<ShippingZone, 'id' | 'name'> & ResourceSort\n// export type ShippingZoneFilter = Pick<ShippingZone, 'id' | 'name'> & ResourceFilter\n\n\ninterface ShippingZone extends Resource {\n\t\n\treadonly type: ShippingZoneType\n\n\t/** \n\t * The shipping zone's internal name.\n\t * @example ```\"Europe (main countries)\"```\n\t */\n\tname: string\n\t/** \n\t * The regex that will be evaluated to match the shipping address country code, max size is 5000.\n\t * @example ```\"AT|BE|BG|CZ|DK|EE|DE|HU|LV|LT\"```\n\t */\n\tcountry_code_regex?: string | null\n\t/** \n\t * The regex that will be evaluated as negative match for the shipping address country code, max size is 5000.\n\t * @example ```\"AT|BE|BG|CZ|DK|EE|DE\"```\n\t */\n\tnot_country_code_regex?: string | null\n\t/** \n\t * The regex that will be evaluated to match the shipping address state code, max size is 5000.\n\t * @example ```\"A[KLRZ]|C[AOT]|D[CE]|FL\"```\n\t */\n\tstate_code_regex?: string | null\n\t/** \n\t * The regex that will be evaluated as negative match for the shipping address state code, max size is 5000.\n\t * @example ```\"A[KLRZ]|C[AOT]\"```\n\t */\n\tnot_state_code_regex?: string | null\n\t/** \n\t * The regex that will be evaluated to match the shipping address zip code, max size is 5000.\n\t * @example ```\"(?i)(JE1|JE2|JE3|JE4|JE5)\"```\n\t */\n\tzip_code_regex?: string | null\n\t/** \n\t * The regex that will be evaluated as negative match for the shipping zip country code, max size is 5000.\n\t * @example ```\"(?i)(JE1|JE2|JE3)\"```\n\t */\n\tnot_zip_code_regex?: string | null\n\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface ShippingZoneCreate extends ResourceCreate {\n\t\n\t/** \n\t * The shipping zone's internal name.\n\t * @example ```\"Europe (main countries)\"```\n\t */\n\tname: string\n\t/** \n\t * The regex that will be evaluated to match the shipping address country code, max size is 5000.\n\t * @example ```\"AT|BE|BG|CZ|DK|EE|DE|HU|LV|LT\"```\n\t */\n\tcountry_code_regex?: string | null\n\t/** \n\t * The regex that will be evaluated as negative match for the shipping address country code, max size is 5000.\n\t * @example ```\"AT|BE|BG|CZ|DK|EE|DE\"```\n\t */\n\tnot_country_code_regex?: string | null\n\t/** \n\t * The regex that will be evaluated to match the shipping address state code, max size is 5000.\n\t * @example ```\"A[KLRZ]|C[AOT]|D[CE]|FL\"```\n\t */\n\tstate_code_regex?: string | null\n\t/** \n\t * The regex that will be evaluated as negative match for the shipping address state code, max size is 5000.\n\t * @example ```\"A[KLRZ]|C[AOT]\"```\n\t */\n\tnot_state_code_regex?: string | null\n\t/** \n\t * The regex that will be evaluated to match the shipping address zip code, max size is 5000.\n\t * @example ```\"(?i)(JE1|JE2|JE3|JE4|JE5)\"```\n\t */\n\tzip_code_regex?: string | null\n\t/** \n\t * The regex that will be evaluated as negative match for the shipping zip country code, max size is 5000.\n\t * @example ```\"(?i)(JE1|JE2|JE3)\"```\n\t */\n\tnot_zip_code_regex?: string | null\n\t\n}\n\n\ninterface ShippingZoneUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The shipping zone's internal name.\n\t * @example ```\"Europe (main countries)\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The regex that will be evaluated to match the shipping address country code, max size is 5000.\n\t * @example ```\"AT|BE|BG|CZ|DK|EE|DE|HU|LV|LT\"```\n\t */\n\tcountry_code_regex?: string | null\n\t/** \n\t * The regex that will be evaluated as negative match for the shipping address country code, max size is 5000.\n\t * @example ```\"AT|BE|BG|CZ|DK|EE|DE\"```\n\t */\n\tnot_country_code_regex?: string | null\n\t/** \n\t * The regex that will be evaluated to match the shipping address state code, max size is 5000.\n\t * @example ```\"A[KLRZ]|C[AOT]|D[CE]|FL\"```\n\t */\n\tstate_code_regex?: string | null\n\t/** \n\t * The regex that will be evaluated as negative match for the shipping address state code, max size is 5000.\n\t * @example ```\"A[KLRZ]|C[AOT]\"```\n\t */\n\tnot_state_code_regex?: string | null\n\t/** \n\t * The regex that will be evaluated to match the shipping address zip code, max size is 5000.\n\t * @example ```\"(?i)(JE1|JE2|JE3|JE4|JE5)\"```\n\t */\n\tzip_code_regex?: string | null\n\t/** \n\t * The regex that will be evaluated as negative match for the shipping zip country code, max size is 5000.\n\t * @example ```\"(?i)(JE1|JE2|JE3)\"```\n\t */\n\tnot_zip_code_regex?: string | null\n\t\n}\n\n\nclass ShippingZones extends ApiResource<ShippingZone> {\n\n\tstatic readonly TYPE: ShippingZoneType = 'shipping_zones' as const\n\n\tasync create(resource: ShippingZoneCreate, params?: QueryParamsRetrieve<ShippingZone>, options?: ResourcesConfig): Promise<ShippingZone> {\n\t\treturn this.resources.create<ShippingZoneCreate, ShippingZone>({ ...resource, type: ShippingZones.TYPE }, params, options)\n\t}\n\n\tasync update(resource: ShippingZoneUpdate, params?: QueryParamsRetrieve<ShippingZone>, options?: ResourcesConfig): Promise<ShippingZone> {\n\t\treturn this.resources.update<ShippingZoneUpdate, ShippingZone>({ ...resource, type: ShippingZones.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: ShippingZones.TYPE } : id, options)\n\t}\n\n\tasync attachments(shippingZoneId: string | ShippingZone, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _shippingZoneId = (shippingZoneId as ShippingZone).id || shippingZoneId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `shipping_zones/${_shippingZoneId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(shippingZoneId: string | ShippingZone, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _shippingZoneId = (shippingZoneId as ShippingZone).id || shippingZoneId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `shipping_zones/${_shippingZoneId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisShippingZone(resource: any): resource is ShippingZone {\n\t\treturn resource.type && (resource.type === ShippingZones.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): ShippingZoneRel {\n\t\treturn super.relationshipOneToOne<ShippingZoneRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): ShippingZoneRel[] {\n\t\treturn super.relationshipOneToMany<ShippingZoneRel>(...ids)\n\t}\n\n\n\ttype(): ShippingZoneType {\n\t\treturn ShippingZones.TYPE\n\t}\n\n}\n\n\nconst instance = new ShippingZones()\nexport default instance\n\nexport type { ShippingZone, ShippingZoneCreate, ShippingZoneUpdate, ShippingZoneType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/shipping_zones.ts"],"names":["ApiResource"],"mappings":";;;;AAgJA,MAAM,sBAAsBA,oBAA0B,CAAA;AAAA,EAErD,OAAgB,IAAyB,GAAA,gBAAA;AAAA,EAEzC,MAAM,MAAA,CAAO,QAA8B,EAAA,MAAA,EAA4C,OAAkD,EAAA;AACxI,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAyC,EAAE,GAAG,QAAU,EAAA,IA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AAA,IAAA;AAAA;AAC1D,EAGA,aAAa,EAAiD,EAAA;AAC7D,IAAO,OAAA,KAAA,CAAM,qBAAsC,EAAE,CAAA;AAAA;AACtD,EAEA,sBAAsB,GAAkC,EAAA;AACvD,IAAO,OAAA,KAAA,CAAM,qBAAuC,CAAA,GAAG,GAAG,CAAA;AAAA;AAC3D,EAGA,IAAyB,GAAA;AACxB,IAAA,OAAO,aAAc,CAAA,IAAA;AAAA;AAGvB;AAGA,MAAM,QAAA,GAAW,IAAI,aAAc,EAAA;AACnC,IAAO,sBAAQ,GAAA","file":"shipping_zones.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 { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype ShippingZoneType = 'shipping_zones'\ntype ShippingZoneRel = ResourceRel & { type: ShippingZoneType }\n\n\nexport type ShippingZoneSort = Pick<ShippingZone, 'id' | 'name'> & ResourceSort\n// export type ShippingZoneFilter = Pick<ShippingZone, 'id' | 'name'> & ResourceFilter\n\n\ninterface ShippingZone extends Resource {\n\t\n\treadonly type: ShippingZoneType\n\n\t/** \n\t * The shipping zone's internal name.\n\t * @example ```\"Europe (main countries)\"```\n\t */\n\tname: string\n\t/** \n\t * The regex that will be evaluated to match the shipping address country code, max size is 5000.\n\t * @example ```\"AT|BE|BG|CZ|DK|EE|DE|HU|LV|LT\"```\n\t */\n\tcountry_code_regex?: string | null\n\t/** \n\t * The regex that will be evaluated as negative match for the shipping address country code, max size is 5000.\n\t * @example ```\"AT|BE|BG|CZ|DK|EE|DE\"```\n\t */\n\tnot_country_code_regex?: string | null\n\t/** \n\t * The regex that will be evaluated to match the shipping address state code, max size is 5000.\n\t * @example ```\"A[KLRZ]|C[AOT]|D[CE]|FL\"```\n\t */\n\tstate_code_regex?: string | null\n\t/** \n\t * The regex that will be evaluated as negative match for the shipping address state code, max size is 5000.\n\t * @example ```\"A[KLRZ]|C[AOT]\"```\n\t */\n\tnot_state_code_regex?: string | null\n\t/** \n\t * The regex that will be evaluated to match the shipping address zip code, max size is 5000.\n\t * @example ```\"(?i)(JE1|JE2|JE3|JE4|JE5)\"```\n\t */\n\tzip_code_regex?: string | null\n\t/** \n\t * The regex that will be evaluated as negative match for the shipping zip country code, max size is 5000.\n\t * @example ```\"(?i)(JE1|JE2|JE3)\"```\n\t */\n\tnot_zip_code_regex?: string | null\n\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface ShippingZoneCreate extends ResourceCreate {\n\t\n\t/** \n\t * The shipping zone's internal name.\n\t * @example ```\"Europe (main countries)\"```\n\t */\n\tname: string\n\t/** \n\t * The regex that will be evaluated to match the shipping address country code, max size is 5000.\n\t * @example ```\"AT|BE|BG|CZ|DK|EE|DE|HU|LV|LT\"```\n\t */\n\tcountry_code_regex?: string | null\n\t/** \n\t * The regex that will be evaluated as negative match for the shipping address country code, max size is 5000.\n\t * @example ```\"AT|BE|BG|CZ|DK|EE|DE\"```\n\t */\n\tnot_country_code_regex?: string | null\n\t/** \n\t * The regex that will be evaluated to match the shipping address state code, max size is 5000.\n\t * @example ```\"A[KLRZ]|C[AOT]|D[CE]|FL\"```\n\t */\n\tstate_code_regex?: string | null\n\t/** \n\t * The regex that will be evaluated as negative match for the shipping address state code, max size is 5000.\n\t * @example ```\"A[KLRZ]|C[AOT]\"```\n\t */\n\tnot_state_code_regex?: string | null\n\t/** \n\t * The regex that will be evaluated to match the shipping address zip code, max size is 5000.\n\t * @example ```\"(?i)(JE1|JE2|JE3|JE4|JE5)\"```\n\t */\n\tzip_code_regex?: string | null\n\t/** \n\t * The regex that will be evaluated as negative match for the shipping zip country code, max size is 5000.\n\t * @example ```\"(?i)(JE1|JE2|JE3)\"```\n\t */\n\tnot_zip_code_regex?: string | null\n\t\n}\n\n\ninterface ShippingZoneUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The shipping zone's internal name.\n\t * @example ```\"Europe (main countries)\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The regex that will be evaluated to match the shipping address country code, max size is 5000.\n\t * @example ```\"AT|BE|BG|CZ|DK|EE|DE|HU|LV|LT\"```\n\t */\n\tcountry_code_regex?: string | null\n\t/** \n\t * The regex that will be evaluated as negative match for the shipping address country code, max size is 5000.\n\t * @example ```\"AT|BE|BG|CZ|DK|EE|DE\"```\n\t */\n\tnot_country_code_regex?: string | null\n\t/** \n\t * The regex that will be evaluated to match the shipping address state code, max size is 5000.\n\t * @example ```\"A[KLRZ]|C[AOT]|D[CE]|FL\"```\n\t */\n\tstate_code_regex?: string | null\n\t/** \n\t * The regex that will be evaluated as negative match for the shipping address state code, max size is 5000.\n\t * @example ```\"A[KLRZ]|C[AOT]\"```\n\t */\n\tnot_state_code_regex?: string | null\n\t/** \n\t * The regex that will be evaluated to match the shipping address zip code, max size is 5000.\n\t * @example ```\"(?i)(JE1|JE2|JE3|JE4|JE5)\"```\n\t */\n\tzip_code_regex?: string | null\n\t/** \n\t * The regex that will be evaluated as negative match for the shipping zip country code, max size is 5000.\n\t * @example ```\"(?i)(JE1|JE2|JE3)\"```\n\t */\n\tnot_zip_code_regex?: string | null\n\t\n}\n\n\nclass ShippingZones extends ApiResource<ShippingZone> {\n\n\tstatic readonly TYPE: ShippingZoneType = 'shipping_zones' as const\n\n\tasync create(resource: ShippingZoneCreate, params?: QueryParamsRetrieve<ShippingZone>, options?: ResourcesConfig): Promise<ShippingZone> {\n\t\treturn this.resources.create<ShippingZoneCreate, ShippingZone>({ ...resource, type: ShippingZones.TYPE }, params, options)\n\t}\n\n\tasync update(resource: ShippingZoneUpdate, params?: QueryParamsRetrieve<ShippingZone>, options?: ResourcesConfig): Promise<ShippingZone> {\n\t\treturn this.resources.update<ShippingZoneUpdate, ShippingZone>({ ...resource, type: ShippingZones.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: ShippingZones.TYPE } : id, options)\n\t}\n\n\tasync attachments(shippingZoneId: string | ShippingZone, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _shippingZoneId = (shippingZoneId as ShippingZone).id || shippingZoneId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `shipping_zones/${_shippingZoneId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(shippingZoneId: string | ShippingZone, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _shippingZoneId = (shippingZoneId as ShippingZone).id || shippingZoneId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `shipping_zones/${_shippingZoneId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisShippingZone(resource: any): resource is ShippingZone {\n\t\treturn resource.type && (resource.type === ShippingZones.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): ShippingZoneRel {\n\t\treturn super.relationshipOneToOne<ShippingZoneRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): ShippingZoneRel[] {\n\t\treturn super.relationshipOneToMany<ShippingZoneRel>(...ids)\n\t}\n\n\n\ttype(): ShippingZoneType {\n\t\treturn ShippingZones.TYPE\n\t}\n\n}\n\n\nconst instance = new ShippingZones()\nexport default instance\n\nexport type { ShippingZones, ShippingZone, ShippingZoneCreate, ShippingZoneUpdate, ShippingZoneType }\n"]}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { jO as ShippingZone, jP as ShippingZoneCreate, jR as ShippingZoneSort, m2 as ShippingZoneType, jQ as ShippingZoneUpdate, c_ as ShippingZones, cZ 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 { jO as ShippingZone, jP as ShippingZoneCreate, jR as ShippingZoneSort, m2 as ShippingZoneType, jQ as ShippingZoneUpdate, c_ as ShippingZones, cZ 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_zones.ts"],"names":[],"mappings":";;AAgJA,MAAM,sBAAsB,WAA0B,CAAA;AAAA,EAErD,OAAgB,IAAyB,GAAA,gBAAA;AAAA,EAEzC,MAAM,MAAA,CAAO,QAA8B,EAAA,MAAA,EAA4C,OAAkD,EAAA;AACxI,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAyC,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,aAAc,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC1H,EAEA,MAAM,MAAA,CAAO,QAA8B,EAAA,MAAA,EAA4C,OAAkD,EAAA;AACxI,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAyC,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,aAAc,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC1H,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,aAAA,CAAc,IAAK,EAAA,GAAI,IAAI,OAAO,CAAA;AAAA;AACrG,EAEA,MAAM,WAAA,CAAY,cAAuC,EAAA,MAAA,EAAsC,OAA8D,EAAA;AAC5J,IAAM,MAAA,eAAA,GAAmB,eAAgC,EAAM,IAAA,cAAA;AAC/D,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAkB,EAAE,IAAA,EAAM,aAAc,EAAA,EAAG,CAAkB,eAAA,EAAA,eAAe,CAAgB,YAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAClI,EAEA,MAAM,QAAA,CAAS,cAAuC,EAAA,MAAA,EAAmC,OAA2D,EAAA;AACnJ,IAAM,MAAA,eAAA,GAAmB,eAAgC,EAAM,IAAA,cAAA;AAC/D,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAe,EAAE,IAAA,EAAM,UAAW,EAAA,EAAG,CAAkB,eAAA,EAAA,eAAe,CAAa,SAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACzH,EAGA,eAAe,QAAyC,EAAA;AACvD,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,aAAc,CAAA,IAAA;AAAA;AAC1D,EAGA,aAAa,EAAiD,EAAA;AAC7D,IAAO,OAAA,KAAA,CAAM,qBAAsC,EAAE,CAAA;AAAA;AACtD,EAEA,sBAAsB,GAAkC,EAAA;AACvD,IAAO,OAAA,KAAA,CAAM,qBAAuC,CAAA,GAAG,GAAG,CAAA;AAAA;AAC3D,EAGA,IAAyB,GAAA;AACxB,IAAA,OAAO,aAAc,CAAA,IAAA;AAAA;AAGvB;AAGA,MAAM,QAAA,GAAW,IAAI,aAAc,EAAA;AACnC,IAAO,sBAAQ,GAAA","file":"shipping_zones.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 { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype ShippingZoneType = 'shipping_zones'\ntype ShippingZoneRel = ResourceRel & { type: ShippingZoneType }\n\n\nexport type ShippingZoneSort = Pick<ShippingZone, 'id' | 'name'> & ResourceSort\n// export type ShippingZoneFilter = Pick<ShippingZone, 'id' | 'name'> & ResourceFilter\n\n\ninterface ShippingZone extends Resource {\n\t\n\treadonly type: ShippingZoneType\n\n\t/** \n\t * The shipping zone's internal name.\n\t * @example ```\"Europe (main countries)\"```\n\t */\n\tname: string\n\t/** \n\t * The regex that will be evaluated to match the shipping address country code, max size is 5000.\n\t * @example ```\"AT|BE|BG|CZ|DK|EE|DE|HU|LV|LT\"```\n\t */\n\tcountry_code_regex?: string | null\n\t/** \n\t * The regex that will be evaluated as negative match for the shipping address country code, max size is 5000.\n\t * @example ```\"AT|BE|BG|CZ|DK|EE|DE\"```\n\t */\n\tnot_country_code_regex?: string | null\n\t/** \n\t * The regex that will be evaluated to match the shipping address state code, max size is 5000.\n\t * @example ```\"A[KLRZ]|C[AOT]|D[CE]|FL\"```\n\t */\n\tstate_code_regex?: string | null\n\t/** \n\t * The regex that will be evaluated as negative match for the shipping address state code, max size is 5000.\n\t * @example ```\"A[KLRZ]|C[AOT]\"```\n\t */\n\tnot_state_code_regex?: string | null\n\t/** \n\t * The regex that will be evaluated to match the shipping address zip code, max size is 5000.\n\t * @example ```\"(?i)(JE1|JE2|JE3|JE4|JE5)\"```\n\t */\n\tzip_code_regex?: string | null\n\t/** \n\t * The regex that will be evaluated as negative match for the shipping zip country code, max size is 5000.\n\t * @example ```\"(?i)(JE1|JE2|JE3)\"```\n\t */\n\tnot_zip_code_regex?: string | null\n\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface ShippingZoneCreate extends ResourceCreate {\n\t\n\t/** \n\t * The shipping zone's internal name.\n\t * @example ```\"Europe (main countries)\"```\n\t */\n\tname: string\n\t/** \n\t * The regex that will be evaluated to match the shipping address country code, max size is 5000.\n\t * @example ```\"AT|BE|BG|CZ|DK|EE|DE|HU|LV|LT\"```\n\t */\n\tcountry_code_regex?: string | null\n\t/** \n\t * The regex that will be evaluated as negative match for the shipping address country code, max size is 5000.\n\t * @example ```\"AT|BE|BG|CZ|DK|EE|DE\"```\n\t */\n\tnot_country_code_regex?: string | null\n\t/** \n\t * The regex that will be evaluated to match the shipping address state code, max size is 5000.\n\t * @example ```\"A[KLRZ]|C[AOT]|D[CE]|FL\"```\n\t */\n\tstate_code_regex?: string | null\n\t/** \n\t * The regex that will be evaluated as negative match for the shipping address state code, max size is 5000.\n\t * @example ```\"A[KLRZ]|C[AOT]\"```\n\t */\n\tnot_state_code_regex?: string | null\n\t/** \n\t * The regex that will be evaluated to match the shipping address zip code, max size is 5000.\n\t * @example ```\"(?i)(JE1|JE2|JE3|JE4|JE5)\"```\n\t */\n\tzip_code_regex?: string | null\n\t/** \n\t * The regex that will be evaluated as negative match for the shipping zip country code, max size is 5000.\n\t * @example ```\"(?i)(JE1|JE2|JE3)\"```\n\t */\n\tnot_zip_code_regex?: string | null\n\t\n}\n\n\ninterface ShippingZoneUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The shipping zone's internal name.\n\t * @example ```\"Europe (main countries)\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The regex that will be evaluated to match the shipping address country code, max size is 5000.\n\t * @example ```\"AT|BE|BG|CZ|DK|EE|DE|HU|LV|LT\"```\n\t */\n\tcountry_code_regex?: string | null\n\t/** \n\t * The regex that will be evaluated as negative match for the shipping address country code, max size is 5000.\n\t * @example ```\"AT|BE|BG|CZ|DK|EE|DE\"```\n\t */\n\tnot_country_code_regex?: string | null\n\t/** \n\t * The regex that will be evaluated to match the shipping address state code, max size is 5000.\n\t * @example ```\"A[KLRZ]|C[AOT]|D[CE]|FL\"```\n\t */\n\tstate_code_regex?: string | null\n\t/** \n\t * The regex that will be evaluated as negative match for the shipping address state code, max size is 5000.\n\t * @example ```\"A[KLRZ]|C[AOT]\"```\n\t */\n\tnot_state_code_regex?: string | null\n\t/** \n\t * The regex that will be evaluated to match the shipping address zip code, max size is 5000.\n\t * @example ```\"(?i)(JE1|JE2|JE3|JE4|JE5)\"```\n\t */\n\tzip_code_regex?: string | null\n\t/** \n\t * The regex that will be evaluated as negative match for the shipping zip country code, max size is 5000.\n\t * @example ```\"(?i)(JE1|JE2|JE3)\"```\n\t */\n\tnot_zip_code_regex?: string | null\n\t\n}\n\n\nclass ShippingZones extends ApiResource<ShippingZone> {\n\n\tstatic readonly TYPE: ShippingZoneType = 'shipping_zones' as const\n\n\tasync create(resource: ShippingZoneCreate, params?: QueryParamsRetrieve<ShippingZone>, options?: ResourcesConfig): Promise<ShippingZone> {\n\t\treturn this.resources.create<ShippingZoneCreate, ShippingZone>({ ...resource, type: ShippingZones.TYPE }, params, options)\n\t}\n\n\tasync update(resource: ShippingZoneUpdate, params?: QueryParamsRetrieve<ShippingZone>, options?: ResourcesConfig): Promise<ShippingZone> {\n\t\treturn this.resources.update<ShippingZoneUpdate, ShippingZone>({ ...resource, type: ShippingZones.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: ShippingZones.TYPE } : id, options)\n\t}\n\n\tasync attachments(shippingZoneId: string | ShippingZone, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _shippingZoneId = (shippingZoneId as ShippingZone).id || shippingZoneId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `shipping_zones/${_shippingZoneId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(shippingZoneId: string | ShippingZone, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _shippingZoneId = (shippingZoneId as ShippingZone).id || shippingZoneId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `shipping_zones/${_shippingZoneId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisShippingZone(resource: any): resource is ShippingZone {\n\t\treturn resource.type && (resource.type === ShippingZones.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): ShippingZoneRel {\n\t\treturn super.relationshipOneToOne<ShippingZoneRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): ShippingZoneRel[] {\n\t\treturn super.relationshipOneToMany<ShippingZoneRel>(...ids)\n\t}\n\n\n\ttype(): ShippingZoneType {\n\t\treturn ShippingZones.TYPE\n\t}\n\n}\n\n\nconst instance = new ShippingZones()\nexport default instance\n\nexport type { ShippingZone, ShippingZoneCreate, ShippingZoneUpdate, ShippingZoneType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/shipping_zones.ts"],"names":[],"mappings":";;AAgJA,MAAM,sBAAsB,WAA0B,CAAA;AAAA,EAErD,OAAgB,IAAyB,GAAA,gBAAA;AAAA,EAEzC,MAAM,MAAA,CAAO,QAA8B,EAAA,MAAA,EAA4C,OAAkD,EAAA;AACxI,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAyC,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,aAAc,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC1H,EAEA,MAAM,MAAA,CAAO,QAA8B,EAAA,MAAA,EAA4C,OAAkD,EAAA;AACxI,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAyC,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,aAAc,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC1H,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,aAAA,CAAc,IAAK,EAAA,GAAI,IAAI,OAAO,CAAA;AAAA;AACrG,EAEA,MAAM,WAAA,CAAY,cAAuC,EAAA,MAAA,EAAsC,OAA8D,EAAA;AAC5J,IAAM,MAAA,eAAA,GAAmB,eAAgC,EAAM,IAAA,cAAA;AAC/D,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAkB,EAAE,IAAA,EAAM,aAAc,EAAA,EAAG,CAAkB,eAAA,EAAA,eAAe,CAAgB,YAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAClI,EAEA,MAAM,QAAA,CAAS,cAAuC,EAAA,MAAA,EAAmC,OAA2D,EAAA;AACnJ,IAAM,MAAA,eAAA,GAAmB,eAAgC,EAAM,IAAA,cAAA;AAC/D,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAe,EAAE,IAAA,EAAM,UAAW,EAAA,EAAG,CAAkB,eAAA,EAAA,eAAe,CAAa,SAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACzH,EAGA,eAAe,QAAyC,EAAA;AACvD,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,aAAc,CAAA,IAAA;AAAA;AAC1D,EAGA,aAAa,EAAiD,EAAA;AAC7D,IAAO,OAAA,KAAA,CAAM,qBAAsC,EAAE,CAAA;AAAA;AACtD,EAEA,sBAAsB,GAAkC,EAAA;AACvD,IAAO,OAAA,KAAA,CAAM,qBAAuC,CAAA,GAAG,GAAG,CAAA;AAAA;AAC3D,EAGA,IAAyB,GAAA;AACxB,IAAA,OAAO,aAAc,CAAA,IAAA;AAAA;AAGvB;AAGA,MAAM,QAAA,GAAW,IAAI,aAAc,EAAA;AACnC,IAAO,sBAAQ,GAAA","file":"shipping_zones.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 { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype ShippingZoneType = 'shipping_zones'\ntype ShippingZoneRel = ResourceRel & { type: ShippingZoneType }\n\n\nexport type ShippingZoneSort = Pick<ShippingZone, 'id' | 'name'> & ResourceSort\n// export type ShippingZoneFilter = Pick<ShippingZone, 'id' | 'name'> & ResourceFilter\n\n\ninterface ShippingZone extends Resource {\n\t\n\treadonly type: ShippingZoneType\n\n\t/** \n\t * The shipping zone's internal name.\n\t * @example ```\"Europe (main countries)\"```\n\t */\n\tname: string\n\t/** \n\t * The regex that will be evaluated to match the shipping address country code, max size is 5000.\n\t * @example ```\"AT|BE|BG|CZ|DK|EE|DE|HU|LV|LT\"```\n\t */\n\tcountry_code_regex?: string | null\n\t/** \n\t * The regex that will be evaluated as negative match for the shipping address country code, max size is 5000.\n\t * @example ```\"AT|BE|BG|CZ|DK|EE|DE\"```\n\t */\n\tnot_country_code_regex?: string | null\n\t/** \n\t * The regex that will be evaluated to match the shipping address state code, max size is 5000.\n\t * @example ```\"A[KLRZ]|C[AOT]|D[CE]|FL\"```\n\t */\n\tstate_code_regex?: string | null\n\t/** \n\t * The regex that will be evaluated as negative match for the shipping address state code, max size is 5000.\n\t * @example ```\"A[KLRZ]|C[AOT]\"```\n\t */\n\tnot_state_code_regex?: string | null\n\t/** \n\t * The regex that will be evaluated to match the shipping address zip code, max size is 5000.\n\t * @example ```\"(?i)(JE1|JE2|JE3|JE4|JE5)\"```\n\t */\n\tzip_code_regex?: string | null\n\t/** \n\t * The regex that will be evaluated as negative match for the shipping zip country code, max size is 5000.\n\t * @example ```\"(?i)(JE1|JE2|JE3)\"```\n\t */\n\tnot_zip_code_regex?: string | null\n\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface ShippingZoneCreate extends ResourceCreate {\n\t\n\t/** \n\t * The shipping zone's internal name.\n\t * @example ```\"Europe (main countries)\"```\n\t */\n\tname: string\n\t/** \n\t * The regex that will be evaluated to match the shipping address country code, max size is 5000.\n\t * @example ```\"AT|BE|BG|CZ|DK|EE|DE|HU|LV|LT\"```\n\t */\n\tcountry_code_regex?: string | null\n\t/** \n\t * The regex that will be evaluated as negative match for the shipping address country code, max size is 5000.\n\t * @example ```\"AT|BE|BG|CZ|DK|EE|DE\"```\n\t */\n\tnot_country_code_regex?: string | null\n\t/** \n\t * The regex that will be evaluated to match the shipping address state code, max size is 5000.\n\t * @example ```\"A[KLRZ]|C[AOT]|D[CE]|FL\"```\n\t */\n\tstate_code_regex?: string | null\n\t/** \n\t * The regex that will be evaluated as negative match for the shipping address state code, max size is 5000.\n\t * @example ```\"A[KLRZ]|C[AOT]\"```\n\t */\n\tnot_state_code_regex?: string | null\n\t/** \n\t * The regex that will be evaluated to match the shipping address zip code, max size is 5000.\n\t * @example ```\"(?i)(JE1|JE2|JE3|JE4|JE5)\"```\n\t */\n\tzip_code_regex?: string | null\n\t/** \n\t * The regex that will be evaluated as negative match for the shipping zip country code, max size is 5000.\n\t * @example ```\"(?i)(JE1|JE2|JE3)\"```\n\t */\n\tnot_zip_code_regex?: string | null\n\t\n}\n\n\ninterface ShippingZoneUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The shipping zone's internal name.\n\t * @example ```\"Europe (main countries)\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The regex that will be evaluated to match the shipping address country code, max size is 5000.\n\t * @example ```\"AT|BE|BG|CZ|DK|EE|DE|HU|LV|LT\"```\n\t */\n\tcountry_code_regex?: string | null\n\t/** \n\t * The regex that will be evaluated as negative match for the shipping address country code, max size is 5000.\n\t * @example ```\"AT|BE|BG|CZ|DK|EE|DE\"```\n\t */\n\tnot_country_code_regex?: string | null\n\t/** \n\t * The regex that will be evaluated to match the shipping address state code, max size is 5000.\n\t * @example ```\"A[KLRZ]|C[AOT]|D[CE]|FL\"```\n\t */\n\tstate_code_regex?: string | null\n\t/** \n\t * The regex that will be evaluated as negative match for the shipping address state code, max size is 5000.\n\t * @example ```\"A[KLRZ]|C[AOT]\"```\n\t */\n\tnot_state_code_regex?: string | null\n\t/** \n\t * The regex that will be evaluated to match the shipping address zip code, max size is 5000.\n\t * @example ```\"(?i)(JE1|JE2|JE3|JE4|JE5)\"```\n\t */\n\tzip_code_regex?: string | null\n\t/** \n\t * The regex that will be evaluated as negative match for the shipping zip country code, max size is 5000.\n\t * @example ```\"(?i)(JE1|JE2|JE3)\"```\n\t */\n\tnot_zip_code_regex?: string | null\n\t\n}\n\n\nclass ShippingZones extends ApiResource<ShippingZone> {\n\n\tstatic readonly TYPE: ShippingZoneType = 'shipping_zones' as const\n\n\tasync create(resource: ShippingZoneCreate, params?: QueryParamsRetrieve<ShippingZone>, options?: ResourcesConfig): Promise<ShippingZone> {\n\t\treturn this.resources.create<ShippingZoneCreate, ShippingZone>({ ...resource, type: ShippingZones.TYPE }, params, options)\n\t}\n\n\tasync update(resource: ShippingZoneUpdate, params?: QueryParamsRetrieve<ShippingZone>, options?: ResourcesConfig): Promise<ShippingZone> {\n\t\treturn this.resources.update<ShippingZoneUpdate, ShippingZone>({ ...resource, type: ShippingZones.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: ShippingZones.TYPE } : id, options)\n\t}\n\n\tasync attachments(shippingZoneId: string | ShippingZone, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _shippingZoneId = (shippingZoneId as ShippingZone).id || shippingZoneId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `shipping_zones/${_shippingZoneId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(shippingZoneId: string | ShippingZone, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _shippingZoneId = (shippingZoneId as ShippingZone).id || shippingZoneId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `shipping_zones/${_shippingZoneId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisShippingZone(resource: any): resource is ShippingZone {\n\t\treturn resource.type && (resource.type === ShippingZones.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): ShippingZoneRel {\n\t\treturn super.relationshipOneToOne<ShippingZoneRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): ShippingZoneRel[] {\n\t\treturn super.relationshipOneToMany<ShippingZoneRel>(...ids)\n\t}\n\n\n\ttype(): ShippingZoneType {\n\t\treturn ShippingZones.TYPE\n\t}\n\n}\n\n\nconst instance = new ShippingZones()\nexport default instance\n\nexport type { ShippingZones, ShippingZone, ShippingZoneCreate, ShippingZoneUpdate, ShippingZoneType }\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/resources/sku_list_items.ts"],"names":["ApiResource"],"mappings":";;;;AA2FA,MAAM,qBAAqBA,oBAAyB,CAAA;AAAA,EAEnD,OAAgB,IAAwB,GAAA,gBAAA;AAAA,EAExC,MAAM,MAAA,CAAO,QAA6B,EAAA,MAAA,EAA2C,OAAiD,EAAA;AACrI,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAuC,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,YAAa,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACvH,EAEA,MAAM,MAAA,CAAO,QAA6B,EAAA,MAAA,EAA2C,OAAiD,EAAA;AACrI,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAuC,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,YAAa,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACvH,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,YAAA,CAAa,IAAK,EAAA,GAAI,IAAI,OAAO,CAAA;AAAA;AACpG,EAEA,MAAM,QAAA,CAAS,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,CAAA,IAAA;AAAA;AAGtB;AAGA,MAAM,QAAA,GAAW,IAAI,YAAa,EAAA;AAClC,IAAO,sBAAQ,GAAA","file":"sku_list_items.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 { SkuList, SkuListType } from './sku_lists'\nimport type { Sku, SkuType } from './skus'\nimport type { Version } from './versions'\n\n\ntype SkuListItemType = 'sku_list_items'\ntype SkuListItemRel = ResourceRel & { type: SkuListItemType }\ntype SkuListRel = ResourceRel & { type: SkuListType }\ntype SkuRel = ResourceRel & { type: SkuType }\n\n\nexport type SkuListItemSort = Pick<SkuListItem, 'id' | 'position' | 'quantity'> & ResourceSort\n// export type SkuListItemFilter = Pick<SkuListItem, 'id' | 'position' | 'quantity'> & ResourceFilter\n\n\ninterface SkuListItem extends Resource {\n\t\n\treadonly type: SkuListItemType\n\n\t/** \n\t * The SKU list item's position.\n\t * @example ```2```\n\t */\n\tposition?: number | null\n\t/** \n\t * The code of the associated SKU.\n\t * @example ```\"TSHIRTMM000000FFFFFFXLXX\"```\n\t */\n\tsku_code?: string | null\n\t/** \n\t * The SKU quantity for this SKU list item.\n\t * @example ```1```\n\t */\n\tquantity?: number | null\n\n\tsku_list?: SkuList | null\n\tsku?: Sku | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface SkuListItemCreate extends ResourceCreate {\n\t\n\t/** \n\t * The SKU list item's position.\n\t * @example ```2```\n\t */\n\tposition?: number | null\n\t/** \n\t * The code of the associated SKU.\n\t * @example ```\"TSHIRTMM000000FFFFFFXLXX\"```\n\t */\n\tsku_code?: string | null\n\t/** \n\t * The SKU quantity for this SKU list item.\n\t * @example ```1```\n\t */\n\tquantity?: number | null\n\n\tsku_list: SkuListRel\n\tsku: SkuRel\n\n}\n\n\ninterface SkuListItemUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The SKU list item's position.\n\t * @example ```2```\n\t */\n\tposition?: number | null\n\t/** \n\t * The code of the associated SKU.\n\t * @example ```\"TSHIRTMM000000FFFFFFXLXX\"```\n\t */\n\tsku_code?: string | null\n\t/** \n\t * The SKU quantity for this SKU list item.\n\t * @example ```1```\n\t */\n\tquantity?: number | null\n\t\n}\n\n\nclass SkuListItems extends ApiResource<SkuListItem> {\n\n\tstatic readonly TYPE: SkuListItemType = 'sku_list_items' as const\n\n\tasync create(resource: SkuListItemCreate, params?: QueryParamsRetrieve<SkuListItem>, options?: ResourcesConfig): Promise<SkuListItem> {\n\t\treturn this.resources.create<SkuListItemCreate, SkuListItem>({ ...resource, type: SkuListItems.TYPE }, params, options)\n\t}\n\n\tasync update(resource: SkuListItemUpdate, params?: QueryParamsRetrieve<SkuListItem>, options?: ResourcesConfig): Promise<SkuListItem> {\n\t\treturn this.resources.update<SkuListItemUpdate, SkuListItem>({ ...resource, type: SkuListItems.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: SkuListItems.TYPE } : id, options)\n\t}\n\n\tasync sku_list(skuListItemId: string | SkuListItem, params?: QueryParamsRetrieve<SkuList>, options?: ResourcesConfig): Promise<SkuList> {\n\t\tconst _skuListItemId = (skuListItemId as SkuListItem).id || skuListItemId as string\n\t\treturn this.resources.fetch<SkuList>({ type: 'sku_lists' }, `sku_list_items/${_skuListItemId}/sku_list`, params, options) as unknown as SkuList\n\t}\n\n\tasync sku(skuListItemId: string | SkuListItem, params?: QueryParamsRetrieve<Sku>, options?: ResourcesConfig): Promise<Sku> {\n\t\tconst _skuListItemId = (skuListItemId as SkuListItem).id || skuListItemId as string\n\t\treturn this.resources.fetch<Sku>({ type: 'skus' }, `sku_list_items/${_skuListItemId}/sku`, params, options) as unknown as Sku\n\t}\n\n\tasync versions(skuListItemId: string | SkuListItem, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _skuListItemId = (skuListItemId as SkuListItem).id || skuListItemId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `sku_list_items/${_skuListItemId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisSkuListItem(resource: any): resource is SkuListItem {\n\t\treturn resource.type && (resource.type === SkuListItems.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): SkuListItemRel {\n\t\treturn super.relationshipOneToOne<SkuListItemRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): SkuListItemRel[] {\n\t\treturn super.relationshipOneToMany<SkuListItemRel>(...ids)\n\t}\n\n\n\ttype(): SkuListItemType {\n\t\treturn SkuListItems.TYPE\n\t}\n\n}\n\n\nconst instance = new SkuListItems()\nexport default instance\n\nexport type { SkuListItem, SkuListItemCreate, SkuListItemUpdate, SkuListItemType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/sku_list_items.ts"],"names":["ApiResource"],"mappings":";;;;AA2FA,MAAM,qBAAqBA,oBAAyB,CAAA;AAAA,EAEnD,OAAgB,IAAwB,GAAA,gBAAA;AAAA,EAExC,MAAM,MAAA,CAAO,QAA6B,EAAA,MAAA,EAA2C,OAAiD,EAAA;AACrI,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAuC,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,YAAa,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACvH,EAEA,MAAM,MAAA,CAAO,QAA6B,EAAA,MAAA,EAA2C,OAAiD,EAAA;AACrI,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAuC,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,YAAa,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACvH,EAEA,MAAM,MAAO,CAAA,EAAA,EAAyB,OAA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;AAC5D,IAAO,OAAA,KAAA,CAAM,qBAAqC,EAAE,CAAA;AAAA;AACrD,EAEA,sBAAsB,GAAiC,EAAA;AACtD,IAAO,OAAA,KAAA,CAAM,qBAAsC,CAAA,GAAG,GAAG,CAAA;AAAA;AAC1D,EAGA,IAAwB,GAAA;AACvB,IAAA,OAAO,YAAa,CAAA,IAAA;AAAA;AAGtB;AAGA,MAAM,QAAA,GAAW,IAAI,YAAa,EAAA;AAClC,IAAO,sBAAQ,GAAA","file":"sku_list_items.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 { SkuList, SkuListType } from './sku_lists'\nimport type { Sku, SkuType } from './skus'\nimport type { Version } from './versions'\n\n\ntype SkuListItemType = 'sku_list_items'\ntype SkuListItemRel = ResourceRel & { type: SkuListItemType }\ntype SkuListRel = ResourceRel & { type: SkuListType }\ntype SkuRel = ResourceRel & { type: SkuType }\n\n\nexport type SkuListItemSort = Pick<SkuListItem, 'id' | 'position' | 'quantity'> & ResourceSort\n// export type SkuListItemFilter = Pick<SkuListItem, 'id' | 'position' | 'quantity'> & ResourceFilter\n\n\ninterface SkuListItem extends Resource {\n\t\n\treadonly type: SkuListItemType\n\n\t/** \n\t * The SKU list item's position.\n\t * @example ```2```\n\t */\n\tposition?: number | null\n\t/** \n\t * The code of the associated SKU.\n\t * @example ```\"TSHIRTMM000000FFFFFFXLXX\"```\n\t */\n\tsku_code?: string | null\n\t/** \n\t * The SKU quantity for this SKU list item.\n\t * @example ```1```\n\t */\n\tquantity?: number | null\n\n\tsku_list?: SkuList | null\n\tsku?: Sku | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface SkuListItemCreate extends ResourceCreate {\n\t\n\t/** \n\t * The SKU list item's position.\n\t * @example ```2```\n\t */\n\tposition?: number | null\n\t/** \n\t * The code of the associated SKU.\n\t * @example ```\"TSHIRTMM000000FFFFFFXLXX\"```\n\t */\n\tsku_code?: string | null\n\t/** \n\t * The SKU quantity for this SKU list item.\n\t * @example ```1```\n\t */\n\tquantity?: number | null\n\n\tsku_list: SkuListRel\n\tsku: SkuRel\n\n}\n\n\ninterface SkuListItemUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The SKU list item's position.\n\t * @example ```2```\n\t */\n\tposition?: number | null\n\t/** \n\t * The code of the associated SKU.\n\t * @example ```\"TSHIRTMM000000FFFFFFXLXX\"```\n\t */\n\tsku_code?: string | null\n\t/** \n\t * The SKU quantity for this SKU list item.\n\t * @example ```1```\n\t */\n\tquantity?: number | null\n\t\n}\n\n\nclass SkuListItems extends ApiResource<SkuListItem> {\n\n\tstatic readonly TYPE: SkuListItemType = 'sku_list_items' as const\n\n\tasync create(resource: SkuListItemCreate, params?: QueryParamsRetrieve<SkuListItem>, options?: ResourcesConfig): Promise<SkuListItem> {\n\t\treturn this.resources.create<SkuListItemCreate, SkuListItem>({ ...resource, type: SkuListItems.TYPE }, params, options)\n\t}\n\n\tasync update(resource: SkuListItemUpdate, params?: QueryParamsRetrieve<SkuListItem>, options?: ResourcesConfig): Promise<SkuListItem> {\n\t\treturn this.resources.update<SkuListItemUpdate, SkuListItem>({ ...resource, type: SkuListItems.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: SkuListItems.TYPE } : id, options)\n\t}\n\n\tasync sku_list(skuListItemId: string | SkuListItem, params?: QueryParamsRetrieve<SkuList>, options?: ResourcesConfig): Promise<SkuList> {\n\t\tconst _skuListItemId = (skuListItemId as SkuListItem).id || skuListItemId as string\n\t\treturn this.resources.fetch<SkuList>({ type: 'sku_lists' }, `sku_list_items/${_skuListItemId}/sku_list`, params, options) as unknown as SkuList\n\t}\n\n\tasync sku(skuListItemId: string | SkuListItem, params?: QueryParamsRetrieve<Sku>, options?: ResourcesConfig): Promise<Sku> {\n\t\tconst _skuListItemId = (skuListItemId as SkuListItem).id || skuListItemId as string\n\t\treturn this.resources.fetch<Sku>({ type: 'skus' }, `sku_list_items/${_skuListItemId}/sku`, params, options) as unknown as Sku\n\t}\n\n\tasync versions(skuListItemId: string | SkuListItem, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _skuListItemId = (skuListItemId as SkuListItem).id || skuListItemId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `sku_list_items/${_skuListItemId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisSkuListItem(resource: any): resource is SkuListItem {\n\t\treturn resource.type && (resource.type === SkuListItems.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): SkuListItemRel {\n\t\treturn super.relationshipOneToOne<SkuListItemRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): SkuListItemRel[] {\n\t\treturn super.relationshipOneToMany<SkuListItemRel>(...ids)\n\t}\n\n\n\ttype(): SkuListItemType {\n\t\treturn SkuListItems.TYPE\n\t}\n\n}\n\n\nconst instance = new SkuListItems()\nexport default instance\n\nexport type { SkuListItems, SkuListItem, SkuListItemCreate, SkuListItemUpdate, SkuListItemType }\n"]}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { jS as SkuListItem, jT as SkuListItemCreate, jV as SkuListItemSort, m8 as SkuListItemType, jU as SkuListItemUpdate, d0 as SkuListItems, c$ 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 { jS as SkuListItem, jT as SkuListItemCreate, jV as SkuListItemSort, m8 as SkuListItemType, jU as SkuListItemUpdate, d0 as SkuListItems, c$ as default } from '../api-F1F37Dud.js';
|
2
2
|
import '../client.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EAAmC,OAAyC,EAAA;AAC1H,IAAM,MAAA,cAAA,GAAkB,cAA8B,EAAM,IAAA,aAAA;AAC5D,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAW,EAAE,IAAA,EAAM,MAAO,EAAA,EAAG,CAAkB,eAAA,EAAA,cAAc,CAAQ,IAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC3G,EAEA,MAAM,QAAA,CAAS,aAAqC,EAAA,MAAA,EAAmC,OAA2D,EAAA;AACjJ,IAAM,MAAA,cAAA,GAAkB,cAA8B,EAAM,IAAA,aAAA;AAC5D,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAe,EAAE,IAAA,EAAM,UAAW,EAAA,EAAG,CAAkB,eAAA,EAAA,cAAc,CAAa,SAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACxH,EAGA,cAAc,QAAwC,EAAA;AACrD,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,YAAa,CAAA,IAAA;AAAA;AACzD,EAGA,aAAa,EAAgD,EAAA;AAC5D,IAAO,OAAA,KAAA,CAAM,qBAAqC,EAAE,CAAA;AAAA;AACrD,EAEA,sBAAsB,GAAiC,EAAA;AACtD,IAAO,OAAA,KAAA,CAAM,qBAAsC,CAAA,GAAG,GAAG,CAAA;AAAA;AAC1D,EAGA,IAAwB,GAAA;AACvB,IAAA,OAAO,YAAa,CAAA,IAAA;AAAA;AAGtB;AAGA,MAAM,QAAA,GAAW,IAAI,YAAa,EAAA;AAClC,IAAO,sBAAQ,GAAA","file":"sku_list_items.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 { SkuList, SkuListType } from './sku_lists'\nimport type { Sku, SkuType } from './skus'\nimport type { Version } from './versions'\n\n\ntype SkuListItemType = 'sku_list_items'\ntype SkuListItemRel = ResourceRel & { type: SkuListItemType }\ntype SkuListRel = ResourceRel & { type: SkuListType }\ntype SkuRel = ResourceRel & { type: SkuType }\n\n\nexport type SkuListItemSort = Pick<SkuListItem, 'id' | 'position' | 'quantity'> & ResourceSort\n// export type SkuListItemFilter = Pick<SkuListItem, 'id' | 'position' | 'quantity'> & ResourceFilter\n\n\ninterface SkuListItem extends Resource {\n\t\n\treadonly type: SkuListItemType\n\n\t/** \n\t * The SKU list item's position.\n\t * @example ```2```\n\t */\n\tposition?: number | null\n\t/** \n\t * The code of the associated SKU.\n\t * @example ```\"TSHIRTMM000000FFFFFFXLXX\"```\n\t */\n\tsku_code?: string | null\n\t/** \n\t * The SKU quantity for this SKU list item.\n\t * @example ```1```\n\t */\n\tquantity?: number | null\n\n\tsku_list?: SkuList | null\n\tsku?: Sku | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface SkuListItemCreate extends ResourceCreate {\n\t\n\t/** \n\t * The SKU list item's position.\n\t * @example ```2```\n\t */\n\tposition?: number | null\n\t/** \n\t * The code of the associated SKU.\n\t * @example ```\"TSHIRTMM000000FFFFFFXLXX\"```\n\t */\n\tsku_code?: string | null\n\t/** \n\t * The SKU quantity for this SKU list item.\n\t * @example ```1```\n\t */\n\tquantity?: number | null\n\n\tsku_list: SkuListRel\n\tsku: SkuRel\n\n}\n\n\ninterface SkuListItemUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The SKU list item's position.\n\t * @example ```2```\n\t */\n\tposition?: number | null\n\t/** \n\t * The code of the associated SKU.\n\t * @example ```\"TSHIRTMM000000FFFFFFXLXX\"```\n\t */\n\tsku_code?: string | null\n\t/** \n\t * The SKU quantity for this SKU list item.\n\t * @example ```1```\n\t */\n\tquantity?: number | null\n\t\n}\n\n\nclass SkuListItems extends ApiResource<SkuListItem> {\n\n\tstatic readonly TYPE: SkuListItemType = 'sku_list_items' as const\n\n\tasync create(resource: SkuListItemCreate, params?: QueryParamsRetrieve<SkuListItem>, options?: ResourcesConfig): Promise<SkuListItem> {\n\t\treturn this.resources.create<SkuListItemCreate, SkuListItem>({ ...resource, type: SkuListItems.TYPE }, params, options)\n\t}\n\n\tasync update(resource: SkuListItemUpdate, params?: QueryParamsRetrieve<SkuListItem>, options?: ResourcesConfig): Promise<SkuListItem> {\n\t\treturn this.resources.update<SkuListItemUpdate, SkuListItem>({ ...resource, type: SkuListItems.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: SkuListItems.TYPE } : id, options)\n\t}\n\n\tasync sku_list(skuListItemId: string | SkuListItem, params?: QueryParamsRetrieve<SkuList>, options?: ResourcesConfig): Promise<SkuList> {\n\t\tconst _skuListItemId = (skuListItemId as SkuListItem).id || skuListItemId as string\n\t\treturn this.resources.fetch<SkuList>({ type: 'sku_lists' }, `sku_list_items/${_skuListItemId}/sku_list`, params, options) as unknown as SkuList\n\t}\n\n\tasync sku(skuListItemId: string | SkuListItem, params?: QueryParamsRetrieve<Sku>, options?: ResourcesConfig): Promise<Sku> {\n\t\tconst _skuListItemId = (skuListItemId as SkuListItem).id || skuListItemId as string\n\t\treturn this.resources.fetch<Sku>({ type: 'skus' }, `sku_list_items/${_skuListItemId}/sku`, params, options) as unknown as Sku\n\t}\n\n\tasync versions(skuListItemId: string | SkuListItem, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _skuListItemId = (skuListItemId as SkuListItem).id || skuListItemId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `sku_list_items/${_skuListItemId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisSkuListItem(resource: any): resource is SkuListItem {\n\t\treturn resource.type && (resource.type === SkuListItems.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): SkuListItemRel {\n\t\treturn super.relationshipOneToOne<SkuListItemRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): SkuListItemRel[] {\n\t\treturn super.relationshipOneToMany<SkuListItemRel>(...ids)\n\t}\n\n\n\ttype(): SkuListItemType {\n\t\treturn SkuListItems.TYPE\n\t}\n\n}\n\n\nconst instance = new SkuListItems()\nexport default instance\n\nexport type { SkuListItem, SkuListItemCreate, SkuListItemUpdate, SkuListItemType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/sku_list_items.ts"],"names":[],"mappings":";;AA2FA,MAAM,qBAAqB,WAAyB,CAAA;AAAA,EAEnD,OAAgB,IAAwB,GAAA,gBAAA;AAAA,EAExC,MAAM,MAAA,CAAO,QAA6B,EAAA,MAAA,EAA2C,OAAiD,EAAA;AACrI,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAuC,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,YAAa,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACvH,EAEA,MAAM,MAAA,CAAO,QAA6B,EAAA,MAAA,EAA2C,OAAiD,EAAA;AACrI,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAuC,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,YAAa,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACvH,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,YAAA,CAAa,IAAK,EAAA,GAAI,IAAI,OAAO,CAAA;AAAA;AACpG,EAEA,MAAM,QAAA,CAAS,aAAqC,EAAA,MAAA,EAAuC,OAA6C,EAAA;AACvI,IAAM,MAAA,cAAA,GAAkB,cAA8B,EAAM,IAAA,aAAA;AAC5D,IAAO,OAAA,IAAA,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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 { SkuList, SkuListType } from './sku_lists'\nimport type { Sku, SkuType } from './skus'\nimport type { Version } from './versions'\n\n\ntype SkuListItemType = 'sku_list_items'\ntype SkuListItemRel = ResourceRel & { type: SkuListItemType }\ntype SkuListRel = ResourceRel & { type: SkuListType }\ntype SkuRel = ResourceRel & { type: SkuType }\n\n\nexport type SkuListItemSort = Pick<SkuListItem, 'id' | 'position' | 'quantity'> & ResourceSort\n// export type SkuListItemFilter = Pick<SkuListItem, 'id' | 'position' | 'quantity'> & ResourceFilter\n\n\ninterface SkuListItem extends Resource {\n\t\n\treadonly type: SkuListItemType\n\n\t/** \n\t * The SKU list item's position.\n\t * @example ```2```\n\t */\n\tposition?: number | null\n\t/** \n\t * The code of the associated SKU.\n\t * @example ```\"TSHIRTMM000000FFFFFFXLXX\"```\n\t */\n\tsku_code?: string | null\n\t/** \n\t * The SKU quantity for this SKU list item.\n\t * @example ```1```\n\t */\n\tquantity?: number | null\n\n\tsku_list?: SkuList | null\n\tsku?: Sku | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface SkuListItemCreate extends ResourceCreate {\n\t\n\t/** \n\t * The SKU list item's position.\n\t * @example ```2```\n\t */\n\tposition?: number | null\n\t/** \n\t * The code of the associated SKU.\n\t * @example ```\"TSHIRTMM000000FFFFFFXLXX\"```\n\t */\n\tsku_code?: string | null\n\t/** \n\t * The SKU quantity for this SKU list item.\n\t * @example ```1```\n\t */\n\tquantity?: number | null\n\n\tsku_list: SkuListRel\n\tsku: SkuRel\n\n}\n\n\ninterface SkuListItemUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The SKU list item's position.\n\t * @example ```2```\n\t */\n\tposition?: number | null\n\t/** \n\t * The code of the associated SKU.\n\t * @example ```\"TSHIRTMM000000FFFFFFXLXX\"```\n\t */\n\tsku_code?: string | null\n\t/** \n\t * The SKU quantity for this SKU list item.\n\t * @example ```1```\n\t */\n\tquantity?: number | null\n\t\n}\n\n\nclass SkuListItems extends ApiResource<SkuListItem> {\n\n\tstatic readonly TYPE: SkuListItemType = 'sku_list_items' as const\n\n\tasync create(resource: SkuListItemCreate, params?: QueryParamsRetrieve<SkuListItem>, options?: ResourcesConfig): Promise<SkuListItem> {\n\t\treturn this.resources.create<SkuListItemCreate, SkuListItem>({ ...resource, type: SkuListItems.TYPE }, params, options)\n\t}\n\n\tasync update(resource: SkuListItemUpdate, params?: QueryParamsRetrieve<SkuListItem>, options?: ResourcesConfig): Promise<SkuListItem> {\n\t\treturn this.resources.update<SkuListItemUpdate, SkuListItem>({ ...resource, type: SkuListItems.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: SkuListItems.TYPE } : id, options)\n\t}\n\n\tasync sku_list(skuListItemId: string | SkuListItem, params?: QueryParamsRetrieve<SkuList>, options?: ResourcesConfig): Promise<SkuList> {\n\t\tconst _skuListItemId = (skuListItemId as SkuListItem).id || skuListItemId as string\n\t\treturn this.resources.fetch<SkuList>({ type: 'sku_lists' }, `sku_list_items/${_skuListItemId}/sku_list`, params, options) as unknown as SkuList\n\t}\n\n\tasync sku(skuListItemId: string | SkuListItem, params?: QueryParamsRetrieve<Sku>, options?: ResourcesConfig): Promise<Sku> {\n\t\tconst _skuListItemId = (skuListItemId as SkuListItem).id || skuListItemId as string\n\t\treturn this.resources.fetch<Sku>({ type: 'skus' }, `sku_list_items/${_skuListItemId}/sku`, params, options) as unknown as Sku\n\t}\n\n\tasync versions(skuListItemId: string | SkuListItem, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _skuListItemId = (skuListItemId as SkuListItem).id || skuListItemId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `sku_list_items/${_skuListItemId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisSkuListItem(resource: any): resource is SkuListItem {\n\t\treturn resource.type && (resource.type === SkuListItems.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): SkuListItemRel {\n\t\treturn super.relationshipOneToOne<SkuListItemRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): SkuListItemRel[] {\n\t\treturn super.relationshipOneToMany<SkuListItemRel>(...ids)\n\t}\n\n\n\ttype(): SkuListItemType {\n\t\treturn SkuListItems.TYPE\n\t}\n\n}\n\n\nconst instance = new SkuListItems()\nexport default instance\n\nexport type { SkuListItems, SkuListItem, SkuListItemCreate, SkuListItemUpdate, SkuListItemType }\n"]}
|