@commercelayer/sdk 7.0.0-rc.2 → 7.0.0-rc.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/lib/{api-DDgIE2i8.d.ts → api-F1F37Dud.d.ts} +27 -8
- package/lib/{api-DmIZO_Np.d.cts → api-IwWtsAqE.d.cts} +27 -8
- package/lib/api.d.cts +2 -2
- package/lib/api.d.ts +2 -2
- package/lib/bundle.cjs +568 -0
- package/lib/bundle.cjs.map +1 -0
- package/lib/bundle.d.cts +145 -0
- package/lib/bundle.d.ts +145 -0
- package/lib/bundle.js +546 -0
- package/lib/bundle.js.map +1 -0
- package/lib/client.d.cts +1 -1
- package/lib/client.d.ts +1 -1
- package/lib/commercelayer.cjs +2 -1
- package/lib/commercelayer.cjs.map +1 -1
- package/lib/commercelayer.d.cts +5 -6
- package/lib/commercelayer.d.ts +5 -6
- package/lib/commercelayer.js +2 -2
- package/lib/commercelayer.js.map +1 -1
- package/lib/config.d.cts +1 -1
- package/lib/config.d.ts +1 -1
- package/lib/enum.d.cts +2 -2
- package/lib/enum.d.ts +2 -2
- package/lib/error.cjs.map +1 -1
- package/lib/error.js.map +1 -1
- package/lib/fetch.cjs +2 -0
- package/lib/fetch.cjs.map +1 -1
- package/lib/fetch.d.cts +1 -1
- package/lib/fetch.d.ts +1 -1
- package/lib/fetch.js +2 -0
- package/lib/fetch.js.map +1 -1
- package/lib/index.d.cts +2 -2
- package/lib/index.d.ts +2 -2
- package/lib/{interceptor-5MISI1yn.d.cts → interceptor-k15jXzf0.d.cts} +3 -2
- package/lib/{interceptor-5MISI1yn.d.ts → interceptor-k15jXzf0.d.ts} +3 -2
- package/lib/interceptor.d.cts +1 -1
- package/lib/interceptor.d.ts +1 -1
- package/lib/jsonapi.d.cts +2 -2
- package/lib/jsonapi.d.ts +2 -2
- package/lib/model.d.cts +2 -2
- package/lib/model.d.ts +2 -2
- package/lib/query.d.cts +2 -2
- package/lib/query.d.ts +2 -2
- package/lib/resource.cjs +7 -6
- package/lib/resource.cjs.map +1 -1
- package/lib/resource.d.cts +2 -2
- package/lib/resource.d.ts +2 -2
- package/lib/resource.js +7 -6
- package/lib/resource.js.map +1 -1
- package/lib/resources/addresses.cjs.map +1 -1
- package/lib/resources/addresses.d.cts +2 -2
- package/lib/resources/addresses.d.ts +2 -2
- package/lib/resources/addresses.js.map +1 -1
- package/lib/resources/adjustments.cjs.map +1 -1
- package/lib/resources/adjustments.d.cts +2 -2
- package/lib/resources/adjustments.d.ts +2 -2
- package/lib/resources/adjustments.js.map +1 -1
- package/lib/resources/adyen_gateways.cjs.map +1 -1
- package/lib/resources/adyen_gateways.d.cts +2 -2
- package/lib/resources/adyen_gateways.d.ts +2 -2
- package/lib/resources/adyen_gateways.js.map +1 -1
- package/lib/resources/adyen_payments.cjs.map +1 -1
- package/lib/resources/adyen_payments.d.cts +2 -2
- package/lib/resources/adyen_payments.d.ts +2 -2
- package/lib/resources/adyen_payments.js.map +1 -1
- package/lib/resources/applications.cjs.map +1 -1
- package/lib/resources/applications.d.cts +2 -2
- package/lib/resources/applications.d.ts +2 -2
- package/lib/resources/applications.js.map +1 -1
- package/lib/resources/attachments.cjs.map +1 -1
- package/lib/resources/attachments.d.cts +2 -2
- package/lib/resources/attachments.d.ts +2 -2
- package/lib/resources/attachments.js.map +1 -1
- package/lib/resources/authorizations.cjs.map +1 -1
- package/lib/resources/authorizations.d.cts +2 -2
- package/lib/resources/authorizations.d.ts +2 -2
- package/lib/resources/authorizations.js.map +1 -1
- package/lib/resources/avalara_accounts.cjs.map +1 -1
- package/lib/resources/avalara_accounts.d.cts +2 -2
- package/lib/resources/avalara_accounts.d.ts +2 -2
- package/lib/resources/avalara_accounts.js.map +1 -1
- package/lib/resources/axerve_gateways.cjs.map +1 -1
- package/lib/resources/axerve_gateways.d.cts +2 -2
- package/lib/resources/axerve_gateways.d.ts +2 -2
- package/lib/resources/axerve_gateways.js.map +1 -1
- package/lib/resources/axerve_payments.cjs.map +1 -1
- package/lib/resources/axerve_payments.d.cts +2 -2
- package/lib/resources/axerve_payments.d.ts +2 -2
- package/lib/resources/axerve_payments.js.map +1 -1
- package/lib/resources/bing_geocoders.cjs.map +1 -1
- package/lib/resources/bing_geocoders.d.cts +2 -2
- package/lib/resources/bing_geocoders.d.ts +2 -2
- package/lib/resources/bing_geocoders.js.map +1 -1
- package/lib/resources/braintree_gateways.cjs.map +1 -1
- package/lib/resources/braintree_gateways.d.cts +2 -2
- package/lib/resources/braintree_gateways.d.ts +2 -2
- package/lib/resources/braintree_gateways.js.map +1 -1
- package/lib/resources/braintree_payments.cjs.map +1 -1
- package/lib/resources/braintree_payments.d.cts +2 -2
- package/lib/resources/braintree_payments.d.ts +2 -2
- package/lib/resources/braintree_payments.js.map +1 -1
- package/lib/resources/bundles.cjs.map +1 -1
- package/lib/resources/bundles.d.cts +2 -2
- package/lib/resources/bundles.d.ts +2 -2
- package/lib/resources/bundles.js.map +1 -1
- package/lib/resources/buy_x_pay_y_promotions.cjs.map +1 -1
- package/lib/resources/buy_x_pay_y_promotions.d.cts +2 -2
- package/lib/resources/buy_x_pay_y_promotions.d.ts +2 -2
- package/lib/resources/buy_x_pay_y_promotions.js.map +1 -1
- package/lib/resources/captures.cjs.map +1 -1
- package/lib/resources/captures.d.cts +2 -2
- package/lib/resources/captures.d.ts +2 -2
- package/lib/resources/captures.js.map +1 -1
- package/lib/resources/carrier_accounts.cjs.map +1 -1
- package/lib/resources/carrier_accounts.d.cts +2 -2
- package/lib/resources/carrier_accounts.d.ts +2 -2
- package/lib/resources/carrier_accounts.js.map +1 -1
- package/lib/resources/checkout_com_gateways.cjs.map +1 -1
- package/lib/resources/checkout_com_gateways.d.cts +2 -2
- package/lib/resources/checkout_com_gateways.d.ts +2 -2
- package/lib/resources/checkout_com_gateways.js.map +1 -1
- package/lib/resources/checkout_com_payments.cjs.map +1 -1
- package/lib/resources/checkout_com_payments.d.cts +2 -2
- package/lib/resources/checkout_com_payments.d.ts +2 -2
- package/lib/resources/checkout_com_payments.js.map +1 -1
- package/lib/resources/cleanups.cjs.map +1 -1
- package/lib/resources/cleanups.d.cts +2 -2
- package/lib/resources/cleanups.d.ts +2 -2
- package/lib/resources/cleanups.js.map +1 -1
- package/lib/resources/coupon_codes_promotion_rules.cjs.map +1 -1
- package/lib/resources/coupon_codes_promotion_rules.d.cts +2 -2
- package/lib/resources/coupon_codes_promotion_rules.d.ts +2 -2
- package/lib/resources/coupon_codes_promotion_rules.js.map +1 -1
- package/lib/resources/coupon_recipients.cjs.map +1 -1
- package/lib/resources/coupon_recipients.d.cts +2 -2
- package/lib/resources/coupon_recipients.d.ts +2 -2
- package/lib/resources/coupon_recipients.js.map +1 -1
- package/lib/resources/coupons.cjs.map +1 -1
- package/lib/resources/coupons.d.cts +2 -2
- package/lib/resources/coupons.d.ts +2 -2
- package/lib/resources/coupons.js.map +1 -1
- package/lib/resources/custom_promotion_rules.cjs.map +1 -1
- package/lib/resources/custom_promotion_rules.d.cts +2 -2
- package/lib/resources/custom_promotion_rules.d.ts +2 -2
- package/lib/resources/custom_promotion_rules.js.map +1 -1
- package/lib/resources/customer_addresses.cjs.map +1 -1
- package/lib/resources/customer_addresses.d.cts +2 -2
- package/lib/resources/customer_addresses.d.ts +2 -2
- package/lib/resources/customer_addresses.js.map +1 -1
- package/lib/resources/customer_groups.cjs.map +1 -1
- package/lib/resources/customer_groups.d.cts +2 -2
- package/lib/resources/customer_groups.d.ts +2 -2
- package/lib/resources/customer_groups.js.map +1 -1
- package/lib/resources/customer_password_resets.cjs.map +1 -1
- package/lib/resources/customer_password_resets.d.cts +2 -2
- package/lib/resources/customer_password_resets.d.ts +2 -2
- package/lib/resources/customer_password_resets.js.map +1 -1
- package/lib/resources/customer_payment_sources.cjs.map +1 -1
- package/lib/resources/customer_payment_sources.d.cts +2 -2
- package/lib/resources/customer_payment_sources.d.ts +2 -2
- package/lib/resources/customer_payment_sources.js.map +1 -1
- package/lib/resources/customer_subscriptions.cjs.map +1 -1
- package/lib/resources/customer_subscriptions.d.cts +2 -2
- package/lib/resources/customer_subscriptions.d.ts +2 -2
- package/lib/resources/customer_subscriptions.js.map +1 -1
- package/lib/resources/customers.cjs.map +1 -1
- package/lib/resources/customers.d.cts +2 -2
- package/lib/resources/customers.d.ts +2 -2
- package/lib/resources/customers.js.map +1 -1
- package/lib/resources/delivery_lead_times.cjs.map +1 -1
- package/lib/resources/delivery_lead_times.d.cts +2 -2
- package/lib/resources/delivery_lead_times.d.ts +2 -2
- package/lib/resources/delivery_lead_times.js.map +1 -1
- package/lib/resources/discount_engine_items.cjs.map +1 -1
- package/lib/resources/discount_engine_items.d.cts +2 -2
- package/lib/resources/discount_engine_items.d.ts +2 -2
- package/lib/resources/discount_engine_items.js.map +1 -1
- package/lib/resources/discount_engines.cjs.map +1 -1
- package/lib/resources/discount_engines.d.cts +2 -2
- package/lib/resources/discount_engines.d.ts +2 -2
- package/lib/resources/discount_engines.js.map +1 -1
- package/lib/resources/easypost_pickups.cjs.map +1 -1
- package/lib/resources/easypost_pickups.d.cts +2 -2
- package/lib/resources/easypost_pickups.d.ts +2 -2
- package/lib/resources/easypost_pickups.js.map +1 -1
- package/lib/resources/event_callbacks.cjs.map +1 -1
- package/lib/resources/event_callbacks.d.cts +2 -2
- package/lib/resources/event_callbacks.d.ts +2 -2
- package/lib/resources/event_callbacks.js.map +1 -1
- package/lib/resources/events.cjs.map +1 -1
- package/lib/resources/events.d.cts +2 -2
- package/lib/resources/events.d.ts +2 -2
- package/lib/resources/events.js.map +1 -1
- package/lib/resources/exports.cjs.map +1 -1
- package/lib/resources/exports.d.cts +2 -2
- package/lib/resources/exports.d.ts +2 -2
- package/lib/resources/exports.js.map +1 -1
- package/lib/resources/external_gateways.cjs.map +1 -1
- package/lib/resources/external_gateways.d.cts +2 -2
- package/lib/resources/external_gateways.d.ts +2 -2
- package/lib/resources/external_gateways.js.map +1 -1
- package/lib/resources/external_payments.cjs.map +1 -1
- package/lib/resources/external_payments.d.cts +2 -2
- package/lib/resources/external_payments.d.ts +2 -2
- package/lib/resources/external_payments.js.map +1 -1
- package/lib/resources/external_promotions.cjs.map +1 -1
- package/lib/resources/external_promotions.d.cts +2 -2
- package/lib/resources/external_promotions.d.ts +2 -2
- package/lib/resources/external_promotions.js.map +1 -1
- package/lib/resources/external_tax_calculators.cjs.map +1 -1
- package/lib/resources/external_tax_calculators.d.cts +2 -2
- package/lib/resources/external_tax_calculators.d.ts +2 -2
- package/lib/resources/external_tax_calculators.js.map +1 -1
- package/lib/resources/fixed_amount_promotions.cjs.map +1 -1
- package/lib/resources/fixed_amount_promotions.d.cts +2 -2
- package/lib/resources/fixed_amount_promotions.d.ts +2 -2
- package/lib/resources/fixed_amount_promotions.js.map +1 -1
- package/lib/resources/fixed_price_promotions.cjs.map +1 -1
- package/lib/resources/fixed_price_promotions.d.cts +2 -2
- package/lib/resources/fixed_price_promotions.d.ts +2 -2
- package/lib/resources/fixed_price_promotions.js.map +1 -1
- package/lib/resources/flex_promotions.cjs.map +1 -1
- package/lib/resources/flex_promotions.d.cts +2 -2
- package/lib/resources/flex_promotions.d.ts +2 -2
- package/lib/resources/flex_promotions.js.map +1 -1
- package/lib/resources/free_gift_promotions.cjs.map +1 -1
- package/lib/resources/free_gift_promotions.d.cts +2 -2
- package/lib/resources/free_gift_promotions.d.ts +2 -2
- package/lib/resources/free_gift_promotions.js.map +1 -1
- package/lib/resources/free_shipping_promotions.cjs.map +1 -1
- package/lib/resources/free_shipping_promotions.d.cts +2 -2
- package/lib/resources/free_shipping_promotions.d.ts +2 -2
- package/lib/resources/free_shipping_promotions.js.map +1 -1
- package/lib/resources/geocoders.cjs.map +1 -1
- package/lib/resources/geocoders.d.cts +2 -2
- package/lib/resources/geocoders.d.ts +2 -2
- package/lib/resources/geocoders.js.map +1 -1
- package/lib/resources/gift_card_recipients.cjs.map +1 -1
- package/lib/resources/gift_card_recipients.d.cts +2 -2
- package/lib/resources/gift_card_recipients.d.ts +2 -2
- package/lib/resources/gift_card_recipients.js.map +1 -1
- package/lib/resources/gift_cards.cjs.map +1 -1
- package/lib/resources/gift_cards.d.cts +2 -2
- package/lib/resources/gift_cards.d.ts +2 -2
- package/lib/resources/gift_cards.js.map +1 -1
- package/lib/resources/google_geocoders.cjs.map +1 -1
- package/lib/resources/google_geocoders.d.cts +2 -2
- package/lib/resources/google_geocoders.d.ts +2 -2
- package/lib/resources/google_geocoders.js.map +1 -1
- package/lib/resources/imports.cjs.map +1 -1
- package/lib/resources/imports.d.cts +2 -2
- package/lib/resources/imports.d.ts +2 -2
- package/lib/resources/imports.js.map +1 -1
- package/lib/resources/in_stock_subscriptions.cjs.map +1 -1
- package/lib/resources/in_stock_subscriptions.d.cts +2 -2
- package/lib/resources/in_stock_subscriptions.d.ts +2 -2
- package/lib/resources/in_stock_subscriptions.js.map +1 -1
- package/lib/resources/inventory_models.cjs.map +1 -1
- package/lib/resources/inventory_models.d.cts +2 -2
- package/lib/resources/inventory_models.d.ts +2 -2
- package/lib/resources/inventory_models.js.map +1 -1
- package/lib/resources/inventory_return_locations.cjs.map +1 -1
- package/lib/resources/inventory_return_locations.d.cts +2 -2
- package/lib/resources/inventory_return_locations.d.ts +2 -2
- package/lib/resources/inventory_return_locations.js.map +1 -1
- package/lib/resources/inventory_stock_locations.cjs.map +1 -1
- package/lib/resources/inventory_stock_locations.d.cts +2 -2
- package/lib/resources/inventory_stock_locations.d.ts +2 -2
- package/lib/resources/inventory_stock_locations.js.map +1 -1
- package/lib/resources/klarna_gateways.cjs.map +1 -1
- package/lib/resources/klarna_gateways.d.cts +2 -2
- package/lib/resources/klarna_gateways.d.ts +2 -2
- package/lib/resources/klarna_gateways.js.map +1 -1
- package/lib/resources/klarna_payments.cjs.map +1 -1
- package/lib/resources/klarna_payments.d.cts +2 -2
- package/lib/resources/klarna_payments.d.ts +2 -2
- package/lib/resources/klarna_payments.js.map +1 -1
- package/lib/resources/line_item_options.cjs.map +1 -1
- package/lib/resources/line_item_options.d.cts +2 -2
- package/lib/resources/line_item_options.d.ts +2 -2
- package/lib/resources/line_item_options.js.map +1 -1
- package/lib/resources/line_items.cjs.map +1 -1
- package/lib/resources/line_items.d.cts +2 -2
- package/lib/resources/line_items.d.ts +2 -2
- package/lib/resources/line_items.js.map +1 -1
- package/lib/resources/links.cjs.map +1 -1
- package/lib/resources/links.d.cts +2 -2
- package/lib/resources/links.d.ts +2 -2
- package/lib/resources/links.js.map +1 -1
- package/lib/resources/manual_gateways.cjs.map +1 -1
- package/lib/resources/manual_gateways.d.cts +2 -2
- package/lib/resources/manual_gateways.d.ts +2 -2
- package/lib/resources/manual_gateways.js.map +1 -1
- package/lib/resources/manual_tax_calculators.cjs.map +1 -1
- package/lib/resources/manual_tax_calculators.d.cts +2 -2
- package/lib/resources/manual_tax_calculators.d.ts +2 -2
- package/lib/resources/manual_tax_calculators.js.map +1 -1
- package/lib/resources/markets.cjs +4 -0
- package/lib/resources/markets.cjs.map +1 -1
- package/lib/resources/markets.d.cts +2 -2
- package/lib/resources/markets.d.ts +2 -2
- package/lib/resources/markets.js +4 -0
- package/lib/resources/markets.js.map +1 -1
- package/lib/resources/merchants.cjs.map +1 -1
- package/lib/resources/merchants.d.cts +2 -2
- package/lib/resources/merchants.d.ts +2 -2
- package/lib/resources/merchants.js.map +1 -1
- package/lib/resources/notifications.cjs.map +1 -1
- package/lib/resources/notifications.d.cts +2 -2
- package/lib/resources/notifications.d.ts +2 -2
- package/lib/resources/notifications.js.map +1 -1
- package/lib/resources/order_amount_promotion_rules.cjs.map +1 -1
- package/lib/resources/order_amount_promotion_rules.d.cts +2 -2
- package/lib/resources/order_amount_promotion_rules.d.ts +2 -2
- package/lib/resources/order_amount_promotion_rules.js.map +1 -1
- package/lib/resources/order_copies.cjs.map +1 -1
- package/lib/resources/order_copies.d.cts +2 -2
- package/lib/resources/order_copies.d.ts +2 -2
- package/lib/resources/order_copies.js.map +1 -1
- package/lib/resources/order_factories.cjs.map +1 -1
- package/lib/resources/order_factories.d.cts +2 -2
- package/lib/resources/order_factories.d.ts +2 -2
- package/lib/resources/order_factories.js.map +1 -1
- package/lib/resources/order_subscription_items.cjs.map +1 -1
- package/lib/resources/order_subscription_items.d.cts +2 -2
- package/lib/resources/order_subscription_items.d.ts +2 -2
- package/lib/resources/order_subscription_items.js.map +1 -1
- package/lib/resources/order_subscriptions.cjs.map +1 -1
- package/lib/resources/order_subscriptions.d.cts +2 -2
- package/lib/resources/order_subscriptions.d.ts +2 -2
- package/lib/resources/order_subscriptions.js.map +1 -1
- package/lib/resources/orders.cjs +4 -0
- package/lib/resources/orders.cjs.map +1 -1
- package/lib/resources/orders.d.cts +2 -2
- package/lib/resources/orders.d.ts +2 -2
- package/lib/resources/orders.js +4 -0
- package/lib/resources/orders.js.map +1 -1
- package/lib/resources/organizations.cjs.map +1 -1
- package/lib/resources/organizations.d.cts +2 -2
- package/lib/resources/organizations.d.ts +2 -2
- package/lib/resources/organizations.js.map +1 -1
- package/lib/resources/packages.cjs.map +1 -1
- package/lib/resources/packages.d.cts +2 -2
- package/lib/resources/packages.d.ts +2 -2
- package/lib/resources/packages.js.map +1 -1
- package/lib/resources/parcel_line_items.cjs.map +1 -1
- package/lib/resources/parcel_line_items.d.cts +2 -2
- package/lib/resources/parcel_line_items.d.ts +2 -2
- package/lib/resources/parcel_line_items.js.map +1 -1
- package/lib/resources/parcels.cjs.map +1 -1
- package/lib/resources/parcels.d.cts +2 -2
- package/lib/resources/parcels.d.ts +2 -2
- package/lib/resources/parcels.js.map +1 -1
- package/lib/resources/payment_gateways.cjs.map +1 -1
- package/lib/resources/payment_gateways.d.cts +2 -2
- package/lib/resources/payment_gateways.d.ts +2 -2
- package/lib/resources/payment_gateways.js.map +1 -1
- package/lib/resources/payment_methods.cjs.map +1 -1
- package/lib/resources/payment_methods.d.cts +2 -2
- package/lib/resources/payment_methods.d.ts +2 -2
- package/lib/resources/payment_methods.js.map +1 -1
- package/lib/resources/payment_options.cjs.map +1 -1
- package/lib/resources/payment_options.d.cts +2 -2
- package/lib/resources/payment_options.d.ts +2 -2
- package/lib/resources/payment_options.js.map +1 -1
- package/lib/resources/paypal_gateways.cjs.map +1 -1
- package/lib/resources/paypal_gateways.d.cts +2 -2
- package/lib/resources/paypal_gateways.d.ts +2 -2
- package/lib/resources/paypal_gateways.js.map +1 -1
- package/lib/resources/paypal_payments.cjs.map +1 -1
- package/lib/resources/paypal_payments.d.cts +2 -2
- package/lib/resources/paypal_payments.d.ts +2 -2
- package/lib/resources/paypal_payments.js.map +1 -1
- package/lib/resources/percentage_discount_promotions.cjs.map +1 -1
- package/lib/resources/percentage_discount_promotions.d.cts +2 -2
- package/lib/resources/percentage_discount_promotions.d.ts +2 -2
- package/lib/resources/percentage_discount_promotions.js.map +1 -1
- package/lib/resources/pickups.cjs.map +1 -1
- package/lib/resources/pickups.d.cts +2 -2
- package/lib/resources/pickups.d.ts +2 -2
- package/lib/resources/pickups.js.map +1 -1
- package/lib/resources/price_frequency_tiers.cjs.map +1 -1
- package/lib/resources/price_frequency_tiers.d.cts +2 -2
- package/lib/resources/price_frequency_tiers.d.ts +2 -2
- package/lib/resources/price_frequency_tiers.js.map +1 -1
- package/lib/resources/price_list_schedulers.cjs.map +1 -1
- package/lib/resources/price_list_schedulers.d.cts +2 -2
- package/lib/resources/price_list_schedulers.d.ts +2 -2
- package/lib/resources/price_list_schedulers.js.map +1 -1
- package/lib/resources/price_lists.cjs.map +1 -1
- package/lib/resources/price_lists.d.cts +2 -2
- package/lib/resources/price_lists.d.ts +2 -2
- package/lib/resources/price_lists.js.map +1 -1
- package/lib/resources/price_tiers.cjs.map +1 -1
- package/lib/resources/price_tiers.d.cts +2 -2
- package/lib/resources/price_tiers.d.ts +2 -2
- package/lib/resources/price_tiers.js.map +1 -1
- package/lib/resources/price_volume_tiers.cjs.map +1 -1
- package/lib/resources/price_volume_tiers.d.cts +2 -2
- package/lib/resources/price_volume_tiers.d.ts +2 -2
- package/lib/resources/price_volume_tiers.js.map +1 -1
- package/lib/resources/prices.cjs.map +1 -1
- package/lib/resources/prices.d.cts +2 -2
- package/lib/resources/prices.d.ts +2 -2
- package/lib/resources/prices.js.map +1 -1
- package/lib/resources/promotion_rules.cjs.map +1 -1
- package/lib/resources/promotion_rules.d.cts +2 -2
- package/lib/resources/promotion_rules.d.ts +2 -2
- package/lib/resources/promotion_rules.js.map +1 -1
- package/lib/resources/promotions.cjs.map +1 -1
- package/lib/resources/promotions.d.cts +2 -2
- package/lib/resources/promotions.d.ts +2 -2
- package/lib/resources/promotions.js.map +1 -1
- package/lib/resources/recurring_order_copies.cjs.map +1 -1
- package/lib/resources/recurring_order_copies.d.cts +2 -2
- package/lib/resources/recurring_order_copies.d.ts +2 -2
- package/lib/resources/recurring_order_copies.js.map +1 -1
- package/lib/resources/refunds.cjs.map +1 -1
- package/lib/resources/refunds.d.cts +2 -2
- package/lib/resources/refunds.d.ts +2 -2
- package/lib/resources/refunds.js.map +1 -1
- package/lib/resources/reserved_stocks.cjs.map +1 -1
- package/lib/resources/reserved_stocks.d.cts +2 -2
- package/lib/resources/reserved_stocks.d.ts +2 -2
- package/lib/resources/reserved_stocks.js.map +1 -1
- package/lib/resources/resource_errors.cjs.map +1 -1
- package/lib/resources/resource_errors.d.cts +2 -2
- package/lib/resources/resource_errors.d.ts +2 -2
- package/lib/resources/resource_errors.js.map +1 -1
- package/lib/resources/return_line_items.cjs.map +1 -1
- package/lib/resources/return_line_items.d.cts +2 -2
- package/lib/resources/return_line_items.d.ts +2 -2
- package/lib/resources/return_line_items.js.map +1 -1
- package/lib/resources/returns.cjs.map +1 -1
- package/lib/resources/returns.d.cts +2 -2
- package/lib/resources/returns.d.ts +2 -2
- package/lib/resources/returns.js.map +1 -1
- package/lib/resources/satispay_gateways.cjs.map +1 -1
- package/lib/resources/satispay_gateways.d.cts +2 -2
- package/lib/resources/satispay_gateways.d.ts +2 -2
- package/lib/resources/satispay_gateways.js.map +1 -1
- package/lib/resources/satispay_payments.cjs.map +1 -1
- package/lib/resources/satispay_payments.d.cts +2 -2
- package/lib/resources/satispay_payments.d.ts +2 -2
- package/lib/resources/satispay_payments.js.map +1 -1
- package/lib/resources/shipments.cjs.map +1 -1
- package/lib/resources/shipments.d.cts +2 -2
- package/lib/resources/shipments.d.ts +2 -2
- package/lib/resources/shipments.js.map +1 -1
- package/lib/resources/shipping_categories.cjs.map +1 -1
- package/lib/resources/shipping_categories.d.cts +2 -2
- package/lib/resources/shipping_categories.d.ts +2 -2
- package/lib/resources/shipping_categories.js.map +1 -1
- package/lib/resources/shipping_method_tiers.cjs.map +1 -1
- package/lib/resources/shipping_method_tiers.d.cts +2 -2
- package/lib/resources/shipping_method_tiers.d.ts +2 -2
- package/lib/resources/shipping_method_tiers.js.map +1 -1
- package/lib/resources/shipping_methods.cjs.map +1 -1
- package/lib/resources/shipping_methods.d.cts +2 -2
- package/lib/resources/shipping_methods.d.ts +2 -2
- package/lib/resources/shipping_methods.js.map +1 -1
- package/lib/resources/shipping_weight_tiers.cjs.map +1 -1
- package/lib/resources/shipping_weight_tiers.d.cts +2 -2
- package/lib/resources/shipping_weight_tiers.d.ts +2 -2
- package/lib/resources/shipping_weight_tiers.js.map +1 -1
- package/lib/resources/shipping_zones.cjs.map +1 -1
- package/lib/resources/shipping_zones.d.cts +2 -2
- package/lib/resources/shipping_zones.d.ts +2 -2
- package/lib/resources/shipping_zones.js.map +1 -1
- package/lib/resources/sku_list_items.cjs.map +1 -1
- package/lib/resources/sku_list_items.d.cts +2 -2
- package/lib/resources/sku_list_items.d.ts +2 -2
- package/lib/resources/sku_list_items.js.map +1 -1
- package/lib/resources/sku_list_promotion_rules.cjs.map +1 -1
- package/lib/resources/sku_list_promotion_rules.d.cts +2 -2
- package/lib/resources/sku_list_promotion_rules.d.ts +2 -2
- package/lib/resources/sku_list_promotion_rules.js.map +1 -1
- package/lib/resources/sku_lists.cjs.map +1 -1
- package/lib/resources/sku_lists.d.cts +2 -2
- package/lib/resources/sku_lists.d.ts +2 -2
- package/lib/resources/sku_lists.js.map +1 -1
- package/lib/resources/sku_options.cjs.map +1 -1
- package/lib/resources/sku_options.d.cts +2 -2
- package/lib/resources/sku_options.d.ts +2 -2
- package/lib/resources/sku_options.js.map +1 -1
- package/lib/resources/skus.cjs.map +1 -1
- package/lib/resources/skus.d.cts +2 -2
- package/lib/resources/skus.d.ts +2 -2
- package/lib/resources/skus.js.map +1 -1
- package/lib/resources/stock_items.cjs.map +1 -1
- package/lib/resources/stock_items.d.cts +2 -2
- package/lib/resources/stock_items.d.ts +2 -2
- package/lib/resources/stock_items.js.map +1 -1
- package/lib/resources/stock_line_items.cjs.map +1 -1
- package/lib/resources/stock_line_items.d.cts +2 -2
- package/lib/resources/stock_line_items.d.ts +2 -2
- package/lib/resources/stock_line_items.js.map +1 -1
- package/lib/resources/stock_locations.cjs.map +1 -1
- package/lib/resources/stock_locations.d.cts +2 -2
- package/lib/resources/stock_locations.d.ts +2 -2
- package/lib/resources/stock_locations.js.map +1 -1
- package/lib/resources/stock_reservations.cjs.map +1 -1
- package/lib/resources/stock_reservations.d.cts +2 -2
- package/lib/resources/stock_reservations.d.ts +2 -2
- package/lib/resources/stock_reservations.js.map +1 -1
- package/lib/resources/stock_transfers.cjs.map +1 -1
- package/lib/resources/stock_transfers.d.cts +2 -2
- package/lib/resources/stock_transfers.d.ts +2 -2
- package/lib/resources/stock_transfers.js.map +1 -1
- package/lib/resources/stores.cjs.map +1 -1
- package/lib/resources/stores.d.cts +2 -2
- package/lib/resources/stores.d.ts +2 -2
- package/lib/resources/stores.js.map +1 -1
- package/lib/resources/stripe_gateways.cjs.map +1 -1
- package/lib/resources/stripe_gateways.d.cts +2 -2
- package/lib/resources/stripe_gateways.d.ts +2 -2
- package/lib/resources/stripe_gateways.js.map +1 -1
- package/lib/resources/stripe_payments.cjs.map +1 -1
- package/lib/resources/stripe_payments.d.cts +2 -2
- package/lib/resources/stripe_payments.d.ts +2 -2
- package/lib/resources/stripe_payments.js.map +1 -1
- package/lib/resources/stripe_tax_accounts.cjs.map +1 -1
- package/lib/resources/stripe_tax_accounts.d.cts +2 -2
- package/lib/resources/stripe_tax_accounts.d.ts +2 -2
- package/lib/resources/stripe_tax_accounts.js.map +1 -1
- package/lib/resources/subscription_models.cjs.map +1 -1
- package/lib/resources/subscription_models.d.cts +2 -2
- package/lib/resources/subscription_models.d.ts +2 -2
- package/lib/resources/subscription_models.js.map +1 -1
- package/lib/resources/tags.cjs.map +1 -1
- package/lib/resources/tags.d.cts +2 -2
- package/lib/resources/tags.d.ts +2 -2
- package/lib/resources/tags.js.map +1 -1
- package/lib/resources/talon_one_accounts.cjs.map +1 -1
- package/lib/resources/talon_one_accounts.d.cts +2 -2
- package/lib/resources/talon_one_accounts.d.ts +2 -2
- package/lib/resources/talon_one_accounts.js.map +1 -1
- package/lib/resources/tax_calculators.cjs.map +1 -1
- package/lib/resources/tax_calculators.d.cts +2 -2
- package/lib/resources/tax_calculators.d.ts +2 -2
- package/lib/resources/tax_calculators.js.map +1 -1
- package/lib/resources/tax_categories.cjs.map +1 -1
- package/lib/resources/tax_categories.d.cts +2 -2
- package/lib/resources/tax_categories.d.ts +2 -2
- package/lib/resources/tax_categories.js.map +1 -1
- package/lib/resources/tax_rules.cjs.map +1 -1
- package/lib/resources/tax_rules.d.cts +2 -2
- package/lib/resources/tax_rules.d.ts +2 -2
- package/lib/resources/tax_rules.js.map +1 -1
- package/lib/resources/taxjar_accounts.cjs.map +1 -1
- package/lib/resources/taxjar_accounts.d.cts +2 -2
- package/lib/resources/taxjar_accounts.d.ts +2 -2
- package/lib/resources/taxjar_accounts.js.map +1 -1
- package/lib/resources/transactions.cjs.map +1 -1
- package/lib/resources/transactions.d.cts +2 -2
- package/lib/resources/transactions.d.ts +2 -2
- package/lib/resources/transactions.js.map +1 -1
- package/lib/resources/versions.cjs.map +1 -1
- package/lib/resources/versions.d.cts +2 -2
- package/lib/resources/versions.d.ts +2 -2
- package/lib/resources/versions.js.map +1 -1
- package/lib/resources/vertex_accounts.cjs.map +1 -1
- package/lib/resources/vertex_accounts.d.cts +2 -2
- package/lib/resources/vertex_accounts.d.ts +2 -2
- package/lib/resources/vertex_accounts.js.map +1 -1
- package/lib/resources/voids.cjs.map +1 -1
- package/lib/resources/voids.d.cts +2 -2
- package/lib/resources/voids.d.ts +2 -2
- package/lib/resources/voids.js.map +1 -1
- package/lib/resources/webhooks.cjs.map +1 -1
- package/lib/resources/webhooks.d.cts +2 -2
- package/lib/resources/webhooks.d.ts +2 -2
- package/lib/resources/webhooks.js.map +1 -1
- package/lib/resources/wire_transfers.cjs.map +1 -1
- package/lib/resources/wire_transfers.d.cts +2 -2
- package/lib/resources/wire_transfers.d.ts +2 -2
- package/lib/resources/wire_transfers.js.map +1 -1
- package/lib/static.d.cts +2 -2
- package/lib/static.d.ts +2 -2
- package/package.json +15 -4
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/resources/coupons.ts"],"names":[],"mappings":";;AA6IA,MAAM,gBAAgB,WAAoB,CAAA;AAAA,EAEzC,OAAgB,IAAmB,GAAA,SAAA;AAAA,EAEnC,MAAM,MAAA,CAAO,QAAwB,EAAA,MAAA,EAAsC,OAA4C,EAAA;AACtH,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA6B,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,OAAQ,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACxG,EAEA,MAAM,MAAA,CAAO,QAAwB,EAAA,MAAA,EAAsC,OAA4C,EAAA;AACtH,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA6B,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,OAAQ,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACxG,EAEA,MAAM,MAAO,CAAA,EAAA,EAAyB,OAA0C,EAAA;AAC/E,IAAA,MAAM,IAAK,CAAA,SAAA,CAAU,MAAQ,CAAA,OAAO,EAAO,KAAA,QAAA,GAAW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AA;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":"coupons.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 { CouponCodesPromotionRule, CouponCodesPromotionRuleType } from './coupon_codes_promotion_rules'\nimport type { CouponRecipient, CouponRecipientType } from './coupon_recipients'\nimport type { Event } from './events'\nimport type { Tag, TagType } from './tags'\nimport type { Version } from './versions'\n\n\ntype CouponType = 'coupons'\ntype CouponRel = ResourceRel & { type: CouponType }\ntype CouponCodesPromotionRuleRel = ResourceRel & { type: CouponCodesPromotionRuleType }\ntype CouponRecipientRel = ResourceRel & { type: CouponRecipientType }\ntype TagRel = ResourceRel & { type: TagType }\n\n\nexport type CouponSort = Pick<Coupon, 'id' | 'code' | 'customer_single_use' | 'usage_limit' | 'usage_count' | 'expires_at'> & ResourceSort\n// export type CouponFilter = Pick<Coupon, 'id' | 'code' | 'customer_single_use' | 'usage_limit' | 'usage_count' | 'expires_at'> & ResourceFilter\n\n\ninterface Coupon extends Resource {\n\t\n\treadonly type: CouponType\n\n\t/** \n\t * The coupon code, that uniquely identifies the coupon within the promotion rule.\n\t * @example ```\"04371af2-70b3-48d7-8f4e-316b374224c3\"```\n\t */\n\tcode: string\n\t/** \n\t * Indicates if the coupon can be used just once per customer.\n\t */\n\tcustomer_single_use?: boolean | null\n\t/** \n\t * The total number of times this coupon can be used.\n\t * @example ```50```\n\t */\n\tusage_limit?: number | null\n\t/** \n\t * The number of times this coupon has been used.\n\t * @example ```20```\n\t */\n\tusage_count?: number | null\n\t/** \n\t * The email address of the associated recipient. When creating or updating a coupon, this is a shortcut to find or create the associated recipient by email.\n\t * @example ```\"john@example.com\"```\n\t */\n\trecipient_email?: string | null\n\t/** \n\t * Time at which the coupon will expire.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\texpires_at?: string | null\n\n\tpromotion_rule?: CouponCodesPromotionRule | null\n\tcoupon_recipient?: CouponRecipient | null\n\tevents?: Event[] | null\n\ttags?: Tag[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface CouponCreate extends ResourceCreate {\n\t\n\t/** \n\t * The coupon code, that uniquely identifies the coupon within the promotion rule.\n\t * @example ```\"04371af2-70b3-48d7-8f4e-316b374224c3\"```\n\t */\n\tcode: string\n\t/** \n\t * Indicates if the coupon can be used just once per customer.\n\t */\n\tcustomer_single_use?: boolean | null\n\t/** \n\t * The total number of times this coupon can be used.\n\t * @example ```50```\n\t */\n\tusage_limit?: number | null\n\t/** \n\t * The email address of the associated recipient. When creating or updating a coupon, this is a shortcut to find or create the associated recipient by email.\n\t * @example ```\"john@example.com\"```\n\t */\n\trecipient_email?: string | null\n\t/** \n\t * Time at which the coupon will expire.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\texpires_at?: string | null\n\n\tpromotion_rule: CouponCodesPromotionRuleRel\n\tcoupon_recipient?: CouponRecipientRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\ninterface CouponUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The coupon code, that uniquely identifies the coupon within the promotion rule.\n\t * @example ```\"04371af2-70b3-48d7-8f4e-316b374224c3\"```\n\t */\n\tcode?: string | null\n\t/** \n\t * Indicates if the coupon can be used just once per customer.\n\t */\n\tcustomer_single_use?: boolean | null\n\t/** \n\t * The total number of times this coupon can be used.\n\t * @example ```50```\n\t */\n\tusage_limit?: number | null\n\t/** \n\t * The email address of the associated recipient. When creating or updating a coupon, this is a shortcut to find or create the associated recipient by email.\n\t * @example ```\"john@example.com\"```\n\t */\n\trecipient_email?: string | null\n\t/** \n\t * Time at which the coupon will expire.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\texpires_at?: string | null\n\t/** \n\t * Comma separated list of tags to be added. Duplicates, invalid and non existing ones are discarded. Cannot be passed by sales channels.\n\t */\n\t_add_tags?: string | null\n\t/** \n\t * Comma separated list of tags to be removed. Duplicates, invalid and non existing ones are discarded. Cannot be passed by sales channels.\n\t */\n\t_remove_tags?: string | null\n\n\tpromotion_rule?: CouponCodesPromotionRuleRel | null\n\tcoupon_recipient?: CouponRecipientRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\nclass Coupons extends ApiResource<Coupon> {\n\n\tstatic readonly TYPE: CouponType = 'coupons' as const\n\n\tasync create(resource: CouponCreate, params?: QueryParamsRetrieve<Coupon>, options?: ResourcesConfig): Promise<Coupon> {\n\t\treturn this.resources.create<CouponCreate, Coupon>({ ...resource, type: Coupons.TYPE }, params, options)\n\t}\n\n\tasync update(resource: CouponUpdate, params?: QueryParamsRetrieve<Coupon>, options?: ResourcesConfig): Promise<Coupon> {\n\t\treturn this.resources.update<CouponUpdate, Coupon>({ ...resource, type: Coupons.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: Coupons.TYPE } : id, options)\n\t}\n\n\tasync promotion_rule(couponId: string | Coupon, params?: QueryParamsRetrieve<CouponCodesPromotionRule>, options?: ResourcesConfig): Promise<CouponCodesPromotionRule> {\n\t\tconst _couponId = (couponId as Coupon).id || couponId as string\n\t\treturn this.resources.fetch<CouponCodesPromotionRule>({ type: 'coupon_codes_promotion_rules' }, `coupons/${_couponId}/promotion_rule`, params, options) as unknown as CouponCodesPromotionRule\n\t}\n\n\tasync coupon_recipient(couponId: string | Coupon, params?: QueryParamsRetrieve<CouponRecipient>, options?: ResourcesConfig): Promise<CouponRecipient> {\n\t\tconst _couponId = (couponId as Coupon).id || couponId as string\n\t\treturn this.resources.fetch<CouponRecipient>({ type: 'coupon_recipients' }, `coupons/${_couponId}/coupon_recipient`, params, options) as unknown as CouponRecipient\n\t}\n\n\tasync events(couponId: string | Coupon, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _couponId = (couponId as Coupon).id || couponId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `coupons/${_couponId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync tags(couponId: string | Coupon, params?: QueryParamsList<Tag>, options?: ResourcesConfig): Promise<ListResponse<Tag>> {\n\t\tconst _couponId = (couponId as Coupon).id || couponId as string\n\t\treturn this.resources.fetch<Tag>({ type: 'tags' }, `coupons/${_couponId}/tags`, params, options) as unknown as ListResponse<Tag>\n\t}\n\n\tasync versions(couponId: string | Coupon, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _couponId = (couponId as Coupon).id || couponId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `coupons/${_couponId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _add_tags(id: string | Coupon, triggerValue: string, params?: QueryParamsRetrieve<Coupon>, options?: ResourcesConfig): Promise<Coupon> {\n\t\treturn this.resources.update<CouponUpdate, Coupon>({ id: (typeof id === 'string')? id: id.id, type: Coupons.TYPE, _add_tags: triggerValue }, params, options)\n\t}\n\n\tasync _remove_tags(id: string | Coupon, triggerValue: string, params?: QueryParamsRetrieve<Coupon>, options?: ResourcesConfig): Promise<Coupon> {\n\t\treturn this.resources.update<CouponUpdate, Coupon>({ id: (typeof id === 'string')? id: id.id, type: Coupons.TYPE, _remove_tags: triggerValue }, params, options)\n\t}\n\n\n\tisCoupon(resource: any): resource is Coupon {\n\t\treturn resource.type && (resource.type === Coupons.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CouponRel {\n\t\treturn super.relationshipOneToOne<CouponRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CouponRel[] {\n\t\treturn super.relationshipOneToMany<CouponRel>(...ids)\n\t}\n\n\n\ttype(): CouponType {\n\t\treturn Coupons.TYPE\n\t}\n\n}\n\n\nconst instance = new Coupons()\nexport default instance\n\nexport type { Coupon, CouponCreate, CouponUpdate, CouponType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/coupons.ts"],"names":[],"mappings":";;AA6IA,MAAM,gBAAgB,WAAoB,CAAA;AAAA,EAEzC,OAAgB,IAAmB,GAAA,SAAA;AAAA,EAEnC,MAAM,MAAA,CAAO,QAAwB,EAAA,MAAA,EAAsC,OAA4C,EAAA;AACtH,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA6B,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,OAAQ,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACxG,EAEA,MAAM,MAAA,CAAO,QAAwB,EAAA,MAAA,EAAsC,OAA4C,EAAA;AACtH,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA6B,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,OAAQ,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACxG,EAEA,MAAM,MAAO,CAAA,EAAA,EAAyB,OAA0C,EAAA;AAC/E,IAAA,MAAM,IAAK,CAAA,SAAA,CAAU,MAAQ,CAAA,OAAO,EAAO,KAAA,QAAA,GAAW,EAAE,EAAA,EAAI,IAAM,EAAA,OAAA,CAAQ,IAAK,EAAA,GAAI,IAAI,OAAO,CAAA;AAAA;AAC/F,EAEA,MAAM,cAAA,CAAe,QAA2B,EAAA,MAAA,EAAwD,OAA8D,EAAA;AACrK,IAAM,MAAA,SAAA,GAAa,SAAoB,EAAM,IAAA,QAAA;AAC7C,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAgC,EAAE,IAAA,EAAM,8BAA+B,EAAA,EAAG,CAAW,QAAA,EAAA,SAAS,CAAmB,eAAA,CAAA,EAA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C5G,EAEA,MAAM,SAAA,CAAU,EAAqB,EAAA,YAAA,EAAsB,QAAsC,OAA4C,EAAA;AAC5I,IAAA,OAAO,KAAK,SAAU,CAAA,MAAA,CAA6B,EAAE,EAAK,EAAA,OAAO,OAAO,QAAW,GAAA,EAAA,GAAI,EAAG,CAAA,EAAA,EAAI,MAAM,OAAQ,CAAA,IAAA,EAAM,WAAW,YAAa,EAAA,EAAG,QAAQ,OAAO,CAAA;AAAA;AAC7J,EAEA,MAAM,YAAA,CAAa,EAAqB,EAAA,YAAA,EAAsB,QAAsC,OAA4C,EAAA;AAC/I,IAAA,OAAO,KAAK,SAAU,CAAA,MAAA,CAA6B,EAAE,EAAK,EAAA,OAAO,OAAO,QAAW,GAAA,EAAA,GAAI,EAAG,CAAA,EAAA,EAAI,MAAM,OAAQ,CAAA,IAAA,EAAM,cAAc,YAAa,EAAA,EAAG,QAAQ,OAAO,CAAA;AAAA;AAChK,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":"coupons.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 { CouponCodesPromotionRule, CouponCodesPromotionRuleType } from './coupon_codes_promotion_rules'\nimport type { CouponRecipient, CouponRecipientType } from './coupon_recipients'\nimport type { Event } from './events'\nimport type { Tag, TagType } from './tags'\nimport type { Version } from './versions'\n\n\ntype CouponType = 'coupons'\ntype CouponRel = ResourceRel & { type: CouponType }\ntype CouponCodesPromotionRuleRel = ResourceRel & { type: CouponCodesPromotionRuleType }\ntype CouponRecipientRel = ResourceRel & { type: CouponRecipientType }\ntype TagRel = ResourceRel & { type: TagType }\n\n\nexport type CouponSort = Pick<Coupon, 'id' | 'code' | 'customer_single_use' | 'usage_limit' | 'usage_count' | 'expires_at'> & ResourceSort\n// export type CouponFilter = Pick<Coupon, 'id' | 'code' | 'customer_single_use' | 'usage_limit' | 'usage_count' | 'expires_at'> & ResourceFilter\n\n\ninterface Coupon extends Resource {\n\t\n\treadonly type: CouponType\n\n\t/** \n\t * The coupon code, that uniquely identifies the coupon within the promotion rule.\n\t * @example ```\"04371af2-70b3-48d7-8f4e-316b374224c3\"```\n\t */\n\tcode: string\n\t/** \n\t * Indicates if the coupon can be used just once per customer.\n\t */\n\tcustomer_single_use?: boolean | null\n\t/** \n\t * The total number of times this coupon can be used.\n\t * @example ```50```\n\t */\n\tusage_limit?: number | null\n\t/** \n\t * The number of times this coupon has been used.\n\t * @example ```20```\n\t */\n\tusage_count?: number | null\n\t/** \n\t * The email address of the associated recipient. When creating or updating a coupon, this is a shortcut to find or create the associated recipient by email.\n\t * @example ```\"john@example.com\"```\n\t */\n\trecipient_email?: string | null\n\t/** \n\t * Time at which the coupon will expire.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\texpires_at?: string | null\n\n\tpromotion_rule?: CouponCodesPromotionRule | null\n\tcoupon_recipient?: CouponRecipient | null\n\tevents?: Event[] | null\n\ttags?: Tag[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface CouponCreate extends ResourceCreate {\n\t\n\t/** \n\t * The coupon code, that uniquely identifies the coupon within the promotion rule.\n\t * @example ```\"04371af2-70b3-48d7-8f4e-316b374224c3\"```\n\t */\n\tcode: string\n\t/** \n\t * Indicates if the coupon can be used just once per customer.\n\t */\n\tcustomer_single_use?: boolean | null\n\t/** \n\t * The total number of times this coupon can be used.\n\t * @example ```50```\n\t */\n\tusage_limit?: number | null\n\t/** \n\t * The email address of the associated recipient. When creating or updating a coupon, this is a shortcut to find or create the associated recipient by email.\n\t * @example ```\"john@example.com\"```\n\t */\n\trecipient_email?: string | null\n\t/** \n\t * Time at which the coupon will expire.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\texpires_at?: string | null\n\n\tpromotion_rule: CouponCodesPromotionRuleRel\n\tcoupon_recipient?: CouponRecipientRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\ninterface CouponUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The coupon code, that uniquely identifies the coupon within the promotion rule.\n\t * @example ```\"04371af2-70b3-48d7-8f4e-316b374224c3\"```\n\t */\n\tcode?: string | null\n\t/** \n\t * Indicates if the coupon can be used just once per customer.\n\t */\n\tcustomer_single_use?: boolean | null\n\t/** \n\t * The total number of times this coupon can be used.\n\t * @example ```50```\n\t */\n\tusage_limit?: number | null\n\t/** \n\t * The email address of the associated recipient. When creating or updating a coupon, this is a shortcut to find or create the associated recipient by email.\n\t * @example ```\"john@example.com\"```\n\t */\n\trecipient_email?: string | null\n\t/** \n\t * Time at which the coupon will expire.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\texpires_at?: string | null\n\t/** \n\t * Comma separated list of tags to be added. Duplicates, invalid and non existing ones are discarded. Cannot be passed by sales channels.\n\t */\n\t_add_tags?: string | null\n\t/** \n\t * Comma separated list of tags to be removed. Duplicates, invalid and non existing ones are discarded. Cannot be passed by sales channels.\n\t */\n\t_remove_tags?: string | null\n\n\tpromotion_rule?: CouponCodesPromotionRuleRel | null\n\tcoupon_recipient?: CouponRecipientRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\nclass Coupons extends ApiResource<Coupon> {\n\n\tstatic readonly TYPE: CouponType = 'coupons' as const\n\n\tasync create(resource: CouponCreate, params?: QueryParamsRetrieve<Coupon>, options?: ResourcesConfig): Promise<Coupon> {\n\t\treturn this.resources.create<CouponCreate, Coupon>({ ...resource, type: Coupons.TYPE }, params, options)\n\t}\n\n\tasync update(resource: CouponUpdate, params?: QueryParamsRetrieve<Coupon>, options?: ResourcesConfig): Promise<Coupon> {\n\t\treturn this.resources.update<CouponUpdate, Coupon>({ ...resource, type: Coupons.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: Coupons.TYPE } : id, options)\n\t}\n\n\tasync promotion_rule(couponId: string | Coupon, params?: QueryParamsRetrieve<CouponCodesPromotionRule>, options?: ResourcesConfig): Promise<CouponCodesPromotionRule> {\n\t\tconst _couponId = (couponId as Coupon).id || couponId as string\n\t\treturn this.resources.fetch<CouponCodesPromotionRule>({ type: 'coupon_codes_promotion_rules' }, `coupons/${_couponId}/promotion_rule`, params, options) as unknown as CouponCodesPromotionRule\n\t}\n\n\tasync coupon_recipient(couponId: string | Coupon, params?: QueryParamsRetrieve<CouponRecipient>, options?: ResourcesConfig): Promise<CouponRecipient> {\n\t\tconst _couponId = (couponId as Coupon).id || couponId as string\n\t\treturn this.resources.fetch<CouponRecipient>({ type: 'coupon_recipients' }, `coupons/${_couponId}/coupon_recipient`, params, options) as unknown as CouponRecipient\n\t}\n\n\tasync events(couponId: string | Coupon, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _couponId = (couponId as Coupon).id || couponId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `coupons/${_couponId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync tags(couponId: string | Coupon, params?: QueryParamsList<Tag>, options?: ResourcesConfig): Promise<ListResponse<Tag>> {\n\t\tconst _couponId = (couponId as Coupon).id || couponId as string\n\t\treturn this.resources.fetch<Tag>({ type: 'tags' }, `coupons/${_couponId}/tags`, params, options) as unknown as ListResponse<Tag>\n\t}\n\n\tasync versions(couponId: string | Coupon, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _couponId = (couponId as Coupon).id || couponId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `coupons/${_couponId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _add_tags(id: string | Coupon, triggerValue: string, params?: QueryParamsRetrieve<Coupon>, options?: ResourcesConfig): Promise<Coupon> {\n\t\treturn this.resources.update<CouponUpdate, Coupon>({ id: (typeof id === 'string')? id: id.id, type: Coupons.TYPE, _add_tags: triggerValue }, params, options)\n\t}\n\n\tasync _remove_tags(id: string | Coupon, triggerValue: string, params?: QueryParamsRetrieve<Coupon>, options?: ResourcesConfig): Promise<Coupon> {\n\t\treturn this.resources.update<CouponUpdate, Coupon>({ id: (typeof id === 'string')? id: id.id, type: Coupons.TYPE, _remove_tags: triggerValue }, params, options)\n\t}\n\n\n\tisCoupon(resource: any): resource is Coupon {\n\t\treturn resource.type && (resource.type === Coupons.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CouponRel {\n\t\treturn super.relationshipOneToOne<CouponRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CouponRel[] {\n\t\treturn super.relationshipOneToMany<CouponRel>(...ids)\n\t}\n\n\n\ttype(): CouponType {\n\t\treturn Coupons.TYPE\n\t}\n\n}\n\n\nconst instance = new Coupons()\nexport default instance\n\nexport type { Coupons, Coupon, CouponCreate, CouponUpdate, CouponType }\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/resources/custom_promotion_rules.ts"],"names":["ApiResource"],"mappings":";;;;AAyEA,MAAM,6BAA6BA,oBAAiC,CAAA;AAAA,EAEnE,OAAgB,IAAgC,GAAA,wBAAA;AAAA,EAEhD,MAAM,MAAA,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OAAA,KAAA,CAAM,qBAA8C,CAAA,GAAG,GAAG,CAAA;AAAA;AAClE,EAGA,IAAgC,GAAA;AAC/B,IAAA,OAAO,oBAAqB,CAAA,IAAA;AAAA;AAG9B;AAGA,MAAM,QAAA,GAAW,IAAI,oBAAqB,EAAA;AAC1C,IAAO,8BAAQ,GAAA","file":"custom_promotion_rules.cjs","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Version } from './versions'\nimport type { PercentageDiscountPromotion, PercentageDiscountPromotionType } from './percentage_discount_promotions'\nimport type { FreeShippingPromotion, FreeShippingPromotionType } from './free_shipping_promotions'\nimport type { BuyXPayYPromotion, BuyXPayYPromotionType } from './buy_x_pay_y_promotions'\nimport type { FreeGiftPromotion, FreeGiftPromotionType } from './free_gift_promotions'\nimport type { FixedPricePromotion, FixedPricePromotionType } from './fixed_price_promotions'\nimport type { ExternalPromotion, ExternalPromotionType } from './external_promotions'\nimport type { FixedAmountPromotion, FixedAmountPromotionType } from './fixed_amount_promotions'\nimport type { FlexPromotion, FlexPromotionType } from './flex_promotions'\n\n\ntype CustomPromotionRuleType = 'custom_promotion_rules'\ntype CustomPromotionRuleRel = ResourceRel & { type: CustomPromotionRuleType }\ntype PercentageDiscountPromotionRel = ResourceRel & { type: PercentageDiscountPromotionType }\ntype FreeShippingPromotionRel = ResourceRel & { type: FreeShippingPromotionType }\ntype BuyXPayYPromotionRel = ResourceRel & { type: BuyXPayYPromotionType }\ntype FreeGiftPromotionRel = ResourceRel & { type: FreeGiftPromotionType }\ntype FixedPricePromotionRel = ResourceRel & { type: FixedPricePromotionType }\ntype ExternalPromotionRel = ResourceRel & { type: ExternalPromotionType }\ntype FixedAmountPromotionRel = ResourceRel & { type: FixedAmountPromotionType }\ntype FlexPromotionRel = ResourceRel & { type: FlexPromotionType }\n\n\nexport type CustomPromotionRuleSort = Pick<CustomPromotionRule, 'id'> & ResourceSort\n// export type CustomPromotionRuleFilter = Pick<CustomPromotionRule, 'id'> & ResourceFilter\n\n\ninterface CustomPromotionRule extends Resource {\n\t\n\treadonly type: CustomPromotionRuleType\n\n\t/** \n\t * The filters used to trigger promotion on the matching order and its relationships attributes.\n\t * @example ```{\"status_eq\":\"pending\",\"line_items_sku_code_eq\":\"AAA\"}```\n\t */\n\tfilters?: Record<string, any> | null\n\n\tpromotion?: PercentageDiscountPromotion | FreeShippingPromotion | BuyXPayYPromotion | FreeGiftPromotion | FixedPricePromotion | ExternalPromotion | FixedAmountPromotion | FlexPromotion | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface CustomPromotionRuleCreate extends ResourceCreate {\n\t\n\t/** \n\t * The filters used to trigger promotion on the matching order and its relationships attributes.\n\t * @example ```{\"status_eq\":\"pending\",\"line_items_sku_code_eq\":\"AAA\"}```\n\t */\n\tfilters?: Record<string, any> | null\n\n\tpromotion: PercentageDiscountPromotionRel | FreeShippingPromotionRel | BuyXPayYPromotionRel | FreeGiftPromotionRel | FixedPricePromotionRel | ExternalPromotionRel | FixedAmountPromotionRel | FlexPromotionRel\n\n}\n\n\ninterface CustomPromotionRuleUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The filters used to trigger promotion on the matching order and its relationships attributes.\n\t * @example ```{\"status_eq\":\"pending\",\"line_items_sku_code_eq\":\"AAA\"}```\n\t */\n\tfilters?: Record<string, any> | null\n\n\tpromotion?: PercentageDiscountPromotionRel | FreeShippingPromotionRel | BuyXPayYPromotionRel | FreeGiftPromotionRel | FixedPricePromotionRel | ExternalPromotionRel | FixedAmountPromotionRel | FlexPromotionRel | null\n\n}\n\n\nclass CustomPromotionRules extends ApiResource<CustomPromotionRule> {\n\n\tstatic readonly TYPE: CustomPromotionRuleType = 'custom_promotion_rules' as const\n\n\tasync create(resource: CustomPromotionRuleCreate, params?: QueryParamsRetrieve<CustomPromotionRule>, options?: ResourcesConfig): Promise<CustomPromotionRule> {\n\t\treturn this.resources.create<CustomPromotionRuleCreate, CustomPromotionRule>({ ...resource, type: CustomPromotionRules.TYPE }, params, options)\n\t}\n\n\tasync update(resource: CustomPromotionRuleUpdate, params?: QueryParamsRetrieve<CustomPromotionRule>, options?: ResourcesConfig): Promise<CustomPromotionRule> {\n\t\treturn this.resources.update<CustomPromotionRuleUpdate, CustomPromotionRule>({ ...resource, type: CustomPromotionRules.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: CustomPromotionRules.TYPE } : id, options)\n\t}\n\n\tasync versions(customPromotionRuleId: string | CustomPromotionRule, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _customPromotionRuleId = (customPromotionRuleId as CustomPromotionRule).id || customPromotionRuleId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `custom_promotion_rules/${_customPromotionRuleId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisCustomPromotionRule(resource: any): resource is CustomPromotionRule {\n\t\treturn resource.type && (resource.type === CustomPromotionRules.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CustomPromotionRuleRel {\n\t\treturn super.relationshipOneToOne<CustomPromotionRuleRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CustomPromotionRuleRel[] {\n\t\treturn super.relationshipOneToMany<CustomPromotionRuleRel>(...ids)\n\t}\n\n\n\ttype(): CustomPromotionRuleType {\n\t\treturn CustomPromotionRules.TYPE\n\t}\n\n}\n\n\nconst instance = new CustomPromotionRules()\nexport default instance\n\nexport type { CustomPromotionRule, CustomPromotionRuleCreate, CustomPromotionRuleUpdate, CustomPromotionRuleType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/custom_promotion_rules.ts"],"names":["ApiResource"],"mappings":";;;;AAyEA,MAA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OAAA,KAAA,CAAM,qBAA6C,EAAE,CAAA;AAAA;AAC7D,EAEA,sBAAsB,GAAyC,EAAA;AAC9D,IAAO,OAAA,KAAA,CAAM,qBAA8C,CAAA,GAAG,GAAG,CAAA;AAAA;AAClE,EAGA,IAAgC,GAAA;AAC/B,IAAA,OAAO,oBAAqB,CAAA,IAAA;AAAA;AAG9B;AAGA,MAAM,QAAA,GAAW,IAAI,oBAAqB,EAAA;AAC1C,IAAO,8BAAQ,GAAA","file":"custom_promotion_rules.cjs","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Version } from './versions'\nimport type { PercentageDiscountPromotion, PercentageDiscountPromotionType } from './percentage_discount_promotions'\nimport type { FreeShippingPromotion, FreeShippingPromotionType } from './free_shipping_promotions'\nimport type { BuyXPayYPromotion, BuyXPayYPromotionType } from './buy_x_pay_y_promotions'\nimport type { FreeGiftPromotion, FreeGiftPromotionType } from './free_gift_promotions'\nimport type { FixedPricePromotion, FixedPricePromotionType } from './fixed_price_promotions'\nimport type { ExternalPromotion, ExternalPromotionType } from './external_promotions'\nimport type { FixedAmountPromotion, FixedAmountPromotionType } from './fixed_amount_promotions'\nimport type { FlexPromotion, FlexPromotionType } from './flex_promotions'\n\n\ntype CustomPromotionRuleType = 'custom_promotion_rules'\ntype CustomPromotionRuleRel = ResourceRel & { type: CustomPromotionRuleType }\ntype PercentageDiscountPromotionRel = ResourceRel & { type: PercentageDiscountPromotionType }\ntype FreeShippingPromotionRel = ResourceRel & { type: FreeShippingPromotionType }\ntype BuyXPayYPromotionRel = ResourceRel & { type: BuyXPayYPromotionType }\ntype FreeGiftPromotionRel = ResourceRel & { type: FreeGiftPromotionType }\ntype FixedPricePromotionRel = ResourceRel & { type: FixedPricePromotionType }\ntype ExternalPromotionRel = ResourceRel & { type: ExternalPromotionType }\ntype FixedAmountPromotionRel = ResourceRel & { type: FixedAmountPromotionType }\ntype FlexPromotionRel = ResourceRel & { type: FlexPromotionType }\n\n\nexport type CustomPromotionRuleSort = Pick<CustomPromotionRule, 'id'> & ResourceSort\n// export type CustomPromotionRuleFilter = Pick<CustomPromotionRule, 'id'> & ResourceFilter\n\n\ninterface CustomPromotionRule extends Resource {\n\t\n\treadonly type: CustomPromotionRuleType\n\n\t/** \n\t * The filters used to trigger promotion on the matching order and its relationships attributes.\n\t * @example ```{\"status_eq\":\"pending\",\"line_items_sku_code_eq\":\"AAA\"}```\n\t */\n\tfilters?: Record<string, any> | null\n\n\tpromotion?: PercentageDiscountPromotion | FreeShippingPromotion | BuyXPayYPromotion | FreeGiftPromotion | FixedPricePromotion | ExternalPromotion | FixedAmountPromotion | FlexPromotion | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface CustomPromotionRuleCreate extends ResourceCreate {\n\t\n\t/** \n\t * The filters used to trigger promotion on the matching order and its relationships attributes.\n\t * @example ```{\"status_eq\":\"pending\",\"line_items_sku_code_eq\":\"AAA\"}```\n\t */\n\tfilters?: Record<string, any> | null\n\n\tpromotion: PercentageDiscountPromotionRel | FreeShippingPromotionRel | BuyXPayYPromotionRel | FreeGiftPromotionRel | FixedPricePromotionRel | ExternalPromotionRel | FixedAmountPromotionRel | FlexPromotionRel\n\n}\n\n\ninterface CustomPromotionRuleUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The filters used to trigger promotion on the matching order and its relationships attributes.\n\t * @example ```{\"status_eq\":\"pending\",\"line_items_sku_code_eq\":\"AAA\"}```\n\t */\n\tfilters?: Record<string, any> | null\n\n\tpromotion?: PercentageDiscountPromotionRel | FreeShippingPromotionRel | BuyXPayYPromotionRel | FreeGiftPromotionRel | FixedPricePromotionRel | ExternalPromotionRel | FixedAmountPromotionRel | FlexPromotionRel | null\n\n}\n\n\nclass CustomPromotionRules extends ApiResource<CustomPromotionRule> {\n\n\tstatic readonly TYPE: CustomPromotionRuleType = 'custom_promotion_rules' as const\n\n\tasync create(resource: CustomPromotionRuleCreate, params?: QueryParamsRetrieve<CustomPromotionRule>, options?: ResourcesConfig): Promise<CustomPromotionRule> {\n\t\treturn this.resources.create<CustomPromotionRuleCreate, CustomPromotionRule>({ ...resource, type: CustomPromotionRules.TYPE }, params, options)\n\t}\n\n\tasync update(resource: CustomPromotionRuleUpdate, params?: QueryParamsRetrieve<CustomPromotionRule>, options?: ResourcesConfig): Promise<CustomPromotionRule> {\n\t\treturn this.resources.update<CustomPromotionRuleUpdate, CustomPromotionRule>({ ...resource, type: CustomPromotionRules.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: CustomPromotionRules.TYPE } : id, options)\n\t}\n\n\tasync versions(customPromotionRuleId: string | CustomPromotionRule, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _customPromotionRuleId = (customPromotionRuleId as CustomPromotionRule).id || customPromotionRuleId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `custom_promotion_rules/${_customPromotionRuleId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisCustomPromotionRule(resource: any): resource is CustomPromotionRule {\n\t\treturn resource.type && (resource.type === CustomPromotionRules.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CustomPromotionRuleRel {\n\t\treturn super.relationshipOneToOne<CustomPromotionRuleRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CustomPromotionRuleRel[] {\n\t\treturn super.relationshipOneToMany<CustomPromotionRuleRel>(...ids)\n\t}\n\n\n\ttype(): CustomPromotionRuleType {\n\t\treturn CustomPromotionRules.TYPE\n\t}\n\n}\n\n\nconst instance = new CustomPromotionRules()\nexport default instance\n\nexport type { CustomPromotionRules, CustomPromotionRule, CustomPromotionRuleCreate, CustomPromotionRuleUpdate, CustomPromotionRuleType }\n"]}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { fe as CustomPromotionRule, ff as CustomPromotionRuleCreate, fh as CustomPromotionRuleSort, mn as CustomPromotionRuleType, fg as CustomPromotionRuleUpdate, au as CustomPromotionRules, at as default } from '../api-IwWtsAqE.cjs';
|
2
2
|
import '../client.cjs';
|
3
|
-
import '../interceptor-
|
3
|
+
import '../interceptor-k15jXzf0.cjs';
|
4
4
|
import '../types.cjs';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { fe as CustomPromotionRule, ff as CustomPromotionRuleCreate, fh as CustomPromotionRuleSort, mn as CustomPromotionRuleType, fg as CustomPromotionRuleUpdate, au as CustomPromotionRules, at as default } from '../api-F1F37Dud.js';
|
2
2
|
import '../client.js';
|
3
|
-
import '../interceptor-
|
3
|
+
import '../interceptor-k15jXzf0.js';
|
4
4
|
import '../types.js';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/resources/custom_promotion_rules.ts"],"names":[],"mappings":";;AAyEA,MAAM,6BAA6B,WAAiC,CAAA;AAAA,EAEnE,OAAgB,IAAgC,GAAA,wBAAA;AAAA,EAEhD,MAAM,MAAA,CAAO,QAAqC,EAAA,MAAA,EAAmD,OAAyD,EAAA;AAC7J,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAuD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,oBAAqB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC/I,EAEA,MAAM,MAAA,CAAO,QAAqC,EAAA,MAAA,EAAmD,OAAyD,EAAA;AAC7J,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAuD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,oBAAqB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC/I,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,oBAAA,CAAqB,IAAK,EAAA,GAAI,IAAI,OAAO,CAAA;AAAA;AAC5G,EAEA,MAAM,QAAA,CAAS,qBAAqD,EAAA,MAAA,EAAmC,OAA2D,EAAA;AACjK,IAAM,MAAA,sBAAA,GAA0B,sBAA8C,EAAM,IAAA,qBAAA;AACpF,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAe,EAAE,IAAA,EAAM,UAAW,EAAA,EAAG,CAA0B,uBAAA,EAAA,sBAAsB,CAAa,SAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACxI,EAGA,sBAAsB,QAAgD,EAAA;AACrE,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,oBAAqB,CAAA,IAAA;AAAA;AACjE,EAGA,aAAa,EAAwD,EAAA;AACpE,IAAO,OAAA,KAAA,CAAM,qBAA6C,EAAE,CAAA;AAAA;AAC7D,EAEA,sBAAsB,GAAyC,EAAA;AAC9D,IAAO,OAAA,KAAA,CAAM,qBAA8C,CAAA,GAAG,GAAG,CAAA;AAAA;AAClE,EAGA,IAAgC,GAAA;AAC/B,IAAA,OAAO,oBAAqB,CAAA,IAAA;AAAA;AAG9B;AAGA,MAAM,QAAA,GAAW,IAAI,oBAAqB,EAAA;AAC1C,IAAO,8BAAQ,GAAA","file":"custom_promotion_rules.js","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Version } from './versions'\nimport type { PercentageDiscountPromotion, PercentageDiscountPromotionType } from './percentage_discount_promotions'\nimport type { FreeShippingPromotion, FreeShippingPromotionType } from './free_shipping_promotions'\nimport type { BuyXPayYPromotion, BuyXPayYPromotionType } from './buy_x_pay_y_promotions'\nimport type { FreeGiftPromotion, FreeGiftPromotionType } from './free_gift_promotions'\nimport type { FixedPricePromotion, FixedPricePromotionType } from './fixed_price_promotions'\nimport type { ExternalPromotion, ExternalPromotionType } from './external_promotions'\nimport type { FixedAmountPromotion, FixedAmountPromotionType } from './fixed_amount_promotions'\nimport type { FlexPromotion, FlexPromotionType } from './flex_promotions'\n\n\ntype CustomPromotionRuleType = 'custom_promotion_rules'\ntype CustomPromotionRuleRel = ResourceRel & { type: CustomPromotionRuleType }\ntype PercentageDiscountPromotionRel = ResourceRel & { type: PercentageDiscountPromotionType }\ntype FreeShippingPromotionRel = ResourceRel & { type: FreeShippingPromotionType }\ntype BuyXPayYPromotionRel = ResourceRel & { type: BuyXPayYPromotionType }\ntype FreeGiftPromotionRel = ResourceRel & { type: FreeGiftPromotionType }\ntype FixedPricePromotionRel = ResourceRel & { type: FixedPricePromotionType }\ntype ExternalPromotionRel = ResourceRel & { type: ExternalPromotionType }\ntype FixedAmountPromotionRel = ResourceRel & { type: FixedAmountPromotionType }\ntype FlexPromotionRel = ResourceRel & { type: FlexPromotionType }\n\n\nexport type CustomPromotionRuleSort = Pick<CustomPromotionRule, 'id'> & ResourceSort\n// export type CustomPromotionRuleFilter = Pick<CustomPromotionRule, 'id'> & ResourceFilter\n\n\ninterface CustomPromotionRule extends Resource {\n\t\n\treadonly type: CustomPromotionRuleType\n\n\t/** \n\t * The filters used to trigger promotion on the matching order and its relationships attributes.\n\t * @example ```{\"status_eq\":\"pending\",\"line_items_sku_code_eq\":\"AAA\"}```\n\t */\n\tfilters?: Record<string, any> | null\n\n\tpromotion?: PercentageDiscountPromotion | FreeShippingPromotion | BuyXPayYPromotion | FreeGiftPromotion | FixedPricePromotion | ExternalPromotion | FixedAmountPromotion | FlexPromotion | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface CustomPromotionRuleCreate extends ResourceCreate {\n\t\n\t/** \n\t * The filters used to trigger promotion on the matching order and its relationships attributes.\n\t * @example ```{\"status_eq\":\"pending\",\"line_items_sku_code_eq\":\"AAA\"}```\n\t */\n\tfilters?: Record<string, any> | null\n\n\tpromotion: PercentageDiscountPromotionRel | FreeShippingPromotionRel | BuyXPayYPromotionRel | FreeGiftPromotionRel | FixedPricePromotionRel | ExternalPromotionRel | FixedAmountPromotionRel | FlexPromotionRel\n\n}\n\n\ninterface CustomPromotionRuleUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The filters used to trigger promotion on the matching order and its relationships attributes.\n\t * @example ```{\"status_eq\":\"pending\",\"line_items_sku_code_eq\":\"AAA\"}```\n\t */\n\tfilters?: Record<string, any> | null\n\n\tpromotion?: PercentageDiscountPromotionRel | FreeShippingPromotionRel | BuyXPayYPromotionRel | FreeGiftPromotionRel | FixedPricePromotionRel | ExternalPromotionRel | FixedAmountPromotionRel | FlexPromotionRel | null\n\n}\n\n\nclass CustomPromotionRules extends ApiResource<CustomPromotionRule> {\n\n\tstatic readonly TYPE: CustomPromotionRuleType = 'custom_promotion_rules' as const\n\n\tasync create(resource: CustomPromotionRuleCreate, params?: QueryParamsRetrieve<CustomPromotionRule>, options?: ResourcesConfig): Promise<CustomPromotionRule> {\n\t\treturn this.resources.create<CustomPromotionRuleCreate, CustomPromotionRule>({ ...resource, type: CustomPromotionRules.TYPE }, params, options)\n\t}\n\n\tasync update(resource: CustomPromotionRuleUpdate, params?: QueryParamsRetrieve<CustomPromotionRule>, options?: ResourcesConfig): Promise<CustomPromotionRule> {\n\t\treturn this.resources.update<CustomPromotionRuleUpdate, CustomPromotionRule>({ ...resource, type: CustomPromotionRules.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: CustomPromotionRules.TYPE } : id, options)\n\t}\n\n\tasync versions(customPromotionRuleId: string | CustomPromotionRule, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _customPromotionRuleId = (customPromotionRuleId as CustomPromotionRule).id || customPromotionRuleId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `custom_promotion_rules/${_customPromotionRuleId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisCustomPromotionRule(resource: any): resource is CustomPromotionRule {\n\t\treturn resource.type && (resource.type === CustomPromotionRules.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CustomPromotionRuleRel {\n\t\treturn super.relationshipOneToOne<CustomPromotionRuleRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CustomPromotionRuleRel[] {\n\t\treturn super.relationshipOneToMany<CustomPromotionRuleRel>(...ids)\n\t}\n\n\n\ttype(): CustomPromotionRuleType {\n\t\treturn CustomPromotionRules.TYPE\n\t}\n\n}\n\n\nconst instance = new CustomPromotionRules()\nexport default instance\n\nexport type { CustomPromotionRule, CustomPromotionRuleCreate, CustomPromotionRuleUpdate, CustomPromotionRuleType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/custom_promotion_rules.ts"],"names":[],"mappings":";;AAyEA,MAAM,6BAA6B,WAAiC,CAAA;AAAA,EAEnE,OAAgB,IAAgC,GAAA,wBAAA;AAAA,EAEhD,MAAM,MAAA,CAAO,QAAqC,EAAA,MAAA,EAAmD,OAAyD,EAAA;AAC7J,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAuD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,oBAAqB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC/I,EAEA,MAAM,MAAA,CAAO,QAAqC,EAAA,MAAA,EAAmD,OAAyD,EAAA;AAC7J,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAuD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,oBAAqB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC/I,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,oBAAA,CAAqB,IAAK,EAAA,GAAI,IAAI,OAAO,CAAA;AAAA;AAC5G,EAEA,MAAM,QAAA,CAAS,qBAAqD,EAAA,MAAA,EAAmC,OAA2D,EAAA;AACjK,IAAM,MAAA,sBAAA,GAA0B,sBAA8C,EAAM,IAAA,qBAAA;AACpF,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAe,EAAE,IAAA,EAAM,UAAW,EAAA,EAAG,CAA0B,uBAAA,EAAA,sBAAsB,CAAa,SAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACxI,EAGA,sBAAsB,QAAgD,EAAA;AACrE,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,oBAAqB,CAAA,IAAA;AAAA;AACjE,EAGA,aAAa,EAAwD,EAAA;AACpE,IAAO,OAAA,KAAA,CAAM,qBAA6C,EAAE,CAAA;AAAA;AAC7D,EAEA,sBAAsB,GAAyC,EAAA;AAC9D,IAAO,OAAA,KAAA,CAAM,qBAA8C,CAAA,GAAG,GAAG,CAAA;AAAA;AAClE,EAGA,IAAgC,GAAA;AAC/B,IAAA,OAAO,oBAAqB,CAAA,IAAA;AAAA;AAG9B;AAGA,MAAM,QAAA,GAAW,IAAI,oBAAqB,EAAA;AAC1C,IAAO,8BAAQ,GAAA","file":"custom_promotion_rules.js","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Version } from './versions'\nimport type { PercentageDiscountPromotion, PercentageDiscountPromotionType } from './percentage_discount_promotions'\nimport type { FreeShippingPromotion, FreeShippingPromotionType } from './free_shipping_promotions'\nimport type { BuyXPayYPromotion, BuyXPayYPromotionType } from './buy_x_pay_y_promotions'\nimport type { FreeGiftPromotion, FreeGiftPromotionType } from './free_gift_promotions'\nimport type { FixedPricePromotion, FixedPricePromotionType } from './fixed_price_promotions'\nimport type { ExternalPromotion, ExternalPromotionType } from './external_promotions'\nimport type { FixedAmountPromotion, FixedAmountPromotionType } from './fixed_amount_promotions'\nimport type { FlexPromotion, FlexPromotionType } from './flex_promotions'\n\n\ntype CustomPromotionRuleType = 'custom_promotion_rules'\ntype CustomPromotionRuleRel = ResourceRel & { type: CustomPromotionRuleType }\ntype PercentageDiscountPromotionRel = ResourceRel & { type: PercentageDiscountPromotionType }\ntype FreeShippingPromotionRel = ResourceRel & { type: FreeShippingPromotionType }\ntype BuyXPayYPromotionRel = ResourceRel & { type: BuyXPayYPromotionType }\ntype FreeGiftPromotionRel = ResourceRel & { type: FreeGiftPromotionType }\ntype FixedPricePromotionRel = ResourceRel & { type: FixedPricePromotionType }\ntype ExternalPromotionRel = ResourceRel & { type: ExternalPromotionType }\ntype FixedAmountPromotionRel = ResourceRel & { type: FixedAmountPromotionType }\ntype FlexPromotionRel = ResourceRel & { type: FlexPromotionType }\n\n\nexport type CustomPromotionRuleSort = Pick<CustomPromotionRule, 'id'> & ResourceSort\n// export type CustomPromotionRuleFilter = Pick<CustomPromotionRule, 'id'> & ResourceFilter\n\n\ninterface CustomPromotionRule extends Resource {\n\t\n\treadonly type: CustomPromotionRuleType\n\n\t/** \n\t * The filters used to trigger promotion on the matching order and its relationships attributes.\n\t * @example ```{\"status_eq\":\"pending\",\"line_items_sku_code_eq\":\"AAA\"}```\n\t */\n\tfilters?: Record<string, any> | null\n\n\tpromotion?: PercentageDiscountPromotion | FreeShippingPromotion | BuyXPayYPromotion | FreeGiftPromotion | FixedPricePromotion | ExternalPromotion | FixedAmountPromotion | FlexPromotion | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface CustomPromotionRuleCreate extends ResourceCreate {\n\t\n\t/** \n\t * The filters used to trigger promotion on the matching order and its relationships attributes.\n\t * @example ```{\"status_eq\":\"pending\",\"line_items_sku_code_eq\":\"AAA\"}```\n\t */\n\tfilters?: Record<string, any> | null\n\n\tpromotion: PercentageDiscountPromotionRel | FreeShippingPromotionRel | BuyXPayYPromotionRel | FreeGiftPromotionRel | FixedPricePromotionRel | ExternalPromotionRel | FixedAmountPromotionRel | FlexPromotionRel\n\n}\n\n\ninterface CustomPromotionRuleUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The filters used to trigger promotion on the matching order and its relationships attributes.\n\t * @example ```{\"status_eq\":\"pending\",\"line_items_sku_code_eq\":\"AAA\"}```\n\t */\n\tfilters?: Record<string, any> | null\n\n\tpromotion?: PercentageDiscountPromotionRel | FreeShippingPromotionRel | BuyXPayYPromotionRel | FreeGiftPromotionRel | FixedPricePromotionRel | ExternalPromotionRel | FixedAmountPromotionRel | FlexPromotionRel | null\n\n}\n\n\nclass CustomPromotionRules extends ApiResource<CustomPromotionRule> {\n\n\tstatic readonly TYPE: CustomPromotionRuleType = 'custom_promotion_rules' as const\n\n\tasync create(resource: CustomPromotionRuleCreate, params?: QueryParamsRetrieve<CustomPromotionRule>, options?: ResourcesConfig): Promise<CustomPromotionRule> {\n\t\treturn this.resources.create<CustomPromotionRuleCreate, CustomPromotionRule>({ ...resource, type: CustomPromotionRules.TYPE }, params, options)\n\t}\n\n\tasync update(resource: CustomPromotionRuleUpdate, params?: QueryParamsRetrieve<CustomPromotionRule>, options?: ResourcesConfig): Promise<CustomPromotionRule> {\n\t\treturn this.resources.update<CustomPromotionRuleUpdate, CustomPromotionRule>({ ...resource, type: CustomPromotionRules.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: CustomPromotionRules.TYPE } : id, options)\n\t}\n\n\tasync versions(customPromotionRuleId: string | CustomPromotionRule, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _customPromotionRuleId = (customPromotionRuleId as CustomPromotionRule).id || customPromotionRuleId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `custom_promotion_rules/${_customPromotionRuleId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisCustomPromotionRule(resource: any): resource is CustomPromotionRule {\n\t\treturn resource.type && (resource.type === CustomPromotionRules.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CustomPromotionRuleRel {\n\t\treturn super.relationshipOneToOne<CustomPromotionRuleRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CustomPromotionRuleRel[] {\n\t\treturn super.relationshipOneToMany<CustomPromotionRuleRel>(...ids)\n\t}\n\n\n\ttype(): CustomPromotionRuleType {\n\t\treturn CustomPromotionRules.TYPE\n\t}\n\n}\n\n\nconst instance = new CustomPromotionRules()\nexport default instance\n\nexport type { CustomPromotionRules, CustomPromotionRule, CustomPromotionRuleCreate, CustomPromotionRuleUpdate, CustomPromotionRuleType }\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/resources/customer_addresses.ts"],"names":["ApiResource"],"mappings":";;;;AAiEA,MAAM,0BAA0BA,oBAA6B,CAAA;AAAA,EAE5D,OAAgB,IAA4B,GAAA,oBAAA;AAAA,EAE5C,MAAM,MAAA,CAAO,QAAiC,EAAA,MAAA,EAA+C,OAAqD,EAAA;AACjJ,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA+C,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,iBAAkB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACpI,EAEA,MAAM,MAAA,CAAO,QAAiC,EAAA,MAAA,EAA+C,OAAqD,EAAA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B,mBAAA,EAAA,kBAAkB,CAAW,OAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC1H,EAEA,MAAM,QAAA,CAAS,iBAA6C,EAAA,MAAA,EAAmC,OAA2D,EAAA;AACzJ,IAAM,MAAA,kBAAA,GAAsB,kBAAsC,EAAM,IAAA,iBAAA;AACxE,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAe,EAAE,IAAA,EAAM,UAAW,EAAA,EAAG,CAAsB,mBAAA,EAAA,kBAAkB,CAAa,SAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAChI,EAGA,kBAAkB,QAA4C,EAAA;AAC7D,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,iBAAkB,CAAA,IAAA;AAAA;AAC9D,EAGA,aAAa,EAAoD,EAAA;AAChE,IAAO,OAAA,KAAA,CAAM,qBAAyC,EAAE,CAAA;AAAA;AACzD,EAEA,sBAAsB,GAAqC,EAAA;AAC1D,IAAO,OAAA,KAAA,CAAM,qBAA0C,CAAA,GAAG,GAAG,CAAA;AAAA;AAC9D,EAGA,IAA4B,GAAA;AAC3B,IAAA,OAAO,iBAAkB,CAAA,IAAA;AAAA;AAG3B;AAGA,MAAM,QAAA,GAAW,IAAI,iBAAkB,EAAA;AACvC,IAAO,0BAAQ,GAAA","file":"customer_addresses.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 { Customer, CustomerType } from './customers'\nimport type { Address, AddressType } from './addresses'\nimport type { Event } from './events'\nimport type { Version } from './versions'\n\n\ntype CustomerAddressType = 'customer_addresses'\ntype CustomerAddressRel = ResourceRel & { type: CustomerAddressType }\ntype CustomerRel = ResourceRel & { type: CustomerType }\ntype AddressRel = ResourceRel & { type: AddressType }\n\n\nexport type CustomerAddressSort = Pick<CustomerAddress, 'id'> & ResourceSort\n// export type CustomerAddressFilter = Pick<CustomerAddress, 'id'> & ResourceFilter\n\n\ninterface CustomerAddress extends Resource {\n\t\n\treadonly type: CustomerAddressType\n\n\t/** \n\t * Returns the associated address' name.\n\t * @example ```\"John Smith, 2883 Geraldine Lane Apt.23, 10013 New York NY (US) (212) 646-338-1228\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The email of the customer associated to the address.\n\t * @example ```\"john@example.com\"```\n\t */\n\tcustomer_email: string\n\n\tcustomer?: Customer | null\n\taddress?: Address | null\n\tevents?: Event[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface CustomerAddressCreate extends ResourceCreate {\n\t\n\t/** \n\t * The email of the customer associated to the address.\n\t * @example ```\"john@example.com\"```\n\t */\n\tcustomer_email: string\n\n\tcustomer: CustomerRel\n\taddress: AddressRel\n\n}\n\n\ninterface CustomerAddressUpdate extends ResourceUpdate {\n\t\n\tcustomer?: CustomerRel | null\n\taddress?: AddressRel | null\n\n}\n\n\nclass CustomerAddresses extends ApiResource<CustomerAddress> {\n\n\tstatic readonly TYPE: CustomerAddressType = 'customer_addresses' as const\n\n\tasync create(resource: CustomerAddressCreate, params?: QueryParamsRetrieve<CustomerAddress>, options?: ResourcesConfig): Promise<CustomerAddress> {\n\t\treturn this.resources.create<CustomerAddressCreate, CustomerAddress>({ ...resource, type: CustomerAddresses.TYPE }, params, options)\n\t}\n\n\tasync update(resource: CustomerAddressUpdate, params?: QueryParamsRetrieve<CustomerAddress>, options?: ResourcesConfig): Promise<CustomerAddress> {\n\t\treturn this.resources.update<CustomerAddressUpdate, CustomerAddress>({ ...resource, type: CustomerAddresses.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: CustomerAddresses.TYPE } : id, options)\n\t}\n\n\tasync customer(customerAddressId: string | CustomerAddress, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\tconst _customerAddressId = (customerAddressId as CustomerAddress).id || customerAddressId as string\n\t\treturn this.resources.fetch<Customer>({ type: 'customers' }, `customer_addresses/${_customerAddressId}/customer`, params, options) as unknown as Customer\n\t}\n\n\tasync address(customerAddressId: string | CustomerAddress, params?: QueryParamsRetrieve<Address>, options?: ResourcesConfig): Promise<Address> {\n\t\tconst _customerAddressId = (customerAddressId as CustomerAddress).id || customerAddressId as string\n\t\treturn this.resources.fetch<Address>({ type: 'addresses' }, `customer_addresses/${_customerAddressId}/address`, params, options) as unknown as Address\n\t}\n\n\tasync events(customerAddressId: string | CustomerAddress, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _customerAddressId = (customerAddressId as CustomerAddress).id || customerAddressId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `customer_addresses/${_customerAddressId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync versions(customerAddressId: string | CustomerAddress, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _customerAddressId = (customerAddressId as CustomerAddress).id || customerAddressId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `customer_addresses/${_customerAddressId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisCustomerAddress(resource: any): resource is CustomerAddress {\n\t\treturn resource.type && (resource.type === CustomerAddresses.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CustomerAddressRel {\n\t\treturn super.relationshipOneToOne<CustomerAddressRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CustomerAddressRel[] {\n\t\treturn super.relationshipOneToMany<CustomerAddressRel>(...ids)\n\t}\n\n\n\ttype(): CustomerAddressType {\n\t\treturn CustomerAddresses.TYPE\n\t}\n\n}\n\n\nconst instance = new CustomerAddresses()\nexport default instance\n\nexport type { Customer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3B,IAAA,OAAO,iBAAkB,CAAA,IAAA;AAAA;AAG3B;AAGA,MAAM,QAAA,GAAW,IAAI,iBAAkB,EAAA;AACvC,IAAO,0BAAQ,GAAA","file":"customer_addresses.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 { Customer, CustomerType } from './customers'\nimport type { Address, AddressType } from './addresses'\nimport type { Event } from './events'\nimport type { Version } from './versions'\n\n\ntype CustomerAddressType = 'customer_addresses'\ntype CustomerAddressRel = ResourceRel & { type: CustomerAddressType }\ntype CustomerRel = ResourceRel & { type: CustomerType }\ntype AddressRel = ResourceRel & { type: AddressType }\n\n\nexport type CustomerAddressSort = Pick<CustomerAddress, 'id'> & ResourceSort\n// export type CustomerAddressFilter = Pick<CustomerAddress, 'id'> & ResourceFilter\n\n\ninterface CustomerAddress extends Resource {\n\t\n\treadonly type: CustomerAddressType\n\n\t/** \n\t * Returns the associated address' name.\n\t * @example ```\"John Smith, 2883 Geraldine Lane Apt.23, 10013 New York NY (US) (212) 646-338-1228\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The email of the customer associated to the address.\n\t * @example ```\"john@example.com\"```\n\t */\n\tcustomer_email: string\n\n\tcustomer?: Customer | null\n\taddress?: Address | null\n\tevents?: Event[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface CustomerAddressCreate extends ResourceCreate {\n\t\n\t/** \n\t * The email of the customer associated to the address.\n\t * @example ```\"john@example.com\"```\n\t */\n\tcustomer_email: string\n\n\tcustomer: CustomerRel\n\taddress: AddressRel\n\n}\n\n\ninterface CustomerAddressUpdate extends ResourceUpdate {\n\t\n\tcustomer?: CustomerRel | null\n\taddress?: AddressRel | null\n\n}\n\n\nclass CustomerAddresses extends ApiResource<CustomerAddress> {\n\n\tstatic readonly TYPE: CustomerAddressType = 'customer_addresses' as const\n\n\tasync create(resource: CustomerAddressCreate, params?: QueryParamsRetrieve<CustomerAddress>, options?: ResourcesConfig): Promise<CustomerAddress> {\n\t\treturn this.resources.create<CustomerAddressCreate, CustomerAddress>({ ...resource, type: CustomerAddresses.TYPE }, params, options)\n\t}\n\n\tasync update(resource: CustomerAddressUpdate, params?: QueryParamsRetrieve<CustomerAddress>, options?: ResourcesConfig): Promise<CustomerAddress> {\n\t\treturn this.resources.update<CustomerAddressUpdate, CustomerAddress>({ ...resource, type: CustomerAddresses.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: CustomerAddresses.TYPE } : id, options)\n\t}\n\n\tasync customer(customerAddressId: string | CustomerAddress, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\tconst _customerAddressId = (customerAddressId as CustomerAddress).id || customerAddressId as string\n\t\treturn this.resources.fetch<Customer>({ type: 'customers' }, `customer_addresses/${_customerAddressId}/customer`, params, options) as unknown as Customer\n\t}\n\n\tasync address(customerAddressId: string | CustomerAddress, params?: QueryParamsRetrieve<Address>, options?: ResourcesConfig): Promise<Address> {\n\t\tconst _customerAddressId = (customerAddressId as CustomerAddress).id || customerAddressId as string\n\t\treturn this.resources.fetch<Address>({ type: 'addresses' }, `customer_addresses/${_customerAddressId}/address`, params, options) as unknown as Address\n\t}\n\n\tasync events(customerAddressId: string | CustomerAddress, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _customerAddressId = (customerAddressId as CustomerAddress).id || customerAddressId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `customer_addresses/${_customerAddressId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync versions(customerAddressId: string | CustomerAddress, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _customerAddressId = (customerAddressId as CustomerAddress).id || customerAddressId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `customer_addresses/${_customerAddressId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisCustomerAddress(resource: any): resource is CustomerAddress {\n\t\treturn resource.type && (resource.type === CustomerAddresses.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CustomerAddressRel {\n\t\treturn super.relationshipOneToOne<CustomerAddressRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CustomerAddressRel[] {\n\t\treturn super.relationshipOneToMany<CustomerAddressRel>(...ids)\n\t}\n\n\n\ttype(): CustomerAddressType {\n\t\treturn CustomerAddresses.TYPE\n\t}\n\n}\n\n\nconst instance = new CustomerAddresses()\nexport default instance\n\nexport type { CustomerAddresses, CustomerAddress, CustomerAddressCreate, CustomerAddressUpdate, CustomerAddressType }\n"]}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { fi as CustomerAddress, fj as CustomerAddressCreate, fl as CustomerAddressSort, lD as CustomerAddressType, fk as CustomerAddressUpdate, aw as CustomerAddresses, av as default } from '../api-IwWtsAqE.cjs';
|
2
2
|
import '../client.cjs';
|
3
|
-
import '../interceptor-
|
3
|
+
import '../interceptor-k15jXzf0.cjs';
|
4
4
|
import '../types.cjs';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { fi as CustomerAddress, fj as CustomerAddressCreate, fl as CustomerAddressSort, lD as CustomerAddressType, fk as CustomerAddressUpdate, aw as CustomerAddresses, av as default } from '../api-F1F37Dud.js';
|
2
2
|
import '../client.js';
|
3
|
-
import '../interceptor-
|
3
|
+
import '../interceptor-k15jXzf0.js';
|
4
4
|
import '../types.js';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/resources/customer_addresses.ts"],"names":[],"mappings":";;AAiEA,MAAM,0BAA0B,WAA6B,CAAA;AAAA,EAE5D,OAAgB,IAA4B,GAAA,oBA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ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Customer, CustomerType } from './customers'\nimport type { Address, AddressType } from './addresses'\nimport type { Event } from './events'\nimport type { Version } from './versions'\n\n\ntype CustomerAddressType = 'customer_addresses'\ntype CustomerAddressRel = ResourceRel & { type: CustomerAddressType }\ntype CustomerRel = ResourceRel & { type: CustomerType }\ntype AddressRel = ResourceRel & { type: AddressType }\n\n\nexport type CustomerAddressSort = Pick<CustomerAddress, 'id'> & ResourceSort\n// export type CustomerAddressFilter = Pick<CustomerAddress, 'id'> & ResourceFilter\n\n\ninterface CustomerAddress extends Resource {\n\t\n\treadonly type: CustomerAddressType\n\n\t/** \n\t * Returns the associated address' name.\n\t * @example ```\"John Smith, 2883 Geraldine Lane Apt.23, 10013 New York NY (US) (212) 646-338-1228\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The email of the customer associated to the address.\n\t * @example ```\"john@example.com\"```\n\t */\n\tcustomer_email: string\n\n\tcustomer?: Customer | null\n\taddress?: Address | null\n\tevents?: Event[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface CustomerAddressCreate extends ResourceCreate {\n\t\n\t/** \n\t * The email of the customer associated to the address.\n\t * @example ```\"john@example.com\"```\n\t */\n\tcustomer_email: string\n\n\tcustomer: CustomerRel\n\taddress: AddressRel\n\n}\n\n\ninterface CustomerAddressUpdate extends ResourceUpdate {\n\t\n\tcustomer?: CustomerRel | null\n\taddress?: AddressRel | null\n\n}\n\n\nclass CustomerAddresses extends ApiResource<CustomerAddress> {\n\n\tstatic readonly TYPE: CustomerAddressType = 'customer_addresses' as const\n\n\tasync create(resource: CustomerAddressCreate, params?: QueryParamsRetrieve<CustomerAddress>, options?: ResourcesConfig): Promise<CustomerAddress> {\n\t\treturn this.resources.create<CustomerAddressCreate, CustomerAddress>({ ...resource, type: CustomerAddresses.TYPE }, params, options)\n\t}\n\n\tasync update(resource: CustomerAddressUpdate, params?: QueryParamsRetrieve<CustomerAddress>, options?: ResourcesConfig): Promise<CustomerAddress> {\n\t\treturn this.resources.update<CustomerAddressUpdate, CustomerAddress>({ ...resource, type: CustomerAddresses.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: CustomerAddresses.TYPE } : id, options)\n\t}\n\n\tasync customer(customerAddressId: string | CustomerAddress, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\tconst _customerAddressId = (customerAddressId as CustomerAddress).id || customerAddressId as string\n\t\treturn this.resources.fetch<Customer>({ type: 'customers' }, `customer_addresses/${_customerAddressId}/customer`, params, options) as unknown as Customer\n\t}\n\n\tasync address(customerAddressId: string | CustomerAddress, params?: QueryParamsRetrieve<Address>, options?: ResourcesConfig): Promise<Address> {\n\t\tconst _customerAddressId = (customerAddressId as CustomerAddress).id || customerAddressId as string\n\t\treturn this.resources.fetch<Address>({ type: 'addresses' }, `customer_addresses/${_customerAddressId}/address`, params, options) as unknown as Address\n\t}\n\n\tasync events(customerAddressId: string | CustomerAddress, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _customerAddressId = (customerAddressId as CustomerAddress).id || customerAddressId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `customer_addresses/${_customerAddressId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync versions(customerAddressId: string | CustomerAddress, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _customerAddressId = (customerAddressId as CustomerAddress).id || customerAddressId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `customer_addresses/${_customerAddressId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisCustomerAddress(resource: any): resource is CustomerAddress {\n\t\treturn resource.type && (resource.type === CustomerAddresses.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CustomerAddressRel {\n\t\treturn super.relationshipOneToOne<CustomerAddressRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CustomerAddressRel[] {\n\t\treturn super.relationshipOneToMany<CustomerAddressRel>(...ids)\n\t}\n\n\n\ttype(): CustomerAddressType {\n\t\treturn CustomerAddresses.TYPE\n\t}\n\n}\n\n\nconst instance = new CustomerAddresses()\nexport default instance\n\nexport type { CustomerAddress, CustomerAddressCreate, CustomerAddressUpdate, CustomerAddressType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/customer_addresses.ts"],"names":[],"mappings":";;AAiEA,MAAM,0BAA0B,WAA6B,CAAA;AAAA,EAE5D,OAAgB,IAA4B,GAAA,oBAAA;AAAA,EAE5C,MAAM,MAAA,CAAO,QAAiC,EAAA,MAAA,EAA+C,OAAqD,EAAA;AACjJ,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA+C,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,iBAAkB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACpI,EAEA,MAAM,MAAA,CAAO,QAAiC,EAAA,MAAA,EAA+C,OAAqD,EAAA;AACjJ,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA+C,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,iBAAkB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACpI,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,iBAAA,CAAkB,IAAK,EAAA,GAAI,IAAI,OAAO,CAAA;AAAA;AACzG,EAEA,MAAM,QAAA,CAAS,iBAA6C,EAAA,MAAA,EAAwC,OAA8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,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,iBAAkB,CAAA,IAAA;AAAA;AAC9D,EAGA,aAAa,EAAoD,EAAA;AAChE,IAAO,OAAA,KAAA,CAAM,qBAAyC,EAAE,CAAA;AAAA;AACzD,EAEA,sBAAsB,GAAqC,EAAA;AAC1D,IAAO,OAAA,KAAA,CAAM,qBAA0C,CAAA,GAAG,GAAG,CAAA;AAAA;AAC9D,EAGA,IAA4B,GAAA;AAC3B,IAAA,OAAO,iBAAkB,CAAA,IAAA;AAAA;AAG3B;AAGA,MAAM,QAAA,GAAW,IAAI,iBAAkB,EAAA;AACvC,IAAO,0BAAQ,GAAA","file":"customer_addresses.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 { Customer, CustomerType } from './customers'\nimport type { Address, AddressType } from './addresses'\nimport type { Event } from './events'\nimport type { Version } from './versions'\n\n\ntype CustomerAddressType = 'customer_addresses'\ntype CustomerAddressRel = ResourceRel & { type: CustomerAddressType }\ntype CustomerRel = ResourceRel & { type: CustomerType }\ntype AddressRel = ResourceRel & { type: AddressType }\n\n\nexport type CustomerAddressSort = Pick<CustomerAddress, 'id'> & ResourceSort\n// export type CustomerAddressFilter = Pick<CustomerAddress, 'id'> & ResourceFilter\n\n\ninterface CustomerAddress extends Resource {\n\t\n\treadonly type: CustomerAddressType\n\n\t/** \n\t * Returns the associated address' name.\n\t * @example ```\"John Smith, 2883 Geraldine Lane Apt.23, 10013 New York NY (US) (212) 646-338-1228\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The email of the customer associated to the address.\n\t * @example ```\"john@example.com\"```\n\t */\n\tcustomer_email: string\n\n\tcustomer?: Customer | null\n\taddress?: Address | null\n\tevents?: Event[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface CustomerAddressCreate extends ResourceCreate {\n\t\n\t/** \n\t * The email of the customer associated to the address.\n\t * @example ```\"john@example.com\"```\n\t */\n\tcustomer_email: string\n\n\tcustomer: CustomerRel\n\taddress: AddressRel\n\n}\n\n\ninterface CustomerAddressUpdate extends ResourceUpdate {\n\t\n\tcustomer?: CustomerRel | null\n\taddress?: AddressRel | null\n\n}\n\n\nclass CustomerAddresses extends ApiResource<CustomerAddress> {\n\n\tstatic readonly TYPE: CustomerAddressType = 'customer_addresses' as const\n\n\tasync create(resource: CustomerAddressCreate, params?: QueryParamsRetrieve<CustomerAddress>, options?: ResourcesConfig): Promise<CustomerAddress> {\n\t\treturn this.resources.create<CustomerAddressCreate, CustomerAddress>({ ...resource, type: CustomerAddresses.TYPE }, params, options)\n\t}\n\n\tasync update(resource: CustomerAddressUpdate, params?: QueryParamsRetrieve<CustomerAddress>, options?: ResourcesConfig): Promise<CustomerAddress> {\n\t\treturn this.resources.update<CustomerAddressUpdate, CustomerAddress>({ ...resource, type: CustomerAddresses.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: CustomerAddresses.TYPE } : id, options)\n\t}\n\n\tasync customer(customerAddressId: string | CustomerAddress, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\tconst _customerAddressId = (customerAddressId as CustomerAddress).id || customerAddressId as string\n\t\treturn this.resources.fetch<Customer>({ type: 'customers' }, `customer_addresses/${_customerAddressId}/customer`, params, options) as unknown as Customer\n\t}\n\n\tasync address(customerAddressId: string | CustomerAddress, params?: QueryParamsRetrieve<Address>, options?: ResourcesConfig): Promise<Address> {\n\t\tconst _customerAddressId = (customerAddressId as CustomerAddress).id || customerAddressId as string\n\t\treturn this.resources.fetch<Address>({ type: 'addresses' }, `customer_addresses/${_customerAddressId}/address`, params, options) as unknown as Address\n\t}\n\n\tasync events(customerAddressId: string | CustomerAddress, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _customerAddressId = (customerAddressId as CustomerAddress).id || customerAddressId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `customer_addresses/${_customerAddressId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync versions(customerAddressId: string | CustomerAddress, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _customerAddressId = (customerAddressId as CustomerAddress).id || customerAddressId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `customer_addresses/${_customerAddressId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisCustomerAddress(resource: any): resource is CustomerAddress {\n\t\treturn resource.type && (resource.type === CustomerAddresses.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CustomerAddressRel {\n\t\treturn super.relationshipOneToOne<CustomerAddressRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CustomerAddressRel[] {\n\t\treturn super.relationshipOneToMany<CustomerAddressRel>(...ids)\n\t}\n\n\n\ttype(): CustomerAddressType {\n\t\treturn CustomerAddresses.TYPE\n\t}\n\n}\n\n\nconst instance = new CustomerAddresses()\nexport default instance\n\nexport type { CustomerAddresses, CustomerAddress, CustomerAddressCreate, CustomerAddressUpdate, CustomerAddressType }\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/resources/customer_groups.ts"],"names":["ApiResource"],"mappings":";;;;AAyEA,MAAM,uBAAuBA,oBAA2B,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;A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CAAA,KAAA,CAAkB,EAAE,IAAA,EAAM,aAAc,EAAA,EAAG,CAAmB,gBAAA,EAAA,gBAAgB,CAAgB,YAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACpI,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":"customer_groups.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 { Customer } from './customers'\nimport type { Market } from './markets'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype CustomerGroupType = 'customer_groups'\ntype CustomerGroupRel = ResourceRel & { type: CustomerGroupType }\n\n\nexport type CustomerGroupSort = Pick<CustomerGroup, 'id' | 'name' | 'code'> & ResourceSort\n// export type CustomerGroupFilter = Pick<CustomerGroup, 'id' | 'name' | 'code'> & ResourceFilter\n\n\ninterface CustomerGroup extends Resource {\n\t\n\treadonly type: CustomerGroupType\n\n\t/** \n\t * The customer group's internal name.\n\t * @example ```\"VIP\"```\n\t */\n\tname: string\n\t/** \n\t * A string that you can use to identify the customer group (must be unique within the environment).\n\t * @example ```\"vip1\"```\n\t */\n\tcode?: string | null\n\n\tcustomers?: Customer[] | null\n\tmarkets?: Market[] | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface CustomerGroupCreate extends ResourceCreate {\n\t\n\t/** \n\t * The customer group's internal name.\n\t * @example ```\"VIP\"```\n\t */\n\tname: string\n\t/** \n\t * A string that you can use to identify the customer group (must be unique within the environment).\n\t * @example ```\"vip1\"```\n\t */\n\tcode?: string | null\n\t\n}\n\n\ninterface CustomerGroupUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The customer group's internal name.\n\t * @example ```\"VIP\"```\n\t */\n\tname?: string | null\n\t/** \n\t * A string that you can use to identify the customer group (must be unique within the environment).\n\t * @example ```\"vip1\"```\n\t */\n\tcode?: string | null\n\t\n}\n\n\nclass CustomerGroups extends ApiResource<CustomerGroup> {\n\n\tstatic readonly TYPE: CustomerGroupType = 'customer_groups' as const\n\n\tasync create(resource: CustomerGroupCreate, params?: QueryParamsRetrieve<CustomerGroup>, options?: ResourcesConfig): Promise<CustomerGroup> {\n\t\treturn this.resources.create<CustomerGroupCreate, CustomerGroup>({ ...resource, type: CustomerGroups.TYPE }, params, options)\n\t}\n\n\tasync update(resource: CustomerGroupUpdate, params?: QueryParamsRetrieve<CustomerGroup>, options?: ResourcesConfig): Promise<CustomerGroup> {\n\t\treturn this.resources.update<CustomerGroupUpdate, CustomerGroup>({ ...resource, type: CustomerGroups.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: CustomerGroups.TYPE } : id, options)\n\t}\n\n\tasync customers(customerGroupId: string | CustomerGroup, params?: QueryParamsList<Customer>, options?: ResourcesConfig): Promise<ListResponse<Customer>> {\n\t\tconst _customerGroupId = (customerGroupId as CustomerGroup).id || customerGroupId as string\n\t\treturn this.resources.fetch<Customer>({ type: 'customers' }, `customer_groups/${_customerGroupId}/customers`, params, options) as unknown as ListResponse<Customer>\n\t}\n\n\tasync markets(customerGroupId: string | CustomerGroup, params?: QueryParamsList<Market>, options?: ResourcesConfig): Promise<ListResponse<Market>> {\n\t\tconst _customerGroupId = (customerGroupId as CustomerGroup).id || customerGroupId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `customer_groups/${_customerGroupId}/markets`, params, options) as unknown as ListResponse<Market>\n\t}\n\n\tasync attachments(customerGroupId: string | CustomerGroup, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _customerGroupId = (customerGroupId as CustomerGroup).id || customerGroupId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `customer_groups/${_customerGroupId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(customerGroupId: string | CustomerGroup, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _customerGroupId = (customerGroupId as CustomerGroup).id || customerGroupId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `customer_groups/${_customerGroupId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisCustomerGroup(resource: any): resource is CustomerGroup {\n\t\treturn resource.type && (resource.type === CustomerGroups.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CustomerGroupRel {\n\t\treturn super.relationshipOneToOne<CustomerGroupRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CustomerGroupRel[] {\n\t\treturn super.relationshipOneToMany<CustomerGroupRel>(...ids)\n\t}\n\n\n\ttype(): CustomerGroupType {\n\t\treturn CustomerGroups.TYPE\n\t}\n\n}\n\n\nconst instance = new CustomerGroups()\nexport default instance\n\nexport type { CustomerGroup, CustomerGroupCreate, CustomerGroupUpdate, CustomerGroupType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/customer_groups.ts"],"names":["ApiResource"],"mappings":";;;;AAyEA,MAAM,uBAAuBA,oBAA2B,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,CAAe,IAAK,EAAA,GAAI,IAAI,OAAO,CAAA;AAAA;AACtG,EAEA,MAAM,SAAA,CAAU,eAAyC,EAAA,MAAA,EAAoC,OAA4D,EAAA;AACxJ,IAAM,MAAA,gBAAA,GAAoB,gBAAkC,EAAM,IAAA,eAAA;AAClE,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAgB,EAAE,IAAA,EAAM,WAAY,EAAA,EAAG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BAAsB,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":"customer_groups.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 { Customer } from './customers'\nimport type { Market } from './markets'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype CustomerGroupType = 'customer_groups'\ntype CustomerGroupRel = ResourceRel & { type: CustomerGroupType }\n\n\nexport type CustomerGroupSort = Pick<CustomerGroup, 'id' | 'name' | 'code'> & ResourceSort\n// export type CustomerGroupFilter = Pick<CustomerGroup, 'id' | 'name' | 'code'> & ResourceFilter\n\n\ninterface CustomerGroup extends Resource {\n\t\n\treadonly type: CustomerGroupType\n\n\t/** \n\t * The customer group's internal name.\n\t * @example ```\"VIP\"```\n\t */\n\tname: string\n\t/** \n\t * A string that you can use to identify the customer group (must be unique within the environment).\n\t * @example ```\"vip1\"```\n\t */\n\tcode?: string | null\n\n\tcustomers?: Customer[] | null\n\tmarkets?: Market[] | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface CustomerGroupCreate extends ResourceCreate {\n\t\n\t/** \n\t * The customer group's internal name.\n\t * @example ```\"VIP\"```\n\t */\n\tname: string\n\t/** \n\t * A string that you can use to identify the customer group (must be unique within the environment).\n\t * @example ```\"vip1\"```\n\t */\n\tcode?: string | null\n\t\n}\n\n\ninterface CustomerGroupUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The customer group's internal name.\n\t * @example ```\"VIP\"```\n\t */\n\tname?: string | null\n\t/** \n\t * A string that you can use to identify the customer group (must be unique within the environment).\n\t * @example ```\"vip1\"```\n\t */\n\tcode?: string | null\n\t\n}\n\n\nclass CustomerGroups extends ApiResource<CustomerGroup> {\n\n\tstatic readonly TYPE: CustomerGroupType = 'customer_groups' as const\n\n\tasync create(resource: CustomerGroupCreate, params?: QueryParamsRetrieve<CustomerGroup>, options?: ResourcesConfig): Promise<CustomerGroup> {\n\t\treturn this.resources.create<CustomerGroupCreate, CustomerGroup>({ ...resource, type: CustomerGroups.TYPE }, params, options)\n\t}\n\n\tasync update(resource: CustomerGroupUpdate, params?: QueryParamsRetrieve<CustomerGroup>, options?: ResourcesConfig): Promise<CustomerGroup> {\n\t\treturn this.resources.update<CustomerGroupUpdate, CustomerGroup>({ ...resource, type: CustomerGroups.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: CustomerGroups.TYPE } : id, options)\n\t}\n\n\tasync customers(customerGroupId: string | CustomerGroup, params?: QueryParamsList<Customer>, options?: ResourcesConfig): Promise<ListResponse<Customer>> {\n\t\tconst _customerGroupId = (customerGroupId as CustomerGroup).id || customerGroupId as string\n\t\treturn this.resources.fetch<Customer>({ type: 'customers' }, `customer_groups/${_customerGroupId}/customers`, params, options) as unknown as ListResponse<Customer>\n\t}\n\n\tasync markets(customerGroupId: string | CustomerGroup, params?: QueryParamsList<Market>, options?: ResourcesConfig): Promise<ListResponse<Market>> {\n\t\tconst _customerGroupId = (customerGroupId as CustomerGroup).id || customerGroupId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `customer_groups/${_customerGroupId}/markets`, params, options) as unknown as ListResponse<Market>\n\t}\n\n\tasync attachments(customerGroupId: string | CustomerGroup, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _customerGroupId = (customerGroupId as CustomerGroup).id || customerGroupId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `customer_groups/${_customerGroupId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(customerGroupId: string | CustomerGroup, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _customerGroupId = (customerGroupId as CustomerGroup).id || customerGroupId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `customer_groups/${_customerGroupId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisCustomerGroup(resource: any): resource is CustomerGroup {\n\t\treturn resource.type && (resource.type === CustomerGroups.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CustomerGroupRel {\n\t\treturn super.relationshipOneToOne<CustomerGroupRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CustomerGroupRel[] {\n\t\treturn super.relationshipOneToMany<CustomerGroupRel>(...ids)\n\t}\n\n\n\ttype(): CustomerGroupType {\n\t\treturn CustomerGroups.TYPE\n\t}\n\n}\n\n\nconst instance = new CustomerGroups()\nexport default instance\n\nexport type { CustomerGroups, CustomerGroup, CustomerGroupCreate, CustomerGroupUpdate, CustomerGroupType }\n"]}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { fm as CustomerGroup, fn as CustomerGroupCreate, fp as CustomerGroupSort, lz as CustomerGroupType, fo as CustomerGroupUpdate, ay as CustomerGroups, ax as default } from '../api-IwWtsAqE.cjs';
|
2
2
|
import '../client.cjs';
|
3
|
-
import '../interceptor-
|
3
|
+
import '../interceptor-k15jXzf0.cjs';
|
4
4
|
import '../types.cjs';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { fm as CustomerGroup, fn as CustomerGroupCreate, fp as CustomerGroupSort, lz as CustomerGroupType, fo as CustomerGroupUpdate, ay as CustomerGroups, ax as default } from '../api-F1F37Dud.js';
|
2
2
|
import '../client.js';
|
3
|
-
import '../interceptor-
|
3
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O,cAAe,CAAA,IAAA;AAAA;AAGxB;AAGA,MAAM,QAAA,GAAW,IAAI,cAAe,EAAA;AACpC,IAAO,uBAAQ,GAAA","file":"customer_groups.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 { Customer } from './customers'\nimport type { Market } from './markets'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype CustomerGroupType = 'customer_groups'\ntype CustomerGroupRel = ResourceRel & { type: CustomerGroupType }\n\n\nexport type CustomerGroupSort = Pick<CustomerGroup, 'id' | 'name' | 'code'> & ResourceSort\n// export type CustomerGroupFilter = Pick<CustomerGroup, 'id' | 'name' | 'code'> & ResourceFilter\n\n\ninterface CustomerGroup extends Resource {\n\t\n\treadonly type: CustomerGroupType\n\n\t/** \n\t * The customer group's internal name.\n\t * @example ```\"VIP\"```\n\t */\n\tname: string\n\t/** \n\t * A string that you can use to identify the customer group (must be unique within the environment).\n\t * @example ```\"vip1\"```\n\t */\n\tcode?: string | null\n\n\tcustomers?: Customer[] | null\n\tmarkets?: Market[] | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface CustomerGroupCreate extends ResourceCreate {\n\t\n\t/** \n\t * The customer group's internal name.\n\t * @example ```\"VIP\"```\n\t */\n\tname: string\n\t/** \n\t * A string that you can use to identify the customer group (must be unique within the environment).\n\t * @example ```\"vip1\"```\n\t */\n\tcode?: string | null\n\t\n}\n\n\ninterface CustomerGroupUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The customer group's internal name.\n\t * @example ```\"VIP\"```\n\t */\n\tname?: string | null\n\t/** \n\t * A string that you can use to identify the customer group (must be unique within the environment).\n\t * @example ```\"vip1\"```\n\t */\n\tcode?: string | null\n\t\n}\n\n\nclass CustomerGroups extends ApiResource<CustomerGroup> {\n\n\tstatic readonly TYPE: CustomerGroupType = 'customer_groups' as const\n\n\tasync create(resource: CustomerGroupCreate, params?: QueryParamsRetrieve<CustomerGroup>, options?: ResourcesConfig): Promise<CustomerGroup> {\n\t\treturn this.resources.create<CustomerGroupCreate, CustomerGroup>({ ...resource, type: CustomerGroups.TYPE }, params, options)\n\t}\n\n\tasync update(resource: CustomerGroupUpdate, params?: QueryParamsRetrieve<CustomerGroup>, options?: ResourcesConfig): Promise<CustomerGroup> {\n\t\treturn this.resources.update<CustomerGroupUpdate, CustomerGroup>({ ...resource, type: CustomerGroups.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: CustomerGroups.TYPE } : id, options)\n\t}\n\n\tasync customers(customerGroupId: string | CustomerGroup, params?: QueryParamsList<Customer>, options?: ResourcesConfig): Promise<ListResponse<Customer>> {\n\t\tconst _customerGroupId = (customerGroupId as CustomerGroup).id || customerGroupId as string\n\t\treturn this.resources.fetch<Customer>({ type: 'customers' }, `customer_groups/${_customerGroupId}/customers`, params, options) as unknown as ListResponse<Customer>\n\t}\n\n\tasync markets(customerGroupId: string | CustomerGroup, params?: QueryParamsList<Market>, options?: ResourcesConfig): Promise<ListResponse<Market>> {\n\t\tconst _customerGroupId = (customerGroupId as CustomerGroup).id || customerGroupId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `customer_groups/${_customerGroupId}/markets`, params, options) as unknown as ListResponse<Market>\n\t}\n\n\tasync attachments(customerGroupId: string | CustomerGroup, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _customerGroupId = (customerGroupId as CustomerGroup).id || customerGroupId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `customer_groups/${_customerGroupId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(customerGroupId: string | CustomerGroup, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _customerGroupId = (customerGroupId as CustomerGroup).id || customerGroupId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `customer_groups/${_customerGroupId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisCustomerGroup(resource: any): resource is CustomerGroup {\n\t\treturn resource.type && (resource.type === CustomerGroups.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CustomerGroupRel {\n\t\treturn super.relationshipOneToOne<CustomerGroupRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CustomerGroupRel[] {\n\t\treturn super.relationshipOneToMany<CustomerGroupRel>(...ids)\n\t}\n\n\n\ttype(): CustomerGroupType {\n\t\treturn CustomerGroups.TYPE\n\t}\n\n}\n\n\nconst instance = new CustomerGroups()\nexport default instance\n\nexport type { CustomerGroup, CustomerGroupCreate, CustomerGroupUpdate, CustomerGroupType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/customer_groups.ts"],"names":[],"mappings":";;AAyEA,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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AA,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":"customer_groups.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 { Customer } from './customers'\nimport type { Market } from './markets'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype CustomerGroupType = 'customer_groups'\ntype CustomerGroupRel = ResourceRel & { type: CustomerGroupType }\n\n\nexport type CustomerGroupSort = Pick<CustomerGroup, 'id' | 'name' | 'code'> & ResourceSort\n// export type CustomerGroupFilter = Pick<CustomerGroup, 'id' | 'name' | 'code'> & ResourceFilter\n\n\ninterface CustomerGroup extends Resource {\n\t\n\treadonly type: CustomerGroupType\n\n\t/** \n\t * The customer group's internal name.\n\t * @example ```\"VIP\"```\n\t */\n\tname: string\n\t/** \n\t * A string that you can use to identify the customer group (must be unique within the environment).\n\t * @example ```\"vip1\"```\n\t */\n\tcode?: string | null\n\n\tcustomers?: Customer[] | null\n\tmarkets?: Market[] | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface CustomerGroupCreate extends ResourceCreate {\n\t\n\t/** \n\t * The customer group's internal name.\n\t * @example ```\"VIP\"```\n\t */\n\tname: string\n\t/** \n\t * A string that you can use to identify the customer group (must be unique within the environment).\n\t * @example ```\"vip1\"```\n\t */\n\tcode?: string | null\n\t\n}\n\n\ninterface CustomerGroupUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The customer group's internal name.\n\t * @example ```\"VIP\"```\n\t */\n\tname?: string | null\n\t/** \n\t * A string that you can use to identify the customer group (must be unique within the environment).\n\t * @example ```\"vip1\"```\n\t */\n\tcode?: string | null\n\t\n}\n\n\nclass CustomerGroups extends ApiResource<CustomerGroup> {\n\n\tstatic readonly TYPE: CustomerGroupType = 'customer_groups' as const\n\n\tasync create(resource: CustomerGroupCreate, params?: QueryParamsRetrieve<CustomerGroup>, options?: ResourcesConfig): Promise<CustomerGroup> {\n\t\treturn this.resources.create<CustomerGroupCreate, CustomerGroup>({ ...resource, type: CustomerGroups.TYPE }, params, options)\n\t}\n\n\tasync update(resource: CustomerGroupUpdate, params?: QueryParamsRetrieve<CustomerGroup>, options?: ResourcesConfig): Promise<CustomerGroup> {\n\t\treturn this.resources.update<CustomerGroupUpdate, CustomerGroup>({ ...resource, type: CustomerGroups.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: CustomerGroups.TYPE } : id, options)\n\t}\n\n\tasync customers(customerGroupId: string | CustomerGroup, params?: QueryParamsList<Customer>, options?: ResourcesConfig): Promise<ListResponse<Customer>> {\n\t\tconst _customerGroupId = (customerGroupId as CustomerGroup).id || customerGroupId as string\n\t\treturn this.resources.fetch<Customer>({ type: 'customers' }, `customer_groups/${_customerGroupId}/customers`, params, options) as unknown as ListResponse<Customer>\n\t}\n\n\tasync markets(customerGroupId: string | CustomerGroup, params?: QueryParamsList<Market>, options?: ResourcesConfig): Promise<ListResponse<Market>> {\n\t\tconst _customerGroupId = (customerGroupId as CustomerGroup).id || customerGroupId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `customer_groups/${_customerGroupId}/markets`, params, options) as unknown as ListResponse<Market>\n\t}\n\n\tasync attachments(customerGroupId: string | CustomerGroup, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _customerGroupId = (customerGroupId as CustomerGroup).id || customerGroupId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `customer_groups/${_customerGroupId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(customerGroupId: string | CustomerGroup, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _customerGroupId = (customerGroupId as CustomerGroup).id || customerGroupId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `customer_groups/${_customerGroupId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisCustomerGroup(resource: any): resource is CustomerGroup {\n\t\treturn resource.type && (resource.type === CustomerGroups.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CustomerGroupRel {\n\t\treturn super.relationshipOneToOne<CustomerGroupRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CustomerGroupRel[] {\n\t\treturn super.relationshipOneToMany<CustomerGroupRel>(...ids)\n\t}\n\n\n\ttype(): CustomerGroupType {\n\t\treturn CustomerGroups.TYPE\n\t}\n\n}\n\n\nconst instance = new CustomerGroups()\nexport default instance\n\nexport type { CustomerGroups, CustomerGroup, CustomerGroupCreate, CustomerGroupUpdate, CustomerGroupType }\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/resources/customer_password_resets.ts"],"names":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F,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAa,EAAE,IAAA,EAAM,QAAS,EAAA,EAAG,CAA4B,yBAAA,EAAA,wBAAwB,CAAW,OAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACtI,EAEA,MAAM,qBAAA,CAAsB,EAAoC,EAAA,YAAA,EAAsB,QAAqD,OAA2D,EAAA;AACrM,IAAA,OAAO,KAAK,SAAU,CAAA,MAAA,CAA2D,EAAE,EAAK,EAAA,OAAO,OAAO,QAAW,GAAA,EAAA,GAAI,EAAG,CAAA,EAAA,EAAI,MAAM,sBAAuB,CAAA,IAAA,EAAM,uBAAuB,YAAa,EAAA,EAAG,QAAQ,OAAO,CAAA;AAAA;AACtN,EAGA,wBAAwB,QAAkD,EAAA;AACzE,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,sBAAuB,CAAA,IAAA;AAAA;AACnE,EAGA,aAAa,EAA0D,EAAA;AACtE,IAAO,OAAA,KAAA,CAAM,qBAA+C,EAAE,CAAA;AAAA;AAC/D,EAEA,sBAAsB,GAA2C,EAAA;AAChE,IAAO,OAAA,KAAA,CAAM,qBAAgD,CAAA,GAAG,GAAG,CAAA;AAAA;AACpE,EAGA,IAAkC,GAAA;AACjC,IAAA,OAAO,sBAAuB,CAAA,IAAA;AAAA;AAGhC;AAGA,MAAM,QAAA,GAAW,IAAI,sBAAuB,EAAA;AAC5C,IAAO,gCAAQ,GAAA","file":"customer_password_resets.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 { Customer } from './customers'\nimport type { Event } from './events'\n\n\ntype CustomerPasswordResetType = 'customer_password_resets'\ntype CustomerPasswordResetRel = ResourceRel & { type: CustomerPasswordResetType }\n\n\nexport type CustomerPasswordResetSort = Pick<CustomerPasswordReset, 'id'> & ResourceSort\n// export type CustomerPasswordResetFilter = Pick<CustomerPasswordReset, 'id' | 'reset_password_token' | 'reset_password_at'> & ResourceFilter\n\n\ninterface CustomerPasswordReset extends Resource {\n\t\n\treadonly type: CustomerPasswordResetType\n\n\t/** \n\t * The email of the customer that requires a password reset.\n\t * @example ```\"john@example.com\"```\n\t */\n\tcustomer_email: string\n\t/** \n\t * Automatically generated on create. Send its value as the '_reset_password_token' argument when updating the customer password.\n\t * @example ```\"xhFfkmfybsLxzaAP6xcs\"```\n\t */\n\treset_password_token?: string | null\n\t/** \n\t * Time at which the password was reset.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\treset_password_at?: string | null\n\n\tcustomer?: Customer | null\n\tevents?: Event[] | null\n\n}\n\n\ninterface CustomerPasswordResetCreate extends ResourceCreate {\n\t\n\t/** \n\t * The email of the customer that requires a password reset.\n\t * @example ```\"john@example.com\"```\n\t */\n\tcustomer_email: string\n\t\n}\n\n\ninterface CustomerPasswordResetUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The customer new password. This will be accepted only if a valid '_reset_password_token' is sent with the request.\n\t * @example ```\"secret\"```\n\t */\n\tcustomer_password?: string | null\n\t/** \n\t * Send the 'reset_password_token' that you got on create when updating the customer password.\n\t * @example ```\"xhFfkmfybsLxzaAP6xcs\"```\n\t */\n\t_reset_password_token?: string | null\n\t\n}\n\n\nclass CustomerPasswordResets extends ApiResource<CustomerPasswordReset> {\n\n\tstatic readonly TYPE: CustomerPasswordResetType = 'customer_password_resets' as const\n\n\tasync create(resource: CustomerPasswordResetCreate, params?: QueryParamsRetrieve<CustomerPasswordReset>, options?: ResourcesConfig): Promise<CustomerPasswordReset> {\n\t\treturn this.resources.create<CustomerPasswordResetCreate, CustomerPasswordReset>({ ...resource, type: CustomerPasswordResets.TYPE }, params, options)\n\t}\n\n\tasync update(resource: CustomerPasswordResetUpdate, params?: QueryParamsRetrieve<CustomerPasswordReset>, options?: ResourcesConfig): Promise<CustomerPasswordReset> {\n\t\treturn this.resources.update<CustomerPasswordResetUpdate, CustomerPasswordReset>({ ...resource, type: CustomerPasswordResets.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: CustomerPasswordResets.TYPE } : id, options)\n\t}\n\n\tasync customer(customerPasswordResetId: string | CustomerPasswordReset, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\tconst _customerPasswordResetId = (customerPasswordResetId as CustomerPasswordReset).id || customerPasswordResetId as string\n\t\treturn this.resources.fetch<Customer>({ type: 'customers' }, `customer_password_resets/${_customerPasswordResetId}/customer`, params, options) as unknown as Customer\n\t}\n\n\tasync events(customerPasswordResetId: string | CustomerPasswordReset, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _customerPasswordResetId = (customerPasswordResetId as CustomerPasswordReset).id || customerPasswordResetId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `customer_password_resets/${_customerPasswordResetId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync _reset_password_token(id: string | CustomerPasswordReset, triggerValue: string, params?: QueryParamsRetrieve<CustomerPasswordReset>, options?: ResourcesConfig): Promise<CustomerPasswordReset> {\n\t\treturn this.resources.update<CustomerPasswordResetUpdate, CustomerPasswordReset>({ id: (typeof id === 'string')? id: id.id, type: CustomerPasswordResets.TYPE, _reset_password_token: triggerValue }, params, options)\n\t}\n\n\n\tisCustomerPasswordReset(resource: any): resource is CustomerPasswordReset {\n\t\treturn resource.type && (resource.type === CustomerPasswordResets.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CustomerPasswordResetRel {\n\t\treturn super.relationshipOneToOne<CustomerPasswordResetRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CustomerPasswordResetRel[] {\n\t\treturn super.relationshipOneToMany<CustomerPasswordResetRel>(...ids)\n\t}\n\n\n\ttype(): CustomerPasswordResetType {\n\t\treturn CustomerPasswordResets.TYPE\n\t}\n\n}\n\n\nconst instance = new CustomerPasswordResets()\nexport default instance\n\nexport type { CustomerPasswordReset, CustomerPasswordResetCreate, CustomerPasswordResetUpdate, CustomerPasswordResetType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/customer_password_resets.ts"],"names":["ApiResource"],"mappings":";;;;AAqEA,MAAM,+BAA+BA,oBAAmC,CAAA;AAAA,EAEvE,OAAgB,IAAkC,GAAA,0BAAA;AAAA,EAElD,MAAM,MAAA,CAAO,QAAuC,EAAA,MAAA,EAAqD,OAA2D,EAAA;AACnK,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA2D,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,sBAAuB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACrJ,EAEA,MAAM,MAAA,CAAO,QAAuC,EAAA,MAAA,EAAqD,OAA2D,EAAA;AACnK,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA2D,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,sBAAuB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACrJ,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,sBAAA,CAAuB,IAAK,EAAA,GAAI,IAAI,OAAO,CAAA;AAAA;AAC9G,EAEA,MAAM,QAAA,CAAS,uBAAyD,EAAA,MAAA,EAAwC,OAA8C,EAAA;AAC7J,IAAM,MAAA,wBAAA,GAA4B,wBAAkD,EAAM,IAAA,uBAAA;AAC1F,IAAO,OAAA,IAAA,CAAK,SAAU,CA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import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Customer } from './customers'\nimport type { Event } from './events'\n\n\ntype CustomerPasswordResetType = 'customer_password_resets'\ntype CustomerPasswordResetRel = ResourceRel & { type: CustomerPasswordResetType }\n\n\nexport type CustomerPasswordResetSort = Pick<CustomerPasswordReset, 'id'> & ResourceSort\n// export type CustomerPasswordResetFilter = Pick<CustomerPasswordReset, 'id' | 'reset_password_token' | 'reset_password_at'> & ResourceFilter\n\n\ninterface CustomerPasswordReset extends Resource {\n\t\n\treadonly type: CustomerPasswordResetType\n\n\t/** \n\t * The email of the customer that requires a password reset.\n\t * @example ```\"john@example.com\"```\n\t */\n\tcustomer_email: string\n\t/** \n\t * Automatically generated on create. Send its value as the '_reset_password_token' argument when updating the customer password.\n\t * @example ```\"xhFfkmfybsLxzaAP6xcs\"```\n\t */\n\treset_password_token?: string | null\n\t/** \n\t * Time at which the password was reset.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\treset_password_at?: string | null\n\n\tcustomer?: Customer | null\n\tevents?: Event[] | null\n\n}\n\n\ninterface CustomerPasswordResetCreate extends ResourceCreate {\n\t\n\t/** \n\t * The email of the customer that requires a password reset.\n\t * @example ```\"john@example.com\"```\n\t */\n\tcustomer_email: string\n\t\n}\n\n\ninterface CustomerPasswordResetUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The customer new password. This will be accepted only if a valid '_reset_password_token' is sent with the request.\n\t * @example ```\"secret\"```\n\t */\n\tcustomer_password?: string | null\n\t/** \n\t * Send the 'reset_password_token' that you got on create when updating the customer password.\n\t * @example ```\"xhFfkmfybsLxzaAP6xcs\"```\n\t */\n\t_reset_password_token?: string | null\n\t\n}\n\n\nclass CustomerPasswordResets extends ApiResource<CustomerPasswordReset> {\n\n\tstatic readonly TYPE: CustomerPasswordResetType = 'customer_password_resets' as const\n\n\tasync create(resource: CustomerPasswordResetCreate, params?: QueryParamsRetrieve<CustomerPasswordReset>, options?: ResourcesConfig): Promise<CustomerPasswordReset> {\n\t\treturn this.resources.create<CustomerPasswordResetCreate, CustomerPasswordReset>({ ...resource, type: CustomerPasswordResets.TYPE }, params, options)\n\t}\n\n\tasync update(resource: CustomerPasswordResetUpdate, params?: QueryParamsRetrieve<CustomerPasswordReset>, options?: ResourcesConfig): Promise<CustomerPasswordReset> {\n\t\treturn this.resources.update<CustomerPasswordResetUpdate, CustomerPasswordReset>({ ...resource, type: CustomerPasswordResets.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: CustomerPasswordResets.TYPE } : id, options)\n\t}\n\n\tasync customer(customerPasswordResetId: string | CustomerPasswordReset, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\tconst _customerPasswordResetId = (customerPasswordResetId as CustomerPasswordReset).id || customerPasswordResetId as string\n\t\treturn this.resources.fetch<Customer>({ type: 'customers' }, `customer_password_resets/${_customerPasswordResetId}/customer`, params, options) as unknown as Customer\n\t}\n\n\tasync events(customerPasswordResetId: string | CustomerPasswordReset, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _customerPasswordResetId = (customerPasswordResetId as CustomerPasswordReset).id || customerPasswordResetId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `customer_password_resets/${_customerPasswordResetId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync _reset_password_token(id: string | CustomerPasswordReset, triggerValue: string, params?: QueryParamsRetrieve<CustomerPasswordReset>, options?: ResourcesConfig): Promise<CustomerPasswordReset> {\n\t\treturn this.resources.update<CustomerPasswordResetUpdate, CustomerPasswordReset>({ id: (typeof id === 'string')? id: id.id, type: CustomerPasswordResets.TYPE, _reset_password_token: triggerValue }, params, options)\n\t}\n\n\n\tisCustomerPasswordReset(resource: any): resource is CustomerPasswordReset {\n\t\treturn resource.type && (resource.type === CustomerPasswordResets.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CustomerPasswordResetRel {\n\t\treturn super.relationshipOneToOne<CustomerPasswordResetRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CustomerPasswordResetRel[] {\n\t\treturn super.relationshipOneToMany<CustomerPasswordResetRel>(...ids)\n\t}\n\n\n\ttype(): CustomerPasswordResetType {\n\t\treturn CustomerPasswordResets.TYPE\n\t}\n\n}\n\n\nconst instance = new CustomerPasswordResets()\nexport default instance\n\nexport type { CustomerPasswordResets, CustomerPasswordReset, CustomerPasswordResetCreate, CustomerPasswordResetUpdate, CustomerPasswordResetType }\n"]}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { fq as CustomerPasswordReset, fr as CustomerPasswordResetCreate, ft as CustomerPasswordResetSort, nf as CustomerPasswordResetType, fs as CustomerPasswordResetUpdate, aA as CustomerPasswordResets, az as default } from '../api-IwWtsAqE.cjs';
|
2
2
|
import '../client.cjs';
|
3
|
-
import '../interceptor-
|
3
|
+
import '../interceptor-k15jXzf0.cjs';
|
4
4
|
import '../types.cjs';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { fq as CustomerPasswordReset, fr as CustomerPasswordResetCreate, ft as CustomerPasswordResetSort, nf as CustomerPasswordResetType, fs as CustomerPasswordResetUpdate, aA as CustomerPasswordResets, az as default } from '../api-F1F37Dud.js';
|
2
2
|
import '../client.js';
|
3
|
-
import '../interceptor-
|
3
|
+
import '../interceptor-k15jXzf0.js';
|
4
4
|
import '../types.js';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/resources/customer_password_resets.ts"],"names":[],"mappings":";;AAqEA,MAAM,+BAA+B,WAAmC,CAAA;AAAA,EAEvE,OAAgB,IAAkC,GAAA,0B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yBAAA,EAAA,wBAAwB,CAAW,OAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACtI,EAEA,MAAM,qBAAA,CAAsB,EAAoC,EAAA,YAAA,EAAsB,QAAqD,OAA2D,EAAA;AACrM,IAAA,OAAO,KAAK,SAAU,CAAA,MAAA,CAA2D,EAAE,EAAK,EAAA,OAAO,OAAO,QAAW,GAAA,EAAA,GAAI,EAAG,CAAA,EAAA,EAAI,MAAM,sBAAuB,CAAA,IAAA,EAAM,uBAAuB,YAAa,EAAA,EAAG,QAAQ,OAAO,CAAA;AAAA;AACtN,EAGA,wBAAwB,QAAkD,EAAA;AACzE,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,sBAAuB,CAAA,IAAA;AAAA;AACnE,EAGA,aAAa,EAA0D,EAAA;AACtE,IAAO,OAAA,KAAA,CAAM,qBAA+C,EAAE,CAAA;AAAA;AAC/D,EAEA,sBAAsB,GAA2C,EAAA;AAChE,IAAO,OAAA,KAAA,CAAM,qBAAgD,CAAA,GAAG,GAAG,CAAA;AAAA;AACpE,EAGA,IAAkC,GAAA;AACjC,IAAA,OAAO,sBAAuB,CAAA,IAAA;AAAA;AAGhC;AAGA,MAAM,QAAA,GAAW,IAAI,sBAAuB,EAAA;AAC5C,IAAO,gCAAQ,GAAA","file":"customer_password_resets.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 { Customer } from './customers'\nimport type { Event } from './events'\n\n\ntype CustomerPasswordResetType = 'customer_password_resets'\ntype CustomerPasswordResetRel = ResourceRel & { type: CustomerPasswordResetType }\n\n\nexport type CustomerPasswordResetSort = Pick<CustomerPasswordReset, 'id'> & ResourceSort\n// export type CustomerPasswordResetFilter = Pick<CustomerPasswordReset, 'id' | 'reset_password_token' | 'reset_password_at'> & ResourceFilter\n\n\ninterface CustomerPasswordReset extends Resource {\n\t\n\treadonly type: CustomerPasswordResetType\n\n\t/** \n\t * The email of the customer that requires a password reset.\n\t * @example ```\"john@example.com\"```\n\t */\n\tcustomer_email: string\n\t/** \n\t * Automatically generated on create. Send its value as the '_reset_password_token' argument when updating the customer password.\n\t * @example ```\"xhFfkmfybsLxzaAP6xcs\"```\n\t */\n\treset_password_token?: string | null\n\t/** \n\t * Time at which the password was reset.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\treset_password_at?: string | null\n\n\tcustomer?: Customer | null\n\tevents?: Event[] | null\n\n}\n\n\ninterface CustomerPasswordResetCreate extends ResourceCreate {\n\t\n\t/** \n\t * The email of the customer that requires a password reset.\n\t * @example ```\"john@example.com\"```\n\t */\n\tcustomer_email: string\n\t\n}\n\n\ninterface CustomerPasswordResetUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The customer new password. This will be accepted only if a valid '_reset_password_token' is sent with the request.\n\t * @example ```\"secret\"```\n\t */\n\tcustomer_password?: string | null\n\t/** \n\t * Send the 'reset_password_token' that you got on create when updating the customer password.\n\t * @example ```\"xhFfkmfybsLxzaAP6xcs\"```\n\t */\n\t_reset_password_token?: string | null\n\t\n}\n\n\nclass CustomerPasswordResets extends ApiResource<CustomerPasswordReset> {\n\n\tstatic readonly TYPE: CustomerPasswordResetType = 'customer_password_resets' as const\n\n\tasync create(resource: CustomerPasswordResetCreate, params?: QueryParamsRetrieve<CustomerPasswordReset>, options?: ResourcesConfig): Promise<CustomerPasswordReset> {\n\t\treturn this.resources.create<CustomerPasswordResetCreate, CustomerPasswordReset>({ ...resource, type: CustomerPasswordResets.TYPE }, params, options)\n\t}\n\n\tasync update(resource: CustomerPasswordResetUpdate, params?: QueryParamsRetrieve<CustomerPasswordReset>, options?: ResourcesConfig): Promise<CustomerPasswordReset> {\n\t\treturn this.resources.update<CustomerPasswordResetUpdate, CustomerPasswordReset>({ ...resource, type: CustomerPasswordResets.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: CustomerPasswordResets.TYPE } : id, options)\n\t}\n\n\tasync customer(customerPasswordResetId: string | CustomerPasswordReset, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\tconst _customerPasswordResetId = (customerPasswordResetId as CustomerPasswordReset).id || customerPasswordResetId as string\n\t\treturn this.resources.fetch<Customer>({ type: 'customers' }, `customer_password_resets/${_customerPasswordResetId}/customer`, params, options) as unknown as Customer\n\t}\n\n\tasync events(customerPasswordResetId: string | CustomerPasswordReset, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _customerPasswordResetId = (customerPasswordResetId as CustomerPasswordReset).id || customerPasswordResetId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `customer_password_resets/${_customerPasswordResetId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync _reset_password_token(id: string | CustomerPasswordReset, triggerValue: string, params?: QueryParamsRetrieve<CustomerPasswordReset>, options?: ResourcesConfig): Promise<CustomerPasswordReset> {\n\t\treturn this.resources.update<CustomerPasswordResetUpdate, CustomerPasswordReset>({ id: (typeof id === 'string')? id: id.id, type: CustomerPasswordResets.TYPE, _reset_password_token: triggerValue }, params, options)\n\t}\n\n\n\tisCustomerPasswordReset(resource: any): resource is CustomerPasswordReset {\n\t\treturn resource.type && (resource.type === CustomerPasswordResets.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CustomerPasswordResetRel {\n\t\treturn super.relationshipOneToOne<CustomerPasswordResetRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CustomerPasswordResetRel[] {\n\t\treturn super.relationshipOneToMany<CustomerPasswordResetRel>(...ids)\n\t}\n\n\n\ttype(): CustomerPasswordResetType {\n\t\treturn CustomerPasswordResets.TYPE\n\t}\n\n}\n\n\nconst instance = new CustomerPasswordResets()\nexport default instance\n\nexport type { CustomerPasswordReset, CustomerPasswordResetCreate, CustomerPasswordResetUpdate, CustomerPasswordResetType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/customer_password_resets.ts"],"names":[],"mappings":";;AAqEA,MAAM,+BAA+B,WAAmC,CAAA;AAAA,EAEvE,OAAgB,IAAkC,GAAA,0BAAA;AAAA,EAElD,MAAM,MAAA,CAAO,QAAuC,EAAA,MAAA,EAAqD,OAA2D,EAAA;AACnK,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA2D,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,sBAAuB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACrJ,EAEA,MAAM,MAAA,CAAO,QAAuC,EAAA,MAAA,EAAqD,OAA2D,EAAA;AACnK,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA2D,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,sBAAuB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACrJ,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,sBAAA,CAAuB,IAAK,EAAA,GAAI,IAAI,OAAO,CAAA;AAAA;AAC9G,EAEA,MAAM,QAAA,CAAS,uBAAyD,EAAA,MAAA,EAAwC,OAA8C,EAAA;AAC7J,IAAM,MAAA,wBAAA,GAA4B,wBAAkD,EAAM,IAAA,uBAAA;AAC1F,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAgB,EAAE,IAAA,EAAM,WAAY,EAAA,EAAG,CAA4B,yBAAA,EAAA,wBAAwB,CAAa,SAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC9I,EAEA,MAAM,MAAA,CAAO,uBAAyD,EAAA,MAAA,EAAiC,OAAyD,EAAA;AAC/J,IAAM,MAAA,wBAAA,GAA4B,wBAAkD,EAAM,IAAA,uBAAA;AAC1F,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAa,EAAE,IAAA,EAAM,QAAS,EAAA,EAAG,CAA4B,yBAAA,EAAA,wBAAwB,CAAW,OAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACtI,EAEA,MAAM,qBAAA,CAAsB,EAAoC,EAAA,YAAA,EAAsB,QAAqD,OAA2D,EAAA;AACrM,IAAA,OAAO,KAAK,SAAU,CAAA,MAAA,CAA2D,EAAE,EAAK,EAAA,OAAO,OAAO,QAAW,GAAA,EAAA,GAAI,EAAG,CAAA,EAAA,EAAI,MAAM,sBAAuB,CAAA,IAAA,EAAM,uBAAuB,YAAa,EAAA,EAAG,QAAQ,OAAO,CAAA;AAAA;AACtN,EAGA,wBAAwB,QAAkD,EAAA;AACzE,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,sBAAuB,CAAA,IAAA;AAAA;AACnE,EAGA,aAAa,EAA0D,EAAA;AACtE,IAAO,OAAA,KAAA,CAAM,qBAA+C,EAAE,CAAA;AAAA;AAC/D,EAEA,sBAAsB,GAA2C,EAAA;AAChE,IAAO,OAAA,KAAA,CAAM,qBAAgD,CAAA,GAAG,GAAG,CAAA;AAAA;AACpE,EAGA,IAAkC,GAAA;AACjC,IAAA,OAAO,sBAAuB,CAAA,IAAA;AAAA;AAGhC;AAGA,MAAM,QAAA,GAAW,IAAI,sBAAuB,EAAA;AAC5C,IAAO,gCAAQ,GAAA","file":"customer_password_resets.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 { Customer } from './customers'\nimport type { Event } from './events'\n\n\ntype CustomerPasswordResetType = 'customer_password_resets'\ntype CustomerPasswordResetRel = ResourceRel & { type: CustomerPasswordResetType }\n\n\nexport type CustomerPasswordResetSort = Pick<CustomerPasswordReset, 'id'> & ResourceSort\n// export type CustomerPasswordResetFilter = Pick<CustomerPasswordReset, 'id' | 'reset_password_token' | 'reset_password_at'> & ResourceFilter\n\n\ninterface CustomerPasswordReset extends Resource {\n\t\n\treadonly type: CustomerPasswordResetType\n\n\t/** \n\t * The email of the customer that requires a password reset.\n\t * @example ```\"john@example.com\"```\n\t */\n\tcustomer_email: string\n\t/** \n\t * Automatically generated on create. Send its value as the '_reset_password_token' argument when updating the customer password.\n\t * @example ```\"xhFfkmfybsLxzaAP6xcs\"```\n\t */\n\treset_password_token?: string | null\n\t/** \n\t * Time at which the password was reset.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\treset_password_at?: string | null\n\n\tcustomer?: Customer | null\n\tevents?: Event[] | null\n\n}\n\n\ninterface CustomerPasswordResetCreate extends ResourceCreate {\n\t\n\t/** \n\t * The email of the customer that requires a password reset.\n\t * @example ```\"john@example.com\"```\n\t */\n\tcustomer_email: string\n\t\n}\n\n\ninterface CustomerPasswordResetUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The customer new password. This will be accepted only if a valid '_reset_password_token' is sent with the request.\n\t * @example ```\"secret\"```\n\t */\n\tcustomer_password?: string | null\n\t/** \n\t * Send the 'reset_password_token' that you got on create when updating the customer password.\n\t * @example ```\"xhFfkmfybsLxzaAP6xcs\"```\n\t */\n\t_reset_password_token?: string | null\n\t\n}\n\n\nclass CustomerPasswordResets extends ApiResource<CustomerPasswordReset> {\n\n\tstatic readonly TYPE: CustomerPasswordResetType = 'customer_password_resets' as const\n\n\tasync create(resource: CustomerPasswordResetCreate, params?: QueryParamsRetrieve<CustomerPasswordReset>, options?: ResourcesConfig): Promise<CustomerPasswordReset> {\n\t\treturn this.resources.create<CustomerPasswordResetCreate, CustomerPasswordReset>({ ...resource, type: CustomerPasswordResets.TYPE }, params, options)\n\t}\n\n\tasync update(resource: CustomerPasswordResetUpdate, params?: QueryParamsRetrieve<CustomerPasswordReset>, options?: ResourcesConfig): Promise<CustomerPasswordReset> {\n\t\treturn this.resources.update<CustomerPasswordResetUpdate, CustomerPasswordReset>({ ...resource, type: CustomerPasswordResets.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: CustomerPasswordResets.TYPE } : id, options)\n\t}\n\n\tasync customer(customerPasswordResetId: string | CustomerPasswordReset, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\tconst _customerPasswordResetId = (customerPasswordResetId as CustomerPasswordReset).id || customerPasswordResetId as string\n\t\treturn this.resources.fetch<Customer>({ type: 'customers' }, `customer_password_resets/${_customerPasswordResetId}/customer`, params, options) as unknown as Customer\n\t}\n\n\tasync events(customerPasswordResetId: string | CustomerPasswordReset, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _customerPasswordResetId = (customerPasswordResetId as CustomerPasswordReset).id || customerPasswordResetId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `customer_password_resets/${_customerPasswordResetId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync _reset_password_token(id: string | CustomerPasswordReset, triggerValue: string, params?: QueryParamsRetrieve<CustomerPasswordReset>, options?: ResourcesConfig): Promise<CustomerPasswordReset> {\n\t\treturn this.resources.update<CustomerPasswordResetUpdate, CustomerPasswordReset>({ id: (typeof id === 'string')? id: id.id, type: CustomerPasswordResets.TYPE, _reset_password_token: triggerValue }, params, options)\n\t}\n\n\n\tisCustomerPasswordReset(resource: any): resource is CustomerPasswordReset {\n\t\treturn resource.type && (resource.type === CustomerPasswordResets.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CustomerPasswordResetRel {\n\t\treturn super.relationshipOneToOne<CustomerPasswordResetRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CustomerPasswordResetRel[] {\n\t\treturn super.relationshipOneToMany<CustomerPasswordResetRel>(...ids)\n\t}\n\n\n\ttype(): CustomerPasswordResetType {\n\t\treturn CustomerPasswordResets.TYPE\n\t}\n\n}\n\n\nconst instance = new CustomerPasswordResets()\nexport default instance\n\nexport type { CustomerPasswordResets, CustomerPasswordReset, CustomerPasswordResetCreate, CustomerPasswordResetUpdate, CustomerPasswordResetType }\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/resources/customer_payment_sources.ts"],"names":["ApiResource"],"mappings":";;;;AA2GA,MAAM,+BAA+BA,oBAAmC,CAAA;AAAA,EAEvE,OAAgB,IAAkC,GAAA,0BAAA;AAAA,EAElD,MAAM,MAAA,CAAO,QAAuC,EAAA,MAAA,EAAqD,OAA2D,EAAA;AACnK,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA2D,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,sBAAuB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACrJ,EAEA,MAAM,MAAA,CAAO,QAAuC,EAAA,MAAA,EAAqD,OAA2D,EAAA;AACnK,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA2D,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,sBAAuB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACrJ,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,sBAAA,CAAuB,IAAK,EAAA,GAAI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CAAM,qBAAgD,CAAA,GAAG,GAAG,CAAA;AAAA;AACpE,EAGA,IAAkC,GAAA;AACjC,IAAA,OAAO,sBAAuB,CAAA,IAAA;AAAA;AAGhC;AAGA,MAAM,QAAA,GAAW,IAAI,sBAAuB,EAAA;AAC5C,IAAO,gCAAQ,GAAA","file":"customer_payment_sources.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 { Customer, CustomerType } from './customers'\nimport type { PaymentMethod, PaymentMethodType } from './payment_methods'\nimport type { Version } from './versions'\nimport type { AdyenPayment, AdyenPaymentType } from './adyen_payments'\nimport type { AxervePayment, AxervePaymentType } from './axerve_payments'\nimport type { BraintreePayment, BraintreePaymentType } from './braintree_payments'\nimport type { CheckoutComPayment, CheckoutComPaymentType } from './checkout_com_payments'\nimport type { ExternalPayment, ExternalPaymentType } from './external_payments'\nimport type { KlarnaPayment, KlarnaPaymentType } from './klarna_payments'\nimport type { PaypalPayment, PaypalPaymentType } from './paypal_payments'\nimport type { SatispayPayment, SatispayPaymentType } from './satispay_payments'\nimport type { StripePayment, StripePaymentType } from './stripe_payments'\nimport type { WireTransfer, WireTransferType } from './wire_transfers'\n\n\ntype CustomerPaymentSourceType = 'customer_payment_sources'\ntype CustomerPaymentSourceRel = ResourceRel & { type: CustomerPaymentSourceType }\ntype CustomerRel = ResourceRel & { type: CustomerType }\ntype PaymentMethodRel = ResourceRel & { type: PaymentMethodType }\ntype AdyenPaymentRel = ResourceRel & { type: AdyenPaymentType }\ntype AxervePaymentRel = ResourceRel & { type: AxervePaymentType }\ntype BraintreePaymentRel = ResourceRel & { type: BraintreePaymentType }\ntype CheckoutComPaymentRel = ResourceRel & { type: CheckoutComPaymentType }\ntype ExternalPaymentRel = ResourceRel & { type: ExternalPaymentType }\ntype KlarnaPaymentRel = ResourceRel & { type: KlarnaPaymentType }\ntype PaypalPaymentRel = ResourceRel & { type: PaypalPaymentType }\ntype SatispayPaymentRel = ResourceRel & { type: SatispayPaymentType }\ntype StripePaymentRel = ResourceRel & { type: StripePaymentType }\ntype WireTransferRel = ResourceRel & { type: WireTransferType }\n\n\nexport type CustomerPaymentSourceSort = Pick<CustomerPaymentSource, 'id'> & ResourceSort\n// export type CustomerPaymentSourceFilter = Pick<CustomerPaymentSource, 'id' | 'name' | 'payment_source_token'> & ResourceFilter\n\n\ninterface CustomerPaymentSource extends Resource {\n\t\n\treadonly type: CustomerPaymentSourceType\n\n\t/** \n\t * Returns the associated payment source's name.\n\t * @example ```\"XXXX-XXXX-XXXX-1111\"```\n\t */\n\tname?: string | null\n\t/** \n\t * Returns the customer gateway token stored in the gateway.\n\t * @example ```\"cus_xxxyyyzzz\"```\n\t */\n\tcustomer_token?: string | null\n\t/** \n\t * Returns the payment source token stored in the gateway.\n\t * @example ```\"pm_xxxyyyzzz\"```\n\t */\n\tpayment_source_token?: string | null\n\n\tcustomer?: Customer | null\n\tpayment_method?: PaymentMethod | null\n\tpayment_source?: AdyenPayment | AxervePayment | BraintreePayment | CheckoutComPayment | ExternalPayment | KlarnaPayment | PaypalPayment | SatispayPayment | StripePayment | WireTransfer | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface CustomerPaymentSourceCreate extends ResourceCreate {\n\t\n\t/** \n\t * Returns the customer gateway token stored in the gateway.\n\t * @example ```\"cus_xxxyyyzzz\"```\n\t */\n\tcustomer_token?: string | null\n\t/** \n\t * Returns the payment source token stored in the gateway.\n\t * @example ```\"pm_xxxyyyzzz\"```\n\t */\n\tpayment_source_token?: string | null\n\n\tcustomer: CustomerRel\n\tpayment_method?: PaymentMethodRel | null\n\tpayment_source?: AdyenPaymentRel | AxervePaymentRel | BraintreePaymentRel | CheckoutComPaymentRel | ExternalPaymentRel | KlarnaPaymentRel | PaypalPaymentRel | SatispayPaymentRel | StripePaymentRel | WireTransferRel | null\n\n}\n\n\ninterface CustomerPaymentSourceUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * Returns the customer gateway token stored in the gateway.\n\t * @example ```\"cus_xxxyyyzzz\"```\n\t */\n\tcustomer_token?: string | null\n\t/** \n\t * Returns the payment source token stored in the gateway.\n\t * @example ```\"pm_xxxyyyzzz\"```\n\t */\n\tpayment_source_token?: string | null\n\n\tcustomer?: CustomerRel | null\n\tpayment_method?: PaymentMethodRel | null\n\tpayment_source?: AdyenPaymentRel | AxervePaymentRel | BraintreePaymentRel | CheckoutComPaymentRel | ExternalPaymentRel | KlarnaPaymentRel | PaypalPaymentRel | SatispayPaymentRel | StripePaymentRel | WireTransferRel | null\n\n}\n\n\nclass CustomerPaymentSources extends ApiResource<CustomerPaymentSource> {\n\n\tstatic readonly TYPE: CustomerPaymentSourceType = 'customer_payment_sources' as const\n\n\tasync create(resource: CustomerPaymentSourceCreate, params?: QueryParamsRetrieve<CustomerPaymentSource>, options?: ResourcesConfig): Promise<CustomerPaymentSource> {\n\t\treturn this.resources.create<CustomerPaymentSourceCreate, CustomerPaymentSource>({ ...resource, type: CustomerPaymentSources.TYPE }, params, options)\n\t}\n\n\tasync update(resource: CustomerPaymentSourceUpdate, params?: QueryParamsRetrieve<CustomerPaymentSource>, options?: ResourcesConfig): Promise<CustomerPaymentSource> {\n\t\treturn this.resources.update<CustomerPaymentSourceUpdate, CustomerPaymentSource>({ ...resource, type: CustomerPaymentSources.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: CustomerPaymentSources.TYPE } : id, options)\n\t}\n\n\tasync customer(customerPaymentSourceId: string | CustomerPaymentSource, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\tconst _customerPaymentSourceId = (customerPaymentSourceId as CustomerPaymentSource).id || customerPaymentSourceId as string\n\t\treturn this.resources.fetch<Customer>({ type: 'customers' }, `customer_payment_sources/${_customerPaymentSourceId}/customer`, params, options) as unknown as Customer\n\t}\n\n\tasync payment_method(customerPaymentSourceId: string | CustomerPaymentSource, params?: QueryParamsRetrieve<PaymentMethod>, options?: ResourcesConfig): Promise<PaymentMethod> {\n\t\tconst _customerPaymentSourceId = (customerPaymentSourceId as CustomerPaymentSource).id || customerPaymentSourceId as string\n\t\treturn this.resources.fetch<PaymentMethod>({ type: 'payment_methods' }, `customer_payment_sources/${_customerPaymentSourceId}/payment_method`, params, options) as unknown as PaymentMethod\n\t}\n\n\tasync versions(customerPaymentSourceId: string | CustomerPaymentSource, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _customerPaymentSourceId = (customerPaymentSourceId as CustomerPaymentSource).id || customerPaymentSourceId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `customer_payment_sources/${_customerPaymentSourceId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisCustomerPaymentSource(resource: any): resource is CustomerPaymentSource {\n\t\treturn resource.type && (resource.type === CustomerPaymentSources.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CustomerPaymentSourceRel {\n\t\treturn super.relationshipOneToOne<CustomerPaymentSourceRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CustomerPaymentSourceRel[] {\n\t\treturn super.relationshipOneToMany<CustomerPaymentSourceRel>(...ids)\n\t}\n\n\n\ttype(): CustomerPaymentSourceType {\n\t\treturn CustomerPaymentSources.TYPE\n\t}\n\n}\n\n\nconst instance = new CustomerPaymentSources()\nexport default instance\n\nexport type { CustomerPaymentSource, CustomerPaymentSourceCreate, CustomerPaymentSourceUpdate, CustomerPaymentSourceType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/customer_payment_sources.ts"],"names":["ApiResource"],"mappings":";;;;AA2GA,MAAM,+BAA+BA,oBAAmC,CAAA;AAAA,EAEvE,OAAgB,IAAkC,GAAA,0BAAA;AAA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A,EAAA,wBAAwB,CAAmB,eAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC/J,EAEA,MAAM,QAAA,CAAS,uBAAyD,EAAA,MAAA,EAAmC,OAA2D,EAAA;AACrK,IAAM,MAAA,wBAAA,GAA4B,wBAAkD,EAAM,IAAA,uBAAA;AAC1F,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAe,EAAE,IAAA,EAAM,UAAW,EAAA,EAAG,CAA4B,yBAAA,EAAA,wBAAwB,CAAa,SAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC5I,EAGA,wBAAwB,QAAkD,EAAA;AACzE,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,sBAAuB,CAAA,IAAA;AAAA;AACnE,EAGA,aAAa,EAA0D,EAAA;AACtE,IAAO,OAAA,KAAA,CAAM,qBAA+C,EAAE,CAAA;AAAA;AAC/D,EAEA,sBAAsB,GAA2C,EAAA;AAChE,IAAO,OAAA,KAAA,CAAM,qBAAgD,CAAA,GAAG,GAAG,CAAA;AAAA;AACpE,EAGA,IAAkC,GAAA;AACjC,IAAA,OAAO,sBAAuB,CAAA,IAAA;AAAA;AAGhC;AAGA,MAAM,QAAA,GAAW,IAAI,sBAAuB,EAAA;AAC5C,IAAO,gCAAQ,GAAA","file":"customer_payment_sources.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 { Customer, CustomerType } from './customers'\nimport type { PaymentMethod, PaymentMethodType } from './payment_methods'\nimport type { Version } from './versions'\nimport type { AdyenPayment, AdyenPaymentType } from './adyen_payments'\nimport type { AxervePayment, AxervePaymentType } from './axerve_payments'\nimport type { BraintreePayment, BraintreePaymentType } from './braintree_payments'\nimport type { CheckoutComPayment, CheckoutComPaymentType } from './checkout_com_payments'\nimport type { ExternalPayment, ExternalPaymentType } from './external_payments'\nimport type { KlarnaPayment, KlarnaPaymentType } from './klarna_payments'\nimport type { PaypalPayment, PaypalPaymentType } from './paypal_payments'\nimport type { SatispayPayment, SatispayPaymentType } from './satispay_payments'\nimport type { StripePayment, StripePaymentType } from './stripe_payments'\nimport type { WireTransfer, WireTransferType } from './wire_transfers'\n\n\ntype CustomerPaymentSourceType = 'customer_payment_sources'\ntype CustomerPaymentSourceRel = ResourceRel & { type: CustomerPaymentSourceType }\ntype CustomerRel = ResourceRel & { type: CustomerType }\ntype PaymentMethodRel = ResourceRel & { type: PaymentMethodType }\ntype AdyenPaymentRel = ResourceRel & { type: AdyenPaymentType }\ntype AxervePaymentRel = ResourceRel & { type: AxervePaymentType }\ntype BraintreePaymentRel = ResourceRel & { type: BraintreePaymentType }\ntype CheckoutComPaymentRel = ResourceRel & { type: CheckoutComPaymentType }\ntype ExternalPaymentRel = ResourceRel & { type: ExternalPaymentType }\ntype KlarnaPaymentRel = ResourceRel & { type: KlarnaPaymentType }\ntype PaypalPaymentRel = ResourceRel & { type: PaypalPaymentType }\ntype SatispayPaymentRel = ResourceRel & { type: SatispayPaymentType }\ntype StripePaymentRel = ResourceRel & { type: StripePaymentType }\ntype WireTransferRel = ResourceRel & { type: WireTransferType }\n\n\nexport type CustomerPaymentSourceSort = Pick<CustomerPaymentSource, 'id'> & ResourceSort\n// export type CustomerPaymentSourceFilter = Pick<CustomerPaymentSource, 'id' | 'name' | 'payment_source_token'> & ResourceFilter\n\n\ninterface CustomerPaymentSource extends Resource {\n\t\n\treadonly type: CustomerPaymentSourceType\n\n\t/** \n\t * Returns the associated payment source's name.\n\t * @example ```\"XXXX-XXXX-XXXX-1111\"```\n\t */\n\tname?: string | null\n\t/** \n\t * Returns the customer gateway token stored in the gateway.\n\t * @example ```\"cus_xxxyyyzzz\"```\n\t */\n\tcustomer_token?: string | null\n\t/** \n\t * Returns the payment source token stored in the gateway.\n\t * @example ```\"pm_xxxyyyzzz\"```\n\t */\n\tpayment_source_token?: string | null\n\n\tcustomer?: Customer | null\n\tpayment_method?: PaymentMethod | null\n\tpayment_source?: AdyenPayment | AxervePayment | BraintreePayment | CheckoutComPayment | ExternalPayment | KlarnaPayment | PaypalPayment | SatispayPayment | StripePayment | WireTransfer | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface CustomerPaymentSourceCreate extends ResourceCreate {\n\t\n\t/** \n\t * Returns the customer gateway token stored in the gateway.\n\t * @example ```\"cus_xxxyyyzzz\"```\n\t */\n\tcustomer_token?: string | null\n\t/** \n\t * Returns the payment source token stored in the gateway.\n\t * @example ```\"pm_xxxyyyzzz\"```\n\t */\n\tpayment_source_token?: string | null\n\n\tcustomer: CustomerRel\n\tpayment_method?: PaymentMethodRel | null\n\tpayment_source?: AdyenPaymentRel | AxervePaymentRel | BraintreePaymentRel | CheckoutComPaymentRel | ExternalPaymentRel | KlarnaPaymentRel | PaypalPaymentRel | SatispayPaymentRel | StripePaymentRel | WireTransferRel | null\n\n}\n\n\ninterface CustomerPaymentSourceUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * Returns the customer gateway token stored in the gateway.\n\t * @example ```\"cus_xxxyyyzzz\"```\n\t */\n\tcustomer_token?: string | null\n\t/** \n\t * Returns the payment source token stored in the gateway.\n\t * @example ```\"pm_xxxyyyzzz\"```\n\t */\n\tpayment_source_token?: string | null\n\n\tcustomer?: CustomerRel | null\n\tpayment_method?: PaymentMethodRel | null\n\tpayment_source?: AdyenPaymentRel | AxervePaymentRel | BraintreePaymentRel | CheckoutComPaymentRel | ExternalPaymentRel | KlarnaPaymentRel | PaypalPaymentRel | SatispayPaymentRel | StripePaymentRel | WireTransferRel | null\n\n}\n\n\nclass CustomerPaymentSources extends ApiResource<CustomerPaymentSource> {\n\n\tstatic readonly TYPE: CustomerPaymentSourceType = 'customer_payment_sources' as const\n\n\tasync create(resource: CustomerPaymentSourceCreate, params?: QueryParamsRetrieve<CustomerPaymentSource>, options?: ResourcesConfig): Promise<CustomerPaymentSource> {\n\t\treturn this.resources.create<CustomerPaymentSourceCreate, CustomerPaymentSource>({ ...resource, type: CustomerPaymentSources.TYPE }, params, options)\n\t}\n\n\tasync update(resource: CustomerPaymentSourceUpdate, params?: QueryParamsRetrieve<CustomerPaymentSource>, options?: ResourcesConfig): Promise<CustomerPaymentSource> {\n\t\treturn this.resources.update<CustomerPaymentSourceUpdate, CustomerPaymentSource>({ ...resource, type: CustomerPaymentSources.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: CustomerPaymentSources.TYPE } : id, options)\n\t}\n\n\tasync customer(customerPaymentSourceId: string | CustomerPaymentSource, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\tconst _customerPaymentSourceId = (customerPaymentSourceId as CustomerPaymentSource).id || customerPaymentSourceId as string\n\t\treturn this.resources.fetch<Customer>({ type: 'customers' }, `customer_payment_sources/${_customerPaymentSourceId}/customer`, params, options) as unknown as Customer\n\t}\n\n\tasync payment_method(customerPaymentSourceId: string | CustomerPaymentSource, params?: QueryParamsRetrieve<PaymentMethod>, options?: ResourcesConfig): Promise<PaymentMethod> {\n\t\tconst _customerPaymentSourceId = (customerPaymentSourceId as CustomerPaymentSource).id || customerPaymentSourceId as string\n\t\treturn this.resources.fetch<PaymentMethod>({ type: 'payment_methods' }, `customer_payment_sources/${_customerPaymentSourceId}/payment_method`, params, options) as unknown as PaymentMethod\n\t}\n\n\tasync versions(customerPaymentSourceId: string | CustomerPaymentSource, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _customerPaymentSourceId = (customerPaymentSourceId as CustomerPaymentSource).id || customerPaymentSourceId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `customer_payment_sources/${_customerPaymentSourceId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisCustomerPaymentSource(resource: any): resource is CustomerPaymentSource {\n\t\treturn resource.type && (resource.type === CustomerPaymentSources.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CustomerPaymentSourceRel {\n\t\treturn super.relationshipOneToOne<CustomerPaymentSourceRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CustomerPaymentSourceRel[] {\n\t\treturn super.relationshipOneToMany<CustomerPaymentSourceRel>(...ids)\n\t}\n\n\n\ttype(): CustomerPaymentSourceType {\n\t\treturn CustomerPaymentSources.TYPE\n\t}\n\n}\n\n\nconst instance = new CustomerPaymentSources()\nexport default instance\n\nexport type { CustomerPaymentSources, CustomerPaymentSource, CustomerPaymentSourceCreate, CustomerPaymentSourceUpdate, CustomerPaymentSourceType }\n"]}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { fu as CustomerPaymentSource, fv as CustomerPaymentSourceCreate, fx as CustomerPaymentSourceSort, lP as CustomerPaymentSourceType, fw as CustomerPaymentSourceUpdate, aC as CustomerPaymentSources, aB as default } from '../api-IwWtsAqE.cjs';
|
2
2
|
import '../client.cjs';
|
3
|
-
import '../interceptor-
|
3
|
+
import '../interceptor-k15jXzf0.cjs';
|
4
4
|
import '../types.cjs';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { fu as CustomerPaymentSource, fv as CustomerPaymentSourceCreate, fx as CustomerPaymentSourceSort, lP as CustomerPaymentSourceType, fw as CustomerPaymentSourceUpdate, aC as CustomerPaymentSources, aB as default } from '../api-F1F37Dud.js';
|
2
2
|
import '../client.js';
|
3
|
-
import '../interceptor-
|
3
|
+
import '../interceptor-k15jXzf0.js';
|
4
4
|
import '../types.js';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/resources/customer_payment_sources.ts"],"names":[],"mappings":";;AA2GA,MAAM,+BAA+B,WAAmC,CAAA;AAAA,EAEvE,OAAgB,I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AAA,EAAG,CAA4B,yBAAA,EAAA,wBAAwB,CAAmB,eAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC/J,EAEA,MAAM,QAAA,CAAS,uBAAyD,EAAA,MAAA,EAAmC,OAA2D,EAAA;AACrK,IAAM,MAAA,wBAAA,GAA4B,wBAAkD,EAAM,IAAA,uBAAA;AAC1F,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAe,EAAE,IAAA,EAAM,UAAW,EAAA,EAAG,CAA4B,yBAAA,EAAA,wBAAwB,CAAa,SAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC5I,EAGA,wBAAwB,QAAkD,EAAA;AACzE,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,sBAAuB,CAAA,IAAA;AAAA;AACnE,EAGA,aAAa,EAA0D,EAAA;AACtE,IAAO,OAAA,KAAA,CAAM,qBAA+C,EAAE,CAAA;AAAA;AAC/D,EAEA,sBAAsB,GAA2C,EAAA;AAChE,IAAO,OAAA,KAAA,CAAM,qBAAgD,CAAA,GAAG,GAAG,CAAA;AAAA;AACpE,EAGA,IAAkC,GAAA;AACjC,IAAA,OAAO,sBAAuB,CAAA,IAAA;AAAA;AAGhC;AAGA,MAAM,QAAA,GAAW,IAAI,sBAAuB,EAAA;AAC5C,IAAO,gCAAQ,GAAA","file":"customer_payment_sources.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 { Customer, CustomerType } from './customers'\nimport type { PaymentMethod, PaymentMethodType } from './payment_methods'\nimport type { Version } from './versions'\nimport type { AdyenPayment, AdyenPaymentType } from './adyen_payments'\nimport type { AxervePayment, AxervePaymentType } from './axerve_payments'\nimport type { BraintreePayment, BraintreePaymentType } from './braintree_payments'\nimport type { CheckoutComPayment, CheckoutComPaymentType } from './checkout_com_payments'\nimport type { ExternalPayment, ExternalPaymentType } from './external_payments'\nimport type { KlarnaPayment, KlarnaPaymentType } from './klarna_payments'\nimport type { PaypalPayment, PaypalPaymentType } from './paypal_payments'\nimport type { SatispayPayment, SatispayPaymentType } from './satispay_payments'\nimport type { StripePayment, StripePaymentType } from './stripe_payments'\nimport type { WireTransfer, WireTransferType } from './wire_transfers'\n\n\ntype CustomerPaymentSourceType = 'customer_payment_sources'\ntype CustomerPaymentSourceRel = ResourceRel & { type: CustomerPaymentSourceType }\ntype CustomerRel = ResourceRel & { type: CustomerType }\ntype PaymentMethodRel = ResourceRel & { type: PaymentMethodType }\ntype AdyenPaymentRel = ResourceRel & { type: AdyenPaymentType }\ntype AxervePaymentRel = ResourceRel & { type: AxervePaymentType }\ntype BraintreePaymentRel = ResourceRel & { type: BraintreePaymentType }\ntype CheckoutComPaymentRel = ResourceRel & { type: CheckoutComPaymentType }\ntype ExternalPaymentRel = ResourceRel & { type: ExternalPaymentType }\ntype KlarnaPaymentRel = ResourceRel & { type: KlarnaPaymentType }\ntype PaypalPaymentRel = ResourceRel & { type: PaypalPaymentType }\ntype SatispayPaymentRel = ResourceRel & { type: SatispayPaymentType }\ntype StripePaymentRel = ResourceRel & { type: StripePaymentType }\ntype WireTransferRel = ResourceRel & { type: WireTransferType }\n\n\nexport type CustomerPaymentSourceSort = Pick<CustomerPaymentSource, 'id'> & ResourceSort\n// export type CustomerPaymentSourceFilter = Pick<CustomerPaymentSource, 'id' | 'name' | 'payment_source_token'> & ResourceFilter\n\n\ninterface CustomerPaymentSource extends Resource {\n\t\n\treadonly type: CustomerPaymentSourceType\n\n\t/** \n\t * Returns the associated payment source's name.\n\t * @example ```\"XXXX-XXXX-XXXX-1111\"```\n\t */\n\tname?: string | null\n\t/** \n\t * Returns the customer gateway token stored in the gateway.\n\t * @example ```\"cus_xxxyyyzzz\"```\n\t */\n\tcustomer_token?: string | null\n\t/** \n\t * Returns the payment source token stored in the gateway.\n\t * @example ```\"pm_xxxyyyzzz\"```\n\t */\n\tpayment_source_token?: string | null\n\n\tcustomer?: Customer | null\n\tpayment_method?: PaymentMethod | null\n\tpayment_source?: AdyenPayment | AxervePayment | BraintreePayment | CheckoutComPayment | ExternalPayment | KlarnaPayment | PaypalPayment | SatispayPayment | StripePayment | WireTransfer | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface CustomerPaymentSourceCreate extends ResourceCreate {\n\t\n\t/** \n\t * Returns the customer gateway token stored in the gateway.\n\t * @example ```\"cus_xxxyyyzzz\"```\n\t */\n\tcustomer_token?: string | null\n\t/** \n\t * Returns the payment source token stored in the gateway.\n\t * @example ```\"pm_xxxyyyzzz\"```\n\t */\n\tpayment_source_token?: string | null\n\n\tcustomer: CustomerRel\n\tpayment_method?: PaymentMethodRel | null\n\tpayment_source?: AdyenPaymentRel | AxervePaymentRel | BraintreePaymentRel | CheckoutComPaymentRel | ExternalPaymentRel | KlarnaPaymentRel | PaypalPaymentRel | SatispayPaymentRel | StripePaymentRel | WireTransferRel | null\n\n}\n\n\ninterface CustomerPaymentSourceUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * Returns the customer gateway token stored in the gateway.\n\t * @example ```\"cus_xxxyyyzzz\"```\n\t */\n\tcustomer_token?: string | null\n\t/** \n\t * Returns the payment source token stored in the gateway.\n\t * @example ```\"pm_xxxyyyzzz\"```\n\t */\n\tpayment_source_token?: string | null\n\n\tcustomer?: CustomerRel | null\n\tpayment_method?: PaymentMethodRel | null\n\tpayment_source?: AdyenPaymentRel | AxervePaymentRel | BraintreePaymentRel | CheckoutComPaymentRel | ExternalPaymentRel | KlarnaPaymentRel | PaypalPaymentRel | SatispayPaymentRel | StripePaymentRel | WireTransferRel | null\n\n}\n\n\nclass CustomerPaymentSources extends ApiResource<CustomerPaymentSource> {\n\n\tstatic readonly TYPE: CustomerPaymentSourceType = 'customer_payment_sources' as const\n\n\tasync create(resource: CustomerPaymentSourceCreate, params?: QueryParamsRetrieve<CustomerPaymentSource>, options?: ResourcesConfig): Promise<CustomerPaymentSource> {\n\t\treturn this.resources.create<CustomerPaymentSourceCreate, CustomerPaymentSource>({ ...resource, type: CustomerPaymentSources.TYPE }, params, options)\n\t}\n\n\tasync update(resource: CustomerPaymentSourceUpdate, params?: QueryParamsRetrieve<CustomerPaymentSource>, options?: ResourcesConfig): Promise<CustomerPaymentSource> {\n\t\treturn this.resources.update<CustomerPaymentSourceUpdate, CustomerPaymentSource>({ ...resource, type: CustomerPaymentSources.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: CustomerPaymentSources.TYPE } : id, options)\n\t}\n\n\tasync customer(customerPaymentSourceId: string | CustomerPaymentSource, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\tconst _customerPaymentSourceId = (customerPaymentSourceId as CustomerPaymentSource).id || customerPaymentSourceId as string\n\t\treturn this.resources.fetch<Customer>({ type: 'customers' }, `customer_payment_sources/${_customerPaymentSourceId}/customer`, params, options) as unknown as Customer\n\t}\n\n\tasync payment_method(customerPaymentSourceId: string | CustomerPaymentSource, params?: QueryParamsRetrieve<PaymentMethod>, options?: ResourcesConfig): Promise<PaymentMethod> {\n\t\tconst _customerPaymentSourceId = (customerPaymentSourceId as CustomerPaymentSource).id || customerPaymentSourceId as string\n\t\treturn this.resources.fetch<PaymentMethod>({ type: 'payment_methods' }, `customer_payment_sources/${_customerPaymentSourceId}/payment_method`, params, options) as unknown as PaymentMethod\n\t}\n\n\tasync versions(customerPaymentSourceId: string | CustomerPaymentSource, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _customerPaymentSourceId = (customerPaymentSourceId as CustomerPaymentSource).id || customerPaymentSourceId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `customer_payment_sources/${_customerPaymentSourceId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisCustomerPaymentSource(resource: any): resource is CustomerPaymentSource {\n\t\treturn resource.type && (resource.type === CustomerPaymentSources.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CustomerPaymentSourceRel {\n\t\treturn super.relationshipOneToOne<CustomerPaymentSourceRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CustomerPaymentSourceRel[] {\n\t\treturn super.relationshipOneToMany<CustomerPaymentSourceRel>(...ids)\n\t}\n\n\n\ttype(): CustomerPaymentSourceType {\n\t\treturn CustomerPaymentSources.TYPE\n\t}\n\n}\n\n\nconst instance = new CustomerPaymentSources()\nexport default instance\n\nexport type { CustomerPaymentSource, CustomerPaymentSourceCreate, CustomerPaymentSourceUpdate, CustomerPaymentSourceType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/customer_payment_sources.ts"],"names":[],"mappings":";;AA2GA,MAAM,+BAA+B,WAAmC,CAAA;AAAA,EAEvE,OAAgB,IAAkC,GAAA,0BAAA;AAAA,EAElD,MAAM,MAAA,CAAO,QAAuC,EAAA,MAAA,EAAqD,OAA2D,EAAA;AACnK,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA2D,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,sBAAuB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACrJ,EAEA,MAAM,MAAA,CAAO,QAAuC,EAAA,MAAA,EAAqD,OAA2D,EAAA;AACnK,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA2D,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,sBAAuB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACrJ,EAEA,MAAM,MAAO,CAAA,EAAA,EAAyB,OAA0C,EAAA;AAC/E,IAAA,MAAM,IAAK,CAAA,SAAA,CAAU,MAAQ,CAAA,OAA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M,qBAA+C,EAAE,CAAA;AAAA;AAC/D,EAEA,sBAAsB,GAA2C,EAAA;AAChE,IAAO,OAAA,KAAA,CAAM,qBAAgD,CAAA,GAAG,GAAG,CAAA;AAAA;AACpE,EAGA,IAAkC,GAAA;AACjC,IAAA,OAAO,sBAAuB,CAAA,IAAA;AAAA;AAGhC;AAGA,MAAM,QAAA,GAAW,IAAI,sBAAuB,EAAA;AAC5C,IAAO,gCAAQ,GAAA","file":"customer_payment_sources.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 { Customer, CustomerType } from './customers'\nimport type { PaymentMethod, PaymentMethodType } from './payment_methods'\nimport type { Version } from './versions'\nimport type { AdyenPayment, AdyenPaymentType } from './adyen_payments'\nimport type { AxervePayment, AxervePaymentType } from './axerve_payments'\nimport type { BraintreePayment, BraintreePaymentType } from './braintree_payments'\nimport type { CheckoutComPayment, CheckoutComPaymentType } from './checkout_com_payments'\nimport type { ExternalPayment, ExternalPaymentType } from './external_payments'\nimport type { KlarnaPayment, KlarnaPaymentType } from './klarna_payments'\nimport type { PaypalPayment, PaypalPaymentType } from './paypal_payments'\nimport type { SatispayPayment, SatispayPaymentType } from './satispay_payments'\nimport type { StripePayment, StripePaymentType } from './stripe_payments'\nimport type { WireTransfer, WireTransferType } from './wire_transfers'\n\n\ntype CustomerPaymentSourceType = 'customer_payment_sources'\ntype CustomerPaymentSourceRel = ResourceRel & { type: CustomerPaymentSourceType }\ntype CustomerRel = ResourceRel & { type: CustomerType }\ntype PaymentMethodRel = ResourceRel & { type: PaymentMethodType }\ntype AdyenPaymentRel = ResourceRel & { type: AdyenPaymentType }\ntype AxervePaymentRel = ResourceRel & { type: AxervePaymentType }\ntype BraintreePaymentRel = ResourceRel & { type: BraintreePaymentType }\ntype CheckoutComPaymentRel = ResourceRel & { type: CheckoutComPaymentType }\ntype ExternalPaymentRel = ResourceRel & { type: ExternalPaymentType }\ntype KlarnaPaymentRel = ResourceRel & { type: KlarnaPaymentType }\ntype PaypalPaymentRel = ResourceRel & { type: PaypalPaymentType }\ntype SatispayPaymentRel = ResourceRel & { type: SatispayPaymentType }\ntype StripePaymentRel = ResourceRel & { type: StripePaymentType }\ntype WireTransferRel = ResourceRel & { type: WireTransferType }\n\n\nexport type CustomerPaymentSourceSort = Pick<CustomerPaymentSource, 'id'> & ResourceSort\n// export type CustomerPaymentSourceFilter = Pick<CustomerPaymentSource, 'id' | 'name' | 'payment_source_token'> & ResourceFilter\n\n\ninterface CustomerPaymentSource extends Resource {\n\t\n\treadonly type: CustomerPaymentSourceType\n\n\t/** \n\t * Returns the associated payment source's name.\n\t * @example ```\"XXXX-XXXX-XXXX-1111\"```\n\t */\n\tname?: string | null\n\t/** \n\t * Returns the customer gateway token stored in the gateway.\n\t * @example ```\"cus_xxxyyyzzz\"```\n\t */\n\tcustomer_token?: string | null\n\t/** \n\t * Returns the payment source token stored in the gateway.\n\t * @example ```\"pm_xxxyyyzzz\"```\n\t */\n\tpayment_source_token?: string | null\n\n\tcustomer?: Customer | null\n\tpayment_method?: PaymentMethod | null\n\tpayment_source?: AdyenPayment | AxervePayment | BraintreePayment | CheckoutComPayment | ExternalPayment | KlarnaPayment | PaypalPayment | SatispayPayment | StripePayment | WireTransfer | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface CustomerPaymentSourceCreate extends ResourceCreate {\n\t\n\t/** \n\t * Returns the customer gateway token stored in the gateway.\n\t * @example ```\"cus_xxxyyyzzz\"```\n\t */\n\tcustomer_token?: string | null\n\t/** \n\t * Returns the payment source token stored in the gateway.\n\t * @example ```\"pm_xxxyyyzzz\"```\n\t */\n\tpayment_source_token?: string | null\n\n\tcustomer: CustomerRel\n\tpayment_method?: PaymentMethodRel | null\n\tpayment_source?: AdyenPaymentRel | AxervePaymentRel | BraintreePaymentRel | CheckoutComPaymentRel | ExternalPaymentRel | KlarnaPaymentRel | PaypalPaymentRel | SatispayPaymentRel | StripePaymentRel | WireTransferRel | null\n\n}\n\n\ninterface CustomerPaymentSourceUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * Returns the customer gateway token stored in the gateway.\n\t * @example ```\"cus_xxxyyyzzz\"```\n\t */\n\tcustomer_token?: string | null\n\t/** \n\t * Returns the payment source token stored in the gateway.\n\t * @example ```\"pm_xxxyyyzzz\"```\n\t */\n\tpayment_source_token?: string | null\n\n\tcustomer?: CustomerRel | null\n\tpayment_method?: PaymentMethodRel | null\n\tpayment_source?: AdyenPaymentRel | AxervePaymentRel | BraintreePaymentRel | CheckoutComPaymentRel | ExternalPaymentRel | KlarnaPaymentRel | PaypalPaymentRel | SatispayPaymentRel | StripePaymentRel | WireTransferRel | null\n\n}\n\n\nclass CustomerPaymentSources extends ApiResource<CustomerPaymentSource> {\n\n\tstatic readonly TYPE: CustomerPaymentSourceType = 'customer_payment_sources' as const\n\n\tasync create(resource: CustomerPaymentSourceCreate, params?: QueryParamsRetrieve<CustomerPaymentSource>, options?: ResourcesConfig): Promise<CustomerPaymentSource> {\n\t\treturn this.resources.create<CustomerPaymentSourceCreate, CustomerPaymentSource>({ ...resource, type: CustomerPaymentSources.TYPE }, params, options)\n\t}\n\n\tasync update(resource: CustomerPaymentSourceUpdate, params?: QueryParamsRetrieve<CustomerPaymentSource>, options?: ResourcesConfig): Promise<CustomerPaymentSource> {\n\t\treturn this.resources.update<CustomerPaymentSourceUpdate, CustomerPaymentSource>({ ...resource, type: CustomerPaymentSources.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: CustomerPaymentSources.TYPE } : id, options)\n\t}\n\n\tasync customer(customerPaymentSourceId: string | CustomerPaymentSource, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\tconst _customerPaymentSourceId = (customerPaymentSourceId as CustomerPaymentSource).id || customerPaymentSourceId as string\n\t\treturn this.resources.fetch<Customer>({ type: 'customers' }, `customer_payment_sources/${_customerPaymentSourceId}/customer`, params, options) as unknown as Customer\n\t}\n\n\tasync payment_method(customerPaymentSourceId: string | CustomerPaymentSource, params?: QueryParamsRetrieve<PaymentMethod>, options?: ResourcesConfig): Promise<PaymentMethod> {\n\t\tconst _customerPaymentSourceId = (customerPaymentSourceId as CustomerPaymentSource).id || customerPaymentSourceId as string\n\t\treturn this.resources.fetch<PaymentMethod>({ type: 'payment_methods' }, `customer_payment_sources/${_customerPaymentSourceId}/payment_method`, params, options) as unknown as PaymentMethod\n\t}\n\n\tasync versions(customerPaymentSourceId: string | CustomerPaymentSource, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _customerPaymentSourceId = (customerPaymentSourceId as CustomerPaymentSource).id || customerPaymentSourceId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `customer_payment_sources/${_customerPaymentSourceId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisCustomerPaymentSource(resource: any): resource is CustomerPaymentSource {\n\t\treturn resource.type && (resource.type === CustomerPaymentSources.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CustomerPaymentSourceRel {\n\t\treturn super.relationshipOneToOne<CustomerPaymentSourceRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CustomerPaymentSourceRel[] {\n\t\treturn super.relationshipOneToMany<CustomerPaymentSourceRel>(...ids)\n\t}\n\n\n\ttype(): CustomerPaymentSourceType {\n\t\treturn CustomerPaymentSources.TYPE\n\t}\n\n}\n\n\nconst instance = new CustomerPaymentSources()\nexport default instance\n\nexport type { CustomerPaymentSources, CustomerPaymentSource, CustomerPaymentSourceCreate, CustomerPaymentSourceUpdate, CustomerPaymentSourceType }\n"]}
|