@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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AsB,QAAqD,OAA2D,EAAA;AACzL,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,WAAW,YAAa,EAAA,EAAG,QAAQ,OAAO,CAAA;AAAA;AAC1M,EAEA,MAAM,YAAA,CAAa,EAAoC,EAAA,YAAA,EAAsB,QAAqD,OAA2D,EAAA;AAC5L,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,cAAc,YAAa,EAAA,EAAG,QAAQ,OAAO,CAAA;AAAA;AAC7M,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":"free_shipping_promotions.js","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Market, MarketType } from './markets'\nimport type { OrderAmountPromotionRule, OrderAmountPromotionRuleType } from './order_amount_promotion_rules'\nimport type { SkuListPromotionRule, SkuListPromotionRuleType } from './sku_list_promotion_rules'\nimport type { CouponCodesPromotionRule, CouponCodesPromotionRuleType } from './coupon_codes_promotion_rules'\nimport type { CustomPromotionRule, CustomPromotionRuleType } from './custom_promotion_rules'\nimport type { SkuList, SkuListType } from './sku_lists'\nimport type { Coupon } from './coupons'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Tag, TagType } from './tags'\nimport type { Version } from './versions'\nimport type { PromotionRule } from './promotion_rules'\n\n\ntype FreeShippingPromotionType = 'free_shipping_promotions'\ntype FreeShippingPromotionRel = ResourceRel & { type: FreeShippingPromotionType }\ntype MarketRel = ResourceRel & { type: MarketType }\ntype OrderAmountPromotionRuleRel = ResourceRel & { type: OrderAmountPromotionRuleType }\ntype SkuListPromotionRuleRel = ResourceRel & { type: SkuListPromotionRuleType }\ntype CouponCodesPromotionRuleRel = ResourceRel & { type: CouponCodesPromotionRuleType }\ntype CustomPromotionRuleRel = ResourceRel & { type: CustomPromotionRuleType }\ntype SkuListRel = ResourceRel & { type: SkuListType }\ntype TagRel = ResourceRel & { type: TagType }\n\n\nexport type FreeShippingPromotionSort = Pick<FreeShippingPromotion, 'id' | 'name' | 'currency_code' | 'exclusive' | 'priority' | 'starts_at' | 'expires_at' | 'total_usage_limit' | 'total_usage_count' | 'disabled_at'> & ResourceSort\n// export type FreeShippingPromotionFilter = Pick<FreeShippingPromotion, 'id' | 'name' | 'currency_code' | 'priority' | 'starts_at' | 'expires_at' | 'total_usage_limit' | 'total_usage_count' | 'disabled_at'> & ResourceFilter\n\n\ninterface FreeShippingPromotion extends Resource {\n\t\n\treadonly type: FreeShippingPromotionType\n\n\t/** \n\t * The promotion's internal name.\n\t * @example ```\"Personal promotion\"```\n\t */\n\tname: string\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * Indicates if the promotion will be applied exclusively, based on its priority score.\n\t * @example ```true```\n\t */\n\texclusive?: boolean | null\n\t/** \n\t * The priority assigned to the promotion (lower means higher priority).\n\t * @example ```2```\n\t */\n\tpriority?: number | null\n\t/** \n\t * The activation date/time of this promotion.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tstarts_at: string\n\t/** \n\t * The expiration date/time of this promotion (must be after starts_at).\n\t * @example ```\"2018-01-02T12:00:00.000Z\"```\n\t */\n\texpires_at: string\n\t/** \n\t * The total number of times this promotion can be applied. When 'null' it means promotion can be applied infinite times.\n\t * @example ```5```\n\t */\n\ttotal_usage_limit?: number | null\n\t/** \n\t * The number of times this promotion has been applied.\n\t * @example ```2```\n\t */\n\ttotal_usage_count?: number | null\n\t/** \n\t * Indicates if the promotion is active (enabled and not expired).\n\t * @example ```true```\n\t */\n\tactive?: boolean | null\n\t/** \n\t * The promotion status. One of 'disabled', 'expired', 'pending', 'active', or 'inactive'.\n\t * @example ```\"pending\"```\n\t */\n\tstatus?: 'disabled' | 'expired' | 'pending' | 'active' | 'inactive' | null\n\t/** \n\t * Time at which this resource was disabled.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tdisabled_at?: string | null\n\n\tmarket?: Market | null\n\tpromotion_rules?: PromotionRule[] | null\n\torder_amount_promotion_rule?: OrderAmountPromotionRule | null\n\tsku_list_promotion_rule?: SkuListPromotionRule | null\n\tcoupon_codes_promotion_rule?: CouponCodesPromotionRule | null\n\tcustom_promotion_rule?: CustomPromotionRule | null\n\tsku_list?: SkuList | null\n\tcoupons?: Coupon[] | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\ttags?: Tag[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface FreeShippingPromotionCreate extends ResourceCreate {\n\t\n\t/** \n\t * The promotion's internal name.\n\t * @example ```\"Personal promotion\"```\n\t */\n\tname: string\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * Indicates if the promotion will be applied exclusively, based on its priority score.\n\t * @example ```true```\n\t */\n\texclusive?: boolean | null\n\t/** \n\t * The priority assigned to the promotion (lower means higher priority).\n\t * @example ```2```\n\t */\n\tpriority?: number | null\n\t/** \n\t * The activation date/time of this promotion.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tstarts_at: string\n\t/** \n\t * The expiration date/time of this promotion (must be after starts_at).\n\t * @example ```\"2018-01-02T12:00:00.000Z\"```\n\t */\n\texpires_at: string\n\t/** \n\t * The total number of times this promotion can be applied. When 'null' it means promotion can be applied infinite times.\n\t * @example ```5```\n\t */\n\ttotal_usage_limit?: number | null\n\t/** \n\t * Send this attribute if you want to mark this resource as disabled.\n\t * @example ```true```\n\t */\n\t_disable?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this resource as enabled.\n\t * @example ```true```\n\t */\n\t_enable?: boolean | null\n\n\tmarket?: MarketRel | null\n\torder_amount_promotion_rule?: OrderAmountPromotionRuleRel | null\n\tsku_list_promotion_rule?: SkuListPromotionRuleRel | null\n\tcoupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null\n\tcustom_promotion_rule?: CustomPromotionRuleRel | null\n\tsku_list?: SkuListRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\ninterface FreeShippingPromotionUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The promotion's internal name.\n\t * @example ```\"Personal promotion\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * Indicates if the promotion will be applied exclusively, based on its priority score.\n\t * @example ```true```\n\t */\n\texclusive?: boolean | null\n\t/** \n\t * The priority assigned to the promotion (lower means higher priority).\n\t * @example ```2```\n\t */\n\tpriority?: number | null\n\t/** \n\t * The activation date/time of this promotion.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tstarts_at?: string | null\n\t/** \n\t * The expiration date/time of this promotion (must be after starts_at).\n\t * @example ```\"2018-01-02T12:00:00.000Z\"```\n\t */\n\texpires_at?: string | null\n\t/** \n\t * The total number of times this promotion can be applied. When 'null' it means promotion can be applied infinite times.\n\t * @example ```5```\n\t */\n\ttotal_usage_limit?: number | null\n\t/** \n\t * Send this attribute if you want to mark this resource as disabled.\n\t * @example ```true```\n\t */\n\t_disable?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this resource as enabled.\n\t * @example ```true```\n\t */\n\t_enable?: boolean | null\n\t/** \n\t * Comma separated list of tags to be added. Duplicates, invalid and non existing ones are discarded. Cannot be passed by sales channels.\n\t */\n\t_add_tags?: string | null\n\t/** \n\t * Comma separated list of tags to be removed. Duplicates, invalid and non existing ones are discarded. Cannot be passed by sales channels.\n\t */\n\t_remove_tags?: string | null\n\n\tmarket?: MarketRel | null\n\torder_amount_promotion_rule?: OrderAmountPromotionRuleRel | null\n\tsku_list_promotion_rule?: SkuListPromotionRuleRel | null\n\tcoupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null\n\tcustom_promotion_rule?: CustomPromotionRuleRel | null\n\tsku_list?: SkuListRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\nclass FreeShippingPromotions extends ApiResource<FreeShippingPromotion> {\n\n\tstatic readonly TYPE: FreeShippingPromotionType = 'free_shipping_promotions' as const\n\n\tasync create(resource: FreeShippingPromotionCreate, params?: QueryParamsRetrieve<FreeShippingPromotion>, options?: ResourcesConfig): Promise<FreeShippingPromotion> {\n\t\treturn this.resources.create<FreeShippingPromotionCreate, FreeShippingPromotion>({ ...resource, type: FreeShippingPromotions.TYPE }, params, options)\n\t}\n\n\tasync update(resource: FreeShippingPromotionUpdate, params?: QueryParamsRetrieve<FreeShippingPromotion>, options?: ResourcesConfig): Promise<FreeShippingPromotion> {\n\t\treturn this.resources.update<FreeShippingPromotionUpdate, FreeShippingPromotion>({ ...resource, type: FreeShippingPromotions.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: FreeShippingPromotions.TYPE } : id, options)\n\t}\n\n\tasync market(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\tconst _freeShippingPromotionId = (freeShippingPromotionId as FreeShippingPromotion).id || freeShippingPromotionId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `free_shipping_promotions/${_freeShippingPromotionId}/market`, params, options) as unknown as Market\n\t}\n\n\tasync order_amount_promotion_rule(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsRetrieve<OrderAmountPromotionRule>, options?: ResourcesConfig): Promise<OrderAmountPromotionRule> {\n\t\tconst _freeShippingPromotionId = (freeShippingPromotionId as FreeShippingPromotion).id || freeShippingPromotionId as string\n\t\treturn this.resources.fetch<OrderAmountPromotionRule>({ type: 'order_amount_promotion_rules' }, `free_shipping_promotions/${_freeShippingPromotionId}/order_amount_promotion_rule`, params, options) as unknown as OrderAmountPromotionRule\n\t}\n\n\tasync sku_list_promotion_rule(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsRetrieve<SkuListPromotionRule>, options?: ResourcesConfig): Promise<SkuListPromotionRule> {\n\t\tconst _freeShippingPromotionId = (freeShippingPromotionId as FreeShippingPromotion).id || freeShippingPromotionId as string\n\t\treturn this.resources.fetch<SkuListPromotionRule>({ type: 'sku_list_promotion_rules' }, `free_shipping_promotions/${_freeShippingPromotionId}/sku_list_promotion_rule`, params, options) as unknown as SkuListPromotionRule\n\t}\n\n\tasync coupon_codes_promotion_rule(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsRetrieve<CouponCodesPromotionRule>, options?: ResourcesConfig): Promise<CouponCodesPromotionRule> {\n\t\tconst _freeShippingPromotionId = (freeShippingPromotionId as FreeShippingPromotion).id || freeShippingPromotionId as string\n\t\treturn this.resources.fetch<CouponCodesPromotionRule>({ type: 'coupon_codes_promotion_rules' }, `free_shipping_promotions/${_freeShippingPromotionId}/coupon_codes_promotion_rule`, params, options) as unknown as CouponCodesPromotionRule\n\t}\n\n\tasync custom_promotion_rule(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsRetrieve<CustomPromotionRule>, options?: ResourcesConfig): Promise<CustomPromotionRule> {\n\t\tconst _freeShippingPromotionId = (freeShippingPromotionId as FreeShippingPromotion).id || freeShippingPromotionId as string\n\t\treturn this.resources.fetch<CustomPromotionRule>({ type: 'custom_promotion_rules' }, `free_shipping_promotions/${_freeShippingPromotionId}/custom_promotion_rule`, params, options) as unknown as CustomPromotionRule\n\t}\n\n\tasync sku_list(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsRetrieve<SkuList>, options?: ResourcesConfig): Promise<SkuList> {\n\t\tconst _freeShippingPromotionId = (freeShippingPromotionId as FreeShippingPromotion).id || freeShippingPromotionId as string\n\t\treturn this.resources.fetch<SkuList>({ type: 'sku_lists' }, `free_shipping_promotions/${_freeShippingPromotionId}/sku_list`, params, options) as unknown as SkuList\n\t}\n\n\tasync coupons(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsList<Coupon>, options?: ResourcesConfig): Promise<ListResponse<Coupon>> {\n\t\tconst _freeShippingPromotionId = (freeShippingPromotionId as FreeShippingPromotion).id || freeShippingPromotionId as string\n\t\treturn this.resources.fetch<Coupon>({ type: 'coupons' }, `free_shipping_promotions/${_freeShippingPromotionId}/coupons`, params, options) as unknown as ListResponse<Coupon>\n\t}\n\n\tasync attachments(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _freeShippingPromotionId = (freeShippingPromotionId as FreeShippingPromotion).id || freeShippingPromotionId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `free_shipping_promotions/${_freeShippingPromotionId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _freeShippingPromotionId = (freeShippingPromotionId as FreeShippingPromotion).id || freeShippingPromotionId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `free_shipping_promotions/${_freeShippingPromotionId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync tags(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsList<Tag>, options?: ResourcesConfig): Promise<ListResponse<Tag>> {\n\t\tconst _freeShippingPromotionId = (freeShippingPromotionId as FreeShippingPromotion).id || freeShippingPromotionId as string\n\t\treturn this.resources.fetch<Tag>({ type: 'tags' }, `free_shipping_promotions/${_freeShippingPromotionId}/tags`, params, options) as unknown as ListResponse<Tag>\n\t}\n\n\tasync versions(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _freeShippingPromotionId = (freeShippingPromotionId as FreeShippingPromotion).id || freeShippingPromotionId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `free_shipping_promotions/${_freeShippingPromotionId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _disable(id: string | FreeShippingPromotion, params?: QueryParamsRetrieve<FreeShippingPromotion>, options?: ResourcesConfig): Promise<FreeShippingPromotion> {\n\t\treturn this.resources.update<FreeShippingPromotionUpdate, FreeShippingPromotion>({ id: (typeof id === 'string')? id: id.id, type: FreeShippingPromotions.TYPE, _disable: true }, params, options)\n\t}\n\n\tasync _enable(id: string | FreeShippingPromotion, params?: QueryParamsRetrieve<FreeShippingPromotion>, options?: ResourcesConfig): Promise<FreeShippingPromotion> {\n\t\treturn this.resources.update<FreeShippingPromotionUpdate, FreeShippingPromotion>({ id: (typeof id === 'string')? id: id.id, type: FreeShippingPromotions.TYPE, _enable: true }, params, options)\n\t}\n\n\tasync _add_tags(id: string | FreeShippingPromotion, triggerValue: string, params?: QueryParamsRetrieve<FreeShippingPromotion>, options?: ResourcesConfig): Promise<FreeShippingPromotion> {\n\t\treturn this.resources.update<FreeShippingPromotionUpdate, FreeShippingPromotion>({ id: (typeof id === 'string')? id: id.id, type: FreeShippingPromotions.TYPE, _add_tags: triggerValue }, params, options)\n\t}\n\n\tasync _remove_tags(id: string | FreeShippingPromotion, triggerValue: string, params?: QueryParamsRetrieve<FreeShippingPromotion>, options?: ResourcesConfig): Promise<FreeShippingPromotion> {\n\t\treturn this.resources.update<FreeShippingPromotionUpdate, FreeShippingPromotion>({ id: (typeof id === 'string')? id: id.id, type: FreeShippingPromotions.TYPE, _remove_tags: triggerValue }, params, options)\n\t}\n\n\n\tisFreeShippingPromotion(resource: any): resource is FreeShippingPromotion {\n\t\treturn resource.type && (resource.type === FreeShippingPromotions.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): FreeShippingPromotionRel {\n\t\treturn super.relationshipOneToOne<FreeShippingPromotionRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): FreeShippingPromotionRel[] {\n\t\treturn super.relationshipOneToMany<FreeShippingPromotionRel>(...ids)\n\t}\n\n\n\ttype(): FreeShippingPromotionType {\n\t\treturn FreeShippingPromotions.TYPE\n\t}\n\n}\n\n\nconst instance = new FreeShippingPromotions()\nexport default instance\n\nexport type { FreeShippingPromotion, FreeShippingPromotionCreate, FreeShippingPromotionUpdate, FreeShippingPromotionType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/free_shipping_promotions.ts"],"names":[],"mappings":";;AA2OA,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,QAA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MAAA,CAA2D,EAAE,EAAK,EAAA,OAAO,OAAO,QAAW,GAAA,EAAA,GAAI,EAAG,CAAA,EAAA,EAAI,MAAM,sBAAuB,CAAA,IAAA,EAAM,cAAc,YAAa,EAAA,EAAG,QAAQ,OAAO,CAAA;AAAA;AAC7M,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":"free_shipping_promotions.js","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Market, MarketType } from './markets'\nimport type { OrderAmountPromotionRule, OrderAmountPromotionRuleType } from './order_amount_promotion_rules'\nimport type { SkuListPromotionRule, SkuListPromotionRuleType } from './sku_list_promotion_rules'\nimport type { CouponCodesPromotionRule, CouponCodesPromotionRuleType } from './coupon_codes_promotion_rules'\nimport type { CustomPromotionRule, CustomPromotionRuleType } from './custom_promotion_rules'\nimport type { SkuList, SkuListType } from './sku_lists'\nimport type { Coupon } from './coupons'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Tag, TagType } from './tags'\nimport type { Version } from './versions'\nimport type { PromotionRule } from './promotion_rules'\n\n\ntype FreeShippingPromotionType = 'free_shipping_promotions'\ntype FreeShippingPromotionRel = ResourceRel & { type: FreeShippingPromotionType }\ntype MarketRel = ResourceRel & { type: MarketType }\ntype OrderAmountPromotionRuleRel = ResourceRel & { type: OrderAmountPromotionRuleType }\ntype SkuListPromotionRuleRel = ResourceRel & { type: SkuListPromotionRuleType }\ntype CouponCodesPromotionRuleRel = ResourceRel & { type: CouponCodesPromotionRuleType }\ntype CustomPromotionRuleRel = ResourceRel & { type: CustomPromotionRuleType }\ntype SkuListRel = ResourceRel & { type: SkuListType }\ntype TagRel = ResourceRel & { type: TagType }\n\n\nexport type FreeShippingPromotionSort = Pick<FreeShippingPromotion, 'id' | 'name' | 'currency_code' | 'exclusive' | 'priority' | 'starts_at' | 'expires_at' | 'total_usage_limit' | 'total_usage_count' | 'disabled_at'> & ResourceSort\n// export type FreeShippingPromotionFilter = Pick<FreeShippingPromotion, 'id' | 'name' | 'currency_code' | 'priority' | 'starts_at' | 'expires_at' | 'total_usage_limit' | 'total_usage_count' | 'disabled_at'> & ResourceFilter\n\n\ninterface FreeShippingPromotion extends Resource {\n\t\n\treadonly type: FreeShippingPromotionType\n\n\t/** \n\t * The promotion's internal name.\n\t * @example ```\"Personal promotion\"```\n\t */\n\tname: string\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * Indicates if the promotion will be applied exclusively, based on its priority score.\n\t * @example ```true```\n\t */\n\texclusive?: boolean | null\n\t/** \n\t * The priority assigned to the promotion (lower means higher priority).\n\t * @example ```2```\n\t */\n\tpriority?: number | null\n\t/** \n\t * The activation date/time of this promotion.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tstarts_at: string\n\t/** \n\t * The expiration date/time of this promotion (must be after starts_at).\n\t * @example ```\"2018-01-02T12:00:00.000Z\"```\n\t */\n\texpires_at: string\n\t/** \n\t * The total number of times this promotion can be applied. When 'null' it means promotion can be applied infinite times.\n\t * @example ```5```\n\t */\n\ttotal_usage_limit?: number | null\n\t/** \n\t * The number of times this promotion has been applied.\n\t * @example ```2```\n\t */\n\ttotal_usage_count?: number | null\n\t/** \n\t * Indicates if the promotion is active (enabled and not expired).\n\t * @example ```true```\n\t */\n\tactive?: boolean | null\n\t/** \n\t * The promotion status. One of 'disabled', 'expired', 'pending', 'active', or 'inactive'.\n\t * @example ```\"pending\"```\n\t */\n\tstatus?: 'disabled' | 'expired' | 'pending' | 'active' | 'inactive' | null\n\t/** \n\t * Time at which this resource was disabled.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tdisabled_at?: string | null\n\n\tmarket?: Market | null\n\tpromotion_rules?: PromotionRule[] | null\n\torder_amount_promotion_rule?: OrderAmountPromotionRule | null\n\tsku_list_promotion_rule?: SkuListPromotionRule | null\n\tcoupon_codes_promotion_rule?: CouponCodesPromotionRule | null\n\tcustom_promotion_rule?: CustomPromotionRule | null\n\tsku_list?: SkuList | null\n\tcoupons?: Coupon[] | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\ttags?: Tag[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface FreeShippingPromotionCreate extends ResourceCreate {\n\t\n\t/** \n\t * The promotion's internal name.\n\t * @example ```\"Personal promotion\"```\n\t */\n\tname: string\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * Indicates if the promotion will be applied exclusively, based on its priority score.\n\t * @example ```true```\n\t */\n\texclusive?: boolean | null\n\t/** \n\t * The priority assigned to the promotion (lower means higher priority).\n\t * @example ```2```\n\t */\n\tpriority?: number | null\n\t/** \n\t * The activation date/time of this promotion.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tstarts_at: string\n\t/** \n\t * The expiration date/time of this promotion (must be after starts_at).\n\t * @example ```\"2018-01-02T12:00:00.000Z\"```\n\t */\n\texpires_at: string\n\t/** \n\t * The total number of times this promotion can be applied. When 'null' it means promotion can be applied infinite times.\n\t * @example ```5```\n\t */\n\ttotal_usage_limit?: number | null\n\t/** \n\t * Send this attribute if you want to mark this resource as disabled.\n\t * @example ```true```\n\t */\n\t_disable?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this resource as enabled.\n\t * @example ```true```\n\t */\n\t_enable?: boolean | null\n\n\tmarket?: MarketRel | null\n\torder_amount_promotion_rule?: OrderAmountPromotionRuleRel | null\n\tsku_list_promotion_rule?: SkuListPromotionRuleRel | null\n\tcoupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null\n\tcustom_promotion_rule?: CustomPromotionRuleRel | null\n\tsku_list?: SkuListRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\ninterface FreeShippingPromotionUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The promotion's internal name.\n\t * @example ```\"Personal promotion\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * Indicates if the promotion will be applied exclusively, based on its priority score.\n\t * @example ```true```\n\t */\n\texclusive?: boolean | null\n\t/** \n\t * The priority assigned to the promotion (lower means higher priority).\n\t * @example ```2```\n\t */\n\tpriority?: number | null\n\t/** \n\t * The activation date/time of this promotion.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tstarts_at?: string | null\n\t/** \n\t * The expiration date/time of this promotion (must be after starts_at).\n\t * @example ```\"2018-01-02T12:00:00.000Z\"```\n\t */\n\texpires_at?: string | null\n\t/** \n\t * The total number of times this promotion can be applied. When 'null' it means promotion can be applied infinite times.\n\t * @example ```5```\n\t */\n\ttotal_usage_limit?: number | null\n\t/** \n\t * Send this attribute if you want to mark this resource as disabled.\n\t * @example ```true```\n\t */\n\t_disable?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this resource as enabled.\n\t * @example ```true```\n\t */\n\t_enable?: boolean | null\n\t/** \n\t * Comma separated list of tags to be added. Duplicates, invalid and non existing ones are discarded. Cannot be passed by sales channels.\n\t */\n\t_add_tags?: string | null\n\t/** \n\t * Comma separated list of tags to be removed. Duplicates, invalid and non existing ones are discarded. Cannot be passed by sales channels.\n\t */\n\t_remove_tags?: string | null\n\n\tmarket?: MarketRel | null\n\torder_amount_promotion_rule?: OrderAmountPromotionRuleRel | null\n\tsku_list_promotion_rule?: SkuListPromotionRuleRel | null\n\tcoupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null\n\tcustom_promotion_rule?: CustomPromotionRuleRel | null\n\tsku_list?: SkuListRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\nclass FreeShippingPromotions extends ApiResource<FreeShippingPromotion> {\n\n\tstatic readonly TYPE: FreeShippingPromotionType = 'free_shipping_promotions' as const\n\n\tasync create(resource: FreeShippingPromotionCreate, params?: QueryParamsRetrieve<FreeShippingPromotion>, options?: ResourcesConfig): Promise<FreeShippingPromotion> {\n\t\treturn this.resources.create<FreeShippingPromotionCreate, FreeShippingPromotion>({ ...resource, type: FreeShippingPromotions.TYPE }, params, options)\n\t}\n\n\tasync update(resource: FreeShippingPromotionUpdate, params?: QueryParamsRetrieve<FreeShippingPromotion>, options?: ResourcesConfig): Promise<FreeShippingPromotion> {\n\t\treturn this.resources.update<FreeShippingPromotionUpdate, FreeShippingPromotion>({ ...resource, type: FreeShippingPromotions.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: FreeShippingPromotions.TYPE } : id, options)\n\t}\n\n\tasync market(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\tconst _freeShippingPromotionId = (freeShippingPromotionId as FreeShippingPromotion).id || freeShippingPromotionId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `free_shipping_promotions/${_freeShippingPromotionId}/market`, params, options) as unknown as Market\n\t}\n\n\tasync order_amount_promotion_rule(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsRetrieve<OrderAmountPromotionRule>, options?: ResourcesConfig): Promise<OrderAmountPromotionRule> {\n\t\tconst _freeShippingPromotionId = (freeShippingPromotionId as FreeShippingPromotion).id || freeShippingPromotionId as string\n\t\treturn this.resources.fetch<OrderAmountPromotionRule>({ type: 'order_amount_promotion_rules' }, `free_shipping_promotions/${_freeShippingPromotionId}/order_amount_promotion_rule`, params, options) as unknown as OrderAmountPromotionRule\n\t}\n\n\tasync sku_list_promotion_rule(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsRetrieve<SkuListPromotionRule>, options?: ResourcesConfig): Promise<SkuListPromotionRule> {\n\t\tconst _freeShippingPromotionId = (freeShippingPromotionId as FreeShippingPromotion).id || freeShippingPromotionId as string\n\t\treturn this.resources.fetch<SkuListPromotionRule>({ type: 'sku_list_promotion_rules' }, `free_shipping_promotions/${_freeShippingPromotionId}/sku_list_promotion_rule`, params, options) as unknown as SkuListPromotionRule\n\t}\n\n\tasync coupon_codes_promotion_rule(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsRetrieve<CouponCodesPromotionRule>, options?: ResourcesConfig): Promise<CouponCodesPromotionRule> {\n\t\tconst _freeShippingPromotionId = (freeShippingPromotionId as FreeShippingPromotion).id || freeShippingPromotionId as string\n\t\treturn this.resources.fetch<CouponCodesPromotionRule>({ type: 'coupon_codes_promotion_rules' }, `free_shipping_promotions/${_freeShippingPromotionId}/coupon_codes_promotion_rule`, params, options) as unknown as CouponCodesPromotionRule\n\t}\n\n\tasync custom_promotion_rule(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsRetrieve<CustomPromotionRule>, options?: ResourcesConfig): Promise<CustomPromotionRule> {\n\t\tconst _freeShippingPromotionId = (freeShippingPromotionId as FreeShippingPromotion).id || freeShippingPromotionId as string\n\t\treturn this.resources.fetch<CustomPromotionRule>({ type: 'custom_promotion_rules' }, `free_shipping_promotions/${_freeShippingPromotionId}/custom_promotion_rule`, params, options) as unknown as CustomPromotionRule\n\t}\n\n\tasync sku_list(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsRetrieve<SkuList>, options?: ResourcesConfig): Promise<SkuList> {\n\t\tconst _freeShippingPromotionId = (freeShippingPromotionId as FreeShippingPromotion).id || freeShippingPromotionId as string\n\t\treturn this.resources.fetch<SkuList>({ type: 'sku_lists' }, `free_shipping_promotions/${_freeShippingPromotionId}/sku_list`, params, options) as unknown as SkuList\n\t}\n\n\tasync coupons(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsList<Coupon>, options?: ResourcesConfig): Promise<ListResponse<Coupon>> {\n\t\tconst _freeShippingPromotionId = (freeShippingPromotionId as FreeShippingPromotion).id || freeShippingPromotionId as string\n\t\treturn this.resources.fetch<Coupon>({ type: 'coupons' }, `free_shipping_promotions/${_freeShippingPromotionId}/coupons`, params, options) as unknown as ListResponse<Coupon>\n\t}\n\n\tasync attachments(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _freeShippingPromotionId = (freeShippingPromotionId as FreeShippingPromotion).id || freeShippingPromotionId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `free_shipping_promotions/${_freeShippingPromotionId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _freeShippingPromotionId = (freeShippingPromotionId as FreeShippingPromotion).id || freeShippingPromotionId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `free_shipping_promotions/${_freeShippingPromotionId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync tags(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsList<Tag>, options?: ResourcesConfig): Promise<ListResponse<Tag>> {\n\t\tconst _freeShippingPromotionId = (freeShippingPromotionId as FreeShippingPromotion).id || freeShippingPromotionId as string\n\t\treturn this.resources.fetch<Tag>({ type: 'tags' }, `free_shipping_promotions/${_freeShippingPromotionId}/tags`, params, options) as unknown as ListResponse<Tag>\n\t}\n\n\tasync versions(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _freeShippingPromotionId = (freeShippingPromotionId as FreeShippingPromotion).id || freeShippingPromotionId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `free_shipping_promotions/${_freeShippingPromotionId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _disable(id: string | FreeShippingPromotion, params?: QueryParamsRetrieve<FreeShippingPromotion>, options?: ResourcesConfig): Promise<FreeShippingPromotion> {\n\t\treturn this.resources.update<FreeShippingPromotionUpdate, FreeShippingPromotion>({ id: (typeof id === 'string')? id: id.id, type: FreeShippingPromotions.TYPE, _disable: true }, params, options)\n\t}\n\n\tasync _enable(id: string | FreeShippingPromotion, params?: QueryParamsRetrieve<FreeShippingPromotion>, options?: ResourcesConfig): Promise<FreeShippingPromotion> {\n\t\treturn this.resources.update<FreeShippingPromotionUpdate, FreeShippingPromotion>({ id: (typeof id === 'string')? id: id.id, type: FreeShippingPromotions.TYPE, _enable: true }, params, options)\n\t}\n\n\tasync _add_tags(id: string | FreeShippingPromotion, triggerValue: string, params?: QueryParamsRetrieve<FreeShippingPromotion>, options?: ResourcesConfig): Promise<FreeShippingPromotion> {\n\t\treturn this.resources.update<FreeShippingPromotionUpdate, FreeShippingPromotion>({ id: (typeof id === 'string')? id: id.id, type: FreeShippingPromotions.TYPE, _add_tags: triggerValue }, params, options)\n\t}\n\n\tasync _remove_tags(id: string | FreeShippingPromotion, triggerValue: string, params?: QueryParamsRetrieve<FreeShippingPromotion>, options?: ResourcesConfig): Promise<FreeShippingPromotion> {\n\t\treturn this.resources.update<FreeShippingPromotionUpdate, FreeShippingPromotion>({ id: (typeof id === 'string')? id: id.id, type: FreeShippingPromotions.TYPE, _remove_tags: triggerValue }, params, options)\n\t}\n\n\n\tisFreeShippingPromotion(resource: any): resource is FreeShippingPromotion {\n\t\treturn resource.type && (resource.type === FreeShippingPromotions.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): FreeShippingPromotionRel {\n\t\treturn super.relationshipOneToOne<FreeShippingPromotionRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): FreeShippingPromotionRel[] {\n\t\treturn super.relationshipOneToMany<FreeShippingPromotionRel>(...ids)\n\t}\n\n\n\ttype(): FreeShippingPromotionType {\n\t\treturn FreeShippingPromotions.TYPE\n\t}\n\n}\n\n\nconst instance = new FreeShippingPromotions()\nexport default instance\n\nexport type { FreeShippingPromotions, FreeShippingPromotion, FreeShippingPromotionCreate, FreeShippingPromotionUpdate, FreeShippingPromotionType }\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/resources/geocoders.ts"],"names":["ApiResource"],"mappings":";;;;AAkCA,MAAM,kBAAkBA,oBAAsB,CAAA;AAAA,EAE7C,OAAgB,IAAqB,GAAA,WAAA;AAAA,EAErC,MAAM,OAAA,CAAQ,UAA+B,EAAA,MAAA,EAAkC,OAA0D,EAAA;AACxI,IAAM,MAAA,WAAA,GAAe,WAAwB,EAAM,IAAA,UAAA;AACnD,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAc,EAAE,IAAA,EAAM,SAAU,EAAA,EAAG,CAAa,UAAA,EAAA,WAAW,CAAY,QAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC7G,EAEA,MAAM,SAAA,CAAU,UAA+B,EAAA,MAAA,EAAmC,OAA2D,EAAA;AAC5I,IAAM,MAAA,WAAA,GAAe,WAAwB,EAAM,IAAA,UAAA;AACnD,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAe,EAAE,IAAA,EAAM,WAAY,EAAA,EAAG,CAAa,UAAA,EAAA,WAAW,CAAc,UAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAClH,EAEA,MAAM,WAAA,CAAY,UAA+B,EAAA,MAAA,EAAsC,OAA8D,EAAA;AACpJ,IAAM,MAAA,WAAA,GAAe,WAAwB,EAAM,IAAA,UAAA;AACnD,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAkB,EAAE,IAAA,EAAM,aAAc,EAAA,EAAG,CAAa,UAAA,EAAA,WAAW,CAAgB,YAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACzH,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":"geocoders.cjs","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsList } from '../query'\n\nimport type { Market } from './markets'\nimport type { Address } from './addresses'\nimport type { Attachment } from './attachments'\n\n\ntype GeocoderType = 'geocoders'\ntype GeocoderRel = ResourceRel & { type: GeocoderType }\n\n\nexport type GeocoderSort = Pick<Geocoder, 'id' | 'name'> & ResourceSort\n// export type GeocoderFilter = Pick<Geocoder, 'id' | 'name'> & ResourceFilter\n\n\ninterface Geocoder extends Resource {\n\t\n\treadonly type: GeocoderType\n\n\t/** \n\t * The geocoder's internal name.\n\t * @example ```\"Default geocoder\"```\n\t */\n\tname: string\n\n\tmarkets?: Market[] | null\n\taddresses?: Address[] | null\n\tattachments?: Attachment[] | null\n\n}\n\n\nclass Geocoders extends ApiResource<Geocoder> {\n\n\tstatic readonly TYPE: GeocoderType = 'geocoders' as const\n\n\tasync markets(geocoderId: string | Geocoder, params?: QueryParamsList<Market>, options?: ResourcesConfig): Promise<ListResponse<Market>> {\n\t\tconst _geocoderId = (geocoderId as Geocoder).id || geocoderId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `geocoders/${_geocoderId}/markets`, params, options) as unknown as ListResponse<Market>\n\t}\n\n\tasync addresses(geocoderId: string | Geocoder, params?: QueryParamsList<Address>, options?: ResourcesConfig): Promise<ListResponse<Address>> {\n\t\tconst _geocoderId = (geocoderId as Geocoder).id || geocoderId as string\n\t\treturn this.resources.fetch<Address>({ type: 'addresses' }, `geocoders/${_geocoderId}/addresses`, params, options) as unknown as ListResponse<Address>\n\t}\n\n\tasync attachments(geocoderId: string | Geocoder, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _geocoderId = (geocoderId as Geocoder).id || geocoderId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `geocoders/${_geocoderId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\n\tisGeocoder(resource: any): resource is Geocoder {\n\t\treturn resource.type && (resource.type === Geocoders.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): GeocoderRel {\n\t\treturn super.relationshipOneToOne<GeocoderRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): GeocoderRel[] {\n\t\treturn super.relationshipOneToMany<GeocoderRel>(...ids)\n\t}\n\n\n\ttype(): GeocoderType {\n\t\treturn Geocoders.TYPE\n\t}\n\n}\n\n\nconst instance = new Geocoders()\nexport default instance\n\nexport type { Geocoder, GeocoderType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/geocoders.ts"],"names":["ApiResource"],"mappings":";;;;AAkCA,MAAM,kBAAkBA,oBAAsB,CAAA;AAAA,EAE7C,OAAgB,IAAqB,GAAA,WAAA;AAAA,EAErC,MAAM,OAAA,CAAQ,UAA+B,EAAA,MAAA,EAAkC,OAA0D,EAAA;AACxI,IAAM,MAAA,WAAA,GAAe,WAAwB,EAAM,IAAA,UAAA;AACnD,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAc,EAAE,IAAA,EAAM,SAAU,EAAA,EAAG,CAAa,UAAA,EAAA,WAAW,CAAY,QAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC7G,EAEA,MAAM,SAAA,CAAU,UAA+B,EAAA,MAAA,EAAmC,OAA2D,EAAA;AAC5I,IAAM,MAAA,WAAA,GAAe,WAAwB,EAAM,IAAA,UAAA;AACnD,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAe,EAAE,IAAA,EAAM,WAAY,EAAA,EAAG,CAAa,UAAA,EAAA,WAAW,CAAc,UAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAClH,EAEA,MAAM,WAAA,CAAY,UAA+B,EAAA,MAAA,EAAsC,OAA8D,EAAA;AACpJ,IAAM,MAAA,WAAA,GAAe,WAAwB,EAAM,IAAA,UAAA;AACnD,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAkB,EAAE,IAAA,EAAM,aAAc,EAAA,EAAG,CAAa,UAAA,EAAA,WAAW,CAAgB,YAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACzH,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":"geocoders.cjs","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsList } from '../query'\n\nimport type { Market } from './markets'\nimport type { Address } from './addresses'\nimport type { Attachment } from './attachments'\n\n\ntype GeocoderType = 'geocoders'\ntype GeocoderRel = ResourceRel & { type: GeocoderType }\n\n\nexport type GeocoderSort = Pick<Geocoder, 'id' | 'name'> & ResourceSort\n// export type GeocoderFilter = Pick<Geocoder, 'id' | 'name'> & ResourceFilter\n\n\ninterface Geocoder extends Resource {\n\t\n\treadonly type: GeocoderType\n\n\t/** \n\t * The geocoder's internal name.\n\t * @example ```\"Default geocoder\"```\n\t */\n\tname: string\n\n\tmarkets?: Market[] | null\n\taddresses?: Address[] | null\n\tattachments?: Attachment[] | null\n\n}\n\n\nclass Geocoders extends ApiResource<Geocoder> {\n\n\tstatic readonly TYPE: GeocoderType = 'geocoders' as const\n\n\tasync markets(geocoderId: string | Geocoder, params?: QueryParamsList<Market>, options?: ResourcesConfig): Promise<ListResponse<Market>> {\n\t\tconst _geocoderId = (geocoderId as Geocoder).id || geocoderId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `geocoders/${_geocoderId}/markets`, params, options) as unknown as ListResponse<Market>\n\t}\n\n\tasync addresses(geocoderId: string | Geocoder, params?: QueryParamsList<Address>, options?: ResourcesConfig): Promise<ListResponse<Address>> {\n\t\tconst _geocoderId = (geocoderId as Geocoder).id || geocoderId as string\n\t\treturn this.resources.fetch<Address>({ type: 'addresses' }, `geocoders/${_geocoderId}/addresses`, params, options) as unknown as ListResponse<Address>\n\t}\n\n\tasync attachments(geocoderId: string | Geocoder, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _geocoderId = (geocoderId as Geocoder).id || geocoderId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `geocoders/${_geocoderId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\n\tisGeocoder(resource: any): resource is Geocoder {\n\t\treturn resource.type && (resource.type === Geocoders.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): GeocoderRel {\n\t\treturn super.relationshipOneToOne<GeocoderRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): GeocoderRel[] {\n\t\treturn super.relationshipOneToMany<GeocoderRel>(...ids)\n\t}\n\n\n\ttype(): GeocoderType {\n\t\treturn Geocoders.TYPE\n\t}\n\n}\n\n\nconst instance = new Geocoders()\nexport default instance\n\nexport type { Geocoders, Geocoder, GeocoderType }\n"]}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { gz as Geocoder, gA as GeocoderSort, lu as GeocoderType, bc as Geocoders, bb 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 { gz as Geocoder, gA as GeocoderSort, lu as GeocoderType, bc as Geocoders, bb 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/geocoders.ts"],"names":[],"mappings":";;AAkCA,MAAM,kBAAkB,WAAsB,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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":"geocoders.js","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsList } from '../query'\n\nimport type { Market } from './markets'\nimport type { Address } from './addresses'\nimport type { Attachment } from './attachments'\n\n\ntype GeocoderType = 'geocoders'\ntype GeocoderRel = ResourceRel & { type: GeocoderType }\n\n\nexport type GeocoderSort = Pick<Geocoder, 'id' | 'name'> & ResourceSort\n// export type GeocoderFilter = Pick<Geocoder, 'id' | 'name'> & ResourceFilter\n\n\ninterface Geocoder extends Resource {\n\t\n\treadonly type: GeocoderType\n\n\t/** \n\t * The geocoder's internal name.\n\t * @example ```\"Default geocoder\"```\n\t */\n\tname: string\n\n\tmarkets?: Market[] | null\n\taddresses?: Address[] | null\n\tattachments?: Attachment[] | null\n\n}\n\n\nclass Geocoders extends ApiResource<Geocoder> {\n\n\tstatic readonly TYPE: GeocoderType = 'geocoders' as const\n\n\tasync markets(geocoderId: string | Geocoder, params?: QueryParamsList<Market>, options?: ResourcesConfig): Promise<ListResponse<Market>> {\n\t\tconst _geocoderId = (geocoderId as Geocoder).id || geocoderId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `geocoders/${_geocoderId}/markets`, params, options) as unknown as ListResponse<Market>\n\t}\n\n\tasync addresses(geocoderId: string | Geocoder, params?: QueryParamsList<Address>, options?: ResourcesConfig): Promise<ListResponse<Address>> {\n\t\tconst _geocoderId = (geocoderId as Geocoder).id || geocoderId as string\n\t\treturn this.resources.fetch<Address>({ type: 'addresses' }, `geocoders/${_geocoderId}/addresses`, params, options) as unknown as ListResponse<Address>\n\t}\n\n\tasync attachments(geocoderId: string | Geocoder, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _geocoderId = (geocoderId as Geocoder).id || geocoderId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `geocoders/${_geocoderId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\n\tisGeocoder(resource: any): resource is Geocoder {\n\t\treturn resource.type && (resource.type === Geocoders.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): GeocoderRel {\n\t\treturn super.relationshipOneToOne<GeocoderRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): GeocoderRel[] {\n\t\treturn super.relationshipOneToMany<GeocoderRel>(...ids)\n\t}\n\n\n\ttype(): GeocoderType {\n\t\treturn Geocoders.TYPE\n\t}\n\n}\n\n\nconst instance = new Geocoders()\nexport default instance\n\nexport type { Geocoder, GeocoderType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/geocoders.ts"],"names":[],"mappings":";;AAkCA,MAAM,kBAAkB,WAAsB,CAAA;AAAA,EAE7C,OAAgB,IAAqB,GAAA,WAAA;AAAA,EAErC,MAAM,OAAA,CAAQ,UAA+B,EAAA,MAAA,EAAkC,OAA0D,EAAA;AACxI,IAAM,MAAA,WAAA,GAAe,WAAwB,EAAM,IAAA,UAAA;AACnD,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAc,EAAE,IAAA,EAAM,SAAU,EAAA,EAAG,CAAa,UAAA,EAAA,WAAW,CAAY,QAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC7G,EAEA,MAAM,SAAA,CAAU,UAA+B,EAAA,MAAA,EAAmC,OAA2D,EAAA;AAC5I,IAAM,MAAA,WAAA,GAAe,WAAwB,EAAM,IAAA,UAAA;AACnD,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAe,EAAE,IAAA,EAAM,WAAY,EAAA,EAAG,CAAa,UAAA,EAAA,WAAW,CAAc,UAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAClH,EAEA,MAAM,WAAA,CAAY,UAA+B,EAAA,MAAA,EAAsC,OAA8D,EAAA;AACpJ,IAAM,MAAA,WAAA,GAAe,WAAwB,EAAM,IAAA,UAAA;AACnD,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAkB,EAAE,IAAA,EAAM,aAAc,EAAA,EAAG,CAAa,UAAA,EAAA,WAAW,CAAgB,YAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACzH,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":"geocoders.js","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsList } from '../query'\n\nimport type { Market } from './markets'\nimport type { Address } from './addresses'\nimport type { Attachment } from './attachments'\n\n\ntype GeocoderType = 'geocoders'\ntype GeocoderRel = ResourceRel & { type: GeocoderType }\n\n\nexport type GeocoderSort = Pick<Geocoder, 'id' | 'name'> & ResourceSort\n// export type GeocoderFilter = Pick<Geocoder, 'id' | 'name'> & ResourceFilter\n\n\ninterface Geocoder extends Resource {\n\t\n\treadonly type: GeocoderType\n\n\t/** \n\t * The geocoder's internal name.\n\t * @example ```\"Default geocoder\"```\n\t */\n\tname: string\n\n\tmarkets?: Market[] | null\n\taddresses?: Address[] | null\n\tattachments?: Attachment[] | null\n\n}\n\n\nclass Geocoders extends ApiResource<Geocoder> {\n\n\tstatic readonly TYPE: GeocoderType = 'geocoders' as const\n\n\tasync markets(geocoderId: string | Geocoder, params?: QueryParamsList<Market>, options?: ResourcesConfig): Promise<ListResponse<Market>> {\n\t\tconst _geocoderId = (geocoderId as Geocoder).id || geocoderId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `geocoders/${_geocoderId}/markets`, params, options) as unknown as ListResponse<Market>\n\t}\n\n\tasync addresses(geocoderId: string | Geocoder, params?: QueryParamsList<Address>, options?: ResourcesConfig): Promise<ListResponse<Address>> {\n\t\tconst _geocoderId = (geocoderId as Geocoder).id || geocoderId as string\n\t\treturn this.resources.fetch<Address>({ type: 'addresses' }, `geocoders/${_geocoderId}/addresses`, params, options) as unknown as ListResponse<Address>\n\t}\n\n\tasync attachments(geocoderId: string | Geocoder, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _geocoderId = (geocoderId as Geocoder).id || geocoderId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `geocoders/${_geocoderId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\n\tisGeocoder(resource: any): resource is Geocoder {\n\t\treturn resource.type && (resource.type === Geocoders.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): GeocoderRel {\n\t\treturn super.relationshipOneToOne<GeocoderRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): GeocoderRel[] {\n\t\treturn super.relationshipOneToMany<GeocoderRel>(...ids)\n\t}\n\n\n\ttype(): GeocoderType {\n\t\treturn Geocoders.TYPE\n\t}\n\n}\n\n\nconst instance = new Geocoders()\nexport default instance\n\nexport type { Geocoders, Geocoder, GeocoderType }\n"]}
|
@@ -1 +1 @@
|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AA,oBAAA,GAAwB,oBAA0C,EAAM,IAAA,mBAAA;AAC9E,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAkB,EAAE,IAAA,EAAM,aAAc,EAAA,EAAG,CAAwB,qBAAA,EAAA,oBAAoB,CAAgB,YAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC7I,EAEA,MAAM,QAAA,CAAS,mBAAiD,EAAA,MAAA,EAAmC,OAA2D,EAAA;AAC7J,IAAM,MAAA,oBAAA,GAAwB,oBAA0C,EAAM,IAAA,mBAAA;AAC9E,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAe,EAAE,IAAA,EAAM,UAAW,EAAA,EAAG,CAAwB,qBAAA,EAAA,oBAAoB,CAAa,SAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACpI,EAGA,oBAAoB,QAA8C,EAAA;AACjE,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,kBAAmB,CAAA,IAAA;AAAA;AAC/D,EAGA,aAAa,EAAsD,EAAA;AAClE,IAAO,OAAA,KAAA,CAAM,qBAA2C,EAAE,CAAA;AAAA;AAC3D,EAEA,sBAAsB,GAAuC,EAAA;AAC5D,IAAO,OAAA,KAAA,CAAM,qBAA4C,CAAA,GAAG,GAAG,CAAA;AAAA;AAChE,EAGA,IAA8B,GAAA;AAC7B,IAAA,OAAO,kBAAmB,CAAA,IAAA;AAAA;AAG5B;AAGA,MAAM,QAAA,GAAW,IAAI,kBAAmB,EAAA;AACxC,IAAO,4BAAQ,GAAA","file":"gift_card_recipients.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 { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype GiftCardRecipientType = 'gift_card_recipients'\ntype GiftCardRecipientRel = ResourceRel & { type: GiftCardRecipientType }\ntype CustomerRel = ResourceRel & { type: CustomerType }\n\n\nexport type GiftCardRecipientSort = Pick<GiftCardRecipient, 'id' | 'email'> & ResourceSort\n// export type GiftCardRecipientFilter = Pick<GiftCardRecipient, 'id' | 'email' | 'first_name' | 'last_name'> & ResourceFilter\n\n\ninterface GiftCardRecipient extends Resource {\n\t\n\treadonly type: GiftCardRecipientType\n\n\t/** \n\t * The recipient email address.\n\t * @example ```\"john@example.com\"```\n\t */\n\temail: string\n\t/** \n\t * The recipient first name.\n\t * @example ```\"John\"```\n\t */\n\tfirst_name?: string | null\n\t/** \n\t * The recipient last name.\n\t * @example ```\"Smith\"```\n\t */\n\tlast_name?: string | null\n\n\tcustomer?: Customer | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface GiftCardRecipientCreate extends ResourceCreate {\n\t\n\t/** \n\t * The recipient email address.\n\t * @example ```\"john@example.com\"```\n\t */\n\temail: string\n\t/** \n\t * The recipient first name.\n\t * @example ```\"John\"```\n\t */\n\tfirst_name?: string | null\n\t/** \n\t * The recipient last name.\n\t * @example ```\"Smith\"```\n\t */\n\tlast_name?: string | null\n\n\tcustomer?: CustomerRel | null\n\n}\n\n\ninterface GiftCardRecipientUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The recipient email address.\n\t * @example ```\"john@example.com\"```\n\t */\n\temail?: string | null\n\t/** \n\t * The recipient first name.\n\t * @example ```\"John\"```\n\t */\n\tfirst_name?: string | null\n\t/** \n\t * The recipient last name.\n\t * @example ```\"Smith\"```\n\t */\n\tlast_name?: string | null\n\n\tcustomer?: CustomerRel | null\n\n}\n\n\nclass GiftCardRecipients extends ApiResource<GiftCardRecipient> {\n\n\tstatic readonly TYPE: GiftCardRecipientType = 'gift_card_recipients' as const\n\n\tasync create(resource: GiftCardRecipientCreate, params?: QueryParamsRetrieve<GiftCardRecipient>, options?: ResourcesConfig): Promise<GiftCardRecipient> {\n\t\treturn this.resources.create<GiftCardRecipientCreate, GiftCardRecipient>({ ...resource, type: GiftCardRecipients.TYPE }, params, options)\n\t}\n\n\tasync update(resource: GiftCardRecipientUpdate, params?: QueryParamsRetrieve<GiftCardRecipient>, options?: ResourcesConfig): Promise<GiftCardRecipient> {\n\t\treturn this.resources.update<GiftCardRecipientUpdate, GiftCardRecipient>({ ...resource, type: GiftCardRecipients.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: GiftCardRecipients.TYPE } : id, options)\n\t}\n\n\tasync customer(giftCardRecipientId: string | GiftCardRecipient, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\tconst _giftCardRecipientId = (giftCardRecipientId as GiftCardRecipient).id || giftCardRecipientId as string\n\t\treturn this.resources.fetch<Customer>({ type: 'customers' }, `gift_card_recipients/${_giftCardRecipientId}/customer`, params, options) as unknown as Customer\n\t}\n\n\tasync attachments(giftCardRecipientId: string | GiftCardRecipient, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _giftCardRecipientId = (giftCardRecipientId as GiftCardRecipient).id || giftCardRecipientId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `gift_card_recipients/${_giftCardRecipientId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(giftCardRecipientId: string | GiftCardRecipient, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _giftCardRecipientId = (giftCardRecipientId as GiftCardRecipient).id || giftCardRecipientId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `gift_card_recipients/${_giftCardRecipientId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisGiftCardRecipient(resource: any): resource is GiftCardRecipient {\n\t\treturn resource.type && (resource.type === GiftCardRecipients.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): GiftCardRecipientRel {\n\t\treturn super.relationshipOneToOne<GiftCardRecipientRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): GiftCardRecipientRel[] {\n\t\treturn super.relationshipOneToMany<GiftCardRecipientRel>(...ids)\n\t}\n\n\n\ttype(): GiftCardRecipientType {\n\t\treturn GiftCardRecipients.TYPE\n\t}\n\n}\n\n\nconst instance = new GiftCardRecipients()\nexport default instance\n\nexport type { GiftCardRecipient, GiftCardRecipientCreate, GiftCardRecipientUpdate, GiftCardRecipientType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/gift_card_recipients.ts"],"names":["ApiResource"],"mappings":";;;;AA2FA,MAAM,2BAA2BA,oBAA+B,CAAA;AAAA,EAE/D,OAAgB,IAA8B,GAAA,sBAAA;AAAA,EAE9C,MAAM,MAAA,CAAO,QAAmC,EAAA,MAAA,EAAiD,OAAuD,EAAA;AACvJ,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAmD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,kBAAmB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACzI,EAEA,MAAM,MAAA,CAAO,QAAmC,EAAA,MAAA,EAAiD,OAAuD,EAAA;AACvJ,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAmD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,kBAAmB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACzI,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,kBAAA,CAAmB,IAAK,EAAA,GAAI,IA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qBAA4C,CAAA,GAAG,GAAG,CAAA;AAAA;AAChE,EAGA,IAA8B,GAAA;AAC7B,IAAA,OAAO,kBAAmB,CAAA,IAAA;AAAA;AAG5B;AAGA,MAAM,QAAA,GAAW,IAAI,kBAAmB,EAAA;AACxC,IAAO,4BAAQ,GAAA","file":"gift_card_recipients.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 { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype GiftCardRecipientType = 'gift_card_recipients'\ntype GiftCardRecipientRel = ResourceRel & { type: GiftCardRecipientType }\ntype CustomerRel = ResourceRel & { type: CustomerType }\n\n\nexport type GiftCardRecipientSort = Pick<GiftCardRecipient, 'id' | 'email'> & ResourceSort\n// export type GiftCardRecipientFilter = Pick<GiftCardRecipient, 'id' | 'email' | 'first_name' | 'last_name'> & ResourceFilter\n\n\ninterface GiftCardRecipient extends Resource {\n\t\n\treadonly type: GiftCardRecipientType\n\n\t/** \n\t * The recipient email address.\n\t * @example ```\"john@example.com\"```\n\t */\n\temail: string\n\t/** \n\t * The recipient first name.\n\t * @example ```\"John\"```\n\t */\n\tfirst_name?: string | null\n\t/** \n\t * The recipient last name.\n\t * @example ```\"Smith\"```\n\t */\n\tlast_name?: string | null\n\n\tcustomer?: Customer | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface GiftCardRecipientCreate extends ResourceCreate {\n\t\n\t/** \n\t * The recipient email address.\n\t * @example ```\"john@example.com\"```\n\t */\n\temail: string\n\t/** \n\t * The recipient first name.\n\t * @example ```\"John\"```\n\t */\n\tfirst_name?: string | null\n\t/** \n\t * The recipient last name.\n\t * @example ```\"Smith\"```\n\t */\n\tlast_name?: string | null\n\n\tcustomer?: CustomerRel | null\n\n}\n\n\ninterface GiftCardRecipientUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The recipient email address.\n\t * @example ```\"john@example.com\"```\n\t */\n\temail?: string | null\n\t/** \n\t * The recipient first name.\n\t * @example ```\"John\"```\n\t */\n\tfirst_name?: string | null\n\t/** \n\t * The recipient last name.\n\t * @example ```\"Smith\"```\n\t */\n\tlast_name?: string | null\n\n\tcustomer?: CustomerRel | null\n\n}\n\n\nclass GiftCardRecipients extends ApiResource<GiftCardRecipient> {\n\n\tstatic readonly TYPE: GiftCardRecipientType = 'gift_card_recipients' as const\n\n\tasync create(resource: GiftCardRecipientCreate, params?: QueryParamsRetrieve<GiftCardRecipient>, options?: ResourcesConfig): Promise<GiftCardRecipient> {\n\t\treturn this.resources.create<GiftCardRecipientCreate, GiftCardRecipient>({ ...resource, type: GiftCardRecipients.TYPE }, params, options)\n\t}\n\n\tasync update(resource: GiftCardRecipientUpdate, params?: QueryParamsRetrieve<GiftCardRecipient>, options?: ResourcesConfig): Promise<GiftCardRecipient> {\n\t\treturn this.resources.update<GiftCardRecipientUpdate, GiftCardRecipient>({ ...resource, type: GiftCardRecipients.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: GiftCardRecipients.TYPE } : id, options)\n\t}\n\n\tasync customer(giftCardRecipientId: string | GiftCardRecipient, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\tconst _giftCardRecipientId = (giftCardRecipientId as GiftCardRecipient).id || giftCardRecipientId as string\n\t\treturn this.resources.fetch<Customer>({ type: 'customers' }, `gift_card_recipients/${_giftCardRecipientId}/customer`, params, options) as unknown as Customer\n\t}\n\n\tasync attachments(giftCardRecipientId: string | GiftCardRecipient, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _giftCardRecipientId = (giftCardRecipientId as GiftCardRecipient).id || giftCardRecipientId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `gift_card_recipients/${_giftCardRecipientId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(giftCardRecipientId: string | GiftCardRecipient, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _giftCardRecipientId = (giftCardRecipientId as GiftCardRecipient).id || giftCardRecipientId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `gift_card_recipients/${_giftCardRecipientId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisGiftCardRecipient(resource: any): resource is GiftCardRecipient {\n\t\treturn resource.type && (resource.type === GiftCardRecipients.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): GiftCardRecipientRel {\n\t\treturn super.relationshipOneToOne<GiftCardRecipientRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): GiftCardRecipientRel[] {\n\t\treturn super.relationshipOneToMany<GiftCardRecipientRel>(...ids)\n\t}\n\n\n\ttype(): GiftCardRecipientType {\n\t\treturn GiftCardRecipients.TYPE\n\t}\n\n}\n\n\nconst instance = new GiftCardRecipients()\nexport default instance\n\nexport type { GiftCardRecipients, GiftCardRecipient, GiftCardRecipientCreate, GiftCardRecipientUpdate, GiftCardRecipientType }\n"]}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { gB as GiftCardRecipient, gC as GiftCardRecipientCreate, gE as GiftCardRecipientSort, mc as GiftCardRecipientType, gD as GiftCardRecipientUpdate, be as GiftCardRecipients, bd 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 { gB as GiftCardRecipient, gC as GiftCardRecipientCreate, gE as GiftCardRecipientSort, mc as GiftCardRecipientType, gD as GiftCardRecipientUpdate, be as GiftCardRecipients, bd 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/gift_card_recipients.ts"],"names":[],"mappings":";;AA2FA,MAAM,2BAA2B,WAA+B,CAAA;AAAA,EAE/D,OAAgB,IAA8B,GAAA,sBAAA;AAAA,EAE9C,MAAM,MAAA,CAAO,QAAmC,EAAA,MAAA,EAAiD,OAAuD,EAAA;AACvJ,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAmD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,kBAAmB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACzI,EAEA,MAAM,MAAA,CAAO,QAAmC,EAAA,MAAA,EAAiD,OAAuD,EAAA;AACvJ,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAmD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,kBAAmB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACzI,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,kBAAA,CAAmB,IAAK,EAAA,GAAI,IAAI,OAAO,CAAA;AAAA;AAC1G,EAEA,MAAM,QAAA,CAAS,mBAAiD,EAAA,MAAA,EAAwC,OAA8C,EAAA;AACrJ,IAAM,MAAA,oBAAA,GAAwB,oBAA0C,EAAM,IAAA,mBAAA;AAC9E,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAgB,EAAE,IAAA,EAAM,WAAY,EAAA,EAAG,CAAwB,qBAAA,EAAA,oBAAoB,CAAa,SAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACtI,EAEA,MAAM,WAAA,CAAY,mBAAiD,EAAA,MAAA,EAAsC,OAA8D,EAAA;AACtK,IAAM,MAAA,oBAAA,GAAwB,oBAA0C,EAAM,IAAA,mBAAA;AAC9E,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAkB,EAAE,IAAA,EAAM,aAAc,EAAA,EAAG,CAAwB,qBAAA,EAAA,oBAAoB,CAAgB,YAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC7I,EAEA,MAAM,QAAA,CAAS,mBAAiD,EAAA,MAAA,EAAmC,OAA2D,EAAA;AAC7J,IAAM,MAAA,oBAAA,GAAwB,oBAA0C,EAAM,IAAA,mBAAA;AAC9E,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAe,EAAE,IAAA,EAAM,UAAW,EAAA,EAAG,CAAwB,qBAAA,EAAA,oBAAoB,CAAa,SAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACpI,EAGA,oBAAoB,QAA8C,EAAA;AACjE,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,kBAAmB,CAAA,IAAA;AAAA;AAC/D,EAGA,aAAa,EAAsD,EAAA;AAClE,IAAO,OAAA,KAAA,CAAM,qBAA2C,EAAE,CAAA;AAAA;AAC3D,EAEA,sBAAsB,GAAuC,EAAA;AAC5D,IAAO,OAAA,KAAA,CAAM,qBAA4C,CAAA,GAAG,GAAG,CAAA;AAAA;AAChE,EAGA,IAA8B,GAAA;AAC7B,IAAA,OAAO,kBAAmB,CAAA,IAAA;AAAA;AAG5B;AAGA,MAAM,QAAA,GAAW,IAAI,kBAAmB,EAAA;AACxC,IAAO,4BAAQ,GAAA","file":"gift_card_recipients.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 { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype GiftCardRecipientType = 'gift_card_recipients'\ntype GiftCardRecipientRel = ResourceRel & { type: GiftCardRecipientType }\ntype CustomerRel = ResourceRel & { type: CustomerType }\n\n\nexport type GiftCardRecipientSort = Pick<GiftCardRecipient, 'id' | 'email'> & ResourceSort\n// export type GiftCardRecipientFilter = Pick<GiftCardRecipient, 'id' | 'email' | 'first_name' | 'last_name'> & ResourceFilter\n\n\ninterface GiftCardRecipient extends Resource {\n\t\n\treadonly type: GiftCardRecipientType\n\n\t/** \n\t * The recipient email address.\n\t * @example ```\"john@example.com\"```\n\t */\n\temail: string\n\t/** \n\t * The recipient first name.\n\t * @example ```\"John\"```\n\t */\n\tfirst_name?: string | null\n\t/** \n\t * The recipient last name.\n\t * @example ```\"Smith\"```\n\t */\n\tlast_name?: string | null\n\n\tcustomer?: Customer | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface GiftCardRecipientCreate extends ResourceCreate {\n\t\n\t/** \n\t * The recipient email address.\n\t * @example ```\"john@example.com\"```\n\t */\n\temail: string\n\t/** \n\t * The recipient first name.\n\t * @example ```\"John\"```\n\t */\n\tfirst_name?: string | null\n\t/** \n\t * The recipient last name.\n\t * @example ```\"Smith\"```\n\t */\n\tlast_name?: string | null\n\n\tcustomer?: CustomerRel | null\n\n}\n\n\ninterface GiftCardRecipientUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The recipient email address.\n\t * @example ```\"john@example.com\"```\n\t */\n\temail?: string | null\n\t/** \n\t * The recipient first name.\n\t * @example ```\"John\"```\n\t */\n\tfirst_name?: string | null\n\t/** \n\t * The recipient last name.\n\t * @example ```\"Smith\"```\n\t */\n\tlast_name?: string | null\n\n\tcustomer?: CustomerRel | null\n\n}\n\n\nclass GiftCardRecipients extends ApiResource<GiftCardRecipient> {\n\n\tstatic readonly TYPE: GiftCardRecipientType = 'gift_card_recipients' as const\n\n\tasync create(resource: GiftCardRecipientCreate, params?: QueryParamsRetrieve<GiftCardRecipient>, options?: ResourcesConfig): Promise<GiftCardRecipient> {\n\t\treturn this.resources.create<GiftCardRecipientCreate, GiftCardRecipient>({ ...resource, type: GiftCardRecipients.TYPE }, params, options)\n\t}\n\n\tasync update(resource: GiftCardRecipientUpdate, params?: QueryParamsRetrieve<GiftCardRecipient>, options?: ResourcesConfig): Promise<GiftCardRecipient> {\n\t\treturn this.resources.update<GiftCardRecipientUpdate, GiftCardRecipient>({ ...resource, type: GiftCardRecipients.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: GiftCardRecipients.TYPE } : id, options)\n\t}\n\n\tasync customer(giftCardRecipientId: string | GiftCardRecipient, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\tconst _giftCardRecipientId = (giftCardRecipientId as GiftCardRecipient).id || giftCardRecipientId as string\n\t\treturn this.resources.fetch<Customer>({ type: 'customers' }, `gift_card_recipients/${_giftCardRecipientId}/customer`, params, options) as unknown as Customer\n\t}\n\n\tasync attachments(giftCardRecipientId: string | GiftCardRecipient, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _giftCardRecipientId = (giftCardRecipientId as GiftCardRecipient).id || giftCardRecipientId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `gift_card_recipients/${_giftCardRecipientId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(giftCardRecipientId: string | GiftCardRecipient, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _giftCardRecipientId = (giftCardRecipientId as GiftCardRecipient).id || giftCardRecipientId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `gift_card_recipients/${_giftCardRecipientId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisGiftCardRecipient(resource: any): resource is GiftCardRecipient {\n\t\treturn resource.type && (resource.type === GiftCardRecipients.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): GiftCardRecipientRel {\n\t\treturn super.relationshipOneToOne<GiftCardRecipientRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): GiftCardRecipientRel[] {\n\t\treturn super.relationshipOneToMany<GiftCardRecipientRel>(...ids)\n\t}\n\n\n\ttype(): GiftCardRecipientType {\n\t\treturn GiftCardRecipients.TYPE\n\t}\n\n}\n\n\nconst instance = new GiftCardRecipients()\nexport default instance\n\nexport type { GiftCardRecipient, GiftCardRecipientCreate, GiftCardRecipientUpdate, GiftCardRecipientType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/gift_card_recipients.ts"],"names":[],"mappings":";;AA2FA,MAAM,2BAA2B,WAA+B,CAAA;AAAA,EAE/D,OAAgB,IAA8B,GAAA,sBAAA;AAAA,EAE9C,MAAM,MAAA,CAAO,QAAmC,EAAA,MAAA,EAAiD,OAAuD,EAAA;AACvJ,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAmD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,kBAAmB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACzI,EAEA,MAAM,MAAA,CAAO,QAAmC,EAAA,MAAA,EAAiD,OAAuD,EAAA;AACvJ,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAmD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,kBAAmB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACzI,EAEA,MAAM,MAAO,CAAA,EAAA,EAAyB,OAA0C,EAAA;AAC/E,IAAA,MAAM,IAAK,CAAA,S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E,IAAO,OAAA,KAAA,CAAM,qBAA2C,EAAE,CAAA;AAAA;AAC3D,EAEA,sBAAsB,GAAuC,EAAA;AAC5D,IAAO,OAAA,KAAA,CAAM,qBAA4C,CAAA,GAAG,GAAG,CAAA;AAAA;AAChE,EAGA,IAA8B,GAAA;AAC7B,IAAA,OAAO,kBAAmB,CAAA,IAAA;AAAA;AAG5B;AAGA,MAAM,QAAA,GAAW,IAAI,kBAAmB,EAAA;AACxC,IAAO,4BAAQ,GAAA","file":"gift_card_recipients.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 { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype GiftCardRecipientType = 'gift_card_recipients'\ntype GiftCardRecipientRel = ResourceRel & { type: GiftCardRecipientType }\ntype CustomerRel = ResourceRel & { type: CustomerType }\n\n\nexport type GiftCardRecipientSort = Pick<GiftCardRecipient, 'id' | 'email'> & ResourceSort\n// export type GiftCardRecipientFilter = Pick<GiftCardRecipient, 'id' | 'email' | 'first_name' | 'last_name'> & ResourceFilter\n\n\ninterface GiftCardRecipient extends Resource {\n\t\n\treadonly type: GiftCardRecipientType\n\n\t/** \n\t * The recipient email address.\n\t * @example ```\"john@example.com\"```\n\t */\n\temail: string\n\t/** \n\t * The recipient first name.\n\t * @example ```\"John\"```\n\t */\n\tfirst_name?: string | null\n\t/** \n\t * The recipient last name.\n\t * @example ```\"Smith\"```\n\t */\n\tlast_name?: string | null\n\n\tcustomer?: Customer | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface GiftCardRecipientCreate extends ResourceCreate {\n\t\n\t/** \n\t * The recipient email address.\n\t * @example ```\"john@example.com\"```\n\t */\n\temail: string\n\t/** \n\t * The recipient first name.\n\t * @example ```\"John\"```\n\t */\n\tfirst_name?: string | null\n\t/** \n\t * The recipient last name.\n\t * @example ```\"Smith\"```\n\t */\n\tlast_name?: string | null\n\n\tcustomer?: CustomerRel | null\n\n}\n\n\ninterface GiftCardRecipientUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The recipient email address.\n\t * @example ```\"john@example.com\"```\n\t */\n\temail?: string | null\n\t/** \n\t * The recipient first name.\n\t * @example ```\"John\"```\n\t */\n\tfirst_name?: string | null\n\t/** \n\t * The recipient last name.\n\t * @example ```\"Smith\"```\n\t */\n\tlast_name?: string | null\n\n\tcustomer?: CustomerRel | null\n\n}\n\n\nclass GiftCardRecipients extends ApiResource<GiftCardRecipient> {\n\n\tstatic readonly TYPE: GiftCardRecipientType = 'gift_card_recipients' as const\n\n\tasync create(resource: GiftCardRecipientCreate, params?: QueryParamsRetrieve<GiftCardRecipient>, options?: ResourcesConfig): Promise<GiftCardRecipient> {\n\t\treturn this.resources.create<GiftCardRecipientCreate, GiftCardRecipient>({ ...resource, type: GiftCardRecipients.TYPE }, params, options)\n\t}\n\n\tasync update(resource: GiftCardRecipientUpdate, params?: QueryParamsRetrieve<GiftCardRecipient>, options?: ResourcesConfig): Promise<GiftCardRecipient> {\n\t\treturn this.resources.update<GiftCardRecipientUpdate, GiftCardRecipient>({ ...resource, type: GiftCardRecipients.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: GiftCardRecipients.TYPE } : id, options)\n\t}\n\n\tasync customer(giftCardRecipientId: string | GiftCardRecipient, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\tconst _giftCardRecipientId = (giftCardRecipientId as GiftCardRecipient).id || giftCardRecipientId as string\n\t\treturn this.resources.fetch<Customer>({ type: 'customers' }, `gift_card_recipients/${_giftCardRecipientId}/customer`, params, options) as unknown as Customer\n\t}\n\n\tasync attachments(giftCardRecipientId: string | GiftCardRecipient, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _giftCardRecipientId = (giftCardRecipientId as GiftCardRecipient).id || giftCardRecipientId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `gift_card_recipients/${_giftCardRecipientId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(giftCardRecipientId: string | GiftCardRecipient, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _giftCardRecipientId = (giftCardRecipientId as GiftCardRecipient).id || giftCardRecipientId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `gift_card_recipients/${_giftCardRecipientId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisGiftCardRecipient(resource: any): resource is GiftCardRecipient {\n\t\treturn resource.type && (resource.type === GiftCardRecipients.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): GiftCardRecipientRel {\n\t\treturn super.relationshipOneToOne<GiftCardRecipientRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): GiftCardRecipientRel[] {\n\t\treturn super.relationshipOneToMany<GiftCardRecipientRel>(...ids)\n\t}\n\n\n\ttype(): GiftCardRecipientType {\n\t\treturn GiftCardRecipients.TYPE\n\t}\n\n}\n\n\nconst instance = new GiftCardRecipients()\nexport default instance\n\nexport type { GiftCardRecipients, GiftCardRecipient, GiftCardRecipientCreate, GiftCardRecipientUpdate, GiftCardRecipientType }\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/resources/gift_cards.ts"],"names":["ApiResource"],"mappings":";;;;AAsRA,MAAM,kBAAkBA,oBAAsB,CAAA;AAAA,EAE7C,OAAgB,IAAqB,GAAA,YAAA;AAAA,EAErC,MAAM,MAAA,CAAO,QAA0B,EAAA,MAAA,EAAwC,OAA8C,EAAA;AAC5H,IAAO,OAAA,IAAA,CAAK,SA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AI,MAAM,SAAU,CAAA,IAAA,EAAM,WAAW,YAAa,EAAA,EAAG,QAAQ,OAAO,CAAA;AAAA;AACnK,EAEA,MAAM,YAAA,CAAa,EAAuB,EAAA,YAAA,EAAsB,QAAwC,OAA8C,EAAA;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,kBAAQ,GAAA","file":"gift_cards.cjs","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Market, MarketType } from './markets'\nimport type { GiftCardRecipient, GiftCardRecipientType } from './gift_card_recipients'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Tag, TagType } from './tags'\nimport type { Version } from './versions'\n\n\ntype GiftCardType = 'gift_cards'\ntype GiftCardRel = ResourceRel & { type: GiftCardType }\ntype MarketRel = ResourceRel & { type: MarketType }\ntype GiftCardRecipientRel = ResourceRel & { type: GiftCardRecipientType }\ntype TagRel = ResourceRel & { type: TagType }\n\n\nexport type GiftCardSort = Pick<GiftCard, 'id' | 'status' | 'currency_code' | 'balance_cents' | 'balance_max_cents' | 'expires_at'> & ResourceSort\n// export type GiftCardFilter = Pick<GiftCard, 'id' | 'status' | 'code' | 'currency_code' | 'balance_cents' | 'balance_max_cents' | 'single_use' | 'rechargeable' | 'expires_at'> & ResourceFilter\n\n\ninterface GiftCard extends Resource {\n\t\n\treadonly type: GiftCardType\n\n\t/** \n\t * The gift card status. One of 'draft' (default), 'inactive', 'active', or 'redeemed'.\n\t * @example ```\"draft\"```\n\t */\n\tstatus: 'draft' | 'inactive' | 'active' | 'redeemed'\n\t/** \n\t * The gift card code UUID. If not set, it's automatically generated.\n\t * @example ```\"32db311a-75d9-4c17-9e34-2be220137ad6\"```\n\t */\n\tcode?: string | null\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * The gift card initial balance, in cents.\n\t * @example ```15000```\n\t */\n\tinitial_balance_cents: number\n\t/** \n\t * The gift card initial balance, float.\n\t * @example ```150```\n\t */\n\tinitial_balance_float: number\n\t/** \n\t * The gift card initial balance, formatted.\n\t * @example ```\"€150,00\"```\n\t */\n\tformatted_initial_balance: string\n\t/** \n\t * The gift card balance, in cents.\n\t * @example ```15000```\n\t */\n\tbalance_cents: number\n\t/** \n\t * The gift card balance, float.\n\t * @example ```150```\n\t */\n\tbalance_float: number\n\t/** \n\t * The gift card balance, formatted.\n\t * @example ```\"€150,00\"```\n\t */\n\tformatted_balance: string\n\t/** \n\t * The gift card balance max, in cents.\n\t * @example ```100000```\n\t */\n\tbalance_max_cents?: number | null\n\t/** \n\t * The gift card balance max, float.\n\t * @example ```1000```\n\t */\n\tbalance_max_float?: number | null\n\t/** \n\t * The gift card balance max, formatted.\n\t * @example ```\"€1000,00\"```\n\t */\n\tformatted_balance_max?: string | null\n\t/** \n\t * The gift card balance log. Tracks all the gift card transactions.\n\t * @example ```[{\"datetime\":\"2019-12-23T12:00:00.000Z\",\"balance_change_cents\":-10000},{\"datetime\":\"2020-02-01T12:00:00.000Z\",\"balance_change_cents\":5000}]```\n\t */\n\tbalance_log: Array<Record<string, any>>\n\t/** \n\t * The gift card usage log. Tracks all the gift card usage actions by orders.\n\t * @example ```{\"eNoKkhmbNp\":[{\"action\":\"use\",\"amount_cents\":-1000,\"balance_cents\":4000,\"order_number\":\"11111\",\"datetime\":\"2020-02-01T12:00:00.000Z\"}]}```\n\t */\n\tusage_log: Record<string, any>\n\t/** \n\t * Indicates if the gift card can be used only one.\n\t */\n\tsingle_use?: boolean | null\n\t/** \n\t * Indicates if the gift card can be recharged.\n\t * @example ```true```\n\t */\n\trechargeable?: boolean | null\n\t/** \n\t * Indicates if redeemed gift card amount is distributed for tax calculation.\n\t * @example ```true```\n\t */\n\tdistribute_discount?: boolean | null\n\t/** \n\t * The URL of an image that represents the gift card.\n\t * @example ```\"https://img.yourdomain.com/gift_cards/32db311a.png\"```\n\t */\n\timage_url?: string | null\n\t/** \n\t * Time at which the gift card will expire.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\texpires_at?: string | null\n\t/** \n\t * The email address of the associated recipient. When creating or updating a gift card, this is a shortcut to find or create the associated recipient by email.\n\t * @example ```\"john@example.com\"```\n\t */\n\trecipient_email?: string | null\n\n\tmarket?: Market | null\n\tgift_card_recipient?: GiftCardRecipient | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\ttags?: Tag[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface GiftCardCreate extends ResourceCreate {\n\t\n\t/** \n\t * The gift card code UUID. If not set, it's automatically generated.\n\t * @example ```\"32db311a-75d9-4c17-9e34-2be220137ad6\"```\n\t */\n\tcode?: string | null\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * The gift card balance, in cents.\n\t * @example ```15000```\n\t */\n\tbalance_cents: number\n\t/** \n\t * The gift card balance max, in cents.\n\t * @example ```100000```\n\t */\n\tbalance_max_cents?: number | null\n\t/** \n\t * Indicates if the gift card can be used only one.\n\t */\n\tsingle_use?: boolean | null\n\t/** \n\t * Indicates if the gift card can be recharged.\n\t * @example ```true```\n\t */\n\trechargeable?: boolean | null\n\t/** \n\t * Indicates if redeemed gift card amount is distributed for tax calculation.\n\t * @example ```true```\n\t */\n\tdistribute_discount?: boolean | null\n\t/** \n\t * The URL of an image that represents the gift card.\n\t * @example ```\"https://img.yourdomain.com/gift_cards/32db311a.png\"```\n\t */\n\timage_url?: string | null\n\t/** \n\t * Time at which the gift card will expire.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\texpires_at?: string | null\n\t/** \n\t * The email address of the associated recipient. When creating or updating a gift card, this is a shortcut to find or create the associated recipient by email.\n\t * @example ```\"john@example.com\"```\n\t */\n\trecipient_email?: string | null\n\n\tmarket?: MarketRel | null\n\tgift_card_recipient?: GiftCardRecipientRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\ninterface GiftCardUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * The gift card balance, in cents.\n\t * @example ```15000```\n\t */\n\tbalance_cents?: number | null\n\t/** \n\t * The gift card balance max, in cents.\n\t * @example ```100000```\n\t */\n\tbalance_max_cents?: number | null\n\t/** \n\t * Indicates if the gift card can be used only one.\n\t */\n\tsingle_use?: boolean | null\n\t/** \n\t * Indicates if the gift card can be recharged.\n\t * @example ```true```\n\t */\n\trechargeable?: boolean | null\n\t/** \n\t * Indicates if redeemed gift card amount is distributed for tax calculation.\n\t * @example ```true```\n\t */\n\tdistribute_discount?: boolean | null\n\t/** \n\t * The URL of an image that represents the gift card.\n\t * @example ```\"https://img.yourdomain.com/gift_cards/32db311a.png\"```\n\t */\n\timage_url?: string | null\n\t/** \n\t * Time at which the gift card will expire.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\texpires_at?: string | null\n\t/** \n\t * The email address of the associated recipient. When creating or updating a gift card, this is a shortcut to find or create the associated recipient by email.\n\t * @example ```\"john@example.com\"```\n\t */\n\trecipient_email?: string | null\n\t/** \n\t * Send this attribute if you want to confirm a draft gift card. The gift card becomes 'inactive', waiting to be activated.\n\t * @example ```true```\n\t */\n\t_purchase?: boolean | null\n\t/** \n\t * Send this attribute if you want to activate a gift card.\n\t * @example ```true```\n\t */\n\t_activate?: boolean | null\n\t/** \n\t * Send this attribute if you want to deactivate a gift card.\n\t * @example ```true```\n\t */\n\t_deactivate?: boolean | null\n\t/** \n\t * The balance change, in cents. Send a negative value to reduces the card balance by the specified amount. Send a positive value to recharge the gift card (if rechargeable).\n\t * @example ```-5000```\n\t */\n\t_balance_change_cents?: number | 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\tmarket?: MarketRel | null\n\tgift_card_recipient?: GiftCardRecipientRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\nclass GiftCards extends ApiResource<GiftCard> {\n\n\tstatic readonly TYPE: GiftCardType = 'gift_cards' as const\n\n\tasync create(resource: GiftCardCreate, params?: QueryParamsRetrieve<GiftCard>, options?: ResourcesConfig): Promise<GiftCard> {\n\t\treturn this.resources.create<GiftCardCreate, GiftCard>({ ...resource, type: GiftCards.TYPE }, params, options)\n\t}\n\n\tasync update(resource: GiftCardUpdate, params?: QueryParamsRetrieve<GiftCard>, options?: ResourcesConfig): Promise<GiftCard> {\n\t\treturn this.resources.update<GiftCardUpdate, GiftCard>({ ...resource, type: GiftCards.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: GiftCards.TYPE } : id, options)\n\t}\n\n\tasync market(giftCardId: string | GiftCard, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\tconst _giftCardId = (giftCardId as GiftCard).id || giftCardId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `gift_cards/${_giftCardId}/market`, params, options) as unknown as Market\n\t}\n\n\tasync gift_card_recipient(giftCardId: string | GiftCard, params?: QueryParamsRetrieve<GiftCardRecipient>, options?: ResourcesConfig): Promise<GiftCardRecipient> {\n\t\tconst _giftCardId = (giftCardId as GiftCard).id || giftCardId as string\n\t\treturn this.resources.fetch<GiftCardRecipient>({ type: 'gift_card_recipients' }, `gift_cards/${_giftCardId}/gift_card_recipient`, params, options) as unknown as GiftCardRecipient\n\t}\n\n\tasync attachments(giftCardId: string | GiftCard, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _giftCardId = (giftCardId as GiftCard).id || giftCardId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `gift_cards/${_giftCardId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(giftCardId: string | GiftCard, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _giftCardId = (giftCardId as GiftCard).id || giftCardId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `gift_cards/${_giftCardId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync tags(giftCardId: string | GiftCard, params?: QueryParamsList<Tag>, options?: ResourcesConfig): Promise<ListResponse<Tag>> {\n\t\tconst _giftCardId = (giftCardId as GiftCard).id || giftCardId as string\n\t\treturn this.resources.fetch<Tag>({ type: 'tags' }, `gift_cards/${_giftCardId}/tags`, params, options) as unknown as ListResponse<Tag>\n\t}\n\n\tasync versions(giftCardId: string | GiftCard, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _giftCardId = (giftCardId as GiftCard).id || giftCardId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `gift_cards/${_giftCardId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _purchase(id: string | GiftCard, params?: QueryParamsRetrieve<GiftCard>, options?: ResourcesConfig): Promise<GiftCard> {\n\t\treturn this.resources.update<GiftCardUpdate, GiftCard>({ id: (typeof id === 'string')? id: id.id, type: GiftCards.TYPE, _purchase: true }, params, options)\n\t}\n\n\tasync _activate(id: string | GiftCard, params?: QueryParamsRetrieve<GiftCard>, options?: ResourcesConfig): Promise<GiftCard> {\n\t\treturn this.resources.update<GiftCardUpdate, GiftCard>({ id: (typeof id === 'string')? id: id.id, type: GiftCards.TYPE, _activate: true }, params, options)\n\t}\n\n\tasync _deactivate(id: string | GiftCard, params?: QueryParamsRetrieve<GiftCard>, options?: ResourcesConfig): Promise<GiftCard> {\n\t\treturn this.resources.update<GiftCardUpdate, GiftCard>({ id: (typeof id === 'string')? id: id.id, type: GiftCards.TYPE, _deactivate: true }, params, options)\n\t}\n\n\tasync _balance_change_cents(id: string | GiftCard, triggerValue: number, params?: QueryParamsRetrieve<GiftCard>, options?: ResourcesConfig): Promise<GiftCard> {\n\t\treturn this.resources.update<GiftCardUpdate, GiftCard>({ id: (typeof id === 'string')? id: id.id, type: GiftCards.TYPE, _balance_change_cents: triggerValue }, params, options)\n\t}\n\n\tasync _add_tags(id: string | GiftCard, triggerValue: string, params?: QueryParamsRetrieve<GiftCard>, options?: ResourcesConfig): Promise<GiftCard> {\n\t\treturn this.resources.update<GiftCardUpdate, GiftCard>({ id: (typeof id === 'string')? id: id.id, type: GiftCards.TYPE, _add_tags: triggerValue }, params, options)\n\t}\n\n\tasync _remove_tags(id: string | GiftCard, triggerValue: string, params?: QueryParamsRetrieve<GiftCard>, options?: ResourcesConfig): Promise<GiftCard> {\n\t\treturn this.resources.update<GiftCardUpdate, GiftCard>({ id: (typeof id === 'string')? id: id.id, type: GiftCards.TYPE, _remove_tags: triggerValue }, params, options)\n\t}\n\n\n\tisGiftCard(resource: any): resource is GiftCard {\n\t\treturn resource.type && (resource.type === GiftCards.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): GiftCardRel {\n\t\treturn super.relationshipOneToOne<GiftCardRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): GiftCardRel[] {\n\t\treturn super.relationshipOneToMany<GiftCardRel>(...ids)\n\t}\n\n\n\ttype(): GiftCardType {\n\t\treturn GiftCards.TYPE\n\t}\n\n}\n\n\nconst instance = new GiftCards()\nexport default instance\n\nexport type { GiftCard, GiftCardCreate, GiftCardUpdate, GiftCardType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/gift_cards.ts"],"names":["ApiResource"],"mappings":";;;;AAsRA,MAAM,kBAAkBA,oBAAsB,CAAA;AAAA,EAE7C,OAAgB,IAAqB,GAAA,YAAA;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,CA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AA,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,kBAAQ,GAAA","file":"gift_cards.cjs","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Market, MarketType } from './markets'\nimport type { GiftCardRecipient, GiftCardRecipientType } from './gift_card_recipients'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Tag, TagType } from './tags'\nimport type { Version } from './versions'\n\n\ntype GiftCardType = 'gift_cards'\ntype GiftCardRel = ResourceRel & { type: GiftCardType }\ntype MarketRel = ResourceRel & { type: MarketType }\ntype GiftCardRecipientRel = ResourceRel & { type: GiftCardRecipientType }\ntype TagRel = ResourceRel & { type: TagType }\n\n\nexport type GiftCardSort = Pick<GiftCard, 'id' | 'status' | 'currency_code' | 'balance_cents' | 'balance_max_cents' | 'expires_at'> & ResourceSort\n// export type GiftCardFilter = Pick<GiftCard, 'id' | 'status' | 'code' | 'currency_code' | 'balance_cents' | 'balance_max_cents' | 'single_use' | 'rechargeable' | 'expires_at'> & ResourceFilter\n\n\ninterface GiftCard extends Resource {\n\t\n\treadonly type: GiftCardType\n\n\t/** \n\t * The gift card status. One of 'draft' (default), 'inactive', 'active', or 'redeemed'.\n\t * @example ```\"draft\"```\n\t */\n\tstatus: 'draft' | 'inactive' | 'active' | 'redeemed'\n\t/** \n\t * The gift card code UUID. If not set, it's automatically generated.\n\t * @example ```\"32db311a-75d9-4c17-9e34-2be220137ad6\"```\n\t */\n\tcode?: string | null\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * The gift card initial balance, in cents.\n\t * @example ```15000```\n\t */\n\tinitial_balance_cents: number\n\t/** \n\t * The gift card initial balance, float.\n\t * @example ```150```\n\t */\n\tinitial_balance_float: number\n\t/** \n\t * The gift card initial balance, formatted.\n\t * @example ```\"€150,00\"```\n\t */\n\tformatted_initial_balance: string\n\t/** \n\t * The gift card balance, in cents.\n\t * @example ```15000```\n\t */\n\tbalance_cents: number\n\t/** \n\t * The gift card balance, float.\n\t * @example ```150```\n\t */\n\tbalance_float: number\n\t/** \n\t * The gift card balance, formatted.\n\t * @example ```\"€150,00\"```\n\t */\n\tformatted_balance: string\n\t/** \n\t * The gift card balance max, in cents.\n\t * @example ```100000```\n\t */\n\tbalance_max_cents?: number | null\n\t/** \n\t * The gift card balance max, float.\n\t * @example ```1000```\n\t */\n\tbalance_max_float?: number | null\n\t/** \n\t * The gift card balance max, formatted.\n\t * @example ```\"€1000,00\"```\n\t */\n\tformatted_balance_max?: string | null\n\t/** \n\t * The gift card balance log. Tracks all the gift card transactions.\n\t * @example ```[{\"datetime\":\"2019-12-23T12:00:00.000Z\",\"balance_change_cents\":-10000},{\"datetime\":\"2020-02-01T12:00:00.000Z\",\"balance_change_cents\":5000}]```\n\t */\n\tbalance_log: Array<Record<string, any>>\n\t/** \n\t * The gift card usage log. Tracks all the gift card usage actions by orders.\n\t * @example ```{\"eNoKkhmbNp\":[{\"action\":\"use\",\"amount_cents\":-1000,\"balance_cents\":4000,\"order_number\":\"11111\",\"datetime\":\"2020-02-01T12:00:00.000Z\"}]}```\n\t */\n\tusage_log: Record<string, any>\n\t/** \n\t * Indicates if the gift card can be used only one.\n\t */\n\tsingle_use?: boolean | null\n\t/** \n\t * Indicates if the gift card can be recharged.\n\t * @example ```true```\n\t */\n\trechargeable?: boolean | null\n\t/** \n\t * Indicates if redeemed gift card amount is distributed for tax calculation.\n\t * @example ```true```\n\t */\n\tdistribute_discount?: boolean | null\n\t/** \n\t * The URL of an image that represents the gift card.\n\t * @example ```\"https://img.yourdomain.com/gift_cards/32db311a.png\"```\n\t */\n\timage_url?: string | null\n\t/** \n\t * Time at which the gift card will expire.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\texpires_at?: string | null\n\t/** \n\t * The email address of the associated recipient. When creating or updating a gift card, this is a shortcut to find or create the associated recipient by email.\n\t * @example ```\"john@example.com\"```\n\t */\n\trecipient_email?: string | null\n\n\tmarket?: Market | null\n\tgift_card_recipient?: GiftCardRecipient | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\ttags?: Tag[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface GiftCardCreate extends ResourceCreate {\n\t\n\t/** \n\t * The gift card code UUID. If not set, it's automatically generated.\n\t * @example ```\"32db311a-75d9-4c17-9e34-2be220137ad6\"```\n\t */\n\tcode?: string | null\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * The gift card balance, in cents.\n\t * @example ```15000```\n\t */\n\tbalance_cents: number\n\t/** \n\t * The gift card balance max, in cents.\n\t * @example ```100000```\n\t */\n\tbalance_max_cents?: number | null\n\t/** \n\t * Indicates if the gift card can be used only one.\n\t */\n\tsingle_use?: boolean | null\n\t/** \n\t * Indicates if the gift card can be recharged.\n\t * @example ```true```\n\t */\n\trechargeable?: boolean | null\n\t/** \n\t * Indicates if redeemed gift card amount is distributed for tax calculation.\n\t * @example ```true```\n\t */\n\tdistribute_discount?: boolean | null\n\t/** \n\t * The URL of an image that represents the gift card.\n\t * @example ```\"https://img.yourdomain.com/gift_cards/32db311a.png\"```\n\t */\n\timage_url?: string | null\n\t/** \n\t * Time at which the gift card will expire.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\texpires_at?: string | null\n\t/** \n\t * The email address of the associated recipient. When creating or updating a gift card, this is a shortcut to find or create the associated recipient by email.\n\t * @example ```\"john@example.com\"```\n\t */\n\trecipient_email?: string | null\n\n\tmarket?: MarketRel | null\n\tgift_card_recipient?: GiftCardRecipientRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\ninterface GiftCardUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * The gift card balance, in cents.\n\t * @example ```15000```\n\t */\n\tbalance_cents?: number | null\n\t/** \n\t * The gift card balance max, in cents.\n\t * @example ```100000```\n\t */\n\tbalance_max_cents?: number | null\n\t/** \n\t * Indicates if the gift card can be used only one.\n\t */\n\tsingle_use?: boolean | null\n\t/** \n\t * Indicates if the gift card can be recharged.\n\t * @example ```true```\n\t */\n\trechargeable?: boolean | null\n\t/** \n\t * Indicates if redeemed gift card amount is distributed for tax calculation.\n\t * @example ```true```\n\t */\n\tdistribute_discount?: boolean | null\n\t/** \n\t * The URL of an image that represents the gift card.\n\t * @example ```\"https://img.yourdomain.com/gift_cards/32db311a.png\"```\n\t */\n\timage_url?: string | null\n\t/** \n\t * Time at which the gift card will expire.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\texpires_at?: string | null\n\t/** \n\t * The email address of the associated recipient. When creating or updating a gift card, this is a shortcut to find or create the associated recipient by email.\n\t * @example ```\"john@example.com\"```\n\t */\n\trecipient_email?: string | null\n\t/** \n\t * Send this attribute if you want to confirm a draft gift card. The gift card becomes 'inactive', waiting to be activated.\n\t * @example ```true```\n\t */\n\t_purchase?: boolean | null\n\t/** \n\t * Send this attribute if you want to activate a gift card.\n\t * @example ```true```\n\t */\n\t_activate?: boolean | null\n\t/** \n\t * Send this attribute if you want to deactivate a gift card.\n\t * @example ```true```\n\t */\n\t_deactivate?: boolean | null\n\t/** \n\t * The balance change, in cents. Send a negative value to reduces the card balance by the specified amount. Send a positive value to recharge the gift card (if rechargeable).\n\t * @example ```-5000```\n\t */\n\t_balance_change_cents?: number | 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\tmarket?: MarketRel | null\n\tgift_card_recipient?: GiftCardRecipientRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\nclass GiftCards extends ApiResource<GiftCard> {\n\n\tstatic readonly TYPE: GiftCardType = 'gift_cards' as const\n\n\tasync create(resource: GiftCardCreate, params?: QueryParamsRetrieve<GiftCard>, options?: ResourcesConfig): Promise<GiftCard> {\n\t\treturn this.resources.create<GiftCardCreate, GiftCard>({ ...resource, type: GiftCards.TYPE }, params, options)\n\t}\n\n\tasync update(resource: GiftCardUpdate, params?: QueryParamsRetrieve<GiftCard>, options?: ResourcesConfig): Promise<GiftCard> {\n\t\treturn this.resources.update<GiftCardUpdate, GiftCard>({ ...resource, type: GiftCards.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: GiftCards.TYPE } : id, options)\n\t}\n\n\tasync market(giftCardId: string | GiftCard, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\tconst _giftCardId = (giftCardId as GiftCard).id || giftCardId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `gift_cards/${_giftCardId}/market`, params, options) as unknown as Market\n\t}\n\n\tasync gift_card_recipient(giftCardId: string | GiftCard, params?: QueryParamsRetrieve<GiftCardRecipient>, options?: ResourcesConfig): Promise<GiftCardRecipient> {\n\t\tconst _giftCardId = (giftCardId as GiftCard).id || giftCardId as string\n\t\treturn this.resources.fetch<GiftCardRecipient>({ type: 'gift_card_recipients' }, `gift_cards/${_giftCardId}/gift_card_recipient`, params, options) as unknown as GiftCardRecipient\n\t}\n\n\tasync attachments(giftCardId: string | GiftCard, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _giftCardId = (giftCardId as GiftCard).id || giftCardId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `gift_cards/${_giftCardId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(giftCardId: string | GiftCard, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _giftCardId = (giftCardId as GiftCard).id || giftCardId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `gift_cards/${_giftCardId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync tags(giftCardId: string | GiftCard, params?: QueryParamsList<Tag>, options?: ResourcesConfig): Promise<ListResponse<Tag>> {\n\t\tconst _giftCardId = (giftCardId as GiftCard).id || giftCardId as string\n\t\treturn this.resources.fetch<Tag>({ type: 'tags' }, `gift_cards/${_giftCardId}/tags`, params, options) as unknown as ListResponse<Tag>\n\t}\n\n\tasync versions(giftCardId: string | GiftCard, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _giftCardId = (giftCardId as GiftCard).id || giftCardId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `gift_cards/${_giftCardId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _purchase(id: string | GiftCard, params?: QueryParamsRetrieve<GiftCard>, options?: ResourcesConfig): Promise<GiftCard> {\n\t\treturn this.resources.update<GiftCardUpdate, GiftCard>({ id: (typeof id === 'string')? id: id.id, type: GiftCards.TYPE, _purchase: true }, params, options)\n\t}\n\n\tasync _activate(id: string | GiftCard, params?: QueryParamsRetrieve<GiftCard>, options?: ResourcesConfig): Promise<GiftCard> {\n\t\treturn this.resources.update<GiftCardUpdate, GiftCard>({ id: (typeof id === 'string')? id: id.id, type: GiftCards.TYPE, _activate: true }, params, options)\n\t}\n\n\tasync _deactivate(id: string | GiftCard, params?: QueryParamsRetrieve<GiftCard>, options?: ResourcesConfig): Promise<GiftCard> {\n\t\treturn this.resources.update<GiftCardUpdate, GiftCard>({ id: (typeof id === 'string')? id: id.id, type: GiftCards.TYPE, _deactivate: true }, params, options)\n\t}\n\n\tasync _balance_change_cents(id: string | GiftCard, triggerValue: number, params?: QueryParamsRetrieve<GiftCard>, options?: ResourcesConfig): Promise<GiftCard> {\n\t\treturn this.resources.update<GiftCardUpdate, GiftCard>({ id: (typeof id === 'string')? id: id.id, type: GiftCards.TYPE, _balance_change_cents: triggerValue }, params, options)\n\t}\n\n\tasync _add_tags(id: string | GiftCard, triggerValue: string, params?: QueryParamsRetrieve<GiftCard>, options?: ResourcesConfig): Promise<GiftCard> {\n\t\treturn this.resources.update<GiftCardUpdate, GiftCard>({ id: (typeof id === 'string')? id: id.id, type: GiftCards.TYPE, _add_tags: triggerValue }, params, options)\n\t}\n\n\tasync _remove_tags(id: string | GiftCard, triggerValue: string, params?: QueryParamsRetrieve<GiftCard>, options?: ResourcesConfig): Promise<GiftCard> {\n\t\treturn this.resources.update<GiftCardUpdate, GiftCard>({ id: (typeof id === 'string')? id: id.id, type: GiftCards.TYPE, _remove_tags: triggerValue }, params, options)\n\t}\n\n\n\tisGiftCard(resource: any): resource is GiftCard {\n\t\treturn resource.type && (resource.type === GiftCards.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): GiftCardRel {\n\t\treturn super.relationshipOneToOne<GiftCardRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): GiftCardRel[] {\n\t\treturn super.relationshipOneToMany<GiftCardRel>(...ids)\n\t}\n\n\n\ttype(): GiftCardType {\n\t\treturn GiftCards.TYPE\n\t}\n\n}\n\n\nconst instance = new GiftCards()\nexport default instance\n\nexport type { GiftCards, GiftCard, GiftCardCreate, GiftCardUpdate, GiftCardType }\n"]}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { gF as GiftCard, gG as GiftCardCreate, gI as GiftCardSort, md as GiftCardType, gH as GiftCardUpdate, bg as GiftCards, bf 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 { gF as GiftCard, gG as GiftCardCreate, gI as GiftCardSort, md as GiftCardType, gH as GiftCardUpdate, bg as GiftCards, bf 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/gift_cards.ts"],"names":[],"mappings":";;AAsRA,MAAM,kBAAkB,WAAsB,CAAA;AAAA,EAE7C,OAAgB,IAAqB,GAAA,YAAA;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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;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,kBAAQ,GAAA","file":"gift_cards.js","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Market, MarketType } from './markets'\nimport type { GiftCardRecipient, GiftCardRecipientType } from './gift_card_recipients'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Tag, TagType } from './tags'\nimport type { Version } from './versions'\n\n\ntype GiftCardType = 'gift_cards'\ntype GiftCardRel = ResourceRel & { type: GiftCardType }\ntype MarketRel = ResourceRel & { type: MarketType }\ntype GiftCardRecipientRel = ResourceRel & { type: GiftCardRecipientType }\ntype TagRel = ResourceRel & { type: TagType }\n\n\nexport type GiftCardSort = Pick<GiftCard, 'id' | 'status' | 'currency_code' | 'balance_cents' | 'balance_max_cents' | 'expires_at'> & ResourceSort\n// export type GiftCardFilter = Pick<GiftCard, 'id' | 'status' | 'code' | 'currency_code' | 'balance_cents' | 'balance_max_cents' | 'single_use' | 'rechargeable' | 'expires_at'> & ResourceFilter\n\n\ninterface GiftCard extends Resource {\n\t\n\treadonly type: GiftCardType\n\n\t/** \n\t * The gift card status. One of 'draft' (default), 'inactive', 'active', or 'redeemed'.\n\t * @example ```\"draft\"```\n\t */\n\tstatus: 'draft' | 'inactive' | 'active' | 'redeemed'\n\t/** \n\t * The gift card code UUID. If not set, it's automatically generated.\n\t * @example ```\"32db311a-75d9-4c17-9e34-2be220137ad6\"```\n\t */\n\tcode?: string | null\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * The gift card initial balance, in cents.\n\t * @example ```15000```\n\t */\n\tinitial_balance_cents: number\n\t/** \n\t * The gift card initial balance, float.\n\t * @example ```150```\n\t */\n\tinitial_balance_float: number\n\t/** \n\t * The gift card initial balance, formatted.\n\t * @example ```\"€150,00\"```\n\t */\n\tformatted_initial_balance: string\n\t/** \n\t * The gift card balance, in cents.\n\t * @example ```15000```\n\t */\n\tbalance_cents: number\n\t/** \n\t * The gift card balance, float.\n\t * @example ```150```\n\t */\n\tbalance_float: number\n\t/** \n\t * The gift card balance, formatted.\n\t * @example ```\"€150,00\"```\n\t */\n\tformatted_balance: string\n\t/** \n\t * The gift card balance max, in cents.\n\t * @example ```100000```\n\t */\n\tbalance_max_cents?: number | null\n\t/** \n\t * The gift card balance max, float.\n\t * @example ```1000```\n\t */\n\tbalance_max_float?: number | null\n\t/** \n\t * The gift card balance max, formatted.\n\t * @example ```\"€1000,00\"```\n\t */\n\tformatted_balance_max?: string | null\n\t/** \n\t * The gift card balance log. Tracks all the gift card transactions.\n\t * @example ```[{\"datetime\":\"2019-12-23T12:00:00.000Z\",\"balance_change_cents\":-10000},{\"datetime\":\"2020-02-01T12:00:00.000Z\",\"balance_change_cents\":5000}]```\n\t */\n\tbalance_log: Array<Record<string, any>>\n\t/** \n\t * The gift card usage log. Tracks all the gift card usage actions by orders.\n\t * @example ```{\"eNoKkhmbNp\":[{\"action\":\"use\",\"amount_cents\":-1000,\"balance_cents\":4000,\"order_number\":\"11111\",\"datetime\":\"2020-02-01T12:00:00.000Z\"}]}```\n\t */\n\tusage_log: Record<string, any>\n\t/** \n\t * Indicates if the gift card can be used only one.\n\t */\n\tsingle_use?: boolean | null\n\t/** \n\t * Indicates if the gift card can be recharged.\n\t * @example ```true```\n\t */\n\trechargeable?: boolean | null\n\t/** \n\t * Indicates if redeemed gift card amount is distributed for tax calculation.\n\t * @example ```true```\n\t */\n\tdistribute_discount?: boolean | null\n\t/** \n\t * The URL of an image that represents the gift card.\n\t * @example ```\"https://img.yourdomain.com/gift_cards/32db311a.png\"```\n\t */\n\timage_url?: string | null\n\t/** \n\t * Time at which the gift card will expire.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\texpires_at?: string | null\n\t/** \n\t * The email address of the associated recipient. When creating or updating a gift card, this is a shortcut to find or create the associated recipient by email.\n\t * @example ```\"john@example.com\"```\n\t */\n\trecipient_email?: string | null\n\n\tmarket?: Market | null\n\tgift_card_recipient?: GiftCardRecipient | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\ttags?: Tag[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface GiftCardCreate extends ResourceCreate {\n\t\n\t/** \n\t * The gift card code UUID. If not set, it's automatically generated.\n\t * @example ```\"32db311a-75d9-4c17-9e34-2be220137ad6\"```\n\t */\n\tcode?: string | null\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * The gift card balance, in cents.\n\t * @example ```15000```\n\t */\n\tbalance_cents: number\n\t/** \n\t * The gift card balance max, in cents.\n\t * @example ```100000```\n\t */\n\tbalance_max_cents?: number | null\n\t/** \n\t * Indicates if the gift card can be used only one.\n\t */\n\tsingle_use?: boolean | null\n\t/** \n\t * Indicates if the gift card can be recharged.\n\t * @example ```true```\n\t */\n\trechargeable?: boolean | null\n\t/** \n\t * Indicates if redeemed gift card amount is distributed for tax calculation.\n\t * @example ```true```\n\t */\n\tdistribute_discount?: boolean | null\n\t/** \n\t * The URL of an image that represents the gift card.\n\t * @example ```\"https://img.yourdomain.com/gift_cards/32db311a.png\"```\n\t */\n\timage_url?: string | null\n\t/** \n\t * Time at which the gift card will expire.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\texpires_at?: string | null\n\t/** \n\t * The email address of the associated recipient. When creating or updating a gift card, this is a shortcut to find or create the associated recipient by email.\n\t * @example ```\"john@example.com\"```\n\t */\n\trecipient_email?: string | null\n\n\tmarket?: MarketRel | null\n\tgift_card_recipient?: GiftCardRecipientRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\ninterface GiftCardUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * The gift card balance, in cents.\n\t * @example ```15000```\n\t */\n\tbalance_cents?: number | null\n\t/** \n\t * The gift card balance max, in cents.\n\t * @example ```100000```\n\t */\n\tbalance_max_cents?: number | null\n\t/** \n\t * Indicates if the gift card can be used only one.\n\t */\n\tsingle_use?: boolean | null\n\t/** \n\t * Indicates if the gift card can be recharged.\n\t * @example ```true```\n\t */\n\trechargeable?: boolean | null\n\t/** \n\t * Indicates if redeemed gift card amount is distributed for tax calculation.\n\t * @example ```true```\n\t */\n\tdistribute_discount?: boolean | null\n\t/** \n\t * The URL of an image that represents the gift card.\n\t * @example ```\"https://img.yourdomain.com/gift_cards/32db311a.png\"```\n\t */\n\timage_url?: string | null\n\t/** \n\t * Time at which the gift card will expire.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\texpires_at?: string | null\n\t/** \n\t * The email address of the associated recipient. When creating or updating a gift card, this is a shortcut to find or create the associated recipient by email.\n\t * @example ```\"john@example.com\"```\n\t */\n\trecipient_email?: string | null\n\t/** \n\t * Send this attribute if you want to confirm a draft gift card. The gift card becomes 'inactive', waiting to be activated.\n\t * @example ```true```\n\t */\n\t_purchase?: boolean | null\n\t/** \n\t * Send this attribute if you want to activate a gift card.\n\t * @example ```true```\n\t */\n\t_activate?: boolean | null\n\t/** \n\t * Send this attribute if you want to deactivate a gift card.\n\t * @example ```true```\n\t */\n\t_deactivate?: boolean | null\n\t/** \n\t * The balance change, in cents. Send a negative value to reduces the card balance by the specified amount. Send a positive value to recharge the gift card (if rechargeable).\n\t * @example ```-5000```\n\t */\n\t_balance_change_cents?: number | 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\tmarket?: MarketRel | null\n\tgift_card_recipient?: GiftCardRecipientRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\nclass GiftCards extends ApiResource<GiftCard> {\n\n\tstatic readonly TYPE: GiftCardType = 'gift_cards' as const\n\n\tasync create(resource: GiftCardCreate, params?: QueryParamsRetrieve<GiftCard>, options?: ResourcesConfig): Promise<GiftCard> {\n\t\treturn this.resources.create<GiftCardCreate, GiftCard>({ ...resource, type: GiftCards.TYPE }, params, options)\n\t}\n\n\tasync update(resource: GiftCardUpdate, params?: QueryParamsRetrieve<GiftCard>, options?: ResourcesConfig): Promise<GiftCard> {\n\t\treturn this.resources.update<GiftCardUpdate, GiftCard>({ ...resource, type: GiftCards.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: GiftCards.TYPE } : id, options)\n\t}\n\n\tasync market(giftCardId: string | GiftCard, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\tconst _giftCardId = (giftCardId as GiftCard).id || giftCardId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `gift_cards/${_giftCardId}/market`, params, options) as unknown as Market\n\t}\n\n\tasync gift_card_recipient(giftCardId: string | GiftCard, params?: QueryParamsRetrieve<GiftCardRecipient>, options?: ResourcesConfig): Promise<GiftCardRecipient> {\n\t\tconst _giftCardId = (giftCardId as GiftCard).id || giftCardId as string\n\t\treturn this.resources.fetch<GiftCardRecipient>({ type: 'gift_card_recipients' }, `gift_cards/${_giftCardId}/gift_card_recipient`, params, options) as unknown as GiftCardRecipient\n\t}\n\n\tasync attachments(giftCardId: string | GiftCard, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _giftCardId = (giftCardId as GiftCard).id || giftCardId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `gift_cards/${_giftCardId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(giftCardId: string | GiftCard, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _giftCardId = (giftCardId as GiftCard).id || giftCardId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `gift_cards/${_giftCardId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync tags(giftCardId: string | GiftCard, params?: QueryParamsList<Tag>, options?: ResourcesConfig): Promise<ListResponse<Tag>> {\n\t\tconst _giftCardId = (giftCardId as GiftCard).id || giftCardId as string\n\t\treturn this.resources.fetch<Tag>({ type: 'tags' }, `gift_cards/${_giftCardId}/tags`, params, options) as unknown as ListResponse<Tag>\n\t}\n\n\tasync versions(giftCardId: string | GiftCard, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _giftCardId = (giftCardId as GiftCard).id || giftCardId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `gift_cards/${_giftCardId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _purchase(id: string | GiftCard, params?: QueryParamsRetrieve<GiftCard>, options?: ResourcesConfig): Promise<GiftCard> {\n\t\treturn this.resources.update<GiftCardUpdate, GiftCard>({ id: (typeof id === 'string')? id: id.id, type: GiftCards.TYPE, _purchase: true }, params, options)\n\t}\n\n\tasync _activate(id: string | GiftCard, params?: QueryParamsRetrieve<GiftCard>, options?: ResourcesConfig): Promise<GiftCard> {\n\t\treturn this.resources.update<GiftCardUpdate, GiftCard>({ id: (typeof id === 'string')? id: id.id, type: GiftCards.TYPE, _activate: true }, params, options)\n\t}\n\n\tasync _deactivate(id: string | GiftCard, params?: QueryParamsRetrieve<GiftCard>, options?: ResourcesConfig): Promise<GiftCard> {\n\t\treturn this.resources.update<GiftCardUpdate, GiftCard>({ id: (typeof id === 'string')? id: id.id, type: GiftCards.TYPE, _deactivate: true }, params, options)\n\t}\n\n\tasync _balance_change_cents(id: string | GiftCard, triggerValue: number, params?: QueryParamsRetrieve<GiftCard>, options?: ResourcesConfig): Promise<GiftCard> {\n\t\treturn this.resources.update<GiftCardUpdate, GiftCard>({ id: (typeof id === 'string')? id: id.id, type: GiftCards.TYPE, _balance_change_cents: triggerValue }, params, options)\n\t}\n\n\tasync _add_tags(id: string | GiftCard, triggerValue: string, params?: QueryParamsRetrieve<GiftCard>, options?: ResourcesConfig): Promise<GiftCard> {\n\t\treturn this.resources.update<GiftCardUpdate, GiftCard>({ id: (typeof id === 'string')? id: id.id, type: GiftCards.TYPE, _add_tags: triggerValue }, params, options)\n\t}\n\n\tasync _remove_tags(id: string | GiftCard, triggerValue: string, params?: QueryParamsRetrieve<GiftCard>, options?: ResourcesConfig): Promise<GiftCard> {\n\t\treturn this.resources.update<GiftCardUpdate, GiftCard>({ id: (typeof id === 'string')? id: id.id, type: GiftCards.TYPE, _remove_tags: triggerValue }, params, options)\n\t}\n\n\n\tisGiftCard(resource: any): resource is GiftCard {\n\t\treturn resource.type && (resource.type === GiftCards.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): GiftCardRel {\n\t\treturn super.relationshipOneToOne<GiftCardRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): GiftCardRel[] {\n\t\treturn super.relationshipOneToMany<GiftCardRel>(...ids)\n\t}\n\n\n\ttype(): GiftCardType {\n\t\treturn GiftCards.TYPE\n\t}\n\n}\n\n\nconst instance = new GiftCards()\nexport default instance\n\nexport type { GiftCard, GiftCardCreate, GiftCardUpdate, GiftCardType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/gift_cards.ts"],"names":[],"mappings":";;AAsRA,MAAM,kBAAkB,WAAsB,CAAA;AAAA,EAE7C,OAAgB,IAAqB,GAAA,YAAA;AAAA,EAErC,MAAM,MAAA,CAAO,QAA0B,EAAA,MAAA,EAAwC,OAA8C,EAAA;AAC5H,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAiC,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,SAAU,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC9G,EAEA,MAAM,MAAA,CAAO,QAA0B,EAAA,MAAA,EAAwC,OAA8C,EAAA;AAC5H,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAiC,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,SAAU,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC9G,EAEA,MAAM,MAAO,CAAA,EAAA,EAAyB,OAA0C,EAAA;AAC/E,IAAA,MAAM,IAAK,CAAA,SAAA,CAAU,MAAQ,CAAA,OAAO,EAAO,KAAA,QAAA,GAAW,EAAE,EAAA,EAAI,IAAM,EAAA,SAAA,CAAU,IAAK,EAAA,GAAI,IAAI,OAAO,CAAA;AAAA;AACjG,EAEA,MAAM,MAAA,CAAO,UAA+B,EAAA,MAAA,EAAsC,OAA4C,EAAA;AAC7H,IAAM,MAAA,WAAA,GAAe,WAAwB,EAAM,IAAA,UAAA;AACnD,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAc,EAAE,IAAA,EAAM,SAAU,EAAA,EAAG,CAAc,WAAA,EAAA,WAAW,CAAW,OAAA,CAAA,EAAA,MAAA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":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Market, MarketType } from './markets'\nimport type { GiftCardRecipient, GiftCardRecipientType } from './gift_card_recipients'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Tag, TagType } from './tags'\nimport type { Version } from './versions'\n\n\ntype GiftCardType = 'gift_cards'\ntype GiftCardRel = ResourceRel & { type: GiftCardType }\ntype MarketRel = ResourceRel & { type: MarketType }\ntype GiftCardRecipientRel = ResourceRel & { type: GiftCardRecipientType }\ntype TagRel = ResourceRel & { type: TagType }\n\n\nexport type GiftCardSort = Pick<GiftCard, 'id' | 'status' | 'currency_code' | 'balance_cents' | 'balance_max_cents' | 'expires_at'> & ResourceSort\n// export type GiftCardFilter = Pick<GiftCard, 'id' | 'status' | 'code' | 'currency_code' | 'balance_cents' | 'balance_max_cents' | 'single_use' | 'rechargeable' | 'expires_at'> & ResourceFilter\n\n\ninterface GiftCard extends Resource {\n\t\n\treadonly type: GiftCardType\n\n\t/** \n\t * The gift card status. One of 'draft' (default), 'inactive', 'active', or 'redeemed'.\n\t * @example ```\"draft\"```\n\t */\n\tstatus: 'draft' | 'inactive' | 'active' | 'redeemed'\n\t/** \n\t * The gift card code UUID. If not set, it's automatically generated.\n\t * @example ```\"32db311a-75d9-4c17-9e34-2be220137ad6\"```\n\t */\n\tcode?: string | null\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * The gift card initial balance, in cents.\n\t * @example ```15000```\n\t */\n\tinitial_balance_cents: number\n\t/** \n\t * The gift card initial balance, float.\n\t * @example ```150```\n\t */\n\tinitial_balance_float: number\n\t/** \n\t * The gift card initial balance, formatted.\n\t * @example ```\"€150,00\"```\n\t */\n\tformatted_initial_balance: string\n\t/** \n\t * The gift card balance, in cents.\n\t * @example ```15000```\n\t */\n\tbalance_cents: number\n\t/** \n\t * The gift card balance, float.\n\t * @example ```150```\n\t */\n\tbalance_float: number\n\t/** \n\t * The gift card balance, formatted.\n\t * @example ```\"€150,00\"```\n\t */\n\tformatted_balance: string\n\t/** \n\t * The gift card balance max, in cents.\n\t * @example ```100000```\n\t */\n\tbalance_max_cents?: number | null\n\t/** \n\t * The gift card balance max, float.\n\t * @example ```1000```\n\t */\n\tbalance_max_float?: number | null\n\t/** \n\t * The gift card balance max, formatted.\n\t * @example ```\"€1000,00\"```\n\t */\n\tformatted_balance_max?: string | null\n\t/** \n\t * The gift card balance log. Tracks all the gift card transactions.\n\t * @example ```[{\"datetime\":\"2019-12-23T12:00:00.000Z\",\"balance_change_cents\":-10000},{\"datetime\":\"2020-02-01T12:00:00.000Z\",\"balance_change_cents\":5000}]```\n\t */\n\tbalance_log: Array<Record<string, any>>\n\t/** \n\t * The gift card usage log. Tracks all the gift card usage actions by orders.\n\t * @example ```{\"eNoKkhmbNp\":[{\"action\":\"use\",\"amount_cents\":-1000,\"balance_cents\":4000,\"order_number\":\"11111\",\"datetime\":\"2020-02-01T12:00:00.000Z\"}]}```\n\t */\n\tusage_log: Record<string, any>\n\t/** \n\t * Indicates if the gift card can be used only one.\n\t */\n\tsingle_use?: boolean | null\n\t/** \n\t * Indicates if the gift card can be recharged.\n\t * @example ```true```\n\t */\n\trechargeable?: boolean | null\n\t/** \n\t * Indicates if redeemed gift card amount is distributed for tax calculation.\n\t * @example ```true```\n\t */\n\tdistribute_discount?: boolean | null\n\t/** \n\t * The URL of an image that represents the gift card.\n\t * @example ```\"https://img.yourdomain.com/gift_cards/32db311a.png\"```\n\t */\n\timage_url?: string | null\n\t/** \n\t * Time at which the gift card will expire.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\texpires_at?: string | null\n\t/** \n\t * The email address of the associated recipient. When creating or updating a gift card, this is a shortcut to find or create the associated recipient by email.\n\t * @example ```\"john@example.com\"```\n\t */\n\trecipient_email?: string | null\n\n\tmarket?: Market | null\n\tgift_card_recipient?: GiftCardRecipient | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\ttags?: Tag[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface GiftCardCreate extends ResourceCreate {\n\t\n\t/** \n\t * The gift card code UUID. If not set, it's automatically generated.\n\t * @example ```\"32db311a-75d9-4c17-9e34-2be220137ad6\"```\n\t */\n\tcode?: string | null\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * The gift card balance, in cents.\n\t * @example ```15000```\n\t */\n\tbalance_cents: number\n\t/** \n\t * The gift card balance max, in cents.\n\t * @example ```100000```\n\t */\n\tbalance_max_cents?: number | null\n\t/** \n\t * Indicates if the gift card can be used only one.\n\t */\n\tsingle_use?: boolean | null\n\t/** \n\t * Indicates if the gift card can be recharged.\n\t * @example ```true```\n\t */\n\trechargeable?: boolean | null\n\t/** \n\t * Indicates if redeemed gift card amount is distributed for tax calculation.\n\t * @example ```true```\n\t */\n\tdistribute_discount?: boolean | null\n\t/** \n\t * The URL of an image that represents the gift card.\n\t * @example ```\"https://img.yourdomain.com/gift_cards/32db311a.png\"```\n\t */\n\timage_url?: string | null\n\t/** \n\t * Time at which the gift card will expire.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\texpires_at?: string | null\n\t/** \n\t * The email address of the associated recipient. When creating or updating a gift card, this is a shortcut to find or create the associated recipient by email.\n\t * @example ```\"john@example.com\"```\n\t */\n\trecipient_email?: string | null\n\n\tmarket?: MarketRel | null\n\tgift_card_recipient?: GiftCardRecipientRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\ninterface GiftCardUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * The gift card balance, in cents.\n\t * @example ```15000```\n\t */\n\tbalance_cents?: number | null\n\t/** \n\t * The gift card balance max, in cents.\n\t * @example ```100000```\n\t */\n\tbalance_max_cents?: number | null\n\t/** \n\t * Indicates if the gift card can be used only one.\n\t */\n\tsingle_use?: boolean | null\n\t/** \n\t * Indicates if the gift card can be recharged.\n\t * @example ```true```\n\t */\n\trechargeable?: boolean | null\n\t/** \n\t * Indicates if redeemed gift card amount is distributed for tax calculation.\n\t * @example ```true```\n\t */\n\tdistribute_discount?: boolean | null\n\t/** \n\t * The URL of an image that represents the gift card.\n\t * @example ```\"https://img.yourdomain.com/gift_cards/32db311a.png\"```\n\t */\n\timage_url?: string | null\n\t/** \n\t * Time at which the gift card will expire.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\texpires_at?: string | null\n\t/** \n\t * The email address of the associated recipient. When creating or updating a gift card, this is a shortcut to find or create the associated recipient by email.\n\t * @example ```\"john@example.com\"```\n\t */\n\trecipient_email?: string | null\n\t/** \n\t * Send this attribute if you want to confirm a draft gift card. The gift card becomes 'inactive', waiting to be activated.\n\t * @example ```true```\n\t */\n\t_purchase?: boolean | null\n\t/** \n\t * Send this attribute if you want to activate a gift card.\n\t * @example ```true```\n\t */\n\t_activate?: boolean | null\n\t/** \n\t * Send this attribute if you want to deactivate a gift card.\n\t * @example ```true```\n\t */\n\t_deactivate?: boolean | null\n\t/** \n\t * The balance change, in cents. Send a negative value to reduces the card balance by the specified amount. Send a positive value to recharge the gift card (if rechargeable).\n\t * @example ```-5000```\n\t */\n\t_balance_change_cents?: number | 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\tmarket?: MarketRel | null\n\tgift_card_recipient?: GiftCardRecipientRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\nclass GiftCards extends ApiResource<GiftCard> {\n\n\tstatic readonly TYPE: GiftCardType = 'gift_cards' as const\n\n\tasync create(resource: GiftCardCreate, params?: QueryParamsRetrieve<GiftCard>, options?: ResourcesConfig): Promise<GiftCard> {\n\t\treturn this.resources.create<GiftCardCreate, GiftCard>({ ...resource, type: GiftCards.TYPE }, params, options)\n\t}\n\n\tasync update(resource: GiftCardUpdate, params?: QueryParamsRetrieve<GiftCard>, options?: ResourcesConfig): Promise<GiftCard> {\n\t\treturn this.resources.update<GiftCardUpdate, GiftCard>({ ...resource, type: GiftCards.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: GiftCards.TYPE } : id, options)\n\t}\n\n\tasync market(giftCardId: string | GiftCard, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\tconst _giftCardId = (giftCardId as GiftCard).id || giftCardId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `gift_cards/${_giftCardId}/market`, params, options) as unknown as Market\n\t}\n\n\tasync gift_card_recipient(giftCardId: string | GiftCard, params?: QueryParamsRetrieve<GiftCardRecipient>, options?: ResourcesConfig): Promise<GiftCardRecipient> {\n\t\tconst _giftCardId = (giftCardId as GiftCard).id || giftCardId as string\n\t\treturn this.resources.fetch<GiftCardRecipient>({ type: 'gift_card_recipients' }, `gift_cards/${_giftCardId}/gift_card_recipient`, params, options) as unknown as GiftCardRecipient\n\t}\n\n\tasync attachments(giftCardId: string | GiftCard, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _giftCardId = (giftCardId as GiftCard).id || giftCardId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `gift_cards/${_giftCardId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(giftCardId: string | GiftCard, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _giftCardId = (giftCardId as GiftCard).id || giftCardId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `gift_cards/${_giftCardId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync tags(giftCardId: string | GiftCard, params?: QueryParamsList<Tag>, options?: ResourcesConfig): Promise<ListResponse<Tag>> {\n\t\tconst _giftCardId = (giftCardId as GiftCard).id || giftCardId as string\n\t\treturn this.resources.fetch<Tag>({ type: 'tags' }, `gift_cards/${_giftCardId}/tags`, params, options) as unknown as ListResponse<Tag>\n\t}\n\n\tasync versions(giftCardId: string | GiftCard, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _giftCardId = (giftCardId as GiftCard).id || giftCardId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `gift_cards/${_giftCardId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _purchase(id: string | GiftCard, params?: QueryParamsRetrieve<GiftCard>, options?: ResourcesConfig): Promise<GiftCard> {\n\t\treturn this.resources.update<GiftCardUpdate, GiftCard>({ id: (typeof id === 'string')? id: id.id, type: GiftCards.TYPE, _purchase: true }, params, options)\n\t}\n\n\tasync _activate(id: string | GiftCard, params?: QueryParamsRetrieve<GiftCard>, options?: ResourcesConfig): Promise<GiftCard> {\n\t\treturn this.resources.update<GiftCardUpdate, GiftCard>({ id: (typeof id === 'string')? id: id.id, type: GiftCards.TYPE, _activate: true }, params, options)\n\t}\n\n\tasync _deactivate(id: string | GiftCard, params?: QueryParamsRetrieve<GiftCard>, options?: ResourcesConfig): Promise<GiftCard> {\n\t\treturn this.resources.update<GiftCardUpdate, GiftCard>({ id: (typeof id === 'string')? id: id.id, type: GiftCards.TYPE, _deactivate: true }, params, options)\n\t}\n\n\tasync _balance_change_cents(id: string | GiftCard, triggerValue: number, params?: QueryParamsRetrieve<GiftCard>, options?: ResourcesConfig): Promise<GiftCard> {\n\t\treturn this.resources.update<GiftCardUpdate, GiftCard>({ id: (typeof id === 'string')? id: id.id, type: GiftCards.TYPE, _balance_change_cents: triggerValue }, params, options)\n\t}\n\n\tasync _add_tags(id: string | GiftCard, triggerValue: string, params?: QueryParamsRetrieve<GiftCard>, options?: ResourcesConfig): Promise<GiftCard> {\n\t\treturn this.resources.update<GiftCardUpdate, GiftCard>({ id: (typeof id === 'string')? id: id.id, type: GiftCards.TYPE, _add_tags: triggerValue }, params, options)\n\t}\n\n\tasync _remove_tags(id: string | GiftCard, triggerValue: string, params?: QueryParamsRetrieve<GiftCard>, options?: ResourcesConfig): Promise<GiftCard> {\n\t\treturn this.resources.update<GiftCardUpdate, GiftCard>({ id: (typeof id === 'string')? id: id.id, type: GiftCards.TYPE, _remove_tags: triggerValue }, params, options)\n\t}\n\n\n\tisGiftCard(resource: any): resource is GiftCard {\n\t\treturn resource.type && (resource.type === GiftCards.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): GiftCardRel {\n\t\treturn super.relationshipOneToOne<GiftCardRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): GiftCardRel[] {\n\t\treturn super.relationshipOneToMany<GiftCardRel>(...ids)\n\t}\n\n\n\ttype(): GiftCardType {\n\t\treturn GiftCards.TYPE\n\t}\n\n}\n\n\nconst instance = new GiftCards()\nexport default instance\n\nexport type { GiftCards, GiftCard, GiftCardCreate, GiftCardUpdate, GiftCardType }\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/resources/google_geocoders.ts"],"names":["ApiResource"],"mappings":";;;;AAkEA,MAAM,wBAAwBA,oBAA4B,CAAA;AAAA,EAEzD,OAAgB,IAA2B,GAAA,kBAAA;AAAA,EAE3C,MAAM,MAAA,CAAO,QAAgC,EAAA,MAAA,EAA8C,OAAoD,EAAA;AAC9I,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA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,OAA8D,EAAA;AAChK,IAAM,MAAA,iBAAA,GAAqB,iBAAoC,EAAM,IAAA,gBAAA;AACrE,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAkB,EAAE,IAAA,EAAM,aAAc,EAAA,EAAG,CAAoB,iBAAA,EAAA,iBAAiB,CAAgB,YAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACtI,EAGA,iBAAiB,QAA2C,EAAA;AAC3D,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,eAAgB,CAAA,IAAA;AAAA;AAC5D,EAGA,aAAa,EAAmD,EAAA;AAC/D,IAAO,OAAA,KAAA,CAAM,qBAAwC,EAAE,CAAA;AAAA;AACxD,EAEA,sBAAsB,GAAoC,EAAA;AACzD,IAAO,OAAA,KAAA,CAAM,qBAAyC,CAAA,GAAG,GAAG,CAAA;AAAA;AAC7D,EAGA,IAA2B,GAAA;AAC1B,IAAA,OAAO,eAAgB,CAAA,IAAA;AAAA;AAGzB;AAGA,MAAM,QAAA,GAAW,IAAI,eAAgB,EAAA;AACrC,IAAO,wBAAQ,GAAA","file":"google_geocoders.cjs","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Market } from './markets'\nimport type { Address } from './addresses'\nimport type { Attachment } from './attachments'\n\n\ntype GoogleGeocoderType = 'google_geocoders'\ntype GoogleGeocoderRel = ResourceRel & { type: GoogleGeocoderType }\n\n\nexport type GoogleGeocoderSort = Pick<GoogleGeocoder, 'id' | 'name'> & ResourceSort\n// export type GoogleGeocoderFilter = Pick<GoogleGeocoder, 'id' | 'name'> & ResourceFilter\n\n\ninterface GoogleGeocoder extends Resource {\n\t\n\treadonly type: GoogleGeocoderType\n\n\t/** \n\t * The geocoder's internal name.\n\t * @example ```\"Default geocoder\"```\n\t */\n\tname: string\n\n\tmarkets?: Market[] | null\n\taddresses?: Address[] | null\n\tattachments?: Attachment[] | null\n\n}\n\n\ninterface GoogleGeocoderCreate extends ResourceCreate {\n\t\n\t/** \n\t * The geocoder's internal name.\n\t * @example ```\"Default geocoder\"```\n\t */\n\tname: string\n\t/** \n\t * The Google Map API key.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tapi_key: string\n\t\n}\n\n\ninterface GoogleGeocoderUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The geocoder's internal name.\n\t * @example ```\"Default geocoder\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The Google Map API key.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tapi_key?: string | null\n\t\n}\n\n\nclass GoogleGeocoders extends ApiResource<GoogleGeocoder> {\n\n\tstatic readonly TYPE: GoogleGeocoderType = 'google_geocoders' as const\n\n\tasync create(resource: GoogleGeocoderCreate, params?: QueryParamsRetrieve<GoogleGeocoder>, options?: ResourcesConfig): Promise<GoogleGeocoder> {\n\t\treturn this.resources.create<GoogleGeocoderCreate, GoogleGeocoder>({ ...resource, type: GoogleGeocoders.TYPE }, params, options)\n\t}\n\n\tasync update(resource: GoogleGeocoderUpdate, params?: QueryParamsRetrieve<GoogleGeocoder>, options?: ResourcesConfig): Promise<GoogleGeocoder> {\n\t\treturn this.resources.update<GoogleGeocoderUpdate, GoogleGeocoder>({ ...resource, type: GoogleGeocoders.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: GoogleGeocoders.TYPE } : id, options)\n\t}\n\n\tasync markets(googleGeocoderId: string | GoogleGeocoder, params?: QueryParamsList<Market>, options?: ResourcesConfig): Promise<ListResponse<Market>> {\n\t\tconst _googleGeocoderId = (googleGeocoderId as GoogleGeocoder).id || googleGeocoderId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `google_geocoders/${_googleGeocoderId}/markets`, params, options) as unknown as ListResponse<Market>\n\t}\n\n\tasync addresses(googleGeocoderId: string | GoogleGeocoder, params?: QueryParamsList<Address>, options?: ResourcesConfig): Promise<ListResponse<Address>> {\n\t\tconst _googleGeocoderId = (googleGeocoderId as GoogleGeocoder).id || googleGeocoderId as string\n\t\treturn this.resources.fetch<Address>({ type: 'addresses' }, `google_geocoders/${_googleGeocoderId}/addresses`, params, options) as unknown as ListResponse<Address>\n\t}\n\n\tasync attachments(googleGeocoderId: string | GoogleGeocoder, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _googleGeocoderId = (googleGeocoderId as GoogleGeocoder).id || googleGeocoderId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `google_geocoders/${_googleGeocoderId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\n\tisGoogleGeocoder(resource: any): resource is GoogleGeocoder {\n\t\treturn resource.type && (resource.type === GoogleGeocoders.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): GoogleGeocoderRel {\n\t\treturn super.relationshipOneToOne<GoogleGeocoderRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): GoogleGeocoderRel[] {\n\t\treturn super.relationshipOneToMany<GoogleGeocoderRel>(...ids)\n\t}\n\n\n\ttype(): GoogleGeocoderType {\n\t\treturn GoogleGeocoders.TYPE\n\t}\n\n}\n\n\nconst instance = new GoogleGeocoders()\nexport default instance\n\nexport type { GoogleGeocoder, GoogleGeocoderCreate, GoogleGeocoderUpdate, GoogleGeocoderType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/google_geocoders.ts"],"names":["ApiResource"],"mappings":";;;;AAkEA,MAAM,wBAAwBA,oBAA4B,CAAA;AAAA,EAEzD,OAAgB,IAA2B,GAAA,kBAAA;AAAA,EAE3C,MAAM,MAAA,CAAO,QAAgC,EAAA,MAAA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AAO,CAAA;AAAA;AAC/H,EAEA,MAAM,WAAA,CAAY,gBAA2C,EAAA,MAAA,EAAsC,OAA8D,EAAA;AAChK,IAAM,MAAA,iBAAA,GAAqB,iBAAoC,EAAM,IAAA,gBAAA;AACrE,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAkB,EAAE,IAAA,EAAM,aAAc,EAAA,EAAG,CAAoB,iBAAA,EAAA,iBAAiB,CAAgB,YAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACtI,EAGA,iBAAiB,QAA2C,EAAA;AAC3D,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,eAAgB,CAAA,IAAA;AAAA;AAC5D,EAGA,aAAa,EAAmD,EAAA;AAC/D,IAAO,OAAA,KAAA,CAAM,qBAAwC,EAAE,CAAA;AAAA;AACxD,EAEA,sBAAsB,GAAoC,EAAA;AACzD,IAAO,OAAA,KAAA,CAAM,qBAAyC,CAAA,GAAG,GAAG,CAAA;AAAA;AAC7D,EAGA,IAA2B,GAAA;AAC1B,IAAA,OAAO,eAAgB,CAAA,IAAA;AAAA;AAGzB;AAGA,MAAM,QAAA,GAAW,IAAI,eAAgB,EAAA;AACrC,IAAO,wBAAQ,GAAA","file":"google_geocoders.cjs","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Market } from './markets'\nimport type { Address } from './addresses'\nimport type { Attachment } from './attachments'\n\n\ntype GoogleGeocoderType = 'google_geocoders'\ntype GoogleGeocoderRel = ResourceRel & { type: GoogleGeocoderType }\n\n\nexport type GoogleGeocoderSort = Pick<GoogleGeocoder, 'id' | 'name'> & ResourceSort\n// export type GoogleGeocoderFilter = Pick<GoogleGeocoder, 'id' | 'name'> & ResourceFilter\n\n\ninterface GoogleGeocoder extends Resource {\n\t\n\treadonly type: GoogleGeocoderType\n\n\t/** \n\t * The geocoder's internal name.\n\t * @example ```\"Default geocoder\"```\n\t */\n\tname: string\n\n\tmarkets?: Market[] | null\n\taddresses?: Address[] | null\n\tattachments?: Attachment[] | null\n\n}\n\n\ninterface GoogleGeocoderCreate extends ResourceCreate {\n\t\n\t/** \n\t * The geocoder's internal name.\n\t * @example ```\"Default geocoder\"```\n\t */\n\tname: string\n\t/** \n\t * The Google Map API key.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tapi_key: string\n\t\n}\n\n\ninterface GoogleGeocoderUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The geocoder's internal name.\n\t * @example ```\"Default geocoder\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The Google Map API key.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tapi_key?: string | null\n\t\n}\n\n\nclass GoogleGeocoders extends ApiResource<GoogleGeocoder> {\n\n\tstatic readonly TYPE: GoogleGeocoderType = 'google_geocoders' as const\n\n\tasync create(resource: GoogleGeocoderCreate, params?: QueryParamsRetrieve<GoogleGeocoder>, options?: ResourcesConfig): Promise<GoogleGeocoder> {\n\t\treturn this.resources.create<GoogleGeocoderCreate, GoogleGeocoder>({ ...resource, type: GoogleGeocoders.TYPE }, params, options)\n\t}\n\n\tasync update(resource: GoogleGeocoderUpdate, params?: QueryParamsRetrieve<GoogleGeocoder>, options?: ResourcesConfig): Promise<GoogleGeocoder> {\n\t\treturn this.resources.update<GoogleGeocoderUpdate, GoogleGeocoder>({ ...resource, type: GoogleGeocoders.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: GoogleGeocoders.TYPE } : id, options)\n\t}\n\n\tasync markets(googleGeocoderId: string | GoogleGeocoder, params?: QueryParamsList<Market>, options?: ResourcesConfig): Promise<ListResponse<Market>> {\n\t\tconst _googleGeocoderId = (googleGeocoderId as GoogleGeocoder).id || googleGeocoderId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `google_geocoders/${_googleGeocoderId}/markets`, params, options) as unknown as ListResponse<Market>\n\t}\n\n\tasync addresses(googleGeocoderId: string | GoogleGeocoder, params?: QueryParamsList<Address>, options?: ResourcesConfig): Promise<ListResponse<Address>> {\n\t\tconst _googleGeocoderId = (googleGeocoderId as GoogleGeocoder).id || googleGeocoderId as string\n\t\treturn this.resources.fetch<Address>({ type: 'addresses' }, `google_geocoders/${_googleGeocoderId}/addresses`, params, options) as unknown as ListResponse<Address>\n\t}\n\n\tasync attachments(googleGeocoderId: string | GoogleGeocoder, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _googleGeocoderId = (googleGeocoderId as GoogleGeocoder).id || googleGeocoderId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `google_geocoders/${_googleGeocoderId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\n\tisGoogleGeocoder(resource: any): resource is GoogleGeocoder {\n\t\treturn resource.type && (resource.type === GoogleGeocoders.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): GoogleGeocoderRel {\n\t\treturn super.relationshipOneToOne<GoogleGeocoderRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): GoogleGeocoderRel[] {\n\t\treturn super.relationshipOneToMany<GoogleGeocoderRel>(...ids)\n\t}\n\n\n\ttype(): GoogleGeocoderType {\n\t\treturn GoogleGeocoders.TYPE\n\t}\n\n}\n\n\nconst instance = new GoogleGeocoders()\nexport default instance\n\nexport type { GoogleGeocoders, GoogleGeocoder, GoogleGeocoderCreate, GoogleGeocoderUpdate, GoogleGeocoderType }\n"]}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { gJ as GoogleGeocoder, gK as GoogleGeocoderCreate, gM as GoogleGeocoderSort, nj as GoogleGeocoderType, gL as GoogleGeocoderUpdate, bi as GoogleGeocoders, bh as default } from '../api-IwWtsAqE.cjs';
|
2
2
|
import '../client.cjs';
|
3
3
|
import '../interceptor-k15jXzf0.cjs';
|
4
4
|
import '../types.cjs';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { gJ as GoogleGeocoder, gK as GoogleGeocoderCreate, gM as GoogleGeocoderSort, nj as GoogleGeocoderType, gL as GoogleGeocoderUpdate, bi as GoogleGeocoders, bh 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/google_geocoders.ts"],"names":[],"mappings":";;AAkEA,MAAM,wBAAwB,WAA4B,CAAA;AAAA,EAEzD,OAAgB,IAA2B,GAAA,kBAAA;AAAA,EAE3C,MAAM,MAAA,CAAO,QAAgC,EAAA,MAAA,EAA8C,OAAoD,EAAA;AAC9I,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA6C,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,eAAgB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAChI,EAEA,MAAM,MAAA,CAAO,QAAgC,EAAA,MAAA,EAA8C,OAAoD,EAAA;AAC9I,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA6C,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,eAAgB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAChI,EAEA,MAAM,MAAO,CAAA,EAAA,EAAyB,OAA0C,EAAA;AAC/E,IAAA,MAAM,IAAK,CAAA,SAAA,CAAU,MAAQ,CAAA,OAAO,EAAO,KAAA,QAAA,GAAW,EAAE,EAAA,EAAI,IAAM,EAAA,eAAA,CAAgB,IAAK,EAAA,GAAI,IAAI,OAAO,C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AAG,GAAG,CAAA;AAAA;AAC7D,EAGA,IAA2B,GAAA;AAC1B,IAAA,OAAO,eAAgB,CAAA,IAAA;AAAA;AAGzB;AAGA,MAAM,QAAA,GAAW,IAAI,eAAgB,EAAA;AACrC,IAAO,wBAAQ,GAAA","file":"google_geocoders.js","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Market } from './markets'\nimport type { Address } from './addresses'\nimport type { Attachment } from './attachments'\n\n\ntype GoogleGeocoderType = 'google_geocoders'\ntype GoogleGeocoderRel = ResourceRel & { type: GoogleGeocoderType }\n\n\nexport type GoogleGeocoderSort = Pick<GoogleGeocoder, 'id' | 'name'> & ResourceSort\n// export type GoogleGeocoderFilter = Pick<GoogleGeocoder, 'id' | 'name'> & ResourceFilter\n\n\ninterface GoogleGeocoder extends Resource {\n\t\n\treadonly type: GoogleGeocoderType\n\n\t/** \n\t * The geocoder's internal name.\n\t * @example ```\"Default geocoder\"```\n\t */\n\tname: string\n\n\tmarkets?: Market[] | null\n\taddresses?: Address[] | null\n\tattachments?: Attachment[] | null\n\n}\n\n\ninterface GoogleGeocoderCreate extends ResourceCreate {\n\t\n\t/** \n\t * The geocoder's internal name.\n\t * @example ```\"Default geocoder\"```\n\t */\n\tname: string\n\t/** \n\t * The Google Map API key.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tapi_key: string\n\t\n}\n\n\ninterface GoogleGeocoderUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The geocoder's internal name.\n\t * @example ```\"Default geocoder\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The Google Map API key.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tapi_key?: string | null\n\t\n}\n\n\nclass GoogleGeocoders extends ApiResource<GoogleGeocoder> {\n\n\tstatic readonly TYPE: GoogleGeocoderType = 'google_geocoders' as const\n\n\tasync create(resource: GoogleGeocoderCreate, params?: QueryParamsRetrieve<GoogleGeocoder>, options?: ResourcesConfig): Promise<GoogleGeocoder> {\n\t\treturn this.resources.create<GoogleGeocoderCreate, GoogleGeocoder>({ ...resource, type: GoogleGeocoders.TYPE }, params, options)\n\t}\n\n\tasync update(resource: GoogleGeocoderUpdate, params?: QueryParamsRetrieve<GoogleGeocoder>, options?: ResourcesConfig): Promise<GoogleGeocoder> {\n\t\treturn this.resources.update<GoogleGeocoderUpdate, GoogleGeocoder>({ ...resource, type: GoogleGeocoders.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: GoogleGeocoders.TYPE } : id, options)\n\t}\n\n\tasync markets(googleGeocoderId: string | GoogleGeocoder, params?: QueryParamsList<Market>, options?: ResourcesConfig): Promise<ListResponse<Market>> {\n\t\tconst _googleGeocoderId = (googleGeocoderId as GoogleGeocoder).id || googleGeocoderId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `google_geocoders/${_googleGeocoderId}/markets`, params, options) as unknown as ListResponse<Market>\n\t}\n\n\tasync addresses(googleGeocoderId: string | GoogleGeocoder, params?: QueryParamsList<Address>, options?: ResourcesConfig): Promise<ListResponse<Address>> {\n\t\tconst _googleGeocoderId = (googleGeocoderId as GoogleGeocoder).id || googleGeocoderId as string\n\t\treturn this.resources.fetch<Address>({ type: 'addresses' }, `google_geocoders/${_googleGeocoderId}/addresses`, params, options) as unknown as ListResponse<Address>\n\t}\n\n\tasync attachments(googleGeocoderId: string | GoogleGeocoder, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _googleGeocoderId = (googleGeocoderId as GoogleGeocoder).id || googleGeocoderId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `google_geocoders/${_googleGeocoderId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\n\tisGoogleGeocoder(resource: any): resource is GoogleGeocoder {\n\t\treturn resource.type && (resource.type === GoogleGeocoders.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): GoogleGeocoderRel {\n\t\treturn super.relationshipOneToOne<GoogleGeocoderRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): GoogleGeocoderRel[] {\n\t\treturn super.relationshipOneToMany<GoogleGeocoderRel>(...ids)\n\t}\n\n\n\ttype(): GoogleGeocoderType {\n\t\treturn GoogleGeocoders.TYPE\n\t}\n\n}\n\n\nconst instance = new GoogleGeocoders()\nexport default instance\n\nexport type { GoogleGeocoder, GoogleGeocoderCreate, GoogleGeocoderUpdate, GoogleGeocoderType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/google_geocoders.ts"],"names":[],"mappings":";;AAkEA,MAAM,wBAAwB,WAA4B,CAAA;AAAA,EAEzD,OAAgB,IAA2B,GAAA,kBAAA;AAAA,EAE3C,MAAM,MAAA,CAAO,QAAgC,EAAA,MAAA,EAA8C,OAAoD,EAAA;AAC9I,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA6C,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,eAAgB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAChI,EAEA,MAAM,MAAA,CAAO,QAAgC,EAAA,MAAA,EAA8C,OAAoD,EAAA;AAC9I,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA6C,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,eAAgB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAChI,EAEA,MAAM,MAAO,CAAA,EAAA,EAAyB,OAA0C,EAAA;AAC/E,IAAA,MAAM,IAAK,CAAA,SAAA,CAAU,MAAQ,CAAA,OAAO,EAAO,KAAA,QAAA,GAAW,EAAE,EAAA,EA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,GAAoC,EAAA;AACzD,IAAO,OAAA,KAAA,CAAM,qBAAyC,CAAA,GAAG,GAAG,CAAA;AAAA;AAC7D,EAGA,IAA2B,GAAA;AAC1B,IAAA,OAAO,eAAgB,CAAA,IAAA;AAAA;AAGzB;AAGA,MAAM,QAAA,GAAW,IAAI,eAAgB,EAAA;AACrC,IAAO,wBAAQ,GAAA","file":"google_geocoders.js","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Market } from './markets'\nimport type { Address } from './addresses'\nimport type { Attachment } from './attachments'\n\n\ntype GoogleGeocoderType = 'google_geocoders'\ntype GoogleGeocoderRel = ResourceRel & { type: GoogleGeocoderType }\n\n\nexport type GoogleGeocoderSort = Pick<GoogleGeocoder, 'id' | 'name'> & ResourceSort\n// export type GoogleGeocoderFilter = Pick<GoogleGeocoder, 'id' | 'name'> & ResourceFilter\n\n\ninterface GoogleGeocoder extends Resource {\n\t\n\treadonly type: GoogleGeocoderType\n\n\t/** \n\t * The geocoder's internal name.\n\t * @example ```\"Default geocoder\"```\n\t */\n\tname: string\n\n\tmarkets?: Market[] | null\n\taddresses?: Address[] | null\n\tattachments?: Attachment[] | null\n\n}\n\n\ninterface GoogleGeocoderCreate extends ResourceCreate {\n\t\n\t/** \n\t * The geocoder's internal name.\n\t * @example ```\"Default geocoder\"```\n\t */\n\tname: string\n\t/** \n\t * The Google Map API key.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tapi_key: string\n\t\n}\n\n\ninterface GoogleGeocoderUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The geocoder's internal name.\n\t * @example ```\"Default geocoder\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The Google Map API key.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tapi_key?: string | null\n\t\n}\n\n\nclass GoogleGeocoders extends ApiResource<GoogleGeocoder> {\n\n\tstatic readonly TYPE: GoogleGeocoderType = 'google_geocoders' as const\n\n\tasync create(resource: GoogleGeocoderCreate, params?: QueryParamsRetrieve<GoogleGeocoder>, options?: ResourcesConfig): Promise<GoogleGeocoder> {\n\t\treturn this.resources.create<GoogleGeocoderCreate, GoogleGeocoder>({ ...resource, type: GoogleGeocoders.TYPE }, params, options)\n\t}\n\n\tasync update(resource: GoogleGeocoderUpdate, params?: QueryParamsRetrieve<GoogleGeocoder>, options?: ResourcesConfig): Promise<GoogleGeocoder> {\n\t\treturn this.resources.update<GoogleGeocoderUpdate, GoogleGeocoder>({ ...resource, type: GoogleGeocoders.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: GoogleGeocoders.TYPE } : id, options)\n\t}\n\n\tasync markets(googleGeocoderId: string | GoogleGeocoder, params?: QueryParamsList<Market>, options?: ResourcesConfig): Promise<ListResponse<Market>> {\n\t\tconst _googleGeocoderId = (googleGeocoderId as GoogleGeocoder).id || googleGeocoderId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `google_geocoders/${_googleGeocoderId}/markets`, params, options) as unknown as ListResponse<Market>\n\t}\n\n\tasync addresses(googleGeocoderId: string | GoogleGeocoder, params?: QueryParamsList<Address>, options?: ResourcesConfig): Promise<ListResponse<Address>> {\n\t\tconst _googleGeocoderId = (googleGeocoderId as GoogleGeocoder).id || googleGeocoderId as string\n\t\treturn this.resources.fetch<Address>({ type: 'addresses' }, `google_geocoders/${_googleGeocoderId}/addresses`, params, options) as unknown as ListResponse<Address>\n\t}\n\n\tasync attachments(googleGeocoderId: string | GoogleGeocoder, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _googleGeocoderId = (googleGeocoderId as GoogleGeocoder).id || googleGeocoderId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `google_geocoders/${_googleGeocoderId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\n\tisGoogleGeocoder(resource: any): resource is GoogleGeocoder {\n\t\treturn resource.type && (resource.type === GoogleGeocoders.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): GoogleGeocoderRel {\n\t\treturn super.relationshipOneToOne<GoogleGeocoderRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): GoogleGeocoderRel[] {\n\t\treturn super.relationshipOneToMany<GoogleGeocoderRel>(...ids)\n\t}\n\n\n\ttype(): GoogleGeocoderType {\n\t\treturn GoogleGeocoders.TYPE\n\t}\n\n}\n\n\nconst instance = new GoogleGeocoders()\nexport default instance\n\nexport type { GoogleGeocoders, GoogleGeocoder, GoogleGeocoderCreate, GoogleGeocoderUpdate, GoogleGeocoderType }\n"]}
|