@commercelayer/sdk 7.0.0-rc.3 → 7.0.0-rc.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/lib/{api-DDgIE2i8.d.ts → api-F1F37Dud.d.ts} +27 -8
- package/lib/{api-DmIZO_Np.d.cts → api-IwWtsAqE.d.cts} +27 -8
- package/lib/api.d.cts +1 -1
- package/lib/api.d.ts +1 -1
- package/lib/bundle.cjs +568 -0
- package/lib/bundle.cjs.map +1 -0
- package/lib/bundle.d.cts +145 -0
- package/lib/bundle.d.ts +145 -0
- package/lib/bundle.js +546 -0
- package/lib/bundle.js.map +1 -0
- package/lib/commercelayer.cjs +2 -1
- package/lib/commercelayer.cjs.map +1 -1
- package/lib/commercelayer.d.cts +4 -4
- package/lib/commercelayer.d.ts +4 -4
- package/lib/commercelayer.js +2 -2
- package/lib/commercelayer.js.map +1 -1
- package/lib/enum.d.cts +1 -1
- package/lib/enum.d.ts +1 -1
- package/lib/index.d.cts +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/jsonapi.d.cts +1 -1
- package/lib/jsonapi.d.ts +1 -1
- package/lib/model.d.cts +1 -1
- package/lib/model.d.ts +1 -1
- package/lib/query.d.cts +1 -1
- package/lib/query.d.ts +1 -1
- package/lib/resource.cjs +7 -6
- package/lib/resource.cjs.map +1 -1
- package/lib/resource.d.cts +1 -1
- package/lib/resource.d.ts +1 -1
- package/lib/resource.js +7 -6
- package/lib/resource.js.map +1 -1
- package/lib/resources/addresses.cjs.map +1 -1
- package/lib/resources/addresses.d.cts +1 -1
- package/lib/resources/addresses.d.ts +1 -1
- package/lib/resources/addresses.js.map +1 -1
- package/lib/resources/adjustments.cjs.map +1 -1
- package/lib/resources/adjustments.d.cts +1 -1
- package/lib/resources/adjustments.d.ts +1 -1
- package/lib/resources/adjustments.js.map +1 -1
- package/lib/resources/adyen_gateways.cjs.map +1 -1
- package/lib/resources/adyen_gateways.d.cts +1 -1
- package/lib/resources/adyen_gateways.d.ts +1 -1
- package/lib/resources/adyen_gateways.js.map +1 -1
- package/lib/resources/adyen_payments.cjs.map +1 -1
- package/lib/resources/adyen_payments.d.cts +1 -1
- package/lib/resources/adyen_payments.d.ts +1 -1
- package/lib/resources/adyen_payments.js.map +1 -1
- package/lib/resources/applications.cjs.map +1 -1
- package/lib/resources/applications.d.cts +1 -1
- package/lib/resources/applications.d.ts +1 -1
- package/lib/resources/applications.js.map +1 -1
- package/lib/resources/attachments.cjs.map +1 -1
- package/lib/resources/attachments.d.cts +1 -1
- package/lib/resources/attachments.d.ts +1 -1
- package/lib/resources/attachments.js.map +1 -1
- package/lib/resources/authorizations.cjs.map +1 -1
- package/lib/resources/authorizations.d.cts +1 -1
- package/lib/resources/authorizations.d.ts +1 -1
- package/lib/resources/authorizations.js.map +1 -1
- package/lib/resources/avalara_accounts.cjs.map +1 -1
- package/lib/resources/avalara_accounts.d.cts +1 -1
- package/lib/resources/avalara_accounts.d.ts +1 -1
- package/lib/resources/avalara_accounts.js.map +1 -1
- package/lib/resources/axerve_gateways.cjs.map +1 -1
- package/lib/resources/axerve_gateways.d.cts +1 -1
- package/lib/resources/axerve_gateways.d.ts +1 -1
- package/lib/resources/axerve_gateways.js.map +1 -1
- package/lib/resources/axerve_payments.cjs.map +1 -1
- package/lib/resources/axerve_payments.d.cts +1 -1
- package/lib/resources/axerve_payments.d.ts +1 -1
- package/lib/resources/axerve_payments.js.map +1 -1
- package/lib/resources/bing_geocoders.cjs.map +1 -1
- package/lib/resources/bing_geocoders.d.cts +1 -1
- package/lib/resources/bing_geocoders.d.ts +1 -1
- package/lib/resources/bing_geocoders.js.map +1 -1
- package/lib/resources/braintree_gateways.cjs.map +1 -1
- package/lib/resources/braintree_gateways.d.cts +1 -1
- package/lib/resources/braintree_gateways.d.ts +1 -1
- package/lib/resources/braintree_gateways.js.map +1 -1
- package/lib/resources/braintree_payments.cjs.map +1 -1
- package/lib/resources/braintree_payments.d.cts +1 -1
- package/lib/resources/braintree_payments.d.ts +1 -1
- package/lib/resources/braintree_payments.js.map +1 -1
- package/lib/resources/bundles.cjs.map +1 -1
- package/lib/resources/bundles.d.cts +1 -1
- package/lib/resources/bundles.d.ts +1 -1
- package/lib/resources/bundles.js.map +1 -1
- package/lib/resources/buy_x_pay_y_promotions.cjs.map +1 -1
- package/lib/resources/buy_x_pay_y_promotions.d.cts +1 -1
- package/lib/resources/buy_x_pay_y_promotions.d.ts +1 -1
- package/lib/resources/buy_x_pay_y_promotions.js.map +1 -1
- package/lib/resources/captures.cjs.map +1 -1
- package/lib/resources/captures.d.cts +1 -1
- package/lib/resources/captures.d.ts +1 -1
- package/lib/resources/captures.js.map +1 -1
- package/lib/resources/carrier_accounts.cjs.map +1 -1
- package/lib/resources/carrier_accounts.d.cts +1 -1
- package/lib/resources/carrier_accounts.d.ts +1 -1
- package/lib/resources/carrier_accounts.js.map +1 -1
- package/lib/resources/checkout_com_gateways.cjs.map +1 -1
- package/lib/resources/checkout_com_gateways.d.cts +1 -1
- package/lib/resources/checkout_com_gateways.d.ts +1 -1
- package/lib/resources/checkout_com_gateways.js.map +1 -1
- package/lib/resources/checkout_com_payments.cjs.map +1 -1
- package/lib/resources/checkout_com_payments.d.cts +1 -1
- package/lib/resources/checkout_com_payments.d.ts +1 -1
- package/lib/resources/checkout_com_payments.js.map +1 -1
- package/lib/resources/cleanups.cjs.map +1 -1
- package/lib/resources/cleanups.d.cts +1 -1
- package/lib/resources/cleanups.d.ts +1 -1
- package/lib/resources/cleanups.js.map +1 -1
- package/lib/resources/coupon_codes_promotion_rules.cjs.map +1 -1
- package/lib/resources/coupon_codes_promotion_rules.d.cts +1 -1
- package/lib/resources/coupon_codes_promotion_rules.d.ts +1 -1
- package/lib/resources/coupon_codes_promotion_rules.js.map +1 -1
- package/lib/resources/coupon_recipients.cjs.map +1 -1
- package/lib/resources/coupon_recipients.d.cts +1 -1
- package/lib/resources/coupon_recipients.d.ts +1 -1
- package/lib/resources/coupon_recipients.js.map +1 -1
- package/lib/resources/coupons.cjs.map +1 -1
- package/lib/resources/coupons.d.cts +1 -1
- package/lib/resources/coupons.d.ts +1 -1
- package/lib/resources/coupons.js.map +1 -1
- package/lib/resources/custom_promotion_rules.cjs.map +1 -1
- package/lib/resources/custom_promotion_rules.d.cts +1 -1
- package/lib/resources/custom_promotion_rules.d.ts +1 -1
- package/lib/resources/custom_promotion_rules.js.map +1 -1
- package/lib/resources/customer_addresses.cjs.map +1 -1
- package/lib/resources/customer_addresses.d.cts +1 -1
- package/lib/resources/customer_addresses.d.ts +1 -1
- package/lib/resources/customer_addresses.js.map +1 -1
- package/lib/resources/customer_groups.cjs.map +1 -1
- package/lib/resources/customer_groups.d.cts +1 -1
- package/lib/resources/customer_groups.d.ts +1 -1
- package/lib/resources/customer_groups.js.map +1 -1
- package/lib/resources/customer_password_resets.cjs.map +1 -1
- package/lib/resources/customer_password_resets.d.cts +1 -1
- package/lib/resources/customer_password_resets.d.ts +1 -1
- package/lib/resources/customer_password_resets.js.map +1 -1
- package/lib/resources/customer_payment_sources.cjs.map +1 -1
- package/lib/resources/customer_payment_sources.d.cts +1 -1
- package/lib/resources/customer_payment_sources.d.ts +1 -1
- package/lib/resources/customer_payment_sources.js.map +1 -1
- package/lib/resources/customer_subscriptions.cjs.map +1 -1
- package/lib/resources/customer_subscriptions.d.cts +1 -1
- package/lib/resources/customer_subscriptions.d.ts +1 -1
- package/lib/resources/customer_subscriptions.js.map +1 -1
- package/lib/resources/customers.cjs.map +1 -1
- package/lib/resources/customers.d.cts +1 -1
- package/lib/resources/customers.d.ts +1 -1
- package/lib/resources/customers.js.map +1 -1
- package/lib/resources/delivery_lead_times.cjs.map +1 -1
- package/lib/resources/delivery_lead_times.d.cts +1 -1
- package/lib/resources/delivery_lead_times.d.ts +1 -1
- package/lib/resources/delivery_lead_times.js.map +1 -1
- package/lib/resources/discount_engine_items.cjs.map +1 -1
- package/lib/resources/discount_engine_items.d.cts +1 -1
- package/lib/resources/discount_engine_items.d.ts +1 -1
- package/lib/resources/discount_engine_items.js.map +1 -1
- package/lib/resources/discount_engines.cjs.map +1 -1
- package/lib/resources/discount_engines.d.cts +1 -1
- package/lib/resources/discount_engines.d.ts +1 -1
- package/lib/resources/discount_engines.js.map +1 -1
- package/lib/resources/easypost_pickups.cjs.map +1 -1
- package/lib/resources/easypost_pickups.d.cts +1 -1
- package/lib/resources/easypost_pickups.d.ts +1 -1
- package/lib/resources/easypost_pickups.js.map +1 -1
- package/lib/resources/event_callbacks.cjs.map +1 -1
- package/lib/resources/event_callbacks.d.cts +1 -1
- package/lib/resources/event_callbacks.d.ts +1 -1
- package/lib/resources/event_callbacks.js.map +1 -1
- package/lib/resources/events.cjs.map +1 -1
- package/lib/resources/events.d.cts +1 -1
- package/lib/resources/events.d.ts +1 -1
- package/lib/resources/events.js.map +1 -1
- package/lib/resources/exports.cjs.map +1 -1
- package/lib/resources/exports.d.cts +1 -1
- package/lib/resources/exports.d.ts +1 -1
- package/lib/resources/exports.js.map +1 -1
- package/lib/resources/external_gateways.cjs.map +1 -1
- package/lib/resources/external_gateways.d.cts +1 -1
- package/lib/resources/external_gateways.d.ts +1 -1
- package/lib/resources/external_gateways.js.map +1 -1
- package/lib/resources/external_payments.cjs.map +1 -1
- package/lib/resources/external_payments.d.cts +1 -1
- package/lib/resources/external_payments.d.ts +1 -1
- package/lib/resources/external_payments.js.map +1 -1
- package/lib/resources/external_promotions.cjs.map +1 -1
- package/lib/resources/external_promotions.d.cts +1 -1
- package/lib/resources/external_promotions.d.ts +1 -1
- package/lib/resources/external_promotions.js.map +1 -1
- package/lib/resources/external_tax_calculators.cjs.map +1 -1
- package/lib/resources/external_tax_calculators.d.cts +1 -1
- package/lib/resources/external_tax_calculators.d.ts +1 -1
- package/lib/resources/external_tax_calculators.js.map +1 -1
- package/lib/resources/fixed_amount_promotions.cjs.map +1 -1
- package/lib/resources/fixed_amount_promotions.d.cts +1 -1
- package/lib/resources/fixed_amount_promotions.d.ts +1 -1
- package/lib/resources/fixed_amount_promotions.js.map +1 -1
- package/lib/resources/fixed_price_promotions.cjs.map +1 -1
- package/lib/resources/fixed_price_promotions.d.cts +1 -1
- package/lib/resources/fixed_price_promotions.d.ts +1 -1
- package/lib/resources/fixed_price_promotions.js.map +1 -1
- package/lib/resources/flex_promotions.cjs.map +1 -1
- package/lib/resources/flex_promotions.d.cts +1 -1
- package/lib/resources/flex_promotions.d.ts +1 -1
- package/lib/resources/flex_promotions.js.map +1 -1
- package/lib/resources/free_gift_promotions.cjs.map +1 -1
- package/lib/resources/free_gift_promotions.d.cts +1 -1
- package/lib/resources/free_gift_promotions.d.ts +1 -1
- package/lib/resources/free_gift_promotions.js.map +1 -1
- package/lib/resources/free_shipping_promotions.cjs.map +1 -1
- package/lib/resources/free_shipping_promotions.d.cts +1 -1
- package/lib/resources/free_shipping_promotions.d.ts +1 -1
- package/lib/resources/free_shipping_promotions.js.map +1 -1
- package/lib/resources/geocoders.cjs.map +1 -1
- package/lib/resources/geocoders.d.cts +1 -1
- package/lib/resources/geocoders.d.ts +1 -1
- package/lib/resources/geocoders.js.map +1 -1
- package/lib/resources/gift_card_recipients.cjs.map +1 -1
- package/lib/resources/gift_card_recipients.d.cts +1 -1
- package/lib/resources/gift_card_recipients.d.ts +1 -1
- package/lib/resources/gift_card_recipients.js.map +1 -1
- package/lib/resources/gift_cards.cjs.map +1 -1
- package/lib/resources/gift_cards.d.cts +1 -1
- package/lib/resources/gift_cards.d.ts +1 -1
- package/lib/resources/gift_cards.js.map +1 -1
- package/lib/resources/google_geocoders.cjs.map +1 -1
- package/lib/resources/google_geocoders.d.cts +1 -1
- package/lib/resources/google_geocoders.d.ts +1 -1
- package/lib/resources/google_geocoders.js.map +1 -1
- package/lib/resources/imports.cjs.map +1 -1
- package/lib/resources/imports.d.cts +1 -1
- package/lib/resources/imports.d.ts +1 -1
- package/lib/resources/imports.js.map +1 -1
- package/lib/resources/in_stock_subscriptions.cjs.map +1 -1
- package/lib/resources/in_stock_subscriptions.d.cts +1 -1
- package/lib/resources/in_stock_subscriptions.d.ts +1 -1
- package/lib/resources/in_stock_subscriptions.js.map +1 -1
- package/lib/resources/inventory_models.cjs.map +1 -1
- package/lib/resources/inventory_models.d.cts +1 -1
- package/lib/resources/inventory_models.d.ts +1 -1
- package/lib/resources/inventory_models.js.map +1 -1
- package/lib/resources/inventory_return_locations.cjs.map +1 -1
- package/lib/resources/inventory_return_locations.d.cts +1 -1
- package/lib/resources/inventory_return_locations.d.ts +1 -1
- package/lib/resources/inventory_return_locations.js.map +1 -1
- package/lib/resources/inventory_stock_locations.cjs.map +1 -1
- package/lib/resources/inventory_stock_locations.d.cts +1 -1
- package/lib/resources/inventory_stock_locations.d.ts +1 -1
- package/lib/resources/inventory_stock_locations.js.map +1 -1
- package/lib/resources/klarna_gateways.cjs.map +1 -1
- package/lib/resources/klarna_gateways.d.cts +1 -1
- package/lib/resources/klarna_gateways.d.ts +1 -1
- package/lib/resources/klarna_gateways.js.map +1 -1
- package/lib/resources/klarna_payments.cjs.map +1 -1
- package/lib/resources/klarna_payments.d.cts +1 -1
- package/lib/resources/klarna_payments.d.ts +1 -1
- package/lib/resources/klarna_payments.js.map +1 -1
- package/lib/resources/line_item_options.cjs.map +1 -1
- package/lib/resources/line_item_options.d.cts +1 -1
- package/lib/resources/line_item_options.d.ts +1 -1
- package/lib/resources/line_item_options.js.map +1 -1
- package/lib/resources/line_items.cjs.map +1 -1
- package/lib/resources/line_items.d.cts +1 -1
- package/lib/resources/line_items.d.ts +1 -1
- package/lib/resources/line_items.js.map +1 -1
- package/lib/resources/links.cjs.map +1 -1
- package/lib/resources/links.d.cts +1 -1
- package/lib/resources/links.d.ts +1 -1
- package/lib/resources/links.js.map +1 -1
- package/lib/resources/manual_gateways.cjs.map +1 -1
- package/lib/resources/manual_gateways.d.cts +1 -1
- package/lib/resources/manual_gateways.d.ts +1 -1
- package/lib/resources/manual_gateways.js.map +1 -1
- package/lib/resources/manual_tax_calculators.cjs.map +1 -1
- package/lib/resources/manual_tax_calculators.d.cts +1 -1
- package/lib/resources/manual_tax_calculators.d.ts +1 -1
- package/lib/resources/manual_tax_calculators.js.map +1 -1
- package/lib/resources/markets.cjs +4 -0
- package/lib/resources/markets.cjs.map +1 -1
- package/lib/resources/markets.d.cts +1 -1
- package/lib/resources/markets.d.ts +1 -1
- package/lib/resources/markets.js +4 -0
- package/lib/resources/markets.js.map +1 -1
- package/lib/resources/merchants.cjs.map +1 -1
- package/lib/resources/merchants.d.cts +1 -1
- package/lib/resources/merchants.d.ts +1 -1
- package/lib/resources/merchants.js.map +1 -1
- package/lib/resources/notifications.cjs.map +1 -1
- package/lib/resources/notifications.d.cts +1 -1
- package/lib/resources/notifications.d.ts +1 -1
- package/lib/resources/notifications.js.map +1 -1
- package/lib/resources/order_amount_promotion_rules.cjs.map +1 -1
- package/lib/resources/order_amount_promotion_rules.d.cts +1 -1
- package/lib/resources/order_amount_promotion_rules.d.ts +1 -1
- package/lib/resources/order_amount_promotion_rules.js.map +1 -1
- package/lib/resources/order_copies.cjs.map +1 -1
- package/lib/resources/order_copies.d.cts +1 -1
- package/lib/resources/order_copies.d.ts +1 -1
- package/lib/resources/order_copies.js.map +1 -1
- package/lib/resources/order_factories.cjs.map +1 -1
- package/lib/resources/order_factories.d.cts +1 -1
- package/lib/resources/order_factories.d.ts +1 -1
- package/lib/resources/order_factories.js.map +1 -1
- package/lib/resources/order_subscription_items.cjs.map +1 -1
- package/lib/resources/order_subscription_items.d.cts +1 -1
- package/lib/resources/order_subscription_items.d.ts +1 -1
- package/lib/resources/order_subscription_items.js.map +1 -1
- package/lib/resources/order_subscriptions.cjs.map +1 -1
- package/lib/resources/order_subscriptions.d.cts +1 -1
- package/lib/resources/order_subscriptions.d.ts +1 -1
- package/lib/resources/order_subscriptions.js.map +1 -1
- package/lib/resources/orders.cjs +4 -0
- package/lib/resources/orders.cjs.map +1 -1
- package/lib/resources/orders.d.cts +1 -1
- package/lib/resources/orders.d.ts +1 -1
- package/lib/resources/orders.js +4 -0
- package/lib/resources/orders.js.map +1 -1
- package/lib/resources/organizations.cjs.map +1 -1
- package/lib/resources/organizations.d.cts +1 -1
- package/lib/resources/organizations.d.ts +1 -1
- package/lib/resources/organizations.js.map +1 -1
- package/lib/resources/packages.cjs.map +1 -1
- package/lib/resources/packages.d.cts +1 -1
- package/lib/resources/packages.d.ts +1 -1
- package/lib/resources/packages.js.map +1 -1
- package/lib/resources/parcel_line_items.cjs.map +1 -1
- package/lib/resources/parcel_line_items.d.cts +1 -1
- package/lib/resources/parcel_line_items.d.ts +1 -1
- package/lib/resources/parcel_line_items.js.map +1 -1
- package/lib/resources/parcels.cjs.map +1 -1
- package/lib/resources/parcels.d.cts +1 -1
- package/lib/resources/parcels.d.ts +1 -1
- package/lib/resources/parcels.js.map +1 -1
- package/lib/resources/payment_gateways.cjs.map +1 -1
- package/lib/resources/payment_gateways.d.cts +1 -1
- package/lib/resources/payment_gateways.d.ts +1 -1
- package/lib/resources/payment_gateways.js.map +1 -1
- package/lib/resources/payment_methods.cjs.map +1 -1
- package/lib/resources/payment_methods.d.cts +1 -1
- package/lib/resources/payment_methods.d.ts +1 -1
- package/lib/resources/payment_methods.js.map +1 -1
- package/lib/resources/payment_options.cjs.map +1 -1
- package/lib/resources/payment_options.d.cts +1 -1
- package/lib/resources/payment_options.d.ts +1 -1
- package/lib/resources/payment_options.js.map +1 -1
- package/lib/resources/paypal_gateways.cjs.map +1 -1
- package/lib/resources/paypal_gateways.d.cts +1 -1
- package/lib/resources/paypal_gateways.d.ts +1 -1
- package/lib/resources/paypal_gateways.js.map +1 -1
- package/lib/resources/paypal_payments.cjs.map +1 -1
- package/lib/resources/paypal_payments.d.cts +1 -1
- package/lib/resources/paypal_payments.d.ts +1 -1
- package/lib/resources/paypal_payments.js.map +1 -1
- package/lib/resources/percentage_discount_promotions.cjs.map +1 -1
- package/lib/resources/percentage_discount_promotions.d.cts +1 -1
- package/lib/resources/percentage_discount_promotions.d.ts +1 -1
- package/lib/resources/percentage_discount_promotions.js.map +1 -1
- package/lib/resources/pickups.cjs.map +1 -1
- package/lib/resources/pickups.d.cts +1 -1
- package/lib/resources/pickups.d.ts +1 -1
- package/lib/resources/pickups.js.map +1 -1
- package/lib/resources/price_frequency_tiers.cjs.map +1 -1
- package/lib/resources/price_frequency_tiers.d.cts +1 -1
- package/lib/resources/price_frequency_tiers.d.ts +1 -1
- package/lib/resources/price_frequency_tiers.js.map +1 -1
- package/lib/resources/price_list_schedulers.cjs.map +1 -1
- package/lib/resources/price_list_schedulers.d.cts +1 -1
- package/lib/resources/price_list_schedulers.d.ts +1 -1
- package/lib/resources/price_list_schedulers.js.map +1 -1
- package/lib/resources/price_lists.cjs.map +1 -1
- package/lib/resources/price_lists.d.cts +1 -1
- package/lib/resources/price_lists.d.ts +1 -1
- package/lib/resources/price_lists.js.map +1 -1
- package/lib/resources/price_tiers.cjs.map +1 -1
- package/lib/resources/price_tiers.d.cts +1 -1
- package/lib/resources/price_tiers.d.ts +1 -1
- package/lib/resources/price_tiers.js.map +1 -1
- package/lib/resources/price_volume_tiers.cjs.map +1 -1
- package/lib/resources/price_volume_tiers.d.cts +1 -1
- package/lib/resources/price_volume_tiers.d.ts +1 -1
- package/lib/resources/price_volume_tiers.js.map +1 -1
- package/lib/resources/prices.cjs.map +1 -1
- package/lib/resources/prices.d.cts +1 -1
- package/lib/resources/prices.d.ts +1 -1
- package/lib/resources/prices.js.map +1 -1
- package/lib/resources/promotion_rules.cjs.map +1 -1
- package/lib/resources/promotion_rules.d.cts +1 -1
- package/lib/resources/promotion_rules.d.ts +1 -1
- package/lib/resources/promotion_rules.js.map +1 -1
- package/lib/resources/promotions.cjs.map +1 -1
- package/lib/resources/promotions.d.cts +1 -1
- package/lib/resources/promotions.d.ts +1 -1
- package/lib/resources/promotions.js.map +1 -1
- package/lib/resources/recurring_order_copies.cjs.map +1 -1
- package/lib/resources/recurring_order_copies.d.cts +1 -1
- package/lib/resources/recurring_order_copies.d.ts +1 -1
- package/lib/resources/recurring_order_copies.js.map +1 -1
- package/lib/resources/refunds.cjs.map +1 -1
- package/lib/resources/refunds.d.cts +1 -1
- package/lib/resources/refunds.d.ts +1 -1
- package/lib/resources/refunds.js.map +1 -1
- package/lib/resources/reserved_stocks.cjs.map +1 -1
- package/lib/resources/reserved_stocks.d.cts +1 -1
- package/lib/resources/reserved_stocks.d.ts +1 -1
- package/lib/resources/reserved_stocks.js.map +1 -1
- package/lib/resources/resource_errors.cjs.map +1 -1
- package/lib/resources/resource_errors.d.cts +1 -1
- package/lib/resources/resource_errors.d.ts +1 -1
- package/lib/resources/resource_errors.js.map +1 -1
- package/lib/resources/return_line_items.cjs.map +1 -1
- package/lib/resources/return_line_items.d.cts +1 -1
- package/lib/resources/return_line_items.d.ts +1 -1
- package/lib/resources/return_line_items.js.map +1 -1
- package/lib/resources/returns.cjs.map +1 -1
- package/lib/resources/returns.d.cts +1 -1
- package/lib/resources/returns.d.ts +1 -1
- package/lib/resources/returns.js.map +1 -1
- package/lib/resources/satispay_gateways.cjs.map +1 -1
- package/lib/resources/satispay_gateways.d.cts +1 -1
- package/lib/resources/satispay_gateways.d.ts +1 -1
- package/lib/resources/satispay_gateways.js.map +1 -1
- package/lib/resources/satispay_payments.cjs.map +1 -1
- package/lib/resources/satispay_payments.d.cts +1 -1
- package/lib/resources/satispay_payments.d.ts +1 -1
- package/lib/resources/satispay_payments.js.map +1 -1
- package/lib/resources/shipments.cjs.map +1 -1
- package/lib/resources/shipments.d.cts +1 -1
- package/lib/resources/shipments.d.ts +1 -1
- package/lib/resources/shipments.js.map +1 -1
- package/lib/resources/shipping_categories.cjs.map +1 -1
- package/lib/resources/shipping_categories.d.cts +1 -1
- package/lib/resources/shipping_categories.d.ts +1 -1
- package/lib/resources/shipping_categories.js.map +1 -1
- package/lib/resources/shipping_method_tiers.cjs.map +1 -1
- package/lib/resources/shipping_method_tiers.d.cts +1 -1
- package/lib/resources/shipping_method_tiers.d.ts +1 -1
- package/lib/resources/shipping_method_tiers.js.map +1 -1
- package/lib/resources/shipping_methods.cjs.map +1 -1
- package/lib/resources/shipping_methods.d.cts +1 -1
- package/lib/resources/shipping_methods.d.ts +1 -1
- package/lib/resources/shipping_methods.js.map +1 -1
- package/lib/resources/shipping_weight_tiers.cjs.map +1 -1
- package/lib/resources/shipping_weight_tiers.d.cts +1 -1
- package/lib/resources/shipping_weight_tiers.d.ts +1 -1
- package/lib/resources/shipping_weight_tiers.js.map +1 -1
- package/lib/resources/shipping_zones.cjs.map +1 -1
- package/lib/resources/shipping_zones.d.cts +1 -1
- package/lib/resources/shipping_zones.d.ts +1 -1
- package/lib/resources/shipping_zones.js.map +1 -1
- package/lib/resources/sku_list_items.cjs.map +1 -1
- package/lib/resources/sku_list_items.d.cts +1 -1
- package/lib/resources/sku_list_items.d.ts +1 -1
- package/lib/resources/sku_list_items.js.map +1 -1
- package/lib/resources/sku_list_promotion_rules.cjs.map +1 -1
- package/lib/resources/sku_list_promotion_rules.d.cts +1 -1
- package/lib/resources/sku_list_promotion_rules.d.ts +1 -1
- package/lib/resources/sku_list_promotion_rules.js.map +1 -1
- package/lib/resources/sku_lists.cjs.map +1 -1
- package/lib/resources/sku_lists.d.cts +1 -1
- package/lib/resources/sku_lists.d.ts +1 -1
- package/lib/resources/sku_lists.js.map +1 -1
- package/lib/resources/sku_options.cjs.map +1 -1
- package/lib/resources/sku_options.d.cts +1 -1
- package/lib/resources/sku_options.d.ts +1 -1
- package/lib/resources/sku_options.js.map +1 -1
- package/lib/resources/skus.cjs.map +1 -1
- package/lib/resources/skus.d.cts +1 -1
- package/lib/resources/skus.d.ts +1 -1
- package/lib/resources/skus.js.map +1 -1
- package/lib/resources/stock_items.cjs.map +1 -1
- package/lib/resources/stock_items.d.cts +1 -1
- package/lib/resources/stock_items.d.ts +1 -1
- package/lib/resources/stock_items.js.map +1 -1
- package/lib/resources/stock_line_items.cjs.map +1 -1
- package/lib/resources/stock_line_items.d.cts +1 -1
- package/lib/resources/stock_line_items.d.ts +1 -1
- package/lib/resources/stock_line_items.js.map +1 -1
- package/lib/resources/stock_locations.cjs.map +1 -1
- package/lib/resources/stock_locations.d.cts +1 -1
- package/lib/resources/stock_locations.d.ts +1 -1
- package/lib/resources/stock_locations.js.map +1 -1
- package/lib/resources/stock_reservations.cjs.map +1 -1
- package/lib/resources/stock_reservations.d.cts +1 -1
- package/lib/resources/stock_reservations.d.ts +1 -1
- package/lib/resources/stock_reservations.js.map +1 -1
- package/lib/resources/stock_transfers.cjs.map +1 -1
- package/lib/resources/stock_transfers.d.cts +1 -1
- package/lib/resources/stock_transfers.d.ts +1 -1
- package/lib/resources/stock_transfers.js.map +1 -1
- package/lib/resources/stores.cjs.map +1 -1
- package/lib/resources/stores.d.cts +1 -1
- package/lib/resources/stores.d.ts +1 -1
- package/lib/resources/stores.js.map +1 -1
- package/lib/resources/stripe_gateways.cjs.map +1 -1
- package/lib/resources/stripe_gateways.d.cts +1 -1
- package/lib/resources/stripe_gateways.d.ts +1 -1
- package/lib/resources/stripe_gateways.js.map +1 -1
- package/lib/resources/stripe_payments.cjs.map +1 -1
- package/lib/resources/stripe_payments.d.cts +1 -1
- package/lib/resources/stripe_payments.d.ts +1 -1
- package/lib/resources/stripe_payments.js.map +1 -1
- package/lib/resources/stripe_tax_accounts.cjs.map +1 -1
- package/lib/resources/stripe_tax_accounts.d.cts +1 -1
- package/lib/resources/stripe_tax_accounts.d.ts +1 -1
- package/lib/resources/stripe_tax_accounts.js.map +1 -1
- package/lib/resources/subscription_models.cjs.map +1 -1
- package/lib/resources/subscription_models.d.cts +1 -1
- package/lib/resources/subscription_models.d.ts +1 -1
- package/lib/resources/subscription_models.js.map +1 -1
- package/lib/resources/tags.cjs.map +1 -1
- package/lib/resources/tags.d.cts +1 -1
- package/lib/resources/tags.d.ts +1 -1
- package/lib/resources/tags.js.map +1 -1
- package/lib/resources/talon_one_accounts.cjs.map +1 -1
- package/lib/resources/talon_one_accounts.d.cts +1 -1
- package/lib/resources/talon_one_accounts.d.ts +1 -1
- package/lib/resources/talon_one_accounts.js.map +1 -1
- package/lib/resources/tax_calculators.cjs.map +1 -1
- package/lib/resources/tax_calculators.d.cts +1 -1
- package/lib/resources/tax_calculators.d.ts +1 -1
- package/lib/resources/tax_calculators.js.map +1 -1
- package/lib/resources/tax_categories.cjs.map +1 -1
- package/lib/resources/tax_categories.d.cts +1 -1
- package/lib/resources/tax_categories.d.ts +1 -1
- package/lib/resources/tax_categories.js.map +1 -1
- package/lib/resources/tax_rules.cjs.map +1 -1
- package/lib/resources/tax_rules.d.cts +1 -1
- package/lib/resources/tax_rules.d.ts +1 -1
- package/lib/resources/tax_rules.js.map +1 -1
- package/lib/resources/taxjar_accounts.cjs.map +1 -1
- package/lib/resources/taxjar_accounts.d.cts +1 -1
- package/lib/resources/taxjar_accounts.d.ts +1 -1
- package/lib/resources/taxjar_accounts.js.map +1 -1
- package/lib/resources/transactions.cjs.map +1 -1
- package/lib/resources/transactions.d.cts +1 -1
- package/lib/resources/transactions.d.ts +1 -1
- package/lib/resources/transactions.js.map +1 -1
- package/lib/resources/versions.cjs.map +1 -1
- package/lib/resources/versions.d.cts +1 -1
- package/lib/resources/versions.d.ts +1 -1
- package/lib/resources/versions.js.map +1 -1
- package/lib/resources/vertex_accounts.cjs.map +1 -1
- package/lib/resources/vertex_accounts.d.cts +1 -1
- package/lib/resources/vertex_accounts.d.ts +1 -1
- package/lib/resources/vertex_accounts.js.map +1 -1
- package/lib/resources/voids.cjs.map +1 -1
- package/lib/resources/voids.d.cts +1 -1
- package/lib/resources/voids.d.ts +1 -1
- package/lib/resources/voids.js.map +1 -1
- package/lib/resources/webhooks.cjs.map +1 -1
- package/lib/resources/webhooks.d.cts +1 -1
- package/lib/resources/webhooks.d.ts +1 -1
- package/lib/resources/webhooks.js.map +1 -1
- package/lib/resources/wire_transfers.cjs.map +1 -1
- package/lib/resources/wire_transfers.d.cts +1 -1
- package/lib/resources/wire_transfers.d.ts +1 -1
- package/lib/resources/wire_transfers.js.map +1 -1
- package/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,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.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,E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,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 { 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
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
3
|
import '../interceptor-k15jXzf0.js';
|
4
4
|
import '../types.js';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/resources/customer_password_resets.ts"],"names":[],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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 { 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,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ourceCreate, 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,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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 { CustomerPaymentSource, CustomerPaymentSourceCreate, CustomerPaymentSourceUpdate, CustomerPaymentSourceType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/customer_payment_sources.ts"],"names":["ApiResource"],"mappings":";;;;AA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AK,SAAU,CAAA,KAAA,CAAqB,EAAE,IAAA,EAAM,iBAAkB,EAAA,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.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
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
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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AA,CAAqB,EAAE,IAAA,EAAM,iBAAkB,EAAA,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,IA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A0D,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 { CustomerPaymentSources, CustomerPaymentSource, CustomerPaymentSourceCreate, CustomerPaymentSourceUpdate, CustomerPaymentSourceType }\n"]}
|
@@ -1 +1 @@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MAAA,uBAAA,GAA2B,uBAAgD,EAAM,IAAA,sBAAA;AACvF,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAa,EAAE,IAAA,EAAM,QAAS,EAAA,EAAG,CAA0B,uBAAA,EAAA,uBAAuB,CAAW,OAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACnI,EAEA,MAAM,QAAA,CAAS,sBAAuD,EAAA,MAAA,EAAmC,OAA2D,EAAA;AACnK,IAAM,MAAA,uBAAA,GAA2B,uBAAgD,EAAM,IAAA,sBAAA;AACvF,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAe,EAAE,IAAA,EAAM,UAAW,EAAA,EAAG,CAA0B,uBAAA,EAAA,uBAAuB,CAAa,SAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACzI,EAGA,uBAAuB,QAAiD,EAAA;AACvE,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,qBAAsB,CAAA,IAAA;AAAA;AAClE,EAGA,aAAa,EAAyD,EAAA;AACrE,IAAO,OAAA,KAAA,CAAM,qBAA8C,EAAE,CAAA;AAAA;AAC9D,EAEA,sBAAsB,GAA0C,EAAA;AAC/D,IAAO,OAAA,KAAA,CAAM,qBAA+C,CAAA,GAAG,GAAG,CAAA;AAAA;AACnE,EAGA,IAAiC,GAAA;AAChC,IAAA,OAAO,qBAAsB,CAAA,IAAA;AAAA;AAG/B;AAGA,MAAM,QAAA,GAAW,IAAI,qBAAsB,EAAA;AAC3C,IAAO,8BAAQ,GAAA","file":"customer_subscriptions.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'\nimport type { Version } from './versions'\n\n\ntype CustomerSubscriptionType = 'customer_subscriptions'\ntype CustomerSubscriptionRel = ResourceRel & { type: CustomerSubscriptionType }\n\n\nexport type CustomerSubscriptionSort = Pick<CustomerSubscription, 'id'> & ResourceSort\n// export type CustomerSubscriptionFilter = Pick<CustomerSubscription, 'id'> & ResourceFilter\n\n\ninterface CustomerSubscription extends Resource {\n\t\n\treadonly type: CustomerSubscriptionType\n\n\t/** \n\t * The email of the customer that owns the subscription.\n\t * @example ```\"john@example.com\"```\n\t */\n\tcustomer_email: string\n\n\tcustomer?: Customer | null\n\tevents?: Event[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface CustomerSubscriptionCreate extends ResourceCreate {\n\t\n\t/** \n\t * The email of the customer that owns the subscription.\n\t * @example ```\"john@example.com\"```\n\t */\n\tcustomer_email: string\n\t\n}\n\n\ntype CustomerSubscriptionUpdate = ResourceUpdate\n\n\nclass CustomerSubscriptions extends ApiResource<CustomerSubscription> {\n\n\tstatic readonly TYPE: CustomerSubscriptionType = 'customer_subscriptions' as const\n\n\tasync create(resource: CustomerSubscriptionCreate, params?: QueryParamsRetrieve<CustomerSubscription>, options?: ResourcesConfig): Promise<CustomerSubscription> {\n\t\treturn this.resources.create<CustomerSubscriptionCreate, CustomerSubscription>({ ...resource, type: CustomerSubscriptions.TYPE }, params, options)\n\t}\n\n\tasync update(resource: CustomerSubscriptionUpdate, params?: QueryParamsRetrieve<CustomerSubscription>, options?: ResourcesConfig): Promise<CustomerSubscription> {\n\t\treturn this.resources.update<CustomerSubscriptionUpdate, CustomerSubscription>({ ...resource, type: CustomerSubscriptions.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: CustomerSubscriptions.TYPE } : id, options)\n\t}\n\n\tasync customer(customerSubscriptionId: string | CustomerSubscription, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\tconst _customerSubscriptionId = (customerSubscriptionId as CustomerSubscription).id || customerSubscriptionId as string\n\t\treturn this.resources.fetch<Customer>({ type: 'customers' }, `customer_subscriptions/${_customerSubscriptionId}/customer`, params, options) as unknown as Customer\n\t}\n\n\tasync events(customerSubscriptionId: string | CustomerSubscription, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _customerSubscriptionId = (customerSubscriptionId as CustomerSubscription).id || customerSubscriptionId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `customer_subscriptions/${_customerSubscriptionId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync versions(customerSubscriptionId: string | CustomerSubscription, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _customerSubscriptionId = (customerSubscriptionId as CustomerSubscription).id || customerSubscriptionId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `customer_subscriptions/${_customerSubscriptionId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisCustomerSubscription(resource: any): resource is CustomerSubscription {\n\t\treturn resource.type && (resource.type === CustomerSubscriptions.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CustomerSubscriptionRel {\n\t\treturn super.relationshipOneToOne<CustomerSubscriptionRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CustomerSubscriptionRel[] {\n\t\treturn super.relationshipOneToMany<CustomerSubscriptionRel>(...ids)\n\t}\n\n\n\ttype(): CustomerSubscriptionType {\n\t\treturn CustomerSubscriptions.TYPE\n\t}\n\n}\n\n\nconst instance = new CustomerSubscriptions()\nexport default instance\n\nexport type { CustomerSubscription, CustomerSubscriptionCreate, CustomerSubscriptionUpdate, CustomerSubscriptionType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/customer_subscriptions.ts"],"names":["ApiResource"],"mappings":";;;;AAgDA,MAAM,8BAA8BA,oBAAkC,CAAA;AAAA,EAErE,OAAgB,IAAiC,GAAA,wB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BAAA,EAAA,uBAAuB,CAAW,OAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACnI,EAEA,MAAM,QAAA,CAAS,sBAAuD,EAAA,MAAA,EAAmC,OAA2D,EAAA;AACnK,IAAM,MAAA,uBAAA,GAA2B,uBAAgD,EAAM,IAAA,sBAAA;AACvF,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAe,EAAE,IAAA,EAAM,UAAW,EAAA,EAAG,CAA0B,uBAAA,EAAA,uBAAuB,CAAa,SAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACzI,EAGA,uBAAuB,QAAiD,EAAA;AACvE,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,qBAAsB,CAAA,IAAA;AAAA;AAClE,EAGA,aAAa,EAAyD,EAAA;AACrE,IAAO,OAAA,KAAA,CAAM,qBAA8C,EAAE,CAAA;AAAA;AAC9D,EAEA,sBAAsB,GAA0C,EAAA;AAC/D,IAAO,OAAA,KAAA,CAAM,qBAA+C,CAAA,GAAG,GAAG,CAAA;AAAA;AACnE,EAGA,IAAiC,GAAA;AAChC,IAAA,OAAO,qBAAsB,CAAA,IAAA;AAAA;AAG/B;AAGA,MAAM,QAAA,GAAW,IAAI,qBAAsB,EAAA;AAC3C,IAAO,8BAAQ,GAAA","file":"customer_subscriptions.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'\nimport type { Version } from './versions'\n\n\ntype CustomerSubscriptionType = 'customer_subscriptions'\ntype CustomerSubscriptionRel = ResourceRel & { type: CustomerSubscriptionType }\n\n\nexport type CustomerSubscriptionSort = Pick<CustomerSubscription, 'id'> & ResourceSort\n// export type CustomerSubscriptionFilter = Pick<CustomerSubscription, 'id'> & ResourceFilter\n\n\ninterface CustomerSubscription extends Resource {\n\t\n\treadonly type: CustomerSubscriptionType\n\n\t/** \n\t * The email of the customer that owns the subscription.\n\t * @example ```\"john@example.com\"```\n\t */\n\tcustomer_email: string\n\n\tcustomer?: Customer | null\n\tevents?: Event[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface CustomerSubscriptionCreate extends ResourceCreate {\n\t\n\t/** \n\t * The email of the customer that owns the subscription.\n\t * @example ```\"john@example.com\"```\n\t */\n\tcustomer_email: string\n\t\n}\n\n\ntype CustomerSubscriptionUpdate = ResourceUpdate\n\n\nclass CustomerSubscriptions extends ApiResource<CustomerSubscription> {\n\n\tstatic readonly TYPE: CustomerSubscriptionType = 'customer_subscriptions' as const\n\n\tasync create(resource: CustomerSubscriptionCreate, params?: QueryParamsRetrieve<CustomerSubscription>, options?: ResourcesConfig): Promise<CustomerSubscription> {\n\t\treturn this.resources.create<CustomerSubscriptionCreate, CustomerSubscription>({ ...resource, type: CustomerSubscriptions.TYPE }, params, options)\n\t}\n\n\tasync update(resource: CustomerSubscriptionUpdate, params?: QueryParamsRetrieve<CustomerSubscription>, options?: ResourcesConfig): Promise<CustomerSubscription> {\n\t\treturn this.resources.update<CustomerSubscriptionUpdate, CustomerSubscription>({ ...resource, type: CustomerSubscriptions.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: CustomerSubscriptions.TYPE } : id, options)\n\t}\n\n\tasync customer(customerSubscriptionId: string | CustomerSubscription, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\tconst _customerSubscriptionId = (customerSubscriptionId as CustomerSubscription).id || customerSubscriptionId as string\n\t\treturn this.resources.fetch<Customer>({ type: 'customers' }, `customer_subscriptions/${_customerSubscriptionId}/customer`, params, options) as unknown as Customer\n\t}\n\n\tasync events(customerSubscriptionId: string | CustomerSubscription, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _customerSubscriptionId = (customerSubscriptionId as CustomerSubscription).id || customerSubscriptionId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `customer_subscriptions/${_customerSubscriptionId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync versions(customerSubscriptionId: string | CustomerSubscription, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _customerSubscriptionId = (customerSubscriptionId as CustomerSubscription).id || customerSubscriptionId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `customer_subscriptions/${_customerSubscriptionId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisCustomerSubscription(resource: any): resource is CustomerSubscription {\n\t\treturn resource.type && (resource.type === CustomerSubscriptions.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CustomerSubscriptionRel {\n\t\treturn super.relationshipOneToOne<CustomerSubscriptionRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CustomerSubscriptionRel[] {\n\t\treturn super.relationshipOneToMany<CustomerSubscriptionRel>(...ids)\n\t}\n\n\n\ttype(): CustomerSubscriptionType {\n\t\treturn CustomerSubscriptions.TYPE\n\t}\n\n}\n\n\nconst instance = new CustomerSubscriptions()\nexport default instance\n\nexport type { CustomerSubscriptions, CustomerSubscription, CustomerSubscriptionCreate, CustomerSubscriptionUpdate, CustomerSubscriptionType }\n"]}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { fy as CustomerSubscription, fz as CustomerSubscriptionCreate, fB as CustomerSubscriptionSort, lQ as CustomerSubscriptionType, fA as CustomerSubscriptionUpdate, aE as CustomerSubscriptions, aD as default } from '../api-IwWtsAqE.cjs';
|
2
2
|
import '../client.cjs';
|
3
3
|
import '../interceptor-k15jXzf0.cjs';
|
4
4
|
import '../types.cjs';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { fy as CustomerSubscription, fz as CustomerSubscriptionCreate, fB as CustomerSubscriptionSort, lQ as CustomerSubscriptionType, fA as CustomerSubscriptionUpdate, aE as CustomerSubscriptions, aD as default } from '../api-F1F37Dud.js';
|
2
2
|
import '../client.js';
|
3
3
|
import '../interceptor-k15jXzf0.js';
|
4
4
|
import '../types.js';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/resources/customer_subscriptions.ts"],"names":[],"mappings":";;AAgDA,MAAM,8BAA8B,WAAkC,CAAA;AAAA,EAErE,OAAgB,IAAiC,GAAA,wBAAA;AAAA,EAEjD,MAAM,MAAA,CAAO,QAAsC,EAAA,MAAA,EAAoD,OAA0D,EAAA;AAChK,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAyD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,qBAAsB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAClJ,EAEA,MAAM,MAAA,CAAO,QAAsC,EAAA,MAAA,EAAoD,OAA0D,EAAA;AAChK,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAyD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,qBAAsB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAClJ,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,qBAAA,CAAsB,IAAK,EAAA,GAAI,IAAI,OAAO,CAAA;AAAA;AAC7G,EAEA,MAAM,QAAA,CAAS,sBAAuD,EAAA,MAAA,EAAwC,OAA8C,EAAA;AAC3J,IAAM,MAAA,uBAAA,GAA2B,uBAAgD,EAAM,IAAA,sBAAA;AACvF,IA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O,8BAAQ,GAAA","file":"customer_subscriptions.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'\nimport type { Version } from './versions'\n\n\ntype CustomerSubscriptionType = 'customer_subscriptions'\ntype CustomerSubscriptionRel = ResourceRel & { type: CustomerSubscriptionType }\n\n\nexport type CustomerSubscriptionSort = Pick<CustomerSubscription, 'id'> & ResourceSort\n// export type CustomerSubscriptionFilter = Pick<CustomerSubscription, 'id'> & ResourceFilter\n\n\ninterface CustomerSubscription extends Resource {\n\t\n\treadonly type: CustomerSubscriptionType\n\n\t/** \n\t * The email of the customer that owns the subscription.\n\t * @example ```\"john@example.com\"```\n\t */\n\tcustomer_email: string\n\n\tcustomer?: Customer | null\n\tevents?: Event[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface CustomerSubscriptionCreate extends ResourceCreate {\n\t\n\t/** \n\t * The email of the customer that owns the subscription.\n\t * @example ```\"john@example.com\"```\n\t */\n\tcustomer_email: string\n\t\n}\n\n\ntype CustomerSubscriptionUpdate = ResourceUpdate\n\n\nclass CustomerSubscriptions extends ApiResource<CustomerSubscription> {\n\n\tstatic readonly TYPE: CustomerSubscriptionType = 'customer_subscriptions' as const\n\n\tasync create(resource: CustomerSubscriptionCreate, params?: QueryParamsRetrieve<CustomerSubscription>, options?: ResourcesConfig): Promise<CustomerSubscription> {\n\t\treturn this.resources.create<CustomerSubscriptionCreate, CustomerSubscription>({ ...resource, type: CustomerSubscriptions.TYPE }, params, options)\n\t}\n\n\tasync update(resource: CustomerSubscriptionUpdate, params?: QueryParamsRetrieve<CustomerSubscription>, options?: ResourcesConfig): Promise<CustomerSubscription> {\n\t\treturn this.resources.update<CustomerSubscriptionUpdate, CustomerSubscription>({ ...resource, type: CustomerSubscriptions.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: CustomerSubscriptions.TYPE } : id, options)\n\t}\n\n\tasync customer(customerSubscriptionId: string | CustomerSubscription, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\tconst _customerSubscriptionId = (customerSubscriptionId as CustomerSubscription).id || customerSubscriptionId as string\n\t\treturn this.resources.fetch<Customer>({ type: 'customers' }, `customer_subscriptions/${_customerSubscriptionId}/customer`, params, options) as unknown as Customer\n\t}\n\n\tasync events(customerSubscriptionId: string | CustomerSubscription, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _customerSubscriptionId = (customerSubscriptionId as CustomerSubscription).id || customerSubscriptionId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `customer_subscriptions/${_customerSubscriptionId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync versions(customerSubscriptionId: string | CustomerSubscription, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _customerSubscriptionId = (customerSubscriptionId as CustomerSubscription).id || customerSubscriptionId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `customer_subscriptions/${_customerSubscriptionId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisCustomerSubscription(resource: any): resource is CustomerSubscription {\n\t\treturn resource.type && (resource.type === CustomerSubscriptions.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CustomerSubscriptionRel {\n\t\treturn super.relationshipOneToOne<CustomerSubscriptionRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CustomerSubscriptionRel[] {\n\t\treturn super.relationshipOneToMany<CustomerSubscriptionRel>(...ids)\n\t}\n\n\n\ttype(): CustomerSubscriptionType {\n\t\treturn CustomerSubscriptions.TYPE\n\t}\n\n}\n\n\nconst instance = new CustomerSubscriptions()\nexport default instance\n\nexport type { CustomerSubscription, CustomerSubscriptionCreate, CustomerSubscriptionUpdate, CustomerSubscriptionType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/customer_subscriptions.ts"],"names":[],"mappings":";;AAgDA,MAAM,8BAA8B,WAAkC,CAAA;AAAA,EAErE,OAAgB,IAAiC,GAAA,wBAAA;AAAA,EAEjD,MAAM,MAAA,CAAO,QAAsC,EAAA,MAAA,EAAoD,OAA0D,EAAA;AAChK,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAyD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,qBAAsB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAClJ,EAEA,MAAM,MAAA,CAAO,QAAsC,EAAA,MAAA,EAAoD,OAA0D,EAAA;AAChK,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAyD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,qBAAsB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAClJ,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,qBAAA,CAAsB,IAAK,EAAA,GAAI,IAAI,OAAO,CAAA;AAAA;AAC7G,EAEA,MAAM,QAAA,CAAS,sBAAuD,EAAA,MAAA,EAAwC,OAA8C,EAAA;AAC3J,IAAM,MAAA,uBAAA,GAA2B,uBAAgD,EAAM,IAAA,sBAAA;AACvF,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAgB,EAAE,IAAA,EAAM,WAAY,EAAA,EAAG,CAA0B,uBAAA,EAAA,uBAAuB,CAAa,SAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC3I,EAEA,MAAM,MAAA,CAAO,sBAAuD,EAAA,MAAA,EAAiC,OAAyD,EAAA;AAC7J,IAAM,MAAA,uBAAA,GAA2B,uBAAgD,EAAM,IAAA,sBAAA;AACvF,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAa,EAAE,IAAA,EAAM,QAAS,EAAA,EAAG,CAA0B,uBAAA,EAAA,uBAAuB,CAAW,OAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACnI,EAEA,MAAM,QAAA,CAAS,sBAAuD,EAAA,MAAA,EAAmC,OAA2D,EAAA;AACnK,IAAM,MAAA,uBAAA,GAA2B,uBAAgD,EAAM,IAAA,sBAAA;AACvF,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAe,EAAE,IAAA,EAAM,UAAW,EAAA,EAAG,CAA0B,uBAAA,EAAA,uBAAuB,CAAa,SAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACzI,EAGA,uBAAuB,QAAiD,EAAA;AACvE,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,qBAAsB,CAAA,IAAA;AAAA;AAClE,EAGA,aAAa,EAAyD,EAAA;AACrE,IAAO,OAAA,KAAA,CAAM,qBAA8C,EAAE,CAAA;AAAA;AAC9D,EAEA,sBAAsB,GAA0C,EAAA;AAC/D,IAAO,OAAA,KAAA,CAAM,qBAA+C,CAAA,GAAG,GAAG,CAAA;AAAA;AACnE,EAGA,IAAiC,GAAA;AAChC,IAAA,OAAO,qBAAsB,CAAA,IAAA;AAAA;AAG/B;AAGA,MAAM,QAAA,GAAW,IAAI,qBAAsB,EAAA;AAC3C,IAAO,8BAAQ,GAAA","file":"customer_subscriptions.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'\nimport type { Version } from './versions'\n\n\ntype CustomerSubscriptionType = 'customer_subscriptions'\ntype CustomerSubscriptionRel = ResourceRel & { type: CustomerSubscriptionType }\n\n\nexport type CustomerSubscriptionSort = Pick<CustomerSubscription, 'id'> & ResourceSort\n// export type CustomerSubscriptionFilter = Pick<CustomerSubscription, 'id'> & ResourceFilter\n\n\ninterface CustomerSubscription extends Resource {\n\t\n\treadonly type: CustomerSubscriptionType\n\n\t/** \n\t * The email of the customer that owns the subscription.\n\t * @example ```\"john@example.com\"```\n\t */\n\tcustomer_email: string\n\n\tcustomer?: Customer | null\n\tevents?: Event[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface CustomerSubscriptionCreate extends ResourceCreate {\n\t\n\t/** \n\t * The email of the customer that owns the subscription.\n\t * @example ```\"john@example.com\"```\n\t */\n\tcustomer_email: string\n\t\n}\n\n\ntype CustomerSubscriptionUpdate = ResourceUpdate\n\n\nclass CustomerSubscriptions extends ApiResource<CustomerSubscription> {\n\n\tstatic readonly TYPE: CustomerSubscriptionType = 'customer_subscriptions' as const\n\n\tasync create(resource: CustomerSubscriptionCreate, params?: QueryParamsRetrieve<CustomerSubscription>, options?: ResourcesConfig): Promise<CustomerSubscription> {\n\t\treturn this.resources.create<CustomerSubscriptionCreate, CustomerSubscription>({ ...resource, type: CustomerSubscriptions.TYPE }, params, options)\n\t}\n\n\tasync update(resource: CustomerSubscriptionUpdate, params?: QueryParamsRetrieve<CustomerSubscription>, options?: ResourcesConfig): Promise<CustomerSubscription> {\n\t\treturn this.resources.update<CustomerSubscriptionUpdate, CustomerSubscription>({ ...resource, type: CustomerSubscriptions.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: CustomerSubscriptions.TYPE } : id, options)\n\t}\n\n\tasync customer(customerSubscriptionId: string | CustomerSubscription, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\tconst _customerSubscriptionId = (customerSubscriptionId as CustomerSubscription).id || customerSubscriptionId as string\n\t\treturn this.resources.fetch<Customer>({ type: 'customers' }, `customer_subscriptions/${_customerSubscriptionId}/customer`, params, options) as unknown as Customer\n\t}\n\n\tasync events(customerSubscriptionId: string | CustomerSubscription, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _customerSubscriptionId = (customerSubscriptionId as CustomerSubscription).id || customerSubscriptionId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `customer_subscriptions/${_customerSubscriptionId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync versions(customerSubscriptionId: string | CustomerSubscription, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _customerSubscriptionId = (customerSubscriptionId as CustomerSubscription).id || customerSubscriptionId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `customer_subscriptions/${_customerSubscriptionId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisCustomerSubscription(resource: any): resource is CustomerSubscription {\n\t\treturn resource.type && (resource.type === CustomerSubscriptions.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CustomerSubscriptionRel {\n\t\treturn super.relationshipOneToOne<CustomerSubscriptionRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CustomerSubscriptionRel[] {\n\t\treturn super.relationshipOneToMany<CustomerSubscriptionRel>(...ids)\n\t}\n\n\n\ttype(): CustomerSubscriptionType {\n\t\treturn CustomerSubscriptions.TYPE\n\t}\n\n}\n\n\nconst instance = new CustomerSubscriptions()\nexport default instance\n\nexport type { CustomerSubscriptions, CustomerSubscription, CustomerSubscriptionCreate, CustomerSubscriptionUpdate, CustomerSubscriptionType }\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":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A,KAAA,CAAM,qBAAmC,CAAA,GAAG,GAAG,CAAA;AAAA;AACvD,EAGA,IAAqB,GAAA;AACpB,IAAA,OAAO,SAAU,CAAA,IAAA;AAAA;AAGnB;AAGA,MAAM,QAAA,GAAW,IAAI,SAAU,EAAA;AAC/B,IAAO,iBAAQ,GAAA","file":"customers.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 { CustomerGroup, CustomerGroupType } from './customer_groups'\nimport type { CustomerAddress } from './customer_addresses'\nimport type { CustomerPaymentSource } from './customer_payment_sources'\nimport type { CustomerSubscription } from './customer_subscriptions'\nimport type { Order } from './orders'\nimport type { OrderSubscription } from './order_subscriptions'\nimport type { Return } from './returns'\nimport type { SkuList } from './sku_lists'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Tag, TagType } from './tags'\n\n\ntype CustomerType = 'customers'\ntype CustomerRel = ResourceRel & { type: CustomerType }\ntype CustomerGroupRel = ResourceRel & { type: CustomerGroupType }\ntype TagRel = ResourceRel & { type: TagType }\n\n\nexport type CustomerSort = Pick<Customer, 'id' | 'email' | 'status' | 'total_orders_count'> & ResourceSort\n// export type CustomerFilter = Pick<Customer, 'id' | 'email' | 'status' | 'total_orders_count'> & ResourceFilter\n\n\ninterface Customer extends Resource {\n\t\n\treadonly type: CustomerType\n\n\t/** \n\t * The customer's email address.\n\t * @example ```\"john@example.com\"```\n\t */\n\temail: string\n\t/** \n\t * The customer's status. One of 'prospect' (default), 'acquired', or 'repeat'.\n\t * @example ```\"prospect\"```\n\t */\n\tstatus: 'prospect' | 'acquired' | 'repeat'\n\t/** \n\t * Indicates if the customer has a password.\n\t */\n\thas_password?: boolean | null\n\t/** \n\t * The total number of orders for the customer.\n\t * @example ```6```\n\t */\n\ttotal_orders_count?: number | null\n\t/** \n\t * A reference to uniquely identify the shopper during payment sessions.\n\t * @example ```\"xxx-yyy-zzz\"```\n\t */\n\tshopper_reference?: string | null\n\t/** \n\t * A reference to uniquely identify the customer on any connected external services.\n\t * @example ```\"xxx-yyy-zzz\"```\n\t */\n\tprofile_id?: string | null\n\t/** \n\t * A specific code to identify the tax exemption reason for this customer.\n\t * @example ```\"xxx-yyy-zzz\"```\n\t */\n\ttax_exemption_code?: string | null\n\n\tcustomer_group?: CustomerGroup | null\n\tcustomer_addresses?: CustomerAddress[] | null\n\tcustomer_payment_sources?: CustomerPaymentSource[] | null\n\tcustomer_subscriptions?: CustomerSubscription[] | null\n\torders?: Order[] | null\n\torder_subscriptions?: OrderSubscription[] | null\n\treturns?: Return[] | null\n\tsku_lists?: SkuList[] | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\ttags?: Tag[] | null\n\n}\n\n\ninterface CustomerCreate extends ResourceCreate {\n\t\n\t/** \n\t * The customer's email address.\n\t * @example ```\"john@example.com\"```\n\t */\n\temail: string\n\t/** \n\t * The customer's password. Initiate a customer password reset flow if you need to change it.\n\t * @example ```\"secret\"```\n\t */\n\tpassword?: string | null\n\t/** \n\t * A reference to uniquely identify the shopper during payment sessions.\n\t * @example ```\"xxx-yyy-zzz\"```\n\t */\n\tshopper_reference?: string | null\n\t/** \n\t * A reference to uniquely identify the customer on any connected external services.\n\t * @example ```\"xxx-yyy-zzz\"```\n\t */\n\tprofile_id?: string | null\n\t/** \n\t * A specific code to identify the tax exemption reason for this customer.\n\t * @example ```\"xxx-yyy-zzz\"```\n\t */\n\ttax_exemption_code?: string | null\n\n\tcustomer_group?: CustomerGroupRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\ninterface CustomerUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The customer's email address.\n\t * @example ```\"john@example.com\"```\n\t */\n\temail?: string | null\n\t/** \n\t * The customer's password. Initiate a customer password reset flow if you need to change it.\n\t * @example ```\"secret\"```\n\t */\n\tpassword?: string | null\n\t/** \n\t * A reference to uniquely identify the shopper during payment sessions.\n\t * @example ```\"xxx-yyy-zzz\"```\n\t */\n\tshopper_reference?: string | null\n\t/** \n\t * A reference to uniquely identify the customer on any connected external services.\n\t * @example ```\"xxx-yyy-zzz\"```\n\t */\n\tprofile_id?: string | null\n\t/** \n\t * A specific code to identify the tax exemption reason for this customer.\n\t * @example ```\"xxx-yyy-zzz\"```\n\t */\n\ttax_exemption_code?: 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\tcustomer_group?: CustomerGroupRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\nclass Customers extends ApiResource<Customer> {\n\n\tstatic readonly TYPE: CustomerType = 'customers' as const\n\n\tasync create(resource: CustomerCreate, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\treturn this.resources.create<CustomerCreate, Customer>({ ...resource, type: Customers.TYPE }, params, options)\n\t}\n\n\tasync update(resource: CustomerUpdate, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\treturn this.resources.update<CustomerUpdate, Customer>({ ...resource, type: Customers.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: Customers.TYPE } : id, options)\n\t}\n\n\tasync customer_group(customerId: string | Customer, params?: QueryParamsRetrieve<CustomerGroup>, options?: ResourcesConfig): Promise<CustomerGroup> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<CustomerGroup>({ type: 'customer_groups' }, `customers/${_customerId}/customer_group`, params, options) as unknown as CustomerGroup\n\t}\n\n\tasync customer_addresses(customerId: string | Customer, params?: QueryParamsList<CustomerAddress>, options?: ResourcesConfig): Promise<ListResponse<CustomerAddress>> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<CustomerAddress>({ type: 'customer_addresses' }, `customers/${_customerId}/customer_addresses`, params, options) as unknown as ListResponse<CustomerAddress>\n\t}\n\n\tasync customer_payment_sources(customerId: string | Customer, params?: QueryParamsList<CustomerPaymentSource>, options?: ResourcesConfig): Promise<ListResponse<CustomerPaymentSource>> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<CustomerPaymentSource>({ type: 'customer_payment_sources' }, `customers/${_customerId}/customer_payment_sources`, params, options) as unknown as ListResponse<CustomerPaymentSource>\n\t}\n\n\tasync customer_subscriptions(customerId: string | Customer, params?: QueryParamsList<CustomerSubscription>, options?: ResourcesConfig): Promise<ListResponse<CustomerSubscription>> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<CustomerSubscription>({ type: 'customer_subscriptions' }, `customers/${_customerId}/customer_subscriptions`, params, options) as unknown as ListResponse<CustomerSubscription>\n\t}\n\n\tasync orders(customerId: string | Customer, params?: QueryParamsList<Order>, options?: ResourcesConfig): Promise<ListResponse<Order>> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `customers/${_customerId}/orders`, params, options) as unknown as ListResponse<Order>\n\t}\n\n\tasync order_subscriptions(customerId: string | Customer, params?: QueryParamsList<OrderSubscription>, options?: ResourcesConfig): Promise<ListResponse<OrderSubscription>> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<OrderSubscription>({ type: 'order_subscriptions' }, `customers/${_customerId}/order_subscriptions`, params, options) as unknown as ListResponse<OrderSubscription>\n\t}\n\n\tasync returns(customerId: string | Customer, params?: QueryParamsList<Return>, options?: ResourcesConfig): Promise<ListResponse<Return>> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<Return>({ type: 'returns' }, `customers/${_customerId}/returns`, params, options) as unknown as ListResponse<Return>\n\t}\n\n\tasync sku_lists(customerId: string | Customer, params?: QueryParamsList<SkuList>, options?: ResourcesConfig): Promise<ListResponse<SkuList>> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<SkuList>({ type: 'sku_lists' }, `customers/${_customerId}/sku_lists`, params, options) as unknown as ListResponse<SkuList>\n\t}\n\n\tasync attachments(customerId: string | Customer, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `customers/${_customerId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(customerId: string | Customer, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `customers/${_customerId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync tags(customerId: string | Customer, params?: QueryParamsList<Tag>, options?: ResourcesConfig): Promise<ListResponse<Tag>> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<Tag>({ type: 'tags' }, `customers/${_customerId}/tags`, params, options) as unknown as ListResponse<Tag>\n\t}\n\n\tasync _add_tags(id: string | Customer, triggerValue: string, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\treturn this.resources.update<CustomerUpdate, Customer>({ id: (typeof id === 'string')? id: id.id, type: Customers.TYPE, _add_tags: triggerValue }, params, options)\n\t}\n\n\tasync _remove_tags(id: string | Customer, triggerValue: string, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\treturn this.resources.update<CustomerUpdate, Customer>({ id: (typeof id === 'string')? id: id.id, type: Customers.TYPE, _remove_tags: triggerValue }, params, options)\n\t}\n\n\n\tisCustomer(resource: any): resource is Customer {\n\t\treturn resource.type && (resource.type === Customers.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CustomerRel {\n\t\treturn super.relationshipOneToOne<CustomerRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CustomerRel[] {\n\t\treturn super.relationshipOneToMany<CustomerRel>(...ids)\n\t}\n\n\n\ttype(): CustomerType {\n\t\treturn Customers.TYPE\n\t}\n\n}\n\n\nconst instance = new Customers()\nexport default instance\n\nexport type { Customer, CustomerCreate, CustomerUpdate, CustomerType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/customers.ts"],"names":["ApiResource"],"mappings":";;;;AA6JA,MAAM,kBAAkBA,oBAAsB,CAAA;AAAA,EAE7C,OAAgB,IAAqB,GAAA,WAAA;AAAA,EAErC,MAAM,MAAA,CAAO,QAA0B,EAAA,MAAA,EAAwC,OAA8C,EAAA;AAC5H,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAiC,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,SAAU,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC9G,EAEA,MAAM,MAAA,CAAO,QAA0B,EAAA,MAAA,EAAwC,OAA8C,EAAA;AAC5H,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAiC,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,SAAU,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC9G,EAEA,MAAM,MAAO,CAAA,EAAA,EAAyB,OAA0C,EAAA;AAC/E,IAAA,MAAM,IAAK,CAAA,SAAA,CAAU,MAAQ,CAAA,OAAO,EAAO,KAAA,QAAA,GAAW,EAAE,EAAA,EAAI,IAAM,EAAA,SAAA,CAAU,IAAK,EAAA,GAAI,IAAI,OAAO,CAAA;AAAA;AACjG,EAE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AAiC,EAAE,EAAK,EAAA,OAAO,OAAO,QAAW,GAAA,EAAA,GAAI,EAAG,CAAA,EAAA,EAAI,MAAM,SAAU,CAAA,IAAA,EAAM,cAAc,YAAa,EAAA,EAAG,QAAQ,OAAO,CAAA;AAAA;AACtK,EAGA,WAAW,QAAqC,EAAA;AAC/C,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,SAAU,CAAA,IAAA;AAAA;AACtD,EAGA,aAAa,EAA6C,EAAA;AACzD,IAAO,OAAA,KAAA,CAAM,qBAAkC,EAAE,CAAA;AAAA;AAClD,EAEA,sBAAsB,GAA8B,EAAA;AACnD,IAAO,OAAA,KAAA,CAAM,qBAAmC,CAAA,GAAG,GAAG,CAAA;AAAA;AACvD,EAGA,IAAqB,GAAA;AACpB,IAAA,OAAO,SAAU,CAAA,IAAA;AAAA;AAGnB;AAGA,MAAM,QAAA,GAAW,IAAI,SAAU,EAAA;AAC/B,IAAO,iBAAQ,GAAA","file":"customers.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 { CustomerGroup, CustomerGroupType } from './customer_groups'\nimport type { CustomerAddress } from './customer_addresses'\nimport type { CustomerPaymentSource } from './customer_payment_sources'\nimport type { CustomerSubscription } from './customer_subscriptions'\nimport type { Order } from './orders'\nimport type { OrderSubscription } from './order_subscriptions'\nimport type { Return } from './returns'\nimport type { SkuList } from './sku_lists'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Tag, TagType } from './tags'\n\n\ntype CustomerType = 'customers'\ntype CustomerRel = ResourceRel & { type: CustomerType }\ntype CustomerGroupRel = ResourceRel & { type: CustomerGroupType }\ntype TagRel = ResourceRel & { type: TagType }\n\n\nexport type CustomerSort = Pick<Customer, 'id' | 'email' | 'status' | 'total_orders_count'> & ResourceSort\n// export type CustomerFilter = Pick<Customer, 'id' | 'email' | 'status' | 'total_orders_count'> & ResourceFilter\n\n\ninterface Customer extends Resource {\n\t\n\treadonly type: CustomerType\n\n\t/** \n\t * The customer's email address.\n\t * @example ```\"john@example.com\"```\n\t */\n\temail: string\n\t/** \n\t * The customer's status. One of 'prospect' (default), 'acquired', or 'repeat'.\n\t * @example ```\"prospect\"```\n\t */\n\tstatus: 'prospect' | 'acquired' | 'repeat'\n\t/** \n\t * Indicates if the customer has a password.\n\t */\n\thas_password?: boolean | null\n\t/** \n\t * The total number of orders for the customer.\n\t * @example ```6```\n\t */\n\ttotal_orders_count?: number | null\n\t/** \n\t * A reference to uniquely identify the shopper during payment sessions.\n\t * @example ```\"xxx-yyy-zzz\"```\n\t */\n\tshopper_reference?: string | null\n\t/** \n\t * A reference to uniquely identify the customer on any connected external services.\n\t * @example ```\"xxx-yyy-zzz\"```\n\t */\n\tprofile_id?: string | null\n\t/** \n\t * A specific code to identify the tax exemption reason for this customer.\n\t * @example ```\"xxx-yyy-zzz\"```\n\t */\n\ttax_exemption_code?: string | null\n\n\tcustomer_group?: CustomerGroup | null\n\tcustomer_addresses?: CustomerAddress[] | null\n\tcustomer_payment_sources?: CustomerPaymentSource[] | null\n\tcustomer_subscriptions?: CustomerSubscription[] | null\n\torders?: Order[] | null\n\torder_subscriptions?: OrderSubscription[] | null\n\treturns?: Return[] | null\n\tsku_lists?: SkuList[] | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\ttags?: Tag[] | null\n\n}\n\n\ninterface CustomerCreate extends ResourceCreate {\n\t\n\t/** \n\t * The customer's email address.\n\t * @example ```\"john@example.com\"```\n\t */\n\temail: string\n\t/** \n\t * The customer's password. Initiate a customer password reset flow if you need to change it.\n\t * @example ```\"secret\"```\n\t */\n\tpassword?: string | null\n\t/** \n\t * A reference to uniquely identify the shopper during payment sessions.\n\t * @example ```\"xxx-yyy-zzz\"```\n\t */\n\tshopper_reference?: string | null\n\t/** \n\t * A reference to uniquely identify the customer on any connected external services.\n\t * @example ```\"xxx-yyy-zzz\"```\n\t */\n\tprofile_id?: string | null\n\t/** \n\t * A specific code to identify the tax exemption reason for this customer.\n\t * @example ```\"xxx-yyy-zzz\"```\n\t */\n\ttax_exemption_code?: string | null\n\n\tcustomer_group?: CustomerGroupRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\ninterface CustomerUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The customer's email address.\n\t * @example ```\"john@example.com\"```\n\t */\n\temail?: string | null\n\t/** \n\t * The customer's password. Initiate a customer password reset flow if you need to change it.\n\t * @example ```\"secret\"```\n\t */\n\tpassword?: string | null\n\t/** \n\t * A reference to uniquely identify the shopper during payment sessions.\n\t * @example ```\"xxx-yyy-zzz\"```\n\t */\n\tshopper_reference?: string | null\n\t/** \n\t * A reference to uniquely identify the customer on any connected external services.\n\t * @example ```\"xxx-yyy-zzz\"```\n\t */\n\tprofile_id?: string | null\n\t/** \n\t * A specific code to identify the tax exemption reason for this customer.\n\t * @example ```\"xxx-yyy-zzz\"```\n\t */\n\ttax_exemption_code?: 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\tcustomer_group?: CustomerGroupRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\nclass Customers extends ApiResource<Customer> {\n\n\tstatic readonly TYPE: CustomerType = 'customers' as const\n\n\tasync create(resource: CustomerCreate, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\treturn this.resources.create<CustomerCreate, Customer>({ ...resource, type: Customers.TYPE }, params, options)\n\t}\n\n\tasync update(resource: CustomerUpdate, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\treturn this.resources.update<CustomerUpdate, Customer>({ ...resource, type: Customers.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: Customers.TYPE } : id, options)\n\t}\n\n\tasync customer_group(customerId: string | Customer, params?: QueryParamsRetrieve<CustomerGroup>, options?: ResourcesConfig): Promise<CustomerGroup> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<CustomerGroup>({ type: 'customer_groups' }, `customers/${_customerId}/customer_group`, params, options) as unknown as CustomerGroup\n\t}\n\n\tasync customer_addresses(customerId: string | Customer, params?: QueryParamsList<CustomerAddress>, options?: ResourcesConfig): Promise<ListResponse<CustomerAddress>> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<CustomerAddress>({ type: 'customer_addresses' }, `customers/${_customerId}/customer_addresses`, params, options) as unknown as ListResponse<CustomerAddress>\n\t}\n\n\tasync customer_payment_sources(customerId: string | Customer, params?: QueryParamsList<CustomerPaymentSource>, options?: ResourcesConfig): Promise<ListResponse<CustomerPaymentSource>> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<CustomerPaymentSource>({ type: 'customer_payment_sources' }, `customers/${_customerId}/customer_payment_sources`, params, options) as unknown as ListResponse<CustomerPaymentSource>\n\t}\n\n\tasync customer_subscriptions(customerId: string | Customer, params?: QueryParamsList<CustomerSubscription>, options?: ResourcesConfig): Promise<ListResponse<CustomerSubscription>> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<CustomerSubscription>({ type: 'customer_subscriptions' }, `customers/${_customerId}/customer_subscriptions`, params, options) as unknown as ListResponse<CustomerSubscription>\n\t}\n\n\tasync orders(customerId: string | Customer, params?: QueryParamsList<Order>, options?: ResourcesConfig): Promise<ListResponse<Order>> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `customers/${_customerId}/orders`, params, options) as unknown as ListResponse<Order>\n\t}\n\n\tasync order_subscriptions(customerId: string | Customer, params?: QueryParamsList<OrderSubscription>, options?: ResourcesConfig): Promise<ListResponse<OrderSubscription>> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<OrderSubscription>({ type: 'order_subscriptions' }, `customers/${_customerId}/order_subscriptions`, params, options) as unknown as ListResponse<OrderSubscription>\n\t}\n\n\tasync returns(customerId: string | Customer, params?: QueryParamsList<Return>, options?: ResourcesConfig): Promise<ListResponse<Return>> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<Return>({ type: 'returns' }, `customers/${_customerId}/returns`, params, options) as unknown as ListResponse<Return>\n\t}\n\n\tasync sku_lists(customerId: string | Customer, params?: QueryParamsList<SkuList>, options?: ResourcesConfig): Promise<ListResponse<SkuList>> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<SkuList>({ type: 'sku_lists' }, `customers/${_customerId}/sku_lists`, params, options) as unknown as ListResponse<SkuList>\n\t}\n\n\tasync attachments(customerId: string | Customer, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `customers/${_customerId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(customerId: string | Customer, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `customers/${_customerId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync tags(customerId: string | Customer, params?: QueryParamsList<Tag>, options?: ResourcesConfig): Promise<ListResponse<Tag>> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<Tag>({ type: 'tags' }, `customers/${_customerId}/tags`, params, options) as unknown as ListResponse<Tag>\n\t}\n\n\tasync _add_tags(id: string | Customer, triggerValue: string, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\treturn this.resources.update<CustomerUpdate, Customer>({ id: (typeof id === 'string')? id: id.id, type: Customers.TYPE, _add_tags: triggerValue }, params, options)\n\t}\n\n\tasync _remove_tags(id: string | Customer, triggerValue: string, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\treturn this.resources.update<CustomerUpdate, Customer>({ id: (typeof id === 'string')? id: id.id, type: Customers.TYPE, _remove_tags: triggerValue }, params, options)\n\t}\n\n\n\tisCustomer(resource: any): resource is Customer {\n\t\treturn resource.type && (resource.type === Customers.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CustomerRel {\n\t\treturn super.relationshipOneToOne<CustomerRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CustomerRel[] {\n\t\treturn super.relationshipOneToMany<CustomerRel>(...ids)\n\t}\n\n\n\ttype(): CustomerType {\n\t\treturn Customers.TYPE\n\t}\n\n}\n\n\nconst instance = new Customers()\nexport default instance\n\nexport type { Customers, Customer, CustomerCreate, CustomerUpdate, CustomerType }\n"]}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { fC as Customer, fD as CustomerCreate, fF as CustomerSort, mA as CustomerType, fE as CustomerUpdate, aG as Customers, aF as default } from '../api-IwWtsAqE.cjs';
|
2
2
|
import '../client.cjs';
|
3
3
|
import '../interceptor-k15jXzf0.cjs';
|
4
4
|
import '../types.cjs';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { fC as Customer, fD as CustomerCreate, fF as CustomerSort, mA as CustomerType, fE as CustomerUpdate, aG as Customers, aF as default } from '../api-F1F37Dud.js';
|
2
2
|
import '../client.js';
|
3
3
|
import '../intercept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E,CAAA;AAAA;AAClD,EAEA,sBAAsB,GAA8B,EAAA;AACnD,IAAO,OAAA,KAAA,CAAM,qBAAmC,CAAA,GAAG,GAAG,CAAA;AAAA;AACvD,EAGA,IAAqB,GAAA;AACpB,IAAA,OAAO,SAAU,CAAA,IAAA;AAAA;AAGnB;AAGA,MAAM,QAAA,GAAW,IAAI,SAAU,EAAA;AAC/B,IAAO,iBAAQ,GAAA","file":"customers.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 { CustomerGroup, CustomerGroupType } from './customer_groups'\nimport type { CustomerAddress } from './customer_addresses'\nimport type { CustomerPaymentSource } from './customer_payment_sources'\nimport type { CustomerSubscription } from './customer_subscriptions'\nimport type { Order } from './orders'\nimport type { OrderSubscription } from './order_subscriptions'\nimport type { Return } from './returns'\nimport type { SkuList } from './sku_lists'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Tag, TagType } from './tags'\n\n\ntype CustomerType = 'customers'\ntype CustomerRel = ResourceRel & { type: CustomerType }\ntype CustomerGroupRel = ResourceRel & { type: CustomerGroupType }\ntype TagRel = ResourceRel & { type: TagType }\n\n\nexport type CustomerSort = Pick<Customer, 'id' | 'email' | 'status' | 'total_orders_count'> & ResourceSort\n// export type CustomerFilter = Pick<Customer, 'id' | 'email' | 'status' | 'total_orders_count'> & ResourceFilter\n\n\ninterface Customer extends Resource {\n\t\n\treadonly type: CustomerType\n\n\t/** \n\t * The customer's email address.\n\t * @example ```\"john@example.com\"```\n\t */\n\temail: string\n\t/** \n\t * The customer's status. One of 'prospect' (default), 'acquired', or 'repeat'.\n\t * @example ```\"prospect\"```\n\t */\n\tstatus: 'prospect' | 'acquired' | 'repeat'\n\t/** \n\t * Indicates if the customer has a password.\n\t */\n\thas_password?: boolean | null\n\t/** \n\t * The total number of orders for the customer.\n\t * @example ```6```\n\t */\n\ttotal_orders_count?: number | null\n\t/** \n\t * A reference to uniquely identify the shopper during payment sessions.\n\t * @example ```\"xxx-yyy-zzz\"```\n\t */\n\tshopper_reference?: string | null\n\t/** \n\t * A reference to uniquely identify the customer on any connected external services.\n\t * @example ```\"xxx-yyy-zzz\"```\n\t */\n\tprofile_id?: string | null\n\t/** \n\t * A specific code to identify the tax exemption reason for this customer.\n\t * @example ```\"xxx-yyy-zzz\"```\n\t */\n\ttax_exemption_code?: string | null\n\n\tcustomer_group?: CustomerGroup | null\n\tcustomer_addresses?: CustomerAddress[] | null\n\tcustomer_payment_sources?: CustomerPaymentSource[] | null\n\tcustomer_subscriptions?: CustomerSubscription[] | null\n\torders?: Order[] | null\n\torder_subscriptions?: OrderSubscription[] | null\n\treturns?: Return[] | null\n\tsku_lists?: SkuList[] | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\ttags?: Tag[] | null\n\n}\n\n\ninterface CustomerCreate extends ResourceCreate {\n\t\n\t/** \n\t * The customer's email address.\n\t * @example ```\"john@example.com\"```\n\t */\n\temail: string\n\t/** \n\t * The customer's password. Initiate a customer password reset flow if you need to change it.\n\t * @example ```\"secret\"```\n\t */\n\tpassword?: string | null\n\t/** \n\t * A reference to uniquely identify the shopper during payment sessions.\n\t * @example ```\"xxx-yyy-zzz\"```\n\t */\n\tshopper_reference?: string | null\n\t/** \n\t * A reference to uniquely identify the customer on any connected external services.\n\t * @example ```\"xxx-yyy-zzz\"```\n\t */\n\tprofile_id?: string | null\n\t/** \n\t * A specific code to identify the tax exemption reason for this customer.\n\t * @example ```\"xxx-yyy-zzz\"```\n\t */\n\ttax_exemption_code?: string | null\n\n\tcustomer_group?: CustomerGroupRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\ninterface CustomerUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The customer's email address.\n\t * @example ```\"john@example.com\"```\n\t */\n\temail?: string | null\n\t/** \n\t * The customer's password. Initiate a customer password reset flow if you need to change it.\n\t * @example ```\"secret\"```\n\t */\n\tpassword?: string | null\n\t/** \n\t * A reference to uniquely identify the shopper during payment sessions.\n\t * @example ```\"xxx-yyy-zzz\"```\n\t */\n\tshopper_reference?: string | null\n\t/** \n\t * A reference to uniquely identify the customer on any connected external services.\n\t * @example ```\"xxx-yyy-zzz\"```\n\t */\n\tprofile_id?: string | null\n\t/** \n\t * A specific code to identify the tax exemption reason for this customer.\n\t * @example ```\"xxx-yyy-zzz\"```\n\t */\n\ttax_exemption_code?: 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\tcustomer_group?: CustomerGroupRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\nclass Customers extends ApiResource<Customer> {\n\n\tstatic readonly TYPE: CustomerType = 'customers' as const\n\n\tasync create(resource: CustomerCreate, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\treturn this.resources.create<CustomerCreate, Customer>({ ...resource, type: Customers.TYPE }, params, options)\n\t}\n\n\tasync update(resource: CustomerUpdate, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\treturn this.resources.update<CustomerUpdate, Customer>({ ...resource, type: Customers.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: Customers.TYPE } : id, options)\n\t}\n\n\tasync customer_group(customerId: string | Customer, params?: QueryParamsRetrieve<CustomerGroup>, options?: ResourcesConfig): Promise<CustomerGroup> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<CustomerGroup>({ type: 'customer_groups' }, `customers/${_customerId}/customer_group`, params, options) as unknown as CustomerGroup\n\t}\n\n\tasync customer_addresses(customerId: string | Customer, params?: QueryParamsList<CustomerAddress>, options?: ResourcesConfig): Promise<ListResponse<CustomerAddress>> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<CustomerAddress>({ type: 'customer_addresses' }, `customers/${_customerId}/customer_addresses`, params, options) as unknown as ListResponse<CustomerAddress>\n\t}\n\n\tasync customer_payment_sources(customerId: string | Customer, params?: QueryParamsList<CustomerPaymentSource>, options?: ResourcesConfig): Promise<ListResponse<CustomerPaymentSource>> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<CustomerPaymentSource>({ type: 'customer_payment_sources' }, `customers/${_customerId}/customer_payment_sources`, params, options) as unknown as ListResponse<CustomerPaymentSource>\n\t}\n\n\tasync customer_subscriptions(customerId: string | Customer, params?: QueryParamsList<CustomerSubscription>, options?: ResourcesConfig): Promise<ListResponse<CustomerSubscription>> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<CustomerSubscription>({ type: 'customer_subscriptions' }, `customers/${_customerId}/customer_subscriptions`, params, options) as unknown as ListResponse<CustomerSubscription>\n\t}\n\n\tasync orders(customerId: string | Customer, params?: QueryParamsList<Order>, options?: ResourcesConfig): Promise<ListResponse<Order>> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `customers/${_customerId}/orders`, params, options) as unknown as ListResponse<Order>\n\t}\n\n\tasync order_subscriptions(customerId: string | Customer, params?: QueryParamsList<OrderSubscription>, options?: ResourcesConfig): Promise<ListResponse<OrderSubscription>> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<OrderSubscription>({ type: 'order_subscriptions' }, `customers/${_customerId}/order_subscriptions`, params, options) as unknown as ListResponse<OrderSubscription>\n\t}\n\n\tasync returns(customerId: string | Customer, params?: QueryParamsList<Return>, options?: ResourcesConfig): Promise<ListResponse<Return>> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<Return>({ type: 'returns' }, `customers/${_customerId}/returns`, params, options) as unknown as ListResponse<Return>\n\t}\n\n\tasync sku_lists(customerId: string | Customer, params?: QueryParamsList<SkuList>, options?: ResourcesConfig): Promise<ListResponse<SkuList>> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<SkuList>({ type: 'sku_lists' }, `customers/${_customerId}/sku_lists`, params, options) as unknown as ListResponse<SkuList>\n\t}\n\n\tasync attachments(customerId: string | Customer, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `customers/${_customerId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(customerId: string | Customer, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `customers/${_customerId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync tags(customerId: string | Customer, params?: QueryParamsList<Tag>, options?: ResourcesConfig): Promise<ListResponse<Tag>> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<Tag>({ type: 'tags' }, `customers/${_customerId}/tags`, params, options) as unknown as ListResponse<Tag>\n\t}\n\n\tasync _add_tags(id: string | Customer, triggerValue: string, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\treturn this.resources.update<CustomerUpdate, Customer>({ id: (typeof id === 'string')? id: id.id, type: Customers.TYPE, _add_tags: triggerValue }, params, options)\n\t}\n\n\tasync _remove_tags(id: string | Customer, triggerValue: string, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\treturn this.resources.update<CustomerUpdate, Customer>({ id: (typeof id === 'string')? id: id.id, type: Customers.TYPE, _remove_tags: triggerValue }, params, options)\n\t}\n\n\n\tisCustomer(resource: any): resource is Customer {\n\t\treturn resource.type && (resource.type === Customers.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CustomerRel {\n\t\treturn super.relationshipOneToOne<CustomerRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CustomerRel[] {\n\t\treturn super.relationshipOneToMany<CustomerRel>(...ids)\n\t}\n\n\n\ttype(): CustomerType {\n\t\treturn Customers.TYPE\n\t}\n\n}\n\n\nconst instance = new Customers()\nexport default instance\n\nexport type { Customer, CustomerCreate, CustomerUpdate, CustomerType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/customers.ts"],"names":[],"mappings":";;AA6JA,MAAM,kBAAkB,WAAsB,CAAA;AAAA,EAE7C,OAAgB,IAAqB,GAAA,WAAA;AAAA,EAErC,MAAM,MAAA,CAAO,QAA0B,EAAA,MAAA,EAAwC,OAA8C,EAAA;AAC5H,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAiC,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,SAAU,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC9G,EAEA,MAAM,MAAA,CAAO,QAA0B,EAAA,MAAA,EAAwC,OAA8C,EAAA;AAC5H,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAiC,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,SAAU,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC9G,EAEA,MAAM,MAAO,CAAA,EAAA,EAAyB,OAA0C,EAAA;AAC/E,IAAA,MAAM,IAAK,CAAA,SAAA,CAAU,MAAQ,CAAA,OAAO,EAAO,KAAA,QAAA,GAAW,EAAE,EAAA,EAAI,IAAM,EAAA,SAAA,CAAU,IA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AAA;AACrJ,IAAA,OAAO,KAAK,SAAU,CAAA,MAAA,CAAiC,EAAE,EAAK,EAAA,OAAO,OAAO,QAAW,GAAA,EAAA,GAAI,EAAG,CAAA,EAAA,EAAI,MAAM,SAAU,CAAA,IAAA,EAAM,cAAc,YAAa,EAAA,EAAG,QAAQ,OAAO,CAAA;AAAA;AACtK,EAGA,WAAW,QAAqC,EAAA;AAC/C,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,SAAU,CAAA,IAAA;AAAA;AACtD,EAGA,aAAa,EAA6C,EAAA;AACzD,IAAO,OAAA,KAAA,CAAM,qBAAkC,EAAE,CAAA;AAAA;AAClD,EAEA,sBAAsB,GAA8B,EAAA;AACnD,IAAO,OAAA,KAAA,CAAM,qBAAmC,CAAA,GAAG,GAAG,CAAA;AAAA;AACvD,EAGA,IAAqB,GAAA;AACpB,IAAA,OAAO,SAAU,CAAA,IAAA;AAAA;AAGnB;AAGA,MAAM,QAAA,GAAW,IAAI,SAAU,EAAA;AAC/B,IAAO,iBAAQ,GAAA","file":"customers.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 { CustomerGroup, CustomerGroupType } from './customer_groups'\nimport type { CustomerAddress } from './customer_addresses'\nimport type { CustomerPaymentSource } from './customer_payment_sources'\nimport type { CustomerSubscription } from './customer_subscriptions'\nimport type { Order } from './orders'\nimport type { OrderSubscription } from './order_subscriptions'\nimport type { Return } from './returns'\nimport type { SkuList } from './sku_lists'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Tag, TagType } from './tags'\n\n\ntype CustomerType = 'customers'\ntype CustomerRel = ResourceRel & { type: CustomerType }\ntype CustomerGroupRel = ResourceRel & { type: CustomerGroupType }\ntype TagRel = ResourceRel & { type: TagType }\n\n\nexport type CustomerSort = Pick<Customer, 'id' | 'email' | 'status' | 'total_orders_count'> & ResourceSort\n// export type CustomerFilter = Pick<Customer, 'id' | 'email' | 'status' | 'total_orders_count'> & ResourceFilter\n\n\ninterface Customer extends Resource {\n\t\n\treadonly type: CustomerType\n\n\t/** \n\t * The customer's email address.\n\t * @example ```\"john@example.com\"```\n\t */\n\temail: string\n\t/** \n\t * The customer's status. One of 'prospect' (default), 'acquired', or 'repeat'.\n\t * @example ```\"prospect\"```\n\t */\n\tstatus: 'prospect' | 'acquired' | 'repeat'\n\t/** \n\t * Indicates if the customer has a password.\n\t */\n\thas_password?: boolean | null\n\t/** \n\t * The total number of orders for the customer.\n\t * @example ```6```\n\t */\n\ttotal_orders_count?: number | null\n\t/** \n\t * A reference to uniquely identify the shopper during payment sessions.\n\t * @example ```\"xxx-yyy-zzz\"```\n\t */\n\tshopper_reference?: string | null\n\t/** \n\t * A reference to uniquely identify the customer on any connected external services.\n\t * @example ```\"xxx-yyy-zzz\"```\n\t */\n\tprofile_id?: string | null\n\t/** \n\t * A specific code to identify the tax exemption reason for this customer.\n\t * @example ```\"xxx-yyy-zzz\"```\n\t */\n\ttax_exemption_code?: string | null\n\n\tcustomer_group?: CustomerGroup | null\n\tcustomer_addresses?: CustomerAddress[] | null\n\tcustomer_payment_sources?: CustomerPaymentSource[] | null\n\tcustomer_subscriptions?: CustomerSubscription[] | null\n\torders?: Order[] | null\n\torder_subscriptions?: OrderSubscription[] | null\n\treturns?: Return[] | null\n\tsku_lists?: SkuList[] | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\ttags?: Tag[] | null\n\n}\n\n\ninterface CustomerCreate extends ResourceCreate {\n\t\n\t/** \n\t * The customer's email address.\n\t * @example ```\"john@example.com\"```\n\t */\n\temail: string\n\t/** \n\t * The customer's password. Initiate a customer password reset flow if you need to change it.\n\t * @example ```\"secret\"```\n\t */\n\tpassword?: string | null\n\t/** \n\t * A reference to uniquely identify the shopper during payment sessions.\n\t * @example ```\"xxx-yyy-zzz\"```\n\t */\n\tshopper_reference?: string | null\n\t/** \n\t * A reference to uniquely identify the customer on any connected external services.\n\t * @example ```\"xxx-yyy-zzz\"```\n\t */\n\tprofile_id?: string | null\n\t/** \n\t * A specific code to identify the tax exemption reason for this customer.\n\t * @example ```\"xxx-yyy-zzz\"```\n\t */\n\ttax_exemption_code?: string | null\n\n\tcustomer_group?: CustomerGroupRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\ninterface CustomerUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The customer's email address.\n\t * @example ```\"john@example.com\"```\n\t */\n\temail?: string | null\n\t/** \n\t * The customer's password. Initiate a customer password reset flow if you need to change it.\n\t * @example ```\"secret\"```\n\t */\n\tpassword?: string | null\n\t/** \n\t * A reference to uniquely identify the shopper during payment sessions.\n\t * @example ```\"xxx-yyy-zzz\"```\n\t */\n\tshopper_reference?: string | null\n\t/** \n\t * A reference to uniquely identify the customer on any connected external services.\n\t * @example ```\"xxx-yyy-zzz\"```\n\t */\n\tprofile_id?: string | null\n\t/** \n\t * A specific code to identify the tax exemption reason for this customer.\n\t * @example ```\"xxx-yyy-zzz\"```\n\t */\n\ttax_exemption_code?: 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\tcustomer_group?: CustomerGroupRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\nclass Customers extends ApiResource<Customer> {\n\n\tstatic readonly TYPE: CustomerType = 'customers' as const\n\n\tasync create(resource: CustomerCreate, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\treturn this.resources.create<CustomerCreate, Customer>({ ...resource, type: Customers.TYPE }, params, options)\n\t}\n\n\tasync update(resource: CustomerUpdate, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\treturn this.resources.update<CustomerUpdate, Customer>({ ...resource, type: Customers.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: Customers.TYPE } : id, options)\n\t}\n\n\tasync customer_group(customerId: string | Customer, params?: QueryParamsRetrieve<CustomerGroup>, options?: ResourcesConfig): Promise<CustomerGroup> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<CustomerGroup>({ type: 'customer_groups' }, `customers/${_customerId}/customer_group`, params, options) as unknown as CustomerGroup\n\t}\n\n\tasync customer_addresses(customerId: string | Customer, params?: QueryParamsList<CustomerAddress>, options?: ResourcesConfig): Promise<ListResponse<CustomerAddress>> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<CustomerAddress>({ type: 'customer_addresses' }, `customers/${_customerId}/customer_addresses`, params, options) as unknown as ListResponse<CustomerAddress>\n\t}\n\n\tasync customer_payment_sources(customerId: string | Customer, params?: QueryParamsList<CustomerPaymentSource>, options?: ResourcesConfig): Promise<ListResponse<CustomerPaymentSource>> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<CustomerPaymentSource>({ type: 'customer_payment_sources' }, `customers/${_customerId}/customer_payment_sources`, params, options) as unknown as ListResponse<CustomerPaymentSource>\n\t}\n\n\tasync customer_subscriptions(customerId: string | Customer, params?: QueryParamsList<CustomerSubscription>, options?: ResourcesConfig): Promise<ListResponse<CustomerSubscription>> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<CustomerSubscription>({ type: 'customer_subscriptions' }, `customers/${_customerId}/customer_subscriptions`, params, options) as unknown as ListResponse<CustomerSubscription>\n\t}\n\n\tasync orders(customerId: string | Customer, params?: QueryParamsList<Order>, options?: ResourcesConfig): Promise<ListResponse<Order>> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `customers/${_customerId}/orders`, params, options) as unknown as ListResponse<Order>\n\t}\n\n\tasync order_subscriptions(customerId: string | Customer, params?: QueryParamsList<OrderSubscription>, options?: ResourcesConfig): Promise<ListResponse<OrderSubscription>> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<OrderSubscription>({ type: 'order_subscriptions' }, `customers/${_customerId}/order_subscriptions`, params, options) as unknown as ListResponse<OrderSubscription>\n\t}\n\n\tasync returns(customerId: string | Customer, params?: QueryParamsList<Return>, options?: ResourcesConfig): Promise<ListResponse<Return>> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<Return>({ type: 'returns' }, `customers/${_customerId}/returns`, params, options) as unknown as ListResponse<Return>\n\t}\n\n\tasync sku_lists(customerId: string | Customer, params?: QueryParamsList<SkuList>, options?: ResourcesConfig): Promise<ListResponse<SkuList>> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<SkuList>({ type: 'sku_lists' }, `customers/${_customerId}/sku_lists`, params, options) as unknown as ListResponse<SkuList>\n\t}\n\n\tasync attachments(customerId: string | Customer, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `customers/${_customerId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(customerId: string | Customer, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `customers/${_customerId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync tags(customerId: string | Customer, params?: QueryParamsList<Tag>, options?: ResourcesConfig): Promise<ListResponse<Tag>> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<Tag>({ type: 'tags' }, `customers/${_customerId}/tags`, params, options) as unknown as ListResponse<Tag>\n\t}\n\n\tasync _add_tags(id: string | Customer, triggerValue: string, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\treturn this.resources.update<CustomerUpdate, Customer>({ id: (typeof id === 'string')? id: id.id, type: Customers.TYPE, _add_tags: triggerValue }, params, options)\n\t}\n\n\tasync _remove_tags(id: string | Customer, triggerValue: string, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\treturn this.resources.update<CustomerUpdate, Customer>({ id: (typeof id === 'string')? id: id.id, type: Customers.TYPE, _remove_tags: triggerValue }, params, options)\n\t}\n\n\n\tisCustomer(resource: any): resource is Customer {\n\t\treturn resource.type && (resource.type === Customers.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CustomerRel {\n\t\treturn super.relationshipOneToOne<CustomerRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CustomerRel[] {\n\t\treturn super.relationshipOneToMany<CustomerRel>(...ids)\n\t}\n\n\n\ttype(): CustomerType {\n\t\treturn Customers.TYPE\n\t}\n\n}\n\n\nconst instance = new Customers()\nexport default instance\n\nexport type { Customers, Customer, CustomerCreate, CustomerUpdate, CustomerType }\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/resources/delivery_lead_times.ts"],"names":["ApiResource"],"mappings":";;;;AA2FA,MAAM,0BAA0BA,oBAA8B,CAAA;AAAA,EAE7D,OAAgB,IAA6B,GAAA,qBAAA;AAAA,EAE7C,MAAM,MAAA,CAAO,QAAkC,EAAA,MAAA,EAAgD,OAAsD,EAAA;AACpJ,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAiD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,iBAAkB,CAAA,IAAA,EA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BAAwC,EAAM,IAAA,kBAAA;AAC3E,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAkB,EAAE,IAAA,EAAM,aAAc,EAAA,EAAG,CAAuB,oBAAA,EAAA,mBAAmB,CAAgB,YAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC3I,EAEA,MAAM,QAAA,CAAS,kBAA+C,EAAA,MAAA,EAAmC,OAA2D,EAAA;AAC3J,IAAM,MAAA,mBAAA,GAAuB,mBAAwC,EAAM,IAAA,kBAAA;AAC3E,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAe,EAAE,IAAA,EAAM,UAAW,EAAA,EAAG,CAAuB,oBAAA,EAAA,mBAAmB,CAAa,SAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAClI,EAGA,mBAAmB,QAA6C,EAAA;AAC/D,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,iBAAkB,CAAA,IAAA;AAAA;AAC9D,EAGA,aAAa,EAAqD,EAAA;AACjE,IAAO,OAAA,KAAA,CAAM,qBAA0C,EAAE,CAAA;AAAA;AAC1D,EAEA,sBAAsB,GAAsC,EAAA;AAC3D,IAAO,OAAA,KAAA,CAAM,qBAA2C,CAAA,GAAG,GAAG,CAAA;AAAA;AAC/D,EAGA,IAA6B,GAAA;AAC5B,IAAA,OAAO,iBAAkB,CAAA,IAAA;AAAA;AAG3B;AAGA,MAAM,QAAA,GAAW,IAAI,iBAAkB,EAAA;AACvC,IAAO,2BAAQ,GAAA","file":"delivery_lead_times.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 { StockLocation, StockLocationType } from './stock_locations'\nimport type { ShippingMethod, ShippingMethodType } from './shipping_methods'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype DeliveryLeadTimeType = 'delivery_lead_times'\ntype DeliveryLeadTimeRel = ResourceRel & { type: DeliveryLeadTimeType }\ntype StockLocationRel = ResourceRel & { type: StockLocationType }\ntype ShippingMethodRel = ResourceRel & { type: ShippingMethodType }\n\n\nexport type DeliveryLeadTimeSort = Pick<DeliveryLeadTime, 'id' | 'min_hours' | 'max_hours' | 'min_days'> & ResourceSort\n// export type DeliveryLeadTimeFilter = Pick<DeliveryLeadTime, 'id' | 'min_hours' | 'max_hours' | 'min_days' | 'max_days'> & ResourceFilter\n\n\ninterface DeliveryLeadTime extends Resource {\n\t\n\treadonly type: DeliveryLeadTimeType\n\n\t/** \n\t * The delivery lead minimum time (in hours) when shipping from the associated stock location with the associated shipping method.\n\t * @example ```48```\n\t */\n\tmin_hours: number\n\t/** \n\t * The delivery lead maximun time (in hours) when shipping from the associated stock location with the associated shipping method.\n\t * @example ```72```\n\t */\n\tmax_hours: number\n\t/** \n\t * The delivery lead minimum time, in days (rounded).\n\t * @example ```2```\n\t */\n\tmin_days?: number | null\n\t/** \n\t * The delivery lead maximun time, in days (rounded).\n\t * @example ```3```\n\t */\n\tmax_days?: number | null\n\n\tstock_location?: StockLocation | null\n\tshipping_method?: ShippingMethod | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface DeliveryLeadTimeCreate extends ResourceCreate {\n\t\n\t/** \n\t * The delivery lead minimum time (in hours) when shipping from the associated stock location with the associated shipping method.\n\t * @example ```48```\n\t */\n\tmin_hours: number\n\t/** \n\t * The delivery lead maximun time (in hours) when shipping from the associated stock location with the associated shipping method.\n\t * @example ```72```\n\t */\n\tmax_hours: number\n\n\tstock_location: StockLocationRel\n\tshipping_method: ShippingMethodRel\n\n}\n\n\ninterface DeliveryLeadTimeUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The delivery lead minimum time (in hours) when shipping from the associated stock location with the associated shipping method.\n\t * @example ```48```\n\t */\n\tmin_hours?: number | null\n\t/** \n\t * The delivery lead maximun time (in hours) when shipping from the associated stock location with the associated shipping method.\n\t * @example ```72```\n\t */\n\tmax_hours?: number | null\n\n\tstock_location?: StockLocationRel | null\n\tshipping_method?: ShippingMethodRel | null\n\n}\n\n\nclass DeliveryLeadTimes extends ApiResource<DeliveryLeadTime> {\n\n\tstatic readonly TYPE: DeliveryLeadTimeType = 'delivery_lead_times' as const\n\n\tasync create(resource: DeliveryLeadTimeCreate, params?: QueryParamsRetrieve<DeliveryLeadTime>, options?: ResourcesConfig): Promise<DeliveryLeadTime> {\n\t\treturn this.resources.create<DeliveryLeadTimeCreate, DeliveryLeadTime>({ ...resource, type: DeliveryLeadTimes.TYPE }, params, options)\n\t}\n\n\tasync update(resource: DeliveryLeadTimeUpdate, params?: QueryParamsRetrieve<DeliveryLeadTime>, options?: ResourcesConfig): Promise<DeliveryLeadTime> {\n\t\treturn this.resources.update<DeliveryLeadTimeUpdate, DeliveryLeadTime>({ ...resource, type: DeliveryLeadTimes.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: DeliveryLeadTimes.TYPE } : id, options)\n\t}\n\n\tasync stock_location(deliveryLeadTimeId: string | DeliveryLeadTime, params?: QueryParamsRetrieve<StockLocation>, options?: ResourcesConfig): Promise<StockLocation> {\n\t\tconst _deliveryLeadTimeId = (deliveryLeadTimeId as DeliveryLeadTime).id || deliveryLeadTimeId as string\n\t\treturn this.resources.fetch<StockLocation>({ type: 'stock_locations' }, `delivery_lead_times/${_deliveryLeadTimeId}/stock_location`, params, options) as unknown as StockLocation\n\t}\n\n\tasync shipping_method(deliveryLeadTimeId: string | DeliveryLeadTime, params?: QueryParamsRetrieve<ShippingMethod>, options?: ResourcesConfig): Promise<ShippingMethod> {\n\t\tconst _deliveryLeadTimeId = (deliveryLeadTimeId as DeliveryLeadTime).id || deliveryLeadTimeId as string\n\t\treturn this.resources.fetch<ShippingMethod>({ type: 'shipping_methods' }, `delivery_lead_times/${_deliveryLeadTimeId}/shipping_method`, params, options) as unknown as ShippingMethod\n\t}\n\n\tasync attachments(deliveryLeadTimeId: string | DeliveryLeadTime, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _deliveryLeadTimeId = (deliveryLeadTimeId as DeliveryLeadTime).id || deliveryLeadTimeId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `delivery_lead_times/${_deliveryLeadTimeId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(deliveryLeadTimeId: string | DeliveryLeadTime, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _deliveryLeadTimeId = (deliveryLeadTimeId as DeliveryLeadTime).id || deliveryLeadTimeId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `delivery_lead_times/${_deliveryLeadTimeId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisDeliveryLeadTime(resource: any): resource is DeliveryLeadTime {\n\t\treturn resource.type && (resource.type === DeliveryLeadTimes.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): DeliveryLeadTimeRel {\n\t\treturn super.relationshipOneToOne<DeliveryLeadTimeRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): DeliveryLeadTimeRel[] {\n\t\treturn super.relationshipOneToMany<DeliveryLeadTimeRel>(...ids)\n\t}\n\n\n\ttype(): DeliveryLeadTimeType {\n\t\treturn DeliveryLeadTimes.TYPE\n\t}\n\n}\n\n\nconst instance = new DeliveryLeadTimes()\nexport default instance\n\nexport type { DeliveryLeadTime, DeliveryLeadTimeCreate, DeliveryLeadTimeUpdate, DeliveryLeadTimeType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/delivery_lead_times.ts"],"names":["ApiResource"],"mappings":";;;;AA2FA,MAAM,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AAA","file":"delivery_lead_times.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 { StockLocation, StockLocationType } from './stock_locations'\nimport type { ShippingMethod, ShippingMethodType } from './shipping_methods'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype DeliveryLeadTimeType = 'delivery_lead_times'\ntype DeliveryLeadTimeRel = ResourceRel & { type: DeliveryLeadTimeType }\ntype StockLocationRel = ResourceRel & { type: StockLocationType }\ntype ShippingMethodRel = ResourceRel & { type: ShippingMethodType }\n\n\nexport type DeliveryLeadTimeSort = Pick<DeliveryLeadTime, 'id' | 'min_hours' | 'max_hours' | 'min_days'> & ResourceSort\n// export type DeliveryLeadTimeFilter = Pick<DeliveryLeadTime, 'id' | 'min_hours' | 'max_hours' | 'min_days' | 'max_days'> & ResourceFilter\n\n\ninterface DeliveryLeadTime extends Resource {\n\t\n\treadonly type: DeliveryLeadTimeType\n\n\t/** \n\t * The delivery lead minimum time (in hours) when shipping from the associated stock location with the associated shipping method.\n\t * @example ```48```\n\t */\n\tmin_hours: number\n\t/** \n\t * The delivery lead maximun time (in hours) when shipping from the associated stock location with the associated shipping method.\n\t * @example ```72```\n\t */\n\tmax_hours: number\n\t/** \n\t * The delivery lead minimum time, in days (rounded).\n\t * @example ```2```\n\t */\n\tmin_days?: number | null\n\t/** \n\t * The delivery lead maximun time, in days (rounded).\n\t * @example ```3```\n\t */\n\tmax_days?: number | null\n\n\tstock_location?: StockLocation | null\n\tshipping_method?: ShippingMethod | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface DeliveryLeadTimeCreate extends ResourceCreate {\n\t\n\t/** \n\t * The delivery lead minimum time (in hours) when shipping from the associated stock location with the associated shipping method.\n\t * @example ```48```\n\t */\n\tmin_hours: number\n\t/** \n\t * The delivery lead maximun time (in hours) when shipping from the associated stock location with the associated shipping method.\n\t * @example ```72```\n\t */\n\tmax_hours: number\n\n\tstock_location: StockLocationRel\n\tshipping_method: ShippingMethodRel\n\n}\n\n\ninterface DeliveryLeadTimeUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The delivery lead minimum time (in hours) when shipping from the associated stock location with the associated shipping method.\n\t * @example ```48```\n\t */\n\tmin_hours?: number | null\n\t/** \n\t * The delivery lead maximun time (in hours) when shipping from the associated stock location with the associated shipping method.\n\t * @example ```72```\n\t */\n\tmax_hours?: number | null\n\n\tstock_location?: StockLocationRel | null\n\tshipping_method?: ShippingMethodRel | null\n\n}\n\n\nclass DeliveryLeadTimes extends ApiResource<DeliveryLeadTime> {\n\n\tstatic readonly TYPE: DeliveryLeadTimeType = 'delivery_lead_times' as const\n\n\tasync create(resource: DeliveryLeadTimeCreate, params?: QueryParamsRetrieve<DeliveryLeadTime>, options?: ResourcesConfig): Promise<DeliveryLeadTime> {\n\t\treturn this.resources.create<DeliveryLeadTimeCreate, DeliveryLeadTime>({ ...resource, type: DeliveryLeadTimes.TYPE }, params, options)\n\t}\n\n\tasync update(resource: DeliveryLeadTimeUpdate, params?: QueryParamsRetrieve<DeliveryLeadTime>, options?: ResourcesConfig): Promise<DeliveryLeadTime> {\n\t\treturn this.resources.update<DeliveryLeadTimeUpdate, DeliveryLeadTime>({ ...resource, type: DeliveryLeadTimes.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: DeliveryLeadTimes.TYPE } : id, options)\n\t}\n\n\tasync stock_location(deliveryLeadTimeId: string | DeliveryLeadTime, params?: QueryParamsRetrieve<StockLocation>, options?: ResourcesConfig): Promise<StockLocation> {\n\t\tconst _deliveryLeadTimeId = (deliveryLeadTimeId as DeliveryLeadTime).id || deliveryLeadTimeId as string\n\t\treturn this.resources.fetch<StockLocation>({ type: 'stock_locations' }, `delivery_lead_times/${_deliveryLeadTimeId}/stock_location`, params, options) as unknown as StockLocation\n\t}\n\n\tasync shipping_method(deliveryLeadTimeId: string | DeliveryLeadTime, params?: QueryParamsRetrieve<ShippingMethod>, options?: ResourcesConfig): Promise<ShippingMethod> {\n\t\tconst _deliveryLeadTimeId = (deliveryLeadTimeId as DeliveryLeadTime).id || deliveryLeadTimeId as string\n\t\treturn this.resources.fetch<ShippingMethod>({ type: 'shipping_methods' }, `delivery_lead_times/${_deliveryLeadTimeId}/shipping_method`, params, options) as unknown as ShippingMethod\n\t}\n\n\tasync attachments(deliveryLeadTimeId: string | DeliveryLeadTime, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _deliveryLeadTimeId = (deliveryLeadTimeId as DeliveryLeadTime).id || deliveryLeadTimeId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `delivery_lead_times/${_deliveryLeadTimeId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(deliveryLeadTimeId: string | DeliveryLeadTime, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _deliveryLeadTimeId = (deliveryLeadTimeId as DeliveryLeadTime).id || deliveryLeadTimeId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `delivery_lead_times/${_deliveryLeadTimeId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisDeliveryLeadTime(resource: any): resource is DeliveryLeadTime {\n\t\treturn resource.type && (resource.type === DeliveryLeadTimes.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): DeliveryLeadTimeRel {\n\t\treturn super.relationshipOneToOne<DeliveryLeadTimeRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): DeliveryLeadTimeRel[] {\n\t\treturn super.relationshipOneToMany<DeliveryLeadTimeRel>(...ids)\n\t}\n\n\n\ttype(): DeliveryLeadTimeType {\n\t\treturn DeliveryLeadTimes.TYPE\n\t}\n\n}\n\n\nconst instance = new DeliveryLeadTimes()\nexport default instance\n\nexport type { DeliveryLeadTimes, DeliveryLeadTime, DeliveryLeadTimeCreate, DeliveryLeadTimeUpdate, DeliveryLeadTimeType }\n"]}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { fG as DeliveryLeadTime, fH as DeliveryLeadTimeCreate, fJ as DeliveryLeadTimeSort, m3 as DeliveryLeadTimeType, fI as DeliveryLeadTimeUpdate, aI as DeliveryLeadTimes, aH as default } from '../api-IwWtsAqE.cjs';
|
2
2
|
import '../client.cjs';
|
3
3
|
import '../interceptor-k15jXzf0.cjs';
|
4
4
|
import '../types.cjs';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { fG as DeliveryLeadTime, fH as DeliveryLeadTimeCreate, fJ as DeliveryLeadTimeSort, m3 as DeliveryLeadTimeType, fI as DeliveryLeadTimeUpdate, aI as DeliveryLeadTimes, aH as default } from '../api-F1F37Dud.js';
|
2
2
|
import '../client.js';
|
3
3
|
import '../interceptor-k15jXzf0.js';
|
4
4
|
import '../types.js';
|