@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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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 { Merchant, MerchantType } from './merchants'\nimport type { PriceList, PriceListType } from './price_lists'\nimport type { InventoryModel, InventoryModelType } from './inventory_models'\nimport type { SubscriptionModel, SubscriptionModelType } from './subscription_models'\nimport type { TaxCalculator } from './tax_calculators'\nimport type { CustomerGroup, CustomerGroupType } from './customer_groups'\nimport type { Geocoder, GeocoderType } from './geocoders'\nimport type { ShippingMethod, ShippingMethodType } from './shipping_methods'\nimport type { PaymentMethod, PaymentMethodType } from './payment_methods'\nimport type { Store } from './stores'\nimport type { PriceListScheduler } from './price_list_schedulers'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\nimport type { AvalaraAccount, AvalaraAccountType } from './avalara_accounts'\nimport type { StripeTaxAccount, StripeTaxAccountType } from './stripe_tax_accounts'\nimport type { VertexAccount, VertexAccountType } from './vertex_accounts'\nimport type { TaxjarAccount, TaxjarAccountType } from './taxjar_accounts'\nimport type { ManualTaxCalculator, ManualTaxCalculatorType } from './manual_tax_calculators'\nimport type { ExternalTaxCalculator, ExternalTaxCalculatorType } from './external_tax_calculators'\n\n\ntype MarketType = 'markets'\ntype MarketRel = ResourceRel & { type: MarketType }\ntype MerchantRel = ResourceRel & { type: MerchantType }\ntype PriceListRel = ResourceRel & { type: PriceListType }\ntype InventoryModelRel = ResourceRel & { type: InventoryModelType }\ntype SubscriptionModelRel = ResourceRel & { type: SubscriptionModelType }\ntype AvalaraAccountRel = ResourceRel & { type: AvalaraAccountType }\ntype StripeTaxAccountRel = ResourceRel & { type: StripeTaxAccountType }\ntype VertexAccountRel = ResourceRel & { type: VertexAccountType }\ntype TaxjarAccountRel = ResourceRel & { type: TaxjarAccountType }\ntype ManualTaxCalculatorRel = ResourceRel & { type: ManualTaxCalculatorType }\ntype ExternalTaxCalculatorRel = ResourceRel & { type: ExternalTaxCalculatorType }\ntype CustomerGroupRel = ResourceRel & { type: CustomerGroupType }\ntype GeocoderRel = ResourceRel & { type: GeocoderType }\ntype ShippingMethodRel = ResourceRel & { type: ShippingMethodType }\ntype PaymentMethodRel = ResourceRel & { type: PaymentMethodType }\n\n\nexport type MarketSort = Pick<Market, 'id' | 'name' | 'code' | 'disabled_at'> & ResourceSort\n// export type MarketFilter = Pick<Market, 'id' | 'name' | 'code' | 'disabled_at'> & ResourceFilter\n\n\ninterface Market extends Resource {\n\t\n\treadonly type: MarketType\n\n\t/** \n\t * Unique identifier for the market (numeric).\n\t * @example ```1234```\n\t */\n\tnumber?: number | null\n\t/** \n\t * The market's internal name.\n\t * @example ```\"EU Market\"```\n\t */\n\tname: string\n\t/** \n\t * A string that you can use to identify the market (must be unique within the environment).\n\t * @example ```\"europe1\"```\n\t */\n\tcode?: string | null\n\t/** \n\t * The Facebook Pixed ID.\n\t * @example ```\"1234567890\"```\n\t */\n\tfacebook_pixel_id?: string | null\n\t/** \n\t * The checkout URL for this market.\n\t * @example ```\"https://checkout.yourbrand.com/:order_id\"```\n\t */\n\tcheckout_url?: 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 URL used to validate orders by an external source.\n\t * @example ```\"https://external_validation.yourbrand.com\"```\n\t */\n\texternal_order_validation_url?: string | null\n\t/** \n\t * Indicates if market belongs to a customer_group.\n\t * @example ```true```\n\t */\n\tprivate?: boolean | null\n\t/** \n\t * When specified indicates the maximum number of shipping line items with cost that will be added to an order.\n\t * @example ```3```\n\t */\n\tshipping_cost_cutoff?: number | 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 shared secret used to sign the external request payload.\n\t * @example ```\"1c0994cc4e996e8c6ee56a2198f66f3c\"```\n\t */\n\tshared_secret: string\n\n\tmerchant?: Merchant | null\n\tprice_list?: PriceList | null\n\tbase_price_list?: PriceList | null\n\tinventory_model?: InventoryModel | null\n\tsubscription_model?: SubscriptionModel | null\n\ttax_calculator?: AvalaraAccount | StripeTaxAccount | VertexAccount | TaxjarAccount | ManualTaxCalculator | ExternalTaxCalculator | null\n\tcustomer_group?: CustomerGroup | null\n\tgeocoder?: Geocoder | null\n\tdefault_shipping_method?: ShippingMethod | null\n\tdefault_payment_method?: PaymentMethod | null\n\tstores?: Store[] | null\n\tprice_list_schedulers?: PriceListScheduler[] | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface MarketCreate extends ResourceCreate {\n\t\n\t/** \n\t * The market's internal name.\n\t * @example ```\"EU Market\"```\n\t */\n\tname: string\n\t/** \n\t * A string that you can use to identify the market (must be unique within the environment).\n\t * @example ```\"europe1\"```\n\t */\n\tcode?: string | null\n\t/** \n\t * The Facebook Pixed ID.\n\t * @example ```\"1234567890\"```\n\t */\n\tfacebook_pixel_id?: string | null\n\t/** \n\t * The checkout URL for this market.\n\t * @example ```\"https://checkout.yourbrand.com/:order_id\"```\n\t */\n\tcheckout_url?: 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 URL used to validate orders by an external source.\n\t * @example ```\"https://external_validation.yourbrand.com\"```\n\t */\n\texternal_order_validation_url?: string | null\n\t/** \n\t * When specified indicates the maximum number of shipping line items with cost that will be added to an order.\n\t * @example ```3```\n\t */\n\tshipping_cost_cutoff?: number | 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\tmerchant: MerchantRel\n\tprice_list: PriceListRel\n\tinventory_model: InventoryModelRel\n\tsubscription_model?: SubscriptionModelRel | null\n\ttax_calculator?: AvalaraAccountRel | StripeTaxAccountRel | VertexAccountRel | TaxjarAccountRel | ManualTaxCalculatorRel | ExternalTaxCalculatorRel | null\n\tcustomer_group?: CustomerGroupRel | null\n\tgeocoder?: GeocoderRel | null\n\tdefault_shipping_method?: ShippingMethodRel | null\n\tdefault_payment_method?: PaymentMethodRel | null\n\n}\n\n\ninterface MarketUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The market's internal name.\n\t * @example ```\"EU Market\"```\n\t */\n\tname?: string | null\n\t/** \n\t * A string that you can use to identify the market (must be unique within the environment).\n\t * @example ```\"europe1\"```\n\t */\n\tcode?: string | null\n\t/** \n\t * The Facebook Pixed ID.\n\t * @example ```\"1234567890\"```\n\t */\n\tfacebook_pixel_id?: string | null\n\t/** \n\t * The checkout URL for this market.\n\t * @example ```\"https://checkout.yourbrand.com/:order_id\"```\n\t */\n\tcheckout_url?: 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 URL used to validate orders by an external source.\n\t * @example ```\"https://external_validation.yourbrand.com\"```\n\t */\n\texternal_order_validation_url?: string | null\n\t/** \n\t * When specified indicates the maximum number of shipping line items with cost that will be added to an order.\n\t * @example ```3```\n\t */\n\tshipping_cost_cutoff?: number | 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\tmerchant?: MerchantRel | null\n\tprice_list?: PriceListRel | null\n\tinventory_model?: InventoryModelRel | null\n\tsubscription_model?: SubscriptionModelRel | null\n\ttax_calculator?: AvalaraAccountRel | StripeTaxAccountRel | VertexAccountRel | TaxjarAccountRel | ManualTaxCalculatorRel | ExternalTaxCalculatorRel | null\n\tcustomer_group?: CustomerGroupRel | null\n\tgeocoder?: GeocoderRel | null\n\tdefault_shipping_method?: ShippingMethodRel | null\n\tdefault_payment_method?: PaymentMethodRel | null\n\n}\n\n\nclass Markets extends ApiResource<Market> {\n\n\tstatic readonly TYPE: MarketType = 'markets' as const\n\n\tasync create(resource: MarketCreate, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\treturn this.resources.create<MarketCreate, Market>({ ...resource, type: Markets.TYPE }, params, options)\n\t}\n\n\tasync update(resource: MarketUpdate, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\treturn this.resources.update<MarketUpdate, Market>({ ...resource, type: Markets.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: Markets.TYPE } : id, options)\n\t}\n\n\tasync merchant(marketId: string | Market, params?: QueryParamsRetrieve<Merchant>, options?: ResourcesConfig): Promise<Merchant> {\n\t\tconst _marketId = (marketId as Market).id || marketId as string\n\t\treturn this.resources.fetch<Merchant>({ type: 'merchants' }, `markets/${_marketId}/merchant`, params, options) as unknown as Merchant\n\t}\n\n\tasync price_list(marketId: string | Market, params?: QueryParamsRetrieve<PriceList>, options?: ResourcesConfig): Promise<PriceList> {\n\t\tconst _marketId = (marketId as Market).id || marketId as string\n\t\treturn this.resources.fetch<PriceList>({ type: 'price_lists' }, `markets/${_marketId}/price_list`, params, options) as unknown as PriceList\n\t}\n\n\tasync base_price_list(marketId: string | Market, params?: QueryParamsRetrieve<PriceList>, options?: ResourcesConfig): Promise<PriceList> {\n\t\tconst _marketId = (marketId as Market).id || marketId as string\n\t\treturn this.resources.fetch<PriceList>({ type: 'price_lists' }, `markets/${_marketId}/base_price_list`, params, options) as unknown as PriceList\n\t}\n\n\tasync inventory_model(marketId: string | Market, params?: QueryParamsRetrieve<InventoryModel>, options?: ResourcesConfig): Promise<InventoryModel> {\n\t\tconst _marketId = (marketId as Market).id || marketId as string\n\t\treturn this.resources.fetch<InventoryModel>({ type: 'inventory_models' }, `markets/${_marketId}/inventory_model`, params, options) as unknown as InventoryModel\n\t}\n\n\tasync subscription_model(marketId: string | Market, params?: QueryParamsRetrieve<SubscriptionModel>, options?: ResourcesConfig): Promise<SubscriptionModel> {\n\t\tconst _marketId = (marketId as Market).id || marketId as string\n\t\treturn this.resources.fetch<SubscriptionModel>({ type: 'subscription_models' }, `markets/${_marketId}/subscription_model`, params, options) as unknown as SubscriptionModel\n\t}\n\n\tasync tax_calculator(marketId: string | Market, params?: QueryParamsRetrieve<TaxCalculator>, options?: ResourcesConfig): Promise<TaxCalculator> {\n\t\tconst _marketId = (marketId as Market).id || marketId as string\n\t\treturn this.resources.fetch<TaxCalculator>({ type: 'tax_calculators' }, `markets/${_marketId}/tax_calculator`, params, options) as unknown as TaxCalculator\n\t}\n\n\tasync customer_group(marketId: string | Market, params?: QueryParamsRetrieve<CustomerGroup>, options?: ResourcesConfig): Promise<CustomerGroup> {\n\t\tconst _marketId = (marketId as Market).id || marketId as string\n\t\treturn this.resources.fetch<CustomerGroup>({ type: 'customer_groups' }, `markets/${_marketId}/customer_group`, params, options) as unknown as CustomerGroup\n\t}\n\n\tasync geocoder(marketId: string | Market, params?: QueryParamsRetrieve<Geocoder>, options?: ResourcesConfig): Promise<Geocoder> {\n\t\tconst _marketId = (marketId as Market).id || marketId as string\n\t\treturn this.resources.fetch<Geocoder>({ type: 'geocoders' }, `markets/${_marketId}/geocoder`, params, options) as unknown as Geocoder\n\t}\n\n\tasync default_shipping_method(marketId: string | Market, params?: QueryParamsRetrieve<ShippingMethod>, options?: ResourcesConfig): Promise<ShippingMethod> {\n\t\tconst _marketId = (marketId as Market).id || marketId as string\n\t\treturn this.resources.fetch<ShippingMethod>({ type: 'shipping_methods' }, `markets/${_marketId}/default_shipping_method`, params, options) as unknown as ShippingMethod\n\t}\n\n\tasync default_payment_method(marketId: string | Market, params?: QueryParamsRetrieve<PaymentMethod>, options?: ResourcesConfig): Promise<PaymentMethod> {\n\t\tconst _marketId = (marketId as Market).id || marketId as string\n\t\treturn this.resources.fetch<PaymentMethod>({ type: 'payment_methods' }, `markets/${_marketId}/default_payment_method`, params, options) as unknown as PaymentMethod\n\t}\n\n\tasync stores(marketId: string | Market, params?: QueryParamsList<Store>, options?: ResourcesConfig): Promise<ListResponse<Store>> {\n\t\tconst _marketId = (marketId as Market).id || marketId as string\n\t\treturn this.resources.fetch<Store>({ type: 'stores' }, `markets/${_marketId}/stores`, params, options) as unknown as ListResponse<Store>\n\t}\n\n\tasync price_list_schedulers(marketId: string | Market, params?: QueryParamsList<PriceListScheduler>, options?: ResourcesConfig): Promise<ListResponse<PriceListScheduler>> {\n\t\tconst _marketId = (marketId as Market).id || marketId as string\n\t\treturn this.resources.fetch<PriceListScheduler>({ type: 'price_list_schedulers' }, `markets/${_marketId}/price_list_schedulers`, params, options) as unknown as ListResponse<PriceListScheduler>\n\t}\n\n\tasync attachments(marketId: string | Market, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _marketId = (marketId as Market).id || marketId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `markets/${_marketId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(marketId: string | Market, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _marketId = (marketId as Market).id || marketId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `markets/${_marketId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _disable(id: string | Market, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\treturn this.resources.update<MarketUpdate, Market>({ id: (typeof id === 'string')? id: id.id, type: Markets.TYPE, _disable: true }, params, options)\n\t}\n\n\tasync _enable(id: string | Market, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\treturn this.resources.update<MarketUpdate, Market>({ id: (typeof id === 'string')? id: id.id, type: Markets.TYPE, _enable: true }, params, options)\n\t}\n\n\n\tisMarket(resource: any): resource is Market {\n\t\treturn resource.type && (resource.type === Markets.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): MarketRel {\n\t\treturn super.relationshipOneToOne<MarketRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): MarketRel[] {\n\t\treturn super.relationshipOneToMany<MarketRel>(...ids)\n\t}\n\n\n\ttype(): MarketType {\n\t\treturn Markets.TYPE\n\t}\n\n}\n\n\nconst instance = new Markets()\nexport default instance\n\nexport type { Market, MarketCreate, MarketUpdate, MarketType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/markets.ts"],"names":["ApiResource"],"mappings":";;;;AA4PA,MAAM,gBAAgBA,oBAAoB,CAAA;AAAA,EAEzC,OAAgB,IAAmB,GAAA,SAAA;AAAA,EAEnC,MAAM,MAAA,CAAO,QAAwB,EAAA,MAAA,EAAsC,OAA4C,EAAA;AACtH,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA6B,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,OAAQ,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACxG,EAEA,MAAM,MAAA,CAAO,QAAwB,EAAA,MAAA,EAAsC,OAA4C,EAAA;AACtH,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA6B,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,OAAQ,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACxG,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,OAAA,CAAQ,IAAK,EAAA,GAAI,IAA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AAU,CAAA,MAAA,CAA6B,EAAE,EAAK,EAAA,OAAO,OAAO,QAAW,GAAA,EAAA,GAAI,EAAG,CAAA,EAAA,EAAI,MAAM,OAAQ,CAAA,IAAA,EAAM,SAAS,IAAK,EAAA,EAAG,QAAQ,OAAO,CAAA;AAAA;AACnJ,EAGA,SAAS,QAAmC,EAAA;AAC3C,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,OAAQ,CAAA,IAAA;AAAA;AACpD,EAGA,aAAa,EAA2C,EAAA;AACvD,IAAO,OAAA,KAAA,CAAM,qBAAgC,EAAE,CAAA;AAAA;AAChD,EAEA,sBAAsB,GAA4B,EAAA;AACjD,IAAO,OAAA,KAAA,CAAM,qBAAiC,CAAA,GAAG,GAAG,CAAA;AAAA;AACrD,EAGA,IAAmB,GAAA;AAClB,IAAA,OAAO,OAAQ,CAAA,IAAA;AAAA;AAGjB;AAGA,MAAM,QAAA,GAAW,IAAI,OAAQ,EAAA;AAC7B,IAAO,eAAQ,GAAA","file":"markets.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 { Merchant, MerchantType } from './merchants'\nimport type { PriceList, PriceListType } from './price_lists'\nimport type { InventoryModel, InventoryModelType } from './inventory_models'\nimport type { SubscriptionModel, SubscriptionModelType } from './subscription_models'\nimport type { DiscountEngine, DiscountEngineType } from './discount_engines'\nimport type { TaxCalculator } from './tax_calculators'\nimport type { CustomerGroup, CustomerGroupType } from './customer_groups'\nimport type { Geocoder, GeocoderType } from './geocoders'\nimport type { ShippingMethod, ShippingMethodType } from './shipping_methods'\nimport type { PaymentMethod, PaymentMethodType } from './payment_methods'\nimport type { Store } from './stores'\nimport type { PriceListScheduler } from './price_list_schedulers'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\nimport type { AvalaraAccount, AvalaraAccountType } from './avalara_accounts'\nimport type { StripeTaxAccount, StripeTaxAccountType } from './stripe_tax_accounts'\nimport type { VertexAccount, VertexAccountType } from './vertex_accounts'\nimport type { TaxjarAccount, TaxjarAccountType } from './taxjar_accounts'\nimport type { ManualTaxCalculator, ManualTaxCalculatorType } from './manual_tax_calculators'\nimport type { ExternalTaxCalculator, ExternalTaxCalculatorType } from './external_tax_calculators'\n\n\ntype MarketType = 'markets'\ntype MarketRel = ResourceRel & { type: MarketType }\ntype MerchantRel = ResourceRel & { type: MerchantType }\ntype PriceListRel = ResourceRel & { type: PriceListType }\ntype InventoryModelRel = ResourceRel & { type: InventoryModelType }\ntype SubscriptionModelRel = ResourceRel & { type: SubscriptionModelType }\ntype DiscountEngineRel = ResourceRel & { type: DiscountEngineType }\ntype AvalaraAccountRel = ResourceRel & { type: AvalaraAccountType }\ntype StripeTaxAccountRel = ResourceRel & { type: StripeTaxAccountType }\ntype VertexAccountRel = ResourceRel & { type: VertexAccountType }\ntype TaxjarAccountRel = ResourceRel & { type: TaxjarAccountType }\ntype ManualTaxCalculatorRel = ResourceRel & { type: ManualTaxCalculatorType }\ntype ExternalTaxCalculatorRel = ResourceRel & { type: ExternalTaxCalculatorType }\ntype CustomerGroupRel = ResourceRel & { type: CustomerGroupType }\ntype GeocoderRel = ResourceRel & { type: GeocoderType }\ntype ShippingMethodRel = ResourceRel & { type: ShippingMethodType }\ntype PaymentMethodRel = ResourceRel & { type: PaymentMethodType }\n\n\nexport type MarketSort = Pick<Market, 'id' | 'name' | 'code' | 'disabled_at'> & ResourceSort\n// export type MarketFilter = Pick<Market, 'id' | 'name' | 'code' | 'disabled_at'> & ResourceFilter\n\n\ninterface Market extends Resource {\n\t\n\treadonly type: MarketType\n\n\t/** \n\t * Unique identifier for the market (numeric).\n\t * @example ```1234```\n\t */\n\tnumber?: number | null\n\t/** \n\t * The market's internal name.\n\t * @example ```\"EU Market\"```\n\t */\n\tname: string\n\t/** \n\t * A string that you can use to identify the market (must be unique within the environment).\n\t * @example ```\"europe1\"```\n\t */\n\tcode?: string | null\n\t/** \n\t * The Facebook Pixed ID.\n\t * @example ```\"1234567890\"```\n\t */\n\tfacebook_pixel_id?: string | null\n\t/** \n\t * The checkout URL for this market.\n\t * @example ```\"https://checkout.yourbrand.com/:order_id\"```\n\t */\n\tcheckout_url?: 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 URL used to validate orders by an external source.\n\t * @example ```\"https://external_validation.yourbrand.com\"```\n\t */\n\texternal_order_validation_url?: string | null\n\t/** \n\t * Indicates if market belongs to a customer_group.\n\t * @example ```true```\n\t */\n\tprivate?: boolean | null\n\t/** \n\t * When specified indicates the maximum number of shipping line items with cost that will be added to an order.\n\t * @example ```3```\n\t */\n\tshipping_cost_cutoff?: number | 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 shared secret used to sign the external request payload.\n\t * @example ```\"1c0994cc4e996e8c6ee56a2198f66f3c\"```\n\t */\n\tshared_secret: string\n\n\tmerchant?: Merchant | null\n\tprice_list?: PriceList | null\n\tbase_price_list?: PriceList | null\n\tinventory_model?: InventoryModel | null\n\tsubscription_model?: SubscriptionModel | null\n\tdiscount_engine?: DiscountEngine | null\n\ttax_calculator?: AvalaraAccount | StripeTaxAccount | VertexAccount | TaxjarAccount | ManualTaxCalculator | ExternalTaxCalculator | null\n\tcustomer_group?: CustomerGroup | null\n\tgeocoder?: Geocoder | null\n\tdefault_shipping_method?: ShippingMethod | null\n\tdefault_payment_method?: PaymentMethod | null\n\tstores?: Store[] | null\n\tprice_list_schedulers?: PriceListScheduler[] | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface MarketCreate extends ResourceCreate {\n\t\n\t/** \n\t * The market's internal name.\n\t * @example ```\"EU Market\"```\n\t */\n\tname: string\n\t/** \n\t * A string that you can use to identify the market (must be unique within the environment).\n\t * @example ```\"europe1\"```\n\t */\n\tcode?: string | null\n\t/** \n\t * The Facebook Pixed ID.\n\t * @example ```\"1234567890\"```\n\t */\n\tfacebook_pixel_id?: string | null\n\t/** \n\t * The checkout URL for this market.\n\t * @example ```\"https://checkout.yourbrand.com/:order_id\"```\n\t */\n\tcheckout_url?: 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 URL used to validate orders by an external source.\n\t * @example ```\"https://external_validation.yourbrand.com\"```\n\t */\n\texternal_order_validation_url?: string | null\n\t/** \n\t * When specified indicates the maximum number of shipping line items with cost that will be added to an order.\n\t * @example ```3```\n\t */\n\tshipping_cost_cutoff?: number | 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\tmerchant: MerchantRel\n\tprice_list: PriceListRel\n\tinventory_model: InventoryModelRel\n\tsubscription_model?: SubscriptionModelRel | null\n\tdiscount_engine?: DiscountEngineRel | null\n\ttax_calculator?: AvalaraAccountRel | StripeTaxAccountRel | VertexAccountRel | TaxjarAccountRel | ManualTaxCalculatorRel | ExternalTaxCalculatorRel | null\n\tcustomer_group?: CustomerGroupRel | null\n\tgeocoder?: GeocoderRel | null\n\tdefault_shipping_method?: ShippingMethodRel | null\n\tdefault_payment_method?: PaymentMethodRel | null\n\n}\n\n\ninterface MarketUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The market's internal name.\n\t * @example ```\"EU Market\"```\n\t */\n\tname?: string | null\n\t/** \n\t * A string that you can use to identify the market (must be unique within the environment).\n\t * @example ```\"europe1\"```\n\t */\n\tcode?: string | null\n\t/** \n\t * The Facebook Pixed ID.\n\t * @example ```\"1234567890\"```\n\t */\n\tfacebook_pixel_id?: string | null\n\t/** \n\t * The checkout URL for this market.\n\t * @example ```\"https://checkout.yourbrand.com/:order_id\"```\n\t */\n\tcheckout_url?: 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 URL used to validate orders by an external source.\n\t * @example ```\"https://external_validation.yourbrand.com\"```\n\t */\n\texternal_order_validation_url?: string | null\n\t/** \n\t * When specified indicates the maximum number of shipping line items with cost that will be added to an order.\n\t * @example ```3```\n\t */\n\tshipping_cost_cutoff?: number | 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\tmerchant?: MerchantRel | null\n\tprice_list?: PriceListRel | null\n\tinventory_model?: InventoryModelRel | null\n\tsubscription_model?: SubscriptionModelRel | null\n\tdiscount_engine?: DiscountEngineRel | null\n\ttax_calculator?: AvalaraAccountRel | StripeTaxAccountRel | VertexAccountRel | TaxjarAccountRel | ManualTaxCalculatorRel | ExternalTaxCalculatorRel | null\n\tcustomer_group?: CustomerGroupRel | null\n\tgeocoder?: GeocoderRel | null\n\tdefault_shipping_method?: ShippingMethodRel | null\n\tdefault_payment_method?: PaymentMethodRel | null\n\n}\n\n\nclass Markets extends ApiResource<Market> {\n\n\tstatic readonly TYPE: MarketType = 'markets' as const\n\n\tasync create(resource: MarketCreate, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\treturn this.resources.create<MarketCreate, Market>({ ...resource, type: Markets.TYPE }, params, options)\n\t}\n\n\tasync update(resource: MarketUpdate, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\treturn this.resources.update<MarketUpdate, Market>({ ...resource, type: Markets.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: Markets.TYPE } : id, options)\n\t}\n\n\tasync merchant(marketId: string | Market, params?: QueryParamsRetrieve<Merchant>, options?: ResourcesConfig): Promise<Merchant> {\n\t\tconst _marketId = (marketId as Market).id || marketId as string\n\t\treturn this.resources.fetch<Merchant>({ type: 'merchants' }, `markets/${_marketId}/merchant`, params, options) as unknown as Merchant\n\t}\n\n\tasync price_list(marketId: string | Market, params?: QueryParamsRetrieve<PriceList>, options?: ResourcesConfig): Promise<PriceList> {\n\t\tconst _marketId = (marketId as Market).id || marketId as string\n\t\treturn this.resources.fetch<PriceList>({ type: 'price_lists' }, `markets/${_marketId}/price_list`, params, options) as unknown as PriceList\n\t}\n\n\tasync base_price_list(marketId: string | Market, params?: QueryParamsRetrieve<PriceList>, options?: ResourcesConfig): Promise<PriceList> {\n\t\tconst _marketId = (marketId as Market).id || marketId as string\n\t\treturn this.resources.fetch<PriceList>({ type: 'price_lists' }, `markets/${_marketId}/base_price_list`, params, options) as unknown as PriceList\n\t}\n\n\tasync inventory_model(marketId: string | Market, params?: QueryParamsRetrieve<InventoryModel>, options?: ResourcesConfig): Promise<InventoryModel> {\n\t\tconst _marketId = (marketId as Market).id || marketId as string\n\t\treturn this.resources.fetch<InventoryModel>({ type: 'inventory_models' }, `markets/${_marketId}/inventory_model`, params, options) as unknown as InventoryModel\n\t}\n\n\tasync subscription_model(marketId: string | Market, params?: QueryParamsRetrieve<SubscriptionModel>, options?: ResourcesConfig): Promise<SubscriptionModel> {\n\t\tconst _marketId = (marketId as Market).id || marketId as string\n\t\treturn this.resources.fetch<SubscriptionModel>({ type: 'subscription_models' }, `markets/${_marketId}/subscription_model`, params, options) as unknown as SubscriptionModel\n\t}\n\n\tasync discount_engine(marketId: string | Market, params?: QueryParamsRetrieve<DiscountEngine>, options?: ResourcesConfig): Promise<DiscountEngine> {\n\t\tconst _marketId = (marketId as Market).id || marketId as string\n\t\treturn this.resources.fetch<DiscountEngine>({ type: 'discount_engines' }, `markets/${_marketId}/discount_engine`, params, options) as unknown as DiscountEngine\n\t}\n\n\tasync tax_calculator(marketId: string | Market, params?: QueryParamsRetrieve<TaxCalculator>, options?: ResourcesConfig): Promise<TaxCalculator> {\n\t\tconst _marketId = (marketId as Market).id || marketId as string\n\t\treturn this.resources.fetch<TaxCalculator>({ type: 'tax_calculators' }, `markets/${_marketId}/tax_calculator`, params, options) as unknown as TaxCalculator\n\t}\n\n\tasync customer_group(marketId: string | Market, params?: QueryParamsRetrieve<CustomerGroup>, options?: ResourcesConfig): Promise<CustomerGroup> {\n\t\tconst _marketId = (marketId as Market).id || marketId as string\n\t\treturn this.resources.fetch<CustomerGroup>({ type: 'customer_groups' }, `markets/${_marketId}/customer_group`, params, options) as unknown as CustomerGroup\n\t}\n\n\tasync geocoder(marketId: string | Market, params?: QueryParamsRetrieve<Geocoder>, options?: ResourcesConfig): Promise<Geocoder> {\n\t\tconst _marketId = (marketId as Market).id || marketId as string\n\t\treturn this.resources.fetch<Geocoder>({ type: 'geocoders' }, `markets/${_marketId}/geocoder`, params, options) as unknown as Geocoder\n\t}\n\n\tasync default_shipping_method(marketId: string | Market, params?: QueryParamsRetrieve<ShippingMethod>, options?: ResourcesConfig): Promise<ShippingMethod> {\n\t\tconst _marketId = (marketId as Market).id || marketId as string\n\t\treturn this.resources.fetch<ShippingMethod>({ type: 'shipping_methods' }, `markets/${_marketId}/default_shipping_method`, params, options) as unknown as ShippingMethod\n\t}\n\n\tasync default_payment_method(marketId: string | Market, params?: QueryParamsRetrieve<PaymentMethod>, options?: ResourcesConfig): Promise<PaymentMethod> {\n\t\tconst _marketId = (marketId as Market).id || marketId as string\n\t\treturn this.resources.fetch<PaymentMethod>({ type: 'payment_methods' }, `markets/${_marketId}/default_payment_method`, params, options) as unknown as PaymentMethod\n\t}\n\n\tasync stores(marketId: string | Market, params?: QueryParamsList<Store>, options?: ResourcesConfig): Promise<ListResponse<Store>> {\n\t\tconst _marketId = (marketId as Market).id || marketId as string\n\t\treturn this.resources.fetch<Store>({ type: 'stores' }, `markets/${_marketId}/stores`, params, options) as unknown as ListResponse<Store>\n\t}\n\n\tasync price_list_schedulers(marketId: string | Market, params?: QueryParamsList<PriceListScheduler>, options?: ResourcesConfig): Promise<ListResponse<PriceListScheduler>> {\n\t\tconst _marketId = (marketId as Market).id || marketId as string\n\t\treturn this.resources.fetch<PriceListScheduler>({ type: 'price_list_schedulers' }, `markets/${_marketId}/price_list_schedulers`, params, options) as unknown as ListResponse<PriceListScheduler>\n\t}\n\n\tasync attachments(marketId: string | Market, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _marketId = (marketId as Market).id || marketId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `markets/${_marketId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(marketId: string | Market, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _marketId = (marketId as Market).id || marketId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `markets/${_marketId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _disable(id: string | Market, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\treturn this.resources.update<MarketUpdate, Market>({ id: (typeof id === 'string')? id: id.id, type: Markets.TYPE, _disable: true }, params, options)\n\t}\n\n\tasync _enable(id: string | Market, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\treturn this.resources.update<MarketUpdate, Market>({ id: (typeof id === 'string')? id: id.id, type: Markets.TYPE, _enable: true }, params, options)\n\t}\n\n\n\tisMarket(resource: any): resource is Market {\n\t\treturn resource.type && (resource.type === Markets.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): MarketRel {\n\t\treturn super.relationshipOneToOne<MarketRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): MarketRel[] {\n\t\treturn super.relationshipOneToMany<MarketRel>(...ids)\n\t}\n\n\n\ttype(): MarketType {\n\t\treturn Markets.TYPE\n\t}\n\n}\n\n\nconst instance = new Markets()\nexport default instance\n\nexport type { Markets, Market, MarketCreate, MarketUpdate, MarketType }\n"]}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { hx as Market, hy as MarketCreate, hA as MarketSort, n6 as MarketType, hz as MarketUpdate, bI as Markets, bH 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 { hx as Market, hy as MarketCreate, hA as MarketSort, n6 as MarketType, hz as MarketUpdate, bI as Markets, bH as default } from '../api-F1F37Dud.js';
|
2
2
|
import '../client.js';
|
3
3
|
import '../interceptor-k15jXzf0.js';
|
4
4
|
import '../types.js';
|
package/lib/resources/markets.js
CHANGED
@@ -31,6 +31,10 @@ class Markets extends ApiResource {
|
|
31
31
|
const _marketId = marketId.id || marketId;
|
32
32
|
return this.resources.fetch({ type: "subscription_models" }, `markets/${_marketId}/subscription_model`, params, options);
|
33
33
|
}
|
34
|
+
async discount_engine(marketId, params, options) {
|
35
|
+
const _marketId = marketId.id || marketId;
|
36
|
+
return this.resources.fetch({ type: "discount_engines" }, `markets/${_marketId}/discount_engine`, params, options);
|
37
|
+
}
|
34
38
|
async tax_calculator(marketId, params, options) {
|
35
39
|
const _marketId = marketId.id || marketId;
|
36
40
|
return this.resources.fetch({ type: "tax_calculators" }, `markets/${_marketId}/tax_calculator`, params, options);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/resources/markets.ts"],"names":[],"mappings":";;AAuPA,MAAM,gBAAgB,WAAoB,CAAA;AAAA,EAEzC,OAAgB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AC5G,EAEA,MAAM,QAAA,CAAS,EAAqB,EAAA,MAAA,EAAsC,OAA4C,EAAA;AACrH,IAAA,OAAO,KAAK,SAAU,CAAA,MAAA,CAA6B,EAAE,EAAK,EAAA,OAAO,OAAO,QAAW,GAAA,EAAA,GAAI,EAAG,CAAA,EAAA,EAAI,MAAM,OAAQ,CAAA,IAAA,EAAM,UAAU,IAAK,EAAA,EAAG,QAAQ,OAAO,CAAA;AAAA;AACpJ,EAEA,MAAM,OAAA,CAAQ,EAAqB,EAAA,MAAA,EAAsC,OAA4C,EAAA;AACpH,IAAA,OAAO,KAAK,SAAU,CAAA,MAAA,CAA6B,EAAE,EAAK,EAAA,OAAO,OAAO,QAAW,GAAA,EAAA,GAAI,EAAG,CAAA,EAAA,EAAI,MAAM,OAAQ,CAAA,IAAA,EAAM,SAAS,IAAK,EAAA,EAAG,QAAQ,OAAO,CAAA;AAAA;AACnJ,EAGA,SAAS,QAAmC,EAAA;AAC3C,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,OAAQ,CAAA,IAAA;AAAA;AACpD,EAGA,aAAa,EAA2C,EAAA;AACvD,IAAO,OAAA,KAAA,CAAM,qBAAgC,EAAE,CAAA;AAAA;AAChD,EAEA,sBAAsB,GAA4B,EAAA;AACjD,IAAO,OAAA,KAAA,CAAM,qBAAiC,CAAA,GAAG,GAAG,CAAA;AAAA;AACrD,EAGA,IAAmB,GAAA;AAClB,IAAA,OAAO,OAAQ,CAAA,IAAA;AAAA;AAGjB;AAGA,MAAM,QAAA,GAAW,IAAI,OAAQ,EAAA;AAC7B,IAAO,eAAQ,GAAA","file":"markets.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 { Merchant, MerchantType } from './merchants'\nimport type { PriceList, PriceListType } from './price_lists'\nimport type { InventoryModel, InventoryModelType } from './inventory_models'\nimport type { SubscriptionModel, SubscriptionModelType } from './subscription_models'\nimport type { TaxCalculator } from './tax_calculators'\nimport type { CustomerGroup, CustomerGroupType } from './customer_groups'\nimport type { Geocoder, GeocoderType } from './geocoders'\nimport type { ShippingMethod, ShippingMethodType } from './shipping_methods'\nimport type { PaymentMethod, PaymentMethodType } from './payment_methods'\nimport type { Store } from './stores'\nimport type { PriceListScheduler } from './price_list_schedulers'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\nimport type { AvalaraAccount, AvalaraAccountType } from './avalara_accounts'\nimport type { StripeTaxAccount, StripeTaxAccountType } from './stripe_tax_accounts'\nimport type { VertexAccount, VertexAccountType } from './vertex_accounts'\nimport type { TaxjarAccount, TaxjarAccountType } from './taxjar_accounts'\nimport type { ManualTaxCalculator, ManualTaxCalculatorType } from './manual_tax_calculators'\nimport type { ExternalTaxCalculator, ExternalTaxCalculatorType } from './external_tax_calculators'\n\n\ntype MarketType = 'markets'\ntype MarketRel = ResourceRel & { type: MarketType }\ntype MerchantRel = ResourceRel & { type: MerchantType }\ntype PriceListRel = ResourceRel & { type: PriceListType }\ntype InventoryModelRel = ResourceRel & { type: InventoryModelType }\ntype SubscriptionModelRel = ResourceRel & { type: SubscriptionModelType }\ntype AvalaraAccountRel = ResourceRel & { type: AvalaraAccountType }\ntype StripeTaxAccountRel = ResourceRel & { type: StripeTaxAccountType }\ntype VertexAccountRel = ResourceRel & { type: VertexAccountType }\ntype TaxjarAccountRel = ResourceRel & { type: TaxjarAccountType }\ntype ManualTaxCalculatorRel = ResourceRel & { type: ManualTaxCalculatorType }\ntype ExternalTaxCalculatorRel = ResourceRel & { type: ExternalTaxCalculatorType }\ntype CustomerGroupRel = ResourceRel & { type: CustomerGroupType }\ntype GeocoderRel = ResourceRel & { type: GeocoderType }\ntype ShippingMethodRel = ResourceRel & { type: ShippingMethodType }\ntype PaymentMethodRel = ResourceRel & { type: PaymentMethodType }\n\n\nexport type MarketSort = Pick<Market, 'id' | 'name' | 'code' | 'disabled_at'> & ResourceSort\n// export type MarketFilter = Pick<Market, 'id' | 'name' | 'code' | 'disabled_at'> & ResourceFilter\n\n\ninterface Market extends Resource {\n\t\n\treadonly type: MarketType\n\n\t/** \n\t * Unique identifier for the market (numeric).\n\t * @example ```1234```\n\t */\n\tnumber?: number | null\n\t/** \n\t * The market's internal name.\n\t * @example ```\"EU Market\"```\n\t */\n\tname: string\n\t/** \n\t * A string that you can use to identify the market (must be unique within the environment).\n\t * @example ```\"europe1\"```\n\t */\n\tcode?: string | null\n\t/** \n\t * The Facebook Pixed ID.\n\t * @example ```\"1234567890\"```\n\t */\n\tfacebook_pixel_id?: string | null\n\t/** \n\t * The checkout URL for this market.\n\t * @example ```\"https://checkout.yourbrand.com/:order_id\"```\n\t */\n\tcheckout_url?: 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 URL used to validate orders by an external source.\n\t * @example ```\"https://external_validation.yourbrand.com\"```\n\t */\n\texternal_order_validation_url?: string | null\n\t/** \n\t * Indicates if market belongs to a customer_group.\n\t * @example ```true```\n\t */\n\tprivate?: boolean | null\n\t/** \n\t * When specified indicates the maximum number of shipping line items with cost that will be added to an order.\n\t * @example ```3```\n\t */\n\tshipping_cost_cutoff?: number | 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 shared secret used to sign the external request payload.\n\t * @example ```\"1c0994cc4e996e8c6ee56a2198f66f3c\"```\n\t */\n\tshared_secret: string\n\n\tmerchant?: Merchant | null\n\tprice_list?: PriceList | null\n\tbase_price_list?: PriceList | null\n\tinventory_model?: InventoryModel | null\n\tsubscription_model?: SubscriptionModel | null\n\ttax_calculator?: AvalaraAccount | StripeTaxAccount | VertexAccount | TaxjarAccount | ManualTaxCalculator | ExternalTaxCalculator | null\n\tcustomer_group?: CustomerGroup | null\n\tgeocoder?: Geocoder | null\n\tdefault_shipping_method?: ShippingMethod | null\n\tdefault_payment_method?: PaymentMethod | null\n\tstores?: Store[] | null\n\tprice_list_schedulers?: PriceListScheduler[] | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface MarketCreate extends ResourceCreate {\n\t\n\t/** \n\t * The market's internal name.\n\t * @example ```\"EU Market\"```\n\t */\n\tname: string\n\t/** \n\t * A string that you can use to identify the market (must be unique within the environment).\n\t * @example ```\"europe1\"```\n\t */\n\tcode?: string | null\n\t/** \n\t * The Facebook Pixed ID.\n\t * @example ```\"1234567890\"```\n\t */\n\tfacebook_pixel_id?: string | null\n\t/** \n\t * The checkout URL for this market.\n\t * @example ```\"https://checkout.yourbrand.com/:order_id\"```\n\t */\n\tcheckout_url?: 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 URL used to validate orders by an external source.\n\t * @example ```\"https://external_validation.yourbrand.com\"```\n\t */\n\texternal_order_validation_url?: string | null\n\t/** \n\t * When specified indicates the maximum number of shipping line items with cost that will be added to an order.\n\t * @example ```3```\n\t */\n\tshipping_cost_cutoff?: number | 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\tmerchant: MerchantRel\n\tprice_list: PriceListRel\n\tinventory_model: InventoryModelRel\n\tsubscription_model?: SubscriptionModelRel | null\n\ttax_calculator?: AvalaraAccountRel | StripeTaxAccountRel | VertexAccountRel | TaxjarAccountRel | ManualTaxCalculatorRel | ExternalTaxCalculatorRel | null\n\tcustomer_group?: CustomerGroupRel | null\n\tgeocoder?: GeocoderRel | null\n\tdefault_shipping_method?: ShippingMethodRel | null\n\tdefault_payment_method?: PaymentMethodRel | null\n\n}\n\n\ninterface MarketUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The market's internal name.\n\t * @example ```\"EU Market\"```\n\t */\n\tname?: string | null\n\t/** \n\t * A string that you can use to identify the market (must be unique within the environment).\n\t * @example ```\"europe1\"```\n\t */\n\tcode?: string | null\n\t/** \n\t * The Facebook Pixed ID.\n\t * @example ```\"1234567890\"```\n\t */\n\tfacebook_pixel_id?: string | null\n\t/** \n\t * The checkout URL for this market.\n\t * @example ```\"https://checkout.yourbrand.com/:order_id\"```\n\t */\n\tcheckout_url?: 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 URL used to validate orders by an external source.\n\t * @example ```\"https://external_validation.yourbrand.com\"```\n\t */\n\texternal_order_validation_url?: string | null\n\t/** \n\t * When specified indicates the maximum number of shipping line items with cost that will be added to an order.\n\t * @example ```3```\n\t */\n\tshipping_cost_cutoff?: number | 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\tmerchant?: MerchantRel | null\n\tprice_list?: PriceListRel | null\n\tinventory_model?: InventoryModelRel | null\n\tsubscription_model?: SubscriptionModelRel | null\n\ttax_calculator?: AvalaraAccountRel | StripeTaxAccountRel | VertexAccountRel | TaxjarAccountRel | ManualTaxCalculatorRel | ExternalTaxCalculatorRel | null\n\tcustomer_group?: CustomerGroupRel | null\n\tgeocoder?: GeocoderRel | null\n\tdefault_shipping_method?: ShippingMethodRel | null\n\tdefault_payment_method?: PaymentMethodRel | null\n\n}\n\n\nclass Markets extends ApiResource<Market> {\n\n\tstatic readonly TYPE: MarketType = 'markets' as const\n\n\tasync create(resource: MarketCreate, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\treturn this.resources.create<MarketCreate, Market>({ ...resource, type: Markets.TYPE }, params, options)\n\t}\n\n\tasync update(resource: MarketUpdate, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\treturn this.resources.update<MarketUpdate, Market>({ ...resource, type: Markets.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: Markets.TYPE } : id, options)\n\t}\n\n\tasync merchant(marketId: string | Market, params?: QueryParamsRetrieve<Merchant>, options?: ResourcesConfig): Promise<Merchant> {\n\t\tconst _marketId = (marketId as Market).id || marketId as string\n\t\treturn this.resources.fetch<Merchant>({ type: 'merchants' }, `markets/${_marketId}/merchant`, params, options) as unknown as Merchant\n\t}\n\n\tasync price_list(marketId: string | Market, params?: QueryParamsRetrieve<PriceList>, options?: ResourcesConfig): Promise<PriceList> {\n\t\tconst _marketId = (marketId as Market).id || marketId as string\n\t\treturn this.resources.fetch<PriceList>({ type: 'price_lists' }, `markets/${_marketId}/price_list`, params, options) as unknown as PriceList\n\t}\n\n\tasync base_price_list(marketId: string | Market, params?: QueryParamsRetrieve<PriceList>, options?: ResourcesConfig): Promise<PriceList> {\n\t\tconst _marketId = (marketId as Market).id || marketId as string\n\t\treturn this.resources.fetch<PriceList>({ type: 'price_lists' }, `markets/${_marketId}/base_price_list`, params, options) as unknown as PriceList\n\t}\n\n\tasync inventory_model(marketId: string | Market, params?: QueryParamsRetrieve<InventoryModel>, options?: ResourcesConfig): Promise<InventoryModel> {\n\t\tconst _marketId = (marketId as Market).id || marketId as string\n\t\treturn this.resources.fetch<InventoryModel>({ type: 'inventory_models' }, `markets/${_marketId}/inventory_model`, params, options) as unknown as InventoryModel\n\t}\n\n\tasync subscription_model(marketId: string | Market, params?: QueryParamsRetrieve<SubscriptionModel>, options?: ResourcesConfig): Promise<SubscriptionModel> {\n\t\tconst _marketId = (marketId as Market).id || marketId as string\n\t\treturn this.resources.fetch<SubscriptionModel>({ type: 'subscription_models' }, `markets/${_marketId}/subscription_model`, params, options) as unknown as SubscriptionModel\n\t}\n\n\tasync tax_calculator(marketId: string | Market, params?: QueryParamsRetrieve<TaxCalculator>, options?: ResourcesConfig): Promise<TaxCalculator> {\n\t\tconst _marketId = (marketId as Market).id || marketId as string\n\t\treturn this.resources.fetch<TaxCalculator>({ type: 'tax_calculators' }, `markets/${_marketId}/tax_calculator`, params, options) as unknown as TaxCalculator\n\t}\n\n\tasync customer_group(marketId: string | Market, params?: QueryParamsRetrieve<CustomerGroup>, options?: ResourcesConfig): Promise<CustomerGroup> {\n\t\tconst _marketId = (marketId as Market).id || marketId as string\n\t\treturn this.resources.fetch<CustomerGroup>({ type: 'customer_groups' }, `markets/${_marketId}/customer_group`, params, options) as unknown as CustomerGroup\n\t}\n\n\tasync geocoder(marketId: string | Market, params?: QueryParamsRetrieve<Geocoder>, options?: ResourcesConfig): Promise<Geocoder> {\n\t\tconst _marketId = (marketId as Market).id || marketId as string\n\t\treturn this.resources.fetch<Geocoder>({ type: 'geocoders' }, `markets/${_marketId}/geocoder`, params, options) as unknown as Geocoder\n\t}\n\n\tasync default_shipping_method(marketId: string | Market, params?: QueryParamsRetrieve<ShippingMethod>, options?: ResourcesConfig): Promise<ShippingMethod> {\n\t\tconst _marketId = (marketId as Market).id || marketId as string\n\t\treturn this.resources.fetch<ShippingMethod>({ type: 'shipping_methods' }, `markets/${_marketId}/default_shipping_method`, params, options) as unknown as ShippingMethod\n\t}\n\n\tasync default_payment_method(marketId: string | Market, params?: QueryParamsRetrieve<PaymentMethod>, options?: ResourcesConfig): Promise<PaymentMethod> {\n\t\tconst _marketId = (marketId as Market).id || marketId as string\n\t\treturn this.resources.fetch<PaymentMethod>({ type: 'payment_methods' }, `markets/${_marketId}/default_payment_method`, params, options) as unknown as PaymentMethod\n\t}\n\n\tasync stores(marketId: string | Market, params?: QueryParamsList<Store>, options?: ResourcesConfig): Promise<ListResponse<Store>> {\n\t\tconst _marketId = (marketId as Market).id || marketId as string\n\t\treturn this.resources.fetch<Store>({ type: 'stores' }, `markets/${_marketId}/stores`, params, options) as unknown as ListResponse<Store>\n\t}\n\n\tasync price_list_schedulers(marketId: string | Market, params?: QueryParamsList<PriceListScheduler>, options?: ResourcesConfig): Promise<ListResponse<PriceListScheduler>> {\n\t\tconst _marketId = (marketId as Market).id || marketId as string\n\t\treturn this.resources.fetch<PriceListScheduler>({ type: 'price_list_schedulers' }, `markets/${_marketId}/price_list_schedulers`, params, options) as unknown as ListResponse<PriceListScheduler>\n\t}\n\n\tasync attachments(marketId: string | Market, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _marketId = (marketId as Market).id || marketId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `markets/${_marketId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(marketId: string | Market, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _marketId = (marketId as Market).id || marketId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `markets/${_marketId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _disable(id: string | Market, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\treturn this.resources.update<MarketUpdate, Market>({ id: (typeof id === 'string')? id: id.id, type: Markets.TYPE, _disable: true }, params, options)\n\t}\n\n\tasync _enable(id: string | Market, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\treturn this.resources.update<MarketUpdate, Market>({ id: (typeof id === 'string')? id: id.id, type: Markets.TYPE, _enable: true }, params, options)\n\t}\n\n\n\tisMarket(resource: any): resource is Market {\n\t\treturn resource.type && (resource.type === Markets.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): MarketRel {\n\t\treturn super.relationshipOneToOne<MarketRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): MarketRel[] {\n\t\treturn super.relationshipOneToMany<MarketRel>(...ids)\n\t}\n\n\n\ttype(): MarketType {\n\t\treturn Markets.TYPE\n\t}\n\n}\n\n\nconst instance = new Markets()\nexport default instance\n\nexport type { Market, MarketCreate, MarketUpdate, MarketType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/markets.ts"],"names":[],"mappings":";;AA4PA,MAAM,gBAAgB,WAAoB,CAAA;AAAA,EAEzC,OAAgB,IAAmB,GAAA,SAAA;AAAA,EAEnC,MAAM,MAAA,CAAO,QAAwB,EAAA,MAAA,EAAsC,OAA4C,EAAA;AACtH,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA6B,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,OAAQ,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACxG,EAEA,MAAM,MAAA,CAAO,QAAwB,EAAA,MAAA,EAAsC,OAA4C,EAAA;AACtH,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA6B,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,OAAQ,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACxG,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,OAAA,CAAQ,IAAK,EAAA,GAAI,IAAI,OAAO,CAAA;AAAA;AAC/F,EAEA,MAAM,QAAA,CAAS,QAA2B,EAAA,MAAA,EAAwC,OAA8C,EAAA;AAC/H,IAAM,MAAA,SAAA,GAAa,SAAoB,EAAM,IAAA,QAAA;AAC7C,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAgB,E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mC,EAAA;AAC3C,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,OAAQ,CAAA,IAAA;AAAA;AACpD,EAGA,aAAa,EAA2C,EAAA;AACvD,IAAO,OAAA,KAAA,CAAM,qBAAgC,EAAE,CAAA;AAAA;AAChD,EAEA,sBAAsB,GAA4B,EAAA;AACjD,IAAO,OAAA,KAAA,CAAM,qBAAiC,CAAA,GAAG,GAAG,CAAA;AAAA;AACrD,EAGA,IAAmB,GAAA;AAClB,IAAA,OAAO,OAAQ,CAAA,IAAA;AAAA;AAGjB;AAGA,MAAM,QAAA,GAAW,IAAI,OAAQ,EAAA;AAC7B,IAAO,eAAQ,GAAA","file":"markets.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 { Merchant, MerchantType } from './merchants'\nimport type { PriceList, PriceListType } from './price_lists'\nimport type { InventoryModel, InventoryModelType } from './inventory_models'\nimport type { SubscriptionModel, SubscriptionModelType } from './subscription_models'\nimport type { DiscountEngine, DiscountEngineType } from './discount_engines'\nimport type { TaxCalculator } from './tax_calculators'\nimport type { CustomerGroup, CustomerGroupType } from './customer_groups'\nimport type { Geocoder, GeocoderType } from './geocoders'\nimport type { ShippingMethod, ShippingMethodType } from './shipping_methods'\nimport type { PaymentMethod, PaymentMethodType } from './payment_methods'\nimport type { Store } from './stores'\nimport type { PriceListScheduler } from './price_list_schedulers'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\nimport type { AvalaraAccount, AvalaraAccountType } from './avalara_accounts'\nimport type { StripeTaxAccount, StripeTaxAccountType } from './stripe_tax_accounts'\nimport type { VertexAccount, VertexAccountType } from './vertex_accounts'\nimport type { TaxjarAccount, TaxjarAccountType } from './taxjar_accounts'\nimport type { ManualTaxCalculator, ManualTaxCalculatorType } from './manual_tax_calculators'\nimport type { ExternalTaxCalculator, ExternalTaxCalculatorType } from './external_tax_calculators'\n\n\ntype MarketType = 'markets'\ntype MarketRel = ResourceRel & { type: MarketType }\ntype MerchantRel = ResourceRel & { type: MerchantType }\ntype PriceListRel = ResourceRel & { type: PriceListType }\ntype InventoryModelRel = ResourceRel & { type: InventoryModelType }\ntype SubscriptionModelRel = ResourceRel & { type: SubscriptionModelType }\ntype DiscountEngineRel = ResourceRel & { type: DiscountEngineType }\ntype AvalaraAccountRel = ResourceRel & { type: AvalaraAccountType }\ntype StripeTaxAccountRel = ResourceRel & { type: StripeTaxAccountType }\ntype VertexAccountRel = ResourceRel & { type: VertexAccountType }\ntype TaxjarAccountRel = ResourceRel & { type: TaxjarAccountType }\ntype ManualTaxCalculatorRel = ResourceRel & { type: ManualTaxCalculatorType }\ntype ExternalTaxCalculatorRel = ResourceRel & { type: ExternalTaxCalculatorType }\ntype CustomerGroupRel = ResourceRel & { type: CustomerGroupType }\ntype GeocoderRel = ResourceRel & { type: GeocoderType }\ntype ShippingMethodRel = ResourceRel & { type: ShippingMethodType }\ntype PaymentMethodRel = ResourceRel & { type: PaymentMethodType }\n\n\nexport type MarketSort = Pick<Market, 'id' | 'name' | 'code' | 'disabled_at'> & ResourceSort\n// export type MarketFilter = Pick<Market, 'id' | 'name' | 'code' | 'disabled_at'> & ResourceFilter\n\n\ninterface Market extends Resource {\n\t\n\treadonly type: MarketType\n\n\t/** \n\t * Unique identifier for the market (numeric).\n\t * @example ```1234```\n\t */\n\tnumber?: number | null\n\t/** \n\t * The market's internal name.\n\t * @example ```\"EU Market\"```\n\t */\n\tname: string\n\t/** \n\t * A string that you can use to identify the market (must be unique within the environment).\n\t * @example ```\"europe1\"```\n\t */\n\tcode?: string | null\n\t/** \n\t * The Facebook Pixed ID.\n\t * @example ```\"1234567890\"```\n\t */\n\tfacebook_pixel_id?: string | null\n\t/** \n\t * The checkout URL for this market.\n\t * @example ```\"https://checkout.yourbrand.com/:order_id\"```\n\t */\n\tcheckout_url?: 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 URL used to validate orders by an external source.\n\t * @example ```\"https://external_validation.yourbrand.com\"```\n\t */\n\texternal_order_validation_url?: string | null\n\t/** \n\t * Indicates if market belongs to a customer_group.\n\t * @example ```true```\n\t */\n\tprivate?: boolean | null\n\t/** \n\t * When specified indicates the maximum number of shipping line items with cost that will be added to an order.\n\t * @example ```3```\n\t */\n\tshipping_cost_cutoff?: number | 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 shared secret used to sign the external request payload.\n\t * @example ```\"1c0994cc4e996e8c6ee56a2198f66f3c\"```\n\t */\n\tshared_secret: string\n\n\tmerchant?: Merchant | null\n\tprice_list?: PriceList | null\n\tbase_price_list?: PriceList | null\n\tinventory_model?: InventoryModel | null\n\tsubscription_model?: SubscriptionModel | null\n\tdiscount_engine?: DiscountEngine | null\n\ttax_calculator?: AvalaraAccount | StripeTaxAccount | VertexAccount | TaxjarAccount | ManualTaxCalculator | ExternalTaxCalculator | null\n\tcustomer_group?: CustomerGroup | null\n\tgeocoder?: Geocoder | null\n\tdefault_shipping_method?: ShippingMethod | null\n\tdefault_payment_method?: PaymentMethod | null\n\tstores?: Store[] | null\n\tprice_list_schedulers?: PriceListScheduler[] | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface MarketCreate extends ResourceCreate {\n\t\n\t/** \n\t * The market's internal name.\n\t * @example ```\"EU Market\"```\n\t */\n\tname: string\n\t/** \n\t * A string that you can use to identify the market (must be unique within the environment).\n\t * @example ```\"europe1\"```\n\t */\n\tcode?: string | null\n\t/** \n\t * The Facebook Pixed ID.\n\t * @example ```\"1234567890\"```\n\t */\n\tfacebook_pixel_id?: string | null\n\t/** \n\t * The checkout URL for this market.\n\t * @example ```\"https://checkout.yourbrand.com/:order_id\"```\n\t */\n\tcheckout_url?: 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 URL used to validate orders by an external source.\n\t * @example ```\"https://external_validation.yourbrand.com\"```\n\t */\n\texternal_order_validation_url?: string | null\n\t/** \n\t * When specified indicates the maximum number of shipping line items with cost that will be added to an order.\n\t * @example ```3```\n\t */\n\tshipping_cost_cutoff?: number | 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\tmerchant: MerchantRel\n\tprice_list: PriceListRel\n\tinventory_model: InventoryModelRel\n\tsubscription_model?: SubscriptionModelRel | null\n\tdiscount_engine?: DiscountEngineRel | null\n\ttax_calculator?: AvalaraAccountRel | StripeTaxAccountRel | VertexAccountRel | TaxjarAccountRel | ManualTaxCalculatorRel | ExternalTaxCalculatorRel | null\n\tcustomer_group?: CustomerGroupRel | null\n\tgeocoder?: GeocoderRel | null\n\tdefault_shipping_method?: ShippingMethodRel | null\n\tdefault_payment_method?: PaymentMethodRel | null\n\n}\n\n\ninterface MarketUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The market's internal name.\n\t * @example ```\"EU Market\"```\n\t */\n\tname?: string | null\n\t/** \n\t * A string that you can use to identify the market (must be unique within the environment).\n\t * @example ```\"europe1\"```\n\t */\n\tcode?: string | null\n\t/** \n\t * The Facebook Pixed ID.\n\t * @example ```\"1234567890\"```\n\t */\n\tfacebook_pixel_id?: string | null\n\t/** \n\t * The checkout URL for this market.\n\t * @example ```\"https://checkout.yourbrand.com/:order_id\"```\n\t */\n\tcheckout_url?: 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 URL used to validate orders by an external source.\n\t * @example ```\"https://external_validation.yourbrand.com\"```\n\t */\n\texternal_order_validation_url?: string | null\n\t/** \n\t * When specified indicates the maximum number of shipping line items with cost that will be added to an order.\n\t * @example ```3```\n\t */\n\tshipping_cost_cutoff?: number | 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\tmerchant?: MerchantRel | null\n\tprice_list?: PriceListRel | null\n\tinventory_model?: InventoryModelRel | null\n\tsubscription_model?: SubscriptionModelRel | null\n\tdiscount_engine?: DiscountEngineRel | null\n\ttax_calculator?: AvalaraAccountRel | StripeTaxAccountRel | VertexAccountRel | TaxjarAccountRel | ManualTaxCalculatorRel | ExternalTaxCalculatorRel | null\n\tcustomer_group?: CustomerGroupRel | null\n\tgeocoder?: GeocoderRel | null\n\tdefault_shipping_method?: ShippingMethodRel | null\n\tdefault_payment_method?: PaymentMethodRel | null\n\n}\n\n\nclass Markets extends ApiResource<Market> {\n\n\tstatic readonly TYPE: MarketType = 'markets' as const\n\n\tasync create(resource: MarketCreate, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\treturn this.resources.create<MarketCreate, Market>({ ...resource, type: Markets.TYPE }, params, options)\n\t}\n\n\tasync update(resource: MarketUpdate, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\treturn this.resources.update<MarketUpdate, Market>({ ...resource, type: Markets.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: Markets.TYPE } : id, options)\n\t}\n\n\tasync merchant(marketId: string | Market, params?: QueryParamsRetrieve<Merchant>, options?: ResourcesConfig): Promise<Merchant> {\n\t\tconst _marketId = (marketId as Market).id || marketId as string\n\t\treturn this.resources.fetch<Merchant>({ type: 'merchants' }, `markets/${_marketId}/merchant`, params, options) as unknown as Merchant\n\t}\n\n\tasync price_list(marketId: string | Market, params?: QueryParamsRetrieve<PriceList>, options?: ResourcesConfig): Promise<PriceList> {\n\t\tconst _marketId = (marketId as Market).id || marketId as string\n\t\treturn this.resources.fetch<PriceList>({ type: 'price_lists' }, `markets/${_marketId}/price_list`, params, options) as unknown as PriceList\n\t}\n\n\tasync base_price_list(marketId: string | Market, params?: QueryParamsRetrieve<PriceList>, options?: ResourcesConfig): Promise<PriceList> {\n\t\tconst _marketId = (marketId as Market).id || marketId as string\n\t\treturn this.resources.fetch<PriceList>({ type: 'price_lists' }, `markets/${_marketId}/base_price_list`, params, options) as unknown as PriceList\n\t}\n\n\tasync inventory_model(marketId: string | Market, params?: QueryParamsRetrieve<InventoryModel>, options?: ResourcesConfig): Promise<InventoryModel> {\n\t\tconst _marketId = (marketId as Market).id || marketId as string\n\t\treturn this.resources.fetch<InventoryModel>({ type: 'inventory_models' }, `markets/${_marketId}/inventory_model`, params, options) as unknown as InventoryModel\n\t}\n\n\tasync subscription_model(marketId: string | Market, params?: QueryParamsRetrieve<SubscriptionModel>, options?: ResourcesConfig): Promise<SubscriptionModel> {\n\t\tconst _marketId = (marketId as Market).id || marketId as string\n\t\treturn this.resources.fetch<SubscriptionModel>({ type: 'subscription_models' }, `markets/${_marketId}/subscription_model`, params, options) as unknown as SubscriptionModel\n\t}\n\n\tasync discount_engine(marketId: string | Market, params?: QueryParamsRetrieve<DiscountEngine>, options?: ResourcesConfig): Promise<DiscountEngine> {\n\t\tconst _marketId = (marketId as Market).id || marketId as string\n\t\treturn this.resources.fetch<DiscountEngine>({ type: 'discount_engines' }, `markets/${_marketId}/discount_engine`, params, options) as unknown as DiscountEngine\n\t}\n\n\tasync tax_calculator(marketId: string | Market, params?: QueryParamsRetrieve<TaxCalculator>, options?: ResourcesConfig): Promise<TaxCalculator> {\n\t\tconst _marketId = (marketId as Market).id || marketId as string\n\t\treturn this.resources.fetch<TaxCalculator>({ type: 'tax_calculators' }, `markets/${_marketId}/tax_calculator`, params, options) as unknown as TaxCalculator\n\t}\n\n\tasync customer_group(marketId: string | Market, params?: QueryParamsRetrieve<CustomerGroup>, options?: ResourcesConfig): Promise<CustomerGroup> {\n\t\tconst _marketId = (marketId as Market).id || marketId as string\n\t\treturn this.resources.fetch<CustomerGroup>({ type: 'customer_groups' }, `markets/${_marketId}/customer_group`, params, options) as unknown as CustomerGroup\n\t}\n\n\tasync geocoder(marketId: string | Market, params?: QueryParamsRetrieve<Geocoder>, options?: ResourcesConfig): Promise<Geocoder> {\n\t\tconst _marketId = (marketId as Market).id || marketId as string\n\t\treturn this.resources.fetch<Geocoder>({ type: 'geocoders' }, `markets/${_marketId}/geocoder`, params, options) as unknown as Geocoder\n\t}\n\n\tasync default_shipping_method(marketId: string | Market, params?: QueryParamsRetrieve<ShippingMethod>, options?: ResourcesConfig): Promise<ShippingMethod> {\n\t\tconst _marketId = (marketId as Market).id || marketId as string\n\t\treturn this.resources.fetch<ShippingMethod>({ type: 'shipping_methods' }, `markets/${_marketId}/default_shipping_method`, params, options) as unknown as ShippingMethod\n\t}\n\n\tasync default_payment_method(marketId: string | Market, params?: QueryParamsRetrieve<PaymentMethod>, options?: ResourcesConfig): Promise<PaymentMethod> {\n\t\tconst _marketId = (marketId as Market).id || marketId as string\n\t\treturn this.resources.fetch<PaymentMethod>({ type: 'payment_methods' }, `markets/${_marketId}/default_payment_method`, params, options) as unknown as PaymentMethod\n\t}\n\n\tasync stores(marketId: string | Market, params?: QueryParamsList<Store>, options?: ResourcesConfig): Promise<ListResponse<Store>> {\n\t\tconst _marketId = (marketId as Market).id || marketId as string\n\t\treturn this.resources.fetch<Store>({ type: 'stores' }, `markets/${_marketId}/stores`, params, options) as unknown as ListResponse<Store>\n\t}\n\n\tasync price_list_schedulers(marketId: string | Market, params?: QueryParamsList<PriceListScheduler>, options?: ResourcesConfig): Promise<ListResponse<PriceListScheduler>> {\n\t\tconst _marketId = (marketId as Market).id || marketId as string\n\t\treturn this.resources.fetch<PriceListScheduler>({ type: 'price_list_schedulers' }, `markets/${_marketId}/price_list_schedulers`, params, options) as unknown as ListResponse<PriceListScheduler>\n\t}\n\n\tasync attachments(marketId: string | Market, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _marketId = (marketId as Market).id || marketId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `markets/${_marketId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(marketId: string | Market, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _marketId = (marketId as Market).id || marketId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `markets/${_marketId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _disable(id: string | Market, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\treturn this.resources.update<MarketUpdate, Market>({ id: (typeof id === 'string')? id: id.id, type: Markets.TYPE, _disable: true }, params, options)\n\t}\n\n\tasync _enable(id: string | Market, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\treturn this.resources.update<MarketUpdate, Market>({ id: (typeof id === 'string')? id: id.id, type: Markets.TYPE, _enable: true }, params, options)\n\t}\n\n\n\tisMarket(resource: any): resource is Market {\n\t\treturn resource.type && (resource.type === Markets.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): MarketRel {\n\t\treturn super.relationshipOneToOne<MarketRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): MarketRel[] {\n\t\treturn super.relationshipOneToMany<MarketRel>(...ids)\n\t}\n\n\n\ttype(): MarketType {\n\t\treturn Markets.TYPE\n\t}\n\n}\n\n\nconst instance = new Markets()\nexport default instance\n\nexport type { Mark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AA8D,EAAA;AACpJ,IAAM,MAAA,WAAA,GAAe,WAAwB,EAAM,IAAA,UAAA;AACnD,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAkB,EAAE,IAAA,EAAM,aAAc,EAAA,EAAG,CAAa,UAAA,EAAA,WAAW,CAAgB,YAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACzH,EAEA,MAAM,QAAA,CAAS,UAA+B,EAAA,MAAA,EAAmC,OAA2D,EAAA;AAC3I,IAAM,MAAA,WAAA,GAAe,WAAwB,EAAM,IAAA,UAAA;AACnD,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAe,EAAE,IAAA,EAAM,UAAW,EAAA,EAAG,CAAa,UAAA,EAAA,WAAW,CAAa,SAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAChH,EAGA,WAAW,QAAqC,EAAA;AAC/C,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,SAAU,CAAA,IAAA;AAAA;AACtD,EAGA,aAAa,EAA6C,EAAA;AACzD,IAAO,OAAA,KAAA,CAAM,qBAAkC,EAAE,CAAA;AAAA;AAClD,EAEA,sBAAsB,GAA8B,EAAA;AACnD,IAAO,OAAA,KAAA,CAAM,qBAAmC,CAAA,GAAG,GAAG,CAAA;AAAA;AACvD,EAGA,IAAqB,GAAA;AACpB,IAAA,OAAO,SAAU,CAAA,IAAA;AAAA;AAGnB;AAGA,MAAM,QAAA,GAAW,IAAI,SAAU,EAAA;AAC/B,IAAO,iBAAQ,GAAA","file":"merchants.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 { Address, AddressType } from './addresses'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype MerchantType = 'merchants'\ntype MerchantRel = ResourceRel & { type: MerchantType }\ntype AddressRel = ResourceRel & { type: AddressType }\n\n\nexport type MerchantSort = Pick<Merchant, 'id' | 'name'> & ResourceSort\n// export type MerchantFilter = Pick<Merchant, 'id' | 'name'> & ResourceFilter\n\n\ninterface Merchant extends Resource {\n\t\n\treadonly type: MerchantType\n\n\t/** \n\t * The merchant's internal name.\n\t * @example ```\"The Brand Inc.\"```\n\t */\n\tname: string\n\n\taddress?: Address | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface MerchantCreate extends ResourceCreate {\n\t\n\t/** \n\t * The merchant's internal name.\n\t * @example ```\"The Brand Inc.\"```\n\t */\n\tname: string\n\n\taddress: AddressRel\n\n}\n\n\ninterface MerchantUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The merchant's internal name.\n\t * @example ```\"The Brand Inc.\"```\n\t */\n\tname?: string | null\n\n\taddress?: AddressRel | null\n\n}\n\n\nclass Merchants extends ApiResource<Merchant> {\n\n\tstatic readonly TYPE: MerchantType = 'merchants' as const\n\n\tasync create(resource: MerchantCreate, params?: QueryParamsRetrieve<Merchant>, options?: ResourcesConfig): Promise<Merchant> {\n\t\treturn this.resources.create<MerchantCreate, Merchant>({ ...resource, type: Merchants.TYPE }, params, options)\n\t}\n\n\tasync update(resource: MerchantUpdate, params?: QueryParamsRetrieve<Merchant>, options?: ResourcesConfig): Promise<Merchant> {\n\t\treturn this.resources.update<MerchantUpdate, Merchant>({ ...resource, type: Merchants.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: Merchants.TYPE } : id, options)\n\t}\n\n\tasync address(merchantId: string | Merchant, params?: QueryParamsRetrieve<Address>, options?: ResourcesConfig): Promise<Address> {\n\t\tconst _merchantId = (merchantId as Merchant).id || merchantId as string\n\t\treturn this.resources.fetch<Address>({ type: 'addresses' }, `merchants/${_merchantId}/address`, params, options) as unknown as Address\n\t}\n\n\tasync attachments(merchantId: string | Merchant, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _merchantId = (merchantId as Merchant).id || merchantId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `merchants/${_merchantId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(merchantId: string | Merchant, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _merchantId = (merchantId as Merchant).id || merchantId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `merchants/${_merchantId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisMerchant(resource: any): resource is Merchant {\n\t\treturn resource.type && (resource.type === Merchants.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): MerchantRel {\n\t\treturn super.relationshipOneToOne<MerchantRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): MerchantRel[] {\n\t\treturn super.relationshipOneToMany<MerchantRel>(...ids)\n\t}\n\n\n\ttype(): MerchantType {\n\t\treturn Merchants.TYPE\n\t}\n\n}\n\n\nconst instance = new Merchants()\nexport default instance\n\nexport type { Merchant, MerchantCreate, MerchantUpdate, MerchantType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/merchants.ts"],"names":["ApiResource"],"mappings":";;;;AA6DA,MAAM,kBAAkBA,oBAAsB,CAAA;AAAA,EAE7C,OAAgB,IAAqB,GAAA,WAAA;AAAA,EAErC,MAAM,MAAA,CAAO,QAA0B,EAAA,MAAA,EAAwC,OAA8C,EAAA;AAC5H,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAiC,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,SAAU,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC9G,EAEA,MAAM,MAAA,CAAO,QA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CAAa,UAAA,EAAA,WAAW,CAAa,SAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAChH,EAGA,WAAW,QAAqC,EAAA;AAC/C,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,SAAU,CAAA,IAAA;AAAA;AACtD,EAGA,aAAa,EAA6C,EAAA;AACzD,IAAO,OAAA,KAAA,CAAM,qBAAkC,EAAE,CAAA;AAAA;AAClD,EAEA,sBAAsB,GAA8B,EAAA;AACnD,IAAO,OAAA,KAAA,CAAM,qBAAmC,CAAA,GAAG,GAAG,CAAA;AAAA;AACvD,EAGA,IAAqB,GAAA;AACpB,IAAA,OAAO,SAAU,CAAA,IAAA;AAAA;AAGnB;AAGA,MAAM,QAAA,GAAW,IAAI,SAAU,EAAA;AAC/B,IAAO,iBAAQ,GAAA","file":"merchants.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 { Address, AddressType } from './addresses'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype MerchantType = 'merchants'\ntype MerchantRel = ResourceRel & { type: MerchantType }\ntype AddressRel = ResourceRel & { type: AddressType }\n\n\nexport type MerchantSort = Pick<Merchant, 'id' | 'name'> & ResourceSort\n// export type MerchantFilter = Pick<Merchant, 'id' | 'name'> & ResourceFilter\n\n\ninterface Merchant extends Resource {\n\t\n\treadonly type: MerchantType\n\n\t/** \n\t * The merchant's internal name.\n\t * @example ```\"The Brand Inc.\"```\n\t */\n\tname: string\n\n\taddress?: Address | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface MerchantCreate extends ResourceCreate {\n\t\n\t/** \n\t * The merchant's internal name.\n\t * @example ```\"The Brand Inc.\"```\n\t */\n\tname: string\n\n\taddress: AddressRel\n\n}\n\n\ninterface MerchantUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The merchant's internal name.\n\t * @example ```\"The Brand Inc.\"```\n\t */\n\tname?: string | null\n\n\taddress?: AddressRel | null\n\n}\n\n\nclass Merchants extends ApiResource<Merchant> {\n\n\tstatic readonly TYPE: MerchantType = 'merchants' as const\n\n\tasync create(resource: MerchantCreate, params?: QueryParamsRetrieve<Merchant>, options?: ResourcesConfig): Promise<Merchant> {\n\t\treturn this.resources.create<MerchantCreate, Merchant>({ ...resource, type: Merchants.TYPE }, params, options)\n\t}\n\n\tasync update(resource: MerchantUpdate, params?: QueryParamsRetrieve<Merchant>, options?: ResourcesConfig): Promise<Merchant> {\n\t\treturn this.resources.update<MerchantUpdate, Merchant>({ ...resource, type: Merchants.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: Merchants.TYPE } : id, options)\n\t}\n\n\tasync address(merchantId: string | Merchant, params?: QueryParamsRetrieve<Address>, options?: ResourcesConfig): Promise<Address> {\n\t\tconst _merchantId = (merchantId as Merchant).id || merchantId as string\n\t\treturn this.resources.fetch<Address>({ type: 'addresses' }, `merchants/${_merchantId}/address`, params, options) as unknown as Address\n\t}\n\n\tasync attachments(merchantId: string | Merchant, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _merchantId = (merchantId as Merchant).id || merchantId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `merchants/${_merchantId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(merchantId: string | Merchant, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _merchantId = (merchantId as Merchant).id || merchantId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `merchants/${_merchantId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisMerchant(resource: any): resource is Merchant {\n\t\treturn resource.type && (resource.type === Merchants.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): MerchantRel {\n\t\treturn super.relationshipOneToOne<MerchantRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): MerchantRel[] {\n\t\treturn super.relationshipOneToMany<MerchantRel>(...ids)\n\t}\n\n\n\ttype(): MerchantType {\n\t\treturn Merchants.TYPE\n\t}\n\n}\n\n\nconst instance = new Merchants()\nexport default instance\n\nexport type { Merchants, Merchant, MerchantCreate, MerchantUpdate, MerchantType }\n"]}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { hB as Merchant, hC as MerchantCreate, hE as MerchantSort, n5 as MerchantType, hD as MerchantUpdate, bK as Merchants, bJ 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 { hB as Merchant, hC as MerchantCreate, hE as MerchantSort, n5 as MerchantType, hD as MerchantUpdate, bK as Merchants, bJ 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/merchants.ts"],"names":[],"mappings":";;AA6DA,MAAM,kBAAkB,WAAsB,CAAA;AAAA,EAE7C,OAAgB,IAAqB,GAAA,WAAA;AAAA,EAErC,MAAM,MAAA,CAAO,QAA0B,EAAA,MAAA,EAAwC,OAA8C,EAAA;AAC5H,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAiC,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,SAAU,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC9G,EAEA,MAAM,MAAA,CAAO,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G,CAAa,UAAA,EAAA,WAAW,CAAa,SAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAChH,EAGA,WAAW,QAAqC,EAAA;AAC/C,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,SAAU,CAAA,IAAA;AAAA;AACtD,EAGA,aAAa,EAA6C,EAAA;AACzD,IAAO,OAAA,KAAA,CAAM,qBAAkC,EAAE,CAAA;AAAA;AAClD,EAEA,sBAAsB,GAA8B,EAAA;AACnD,IAAO,OAAA,KAAA,CAAM,qBAAmC,CAAA,GAAG,GAAG,CAAA;AAAA;AACvD,EAGA,IAAqB,GAAA;AACpB,IAAA,OAAO,SAAU,CAAA,IAAA;AAAA;AAGnB;AAGA,MAAM,QAAA,GAAW,IAAI,SAAU,EAAA;AAC/B,IAAO,iBAAQ,GAAA","file":"merchants.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 { Address, AddressType } from './addresses'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype MerchantType = 'merchants'\ntype MerchantRel = ResourceRel & { type: MerchantType }\ntype AddressRel = ResourceRel & { type: AddressType }\n\n\nexport type MerchantSort = Pick<Merchant, 'id' | 'name'> & ResourceSort\n// export type MerchantFilter = Pick<Merchant, 'id' | 'name'> & ResourceFilter\n\n\ninterface Merchant extends Resource {\n\t\n\treadonly type: MerchantType\n\n\t/** \n\t * The merchant's internal name.\n\t * @example ```\"The Brand Inc.\"```\n\t */\n\tname: string\n\n\taddress?: Address | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface MerchantCreate extends ResourceCreate {\n\t\n\t/** \n\t * The merchant's internal name.\n\t * @example ```\"The Brand Inc.\"```\n\t */\n\tname: string\n\n\taddress: AddressRel\n\n}\n\n\ninterface MerchantUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The merchant's internal name.\n\t * @example ```\"The Brand Inc.\"```\n\t */\n\tname?: string | null\n\n\taddress?: AddressRel | null\n\n}\n\n\nclass Merchants extends ApiResource<Merchant> {\n\n\tstatic readonly TYPE: MerchantType = 'merchants' as const\n\n\tasync create(resource: MerchantCreate, params?: QueryParamsRetrieve<Merchant>, options?: ResourcesConfig): Promise<Merchant> {\n\t\treturn this.resources.create<MerchantCreate, Merchant>({ ...resource, type: Merchants.TYPE }, params, options)\n\t}\n\n\tasync update(resource: MerchantUpdate, params?: QueryParamsRetrieve<Merchant>, options?: ResourcesConfig): Promise<Merchant> {\n\t\treturn this.resources.update<MerchantUpdate, Merchant>({ ...resource, type: Merchants.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: Merchants.TYPE } : id, options)\n\t}\n\n\tasync address(merchantId: string | Merchant, params?: QueryParamsRetrieve<Address>, options?: ResourcesConfig): Promise<Address> {\n\t\tconst _merchantId = (merchantId as Merchant).id || merchantId as string\n\t\treturn this.resources.fetch<Address>({ type: 'addresses' }, `merchants/${_merchantId}/address`, params, options) as unknown as Address\n\t}\n\n\tasync attachments(merchantId: string | Merchant, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _merchantId = (merchantId as Merchant).id || merchantId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `merchants/${_merchantId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(merchantId: string | Merchant, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _merchantId = (merchantId as Merchant).id || merchantId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `merchants/${_merchantId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisMerchant(resource: any): resource is Merchant {\n\t\treturn resource.type && (resource.type === Merchants.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): MerchantRel {\n\t\treturn super.relationshipOneToOne<MerchantRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): MerchantRel[] {\n\t\treturn super.relationshipOneToMany<MerchantRel>(...ids)\n\t}\n\n\n\ttype(): MerchantType {\n\t\treturn Merchants.TYPE\n\t}\n\n}\n\n\nconst instance = new Merchants()\nexport default instance\n\nexport type { Merchant, MerchantCreate, MerchantUpdate, MerchantType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/merchants.ts"],"names":[],"mappings":";;AA6DA,MAAM,kBAAkB,WAAsB,CAAA;AAAA,EAE7C,OAAgB,IAAqB,GAAA,WAAA;AAAA,EAErC,MAAM,MAAA,CAAO,QAA0B,EAAA,MAAA,EAAwC,OAA8C,EAAA;AAC5H,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAiC,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,SAAU,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC9G,EAEA,MAAM,MAAA,CAAO,QAA0B,EAAA,MAAA,EAAwC,OAA8C,EAAA;AAC5H,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAiC,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,SAAU,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC9G,EAEA,MAAM,MAAO,CAAA,EAAA,EAAyB,OAA0C,EAAA;AAC/E,IAAA,MAAM,IAAK,CAAA,SAAA,CAAU,MAAQ,CAAA,OAAO,EAAO,KAAA,QAAA,GAAW,EAAE,EAAA,EAAI,IAAM,EAAA,SAAA,CAAU,IAAK,EAAA,GAAI,IAAI,OAAO,CAAA;AAAA;AACjG,EAEA,MAAM,OAAA,CAAQ,UAA+B,EAAA,MAA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GA,MAAM,QAAA,GAAW,IAAI,SAAU,EAAA;AAC/B,IAAO,iBAAQ,GAAA","file":"merchants.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 { Address, AddressType } from './addresses'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype MerchantType = 'merchants'\ntype MerchantRel = ResourceRel & { type: MerchantType }\ntype AddressRel = ResourceRel & { type: AddressType }\n\n\nexport type MerchantSort = Pick<Merchant, 'id' | 'name'> & ResourceSort\n// export type MerchantFilter = Pick<Merchant, 'id' | 'name'> & ResourceFilter\n\n\ninterface Merchant extends Resource {\n\t\n\treadonly type: MerchantType\n\n\t/** \n\t * The merchant's internal name.\n\t * @example ```\"The Brand Inc.\"```\n\t */\n\tname: string\n\n\taddress?: Address | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface MerchantCreate extends ResourceCreate {\n\t\n\t/** \n\t * The merchant's internal name.\n\t * @example ```\"The Brand Inc.\"```\n\t */\n\tname: string\n\n\taddress: AddressRel\n\n}\n\n\ninterface MerchantUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The merchant's internal name.\n\t * @example ```\"The Brand Inc.\"```\n\t */\n\tname?: string | null\n\n\taddress?: AddressRel | null\n\n}\n\n\nclass Merchants extends ApiResource<Merchant> {\n\n\tstatic readonly TYPE: MerchantType = 'merchants' as const\n\n\tasync create(resource: MerchantCreate, params?: QueryParamsRetrieve<Merchant>, options?: ResourcesConfig): Promise<Merchant> {\n\t\treturn this.resources.create<MerchantCreate, Merchant>({ ...resource, type: Merchants.TYPE }, params, options)\n\t}\n\n\tasync update(resource: MerchantUpdate, params?: QueryParamsRetrieve<Merchant>, options?: ResourcesConfig): Promise<Merchant> {\n\t\treturn this.resources.update<MerchantUpdate, Merchant>({ ...resource, type: Merchants.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: Merchants.TYPE } : id, options)\n\t}\n\n\tasync address(merchantId: string | Merchant, params?: QueryParamsRetrieve<Address>, options?: ResourcesConfig): Promise<Address> {\n\t\tconst _merchantId = (merchantId as Merchant).id || merchantId as string\n\t\treturn this.resources.fetch<Address>({ type: 'addresses' }, `merchants/${_merchantId}/address`, params, options) as unknown as Address\n\t}\n\n\tasync attachments(merchantId: string | Merchant, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _merchantId = (merchantId as Merchant).id || merchantId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `merchants/${_merchantId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(merchantId: string | Merchant, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _merchantId = (merchantId as Merchant).id || merchantId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `merchants/${_merchantId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisMerchant(resource: any): resource is Merchant {\n\t\treturn resource.type && (resource.type === Merchants.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): MerchantRel {\n\t\treturn super.relationshipOneToOne<MerchantRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): MerchantRel[] {\n\t\treturn super.relationshipOneToMany<MerchantRel>(...ids)\n\t}\n\n\n\ttype(): MerchantType {\n\t\treturn Merchants.TYPE\n\t}\n\n}\n\n\nconst instance = new Merchants()\nexport default instance\n\nexport type { Merchants, Merchant, MerchantCreate, MerchantUpdate, MerchantType }\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/resources/notifications.ts"],"names":["ApiResource"],"mappings":";;;;AAwFA,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ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve } from '../query'\n\nimport type { Order, OrderType } from './orders'\nimport type { LineItem, LineItemType } from './line_items'\nimport type { ShippingMethod, ShippingMethodType } from './shipping_methods'\n\n\ntype NotificationType = 'notifications'\ntype NotificationRel = ResourceRel & { type: NotificationType }\ntype OrderRel = ResourceRel & { type: OrderType }\ntype LineItemRel = ResourceRel & { type: LineItemType }\ntype ShippingMethodRel = ResourceRel & { type: ShippingMethodType }\n\n\nexport type NotificationSort = Pick<Notification, 'id' | 'name' | 'flash'> & ResourceSort\n// export type NotificationFilter = Pick<Notification, 'id' | 'name' | 'flash'> & ResourceFilter\n\n\ninterface Notification extends Resource {\n\t\n\treadonly type: NotificationType\n\n\t/** \n\t * The internal name of the notification.\n\t * @example ```\"DDT transport document\"```\n\t */\n\tname: string\n\t/** \n\t * Indicates if the notification is temporary, valid for the ones created by external services.\n\t */\n\tflash?: boolean | null\n\t/** \n\t * An internal body of the notification.\n\t * @example ```{\"sku\":\"REDHANDBAG\",\"name\":\"Enjoy your free item\"}```\n\t */\n\tbody?: Record<string, any> | null\n\n\tnotifiable?: Order | LineItem | ShippingMethod | null\n\n}\n\n\ninterface NotificationCreate extends ResourceCreate {\n\t\n\t/** \n\t * The internal name of the notification.\n\t * @example ```\"DDT transport document\"```\n\t */\n\tname: string\n\t/** \n\t * Indicates if the notification is temporary, valid for the ones created by external services.\n\t */\n\tflash?: boolean | null\n\t/** \n\t * An internal body of the notification.\n\t * @example ```{\"sku\":\"REDHANDBAG\",\"name\":\"Enjoy your free item\"}```\n\t */\n\tbody?: Record<string, any> | null\n\n\tnotifiable: OrderRel | LineItemRel | ShippingMethodRel\n\n}\n\n\ninterface NotificationUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The internal name of the notification.\n\t * @example ```\"DDT transport document\"```\n\t */\n\tname?: string | null\n\t/** \n\t * Indicates if the notification is temporary, valid for the ones created by external services.\n\t */\n\tflash?: boolean | null\n\t/** \n\t * An internal body of the notification.\n\t * @example ```{\"sku\":\"REDHANDBAG\",\"name\":\"Enjoy your free item\"}```\n\t */\n\tbody?: Record<string, any> | null\n\n\tnotifiable?: OrderRel | LineItemRel | ShippingMethodRel | null\n\n}\n\n\nclass Notifications extends ApiResource<Notification> {\n\n\tstatic readonly TYPE: NotificationType = 'notifications' as const\n\n\tasync create(resource: NotificationCreate, params?: QueryParamsRetrieve<Notification>, options?: ResourcesConfig): Promise<Notification> {\n\t\treturn this.resources.create<NotificationCreate, Notification>({ ...resource, type: Notifications.TYPE }, params, options)\n\t}\n\n\tasync update(resource: NotificationUpdate, params?: QueryParamsRetrieve<Notification>, options?: ResourcesConfig): Promise<Notification> {\n\t\treturn this.resources.update<NotificationUpdate, Notification>({ ...resource, type: Notifications.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: Notifications.TYPE } : id, options)\n\t}\n\n\n\tisNotification(resource: any): resource is Notification {\n\t\treturn resource.type && (resource.type === Notifications.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): NotificationRel {\n\t\treturn super.relationshipOneToOne<NotificationRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): NotificationRel[] {\n\t\treturn super.relationshipOneToMany<NotificationRel>(...ids)\n\t}\n\n\n\ttype(): NotificationType {\n\t\treturn Notifications.TYPE\n\t}\n\n}\n\n\nconst instance = new Notifications()\nexport default instance\n\nexport type { Notification, NotificationCreate, NotificationUpdate, NotificationType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/notifications.ts"],"names":["ApiResource"],"mappings":";;;;AAwFA,MAAM,sBAAsBA,oBAA0B,CAAA;AAAA,EAErD,OAAgB,IAAyB,GAAA,eAAA;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,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,qBAAQ,GAAA","file":"notifications.cjs","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve } from '../query'\n\nimport type { Order, OrderType } from './orders'\nimport type { LineItem, LineItemType } from './line_items'\nimport type { ShippingMethod, ShippingMethodType } from './shipping_methods'\n\n\ntype NotificationType = 'notifications'\ntype NotificationRel = ResourceRel & { type: NotificationType }\ntype OrderRel = ResourceRel & { type: OrderType }\ntype LineItemRel = ResourceRel & { type: LineItemType }\ntype ShippingMethodRel = ResourceRel & { type: ShippingMethodType }\n\n\nexport type NotificationSort = Pick<Notification, 'id' | 'name' | 'flash'> & ResourceSort\n// export type NotificationFilter = Pick<Notification, 'id' | 'name' | 'flash'> & ResourceFilter\n\n\ninterface Notification extends Resource {\n\t\n\treadonly type: NotificationType\n\n\t/** \n\t * The internal name of the notification.\n\t * @example ```\"DDT transport document\"```\n\t */\n\tname: string\n\t/** \n\t * Indicates if the notification is temporary, valid for the ones created by external services.\n\t */\n\tflash?: boolean | null\n\t/** \n\t * An internal body of the notification.\n\t * @example ```{\"sku\":\"REDHANDBAG\",\"name\":\"Enjoy your free item\"}```\n\t */\n\tbody?: Record<string, any> | null\n\n\tnotifiable?: Order | LineItem | ShippingMethod | null\n\n}\n\n\ninterface NotificationCreate extends ResourceCreate {\n\t\n\t/** \n\t * The internal name of the notification.\n\t * @example ```\"DDT transport document\"```\n\t */\n\tname: string\n\t/** \n\t * Indicates if the notification is temporary, valid for the ones created by external services.\n\t */\n\tflash?: boolean | null\n\t/** \n\t * An internal body of the notification.\n\t * @example ```{\"sku\":\"REDHANDBAG\",\"name\":\"Enjoy your free item\"}```\n\t */\n\tbody?: Record<string, any> | null\n\n\tnotifiable: OrderRel | LineItemRel | ShippingMethodRel\n\n}\n\n\ninterface NotificationUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The internal name of the notification.\n\t * @example ```\"DDT transport document\"```\n\t */\n\tname?: string | null\n\t/** \n\t * Indicates if the notification is temporary, valid for the ones created by external services.\n\t */\n\tflash?: boolean | null\n\t/** \n\t * An internal body of the notification.\n\t * @example ```{\"sku\":\"REDHANDBAG\",\"name\":\"Enjoy your free item\"}```\n\t */\n\tbody?: Record<string, any> | null\n\n\tnotifiable?: OrderRel | LineItemRel | ShippingMethodRel | null\n\n}\n\n\nclass Notifications extends ApiResource<Notification> {\n\n\tstatic readonly TYPE: NotificationType = 'notifications' as const\n\n\tasync create(resource: NotificationCreate, params?: QueryParamsRetrieve<Notification>, options?: ResourcesConfig): Promise<Notification> {\n\t\treturn this.resources.create<NotificationCreate, Notification>({ ...resource, type: Notifications.TYPE }, params, options)\n\t}\n\n\tasync update(resource: NotificationUpdate, params?: QueryParamsRetrieve<Notification>, options?: ResourcesConfig): Promise<Notification> {\n\t\treturn this.resources.update<NotificationUpdate, Notification>({ ...resource, type: Notifications.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: Notifications.TYPE } : id, options)\n\t}\n\n\n\tisNotification(resource: any): resource is Notification {\n\t\treturn resource.type && (resource.type === Notifications.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): NotificationRel {\n\t\treturn super.relationshipOneToOne<NotificationRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): NotificationRel[] {\n\t\treturn super.relationshipOneToMany<NotificationRel>(...ids)\n\t}\n\n\n\ttype(): NotificationType {\n\t\treturn Notifications.TYPE\n\t}\n\n}\n\n\nconst instance = new Notifications()\nexport default instance\n\nexport type { Notifications, Notification, NotificationCreate, NotificationUpdate, NotificationType }\n"]}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { hF as Notification, hG as NotificationCreate, hI as NotificationSort, m7 as NotificationType, hH as NotificationUpdate, bM as Notifications, bL 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 { hF as Notification, hG as NotificationCreate, hI as NotificationSort, m7 as NotificationType, hH as NotificationUpdate, bM as Notifications, bL 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/notifications.ts"],"names":[],"mappings":";;AAwFA,MAAM,sBAAsB,WAA0B,CAAA;AAAA,EAErD,OAAgB,IAAyB,GAAA,eAAA;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,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,qBAAQ,GAAA","file":"notifications.js","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve } from '../query'\n\nimport type { Order, OrderType } from './orders'\nimport type { LineItem, LineItemType } from './line_items'\nimport type { ShippingMethod, ShippingMethodType } from './shipping_methods'\n\n\ntype NotificationType = 'notifications'\ntype NotificationRel = ResourceRel & { type: NotificationType }\ntype OrderRel = ResourceRel & { type: OrderType }\ntype LineItemRel = ResourceRel & { type: LineItemType }\ntype ShippingMethodRel = ResourceRel & { type: ShippingMethodType }\n\n\nexport type NotificationSort = Pick<Notification, 'id' | 'name' | 'flash'> & ResourceSort\n// export type NotificationFilter = Pick<Notification, 'id' | 'name' | 'flash'> & ResourceFilter\n\n\ninterface Notification extends Resource {\n\t\n\treadonly type: NotificationType\n\n\t/** \n\t * The internal name of the notification.\n\t * @example ```\"DDT transport document\"```\n\t */\n\tname: string\n\t/** \n\t * Indicates if the notification is temporary, valid for the ones created by external services.\n\t */\n\tflash?: boolean | null\n\t/** \n\t * An internal body of the notification.\n\t * @example ```{\"sku\":\"REDHANDBAG\",\"name\":\"Enjoy your free item\"}```\n\t */\n\tbody?: Record<string, any> | null\n\n\tnotifiable?: Order | LineItem | ShippingMethod | null\n\n}\n\n\ninterface NotificationCreate extends ResourceCreate {\n\t\n\t/** \n\t * The internal name of the notification.\n\t * @example ```\"DDT transport document\"```\n\t */\n\tname: string\n\t/** \n\t * Indicates if the notification is temporary, valid for the ones created by external services.\n\t */\n\tflash?: boolean | null\n\t/** \n\t * An internal body of the notification.\n\t * @example ```{\"sku\":\"REDHANDBAG\",\"name\":\"Enjoy your free item\"}```\n\t */\n\tbody?: Record<string, any> | null\n\n\tnotifiable: OrderRel | LineItemRel | ShippingMethodRel\n\n}\n\n\ninterface NotificationUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The internal name of the notification.\n\t * @example ```\"DDT transport document\"```\n\t */\n\tname?: string | null\n\t/** \n\t * Indicates if the notification is temporary, valid for the ones created by external services.\n\t */\n\tflash?: boolean | null\n\t/** \n\t * An internal body of the notification.\n\t * @example ```{\"sku\":\"REDHANDBAG\",\"name\":\"Enjoy your free item\"}```\n\t */\n\tbody?: Record<string, any> | null\n\n\tnotifiable?: OrderRel | LineItemRel | ShippingMethodRel | null\n\n}\n\n\nclass Notifications extends ApiResource<Notification> {\n\n\tstatic readonly TYPE: NotificationType = 'notifications' as const\n\n\tasync create(resource: NotificationCreate, params?: QueryParamsRetrieve<Notification>, options?: ResourcesConfig): Promise<Notification> {\n\t\treturn this.resources.create<NotificationCreate, Notification>({ ...resource, type: Notifications.TYPE }, params, options)\n\t}\n\n\tasync update(resource: NotificationUpdate, params?: QueryParamsRetrieve<Notification>, options?: ResourcesConfig): Promise<Notification> {\n\t\treturn this.resources.update<NotificationUpdate, Notification>({ ...resource, type: Notifications.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: Notifications.TYPE } : id, options)\n\t}\n\n\n\tisNotification(resource: any): resource is Notification {\n\t\treturn resource.type && (resource.type === Notifications.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): NotificationRel {\n\t\treturn super.relationshipOneToOne<NotificationRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): NotificationRel[] {\n\t\treturn super.relationshipOneToMany<NotificationRel>(...ids)\n\t}\n\n\n\ttype(): NotificationType {\n\t\treturn Notifications.TYPE\n\t}\n\n}\n\n\nconst instance = new Notifications()\nexport default instance\n\nexport type { Notification, NotificationCreate, NotificationUpdate, NotificationType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/notifications.ts"],"names":[],"mappings":";;AAwFA,MAAM,sBAAsB,WAA0B,CAAA;AAAA,EAErD,OAAgB,IAAyB,GAAA,eAAA;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,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,qBAAQ,GAAA","file":"notifications.js","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve } from '../query'\n\nimport type { Order, OrderType } from './orders'\nimport type { LineItem, LineItemType } from './line_items'\nimport type { ShippingMethod, ShippingMethodType } from './shipping_methods'\n\n\ntype NotificationType = 'notifications'\ntype NotificationRel = ResourceRel & { type: NotificationType }\ntype OrderRel = ResourceRel & { type: OrderType }\ntype LineItemRel = ResourceRel & { type: LineItemType }\ntype ShippingMethodRel = ResourceRel & { type: ShippingMethodType }\n\n\nexport type NotificationSort = Pick<Notification, 'id' | 'name' | 'flash'> & ResourceSort\n// export type NotificationFilter = Pick<Notification, 'id' | 'name' | 'flash'> & ResourceFilter\n\n\ninterface Notification extends Resource {\n\t\n\treadonly type: NotificationType\n\n\t/** \n\t * The internal name of the notification.\n\t * @example ```\"DDT transport document\"```\n\t */\n\tname: string\n\t/** \n\t * Indicates if the notification is temporary, valid for the ones created by external services.\n\t */\n\tflash?: boolean | null\n\t/** \n\t * An internal body of the notification.\n\t * @example ```{\"sku\":\"REDHANDBAG\",\"name\":\"Enjoy your free item\"}```\n\t */\n\tbody?: Record<string, any> | null\n\n\tnotifiable?: Order | LineItem | ShippingMethod | null\n\n}\n\n\ninterface NotificationCreate extends ResourceCreate {\n\t\n\t/** \n\t * The internal name of the notification.\n\t * @example ```\"DDT transport document\"```\n\t */\n\tname: string\n\t/** \n\t * Indicates if the notification is temporary, valid for the ones created by external services.\n\t */\n\tflash?: boolean | null\n\t/** \n\t * An internal body of the notification.\n\t * @example ```{\"sku\":\"REDHANDBAG\",\"name\":\"Enjoy your free item\"}```\n\t */\n\tbody?: Record<string, any> | null\n\n\tnotifiable: OrderRel | LineItemRel | ShippingMethodRel\n\n}\n\n\ninterface NotificationUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The internal name of the notification.\n\t * @example ```\"DDT transport document\"```\n\t */\n\tname?: string | null\n\t/** \n\t * Indicates if the notification is temporary, valid for the ones created by external services.\n\t */\n\tflash?: boolean | null\n\t/** \n\t * An internal body of the notification.\n\t * @example ```{\"sku\":\"REDHANDBAG\",\"name\":\"Enjoy your free item\"}```\n\t */\n\tbody?: Record<string, any> | null\n\n\tnotifiable?: OrderRel | LineItemRel | ShippingMethodRel | null\n\n}\n\n\nclass Notifications extends ApiResource<Notification> {\n\n\tstatic readonly TYPE: NotificationType = 'notifications' as const\n\n\tasync create(resource: NotificationCreate, params?: QueryParamsRetrieve<Notification>, options?: ResourcesConfig): Promise<Notification> {\n\t\treturn this.resources.create<NotificationCreate, Notification>({ ...resource, type: Notifications.TYPE }, params, options)\n\t}\n\n\tasync update(resource: NotificationUpdate, params?: QueryParamsRetrieve<Notification>, options?: ResourcesConfig): Promise<Notification> {\n\t\treturn this.resources.update<NotificationUpdate, Notification>({ ...resource, type: Notifications.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: Notifications.TYPE } : id, options)\n\t}\n\n\n\tisNotification(resource: any): resource is Notification {\n\t\treturn resource.type && (resource.type === Notifications.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): NotificationRel {\n\t\treturn super.relationshipOneToOne<NotificationRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): NotificationRel[] {\n\t\treturn super.relationshipOneToMany<NotificationRel>(...ids)\n\t}\n\n\n\ttype(): NotificationType {\n\t\treturn Notifications.TYPE\n\t}\n\n}\n\n\nconst instance = new Notifications()\nexport default instance\n\nexport type { Notifications, Notification, NotificationCreate, NotificationUpdate, NotificationType }\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/resources/order_amount_promotion_rules.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E,EAGA,aAAa,EAA6D,EAAA;AACzE,IAAO,OAAA,KAAA,CAAM,qBAAkD,EAAE,CAAA;AAAA;AAClE,EAEA,sBAAsB,GAA8C,EAAA;AACnE,IAAO,OAAA,KAAA,CAAM,qBAAmD,CAAA,GAAG,GAAG,CAAA;AAAA;AACvE,EAGA,IAAqC,GAAA;AACpC,IAAA,OAAO,yBAA0B,CAAA,IAAA;AAAA;AAGnC;AAGA,MAAM,QAAA,GAAW,IAAI,yBAA0B,EAAA;AAC/C,IAAO,oCAAQ,GAAA","file":"order_amount_promotion_rules.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 { Version } from './versions'\nimport type { PercentageDiscountPromotion, PercentageDiscountPromotionType } from './percentage_discount_promotions'\nimport type { FreeShippingPromotion, FreeShippingPromotionType } from './free_shipping_promotions'\nimport type { BuyXPayYPromotion, BuyXPayYPromotionType } from './buy_x_pay_y_promotions'\nimport type { FreeGiftPromotion, FreeGiftPromotionType } from './free_gift_promotions'\nimport type { FixedPricePromotion, FixedPricePromotionType } from './fixed_price_promotions'\nimport type { ExternalPromotion, ExternalPromotionType } from './external_promotions'\nimport type { FixedAmountPromotion, FixedAmountPromotionType } from './fixed_amount_promotions'\nimport type { FlexPromotion, FlexPromotionType } from './flex_promotions'\n\n\ntype OrderAmountPromotionRuleType = 'order_amount_promotion_rules'\ntype OrderAmountPromotionRuleRel = ResourceRel & { type: OrderAmountPromotionRuleType }\ntype PercentageDiscountPromotionRel = ResourceRel & { type: PercentageDiscountPromotionType }\ntype FreeShippingPromotionRel = ResourceRel & { type: FreeShippingPromotionType }\ntype BuyXPayYPromotionRel = ResourceRel & { type: BuyXPayYPromotionType }\ntype FreeGiftPromotionRel = ResourceRel & { type: FreeGiftPromotionType }\ntype FixedPricePromotionRel = ResourceRel & { type: FixedPricePromotionType }\ntype ExternalPromotionRel = ResourceRel & { type: ExternalPromotionType }\ntype FixedAmountPromotionRel = ResourceRel & { type: FixedAmountPromotionType }\ntype FlexPromotionRel = ResourceRel & { type: FlexPromotionType }\n\n\nexport type OrderAmountPromotionRuleSort = Pick<OrderAmountPromotionRule, 'id'> & ResourceSort\n// export type OrderAmountPromotionRuleFilter = Pick<OrderAmountPromotionRule, 'id'> & ResourceFilter\n\n\ninterface OrderAmountPromotionRule extends Resource {\n\t\n\treadonly type: OrderAmountPromotionRuleType\n\n\t/** \n\t * Apply the promotion only when order is over this amount, in cents.\n\t * @example ```1000```\n\t */\n\torder_amount_cents?: number | null\n\t/** \n\t * Apply the promotion only when order is over this amount, float.\n\t * @example ```10```\n\t */\n\torder_amount_float?: number | null\n\t/** \n\t * Apply the promotion only when order is over this amount, formatted.\n\t * @example ```\"€10,00\"```\n\t */\n\tformatted_order_amount?: string | null\n\t/** \n\t * Send this attribute if you want to compare the specified amount with order's subtotal (excluding discounts, if any).\n\t * @example ```true```\n\t */\n\tuse_subtotal?: boolean | null\n\n\tpromotion?: PercentageDiscountPromotion | FreeShippingPromotion | BuyXPayYPromotion | FreeGiftPromotion | FixedPricePromotion | ExternalPromotion | FixedAmountPromotion | FlexPromotion | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface OrderAmountPromotionRuleCreate extends ResourceCreate {\n\t\n\t/** \n\t * Apply the promotion only when order is over this amount, in cents.\n\t * @example ```1000```\n\t */\n\torder_amount_cents?: number | null\n\t/** \n\t * Send this attribute if you want to compare the specified amount with order's subtotal (excluding discounts, if any).\n\t * @example ```true```\n\t */\n\tuse_subtotal?: boolean | null\n\n\tpromotion: PercentageDiscountPromotionRel | FreeShippingPromotionRel | BuyXPayYPromotionRel | FreeGiftPromotionRel | FixedPricePromotionRel | ExternalPromotionRel | FixedAmountPromotionRel | FlexPromotionRel\n\n}\n\n\ninterface OrderAmountPromotionRuleUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * Apply the promotion only when order is over this amount, in cents.\n\t * @example ```1000```\n\t */\n\torder_amount_cents?: number | null\n\t/** \n\t * Send this attribute if you want to compare the specified amount with order's subtotal (excluding discounts, if any).\n\t * @example ```true```\n\t */\n\tuse_subtotal?: boolean | null\n\n\tpromotion?: PercentageDiscountPromotionRel | FreeShippingPromotionRel | BuyXPayYPromotionRel | FreeGiftPromotionRel | FixedPricePromotionRel | ExternalPromotionRel | FixedAmountPromotionRel | FlexPromotionRel | null\n\n}\n\n\nclass OrderAmountPromotionRules extends ApiResource<OrderAmountPromotionRule> {\n\n\tstatic readonly TYPE: OrderAmountPromotionRuleType = 'order_amount_promotion_rules' as const\n\n\tasync create(resource: OrderAmountPromotionRuleCreate, params?: QueryParamsRetrieve<OrderAmountPromotionRule>, options?: ResourcesConfig): Promise<OrderAmountPromotionRule> {\n\t\treturn this.resources.create<OrderAmountPromotionRuleCreate, OrderAmountPromotionRule>({ ...resource, type: OrderAmountPromotionRules.TYPE }, params, options)\n\t}\n\n\tasync update(resource: OrderAmountPromotionRuleUpdate, params?: QueryParamsRetrieve<OrderAmountPromotionRule>, options?: ResourcesConfig): Promise<OrderAmountPromotionRule> {\n\t\treturn this.resources.update<OrderAmountPromotionRuleUpdate, OrderAmountPromotionRule>({ ...resource, type: OrderAmountPromotionRules.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: OrderAmountPromotionRules.TYPE } : id, options)\n\t}\n\n\tasync versions(orderAmountPromotionRuleId: string | OrderAmountPromotionRule, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _orderAmountPromotionRuleId = (orderAmountPromotionRuleId as OrderAmountPromotionRule).id || orderAmountPromotionRuleId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `order_amount_promotion_rules/${_orderAmountPromotionRuleId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisOrderAmountPromotionRule(resource: any): resource is OrderAmountPromotionRule {\n\t\treturn resource.type && (resource.type === OrderAmountPromotionRules.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): OrderAmountPromotionRuleRel {\n\t\treturn super.relationshipOneToOne<OrderAmountPromotionRuleRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): OrderAmountPromotionRuleRel[] {\n\t\treturn super.relationshipOneToMany<OrderAmountPromotionRuleRel>(...ids)\n\t}\n\n\n\ttype(): OrderAmountPromotionRuleType {\n\t\treturn OrderAmountPromotionRules.TYPE\n\t}\n\n}\n\n\nconst instance = new OrderAmountPromotionRules()\nexport default instance\n\nexport type { OrderAmountPromotionRule, OrderAmountPromotionRuleCreate, OrderAmountPromotionRuleUpdate, OrderAmountPromotionRuleType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/order_amount_promotion_rules.ts"],"names":["ApiResource"],"mappings":";;;;AAkGA,MAAM,kCAAkCA,oBAAsC,CAAA;AAAA,EAE7E,OAAgB,IAAqC,GAAA,8BAAA;AAAA,EAErD,MAAM,MAAA,CAAO,QAA0C,EAAA,MAAA,EAAwD,OAA8D,EAAA;AAC5K,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAiE,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,yBAA0B,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC9J,EAEA,MAAM,MAAA,CAAO,QAA0C,EAAA,MAAA,EAAwD,OAA8D,EAAA;AAC5K,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAiE,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,yBAA0B,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC9J,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,yBAAA,CAA0B,IAAK,EAAA,GAAI,IAAI,OAAO,CAAA;AAAA;AACjH,EAEA,MAAM,QAAA,CAAS,0BAA+D,EAAA,MAAA,EAAmC,OAA2D,EAAA;AAC3K,IAAM,MAAA,2BAAA,GAA+B,2BAAwD,EAAM,IAAA,0BAAA;AACnG,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAe,EAAE,IAAA,EAAM,UAAW,EAAA,EAAG,CAAgC,6BAAA,EAAA,2BAA2B,CAAa,SAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACnJ,EAGA,2BAA2B,QAAqD,EAAA;AAC/E,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,yBAA0B,CAAA,IAAA;AAAA;AACtE,EAGA,aAAa,EAA6D,EAAA;AACzE,IAAO,OAAA,KAAA,CAAM,qBAAkD,EAAE,CAAA;AAAA;AAClE,EAEA,sBAAsB,GAA8C,EAAA;AACnE,IAAO,OAAA,KAAA,CAAM,qBAAmD,CAAA,GAAG,GAAG,CAAA;AAAA;AACvE,EAGA,IAAqC,GAAA;AACpC,IAAA,OAAO,yBAA0B,CAAA,IAAA;AAAA;AAGnC;AAGA,MAAM,QAAA,GAAW,IAAI,yBAA0B,EAAA;AAC/C,IAAO,oCAAQ,GAAA","file":"order_amount_promotion_rules.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 { Version } from './versions'\nimport type { PercentageDiscountPromotion, PercentageDiscountPromotionType } from './percentage_discount_promotions'\nimport type { FreeShippingPromotion, FreeShippingPromotionType } from './free_shipping_promotions'\nimport type { BuyXPayYPromotion, BuyXPayYPromotionType } from './buy_x_pay_y_promotions'\nimport type { FreeGiftPromotion, FreeGiftPromotionType } from './free_gift_promotions'\nimport type { FixedPricePromotion, FixedPricePromotionType } from './fixed_price_promotions'\nimport type { ExternalPromotion, ExternalPromotionType } from './external_promotions'\nimport type { FixedAmountPromotion, FixedAmountPromotionType } from './fixed_amount_promotions'\nimport type { FlexPromotion, FlexPromotionType } from './flex_promotions'\n\n\ntype OrderAmountPromotionRuleType = 'order_amount_promotion_rules'\ntype OrderAmountPromotionRuleRel = ResourceRel & { type: OrderAmountPromotionRuleType }\ntype PercentageDiscountPromotionRel = ResourceRel & { type: PercentageDiscountPromotionType }\ntype FreeShippingPromotionRel = ResourceRel & { type: FreeShippingPromotionType }\ntype BuyXPayYPromotionRel = ResourceRel & { type: BuyXPayYPromotionType }\ntype FreeGiftPromotionRel = ResourceRel & { type: FreeGiftPromotionType }\ntype FixedPricePromotionRel = ResourceRel & { type: FixedPricePromotionType }\ntype ExternalPromotionRel = ResourceRel & { type: ExternalPromotionType }\ntype FixedAmountPromotionRel = ResourceRel & { type: FixedAmountPromotionType }\ntype FlexPromotionRel = ResourceRel & { type: FlexPromotionType }\n\n\nexport type OrderAmountPromotionRuleSort = Pick<OrderAmountPromotionRule, 'id'> & ResourceSort\n// export type OrderAmountPromotionRuleFilter = Pick<OrderAmountPromotionRule, 'id'> & ResourceFilter\n\n\ninterface OrderAmountPromotionRule extends Resource {\n\t\n\treadonly type: OrderAmountPromotionRuleType\n\n\t/** \n\t * Apply the promotion only when order is over this amount, in cents.\n\t * @example ```1000```\n\t */\n\torder_amount_cents?: number | null\n\t/** \n\t * Apply the promotion only when order is over this amount, float.\n\t * @example ```10```\n\t */\n\torder_amount_float?: number | null\n\t/** \n\t * Apply the promotion only when order is over this amount, formatted.\n\t * @example ```\"€10,00\"```\n\t */\n\tformatted_order_amount?: string | null\n\t/** \n\t * Send this attribute if you want to compare the specified amount with order's subtotal (excluding discounts, if any).\n\t * @example ```true```\n\t */\n\tuse_subtotal?: boolean | null\n\n\tpromotion?: PercentageDiscountPromotion | FreeShippingPromotion | BuyXPayYPromotion | FreeGiftPromotion | FixedPricePromotion | ExternalPromotion | FixedAmountPromotion | FlexPromotion | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface OrderAmountPromotionRuleCreate extends ResourceCreate {\n\t\n\t/** \n\t * Apply the promotion only when order is over this amount, in cents.\n\t * @example ```1000```\n\t */\n\torder_amount_cents?: number | null\n\t/** \n\t * Send this attribute if you want to compare the specified amount with order's subtotal (excluding discounts, if any).\n\t * @example ```true```\n\t */\n\tuse_subtotal?: boolean | null\n\n\tpromotion: PercentageDiscountPromotionRel | FreeShippingPromotionRel | BuyXPayYPromotionRel | FreeGiftPromotionRel | FixedPricePromotionRel | ExternalPromotionRel | FixedAmountPromotionRel | FlexPromotionRel\n\n}\n\n\ninterface OrderAmountPromotionRuleUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * Apply the promotion only when order is over this amount, in cents.\n\t * @example ```1000```\n\t */\n\torder_amount_cents?: number | null\n\t/** \n\t * Send this attribute if you want to compare the specified amount with order's subtotal (excluding discounts, if any).\n\t * @example ```true```\n\t */\n\tuse_subtotal?: boolean | null\n\n\tpromotion?: PercentageDiscountPromotionRel | FreeShippingPromotionRel | BuyXPayYPromotionRel | FreeGiftPromotionRel | FixedPricePromotionRel | ExternalPromotionRel | FixedAmountPromotionRel | FlexPromotionRel | null\n\n}\n\n\nclass OrderAmountPromotionRules extends ApiResource<OrderAmountPromotionRule> {\n\n\tstatic readonly TYPE: OrderAmountPromotionRuleType = 'order_amount_promotion_rules' as const\n\n\tasync create(resource: OrderAmountPromotionRuleCreate, params?: QueryParamsRetrieve<OrderAmountPromotionRule>, options?: ResourcesConfig): Promise<OrderAmountPromotionRule> {\n\t\treturn this.resources.create<OrderAmountPromotionRuleCreate, OrderAmountPromotionRule>({ ...resource, type: OrderAmountPromotionRules.TYPE }, params, options)\n\t}\n\n\tasync update(resource: OrderAmountPromotionRuleUpdate, params?: QueryParamsRetrieve<OrderAmountPromotionRule>, options?: ResourcesConfig): Promise<OrderAmountPromotionRule> {\n\t\treturn this.resources.update<OrderAmountPromotionRuleUpdate, OrderAmountPromotionRule>({ ...resource, type: OrderAmountPromotionRules.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: OrderAmountPromotionRules.TYPE } : id, options)\n\t}\n\n\tasync versions(orderAmountPromotionRuleId: string | OrderAmountPromotionRule, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _orderAmountPromotionRuleId = (orderAmountPromotionRuleId as OrderAmountPromotionRule).id || orderAmountPromotionRuleId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `order_amount_promotion_rules/${_orderAmountPromotionRuleId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisOrderAmountPromotionRule(resource: any): resource is OrderAmountPromotionRule {\n\t\treturn resource.type && (resource.type === OrderAmountPromotionRules.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): OrderAmountPromotionRuleRel {\n\t\treturn super.relationshipOneToOne<OrderAmountPromotionRuleRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): OrderAmountPromotionRuleRel[] {\n\t\treturn super.relationshipOneToMany<OrderAmountPromotionRuleRel>(...ids)\n\t}\n\n\n\ttype(): OrderAmountPromotionRuleType {\n\t\treturn OrderAmountPromotionRules.TYPE\n\t}\n\n}\n\n\nconst instance = new OrderAmountPromotionRules()\nexport default instance\n\nexport type { OrderAmountPromotionRules, OrderAmountPromotionRule, OrderAmountPromotionRuleCreate, OrderAmountPromotionRuleUpdate, OrderAmountPromotionRuleType }\n"]}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { hJ as OrderAmountPromotionRule, hK as OrderAmountPromotionRuleCreate, hM as OrderAmountPromotionRuleSort, mt as OrderAmountPromotionRuleType, hL as OrderAmountPromotionRuleUpdate, bO as OrderAmountPromotionRules, bN 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 { hJ as OrderAmountPromotionRule, hK as OrderAmountPromotionRuleCreate, hM as OrderAmountPromotionRuleSort, mt as OrderAmountPromotionRuleType, hL as OrderAmountPromotionRuleUpdate, bO as OrderAmountPromotionRules, bN 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/order_amount_promotion_rules.ts"],"names":[],"mappings":";;AAkGA,MAAM,kCAAkC,WAAsC,CAAA;AAAA,EAE7E,OAAgB,IAAqC,GAAA,8BAAA;AAAA,EAErD,MAAM,MAAA,CAAO,QAA0C,EAAA,MAAA,EAAwD,OAA8D,EAAA;AAC5K,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAiE,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,yBAA0B,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC9J,EAEA,MAAM,MAAA,CAAO,QAA0C,EAAA,MAAA,EAAwD,OAA8D,EAAA;AAC5K,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAiE,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,yBAA0B,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC9J,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,yBAAA,CAA0B,IAAK,EAAA,GAAI,IAAI,OAAO,CAAA;AAAA;AACjH,EAEA,MAAM,QAAA,CAAS,0BAA+D,EAAA,MAAA,EAAmC,OAA2D,EAAA;AAC3K,IAAM,MAAA,2BAAA,GAA+B,2BAAwD,EAAM,IAAA,0BAAA;AACnG,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAe,EAAE,IAAA,EAAM,UAAW,EAAA,EAAG,CAAgC,6BAAA,EAAA,2BAA2B,CAAa,SAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACnJ,EAGA,2BAA2B,QAAqD,EAAA;AAC/E,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,yBAA0B,CAAA,IAAA;AAAA;AACtE,EAGA,aAAa,EAA6D,EAAA;AACzE,IAAO,OAAA,KAAA,CAAM,qBAAkD,EAAE,CAAA;AAAA;AAClE,EAEA,sBAAsB,GAA8C,EAAA;AACnE,IAAO,OAAA,KAAA,CAAM,qBAAmD,CAAA,GAAG,GAAG,CAAA;AAAA;AACvE,EAGA,IAAqC,GAAA;AACpC,IAAA,OAAO,yBAA0B,CAAA,IAAA;AAAA;AAGnC;AAGA,MAAM,QAAA,GAAW,IAAI,yBAA0B,EAAA;AAC/C,IAAO,oCAAQ,GAAA","file":"order_amount_promotion_rules.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 { Version } from './versions'\nimport type { PercentageDiscountPromotion, PercentageDiscountPromotionType } from './percentage_discount_promotions'\nimport type { FreeShippingPromotion, FreeShippingPromotionType } from './free_shipping_promotions'\nimport type { BuyXPayYPromotion, BuyXPayYPromotionType } from './buy_x_pay_y_promotions'\nimport type { FreeGiftPromotion, FreeGiftPromotionType } from './free_gift_promotions'\nimport type { FixedPricePromotion, FixedPricePromotionType } from './fixed_price_promotions'\nimport type { ExternalPromotion, ExternalPromotionType } from './external_promotions'\nimport type { FixedAmountPromotion, FixedAmountPromotionType } from './fixed_amount_promotions'\nimport type { FlexPromotion, FlexPromotionType } from './flex_promotions'\n\n\ntype OrderAmountPromotionRuleType = 'order_amount_promotion_rules'\ntype OrderAmountPromotionRuleRel = ResourceRel & { type: OrderAmountPromotionRuleType }\ntype PercentageDiscountPromotionRel = ResourceRel & { type: PercentageDiscountPromotionType }\ntype FreeShippingPromotionRel = ResourceRel & { type: FreeShippingPromotionType }\ntype BuyXPayYPromotionRel = ResourceRel & { type: BuyXPayYPromotionType }\ntype FreeGiftPromotionRel = ResourceRel & { type: FreeGiftPromotionType }\ntype FixedPricePromotionRel = ResourceRel & { type: FixedPricePromotionType }\ntype ExternalPromotionRel = ResourceRel & { type: ExternalPromotionType }\ntype FixedAmountPromotionRel = ResourceRel & { type: FixedAmountPromotionType }\ntype FlexPromotionRel = ResourceRel & { type: FlexPromotionType }\n\n\nexport type OrderAmountPromotionRuleSort = Pick<OrderAmountPromotionRule, 'id'> & ResourceSort\n// export type OrderAmountPromotionRuleFilter = Pick<OrderAmountPromotionRule, 'id'> & ResourceFilter\n\n\ninterface OrderAmountPromotionRule extends Resource {\n\t\n\treadonly type: OrderAmountPromotionRuleType\n\n\t/** \n\t * Apply the promotion only when order is over this amount, in cents.\n\t * @example ```1000```\n\t */\n\torder_amount_cents?: number | null\n\t/** \n\t * Apply the promotion only when order is over this amount, float.\n\t * @example ```10```\n\t */\n\torder_amount_float?: number | null\n\t/** \n\t * Apply the promotion only when order is over this amount, formatted.\n\t * @example ```\"€10,00\"```\n\t */\n\tformatted_order_amount?: string | null\n\t/** \n\t * Send this attribute if you want to compare the specified amount with order's subtotal (excluding discounts, if any).\n\t * @example ```true```\n\t */\n\tuse_subtotal?: boolean | null\n\n\tpromotion?: PercentageDiscountPromotion | FreeShippingPromotion | BuyXPayYPromotion | FreeGiftPromotion | FixedPricePromotion | ExternalPromotion | FixedAmountPromotion | FlexPromotion | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface OrderAmountPromotionRuleCreate extends ResourceCreate {\n\t\n\t/** \n\t * Apply the promotion only when order is over this amount, in cents.\n\t * @example ```1000```\n\t */\n\torder_amount_cents?: number | null\n\t/** \n\t * Send this attribute if you want to compare the specified amount with order's subtotal (excluding discounts, if any).\n\t * @example ```true```\n\t */\n\tuse_subtotal?: boolean | null\n\n\tpromotion: PercentageDiscountPromotionRel | FreeShippingPromotionRel | BuyXPayYPromotionRel | FreeGiftPromotionRel | FixedPricePromotionRel | ExternalPromotionRel | FixedAmountPromotionRel | FlexPromotionRel\n\n}\n\n\ninterface OrderAmountPromotionRuleUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * Apply the promotion only when order is over this amount, in cents.\n\t * @example ```1000```\n\t */\n\torder_amount_cents?: number | null\n\t/** \n\t * Send this attribute if you want to compare the specified amount with order's subtotal (excluding discounts, if any).\n\t * @example ```true```\n\t */\n\tuse_subtotal?: boolean | null\n\n\tpromotion?: PercentageDiscountPromotionRel | FreeShippingPromotionRel | BuyXPayYPromotionRel | FreeGiftPromotionRel | FixedPricePromotionRel | ExternalPromotionRel | FixedAmountPromotionRel | FlexPromotionRel | null\n\n}\n\n\nclass OrderAmountPromotionRules extends ApiResource<OrderAmountPromotionRule> {\n\n\tstatic readonly TYPE: OrderAmountPromotionRuleType = 'order_amount_promotion_rules' as const\n\n\tasync create(resource: OrderAmountPromotionRuleCreate, params?: QueryParamsRetrieve<OrderAmountPromotionRule>, options?: ResourcesConfig): Promise<OrderAmountPromotionRule> {\n\t\treturn this.resources.create<OrderAmountPromotionRuleCreate, OrderAmountPromotionRule>({ ...resource, type: OrderAmountPromotionRules.TYPE }, params, options)\n\t}\n\n\tasync update(resource: OrderAmountPromotionRuleUpdate, params?: QueryParamsRetrieve<OrderAmountPromotionRule>, options?: ResourcesConfig): Promise<OrderAmountPromotionRule> {\n\t\treturn this.resources.update<OrderAmountPromotionRuleUpdate, OrderAmountPromotionRule>({ ...resource, type: OrderAmountPromotionRules.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: OrderAmountPromotionRules.TYPE } : id, options)\n\t}\n\n\tasync versions(orderAmountPromotionRuleId: string | OrderAmountPromotionRule, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _orderAmountPromotionRuleId = (orderAmountPromotionRuleId as OrderAmountPromotionRule).id || orderAmountPromotionRuleId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `order_amount_promotion_rules/${_orderAmountPromotionRuleId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisOrderAmountPromotionRule(resource: any): resource is OrderAmountPromotionRule {\n\t\treturn resource.type && (resource.type === OrderAmountPromotionRules.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): OrderAmountPromotionRuleRel {\n\t\treturn super.relationshipOneToOne<OrderAmountPromotionRuleRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): OrderAmountPromotionRuleRel[] {\n\t\treturn super.relationshipOneToMany<OrderAmountPromotionRuleRel>(...ids)\n\t}\n\n\n\ttype(): OrderAmountPromotionRuleType {\n\t\treturn OrderAmountPromotionRules.TYPE\n\t}\n\n}\n\n\nconst instance = new OrderAmountPromotionRules()\nexport default instance\n\nexport type { OrderAmountPromotionRule, OrderAmountPromotionRuleCreate, OrderAmountPromotionRuleUpdate, OrderAmountPromotionRuleType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/order_amount_promotion_rules.ts"],"names":[],"mappings":";;AAkGA,MAAM,kCAAkC,WAAsC,CAAA;AAAA,EAE7E,OAAgB,IAAqC,GAAA,8BAAA;AAAA,EAErD,MAAM,MAAA,CAAO,QAA0C,EAAA,MAAA,EAAwD,OAA8D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GAAG,CAAA;AAAA;AACvE,EAGA,IAAqC,GAAA;AACpC,IAAA,OAAO,yBAA0B,CAAA,IAAA;AAAA;AAGnC;AAGA,MAAM,QAAA,GAAW,IAAI,yBAA0B,EAAA;AAC/C,IAAO,oCAAQ,GAAA","file":"order_amount_promotion_rules.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 { Version } from './versions'\nimport type { PercentageDiscountPromotion, PercentageDiscountPromotionType } from './percentage_discount_promotions'\nimport type { FreeShippingPromotion, FreeShippingPromotionType } from './free_shipping_promotions'\nimport type { BuyXPayYPromotion, BuyXPayYPromotionType } from './buy_x_pay_y_promotions'\nimport type { FreeGiftPromotion, FreeGiftPromotionType } from './free_gift_promotions'\nimport type { FixedPricePromotion, FixedPricePromotionType } from './fixed_price_promotions'\nimport type { ExternalPromotion, ExternalPromotionType } from './external_promotions'\nimport type { FixedAmountPromotion, FixedAmountPromotionType } from './fixed_amount_promotions'\nimport type { FlexPromotion, FlexPromotionType } from './flex_promotions'\n\n\ntype OrderAmountPromotionRuleType = 'order_amount_promotion_rules'\ntype OrderAmountPromotionRuleRel = ResourceRel & { type: OrderAmountPromotionRuleType }\ntype PercentageDiscountPromotionRel = ResourceRel & { type: PercentageDiscountPromotionType }\ntype FreeShippingPromotionRel = ResourceRel & { type: FreeShippingPromotionType }\ntype BuyXPayYPromotionRel = ResourceRel & { type: BuyXPayYPromotionType }\ntype FreeGiftPromotionRel = ResourceRel & { type: FreeGiftPromotionType }\ntype FixedPricePromotionRel = ResourceRel & { type: FixedPricePromotionType }\ntype ExternalPromotionRel = ResourceRel & { type: ExternalPromotionType }\ntype FixedAmountPromotionRel = ResourceRel & { type: FixedAmountPromotionType }\ntype FlexPromotionRel = ResourceRel & { type: FlexPromotionType }\n\n\nexport type OrderAmountPromotionRuleSort = Pick<OrderAmountPromotionRule, 'id'> & ResourceSort\n// export type OrderAmountPromotionRuleFilter = Pick<OrderAmountPromotionRule, 'id'> & ResourceFilter\n\n\ninterface OrderAmountPromotionRule extends Resource {\n\t\n\treadonly type: OrderAmountPromotionRuleType\n\n\t/** \n\t * Apply the promotion only when order is over this amount, in cents.\n\t * @example ```1000```\n\t */\n\torder_amount_cents?: number | null\n\t/** \n\t * Apply the promotion only when order is over this amount, float.\n\t * @example ```10```\n\t */\n\torder_amount_float?: number | null\n\t/** \n\t * Apply the promotion only when order is over this amount, formatted.\n\t * @example ```\"€10,00\"```\n\t */\n\tformatted_order_amount?: string | null\n\t/** \n\t * Send this attribute if you want to compare the specified amount with order's subtotal (excluding discounts, if any).\n\t * @example ```true```\n\t */\n\tuse_subtotal?: boolean | null\n\n\tpromotion?: PercentageDiscountPromotion | FreeShippingPromotion | BuyXPayYPromotion | FreeGiftPromotion | FixedPricePromotion | ExternalPromotion | FixedAmountPromotion | FlexPromotion | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface OrderAmountPromotionRuleCreate extends ResourceCreate {\n\t\n\t/** \n\t * Apply the promotion only when order is over this amount, in cents.\n\t * @example ```1000```\n\t */\n\torder_amount_cents?: number | null\n\t/** \n\t * Send this attribute if you want to compare the specified amount with order's subtotal (excluding discounts, if any).\n\t * @example ```true```\n\t */\n\tuse_subtotal?: boolean | null\n\n\tpromotion: PercentageDiscountPromotionRel | FreeShippingPromotionRel | BuyXPayYPromotionRel | FreeGiftPromotionRel | FixedPricePromotionRel | ExternalPromotionRel | FixedAmountPromotionRel | FlexPromotionRel\n\n}\n\n\ninterface OrderAmountPromotionRuleUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * Apply the promotion only when order is over this amount, in cents.\n\t * @example ```1000```\n\t */\n\torder_amount_cents?: number | null\n\t/** \n\t * Send this attribute if you want to compare the specified amount with order's subtotal (excluding discounts, if any).\n\t * @example ```true```\n\t */\n\tuse_subtotal?: boolean | null\n\n\tpromotion?: PercentageDiscountPromotionRel | FreeShippingPromotionRel | BuyXPayYPromotionRel | FreeGiftPromotionRel | FixedPricePromotionRel | ExternalPromotionRel | FixedAmountPromotionRel | FlexPromotionRel | null\n\n}\n\n\nclass OrderAmountPromotionRules extends ApiResource<OrderAmountPromotionRule> {\n\n\tstatic readonly TYPE: OrderAmountPromotionRuleType = 'order_amount_promotion_rules' as const\n\n\tasync create(resource: OrderAmountPromotionRuleCreate, params?: QueryParamsRetrieve<OrderAmountPromotionRule>, options?: ResourcesConfig): Promise<OrderAmountPromotionRule> {\n\t\treturn this.resources.create<OrderAmountPromotionRuleCreate, OrderAmountPromotionRule>({ ...resource, type: OrderAmountPromotionRules.TYPE }, params, options)\n\t}\n\n\tasync update(resource: OrderAmountPromotionRuleUpdate, params?: QueryParamsRetrieve<OrderAmountPromotionRule>, options?: ResourcesConfig): Promise<OrderAmountPromotionRule> {\n\t\treturn this.resources.update<OrderAmountPromotionRuleUpdate, OrderAmountPromotionRule>({ ...resource, type: OrderAmountPromotionRules.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: OrderAmountPromotionRules.TYPE } : id, options)\n\t}\n\n\tasync versions(orderAmountPromotionRuleId: string | OrderAmountPromotionRule, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _orderAmountPromotionRuleId = (orderAmountPromotionRuleId as OrderAmountPromotionRule).id || orderAmountPromotionRuleId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `order_amount_promotion_rules/${_orderAmountPromotionRuleId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisOrderAmountPromotionRule(resource: any): resource is OrderAmountPromotionRule {\n\t\treturn resource.type && (resource.type === OrderAmountPromotionRules.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): OrderAmountPromotionRuleRel {\n\t\treturn super.relationshipOneToOne<OrderAmountPromotionRuleRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): OrderAmountPromotionRuleRel[] {\n\t\treturn super.relationshipOneToMany<OrderAmountPromotionRuleRel>(...ids)\n\t}\n\n\n\ttype(): OrderAmountPromotionRuleType {\n\t\treturn OrderAmountPromotionRules.TYPE\n\t}\n\n}\n\n\nconst instance = new OrderAmountPromotionRules()\nexport default instance\n\nexport type { OrderAmountPromotionRules, OrderAmountPromotionRule, OrderAmountPromotionRuleCreate, OrderAmountPromotionRuleUpdate, OrderAmountPromotionRuleType }\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/resources/order_copies.ts"],"names":["ApiResource"],"mappings":";;;;AAoIA,MAAM,oBAAoBA,oBAAuB,CAAA;AAAA,EAEhD,OAAgB,IAAsB,GAAA,cAAA;AAAA,EAEtC,MAAM,MAAA,CAAO,QAA2B,EAAA,MAAA,EAAyC,OAA+C,EAAA;AAC/H,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAmC,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,WAAY,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAClH,EAEA,MAAM,MAAA,CAAO,QAA2B,EAAA,MAAA,EAAyC,OAA+C,EAAA;AAC/H,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAmC,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,WAAY,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAClH,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,WAAA,CAAY,IAAK,EAAA,GAAI,IAAI,OAAO,CAAA;AAAA;AACnG,EAEA,MAAM,YA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AAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,WAAY,CAAA,IAAA;AAAA;AACxD,EAGA,aAAa,EAA8C,EAAA;AAC1D,IAAO,OAAA,KAAA,CAAM,qBAAmC,EAAE,CAAA;AAAA;AACnD,EAEA,sBAAsB,GAA+B,EAAA;AACpD,IAAO,OAAA,KAAA,CAAM,qBAAoC,CAAA,GAAG,GAAG,CAAA;AAAA;AACxD,EAGA,IAAsB,GAAA;AACrB,IAAA,OAAO,WAAY,CAAA,IAAA;AAAA;AAGrB;AAGA,MAAM,QAAA,GAAW,IAAI,WAAY,EAAA;AACjC,IAAO,oBAAQ,GAAA","file":"order_copies.cjs","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Order, OrderType } from './orders'\nimport type { Event } from './events'\nimport type { OrderSubscription } from './order_subscriptions'\n\n\ntype OrderCopyType = 'order_copies'\ntype OrderCopyRel = ResourceRel & { type: OrderCopyType }\ntype OrderRel = ResourceRel & { type: OrderType }\n\n\nexport type OrderCopySort = Pick<OrderCopy, 'id' | 'status' | 'started_at' | 'completed_at' | 'failed_at' | 'errors_count'> & ResourceSort\n// export type OrderCopyFilter = Pick<OrderCopy, 'id' | 'status' | 'started_at' | 'completed_at' | 'failed_at' | 'errors_count'> & ResourceFilter\n\n\ninterface OrderCopy extends Resource {\n\t\n\treadonly type: OrderCopyType\n\n\t/** \n\t * The order factory status. One of 'pending' (default), 'in_progress', 'aborted', 'failed', or 'completed'.\n\t * @example ```\"in_progress\"```\n\t */\n\tstatus: 'pending' | 'in_progress' | 'aborted' | 'failed' | 'completed'\n\t/** \n\t * Time at which the order copy was started.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tstarted_at?: string | null\n\t/** \n\t * Time at which the order copy was completed.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tcompleted_at?: string | null\n\t/** \n\t * Time at which the order copy has failed.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tfailed_at?: string | null\n\t/** \n\t * Contains the order copy errors, if any.\n\t * @example ```{\"status\":[\"cannot transition from draft to placed\"]}```\n\t */\n\terrors_log?: Record<string, any> | null\n\t/** \n\t * Indicates the number of copy errors, if any.\n\t * @example ```2```\n\t */\n\terrors_count?: number | null\n\t/** \n\t * Indicates if the target order must be placed upon copy.\n\t * @example ```true```\n\t */\n\tplace_target_order?: boolean | null\n\t/** \n\t * Indicates if the payment source within the source order customer's wallet must be copied.\n\t * @example ```true```\n\t */\n\treuse_wallet?: boolean | null\n\t/** \n\t * Indicates if the source order must be cancelled upon copy.\n\t * @example ```true```\n\t */\n\tcancel_source_order?: boolean | null\n\t/** \n\t * Indicates if promotions got applied upon copy.\n\t * @example ```true```\n\t */\n\tapply_promotions?: boolean | null\n\t/** \n\t * Indicates to ignore any errors during copy.\n\t * @example ```true```\n\t */\n\tskip_errors?: boolean | null\n\t/** \n\t * Indicates to ignore invalid coupon code during copy.\n\t * @example ```true```\n\t */\n\tignore_invalid_coupon?: boolean | null\n\n\tsource_order?: Order | null\n\ttarget_order?: Order | null\n\tevents?: Event[] | null\n\torder_subscription?: OrderSubscription | null\n\n}\n\n\ninterface OrderCopyCreate extends ResourceCreate {\n\t\n\t/** \n\t * Indicates if the target order must be placed upon copy.\n\t * @example ```true```\n\t */\n\tplace_target_order?: boolean | null\n\t/** \n\t * Indicates if the payment source within the source order customer's wallet must be copied.\n\t * @example ```true```\n\t */\n\treuse_wallet?: boolean | null\n\t/** \n\t * Indicates if the source order must be cancelled upon copy.\n\t * @example ```true```\n\t */\n\tcancel_source_order?: boolean | null\n\t/** \n\t * Indicates if promotions got applied upon copy.\n\t * @example ```true```\n\t */\n\tapply_promotions?: boolean | null\n\t/** \n\t * Indicates to ignore any errors during copy.\n\t * @example ```true```\n\t */\n\tskip_errors?: boolean | null\n\t/** \n\t * Indicates to ignore invalid coupon code during copy.\n\t * @example ```true```\n\t */\n\tignore_invalid_coupon?: boolean | null\n\n\tsource_order: OrderRel\n\n}\n\n\ntype OrderCopyUpdate = ResourceUpdate\n\n\nclass OrderCopies extends ApiResource<OrderCopy> {\n\n\tstatic readonly TYPE: OrderCopyType = 'order_copies' as const\n\n\tasync create(resource: OrderCopyCreate, params?: QueryParamsRetrieve<OrderCopy>, options?: ResourcesConfig): Promise<OrderCopy> {\n\t\treturn this.resources.create<OrderCopyCreate, OrderCopy>({ ...resource, type: OrderCopies.TYPE }, params, options)\n\t}\n\n\tasync update(resource: OrderCopyUpdate, params?: QueryParamsRetrieve<OrderCopy>, options?: ResourcesConfig): Promise<OrderCopy> {\n\t\treturn this.resources.update<OrderCopyUpdate, OrderCopy>({ ...resource, type: OrderCopies.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: OrderCopies.TYPE } : id, options)\n\t}\n\n\tasync source_order(orderCopyId: string | OrderCopy, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _orderCopyId = (orderCopyId as OrderCopy).id || orderCopyId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `order_copies/${_orderCopyId}/source_order`, params, options) as unknown as Order\n\t}\n\n\tasync target_order(orderCopyId: string | OrderCopy, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _orderCopyId = (orderCopyId as OrderCopy).id || orderCopyId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `order_copies/${_orderCopyId}/target_order`, params, options) as unknown as Order\n\t}\n\n\tasync events(orderCopyId: string | OrderCopy, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _orderCopyId = (orderCopyId as OrderCopy).id || orderCopyId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `order_copies/${_orderCopyId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync order_subscription(orderCopyId: string | OrderCopy, params?: QueryParamsRetrieve<OrderSubscription>, options?: ResourcesConfig): Promise<OrderSubscription> {\n\t\tconst _orderCopyId = (orderCopyId as OrderCopy).id || orderCopyId as string\n\t\treturn this.resources.fetch<OrderSubscription>({ type: 'order_subscriptions' }, `order_copies/${_orderCopyId}/order_subscription`, params, options) as unknown as OrderSubscription\n\t}\n\n\n\tisOrderCopy(resource: any): resource is OrderCopy {\n\t\treturn resource.type && (resource.type === OrderCopies.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): OrderCopyRel {\n\t\treturn super.relationshipOneToOne<OrderCopyRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): OrderCopyRel[] {\n\t\treturn super.relationshipOneToMany<OrderCopyRel>(...ids)\n\t}\n\n\n\ttype(): OrderCopyType {\n\t\treturn OrderCopies.TYPE\n\t}\n\n}\n\n\nconst instance = new OrderCopies()\nexport default instance\n\nexport type { OrderCopy, OrderCopyCreate, OrderCopyUpdate, OrderCopyType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/order_copies.ts"],"names":["ApiResource"],"mappings":";;;;AAoIA,MAAM,oBAAoBA,oBAAuB,CAAA;AAAA,EAEhD,OAAgB,IAAsB,GAAA,cAAA;AAAA,EAEtC,MAAM,MAAA,CAAO,QAA2B,EAAA,MAAA,EAAyC,OAA+C,EAAA;AAC/H,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAmC,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,WAAY,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAClH,EAEA,MAAM,MAAA,CAAO,QAA2B,EAAA,MAAA,EAAyC,OAA+C,EAAA;AAC/H,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAmC,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,MAAM,kBAAA,CAAmB,WAAiC,EAAA,MAAA,EAAiD,OAAuD,EAAA;AACjK,IAAM,MAAA,YAAA,GAAgB,YAA0B,EAAM,IAAA,WAAA;AACtD,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAyB,EAAE,IAAA,EAAM,qBAAsB,EAAA,EAAG,CAAgB,aAAA,EAAA,YAAY,CAAuB,mBAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACnJ,EAGA,YAAY,QAAsC,EAAA;AACjD,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,WAAY,CAAA,IAAA;AAAA;AACxD,EAGA,aAAa,EAA8C,EAAA;AAC1D,IAAO,OAAA,KAAA,CAAM,qBAAmC,EAAE,CAAA;AAAA;AACnD,EAEA,sBAAsB,GAA+B,EAAA;AACpD,IAAO,OAAA,KAAA,CAAM,qBAAoC,CAAA,GAAG,GAAG,CAAA;AAAA;AACxD,EAGA,IAAsB,GAAA;AACrB,IAAA,OAAO,WAAY,CAAA,IAAA;AAAA;AAGrB;AAGA,MAAM,QAAA,GAAW,IAAI,WAAY,EAAA;AACjC,IAAO,oBAAQ,GAAA","file":"order_copies.cjs","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Order, OrderType } from './orders'\nimport type { Event } from './events'\nimport type { OrderSubscription } from './order_subscriptions'\n\n\ntype OrderCopyType = 'order_copies'\ntype OrderCopyRel = ResourceRel & { type: OrderCopyType }\ntype OrderRel = ResourceRel & { type: OrderType }\n\n\nexport type OrderCopySort = Pick<OrderCopy, 'id' | 'status' | 'started_at' | 'completed_at' | 'failed_at' | 'errors_count'> & ResourceSort\n// export type OrderCopyFilter = Pick<OrderCopy, 'id' | 'status' | 'started_at' | 'completed_at' | 'failed_at' | 'errors_count'> & ResourceFilter\n\n\ninterface OrderCopy extends Resource {\n\t\n\treadonly type: OrderCopyType\n\n\t/** \n\t * The order factory status. One of 'pending' (default), 'in_progress', 'aborted', 'failed', or 'completed'.\n\t * @example ```\"in_progress\"```\n\t */\n\tstatus: 'pending' | 'in_progress' | 'aborted' | 'failed' | 'completed'\n\t/** \n\t * Time at which the order copy was started.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tstarted_at?: string | null\n\t/** \n\t * Time at which the order copy was completed.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tcompleted_at?: string | null\n\t/** \n\t * Time at which the order copy has failed.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tfailed_at?: string | null\n\t/** \n\t * Contains the order copy errors, if any.\n\t * @example ```{\"status\":[\"cannot transition from draft to placed\"]}```\n\t */\n\terrors_log?: Record<string, any> | null\n\t/** \n\t * Indicates the number of copy errors, if any.\n\t * @example ```2```\n\t */\n\terrors_count?: number | null\n\t/** \n\t * Indicates if the target order must be placed upon copy.\n\t * @example ```true```\n\t */\n\tplace_target_order?: boolean | null\n\t/** \n\t * Indicates if the payment source within the source order customer's wallet must be copied.\n\t * @example ```true```\n\t */\n\treuse_wallet?: boolean | null\n\t/** \n\t * Indicates if the source order must be cancelled upon copy.\n\t * @example ```true```\n\t */\n\tcancel_source_order?: boolean | null\n\t/** \n\t * Indicates if promotions got applied upon copy.\n\t * @example ```true```\n\t */\n\tapply_promotions?: boolean | null\n\t/** \n\t * Indicates to ignore any errors during copy.\n\t * @example ```true```\n\t */\n\tskip_errors?: boolean | null\n\t/** \n\t * Indicates to ignore invalid coupon code during copy.\n\t * @example ```true```\n\t */\n\tignore_invalid_coupon?: boolean | null\n\n\tsource_order?: Order | null\n\ttarget_order?: Order | null\n\tevents?: Event[] | null\n\torder_subscription?: OrderSubscription | null\n\n}\n\n\ninterface OrderCopyCreate extends ResourceCreate {\n\t\n\t/** \n\t * Indicates if the target order must be placed upon copy.\n\t * @example ```true```\n\t */\n\tplace_target_order?: boolean | null\n\t/** \n\t * Indicates if the payment source within the source order customer's wallet must be copied.\n\t * @example ```true```\n\t */\n\treuse_wallet?: boolean | null\n\t/** \n\t * Indicates if the source order must be cancelled upon copy.\n\t * @example ```true```\n\t */\n\tcancel_source_order?: boolean | null\n\t/** \n\t * Indicates if promotions got applied upon copy.\n\t * @example ```true```\n\t */\n\tapply_promotions?: boolean | null\n\t/** \n\t * Indicates to ignore any errors during copy.\n\t * @example ```true```\n\t */\n\tskip_errors?: boolean | null\n\t/** \n\t * Indicates to ignore invalid coupon code during copy.\n\t * @example ```true```\n\t */\n\tignore_invalid_coupon?: boolean | null\n\n\tsource_order: OrderRel\n\n}\n\n\ntype OrderCopyUpdate = ResourceUpdate\n\n\nclass OrderCopies extends ApiResource<OrderCopy> {\n\n\tstatic readonly TYPE: OrderCopyType = 'order_copies' as const\n\n\tasync create(resource: OrderCopyCreate, params?: QueryParamsRetrieve<OrderCopy>, options?: ResourcesConfig): Promise<OrderCopy> {\n\t\treturn this.resources.create<OrderCopyCreate, OrderCopy>({ ...resource, type: OrderCopies.TYPE }, params, options)\n\t}\n\n\tasync update(resource: OrderCopyUpdate, params?: QueryParamsRetrieve<OrderCopy>, options?: ResourcesConfig): Promise<OrderCopy> {\n\t\treturn this.resources.update<OrderCopyUpdate, OrderCopy>({ ...resource, type: OrderCopies.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: OrderCopies.TYPE } : id, options)\n\t}\n\n\tasync source_order(orderCopyId: string | OrderCopy, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _orderCopyId = (orderCopyId as OrderCopy).id || orderCopyId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `order_copies/${_orderCopyId}/source_order`, params, options) as unknown as Order\n\t}\n\n\tasync target_order(orderCopyId: string | OrderCopy, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _orderCopyId = (orderCopyId as OrderCopy).id || orderCopyId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `order_copies/${_orderCopyId}/target_order`, params, options) as unknown as Order\n\t}\n\n\tasync events(orderCopyId: string | OrderCopy, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _orderCopyId = (orderCopyId as OrderCopy).id || orderCopyId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `order_copies/${_orderCopyId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync order_subscription(orderCopyId: string | OrderCopy, params?: QueryParamsRetrieve<OrderSubscription>, options?: ResourcesConfig): Promise<OrderSubscription> {\n\t\tconst _orderCopyId = (orderCopyId as OrderCopy).id || orderCopyId as string\n\t\treturn this.resources.fetch<OrderSubscription>({ type: 'order_subscriptions' }, `order_copies/${_orderCopyId}/order_subscription`, params, options) as unknown as OrderSubscription\n\t}\n\n\n\tisOrderCopy(resource: any): resource is OrderCopy {\n\t\treturn resource.type && (resource.type === OrderCopies.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): OrderCopyRel {\n\t\treturn super.relationshipOneToOne<OrderCopyRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): OrderCopyRel[] {\n\t\treturn super.relationshipOneToMany<OrderCopyRel>(...ids)\n\t}\n\n\n\ttype(): OrderCopyType {\n\t\treturn OrderCopies.TYPE\n\t}\n\n}\n\n\nconst instance = new OrderCopies()\nexport default instance\n\nexport type { OrderCopies, OrderCopy, OrderCopyCreate, OrderCopyUpdate, OrderCopyType }\n"]}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { bQ as OrderCopies, hN as OrderCopy, hO as OrderCopyCreate, hQ as OrderCopySort, mD as OrderCopyType, hP as OrderCopyUpdate, bP 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 { bQ as OrderCopies, hN as OrderCopy, hO as OrderCopyCreate, hQ as OrderCopySort, mD as OrderCopyType, hP as OrderCopyUpdate, bP as default } from '../api-F1F37Dud.js';
|
2
2
|
import '../client.js';
|
3
3
|
import '../interceptor-k15jXzf0.js';
|
4
4
|
import '../types.js';
|