@commercelayer/sdk 7.0.0-beta.19 → 7.0.0-beta.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/{api-CUXmETkx.d.ts → api-DDgIE2i8.d.ts} +6 -3
- package/lib/{api-CRmSToGa.d.cts → api-DmIZO_Np.d.cts} +6 -3
- package/lib/api.cjs +2 -0
- package/lib/api.cjs.map +1 -0
- package/lib/api.d.cts +1 -1
- package/lib/api.d.ts +1 -1
- package/lib/api.js +2 -0
- package/lib/api.js.map +1 -0
- package/lib/client.cjs +2 -0
- package/lib/client.cjs.map +1 -0
- package/lib/client.js +2 -0
- package/lib/client.js.map +1 -0
- package/lib/commercelayer.cjs +2 -0
- package/lib/commercelayer.cjs.map +1 -0
- package/lib/commercelayer.d.cts +1 -1
- package/lib/commercelayer.d.ts +1 -1
- package/lib/commercelayer.js +2 -0
- package/lib/commercelayer.js.map +1 -0
- package/lib/config.cjs +2 -0
- package/lib/config.cjs.map +1 -0
- package/lib/config.js +2 -0
- package/lib/config.js.map +1 -0
- package/lib/debug.cjs +2 -0
- package/lib/debug.cjs.map +1 -0
- package/lib/debug.js +2 -0
- package/lib/debug.js.map +1 -0
- package/lib/enum.cjs +2 -0
- package/lib/enum.cjs.map +1 -0
- package/lib/enum.d.cts +1 -1
- package/lib/enum.d.ts +1 -1
- package/lib/enum.js +2 -0
- package/lib/enum.js.map +1 -0
- package/lib/error.cjs +2 -0
- package/lib/error.cjs.map +1 -0
- package/lib/error.js +2 -0
- package/lib/error.js.map +1 -0
- package/lib/fetch.cjs +2 -0
- package/lib/fetch.cjs.map +1 -0
- package/lib/fetch.js +2 -0
- package/lib/fetch.js.map +1 -0
- package/lib/index.cjs +2 -0
- package/lib/index.cjs.map +1 -0
- package/lib/index.d.cts +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +2 -0
- package/lib/index.js.map +1 -0
- package/lib/interceptor.cjs +2 -0
- package/lib/interceptor.cjs.map +1 -0
- package/lib/interceptor.js +2 -0
- package/lib/interceptor.js.map +1 -0
- package/lib/jsonapi.cjs +12 -10
- package/lib/jsonapi.cjs.map +1 -0
- package/lib/jsonapi.d.cts +1 -1
- package/lib/jsonapi.d.ts +1 -1
- package/lib/jsonapi.js +3 -1
- package/lib/jsonapi.js.map +1 -0
- package/lib/model.cjs +2 -0
- package/lib/model.cjs.map +1 -0
- package/lib/model.d.cts +1 -1
- package/lib/model.d.ts +1 -1
- package/lib/model.js +2 -0
- package/lib/model.js.map +1 -0
- package/lib/query.cjs +2 -0
- package/lib/query.cjs.map +1 -0
- package/lib/query.d.cts +1 -1
- package/lib/query.d.ts +1 -1
- package/lib/query.js +2 -0
- package/lib/query.js.map +1 -0
- package/lib/resource.cjs +11 -0
- package/lib/resource.cjs.map +1 -0
- package/lib/resource.d.cts +2 -2
- package/lib/resource.d.ts +2 -2
- package/lib/resource.js +10 -1
- package/lib/resource.js.map +1 -0
- package/lib/resources/addresses.cjs +2 -0
- package/lib/resources/addresses.cjs.map +1 -0
- package/lib/resources/addresses.d.cts +1 -1
- package/lib/resources/addresses.d.ts +1 -1
- package/lib/resources/addresses.js +2 -0
- package/lib/resources/addresses.js.map +1 -0
- package/lib/resources/adjustments.cjs +2 -0
- package/lib/resources/adjustments.cjs.map +1 -0
- package/lib/resources/adjustments.d.cts +1 -1
- package/lib/resources/adjustments.d.ts +1 -1
- package/lib/resources/adjustments.js +2 -0
- package/lib/resources/adjustments.js.map +1 -0
- package/lib/resources/adyen_gateways.cjs +2 -0
- package/lib/resources/adyen_gateways.cjs.map +1 -0
- package/lib/resources/adyen_gateways.d.cts +1 -1
- package/lib/resources/adyen_gateways.d.ts +1 -1
- package/lib/resources/adyen_gateways.js +2 -0
- package/lib/resources/adyen_gateways.js.map +1 -0
- package/lib/resources/adyen_payments.cjs +2 -0
- package/lib/resources/adyen_payments.cjs.map +1 -0
- package/lib/resources/adyen_payments.d.cts +1 -1
- package/lib/resources/adyen_payments.d.ts +1 -1
- package/lib/resources/adyen_payments.js +2 -0
- package/lib/resources/adyen_payments.js.map +1 -0
- package/lib/resources/applications.cjs +2 -0
- package/lib/resources/applications.cjs.map +1 -0
- package/lib/resources/applications.d.cts +1 -1
- package/lib/resources/applications.d.ts +1 -1
- package/lib/resources/applications.js +2 -0
- package/lib/resources/applications.js.map +1 -0
- package/lib/resources/attachments.cjs +2 -0
- package/lib/resources/attachments.cjs.map +1 -0
- package/lib/resources/attachments.d.cts +1 -1
- package/lib/resources/attachments.d.ts +1 -1
- package/lib/resources/attachments.js +2 -0
- package/lib/resources/attachments.js.map +1 -0
- package/lib/resources/authorizations.cjs +2 -0
- package/lib/resources/authorizations.cjs.map +1 -0
- package/lib/resources/authorizations.d.cts +1 -1
- package/lib/resources/authorizations.d.ts +1 -1
- package/lib/resources/authorizations.js +2 -0
- package/lib/resources/authorizations.js.map +1 -0
- package/lib/resources/avalara_accounts.cjs +2 -0
- package/lib/resources/avalara_accounts.cjs.map +1 -0
- package/lib/resources/avalara_accounts.d.cts +1 -1
- package/lib/resources/avalara_accounts.d.ts +1 -1
- package/lib/resources/avalara_accounts.js +2 -0
- package/lib/resources/avalara_accounts.js.map +1 -0
- package/lib/resources/axerve_gateways.cjs +2 -0
- package/lib/resources/axerve_gateways.cjs.map +1 -0
- package/lib/resources/axerve_gateways.d.cts +1 -1
- package/lib/resources/axerve_gateways.d.ts +1 -1
- package/lib/resources/axerve_gateways.js +2 -0
- package/lib/resources/axerve_gateways.js.map +1 -0
- package/lib/resources/axerve_payments.cjs +2 -0
- package/lib/resources/axerve_payments.cjs.map +1 -0
- package/lib/resources/axerve_payments.d.cts +1 -1
- package/lib/resources/axerve_payments.d.ts +1 -1
- package/lib/resources/axerve_payments.js +2 -0
- package/lib/resources/axerve_payments.js.map +1 -0
- package/lib/resources/bing_geocoders.cjs +2 -0
- package/lib/resources/bing_geocoders.cjs.map +1 -0
- package/lib/resources/bing_geocoders.d.cts +1 -1
- package/lib/resources/bing_geocoders.d.ts +1 -1
- package/lib/resources/bing_geocoders.js +2 -0
- package/lib/resources/bing_geocoders.js.map +1 -0
- package/lib/resources/braintree_gateways.cjs +2 -0
- package/lib/resources/braintree_gateways.cjs.map +1 -0
- package/lib/resources/braintree_gateways.d.cts +1 -1
- package/lib/resources/braintree_gateways.d.ts +1 -1
- package/lib/resources/braintree_gateways.js +2 -0
- package/lib/resources/braintree_gateways.js.map +1 -0
- package/lib/resources/braintree_payments.cjs +2 -0
- package/lib/resources/braintree_payments.cjs.map +1 -0
- package/lib/resources/braintree_payments.d.cts +1 -1
- package/lib/resources/braintree_payments.d.ts +1 -1
- package/lib/resources/braintree_payments.js +2 -0
- package/lib/resources/braintree_payments.js.map +1 -0
- package/lib/resources/bundles.cjs +2 -0
- package/lib/resources/bundles.cjs.map +1 -0
- package/lib/resources/bundles.d.cts +1 -1
- package/lib/resources/bundles.d.ts +1 -1
- package/lib/resources/bundles.js +2 -0
- package/lib/resources/bundles.js.map +1 -0
- package/lib/resources/buy_x_pay_y_promotions.cjs +2 -0
- package/lib/resources/buy_x_pay_y_promotions.cjs.map +1 -0
- 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 +2 -0
- package/lib/resources/buy_x_pay_y_promotions.js.map +1 -0
- package/lib/resources/captures.cjs +2 -0
- package/lib/resources/captures.cjs.map +1 -0
- package/lib/resources/captures.d.cts +1 -1
- package/lib/resources/captures.d.ts +1 -1
- package/lib/resources/captures.js +2 -0
- package/lib/resources/captures.js.map +1 -0
- package/lib/resources/carrier_accounts.cjs +2 -0
- package/lib/resources/carrier_accounts.cjs.map +1 -0
- package/lib/resources/carrier_accounts.d.cts +1 -1
- package/lib/resources/carrier_accounts.d.ts +1 -1
- package/lib/resources/carrier_accounts.js +2 -0
- package/lib/resources/carrier_accounts.js.map +1 -0
- package/lib/resources/checkout_com_gateways.cjs +2 -0
- package/lib/resources/checkout_com_gateways.cjs.map +1 -0
- 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 +2 -0
- package/lib/resources/checkout_com_gateways.js.map +1 -0
- package/lib/resources/checkout_com_payments.cjs +2 -0
- package/lib/resources/checkout_com_payments.cjs.map +1 -0
- 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 +2 -0
- package/lib/resources/checkout_com_payments.js.map +1 -0
- package/lib/resources/cleanups.cjs +2 -0
- package/lib/resources/cleanups.cjs.map +1 -0
- package/lib/resources/cleanups.d.cts +1 -1
- package/lib/resources/cleanups.d.ts +1 -1
- package/lib/resources/cleanups.js +2 -0
- package/lib/resources/cleanups.js.map +1 -0
- package/lib/resources/coupon_codes_promotion_rules.cjs +2 -0
- package/lib/resources/coupon_codes_promotion_rules.cjs.map +1 -0
- 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 +2 -0
- package/lib/resources/coupon_codes_promotion_rules.js.map +1 -0
- package/lib/resources/coupon_recipients.cjs +2 -0
- package/lib/resources/coupon_recipients.cjs.map +1 -0
- package/lib/resources/coupon_recipients.d.cts +1 -1
- package/lib/resources/coupon_recipients.d.ts +1 -1
- package/lib/resources/coupon_recipients.js +2 -0
- package/lib/resources/coupon_recipients.js.map +1 -0
- package/lib/resources/coupons.cjs +2 -0
- package/lib/resources/coupons.cjs.map +1 -0
- package/lib/resources/coupons.d.cts +1 -1
- package/lib/resources/coupons.d.ts +1 -1
- package/lib/resources/coupons.js +2 -0
- package/lib/resources/coupons.js.map +1 -0
- package/lib/resources/custom_promotion_rules.cjs +2 -0
- package/lib/resources/custom_promotion_rules.cjs.map +1 -0
- 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 +2 -0
- package/lib/resources/custom_promotion_rules.js.map +1 -0
- package/lib/resources/customer_addresses.cjs +2 -0
- package/lib/resources/customer_addresses.cjs.map +1 -0
- package/lib/resources/customer_addresses.d.cts +1 -1
- package/lib/resources/customer_addresses.d.ts +1 -1
- package/lib/resources/customer_addresses.js +2 -0
- package/lib/resources/customer_addresses.js.map +1 -0
- package/lib/resources/customer_groups.cjs +2 -0
- package/lib/resources/customer_groups.cjs.map +1 -0
- package/lib/resources/customer_groups.d.cts +1 -1
- package/lib/resources/customer_groups.d.ts +1 -1
- package/lib/resources/customer_groups.js +2 -0
- package/lib/resources/customer_groups.js.map +1 -0
- package/lib/resources/customer_password_resets.cjs +2 -0
- package/lib/resources/customer_password_resets.cjs.map +1 -0
- 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 +2 -0
- package/lib/resources/customer_password_resets.js.map +1 -0
- package/lib/resources/customer_payment_sources.cjs +2 -0
- package/lib/resources/customer_payment_sources.cjs.map +1 -0
- 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 +2 -0
- package/lib/resources/customer_payment_sources.js.map +1 -0
- package/lib/resources/customer_subscriptions.cjs +2 -0
- package/lib/resources/customer_subscriptions.cjs.map +1 -0
- package/lib/resources/customer_subscriptions.d.cts +1 -1
- package/lib/resources/customer_subscriptions.d.ts +1 -1
- package/lib/resources/customer_subscriptions.js +2 -0
- package/lib/resources/customer_subscriptions.js.map +1 -0
- package/lib/resources/customers.cjs +2 -0
- package/lib/resources/customers.cjs.map +1 -0
- package/lib/resources/customers.d.cts +1 -1
- package/lib/resources/customers.d.ts +1 -1
- package/lib/resources/customers.js +2 -0
- package/lib/resources/customers.js.map +1 -0
- package/lib/resources/delivery_lead_times.cjs +2 -0
- package/lib/resources/delivery_lead_times.cjs.map +1 -0
- 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 +2 -0
- package/lib/resources/delivery_lead_times.js.map +1 -0
- package/lib/resources/discount_engine_items.cjs +2 -0
- package/lib/resources/discount_engine_items.cjs.map +1 -0
- 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 +2 -0
- package/lib/resources/discount_engine_items.js.map +1 -0
- package/lib/resources/discount_engines.cjs +2 -0
- package/lib/resources/discount_engines.cjs.map +1 -0
- package/lib/resources/discount_engines.d.cts +1 -1
- package/lib/resources/discount_engines.d.ts +1 -1
- package/lib/resources/discount_engines.js +2 -0
- package/lib/resources/discount_engines.js.map +1 -0
- package/lib/resources/easypost_pickups.cjs +2 -0
- package/lib/resources/easypost_pickups.cjs.map +1 -0
- package/lib/resources/easypost_pickups.d.cts +1 -1
- package/lib/resources/easypost_pickups.d.ts +1 -1
- package/lib/resources/easypost_pickups.js +2 -0
- package/lib/resources/easypost_pickups.js.map +1 -0
- package/lib/resources/event_callbacks.cjs +2 -0
- package/lib/resources/event_callbacks.cjs.map +1 -0
- package/lib/resources/event_callbacks.d.cts +1 -1
- package/lib/resources/event_callbacks.d.ts +1 -1
- package/lib/resources/event_callbacks.js +2 -0
- package/lib/resources/event_callbacks.js.map +1 -0
- package/lib/resources/events.cjs +2 -0
- package/lib/resources/events.cjs.map +1 -0
- package/lib/resources/events.d.cts +1 -1
- package/lib/resources/events.d.ts +1 -1
- package/lib/resources/events.js +2 -0
- package/lib/resources/events.js.map +1 -0
- package/lib/resources/exports.cjs +2 -0
- package/lib/resources/exports.cjs.map +1 -0
- package/lib/resources/exports.d.cts +1 -1
- package/lib/resources/exports.d.ts +1 -1
- package/lib/resources/exports.js +2 -0
- package/lib/resources/exports.js.map +1 -0
- package/lib/resources/external_gateways.cjs +2 -0
- package/lib/resources/external_gateways.cjs.map +1 -0
- package/lib/resources/external_gateways.d.cts +1 -1
- package/lib/resources/external_gateways.d.ts +1 -1
- package/lib/resources/external_gateways.js +2 -0
- package/lib/resources/external_gateways.js.map +1 -0
- package/lib/resources/external_payments.cjs +2 -0
- package/lib/resources/external_payments.cjs.map +1 -0
- package/lib/resources/external_payments.d.cts +1 -1
- package/lib/resources/external_payments.d.ts +1 -1
- package/lib/resources/external_payments.js +2 -0
- package/lib/resources/external_payments.js.map +1 -0
- package/lib/resources/external_promotions.cjs +2 -0
- package/lib/resources/external_promotions.cjs.map +1 -0
- package/lib/resources/external_promotions.d.cts +1 -1
- package/lib/resources/external_promotions.d.ts +1 -1
- package/lib/resources/external_promotions.js +2 -0
- package/lib/resources/external_promotions.js.map +1 -0
- package/lib/resources/external_tax_calculators.cjs +2 -0
- package/lib/resources/external_tax_calculators.cjs.map +1 -0
- 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 +2 -0
- package/lib/resources/external_tax_calculators.js.map +1 -0
- package/lib/resources/fixed_amount_promotions.cjs +2 -0
- package/lib/resources/fixed_amount_promotions.cjs.map +1 -0
- 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 +2 -0
- package/lib/resources/fixed_amount_promotions.js.map +1 -0
- package/lib/resources/fixed_price_promotions.cjs +2 -0
- package/lib/resources/fixed_price_promotions.cjs.map +1 -0
- 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 +2 -0
- package/lib/resources/fixed_price_promotions.js.map +1 -0
- package/lib/resources/flex_promotions.cjs +2 -0
- package/lib/resources/flex_promotions.cjs.map +1 -0
- package/lib/resources/flex_promotions.d.cts +1 -1
- package/lib/resources/flex_promotions.d.ts +1 -1
- package/lib/resources/flex_promotions.js +2 -0
- package/lib/resources/flex_promotions.js.map +1 -0
- package/lib/resources/free_gift_promotions.cjs +2 -0
- package/lib/resources/free_gift_promotions.cjs.map +1 -0
- 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 +2 -0
- package/lib/resources/free_gift_promotions.js.map +1 -0
- package/lib/resources/free_shipping_promotions.cjs +2 -0
- package/lib/resources/free_shipping_promotions.cjs.map +1 -0
- 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 +2 -0
- package/lib/resources/free_shipping_promotions.js.map +1 -0
- package/lib/resources/geocoders.cjs +2 -0
- package/lib/resources/geocoders.cjs.map +1 -0
- package/lib/resources/geocoders.d.cts +1 -1
- package/lib/resources/geocoders.d.ts +1 -1
- package/lib/resources/geocoders.js +2 -0
- package/lib/resources/geocoders.js.map +1 -0
- package/lib/resources/gift_card_recipients.cjs +2 -0
- package/lib/resources/gift_card_recipients.cjs.map +1 -0
- 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 +2 -0
- package/lib/resources/gift_card_recipients.js.map +1 -0
- package/lib/resources/gift_cards.cjs +2 -0
- package/lib/resources/gift_cards.cjs.map +1 -0
- package/lib/resources/gift_cards.d.cts +1 -1
- package/lib/resources/gift_cards.d.ts +1 -1
- package/lib/resources/gift_cards.js +2 -0
- package/lib/resources/gift_cards.js.map +1 -0
- package/lib/resources/google_geocoders.cjs +2 -0
- package/lib/resources/google_geocoders.cjs.map +1 -0
- package/lib/resources/google_geocoders.d.cts +1 -1
- package/lib/resources/google_geocoders.d.ts +1 -1
- package/lib/resources/google_geocoders.js +2 -0
- package/lib/resources/google_geocoders.js.map +1 -0
- package/lib/resources/imports.cjs +2 -0
- package/lib/resources/imports.cjs.map +1 -0
- package/lib/resources/imports.d.cts +1 -1
- package/lib/resources/imports.d.ts +1 -1
- package/lib/resources/imports.js +2 -0
- package/lib/resources/imports.js.map +1 -0
- package/lib/resources/in_stock_subscriptions.cjs +2 -0
- package/lib/resources/in_stock_subscriptions.cjs.map +1 -0
- 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 +2 -0
- package/lib/resources/in_stock_subscriptions.js.map +1 -0
- package/lib/resources/inventory_models.cjs +2 -0
- package/lib/resources/inventory_models.cjs.map +1 -0
- package/lib/resources/inventory_models.d.cts +1 -1
- package/lib/resources/inventory_models.d.ts +1 -1
- package/lib/resources/inventory_models.js +2 -0
- package/lib/resources/inventory_models.js.map +1 -0
- package/lib/resources/inventory_return_locations.cjs +2 -0
- package/lib/resources/inventory_return_locations.cjs.map +1 -0
- 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 +2 -0
- package/lib/resources/inventory_return_locations.js.map +1 -0
- package/lib/resources/inventory_stock_locations.cjs +2 -0
- package/lib/resources/inventory_stock_locations.cjs.map +1 -0
- 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 +2 -0
- package/lib/resources/inventory_stock_locations.js.map +1 -0
- package/lib/resources/klarna_gateways.cjs +2 -0
- package/lib/resources/klarna_gateways.cjs.map +1 -0
- package/lib/resources/klarna_gateways.d.cts +1 -1
- package/lib/resources/klarna_gateways.d.ts +1 -1
- package/lib/resources/klarna_gateways.js +2 -0
- package/lib/resources/klarna_gateways.js.map +1 -0
- package/lib/resources/klarna_payments.cjs +2 -0
- package/lib/resources/klarna_payments.cjs.map +1 -0
- package/lib/resources/klarna_payments.d.cts +1 -1
- package/lib/resources/klarna_payments.d.ts +1 -1
- package/lib/resources/klarna_payments.js +2 -0
- package/lib/resources/klarna_payments.js.map +1 -0
- package/lib/resources/line_item_options.cjs +2 -0
- package/lib/resources/line_item_options.cjs.map +1 -0
- 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 +2 -0
- package/lib/resources/line_item_options.js.map +1 -0
- package/lib/resources/line_items.cjs +2 -0
- package/lib/resources/line_items.cjs.map +1 -0
- package/lib/resources/line_items.d.cts +1 -1
- package/lib/resources/line_items.d.ts +1 -1
- package/lib/resources/line_items.js +2 -0
- package/lib/resources/line_items.js.map +1 -0
- package/lib/resources/links.cjs +2 -0
- package/lib/resources/links.cjs.map +1 -0
- package/lib/resources/links.d.cts +1 -1
- package/lib/resources/links.d.ts +1 -1
- package/lib/resources/links.js +2 -0
- package/lib/resources/links.js.map +1 -0
- package/lib/resources/manual_gateways.cjs +2 -0
- package/lib/resources/manual_gateways.cjs.map +1 -0
- package/lib/resources/manual_gateways.d.cts +1 -1
- package/lib/resources/manual_gateways.d.ts +1 -1
- package/lib/resources/manual_gateways.js +2 -0
- package/lib/resources/manual_gateways.js.map +1 -0
- package/lib/resources/manual_tax_calculators.cjs +2 -0
- package/lib/resources/manual_tax_calculators.cjs.map +1 -0
- 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 +2 -0
- package/lib/resources/manual_tax_calculators.js.map +1 -0
- package/lib/resources/markets.cjs +2 -0
- package/lib/resources/markets.cjs.map +1 -0
- package/lib/resources/markets.d.cts +1 -1
- package/lib/resources/markets.d.ts +1 -1
- package/lib/resources/markets.js +2 -0
- package/lib/resources/markets.js.map +1 -0
- package/lib/resources/merchants.cjs +2 -0
- package/lib/resources/merchants.cjs.map +1 -0
- package/lib/resources/merchants.d.cts +1 -1
- package/lib/resources/merchants.d.ts +1 -1
- package/lib/resources/merchants.js +2 -0
- package/lib/resources/merchants.js.map +1 -0
- package/lib/resources/notifications.cjs +2 -0
- package/lib/resources/notifications.cjs.map +1 -0
- package/lib/resources/notifications.d.cts +1 -1
- package/lib/resources/notifications.d.ts +1 -1
- package/lib/resources/notifications.js +2 -0
- package/lib/resources/notifications.js.map +1 -0
- package/lib/resources/order_amount_promotion_rules.cjs +2 -0
- package/lib/resources/order_amount_promotion_rules.cjs.map +1 -0
- 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 +2 -0
- package/lib/resources/order_amount_promotion_rules.js.map +1 -0
- package/lib/resources/order_copies.cjs +2 -0
- package/lib/resources/order_copies.cjs.map +1 -0
- package/lib/resources/order_copies.d.cts +1 -1
- package/lib/resources/order_copies.d.ts +1 -1
- package/lib/resources/order_copies.js +2 -0
- package/lib/resources/order_copies.js.map +1 -0
- package/lib/resources/order_factories.cjs +2 -0
- package/lib/resources/order_factories.cjs.map +1 -0
- package/lib/resources/order_factories.d.cts +1 -1
- package/lib/resources/order_factories.d.ts +1 -1
- package/lib/resources/order_factories.js +2 -0
- package/lib/resources/order_factories.js.map +1 -0
- package/lib/resources/order_subscription_items.cjs +2 -0
- package/lib/resources/order_subscription_items.cjs.map +1 -0
- 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 +2 -0
- package/lib/resources/order_subscription_items.js.map +1 -0
- package/lib/resources/order_subscriptions.cjs +2 -0
- package/lib/resources/order_subscriptions.cjs.map +1 -0
- package/lib/resources/order_subscriptions.d.cts +1 -1
- package/lib/resources/order_subscriptions.d.ts +1 -1
- package/lib/resources/order_subscriptions.js +2 -0
- package/lib/resources/order_subscriptions.js.map +1 -0
- package/lib/resources/orders.cjs +2 -0
- package/lib/resources/orders.cjs.map +1 -0
- package/lib/resources/orders.d.cts +1 -1
- package/lib/resources/orders.d.ts +1 -1
- package/lib/resources/orders.js +2 -0
- package/lib/resources/orders.js.map +1 -0
- package/lib/resources/organizations.cjs +2 -0
- package/lib/resources/organizations.cjs.map +1 -0
- package/lib/resources/organizations.d.cts +1 -1
- package/lib/resources/organizations.d.ts +1 -1
- package/lib/resources/organizations.js +2 -0
- package/lib/resources/organizations.js.map +1 -0
- package/lib/resources/packages.cjs +2 -0
- package/lib/resources/packages.cjs.map +1 -0
- package/lib/resources/packages.d.cts +1 -1
- package/lib/resources/packages.d.ts +1 -1
- package/lib/resources/packages.js +2 -0
- package/lib/resources/packages.js.map +1 -0
- package/lib/resources/parcel_line_items.cjs +2 -0
- package/lib/resources/parcel_line_items.cjs.map +1 -0
- 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 +2 -0
- package/lib/resources/parcel_line_items.js.map +1 -0
- package/lib/resources/parcels.cjs +2 -0
- package/lib/resources/parcels.cjs.map +1 -0
- package/lib/resources/parcels.d.cts +1 -1
- package/lib/resources/parcels.d.ts +1 -1
- package/lib/resources/parcels.js +2 -0
- package/lib/resources/parcels.js.map +1 -0
- package/lib/resources/payment_gateways.cjs +2 -0
- package/lib/resources/payment_gateways.cjs.map +1 -0
- package/lib/resources/payment_gateways.d.cts +1 -1
- package/lib/resources/payment_gateways.d.ts +1 -1
- package/lib/resources/payment_gateways.js +2 -0
- package/lib/resources/payment_gateways.js.map +1 -0
- package/lib/resources/payment_methods.cjs +2 -0
- package/lib/resources/payment_methods.cjs.map +1 -0
- package/lib/resources/payment_methods.d.cts +1 -1
- package/lib/resources/payment_methods.d.ts +1 -1
- package/lib/resources/payment_methods.js +2 -0
- package/lib/resources/payment_methods.js.map +1 -0
- package/lib/resources/payment_options.cjs +2 -0
- package/lib/resources/payment_options.cjs.map +1 -0
- package/lib/resources/payment_options.d.cts +1 -1
- package/lib/resources/payment_options.d.ts +1 -1
- package/lib/resources/payment_options.js +2 -0
- package/lib/resources/payment_options.js.map +1 -0
- package/lib/resources/paypal_gateways.cjs +2 -0
- package/lib/resources/paypal_gateways.cjs.map +1 -0
- package/lib/resources/paypal_gateways.d.cts +1 -1
- package/lib/resources/paypal_gateways.d.ts +1 -1
- package/lib/resources/paypal_gateways.js +2 -0
- package/lib/resources/paypal_gateways.js.map +1 -0
- package/lib/resources/paypal_payments.cjs +2 -0
- package/lib/resources/paypal_payments.cjs.map +1 -0
- package/lib/resources/paypal_payments.d.cts +1 -1
- package/lib/resources/paypal_payments.d.ts +1 -1
- package/lib/resources/paypal_payments.js +2 -0
- package/lib/resources/paypal_payments.js.map +1 -0
- package/lib/resources/percentage_discount_promotions.cjs +2 -0
- package/lib/resources/percentage_discount_promotions.cjs.map +1 -0
- 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 +2 -0
- package/lib/resources/percentage_discount_promotions.js.map +1 -0
- package/lib/resources/pickups.cjs +2 -0
- package/lib/resources/pickups.cjs.map +1 -0
- package/lib/resources/pickups.d.cts +1 -1
- package/lib/resources/pickups.d.ts +1 -1
- package/lib/resources/pickups.js +2 -0
- package/lib/resources/pickups.js.map +1 -0
- package/lib/resources/price_frequency_tiers.cjs +2 -0
- package/lib/resources/price_frequency_tiers.cjs.map +1 -0
- 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 +2 -0
- package/lib/resources/price_frequency_tiers.js.map +1 -0
- package/lib/resources/price_list_schedulers.cjs +2 -0
- package/lib/resources/price_list_schedulers.cjs.map +1 -0
- 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 +2 -0
- package/lib/resources/price_list_schedulers.js.map +1 -0
- package/lib/resources/price_lists.cjs +2 -0
- package/lib/resources/price_lists.cjs.map +1 -0
- package/lib/resources/price_lists.d.cts +1 -1
- package/lib/resources/price_lists.d.ts +1 -1
- package/lib/resources/price_lists.js +2 -0
- package/lib/resources/price_lists.js.map +1 -0
- package/lib/resources/price_tiers.cjs +2 -0
- package/lib/resources/price_tiers.cjs.map +1 -0
- package/lib/resources/price_tiers.d.cts +1 -1
- package/lib/resources/price_tiers.d.ts +1 -1
- package/lib/resources/price_tiers.js +2 -0
- package/lib/resources/price_tiers.js.map +1 -0
- package/lib/resources/price_volume_tiers.cjs +2 -0
- package/lib/resources/price_volume_tiers.cjs.map +1 -0
- 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 +2 -0
- package/lib/resources/price_volume_tiers.js.map +1 -0
- package/lib/resources/prices.cjs +2 -0
- package/lib/resources/prices.cjs.map +1 -0
- package/lib/resources/prices.d.cts +1 -1
- package/lib/resources/prices.d.ts +1 -1
- package/lib/resources/prices.js +2 -0
- package/lib/resources/prices.js.map +1 -0
- package/lib/resources/promotion_rules.cjs +2 -0
- package/lib/resources/promotion_rules.cjs.map +1 -0
- package/lib/resources/promotion_rules.d.cts +1 -1
- package/lib/resources/promotion_rules.d.ts +1 -1
- package/lib/resources/promotion_rules.js +2 -0
- package/lib/resources/promotion_rules.js.map +1 -0
- package/lib/resources/promotions.cjs +2 -0
- package/lib/resources/promotions.cjs.map +1 -0
- package/lib/resources/promotions.d.cts +1 -1
- package/lib/resources/promotions.d.ts +1 -1
- package/lib/resources/promotions.js +2 -0
- package/lib/resources/promotions.js.map +1 -0
- package/lib/resources/recurring_order_copies.cjs +2 -0
- package/lib/resources/recurring_order_copies.cjs.map +1 -0
- 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 +2 -0
- package/lib/resources/recurring_order_copies.js.map +1 -0
- package/lib/resources/refunds.cjs +2 -0
- package/lib/resources/refunds.cjs.map +1 -0
- package/lib/resources/refunds.d.cts +1 -1
- package/lib/resources/refunds.d.ts +1 -1
- package/lib/resources/refunds.js +2 -0
- package/lib/resources/refunds.js.map +1 -0
- package/lib/resources/reserved_stocks.cjs +2 -0
- package/lib/resources/reserved_stocks.cjs.map +1 -0
- package/lib/resources/reserved_stocks.d.cts +1 -1
- package/lib/resources/reserved_stocks.d.ts +1 -1
- package/lib/resources/reserved_stocks.js +2 -0
- package/lib/resources/reserved_stocks.js.map +1 -0
- package/lib/resources/resource_errors.cjs +2 -0
- package/lib/resources/resource_errors.cjs.map +1 -0
- package/lib/resources/resource_errors.d.cts +1 -1
- package/lib/resources/resource_errors.d.ts +1 -1
- package/lib/resources/resource_errors.js +2 -0
- package/lib/resources/resource_errors.js.map +1 -0
- package/lib/resources/return_line_items.cjs +2 -0
- package/lib/resources/return_line_items.cjs.map +1 -0
- 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 +2 -0
- package/lib/resources/return_line_items.js.map +1 -0
- package/lib/resources/returns.cjs +2 -0
- package/lib/resources/returns.cjs.map +1 -0
- package/lib/resources/returns.d.cts +1 -1
- package/lib/resources/returns.d.ts +1 -1
- package/lib/resources/returns.js +2 -0
- package/lib/resources/returns.js.map +1 -0
- package/lib/resources/satispay_gateways.cjs +2 -0
- package/lib/resources/satispay_gateways.cjs.map +1 -0
- package/lib/resources/satispay_gateways.d.cts +1 -1
- package/lib/resources/satispay_gateways.d.ts +1 -1
- package/lib/resources/satispay_gateways.js +2 -0
- package/lib/resources/satispay_gateways.js.map +1 -0
- package/lib/resources/satispay_payments.cjs +2 -0
- package/lib/resources/satispay_payments.cjs.map +1 -0
- package/lib/resources/satispay_payments.d.cts +1 -1
- package/lib/resources/satispay_payments.d.ts +1 -1
- package/lib/resources/satispay_payments.js +2 -0
- package/lib/resources/satispay_payments.js.map +1 -0
- package/lib/resources/shipments.cjs +2 -0
- package/lib/resources/shipments.cjs.map +1 -0
- package/lib/resources/shipments.d.cts +1 -1
- package/lib/resources/shipments.d.ts +1 -1
- package/lib/resources/shipments.js +2 -0
- package/lib/resources/shipments.js.map +1 -0
- package/lib/resources/shipping_categories.cjs +2 -0
- package/lib/resources/shipping_categories.cjs.map +1 -0
- package/lib/resources/shipping_categories.d.cts +1 -1
- package/lib/resources/shipping_categories.d.ts +1 -1
- package/lib/resources/shipping_categories.js +2 -0
- package/lib/resources/shipping_categories.js.map +1 -0
- package/lib/resources/shipping_method_tiers.cjs +2 -0
- package/lib/resources/shipping_method_tiers.cjs.map +1 -0
- 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 +2 -0
- package/lib/resources/shipping_method_tiers.js.map +1 -0
- package/lib/resources/shipping_methods.cjs +2 -0
- package/lib/resources/shipping_methods.cjs.map +1 -0
- package/lib/resources/shipping_methods.d.cts +1 -1
- package/lib/resources/shipping_methods.d.ts +1 -1
- package/lib/resources/shipping_methods.js +2 -0
- package/lib/resources/shipping_methods.js.map +1 -0
- package/lib/resources/shipping_weight_tiers.cjs +2 -0
- package/lib/resources/shipping_weight_tiers.cjs.map +1 -0
- 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 +2 -0
- package/lib/resources/shipping_weight_tiers.js.map +1 -0
- package/lib/resources/shipping_zones.cjs +2 -0
- package/lib/resources/shipping_zones.cjs.map +1 -0
- package/lib/resources/shipping_zones.d.cts +1 -1
- package/lib/resources/shipping_zones.d.ts +1 -1
- package/lib/resources/shipping_zones.js +2 -0
- package/lib/resources/shipping_zones.js.map +1 -0
- package/lib/resources/sku_list_items.cjs +2 -0
- package/lib/resources/sku_list_items.cjs.map +1 -0
- 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 +2 -0
- package/lib/resources/sku_list_items.js.map +1 -0
- package/lib/resources/sku_list_promotion_rules.cjs +2 -0
- package/lib/resources/sku_list_promotion_rules.cjs.map +1 -0
- 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 +2 -0
- package/lib/resources/sku_list_promotion_rules.js.map +1 -0
- package/lib/resources/sku_lists.cjs +2 -0
- package/lib/resources/sku_lists.cjs.map +1 -0
- package/lib/resources/sku_lists.d.cts +1 -1
- package/lib/resources/sku_lists.d.ts +1 -1
- package/lib/resources/sku_lists.js +2 -0
- package/lib/resources/sku_lists.js.map +1 -0
- package/lib/resources/sku_options.cjs +2 -0
- package/lib/resources/sku_options.cjs.map +1 -0
- package/lib/resources/sku_options.d.cts +1 -1
- package/lib/resources/sku_options.d.ts +1 -1
- package/lib/resources/sku_options.js +2 -0
- package/lib/resources/sku_options.js.map +1 -0
- package/lib/resources/skus.cjs +2 -0
- package/lib/resources/skus.cjs.map +1 -0
- package/lib/resources/skus.d.cts +1 -1
- package/lib/resources/skus.d.ts +1 -1
- package/lib/resources/skus.js +2 -0
- package/lib/resources/skus.js.map +1 -0
- package/lib/resources/stock_items.cjs +2 -0
- package/lib/resources/stock_items.cjs.map +1 -0
- package/lib/resources/stock_items.d.cts +1 -1
- package/lib/resources/stock_items.d.ts +1 -1
- package/lib/resources/stock_items.js +2 -0
- package/lib/resources/stock_items.js.map +1 -0
- package/lib/resources/stock_line_items.cjs +2 -0
- package/lib/resources/stock_line_items.cjs.map +1 -0
- 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 +2 -0
- package/lib/resources/stock_line_items.js.map +1 -0
- package/lib/resources/stock_locations.cjs +2 -0
- package/lib/resources/stock_locations.cjs.map +1 -0
- package/lib/resources/stock_locations.d.cts +1 -1
- package/lib/resources/stock_locations.d.ts +1 -1
- package/lib/resources/stock_locations.js +2 -0
- package/lib/resources/stock_locations.js.map +1 -0
- package/lib/resources/stock_reservations.cjs +2 -0
- package/lib/resources/stock_reservations.cjs.map +1 -0
- package/lib/resources/stock_reservations.d.cts +1 -1
- package/lib/resources/stock_reservations.d.ts +1 -1
- package/lib/resources/stock_reservations.js +2 -0
- package/lib/resources/stock_reservations.js.map +1 -0
- package/lib/resources/stock_transfers.cjs +2 -0
- package/lib/resources/stock_transfers.cjs.map +1 -0
- package/lib/resources/stock_transfers.d.cts +1 -1
- package/lib/resources/stock_transfers.d.ts +1 -1
- package/lib/resources/stock_transfers.js +2 -0
- package/lib/resources/stock_transfers.js.map +1 -0
- package/lib/resources/stores.cjs +2 -0
- package/lib/resources/stores.cjs.map +1 -0
- package/lib/resources/stores.d.cts +1 -1
- package/lib/resources/stores.d.ts +1 -1
- package/lib/resources/stores.js +2 -0
- package/lib/resources/stores.js.map +1 -0
- package/lib/resources/stripe_gateways.cjs +2 -0
- package/lib/resources/stripe_gateways.cjs.map +1 -0
- package/lib/resources/stripe_gateways.d.cts +1 -1
- package/lib/resources/stripe_gateways.d.ts +1 -1
- package/lib/resources/stripe_gateways.js +2 -0
- package/lib/resources/stripe_gateways.js.map +1 -0
- package/lib/resources/stripe_payments.cjs +2 -0
- package/lib/resources/stripe_payments.cjs.map +1 -0
- package/lib/resources/stripe_payments.d.cts +1 -1
- package/lib/resources/stripe_payments.d.ts +1 -1
- package/lib/resources/stripe_payments.js +2 -0
- package/lib/resources/stripe_payments.js.map +1 -0
- package/lib/resources/stripe_tax_accounts.cjs +2 -0
- package/lib/resources/stripe_tax_accounts.cjs.map +1 -0
- 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 +2 -0
- package/lib/resources/stripe_tax_accounts.js.map +1 -0
- package/lib/resources/subscription_models.cjs +2 -0
- package/lib/resources/subscription_models.cjs.map +1 -0
- package/lib/resources/subscription_models.d.cts +1 -1
- package/lib/resources/subscription_models.d.ts +1 -1
- package/lib/resources/subscription_models.js +2 -0
- package/lib/resources/subscription_models.js.map +1 -0
- package/lib/resources/tags.cjs +2 -0
- package/lib/resources/tags.cjs.map +1 -0
- package/lib/resources/tags.d.cts +1 -1
- package/lib/resources/tags.d.ts +1 -1
- package/lib/resources/tags.js +2 -0
- package/lib/resources/tags.js.map +1 -0
- package/lib/resources/talon_one_accounts.cjs +2 -0
- package/lib/resources/talon_one_accounts.cjs.map +1 -0
- 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 +2 -0
- package/lib/resources/talon_one_accounts.js.map +1 -0
- package/lib/resources/tax_calculators.cjs +2 -0
- package/lib/resources/tax_calculators.cjs.map +1 -0
- package/lib/resources/tax_calculators.d.cts +1 -1
- package/lib/resources/tax_calculators.d.ts +1 -1
- package/lib/resources/tax_calculators.js +2 -0
- package/lib/resources/tax_calculators.js.map +1 -0
- package/lib/resources/tax_categories.cjs +2 -0
- package/lib/resources/tax_categories.cjs.map +1 -0
- package/lib/resources/tax_categories.d.cts +1 -1
- package/lib/resources/tax_categories.d.ts +1 -1
- package/lib/resources/tax_categories.js +2 -0
- package/lib/resources/tax_categories.js.map +1 -0
- package/lib/resources/tax_rules.cjs +2 -0
- package/lib/resources/tax_rules.cjs.map +1 -0
- package/lib/resources/tax_rules.d.cts +1 -1
- package/lib/resources/tax_rules.d.ts +1 -1
- package/lib/resources/tax_rules.js +2 -0
- package/lib/resources/tax_rules.js.map +1 -0
- package/lib/resources/taxjar_accounts.cjs +2 -0
- package/lib/resources/taxjar_accounts.cjs.map +1 -0
- package/lib/resources/taxjar_accounts.d.cts +1 -1
- package/lib/resources/taxjar_accounts.d.ts +1 -1
- package/lib/resources/taxjar_accounts.js +2 -0
- package/lib/resources/taxjar_accounts.js.map +1 -0
- package/lib/resources/transactions.cjs +2 -0
- package/lib/resources/transactions.cjs.map +1 -0
- package/lib/resources/transactions.d.cts +1 -1
- package/lib/resources/transactions.d.ts +1 -1
- package/lib/resources/transactions.js +2 -0
- package/lib/resources/transactions.js.map +1 -0
- package/lib/resources/versions.cjs +2 -0
- package/lib/resources/versions.cjs.map +1 -0
- package/lib/resources/versions.d.cts +1 -1
- package/lib/resources/versions.d.ts +1 -1
- package/lib/resources/versions.js +2 -0
- package/lib/resources/versions.js.map +1 -0
- package/lib/resources/vertex_accounts.cjs +2 -0
- package/lib/resources/vertex_accounts.cjs.map +1 -0
- package/lib/resources/vertex_accounts.d.cts +1 -1
- package/lib/resources/vertex_accounts.d.ts +1 -1
- package/lib/resources/vertex_accounts.js +2 -0
- package/lib/resources/vertex_accounts.js.map +1 -0
- package/lib/resources/voids.cjs +2 -0
- package/lib/resources/voids.cjs.map +1 -0
- package/lib/resources/voids.d.cts +1 -1
- package/lib/resources/voids.d.ts +1 -1
- package/lib/resources/voids.js +2 -0
- package/lib/resources/voids.js.map +1 -0
- package/lib/resources/webhooks.cjs +2 -0
- package/lib/resources/webhooks.cjs.map +1 -0
- package/lib/resources/webhooks.d.cts +1 -1
- package/lib/resources/webhooks.d.ts +1 -1
- package/lib/resources/webhooks.js +2 -0
- package/lib/resources/webhooks.js.map +1 -0
- package/lib/resources/wire_transfers.cjs +2 -0
- package/lib/resources/wire_transfers.cjs.map +1 -0
- package/lib/resources/wire_transfers.d.cts +1 -1
- package/lib/resources/wire_transfers.d.ts +1 -1
- package/lib/resources/wire_transfers.js +2 -0
- package/lib/resources/wire_transfers.js.map +1 -0
- package/lib/static.cjs +2 -0
- package/lib/static.cjs.map +1 -0
- package/lib/static.d.cts +1 -1
- package/lib/static.d.ts +1 -1
- package/lib/static.js +2 -0
- package/lib/static.js.map +1 -0
- package/lib/types.cjs +2 -0
- package/lib/types.cjs.map +1 -0
- package/lib/types.js +2 -0
- package/lib/types.js.map +1 -0
- package/lib/util.cjs +2 -0
- package/lib/util.cjs.map +1 -0
- package/lib/util.js +2 -0
- package/lib/util.js.map +1 -0
- package/package.json +1 -1
- package/lib/common.cjs +0 -17
- package/lib/common.d.cts +0 -13
- package/lib/common.d.ts +0 -13
- package/lib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;AAChK,IAAM,MAAA,gBAAA,GAAoB,gBAAkC,EAAM,IAAA,eAAA;AAClE,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAsB,EAAE,IAAA,EAAM,kBAAmB,EAAA,EAAG,CAAmB,gBAAA,EAAA,gBAAgB,CAAoB,gBAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACjJ,EAEA,MAAM,QAAA,CAAS,eAAyC,EAAA,MAAA,EAAmC,OAA2D,EAAA;AACrJ,IAAM,MAAA,gBAAA,GAAoB,gBAAkC,EAAM,IAAA,eAAA;AAClE,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAe,EAAE,IAAA,EAAM,UAAW,EAAA,EAAG,CAAmB,gBAAA,EAAA,gBAAgB,CAAa,SAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC3H,EAGA,gBAAgB,QAA0C,EAAA;AACzD,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,cAAe,CAAA,IAAA;AAAA;AAC3D,EAGA,aAAa,EAAkD,EAAA;AAC9D,IAAO,OAAA,KAAA,CAAM,qBAAuC,EAAE,CAAA;AAAA;AACvD,EAEA,sBAAsB,GAAmC,EAAA;AACxD,IAAO,OAAA,KAAA,CAAM,qBAAwC,CAAA,GAAG,GAAG,CAAA;AAAA;AAC5D,EAGA,IAA0B,GAAA;AACzB,IAAA,OAAO,cAAe,CAAA,IAAA;AAAA;AAGxB;AAGA,MAAM,QAAA,GAAW,IAAI,cAAe,EAAA;AACpC,IAAO,uBAAQ,GAAA","file":"paypal_payments.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 { PaymentGateway } from './payment_gateways'\nimport type { Version } from './versions'\n\n\ntype PaypalPaymentType = 'paypal_payments'\ntype PaypalPaymentRel = ResourceRel & { type: PaypalPaymentType }\ntype OrderRel = ResourceRel & { type: OrderType }\n\n\nexport type PaypalPaymentSort = Pick<PaypalPayment, 'id'> & ResourceSort\n// export type PaypalPaymentFilter = Pick<PaypalPayment, 'id'> & ResourceFilter\n\n\ninterface PaypalPayment extends Resource {\n\t\n\treadonly type: PaypalPaymentType\n\n\t/** \n\t * The URL where the payer is redirected after they approve the payment.\n\t * @example ```\"https://yourdomain.com/thankyou\"```\n\t */\n\treturn_url: string\n\t/** \n\t * The URL where the payer is redirected after they cancel the payment.\n\t * @example ```\"https://yourdomain.com/checkout/payment\"```\n\t */\n\tcancel_url: string\n\t/** \n\t * A free-form field that you can use to send a note to the payer on PayPal.\n\t * @example ```\"Thank you for shopping with us!\"```\n\t */\n\tnote_to_payer?: string | null\n\t/** \n\t * The id of the payer that PayPal passes in the return_url.\n\t * @example ```\"ABCDEFGHG123456\"```\n\t */\n\tpaypal_payer_id?: string | null\n\t/** \n\t * The PayPal payer id (if present).\n\t * @example ```\"ABCDEFGHG123456\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The id of the PayPal payment object.\n\t * @example ```\"1234567890\"```\n\t */\n\tpaypal_id?: string | null\n\t/** \n\t * The PayPal payment status. One of 'created', or 'approved'.\n\t * @example ```\"created\"```\n\t */\n\tstatus?: 'created' | 'approved' | null\n\t/** \n\t * The URL the customer should be redirected to approve the payment.\n\t * @example ```\"https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-1234567890ABCDEFGHG\"```\n\t */\n\tapproval_url?: string | null\n\t/** \n\t * Indicates if the order current amount differs form the one of the created payment intent.\n\t */\n\tmismatched_amounts?: boolean | null\n\t/** \n\t * Information about the payment instrument used in the transaction.\n\t * @example ```{\"issuer\":\"cl bank\",\"card_type\":\"visa\"}```\n\t */\n\tpayment_instrument?: Record<string, any> | null\n\n\torder?: Order | null\n\tpayment_gateway?: PaymentGateway | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface PaypalPaymentCreate extends ResourceCreate {\n\t\n\t/** \n\t * The URL where the payer is redirected after they approve the payment.\n\t * @example ```\"https://yourdomain.com/thankyou\"```\n\t */\n\treturn_url: string\n\t/** \n\t * The URL where the payer is redirected after they cancel the payment.\n\t * @example ```\"https://yourdomain.com/checkout/payment\"```\n\t */\n\tcancel_url: string\n\t/** \n\t * A free-form field that you can use to send a note to the payer on PayPal.\n\t * @example ```\"Thank you for shopping with us!\"```\n\t */\n\tnote_to_payer?: string | null\n\n\torder: OrderRel\n\n}\n\n\ninterface PaypalPaymentUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The id of the payer that PayPal passes in the return_url.\n\t * @example ```\"ABCDEFGHG123456\"```\n\t */\n\tpaypal_payer_id?: string | null\n\n\torder?: OrderRel | null\n\n}\n\n\nclass PaypalPayments extends ApiResource<PaypalPayment> {\n\n\tstatic readonly TYPE: PaypalPaymentType = 'paypal_payments' as const\n\n\tasync create(resource: PaypalPaymentCreate, params?: QueryParamsRetrieve<PaypalPayment>, options?: ResourcesConfig): Promise<PaypalPayment> {\n\t\treturn this.resources.create<PaypalPaymentCreate, PaypalPayment>({ ...resource, type: PaypalPayments.TYPE }, params, options)\n\t}\n\n\tasync update(resource: PaypalPaymentUpdate, params?: QueryParamsRetrieve<PaypalPayment>, options?: ResourcesConfig): Promise<PaypalPayment> {\n\t\treturn this.resources.update<PaypalPaymentUpdate, PaypalPayment>({ ...resource, type: PaypalPayments.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: PaypalPayments.TYPE } : id, options)\n\t}\n\n\tasync order(paypalPaymentId: string | PaypalPayment, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _paypalPaymentId = (paypalPaymentId as PaypalPayment).id || paypalPaymentId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `paypal_payments/${_paypalPaymentId}/order`, params, options) as unknown as Order\n\t}\n\n\tasync payment_gateway(paypalPaymentId: string | PaypalPayment, params?: QueryParamsRetrieve<PaymentGateway>, options?: ResourcesConfig): Promise<PaymentGateway> {\n\t\tconst _paypalPaymentId = (paypalPaymentId as PaypalPayment).id || paypalPaymentId as string\n\t\treturn this.resources.fetch<PaymentGateway>({ type: 'payment_gateways' }, `paypal_payments/${_paypalPaymentId}/payment_gateway`, params, options) as unknown as PaymentGateway\n\t}\n\n\tasync versions(paypalPaymentId: string | PaypalPayment, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _paypalPaymentId = (paypalPaymentId as PaypalPayment).id || paypalPaymentId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `paypal_payments/${_paypalPaymentId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisPaypalPayment(resource: any): resource is PaypalPayment {\n\t\treturn resource.type && (resource.type === PaypalPayments.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): PaypalPaymentRel {\n\t\treturn super.relationshipOneToOne<PaypalPaymentRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): PaypalPaymentRel[] {\n\t\treturn super.relationshipOneToMany<PaypalPaymentRel>(...ids)\n\t}\n\n\n\ttype(): PaypalPaymentType {\n\t\treturn PaypalPayments.TYPE\n\t}\n\n}\n\n\nconst instance = new PaypalPayments()\nexport default instance\n\nexport type { PaypalPayment, PaypalPaymentCreate, PaypalPaymentUpdate, PaypalPaymentType }\n"]}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export { gs as PaypalPayment, gt as PaypalPaymentCreate, gv as PaypalPaymentSort, jI as PaypalPaymentType, gu as PaypalPaymentUpdate, a_ as default } from '../api-
|
1
|
+
export { gs as PaypalPayment, gt as PaypalPaymentCreate, gv as PaypalPaymentSort, jI as PaypalPaymentType, gu as PaypalPaymentUpdate, a_ as default } from '../api-DmIZO_Np.cjs';
|
2
2
|
import '../client.cjs';
|
3
3
|
import '../interceptor-5MISI1yn.cjs';
|
4
4
|
import '../types.cjs';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export { gs as PaypalPayment, gt as PaypalPaymentCreate, gv as PaypalPaymentSort, jI as PaypalPaymentType, gu as PaypalPaymentUpdate, a_ as default } from '../api-
|
1
|
+
export { gs as PaypalPayment, gt as PaypalPaymentCreate, gv as PaypalPaymentSort, jI as PaypalPaymentType, gu as PaypalPaymentUpdate, a_ as default } from '../api-DDgIE2i8.js';
|
2
2
|
import '../client.js';
|
3
3
|
import '../interceptor-5MISI1yn.js';
|
4
4
|
import '../types.js';
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../src/resources/paypal_payments.ts"],"names":[],"mappings":";;AAmHA,MAAM,uBAAuB,WAA2B,CAAA;AAAA,EAEvD,OAAgB,IAA0B,GAAA,iBAAA;AAAA,EAE1C,MAAM,MAAA,CAAO,QAA+B,EAAA,MAAA,EAA6C,OAAmD,EAAA;AAC3I,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA2C,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,cAAe,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC7H,EAEA,MAAM,MAAA,CAAO,QAA+B,EAAA,MAAA,EAA6C,OAAmD,EAAA;AAC3I,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA2C,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,cAAe,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC7H,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,cAAA,C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,KAAA,CAAM,qBAAwC,CAAA,GAAG,GAAG,CAAA;AAAA;AAC5D,EAGA,IAA0B,GAAA;AACzB,IAAA,OAAO,cAAe,CAAA,IAAA;AAAA;AAGxB;AAGA,MAAM,QAAA,GAAW,IAAI,cAAe,EAAA;AACpC,IAAO,uBAAQ,GAAA","file":"paypal_payments.js","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Order, OrderType } from './orders'\nimport type { PaymentGateway } from './payment_gateways'\nimport type { Version } from './versions'\n\n\ntype PaypalPaymentType = 'paypal_payments'\ntype PaypalPaymentRel = ResourceRel & { type: PaypalPaymentType }\ntype OrderRel = ResourceRel & { type: OrderType }\n\n\nexport type PaypalPaymentSort = Pick<PaypalPayment, 'id'> & ResourceSort\n// export type PaypalPaymentFilter = Pick<PaypalPayment, 'id'> & ResourceFilter\n\n\ninterface PaypalPayment extends Resource {\n\t\n\treadonly type: PaypalPaymentType\n\n\t/** \n\t * The URL where the payer is redirected after they approve the payment.\n\t * @example ```\"https://yourdomain.com/thankyou\"```\n\t */\n\treturn_url: string\n\t/** \n\t * The URL where the payer is redirected after they cancel the payment.\n\t * @example ```\"https://yourdomain.com/checkout/payment\"```\n\t */\n\tcancel_url: string\n\t/** \n\t * A free-form field that you can use to send a note to the payer on PayPal.\n\t * @example ```\"Thank you for shopping with us!\"```\n\t */\n\tnote_to_payer?: string | null\n\t/** \n\t * The id of the payer that PayPal passes in the return_url.\n\t * @example ```\"ABCDEFGHG123456\"```\n\t */\n\tpaypal_payer_id?: string | null\n\t/** \n\t * The PayPal payer id (if present).\n\t * @example ```\"ABCDEFGHG123456\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The id of the PayPal payment object.\n\t * @example ```\"1234567890\"```\n\t */\n\tpaypal_id?: string | null\n\t/** \n\t * The PayPal payment status. One of 'created', or 'approved'.\n\t * @example ```\"created\"```\n\t */\n\tstatus?: 'created' | 'approved' | null\n\t/** \n\t * The URL the customer should be redirected to approve the payment.\n\t * @example ```\"https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-1234567890ABCDEFGHG\"```\n\t */\n\tapproval_url?: string | null\n\t/** \n\t * Indicates if the order current amount differs form the one of the created payment intent.\n\t */\n\tmismatched_amounts?: boolean | null\n\t/** \n\t * Information about the payment instrument used in the transaction.\n\t * @example ```{\"issuer\":\"cl bank\",\"card_type\":\"visa\"}```\n\t */\n\tpayment_instrument?: Record<string, any> | null\n\n\torder?: Order | null\n\tpayment_gateway?: PaymentGateway | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface PaypalPaymentCreate extends ResourceCreate {\n\t\n\t/** \n\t * The URL where the payer is redirected after they approve the payment.\n\t * @example ```\"https://yourdomain.com/thankyou\"```\n\t */\n\treturn_url: string\n\t/** \n\t * The URL where the payer is redirected after they cancel the payment.\n\t * @example ```\"https://yourdomain.com/checkout/payment\"```\n\t */\n\tcancel_url: string\n\t/** \n\t * A free-form field that you can use to send a note to the payer on PayPal.\n\t * @example ```\"Thank you for shopping with us!\"```\n\t */\n\tnote_to_payer?: string | null\n\n\torder: OrderRel\n\n}\n\n\ninterface PaypalPaymentUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The id of the payer that PayPal passes in the return_url.\n\t * @example ```\"ABCDEFGHG123456\"```\n\t */\n\tpaypal_payer_id?: string | null\n\n\torder?: OrderRel | null\n\n}\n\n\nclass PaypalPayments extends ApiResource<PaypalPayment> {\n\n\tstatic readonly TYPE: PaypalPaymentType = 'paypal_payments' as const\n\n\tasync create(resource: PaypalPaymentCreate, params?: QueryParamsRetrieve<PaypalPayment>, options?: ResourcesConfig): Promise<PaypalPayment> {\n\t\treturn this.resources.create<PaypalPaymentCreate, PaypalPayment>({ ...resource, type: PaypalPayments.TYPE }, params, options)\n\t}\n\n\tasync update(resource: PaypalPaymentUpdate, params?: QueryParamsRetrieve<PaypalPayment>, options?: ResourcesConfig): Promise<PaypalPayment> {\n\t\treturn this.resources.update<PaypalPaymentUpdate, PaypalPayment>({ ...resource, type: PaypalPayments.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: PaypalPayments.TYPE } : id, options)\n\t}\n\n\tasync order(paypalPaymentId: string | PaypalPayment, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _paypalPaymentId = (paypalPaymentId as PaypalPayment).id || paypalPaymentId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `paypal_payments/${_paypalPaymentId}/order`, params, options) as unknown as Order\n\t}\n\n\tasync payment_gateway(paypalPaymentId: string | PaypalPayment, params?: QueryParamsRetrieve<PaymentGateway>, options?: ResourcesConfig): Promise<PaymentGateway> {\n\t\tconst _paypalPaymentId = (paypalPaymentId as PaypalPayment).id || paypalPaymentId as string\n\t\treturn this.resources.fetch<PaymentGateway>({ type: 'payment_gateways' }, `paypal_payments/${_paypalPaymentId}/payment_gateway`, params, options) as unknown as PaymentGateway\n\t}\n\n\tasync versions(paypalPaymentId: string | PaypalPayment, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _paypalPaymentId = (paypalPaymentId as PaypalPayment).id || paypalPaymentId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `paypal_payments/${_paypalPaymentId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisPaypalPayment(resource: any): resource is PaypalPayment {\n\t\treturn resource.type && (resource.type === PaypalPayments.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): PaypalPaymentRel {\n\t\treturn super.relationshipOneToOne<PaypalPaymentRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): PaypalPaymentRel[] {\n\t\treturn super.relationshipOneToMany<PaypalPaymentRel>(...ids)\n\t}\n\n\n\ttype(): PaypalPaymentType {\n\t\treturn PaypalPayments.TYPE\n\t}\n\n}\n\n\nconst instance = new PaypalPayments()\nexport default instance\n\nexport type { PaypalPayment, PaypalPaymentCreate, PaypalPaymentUpdate, PaypalPaymentType }\n"]}
|
@@ -90,5 +90,7 @@ const instance = new PercentageDiscountPromotions();
|
|
90
90
|
var percentage_discount_promotions_default = instance;
|
91
91
|
|
92
92
|
module.exports = percentage_discount_promotions_default;
|
93
|
+
//# sourceMappingURL=percentage_discount_promotions.cjs.map
|
93
94
|
|
94
95
|
module.exports = exports.default;
|
96
|
+
//# sourceMappingURL=percentage_discount_promotions.cjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../src/resources/percentage_discount_promotions.ts"],"names":["ApiResource"],"mappings":";;;;AA4PA,MAAM,qCAAqCA,oBAAyC,CAAA;AAAA,EAEnF,OAAgB,IAAwC,GAAA,gCAAA;AAAA,EAExD,MAAM,MAAA,CAAO,QAA6C,EAAA,MAAA,EAA2D,OAAiE,EAAA;AACrL,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAuE,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,4BAA6B,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACvK,EAEA,MAAM,MAAA,CAAO,QAA6C,EAAA,MAAA,EAA2D,OAAiE,EAAA;AACrL,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAuE,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,4BAA6B,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACvK,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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;AAC/N,EAGA,8BAA8B,QAAwD,EAAA;AACrF,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,4BAA6B,CAAA,IAAA;AAAA;AACzE,EAGA,aAAa,EAAgE,EAAA;AAC5E,IAAO,OAAA,KAAA,CAAM,qBAAqD,EAAE,CAAA;AAAA;AACrE,EAEA,sBAAsB,GAAiD,EAAA;AACtE,IAAO,OAAA,KAAA,CAAM,qBAAsD,CAAA,GAAG,GAAG,CAAA;AAAA;AAC1E,EAGA,IAAwC,GAAA;AACvC,IAAA,OAAO,4BAA6B,CAAA,IAAA;AAAA;AAGtC;AAGA,MAAM,QAAA,GAAW,IAAI,4BAA6B,EAAA;AAClD,IAAO,sCAAQ,GAAA","file":"percentage_discount_promotions.cjs","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Market, MarketType } from './markets'\nimport type { OrderAmountPromotionRule, OrderAmountPromotionRuleType } from './order_amount_promotion_rules'\nimport type { SkuListPromotionRule, SkuListPromotionRuleType } from './sku_list_promotion_rules'\nimport type { CouponCodesPromotionRule, CouponCodesPromotionRuleType } from './coupon_codes_promotion_rules'\nimport type { CustomPromotionRule, CustomPromotionRuleType } from './custom_promotion_rules'\nimport type { SkuList, SkuListType } from './sku_lists'\nimport type { Coupon } from './coupons'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Tag, TagType } from './tags'\nimport type { Version } from './versions'\nimport type { Sku } from './skus'\nimport type { PromotionRule } from './promotion_rules'\n\n\ntype PercentageDiscountPromotionType = 'percentage_discount_promotions'\ntype PercentageDiscountPromotionRel = ResourceRel & { type: PercentageDiscountPromotionType }\ntype MarketRel = ResourceRel & { type: MarketType }\ntype OrderAmountPromotionRuleRel = ResourceRel & { type: OrderAmountPromotionRuleType }\ntype SkuListPromotionRuleRel = ResourceRel & { type: SkuListPromotionRuleType }\ntype CouponCodesPromotionRuleRel = ResourceRel & { type: CouponCodesPromotionRuleType }\ntype CustomPromotionRuleRel = ResourceRel & { type: CustomPromotionRuleType }\ntype SkuListRel = ResourceRel & { type: SkuListType }\ntype TagRel = ResourceRel & { type: TagType }\n\n\nexport type PercentageDiscountPromotionSort = Pick<PercentageDiscountPromotion, 'id' | 'name' | 'currency_code' | 'exclusive' | 'priority' | 'starts_at' | 'expires_at' | 'total_usage_limit' | 'total_usage_count' | 'disabled_at'> & ResourceSort\n// export type PercentageDiscountPromotionFilter = Pick<PercentageDiscountPromotion, 'id' | 'name' | 'currency_code' | 'priority' | 'starts_at' | 'expires_at' | 'total_usage_limit' | 'total_usage_count' | 'disabled_at'> & ResourceFilter\n\n\ninterface PercentageDiscountPromotion extends Resource {\n\t\n\treadonly type: PercentageDiscountPromotionType\n\n\t/** \n\t * The promotion's internal name.\n\t * @example ```\"Personal promotion\"```\n\t */\n\tname: string\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * Indicates if the promotion will be applied exclusively, based on its priority score.\n\t * @example ```true```\n\t */\n\texclusive?: boolean | null\n\t/** \n\t * The priority assigned to the promotion (lower means higher priority).\n\t * @example ```2```\n\t */\n\tpriority?: number | null\n\t/** \n\t * The activation date/time of this promotion.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tstarts_at: string\n\t/** \n\t * The expiration date/time of this promotion (must be after starts_at).\n\t * @example ```\"2018-01-02T12:00:00.000Z\"```\n\t */\n\texpires_at: string\n\t/** \n\t * The total number of times this promotion can be applied. When 'null' it means promotion can be applied infinite times.\n\t * @example ```5```\n\t */\n\ttotal_usage_limit?: number | null\n\t/** \n\t * The number of times this promotion has been applied.\n\t * @example ```2```\n\t */\n\ttotal_usage_count?: number | null\n\t/** \n\t * Indicates if the promotion is active (enabled and not expired).\n\t * @example ```true```\n\t */\n\tactive?: boolean | null\n\t/** \n\t * The promotion status. One of 'disabled', 'expired', 'pending', 'active', or 'inactive'.\n\t * @example ```\"pending\"```\n\t */\n\tstatus?: 'disabled' | 'expired' | 'pending' | 'active' | 'inactive' | 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 discount percentage to be applied.\n\t * @example ```10```\n\t */\n\tpercentage: number\n\n\tmarket?: Market | null\n\tpromotion_rules?: PromotionRule[] | null\n\torder_amount_promotion_rule?: OrderAmountPromotionRule | null\n\tsku_list_promotion_rule?: SkuListPromotionRule | null\n\tcoupon_codes_promotion_rule?: CouponCodesPromotionRule | null\n\tcustom_promotion_rule?: CustomPromotionRule | null\n\tsku_list?: SkuList | null\n\tcoupons?: Coupon[] | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\ttags?: Tag[] | null\n\tversions?: Version[] | null\n\tskus?: Sku[] | null\n\n}\n\n\ninterface PercentageDiscountPromotionCreate extends ResourceCreate {\n\t\n\t/** \n\t * The promotion's internal name.\n\t * @example ```\"Personal promotion\"```\n\t */\n\tname: string\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * Indicates if the promotion will be applied exclusively, based on its priority score.\n\t * @example ```true```\n\t */\n\texclusive?: boolean | null\n\t/** \n\t * The priority assigned to the promotion (lower means higher priority).\n\t * @example ```2```\n\t */\n\tpriority?: number | null\n\t/** \n\t * The activation date/time of this promotion.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tstarts_at: string\n\t/** \n\t * The expiration date/time of this promotion (must be after starts_at).\n\t * @example ```\"2018-01-02T12:00:00.000Z\"```\n\t */\n\texpires_at: string\n\t/** \n\t * The total number of times this promotion can be applied. When 'null' it means promotion can be applied infinite times.\n\t * @example ```5```\n\t */\n\ttotal_usage_limit?: 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\t/** \n\t * The discount percentage to be applied.\n\t * @example ```10```\n\t */\n\tpercentage: number\n\n\tmarket?: MarketRel | null\n\torder_amount_promotion_rule?: OrderAmountPromotionRuleRel | null\n\tsku_list_promotion_rule?: SkuListPromotionRuleRel | null\n\tcoupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null\n\tcustom_promotion_rule?: CustomPromotionRuleRel | null\n\tsku_list?: SkuListRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\ninterface PercentageDiscountPromotionUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The promotion's internal name.\n\t * @example ```\"Personal promotion\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * Indicates if the promotion will be applied exclusively, based on its priority score.\n\t * @example ```true```\n\t */\n\texclusive?: boolean | null\n\t/** \n\t * The priority assigned to the promotion (lower means higher priority).\n\t * @example ```2```\n\t */\n\tpriority?: number | null\n\t/** \n\t * The activation date/time of this promotion.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tstarts_at?: string | null\n\t/** \n\t * The expiration date/time of this promotion (must be after starts_at).\n\t * @example ```\"2018-01-02T12:00:00.000Z\"```\n\t */\n\texpires_at?: string | null\n\t/** \n\t * The total number of times this promotion can be applied. When 'null' it means promotion can be applied infinite times.\n\t * @example ```5```\n\t */\n\ttotal_usage_limit?: 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\t/** \n\t * Comma separated list of tags to be added. Duplicates, invalid and non existing ones are discarded. Cannot be passed by sales channels.\n\t */\n\t_add_tags?: string | null\n\t/** \n\t * Comma separated list of tags to be removed. Duplicates, invalid and non existing ones are discarded. Cannot be passed by sales channels.\n\t */\n\t_remove_tags?: string | null\n\t/** \n\t * The discount percentage to be applied.\n\t * @example ```10```\n\t */\n\tpercentage?: number | null\n\n\tmarket?: MarketRel | null\n\torder_amount_promotion_rule?: OrderAmountPromotionRuleRel | null\n\tsku_list_promotion_rule?: SkuListPromotionRuleRel | null\n\tcoupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null\n\tcustom_promotion_rule?: CustomPromotionRuleRel | null\n\tsku_list?: SkuListRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\nclass PercentageDiscountPromotions extends ApiResource<PercentageDiscountPromotion> {\n\n\tstatic readonly TYPE: PercentageDiscountPromotionType = 'percentage_discount_promotions' as const\n\n\tasync create(resource: PercentageDiscountPromotionCreate, params?: QueryParamsRetrieve<PercentageDiscountPromotion>, options?: ResourcesConfig): Promise<PercentageDiscountPromotion> {\n\t\treturn this.resources.create<PercentageDiscountPromotionCreate, PercentageDiscountPromotion>({ ...resource, type: PercentageDiscountPromotions.TYPE }, params, options)\n\t}\n\n\tasync update(resource: PercentageDiscountPromotionUpdate, params?: QueryParamsRetrieve<PercentageDiscountPromotion>, options?: ResourcesConfig): Promise<PercentageDiscountPromotion> {\n\t\treturn this.resources.update<PercentageDiscountPromotionUpdate, PercentageDiscountPromotion>({ ...resource, type: PercentageDiscountPromotions.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: PercentageDiscountPromotions.TYPE } : id, options)\n\t}\n\n\tasync market(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\tconst _percentageDiscountPromotionId = (percentageDiscountPromotionId as PercentageDiscountPromotion).id || percentageDiscountPromotionId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `percentage_discount_promotions/${_percentageDiscountPromotionId}/market`, params, options) as unknown as Market\n\t}\n\n\tasync order_amount_promotion_rule(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsRetrieve<OrderAmountPromotionRule>, options?: ResourcesConfig): Promise<OrderAmountPromotionRule> {\n\t\tconst _percentageDiscountPromotionId = (percentageDiscountPromotionId as PercentageDiscountPromotion).id || percentageDiscountPromotionId as string\n\t\treturn this.resources.fetch<OrderAmountPromotionRule>({ type: 'order_amount_promotion_rules' }, `percentage_discount_promotions/${_percentageDiscountPromotionId}/order_amount_promotion_rule`, params, options) as unknown as OrderAmountPromotionRule\n\t}\n\n\tasync sku_list_promotion_rule(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsRetrieve<SkuListPromotionRule>, options?: ResourcesConfig): Promise<SkuListPromotionRule> {\n\t\tconst _percentageDiscountPromotionId = (percentageDiscountPromotionId as PercentageDiscountPromotion).id || percentageDiscountPromotionId as string\n\t\treturn this.resources.fetch<SkuListPromotionRule>({ type: 'sku_list_promotion_rules' }, `percentage_discount_promotions/${_percentageDiscountPromotionId}/sku_list_promotion_rule`, params, options) as unknown as SkuListPromotionRule\n\t}\n\n\tasync coupon_codes_promotion_rule(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsRetrieve<CouponCodesPromotionRule>, options?: ResourcesConfig): Promise<CouponCodesPromotionRule> {\n\t\tconst _percentageDiscountPromotionId = (percentageDiscountPromotionId as PercentageDiscountPromotion).id || percentageDiscountPromotionId as string\n\t\treturn this.resources.fetch<CouponCodesPromotionRule>({ type: 'coupon_codes_promotion_rules' }, `percentage_discount_promotions/${_percentageDiscountPromotionId}/coupon_codes_promotion_rule`, params, options) as unknown as CouponCodesPromotionRule\n\t}\n\n\tasync custom_promotion_rule(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsRetrieve<CustomPromotionRule>, options?: ResourcesConfig): Promise<CustomPromotionRule> {\n\t\tconst _percentageDiscountPromotionId = (percentageDiscountPromotionId as PercentageDiscountPromotion).id || percentageDiscountPromotionId as string\n\t\treturn this.resources.fetch<CustomPromotionRule>({ type: 'custom_promotion_rules' }, `percentage_discount_promotions/${_percentageDiscountPromotionId}/custom_promotion_rule`, params, options) as unknown as CustomPromotionRule\n\t}\n\n\tasync sku_list(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsRetrieve<SkuList>, options?: ResourcesConfig): Promise<SkuList> {\n\t\tconst _percentageDiscountPromotionId = (percentageDiscountPromotionId as PercentageDiscountPromotion).id || percentageDiscountPromotionId as string\n\t\treturn this.resources.fetch<SkuList>({ type: 'sku_lists' }, `percentage_discount_promotions/${_percentageDiscountPromotionId}/sku_list`, params, options) as unknown as SkuList\n\t}\n\n\tasync coupons(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsList<Coupon>, options?: ResourcesConfig): Promise<ListResponse<Coupon>> {\n\t\tconst _percentageDiscountPromotionId = (percentageDiscountPromotionId as PercentageDiscountPromotion).id || percentageDiscountPromotionId as string\n\t\treturn this.resources.fetch<Coupon>({ type: 'coupons' }, `percentage_discount_promotions/${_percentageDiscountPromotionId}/coupons`, params, options) as unknown as ListResponse<Coupon>\n\t}\n\n\tasync attachments(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _percentageDiscountPromotionId = (percentageDiscountPromotionId as PercentageDiscountPromotion).id || percentageDiscountPromotionId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `percentage_discount_promotions/${_percentageDiscountPromotionId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _percentageDiscountPromotionId = (percentageDiscountPromotionId as PercentageDiscountPromotion).id || percentageDiscountPromotionId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `percentage_discount_promotions/${_percentageDiscountPromotionId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync tags(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsList<Tag>, options?: ResourcesConfig): Promise<ListResponse<Tag>> {\n\t\tconst _percentageDiscountPromotionId = (percentageDiscountPromotionId as PercentageDiscountPromotion).id || percentageDiscountPromotionId as string\n\t\treturn this.resources.fetch<Tag>({ type: 'tags' }, `percentage_discount_promotions/${_percentageDiscountPromotionId}/tags`, params, options) as unknown as ListResponse<Tag>\n\t}\n\n\tasync versions(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _percentageDiscountPromotionId = (percentageDiscountPromotionId as PercentageDiscountPromotion).id || percentageDiscountPromotionId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `percentage_discount_promotions/${_percentageDiscountPromotionId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync skus(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsList<Sku>, options?: ResourcesConfig): Promise<ListResponse<Sku>> {\n\t\tconst _percentageDiscountPromotionId = (percentageDiscountPromotionId as PercentageDiscountPromotion).id || percentageDiscountPromotionId as string\n\t\treturn this.resources.fetch<Sku>({ type: 'skus' }, `percentage_discount_promotions/${_percentageDiscountPromotionId}/skus`, params, options) as unknown as ListResponse<Sku>\n\t}\n\n\tasync _disable(id: string | PercentageDiscountPromotion, params?: QueryParamsRetrieve<PercentageDiscountPromotion>, options?: ResourcesConfig): Promise<PercentageDiscountPromotion> {\n\t\treturn this.resources.update<PercentageDiscountPromotionUpdate, PercentageDiscountPromotion>({ id: (typeof id === 'string')? id: id.id, type: PercentageDiscountPromotions.TYPE, _disable: true }, params, options)\n\t}\n\n\tasync _enable(id: string | PercentageDiscountPromotion, params?: QueryParamsRetrieve<PercentageDiscountPromotion>, options?: ResourcesConfig): Promise<PercentageDiscountPromotion> {\n\t\treturn this.resources.update<PercentageDiscountPromotionUpdate, PercentageDiscountPromotion>({ id: (typeof id === 'string')? id: id.id, type: PercentageDiscountPromotions.TYPE, _enable: true }, params, options)\n\t}\n\n\tasync _add_tags(id: string | PercentageDiscountPromotion, triggerValue: string, params?: QueryParamsRetrieve<PercentageDiscountPromotion>, options?: ResourcesConfig): Promise<PercentageDiscountPromotion> {\n\t\treturn this.resources.update<PercentageDiscountPromotionUpdate, PercentageDiscountPromotion>({ id: (typeof id === 'string')? id: id.id, type: PercentageDiscountPromotions.TYPE, _add_tags: triggerValue }, params, options)\n\t}\n\n\tasync _remove_tags(id: string | PercentageDiscountPromotion, triggerValue: string, params?: QueryParamsRetrieve<PercentageDiscountPromotion>, options?: ResourcesConfig): Promise<PercentageDiscountPromotion> {\n\t\treturn this.resources.update<PercentageDiscountPromotionUpdate, PercentageDiscountPromotion>({ id: (typeof id === 'string')? id: id.id, type: PercentageDiscountPromotions.TYPE, _remove_tags: triggerValue }, params, options)\n\t}\n\n\n\tisPercentageDiscountPromotion(resource: any): resource is PercentageDiscountPromotion {\n\t\treturn resource.type && (resource.type === PercentageDiscountPromotions.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): PercentageDiscountPromotionRel {\n\t\treturn super.relationshipOneToOne<PercentageDiscountPromotionRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): PercentageDiscountPromotionRel[] {\n\t\treturn super.relationshipOneToMany<PercentageDiscountPromotionRel>(...ids)\n\t}\n\n\n\ttype(): PercentageDiscountPromotionType {\n\t\treturn PercentageDiscountPromotions.TYPE\n\t}\n\n}\n\n\nconst instance = new PercentageDiscountPromotions()\nexport default instance\n\nexport type { PercentageDiscountPromotion, PercentageDiscountPromotionCreate, PercentageDiscountPromotionUpdate, PercentageDiscountPromotionType }\n"]}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export { gw as PercentageDiscountPromotion, gx as PercentageDiscountPromotionCreate, gz as PercentageDiscountPromotionSort, kr as PercentageDiscountPromotionType, gy as PercentageDiscountPromotionUpdate, a$ as default } from '../api-
|
1
|
+
export { gw as PercentageDiscountPromotion, gx as PercentageDiscountPromotionCreate, gz as PercentageDiscountPromotionSort, kr as PercentageDiscountPromotionType, gy as PercentageDiscountPromotionUpdate, a$ as default } from '../api-DmIZO_Np.cjs';
|
2
2
|
import '../client.cjs';
|
3
3
|
import '../interceptor-5MISI1yn.cjs';
|
4
4
|
import '../types.cjs';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export { gw as PercentageDiscountPromotion, gx as PercentageDiscountPromotionCreate, gz as PercentageDiscountPromotionSort, kr as PercentageDiscountPromotionType, gy as PercentageDiscountPromotionUpdate, a$ as default } from '../api-
|
1
|
+
export { gw as PercentageDiscountPromotion, gx as PercentageDiscountPromotionCreate, gz as PercentageDiscountPromotionSort, kr as PercentageDiscountPromotionType, gy as PercentageDiscountPromotionUpdate, a$ as default } from '../api-DDgIE2i8.js';
|
2
2
|
import '../client.js';
|
3
3
|
import '../interceptor-5MISI1yn.js';
|
4
4
|
import '../types.js';
|
@@ -88,3 +88,5 @@ const instance = new PercentageDiscountPromotions();
|
|
88
88
|
var percentage_discount_promotions_default = instance;
|
89
89
|
|
90
90
|
export { percentage_discount_promotions_default as default };
|
91
|
+
//# sourceMappingURL=percentage_discount_promotions.js.map
|
92
|
+
//# sourceMappingURL=percentage_discount_promotions.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../src/resources/percentage_discount_promotions.ts"],"names":[],"mappings":";;AA4PA,MAAM,qCAAqC,WAAyC,CAAA;AAAA,EAEnF,OAAgB,IAAwC,GAAA,gCAAA;AAAA,EAExD,MAAM,MAAA,CAAO,QAA6C,EAAA,MAAA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;AAClN,EAEA,MAAM,SAAA,CAAU,EAA0C,EAAA,YAAA,EAAsB,QAA2D,OAAiE,EAAA;AAC3M,IAAA,OAAO,KAAK,SAAU,CAAA,MAAA,CAAuE,EAAE,EAAK,EAAA,OAAO,OAAO,QAAW,GAAA,EAAA,GAAI,EAAG,CAAA,EAAA,EAAI,MAAM,4BAA6B,CAAA,IAAA,EAAM,WAAW,YAAa,EAAA,EAAG,QAAQ,OAAO,CAAA;AAAA;AAC5N,EAEA,MAAM,YAAA,CAAa,EAA0C,EAAA,YAAA,EAAsB,QAA2D,OAAiE,EAAA;AAC9M,IAAA,OAAO,KAAK,SAAU,CAAA,MAAA,CAAuE,EAAE,EAAK,EAAA,OAAO,OAAO,QAAW,GAAA,EAAA,GAAI,EAAG,CAAA,EAAA,EAAI,MAAM,4BAA6B,CAAA,IAAA,EAAM,cAAc,YAAa,EAAA,EAAG,QAAQ,OAAO,CAAA;AAAA;AAC/N,EAGA,8BAA8B,QAAwD,EAAA;AACrF,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,4BAA6B,CAAA,IAAA;AAAA;AACzE,EAGA,aAAa,EAAgE,EAAA;AAC5E,IAAO,OAAA,KAAA,CAAM,qBAAqD,EAAE,CAAA;AAAA;AACrE,EAEA,sBAAsB,GAAiD,EAAA;AACtE,IAAO,OAAA,KAAA,CAAM,qBAAsD,CAAA,GAAG,GAAG,CAAA;AAAA;AAC1E,EAGA,IAAwC,GAAA;AACvC,IAAA,OAAO,4BAA6B,CAAA,IAAA;AAAA;AAGtC;AAGA,MAAM,QAAA,GAAW,IAAI,4BAA6B,EAAA;AAClD,IAAO,sCAAQ,GAAA","file":"percentage_discount_promotions.js","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Market, MarketType } from './markets'\nimport type { OrderAmountPromotionRule, OrderAmountPromotionRuleType } from './order_amount_promotion_rules'\nimport type { SkuListPromotionRule, SkuListPromotionRuleType } from './sku_list_promotion_rules'\nimport type { CouponCodesPromotionRule, CouponCodesPromotionRuleType } from './coupon_codes_promotion_rules'\nimport type { CustomPromotionRule, CustomPromotionRuleType } from './custom_promotion_rules'\nimport type { SkuList, SkuListType } from './sku_lists'\nimport type { Coupon } from './coupons'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Tag, TagType } from './tags'\nimport type { Version } from './versions'\nimport type { Sku } from './skus'\nimport type { PromotionRule } from './promotion_rules'\n\n\ntype PercentageDiscountPromotionType = 'percentage_discount_promotions'\ntype PercentageDiscountPromotionRel = ResourceRel & { type: PercentageDiscountPromotionType }\ntype MarketRel = ResourceRel & { type: MarketType }\ntype OrderAmountPromotionRuleRel = ResourceRel & { type: OrderAmountPromotionRuleType }\ntype SkuListPromotionRuleRel = ResourceRel & { type: SkuListPromotionRuleType }\ntype CouponCodesPromotionRuleRel = ResourceRel & { type: CouponCodesPromotionRuleType }\ntype CustomPromotionRuleRel = ResourceRel & { type: CustomPromotionRuleType }\ntype SkuListRel = ResourceRel & { type: SkuListType }\ntype TagRel = ResourceRel & { type: TagType }\n\n\nexport type PercentageDiscountPromotionSort = Pick<PercentageDiscountPromotion, 'id' | 'name' | 'currency_code' | 'exclusive' | 'priority' | 'starts_at' | 'expires_at' | 'total_usage_limit' | 'total_usage_count' | 'disabled_at'> & ResourceSort\n// export type PercentageDiscountPromotionFilter = Pick<PercentageDiscountPromotion, 'id' | 'name' | 'currency_code' | 'priority' | 'starts_at' | 'expires_at' | 'total_usage_limit' | 'total_usage_count' | 'disabled_at'> & ResourceFilter\n\n\ninterface PercentageDiscountPromotion extends Resource {\n\t\n\treadonly type: PercentageDiscountPromotionType\n\n\t/** \n\t * The promotion's internal name.\n\t * @example ```\"Personal promotion\"```\n\t */\n\tname: string\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * Indicates if the promotion will be applied exclusively, based on its priority score.\n\t * @example ```true```\n\t */\n\texclusive?: boolean | null\n\t/** \n\t * The priority assigned to the promotion (lower means higher priority).\n\t * @example ```2```\n\t */\n\tpriority?: number | null\n\t/** \n\t * The activation date/time of this promotion.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tstarts_at: string\n\t/** \n\t * The expiration date/time of this promotion (must be after starts_at).\n\t * @example ```\"2018-01-02T12:00:00.000Z\"```\n\t */\n\texpires_at: string\n\t/** \n\t * The total number of times this promotion can be applied. When 'null' it means promotion can be applied infinite times.\n\t * @example ```5```\n\t */\n\ttotal_usage_limit?: number | null\n\t/** \n\t * The number of times this promotion has been applied.\n\t * @example ```2```\n\t */\n\ttotal_usage_count?: number | null\n\t/** \n\t * Indicates if the promotion is active (enabled and not expired).\n\t * @example ```true```\n\t */\n\tactive?: boolean | null\n\t/** \n\t * The promotion status. One of 'disabled', 'expired', 'pending', 'active', or 'inactive'.\n\t * @example ```\"pending\"```\n\t */\n\tstatus?: 'disabled' | 'expired' | 'pending' | 'active' | 'inactive' | 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 discount percentage to be applied.\n\t * @example ```10```\n\t */\n\tpercentage: number\n\n\tmarket?: Market | null\n\tpromotion_rules?: PromotionRule[] | null\n\torder_amount_promotion_rule?: OrderAmountPromotionRule | null\n\tsku_list_promotion_rule?: SkuListPromotionRule | null\n\tcoupon_codes_promotion_rule?: CouponCodesPromotionRule | null\n\tcustom_promotion_rule?: CustomPromotionRule | null\n\tsku_list?: SkuList | null\n\tcoupons?: Coupon[] | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\ttags?: Tag[] | null\n\tversions?: Version[] | null\n\tskus?: Sku[] | null\n\n}\n\n\ninterface PercentageDiscountPromotionCreate extends ResourceCreate {\n\t\n\t/** \n\t * The promotion's internal name.\n\t * @example ```\"Personal promotion\"```\n\t */\n\tname: string\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * Indicates if the promotion will be applied exclusively, based on its priority score.\n\t * @example ```true```\n\t */\n\texclusive?: boolean | null\n\t/** \n\t * The priority assigned to the promotion (lower means higher priority).\n\t * @example ```2```\n\t */\n\tpriority?: number | null\n\t/** \n\t * The activation date/time of this promotion.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tstarts_at: string\n\t/** \n\t * The expiration date/time of this promotion (must be after starts_at).\n\t * @example ```\"2018-01-02T12:00:00.000Z\"```\n\t */\n\texpires_at: string\n\t/** \n\t * The total number of times this promotion can be applied. When 'null' it means promotion can be applied infinite times.\n\t * @example ```5```\n\t */\n\ttotal_usage_limit?: 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\t/** \n\t * The discount percentage to be applied.\n\t * @example ```10```\n\t */\n\tpercentage: number\n\n\tmarket?: MarketRel | null\n\torder_amount_promotion_rule?: OrderAmountPromotionRuleRel | null\n\tsku_list_promotion_rule?: SkuListPromotionRuleRel | null\n\tcoupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null\n\tcustom_promotion_rule?: CustomPromotionRuleRel | null\n\tsku_list?: SkuListRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\ninterface PercentageDiscountPromotionUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The promotion's internal name.\n\t * @example ```\"Personal promotion\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * Indicates if the promotion will be applied exclusively, based on its priority score.\n\t * @example ```true```\n\t */\n\texclusive?: boolean | null\n\t/** \n\t * The priority assigned to the promotion (lower means higher priority).\n\t * @example ```2```\n\t */\n\tpriority?: number | null\n\t/** \n\t * The activation date/time of this promotion.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tstarts_at?: string | null\n\t/** \n\t * The expiration date/time of this promotion (must be after starts_at).\n\t * @example ```\"2018-01-02T12:00:00.000Z\"```\n\t */\n\texpires_at?: string | null\n\t/** \n\t * The total number of times this promotion can be applied. When 'null' it means promotion can be applied infinite times.\n\t * @example ```5```\n\t */\n\ttotal_usage_limit?: 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\t/** \n\t * Comma separated list of tags to be added. Duplicates, invalid and non existing ones are discarded. Cannot be passed by sales channels.\n\t */\n\t_add_tags?: string | null\n\t/** \n\t * Comma separated list of tags to be removed. Duplicates, invalid and non existing ones are discarded. Cannot be passed by sales channels.\n\t */\n\t_remove_tags?: string | null\n\t/** \n\t * The discount percentage to be applied.\n\t * @example ```10```\n\t */\n\tpercentage?: number | null\n\n\tmarket?: MarketRel | null\n\torder_amount_promotion_rule?: OrderAmountPromotionRuleRel | null\n\tsku_list_promotion_rule?: SkuListPromotionRuleRel | null\n\tcoupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null\n\tcustom_promotion_rule?: CustomPromotionRuleRel | null\n\tsku_list?: SkuListRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\nclass PercentageDiscountPromotions extends ApiResource<PercentageDiscountPromotion> {\n\n\tstatic readonly TYPE: PercentageDiscountPromotionType = 'percentage_discount_promotions' as const\n\n\tasync create(resource: PercentageDiscountPromotionCreate, params?: QueryParamsRetrieve<PercentageDiscountPromotion>, options?: ResourcesConfig): Promise<PercentageDiscountPromotion> {\n\t\treturn this.resources.create<PercentageDiscountPromotionCreate, PercentageDiscountPromotion>({ ...resource, type: PercentageDiscountPromotions.TYPE }, params, options)\n\t}\n\n\tasync update(resource: PercentageDiscountPromotionUpdate, params?: QueryParamsRetrieve<PercentageDiscountPromotion>, options?: ResourcesConfig): Promise<PercentageDiscountPromotion> {\n\t\treturn this.resources.update<PercentageDiscountPromotionUpdate, PercentageDiscountPromotion>({ ...resource, type: PercentageDiscountPromotions.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: PercentageDiscountPromotions.TYPE } : id, options)\n\t}\n\n\tasync market(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\tconst _percentageDiscountPromotionId = (percentageDiscountPromotionId as PercentageDiscountPromotion).id || percentageDiscountPromotionId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `percentage_discount_promotions/${_percentageDiscountPromotionId}/market`, params, options) as unknown as Market\n\t}\n\n\tasync order_amount_promotion_rule(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsRetrieve<OrderAmountPromotionRule>, options?: ResourcesConfig): Promise<OrderAmountPromotionRule> {\n\t\tconst _percentageDiscountPromotionId = (percentageDiscountPromotionId as PercentageDiscountPromotion).id || percentageDiscountPromotionId as string\n\t\treturn this.resources.fetch<OrderAmountPromotionRule>({ type: 'order_amount_promotion_rules' }, `percentage_discount_promotions/${_percentageDiscountPromotionId}/order_amount_promotion_rule`, params, options) as unknown as OrderAmountPromotionRule\n\t}\n\n\tasync sku_list_promotion_rule(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsRetrieve<SkuListPromotionRule>, options?: ResourcesConfig): Promise<SkuListPromotionRule> {\n\t\tconst _percentageDiscountPromotionId = (percentageDiscountPromotionId as PercentageDiscountPromotion).id || percentageDiscountPromotionId as string\n\t\treturn this.resources.fetch<SkuListPromotionRule>({ type: 'sku_list_promotion_rules' }, `percentage_discount_promotions/${_percentageDiscountPromotionId}/sku_list_promotion_rule`, params, options) as unknown as SkuListPromotionRule\n\t}\n\n\tasync coupon_codes_promotion_rule(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsRetrieve<CouponCodesPromotionRule>, options?: ResourcesConfig): Promise<CouponCodesPromotionRule> {\n\t\tconst _percentageDiscountPromotionId = (percentageDiscountPromotionId as PercentageDiscountPromotion).id || percentageDiscountPromotionId as string\n\t\treturn this.resources.fetch<CouponCodesPromotionRule>({ type: 'coupon_codes_promotion_rules' }, `percentage_discount_promotions/${_percentageDiscountPromotionId}/coupon_codes_promotion_rule`, params, options) as unknown as CouponCodesPromotionRule\n\t}\n\n\tasync custom_promotion_rule(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsRetrieve<CustomPromotionRule>, options?: ResourcesConfig): Promise<CustomPromotionRule> {\n\t\tconst _percentageDiscountPromotionId = (percentageDiscountPromotionId as PercentageDiscountPromotion).id || percentageDiscountPromotionId as string\n\t\treturn this.resources.fetch<CustomPromotionRule>({ type: 'custom_promotion_rules' }, `percentage_discount_promotions/${_percentageDiscountPromotionId}/custom_promotion_rule`, params, options) as unknown as CustomPromotionRule\n\t}\n\n\tasync sku_list(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsRetrieve<SkuList>, options?: ResourcesConfig): Promise<SkuList> {\n\t\tconst _percentageDiscountPromotionId = (percentageDiscountPromotionId as PercentageDiscountPromotion).id || percentageDiscountPromotionId as string\n\t\treturn this.resources.fetch<SkuList>({ type: 'sku_lists' }, `percentage_discount_promotions/${_percentageDiscountPromotionId}/sku_list`, params, options) as unknown as SkuList\n\t}\n\n\tasync coupons(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsList<Coupon>, options?: ResourcesConfig): Promise<ListResponse<Coupon>> {\n\t\tconst _percentageDiscountPromotionId = (percentageDiscountPromotionId as PercentageDiscountPromotion).id || percentageDiscountPromotionId as string\n\t\treturn this.resources.fetch<Coupon>({ type: 'coupons' }, `percentage_discount_promotions/${_percentageDiscountPromotionId}/coupons`, params, options) as unknown as ListResponse<Coupon>\n\t}\n\n\tasync attachments(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _percentageDiscountPromotionId = (percentageDiscountPromotionId as PercentageDiscountPromotion).id || percentageDiscountPromotionId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `percentage_discount_promotions/${_percentageDiscountPromotionId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _percentageDiscountPromotionId = (percentageDiscountPromotionId as PercentageDiscountPromotion).id || percentageDiscountPromotionId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `percentage_discount_promotions/${_percentageDiscountPromotionId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync tags(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsList<Tag>, options?: ResourcesConfig): Promise<ListResponse<Tag>> {\n\t\tconst _percentageDiscountPromotionId = (percentageDiscountPromotionId as PercentageDiscountPromotion).id || percentageDiscountPromotionId as string\n\t\treturn this.resources.fetch<Tag>({ type: 'tags' }, `percentage_discount_promotions/${_percentageDiscountPromotionId}/tags`, params, options) as unknown as ListResponse<Tag>\n\t}\n\n\tasync versions(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _percentageDiscountPromotionId = (percentageDiscountPromotionId as PercentageDiscountPromotion).id || percentageDiscountPromotionId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `percentage_discount_promotions/${_percentageDiscountPromotionId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync skus(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsList<Sku>, options?: ResourcesConfig): Promise<ListResponse<Sku>> {\n\t\tconst _percentageDiscountPromotionId = (percentageDiscountPromotionId as PercentageDiscountPromotion).id || percentageDiscountPromotionId as string\n\t\treturn this.resources.fetch<Sku>({ type: 'skus' }, `percentage_discount_promotions/${_percentageDiscountPromotionId}/skus`, params, options) as unknown as ListResponse<Sku>\n\t}\n\n\tasync _disable(id: string | PercentageDiscountPromotion, params?: QueryParamsRetrieve<PercentageDiscountPromotion>, options?: ResourcesConfig): Promise<PercentageDiscountPromotion> {\n\t\treturn this.resources.update<PercentageDiscountPromotionUpdate, PercentageDiscountPromotion>({ id: (typeof id === 'string')? id: id.id, type: PercentageDiscountPromotions.TYPE, _disable: true }, params, options)\n\t}\n\n\tasync _enable(id: string | PercentageDiscountPromotion, params?: QueryParamsRetrieve<PercentageDiscountPromotion>, options?: ResourcesConfig): Promise<PercentageDiscountPromotion> {\n\t\treturn this.resources.update<PercentageDiscountPromotionUpdate, PercentageDiscountPromotion>({ id: (typeof id === 'string')? id: id.id, type: PercentageDiscountPromotions.TYPE, _enable: true }, params, options)\n\t}\n\n\tasync _add_tags(id: string | PercentageDiscountPromotion, triggerValue: string, params?: QueryParamsRetrieve<PercentageDiscountPromotion>, options?: ResourcesConfig): Promise<PercentageDiscountPromotion> {\n\t\treturn this.resources.update<PercentageDiscountPromotionUpdate, PercentageDiscountPromotion>({ id: (typeof id === 'string')? id: id.id, type: PercentageDiscountPromotions.TYPE, _add_tags: triggerValue }, params, options)\n\t}\n\n\tasync _remove_tags(id: string | PercentageDiscountPromotion, triggerValue: string, params?: QueryParamsRetrieve<PercentageDiscountPromotion>, options?: ResourcesConfig): Promise<PercentageDiscountPromotion> {\n\t\treturn this.resources.update<PercentageDiscountPromotionUpdate, PercentageDiscountPromotion>({ id: (typeof id === 'string')? id: id.id, type: PercentageDiscountPromotions.TYPE, _remove_tags: triggerValue }, params, options)\n\t}\n\n\n\tisPercentageDiscountPromotion(resource: any): resource is PercentageDiscountPromotion {\n\t\treturn resource.type && (resource.type === PercentageDiscountPromotions.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): PercentageDiscountPromotionRel {\n\t\treturn super.relationshipOneToOne<PercentageDiscountPromotionRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): PercentageDiscountPromotionRel[] {\n\t\treturn super.relationshipOneToMany<PercentageDiscountPromotionRel>(...ids)\n\t}\n\n\n\ttype(): PercentageDiscountPromotionType {\n\t\treturn PercentageDiscountPromotions.TYPE\n\t}\n\n}\n\n\nconst instance = new PercentageDiscountPromotions()\nexport default instance\n\nexport type { PercentageDiscountPromotion, PercentageDiscountPromotionCreate, PercentageDiscountPromotionUpdate, PercentageDiscountPromotionType }\n"]}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../src/resources/pickups.ts"],"names":["ApiResource"],"mappings":";;;;AAuCA,MAAM,gBAAgBA,oBAAoB,CAAA;AAAA,EAEzC,OAAgB,IAAmB,GAAA,SAAA;AAAA,EAEnC,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,EAAE,IAAA,EAAM,WAAY,EAAA,EAAG,CAAW,QAAA,EAAA,SAAS,CAAa,SAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC9G,EAEA,MAAM,OAAA,CAAQ,QAA2B,EAAA,MAAA,EAAkC,OAA0D,EAAA;AACpI,IAAM,MAAA,SAAA,GAAa,SAAoB,EAAM,IAAA,QAAA;AAC7C,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAc,EAAE,IAAA,EAAM,SAAU,EAAA,EAAG,CAAW,QAAA,EAAA,SAAS,CAAY,QAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACzG,EAEA,MAAM,MAAA,CAAO,QAA2B,EAAA,MAAA,EAAiC,OAAyD,EAAA;AACjI,IAAM,MAAA,SAAA,GAAa,SAAoB,EAAM,IAAA,QAAA;AAC7C,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAa,EAAE,IAAA,EAAM,QAAS,EAAA,EAAG,CAAW,QAAA,EAAA,SAAS,CAAW,OAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACtG,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":"pickups.cjs","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Shipment } from './shipments'\nimport type { Parcel } from './parcels'\nimport type { Event } from './events'\n\n\ntype PickupType = 'pickups'\ntype PickupRel = ResourceRel & { type: PickupType }\n\n\nexport type PickupSort = Pick<Pickup, 'id' | 'status'> & ResourceSort\n// export type PickupFilter = Pick<Pickup, 'id' | 'status'> & ResourceFilter\n\n\ninterface Pickup extends Resource {\n\t\n\treadonly type: PickupType\n\n\t/** \n\t * The pick up status.\n\t * @example ```\"unknown\"```\n\t */\n\tstatus?: string | null\n\t/** \n\t * The pick up service internal ID.\n\t * @example ```\"pickup_13e5d7e2a7824432a07975bc553944bc\"```\n\t */\n\tinternal_id: string\n\n\tshipment?: Shipment | null\n\tparcels?: Parcel[] | null\n\tevents?: Event[] | null\n\n}\n\n\nclass Pickups extends ApiResource<Pickup> {\n\n\tstatic readonly TYPE: PickupType = 'pickups' as const\n\n\tasync shipment(pickupId: string | Pickup, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\tconst _pickupId = (pickupId as Pickup).id || pickupId as string\n\t\treturn this.resources.fetch<Shipment>({ type: 'shipments' }, `pickups/${_pickupId}/shipment`, params, options) as unknown as Shipment\n\t}\n\n\tasync parcels(pickupId: string | Pickup, params?: QueryParamsList<Parcel>, options?: ResourcesConfig): Promise<ListResponse<Parcel>> {\n\t\tconst _pickupId = (pickupId as Pickup).id || pickupId as string\n\t\treturn this.resources.fetch<Parcel>({ type: 'parcels' }, `pickups/${_pickupId}/parcels`, params, options) as unknown as ListResponse<Parcel>\n\t}\n\n\tasync events(pickupId: string | Pickup, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _pickupId = (pickupId as Pickup).id || pickupId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `pickups/${_pickupId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\n\tisPickup(resource: any): resource is Pickup {\n\t\treturn resource.type && (resource.type === Pickups.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): PickupRel {\n\t\treturn super.relationshipOneToOne<PickupRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): PickupRel[] {\n\t\treturn super.relationshipOneToMany<PickupRel>(...ids)\n\t}\n\n\n\ttype(): PickupType {\n\t\treturn Pickups.TYPE\n\t}\n\n}\n\n\nconst instance = new Pickups()\nexport default instance\n\nexport type { Pickup, PickupType }\n"]}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export { gA as Pickup, gB as PickupSort, kF as PickupType, b0 as default } from '../api-
|
1
|
+
export { gA as Pickup, gB as PickupSort, kF as PickupType, b0 as default } from '../api-DmIZO_Np.cjs';
|
2
2
|
import '../client.cjs';
|
3
3
|
import '../interceptor-5MISI1yn.cjs';
|
4
4
|
import '../types.cjs';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export { gA as Pickup, gB as PickupSort, kF as PickupType, b0 as default } from '../api-
|
1
|
+
export { gA as Pickup, gB as PickupSort, kF as PickupType, b0 as default } from '../api-DDgIE2i8.js';
|
2
2
|
import '../client.js';
|
3
3
|
import '../interceptor-5MISI1yn.js';
|
4
4
|
import '../types.js';
|
package/lib/resources/pickups.js
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../src/resources/pickups.ts"],"names":[],"mappings":";;AAuCA,MAAM,gBAAgB,WAAoB,CAAA;AAAA,EAEzC,OAAgB,IAAmB,GAAA,SAAA;AAAA,EAEnC,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,EAAE,IAAA,EAAM,WAAY,EAAA,EAAG,CAAW,QAAA,EAAA,SAAS,CAAa,SAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC9G,EAEA,MAAM,OAAA,CAAQ,QAA2B,EAAA,MAAA,EAAkC,OAA0D,EAAA;AACpI,IAAM,MAAA,SAAA,GAAa,SAAoB,EAAM,IAAA,QAAA;AAC7C,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAc,EAAE,IAAA,EAAM,SAAU,EAAA,EAAG,CAAW,QAAA,EAAA,SAAS,CAAY,QAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACzG,EAEA,MAAM,MAAA,CAAO,QAA2B,EAAA,MAAA,EAAiC,OAAyD,EAAA;AACjI,IAAM,MAAA,SAAA,GAAa,SAAoB,EAAM,IAAA,QAAA;AAC7C,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAa,EAAE,IAAA,EAAM,QAAS,EAAA,EAAG,CAAW,QAAA,EAAA,SAAS,CAAW,OAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACtG,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":"pickups.js","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Shipment } from './shipments'\nimport type { Parcel } from './parcels'\nimport type { Event } from './events'\n\n\ntype PickupType = 'pickups'\ntype PickupRel = ResourceRel & { type: PickupType }\n\n\nexport type PickupSort = Pick<Pickup, 'id' | 'status'> & ResourceSort\n// export type PickupFilter = Pick<Pickup, 'id' | 'status'> & ResourceFilter\n\n\ninterface Pickup extends Resource {\n\t\n\treadonly type: PickupType\n\n\t/** \n\t * The pick up status.\n\t * @example ```\"unknown\"```\n\t */\n\tstatus?: string | null\n\t/** \n\t * The pick up service internal ID.\n\t * @example ```\"pickup_13e5d7e2a7824432a07975bc553944bc\"```\n\t */\n\tinternal_id: string\n\n\tshipment?: Shipment | null\n\tparcels?: Parcel[] | null\n\tevents?: Event[] | null\n\n}\n\n\nclass Pickups extends ApiResource<Pickup> {\n\n\tstatic readonly TYPE: PickupType = 'pickups' as const\n\n\tasync shipment(pickupId: string | Pickup, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\tconst _pickupId = (pickupId as Pickup).id || pickupId as string\n\t\treturn this.resources.fetch<Shipment>({ type: 'shipments' }, `pickups/${_pickupId}/shipment`, params, options) as unknown as Shipment\n\t}\n\n\tasync parcels(pickupId: string | Pickup, params?: QueryParamsList<Parcel>, options?: ResourcesConfig): Promise<ListResponse<Parcel>> {\n\t\tconst _pickupId = (pickupId as Pickup).id || pickupId as string\n\t\treturn this.resources.fetch<Parcel>({ type: 'parcels' }, `pickups/${_pickupId}/parcels`, params, options) as unknown as ListResponse<Parcel>\n\t}\n\n\tasync events(pickupId: string | Pickup, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _pickupId = (pickupId as Pickup).id || pickupId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `pickups/${_pickupId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\n\tisPickup(resource: any): resource is Pickup {\n\t\treturn resource.type && (resource.type === Pickups.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): PickupRel {\n\t\treturn super.relationshipOneToOne<PickupRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): PickupRel[] {\n\t\treturn super.relationshipOneToMany<PickupRel>(...ids)\n\t}\n\n\n\ttype(): PickupType {\n\t\treturn Pickups.TYPE\n\t}\n\n}\n\n\nconst instance = new Pickups()\nexport default instance\n\nexport type { Pickup, PickupType }\n"]}
|
@@ -46,5 +46,7 @@ const instance = new PriceFrequencyTiers();
|
|
46
46
|
var price_frequency_tiers_default = instance;
|
47
47
|
|
48
48
|
module.exports = price_frequency_tiers_default;
|
49
|
+
//# sourceMappingURL=price_frequency_tiers.cjs.map
|
49
50
|
|
50
51
|
module.exports = exports.default;
|
52
|
+
//# sourceMappingURL=price_frequency_tiers.cjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../src/resources/price_frequency_tiers.ts"],"names":["ApiResource"],"mappings":";;;;AAuGA,MAAM,4BAA4BA,oBAAgC,CAAA;AAAA,EAEjE,OAAgB,IAA+B,GAAA,uBAAA;AAAA,EAE/C,MAAM,MAAA,CAAO,QAAoC,EAAA,MAAA,EAAkD,OAAwD,EAAA;AAC1J,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAqD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,mBAAoB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC5I,EAEA,MAAM,MAAA,CAAO,QAAoC,EAAA,MAAA,EAAkD,OAAwD,EAAA;AAC1J,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAqD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,mBAAoB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC5I,EAEA,MAAM,MAAO,CAAA,EAAA,EAAyB,OAA0C,EAAA;AAC/E,IAAA,MAAM,IAAK,CAAA,SAAA,CAAU,MAAQ,CAAA,OAAO,EAAO,KAAA,QAAA,GAAW,EAAE,EAAA,EAAI,IAAM,EAAA,mBAAA,CAAoB,IAAK,EAAA,GAAI,IAAI,OAAO,CAAA;AAAA;AAC3G,EAEA,MAAM,KAAA,CAAM,oBAAmD,EAAA,MAAA,EAAqC,OAA2C,EAAA;AAC9I,IAAM,MAAA,qBAAA,GAAyB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oB,CAAA,IAAA;AAAA;AAChE,EAGA,aAAa,EAAuD,EAAA;AACnE,IAAO,OAAA,KAAA,CAAM,qBAA4C,EAAE,CAAA;AAAA;AAC5D,EAEA,sBAAsB,GAAwC,EAAA;AAC7D,IAAO,OAAA,KAAA,CAAM,qBAA6C,CAAA,GAAG,GAAG,CAAA;AAAA;AACjE,EAGA,IAA+B,GAAA;AAC9B,IAAA,OAAO,mBAAoB,CAAA,IAAA;AAAA;AAG7B;AAGA,MAAM,QAAA,GAAW,IAAI,mBAAoB,EAAA;AACzC,IAAO,6BAAQ,GAAA","file":"price_frequency_tiers.cjs","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Price, PriceType } from './prices'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\nimport type { Event } from './events'\n\n\ntype PriceFrequencyTierType = 'price_frequency_tiers'\ntype PriceFrequencyTierRel = ResourceRel & { type: PriceFrequencyTierType }\ntype PriceRel = ResourceRel & { type: PriceType }\n\n\nexport type PriceFrequencyTierSort = Pick<PriceFrequencyTier, 'id' | 'name' | 'up_to' | 'price_amount_cents'> & ResourceSort\n// export type PriceFrequencyTierFilter = Pick<PriceFrequencyTier, 'id' | 'name' | 'up_to' | 'price_amount_cents'> & ResourceFilter\n\n\ninterface PriceFrequencyTier extends Resource {\n\t\n\treadonly type: PriceFrequencyTierType\n\n\t/** \n\t * The price tier's name.\n\t * @example ```\"six pack\"```\n\t */\n\tname: string\n\t/** \n\t * The tier upper limit, expressed as the line item frequency in days (or frequency label, ie 'monthly'). When 'null' it means infinity (useful to have an always matching tier).\n\t * @example ```7```\n\t */\n\tup_to?: number | null\n\t/** \n\t * The price of this price tier, in cents.\n\t * @example ```1000```\n\t */\n\tprice_amount_cents: number\n\t/** \n\t * The price of this price tier, float.\n\t * @example ```10```\n\t */\n\tprice_amount_float?: number | null\n\t/** \n\t * The price of this price tier, formatted.\n\t * @example ```\"€10,00\"```\n\t */\n\tformatted_price_amount?: string | null\n\n\tprice?: Price | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\tevents?: Event[] | null\n\n}\n\n\ninterface PriceFrequencyTierCreate extends ResourceCreate {\n\t\n\t/** \n\t * The price tier's name.\n\t * @example ```\"six pack\"```\n\t */\n\tname: string\n\t/** \n\t * The tier upper limit, expressed as the line item frequency in days (or frequency label, ie 'monthly'). When 'null' it means infinity (useful to have an always matching tier).\n\t * @example ```7```\n\t */\n\tup_to?: number | null\n\t/** \n\t * The price of this price tier, in cents.\n\t * @example ```1000```\n\t */\n\tprice_amount_cents: number\n\n\tprice: PriceRel\n\n}\n\n\ninterface PriceFrequencyTierUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The price tier's name.\n\t * @example ```\"six pack\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The tier upper limit, expressed as the line item frequency in days (or frequency label, ie 'monthly'). When 'null' it means infinity (useful to have an always matching tier).\n\t * @example ```7```\n\t */\n\tup_to?: number | null\n\t/** \n\t * The price of this price tier, in cents.\n\t * @example ```1000```\n\t */\n\tprice_amount_cents?: number | null\n\n\tprice?: PriceRel | null\n\n}\n\n\nclass PriceFrequencyTiers extends ApiResource<PriceFrequencyTier> {\n\n\tstatic readonly TYPE: PriceFrequencyTierType = 'price_frequency_tiers' as const\n\n\tasync create(resource: PriceFrequencyTierCreate, params?: QueryParamsRetrieve<PriceFrequencyTier>, options?: ResourcesConfig): Promise<PriceFrequencyTier> {\n\t\treturn this.resources.create<PriceFrequencyTierCreate, PriceFrequencyTier>({ ...resource, type: PriceFrequencyTiers.TYPE }, params, options)\n\t}\n\n\tasync update(resource: PriceFrequencyTierUpdate, params?: QueryParamsRetrieve<PriceFrequencyTier>, options?: ResourcesConfig): Promise<PriceFrequencyTier> {\n\t\treturn this.resources.update<PriceFrequencyTierUpdate, PriceFrequencyTier>({ ...resource, type: PriceFrequencyTiers.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: PriceFrequencyTiers.TYPE } : id, options)\n\t}\n\n\tasync price(priceFrequencyTierId: string | PriceFrequencyTier, params?: QueryParamsRetrieve<Price>, options?: ResourcesConfig): Promise<Price> {\n\t\tconst _priceFrequencyTierId = (priceFrequencyTierId as PriceFrequencyTier).id || priceFrequencyTierId as string\n\t\treturn this.resources.fetch<Price>({ type: 'prices' }, `price_frequency_tiers/${_priceFrequencyTierId}/price`, params, options) as unknown as Price\n\t}\n\n\tasync attachments(priceFrequencyTierId: string | PriceFrequencyTier, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _priceFrequencyTierId = (priceFrequencyTierId as PriceFrequencyTier).id || priceFrequencyTierId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `price_frequency_tiers/${_priceFrequencyTierId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(priceFrequencyTierId: string | PriceFrequencyTier, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _priceFrequencyTierId = (priceFrequencyTierId as PriceFrequencyTier).id || priceFrequencyTierId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `price_frequency_tiers/${_priceFrequencyTierId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync events(priceFrequencyTierId: string | PriceFrequencyTier, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _priceFrequencyTierId = (priceFrequencyTierId as PriceFrequencyTier).id || priceFrequencyTierId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `price_frequency_tiers/${_priceFrequencyTierId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\n\tisPriceFrequencyTier(resource: any): resource is PriceFrequencyTier {\n\t\treturn resource.type && (resource.type === PriceFrequencyTiers.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): PriceFrequencyTierRel {\n\t\treturn super.relationshipOneToOne<PriceFrequencyTierRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): PriceFrequencyTierRel[] {\n\t\treturn super.relationshipOneToMany<PriceFrequencyTierRel>(...ids)\n\t}\n\n\n\ttype(): PriceFrequencyTierType {\n\t\treturn PriceFrequencyTiers.TYPE\n\t}\n\n}\n\n\nconst instance = new PriceFrequencyTiers()\nexport default instance\n\nexport type { PriceFrequencyTier, PriceFrequencyTierCreate, PriceFrequencyTierUpdate, PriceFrequencyTierType }\n"]}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export { gC as PriceFrequencyTier, gD as PriceFrequencyTierCreate, gF as PriceFrequencyTierSort, kO as PriceFrequencyTierType, gE as PriceFrequencyTierUpdate, b1 as default } from '../api-
|
1
|
+
export { gC as PriceFrequencyTier, gD as PriceFrequencyTierCreate, gF as PriceFrequencyTierSort, kO as PriceFrequencyTierType, gE as PriceFrequencyTierUpdate, b1 as default } from '../api-DmIZO_Np.cjs';
|
2
2
|
import '../client.cjs';
|
3
3
|
import '../interceptor-5MISI1yn.cjs';
|
4
4
|
import '../types.cjs';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export { gC as PriceFrequencyTier, gD as PriceFrequencyTierCreate, gF as PriceFrequencyTierSort, kO as PriceFrequencyTierType, gE as PriceFrequencyTierUpdate, b1 as default } from '../api-
|
1
|
+
export { gC as PriceFrequencyTier, gD as PriceFrequencyTierCreate, gF as PriceFrequencyTierSort, kO as PriceFrequencyTierType, gE as PriceFrequencyTierUpdate, b1 as default } from '../api-DDgIE2i8.js';
|
2
2
|
import '../client.js';
|
3
3
|
import '../interceptor-5MISI1yn.js';
|
4
4
|
import '../types.js';
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../src/resources/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AAA;AACzC,IAAO,6BAAQ,GAAA","file":"price_frequency_tiers.js","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Price, PriceType } from './prices'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\nimport type { Event } from './events'\n\n\ntype PriceFrequencyTierType = 'price_frequency_tiers'\ntype PriceFrequencyTierRel = ResourceRel & { type: PriceFrequencyTierType }\ntype PriceRel = ResourceRel & { type: PriceType }\n\n\nexport type PriceFrequencyTierSort = Pick<PriceFrequencyTier, 'id' | 'name' | 'up_to' | 'price_amount_cents'> & ResourceSort\n// export type PriceFrequencyTierFilter = Pick<PriceFrequencyTier, 'id' | 'name' | 'up_to' | 'price_amount_cents'> & ResourceFilter\n\n\ninterface PriceFrequencyTier extends Resource {\n\t\n\treadonly type: PriceFrequencyTierType\n\n\t/** \n\t * The price tier's name.\n\t * @example ```\"six pack\"```\n\t */\n\tname: string\n\t/** \n\t * The tier upper limit, expressed as the line item frequency in days (or frequency label, ie 'monthly'). When 'null' it means infinity (useful to have an always matching tier).\n\t * @example ```7```\n\t */\n\tup_to?: number | null\n\t/** \n\t * The price of this price tier, in cents.\n\t * @example ```1000```\n\t */\n\tprice_amount_cents: number\n\t/** \n\t * The price of this price tier, float.\n\t * @example ```10```\n\t */\n\tprice_amount_float?: number | null\n\t/** \n\t * The price of this price tier, formatted.\n\t * @example ```\"€10,00\"```\n\t */\n\tformatted_price_amount?: string | null\n\n\tprice?: Price | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\tevents?: Event[] | null\n\n}\n\n\ninterface PriceFrequencyTierCreate extends ResourceCreate {\n\t\n\t/** \n\t * The price tier's name.\n\t * @example ```\"six pack\"```\n\t */\n\tname: string\n\t/** \n\t * The tier upper limit, expressed as the line item frequency in days (or frequency label, ie 'monthly'). When 'null' it means infinity (useful to have an always matching tier).\n\t * @example ```7```\n\t */\n\tup_to?: number | null\n\t/** \n\t * The price of this price tier, in cents.\n\t * @example ```1000```\n\t */\n\tprice_amount_cents: number\n\n\tprice: PriceRel\n\n}\n\n\ninterface PriceFrequencyTierUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The price tier's name.\n\t * @example ```\"six pack\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The tier upper limit, expressed as the line item frequency in days (or frequency label, ie 'monthly'). When 'null' it means infinity (useful to have an always matching tier).\n\t * @example ```7```\n\t */\n\tup_to?: number | null\n\t/** \n\t * The price of this price tier, in cents.\n\t * @example ```1000```\n\t */\n\tprice_amount_cents?: number | null\n\n\tprice?: PriceRel | null\n\n}\n\n\nclass PriceFrequencyTiers extends ApiResource<PriceFrequencyTier> {\n\n\tstatic readonly TYPE: PriceFrequencyTierType = 'price_frequency_tiers' as const\n\n\tasync create(resource: PriceFrequencyTierCreate, params?: QueryParamsRetrieve<PriceFrequencyTier>, options?: ResourcesConfig): Promise<PriceFrequencyTier> {\n\t\treturn this.resources.create<PriceFrequencyTierCreate, PriceFrequencyTier>({ ...resource, type: PriceFrequencyTiers.TYPE }, params, options)\n\t}\n\n\tasync update(resource: PriceFrequencyTierUpdate, params?: QueryParamsRetrieve<PriceFrequencyTier>, options?: ResourcesConfig): Promise<PriceFrequencyTier> {\n\t\treturn this.resources.update<PriceFrequencyTierUpdate, PriceFrequencyTier>({ ...resource, type: PriceFrequencyTiers.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: PriceFrequencyTiers.TYPE } : id, options)\n\t}\n\n\tasync price(priceFrequencyTierId: string | PriceFrequencyTier, params?: QueryParamsRetrieve<Price>, options?: ResourcesConfig): Promise<Price> {\n\t\tconst _priceFrequencyTierId = (priceFrequencyTierId as PriceFrequencyTier).id || priceFrequencyTierId as string\n\t\treturn this.resources.fetch<Price>({ type: 'prices' }, `price_frequency_tiers/${_priceFrequencyTierId}/price`, params, options) as unknown as Price\n\t}\n\n\tasync attachments(priceFrequencyTierId: string | PriceFrequencyTier, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _priceFrequencyTierId = (priceFrequencyTierId as PriceFrequencyTier).id || priceFrequencyTierId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `price_frequency_tiers/${_priceFrequencyTierId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(priceFrequencyTierId: string | PriceFrequencyTier, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _priceFrequencyTierId = (priceFrequencyTierId as PriceFrequencyTier).id || priceFrequencyTierId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `price_frequency_tiers/${_priceFrequencyTierId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync events(priceFrequencyTierId: string | PriceFrequencyTier, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _priceFrequencyTierId = (priceFrequencyTierId as PriceFrequencyTier).id || priceFrequencyTierId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `price_frequency_tiers/${_priceFrequencyTierId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\n\tisPriceFrequencyTier(resource: any): resource is PriceFrequencyTier {\n\t\treturn resource.type && (resource.type === PriceFrequencyTiers.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): PriceFrequencyTierRel {\n\t\treturn super.relationshipOneToOne<PriceFrequencyTierRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): PriceFrequencyTierRel[] {\n\t\treturn super.relationshipOneToMany<PriceFrequencyTierRel>(...ids)\n\t}\n\n\n\ttype(): PriceFrequencyTierType {\n\t\treturn PriceFrequencyTiers.TYPE\n\t}\n\n}\n\n\nconst instance = new PriceFrequencyTiers()\nexport default instance\n\nexport type { PriceFrequencyTier, PriceFrequencyTierCreate, PriceFrequencyTierUpdate, PriceFrequencyTierType }\n"]}
|
@@ -52,5 +52,7 @@ const instance = new PriceListSchedulers();
|
|
52
52
|
var price_list_schedulers_default = instance;
|
53
53
|
|
54
54
|
module.exports = price_list_schedulers_default;
|
55
|
+
//# sourceMappingURL=price_list_schedulers.cjs.map
|
55
56
|
|
56
57
|
module.exports = exports.default;
|
58
|
+
//# sourceMappingURL=price_list_schedulers.cjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../src/resources/price_list_schedulers.ts"],"names":["ApiResource"],"mappings":";;;;AAmIA,MAAM,4BAA4BA,oBAAgC,CAAA;AAAA,EAEjE,OAAgB,IAA+B,GAAA,uBAAA;AAAA,EAE/C,MAAM,MAAA,CAAO,QAAoC,EAAA,MAAA,EAAkD,OAAwD,EAAA;AAC1J,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAqD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,mBAAoB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC5I,EAEA,MAAM,MAAA,CAAO,QAAoC,EAAA,MAAA,EAAkD,OAAwD,EAAA;AAC1J,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAqD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,mBAAoB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC5I,EAEA,MAAM,MAAO,CAAA,EAAA,EAAyB,OAA0C,EAAA;AAC/E,IAAA,MAAM,IAAK,CAAA,SAAA,CAAU,MAAQ,CAAA,OAAO,EAAO,KAAA,QAAA,GAAW,EAAE,EAAA,EAAI,IAAM,EAAA,mBAAA,CAAoB,IAAK,EAAA,GAAI,IAAI,OAAO,CAAA;AAAA;AAC3G,EAEA,MAAM,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AA,CAAS,EAAiC,EAAA,MAAA,EAAkD,OAAwD,EAAA;AACzJ,IAAA,OAAO,KAAK,SAAU,CAAA,MAAA,CAAqD,EAAE,EAAK,EAAA,OAAO,OAAO,QAAW,GAAA,EAAA,GAAI,EAAG,CAAA,EAAA,EAAI,MAAM,mBAAoB,CAAA,IAAA,EAAM,UAAU,IAAK,EAAA,EAAG,QAAQ,OAAO,CAAA;AAAA;AACxL,EAEA,MAAM,OAAA,CAAQ,EAAiC,EAAA,MAAA,EAAkD,OAAwD,EAAA;AACxJ,IAAA,OAAO,KAAK,SAAU,CAAA,MAAA,CAAqD,EAAE,EAAK,EAAA,OAAO,OAAO,QAAW,GAAA,EAAA,GAAI,EAAG,CAAA,EAAA,EAAI,MAAM,mBAAoB,CAAA,IAAA,EAAM,SAAS,IAAK,EAAA,EAAG,QAAQ,OAAO,CAAA;AAAA;AACvL,EAGA,qBAAqB,QAA+C,EAAA;AACnE,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,mBAAoB,CAAA,IAAA;AAAA;AAChE,EAGA,aAAa,EAAuD,EAAA;AACnE,IAAO,OAAA,KAAA,CAAM,qBAA4C,EAAE,CAAA;AAAA;AAC5D,EAEA,sBAAsB,GAAwC,EAAA;AAC7D,IAAO,OAAA,KAAA,CAAM,qBAA6C,CAAA,GAAG,GAAG,CAAA;AAAA;AACjE,EAGA,IAA+B,GAAA;AAC9B,IAAA,OAAO,mBAAoB,CAAA,IAAA;AAAA;AAG7B;AAGA,MAAM,QAAA,GAAW,IAAI,mBAAoB,EAAA;AACzC,IAAO,6BAAQ,GAAA","file":"price_list_schedulers.cjs","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Market, MarketType } from './markets'\nimport type { PriceList, PriceListType } from './price_lists'\nimport type { Event } from './events'\nimport type { Version } from './versions'\n\n\ntype PriceListSchedulerType = 'price_list_schedulers'\ntype PriceListSchedulerRel = ResourceRel & { type: PriceListSchedulerType }\ntype MarketRel = ResourceRel & { type: MarketType }\ntype PriceListRel = ResourceRel & { type: PriceListType }\n\n\nexport type PriceListSchedulerSort = Pick<PriceListScheduler, 'id' | 'name' | 'starts_at' | 'expires_at' | 'disabled_at'> & ResourceSort\n// export type PriceListSchedulerFilter = Pick<PriceListScheduler, 'id' | 'name' | 'starts_at' | 'expires_at' | 'disabled_at'> & ResourceFilter\n\n\ninterface PriceListScheduler extends Resource {\n\t\n\treadonly type: PriceListSchedulerType\n\n\t/** \n\t * The price list scheduler's internal name.\n\t * @example ```\"FW SALE 2023\"```\n\t */\n\tname: string\n\t/** \n\t * The activation date/time of this price list scheduler.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tstarts_at: string\n\t/** \n\t * The expiration date/time of this price list scheduler (must be after starts_at).\n\t * @example ```\"2018-01-02T12:00:00.000Z\"```\n\t */\n\texpires_at: string\n\t/** \n\t * Indicates if the price list scheduler is active (enabled and not expired).\n\t * @example ```true```\n\t */\n\tactive?: boolean | null\n\t/** \n\t * The price list scheduler status. One of 'disabled', 'expired', 'pending', or 'active'.\n\t * @example ```\"pending\"```\n\t */\n\tstatus?: 'disabled' | 'expired' | 'pending' | 'active' | 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\n\tmarket?: Market | null\n\tprice_list?: PriceList | null\n\tevents?: Event[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface PriceListSchedulerCreate extends ResourceCreate {\n\t\n\t/** \n\t * The price list scheduler's internal name.\n\t * @example ```\"FW SALE 2023\"```\n\t */\n\tname: string\n\t/** \n\t * The activation date/time of this price list scheduler.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tstarts_at: string\n\t/** \n\t * The expiration date/time of this price list scheduler (must be after starts_at).\n\t * @example ```\"2018-01-02T12:00:00.000Z\"```\n\t */\n\texpires_at: string\n\t/** \n\t * Send this attribute if you want to mark this resource as disabled.\n\t * @example ```true```\n\t */\n\t_disable?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this resource as enabled.\n\t * @example ```true```\n\t */\n\t_enable?: boolean | null\n\n\tmarket: MarketRel\n\tprice_list: PriceListRel\n\n}\n\n\ninterface PriceListSchedulerUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The price list scheduler's internal name.\n\t * @example ```\"FW SALE 2023\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The activation date/time of this price list scheduler.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tstarts_at?: string | null\n\t/** \n\t * The expiration date/time of this price list scheduler (must be after starts_at).\n\t * @example ```\"2018-01-02T12:00:00.000Z\"```\n\t */\n\texpires_at?: string | null\n\t/** \n\t * Send this attribute if you want to mark this resource as disabled.\n\t * @example ```true```\n\t */\n\t_disable?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this resource as enabled.\n\t * @example ```true```\n\t */\n\t_enable?: boolean | null\n\n\tmarket?: MarketRel | null\n\tprice_list?: PriceListRel | null\n\n}\n\n\nclass PriceListSchedulers extends ApiResource<PriceListScheduler> {\n\n\tstatic readonly TYPE: PriceListSchedulerType = 'price_list_schedulers' as const\n\n\tasync create(resource: PriceListSchedulerCreate, params?: QueryParamsRetrieve<PriceListScheduler>, options?: ResourcesConfig): Promise<PriceListScheduler> {\n\t\treturn this.resources.create<PriceListSchedulerCreate, PriceListScheduler>({ ...resource, type: PriceListSchedulers.TYPE }, params, options)\n\t}\n\n\tasync update(resource: PriceListSchedulerUpdate, params?: QueryParamsRetrieve<PriceListScheduler>, options?: ResourcesConfig): Promise<PriceListScheduler> {\n\t\treturn this.resources.update<PriceListSchedulerUpdate, PriceListScheduler>({ ...resource, type: PriceListSchedulers.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: PriceListSchedulers.TYPE } : id, options)\n\t}\n\n\tasync market(priceListSchedulerId: string | PriceListScheduler, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\tconst _priceListSchedulerId = (priceListSchedulerId as PriceListScheduler).id || priceListSchedulerId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `price_list_schedulers/${_priceListSchedulerId}/market`, params, options) as unknown as Market\n\t}\n\n\tasync price_list(priceListSchedulerId: string | PriceListScheduler, params?: QueryParamsRetrieve<PriceList>, options?: ResourcesConfig): Promise<PriceList> {\n\t\tconst _priceListSchedulerId = (priceListSchedulerId as PriceListScheduler).id || priceListSchedulerId as string\n\t\treturn this.resources.fetch<PriceList>({ type: 'price_lists' }, `price_list_schedulers/${_priceListSchedulerId}/price_list`, params, options) as unknown as PriceList\n\t}\n\n\tasync events(priceListSchedulerId: string | PriceListScheduler, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _priceListSchedulerId = (priceListSchedulerId as PriceListScheduler).id || priceListSchedulerId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `price_list_schedulers/${_priceListSchedulerId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync versions(priceListSchedulerId: string | PriceListScheduler, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _priceListSchedulerId = (priceListSchedulerId as PriceListScheduler).id || priceListSchedulerId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `price_list_schedulers/${_priceListSchedulerId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _disable(id: string | PriceListScheduler, params?: QueryParamsRetrieve<PriceListScheduler>, options?: ResourcesConfig): Promise<PriceListScheduler> {\n\t\treturn this.resources.update<PriceListSchedulerUpdate, PriceListScheduler>({ id: (typeof id === 'string')? id: id.id, type: PriceListSchedulers.TYPE, _disable: true }, params, options)\n\t}\n\n\tasync _enable(id: string | PriceListScheduler, params?: QueryParamsRetrieve<PriceListScheduler>, options?: ResourcesConfig): Promise<PriceListScheduler> {\n\t\treturn this.resources.update<PriceListSchedulerUpdate, PriceListScheduler>({ id: (typeof id === 'string')? id: id.id, type: PriceListSchedulers.TYPE, _enable: true }, params, options)\n\t}\n\n\n\tisPriceListScheduler(resource: any): resource is PriceListScheduler {\n\t\treturn resource.type && (resource.type === PriceListSchedulers.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): PriceListSchedulerRel {\n\t\treturn super.relationshipOneToOne<PriceListSchedulerRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): PriceListSchedulerRel[] {\n\t\treturn super.relationshipOneToMany<PriceListSchedulerRel>(...ids)\n\t}\n\n\n\ttype(): PriceListSchedulerType {\n\t\treturn PriceListSchedulers.TYPE\n\t}\n\n}\n\n\nconst instance = new PriceListSchedulers()\nexport default instance\n\nexport type { PriceListScheduler, PriceListSchedulerCreate, PriceListSchedulerUpdate, PriceListSchedulerType }\n"]}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export { gG as PriceListScheduler, gH as PriceListSchedulerCreate, gJ as PriceListSchedulerSort, kQ as PriceListSchedulerType, gI as PriceListSchedulerUpdate, b2 as default } from '../api-
|
1
|
+
export { gG as PriceListScheduler, gH as PriceListSchedulerCreate, gJ as PriceListSchedulerSort, kQ as PriceListSchedulerType, gI as PriceListSchedulerUpdate, b2 as default } from '../api-DmIZO_Np.cjs';
|
2
2
|
import '../client.cjs';
|
3
3
|
import '../interceptor-5MISI1yn.cjs';
|
4
4
|
import '../types.cjs';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export { gG as PriceListScheduler, gH as PriceListSchedulerCreate, gJ as PriceListSchedulerSort, kQ as PriceListSchedulerType, gI as PriceListSchedulerUpdate, b2 as default } from '../api-
|
1
|
+
export { gG as PriceListScheduler, gH as PriceListSchedulerCreate, gJ as PriceListSchedulerSort, kQ as PriceListSchedulerType, gI as PriceListSchedulerUpdate, b2 as default } from '../api-DDgIE2i8.js';
|
2
2
|
import '../client.js';
|
3
3
|
import '../interceptor-5MISI1yn.js';
|
4
4
|
import '../types.js';
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../src/resources/price_list_schedulers.ts"],"names":[],"mappings":";;AAmIA,MAAM,4BAA4B,WAAgC,CAAA;AAAA,EAEjE,OAAgB,IAA+B,GAAA,uBAAA;AAAA,EAE/C,MAAM,MAAA,CAAO,QAAoC,EAAA,MAAA,EAAkD,OAAwD,EAAA;AAC1J,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAqD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,mBAAoB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC5I,EAEA,MAAM,MAAA,CAAO,QAAoC,EAAA,MAAA,EAAkD,OAAwD,EAAA;AAC1J,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAqD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,mBAAoB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC5I,EAEA,MAAM,MAAO,CAAA,EAAA,EAAyB,OAA0C,EAAA;AAC/E,IAAA,MAAM,IAAK,CAAA,SAAA,CAAU,MAAQ,CAAA,OAAO,EAAO,KAAA,QAAA,GAAW,EAAE,EAAA,EAAI,IAAM,EAAA,mBAAA,CAAoB,IAAK,EAAA,GAAI,IAAI,OAAO,CAAA;AAAA;AAC3G,EAEA,MAAM,MAAA,CAAO,oBAAmD,EAAA,MAAA,EAAsC,OAA4C,EAAA;AACjJ,IAAM,MAAA,qBAAA,GAAyB,qBAA4C,EAAM,IAAA,oBAAA;AACjF,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAc,EAAE,I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I,MAAM,mBAAoB,CAAA,IAAA,EAAM,UAAU,IAAK,EAAA,EAAG,QAAQ,OAAO,CAAA;AAAA;AACxL,EAEA,MAAM,OAAA,CAAQ,EAAiC,EAAA,MAAA,EAAkD,OAAwD,EAAA;AACxJ,IAAA,OAAO,KAAK,SAAU,CAAA,MAAA,CAAqD,EAAE,EAAK,EAAA,OAAO,OAAO,QAAW,GAAA,EAAA,GAAI,EAAG,CAAA,EAAA,EAAI,MAAM,mBAAoB,CAAA,IAAA,EAAM,SAAS,IAAK,EAAA,EAAG,QAAQ,OAAO,CAAA;AAAA;AACvL,EAGA,qBAAqB,QAA+C,EAAA;AACnE,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,mBAAoB,CAAA,IAAA;AAAA;AAChE,EAGA,aAAa,EAAuD,EAAA;AACnE,IAAO,OAAA,KAAA,CAAM,qBAA4C,EAAE,CAAA;AAAA;AAC5D,EAEA,sBAAsB,GAAwC,EAAA;AAC7D,IAAO,OAAA,KAAA,CAAM,qBAA6C,CAAA,GAAG,GAAG,CAAA;AAAA;AACjE,EAGA,IAA+B,GAAA;AAC9B,IAAA,OAAO,mBAAoB,CAAA,IAAA;AAAA;AAG7B;AAGA,MAAM,QAAA,GAAW,IAAI,mBAAoB,EAAA;AACzC,IAAO,6BAAQ,GAAA","file":"price_list_schedulers.js","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Market, MarketType } from './markets'\nimport type { PriceList, PriceListType } from './price_lists'\nimport type { Event } from './events'\nimport type { Version } from './versions'\n\n\ntype PriceListSchedulerType = 'price_list_schedulers'\ntype PriceListSchedulerRel = ResourceRel & { type: PriceListSchedulerType }\ntype MarketRel = ResourceRel & { type: MarketType }\ntype PriceListRel = ResourceRel & { type: PriceListType }\n\n\nexport type PriceListSchedulerSort = Pick<PriceListScheduler, 'id' | 'name' | 'starts_at' | 'expires_at' | 'disabled_at'> & ResourceSort\n// export type PriceListSchedulerFilter = Pick<PriceListScheduler, 'id' | 'name' | 'starts_at' | 'expires_at' | 'disabled_at'> & ResourceFilter\n\n\ninterface PriceListScheduler extends Resource {\n\t\n\treadonly type: PriceListSchedulerType\n\n\t/** \n\t * The price list scheduler's internal name.\n\t * @example ```\"FW SALE 2023\"```\n\t */\n\tname: string\n\t/** \n\t * The activation date/time of this price list scheduler.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tstarts_at: string\n\t/** \n\t * The expiration date/time of this price list scheduler (must be after starts_at).\n\t * @example ```\"2018-01-02T12:00:00.000Z\"```\n\t */\n\texpires_at: string\n\t/** \n\t * Indicates if the price list scheduler is active (enabled and not expired).\n\t * @example ```true```\n\t */\n\tactive?: boolean | null\n\t/** \n\t * The price list scheduler status. One of 'disabled', 'expired', 'pending', or 'active'.\n\t * @example ```\"pending\"```\n\t */\n\tstatus?: 'disabled' | 'expired' | 'pending' | 'active' | 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\n\tmarket?: Market | null\n\tprice_list?: PriceList | null\n\tevents?: Event[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface PriceListSchedulerCreate extends ResourceCreate {\n\t\n\t/** \n\t * The price list scheduler's internal name.\n\t * @example ```\"FW SALE 2023\"```\n\t */\n\tname: string\n\t/** \n\t * The activation date/time of this price list scheduler.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tstarts_at: string\n\t/** \n\t * The expiration date/time of this price list scheduler (must be after starts_at).\n\t * @example ```\"2018-01-02T12:00:00.000Z\"```\n\t */\n\texpires_at: string\n\t/** \n\t * Send this attribute if you want to mark this resource as disabled.\n\t * @example ```true```\n\t */\n\t_disable?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this resource as enabled.\n\t * @example ```true```\n\t */\n\t_enable?: boolean | null\n\n\tmarket: MarketRel\n\tprice_list: PriceListRel\n\n}\n\n\ninterface PriceListSchedulerUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The price list scheduler's internal name.\n\t * @example ```\"FW SALE 2023\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The activation date/time of this price list scheduler.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tstarts_at?: string | null\n\t/** \n\t * The expiration date/time of this price list scheduler (must be after starts_at).\n\t * @example ```\"2018-01-02T12:00:00.000Z\"```\n\t */\n\texpires_at?: string | null\n\t/** \n\t * Send this attribute if you want to mark this resource as disabled.\n\t * @example ```true```\n\t */\n\t_disable?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this resource as enabled.\n\t * @example ```true```\n\t */\n\t_enable?: boolean | null\n\n\tmarket?: MarketRel | null\n\tprice_list?: PriceListRel | null\n\n}\n\n\nclass PriceListSchedulers extends ApiResource<PriceListScheduler> {\n\n\tstatic readonly TYPE: PriceListSchedulerType = 'price_list_schedulers' as const\n\n\tasync create(resource: PriceListSchedulerCreate, params?: QueryParamsRetrieve<PriceListScheduler>, options?: ResourcesConfig): Promise<PriceListScheduler> {\n\t\treturn this.resources.create<PriceListSchedulerCreate, PriceListScheduler>({ ...resource, type: PriceListSchedulers.TYPE }, params, options)\n\t}\n\n\tasync update(resource: PriceListSchedulerUpdate, params?: QueryParamsRetrieve<PriceListScheduler>, options?: ResourcesConfig): Promise<PriceListScheduler> {\n\t\treturn this.resources.update<PriceListSchedulerUpdate, PriceListScheduler>({ ...resource, type: PriceListSchedulers.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: PriceListSchedulers.TYPE } : id, options)\n\t}\n\n\tasync market(priceListSchedulerId: string | PriceListScheduler, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\tconst _priceListSchedulerId = (priceListSchedulerId as PriceListScheduler).id || priceListSchedulerId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `price_list_schedulers/${_priceListSchedulerId}/market`, params, options) as unknown as Market\n\t}\n\n\tasync price_list(priceListSchedulerId: string | PriceListScheduler, params?: QueryParamsRetrieve<PriceList>, options?: ResourcesConfig): Promise<PriceList> {\n\t\tconst _priceListSchedulerId = (priceListSchedulerId as PriceListScheduler).id || priceListSchedulerId as string\n\t\treturn this.resources.fetch<PriceList>({ type: 'price_lists' }, `price_list_schedulers/${_priceListSchedulerId}/price_list`, params, options) as unknown as PriceList\n\t}\n\n\tasync events(priceListSchedulerId: string | PriceListScheduler, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _priceListSchedulerId = (priceListSchedulerId as PriceListScheduler).id || priceListSchedulerId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `price_list_schedulers/${_priceListSchedulerId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync versions(priceListSchedulerId: string | PriceListScheduler, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _priceListSchedulerId = (priceListSchedulerId as PriceListScheduler).id || priceListSchedulerId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `price_list_schedulers/${_priceListSchedulerId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _disable(id: string | PriceListScheduler, params?: QueryParamsRetrieve<PriceListScheduler>, options?: ResourcesConfig): Promise<PriceListScheduler> {\n\t\treturn this.resources.update<PriceListSchedulerUpdate, PriceListScheduler>({ id: (typeof id === 'string')? id: id.id, type: PriceListSchedulers.TYPE, _disable: true }, params, options)\n\t}\n\n\tasync _enable(id: string | PriceListScheduler, params?: QueryParamsRetrieve<PriceListScheduler>, options?: ResourcesConfig): Promise<PriceListScheduler> {\n\t\treturn this.resources.update<PriceListSchedulerUpdate, PriceListScheduler>({ id: (typeof id === 'string')? id: id.id, type: PriceListSchedulers.TYPE, _enable: true }, params, options)\n\t}\n\n\n\tisPriceListScheduler(resource: any): resource is PriceListScheduler {\n\t\treturn resource.type && (resource.type === PriceListSchedulers.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): PriceListSchedulerRel {\n\t\treturn super.relationshipOneToOne<PriceListSchedulerRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): PriceListSchedulerRel[] {\n\t\treturn super.relationshipOneToMany<PriceListSchedulerRel>(...ids)\n\t}\n\n\n\ttype(): PriceListSchedulerType {\n\t\treturn PriceListSchedulers.TYPE\n\t}\n\n}\n\n\nconst instance = new PriceListSchedulers()\nexport default instance\n\nexport type { PriceListScheduler, PriceListSchedulerCreate, PriceListSchedulerUpdate, PriceListSchedulerType }\n"]}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../src/resources/price_lists.ts"],"names":["ApiResource"],"mappings":";;;;AAgIA,MAAM,mBAAmBA,oBAAuB,CAAA;AAAA,EAE/C,OAAgB,IAAsB,GAAA,aAAA;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,UAAW,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACjH,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,UAAW,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACjH,EAEA,MAAM,MAAO,CAAA,EAAA,EAAyB,OAA0C,EAAA;AAC/E,IAAA,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AAA,CAAe,EAAE,IAAA,EAAM,UAAW,EAAA,EAAG,CAAe,YAAA,EAAA,YAAY,CAAa,SAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACnH,EAGA,YAAY,QAAsC,EAAA;AACjD,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,UAAW,CAAA,IAAA;AAAA;AACvD,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,UAAW,CAAA,IAAA;AAAA;AAGpB;AAGA,MAAM,QAAA,GAAW,IAAI,UAAW,EAAA;AAChC,IAAO,mBAAQ,GAAA","file":"price_lists.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 { Price } from './prices'\nimport type { PriceListScheduler } from './price_list_schedulers'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype PriceListType = 'price_lists'\ntype PriceListRel = ResourceRel & { type: PriceListType }\n\n\nexport type PriceListSort = Pick<PriceList, 'id' | 'name' | 'code' | 'currency_code' | 'tax_included'> & ResourceSort\n// export type PriceListFilter = Pick<PriceList, 'id' | 'name' | 'code' | 'currency_code' | 'tax_included' | 'rules'> & ResourceFilter\n\n\ninterface PriceList extends Resource {\n\t\n\treadonly type: PriceListType\n\n\t/** \n\t * The price list's internal name.\n\t * @example ```\"EU Price list\"```\n\t */\n\tname: string\n\t/** \n\t * A string that you can use to identify the price list (must be unique within the environment).\n\t * @example ```\"europe1\"```\n\t */\n\tcode?: string | null\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code: string\n\t/** \n\t * Indicates if the associated prices include taxes.\n\t * @example ```true```\n\t */\n\ttax_included?: boolean | null\n\t/** \n\t * The rules (using Rules Engine) to be applied.\n\t * @example ```{}```\n\t */\n\trules?: Record<string, any> | null\n\t/** \n\t * The rule outcomes.\n\t * @example ```{}```\n\t */\n\trule_outcomes?: Record<string, any> | null\n\t/** \n\t * The payload used to evaluate the rules.\n\t * @example ```{}```\n\t */\n\tresource_payload?: Record<string, any> | null\n\n\tprices?: Price[] | null\n\tprice_list_schedulers?: PriceListScheduler[] | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface PriceListCreate extends ResourceCreate {\n\t\n\t/** \n\t * The price list's internal name.\n\t * @example ```\"EU Price list\"```\n\t */\n\tname: string\n\t/** \n\t * A string that you can use to identify the price list (must be unique within the environment).\n\t * @example ```\"europe1\"```\n\t */\n\tcode?: string | null\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code: string\n\t/** \n\t * Indicates if the associated prices include taxes.\n\t * @example ```true```\n\t */\n\ttax_included?: boolean | null\n\t/** \n\t * The rules (using Rules Engine) to be applied.\n\t * @example ```{}```\n\t */\n\trules?: Record<string, any> | null\n\t\n}\n\n\ninterface PriceListUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The price list's internal name.\n\t * @example ```\"EU Price list\"```\n\t */\n\tname?: string | null\n\t/** \n\t * A string that you can use to identify the price list (must be unique within the environment).\n\t * @example ```\"europe1\"```\n\t */\n\tcode?: string | null\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * Indicates if the associated prices include taxes.\n\t * @example ```true```\n\t */\n\ttax_included?: boolean | null\n\t/** \n\t * The rules (using Rules Engine) to be applied.\n\t * @example ```{}```\n\t */\n\trules?: Record<string, any> | null\n\t\n}\n\n\nclass PriceLists extends ApiResource<PriceList> {\n\n\tstatic readonly TYPE: PriceListType = 'price_lists' as const\n\n\tasync create(resource: PriceListCreate, params?: QueryParamsRetrieve<PriceList>, options?: ResourcesConfig): Promise<PriceList> {\n\t\treturn this.resources.create<PriceListCreate, PriceList>({ ...resource, type: PriceLists.TYPE }, params, options)\n\t}\n\n\tasync update(resource: PriceListUpdate, params?: QueryParamsRetrieve<PriceList>, options?: ResourcesConfig): Promise<PriceList> {\n\t\treturn this.resources.update<PriceListUpdate, PriceList>({ ...resource, type: PriceLists.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: PriceLists.TYPE } : id, options)\n\t}\n\n\tasync prices(priceListId: string | PriceList, params?: QueryParamsList<Price>, options?: ResourcesConfig): Promise<ListResponse<Price>> {\n\t\tconst _priceListId = (priceListId as PriceList).id || priceListId as string\n\t\treturn this.resources.fetch<Price>({ type: 'prices' }, `price_lists/${_priceListId}/prices`, params, options) as unknown as ListResponse<Price>\n\t}\n\n\tasync price_list_schedulers(priceListId: string | PriceList, params?: QueryParamsList<PriceListScheduler>, options?: ResourcesConfig): Promise<ListResponse<PriceListScheduler>> {\n\t\tconst _priceListId = (priceListId as PriceList).id || priceListId as string\n\t\treturn this.resources.fetch<PriceListScheduler>({ type: 'price_list_schedulers' }, `price_lists/${_priceListId}/price_list_schedulers`, params, options) as unknown as ListResponse<PriceListScheduler>\n\t}\n\n\tasync attachments(priceListId: string | PriceList, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _priceListId = (priceListId as PriceList).id || priceListId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `price_lists/${_priceListId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(priceListId: string | PriceList, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _priceListId = (priceListId as PriceList).id || priceListId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `price_lists/${_priceListId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisPriceList(resource: any): resource is PriceList {\n\t\treturn resource.type && (resource.type === PriceLists.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): PriceListRel {\n\t\treturn super.relationshipOneToOne<PriceListRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): PriceListRel[] {\n\t\treturn super.relationshipOneToMany<PriceListRel>(...ids)\n\t}\n\n\n\ttype(): PriceListType {\n\t\treturn PriceLists.TYPE\n\t}\n\n}\n\n\nconst instance = new PriceLists()\nexport default instance\n\nexport type { PriceList, PriceListCreate, PriceListUpdate, PriceListType }\n"]}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export { gK as PriceList, gL as PriceListCreate, gN as PriceListSort, kR as PriceListType, gM as PriceListUpdate, b3 as default } from '../api-
|
1
|
+
export { gK as PriceList, gL as PriceListCreate, gN as PriceListSort, kR as PriceListType, gM as PriceListUpdate, b3 as default } from '../api-DmIZO_Np.cjs';
|
2
2
|
import '../client.cjs';
|
3
3
|
import '../interceptor-5MISI1yn.cjs';
|
4
4
|
import '../types.cjs';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export { gK as PriceList, gL as PriceListCreate, gN as PriceListSort, kR as PriceListType, gM as PriceListUpdate, b3 as default } from '../api-
|
1
|
+
export { gK as PriceList, gL as PriceListCreate, gN as PriceListSort, kR as PriceListType, gM as PriceListUpdate, b3 as default } from '../api-DDgIE2i8.js';
|
2
2
|
import '../client.js';
|
3
3
|
import '../interceptor-5MISI1yn.js';
|
4
4
|
import '../types.js';
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../src/resources/price_lists.ts"],"names":[],"mappings":";;AAgIA,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ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Price } from './prices'\nimport type { PriceListScheduler } from './price_list_schedulers'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype PriceListType = 'price_lists'\ntype PriceListRel = ResourceRel & { type: PriceListType }\n\n\nexport type PriceListSort = Pick<PriceList, 'id' | 'name' | 'code' | 'currency_code' | 'tax_included'> & ResourceSort\n// export type PriceListFilter = Pick<PriceList, 'id' | 'name' | 'code' | 'currency_code' | 'tax_included' | 'rules'> & ResourceFilter\n\n\ninterface PriceList extends Resource {\n\t\n\treadonly type: PriceListType\n\n\t/** \n\t * The price list's internal name.\n\t * @example ```\"EU Price list\"```\n\t */\n\tname: string\n\t/** \n\t * A string that you can use to identify the price list (must be unique within the environment).\n\t * @example ```\"europe1\"```\n\t */\n\tcode?: string | null\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code: string\n\t/** \n\t * Indicates if the associated prices include taxes.\n\t * @example ```true```\n\t */\n\ttax_included?: boolean | null\n\t/** \n\t * The rules (using Rules Engine) to be applied.\n\t * @example ```{}```\n\t */\n\trules?: Record<string, any> | null\n\t/** \n\t * The rule outcomes.\n\t * @example ```{}```\n\t */\n\trule_outcomes?: Record<string, any> | null\n\t/** \n\t * The payload used to evaluate the rules.\n\t * @example ```{}```\n\t */\n\tresource_payload?: Record<string, any> | null\n\n\tprices?: Price[] | null\n\tprice_list_schedulers?: PriceListScheduler[] | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface PriceListCreate extends ResourceCreate {\n\t\n\t/** \n\t * The price list's internal name.\n\t * @example ```\"EU Price list\"```\n\t */\n\tname: string\n\t/** \n\t * A string that you can use to identify the price list (must be unique within the environment).\n\t * @example ```\"europe1\"```\n\t */\n\tcode?: string | null\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code: string\n\t/** \n\t * Indicates if the associated prices include taxes.\n\t * @example ```true```\n\t */\n\ttax_included?: boolean | null\n\t/** \n\t * The rules (using Rules Engine) to be applied.\n\t * @example ```{}```\n\t */\n\trules?: Record<string, any> | null\n\t\n}\n\n\ninterface PriceListUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The price list's internal name.\n\t * @example ```\"EU Price list\"```\n\t */\n\tname?: string | null\n\t/** \n\t * A string that you can use to identify the price list (must be unique within the environment).\n\t * @example ```\"europe1\"```\n\t */\n\tcode?: string | null\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * Indicates if the associated prices include taxes.\n\t * @example ```true```\n\t */\n\ttax_included?: boolean | null\n\t/** \n\t * The rules (using Rules Engine) to be applied.\n\t * @example ```{}```\n\t */\n\trules?: Record<string, any> | null\n\t\n}\n\n\nclass PriceLists extends ApiResource<PriceList> {\n\n\tstatic readonly TYPE: PriceListType = 'price_lists' as const\n\n\tasync create(resource: PriceListCreate, params?: QueryParamsRetrieve<PriceList>, options?: ResourcesConfig): Promise<PriceList> {\n\t\treturn this.resources.create<PriceListCreate, PriceList>({ ...resource, type: PriceLists.TYPE }, params, options)\n\t}\n\n\tasync update(resource: PriceListUpdate, params?: QueryParamsRetrieve<PriceList>, options?: ResourcesConfig): Promise<PriceList> {\n\t\treturn this.resources.update<PriceListUpdate, PriceList>({ ...resource, type: PriceLists.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: PriceLists.TYPE } : id, options)\n\t}\n\n\tasync prices(priceListId: string | PriceList, params?: QueryParamsList<Price>, options?: ResourcesConfig): Promise<ListResponse<Price>> {\n\t\tconst _priceListId = (priceListId as PriceList).id || priceListId as string\n\t\treturn this.resources.fetch<Price>({ type: 'prices' }, `price_lists/${_priceListId}/prices`, params, options) as unknown as ListResponse<Price>\n\t}\n\n\tasync price_list_schedulers(priceListId: string | PriceList, params?: QueryParamsList<PriceListScheduler>, options?: ResourcesConfig): Promise<ListResponse<PriceListScheduler>> {\n\t\tconst _priceListId = (priceListId as PriceList).id || priceListId as string\n\t\treturn this.resources.fetch<PriceListScheduler>({ type: 'price_list_schedulers' }, `price_lists/${_priceListId}/price_list_schedulers`, params, options) as unknown as ListResponse<PriceListScheduler>\n\t}\n\n\tasync attachments(priceListId: string | PriceList, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _priceListId = (priceListId as PriceList).id || priceListId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `price_lists/${_priceListId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(priceListId: string | PriceList, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _priceListId = (priceListId as PriceList).id || priceListId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `price_lists/${_priceListId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisPriceList(resource: any): resource is PriceList {\n\t\treturn resource.type && (resource.type === PriceLists.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): PriceListRel {\n\t\treturn super.relationshipOneToOne<PriceListRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): PriceListRel[] {\n\t\treturn super.relationshipOneToMany<PriceListRel>(...ids)\n\t}\n\n\n\ttype(): PriceListType {\n\t\treturn PriceLists.TYPE\n\t}\n\n}\n\n\nconst instance = new PriceLists()\nexport default instance\n\nexport type { PriceList, PriceListCreate, PriceListUpdate, PriceListType }\n"]}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../src/resources/price_tiers.ts"],"names":["Ap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AA;AACpD,IAAO,OAAA,KAAA,CAAM,qBAAoC,CAAA,GAAG,GAAG,CAAA;AAAA;AACxD,EAGA,IAAsB,GAAA;AACrB,IAAA,OAAO,UAAW,CAAA,IAAA;AAAA;AAGpB;AAGA,MAAM,QAAA,GAAW,IAAI,UAAW,EAAA;AAChC,IAAO,mBAAQ,GAAA","file":"price_tiers.cjs","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Price } from './prices'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype PriceTierType = 'price_tiers'\ntype PriceTierRel = ResourceRel & { type: PriceTierType }\n\n\nexport type PriceTierSort = Pick<PriceTier, 'id' | 'name' | 'up_to' | 'price_amount_cents'> & ResourceSort\n// export type PriceTierFilter = Pick<PriceTier, 'id' | 'name' | 'up_to' | 'price_amount_cents'> & ResourceFilter\n\n\ninterface PriceTier extends Resource {\n\t\n\treadonly type: PriceTierType\n\n\t/** \n\t * The price tier's name.\n\t * @example ```\"six pack\"```\n\t */\n\tname: string\n\t/** \n\t * The tier upper limit. When 'null' it means infinity (useful to have an always matching tier).\n\t * @example ```20.5```\n\t */\n\tup_to?: number | null\n\t/** \n\t * The price of this price tier, in cents.\n\t * @example ```1000```\n\t */\n\tprice_amount_cents: number\n\t/** \n\t * The price of this price tier, float.\n\t * @example ```10```\n\t */\n\tprice_amount_float?: number | null\n\t/** \n\t * The price of this price tier, formatted.\n\t * @example ```\"€10,00\"```\n\t */\n\tformatted_price_amount?: string | null\n\n\tprice?: Price | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\nclass PriceTiers extends ApiResource<PriceTier> {\n\n\tstatic readonly TYPE: PriceTierType = 'price_tiers' as const\n\n\tasync price(priceTierId: string | PriceTier, params?: QueryParamsRetrieve<Price>, options?: ResourcesConfig): Promise<Price> {\n\t\tconst _priceTierId = (priceTierId as PriceTier).id || priceTierId as string\n\t\treturn this.resources.fetch<Price>({ type: 'prices' }, `price_tiers/${_priceTierId}/price`, params, options) as unknown as Price\n\t}\n\n\tasync attachments(priceTierId: string | PriceTier, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _priceTierId = (priceTierId as PriceTier).id || priceTierId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `price_tiers/${_priceTierId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(priceTierId: string | PriceTier, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _priceTierId = (priceTierId as PriceTier).id || priceTierId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `price_tiers/${_priceTierId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisPriceTier(resource: any): resource is PriceTier {\n\t\treturn resource.type && (resource.type === PriceTiers.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): PriceTierRel {\n\t\treturn super.relationshipOneToOne<PriceTierRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): PriceTierRel[] {\n\t\treturn super.relationshipOneToMany<PriceTierRel>(...ids)\n\t}\n\n\n\ttype(): PriceTierType {\n\t\treturn PriceTiers.TYPE\n\t}\n\n}\n\n\nconst instance = new PriceTiers()\nexport default instance\n\nexport type { PriceTier, PriceTierType }\n"]}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export { gO as PriceTier, gP as PriceTierSort, kM as PriceTierType, b4 as default } from '../api-
|
1
|
+
export { gO as PriceTier, gP as PriceTierSort, kM as PriceTierType, b4 as default } from '../api-DmIZO_Np.cjs';
|
2
2
|
import '../client.cjs';
|
3
3
|
import '../interceptor-5MISI1yn.cjs';
|
4
4
|
import '../types.cjs';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export { gO as PriceTier, gP as PriceTierSort, kM as PriceTierType, b4 as default } from '../api-
|
1
|
+
export { gO as PriceTier, gP as PriceTierSort, kM as PriceTierType, b4 as default } from '../api-DDgIE2i8.js';
|
2
2
|
import '../client.js';
|
3
3
|
import '../interceptor-5MISI1yn.js';
|
4
4
|
import '../types.js';
|