@commercelayer/sdk 7.0.0-rc.2 → 7.0.0-rc.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/lib/{api-DDgIE2i8.d.ts → api-F1F37Dud.d.ts} +27 -8
- package/lib/{api-DmIZO_Np.d.cts → api-IwWtsAqE.d.cts} +27 -8
- package/lib/api.d.cts +2 -2
- package/lib/api.d.ts +2 -2
- package/lib/bundle.cjs +568 -0
- package/lib/bundle.cjs.map +1 -0
- package/lib/bundle.d.cts +145 -0
- package/lib/bundle.d.ts +145 -0
- package/lib/bundle.js +546 -0
- package/lib/bundle.js.map +1 -0
- package/lib/client.d.cts +1 -1
- package/lib/client.d.ts +1 -1
- package/lib/commercelayer.cjs +2 -1
- package/lib/commercelayer.cjs.map +1 -1
- package/lib/commercelayer.d.cts +5 -6
- package/lib/commercelayer.d.ts +5 -6
- package/lib/commercelayer.js +2 -2
- package/lib/commercelayer.js.map +1 -1
- package/lib/config.d.cts +1 -1
- package/lib/config.d.ts +1 -1
- package/lib/enum.d.cts +2 -2
- package/lib/enum.d.ts +2 -2
- package/lib/error.cjs.map +1 -1
- package/lib/error.js.map +1 -1
- package/lib/fetch.cjs +2 -0
- package/lib/fetch.cjs.map +1 -1
- package/lib/fetch.d.cts +1 -1
- package/lib/fetch.d.ts +1 -1
- package/lib/fetch.js +2 -0
- package/lib/fetch.js.map +1 -1
- package/lib/index.d.cts +2 -2
- package/lib/index.d.ts +2 -2
- package/lib/{interceptor-5MISI1yn.d.cts → interceptor-k15jXzf0.d.cts} +3 -2
- package/lib/{interceptor-5MISI1yn.d.ts → interceptor-k15jXzf0.d.ts} +3 -2
- package/lib/interceptor.d.cts +1 -1
- package/lib/interceptor.d.ts +1 -1
- package/lib/jsonapi.d.cts +2 -2
- package/lib/jsonapi.d.ts +2 -2
- package/lib/model.d.cts +2 -2
- package/lib/model.d.ts +2 -2
- package/lib/query.d.cts +2 -2
- package/lib/query.d.ts +2 -2
- package/lib/resource.cjs +7 -6
- package/lib/resource.cjs.map +1 -1
- package/lib/resource.d.cts +2 -2
- package/lib/resource.d.ts +2 -2
- package/lib/resource.js +7 -6
- package/lib/resource.js.map +1 -1
- package/lib/resources/addresses.cjs.map +1 -1
- package/lib/resources/addresses.d.cts +2 -2
- package/lib/resources/addresses.d.ts +2 -2
- package/lib/resources/addresses.js.map +1 -1
- package/lib/resources/adjustments.cjs.map +1 -1
- package/lib/resources/adjustments.d.cts +2 -2
- package/lib/resources/adjustments.d.ts +2 -2
- package/lib/resources/adjustments.js.map +1 -1
- package/lib/resources/adyen_gateways.cjs.map +1 -1
- package/lib/resources/adyen_gateways.d.cts +2 -2
- package/lib/resources/adyen_gateways.d.ts +2 -2
- package/lib/resources/adyen_gateways.js.map +1 -1
- package/lib/resources/adyen_payments.cjs.map +1 -1
- package/lib/resources/adyen_payments.d.cts +2 -2
- package/lib/resources/adyen_payments.d.ts +2 -2
- package/lib/resources/adyen_payments.js.map +1 -1
- package/lib/resources/applications.cjs.map +1 -1
- package/lib/resources/applications.d.cts +2 -2
- package/lib/resources/applications.d.ts +2 -2
- package/lib/resources/applications.js.map +1 -1
- package/lib/resources/attachments.cjs.map +1 -1
- package/lib/resources/attachments.d.cts +2 -2
- package/lib/resources/attachments.d.ts +2 -2
- package/lib/resources/attachments.js.map +1 -1
- package/lib/resources/authorizations.cjs.map +1 -1
- package/lib/resources/authorizations.d.cts +2 -2
- package/lib/resources/authorizations.d.ts +2 -2
- package/lib/resources/authorizations.js.map +1 -1
- package/lib/resources/avalara_accounts.cjs.map +1 -1
- package/lib/resources/avalara_accounts.d.cts +2 -2
- package/lib/resources/avalara_accounts.d.ts +2 -2
- package/lib/resources/avalara_accounts.js.map +1 -1
- package/lib/resources/axerve_gateways.cjs.map +1 -1
- package/lib/resources/axerve_gateways.d.cts +2 -2
- package/lib/resources/axerve_gateways.d.ts +2 -2
- package/lib/resources/axerve_gateways.js.map +1 -1
- package/lib/resources/axerve_payments.cjs.map +1 -1
- package/lib/resources/axerve_payments.d.cts +2 -2
- package/lib/resources/axerve_payments.d.ts +2 -2
- package/lib/resources/axerve_payments.js.map +1 -1
- package/lib/resources/bing_geocoders.cjs.map +1 -1
- package/lib/resources/bing_geocoders.d.cts +2 -2
- package/lib/resources/bing_geocoders.d.ts +2 -2
- package/lib/resources/bing_geocoders.js.map +1 -1
- package/lib/resources/braintree_gateways.cjs.map +1 -1
- package/lib/resources/braintree_gateways.d.cts +2 -2
- package/lib/resources/braintree_gateways.d.ts +2 -2
- package/lib/resources/braintree_gateways.js.map +1 -1
- package/lib/resources/braintree_payments.cjs.map +1 -1
- package/lib/resources/braintree_payments.d.cts +2 -2
- package/lib/resources/braintree_payments.d.ts +2 -2
- package/lib/resources/braintree_payments.js.map +1 -1
- package/lib/resources/bundles.cjs.map +1 -1
- package/lib/resources/bundles.d.cts +2 -2
- package/lib/resources/bundles.d.ts +2 -2
- package/lib/resources/bundles.js.map +1 -1
- package/lib/resources/buy_x_pay_y_promotions.cjs.map +1 -1
- package/lib/resources/buy_x_pay_y_promotions.d.cts +2 -2
- package/lib/resources/buy_x_pay_y_promotions.d.ts +2 -2
- package/lib/resources/buy_x_pay_y_promotions.js.map +1 -1
- package/lib/resources/captures.cjs.map +1 -1
- package/lib/resources/captures.d.cts +2 -2
- package/lib/resources/captures.d.ts +2 -2
- package/lib/resources/captures.js.map +1 -1
- package/lib/resources/carrier_accounts.cjs.map +1 -1
- package/lib/resources/carrier_accounts.d.cts +2 -2
- package/lib/resources/carrier_accounts.d.ts +2 -2
- package/lib/resources/carrier_accounts.js.map +1 -1
- package/lib/resources/checkout_com_gateways.cjs.map +1 -1
- package/lib/resources/checkout_com_gateways.d.cts +2 -2
- package/lib/resources/checkout_com_gateways.d.ts +2 -2
- package/lib/resources/checkout_com_gateways.js.map +1 -1
- package/lib/resources/checkout_com_payments.cjs.map +1 -1
- package/lib/resources/checkout_com_payments.d.cts +2 -2
- package/lib/resources/checkout_com_payments.d.ts +2 -2
- package/lib/resources/checkout_com_payments.js.map +1 -1
- package/lib/resources/cleanups.cjs.map +1 -1
- package/lib/resources/cleanups.d.cts +2 -2
- package/lib/resources/cleanups.d.ts +2 -2
- package/lib/resources/cleanups.js.map +1 -1
- package/lib/resources/coupon_codes_promotion_rules.cjs.map +1 -1
- package/lib/resources/coupon_codes_promotion_rules.d.cts +2 -2
- package/lib/resources/coupon_codes_promotion_rules.d.ts +2 -2
- package/lib/resources/coupon_codes_promotion_rules.js.map +1 -1
- package/lib/resources/coupon_recipients.cjs.map +1 -1
- package/lib/resources/coupon_recipients.d.cts +2 -2
- package/lib/resources/coupon_recipients.d.ts +2 -2
- package/lib/resources/coupon_recipients.js.map +1 -1
- package/lib/resources/coupons.cjs.map +1 -1
- package/lib/resources/coupons.d.cts +2 -2
- package/lib/resources/coupons.d.ts +2 -2
- package/lib/resources/coupons.js.map +1 -1
- package/lib/resources/custom_promotion_rules.cjs.map +1 -1
- package/lib/resources/custom_promotion_rules.d.cts +2 -2
- package/lib/resources/custom_promotion_rules.d.ts +2 -2
- package/lib/resources/custom_promotion_rules.js.map +1 -1
- package/lib/resources/customer_addresses.cjs.map +1 -1
- package/lib/resources/customer_addresses.d.cts +2 -2
- package/lib/resources/customer_addresses.d.ts +2 -2
- package/lib/resources/customer_addresses.js.map +1 -1
- package/lib/resources/customer_groups.cjs.map +1 -1
- package/lib/resources/customer_groups.d.cts +2 -2
- package/lib/resources/customer_groups.d.ts +2 -2
- package/lib/resources/customer_groups.js.map +1 -1
- package/lib/resources/customer_password_resets.cjs.map +1 -1
- package/lib/resources/customer_password_resets.d.cts +2 -2
- package/lib/resources/customer_password_resets.d.ts +2 -2
- package/lib/resources/customer_password_resets.js.map +1 -1
- package/lib/resources/customer_payment_sources.cjs.map +1 -1
- package/lib/resources/customer_payment_sources.d.cts +2 -2
- package/lib/resources/customer_payment_sources.d.ts +2 -2
- package/lib/resources/customer_payment_sources.js.map +1 -1
- package/lib/resources/customer_subscriptions.cjs.map +1 -1
- package/lib/resources/customer_subscriptions.d.cts +2 -2
- package/lib/resources/customer_subscriptions.d.ts +2 -2
- package/lib/resources/customer_subscriptions.js.map +1 -1
- package/lib/resources/customers.cjs.map +1 -1
- package/lib/resources/customers.d.cts +2 -2
- package/lib/resources/customers.d.ts +2 -2
- package/lib/resources/customers.js.map +1 -1
- package/lib/resources/delivery_lead_times.cjs.map +1 -1
- package/lib/resources/delivery_lead_times.d.cts +2 -2
- package/lib/resources/delivery_lead_times.d.ts +2 -2
- package/lib/resources/delivery_lead_times.js.map +1 -1
- package/lib/resources/discount_engine_items.cjs.map +1 -1
- package/lib/resources/discount_engine_items.d.cts +2 -2
- package/lib/resources/discount_engine_items.d.ts +2 -2
- package/lib/resources/discount_engine_items.js.map +1 -1
- package/lib/resources/discount_engines.cjs.map +1 -1
- package/lib/resources/discount_engines.d.cts +2 -2
- package/lib/resources/discount_engines.d.ts +2 -2
- package/lib/resources/discount_engines.js.map +1 -1
- package/lib/resources/easypost_pickups.cjs.map +1 -1
- package/lib/resources/easypost_pickups.d.cts +2 -2
- package/lib/resources/easypost_pickups.d.ts +2 -2
- package/lib/resources/easypost_pickups.js.map +1 -1
- package/lib/resources/event_callbacks.cjs.map +1 -1
- package/lib/resources/event_callbacks.d.cts +2 -2
- package/lib/resources/event_callbacks.d.ts +2 -2
- package/lib/resources/event_callbacks.js.map +1 -1
- package/lib/resources/events.cjs.map +1 -1
- package/lib/resources/events.d.cts +2 -2
- package/lib/resources/events.d.ts +2 -2
- package/lib/resources/events.js.map +1 -1
- package/lib/resources/exports.cjs.map +1 -1
- package/lib/resources/exports.d.cts +2 -2
- package/lib/resources/exports.d.ts +2 -2
- package/lib/resources/exports.js.map +1 -1
- package/lib/resources/external_gateways.cjs.map +1 -1
- package/lib/resources/external_gateways.d.cts +2 -2
- package/lib/resources/external_gateways.d.ts +2 -2
- package/lib/resources/external_gateways.js.map +1 -1
- package/lib/resources/external_payments.cjs.map +1 -1
- package/lib/resources/external_payments.d.cts +2 -2
- package/lib/resources/external_payments.d.ts +2 -2
- package/lib/resources/external_payments.js.map +1 -1
- package/lib/resources/external_promotions.cjs.map +1 -1
- package/lib/resources/external_promotions.d.cts +2 -2
- package/lib/resources/external_promotions.d.ts +2 -2
- package/lib/resources/external_promotions.js.map +1 -1
- package/lib/resources/external_tax_calculators.cjs.map +1 -1
- package/lib/resources/external_tax_calculators.d.cts +2 -2
- package/lib/resources/external_tax_calculators.d.ts +2 -2
- package/lib/resources/external_tax_calculators.js.map +1 -1
- package/lib/resources/fixed_amount_promotions.cjs.map +1 -1
- package/lib/resources/fixed_amount_promotions.d.cts +2 -2
- package/lib/resources/fixed_amount_promotions.d.ts +2 -2
- package/lib/resources/fixed_amount_promotions.js.map +1 -1
- package/lib/resources/fixed_price_promotions.cjs.map +1 -1
- package/lib/resources/fixed_price_promotions.d.cts +2 -2
- package/lib/resources/fixed_price_promotions.d.ts +2 -2
- package/lib/resources/fixed_price_promotions.js.map +1 -1
- package/lib/resources/flex_promotions.cjs.map +1 -1
- package/lib/resources/flex_promotions.d.cts +2 -2
- package/lib/resources/flex_promotions.d.ts +2 -2
- package/lib/resources/flex_promotions.js.map +1 -1
- package/lib/resources/free_gift_promotions.cjs.map +1 -1
- package/lib/resources/free_gift_promotions.d.cts +2 -2
- package/lib/resources/free_gift_promotions.d.ts +2 -2
- package/lib/resources/free_gift_promotions.js.map +1 -1
- package/lib/resources/free_shipping_promotions.cjs.map +1 -1
- package/lib/resources/free_shipping_promotions.d.cts +2 -2
- package/lib/resources/free_shipping_promotions.d.ts +2 -2
- package/lib/resources/free_shipping_promotions.js.map +1 -1
- package/lib/resources/geocoders.cjs.map +1 -1
- package/lib/resources/geocoders.d.cts +2 -2
- package/lib/resources/geocoders.d.ts +2 -2
- package/lib/resources/geocoders.js.map +1 -1
- package/lib/resources/gift_card_recipients.cjs.map +1 -1
- package/lib/resources/gift_card_recipients.d.cts +2 -2
- package/lib/resources/gift_card_recipients.d.ts +2 -2
- package/lib/resources/gift_card_recipients.js.map +1 -1
- package/lib/resources/gift_cards.cjs.map +1 -1
- package/lib/resources/gift_cards.d.cts +2 -2
- package/lib/resources/gift_cards.d.ts +2 -2
- package/lib/resources/gift_cards.js.map +1 -1
- package/lib/resources/google_geocoders.cjs.map +1 -1
- package/lib/resources/google_geocoders.d.cts +2 -2
- package/lib/resources/google_geocoders.d.ts +2 -2
- package/lib/resources/google_geocoders.js.map +1 -1
- package/lib/resources/imports.cjs.map +1 -1
- package/lib/resources/imports.d.cts +2 -2
- package/lib/resources/imports.d.ts +2 -2
- package/lib/resources/imports.js.map +1 -1
- package/lib/resources/in_stock_subscriptions.cjs.map +1 -1
- package/lib/resources/in_stock_subscriptions.d.cts +2 -2
- package/lib/resources/in_stock_subscriptions.d.ts +2 -2
- package/lib/resources/in_stock_subscriptions.js.map +1 -1
- package/lib/resources/inventory_models.cjs.map +1 -1
- package/lib/resources/inventory_models.d.cts +2 -2
- package/lib/resources/inventory_models.d.ts +2 -2
- package/lib/resources/inventory_models.js.map +1 -1
- package/lib/resources/inventory_return_locations.cjs.map +1 -1
- package/lib/resources/inventory_return_locations.d.cts +2 -2
- package/lib/resources/inventory_return_locations.d.ts +2 -2
- package/lib/resources/inventory_return_locations.js.map +1 -1
- package/lib/resources/inventory_stock_locations.cjs.map +1 -1
- package/lib/resources/inventory_stock_locations.d.cts +2 -2
- package/lib/resources/inventory_stock_locations.d.ts +2 -2
- package/lib/resources/inventory_stock_locations.js.map +1 -1
- package/lib/resources/klarna_gateways.cjs.map +1 -1
- package/lib/resources/klarna_gateways.d.cts +2 -2
- package/lib/resources/klarna_gateways.d.ts +2 -2
- package/lib/resources/klarna_gateways.js.map +1 -1
- package/lib/resources/klarna_payments.cjs.map +1 -1
- package/lib/resources/klarna_payments.d.cts +2 -2
- package/lib/resources/klarna_payments.d.ts +2 -2
- package/lib/resources/klarna_payments.js.map +1 -1
- package/lib/resources/line_item_options.cjs.map +1 -1
- package/lib/resources/line_item_options.d.cts +2 -2
- package/lib/resources/line_item_options.d.ts +2 -2
- package/lib/resources/line_item_options.js.map +1 -1
- package/lib/resources/line_items.cjs.map +1 -1
- package/lib/resources/line_items.d.cts +2 -2
- package/lib/resources/line_items.d.ts +2 -2
- package/lib/resources/line_items.js.map +1 -1
- package/lib/resources/links.cjs.map +1 -1
- package/lib/resources/links.d.cts +2 -2
- package/lib/resources/links.d.ts +2 -2
- package/lib/resources/links.js.map +1 -1
- package/lib/resources/manual_gateways.cjs.map +1 -1
- package/lib/resources/manual_gateways.d.cts +2 -2
- package/lib/resources/manual_gateways.d.ts +2 -2
- package/lib/resources/manual_gateways.js.map +1 -1
- package/lib/resources/manual_tax_calculators.cjs.map +1 -1
- package/lib/resources/manual_tax_calculators.d.cts +2 -2
- package/lib/resources/manual_tax_calculators.d.ts +2 -2
- package/lib/resources/manual_tax_calculators.js.map +1 -1
- package/lib/resources/markets.cjs +4 -0
- package/lib/resources/markets.cjs.map +1 -1
- package/lib/resources/markets.d.cts +2 -2
- package/lib/resources/markets.d.ts +2 -2
- package/lib/resources/markets.js +4 -0
- package/lib/resources/markets.js.map +1 -1
- package/lib/resources/merchants.cjs.map +1 -1
- package/lib/resources/merchants.d.cts +2 -2
- package/lib/resources/merchants.d.ts +2 -2
- package/lib/resources/merchants.js.map +1 -1
- package/lib/resources/notifications.cjs.map +1 -1
- package/lib/resources/notifications.d.cts +2 -2
- package/lib/resources/notifications.d.ts +2 -2
- package/lib/resources/notifications.js.map +1 -1
- package/lib/resources/order_amount_promotion_rules.cjs.map +1 -1
- package/lib/resources/order_amount_promotion_rules.d.cts +2 -2
- package/lib/resources/order_amount_promotion_rules.d.ts +2 -2
- package/lib/resources/order_amount_promotion_rules.js.map +1 -1
- package/lib/resources/order_copies.cjs.map +1 -1
- package/lib/resources/order_copies.d.cts +2 -2
- package/lib/resources/order_copies.d.ts +2 -2
- package/lib/resources/order_copies.js.map +1 -1
- package/lib/resources/order_factories.cjs.map +1 -1
- package/lib/resources/order_factories.d.cts +2 -2
- package/lib/resources/order_factories.d.ts +2 -2
- package/lib/resources/order_factories.js.map +1 -1
- package/lib/resources/order_subscription_items.cjs.map +1 -1
- package/lib/resources/order_subscription_items.d.cts +2 -2
- package/lib/resources/order_subscription_items.d.ts +2 -2
- package/lib/resources/order_subscription_items.js.map +1 -1
- package/lib/resources/order_subscriptions.cjs.map +1 -1
- package/lib/resources/order_subscriptions.d.cts +2 -2
- package/lib/resources/order_subscriptions.d.ts +2 -2
- package/lib/resources/order_subscriptions.js.map +1 -1
- package/lib/resources/orders.cjs +4 -0
- package/lib/resources/orders.cjs.map +1 -1
- package/lib/resources/orders.d.cts +2 -2
- package/lib/resources/orders.d.ts +2 -2
- package/lib/resources/orders.js +4 -0
- package/lib/resources/orders.js.map +1 -1
- package/lib/resources/organizations.cjs.map +1 -1
- package/lib/resources/organizations.d.cts +2 -2
- package/lib/resources/organizations.d.ts +2 -2
- package/lib/resources/organizations.js.map +1 -1
- package/lib/resources/packages.cjs.map +1 -1
- package/lib/resources/packages.d.cts +2 -2
- package/lib/resources/packages.d.ts +2 -2
- package/lib/resources/packages.js.map +1 -1
- package/lib/resources/parcel_line_items.cjs.map +1 -1
- package/lib/resources/parcel_line_items.d.cts +2 -2
- package/lib/resources/parcel_line_items.d.ts +2 -2
- package/lib/resources/parcel_line_items.js.map +1 -1
- package/lib/resources/parcels.cjs.map +1 -1
- package/lib/resources/parcels.d.cts +2 -2
- package/lib/resources/parcels.d.ts +2 -2
- package/lib/resources/parcels.js.map +1 -1
- package/lib/resources/payment_gateways.cjs.map +1 -1
- package/lib/resources/payment_gateways.d.cts +2 -2
- package/lib/resources/payment_gateways.d.ts +2 -2
- package/lib/resources/payment_gateways.js.map +1 -1
- package/lib/resources/payment_methods.cjs.map +1 -1
- package/lib/resources/payment_methods.d.cts +2 -2
- package/lib/resources/payment_methods.d.ts +2 -2
- package/lib/resources/payment_methods.js.map +1 -1
- package/lib/resources/payment_options.cjs.map +1 -1
- package/lib/resources/payment_options.d.cts +2 -2
- package/lib/resources/payment_options.d.ts +2 -2
- package/lib/resources/payment_options.js.map +1 -1
- package/lib/resources/paypal_gateways.cjs.map +1 -1
- package/lib/resources/paypal_gateways.d.cts +2 -2
- package/lib/resources/paypal_gateways.d.ts +2 -2
- package/lib/resources/paypal_gateways.js.map +1 -1
- package/lib/resources/paypal_payments.cjs.map +1 -1
- package/lib/resources/paypal_payments.d.cts +2 -2
- package/lib/resources/paypal_payments.d.ts +2 -2
- package/lib/resources/paypal_payments.js.map +1 -1
- package/lib/resources/percentage_discount_promotions.cjs.map +1 -1
- package/lib/resources/percentage_discount_promotions.d.cts +2 -2
- package/lib/resources/percentage_discount_promotions.d.ts +2 -2
- package/lib/resources/percentage_discount_promotions.js.map +1 -1
- package/lib/resources/pickups.cjs.map +1 -1
- package/lib/resources/pickups.d.cts +2 -2
- package/lib/resources/pickups.d.ts +2 -2
- package/lib/resources/pickups.js.map +1 -1
- package/lib/resources/price_frequency_tiers.cjs.map +1 -1
- package/lib/resources/price_frequency_tiers.d.cts +2 -2
- package/lib/resources/price_frequency_tiers.d.ts +2 -2
- package/lib/resources/price_frequency_tiers.js.map +1 -1
- package/lib/resources/price_list_schedulers.cjs.map +1 -1
- package/lib/resources/price_list_schedulers.d.cts +2 -2
- package/lib/resources/price_list_schedulers.d.ts +2 -2
- package/lib/resources/price_list_schedulers.js.map +1 -1
- package/lib/resources/price_lists.cjs.map +1 -1
- package/lib/resources/price_lists.d.cts +2 -2
- package/lib/resources/price_lists.d.ts +2 -2
- package/lib/resources/price_lists.js.map +1 -1
- package/lib/resources/price_tiers.cjs.map +1 -1
- package/lib/resources/price_tiers.d.cts +2 -2
- package/lib/resources/price_tiers.d.ts +2 -2
- package/lib/resources/price_tiers.js.map +1 -1
- package/lib/resources/price_volume_tiers.cjs.map +1 -1
- package/lib/resources/price_volume_tiers.d.cts +2 -2
- package/lib/resources/price_volume_tiers.d.ts +2 -2
- package/lib/resources/price_volume_tiers.js.map +1 -1
- package/lib/resources/prices.cjs.map +1 -1
- package/lib/resources/prices.d.cts +2 -2
- package/lib/resources/prices.d.ts +2 -2
- package/lib/resources/prices.js.map +1 -1
- package/lib/resources/promotion_rules.cjs.map +1 -1
- package/lib/resources/promotion_rules.d.cts +2 -2
- package/lib/resources/promotion_rules.d.ts +2 -2
- package/lib/resources/promotion_rules.js.map +1 -1
- package/lib/resources/promotions.cjs.map +1 -1
- package/lib/resources/promotions.d.cts +2 -2
- package/lib/resources/promotions.d.ts +2 -2
- package/lib/resources/promotions.js.map +1 -1
- package/lib/resources/recurring_order_copies.cjs.map +1 -1
- package/lib/resources/recurring_order_copies.d.cts +2 -2
- package/lib/resources/recurring_order_copies.d.ts +2 -2
- package/lib/resources/recurring_order_copies.js.map +1 -1
- package/lib/resources/refunds.cjs.map +1 -1
- package/lib/resources/refunds.d.cts +2 -2
- package/lib/resources/refunds.d.ts +2 -2
- package/lib/resources/refunds.js.map +1 -1
- package/lib/resources/reserved_stocks.cjs.map +1 -1
- package/lib/resources/reserved_stocks.d.cts +2 -2
- package/lib/resources/reserved_stocks.d.ts +2 -2
- package/lib/resources/reserved_stocks.js.map +1 -1
- package/lib/resources/resource_errors.cjs.map +1 -1
- package/lib/resources/resource_errors.d.cts +2 -2
- package/lib/resources/resource_errors.d.ts +2 -2
- package/lib/resources/resource_errors.js.map +1 -1
- package/lib/resources/return_line_items.cjs.map +1 -1
- package/lib/resources/return_line_items.d.cts +2 -2
- package/lib/resources/return_line_items.d.ts +2 -2
- package/lib/resources/return_line_items.js.map +1 -1
- package/lib/resources/returns.cjs.map +1 -1
- package/lib/resources/returns.d.cts +2 -2
- package/lib/resources/returns.d.ts +2 -2
- package/lib/resources/returns.js.map +1 -1
- package/lib/resources/satispay_gateways.cjs.map +1 -1
- package/lib/resources/satispay_gateways.d.cts +2 -2
- package/lib/resources/satispay_gateways.d.ts +2 -2
- package/lib/resources/satispay_gateways.js.map +1 -1
- package/lib/resources/satispay_payments.cjs.map +1 -1
- package/lib/resources/satispay_payments.d.cts +2 -2
- package/lib/resources/satispay_payments.d.ts +2 -2
- package/lib/resources/satispay_payments.js.map +1 -1
- package/lib/resources/shipments.cjs.map +1 -1
- package/lib/resources/shipments.d.cts +2 -2
- package/lib/resources/shipments.d.ts +2 -2
- package/lib/resources/shipments.js.map +1 -1
- package/lib/resources/shipping_categories.cjs.map +1 -1
- package/lib/resources/shipping_categories.d.cts +2 -2
- package/lib/resources/shipping_categories.d.ts +2 -2
- package/lib/resources/shipping_categories.js.map +1 -1
- package/lib/resources/shipping_method_tiers.cjs.map +1 -1
- package/lib/resources/shipping_method_tiers.d.cts +2 -2
- package/lib/resources/shipping_method_tiers.d.ts +2 -2
- package/lib/resources/shipping_method_tiers.js.map +1 -1
- package/lib/resources/shipping_methods.cjs.map +1 -1
- package/lib/resources/shipping_methods.d.cts +2 -2
- package/lib/resources/shipping_methods.d.ts +2 -2
- package/lib/resources/shipping_methods.js.map +1 -1
- package/lib/resources/shipping_weight_tiers.cjs.map +1 -1
- package/lib/resources/shipping_weight_tiers.d.cts +2 -2
- package/lib/resources/shipping_weight_tiers.d.ts +2 -2
- package/lib/resources/shipping_weight_tiers.js.map +1 -1
- package/lib/resources/shipping_zones.cjs.map +1 -1
- package/lib/resources/shipping_zones.d.cts +2 -2
- package/lib/resources/shipping_zones.d.ts +2 -2
- package/lib/resources/shipping_zones.js.map +1 -1
- package/lib/resources/sku_list_items.cjs.map +1 -1
- package/lib/resources/sku_list_items.d.cts +2 -2
- package/lib/resources/sku_list_items.d.ts +2 -2
- package/lib/resources/sku_list_items.js.map +1 -1
- package/lib/resources/sku_list_promotion_rules.cjs.map +1 -1
- package/lib/resources/sku_list_promotion_rules.d.cts +2 -2
- package/lib/resources/sku_list_promotion_rules.d.ts +2 -2
- package/lib/resources/sku_list_promotion_rules.js.map +1 -1
- package/lib/resources/sku_lists.cjs.map +1 -1
- package/lib/resources/sku_lists.d.cts +2 -2
- package/lib/resources/sku_lists.d.ts +2 -2
- package/lib/resources/sku_lists.js.map +1 -1
- package/lib/resources/sku_options.cjs.map +1 -1
- package/lib/resources/sku_options.d.cts +2 -2
- package/lib/resources/sku_options.d.ts +2 -2
- package/lib/resources/sku_options.js.map +1 -1
- package/lib/resources/skus.cjs.map +1 -1
- package/lib/resources/skus.d.cts +2 -2
- package/lib/resources/skus.d.ts +2 -2
- package/lib/resources/skus.js.map +1 -1
- package/lib/resources/stock_items.cjs.map +1 -1
- package/lib/resources/stock_items.d.cts +2 -2
- package/lib/resources/stock_items.d.ts +2 -2
- package/lib/resources/stock_items.js.map +1 -1
- package/lib/resources/stock_line_items.cjs.map +1 -1
- package/lib/resources/stock_line_items.d.cts +2 -2
- package/lib/resources/stock_line_items.d.ts +2 -2
- package/lib/resources/stock_line_items.js.map +1 -1
- package/lib/resources/stock_locations.cjs.map +1 -1
- package/lib/resources/stock_locations.d.cts +2 -2
- package/lib/resources/stock_locations.d.ts +2 -2
- package/lib/resources/stock_locations.js.map +1 -1
- package/lib/resources/stock_reservations.cjs.map +1 -1
- package/lib/resources/stock_reservations.d.cts +2 -2
- package/lib/resources/stock_reservations.d.ts +2 -2
- package/lib/resources/stock_reservations.js.map +1 -1
- package/lib/resources/stock_transfers.cjs.map +1 -1
- package/lib/resources/stock_transfers.d.cts +2 -2
- package/lib/resources/stock_transfers.d.ts +2 -2
- package/lib/resources/stock_transfers.js.map +1 -1
- package/lib/resources/stores.cjs.map +1 -1
- package/lib/resources/stores.d.cts +2 -2
- package/lib/resources/stores.d.ts +2 -2
- package/lib/resources/stores.js.map +1 -1
- package/lib/resources/stripe_gateways.cjs.map +1 -1
- package/lib/resources/stripe_gateways.d.cts +2 -2
- package/lib/resources/stripe_gateways.d.ts +2 -2
- package/lib/resources/stripe_gateways.js.map +1 -1
- package/lib/resources/stripe_payments.cjs.map +1 -1
- package/lib/resources/stripe_payments.d.cts +2 -2
- package/lib/resources/stripe_payments.d.ts +2 -2
- package/lib/resources/stripe_payments.js.map +1 -1
- package/lib/resources/stripe_tax_accounts.cjs.map +1 -1
- package/lib/resources/stripe_tax_accounts.d.cts +2 -2
- package/lib/resources/stripe_tax_accounts.d.ts +2 -2
- package/lib/resources/stripe_tax_accounts.js.map +1 -1
- package/lib/resources/subscription_models.cjs.map +1 -1
- package/lib/resources/subscription_models.d.cts +2 -2
- package/lib/resources/subscription_models.d.ts +2 -2
- package/lib/resources/subscription_models.js.map +1 -1
- package/lib/resources/tags.cjs.map +1 -1
- package/lib/resources/tags.d.cts +2 -2
- package/lib/resources/tags.d.ts +2 -2
- package/lib/resources/tags.js.map +1 -1
- package/lib/resources/talon_one_accounts.cjs.map +1 -1
- package/lib/resources/talon_one_accounts.d.cts +2 -2
- package/lib/resources/talon_one_accounts.d.ts +2 -2
- package/lib/resources/talon_one_accounts.js.map +1 -1
- package/lib/resources/tax_calculators.cjs.map +1 -1
- package/lib/resources/tax_calculators.d.cts +2 -2
- package/lib/resources/tax_calculators.d.ts +2 -2
- package/lib/resources/tax_calculators.js.map +1 -1
- package/lib/resources/tax_categories.cjs.map +1 -1
- package/lib/resources/tax_categories.d.cts +2 -2
- package/lib/resources/tax_categories.d.ts +2 -2
- package/lib/resources/tax_categories.js.map +1 -1
- package/lib/resources/tax_rules.cjs.map +1 -1
- package/lib/resources/tax_rules.d.cts +2 -2
- package/lib/resources/tax_rules.d.ts +2 -2
- package/lib/resources/tax_rules.js.map +1 -1
- package/lib/resources/taxjar_accounts.cjs.map +1 -1
- package/lib/resources/taxjar_accounts.d.cts +2 -2
- package/lib/resources/taxjar_accounts.d.ts +2 -2
- package/lib/resources/taxjar_accounts.js.map +1 -1
- package/lib/resources/transactions.cjs.map +1 -1
- package/lib/resources/transactions.d.cts +2 -2
- package/lib/resources/transactions.d.ts +2 -2
- package/lib/resources/transactions.js.map +1 -1
- package/lib/resources/versions.cjs.map +1 -1
- package/lib/resources/versions.d.cts +2 -2
- package/lib/resources/versions.d.ts +2 -2
- package/lib/resources/versions.js.map +1 -1
- package/lib/resources/vertex_accounts.cjs.map +1 -1
- package/lib/resources/vertex_accounts.d.cts +2 -2
- package/lib/resources/vertex_accounts.d.ts +2 -2
- package/lib/resources/vertex_accounts.js.map +1 -1
- package/lib/resources/voids.cjs.map +1 -1
- package/lib/resources/voids.d.cts +2 -2
- package/lib/resources/voids.d.ts +2 -2
- package/lib/resources/voids.js.map +1 -1
- package/lib/resources/webhooks.cjs.map +1 -1
- package/lib/resources/webhooks.d.cts +2 -2
- package/lib/resources/webhooks.d.ts +2 -2
- package/lib/resources/webhooks.js.map +1 -1
- package/lib/resources/wire_transfers.cjs.map +1 -1
- package/lib/resources/wire_transfers.d.cts +2 -2
- package/lib/resources/wire_transfers.d.ts +2 -2
- package/lib/resources/wire_transfers.js.map +1 -1
- package/lib/static.d.cts +2 -2
- package/lib/static.d.ts +2 -2
- package/package.json +15 -4
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/resources/bing_geocoders.ts"],"names":["ApiResource"],"mappings":";;;;AAkEA,MAAM,sBAAsBA,oBAA0B,CAAA;AAAA,EAErD,OAAgB,IAAyB,GAAA,gBAAA;AAAA,EAEzC,MAAM,MAAA,CAAO,QAA8B,EAAA,MAAA,EAA4C,OAAkD,EAAA;AACxI,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAyC,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,aAAc,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC1H,EAEA,MAAM,MAAA,CAAO,QAA8B,EAAA,MAAA,EAA4C,OAAkD,EAAA;AACxI,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAyC,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,aAAc,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC1H,EAEA,MAAM,MAAO,CAAA,EAAA,EAAyB,OAA0C,EAAA;AAC/E,IAAA,MAAM,IAAK,CAAA,SAAA,CAAU,MAAQ,CAAA,OAAO,EAAO,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AAsB,GAAkC,EAAA;AACvD,IAAO,OAAA,KAAA,CAAM,qBAAuC,CAAA,GAAG,GAAG,CAAA;AAAA;AAC3D,EAGA,IAAyB,GAAA;AACxB,IAAA,OAAO,aAAc,CAAA,IAAA;AAAA;AAGvB;AAGA,MAAM,QAAA,GAAW,IAAI,aAAc,EAAA;AACnC,IAAO,sBAAQ,GAAA","file":"bing_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 BingGeocoderType = 'bing_geocoders'\ntype BingGeocoderRel = ResourceRel & { type: BingGeocoderType }\n\n\nexport type BingGeocoderSort = Pick<BingGeocoder, 'id' | 'name'> & ResourceSort\n// export type BingGeocoderFilter = Pick<BingGeocoder, 'id' | 'name'> & ResourceFilter\n\n\ninterface BingGeocoder extends Resource {\n\t\n\treadonly type: BingGeocoderType\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 BingGeocoderCreate 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 Bing Virtualearth key.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tkey: string\n\t\n}\n\n\ninterface BingGeocoderUpdate 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 Bing Virtualearth key.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tkey?: string | null\n\t\n}\n\n\nclass BingGeocoders extends ApiResource<BingGeocoder> {\n\n\tstatic readonly TYPE: BingGeocoderType = 'bing_geocoders' as const\n\n\tasync create(resource: BingGeocoderCreate, params?: QueryParamsRetrieve<BingGeocoder>, options?: ResourcesConfig): Promise<BingGeocoder> {\n\t\treturn this.resources.create<BingGeocoderCreate, BingGeocoder>({ ...resource, type: BingGeocoders.TYPE }, params, options)\n\t}\n\n\tasync update(resource: BingGeocoderUpdate, params?: QueryParamsRetrieve<BingGeocoder>, options?: ResourcesConfig): Promise<BingGeocoder> {\n\t\treturn this.resources.update<BingGeocoderUpdate, BingGeocoder>({ ...resource, type: BingGeocoders.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: BingGeocoders.TYPE } : id, options)\n\t}\n\n\tasync markets(bingGeocoderId: string | BingGeocoder, params?: QueryParamsList<Market>, options?: ResourcesConfig): Promise<ListResponse<Market>> {\n\t\tconst _bingGeocoderId = (bingGeocoderId as BingGeocoder).id || bingGeocoderId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `bing_geocoders/${_bingGeocoderId}/markets`, params, options) as unknown as ListResponse<Market>\n\t}\n\n\tasync addresses(bingGeocoderId: string | BingGeocoder, params?: QueryParamsList<Address>, options?: ResourcesConfig): Promise<ListResponse<Address>> {\n\t\tconst _bingGeocoderId = (bingGeocoderId as BingGeocoder).id || bingGeocoderId as string\n\t\treturn this.resources.fetch<Address>({ type: 'addresses' }, `bing_geocoders/${_bingGeocoderId}/addresses`, params, options) as unknown as ListResponse<Address>\n\t}\n\n\tasync attachments(bingGeocoderId: string | BingGeocoder, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _bingGeocoderId = (bingGeocoderId as BingGeocoder).id || bingGeocoderId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `bing_geocoders/${_bingGeocoderId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\n\tisBingGeocoder(resource: any): resource is BingGeocoder {\n\t\treturn resource.type && (resource.type === BingGeocoders.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): BingGeocoderRel {\n\t\treturn super.relationshipOneToOne<BingGeocoderRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): BingGeocoderRel[] {\n\t\treturn super.relationshipOneToMany<BingGeocoderRel>(...ids)\n\t}\n\n\n\ttype(): BingGeocoderType {\n\t\treturn BingGeocoders.TYPE\n\t}\n\n}\n\n\nconst instance = new BingGeocoders()\nexport default instance\n\nexport type { BingGeocoder, BingGeocoderCreate, BingGeocoderUpdate, BingGeocoderType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/bing_geocoders.ts"],"names":["ApiResource"],"mappings":";;;;AAkEA,MAAM,sBAAsBA,oBAA0B,CAAA;AAAA,EAErD,OAAgB,IAAyB,GAAA,gBAAA;AAAA,EAEzC,MAAM,MAAA,CAAO,QAA8B,EAAA,MAAA,EAA4C,OAAkD,EAAA;AACxI,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAyC,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,aAAc,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC1H,EAEA,MAAM,MAAA,CAAO,QAA8B,EAAA,MAAA,EAA4C,OAAkD,EAAA;AACxI,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAyC,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,aAAc,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC1H,EAEA,MAAM,MAAO,CAAA,EAAA,EAAyB,OAA0C,EAAA;AAC/E,IAAA,MAAM,IAAK,CAAA,SAAA,CAAU,MAAQ,CAAA,OAAO,EAAO,KAAA,QAAA,GAAW,EAAE,EAAA,EAAI,IAAM,EAAA,aAAA,CAAc,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AA,GAAG,GAAG,CAAA;AAAA;AAC3D,EAGA,IAAyB,GAAA;AACxB,IAAA,OAAO,aAAc,CAAA,IAAA;AAAA;AAGvB;AAGA,MAAM,QAAA,GAAW,IAAI,aAAc,EAAA;AACnC,IAAO,sBAAQ,GAAA","file":"bing_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 BingGeocoderType = 'bing_geocoders'\ntype BingGeocoderRel = ResourceRel & { type: BingGeocoderType }\n\n\nexport type BingGeocoderSort = Pick<BingGeocoder, 'id' | 'name'> & ResourceSort\n// export type BingGeocoderFilter = Pick<BingGeocoder, 'id' | 'name'> & ResourceFilter\n\n\ninterface BingGeocoder extends Resource {\n\t\n\treadonly type: BingGeocoderType\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 BingGeocoderCreate 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 Bing Virtualearth key.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tkey: string\n\t\n}\n\n\ninterface BingGeocoderUpdate 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 Bing Virtualearth key.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tkey?: string | null\n\t\n}\n\n\nclass BingGeocoders extends ApiResource<BingGeocoder> {\n\n\tstatic readonly TYPE: BingGeocoderType = 'bing_geocoders' as const\n\n\tasync create(resource: BingGeocoderCreate, params?: QueryParamsRetrieve<BingGeocoder>, options?: ResourcesConfig): Promise<BingGeocoder> {\n\t\treturn this.resources.create<BingGeocoderCreate, BingGeocoder>({ ...resource, type: BingGeocoders.TYPE }, params, options)\n\t}\n\n\tasync update(resource: BingGeocoderUpdate, params?: QueryParamsRetrieve<BingGeocoder>, options?: ResourcesConfig): Promise<BingGeocoder> {\n\t\treturn this.resources.update<BingGeocoderUpdate, BingGeocoder>({ ...resource, type: BingGeocoders.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: BingGeocoders.TYPE } : id, options)\n\t}\n\n\tasync markets(bingGeocoderId: string | BingGeocoder, params?: QueryParamsList<Market>, options?: ResourcesConfig): Promise<ListResponse<Market>> {\n\t\tconst _bingGeocoderId = (bingGeocoderId as BingGeocoder).id || bingGeocoderId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `bing_geocoders/${_bingGeocoderId}/markets`, params, options) as unknown as ListResponse<Market>\n\t}\n\n\tasync addresses(bingGeocoderId: string | BingGeocoder, params?: QueryParamsList<Address>, options?: ResourcesConfig): Promise<ListResponse<Address>> {\n\t\tconst _bingGeocoderId = (bingGeocoderId as BingGeocoder).id || bingGeocoderId as string\n\t\treturn this.resources.fetch<Address>({ type: 'addresses' }, `bing_geocoders/${_bingGeocoderId}/addresses`, params, options) as unknown as ListResponse<Address>\n\t}\n\n\tasync attachments(bingGeocoderId: string | BingGeocoder, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _bingGeocoderId = (bingGeocoderId as BingGeocoder).id || bingGeocoderId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `bing_geocoders/${_bingGeocoderId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\n\tisBingGeocoder(resource: any): resource is BingGeocoder {\n\t\treturn resource.type && (resource.type === BingGeocoders.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): BingGeocoderRel {\n\t\treturn super.relationshipOneToOne<BingGeocoderRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): BingGeocoderRel[] {\n\t\treturn super.relationshipOneToMany<BingGeocoderRel>(...ids)\n\t}\n\n\n\ttype(): BingGeocoderType {\n\t\treturn BingGeocoders.TYPE\n\t}\n\n}\n\n\nconst instance = new BingGeocoders()\nexport default instance\n\nexport type { BingGeocoders, BingGeocoder, BingGeocoderCreate, BingGeocoderUpdate, BingGeocoderType }\n"]}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { er as BingGeocoder, es as BingGeocoderCreate, eu as BingGeocoderSort, nb as BingGeocoderType, et as BingGeocoderUpdate, a4 as BingGeocoders, a3 as default } from '../api-IwWtsAqE.cjs';
|
2
2
|
import '../client.cjs';
|
3
|
-
import '../interceptor-
|
3
|
+
import '../interceptor-k15jXzf0.cjs';
|
4
4
|
import '../types.cjs';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { er as BingGeocoder, es as BingGeocoderCreate, eu as BingGeocoderSort, nb as BingGeocoderType, et as BingGeocoderUpdate, a4 as BingGeocoders, a3 as default } from '../api-F1F37Dud.js';
|
2
2
|
import '../client.js';
|
3
|
-
import '../interceptor-
|
3
|
+
import '../interceptor-k15jXzf0.js';
|
4
4
|
import '../types.js';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/resources/bing_geocoders.ts"],"names":[],"mappings":";;AAkEA,MAAM,sBAAsB,WAA0B,CAAA;AAAA,EAErD,OAAgB,IAAyB,GAAA,gBAAA;AAAA,EAEzC,MAAM,MAAA,CAAO,QAA8B,EAAA,MAAA,EAA4C,OAAkD,EAAA;AACxI,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAyC,EAAE,GAAG,QAAU,EAAA,IAAA,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,EAAM,IAAA,cAAA;AAC/D,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAkB,EAAE,IAAA,EAAM,aAAc,EAAA,EAAG,CAAkB,eAAA,EAAA,eAAe,CAAgB,YAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAClI,EAGA,eAAe,QAAyC,EAAA;AACvD,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,aAAc,CAAA,IAAA;AAAA;AAC1D,EAGA,aAAa,EAAiD,EAAA;AAC7D,IAAO,OAAA,KAAA,CAAM,qBAAsC,EAAE,CAAA;AAAA;AACtD,EAEA,sBAAsB,GAAkC,EAAA;AACvD,IAAO,OAAA,KAAA,CAAM,qBAAuC,CAAA,GAAG,GAAG,CAAA;AAAA;AAC3D,EAGA,IAAyB,GAAA;AACxB,IAAA,OAAO,aAAc,CAAA,IAAA;AAAA;AAGvB;AAGA,MAAM,QAAA,GAAW,IAAI,aAAc,EAAA;AACnC,IAAO,sBAAQ,GAAA","file":"bing_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 BingGeocoderType = 'bing_geocoders'\ntype BingGeocoderRel = ResourceRel & { type: BingGeocoderType }\n\n\nexport type BingGeocoderSort = Pick<BingGeocoder, 'id' | 'name'> & ResourceSort\n// export type BingGeocoderFilter = Pick<BingGeocoder, 'id' | 'name'> & ResourceFilter\n\n\ninterface BingGeocoder extends Resource {\n\t\n\treadonly type: BingGeocoderType\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 BingGeocoderCreate 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 Bing Virtualearth key.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tkey: string\n\t\n}\n\n\ninterface BingGeocoderUpdate 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 Bing Virtualearth key.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tkey?: string | null\n\t\n}\n\n\nclass BingGeocoders extends ApiResource<BingGeocoder> {\n\n\tstatic readonly TYPE: BingGeocoderType = 'bing_geocoders' as const\n\n\tasync create(resource: BingGeocoderCreate, params?: QueryParamsRetrieve<BingGeocoder>, options?: ResourcesConfig): Promise<BingGeocoder> {\n\t\treturn this.resources.create<BingGeocoderCreate, BingGeocoder>({ ...resource, type: BingGeocoders.TYPE }, params, options)\n\t}\n\n\tasync update(resource: BingGeocoderUpdate, params?: QueryParamsRetrieve<BingGeocoder>, options?: ResourcesConfig): Promise<BingGeocoder> {\n\t\treturn this.resources.update<BingGeocoderUpdate, BingGeocoder>({ ...resource, type: BingGeocoders.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: BingGeocoders.TYPE } : id, options)\n\t}\n\n\tasync markets(bingGeocoderId: string | BingGeocoder, params?: QueryParamsList<Market>, options?: ResourcesConfig): Promise<ListResponse<Market>> {\n\t\tconst _bingGeocoderId = (bingGeocoderId as BingGeocoder).id || bingGeocoderId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `bing_geocoders/${_bingGeocoderId}/markets`, params, options) as unknown as ListResponse<Market>\n\t}\n\n\tasync addresses(bingGeocoderId: string | BingGeocoder, params?: QueryParamsList<Address>, options?: ResourcesConfig): Promise<ListResponse<Address>> {\n\t\tconst _bingGeocoderId = (bingGeocoderId as BingGeocoder).id || bingGeocoderId as string\n\t\treturn this.resources.fetch<Address>({ type: 'addresses' }, `bing_geocoders/${_bingGeocoderId}/addresses`, params, options) as unknown as ListResponse<Address>\n\t}\n\n\tasync attachments(bingGeocoderId: string | BingGeocoder, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _bingGeocoderId = (bingGeocoderId as BingGeocoder).id || bingGeocoderId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `bing_geocoders/${_bingGeocoderId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\n\tisBingGeocoder(resource: any): resource is BingGeocoder {\n\t\treturn resource.type && (resource.type === BingGeocoders.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): BingGeocoderRel {\n\t\treturn super.relationshipOneToOne<BingGeocoderRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): BingGeocoderRel[] {\n\t\treturn super.relationshipOneToMany<BingGeocoderRel>(...ids)\n\t}\n\n\n\ttype(): BingGeocoderType {\n\t\treturn BingGeocoders.TYPE\n\t}\n\n}\n\n\nconst instance = new BingGeocoders()\nexport default instance\n\nexport type { BingGeocoder, BingGeocoderCreate, BingGeocoderUpdate, BingGeocoderType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/bing_geocoders.ts"],"names":[],"mappings":";;AAkEA,MAAM,sBAAsB,WAA0B,CAAA;AAAA,EAErD,OAAgB,IAAyB,GAAA,gBAAA;AAAA,EAEzC,MAAM,MAAA,CAAO,QAA8B,EAAA,MAAA,EAA4C,OAAkD,EAAA;AACxI,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAyC,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,aAAc,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC1H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,EAAE,IAAA,EAAM,aAAc,EAAA,EAAG,CAAkB,eAAA,EAAA,eAAe,CAAgB,YAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAClI,EAGA,eAAe,QAAyC,EAAA;AACvD,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,aAAc,CAAA,IAAA;AAAA;AAC1D,EAGA,aAAa,EAAiD,EAAA;AAC7D,IAAO,OAAA,KAAA,CAAM,qBAAsC,EAAE,CAAA;AAAA;AACtD,EAEA,sBAAsB,GAAkC,EAAA;AACvD,IAAO,OAAA,KAAA,CAAM,qBAAuC,CAAA,GAAG,GAAG,CAAA;AAAA;AAC3D,EAGA,IAAyB,GAAA;AACxB,IAAA,OAAO,aAAc,CAAA,IAAA;AAAA;AAGvB;AAGA,MAAM,QAAA,GAAW,IAAI,aAAc,EAAA;AACnC,IAAO,sBAAQ,GAAA","file":"bing_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 BingGeocoderType = 'bing_geocoders'\ntype BingGeocoderRel = ResourceRel & { type: BingGeocoderType }\n\n\nexport type BingGeocoderSort = Pick<BingGeocoder, 'id' | 'name'> & ResourceSort\n// export type BingGeocoderFilter = Pick<BingGeocoder, 'id' | 'name'> & ResourceFilter\n\n\ninterface BingGeocoder extends Resource {\n\t\n\treadonly type: BingGeocoderType\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 BingGeocoderCreate 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 Bing Virtualearth key.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tkey: string\n\t\n}\n\n\ninterface BingGeocoderUpdate 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 Bing Virtualearth key.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tkey?: string | null\n\t\n}\n\n\nclass BingGeocoders extends ApiResource<BingGeocoder> {\n\n\tstatic readonly TYPE: BingGeocoderType = 'bing_geocoders' as const\n\n\tasync create(resource: BingGeocoderCreate, params?: QueryParamsRetrieve<BingGeocoder>, options?: ResourcesConfig): Promise<BingGeocoder> {\n\t\treturn this.resources.create<BingGeocoderCreate, BingGeocoder>({ ...resource, type: BingGeocoders.TYPE }, params, options)\n\t}\n\n\tasync update(resource: BingGeocoderUpdate, params?: QueryParamsRetrieve<BingGeocoder>, options?: ResourcesConfig): Promise<BingGeocoder> {\n\t\treturn this.resources.update<BingGeocoderUpdate, BingGeocoder>({ ...resource, type: BingGeocoders.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: BingGeocoders.TYPE } : id, options)\n\t}\n\n\tasync markets(bingGeocoderId: string | BingGeocoder, params?: QueryParamsList<Market>, options?: ResourcesConfig): Promise<ListResponse<Market>> {\n\t\tconst _bingGeocoderId = (bingGeocoderId as BingGeocoder).id || bingGeocoderId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `bing_geocoders/${_bingGeocoderId}/markets`, params, options) as unknown as ListResponse<Market>\n\t}\n\n\tasync addresses(bingGeocoderId: string | BingGeocoder, params?: QueryParamsList<Address>, options?: ResourcesConfig): Promise<ListResponse<Address>> {\n\t\tconst _bingGeocoderId = (bingGeocoderId as BingGeocoder).id || bingGeocoderId as string\n\t\treturn this.resources.fetch<Address>({ type: 'addresses' }, `bing_geocoders/${_bingGeocoderId}/addresses`, params, options) as unknown as ListResponse<Address>\n\t}\n\n\tasync attachments(bingGeocoderId: string | BingGeocoder, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _bingGeocoderId = (bingGeocoderId as BingGeocoder).id || bingGeocoderId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `bing_geocoders/${_bingGeocoderId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\n\tisBingGeocoder(resource: any): resource is BingGeocoder {\n\t\treturn resource.type && (resource.type === BingGeocoders.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): BingGeocoderRel {\n\t\treturn super.relationshipOneToOne<BingGeocoderRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): BingGeocoderRel[] {\n\t\treturn super.relationshipOneToMany<BingGeocoderRel>(...ids)\n\t}\n\n\n\ttype(): BingGeocoderType {\n\t\treturn BingGeocoders.TYPE\n\t}\n\n}\n\n\nconst instance = new BingGeocoders()\nexport default instance\n\nexport type { BingGeocoders, BingGeocoder, BingGeocoderCreate, BingGeocoderUpdate, BingGeocoderType }\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/resources/braintree_gateways.ts"],"names":["ApiResource"],"mappings":";;;;AAuJA,MAAM,0BAA0BA,oBAA8B,CAAA;AAAA,EAE7D,OAAgB,IAA6B,GAAA,oBAAA;AAAA,EAE7C,MAAM,MAAA,CAAO,QAAkC,EAAA,MAAA,EAAgD,OAAsD,EAAA;AACpJ,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAiD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,iBAAkB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACtI,EAEA,MAAM,MAAA,CAAO,QAAk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AwB,EAAE,IAAA,EAAM,oBAAqB,EAAA,EAAG,CAAsB,mBAAA,EAAA,mBAAmB,CAAuB,mBAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC9J,EAGA,mBAAmB,QAA6C,EAAA;AAC/D,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,iBAAkB,CAAA,IAAA;AAAA;AAC9D,EAGA,aAAa,EAAqD,EAAA;AACjE,IAAO,OAAA,KAAA,CAAM,qBAA0C,EAAE,CAAA;AAAA;AAC1D,EAEA,sBAAsB,GAAsC,EAAA;AAC3D,IAAO,OAAA,KAAA,CAAM,qBAA2C,CAAA,GAAG,GAAG,CAAA;AAAA;AAC/D,EAGA,IAA6B,GAAA;AAC5B,IAAA,OAAO,iBAAkB,CAAA,IAAA;AAAA;AAG3B;AAGA,MAAM,QAAA,GAAW,IAAI,iBAAkB,EAAA;AACvC,IAAO,0BAAQ,GAAA","file":"braintree_gateways.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 { PaymentMethod } from './payment_methods'\nimport type { Version } from './versions'\nimport type { BraintreePayment, BraintreePaymentType } from './braintree_payments'\n\n\ntype BraintreeGatewayType = 'braintree_gateways'\ntype BraintreeGatewayRel = ResourceRel & { type: BraintreeGatewayType }\ntype BraintreePaymentRel = ResourceRel & { type: BraintreePaymentType }\n\n\nexport type BraintreeGatewaySort = Pick<BraintreeGateway, 'id' | 'name'> & ResourceSort\n// export type BraintreeGatewayFilter = Pick<BraintreeGateway, 'id' | 'name'> & ResourceFilter\n\n\ninterface BraintreeGateway extends Resource {\n\t\n\treadonly type: BraintreeGatewayType\n\n\t/** \n\t * The payment gateway's internal name.\n\t * @example ```\"US payment gateway\"```\n\t */\n\tname: string\n\t/** \n\t * The dynamic descriptor name. Must be composed by business name (3, 7 or 12 chars), an asterisk (*) and the product name (18, 14 or 9 chars), for a total length of 22 chars.\n\t * @example ```\"company*productabc1234\"```\n\t */\n\tdescriptor_name?: string | null\n\t/** \n\t * The dynamic descriptor phone number. Must be 10-14 characters and can only contain numbers, dashes, parentheses and periods.\n\t * @example ```\"3125551212\"```\n\t */\n\tdescriptor_phone?: string | null\n\t/** \n\t * The dynamic descriptor URL.\n\t * @example ```\"company.com\"```\n\t */\n\tdescriptor_url?: string | null\n\t/** \n\t * The gateway webhook URL, generated automatically.\n\t * @example ```\"https://core.commercelayer.co/webhook_callbacks/braintree_gateways/xxxxx\"```\n\t */\n\twebhook_endpoint_url?: string | null\n\n\tpayment_methods?: PaymentMethod[] | null\n\tversions?: Version[] | null\n\tbraintree_payments?: BraintreePayment[] | null\n\n}\n\n\ninterface BraintreeGatewayCreate extends ResourceCreate {\n\t\n\t/** \n\t * The payment gateway's internal name.\n\t * @example ```\"US payment gateway\"```\n\t */\n\tname: string\n\t/** \n\t * The gateway merchant account ID.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tmerchant_account_id: string\n\t/** \n\t * The gateway merchant ID.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tmerchant_id: string\n\t/** \n\t * The gateway API public key.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tpublic_key: string\n\t/** \n\t * The gateway API private key.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tprivate_key: string\n\t/** \n\t * The dynamic descriptor name. Must be composed by business name (3, 7 or 12 chars), an asterisk (*) and the product name (18, 14 or 9 chars), for a total length of 22 chars.\n\t * @example ```\"company*productabc1234\"```\n\t */\n\tdescriptor_name?: string | null\n\t/** \n\t * The dynamic descriptor phone number. Must be 10-14 characters and can only contain numbers, dashes, parentheses and periods.\n\t * @example ```\"3125551212\"```\n\t */\n\tdescriptor_phone?: string | null\n\t/** \n\t * The dynamic descriptor URL.\n\t * @example ```\"company.com\"```\n\t */\n\tdescriptor_url?: string | null\n\n\tbraintree_payments?: BraintreePaymentRel[] | null\n\n}\n\n\ninterface BraintreeGatewayUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The payment gateway's internal name.\n\t * @example ```\"US payment gateway\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The gateway merchant account ID.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tmerchant_account_id?: string | null\n\t/** \n\t * The gateway merchant ID.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tmerchant_id?: string | null\n\t/** \n\t * The gateway API public key.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tpublic_key?: string | null\n\t/** \n\t * The gateway API private key.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tprivate_key?: string | null\n\t/** \n\t * The dynamic descriptor name. Must be composed by business name (3, 7 or 12 chars), an asterisk (*) and the product name (18, 14 or 9 chars), for a total length of 22 chars.\n\t * @example ```\"company*productabc1234\"```\n\t */\n\tdescriptor_name?: string | null\n\t/** \n\t * The dynamic descriptor phone number. Must be 10-14 characters and can only contain numbers, dashes, parentheses and periods.\n\t * @example ```\"3125551212\"```\n\t */\n\tdescriptor_phone?: string | null\n\t/** \n\t * The dynamic descriptor URL.\n\t * @example ```\"company.com\"```\n\t */\n\tdescriptor_url?: string | null\n\n\tbraintree_payments?: BraintreePaymentRel[] | null\n\n}\n\n\nclass BraintreeGateways extends ApiResource<BraintreeGateway> {\n\n\tstatic readonly TYPE: BraintreeGatewayType = 'braintree_gateways' as const\n\n\tasync create(resource: BraintreeGatewayCreate, params?: QueryParamsRetrieve<BraintreeGateway>, options?: ResourcesConfig): Promise<BraintreeGateway> {\n\t\treturn this.resources.create<BraintreeGatewayCreate, BraintreeGateway>({ ...resource, type: BraintreeGateways.TYPE }, params, options)\n\t}\n\n\tasync update(resource: BraintreeGatewayUpdate, params?: QueryParamsRetrieve<BraintreeGateway>, options?: ResourcesConfig): Promise<BraintreeGateway> {\n\t\treturn this.resources.update<BraintreeGatewayUpdate, BraintreeGateway>({ ...resource, type: BraintreeGateways.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: BraintreeGateways.TYPE } : id, options)\n\t}\n\n\tasync payment_methods(braintreeGatewayId: string | BraintreeGateway, params?: QueryParamsList<PaymentMethod>, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>> {\n\t\tconst _braintreeGatewayId = (braintreeGatewayId as BraintreeGateway).id || braintreeGatewayId as string\n\t\treturn this.resources.fetch<PaymentMethod>({ type: 'payment_methods' }, `braintree_gateways/${_braintreeGatewayId}/payment_methods`, params, options) as unknown as ListResponse<PaymentMethod>\n\t}\n\n\tasync versions(braintreeGatewayId: string | BraintreeGateway, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _braintreeGatewayId = (braintreeGatewayId as BraintreeGateway).id || braintreeGatewayId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `braintree_gateways/${_braintreeGatewayId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync braintree_payments(braintreeGatewayId: string | BraintreeGateway, params?: QueryParamsList<BraintreePayment>, options?: ResourcesConfig): Promise<ListResponse<BraintreePayment>> {\n\t\tconst _braintreeGatewayId = (braintreeGatewayId as BraintreeGateway).id || braintreeGatewayId as string\n\t\treturn this.resources.fetch<BraintreePayment>({ type: 'braintree_payments' }, `braintree_gateways/${_braintreeGatewayId}/braintree_payments`, params, options) as unknown as ListResponse<BraintreePayment>\n\t}\n\n\n\tisBraintreeGateway(resource: any): resource is BraintreeGateway {\n\t\treturn resource.type && (resource.type === BraintreeGateways.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): BraintreeGatewayRel {\n\t\treturn super.relationshipOneToOne<BraintreeGatewayRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): BraintreeGatewayRel[] {\n\t\treturn super.relationshipOneToMany<BraintreeGatewayRel>(...ids)\n\t}\n\n\n\ttype(): BraintreeGatewayType {\n\t\treturn BraintreeGateways.TYPE\n\t}\n\n}\n\n\nconst instance = new BraintreeGateways()\nexport default instance\n\nexport type { BraintreeGateway, BraintreeGatewayCreate, BraintreeGatewayUpdate, BraintreeGatewayType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/braintree_gateways.ts"],"names":["ApiResource"],"mappings":";;;;AAuJA,MAAM,0BAA0BA,oBAA8B,CAAA;AAAA,EAE7D,OAAgB,IAA6B,GAAA,oBAAA;AAAA,EAE7C,MAAM,MAAA,CAAO,QAAkC,EAAA,MAAA,EAAgD,OAAsD,EAAA;AACpJ,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAiD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,iBAAkB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACtI,EAEA,MAAM,MAAA,CAAO,QAAkC,EAAA,MAAA,EAAgD,OAAsD,EAAA;AACpJ,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAiD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,iBAAkB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACtI,EAEA,MAAM,MAAO,CAAA,EAAA,EAAyB,OAA0C,EAAA;AAC/E,IAAA,MAAM,IAAK,CAAA,SAAA,CAAU,MAAQ,CAAA,OAAO,EAAO,KAAA,QAAA,GAAW,EAAE,EAAA,EAAI,IAAM,EAAA,iBAAA,CAAkB,IAAK,EAAA,GAAI,IAAI,OAAO,CAAA;AAAA;AACzG,EAEA,MAAM,eAAA,CAAgB,kBAA+C,EAAA,MAAA,EAAyC,OAAiE,EAAA;AAC9K,IAAM,MAAA,mBAAA,GAAuB,mBAAwC,EAAM,IAAA,kB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AAW,IAAI,iBAAkB,EAAA;AACvC,IAAO,0BAAQ,GAAA","file":"braintree_gateways.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 { PaymentMethod } from './payment_methods'\nimport type { Version } from './versions'\nimport type { BraintreePayment, BraintreePaymentType } from './braintree_payments'\n\n\ntype BraintreeGatewayType = 'braintree_gateways'\ntype BraintreeGatewayRel = ResourceRel & { type: BraintreeGatewayType }\ntype BraintreePaymentRel = ResourceRel & { type: BraintreePaymentType }\n\n\nexport type BraintreeGatewaySort = Pick<BraintreeGateway, 'id' | 'name'> & ResourceSort\n// export type BraintreeGatewayFilter = Pick<BraintreeGateway, 'id' | 'name'> & ResourceFilter\n\n\ninterface BraintreeGateway extends Resource {\n\t\n\treadonly type: BraintreeGatewayType\n\n\t/** \n\t * The payment gateway's internal name.\n\t * @example ```\"US payment gateway\"```\n\t */\n\tname: string\n\t/** \n\t * The dynamic descriptor name. Must be composed by business name (3, 7 or 12 chars), an asterisk (*) and the product name (18, 14 or 9 chars), for a total length of 22 chars.\n\t * @example ```\"company*productabc1234\"```\n\t */\n\tdescriptor_name?: string | null\n\t/** \n\t * The dynamic descriptor phone number. Must be 10-14 characters and can only contain numbers, dashes, parentheses and periods.\n\t * @example ```\"3125551212\"```\n\t */\n\tdescriptor_phone?: string | null\n\t/** \n\t * The dynamic descriptor URL.\n\t * @example ```\"company.com\"```\n\t */\n\tdescriptor_url?: string | null\n\t/** \n\t * The gateway webhook URL, generated automatically.\n\t * @example ```\"https://core.commercelayer.co/webhook_callbacks/braintree_gateways/xxxxx\"```\n\t */\n\twebhook_endpoint_url?: string | null\n\n\tpayment_methods?: PaymentMethod[] | null\n\tversions?: Version[] | null\n\tbraintree_payments?: BraintreePayment[] | null\n\n}\n\n\ninterface BraintreeGatewayCreate extends ResourceCreate {\n\t\n\t/** \n\t * The payment gateway's internal name.\n\t * @example ```\"US payment gateway\"```\n\t */\n\tname: string\n\t/** \n\t * The gateway merchant account ID.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tmerchant_account_id: string\n\t/** \n\t * The gateway merchant ID.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tmerchant_id: string\n\t/** \n\t * The gateway API public key.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tpublic_key: string\n\t/** \n\t * The gateway API private key.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tprivate_key: string\n\t/** \n\t * The dynamic descriptor name. Must be composed by business name (3, 7 or 12 chars), an asterisk (*) and the product name (18, 14 or 9 chars), for a total length of 22 chars.\n\t * @example ```\"company*productabc1234\"```\n\t */\n\tdescriptor_name?: string | null\n\t/** \n\t * The dynamic descriptor phone number. Must be 10-14 characters and can only contain numbers, dashes, parentheses and periods.\n\t * @example ```\"3125551212\"```\n\t */\n\tdescriptor_phone?: string | null\n\t/** \n\t * The dynamic descriptor URL.\n\t * @example ```\"company.com\"```\n\t */\n\tdescriptor_url?: string | null\n\n\tbraintree_payments?: BraintreePaymentRel[] | null\n\n}\n\n\ninterface BraintreeGatewayUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The payment gateway's internal name.\n\t * @example ```\"US payment gateway\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The gateway merchant account ID.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tmerchant_account_id?: string | null\n\t/** \n\t * The gateway merchant ID.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tmerchant_id?: string | null\n\t/** \n\t * The gateway API public key.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tpublic_key?: string | null\n\t/** \n\t * The gateway API private key.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tprivate_key?: string | null\n\t/** \n\t * The dynamic descriptor name. Must be composed by business name (3, 7 or 12 chars), an asterisk (*) and the product name (18, 14 or 9 chars), for a total length of 22 chars.\n\t * @example ```\"company*productabc1234\"```\n\t */\n\tdescriptor_name?: string | null\n\t/** \n\t * The dynamic descriptor phone number. Must be 10-14 characters and can only contain numbers, dashes, parentheses and periods.\n\t * @example ```\"3125551212\"```\n\t */\n\tdescriptor_phone?: string | null\n\t/** \n\t * The dynamic descriptor URL.\n\t * @example ```\"company.com\"```\n\t */\n\tdescriptor_url?: string | null\n\n\tbraintree_payments?: BraintreePaymentRel[] | null\n\n}\n\n\nclass BraintreeGateways extends ApiResource<BraintreeGateway> {\n\n\tstatic readonly TYPE: BraintreeGatewayType = 'braintree_gateways' as const\n\n\tasync create(resource: BraintreeGatewayCreate, params?: QueryParamsRetrieve<BraintreeGateway>, options?: ResourcesConfig): Promise<BraintreeGateway> {\n\t\treturn this.resources.create<BraintreeGatewayCreate, BraintreeGateway>({ ...resource, type: BraintreeGateways.TYPE }, params, options)\n\t}\n\n\tasync update(resource: BraintreeGatewayUpdate, params?: QueryParamsRetrieve<BraintreeGateway>, options?: ResourcesConfig): Promise<BraintreeGateway> {\n\t\treturn this.resources.update<BraintreeGatewayUpdate, BraintreeGateway>({ ...resource, type: BraintreeGateways.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: BraintreeGateways.TYPE } : id, options)\n\t}\n\n\tasync payment_methods(braintreeGatewayId: string | BraintreeGateway, params?: QueryParamsList<PaymentMethod>, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>> {\n\t\tconst _braintreeGatewayId = (braintreeGatewayId as BraintreeGateway).id || braintreeGatewayId as string\n\t\treturn this.resources.fetch<PaymentMethod>({ type: 'payment_methods' }, `braintree_gateways/${_braintreeGatewayId}/payment_methods`, params, options) as unknown as ListResponse<PaymentMethod>\n\t}\n\n\tasync versions(braintreeGatewayId: string | BraintreeGateway, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _braintreeGatewayId = (braintreeGatewayId as BraintreeGateway).id || braintreeGatewayId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `braintree_gateways/${_braintreeGatewayId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync braintree_payments(braintreeGatewayId: string | BraintreeGateway, params?: QueryParamsList<BraintreePayment>, options?: ResourcesConfig): Promise<ListResponse<BraintreePayment>> {\n\t\tconst _braintreeGatewayId = (braintreeGatewayId as BraintreeGateway).id || braintreeGatewayId as string\n\t\treturn this.resources.fetch<BraintreePayment>({ type: 'braintree_payments' }, `braintree_gateways/${_braintreeGatewayId}/braintree_payments`, params, options) as unknown as ListResponse<BraintreePayment>\n\t}\n\n\n\tisBraintreeGateway(resource: any): resource is BraintreeGateway {\n\t\treturn resource.type && (resource.type === BraintreeGateways.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): BraintreeGatewayRel {\n\t\treturn super.relationshipOneToOne<BraintreeGatewayRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): BraintreeGatewayRel[] {\n\t\treturn super.relationshipOneToMany<BraintreeGatewayRel>(...ids)\n\t}\n\n\n\ttype(): BraintreeGatewayType {\n\t\treturn BraintreeGateways.TYPE\n\t}\n\n}\n\n\nconst instance = new BraintreeGateways()\nexport default instance\n\nexport type { BraintreeGateways, BraintreeGateway, BraintreeGatewayCreate, BraintreeGatewayUpdate, BraintreeGatewayType }\n"]}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { ev as BraintreeGateway, ew as BraintreeGatewayCreate, ey as BraintreeGatewaySort, nc as BraintreeGatewayType, ex as BraintreeGatewayUpdate, a6 as BraintreeGateways, a5 as default } from '../api-IwWtsAqE.cjs';
|
2
2
|
import '../client.cjs';
|
3
|
-
import '../interceptor-
|
3
|
+
import '../interceptor-k15jXzf0.cjs';
|
4
4
|
import '../types.cjs';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { ev as BraintreeGateway, ew as BraintreeGatewayCreate, ey as BraintreeGatewaySort, nc as BraintreeGatewayType, ex as BraintreeGatewayUpdate, a6 as BraintreeGateways, a5 as default } from '../api-F1F37Dud.js';
|
2
2
|
import '../client.js';
|
3
|
-
import '../interceptor-
|
3
|
+
import '../interceptor-k15jXzf0.js';
|
4
4
|
import '../types.js';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/resources/braintree_gateways.ts"],"names":[],"mappings":";;AAuJA,MAAM,0BAA0B,WAA8B,CAAA;AAAA,EAE7D,OAAgB,IAA6B,GAAA,oBAAA;AAAA,EAE7C,MAAM,MAAA,CAAO,QAAkC,EAAA,MAAA,EAAgD,OAAsD,EAAA;AACpJ,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAiD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,iBAAkB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACtI,EAEA,MAAM,MAAA,CAAO,QAAkC,EAAA,MAAA,EAAgD,OAAsD,EAAA;AACpJ,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAiD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,iBAAkB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACtI,EAEA,MAAM,MAAO,CAAA,EAAA,EAAyB,OAA0C,EAAA;AAC/E,IAAA,MAAM,IAAK,CAAA,SAAA,CAAU,MAAQ,CAAA,OAAO,EAAO,KAAA,QAAA,GAAW,EAAE,EAAA,EAAI,IAAM,EAAA,iBAAA,CAAkB,IAAK,EAAA,GAAI,IAAI,OAAO,CAAA;AAAA;AACzG,EAEA,MAAM,eAAA,CAAgB,kBAA+C,EAAA,MAAA,EAAyC,OAAiE,EAAA;AAC9K,IAAM,MAAA,mBAAA,GAAuB,m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B;AAGA,MAAM,QAAA,GAAW,IAAI,iBAAkB,EAAA;AACvC,IAAO,0BAAQ,GAAA","file":"braintree_gateways.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 { PaymentMethod } from './payment_methods'\nimport type { Version } from './versions'\nimport type { BraintreePayment, BraintreePaymentType } from './braintree_payments'\n\n\ntype BraintreeGatewayType = 'braintree_gateways'\ntype BraintreeGatewayRel = ResourceRel & { type: BraintreeGatewayType }\ntype BraintreePaymentRel = ResourceRel & { type: BraintreePaymentType }\n\n\nexport type BraintreeGatewaySort = Pick<BraintreeGateway, 'id' | 'name'> & ResourceSort\n// export type BraintreeGatewayFilter = Pick<BraintreeGateway, 'id' | 'name'> & ResourceFilter\n\n\ninterface BraintreeGateway extends Resource {\n\t\n\treadonly type: BraintreeGatewayType\n\n\t/** \n\t * The payment gateway's internal name.\n\t * @example ```\"US payment gateway\"```\n\t */\n\tname: string\n\t/** \n\t * The dynamic descriptor name. Must be composed by business name (3, 7 or 12 chars), an asterisk (*) and the product name (18, 14 or 9 chars), for a total length of 22 chars.\n\t * @example ```\"company*productabc1234\"```\n\t */\n\tdescriptor_name?: string | null\n\t/** \n\t * The dynamic descriptor phone number. Must be 10-14 characters and can only contain numbers, dashes, parentheses and periods.\n\t * @example ```\"3125551212\"```\n\t */\n\tdescriptor_phone?: string | null\n\t/** \n\t * The dynamic descriptor URL.\n\t * @example ```\"company.com\"```\n\t */\n\tdescriptor_url?: string | null\n\t/** \n\t * The gateway webhook URL, generated automatically.\n\t * @example ```\"https://core.commercelayer.co/webhook_callbacks/braintree_gateways/xxxxx\"```\n\t */\n\twebhook_endpoint_url?: string | null\n\n\tpayment_methods?: PaymentMethod[] | null\n\tversions?: Version[] | null\n\tbraintree_payments?: BraintreePayment[] | null\n\n}\n\n\ninterface BraintreeGatewayCreate extends ResourceCreate {\n\t\n\t/** \n\t * The payment gateway's internal name.\n\t * @example ```\"US payment gateway\"```\n\t */\n\tname: string\n\t/** \n\t * The gateway merchant account ID.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tmerchant_account_id: string\n\t/** \n\t * The gateway merchant ID.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tmerchant_id: string\n\t/** \n\t * The gateway API public key.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tpublic_key: string\n\t/** \n\t * The gateway API private key.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tprivate_key: string\n\t/** \n\t * The dynamic descriptor name. Must be composed by business name (3, 7 or 12 chars), an asterisk (*) and the product name (18, 14 or 9 chars), for a total length of 22 chars.\n\t * @example ```\"company*productabc1234\"```\n\t */\n\tdescriptor_name?: string | null\n\t/** \n\t * The dynamic descriptor phone number. Must be 10-14 characters and can only contain numbers, dashes, parentheses and periods.\n\t * @example ```\"3125551212\"```\n\t */\n\tdescriptor_phone?: string | null\n\t/** \n\t * The dynamic descriptor URL.\n\t * @example ```\"company.com\"```\n\t */\n\tdescriptor_url?: string | null\n\n\tbraintree_payments?: BraintreePaymentRel[] | null\n\n}\n\n\ninterface BraintreeGatewayUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The payment gateway's internal name.\n\t * @example ```\"US payment gateway\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The gateway merchant account ID.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tmerchant_account_id?: string | null\n\t/** \n\t * The gateway merchant ID.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tmerchant_id?: string | null\n\t/** \n\t * The gateway API public key.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tpublic_key?: string | null\n\t/** \n\t * The gateway API private key.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tprivate_key?: string | null\n\t/** \n\t * The dynamic descriptor name. Must be composed by business name (3, 7 or 12 chars), an asterisk (*) and the product name (18, 14 or 9 chars), for a total length of 22 chars.\n\t * @example ```\"company*productabc1234\"```\n\t */\n\tdescriptor_name?: string | null\n\t/** \n\t * The dynamic descriptor phone number. Must be 10-14 characters and can only contain numbers, dashes, parentheses and periods.\n\t * @example ```\"3125551212\"```\n\t */\n\tdescriptor_phone?: string | null\n\t/** \n\t * The dynamic descriptor URL.\n\t * @example ```\"company.com\"```\n\t */\n\tdescriptor_url?: string | null\n\n\tbraintree_payments?: BraintreePaymentRel[] | null\n\n}\n\n\nclass BraintreeGateways extends ApiResource<BraintreeGateway> {\n\n\tstatic readonly TYPE: BraintreeGatewayType = 'braintree_gateways' as const\n\n\tasync create(resource: BraintreeGatewayCreate, params?: QueryParamsRetrieve<BraintreeGateway>, options?: ResourcesConfig): Promise<BraintreeGateway> {\n\t\treturn this.resources.create<BraintreeGatewayCreate, BraintreeGateway>({ ...resource, type: BraintreeGateways.TYPE }, params, options)\n\t}\n\n\tasync update(resource: BraintreeGatewayUpdate, params?: QueryParamsRetrieve<BraintreeGateway>, options?: ResourcesConfig): Promise<BraintreeGateway> {\n\t\treturn this.resources.update<BraintreeGatewayUpdate, BraintreeGateway>({ ...resource, type: BraintreeGateways.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: BraintreeGateways.TYPE } : id, options)\n\t}\n\n\tasync payment_methods(braintreeGatewayId: string | BraintreeGateway, params?: QueryParamsList<PaymentMethod>, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>> {\n\t\tconst _braintreeGatewayId = (braintreeGatewayId as BraintreeGateway).id || braintreeGatewayId as string\n\t\treturn this.resources.fetch<PaymentMethod>({ type: 'payment_methods' }, `braintree_gateways/${_braintreeGatewayId}/payment_methods`, params, options) as unknown as ListResponse<PaymentMethod>\n\t}\n\n\tasync versions(braintreeGatewayId: string | BraintreeGateway, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _braintreeGatewayId = (braintreeGatewayId as BraintreeGateway).id || braintreeGatewayId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `braintree_gateways/${_braintreeGatewayId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync braintree_payments(braintreeGatewayId: string | BraintreeGateway, params?: QueryParamsList<BraintreePayment>, options?: ResourcesConfig): Promise<ListResponse<BraintreePayment>> {\n\t\tconst _braintreeGatewayId = (braintreeGatewayId as BraintreeGateway).id || braintreeGatewayId as string\n\t\treturn this.resources.fetch<BraintreePayment>({ type: 'braintree_payments' }, `braintree_gateways/${_braintreeGatewayId}/braintree_payments`, params, options) as unknown as ListResponse<BraintreePayment>\n\t}\n\n\n\tisBraintreeGateway(resource: any): resource is BraintreeGateway {\n\t\treturn resource.type && (resource.type === BraintreeGateways.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): BraintreeGatewayRel {\n\t\treturn super.relationshipOneToOne<BraintreeGatewayRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): BraintreeGatewayRel[] {\n\t\treturn super.relationshipOneToMany<BraintreeGatewayRel>(...ids)\n\t}\n\n\n\ttype(): BraintreeGatewayType {\n\t\treturn BraintreeGateways.TYPE\n\t}\n\n}\n\n\nconst instance = new BraintreeGateways()\nexport default instance\n\nexport type { BraintreeGateway, BraintreeGatewayCreate, BraintreeGatewayUpdate, BraintreeGatewayType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/braintree_gateways.ts"],"names":[],"mappings":";;AAuJA,MAAM,0BAA0B,WAA8B,CAAA;AAAA,EAE7D,OAAgB,IAA6B,GAAA,oBAAA;AAAA,EAE7C,MAAM,MAAA,CAAO,QAAkC,EAAA,MAAA,EAAgD,OAAsD,EAAA;AACpJ,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAiD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AAA,EAA4C,OAAoE,EAAA;AACvL,IAAM,MAAA,mBAAA,GAAuB,mBAAwC,EAAM,IAAA,kBAAA;AAC3E,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAwB,EAAE,IAAA,EAAM,oBAAqB,EAAA,EAAG,CAAsB,mBAAA,EAAA,mBAAmB,CAAuB,mBAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC9J,EAGA,mBAAmB,QAA6C,EAAA;AAC/D,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,iBAAkB,CAAA,IAAA;AAAA;AAC9D,EAGA,aAAa,EAAqD,EAAA;AACjE,IAAO,OAAA,KAAA,CAAM,qBAA0C,EAAE,CAAA;AAAA;AAC1D,EAEA,sBAAsB,GAAsC,EAAA;AAC3D,IAAO,OAAA,KAAA,CAAM,qBAA2C,CAAA,GAAG,GAAG,CAAA;AAAA;AAC/D,EAGA,IAA6B,GAAA;AAC5B,IAAA,OAAO,iBAAkB,CAAA,IAAA;AAAA;AAG3B;AAGA,MAAM,QAAA,GAAW,IAAI,iBAAkB,EAAA;AACvC,IAAO,0BAAQ,GAAA","file":"braintree_gateways.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 { PaymentMethod } from './payment_methods'\nimport type { Version } from './versions'\nimport type { BraintreePayment, BraintreePaymentType } from './braintree_payments'\n\n\ntype BraintreeGatewayType = 'braintree_gateways'\ntype BraintreeGatewayRel = ResourceRel & { type: BraintreeGatewayType }\ntype BraintreePaymentRel = ResourceRel & { type: BraintreePaymentType }\n\n\nexport type BraintreeGatewaySort = Pick<BraintreeGateway, 'id' | 'name'> & ResourceSort\n// export type BraintreeGatewayFilter = Pick<BraintreeGateway, 'id' | 'name'> & ResourceFilter\n\n\ninterface BraintreeGateway extends Resource {\n\t\n\treadonly type: BraintreeGatewayType\n\n\t/** \n\t * The payment gateway's internal name.\n\t * @example ```\"US payment gateway\"```\n\t */\n\tname: string\n\t/** \n\t * The dynamic descriptor name. Must be composed by business name (3, 7 or 12 chars), an asterisk (*) and the product name (18, 14 or 9 chars), for a total length of 22 chars.\n\t * @example ```\"company*productabc1234\"```\n\t */\n\tdescriptor_name?: string | null\n\t/** \n\t * The dynamic descriptor phone number. Must be 10-14 characters and can only contain numbers, dashes, parentheses and periods.\n\t * @example ```\"3125551212\"```\n\t */\n\tdescriptor_phone?: string | null\n\t/** \n\t * The dynamic descriptor URL.\n\t * @example ```\"company.com\"```\n\t */\n\tdescriptor_url?: string | null\n\t/** \n\t * The gateway webhook URL, generated automatically.\n\t * @example ```\"https://core.commercelayer.co/webhook_callbacks/braintree_gateways/xxxxx\"```\n\t */\n\twebhook_endpoint_url?: string | null\n\n\tpayment_methods?: PaymentMethod[] | null\n\tversions?: Version[] | null\n\tbraintree_payments?: BraintreePayment[] | null\n\n}\n\n\ninterface BraintreeGatewayCreate extends ResourceCreate {\n\t\n\t/** \n\t * The payment gateway's internal name.\n\t * @example ```\"US payment gateway\"```\n\t */\n\tname: string\n\t/** \n\t * The gateway merchant account ID.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tmerchant_account_id: string\n\t/** \n\t * The gateway merchant ID.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tmerchant_id: string\n\t/** \n\t * The gateway API public key.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tpublic_key: string\n\t/** \n\t * The gateway API private key.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tprivate_key: string\n\t/** \n\t * The dynamic descriptor name. Must be composed by business name (3, 7 or 12 chars), an asterisk (*) and the product name (18, 14 or 9 chars), for a total length of 22 chars.\n\t * @example ```\"company*productabc1234\"```\n\t */\n\tdescriptor_name?: string | null\n\t/** \n\t * The dynamic descriptor phone number. Must be 10-14 characters and can only contain numbers, dashes, parentheses and periods.\n\t * @example ```\"3125551212\"```\n\t */\n\tdescriptor_phone?: string | null\n\t/** \n\t * The dynamic descriptor URL.\n\t * @example ```\"company.com\"```\n\t */\n\tdescriptor_url?: string | null\n\n\tbraintree_payments?: BraintreePaymentRel[] | null\n\n}\n\n\ninterface BraintreeGatewayUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The payment gateway's internal name.\n\t * @example ```\"US payment gateway\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The gateway merchant account ID.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tmerchant_account_id?: string | null\n\t/** \n\t * The gateway merchant ID.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tmerchant_id?: string | null\n\t/** \n\t * The gateway API public key.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tpublic_key?: string | null\n\t/** \n\t * The gateway API private key.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tprivate_key?: string | null\n\t/** \n\t * The dynamic descriptor name. Must be composed by business name (3, 7 or 12 chars), an asterisk (*) and the product name (18, 14 or 9 chars), for a total length of 22 chars.\n\t * @example ```\"company*productabc1234\"```\n\t */\n\tdescriptor_name?: string | null\n\t/** \n\t * The dynamic descriptor phone number. Must be 10-14 characters and can only contain numbers, dashes, parentheses and periods.\n\t * @example ```\"3125551212\"```\n\t */\n\tdescriptor_phone?: string | null\n\t/** \n\t * The dynamic descriptor URL.\n\t * @example ```\"company.com\"```\n\t */\n\tdescriptor_url?: string | null\n\n\tbraintree_payments?: BraintreePaymentRel[] | null\n\n}\n\n\nclass BraintreeGateways extends ApiResource<BraintreeGateway> {\n\n\tstatic readonly TYPE: BraintreeGatewayType = 'braintree_gateways' as const\n\n\tasync create(resource: BraintreeGatewayCreate, params?: QueryParamsRetrieve<BraintreeGateway>, options?: ResourcesConfig): Promise<BraintreeGateway> {\n\t\treturn this.resources.create<BraintreeGatewayCreate, BraintreeGateway>({ ...resource, type: BraintreeGateways.TYPE }, params, options)\n\t}\n\n\tasync update(resource: BraintreeGatewayUpdate, params?: QueryParamsRetrieve<BraintreeGateway>, options?: ResourcesConfig): Promise<BraintreeGateway> {\n\t\treturn this.resources.update<BraintreeGatewayUpdate, BraintreeGateway>({ ...resource, type: BraintreeGateways.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: BraintreeGateways.TYPE } : id, options)\n\t}\n\n\tasync payment_methods(braintreeGatewayId: string | BraintreeGateway, params?: QueryParamsList<PaymentMethod>, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>> {\n\t\tconst _braintreeGatewayId = (braintreeGatewayId as BraintreeGateway).id || braintreeGatewayId as string\n\t\treturn this.resources.fetch<PaymentMethod>({ type: 'payment_methods' }, `braintree_gateways/${_braintreeGatewayId}/payment_methods`, params, options) as unknown as ListResponse<PaymentMethod>\n\t}\n\n\tasync versions(braintreeGatewayId: string | BraintreeGateway, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _braintreeGatewayId = (braintreeGatewayId as BraintreeGateway).id || braintreeGatewayId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `braintree_gateways/${_braintreeGatewayId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync braintree_payments(braintreeGatewayId: string | BraintreeGateway, params?: QueryParamsList<BraintreePayment>, options?: ResourcesConfig): Promise<ListResponse<BraintreePayment>> {\n\t\tconst _braintreeGatewayId = (braintreeGatewayId as BraintreeGateway).id || braintreeGatewayId as string\n\t\treturn this.resources.fetch<BraintreePayment>({ type: 'braintree_payments' }, `braintree_gateways/${_braintreeGatewayId}/braintree_payments`, params, options) as unknown as ListResponse<BraintreePayment>\n\t}\n\n\n\tisBraintreeGateway(resource: any): resource is BraintreeGateway {\n\t\treturn resource.type && (resource.type === BraintreeGateways.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): BraintreeGatewayRel {\n\t\treturn super.relationshipOneToOne<BraintreeGatewayRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): BraintreeGatewayRel[] {\n\t\treturn super.relationshipOneToMany<BraintreeGatewayRel>(...ids)\n\t}\n\n\n\ttype(): BraintreeGatewayType {\n\t\treturn BraintreeGateways.TYPE\n\t}\n\n}\n\n\nconst instance = new BraintreeGateways()\nexport default instance\n\nexport type { BraintreeGateways, BraintreeGateway, BraintreeGatewayCreate, BraintreeGatewayUpdate, BraintreeGatewayType }\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/resources/braintree_payments.ts"],"names":["ApiResource"],"mappings":";;;;AA+GA,MAAM,0BAA0BA,oBAA8B,CAAA;AAAA,EAE7D,OAAgB,IAA6B,GAAA,oBAAA;AAAA,EAE7C,MAAM,MAAA,CAAO,QAAkC,EAAA,MAAA,EAAgD,OAAsD,EAAA;AACpJ,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAiD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,iBAAkB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACtI,EAEA,MAAM,MAAA,CAAO,QAAkC,EAAA,MAAA,EAAgD,OAAsD,EAAA;AACpJ,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAiD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,iBAAkB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACtI,EAEA,MAAM,MAAO,CAAA,EAAA,EAAyB,OAA0C,EAAA;AAC/E,IAAA,MAAM,IAAK,CAAA,SAAA,CAAU,MAAQ,CAAA,OAAO,EAAO,KAAA,QAAA,GAAW,EAAE,EAAA,EAAI,IAAM,EAAA,iBAAA,CAAkB,IAAK,E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OAAA,KAAA,CAAM,qBAA2C,CAAA,GAAG,GAAG,CAAA;AAAA;AAC/D,EAGA,IAA6B,GAAA;AAC5B,IAAA,OAAO,iBAAkB,CAAA,IAAA;AAAA;AAG3B;AAGA,MAAM,QAAA,GAAW,IAAI,iBAAkB,EAAA;AACvC,IAAO,0BAAQ,GAAA","file":"braintree_payments.cjs","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Order, OrderType } from './orders'\nimport type { PaymentGateway } from './payment_gateways'\nimport type { Version } from './versions'\n\n\ntype BraintreePaymentType = 'braintree_payments'\ntype BraintreePaymentRel = ResourceRel & { type: BraintreePaymentType }\ntype OrderRel = ResourceRel & { type: OrderType }\n\n\nexport type BraintreePaymentSort = Pick<BraintreePayment, 'id'> & ResourceSort\n// export type BraintreePaymentFilter = Pick<BraintreePayment, 'id'> & ResourceFilter\n\n\ninterface BraintreePayment extends Resource {\n\t\n\treadonly type: BraintreePaymentType\n\n\t/** \n\t * The Braintree payment client token. Required by the Braintree JS SDK.\n\t * @example ```\"xxxx.yyyy.zzzz\"```\n\t */\n\tclient_token: string\n\t/** \n\t * The Braintree payment method nonce. Sent by the Braintree JS SDK.\n\t * @example ```\"xxxx.yyyy.zzzz\"```\n\t */\n\tpayment_method_nonce?: string | null\n\t/** \n\t * The Braintree payment ID used by local payment and sent by the Braintree JS SDK.\n\t * @example ```\"xxxx.yyyy.zzzz\"```\n\t */\n\tpayment_id?: string | null\n\t/** \n\t * Indicates if the payment is local, in such case Braintree will trigger a webhook call passing the \"payment_id\" and \"payment_method_nonce\" in order to complete the transaction.\n\t * @example ```true```\n\t */\n\tlocal?: boolean | null\n\t/** \n\t * Braintree payment options, 'customer_id' and 'payment_method_token'.\n\t * @example ```{\"customer_id\":\"1234567890\"}```\n\t */\n\toptions?: Record<string, any> | null\n\t/** \n\t * Information about the payment instrument used in the transaction.\n\t * @example ```{\"issuer\":\"cl bank\",\"card_type\":\"visa\"}```\n\t */\n\tpayment_instrument?: Record<string, any> | null\n\n\torder?: Order | null\n\tpayment_gateway?: PaymentGateway | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface BraintreePaymentCreate extends ResourceCreate {\n\t\n\t/** \n\t * The Braintree payment ID used by local payment and sent by the Braintree JS SDK.\n\t * @example ```\"xxxx.yyyy.zzzz\"```\n\t */\n\tpayment_id?: string | null\n\t/** \n\t * Indicates if the payment is local, in such case Braintree will trigger a webhook call passing the \"payment_id\" and \"payment_method_nonce\" in order to complete the transaction.\n\t * @example ```true```\n\t */\n\tlocal?: boolean | null\n\t/** \n\t * Braintree payment options, 'customer_id' and 'payment_method_token'.\n\t * @example ```{\"customer_id\":\"1234567890\"}```\n\t */\n\toptions?: Record<string, any> | null\n\n\torder: OrderRel\n\n}\n\n\ninterface BraintreePaymentUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The Braintree payment method nonce. Sent by the Braintree JS SDK.\n\t * @example ```\"xxxx.yyyy.zzzz\"```\n\t */\n\tpayment_method_nonce?: string | null\n\t/** \n\t * The Braintree payment ID used by local payment and sent by the Braintree JS SDK.\n\t * @example ```\"xxxx.yyyy.zzzz\"```\n\t */\n\tpayment_id?: string | null\n\t/** \n\t * Indicates if the payment is local, in such case Braintree will trigger a webhook call passing the \"payment_id\" and \"payment_method_nonce\" in order to complete the transaction.\n\t * @example ```true```\n\t */\n\tlocal?: boolean | null\n\t/** \n\t * Braintree payment options, 'customer_id' and 'payment_method_token'.\n\t * @example ```{\"customer_id\":\"1234567890\"}```\n\t */\n\toptions?: Record<string, any> | null\n\n\torder?: OrderRel | null\n\n}\n\n\nclass BraintreePayments extends ApiResource<BraintreePayment> {\n\n\tstatic readonly TYPE: BraintreePaymentType = 'braintree_payments' as const\n\n\tasync create(resource: BraintreePaymentCreate, params?: QueryParamsRetrieve<BraintreePayment>, options?: ResourcesConfig): Promise<BraintreePayment> {\n\t\treturn this.resources.create<BraintreePaymentCreate, BraintreePayment>({ ...resource, type: BraintreePayments.TYPE }, params, options)\n\t}\n\n\tasync update(resource: BraintreePaymentUpdate, params?: QueryParamsRetrieve<BraintreePayment>, options?: ResourcesConfig): Promise<BraintreePayment> {\n\t\treturn this.resources.update<BraintreePaymentUpdate, BraintreePayment>({ ...resource, type: BraintreePayments.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: BraintreePayments.TYPE } : id, options)\n\t}\n\n\tasync order(braintreePaymentId: string | BraintreePayment, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _braintreePaymentId = (braintreePaymentId as BraintreePayment).id || braintreePaymentId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `braintree_payments/${_braintreePaymentId}/order`, params, options) as unknown as Order\n\t}\n\n\tasync payment_gateway(braintreePaymentId: string | BraintreePayment, params?: QueryParamsRetrieve<PaymentGateway>, options?: ResourcesConfig): Promise<PaymentGateway> {\n\t\tconst _braintreePaymentId = (braintreePaymentId as BraintreePayment).id || braintreePaymentId as string\n\t\treturn this.resources.fetch<PaymentGateway>({ type: 'payment_gateways' }, `braintree_payments/${_braintreePaymentId}/payment_gateway`, params, options) as unknown as PaymentGateway\n\t}\n\n\tasync versions(braintreePaymentId: string | BraintreePayment, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _braintreePaymentId = (braintreePaymentId as BraintreePayment).id || braintreePaymentId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `braintree_payments/${_braintreePaymentId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisBraintreePayment(resource: any): resource is BraintreePayment {\n\t\treturn resource.type && (resource.type === BraintreePayments.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): BraintreePaymentRel {\n\t\treturn super.relationshipOneToOne<BraintreePaymentRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): BraintreePaymentRel[] {\n\t\treturn super.relationshipOneToMany<BraintreePaymentRel>(...ids)\n\t}\n\n\n\ttype(): BraintreePaymentType {\n\t\treturn BraintreePayments.TYPE\n\t}\n\n}\n\n\nconst instance = new BraintreePayments()\nexport default instance\n\nexport type { BraintreePayment, BraintreePaymentCreate, BraintreePaymentUpdate, BraintreePaymentType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/braintree_payments.ts"],"names":["ApiResource"],"mappings":";;;;AA+GA,MAAM,0BAA0BA,oBAA8B,CAAA;AAAA,EAE7D,OAAgB,IAA6B,GAAA,oBAAA;AAAA,EAE7C,MAAM,MAAA,CAAO,QAAkC,EAAA,MAAA,EAAgD,OAAsD,EAAA;AACpJ,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAiD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,iBAAkB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACtI,EAEA,MAAM,MAAA,CAAO,QAAkC,EAAA,MAAA,EAAgD,OAAsD,EAAA;AACpJ,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAiD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,iBAAkB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACtI,EAEA,MAAM,MAAO,CAAA,EAAA,EAAyB,OAA0C,EAAA;AAC/E,IAAA,MAAM,IAAK,CAAA,SAAA,CAAU,MAAQ,CAAA,OAAO,EAAO,KAAA,QAAA,GAAW,EAAE,EAAA,EAAI,IAAM,EAAA,iBAAA,CAAkB,IAAK,EAAA,GAAI,IAAI,OAAO,CAAA;AAAA;AACzG,EAEA,MAAM,KAAA,CAAM,kBAA+C,EAAA,MAAA,EAAqC,OAA2C,EAAA;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AkB,CAAA,IAAA;AAAA;AAG3B;AAGA,MAAM,QAAA,GAAW,IAAI,iBAAkB,EAAA;AACvC,IAAO,0BAAQ,GAAA","file":"braintree_payments.cjs","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Order, OrderType } from './orders'\nimport type { PaymentGateway } from './payment_gateways'\nimport type { Version } from './versions'\n\n\ntype BraintreePaymentType = 'braintree_payments'\ntype BraintreePaymentRel = ResourceRel & { type: BraintreePaymentType }\ntype OrderRel = ResourceRel & { type: OrderType }\n\n\nexport type BraintreePaymentSort = Pick<BraintreePayment, 'id'> & ResourceSort\n// export type BraintreePaymentFilter = Pick<BraintreePayment, 'id'> & ResourceFilter\n\n\ninterface BraintreePayment extends Resource {\n\t\n\treadonly type: BraintreePaymentType\n\n\t/** \n\t * The Braintree payment client token. Required by the Braintree JS SDK.\n\t * @example ```\"xxxx.yyyy.zzzz\"```\n\t */\n\tclient_token: string\n\t/** \n\t * The Braintree payment method nonce. Sent by the Braintree JS SDK.\n\t * @example ```\"xxxx.yyyy.zzzz\"```\n\t */\n\tpayment_method_nonce?: string | null\n\t/** \n\t * The Braintree payment ID used by local payment and sent by the Braintree JS SDK.\n\t * @example ```\"xxxx.yyyy.zzzz\"```\n\t */\n\tpayment_id?: string | null\n\t/** \n\t * Indicates if the payment is local, in such case Braintree will trigger a webhook call passing the \"payment_id\" and \"payment_method_nonce\" in order to complete the transaction.\n\t * @example ```true```\n\t */\n\tlocal?: boolean | null\n\t/** \n\t * Braintree payment options, 'customer_id' and 'payment_method_token'.\n\t * @example ```{\"customer_id\":\"1234567890\"}```\n\t */\n\toptions?: Record<string, any> | null\n\t/** \n\t * Information about the payment instrument used in the transaction.\n\t * @example ```{\"issuer\":\"cl bank\",\"card_type\":\"visa\"}```\n\t */\n\tpayment_instrument?: Record<string, any> | null\n\n\torder?: Order | null\n\tpayment_gateway?: PaymentGateway | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface BraintreePaymentCreate extends ResourceCreate {\n\t\n\t/** \n\t * The Braintree payment ID used by local payment and sent by the Braintree JS SDK.\n\t * @example ```\"xxxx.yyyy.zzzz\"```\n\t */\n\tpayment_id?: string | null\n\t/** \n\t * Indicates if the payment is local, in such case Braintree will trigger a webhook call passing the \"payment_id\" and \"payment_method_nonce\" in order to complete the transaction.\n\t * @example ```true```\n\t */\n\tlocal?: boolean | null\n\t/** \n\t * Braintree payment options, 'customer_id' and 'payment_method_token'.\n\t * @example ```{\"customer_id\":\"1234567890\"}```\n\t */\n\toptions?: Record<string, any> | null\n\n\torder: OrderRel\n\n}\n\n\ninterface BraintreePaymentUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The Braintree payment method nonce. Sent by the Braintree JS SDK.\n\t * @example ```\"xxxx.yyyy.zzzz\"```\n\t */\n\tpayment_method_nonce?: string | null\n\t/** \n\t * The Braintree payment ID used by local payment and sent by the Braintree JS SDK.\n\t * @example ```\"xxxx.yyyy.zzzz\"```\n\t */\n\tpayment_id?: string | null\n\t/** \n\t * Indicates if the payment is local, in such case Braintree will trigger a webhook call passing the \"payment_id\" and \"payment_method_nonce\" in order to complete the transaction.\n\t * @example ```true```\n\t */\n\tlocal?: boolean | null\n\t/** \n\t * Braintree payment options, 'customer_id' and 'payment_method_token'.\n\t * @example ```{\"customer_id\":\"1234567890\"}```\n\t */\n\toptions?: Record<string, any> | null\n\n\torder?: OrderRel | null\n\n}\n\n\nclass BraintreePayments extends ApiResource<BraintreePayment> {\n\n\tstatic readonly TYPE: BraintreePaymentType = 'braintree_payments' as const\n\n\tasync create(resource: BraintreePaymentCreate, params?: QueryParamsRetrieve<BraintreePayment>, options?: ResourcesConfig): Promise<BraintreePayment> {\n\t\treturn this.resources.create<BraintreePaymentCreate, BraintreePayment>({ ...resource, type: BraintreePayments.TYPE }, params, options)\n\t}\n\n\tasync update(resource: BraintreePaymentUpdate, params?: QueryParamsRetrieve<BraintreePayment>, options?: ResourcesConfig): Promise<BraintreePayment> {\n\t\treturn this.resources.update<BraintreePaymentUpdate, BraintreePayment>({ ...resource, type: BraintreePayments.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: BraintreePayments.TYPE } : id, options)\n\t}\n\n\tasync order(braintreePaymentId: string | BraintreePayment, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _braintreePaymentId = (braintreePaymentId as BraintreePayment).id || braintreePaymentId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `braintree_payments/${_braintreePaymentId}/order`, params, options) as unknown as Order\n\t}\n\n\tasync payment_gateway(braintreePaymentId: string | BraintreePayment, params?: QueryParamsRetrieve<PaymentGateway>, options?: ResourcesConfig): Promise<PaymentGateway> {\n\t\tconst _braintreePaymentId = (braintreePaymentId as BraintreePayment).id || braintreePaymentId as string\n\t\treturn this.resources.fetch<PaymentGateway>({ type: 'payment_gateways' }, `braintree_payments/${_braintreePaymentId}/payment_gateway`, params, options) as unknown as PaymentGateway\n\t}\n\n\tasync versions(braintreePaymentId: string | BraintreePayment, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _braintreePaymentId = (braintreePaymentId as BraintreePayment).id || braintreePaymentId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `braintree_payments/${_braintreePaymentId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisBraintreePayment(resource: any): resource is BraintreePayment {\n\t\treturn resource.type && (resource.type === BraintreePayments.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): BraintreePaymentRel {\n\t\treturn super.relationshipOneToOne<BraintreePaymentRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): BraintreePaymentRel[] {\n\t\treturn super.relationshipOneToMany<BraintreePaymentRel>(...ids)\n\t}\n\n\n\ttype(): BraintreePaymentType {\n\t\treturn BraintreePayments.TYPE\n\t}\n\n}\n\n\nconst instance = new BraintreePayments()\nexport default instance\n\nexport type { BraintreePayments, BraintreePayment, BraintreePaymentCreate, BraintreePaymentUpdate, BraintreePaymentType }\n"]}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { ez as BraintreePayment, eA as BraintreePaymentCreate, eC as BraintreePaymentSort, lH as BraintreePaymentType, eB as BraintreePaymentUpdate, a8 as BraintreePayments, a7 as default } from '../api-IwWtsAqE.cjs';
|
2
2
|
import '../client.cjs';
|
3
|
-
import '../interceptor-
|
3
|
+
import '../interceptor-k15jXzf0.cjs';
|
4
4
|
import '../types.cjs';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { ez as BraintreePayment, eA as BraintreePaymentCreate, eC as BraintreePaymentSort, lH as BraintreePaymentType, eB as BraintreePaymentUpdate, a8 as BraintreePayments, a7 as default } from '../api-F1F37Dud.js';
|
2
2
|
import '../client.js';
|
3
|
-
import '../interceptor-
|
3
|
+
import '../interceptor-k15jXzf0.js';
|
4
4
|
import '../types.js';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/resources/braintree_payments.ts"],"names":[],"mappings":";;AA+GA,MAAM,0BAA0B,WAA8B,CAAA;AAAA,EAE7D,OAAgB,IAA6B,GAAA,oBAAA;AAAA,EAE7C,MAAM,MAAA,CAAO,QAAkC,EAAA,MAAA,EAAgD,OAAsD,EAAA;AACpJ,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAiD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,iBAAkB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACtI,EAEA,MAAM,MAAA,CAAO,QAAkC,EAAA,MAAA,EAAgD,OAAsD,EAAA;AACpJ,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sB,mBAAA,EAAA,mBAAmB,CAAa,SAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACjI,EAGA,mBAAmB,QAA6C,EAAA;AAC/D,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,iBAAkB,CAAA,IAAA;AAAA;AAC9D,EAGA,aAAa,EAAqD,EAAA;AACjE,IAAO,OAAA,KAAA,CAAM,qBAA0C,EAAE,CAAA;AAAA;AAC1D,EAEA,sBAAsB,GAAsC,EAAA;AAC3D,IAAO,OAAA,KAAA,CAAM,qBAA2C,CAAA,GAAG,GAAG,CAAA;AAAA;AAC/D,EAGA,IAA6B,GAAA;AAC5B,IAAA,OAAO,iBAAkB,CAAA,IAAA;AAAA;AAG3B;AAGA,MAAM,QAAA,GAAW,IAAI,iBAAkB,EAAA;AACvC,IAAO,0BAAQ,GAAA","file":"braintree_payments.js","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Order, OrderType } from './orders'\nimport type { PaymentGateway } from './payment_gateways'\nimport type { Version } from './versions'\n\n\ntype BraintreePaymentType = 'braintree_payments'\ntype BraintreePaymentRel = ResourceRel & { type: BraintreePaymentType }\ntype OrderRel = ResourceRel & { type: OrderType }\n\n\nexport type BraintreePaymentSort = Pick<BraintreePayment, 'id'> & ResourceSort\n// export type BraintreePaymentFilter = Pick<BraintreePayment, 'id'> & ResourceFilter\n\n\ninterface BraintreePayment extends Resource {\n\t\n\treadonly type: BraintreePaymentType\n\n\t/** \n\t * The Braintree payment client token. Required by the Braintree JS SDK.\n\t * @example ```\"xxxx.yyyy.zzzz\"```\n\t */\n\tclient_token: string\n\t/** \n\t * The Braintree payment method nonce. Sent by the Braintree JS SDK.\n\t * @example ```\"xxxx.yyyy.zzzz\"```\n\t */\n\tpayment_method_nonce?: string | null\n\t/** \n\t * The Braintree payment ID used by local payment and sent by the Braintree JS SDK.\n\t * @example ```\"xxxx.yyyy.zzzz\"```\n\t */\n\tpayment_id?: string | null\n\t/** \n\t * Indicates if the payment is local, in such case Braintree will trigger a webhook call passing the \"payment_id\" and \"payment_method_nonce\" in order to complete the transaction.\n\t * @example ```true```\n\t */\n\tlocal?: boolean | null\n\t/** \n\t * Braintree payment options, 'customer_id' and 'payment_method_token'.\n\t * @example ```{\"customer_id\":\"1234567890\"}```\n\t */\n\toptions?: Record<string, any> | null\n\t/** \n\t * Information about the payment instrument used in the transaction.\n\t * @example ```{\"issuer\":\"cl bank\",\"card_type\":\"visa\"}```\n\t */\n\tpayment_instrument?: Record<string, any> | null\n\n\torder?: Order | null\n\tpayment_gateway?: PaymentGateway | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface BraintreePaymentCreate extends ResourceCreate {\n\t\n\t/** \n\t * The Braintree payment ID used by local payment and sent by the Braintree JS SDK.\n\t * @example ```\"xxxx.yyyy.zzzz\"```\n\t */\n\tpayment_id?: string | null\n\t/** \n\t * Indicates if the payment is local, in such case Braintree will trigger a webhook call passing the \"payment_id\" and \"payment_method_nonce\" in order to complete the transaction.\n\t * @example ```true```\n\t */\n\tlocal?: boolean | null\n\t/** \n\t * Braintree payment options, 'customer_id' and 'payment_method_token'.\n\t * @example ```{\"customer_id\":\"1234567890\"}```\n\t */\n\toptions?: Record<string, any> | null\n\n\torder: OrderRel\n\n}\n\n\ninterface BraintreePaymentUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The Braintree payment method nonce. Sent by the Braintree JS SDK.\n\t * @example ```\"xxxx.yyyy.zzzz\"```\n\t */\n\tpayment_method_nonce?: string | null\n\t/** \n\t * The Braintree payment ID used by local payment and sent by the Braintree JS SDK.\n\t * @example ```\"xxxx.yyyy.zzzz\"```\n\t */\n\tpayment_id?: string | null\n\t/** \n\t * Indicates if the payment is local, in such case Braintree will trigger a webhook call passing the \"payment_id\" and \"payment_method_nonce\" in order to complete the transaction.\n\t * @example ```true```\n\t */\n\tlocal?: boolean | null\n\t/** \n\t * Braintree payment options, 'customer_id' and 'payment_method_token'.\n\t * @example ```{\"customer_id\":\"1234567890\"}```\n\t */\n\toptions?: Record<string, any> | null\n\n\torder?: OrderRel | null\n\n}\n\n\nclass BraintreePayments extends ApiResource<BraintreePayment> {\n\n\tstatic readonly TYPE: BraintreePaymentType = 'braintree_payments' as const\n\n\tasync create(resource: BraintreePaymentCreate, params?: QueryParamsRetrieve<BraintreePayment>, options?: ResourcesConfig): Promise<BraintreePayment> {\n\t\treturn this.resources.create<BraintreePaymentCreate, BraintreePayment>({ ...resource, type: BraintreePayments.TYPE }, params, options)\n\t}\n\n\tasync update(resource: BraintreePaymentUpdate, params?: QueryParamsRetrieve<BraintreePayment>, options?: ResourcesConfig): Promise<BraintreePayment> {\n\t\treturn this.resources.update<BraintreePaymentUpdate, BraintreePayment>({ ...resource, type: BraintreePayments.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: BraintreePayments.TYPE } : id, options)\n\t}\n\n\tasync order(braintreePaymentId: string | BraintreePayment, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _braintreePaymentId = (braintreePaymentId as BraintreePayment).id || braintreePaymentId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `braintree_payments/${_braintreePaymentId}/order`, params, options) as unknown as Order\n\t}\n\n\tasync payment_gateway(braintreePaymentId: string | BraintreePayment, params?: QueryParamsRetrieve<PaymentGateway>, options?: ResourcesConfig): Promise<PaymentGateway> {\n\t\tconst _braintreePaymentId = (braintreePaymentId as BraintreePayment).id || braintreePaymentId as string\n\t\treturn this.resources.fetch<PaymentGateway>({ type: 'payment_gateways' }, `braintree_payments/${_braintreePaymentId}/payment_gateway`, params, options) as unknown as PaymentGateway\n\t}\n\n\tasync versions(braintreePaymentId: string | BraintreePayment, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _braintreePaymentId = (braintreePaymentId as BraintreePayment).id || braintreePaymentId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `braintree_payments/${_braintreePaymentId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisBraintreePayment(resource: any): resource is BraintreePayment {\n\t\treturn resource.type && (resource.type === BraintreePayments.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): BraintreePaymentRel {\n\t\treturn super.relationshipOneToOne<BraintreePaymentRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): BraintreePaymentRel[] {\n\t\treturn super.relationshipOneToMany<BraintreePaymentRel>(...ids)\n\t}\n\n\n\ttype(): BraintreePaymentType {\n\t\treturn BraintreePayments.TYPE\n\t}\n\n}\n\n\nconst instance = new BraintreePayments()\nexport default instance\n\nexport type { BraintreePayment, BraintreePaymentCreate, BraintreePaymentUpdate, BraintreePaymentType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/braintree_payments.ts"],"names":[],"mappings":";;AA+GA,MAAM,0BAA0B,WAA8B,CAAA;AAAA,EAE7D,OAAgB,IAA6B,GAAA,oBAAA;AAAA,EAE7C,MAAM,MAAA,CAAO,QAAkC,EAAA,MAAA,EAAgD,OAAsD,EAAA;AACpJ,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAiD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,iBAAkB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACtI,EAEA,MAAM,MAAA,CAAO,QAAkC,EAAA,MAAA,EAAgD,OAAsD,EAAA;AACpJ,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAiD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,iBAAkB,CAAA,IAAA,EAAQ,EAAA,M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,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,iBAAkB,CAAA,IAAA;AAAA;AAC9D,EAGA,aAAa,EAAqD,EAAA;AACjE,IAAO,OAAA,KAAA,CAAM,qBAA0C,EAAE,CAAA;AAAA;AAC1D,EAEA,sBAAsB,GAAsC,EAAA;AAC3D,IAAO,OAAA,KAAA,CAAM,qBAA2C,CAAA,GAAG,GAAG,CAAA;AAAA;AAC/D,EAGA,IAA6B,GAAA;AAC5B,IAAA,OAAO,iBAAkB,CAAA,IAAA;AAAA;AAG3B;AAGA,MAAM,QAAA,GAAW,IAAI,iBAAkB,EAAA;AACvC,IAAO,0BAAQ,GAAA","file":"braintree_payments.js","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Order, OrderType } from './orders'\nimport type { PaymentGateway } from './payment_gateways'\nimport type { Version } from './versions'\n\n\ntype BraintreePaymentType = 'braintree_payments'\ntype BraintreePaymentRel = ResourceRel & { type: BraintreePaymentType }\ntype OrderRel = ResourceRel & { type: OrderType }\n\n\nexport type BraintreePaymentSort = Pick<BraintreePayment, 'id'> & ResourceSort\n// export type BraintreePaymentFilter = Pick<BraintreePayment, 'id'> & ResourceFilter\n\n\ninterface BraintreePayment extends Resource {\n\t\n\treadonly type: BraintreePaymentType\n\n\t/** \n\t * The Braintree payment client token. Required by the Braintree JS SDK.\n\t * @example ```\"xxxx.yyyy.zzzz\"```\n\t */\n\tclient_token: string\n\t/** \n\t * The Braintree payment method nonce. Sent by the Braintree JS SDK.\n\t * @example ```\"xxxx.yyyy.zzzz\"```\n\t */\n\tpayment_method_nonce?: string | null\n\t/** \n\t * The Braintree payment ID used by local payment and sent by the Braintree JS SDK.\n\t * @example ```\"xxxx.yyyy.zzzz\"```\n\t */\n\tpayment_id?: string | null\n\t/** \n\t * Indicates if the payment is local, in such case Braintree will trigger a webhook call passing the \"payment_id\" and \"payment_method_nonce\" in order to complete the transaction.\n\t * @example ```true```\n\t */\n\tlocal?: boolean | null\n\t/** \n\t * Braintree payment options, 'customer_id' and 'payment_method_token'.\n\t * @example ```{\"customer_id\":\"1234567890\"}```\n\t */\n\toptions?: Record<string, any> | null\n\t/** \n\t * Information about the payment instrument used in the transaction.\n\t * @example ```{\"issuer\":\"cl bank\",\"card_type\":\"visa\"}```\n\t */\n\tpayment_instrument?: Record<string, any> | null\n\n\torder?: Order | null\n\tpayment_gateway?: PaymentGateway | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface BraintreePaymentCreate extends ResourceCreate {\n\t\n\t/** \n\t * The Braintree payment ID used by local payment and sent by the Braintree JS SDK.\n\t * @example ```\"xxxx.yyyy.zzzz\"```\n\t */\n\tpayment_id?: string | null\n\t/** \n\t * Indicates if the payment is local, in such case Braintree will trigger a webhook call passing the \"payment_id\" and \"payment_method_nonce\" in order to complete the transaction.\n\t * @example ```true```\n\t */\n\tlocal?: boolean | null\n\t/** \n\t * Braintree payment options, 'customer_id' and 'payment_method_token'.\n\t * @example ```{\"customer_id\":\"1234567890\"}```\n\t */\n\toptions?: Record<string, any> | null\n\n\torder: OrderRel\n\n}\n\n\ninterface BraintreePaymentUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The Braintree payment method nonce. Sent by the Braintree JS SDK.\n\t * @example ```\"xxxx.yyyy.zzzz\"```\n\t */\n\tpayment_method_nonce?: string | null\n\t/** \n\t * The Braintree payment ID used by local payment and sent by the Braintree JS SDK.\n\t * @example ```\"xxxx.yyyy.zzzz\"```\n\t */\n\tpayment_id?: string | null\n\t/** \n\t * Indicates if the payment is local, in such case Braintree will trigger a webhook call passing the \"payment_id\" and \"payment_method_nonce\" in order to complete the transaction.\n\t * @example ```true```\n\t */\n\tlocal?: boolean | null\n\t/** \n\t * Braintree payment options, 'customer_id' and 'payment_method_token'.\n\t * @example ```{\"customer_id\":\"1234567890\"}```\n\t */\n\toptions?: Record<string, any> | null\n\n\torder?: OrderRel | null\n\n}\n\n\nclass BraintreePayments extends ApiResource<BraintreePayment> {\n\n\tstatic readonly TYPE: BraintreePaymentType = 'braintree_payments' as const\n\n\tasync create(resource: BraintreePaymentCreate, params?: QueryParamsRetrieve<BraintreePayment>, options?: ResourcesConfig): Promise<BraintreePayment> {\n\t\treturn this.resources.create<BraintreePaymentCreate, BraintreePayment>({ ...resource, type: BraintreePayments.TYPE }, params, options)\n\t}\n\n\tasync update(resource: BraintreePaymentUpdate, params?: QueryParamsRetrieve<BraintreePayment>, options?: ResourcesConfig): Promise<BraintreePayment> {\n\t\treturn this.resources.update<BraintreePaymentUpdate, BraintreePayment>({ ...resource, type: BraintreePayments.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: BraintreePayments.TYPE } : id, options)\n\t}\n\n\tasync order(braintreePaymentId: string | BraintreePayment, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _braintreePaymentId = (braintreePaymentId as BraintreePayment).id || braintreePaymentId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `braintree_payments/${_braintreePaymentId}/order`, params, options) as unknown as Order\n\t}\n\n\tasync payment_gateway(braintreePaymentId: string | BraintreePayment, params?: QueryParamsRetrieve<PaymentGateway>, options?: ResourcesConfig): Promise<PaymentGateway> {\n\t\tconst _braintreePaymentId = (braintreePaymentId as BraintreePayment).id || braintreePaymentId as string\n\t\treturn this.resources.fetch<PaymentGateway>({ type: 'payment_gateways' }, `braintree_payments/${_braintreePaymentId}/payment_gateway`, params, options) as unknown as PaymentGateway\n\t}\n\n\tasync versions(braintreePaymentId: string | BraintreePayment, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _braintreePaymentId = (braintreePaymentId as BraintreePayment).id || braintreePaymentId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `braintree_payments/${_braintreePaymentId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisBraintreePayment(resource: any): resource is BraintreePayment {\n\t\treturn resource.type && (resource.type === BraintreePayments.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): BraintreePaymentRel {\n\t\treturn super.relationshipOneToOne<BraintreePaymentRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): BraintreePaymentRel[] {\n\t\treturn super.relationshipOneToMany<BraintreePaymentRel>(...ids)\n\t}\n\n\n\ttype(): BraintreePaymentType {\n\t\treturn BraintreePayments.TYPE\n\t}\n\n}\n\n\nconst instance = new BraintreePayments()\nexport default instance\n\nexport type { BraintreePayments, BraintreePayment, BraintreePaymentCreate, BraintreePaymentUpdate, BraintreePaymentType }\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/resources/bundles.ts"],"names":["ApiResource"],"mappings":";;;;AAgOA,MAAM,gBAAgBA,oBAAoB,CAAA;AAAA,EAEzC,OAAgB,IAAmB,GAAA,SAAA;AAAA,EAEnC,MAAM,MAAA,CAAO,QAAwB,EAAA,MAAA,EAAsC,OAA4C,EAAA;AACtH,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA6B,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,OAAQ,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACxG,EAEA,MAAM,MAAA,CAAO,QAAwB,EAAA,MAAA,EAAsC,OAA4C,EAAA;AACtH,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA6B,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,OAAQ,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACxG,EAEA,MAAM,MAAO,CAAA,EAAA,EAAyB,OAA0C,EAAA;AA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AA;AAAA;AACrD,EAGA,IAAmB,GAAA;AAClB,IAAA,OAAO,OAAQ,CAAA,IAAA;AAAA;AAGjB;AAGA,MAAM,QAAA,GAAW,IAAI,OAAQ,EAAA;AAC7B,IAAO,eAAQ,GAAA","file":"bundles.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 { SkuList, SkuListType } from './sku_lists'\nimport type { Sku } from './skus'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Tag, TagType } from './tags'\nimport type { Version } from './versions'\n\n\ntype BundleType = 'bundles'\ntype BundleRel = ResourceRel & { type: BundleType }\ntype MarketRel = ResourceRel & { type: MarketType }\ntype SkuListRel = ResourceRel & { type: SkuListType }\ntype TagRel = ResourceRel & { type: TagType }\n\n\nexport type BundleSort = Pick<Bundle, 'id' | 'code' | 'currency_code' | 'price_amount_cents' | 'compare_at_amount_cents'> & ResourceSort\n// export type BundleFilter = Pick<Bundle, 'id' | 'code' | 'name' | 'currency_code' | 'description' | 'image_url' | 'do_not_ship' | 'do_not_track' | 'price_amount_cents' | 'compare_at_amount_cents'> & ResourceFilter\n\n\ninterface Bundle extends Resource {\n\t\n\treadonly type: BundleType\n\n\t/** \n\t * The bundle code, that uniquely identifies the bundle within the market.\n\t * @example ```\"BUNDMM000000FFFFFFXLXX\"```\n\t */\n\tcode: string\n\t/** \n\t * The internal name of the bundle.\n\t * @example ```\"Men's Black T-shirt (XL) with Black Cap and Socks, all with White Logo\"```\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 * An internal description of the bundle.\n\t * @example ```\"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\"```\n\t */\n\tdescription?: string | null\n\t/** \n\t * The URL of an image that represents the bundle.\n\t * @example ```\"https://img.yourdomain.com/bundles/xYZkjABcde.png\"```\n\t */\n\timage_url?: string | null\n\t/** \n\t * Indicates if the bundle doesn't generate shipments (all sku_list's SKUs must be do_not_ship).\n\t */\n\tdo_not_ship?: boolean | null\n\t/** \n\t * Indicates if the bundle doesn't track the stock inventory (all sku_list's SKUs must be do_not_track).\n\t */\n\tdo_not_track?: boolean | null\n\t/** \n\t * The bundle price amount for the associated market, in cents.\n\t * @example ```10000```\n\t */\n\tprice_amount_cents?: number | null\n\t/** \n\t * The bundle price amount for the associated market, float.\n\t * @example ```100```\n\t */\n\tprice_amount_float?: number | null\n\t/** \n\t * The bundle price amount for the associated market, formatted.\n\t * @example ```\"€100,00\"```\n\t */\n\tformatted_price_amount?: string | null\n\t/** \n\t * The compared price amount, in cents. Useful to display a percentage discount.\n\t * @example ```13000```\n\t */\n\tcompare_at_amount_cents?: number | null\n\t/** \n\t * The compared price amount, float.\n\t * @example ```130```\n\t */\n\tcompare_at_amount_float?: number | null\n\t/** \n\t * The compared price amount, formatted.\n\t * @example ```\"€130,00\"```\n\t */\n\tformatted_compare_at_amount?: string | null\n\t/** \n\t * The total number of SKUs in the bundle.\n\t * @example ```2```\n\t */\n\tskus_count?: number | null\n\n\tmarket?: Market | null\n\tsku_list?: SkuList | null\n\tskus?: Sku[] | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\ttags?: Tag[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface BundleCreate extends ResourceCreate {\n\t\n\t/** \n\t * The bundle code, that uniquely identifies the bundle within the market.\n\t * @example ```\"BUNDMM000000FFFFFFXLXX\"```\n\t */\n\tcode: string\n\t/** \n\t * The internal name of the bundle.\n\t * @example ```\"Men's Black T-shirt (XL) with Black Cap and Socks, all with White Logo\"```\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 * An internal description of the bundle.\n\t * @example ```\"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\"```\n\t */\n\tdescription?: string | null\n\t/** \n\t * The URL of an image that represents the bundle.\n\t * @example ```\"https://img.yourdomain.com/bundles/xYZkjABcde.png\"```\n\t */\n\timage_url?: string | null\n\t/** \n\t * The bundle price amount for the associated market, in cents.\n\t * @example ```10000```\n\t */\n\tprice_amount_cents?: number | null\n\t/** \n\t * The compared price amount, in cents. Useful to display a percentage discount.\n\t * @example ```13000```\n\t */\n\tcompare_at_amount_cents?: number | null\n\t/** \n\t * Send this attribute if you want to compute the price_amount_cents as the sum of the prices of the bundle SKUs for the market.\n\t * @example ```true```\n\t */\n\t_compute_price_amount?: boolean | null\n\t/** \n\t * Send this attribute if you want to compute the compare_at_amount_cents as the sum of the prices of the bundle SKUs for the market.\n\t * @example ```true```\n\t */\n\t_compute_compare_at_amount?: boolean | null\n\n\tmarket?: MarketRel | null\n\tsku_list: SkuListRel\n\ttags?: TagRel[] | null\n\n}\n\n\ninterface BundleUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The bundle code, that uniquely identifies the bundle within the market.\n\t * @example ```\"BUNDMM000000FFFFFFXLXX\"```\n\t */\n\tcode?: string | null\n\t/** \n\t * The internal name of the bundle.\n\t * @example ```\"Men's Black T-shirt (XL) with Black Cap and Socks, all with White Logo\"```\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 * An internal description of the bundle.\n\t * @example ```\"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\"```\n\t */\n\tdescription?: string | null\n\t/** \n\t * The URL of an image that represents the bundle.\n\t * @example ```\"https://img.yourdomain.com/bundles/xYZkjABcde.png\"```\n\t */\n\timage_url?: string | null\n\t/** \n\t * The bundle price amount for the associated market, in cents.\n\t * @example ```10000```\n\t */\n\tprice_amount_cents?: number | null\n\t/** \n\t * The compared price amount, in cents. Useful to display a percentage discount.\n\t * @example ```13000```\n\t */\n\tcompare_at_amount_cents?: number | null\n\t/** \n\t * Send this attribute if you want to compute the price_amount_cents as the sum of the prices of the bundle SKUs for the market.\n\t * @example ```true```\n\t */\n\t_compute_price_amount?: boolean | null\n\t/** \n\t * Send this attribute if you want to compute the compare_at_amount_cents as the sum of the prices of the bundle SKUs for the market.\n\t * @example ```true```\n\t */\n\t_compute_compare_at_amount?: 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\ttags?: TagRel[] | null\n\n}\n\n\nclass Bundles extends ApiResource<Bundle> {\n\n\tstatic readonly TYPE: BundleType = 'bundles' as const\n\n\tasync create(resource: BundleCreate, params?: QueryParamsRetrieve<Bundle>, options?: ResourcesConfig): Promise<Bundle> {\n\t\treturn this.resources.create<BundleCreate, Bundle>({ ...resource, type: Bundles.TYPE }, params, options)\n\t}\n\n\tasync update(resource: BundleUpdate, params?: QueryParamsRetrieve<Bundle>, options?: ResourcesConfig): Promise<Bundle> {\n\t\treturn this.resources.update<BundleUpdate, Bundle>({ ...resource, type: Bundles.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: Bundles.TYPE } : id, options)\n\t}\n\n\tasync market(bundleId: string | Bundle, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\tconst _bundleId = (bundleId as Bundle).id || bundleId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `bundles/${_bundleId}/market`, params, options) as unknown as Market\n\t}\n\n\tasync sku_list(bundleId: string | Bundle, params?: QueryParamsRetrieve<SkuList>, options?: ResourcesConfig): Promise<SkuList> {\n\t\tconst _bundleId = (bundleId as Bundle).id || bundleId as string\n\t\treturn this.resources.fetch<SkuList>({ type: 'sku_lists' }, `bundles/${_bundleId}/sku_list`, params, options) as unknown as SkuList\n\t}\n\n\tasync skus(bundleId: string | Bundle, params?: QueryParamsList<Sku>, options?: ResourcesConfig): Promise<ListResponse<Sku>> {\n\t\tconst _bundleId = (bundleId as Bundle).id || bundleId as string\n\t\treturn this.resources.fetch<Sku>({ type: 'skus' }, `bundles/${_bundleId}/skus`, params, options) as unknown as ListResponse<Sku>\n\t}\n\n\tasync attachments(bundleId: string | Bundle, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _bundleId = (bundleId as Bundle).id || bundleId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `bundles/${_bundleId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(bundleId: string | Bundle, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _bundleId = (bundleId as Bundle).id || bundleId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `bundles/${_bundleId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync tags(bundleId: string | Bundle, params?: QueryParamsList<Tag>, options?: ResourcesConfig): Promise<ListResponse<Tag>> {\n\t\tconst _bundleId = (bundleId as Bundle).id || bundleId as string\n\t\treturn this.resources.fetch<Tag>({ type: 'tags' }, `bundles/${_bundleId}/tags`, params, options) as unknown as ListResponse<Tag>\n\t}\n\n\tasync versions(bundleId: string | Bundle, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _bundleId = (bundleId as Bundle).id || bundleId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `bundles/${_bundleId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _compute_price_amount(id: string | Bundle, params?: QueryParamsRetrieve<Bundle>, options?: ResourcesConfig): Promise<Bundle> {\n\t\treturn this.resources.update<BundleUpdate, Bundle>({ id: (typeof id === 'string')? id: id.id, type: Bundles.TYPE, _compute_price_amount: true }, params, options)\n\t}\n\n\tasync _compute_compare_at_amount(id: string | Bundle, params?: QueryParamsRetrieve<Bundle>, options?: ResourcesConfig): Promise<Bundle> {\n\t\treturn this.resources.update<BundleUpdate, Bundle>({ id: (typeof id === 'string')? id: id.id, type: Bundles.TYPE, _compute_compare_at_amount: true }, params, options)\n\t}\n\n\tasync _add_tags(id: string | Bundle, triggerValue: string, params?: QueryParamsRetrieve<Bundle>, options?: ResourcesConfig): Promise<Bundle> {\n\t\treturn this.resources.update<BundleUpdate, Bundle>({ id: (typeof id === 'string')? id: id.id, type: Bundles.TYPE, _add_tags: triggerValue }, params, options)\n\t}\n\n\tasync _remove_tags(id: string | Bundle, triggerValue: string, params?: QueryParamsRetrieve<Bundle>, options?: ResourcesConfig): Promise<Bundle> {\n\t\treturn this.resources.update<BundleUpdate, Bundle>({ id: (typeof id === 'string')? id: id.id, type: Bundles.TYPE, _remove_tags: triggerValue }, params, options)\n\t}\n\n\n\tisBundle(resource: any): resource is Bundle {\n\t\treturn resource.type && (resource.type === Bundles.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): BundleRel {\n\t\treturn super.relationshipOneToOne<BundleRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): BundleRel[] {\n\t\treturn super.relationshipOneToMany<BundleRel>(...ids)\n\t}\n\n\n\ttype(): BundleType {\n\t\treturn Bundles.TYPE\n\t}\n\n}\n\n\nconst instance = new Bundles()\nexport default instance\n\nexport type { Bundle, BundleCreate, BundleUpdate, BundleType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/bundles.ts"],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,OAAO,CAAA;AAAA;AAC7J,EAEA,MAAM,YAAA,CAAa,EAAqB,EAAA,YAAA,EAAsB,QAAsC,OAA4C,EAAA;AAC/I,IAAA,OAAO,KAAK,SAAU,CAAA,MAAA,CAA6B,EAAE,EAAK,EAAA,OAAO,OAAO,QAAW,GAAA,EAAA,GAAI,EAAG,CAAA,EAAA,EAAI,MAAM,OAAQ,CAAA,IAAA,EAAM,cAAc,YAAa,EAAA,EAAG,QAAQ,OAAO,CAAA;AAAA;AAChK,EAGA,SAAS,QAAmC,EAAA;AAC3C,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,OAAQ,CAAA,IAAA;AAAA;AACpD,EAGA,aAAa,EAA2C,EAAA;AACvD,IAAO,OAAA,KAAA,CAAM,qBAAgC,EAAE,CAAA;AAAA;AAChD,EAEA,sBAAsB,GAA4B,EAAA;AACjD,IAAO,OAAA,KAAA,CAAM,qBAAiC,CAAA,GAAG,GAAG,CAAA;AAAA;AACrD,EAGA,IAAmB,GAAA;AAClB,IAAA,OAAO,OAAQ,CAAA,IAAA;AAAA;AAGjB;AAGA,MAAM,QAAA,GAAW,IAAI,OAAQ,EAAA;AAC7B,IAAO,eAAQ,GAAA","file":"bundles.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 { SkuList, SkuListType } from './sku_lists'\nimport type { Sku } from './skus'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Tag, TagType } from './tags'\nimport type { Version } from './versions'\n\n\ntype BundleType = 'bundles'\ntype BundleRel = ResourceRel & { type: BundleType }\ntype MarketRel = ResourceRel & { type: MarketType }\ntype SkuListRel = ResourceRel & { type: SkuListType }\ntype TagRel = ResourceRel & { type: TagType }\n\n\nexport type BundleSort = Pick<Bundle, 'id' | 'code' | 'currency_code' | 'price_amount_cents' | 'compare_at_amount_cents'> & ResourceSort\n// export type BundleFilter = Pick<Bundle, 'id' | 'code' | 'name' | 'currency_code' | 'description' | 'image_url' | 'do_not_ship' | 'do_not_track' | 'price_amount_cents' | 'compare_at_amount_cents'> & ResourceFilter\n\n\ninterface Bundle extends Resource {\n\t\n\treadonly type: BundleType\n\n\t/** \n\t * The bundle code, that uniquely identifies the bundle within the market.\n\t * @example ```\"BUNDMM000000FFFFFFXLXX\"```\n\t */\n\tcode: string\n\t/** \n\t * The internal name of the bundle.\n\t * @example ```\"Men's Black T-shirt (XL) with Black Cap and Socks, all with White Logo\"```\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 * An internal description of the bundle.\n\t * @example ```\"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\"```\n\t */\n\tdescription?: string | null\n\t/** \n\t * The URL of an image that represents the bundle.\n\t * @example ```\"https://img.yourdomain.com/bundles/xYZkjABcde.png\"```\n\t */\n\timage_url?: string | null\n\t/** \n\t * Indicates if the bundle doesn't generate shipments (all sku_list's SKUs must be do_not_ship).\n\t */\n\tdo_not_ship?: boolean | null\n\t/** \n\t * Indicates if the bundle doesn't track the stock inventory (all sku_list's SKUs must be do_not_track).\n\t */\n\tdo_not_track?: boolean | null\n\t/** \n\t * The bundle price amount for the associated market, in cents.\n\t * @example ```10000```\n\t */\n\tprice_amount_cents?: number | null\n\t/** \n\t * The bundle price amount for the associated market, float.\n\t * @example ```100```\n\t */\n\tprice_amount_float?: number | null\n\t/** \n\t * The bundle price amount for the associated market, formatted.\n\t * @example ```\"€100,00\"```\n\t */\n\tformatted_price_amount?: string | null\n\t/** \n\t * The compared price amount, in cents. Useful to display a percentage discount.\n\t * @example ```13000```\n\t */\n\tcompare_at_amount_cents?: number | null\n\t/** \n\t * The compared price amount, float.\n\t * @example ```130```\n\t */\n\tcompare_at_amount_float?: number | null\n\t/** \n\t * The compared price amount, formatted.\n\t * @example ```\"€130,00\"```\n\t */\n\tformatted_compare_at_amount?: string | null\n\t/** \n\t * The total number of SKUs in the bundle.\n\t * @example ```2```\n\t */\n\tskus_count?: number | null\n\n\tmarket?: Market | null\n\tsku_list?: SkuList | null\n\tskus?: Sku[] | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\ttags?: Tag[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface BundleCreate extends ResourceCreate {\n\t\n\t/** \n\t * The bundle code, that uniquely identifies the bundle within the market.\n\t * @example ```\"BUNDMM000000FFFFFFXLXX\"```\n\t */\n\tcode: string\n\t/** \n\t * The internal name of the bundle.\n\t * @example ```\"Men's Black T-shirt (XL) with Black Cap and Socks, all with White Logo\"```\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 * An internal description of the bundle.\n\t * @example ```\"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\"```\n\t */\n\tdescription?: string | null\n\t/** \n\t * The URL of an image that represents the bundle.\n\t * @example ```\"https://img.yourdomain.com/bundles/xYZkjABcde.png\"```\n\t */\n\timage_url?: string | null\n\t/** \n\t * The bundle price amount for the associated market, in cents.\n\t * @example ```10000```\n\t */\n\tprice_amount_cents?: number | null\n\t/** \n\t * The compared price amount, in cents. Useful to display a percentage discount.\n\t * @example ```13000```\n\t */\n\tcompare_at_amount_cents?: number | null\n\t/** \n\t * Send this attribute if you want to compute the price_amount_cents as the sum of the prices of the bundle SKUs for the market.\n\t * @example ```true```\n\t */\n\t_compute_price_amount?: boolean | null\n\t/** \n\t * Send this attribute if you want to compute the compare_at_amount_cents as the sum of the prices of the bundle SKUs for the market.\n\t * @example ```true```\n\t */\n\t_compute_compare_at_amount?: boolean | null\n\n\tmarket?: MarketRel | null\n\tsku_list: SkuListRel\n\ttags?: TagRel[] | null\n\n}\n\n\ninterface BundleUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The bundle code, that uniquely identifies the bundle within the market.\n\t * @example ```\"BUNDMM000000FFFFFFXLXX\"```\n\t */\n\tcode?: string | null\n\t/** \n\t * The internal name of the bundle.\n\t * @example ```\"Men's Black T-shirt (XL) with Black Cap and Socks, all with White Logo\"```\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 * An internal description of the bundle.\n\t * @example ```\"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\"```\n\t */\n\tdescription?: string | null\n\t/** \n\t * The URL of an image that represents the bundle.\n\t * @example ```\"https://img.yourdomain.com/bundles/xYZkjABcde.png\"```\n\t */\n\timage_url?: string | null\n\t/** \n\t * The bundle price amount for the associated market, in cents.\n\t * @example ```10000```\n\t */\n\tprice_amount_cents?: number | null\n\t/** \n\t * The compared price amount, in cents. Useful to display a percentage discount.\n\t * @example ```13000```\n\t */\n\tcompare_at_amount_cents?: number | null\n\t/** \n\t * Send this attribute if you want to compute the price_amount_cents as the sum of the prices of the bundle SKUs for the market.\n\t * @example ```true```\n\t */\n\t_compute_price_amount?: boolean | null\n\t/** \n\t * Send this attribute if you want to compute the compare_at_amount_cents as the sum of the prices of the bundle SKUs for the market.\n\t * @example ```true```\n\t */\n\t_compute_compare_at_amount?: 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\ttags?: TagRel[] | null\n\n}\n\n\nclass Bundles extends ApiResource<Bundle> {\n\n\tstatic readonly TYPE: BundleType = 'bundles' as const\n\n\tasync create(resource: BundleCreate, params?: QueryParamsRetrieve<Bundle>, options?: ResourcesConfig): Promise<Bundle> {\n\t\treturn this.resources.create<BundleCreate, Bundle>({ ...resource, type: Bundles.TYPE }, params, options)\n\t}\n\n\tasync update(resource: BundleUpdate, params?: QueryParamsRetrieve<Bundle>, options?: ResourcesConfig): Promise<Bundle> {\n\t\treturn this.resources.update<BundleUpdate, Bundle>({ ...resource, type: Bundles.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: Bundles.TYPE } : id, options)\n\t}\n\n\tasync market(bundleId: string | Bundle, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\tconst _bundleId = (bundleId as Bundle).id || bundleId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `bundles/${_bundleId}/market`, params, options) as unknown as Market\n\t}\n\n\tasync sku_list(bundleId: string | Bundle, params?: QueryParamsRetrieve<SkuList>, options?: ResourcesConfig): Promise<SkuList> {\n\t\tconst _bundleId = (bundleId as Bundle).id || bundleId as string\n\t\treturn this.resources.fetch<SkuList>({ type: 'sku_lists' }, `bundles/${_bundleId}/sku_list`, params, options) as unknown as SkuList\n\t}\n\n\tasync skus(bundleId: string | Bundle, params?: QueryParamsList<Sku>, options?: ResourcesConfig): Promise<ListResponse<Sku>> {\n\t\tconst _bundleId = (bundleId as Bundle).id || bundleId as string\n\t\treturn this.resources.fetch<Sku>({ type: 'skus' }, `bundles/${_bundleId}/skus`, params, options) as unknown as ListResponse<Sku>\n\t}\n\n\tasync attachments(bundleId: string | Bundle, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _bundleId = (bundleId as Bundle).id || bundleId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `bundles/${_bundleId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(bundleId: string | Bundle, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _bundleId = (bundleId as Bundle).id || bundleId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `bundles/${_bundleId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync tags(bundleId: string | Bundle, params?: QueryParamsList<Tag>, options?: ResourcesConfig): Promise<ListResponse<Tag>> {\n\t\tconst _bundleId = (bundleId as Bundle).id || bundleId as string\n\t\treturn this.resources.fetch<Tag>({ type: 'tags' }, `bundles/${_bundleId}/tags`, params, options) as unknown as ListResponse<Tag>\n\t}\n\n\tasync versions(bundleId: string | Bundle, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _bundleId = (bundleId as Bundle).id || bundleId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `bundles/${_bundleId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _compute_price_amount(id: string | Bundle, params?: QueryParamsRetrieve<Bundle>, options?: ResourcesConfig): Promise<Bundle> {\n\t\treturn this.resources.update<BundleUpdate, Bundle>({ id: (typeof id === 'string')? id: id.id, type: Bundles.TYPE, _compute_price_amount: true }, params, options)\n\t}\n\n\tasync _compute_compare_at_amount(id: string | Bundle, params?: QueryParamsRetrieve<Bundle>, options?: ResourcesConfig): Promise<Bundle> {\n\t\treturn this.resources.update<BundleUpdate, Bundle>({ id: (typeof id === 'string')? id: id.id, type: Bundles.TYPE, _compute_compare_at_amount: true }, params, options)\n\t}\n\n\tasync _add_tags(id: string | Bundle, triggerValue: string, params?: QueryParamsRetrieve<Bundle>, options?: ResourcesConfig): Promise<Bundle> {\n\t\treturn this.resources.update<BundleUpdate, Bundle>({ id: (typeof id === 'string')? id: id.id, type: Bundles.TYPE, _add_tags: triggerValue }, params, options)\n\t}\n\n\tasync _remove_tags(id: string | Bundle, triggerValue: string, params?: QueryParamsRetrieve<Bundle>, options?: ResourcesConfig): Promise<Bundle> {\n\t\treturn this.resources.update<BundleUpdate, Bundle>({ id: (typeof id === 'string')? id: id.id, type: Bundles.TYPE, _remove_tags: triggerValue }, params, options)\n\t}\n\n\n\tisBundle(resource: any): resource is Bundle {\n\t\treturn resource.type && (resource.type === Bundles.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): BundleRel {\n\t\treturn super.relationshipOneToOne<BundleRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): BundleRel[] {\n\t\treturn super.relationshipOneToMany<BundleRel>(...ids)\n\t}\n\n\n\ttype(): BundleType {\n\t\treturn Bundles.TYPE\n\t}\n\n}\n\n\nconst instance = new Bundles()\nexport default instance\n\nexport type { Bundles, Bundle, BundleCreate, BundleUpdate, BundleType }\n"]}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { eD as Bundle, eE as BundleCreate, eG as BundleSort, mb as BundleType, eF as BundleUpdate, aa as Bundles, a9 as default } from '../api-IwWtsAqE.cjs';
|
2
2
|
import '../client.cjs';
|
3
|
-
import '../interceptor-
|
3
|
+
import '../interceptor-k15jXzf0.cjs';
|
4
4
|
import '../types.cjs';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { eD as Bundle, eE as BundleCreate, eG as BundleSort, mb as BundleType, eF as BundleUpdate, aa as Bundles, a9 as default } from '../api-F1F37Dud.js';
|
2
2
|
import '../client.js';
|
3
|
-
import '../interceptor-
|
3
|
+
import '../interceptor-k15jXzf0.js';
|
4
4
|
import '../types.js';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/resources/bundles.ts"],"names":[],"mappings":";;AAgOA,MAAM,gBAAgB,WAAoB,CAAA;AAAA,EAEzC,OAAgB,IAAmB,GAAA,SAAA;AAAA,EAEnC,MAAM,MAAA,CAAO,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A,MAAA,CAA6B,EAAE,EAAK,EAAA,OAAO,OAAO,QAAW,GAAA,EAAA,GAAI,EAAG,CAAA,EAAA,EAAI,MAAM,OAAQ,CAAA,IAAA,EAAM,cAAc,YAAa,EAAA,EAAG,QAAQ,OAAO,CAAA;AAAA;AAChK,EAGA,SAAS,QAAmC,EAAA;AAC3C,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,OAAQ,CAAA,IAAA;AAAA;AACpD,EAGA,aAAa,EAA2C,EAAA;AACvD,IAAO,OAAA,KAAA,CAAM,qBAAgC,EAAE,CAAA;AAAA;AAChD,EAEA,sBAAsB,GAA4B,EAAA;AACjD,IAAO,OAAA,KAAA,CAAM,qBAAiC,CAAA,GAAG,GAAG,CAAA;AAAA;AACrD,EAGA,IAAmB,GAAA;AAClB,IAAA,OAAO,OAAQ,CAAA,IAAA;AAAA;AAGjB;AAGA,MAAM,QAAA,GAAW,IAAI,OAAQ,EAAA;AAC7B,IAAO,eAAQ,GAAA","file":"bundles.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 { SkuList, SkuListType } from './sku_lists'\nimport type { Sku } from './skus'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Tag, TagType } from './tags'\nimport type { Version } from './versions'\n\n\ntype BundleType = 'bundles'\ntype BundleRel = ResourceRel & { type: BundleType }\ntype MarketRel = ResourceRel & { type: MarketType }\ntype SkuListRel = ResourceRel & { type: SkuListType }\ntype TagRel = ResourceRel & { type: TagType }\n\n\nexport type BundleSort = Pick<Bundle, 'id' | 'code' | 'currency_code' | 'price_amount_cents' | 'compare_at_amount_cents'> & ResourceSort\n// export type BundleFilter = Pick<Bundle, 'id' | 'code' | 'name' | 'currency_code' | 'description' | 'image_url' | 'do_not_ship' | 'do_not_track' | 'price_amount_cents' | 'compare_at_amount_cents'> & ResourceFilter\n\n\ninterface Bundle extends Resource {\n\t\n\treadonly type: BundleType\n\n\t/** \n\t * The bundle code, that uniquely identifies the bundle within the market.\n\t * @example ```\"BUNDMM000000FFFFFFXLXX\"```\n\t */\n\tcode: string\n\t/** \n\t * The internal name of the bundle.\n\t * @example ```\"Men's Black T-shirt (XL) with Black Cap and Socks, all with White Logo\"```\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 * An internal description of the bundle.\n\t * @example ```\"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\"```\n\t */\n\tdescription?: string | null\n\t/** \n\t * The URL of an image that represents the bundle.\n\t * @example ```\"https://img.yourdomain.com/bundles/xYZkjABcde.png\"```\n\t */\n\timage_url?: string | null\n\t/** \n\t * Indicates if the bundle doesn't generate shipments (all sku_list's SKUs must be do_not_ship).\n\t */\n\tdo_not_ship?: boolean | null\n\t/** \n\t * Indicates if the bundle doesn't track the stock inventory (all sku_list's SKUs must be do_not_track).\n\t */\n\tdo_not_track?: boolean | null\n\t/** \n\t * The bundle price amount for the associated market, in cents.\n\t * @example ```10000```\n\t */\n\tprice_amount_cents?: number | null\n\t/** \n\t * The bundle price amount for the associated market, float.\n\t * @example ```100```\n\t */\n\tprice_amount_float?: number | null\n\t/** \n\t * The bundle price amount for the associated market, formatted.\n\t * @example ```\"€100,00\"```\n\t */\n\tformatted_price_amount?: string | null\n\t/** \n\t * The compared price amount, in cents. Useful to display a percentage discount.\n\t * @example ```13000```\n\t */\n\tcompare_at_amount_cents?: number | null\n\t/** \n\t * The compared price amount, float.\n\t * @example ```130```\n\t */\n\tcompare_at_amount_float?: number | null\n\t/** \n\t * The compared price amount, formatted.\n\t * @example ```\"€130,00\"```\n\t */\n\tformatted_compare_at_amount?: string | null\n\t/** \n\t * The total number of SKUs in the bundle.\n\t * @example ```2```\n\t */\n\tskus_count?: number | null\n\n\tmarket?: Market | null\n\tsku_list?: SkuList | null\n\tskus?: Sku[] | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\ttags?: Tag[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface BundleCreate extends ResourceCreate {\n\t\n\t/** \n\t * The bundle code, that uniquely identifies the bundle within the market.\n\t * @example ```\"BUNDMM000000FFFFFFXLXX\"```\n\t */\n\tcode: string\n\t/** \n\t * The internal name of the bundle.\n\t * @example ```\"Men's Black T-shirt (XL) with Black Cap and Socks, all with White Logo\"```\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 * An internal description of the bundle.\n\t * @example ```\"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\"```\n\t */\n\tdescription?: string | null\n\t/** \n\t * The URL of an image that represents the bundle.\n\t * @example ```\"https://img.yourdomain.com/bundles/xYZkjABcde.png\"```\n\t */\n\timage_url?: string | null\n\t/** \n\t * The bundle price amount for the associated market, in cents.\n\t * @example ```10000```\n\t */\n\tprice_amount_cents?: number | null\n\t/** \n\t * The compared price amount, in cents. Useful to display a percentage discount.\n\t * @example ```13000```\n\t */\n\tcompare_at_amount_cents?: number | null\n\t/** \n\t * Send this attribute if you want to compute the price_amount_cents as the sum of the prices of the bundle SKUs for the market.\n\t * @example ```true```\n\t */\n\t_compute_price_amount?: boolean | null\n\t/** \n\t * Send this attribute if you want to compute the compare_at_amount_cents as the sum of the prices of the bundle SKUs for the market.\n\t * @example ```true```\n\t */\n\t_compute_compare_at_amount?: boolean | null\n\n\tmarket?: MarketRel | null\n\tsku_list: SkuListRel\n\ttags?: TagRel[] | null\n\n}\n\n\ninterface BundleUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The bundle code, that uniquely identifies the bundle within the market.\n\t * @example ```\"BUNDMM000000FFFFFFXLXX\"```\n\t */\n\tcode?: string | null\n\t/** \n\t * The internal name of the bundle.\n\t * @example ```\"Men's Black T-shirt (XL) with Black Cap and Socks, all with White Logo\"```\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 * An internal description of the bundle.\n\t * @example ```\"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\"```\n\t */\n\tdescription?: string | null\n\t/** \n\t * The URL of an image that represents the bundle.\n\t * @example ```\"https://img.yourdomain.com/bundles/xYZkjABcde.png\"```\n\t */\n\timage_url?: string | null\n\t/** \n\t * The bundle price amount for the associated market, in cents.\n\t * @example ```10000```\n\t */\n\tprice_amount_cents?: number | null\n\t/** \n\t * The compared price amount, in cents. Useful to display a percentage discount.\n\t * @example ```13000```\n\t */\n\tcompare_at_amount_cents?: number | null\n\t/** \n\t * Send this attribute if you want to compute the price_amount_cents as the sum of the prices of the bundle SKUs for the market.\n\t * @example ```true```\n\t */\n\t_compute_price_amount?: boolean | null\n\t/** \n\t * Send this attribute if you want to compute the compare_at_amount_cents as the sum of the prices of the bundle SKUs for the market.\n\t * @example ```true```\n\t */\n\t_compute_compare_at_amount?: 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\ttags?: TagRel[] | null\n\n}\n\n\nclass Bundles extends ApiResource<Bundle> {\n\n\tstatic readonly TYPE: BundleType = 'bundles' as const\n\n\tasync create(resource: BundleCreate, params?: QueryParamsRetrieve<Bundle>, options?: ResourcesConfig): Promise<Bundle> {\n\t\treturn this.resources.create<BundleCreate, Bundle>({ ...resource, type: Bundles.TYPE }, params, options)\n\t}\n\n\tasync update(resource: BundleUpdate, params?: QueryParamsRetrieve<Bundle>, options?: ResourcesConfig): Promise<Bundle> {\n\t\treturn this.resources.update<BundleUpdate, Bundle>({ ...resource, type: Bundles.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: Bundles.TYPE } : id, options)\n\t}\n\n\tasync market(bundleId: string | Bundle, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\tconst _bundleId = (bundleId as Bundle).id || bundleId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `bundles/${_bundleId}/market`, params, options) as unknown as Market\n\t}\n\n\tasync sku_list(bundleId: string | Bundle, params?: QueryParamsRetrieve<SkuList>, options?: ResourcesConfig): Promise<SkuList> {\n\t\tconst _bundleId = (bundleId as Bundle).id || bundleId as string\n\t\treturn this.resources.fetch<SkuList>({ type: 'sku_lists' }, `bundles/${_bundleId}/sku_list`, params, options) as unknown as SkuList\n\t}\n\n\tasync skus(bundleId: string | Bundle, params?: QueryParamsList<Sku>, options?: ResourcesConfig): Promise<ListResponse<Sku>> {\n\t\tconst _bundleId = (bundleId as Bundle).id || bundleId as string\n\t\treturn this.resources.fetch<Sku>({ type: 'skus' }, `bundles/${_bundleId}/skus`, params, options) as unknown as ListResponse<Sku>\n\t}\n\n\tasync attachments(bundleId: string | Bundle, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _bundleId = (bundleId as Bundle).id || bundleId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `bundles/${_bundleId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(bundleId: string | Bundle, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _bundleId = (bundleId as Bundle).id || bundleId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `bundles/${_bundleId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync tags(bundleId: string | Bundle, params?: QueryParamsList<Tag>, options?: ResourcesConfig): Promise<ListResponse<Tag>> {\n\t\tconst _bundleId = (bundleId as Bundle).id || bundleId as string\n\t\treturn this.resources.fetch<Tag>({ type: 'tags' }, `bundles/${_bundleId}/tags`, params, options) as unknown as ListResponse<Tag>\n\t}\n\n\tasync versions(bundleId: string | Bundle, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _bundleId = (bundleId as Bundle).id || bundleId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `bundles/${_bundleId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _compute_price_amount(id: string | Bundle, params?: QueryParamsRetrieve<Bundle>, options?: ResourcesConfig): Promise<Bundle> {\n\t\treturn this.resources.update<BundleUpdate, Bundle>({ id: (typeof id === 'string')? id: id.id, type: Bundles.TYPE, _compute_price_amount: true }, params, options)\n\t}\n\n\tasync _compute_compare_at_amount(id: string | Bundle, params?: QueryParamsRetrieve<Bundle>, options?: ResourcesConfig): Promise<Bundle> {\n\t\treturn this.resources.update<BundleUpdate, Bundle>({ id: (typeof id === 'string')? id: id.id, type: Bundles.TYPE, _compute_compare_at_amount: true }, params, options)\n\t}\n\n\tasync _add_tags(id: string | Bundle, triggerValue: string, params?: QueryParamsRetrieve<Bundle>, options?: ResourcesConfig): Promise<Bundle> {\n\t\treturn this.resources.update<BundleUpdate, Bundle>({ id: (typeof id === 'string')? id: id.id, type: Bundles.TYPE, _add_tags: triggerValue }, params, options)\n\t}\n\n\tasync _remove_tags(id: string | Bundle, triggerValue: string, params?: QueryParamsRetrieve<Bundle>, options?: ResourcesConfig): Promise<Bundle> {\n\t\treturn this.resources.update<BundleUpdate, Bundle>({ id: (typeof id === 'string')? id: id.id, type: Bundles.TYPE, _remove_tags: triggerValue }, params, options)\n\t}\n\n\n\tisBundle(resource: any): resource is Bundle {\n\t\treturn resource.type && (resource.type === Bundles.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): BundleRel {\n\t\treturn super.relationshipOneToOne<BundleRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): BundleRel[] {\n\t\treturn super.relationshipOneToMany<BundleRel>(...ids)\n\t}\n\n\n\ttype(): BundleType {\n\t\treturn Bundles.TYPE\n\t}\n\n}\n\n\nconst instance = new Bundles()\nexport default instance\n\nexport type { Bundle, BundleCreate, BundleUpdate, BundleType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/bundles.ts"],"names":[],"mappings":";;AAgOA,MAAM,gBAAgB,WAAoB,CAAA;AAAA,EAEzC,OAAgB,IAAmB,GAAA,SAAA;AAAA,EAEnC,MAAM,MAAA,CAAO,QAAwB,EAAA,MAAA,EAAsC,OAA4C,EAAA;AACtH,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA6B,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,OAAQ,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACxG,EAEA,MAAM,MAAA,CAAO,QAAwB,EAAA,MAAA,EAAsC,OAA4C,EAAA;AACtH,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA6B,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,OAAQ,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACxG,EAEA,MAAM,MAAO,CAAA,EAAA,EAAyB,OAA0C,EAAA;AAC/E,IAAA,MAAM,IAAK,CAAA,SAAA,CAAU,MAAQ,CAAA,OAAO,EAAO,KAAA,QAAA,GAAW,EAAE,EAAA,EAAI,IAAM,EAAA,OAAA,CAAQ,IAAK,EAAA,GAAI,IAAI,OAAO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":"bundles.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 { SkuList, SkuListType } from './sku_lists'\nimport type { Sku } from './skus'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Tag, TagType } from './tags'\nimport type { Version } from './versions'\n\n\ntype BundleType = 'bundles'\ntype BundleRel = ResourceRel & { type: BundleType }\ntype MarketRel = ResourceRel & { type: MarketType }\ntype SkuListRel = ResourceRel & { type: SkuListType }\ntype TagRel = ResourceRel & { type: TagType }\n\n\nexport type BundleSort = Pick<Bundle, 'id' | 'code' | 'currency_code' | 'price_amount_cents' | 'compare_at_amount_cents'> & ResourceSort\n// export type BundleFilter = Pick<Bundle, 'id' | 'code' | 'name' | 'currency_code' | 'description' | 'image_url' | 'do_not_ship' | 'do_not_track' | 'price_amount_cents' | 'compare_at_amount_cents'> & ResourceFilter\n\n\ninterface Bundle extends Resource {\n\t\n\treadonly type: BundleType\n\n\t/** \n\t * The bundle code, that uniquely identifies the bundle within the market.\n\t * @example ```\"BUNDMM000000FFFFFFXLXX\"```\n\t */\n\tcode: string\n\t/** \n\t * The internal name of the bundle.\n\t * @example ```\"Men's Black T-shirt (XL) with Black Cap and Socks, all with White Logo\"```\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 * An internal description of the bundle.\n\t * @example ```\"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\"```\n\t */\n\tdescription?: string | null\n\t/** \n\t * The URL of an image that represents the bundle.\n\t * @example ```\"https://img.yourdomain.com/bundles/xYZkjABcde.png\"```\n\t */\n\timage_url?: string | null\n\t/** \n\t * Indicates if the bundle doesn't generate shipments (all sku_list's SKUs must be do_not_ship).\n\t */\n\tdo_not_ship?: boolean | null\n\t/** \n\t * Indicates if the bundle doesn't track the stock inventory (all sku_list's SKUs must be do_not_track).\n\t */\n\tdo_not_track?: boolean | null\n\t/** \n\t * The bundle price amount for the associated market, in cents.\n\t * @example ```10000```\n\t */\n\tprice_amount_cents?: number | null\n\t/** \n\t * The bundle price amount for the associated market, float.\n\t * @example ```100```\n\t */\n\tprice_amount_float?: number | null\n\t/** \n\t * The bundle price amount for the associated market, formatted.\n\t * @example ```\"€100,00\"```\n\t */\n\tformatted_price_amount?: string | null\n\t/** \n\t * The compared price amount, in cents. Useful to display a percentage discount.\n\t * @example ```13000```\n\t */\n\tcompare_at_amount_cents?: number | null\n\t/** \n\t * The compared price amount, float.\n\t * @example ```130```\n\t */\n\tcompare_at_amount_float?: number | null\n\t/** \n\t * The compared price amount, formatted.\n\t * @example ```\"€130,00\"```\n\t */\n\tformatted_compare_at_amount?: string | null\n\t/** \n\t * The total number of SKUs in the bundle.\n\t * @example ```2```\n\t */\n\tskus_count?: number | null\n\n\tmarket?: Market | null\n\tsku_list?: SkuList | null\n\tskus?: Sku[] | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\ttags?: Tag[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface BundleCreate extends ResourceCreate {\n\t\n\t/** \n\t * The bundle code, that uniquely identifies the bundle within the market.\n\t * @example ```\"BUNDMM000000FFFFFFXLXX\"```\n\t */\n\tcode: string\n\t/** \n\t * The internal name of the bundle.\n\t * @example ```\"Men's Black T-shirt (XL) with Black Cap and Socks, all with White Logo\"```\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 * An internal description of the bundle.\n\t * @example ```\"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\"```\n\t */\n\tdescription?: string | null\n\t/** \n\t * The URL of an image that represents the bundle.\n\t * @example ```\"https://img.yourdomain.com/bundles/xYZkjABcde.png\"```\n\t */\n\timage_url?: string | null\n\t/** \n\t * The bundle price amount for the associated market, in cents.\n\t * @example ```10000```\n\t */\n\tprice_amount_cents?: number | null\n\t/** \n\t * The compared price amount, in cents. Useful to display a percentage discount.\n\t * @example ```13000```\n\t */\n\tcompare_at_amount_cents?: number | null\n\t/** \n\t * Send this attribute if you want to compute the price_amount_cents as the sum of the prices of the bundle SKUs for the market.\n\t * @example ```true```\n\t */\n\t_compute_price_amount?: boolean | null\n\t/** \n\t * Send this attribute if you want to compute the compare_at_amount_cents as the sum of the prices of the bundle SKUs for the market.\n\t * @example ```true```\n\t */\n\t_compute_compare_at_amount?: boolean | null\n\n\tmarket?: MarketRel | null\n\tsku_list: SkuListRel\n\ttags?: TagRel[] | null\n\n}\n\n\ninterface BundleUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The bundle code, that uniquely identifies the bundle within the market.\n\t * @example ```\"BUNDMM000000FFFFFFXLXX\"```\n\t */\n\tcode?: string | null\n\t/** \n\t * The internal name of the bundle.\n\t * @example ```\"Men's Black T-shirt (XL) with Black Cap and Socks, all with White Logo\"```\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 * An internal description of the bundle.\n\t * @example ```\"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\"```\n\t */\n\tdescription?: string | null\n\t/** \n\t * The URL of an image that represents the bundle.\n\t * @example ```\"https://img.yourdomain.com/bundles/xYZkjABcde.png\"```\n\t */\n\timage_url?: string | null\n\t/** \n\t * The bundle price amount for the associated market, in cents.\n\t * @example ```10000```\n\t */\n\tprice_amount_cents?: number | null\n\t/** \n\t * The compared price amount, in cents. Useful to display a percentage discount.\n\t * @example ```13000```\n\t */\n\tcompare_at_amount_cents?: number | null\n\t/** \n\t * Send this attribute if you want to compute the price_amount_cents as the sum of the prices of the bundle SKUs for the market.\n\t * @example ```true```\n\t */\n\t_compute_price_amount?: boolean | null\n\t/** \n\t * Send this attribute if you want to compute the compare_at_amount_cents as the sum of the prices of the bundle SKUs for the market.\n\t * @example ```true```\n\t */\n\t_compute_compare_at_amount?: 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\ttags?: TagRel[] | null\n\n}\n\n\nclass Bundles extends ApiResource<Bundle> {\n\n\tstatic readonly TYPE: BundleType = 'bundles' as const\n\n\tasync create(resource: BundleCreate, params?: QueryParamsRetrieve<Bundle>, options?: ResourcesConfig): Promise<Bundle> {\n\t\treturn this.resources.create<BundleCreate, Bundle>({ ...resource, type: Bundles.TYPE }, params, options)\n\t}\n\n\tasync update(resource: BundleUpdate, params?: QueryParamsRetrieve<Bundle>, options?: ResourcesConfig): Promise<Bundle> {\n\t\treturn this.resources.update<BundleUpdate, Bundle>({ ...resource, type: Bundles.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: Bundles.TYPE } : id, options)\n\t}\n\n\tasync market(bundleId: string | Bundle, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\tconst _bundleId = (bundleId as Bundle).id || bundleId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `bundles/${_bundleId}/market`, params, options) as unknown as Market\n\t}\n\n\tasync sku_list(bundleId: string | Bundle, params?: QueryParamsRetrieve<SkuList>, options?: ResourcesConfig): Promise<SkuList> {\n\t\tconst _bundleId = (bundleId as Bundle).id || bundleId as string\n\t\treturn this.resources.fetch<SkuList>({ type: 'sku_lists' }, `bundles/${_bundleId}/sku_list`, params, options) as unknown as SkuList\n\t}\n\n\tasync skus(bundleId: string | Bundle, params?: QueryParamsList<Sku>, options?: ResourcesConfig): Promise<ListResponse<Sku>> {\n\t\tconst _bundleId = (bundleId as Bundle).id || bundleId as string\n\t\treturn this.resources.fetch<Sku>({ type: 'skus' }, `bundles/${_bundleId}/skus`, params, options) as unknown as ListResponse<Sku>\n\t}\n\n\tasync attachments(bundleId: string | Bundle, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _bundleId = (bundleId as Bundle).id || bundleId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `bundles/${_bundleId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(bundleId: string | Bundle, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _bundleId = (bundleId as Bundle).id || bundleId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `bundles/${_bundleId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync tags(bundleId: string | Bundle, params?: QueryParamsList<Tag>, options?: ResourcesConfig): Promise<ListResponse<Tag>> {\n\t\tconst _bundleId = (bundleId as Bundle).id || bundleId as string\n\t\treturn this.resources.fetch<Tag>({ type: 'tags' }, `bundles/${_bundleId}/tags`, params, options) as unknown as ListResponse<Tag>\n\t}\n\n\tasync versions(bundleId: string | Bundle, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _bundleId = (bundleId as Bundle).id || bundleId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `bundles/${_bundleId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _compute_price_amount(id: string | Bundle, params?: QueryParamsRetrieve<Bundle>, options?: ResourcesConfig): Promise<Bundle> {\n\t\treturn this.resources.update<BundleUpdate, Bundle>({ id: (typeof id === 'string')? id: id.id, type: Bundles.TYPE, _compute_price_amount: true }, params, options)\n\t}\n\n\tasync _compute_compare_at_amount(id: string | Bundle, params?: QueryParamsRetrieve<Bundle>, options?: ResourcesConfig): Promise<Bundle> {\n\t\treturn this.resources.update<BundleUpdate, Bundle>({ id: (typeof id === 'string')? id: id.id, type: Bundles.TYPE, _compute_compare_at_amount: true }, params, options)\n\t}\n\n\tasync _add_tags(id: string | Bundle, triggerValue: string, params?: QueryParamsRetrieve<Bundle>, options?: ResourcesConfig): Promise<Bundle> {\n\t\treturn this.resources.update<BundleUpdate, Bundle>({ id: (typeof id === 'string')? id: id.id, type: Bundles.TYPE, _add_tags: triggerValue }, params, options)\n\t}\n\n\tasync _remove_tags(id: string | Bundle, triggerValue: string, params?: QueryParamsRetrieve<Bundle>, options?: ResourcesConfig): Promise<Bundle> {\n\t\treturn this.resources.update<BundleUpdate, Bundle>({ id: (typeof id === 'string')? id: id.id, type: Bundles.TYPE, _remove_tags: triggerValue }, params, options)\n\t}\n\n\n\tisBundle(resource: any): resource is Bundle {\n\t\treturn resource.type && (resource.type === Bundles.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): BundleRel {\n\t\treturn super.relationshipOneToOne<BundleRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): BundleRel[] {\n\t\treturn super.relationshipOneToMany<BundleRel>(...ids)\n\t}\n\n\n\ttype(): BundleType {\n\t\treturn Bundles.TYPE\n\t}\n\n}\n\n\nconst instance = new Bundles()\nexport default instance\n\nexport type { Bundles, Bundle, BundleCreate, BundleUpdate, BundleType }\n"]}
|