@commercelayer/sdk 7.0.0-rc.3 → 7.0.0-rc.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/lib/{api-DDgIE2i8.d.ts → api-F1F37Dud.d.ts} +27 -8
- package/lib/{api-DmIZO_Np.d.cts → api-IwWtsAqE.d.cts} +27 -8
- package/lib/api.d.cts +1 -1
- package/lib/api.d.ts +1 -1
- package/lib/bundle.cjs +568 -0
- package/lib/bundle.cjs.map +1 -0
- package/lib/bundle.d.cts +145 -0
- package/lib/bundle.d.ts +145 -0
- package/lib/bundle.js +546 -0
- package/lib/bundle.js.map +1 -0
- package/lib/commercelayer.cjs +2 -1
- package/lib/commercelayer.cjs.map +1 -1
- package/lib/commercelayer.d.cts +4 -4
- package/lib/commercelayer.d.ts +4 -4
- package/lib/commercelayer.js +2 -2
- package/lib/commercelayer.js.map +1 -1
- package/lib/enum.d.cts +1 -1
- package/lib/enum.d.ts +1 -1
- package/lib/index.d.cts +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/jsonapi.d.cts +1 -1
- package/lib/jsonapi.d.ts +1 -1
- package/lib/model.d.cts +1 -1
- package/lib/model.d.ts +1 -1
- package/lib/query.d.cts +1 -1
- package/lib/query.d.ts +1 -1
- package/lib/resource.cjs +7 -6
- package/lib/resource.cjs.map +1 -1
- package/lib/resource.d.cts +1 -1
- package/lib/resource.d.ts +1 -1
- package/lib/resource.js +7 -6
- package/lib/resource.js.map +1 -1
- package/lib/resources/addresses.cjs.map +1 -1
- package/lib/resources/addresses.d.cts +1 -1
- package/lib/resources/addresses.d.ts +1 -1
- package/lib/resources/addresses.js.map +1 -1
- package/lib/resources/adjustments.cjs.map +1 -1
- package/lib/resources/adjustments.d.cts +1 -1
- package/lib/resources/adjustments.d.ts +1 -1
- package/lib/resources/adjustments.js.map +1 -1
- package/lib/resources/adyen_gateways.cjs.map +1 -1
- package/lib/resources/adyen_gateways.d.cts +1 -1
- package/lib/resources/adyen_gateways.d.ts +1 -1
- package/lib/resources/adyen_gateways.js.map +1 -1
- package/lib/resources/adyen_payments.cjs.map +1 -1
- package/lib/resources/adyen_payments.d.cts +1 -1
- package/lib/resources/adyen_payments.d.ts +1 -1
- package/lib/resources/adyen_payments.js.map +1 -1
- package/lib/resources/applications.cjs.map +1 -1
- package/lib/resources/applications.d.cts +1 -1
- package/lib/resources/applications.d.ts +1 -1
- package/lib/resources/applications.js.map +1 -1
- package/lib/resources/attachments.cjs.map +1 -1
- package/lib/resources/attachments.d.cts +1 -1
- package/lib/resources/attachments.d.ts +1 -1
- package/lib/resources/attachments.js.map +1 -1
- package/lib/resources/authorizations.cjs.map +1 -1
- package/lib/resources/authorizations.d.cts +1 -1
- package/lib/resources/authorizations.d.ts +1 -1
- package/lib/resources/authorizations.js.map +1 -1
- package/lib/resources/avalara_accounts.cjs.map +1 -1
- package/lib/resources/avalara_accounts.d.cts +1 -1
- package/lib/resources/avalara_accounts.d.ts +1 -1
- package/lib/resources/avalara_accounts.js.map +1 -1
- package/lib/resources/axerve_gateways.cjs.map +1 -1
- package/lib/resources/axerve_gateways.d.cts +1 -1
- package/lib/resources/axerve_gateways.d.ts +1 -1
- package/lib/resources/axerve_gateways.js.map +1 -1
- package/lib/resources/axerve_payments.cjs.map +1 -1
- package/lib/resources/axerve_payments.d.cts +1 -1
- package/lib/resources/axerve_payments.d.ts +1 -1
- package/lib/resources/axerve_payments.js.map +1 -1
- package/lib/resources/bing_geocoders.cjs.map +1 -1
- package/lib/resources/bing_geocoders.d.cts +1 -1
- package/lib/resources/bing_geocoders.d.ts +1 -1
- package/lib/resources/bing_geocoders.js.map +1 -1
- package/lib/resources/braintree_gateways.cjs.map +1 -1
- package/lib/resources/braintree_gateways.d.cts +1 -1
- package/lib/resources/braintree_gateways.d.ts +1 -1
- package/lib/resources/braintree_gateways.js.map +1 -1
- package/lib/resources/braintree_payments.cjs.map +1 -1
- package/lib/resources/braintree_payments.d.cts +1 -1
- package/lib/resources/braintree_payments.d.ts +1 -1
- package/lib/resources/braintree_payments.js.map +1 -1
- package/lib/resources/bundles.cjs.map +1 -1
- package/lib/resources/bundles.d.cts +1 -1
- package/lib/resources/bundles.d.ts +1 -1
- package/lib/resources/bundles.js.map +1 -1
- package/lib/resources/buy_x_pay_y_promotions.cjs.map +1 -1
- package/lib/resources/buy_x_pay_y_promotions.d.cts +1 -1
- package/lib/resources/buy_x_pay_y_promotions.d.ts +1 -1
- package/lib/resources/buy_x_pay_y_promotions.js.map +1 -1
- package/lib/resources/captures.cjs.map +1 -1
- package/lib/resources/captures.d.cts +1 -1
- package/lib/resources/captures.d.ts +1 -1
- package/lib/resources/captures.js.map +1 -1
- package/lib/resources/carrier_accounts.cjs.map +1 -1
- package/lib/resources/carrier_accounts.d.cts +1 -1
- package/lib/resources/carrier_accounts.d.ts +1 -1
- package/lib/resources/carrier_accounts.js.map +1 -1
- package/lib/resources/checkout_com_gateways.cjs.map +1 -1
- package/lib/resources/checkout_com_gateways.d.cts +1 -1
- package/lib/resources/checkout_com_gateways.d.ts +1 -1
- package/lib/resources/checkout_com_gateways.js.map +1 -1
- package/lib/resources/checkout_com_payments.cjs.map +1 -1
- package/lib/resources/checkout_com_payments.d.cts +1 -1
- package/lib/resources/checkout_com_payments.d.ts +1 -1
- package/lib/resources/checkout_com_payments.js.map +1 -1
- package/lib/resources/cleanups.cjs.map +1 -1
- package/lib/resources/cleanups.d.cts +1 -1
- package/lib/resources/cleanups.d.ts +1 -1
- package/lib/resources/cleanups.js.map +1 -1
- package/lib/resources/coupon_codes_promotion_rules.cjs.map +1 -1
- package/lib/resources/coupon_codes_promotion_rules.d.cts +1 -1
- package/lib/resources/coupon_codes_promotion_rules.d.ts +1 -1
- package/lib/resources/coupon_codes_promotion_rules.js.map +1 -1
- package/lib/resources/coupon_recipients.cjs.map +1 -1
- package/lib/resources/coupon_recipients.d.cts +1 -1
- package/lib/resources/coupon_recipients.d.ts +1 -1
- package/lib/resources/coupon_recipients.js.map +1 -1
- package/lib/resources/coupons.cjs.map +1 -1
- package/lib/resources/coupons.d.cts +1 -1
- package/lib/resources/coupons.d.ts +1 -1
- package/lib/resources/coupons.js.map +1 -1
- package/lib/resources/custom_promotion_rules.cjs.map +1 -1
- package/lib/resources/custom_promotion_rules.d.cts +1 -1
- package/lib/resources/custom_promotion_rules.d.ts +1 -1
- package/lib/resources/custom_promotion_rules.js.map +1 -1
- package/lib/resources/customer_addresses.cjs.map +1 -1
- package/lib/resources/customer_addresses.d.cts +1 -1
- package/lib/resources/customer_addresses.d.ts +1 -1
- package/lib/resources/customer_addresses.js.map +1 -1
- package/lib/resources/customer_groups.cjs.map +1 -1
- package/lib/resources/customer_groups.d.cts +1 -1
- package/lib/resources/customer_groups.d.ts +1 -1
- package/lib/resources/customer_groups.js.map +1 -1
- package/lib/resources/customer_password_resets.cjs.map +1 -1
- package/lib/resources/customer_password_resets.d.cts +1 -1
- package/lib/resources/customer_password_resets.d.ts +1 -1
- package/lib/resources/customer_password_resets.js.map +1 -1
- package/lib/resources/customer_payment_sources.cjs.map +1 -1
- package/lib/resources/customer_payment_sources.d.cts +1 -1
- package/lib/resources/customer_payment_sources.d.ts +1 -1
- package/lib/resources/customer_payment_sources.js.map +1 -1
- package/lib/resources/customer_subscriptions.cjs.map +1 -1
- package/lib/resources/customer_subscriptions.d.cts +1 -1
- package/lib/resources/customer_subscriptions.d.ts +1 -1
- package/lib/resources/customer_subscriptions.js.map +1 -1
- package/lib/resources/customers.cjs.map +1 -1
- package/lib/resources/customers.d.cts +1 -1
- package/lib/resources/customers.d.ts +1 -1
- package/lib/resources/customers.js.map +1 -1
- package/lib/resources/delivery_lead_times.cjs.map +1 -1
- package/lib/resources/delivery_lead_times.d.cts +1 -1
- package/lib/resources/delivery_lead_times.d.ts +1 -1
- package/lib/resources/delivery_lead_times.js.map +1 -1
- package/lib/resources/discount_engine_items.cjs.map +1 -1
- package/lib/resources/discount_engine_items.d.cts +1 -1
- package/lib/resources/discount_engine_items.d.ts +1 -1
- package/lib/resources/discount_engine_items.js.map +1 -1
- package/lib/resources/discount_engines.cjs.map +1 -1
- package/lib/resources/discount_engines.d.cts +1 -1
- package/lib/resources/discount_engines.d.ts +1 -1
- package/lib/resources/discount_engines.js.map +1 -1
- package/lib/resources/easypost_pickups.cjs.map +1 -1
- package/lib/resources/easypost_pickups.d.cts +1 -1
- package/lib/resources/easypost_pickups.d.ts +1 -1
- package/lib/resources/easypost_pickups.js.map +1 -1
- package/lib/resources/event_callbacks.cjs.map +1 -1
- package/lib/resources/event_callbacks.d.cts +1 -1
- package/lib/resources/event_callbacks.d.ts +1 -1
- package/lib/resources/event_callbacks.js.map +1 -1
- package/lib/resources/events.cjs.map +1 -1
- package/lib/resources/events.d.cts +1 -1
- package/lib/resources/events.d.ts +1 -1
- package/lib/resources/events.js.map +1 -1
- package/lib/resources/exports.cjs.map +1 -1
- package/lib/resources/exports.d.cts +1 -1
- package/lib/resources/exports.d.ts +1 -1
- package/lib/resources/exports.js.map +1 -1
- package/lib/resources/external_gateways.cjs.map +1 -1
- package/lib/resources/external_gateways.d.cts +1 -1
- package/lib/resources/external_gateways.d.ts +1 -1
- package/lib/resources/external_gateways.js.map +1 -1
- package/lib/resources/external_payments.cjs.map +1 -1
- package/lib/resources/external_payments.d.cts +1 -1
- package/lib/resources/external_payments.d.ts +1 -1
- package/lib/resources/external_payments.js.map +1 -1
- package/lib/resources/external_promotions.cjs.map +1 -1
- package/lib/resources/external_promotions.d.cts +1 -1
- package/lib/resources/external_promotions.d.ts +1 -1
- package/lib/resources/external_promotions.js.map +1 -1
- package/lib/resources/external_tax_calculators.cjs.map +1 -1
- package/lib/resources/external_tax_calculators.d.cts +1 -1
- package/lib/resources/external_tax_calculators.d.ts +1 -1
- package/lib/resources/external_tax_calculators.js.map +1 -1
- package/lib/resources/fixed_amount_promotions.cjs.map +1 -1
- package/lib/resources/fixed_amount_promotions.d.cts +1 -1
- package/lib/resources/fixed_amount_promotions.d.ts +1 -1
- package/lib/resources/fixed_amount_promotions.js.map +1 -1
- package/lib/resources/fixed_price_promotions.cjs.map +1 -1
- package/lib/resources/fixed_price_promotions.d.cts +1 -1
- package/lib/resources/fixed_price_promotions.d.ts +1 -1
- package/lib/resources/fixed_price_promotions.js.map +1 -1
- package/lib/resources/flex_promotions.cjs.map +1 -1
- package/lib/resources/flex_promotions.d.cts +1 -1
- package/lib/resources/flex_promotions.d.ts +1 -1
- package/lib/resources/flex_promotions.js.map +1 -1
- package/lib/resources/free_gift_promotions.cjs.map +1 -1
- package/lib/resources/free_gift_promotions.d.cts +1 -1
- package/lib/resources/free_gift_promotions.d.ts +1 -1
- package/lib/resources/free_gift_promotions.js.map +1 -1
- package/lib/resources/free_shipping_promotions.cjs.map +1 -1
- package/lib/resources/free_shipping_promotions.d.cts +1 -1
- package/lib/resources/free_shipping_promotions.d.ts +1 -1
- package/lib/resources/free_shipping_promotions.js.map +1 -1
- package/lib/resources/geocoders.cjs.map +1 -1
- package/lib/resources/geocoders.d.cts +1 -1
- package/lib/resources/geocoders.d.ts +1 -1
- package/lib/resources/geocoders.js.map +1 -1
- package/lib/resources/gift_card_recipients.cjs.map +1 -1
- package/lib/resources/gift_card_recipients.d.cts +1 -1
- package/lib/resources/gift_card_recipients.d.ts +1 -1
- package/lib/resources/gift_card_recipients.js.map +1 -1
- package/lib/resources/gift_cards.cjs.map +1 -1
- package/lib/resources/gift_cards.d.cts +1 -1
- package/lib/resources/gift_cards.d.ts +1 -1
- package/lib/resources/gift_cards.js.map +1 -1
- package/lib/resources/google_geocoders.cjs.map +1 -1
- package/lib/resources/google_geocoders.d.cts +1 -1
- package/lib/resources/google_geocoders.d.ts +1 -1
- package/lib/resources/google_geocoders.js.map +1 -1
- package/lib/resources/imports.cjs.map +1 -1
- package/lib/resources/imports.d.cts +1 -1
- package/lib/resources/imports.d.ts +1 -1
- package/lib/resources/imports.js.map +1 -1
- package/lib/resources/in_stock_subscriptions.cjs.map +1 -1
- package/lib/resources/in_stock_subscriptions.d.cts +1 -1
- package/lib/resources/in_stock_subscriptions.d.ts +1 -1
- package/lib/resources/in_stock_subscriptions.js.map +1 -1
- package/lib/resources/inventory_models.cjs.map +1 -1
- package/lib/resources/inventory_models.d.cts +1 -1
- package/lib/resources/inventory_models.d.ts +1 -1
- package/lib/resources/inventory_models.js.map +1 -1
- package/lib/resources/inventory_return_locations.cjs.map +1 -1
- package/lib/resources/inventory_return_locations.d.cts +1 -1
- package/lib/resources/inventory_return_locations.d.ts +1 -1
- package/lib/resources/inventory_return_locations.js.map +1 -1
- package/lib/resources/inventory_stock_locations.cjs.map +1 -1
- package/lib/resources/inventory_stock_locations.d.cts +1 -1
- package/lib/resources/inventory_stock_locations.d.ts +1 -1
- package/lib/resources/inventory_stock_locations.js.map +1 -1
- package/lib/resources/klarna_gateways.cjs.map +1 -1
- package/lib/resources/klarna_gateways.d.cts +1 -1
- package/lib/resources/klarna_gateways.d.ts +1 -1
- package/lib/resources/klarna_gateways.js.map +1 -1
- package/lib/resources/klarna_payments.cjs.map +1 -1
- package/lib/resources/klarna_payments.d.cts +1 -1
- package/lib/resources/klarna_payments.d.ts +1 -1
- package/lib/resources/klarna_payments.js.map +1 -1
- package/lib/resources/line_item_options.cjs.map +1 -1
- package/lib/resources/line_item_options.d.cts +1 -1
- package/lib/resources/line_item_options.d.ts +1 -1
- package/lib/resources/line_item_options.js.map +1 -1
- package/lib/resources/line_items.cjs.map +1 -1
- package/lib/resources/line_items.d.cts +1 -1
- package/lib/resources/line_items.d.ts +1 -1
- package/lib/resources/line_items.js.map +1 -1
- package/lib/resources/links.cjs.map +1 -1
- package/lib/resources/links.d.cts +1 -1
- package/lib/resources/links.d.ts +1 -1
- package/lib/resources/links.js.map +1 -1
- package/lib/resources/manual_gateways.cjs.map +1 -1
- package/lib/resources/manual_gateways.d.cts +1 -1
- package/lib/resources/manual_gateways.d.ts +1 -1
- package/lib/resources/manual_gateways.js.map +1 -1
- package/lib/resources/manual_tax_calculators.cjs.map +1 -1
- package/lib/resources/manual_tax_calculators.d.cts +1 -1
- package/lib/resources/manual_tax_calculators.d.ts +1 -1
- package/lib/resources/manual_tax_calculators.js.map +1 -1
- package/lib/resources/markets.cjs +4 -0
- package/lib/resources/markets.cjs.map +1 -1
- package/lib/resources/markets.d.cts +1 -1
- package/lib/resources/markets.d.ts +1 -1
- package/lib/resources/markets.js +4 -0
- package/lib/resources/markets.js.map +1 -1
- package/lib/resources/merchants.cjs.map +1 -1
- package/lib/resources/merchants.d.cts +1 -1
- package/lib/resources/merchants.d.ts +1 -1
- package/lib/resources/merchants.js.map +1 -1
- package/lib/resources/notifications.cjs.map +1 -1
- package/lib/resources/notifications.d.cts +1 -1
- package/lib/resources/notifications.d.ts +1 -1
- package/lib/resources/notifications.js.map +1 -1
- package/lib/resources/order_amount_promotion_rules.cjs.map +1 -1
- package/lib/resources/order_amount_promotion_rules.d.cts +1 -1
- package/lib/resources/order_amount_promotion_rules.d.ts +1 -1
- package/lib/resources/order_amount_promotion_rules.js.map +1 -1
- package/lib/resources/order_copies.cjs.map +1 -1
- package/lib/resources/order_copies.d.cts +1 -1
- package/lib/resources/order_copies.d.ts +1 -1
- package/lib/resources/order_copies.js.map +1 -1
- package/lib/resources/order_factories.cjs.map +1 -1
- package/lib/resources/order_factories.d.cts +1 -1
- package/lib/resources/order_factories.d.ts +1 -1
- package/lib/resources/order_factories.js.map +1 -1
- package/lib/resources/order_subscription_items.cjs.map +1 -1
- package/lib/resources/order_subscription_items.d.cts +1 -1
- package/lib/resources/order_subscription_items.d.ts +1 -1
- package/lib/resources/order_subscription_items.js.map +1 -1
- package/lib/resources/order_subscriptions.cjs.map +1 -1
- package/lib/resources/order_subscriptions.d.cts +1 -1
- package/lib/resources/order_subscriptions.d.ts +1 -1
- package/lib/resources/order_subscriptions.js.map +1 -1
- package/lib/resources/orders.cjs +4 -0
- package/lib/resources/orders.cjs.map +1 -1
- package/lib/resources/orders.d.cts +1 -1
- package/lib/resources/orders.d.ts +1 -1
- package/lib/resources/orders.js +4 -0
- package/lib/resources/orders.js.map +1 -1
- package/lib/resources/organizations.cjs.map +1 -1
- package/lib/resources/organizations.d.cts +1 -1
- package/lib/resources/organizations.d.ts +1 -1
- package/lib/resources/organizations.js.map +1 -1
- package/lib/resources/packages.cjs.map +1 -1
- package/lib/resources/packages.d.cts +1 -1
- package/lib/resources/packages.d.ts +1 -1
- package/lib/resources/packages.js.map +1 -1
- package/lib/resources/parcel_line_items.cjs.map +1 -1
- package/lib/resources/parcel_line_items.d.cts +1 -1
- package/lib/resources/parcel_line_items.d.ts +1 -1
- package/lib/resources/parcel_line_items.js.map +1 -1
- package/lib/resources/parcels.cjs.map +1 -1
- package/lib/resources/parcels.d.cts +1 -1
- package/lib/resources/parcels.d.ts +1 -1
- package/lib/resources/parcels.js.map +1 -1
- package/lib/resources/payment_gateways.cjs.map +1 -1
- package/lib/resources/payment_gateways.d.cts +1 -1
- package/lib/resources/payment_gateways.d.ts +1 -1
- package/lib/resources/payment_gateways.js.map +1 -1
- package/lib/resources/payment_methods.cjs.map +1 -1
- package/lib/resources/payment_methods.d.cts +1 -1
- package/lib/resources/payment_methods.d.ts +1 -1
- package/lib/resources/payment_methods.js.map +1 -1
- package/lib/resources/payment_options.cjs.map +1 -1
- package/lib/resources/payment_options.d.cts +1 -1
- package/lib/resources/payment_options.d.ts +1 -1
- package/lib/resources/payment_options.js.map +1 -1
- package/lib/resources/paypal_gateways.cjs.map +1 -1
- package/lib/resources/paypal_gateways.d.cts +1 -1
- package/lib/resources/paypal_gateways.d.ts +1 -1
- package/lib/resources/paypal_gateways.js.map +1 -1
- package/lib/resources/paypal_payments.cjs.map +1 -1
- package/lib/resources/paypal_payments.d.cts +1 -1
- package/lib/resources/paypal_payments.d.ts +1 -1
- package/lib/resources/paypal_payments.js.map +1 -1
- package/lib/resources/percentage_discount_promotions.cjs.map +1 -1
- package/lib/resources/percentage_discount_promotions.d.cts +1 -1
- package/lib/resources/percentage_discount_promotions.d.ts +1 -1
- package/lib/resources/percentage_discount_promotions.js.map +1 -1
- package/lib/resources/pickups.cjs.map +1 -1
- package/lib/resources/pickups.d.cts +1 -1
- package/lib/resources/pickups.d.ts +1 -1
- package/lib/resources/pickups.js.map +1 -1
- package/lib/resources/price_frequency_tiers.cjs.map +1 -1
- package/lib/resources/price_frequency_tiers.d.cts +1 -1
- package/lib/resources/price_frequency_tiers.d.ts +1 -1
- package/lib/resources/price_frequency_tiers.js.map +1 -1
- package/lib/resources/price_list_schedulers.cjs.map +1 -1
- package/lib/resources/price_list_schedulers.d.cts +1 -1
- package/lib/resources/price_list_schedulers.d.ts +1 -1
- package/lib/resources/price_list_schedulers.js.map +1 -1
- package/lib/resources/price_lists.cjs.map +1 -1
- package/lib/resources/price_lists.d.cts +1 -1
- package/lib/resources/price_lists.d.ts +1 -1
- package/lib/resources/price_lists.js.map +1 -1
- package/lib/resources/price_tiers.cjs.map +1 -1
- package/lib/resources/price_tiers.d.cts +1 -1
- package/lib/resources/price_tiers.d.ts +1 -1
- package/lib/resources/price_tiers.js.map +1 -1
- package/lib/resources/price_volume_tiers.cjs.map +1 -1
- package/lib/resources/price_volume_tiers.d.cts +1 -1
- package/lib/resources/price_volume_tiers.d.ts +1 -1
- package/lib/resources/price_volume_tiers.js.map +1 -1
- package/lib/resources/prices.cjs.map +1 -1
- package/lib/resources/prices.d.cts +1 -1
- package/lib/resources/prices.d.ts +1 -1
- package/lib/resources/prices.js.map +1 -1
- package/lib/resources/promotion_rules.cjs.map +1 -1
- package/lib/resources/promotion_rules.d.cts +1 -1
- package/lib/resources/promotion_rules.d.ts +1 -1
- package/lib/resources/promotion_rules.js.map +1 -1
- package/lib/resources/promotions.cjs.map +1 -1
- package/lib/resources/promotions.d.cts +1 -1
- package/lib/resources/promotions.d.ts +1 -1
- package/lib/resources/promotions.js.map +1 -1
- package/lib/resources/recurring_order_copies.cjs.map +1 -1
- package/lib/resources/recurring_order_copies.d.cts +1 -1
- package/lib/resources/recurring_order_copies.d.ts +1 -1
- package/lib/resources/recurring_order_copies.js.map +1 -1
- package/lib/resources/refunds.cjs.map +1 -1
- package/lib/resources/refunds.d.cts +1 -1
- package/lib/resources/refunds.d.ts +1 -1
- package/lib/resources/refunds.js.map +1 -1
- package/lib/resources/reserved_stocks.cjs.map +1 -1
- package/lib/resources/reserved_stocks.d.cts +1 -1
- package/lib/resources/reserved_stocks.d.ts +1 -1
- package/lib/resources/reserved_stocks.js.map +1 -1
- package/lib/resources/resource_errors.cjs.map +1 -1
- package/lib/resources/resource_errors.d.cts +1 -1
- package/lib/resources/resource_errors.d.ts +1 -1
- package/lib/resources/resource_errors.js.map +1 -1
- package/lib/resources/return_line_items.cjs.map +1 -1
- package/lib/resources/return_line_items.d.cts +1 -1
- package/lib/resources/return_line_items.d.ts +1 -1
- package/lib/resources/return_line_items.js.map +1 -1
- package/lib/resources/returns.cjs.map +1 -1
- package/lib/resources/returns.d.cts +1 -1
- package/lib/resources/returns.d.ts +1 -1
- package/lib/resources/returns.js.map +1 -1
- package/lib/resources/satispay_gateways.cjs.map +1 -1
- package/lib/resources/satispay_gateways.d.cts +1 -1
- package/lib/resources/satispay_gateways.d.ts +1 -1
- package/lib/resources/satispay_gateways.js.map +1 -1
- package/lib/resources/satispay_payments.cjs.map +1 -1
- package/lib/resources/satispay_payments.d.cts +1 -1
- package/lib/resources/satispay_payments.d.ts +1 -1
- package/lib/resources/satispay_payments.js.map +1 -1
- package/lib/resources/shipments.cjs.map +1 -1
- package/lib/resources/shipments.d.cts +1 -1
- package/lib/resources/shipments.d.ts +1 -1
- package/lib/resources/shipments.js.map +1 -1
- package/lib/resources/shipping_categories.cjs.map +1 -1
- package/lib/resources/shipping_categories.d.cts +1 -1
- package/lib/resources/shipping_categories.d.ts +1 -1
- package/lib/resources/shipping_categories.js.map +1 -1
- package/lib/resources/shipping_method_tiers.cjs.map +1 -1
- package/lib/resources/shipping_method_tiers.d.cts +1 -1
- package/lib/resources/shipping_method_tiers.d.ts +1 -1
- package/lib/resources/shipping_method_tiers.js.map +1 -1
- package/lib/resources/shipping_methods.cjs.map +1 -1
- package/lib/resources/shipping_methods.d.cts +1 -1
- package/lib/resources/shipping_methods.d.ts +1 -1
- package/lib/resources/shipping_methods.js.map +1 -1
- package/lib/resources/shipping_weight_tiers.cjs.map +1 -1
- package/lib/resources/shipping_weight_tiers.d.cts +1 -1
- package/lib/resources/shipping_weight_tiers.d.ts +1 -1
- package/lib/resources/shipping_weight_tiers.js.map +1 -1
- package/lib/resources/shipping_zones.cjs.map +1 -1
- package/lib/resources/shipping_zones.d.cts +1 -1
- package/lib/resources/shipping_zones.d.ts +1 -1
- package/lib/resources/shipping_zones.js.map +1 -1
- package/lib/resources/sku_list_items.cjs.map +1 -1
- package/lib/resources/sku_list_items.d.cts +1 -1
- package/lib/resources/sku_list_items.d.ts +1 -1
- package/lib/resources/sku_list_items.js.map +1 -1
- package/lib/resources/sku_list_promotion_rules.cjs.map +1 -1
- package/lib/resources/sku_list_promotion_rules.d.cts +1 -1
- package/lib/resources/sku_list_promotion_rules.d.ts +1 -1
- package/lib/resources/sku_list_promotion_rules.js.map +1 -1
- package/lib/resources/sku_lists.cjs.map +1 -1
- package/lib/resources/sku_lists.d.cts +1 -1
- package/lib/resources/sku_lists.d.ts +1 -1
- package/lib/resources/sku_lists.js.map +1 -1
- package/lib/resources/sku_options.cjs.map +1 -1
- package/lib/resources/sku_options.d.cts +1 -1
- package/lib/resources/sku_options.d.ts +1 -1
- package/lib/resources/sku_options.js.map +1 -1
- package/lib/resources/skus.cjs.map +1 -1
- package/lib/resources/skus.d.cts +1 -1
- package/lib/resources/skus.d.ts +1 -1
- package/lib/resources/skus.js.map +1 -1
- package/lib/resources/stock_items.cjs.map +1 -1
- package/lib/resources/stock_items.d.cts +1 -1
- package/lib/resources/stock_items.d.ts +1 -1
- package/lib/resources/stock_items.js.map +1 -1
- package/lib/resources/stock_line_items.cjs.map +1 -1
- package/lib/resources/stock_line_items.d.cts +1 -1
- package/lib/resources/stock_line_items.d.ts +1 -1
- package/lib/resources/stock_line_items.js.map +1 -1
- package/lib/resources/stock_locations.cjs.map +1 -1
- package/lib/resources/stock_locations.d.cts +1 -1
- package/lib/resources/stock_locations.d.ts +1 -1
- package/lib/resources/stock_locations.js.map +1 -1
- package/lib/resources/stock_reservations.cjs.map +1 -1
- package/lib/resources/stock_reservations.d.cts +1 -1
- package/lib/resources/stock_reservations.d.ts +1 -1
- package/lib/resources/stock_reservations.js.map +1 -1
- package/lib/resources/stock_transfers.cjs.map +1 -1
- package/lib/resources/stock_transfers.d.cts +1 -1
- package/lib/resources/stock_transfers.d.ts +1 -1
- package/lib/resources/stock_transfers.js.map +1 -1
- package/lib/resources/stores.cjs.map +1 -1
- package/lib/resources/stores.d.cts +1 -1
- package/lib/resources/stores.d.ts +1 -1
- package/lib/resources/stores.js.map +1 -1
- package/lib/resources/stripe_gateways.cjs.map +1 -1
- package/lib/resources/stripe_gateways.d.cts +1 -1
- package/lib/resources/stripe_gateways.d.ts +1 -1
- package/lib/resources/stripe_gateways.js.map +1 -1
- package/lib/resources/stripe_payments.cjs.map +1 -1
- package/lib/resources/stripe_payments.d.cts +1 -1
- package/lib/resources/stripe_payments.d.ts +1 -1
- package/lib/resources/stripe_payments.js.map +1 -1
- package/lib/resources/stripe_tax_accounts.cjs.map +1 -1
- package/lib/resources/stripe_tax_accounts.d.cts +1 -1
- package/lib/resources/stripe_tax_accounts.d.ts +1 -1
- package/lib/resources/stripe_tax_accounts.js.map +1 -1
- package/lib/resources/subscription_models.cjs.map +1 -1
- package/lib/resources/subscription_models.d.cts +1 -1
- package/lib/resources/subscription_models.d.ts +1 -1
- package/lib/resources/subscription_models.js.map +1 -1
- package/lib/resources/tags.cjs.map +1 -1
- package/lib/resources/tags.d.cts +1 -1
- package/lib/resources/tags.d.ts +1 -1
- package/lib/resources/tags.js.map +1 -1
- package/lib/resources/talon_one_accounts.cjs.map +1 -1
- package/lib/resources/talon_one_accounts.d.cts +1 -1
- package/lib/resources/talon_one_accounts.d.ts +1 -1
- package/lib/resources/talon_one_accounts.js.map +1 -1
- package/lib/resources/tax_calculators.cjs.map +1 -1
- package/lib/resources/tax_calculators.d.cts +1 -1
- package/lib/resources/tax_calculators.d.ts +1 -1
- package/lib/resources/tax_calculators.js.map +1 -1
- package/lib/resources/tax_categories.cjs.map +1 -1
- package/lib/resources/tax_categories.d.cts +1 -1
- package/lib/resources/tax_categories.d.ts +1 -1
- package/lib/resources/tax_categories.js.map +1 -1
- package/lib/resources/tax_rules.cjs.map +1 -1
- package/lib/resources/tax_rules.d.cts +1 -1
- package/lib/resources/tax_rules.d.ts +1 -1
- package/lib/resources/tax_rules.js.map +1 -1
- package/lib/resources/taxjar_accounts.cjs.map +1 -1
- package/lib/resources/taxjar_accounts.d.cts +1 -1
- package/lib/resources/taxjar_accounts.d.ts +1 -1
- package/lib/resources/taxjar_accounts.js.map +1 -1
- package/lib/resources/transactions.cjs.map +1 -1
- package/lib/resources/transactions.d.cts +1 -1
- package/lib/resources/transactions.d.ts +1 -1
- package/lib/resources/transactions.js.map +1 -1
- package/lib/resources/versions.cjs.map +1 -1
- package/lib/resources/versions.d.cts +1 -1
- package/lib/resources/versions.d.ts +1 -1
- package/lib/resources/versions.js.map +1 -1
- package/lib/resources/vertex_accounts.cjs.map +1 -1
- package/lib/resources/vertex_accounts.d.cts +1 -1
- package/lib/resources/vertex_accounts.d.ts +1 -1
- package/lib/resources/vertex_accounts.js.map +1 -1
- package/lib/resources/voids.cjs.map +1 -1
- package/lib/resources/voids.d.cts +1 -1
- package/lib/resources/voids.d.ts +1 -1
- package/lib/resources/voids.js.map +1 -1
- package/lib/resources/webhooks.cjs.map +1 -1
- package/lib/resources/webhooks.d.cts +1 -1
- package/lib/resources/webhooks.d.ts +1 -1
- package/lib/resources/webhooks.js.map +1 -1
- package/lib/resources/wire_transfers.cjs.map +1 -1
- package/lib/resources/wire_transfers.d.cts +1 -1
- package/lib/resources/wire_transfers.d.ts +1 -1
- package/lib/resources/wire_transfers.js.map +1 -1
- package/lib/static.d.cts +1 -1
- package/lib/static.d.ts +1 -1
- package/package.json +15 -4
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { eL as Capture, eN as CaptureSort, lX as CaptureType, eM as CaptureUpdate, ae as Captures, ad as default } from '../api-F1F37Dud.js';
|
2
2
|
import '../client.js';
|
3
3
|
import '../interceptor-k15jXzf0.js';
|
4
4
|
import '../types.js';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/resources/captures.ts"],"names":[],"mappings":";;AAkKA,MAAM,iBAAiB,WAAqB,CAAA;AAAA,EAE3C,OAAgB,IAAoB,GAAA,UAAA;AAAA,EAEpC,MAAM,MAAA,CAAO,QAAyB,EAAA,MAAA,EAAuC,OAA6C,EAAA;AACzH,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA+B,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,QAAS,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC3G,EAEA,MAAM,KAAA,CAAM,SAA6B,EAAA,MAAA,EAAqC,OAA2C,EAAA;AACxH,IAAM,MAAA,UAAA,GAAc,UAAsB,EAAM,IAAA,SAAA;AAChD,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAa,EAAE,IAAA,EAAM,QAAS,EAAA,EAAG,CAAY,SAAA,EAAA,UAAU,CAAU,MAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACvG,EAEA,MAAM,WAAA,CAAY,SAA6B,EAAA,MAAA,EAAsC,OAA8D,EAAA;AAClJ,IAAM,MAAA,UAAA,GAAc,UAAsB,EAAM,IAAA,SAAA;AAChD,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAkB,EAAE,IAAA,EAAM,aAAc,EAAA,EAAG,CAAY,SAAA,EAAA,UAAU,CAAgB,YAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACvH,EAEA,M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AAO,OAAO,QAAW,GAAA,EAAA,GAAI,EAAG,CAAA,EAAA,EAAI,MAAM,QAAS,CAAA,IAAA,EAAM,SAAS,IAAK,EAAA,EAAG,QAAQ,OAAO,CAAA;AAAA;AACtJ,EAGA,UAAU,QAAoC,EAAA;AAC7C,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,QAAS,CAAA,IAAA;AAAA;AACrD,EAGA,aAAa,EAA4C,EAAA;AACxD,IAAO,OAAA,KAAA,CAAM,qBAAiC,EAAE,CAAA;AAAA;AACjD,EAEA,sBAAsB,GAA6B,EAAA;AAClD,IAAO,OAAA,KAAA,CAAM,qBAAkC,CAAA,GAAG,GAAG,CAAA;AAAA;AACtD,EAGA,IAAoB,GAAA;AACnB,IAAA,OAAO,QAAS,CAAA,IAAA;AAAA;AAGlB;AAGA,MAAM,QAAA,GAAW,IAAI,QAAS,EAAA;AAC9B,IAAO,gBAAQ,GAAA","file":"captures.js","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Order } from './orders'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Version } from './versions'\nimport type { Authorization } from './authorizations'\nimport type { Refund } from './refunds'\nimport type { Return } from './returns'\nimport type { AdyenPayment } from './adyen_payments'\nimport type { AxervePayment } from './axerve_payments'\nimport type { BraintreePayment } from './braintree_payments'\nimport type { CheckoutComPayment } from './checkout_com_payments'\nimport type { ExternalPayment } from './external_payments'\nimport type { KlarnaPayment } from './klarna_payments'\nimport type { PaypalPayment } from './paypal_payments'\nimport type { SatispayPayment } from './satispay_payments'\nimport type { StripePayment } from './stripe_payments'\nimport type { WireTransfer } from './wire_transfers'\n\n\ntype CaptureType = 'captures'\ntype CaptureRel = ResourceRel & { type: CaptureType }\n\n\nexport type CaptureSort = Pick<Capture, 'id' | 'number' | 'amount_cents'> & ResourceSort\n// export type CaptureFilter = Pick<Capture, 'id' | 'number' | 'currency_code' | 'amount_cents' | 'succeeded' | 'message' | 'error_code' | 'error_detail' | 'token' | 'gateway_transaction_id'> & ResourceFilter\n\n\ninterface Capture extends Resource {\n\t\n\treadonly type: CaptureType\n\n\t/** \n\t * The transaction number, auto generated.\n\t * @example ```\"42/T/001\"```\n\t */\n\tnumber: string\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard, inherited from the associated order.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code: string\n\t/** \n\t * The transaction amount, in cents.\n\t * @example ```1500```\n\t */\n\tamount_cents: number\n\t/** \n\t * The transaction amount, float.\n\t * @example ```15```\n\t */\n\tamount_float: number\n\t/** \n\t * The transaction amount, formatted.\n\t * @example ```\"€15,00\"```\n\t */\n\tformatted_amount: string\n\t/** \n\t * Indicates if the transaction is successful.\n\t */\n\tsucceeded: boolean\n\t/** \n\t * The message returned by the payment gateway.\n\t * @example ```\"Accepted\"```\n\t */\n\tmessage?: string | null\n\t/** \n\t * The error code, if any, returned by the payment gateway.\n\t * @example ```\"00001\"```\n\t */\n\terror_code?: string | null\n\t/** \n\t * The error detail, if any, returned by the payment gateway.\n\t * @example ```\"Already settled\"```\n\t */\n\terror_detail?: string | null\n\t/** \n\t * The token identifying the transaction, returned by the payment gateway.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\ttoken?: string | null\n\t/** \n\t * The ID identifying the transaction, returned by the payment gateway.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tgateway_transaction_id?: string | null\n\t/** \n\t * The amount to be refunded, in cents.\n\t * @example ```500```\n\t */\n\trefund_amount_cents?: number | null\n\t/** \n\t * The amount to be refunded, float.\n\t * @example ```5```\n\t */\n\trefund_amount_float?: number | null\n\t/** \n\t * The amount to be refunded, formatted.\n\t * @example ```\"€5,00\"```\n\t */\n\tformatted_refund_amount?: string | null\n\t/** \n\t * The balance to be refunded, in cents.\n\t * @example ```1000```\n\t */\n\trefund_balance_cents?: number | null\n\t/** \n\t * The balance to be refunded, float.\n\t * @example ```10```\n\t */\n\trefund_balance_float?: number | null\n\t/** \n\t * The balance to be refunded, formatted.\n\t * @example ```\"€10,00\"```\n\t */\n\tformatted_refund_balance?: string | null\n\n\torder?: Order | null\n\tpayment_source?: AdyenPayment | AxervePayment | BraintreePayment | CheckoutComPayment | ExternalPayment | KlarnaPayment | PaypalPayment | SatispayPayment | StripePayment | WireTransfer | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\tversions?: Version[] | null\n\treference_authorization?: Authorization | null\n\trefunds?: Refund[] | null\n\treturn?: Return | null\n\n}\n\n\ninterface CaptureUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * Indicates if the transaction is successful.\n\t */\n\tsucceeded?: boolean | null\n\t/** \n\t * Send this attribute if you want to forward a stuck transaction to succeeded and update associated order states accordingly.\n\t * @example ```true```\n\t */\n\t_forward?: boolean | null\n\t/** \n\t * Send this attribute if you want to create a refund for this capture.\n\t * @example ```true```\n\t */\n\t_refund?: boolean | null\n\t/** \n\t * Send this attribute as a value in cents if you want to overwrite the amount to be refunded.\n\t * @example ```500```\n\t */\n\t_refund_amount_cents?: number | null\n\t/** \n\t * Send this attribute if you want to refund a succeeded capture of a pending order (which is left unpaid).\n\t * @example ```true```\n\t */\n\t_cancel?: boolean | null\n\t\n}\n\n\nclass Captures extends ApiResource<Capture> {\n\n\tstatic readonly TYPE: CaptureType = 'captures' as const\n\n\tasync update(resource: CaptureUpdate, params?: QueryParamsRetrieve<Capture>, options?: ResourcesConfig): Promise<Capture> {\n\t\treturn this.resources.update<CaptureUpdate, Capture>({ ...resource, type: Captures.TYPE }, params, options)\n\t}\n\n\tasync order(captureId: string | Capture, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _captureId = (captureId as Capture).id || captureId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `captures/${_captureId}/order`, params, options) as unknown as Order\n\t}\n\n\tasync attachments(captureId: string | Capture, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _captureId = (captureId as Capture).id || captureId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `captures/${_captureId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(captureId: string | Capture, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _captureId = (captureId as Capture).id || captureId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `captures/${_captureId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync versions(captureId: string | Capture, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _captureId = (captureId as Capture).id || captureId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `captures/${_captureId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync reference_authorization(captureId: string | Capture, params?: QueryParamsRetrieve<Authorization>, options?: ResourcesConfig): Promise<Authorization> {\n\t\tconst _captureId = (captureId as Capture).id || captureId as string\n\t\treturn this.resources.fetch<Authorization>({ type: 'authorizations' }, `captures/${_captureId}/reference_authorization`, params, options) as unknown as Authorization\n\t}\n\n\tasync refunds(captureId: string | Capture, params?: QueryParamsList<Refund>, options?: ResourcesConfig): Promise<ListResponse<Refund>> {\n\t\tconst _captureId = (captureId as Capture).id || captureId as string\n\t\treturn this.resources.fetch<Refund>({ type: 'refunds' }, `captures/${_captureId}/refunds`, params, options) as unknown as ListResponse<Refund>\n\t}\n\n\tasync return(captureId: string | Capture, params?: QueryParamsRetrieve<Return>, options?: ResourcesConfig): Promise<Return> {\n\t\tconst _captureId = (captureId as Capture).id || captureId as string\n\t\treturn this.resources.fetch<Return>({ type: 'returns' }, `captures/${_captureId}/return`, params, options) as unknown as Return\n\t}\n\n\tasync _forward(id: string | Capture, params?: QueryParamsRetrieve<Capture>, options?: ResourcesConfig): Promise<Capture> {\n\t\treturn this.resources.update<CaptureUpdate, Capture>({ id: (typeof id === 'string')? id: id.id, type: Captures.TYPE, _forward: true }, params, options)\n\t}\n\n\tasync _refund(id: string | Capture, params?: QueryParamsRetrieve<Capture>, options?: ResourcesConfig): Promise<Capture> {\n\t\treturn this.resources.update<CaptureUpdate, Capture>({ id: (typeof id === 'string')? id: id.id, type: Captures.TYPE, _refund: true }, params, options)\n\t}\n\n\tasync _refund_amount_cents(id: string | Capture, triggerValue: number, params?: QueryParamsRetrieve<Capture>, options?: ResourcesConfig): Promise<Capture> {\n\t\treturn this.resources.update<CaptureUpdate, Capture>({ id: (typeof id === 'string')? id: id.id, type: Captures.TYPE, _refund_amount_cents: triggerValue }, params, options)\n\t}\n\n\tasync _cancel(id: string | Capture, params?: QueryParamsRetrieve<Capture>, options?: ResourcesConfig): Promise<Capture> {\n\t\treturn this.resources.update<CaptureUpdate, Capture>({ id: (typeof id === 'string')? id: id.id, type: Captures.TYPE, _cancel: true }, params, options)\n\t}\n\n\n\tisCapture(resource: any): resource is Capture {\n\t\treturn resource.type && (resource.type === Captures.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CaptureRel {\n\t\treturn super.relationshipOneToOne<CaptureRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CaptureRel[] {\n\t\treturn super.relationshipOneToMany<CaptureRel>(...ids)\n\t}\n\n\n\ttype(): CaptureType {\n\t\treturn Captures.TYPE\n\t}\n\n}\n\n\nconst instance = new Captures()\nexport default instance\n\nexport type { Capture, CaptureUpdate, CaptureType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/captures.ts"],"names":[],"mappings":";;AAkKA,MAAM,iBAAiB,WAAqB,CAAA;AAAA,EAE3C,OAAgB,IAAoB,GAAA,UAAA;AAAA,EAEpC,MAAM,MAAA,CAAO,QAAyB,EAAA,MAAA,EAAuC,OAA6C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,IAAoB,GAAA;AACnB,IAAA,OAAO,QAAS,CAAA,IAAA;AAAA;AAGlB;AAGA,MAAM,QAAA,GAAW,IAAI,QAAS,EAAA;AAC9B,IAAO,gBAAQ,GAAA","file":"captures.js","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Order } from './orders'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Version } from './versions'\nimport type { Authorization } from './authorizations'\nimport type { Refund } from './refunds'\nimport type { Return } from './returns'\nimport type { AdyenPayment } from './adyen_payments'\nimport type { AxervePayment } from './axerve_payments'\nimport type { BraintreePayment } from './braintree_payments'\nimport type { CheckoutComPayment } from './checkout_com_payments'\nimport type { ExternalPayment } from './external_payments'\nimport type { KlarnaPayment } from './klarna_payments'\nimport type { PaypalPayment } from './paypal_payments'\nimport type { SatispayPayment } from './satispay_payments'\nimport type { StripePayment } from './stripe_payments'\nimport type { WireTransfer } from './wire_transfers'\n\n\ntype CaptureType = 'captures'\ntype CaptureRel = ResourceRel & { type: CaptureType }\n\n\nexport type CaptureSort = Pick<Capture, 'id' | 'number' | 'amount_cents'> & ResourceSort\n// export type CaptureFilter = Pick<Capture, 'id' | 'number' | 'currency_code' | 'amount_cents' | 'succeeded' | 'message' | 'error_code' | 'error_detail' | 'token' | 'gateway_transaction_id'> & ResourceFilter\n\n\ninterface Capture extends Resource {\n\t\n\treadonly type: CaptureType\n\n\t/** \n\t * The transaction number, auto generated.\n\t * @example ```\"42/T/001\"```\n\t */\n\tnumber: string\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard, inherited from the associated order.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code: string\n\t/** \n\t * The transaction amount, in cents.\n\t * @example ```1500```\n\t */\n\tamount_cents: number\n\t/** \n\t * The transaction amount, float.\n\t * @example ```15```\n\t */\n\tamount_float: number\n\t/** \n\t * The transaction amount, formatted.\n\t * @example ```\"€15,00\"```\n\t */\n\tformatted_amount: string\n\t/** \n\t * Indicates if the transaction is successful.\n\t */\n\tsucceeded: boolean\n\t/** \n\t * The message returned by the payment gateway.\n\t * @example ```\"Accepted\"```\n\t */\n\tmessage?: string | null\n\t/** \n\t * The error code, if any, returned by the payment gateway.\n\t * @example ```\"00001\"```\n\t */\n\terror_code?: string | null\n\t/** \n\t * The error detail, if any, returned by the payment gateway.\n\t * @example ```\"Already settled\"```\n\t */\n\terror_detail?: string | null\n\t/** \n\t * The token identifying the transaction, returned by the payment gateway.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\ttoken?: string | null\n\t/** \n\t * The ID identifying the transaction, returned by the payment gateway.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tgateway_transaction_id?: string | null\n\t/** \n\t * The amount to be refunded, in cents.\n\t * @example ```500```\n\t */\n\trefund_amount_cents?: number | null\n\t/** \n\t * The amount to be refunded, float.\n\t * @example ```5```\n\t */\n\trefund_amount_float?: number | null\n\t/** \n\t * The amount to be refunded, formatted.\n\t * @example ```\"€5,00\"```\n\t */\n\tformatted_refund_amount?: string | null\n\t/** \n\t * The balance to be refunded, in cents.\n\t * @example ```1000```\n\t */\n\trefund_balance_cents?: number | null\n\t/** \n\t * The balance to be refunded, float.\n\t * @example ```10```\n\t */\n\trefund_balance_float?: number | null\n\t/** \n\t * The balance to be refunded, formatted.\n\t * @example ```\"€10,00\"```\n\t */\n\tformatted_refund_balance?: string | null\n\n\torder?: Order | null\n\tpayment_source?: AdyenPayment | AxervePayment | BraintreePayment | CheckoutComPayment | ExternalPayment | KlarnaPayment | PaypalPayment | SatispayPayment | StripePayment | WireTransfer | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\tversions?: Version[] | null\n\treference_authorization?: Authorization | null\n\trefunds?: Refund[] | null\n\treturn?: Return | null\n\n}\n\n\ninterface CaptureUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * Indicates if the transaction is successful.\n\t */\n\tsucceeded?: boolean | null\n\t/** \n\t * Send this attribute if you want to forward a stuck transaction to succeeded and update associated order states accordingly.\n\t * @example ```true```\n\t */\n\t_forward?: boolean | null\n\t/** \n\t * Send this attribute if you want to create a refund for this capture.\n\t * @example ```true```\n\t */\n\t_refund?: boolean | null\n\t/** \n\t * Send this attribute as a value in cents if you want to overwrite the amount to be refunded.\n\t * @example ```500```\n\t */\n\t_refund_amount_cents?: number | null\n\t/** \n\t * Send this attribute if you want to refund a succeeded capture of a pending order (which is left unpaid).\n\t * @example ```true```\n\t */\n\t_cancel?: boolean | null\n\t\n}\n\n\nclass Captures extends ApiResource<Capture> {\n\n\tstatic readonly TYPE: CaptureType = 'captures' as const\n\n\tasync update(resource: CaptureUpdate, params?: QueryParamsRetrieve<Capture>, options?: ResourcesConfig): Promise<Capture> {\n\t\treturn this.resources.update<CaptureUpdate, Capture>({ ...resource, type: Captures.TYPE }, params, options)\n\t}\n\n\tasync order(captureId: string | Capture, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _captureId = (captureId as Capture).id || captureId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `captures/${_captureId}/order`, params, options) as unknown as Order\n\t}\n\n\tasync attachments(captureId: string | Capture, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _captureId = (captureId as Capture).id || captureId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `captures/${_captureId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(captureId: string | Capture, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _captureId = (captureId as Capture).id || captureId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `captures/${_captureId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync versions(captureId: string | Capture, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _captureId = (captureId as Capture).id || captureId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `captures/${_captureId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync reference_authorization(captureId: string | Capture, params?: QueryParamsRetrieve<Authorization>, options?: ResourcesConfig): Promise<Authorization> {\n\t\tconst _captureId = (captureId as Capture).id || captureId as string\n\t\treturn this.resources.fetch<Authorization>({ type: 'authorizations' }, `captures/${_captureId}/reference_authorization`, params, options) as unknown as Authorization\n\t}\n\n\tasync refunds(captureId: string | Capture, params?: QueryParamsList<Refund>, options?: ResourcesConfig): Promise<ListResponse<Refund>> {\n\t\tconst _captureId = (captureId as Capture).id || captureId as string\n\t\treturn this.resources.fetch<Refund>({ type: 'refunds' }, `captures/${_captureId}/refunds`, params, options) as unknown as ListResponse<Refund>\n\t}\n\n\tasync return(captureId: string | Capture, params?: QueryParamsRetrieve<Return>, options?: ResourcesConfig): Promise<Return> {\n\t\tconst _captureId = (captureId as Capture).id || captureId as string\n\t\treturn this.resources.fetch<Return>({ type: 'returns' }, `captures/${_captureId}/return`, params, options) as unknown as Return\n\t}\n\n\tasync _forward(id: string | Capture, params?: QueryParamsRetrieve<Capture>, options?: ResourcesConfig): Promise<Capture> {\n\t\treturn this.resources.update<CaptureUpdate, Capture>({ id: (typeof id === 'string')? id: id.id, type: Captures.TYPE, _forward: true }, params, options)\n\t}\n\n\tasync _refund(id: string | Capture, params?: QueryParamsRetrieve<Capture>, options?: ResourcesConfig): Promise<Capture> {\n\t\treturn this.resources.update<CaptureUpdate, Capture>({ id: (typeof id === 'string')? id: id.id, type: Captures.TYPE, _refund: true }, params, options)\n\t}\n\n\tasync _refund_amount_cents(id: string | Capture, triggerValue: number, params?: QueryParamsRetrieve<Capture>, options?: ResourcesConfig): Promise<Capture> {\n\t\treturn this.resources.update<CaptureUpdate, Capture>({ id: (typeof id === 'string')? id: id.id, type: Captures.TYPE, _refund_amount_cents: triggerValue }, params, options)\n\t}\n\n\tasync _cancel(id: string | Capture, params?: QueryParamsRetrieve<Capture>, options?: ResourcesConfig): Promise<Capture> {\n\t\treturn this.resources.update<CaptureUpdate, Capture>({ id: (typeof id === 'string')? id: id.id, type: Captures.TYPE, _cancel: true }, params, options)\n\t}\n\n\n\tisCapture(resource: any): resource is Capture {\n\t\treturn resource.type && (resource.type === Captures.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CaptureRel {\n\t\treturn super.relationshipOneToOne<CaptureRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CaptureRel[] {\n\t\treturn super.relationshipOneToMany<CaptureRel>(...ids)\n\t}\n\n\n\ttype(): CaptureType {\n\t\treturn Captures.TYPE\n\t}\n\n}\n\n\nconst instance = new Captures()\nexport default instance\n\nexport type { Captures, Capture, CaptureUpdate, CaptureType }\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/resources/carrier_accounts.ts"],"names":["ApiResource"],"mappings":";;;;AAgGA,MAAM,wBAAwBA,oBAA4B,CAAA;AAAA,EAEzD,OAAgB,IAA2B,GAAA,kBAAA;AAAA,EAE3C,MAAM,MAAA,CAAO,QAAgC,EAAA,MAAA,EAA8C,OAAoD,EAAA;AAC9I,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA6C,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,eAAgB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAChI,EAEA,MAAM,MAAA,CAAO,QAAgC,EAAA,MAAA,EAA8C,OAAoD,EAAA;AAC9I,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA6C,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,eAAgB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAChI,EAEA,MAAM,MAAO,CAAA,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A,IAAA;AAAA;AAC5D,EAGA,aAAa,EAAmD,EAAA;AAC/D,IAAO,OAAA,KAAA,CAAM,qBAAwC,EAAE,CAAA;AAAA;AACxD,EAEA,sBAAsB,GAAoC,EAAA;AACzD,IAAO,OAAA,KAAA,CAAM,qBAAyC,CAAA,GAAG,GAAG,CAAA;AAAA;AAC7D,EAGA,IAA2B,GAAA;AAC1B,IAAA,OAAO,eAAgB,CAAA,IAAA;AAAA;AAGzB;AAGA,MAAM,QAAA,GAAW,IAAI,eAAgB,EAAA;AACrC,IAAO,wBAAQ,GAAA","file":"carrier_accounts.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 { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype CarrierAccountType = 'carrier_accounts'\ntype CarrierAccountRel = ResourceRel & { type: CarrierAccountType }\ntype MarketRel = ResourceRel & { type: MarketType }\n\n\nexport type CarrierAccountSort = Pick<CarrierAccount, 'id' | 'name'> & ResourceSort\n// export type CarrierAccountFilter = Pick<CarrierAccount, 'id' | 'name' | 'easypost_type'> & ResourceFilter\n\n\ninterface CarrierAccount extends Resource {\n\t\n\treadonly type: CarrierAccountType\n\n\t/** \n\t * The carrier account internal name.\n\t * @example ```\"Accurate\"```\n\t */\n\tname: string\n\t/** \n\t * The Easypost service carrier type.\n\t * @example ```\"AccurateAccount\"```\n\t */\n\teasypost_type: string\n\t/** \n\t * The Easypost internal reference ID.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\teasypost_id?: string | null\n\t/** \n\t * The Easypost carrier accounts credentials fields.\n\t * @example ```{\"username\":\"xxxx\",\"password\":\"secret\"}```\n\t */\n\tcredentials: Record<string, any>\n\n\tmarket?: Market | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface CarrierAccountCreate extends ResourceCreate {\n\t\n\t/** \n\t * The carrier account internal name.\n\t * @example ```\"Accurate\"```\n\t */\n\tname: string\n\t/** \n\t * The Easypost service carrier type.\n\t * @example ```\"AccurateAccount\"```\n\t */\n\teasypost_type: string\n\t/** \n\t * The Easypost carrier accounts credentials fields.\n\t * @example ```{\"username\":\"xxxx\",\"password\":\"secret\"}```\n\t */\n\tcredentials: Record<string, any>\n\n\tmarket?: MarketRel | null\n\n}\n\n\ninterface CarrierAccountUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The carrier account internal name.\n\t * @example ```\"Accurate\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The Easypost service carrier type.\n\t * @example ```\"AccurateAccount\"```\n\t */\n\teasypost_type?: string | null\n\t/** \n\t * The Easypost carrier accounts credentials fields.\n\t * @example ```{\"username\":\"xxxx\",\"password\":\"secret\"}```\n\t */\n\tcredentials?: Record<string, any> | null\n\n\tmarket?: MarketRel | null\n\n}\n\n\nclass CarrierAccounts extends ApiResource<CarrierAccount> {\n\n\tstatic readonly TYPE: CarrierAccountType = 'carrier_accounts' as const\n\n\tasync create(resource: CarrierAccountCreate, params?: QueryParamsRetrieve<CarrierAccount>, options?: ResourcesConfig): Promise<CarrierAccount> {\n\t\treturn this.resources.create<CarrierAccountCreate, CarrierAccount>({ ...resource, type: CarrierAccounts.TYPE }, params, options)\n\t}\n\n\tasync update(resource: CarrierAccountUpdate, params?: QueryParamsRetrieve<CarrierAccount>, options?: ResourcesConfig): Promise<CarrierAccount> {\n\t\treturn this.resources.update<CarrierAccountUpdate, CarrierAccount>({ ...resource, type: CarrierAccounts.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: CarrierAccounts.TYPE } : id, options)\n\t}\n\n\tasync market(carrierAccountId: string | CarrierAccount, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\tconst _carrierAccountId = (carrierAccountId as CarrierAccount).id || carrierAccountId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `carrier_accounts/${_carrierAccountId}/market`, params, options) as unknown as Market\n\t}\n\n\tasync attachments(carrierAccountId: string | CarrierAccount, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _carrierAccountId = (carrierAccountId as CarrierAccount).id || carrierAccountId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `carrier_accounts/${_carrierAccountId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(carrierAccountId: string | CarrierAccount, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _carrierAccountId = (carrierAccountId as CarrierAccount).id || carrierAccountId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `carrier_accounts/${_carrierAccountId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisCarrierAccount(resource: any): resource is CarrierAccount {\n\t\treturn resource.type && (resource.type === CarrierAccounts.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CarrierAccountRel {\n\t\treturn super.relationshipOneToOne<CarrierAccountRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CarrierAccountRel[] {\n\t\treturn super.relationshipOneToMany<CarrierAccountRel>(...ids)\n\t}\n\n\n\ttype(): CarrierAccountType {\n\t\treturn CarrierAccounts.TYPE\n\t}\n\n}\n\n\nconst instance = new CarrierAccounts()\nexport default instance\n\nexport type { CarrierAccount, CarrierAccountCreate, CarrierAccountUpdate, CarrierAccountType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/carrier_accounts.ts"],"names":["ApiResource"],"mappings":";;;;AAgGA,MAAM,wBAAwBA,oBAA4B,CAAA;AAAA,EAEzD,OAAgB,IAA2B,GAAA,kBAAA;AAAA,EAE3C,MAAM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A,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACtI,EAEA,MAAM,QAAA,CAAS,gBAA2C,EAAA,MAAA,EAAmC,OAA2D,EAAA;AACvJ,IAAM,MAAA,iBAAA,GAAqB,iBAAoC,EAAM,IAAA,gBAAA;AACrE,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAe,EAAE,IAAA,EAAM,UAAW,EAAA,EAAG,CAAoB,iBAAA,EAAA,iBAAiB,CAAa,SAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC7H,EAGA,iBAAiB,QAA2C,EAAA;AAC3D,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,eAAgB,CAAA,IAAA;AAAA;AAC5D,EAGA,aAAa,EAAmD,EAAA;AAC/D,IAAO,OAAA,KAAA,CAAM,qBAAwC,EAAE,CAAA;AAAA;AACxD,EAEA,sBAAsB,GAAoC,EAAA;AACzD,IAAO,OAAA,KAAA,CAAM,qBAAyC,CAAA,GAAG,GAAG,CAAA;AAAA;AAC7D,EAGA,IAA2B,GAAA;AAC1B,IAAA,OAAO,eAAgB,CAAA,IAAA;AAAA;AAGzB;AAGA,MAAM,QAAA,GAAW,IAAI,eAAgB,EAAA;AACrC,IAAO,wBAAQ,GAAA","file":"carrier_accounts.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 { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype CarrierAccountType = 'carrier_accounts'\ntype CarrierAccountRel = ResourceRel & { type: CarrierAccountType }\ntype MarketRel = ResourceRel & { type: MarketType }\n\n\nexport type CarrierAccountSort = Pick<CarrierAccount, 'id' | 'name'> & ResourceSort\n// export type CarrierAccountFilter = Pick<CarrierAccount, 'id' | 'name' | 'easypost_type'> & ResourceFilter\n\n\ninterface CarrierAccount extends Resource {\n\t\n\treadonly type: CarrierAccountType\n\n\t/** \n\t * The carrier account internal name.\n\t * @example ```\"Accurate\"```\n\t */\n\tname: string\n\t/** \n\t * The Easypost service carrier type.\n\t * @example ```\"AccurateAccount\"```\n\t */\n\teasypost_type: string\n\t/** \n\t * The Easypost internal reference ID.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\teasypost_id?: string | null\n\t/** \n\t * The Easypost carrier accounts credentials fields.\n\t * @example ```{\"username\":\"xxxx\",\"password\":\"secret\"}```\n\t */\n\tcredentials: Record<string, any>\n\n\tmarket?: Market | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface CarrierAccountCreate extends ResourceCreate {\n\t\n\t/** \n\t * The carrier account internal name.\n\t * @example ```\"Accurate\"```\n\t */\n\tname: string\n\t/** \n\t * The Easypost service carrier type.\n\t * @example ```\"AccurateAccount\"```\n\t */\n\teasypost_type: string\n\t/** \n\t * The Easypost carrier accounts credentials fields.\n\t * @example ```{\"username\":\"xxxx\",\"password\":\"secret\"}```\n\t */\n\tcredentials: Record<string, any>\n\n\tmarket?: MarketRel | null\n\n}\n\n\ninterface CarrierAccountUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The carrier account internal name.\n\t * @example ```\"Accurate\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The Easypost service carrier type.\n\t * @example ```\"AccurateAccount\"```\n\t */\n\teasypost_type?: string | null\n\t/** \n\t * The Easypost carrier accounts credentials fields.\n\t * @example ```{\"username\":\"xxxx\",\"password\":\"secret\"}```\n\t */\n\tcredentials?: Record<string, any> | null\n\n\tmarket?: MarketRel | null\n\n}\n\n\nclass CarrierAccounts extends ApiResource<CarrierAccount> {\n\n\tstatic readonly TYPE: CarrierAccountType = 'carrier_accounts' as const\n\n\tasync create(resource: CarrierAccountCreate, params?: QueryParamsRetrieve<CarrierAccount>, options?: ResourcesConfig): Promise<CarrierAccount> {\n\t\treturn this.resources.create<CarrierAccountCreate, CarrierAccount>({ ...resource, type: CarrierAccounts.TYPE }, params, options)\n\t}\n\n\tasync update(resource: CarrierAccountUpdate, params?: QueryParamsRetrieve<CarrierAccount>, options?: ResourcesConfig): Promise<CarrierAccount> {\n\t\treturn this.resources.update<CarrierAccountUpdate, CarrierAccount>({ ...resource, type: CarrierAccounts.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: CarrierAccounts.TYPE } : id, options)\n\t}\n\n\tasync market(carrierAccountId: string | CarrierAccount, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\tconst _carrierAccountId = (carrierAccountId as CarrierAccount).id || carrierAccountId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `carrier_accounts/${_carrierAccountId}/market`, params, options) as unknown as Market\n\t}\n\n\tasync attachments(carrierAccountId: string | CarrierAccount, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _carrierAccountId = (carrierAccountId as CarrierAccount).id || carrierAccountId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `carrier_accounts/${_carrierAccountId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(carrierAccountId: string | CarrierAccount, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _carrierAccountId = (carrierAccountId as CarrierAccount).id || carrierAccountId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `carrier_accounts/${_carrierAccountId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisCarrierAccount(resource: any): resource is CarrierAccount {\n\t\treturn resource.type && (resource.type === CarrierAccounts.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CarrierAccountRel {\n\t\treturn super.relationshipOneToOne<CarrierAccountRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CarrierAccountRel[] {\n\t\treturn super.relationshipOneToMany<CarrierAccountRel>(...ids)\n\t}\n\n\n\ttype(): CarrierAccountType {\n\t\treturn CarrierAccounts.TYPE\n\t}\n\n}\n\n\nconst instance = new CarrierAccounts()\nexport default instance\n\nexport type { CarrierAccounts, CarrierAccount, CarrierAccountCreate, CarrierAccountUpdate, CarrierAccountType }\n"]}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { eO as CarrierAccount, eP as CarrierAccountCreate, eR as CarrierAccountSort, mJ as CarrierAccountType, eQ as CarrierAccountUpdate, ag as CarrierAccounts, af as default } from '../api-IwWtsAqE.cjs';
|
2
2
|
import '../client.cjs';
|
3
3
|
import '../interceptor-k15jXzf0.cjs';
|
4
4
|
import '../types.cjs';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { eO as CarrierAccount, eP as CarrierAccountCreate, eR as CarrierAccountSort, mJ as CarrierAccountType, eQ as CarrierAccountUpdate, ag as CarrierAccounts, af as default } from '../api-F1F37Dud.js';
|
2
2
|
import '../client.js';
|
3
3
|
import '../interceptor-k15jXzf0.js';
|
4
4
|
import '../types.js';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/resources/carrier_accounts.ts"],"names":[],"mappings":";;AAgGA,MAAM,wBAAwB,WAA4B,CAAA;AAAA,EAEzD,OAAgB,IAA2B,GAAA,kBAAA;AAAA,EAE3C,MAAM,MAAA,CAAO,QAAgC,EAAA,MAAA,EAA8C,OAAoD,EAAA;AAC9I,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA6C,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,eAAgB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAChI,EAEA,MAAM,MAAA,CAAO,QAAgC,EAAA,MAAA,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AA,EAAG,CAAoB,iBAAA,EAAA,iBAAiB,CAAa,SAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC7H,EAGA,iBAAiB,QAA2C,EAAA;AAC3D,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,eAAgB,CAAA,IAAA;AAAA;AAC5D,EAGA,aAAa,EAAmD,EAAA;AAC/D,IAAO,OAAA,KAAA,CAAM,qBAAwC,EAAE,CAAA;AAAA;AACxD,EAEA,sBAAsB,GAAoC,EAAA;AACzD,IAAO,OAAA,KAAA,CAAM,qBAAyC,CAAA,GAAG,GAAG,CAAA;AAAA;AAC7D,EAGA,IAA2B,GAAA;AAC1B,IAAA,OAAO,eAAgB,CAAA,IAAA;AAAA;AAGzB;AAGA,MAAM,QAAA,GAAW,IAAI,eAAgB,EAAA;AACrC,IAAO,wBAAQ,GAAA","file":"carrier_accounts.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 { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype CarrierAccountType = 'carrier_accounts'\ntype CarrierAccountRel = ResourceRel & { type: CarrierAccountType }\ntype MarketRel = ResourceRel & { type: MarketType }\n\n\nexport type CarrierAccountSort = Pick<CarrierAccount, 'id' | 'name'> & ResourceSort\n// export type CarrierAccountFilter = Pick<CarrierAccount, 'id' | 'name' | 'easypost_type'> & ResourceFilter\n\n\ninterface CarrierAccount extends Resource {\n\t\n\treadonly type: CarrierAccountType\n\n\t/** \n\t * The carrier account internal name.\n\t * @example ```\"Accurate\"```\n\t */\n\tname: string\n\t/** \n\t * The Easypost service carrier type.\n\t * @example ```\"AccurateAccount\"```\n\t */\n\teasypost_type: string\n\t/** \n\t * The Easypost internal reference ID.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\teasypost_id?: string | null\n\t/** \n\t * The Easypost carrier accounts credentials fields.\n\t * @example ```{\"username\":\"xxxx\",\"password\":\"secret\"}```\n\t */\n\tcredentials: Record<string, any>\n\n\tmarket?: Market | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface CarrierAccountCreate extends ResourceCreate {\n\t\n\t/** \n\t * The carrier account internal name.\n\t * @example ```\"Accurate\"```\n\t */\n\tname: string\n\t/** \n\t * The Easypost service carrier type.\n\t * @example ```\"AccurateAccount\"```\n\t */\n\teasypost_type: string\n\t/** \n\t * The Easypost carrier accounts credentials fields.\n\t * @example ```{\"username\":\"xxxx\",\"password\":\"secret\"}```\n\t */\n\tcredentials: Record<string, any>\n\n\tmarket?: MarketRel | null\n\n}\n\n\ninterface CarrierAccountUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The carrier account internal name.\n\t * @example ```\"Accurate\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The Easypost service carrier type.\n\t * @example ```\"AccurateAccount\"```\n\t */\n\teasypost_type?: string | null\n\t/** \n\t * The Easypost carrier accounts credentials fields.\n\t * @example ```{\"username\":\"xxxx\",\"password\":\"secret\"}```\n\t */\n\tcredentials?: Record<string, any> | null\n\n\tmarket?: MarketRel | null\n\n}\n\n\nclass CarrierAccounts extends ApiResource<CarrierAccount> {\n\n\tstatic readonly TYPE: CarrierAccountType = 'carrier_accounts' as const\n\n\tasync create(resource: CarrierAccountCreate, params?: QueryParamsRetrieve<CarrierAccount>, options?: ResourcesConfig): Promise<CarrierAccount> {\n\t\treturn this.resources.create<CarrierAccountCreate, CarrierAccount>({ ...resource, type: CarrierAccounts.TYPE }, params, options)\n\t}\n\n\tasync update(resource: CarrierAccountUpdate, params?: QueryParamsRetrieve<CarrierAccount>, options?: ResourcesConfig): Promise<CarrierAccount> {\n\t\treturn this.resources.update<CarrierAccountUpdate, CarrierAccount>({ ...resource, type: CarrierAccounts.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: CarrierAccounts.TYPE } : id, options)\n\t}\n\n\tasync market(carrierAccountId: string | CarrierAccount, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\tconst _carrierAccountId = (carrierAccountId as CarrierAccount).id || carrierAccountId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `carrier_accounts/${_carrierAccountId}/market`, params, options) as unknown as Market\n\t}\n\n\tasync attachments(carrierAccountId: string | CarrierAccount, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _carrierAccountId = (carrierAccountId as CarrierAccount).id || carrierAccountId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `carrier_accounts/${_carrierAccountId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(carrierAccountId: string | CarrierAccount, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _carrierAccountId = (carrierAccountId as CarrierAccount).id || carrierAccountId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `carrier_accounts/${_carrierAccountId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisCarrierAccount(resource: any): resource is CarrierAccount {\n\t\treturn resource.type && (resource.type === CarrierAccounts.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CarrierAccountRel {\n\t\treturn super.relationshipOneToOne<CarrierAccountRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CarrierAccountRel[] {\n\t\treturn super.relationshipOneToMany<CarrierAccountRel>(...ids)\n\t}\n\n\n\ttype(): CarrierAccountType {\n\t\treturn CarrierAccounts.TYPE\n\t}\n\n}\n\n\nconst instance = new CarrierAccounts()\nexport default instance\n\nexport type { CarrierAccount, CarrierAcc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;AAChK,IAAM,MAAA,iBAAA,GAAqB,iBAAoC,EAAM,IAAA,gBAAA;AACrE,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAkB,EAAE,IAAA,EAAM,aAAc,EAAA,EAAG,CAAoB,iBAAA,EAAA,iBAAiB,CAAgB,YAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACtI,EAEA,MAAM,QAAA,CAAS,gBAA2C,EAAA,MAAA,EAAmC,OAA2D,EAAA;AACvJ,IAAM,MAAA,iBAAA,GAAqB,iBAAoC,EAAM,IAAA,gBAAA;AACrE,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAe,EAAE,IAAA,EAAM,UAAW,EAAA,EAAG,CAAoB,iBAAA,EAAA,iBAAiB,CAAa,SAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC7H,EAGA,iBAAiB,QAA2C,EAAA;AAC3D,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,eAAgB,CAAA,IAAA;AAAA;AAC5D,EAGA,aAAa,EAAmD,EAAA;AAC/D,IAAO,OAAA,KAAA,CAAM,qBAAwC,EAAE,CAAA;AAAA;AACxD,EAEA,sBAAsB,GAAoC,EAAA;AACzD,IAAO,OAAA,KAAA,CAAM,qBAAyC,CAAA,GAAG,GAAG,CAAA;AAAA;AAC7D,EAGA,IAA2B,GAAA;AAC1B,IAAA,OAAO,eAAgB,CAAA,IAAA;AAAA;AAGzB;AAGA,MAAM,QAAA,GAAW,IAAI,eAAgB,EAAA;AACrC,IAAO,wBAAQ,GAAA","file":"carrier_accounts.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 { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype CarrierAccountType = 'carrier_accounts'\ntype CarrierAccountRel = ResourceRel & { type: CarrierAccountType }\ntype MarketRel = ResourceRel & { type: MarketType }\n\n\nexport type CarrierAccountSort = Pick<CarrierAccount, 'id' | 'name'> & ResourceSort\n// export type CarrierAccountFilter = Pick<CarrierAccount, 'id' | 'name' | 'easypost_type'> & ResourceFilter\n\n\ninterface CarrierAccount extends Resource {\n\t\n\treadonly type: CarrierAccountType\n\n\t/** \n\t * The carrier account internal name.\n\t * @example ```\"Accurate\"```\n\t */\n\tname: string\n\t/** \n\t * The Easypost service carrier type.\n\t * @example ```\"AccurateAccount\"```\n\t */\n\teasypost_type: string\n\t/** \n\t * The Easypost internal reference ID.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\teasypost_id?: string | null\n\t/** \n\t * The Easypost carrier accounts credentials fields.\n\t * @example ```{\"username\":\"xxxx\",\"password\":\"secret\"}```\n\t */\n\tcredentials: Record<string, any>\n\n\tmarket?: Market | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface CarrierAccountCreate extends ResourceCreate {\n\t\n\t/** \n\t * The carrier account internal name.\n\t * @example ```\"Accurate\"```\n\t */\n\tname: string\n\t/** \n\t * The Easypost service carrier type.\n\t * @example ```\"AccurateAccount\"```\n\t */\n\teasypost_type: string\n\t/** \n\t * The Easypost carrier accounts credentials fields.\n\t * @example ```{\"username\":\"xxxx\",\"password\":\"secret\"}```\n\t */\n\tcredentials: Record<string, any>\n\n\tmarket?: MarketRel | null\n\n}\n\n\ninterface CarrierAccountUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The carrier account internal name.\n\t * @example ```\"Accurate\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The Easypost service carrier type.\n\t * @example ```\"AccurateAccount\"```\n\t */\n\teasypost_type?: string | null\n\t/** \n\t * The Easypost carrier accounts credentials fields.\n\t * @example ```{\"username\":\"xxxx\",\"password\":\"secret\"}```\n\t */\n\tcredentials?: Record<string, any> | null\n\n\tmarket?: MarketRel | null\n\n}\n\n\nclass CarrierAccounts extends ApiResource<CarrierAccount> {\n\n\tstatic readonly TYPE: CarrierAccountType = 'carrier_accounts' as const\n\n\tasync create(resource: CarrierAccountCreate, params?: QueryParamsRetrieve<CarrierAccount>, options?: ResourcesConfig): Promise<CarrierAccount> {\n\t\treturn this.resources.create<CarrierAccountCreate, CarrierAccount>({ ...resource, type: CarrierAccounts.TYPE }, params, options)\n\t}\n\n\tasync update(resource: CarrierAccountUpdate, params?: QueryParamsRetrieve<CarrierAccount>, options?: ResourcesConfig): Promise<CarrierAccount> {\n\t\treturn this.resources.update<CarrierAccountUpdate, CarrierAccount>({ ...resource, type: CarrierAccounts.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: CarrierAccounts.TYPE } : id, options)\n\t}\n\n\tasync market(carrierAccountId: string | CarrierAccount, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\tconst _carrierAccountId = (carrierAccountId as CarrierAccount).id || carrierAccountId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `carrier_accounts/${_carrierAccountId}/market`, params, options) as unknown as Market\n\t}\n\n\tasync attachments(carrierAccountId: string | CarrierAccount, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _carrierAccountId = (carrierAccountId as CarrierAccount).id || carrierAccountId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `carrier_accounts/${_carrierAccountId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(carrierAccountId: string | CarrierAccount, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _carrierAccountId = (carrierAccountId as CarrierAccount).id || carrierAccountId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `carrier_accounts/${_carrierAccountId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisCarrierAccount(resource: any): resource is CarrierAccount {\n\t\treturn resource.type && (resource.type === CarrierAccounts.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CarrierAccountRel {\n\t\treturn super.relationshipOneToOne<CarrierAccountRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CarrierAccountRel[] {\n\t\treturn super.relationshipOneToMany<CarrierAccountRel>(...ids)\n\t}\n\n\n\ttype(): CarrierAccountType {\n\t\treturn CarrierAccounts.TYPE\n\t}\n\n}\n\n\nconst instance = new CarrierAccounts()\nexport default instance\n\nexport type { CarrierAccounts, CarrierAccount, CarrierAccountCreate, CarrierAccountUpdate, CarrierAccountType }\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/resources/checkout_com_gateways.ts"],"names":["ApiResource"],"mappings":";;;;AAgGA,MAAM,4BAA4BA,oBAAgC,CAAA;AAAA,EAEjE,OAAgB,IAA+B,GAAA,uBAAA;AAAA,EAE/C,MAAM,MAAA,CAAO,QAAoC,EAAA,MAAA,EAAkD,OAAwD,EAAA;AAC1J,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAqD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,mBAAoB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC5I,EAEA,MAAM,MAAA,CAAO,QAAoC,EAAA,MAAA,EAAkD,OAAwD,EAAA;AAC1J,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAqD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,mBAAoB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC5I,EAEA,MAAM,MAAO,CAAA,EAAA,EAAyB,OAA0C,EAAA;AAC/E,IAAA,MAAM,IAAK,CAAA,SAAA,CAAU,MAA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,OAAA,KAAA,CAAM,qBAA4C,EAAE,CAAA;AAAA;AAC5D,EAEA,sBAAsB,GAAwC,EAAA;AAC7D,IAAO,OAAA,KAAA,CAAM,qBAA6C,CAAA,GAAG,GAAG,CAAA;AAAA;AACjE,EAGA,IAA+B,GAAA;AAC9B,IAAA,OAAO,mBAAoB,CAAA,IAAA;AAAA;AAG7B;AAGA,MAAM,QAAA,GAAW,IAAI,mBAAoB,EAAA;AACzC,IAAO,6BAAQ,GAAA","file":"checkout_com_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 { CheckoutComPayment, CheckoutComPaymentType } from './checkout_com_payments'\n\n\ntype CheckoutComGatewayType = 'checkout_com_gateways'\ntype CheckoutComGatewayRel = ResourceRel & { type: CheckoutComGatewayType }\ntype CheckoutComPaymentRel = ResourceRel & { type: CheckoutComPaymentType }\n\n\nexport type CheckoutComGatewaySort = Pick<CheckoutComGateway, 'id' | 'name'> & ResourceSort\n// export type CheckoutComGatewayFilter = Pick<CheckoutComGateway, 'id' | 'name'> & ResourceFilter\n\n\ninterface CheckoutComGateway extends Resource {\n\t\n\treadonly type: CheckoutComGatewayType\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 gateway webhook endpoint ID, generated automatically.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\twebhook_endpoint_id?: string | null\n\t/** \n\t * The gateway webhook endpoint secret, generated automatically.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\twebhook_endpoint_secret?: string | null\n\t/** \n\t * The gateway webhook URL, generated automatically.\n\t * @example ```\"https://core.commercelayer.co/webhook_callbacks/checkout_com_gateways/xxxxx\"```\n\t */\n\twebhook_endpoint_url?: string | null\n\n\tpayment_methods?: PaymentMethod[] | null\n\tversions?: Version[] | null\n\tcheckout_com_payments?: CheckoutComPayment[] | null\n\n}\n\n\ninterface CheckoutComGatewayCreate 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 secret key.\n\t * @example ```\"sk_test_xxxx-yyyy-zzzz\"```\n\t */\n\tsecret_key: string\n\t/** \n\t * The gateway public key.\n\t * @example ```\"pk_test_xxxx-yyyy-zzzz\"```\n\t */\n\tpublic_key: string\n\n\tcheckout_com_payments?: CheckoutComPaymentRel[] | null\n\n}\n\n\ninterface CheckoutComGatewayUpdate 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 secret key.\n\t * @example ```\"sk_test_xxxx-yyyy-zzzz\"```\n\t */\n\tsecret_key?: string | null\n\t/** \n\t * The gateway public key.\n\t * @example ```\"pk_test_xxxx-yyyy-zzzz\"```\n\t */\n\tpublic_key?: string | null\n\n\tcheckout_com_payments?: CheckoutComPaymentRel[] | null\n\n}\n\n\nclass CheckoutComGateways extends ApiResource<CheckoutComGateway> {\n\n\tstatic readonly TYPE: CheckoutComGatewayType = 'checkout_com_gateways' as const\n\n\tasync create(resource: CheckoutComGatewayCreate, params?: QueryParamsRetrieve<CheckoutComGateway>, options?: ResourcesConfig): Promise<CheckoutComGateway> {\n\t\treturn this.resources.create<CheckoutComGatewayCreate, CheckoutComGateway>({ ...resource, type: CheckoutComGateways.TYPE }, params, options)\n\t}\n\n\tasync update(resource: CheckoutComGatewayUpdate, params?: QueryParamsRetrieve<CheckoutComGateway>, options?: ResourcesConfig): Promise<CheckoutComGateway> {\n\t\treturn this.resources.update<CheckoutComGatewayUpdate, CheckoutComGateway>({ ...resource, type: CheckoutComGateways.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: CheckoutComGateways.TYPE } : id, options)\n\t}\n\n\tasync payment_methods(checkoutComGatewayId: string | CheckoutComGateway, params?: QueryParamsList<PaymentMethod>, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>> {\n\t\tconst _checkoutComGatewayId = (checkoutComGatewayId as CheckoutComGateway).id || checkoutComGatewayId as string\n\t\treturn this.resources.fetch<PaymentMethod>({ type: 'payment_methods' }, `checkout_com_gateways/${_checkoutComGatewayId}/payment_methods`, params, options) as unknown as ListResponse<PaymentMethod>\n\t}\n\n\tasync versions(checkoutComGatewayId: string | CheckoutComGateway, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _checkoutComGatewayId = (checkoutComGatewayId as CheckoutComGateway).id || checkoutComGatewayId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `checkout_com_gateways/${_checkoutComGatewayId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync checkout_com_payments(checkoutComGatewayId: string | CheckoutComGateway, params?: QueryParamsList<CheckoutComPayment>, options?: ResourcesConfig): Promise<ListResponse<CheckoutComPayment>> {\n\t\tconst _checkoutComGatewayId = (checkoutComGatewayId as CheckoutComGateway).id || checkoutComGatewayId as string\n\t\treturn this.resources.fetch<CheckoutComPayment>({ type: 'checkout_com_payments' }, `checkout_com_gateways/${_checkoutComGatewayId}/checkout_com_payments`, params, options) as unknown as ListResponse<CheckoutComPayment>\n\t}\n\n\n\tisCheckoutComGateway(resource: any): resource is CheckoutComGateway {\n\t\treturn resource.type && (resource.type === CheckoutComGateways.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CheckoutComGatewayRel {\n\t\treturn super.relationshipOneToOne<CheckoutComGatewayRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CheckoutComGatewayRel[] {\n\t\treturn super.relationshipOneToMany<CheckoutComGatewayRel>(...ids)\n\t}\n\n\n\ttype(): CheckoutComGatewayType {\n\t\treturn CheckoutComGateways.TYPE\n\t}\n\n}\n\n\nconst instance = new CheckoutComGateways()\nexport default instance\n\nexport type { CheckoutComGateway, CheckoutComGatewayCreate, CheckoutComGatewayUpdate, CheckoutComGatewayType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/checkout_com_gateways.ts"],"names":["ApiResource"],"mappings":";;;;AAgGA,MAAM,4BAA4BA,oBAAgC,CAAA;AAAA,EAEjE,OAAgB,IAA+B,GAAA,uBAAA;AAAA,EAE/C,MAAM,MAAA,CAAO,QAAoC,EAAA,MAAA,EAAkD,OAAwD,EAAA;AAC1J,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAqD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,mBAAoB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC5I,EAEA,MAAM,MAAA,CAAO,QAAoC,EAAA,MAAA,EAAkD,OAAwD,EAAA;AAC1J,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAqD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,mBAAoB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC5I,EAEA,MAAM,MAAO,CAAA,EAAA,EAAyB,OAA0C,EAAA;AAC/E,IAAA,MAAM,IAAK,CAAA,SAAA,CAAU,MAAQ,CAAA,OAAO,EAAO,KAAA,QAAA,GAAW,EAAE,EAAA,EAAI,IAAM,EAAA,mBAAA,CAAoB,IAAK,EAAA,GAAI,IAAI,OAAO,CAAA;AAAA;AAC3G,EAEA,MAAM,eAAA,CAAgB,oBAAmD,EAAA,MAAA,EAAyC,OAAiE,EAAA;AAClL,IAAM,MAAA,qBAAA,GAAyB,qBAA4C,EAAM,IAAA,oBAAA;AACjF,IAAO,OAAA,IAAA,CAAK,SAAU,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AA","file":"checkout_com_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 { CheckoutComPayment, CheckoutComPaymentType } from './checkout_com_payments'\n\n\ntype CheckoutComGatewayType = 'checkout_com_gateways'\ntype CheckoutComGatewayRel = ResourceRel & { type: CheckoutComGatewayType }\ntype CheckoutComPaymentRel = ResourceRel & { type: CheckoutComPaymentType }\n\n\nexport type CheckoutComGatewaySort = Pick<CheckoutComGateway, 'id' | 'name'> & ResourceSort\n// export type CheckoutComGatewayFilter = Pick<CheckoutComGateway, 'id' | 'name'> & ResourceFilter\n\n\ninterface CheckoutComGateway extends Resource {\n\t\n\treadonly type: CheckoutComGatewayType\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 gateway webhook endpoint ID, generated automatically.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\twebhook_endpoint_id?: string | null\n\t/** \n\t * The gateway webhook endpoint secret, generated automatically.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\twebhook_endpoint_secret?: string | null\n\t/** \n\t * The gateway webhook URL, generated automatically.\n\t * @example ```\"https://core.commercelayer.co/webhook_callbacks/checkout_com_gateways/xxxxx\"```\n\t */\n\twebhook_endpoint_url?: string | null\n\n\tpayment_methods?: PaymentMethod[] | null\n\tversions?: Version[] | null\n\tcheckout_com_payments?: CheckoutComPayment[] | null\n\n}\n\n\ninterface CheckoutComGatewayCreate 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 secret key.\n\t * @example ```\"sk_test_xxxx-yyyy-zzzz\"```\n\t */\n\tsecret_key: string\n\t/** \n\t * The gateway public key.\n\t * @example ```\"pk_test_xxxx-yyyy-zzzz\"```\n\t */\n\tpublic_key: string\n\n\tcheckout_com_payments?: CheckoutComPaymentRel[] | null\n\n}\n\n\ninterface CheckoutComGatewayUpdate 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 secret key.\n\t * @example ```\"sk_test_xxxx-yyyy-zzzz\"```\n\t */\n\tsecret_key?: string | null\n\t/** \n\t * The gateway public key.\n\t * @example ```\"pk_test_xxxx-yyyy-zzzz\"```\n\t */\n\tpublic_key?: string | null\n\n\tcheckout_com_payments?: CheckoutComPaymentRel[] | null\n\n}\n\n\nclass CheckoutComGateways extends ApiResource<CheckoutComGateway> {\n\n\tstatic readonly TYPE: CheckoutComGatewayType = 'checkout_com_gateways' as const\n\n\tasync create(resource: CheckoutComGatewayCreate, params?: QueryParamsRetrieve<CheckoutComGateway>, options?: ResourcesConfig): Promise<CheckoutComGateway> {\n\t\treturn this.resources.create<CheckoutComGatewayCreate, CheckoutComGateway>({ ...resource, type: CheckoutComGateways.TYPE }, params, options)\n\t}\n\n\tasync update(resource: CheckoutComGatewayUpdate, params?: QueryParamsRetrieve<CheckoutComGateway>, options?: ResourcesConfig): Promise<CheckoutComGateway> {\n\t\treturn this.resources.update<CheckoutComGatewayUpdate, CheckoutComGateway>({ ...resource, type: CheckoutComGateways.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: CheckoutComGateways.TYPE } : id, options)\n\t}\n\n\tasync payment_methods(checkoutComGatewayId: string | CheckoutComGateway, params?: QueryParamsList<PaymentMethod>, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>> {\n\t\tconst _checkoutComGatewayId = (checkoutComGatewayId as CheckoutComGateway).id || checkoutComGatewayId as string\n\t\treturn this.resources.fetch<PaymentMethod>({ type: 'payment_methods' }, `checkout_com_gateways/${_checkoutComGatewayId}/payment_methods`, params, options) as unknown as ListResponse<PaymentMethod>\n\t}\n\n\tasync versions(checkoutComGatewayId: string | CheckoutComGateway, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _checkoutComGatewayId = (checkoutComGatewayId as CheckoutComGateway).id || checkoutComGatewayId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `checkout_com_gateways/${_checkoutComGatewayId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync checkout_com_payments(checkoutComGatewayId: string | CheckoutComGateway, params?: QueryParamsList<CheckoutComPayment>, options?: ResourcesConfig): Promise<ListResponse<CheckoutComPayment>> {\n\t\tconst _checkoutComGatewayId = (checkoutComGatewayId as CheckoutComGateway).id || checkoutComGatewayId as string\n\t\treturn this.resources.fetch<CheckoutComPayment>({ type: 'checkout_com_payments' }, `checkout_com_gateways/${_checkoutComGatewayId}/checkout_com_payments`, params, options) as unknown as ListResponse<CheckoutComPayment>\n\t}\n\n\n\tisCheckoutComGateway(resource: any): resource is CheckoutComGateway {\n\t\treturn resource.type && (resource.type === CheckoutComGateways.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CheckoutComGatewayRel {\n\t\treturn super.relationshipOneToOne<CheckoutComGatewayRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CheckoutComGatewayRel[] {\n\t\treturn super.relationshipOneToMany<CheckoutComGatewayRel>(...ids)\n\t}\n\n\n\ttype(): CheckoutComGatewayType {\n\t\treturn CheckoutComGateways.TYPE\n\t}\n\n}\n\n\nconst instance = new CheckoutComGateways()\nexport default instance\n\nexport type { CheckoutComGateways, CheckoutComGateway, CheckoutComGatewayCreate, CheckoutComGatewayUpdate, CheckoutComGatewayType }\n"]}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { eS as CheckoutComGateway, eT as CheckoutComGatewayCreate, eV as CheckoutComGatewaySort, nd as CheckoutComGatewayType, eU as CheckoutComGatewayUpdate, ai as CheckoutComGateways, ah as default } from '../api-IwWtsAqE.cjs';
|
2
2
|
import '../client.cjs';
|
3
3
|
import '../interceptor-k15jXzf0.cjs';
|
4
4
|
import '../types.cjs';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { eS as CheckoutComGateway, eT as CheckoutComGatewayCreate, eV as CheckoutComGatewaySort, nd as CheckoutComGatewayType, eU as CheckoutComGatewayUpdate, ai as CheckoutComGateways, ah as default } from '../api-F1F37Dud.js';
|
2
2
|
import '../client.js';
|
3
3
|
import '../interceptor-k15jXzf0.js';
|
4
4
|
import '../types.js';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/resources/checkout_com_gateways.ts"],"names":[],"mappings":";;AAgGA,MAAM,4BAA4B,WAAgC,CAAA;AAAA,EAEjE,OAAgB,IAA+B,GAAA,uBAAA;AAAA,EAE/C,MAAM,MAAA,CAAO,QAAoC,EAAA,MAAA,EAAkD,OAAwD,EAAA;AAC1J,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAqD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,mBAAoB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC5I,EAEA,MAAM,MAAA,CAAO,QAAoC,EAAA,MAAA,EAAkD,OAAwD,EAAA;AAC1J,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAqD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,mBAAoB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC5I,EAEA,MAAM,MAAO,CAAA,EAAA,EAAyB,OAA0C,EAAA;AAC/E,IAAA,MAAM,IAAK,CAAA,SAAA,CAAU,MAAQ,CAAA,OAAO,EAAO,KAAA,QAAA,GAAW,EAAE,EAA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5D,EAEA,sBAAsB,GAAwC,EAAA;AAC7D,IAAO,OAAA,KAAA,CAAM,qBAA6C,CAAA,GAAG,GAAG,CAAA;AAAA;AACjE,EAGA,IAA+B,GAAA;AAC9B,IAAA,OAAO,mBAAoB,CAAA,IAAA;AAAA;AAG7B;AAGA,MAAM,QAAA,GAAW,IAAI,mBAAoB,EAAA;AACzC,IAAO,6BAAQ,GAAA","file":"checkout_com_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 { CheckoutComPayment, CheckoutComPaymentType } from './checkout_com_payments'\n\n\ntype CheckoutComGatewayType = 'checkout_com_gateways'\ntype CheckoutComGatewayRel = ResourceRel & { type: CheckoutComGatewayType }\ntype CheckoutComPaymentRel = ResourceRel & { type: CheckoutComPaymentType }\n\n\nexport type CheckoutComGatewaySort = Pick<CheckoutComGateway, 'id' | 'name'> & ResourceSort\n// export type CheckoutComGatewayFilter = Pick<CheckoutComGateway, 'id' | 'name'> & ResourceFilter\n\n\ninterface CheckoutComGateway extends Resource {\n\t\n\treadonly type: CheckoutComGatewayType\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 gateway webhook endpoint ID, generated automatically.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\twebhook_endpoint_id?: string | null\n\t/** \n\t * The gateway webhook endpoint secret, generated automatically.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\twebhook_endpoint_secret?: string | null\n\t/** \n\t * The gateway webhook URL, generated automatically.\n\t * @example ```\"https://core.commercelayer.co/webhook_callbacks/checkout_com_gateways/xxxxx\"```\n\t */\n\twebhook_endpoint_url?: string | null\n\n\tpayment_methods?: PaymentMethod[] | null\n\tversions?: Version[] | null\n\tcheckout_com_payments?: CheckoutComPayment[] | null\n\n}\n\n\ninterface CheckoutComGatewayCreate 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 secret key.\n\t * @example ```\"sk_test_xxxx-yyyy-zzzz\"```\n\t */\n\tsecret_key: string\n\t/** \n\t * The gateway public key.\n\t * @example ```\"pk_test_xxxx-yyyy-zzzz\"```\n\t */\n\tpublic_key: string\n\n\tcheckout_com_payments?: CheckoutComPaymentRel[] | null\n\n}\n\n\ninterface CheckoutComGatewayUpdate 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 secret key.\n\t * @example ```\"sk_test_xxxx-yyyy-zzzz\"```\n\t */\n\tsecret_key?: string | null\n\t/** \n\t * The gateway public key.\n\t * @example ```\"pk_test_xxxx-yyyy-zzzz\"```\n\t */\n\tpublic_key?: string | null\n\n\tcheckout_com_payments?: CheckoutComPaymentRel[] | null\n\n}\n\n\nclass CheckoutComGateways extends ApiResource<CheckoutComGateway> {\n\n\tstatic readonly TYPE: CheckoutComGatewayType = 'checkout_com_gateways' as const\n\n\tasync create(resource: CheckoutComGatewayCreate, params?: QueryParamsRetrieve<CheckoutComGateway>, options?: ResourcesConfig): Promise<CheckoutComGateway> {\n\t\treturn this.resources.create<CheckoutComGatewayCreate, CheckoutComGateway>({ ...resource, type: CheckoutComGateways.TYPE }, params, options)\n\t}\n\n\tasync update(resource: CheckoutComGatewayUpdate, params?: QueryParamsRetrieve<CheckoutComGateway>, options?: ResourcesConfig): Promise<CheckoutComGateway> {\n\t\treturn this.resources.update<CheckoutComGatewayUpdate, CheckoutComGateway>({ ...resource, type: CheckoutComGateways.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: CheckoutComGateways.TYPE } : id, options)\n\t}\n\n\tasync payment_methods(checkoutComGatewayId: string | CheckoutComGateway, params?: QueryParamsList<PaymentMethod>, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>> {\n\t\tconst _checkoutComGatewayId = (checkoutComGatewayId as CheckoutComGateway).id || checkoutComGatewayId as string\n\t\treturn this.resources.fetch<PaymentMethod>({ type: 'payment_methods' }, `checkout_com_gateways/${_checkoutComGatewayId}/payment_methods`, params, options) as unknown as ListResponse<PaymentMethod>\n\t}\n\n\tasync versions(checkoutComGatewayId: string | CheckoutComGateway, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _checkoutComGatewayId = (checkoutComGatewayId as CheckoutComGateway).id || checkoutComGatewayId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `checkout_com_gateways/${_checkoutComGatewayId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync checkout_com_payments(checkoutComGatewayId: string | CheckoutComGateway, params?: QueryParamsList<CheckoutComPayment>, options?: ResourcesConfig): Promise<ListResponse<CheckoutComPayment>> {\n\t\tconst _checkoutComGatewayId = (checkoutComGatewayId as CheckoutComGateway).id || checkoutComGatewayId as string\n\t\treturn this.resources.fetch<CheckoutComPayment>({ type: 'checkout_com_payments' }, `checkout_com_gateways/${_checkoutComGatewayId}/checkout_com_payments`, params, options) as unknown as ListResponse<CheckoutComPayment>\n\t}\n\n\n\tisCheckoutComGateway(resource: any): resource is CheckoutComGateway {\n\t\treturn resource.type && (resource.type === CheckoutComGateways.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CheckoutComGatewayRel {\n\t\treturn super.relationshipOneToOne<CheckoutComGatewayRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CheckoutComGatewayRel[] {\n\t\treturn super.relationshipOneToMany<CheckoutComGatewayRel>(...ids)\n\t}\n\n\n\ttype(): CheckoutComGatewayType {\n\t\treturn CheckoutComGateways.TYPE\n\t}\n\n}\n\n\nconst instance = new CheckoutComGateways()\nexport default instance\n\nexport type { CheckoutComGateway, CheckoutComGatewayCreate, CheckoutComGatewayUpdate, CheckoutComGatewayType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/checkout_com_gateways.ts"],"names":[],"mappings":";;AAgGA,MAAM,4BAA4B,WAAgC,CAAA;AAAA,EAEjE,OAAgB,IAA+B,GAAA,uBAAA;AAAA,EAE/C,MAAM,MAAA,CAAO,QAAoC,EAAA,MAAA,EAAkD,OAAwD,EAAA;AAC1J,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAqD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,mBAAoB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC5I,EAEA,MAAM,MAAA,CAAO,QAAoC,EAAA,MAAA,EAAkD,OAAwD,EAAA;AAC1J,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAqD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,mBAAoB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC5I,EAEA,MAAM,MAAO,CAAA,EAAA,EAAyB,OAA0C,EAAA;AAC/E,IAAA,MAAM,IAAK,CAAA,SAAA,CAAU,MAAQ,CAAA,OAAO,EAAO,KAAA,QAAA,GAAW,EAAE,EAAA,EAAI,IAAM,EAAA,mBAAA,CAAoB,IAAK,EAAA,GAAI,IAAI,OAAO,CAAA;AAAA;AAC3G,EAEA,MAAM,eAAA,CAAgB,oBAAmD,EAAA,MAAA,EAAyC,OAAiE,EAAA;AAClL,IAAM,MAAA,qBAAA,GAAyB,qBAA4C,EAAM,IAAA,oBAAA;AACjF,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAqB,EAAE,IAAA,EAAM,iBAAkB,EAAA,EAAG,CAAyB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ceCreate, 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 { CheckoutComPayment, CheckoutComPaymentType } from './checkout_com_payments'\n\n\ntype CheckoutComGatewayType = 'checkout_com_gateways'\ntype CheckoutComGatewayRel = ResourceRel & { type: CheckoutComGatewayType }\ntype CheckoutComPaymentRel = ResourceRel & { type: CheckoutComPaymentType }\n\n\nexport type CheckoutComGatewaySort = Pick<CheckoutComGateway, 'id' | 'name'> & ResourceSort\n// export type CheckoutComGatewayFilter = Pick<CheckoutComGateway, 'id' | 'name'> & ResourceFilter\n\n\ninterface CheckoutComGateway extends Resource {\n\t\n\treadonly type: CheckoutComGatewayType\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 gateway webhook endpoint ID, generated automatically.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\twebhook_endpoint_id?: string | null\n\t/** \n\t * The gateway webhook endpoint secret, generated automatically.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\twebhook_endpoint_secret?: string | null\n\t/** \n\t * The gateway webhook URL, generated automatically.\n\t * @example ```\"https://core.commercelayer.co/webhook_callbacks/checkout_com_gateways/xxxxx\"```\n\t */\n\twebhook_endpoint_url?: string | null\n\n\tpayment_methods?: PaymentMethod[] | null\n\tversions?: Version[] | null\n\tcheckout_com_payments?: CheckoutComPayment[] | null\n\n}\n\n\ninterface CheckoutComGatewayCreate 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 secret key.\n\t * @example ```\"sk_test_xxxx-yyyy-zzzz\"```\n\t */\n\tsecret_key: string\n\t/** \n\t * The gateway public key.\n\t * @example ```\"pk_test_xxxx-yyyy-zzzz\"```\n\t */\n\tpublic_key: string\n\n\tcheckout_com_payments?: CheckoutComPaymentRel[] | null\n\n}\n\n\ninterface CheckoutComGatewayUpdate 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 secret key.\n\t * @example ```\"sk_test_xxxx-yyyy-zzzz\"```\n\t */\n\tsecret_key?: string | null\n\t/** \n\t * The gateway public key.\n\t * @example ```\"pk_test_xxxx-yyyy-zzzz\"```\n\t */\n\tpublic_key?: string | null\n\n\tcheckout_com_payments?: CheckoutComPaymentRel[] | null\n\n}\n\n\nclass CheckoutComGateways extends ApiResource<CheckoutComGateway> {\n\n\tstatic readonly TYPE: CheckoutComGatewayType = 'checkout_com_gateways' as const\n\n\tasync create(resource: CheckoutComGatewayCreate, params?: QueryParamsRetrieve<CheckoutComGateway>, options?: ResourcesConfig): Promise<CheckoutComGateway> {\n\t\treturn this.resources.create<CheckoutComGatewayCreate, CheckoutComGateway>({ ...resource, type: CheckoutComGateways.TYPE }, params, options)\n\t}\n\n\tasync update(resource: CheckoutComGatewayUpdate, params?: QueryParamsRetrieve<CheckoutComGateway>, options?: ResourcesConfig): Promise<CheckoutComGateway> {\n\t\treturn this.resources.update<CheckoutComGatewayUpdate, CheckoutComGateway>({ ...resource, type: CheckoutComGateways.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: CheckoutComGateways.TYPE } : id, options)\n\t}\n\n\tasync payment_methods(checkoutComGatewayId: string | CheckoutComGateway, params?: QueryParamsList<PaymentMethod>, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>> {\n\t\tconst _checkoutComGatewayId = (checkoutComGatewayId as CheckoutComGateway).id || checkoutComGatewayId as string\n\t\treturn this.resources.fetch<PaymentMethod>({ type: 'payment_methods' }, `checkout_com_gateways/${_checkoutComGatewayId}/payment_methods`, params, options) as unknown as ListResponse<PaymentMethod>\n\t}\n\n\tasync versions(checkoutComGatewayId: string | CheckoutComGateway, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _checkoutComGatewayId = (checkoutComGatewayId as CheckoutComGateway).id || checkoutComGatewayId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `checkout_com_gateways/${_checkoutComGatewayId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync checkout_com_payments(checkoutComGatewayId: string | CheckoutComGateway, params?: QueryParamsList<CheckoutComPayment>, options?: ResourcesConfig): Promise<ListResponse<CheckoutComPayment>> {\n\t\tconst _checkoutComGatewayId = (checkoutComGatewayId as CheckoutComGateway).id || checkoutComGatewayId as string\n\t\treturn this.resources.fetch<CheckoutComPayment>({ type: 'checkout_com_payments' }, `checkout_com_gateways/${_checkoutComGatewayId}/checkout_com_payments`, params, options) as unknown as ListResponse<CheckoutComPayment>\n\t}\n\n\n\tisCheckoutComGateway(resource: any): resource is CheckoutComGateway {\n\t\treturn resource.type && (resource.type === CheckoutComGateways.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CheckoutComGatewayRel {\n\t\treturn super.relationshipOneToOne<CheckoutComGatewayRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CheckoutComGatewayRel[] {\n\t\treturn super.relationshipOneToMany<CheckoutComGatewayRel>(...ids)\n\t}\n\n\n\ttype(): CheckoutComGatewayType {\n\t\treturn CheckoutComGateways.TYPE\n\t}\n\n}\n\n\nconst instance = new CheckoutComGateways()\nexport default instance\n\nexport type { CheckoutComGateways, CheckoutComGateway, CheckoutComGatewayCreate, CheckoutComGatewayUpdate, CheckoutComGatewayType }\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/resources/checkout_com_payments.ts"],"names":["ApiResource"],"mappings":";;;;AAqKA,MAAM,4BAA4BA,oBAAgC,CAAA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,EAAA;AAC7D,IAAO,OAAA,KAAA,CAAM,qBAA6C,CAAA,GAAG,GAAG,CAAA;AAAA;AACjE,EAGA,IAA+B,GAAA;AAC9B,IAAA,OAAO,mBAAoB,CAAA,IAAA;AAAA;AAG7B;AAGA,MAAM,QAAA,GAAW,IAAI,mBAAoB,EAAA;AACzC,IAAO,6BAAQ,GAAA","file":"checkout_com_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 CheckoutComPaymentType = 'checkout_com_payments'\ntype CheckoutComPaymentRel = ResourceRel & { type: CheckoutComPaymentType }\ntype OrderRel = ResourceRel & { type: OrderType }\n\n\nexport type CheckoutComPaymentSort = Pick<CheckoutComPayment, 'id'> & ResourceSort\n// export type CheckoutComPaymentFilter = Pick<CheckoutComPayment, 'id'> & ResourceFilter\n\n\ninterface CheckoutComPayment extends Resource {\n\t\n\treadonly type: CheckoutComPaymentType\n\n\t/** \n\t * The Checkout.com publishable API key.\n\t * @example ```\"pk_test_xxxx-yyyy-zzzz\"```\n\t */\n\tpublic_key?: string | null\n\t/** \n\t * The payment source type.\n\t * @example ```\"token\"```\n\t */\n\tpayment_type: string\n\t/** \n\t * The Checkout.com card or digital wallet token.\n\t * @example ```\"tok_4gzeau5o2uqubbk6fufs3m7p54\"```\n\t */\n\ttoken: string\n\t/** \n\t * A payment session ID used to obtain the details.\n\t * @example ```\"sid_y3oqhf46pyzuxjbcn2giaqnb44\"```\n\t */\n\tsession_id?: string | null\n\t/** \n\t * The URL to redirect your customer upon 3DS succeeded authentication.\n\t * @example ```\"http://commercelayer.dev/checkout_com/success\"```\n\t */\n\tsuccess_url?: string | null\n\t/** \n\t * The URL to redirect your customer upon 3DS failed authentication.\n\t * @example ```\"http://commercelayer.dev/checkout_com/failure\"```\n\t */\n\tfailure_url?: string | null\n\t/** \n\t * The payment source identifier that can be used for subsequent payments.\n\t * @example ```\"src_nwd3m4in3hkuddfpjsaevunhdy\"```\n\t */\n\tsource_id?: string | null\n\t/** \n\t * The customer's unique identifier. This can be passed as a source when making a payment.\n\t * @example ```\"cus_udst2tfldj6upmye2reztkmm4i\"```\n\t */\n\tcustomer_token?: string | null\n\t/** \n\t * The URI that the customer should be redirected to in order to complete the payment.\n\t * @example ```\"https://api.checkout.com/3ds/pay_mbabizu24mvu3mela5njyhpit4\"```\n\t */\n\tredirect_uri?: string | null\n\t/** \n\t * The Checkout.com payment response, used to fetch internal data.\n\t * @example ```{\"foo\":\"bar\"}```\n\t */\n\tpayment_response?: Record<string, any> | null\n\t/** \n\t * Indicates if the order current amount differs form the one of the associated authorization.\n\t */\n\tmismatched_amounts?: boolean | null\n\t/** \n\t * Information about the payment instrument used in the transaction.\n\t * @example ```{\"issuer\":\"cl bank\",\"card_type\":\"visa\"}```\n\t */\n\tpayment_instrument?: Record<string, any> | null\n\n\torder?: Order | null\n\tpayment_gateway?: PaymentGateway | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface CheckoutComPaymentCreate extends ResourceCreate {\n\t\n\t/** \n\t * The payment source type.\n\t * @example ```\"token\"```\n\t */\n\tpayment_type: string\n\t/** \n\t * The Checkout.com card or digital wallet token.\n\t * @example ```\"tok_4gzeau5o2uqubbk6fufs3m7p54\"```\n\t */\n\ttoken: string\n\t/** \n\t * A payment session ID used to obtain the details.\n\t * @example ```\"sid_y3oqhf46pyzuxjbcn2giaqnb44\"```\n\t */\n\tsession_id?: string | null\n\t/** \n\t * The URL to redirect your customer upon 3DS succeeded authentication.\n\t * @example ```\"http://commercelayer.dev/checkout_com/success\"```\n\t */\n\tsuccess_url?: string | null\n\t/** \n\t * The URL to redirect your customer upon 3DS failed authentication.\n\t * @example ```\"http://commercelayer.dev/checkout_com/failure\"```\n\t */\n\tfailure_url?: string | null\n\n\torder: OrderRel\n\n}\n\n\ninterface CheckoutComPaymentUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The payment source type.\n\t * @example ```\"token\"```\n\t */\n\tpayment_type?: string | null\n\t/** \n\t * The Checkout.com card or digital wallet token.\n\t * @example ```\"tok_4gzeau5o2uqubbk6fufs3m7p54\"```\n\t */\n\ttoken?: string | null\n\t/** \n\t * A payment session ID used to obtain the details.\n\t * @example ```\"sid_y3oqhf46pyzuxjbcn2giaqnb44\"```\n\t */\n\tsession_id?: string | null\n\t/** \n\t * The URL to redirect your customer upon 3DS succeeded authentication.\n\t * @example ```\"http://commercelayer.dev/checkout_com/success\"```\n\t */\n\tsuccess_url?: string | null\n\t/** \n\t * The URL to redirect your customer upon 3DS failed authentication.\n\t * @example ```\"http://commercelayer.dev/checkout_com/failure\"```\n\t */\n\tfailure_url?: string | null\n\t/** \n\t * Send this attribute if you want to send additional details the payment request (i.e. upon 3DS check).\n\t * @example ```true```\n\t */\n\t_details?: boolean | null\n\t/** \n\t * Send this attribute if you want to refresh all the pending transactions, can be used as webhooks fallback logic.\n\t * @example ```true```\n\t */\n\t_refresh?: boolean | null\n\n\torder?: OrderRel | null\n\n}\n\n\nclass CheckoutComPayments extends ApiResource<CheckoutComPayment> {\n\n\tstatic readonly TYPE: CheckoutComPaymentType = 'checkout_com_payments' as const\n\n\tasync create(resource: CheckoutComPaymentCreate, params?: QueryParamsRetrieve<CheckoutComPayment>, options?: ResourcesConfig): Promise<CheckoutComPayment> {\n\t\treturn this.resources.create<CheckoutComPaymentCreate, CheckoutComPayment>({ ...resource, type: CheckoutComPayments.TYPE }, params, options)\n\t}\n\n\tasync update(resource: CheckoutComPaymentUpdate, params?: QueryParamsRetrieve<CheckoutComPayment>, options?: ResourcesConfig): Promise<CheckoutComPayment> {\n\t\treturn this.resources.update<CheckoutComPaymentUpdate, CheckoutComPayment>({ ...resource, type: CheckoutComPayments.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: CheckoutComPayments.TYPE } : id, options)\n\t}\n\n\tasync order(checkoutComPaymentId: string | CheckoutComPayment, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _checkoutComPaymentId = (checkoutComPaymentId as CheckoutComPayment).id || checkoutComPaymentId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `checkout_com_payments/${_checkoutComPaymentId}/order`, params, options) as unknown as Order\n\t}\n\n\tasync payment_gateway(checkoutComPaymentId: string | CheckoutComPayment, params?: QueryParamsRetrieve<PaymentGateway>, options?: ResourcesConfig): Promise<PaymentGateway> {\n\t\tconst _checkoutComPaymentId = (checkoutComPaymentId as CheckoutComPayment).id || checkoutComPaymentId as string\n\t\treturn this.resources.fetch<PaymentGateway>({ type: 'payment_gateways' }, `checkout_com_payments/${_checkoutComPaymentId}/payment_gateway`, params, options) as unknown as PaymentGateway\n\t}\n\n\tasync versions(checkoutComPaymentId: string | CheckoutComPayment, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _checkoutComPaymentId = (checkoutComPaymentId as CheckoutComPayment).id || checkoutComPaymentId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `checkout_com_payments/${_checkoutComPaymentId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _details(id: string | CheckoutComPayment, params?: QueryParamsRetrieve<CheckoutComPayment>, options?: ResourcesConfig): Promise<CheckoutComPayment> {\n\t\treturn this.resources.update<CheckoutComPaymentUpdate, CheckoutComPayment>({ id: (typeof id === 'string')? id: id.id, type: CheckoutComPayments.TYPE, _details: true }, params, options)\n\t}\n\n\tasync _refresh(id: string | CheckoutComPayment, params?: QueryParamsRetrieve<CheckoutComPayment>, options?: ResourcesConfig): Promise<CheckoutComPayment> {\n\t\treturn this.resources.update<CheckoutComPaymentUpdate, CheckoutComPayment>({ id: (typeof id === 'string')? id: id.id, type: CheckoutComPayments.TYPE, _refresh: true }, params, options)\n\t}\n\n\n\tisCheckoutComPayment(resource: any): resource is CheckoutComPayment {\n\t\treturn resource.type && (resource.type === CheckoutComPayments.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CheckoutComPaymentRel {\n\t\treturn super.relationshipOneToOne<CheckoutComPaymentRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CheckoutComPaymentRel[] {\n\t\treturn super.relationshipOneToMany<CheckoutComPaymentRel>(...ids)\n\t}\n\n\n\ttype(): CheckoutComPaymentType {\n\t\treturn CheckoutComPayments.TYPE\n\t}\n\n}\n\n\nconst instance = new CheckoutComPayments()\nexport default instance\n\nexport type { CheckoutComPayment, CheckoutComPaymentCreate, CheckoutComPaymentUpdate, CheckoutComPaymentType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/checkout_com_payments.ts"],"names":["ApiResource"],"mappings":";;;;AAqKA,MAAM,4BAA4BA,oBAAgC,CAAA;AAAA,EAEjE,OAAgB,IAA+B,GAAA,uBAAA;AAAA,EAE/C,MAAM,MAAA,CAAO,QAAoC,EAAA,MAAA,EAAkD,OAAwD,EAAA;AAC1J,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAqD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,mBAAoB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC5I,EAEA,MAAM,MAAA,CAAO,QAAoC,EAAA,MAAA,EAAkD,OAAwD,EAAA;AAC1J,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAqD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,mBAAoB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC5I,EAEA,MAAM,MAAO,CAAA,EAAA,EAAyB,OAA0C,EAAA;AAC/E,IAAA,M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O,OAAO,QAAW,GAAA,EAAA,GAAI,EAAG,CAAA,EAAA,EAAI,MAAM,mBAAoB,CAAA,IAAA,EAAM,UAAU,IAAK,EAAA,EAAG,QAAQ,OAAO,CAAA;AAAA;AACxL,EAEA,MAAM,QAAA,CAAS,EAAiC,EAAA,MAAA,EAAkD,OAAwD,EAAA;AACzJ,IAAA,OAAO,KAAK,SAAU,CAAA,MAAA,CAAqD,EAAE,EAAK,EAAA,OAAO,OAAO,QAAW,GAAA,EAAA,GAAI,EAAG,CAAA,EAAA,EAAI,MAAM,mBAAoB,CAAA,IAAA,EAAM,UAAU,IAAK,EAAA,EAAG,QAAQ,OAAO,CAAA;AAAA;AACxL,EAGA,qBAAqB,QAA+C,EAAA;AACnE,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,mBAAoB,CAAA,IAAA;AAAA;AAChE,EAGA,aAAa,EAAuD,EAAA;AACnE,IAAO,OAAA,KAAA,CAAM,qBAA4C,EAAE,CAAA;AAAA;AAC5D,EAEA,sBAAsB,GAAwC,EAAA;AAC7D,IAAO,OAAA,KAAA,CAAM,qBAA6C,CAAA,GAAG,GAAG,CAAA;AAAA;AACjE,EAGA,IAA+B,GAAA;AAC9B,IAAA,OAAO,mBAAoB,CAAA,IAAA;AAAA;AAG7B;AAGA,MAAM,QAAA,GAAW,IAAI,mBAAoB,EAAA;AACzC,IAAO,6BAAQ,GAAA","file":"checkout_com_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 CheckoutComPaymentType = 'checkout_com_payments'\ntype CheckoutComPaymentRel = ResourceRel & { type: CheckoutComPaymentType }\ntype OrderRel = ResourceRel & { type: OrderType }\n\n\nexport type CheckoutComPaymentSort = Pick<CheckoutComPayment, 'id'> & ResourceSort\n// export type CheckoutComPaymentFilter = Pick<CheckoutComPayment, 'id'> & ResourceFilter\n\n\ninterface CheckoutComPayment extends Resource {\n\t\n\treadonly type: CheckoutComPaymentType\n\n\t/** \n\t * The Checkout.com publishable API key.\n\t * @example ```\"pk_test_xxxx-yyyy-zzzz\"```\n\t */\n\tpublic_key?: string | null\n\t/** \n\t * The payment source type.\n\t * @example ```\"token\"```\n\t */\n\tpayment_type: string\n\t/** \n\t * The Checkout.com card or digital wallet token.\n\t * @example ```\"tok_4gzeau5o2uqubbk6fufs3m7p54\"```\n\t */\n\ttoken: string\n\t/** \n\t * A payment session ID used to obtain the details.\n\t * @example ```\"sid_y3oqhf46pyzuxjbcn2giaqnb44\"```\n\t */\n\tsession_id?: string | null\n\t/** \n\t * The URL to redirect your customer upon 3DS succeeded authentication.\n\t * @example ```\"http://commercelayer.dev/checkout_com/success\"```\n\t */\n\tsuccess_url?: string | null\n\t/** \n\t * The URL to redirect your customer upon 3DS failed authentication.\n\t * @example ```\"http://commercelayer.dev/checkout_com/failure\"```\n\t */\n\tfailure_url?: string | null\n\t/** \n\t * The payment source identifier that can be used for subsequent payments.\n\t * @example ```\"src_nwd3m4in3hkuddfpjsaevunhdy\"```\n\t */\n\tsource_id?: string | null\n\t/** \n\t * The customer's unique identifier. This can be passed as a source when making a payment.\n\t * @example ```\"cus_udst2tfldj6upmye2reztkmm4i\"```\n\t */\n\tcustomer_token?: string | null\n\t/** \n\t * The URI that the customer should be redirected to in order to complete the payment.\n\t * @example ```\"https://api.checkout.com/3ds/pay_mbabizu24mvu3mela5njyhpit4\"```\n\t */\n\tredirect_uri?: string | null\n\t/** \n\t * The Checkout.com payment response, used to fetch internal data.\n\t * @example ```{\"foo\":\"bar\"}```\n\t */\n\tpayment_response?: Record<string, any> | null\n\t/** \n\t * Indicates if the order current amount differs form the one of the associated authorization.\n\t */\n\tmismatched_amounts?: boolean | null\n\t/** \n\t * Information about the payment instrument used in the transaction.\n\t * @example ```{\"issuer\":\"cl bank\",\"card_type\":\"visa\"}```\n\t */\n\tpayment_instrument?: Record<string, any> | null\n\n\torder?: Order | null\n\tpayment_gateway?: PaymentGateway | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface CheckoutComPaymentCreate extends ResourceCreate {\n\t\n\t/** \n\t * The payment source type.\n\t * @example ```\"token\"```\n\t */\n\tpayment_type: string\n\t/** \n\t * The Checkout.com card or digital wallet token.\n\t * @example ```\"tok_4gzeau5o2uqubbk6fufs3m7p54\"```\n\t */\n\ttoken: string\n\t/** \n\t * A payment session ID used to obtain the details.\n\t * @example ```\"sid_y3oqhf46pyzuxjbcn2giaqnb44\"```\n\t */\n\tsession_id?: string | null\n\t/** \n\t * The URL to redirect your customer upon 3DS succeeded authentication.\n\t * @example ```\"http://commercelayer.dev/checkout_com/success\"```\n\t */\n\tsuccess_url?: string | null\n\t/** \n\t * The URL to redirect your customer upon 3DS failed authentication.\n\t * @example ```\"http://commercelayer.dev/checkout_com/failure\"```\n\t */\n\tfailure_url?: string | null\n\n\torder: OrderRel\n\n}\n\n\ninterface CheckoutComPaymentUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The payment source type.\n\t * @example ```\"token\"```\n\t */\n\tpayment_type?: string | null\n\t/** \n\t * The Checkout.com card or digital wallet token.\n\t * @example ```\"tok_4gzeau5o2uqubbk6fufs3m7p54\"```\n\t */\n\ttoken?: string | null\n\t/** \n\t * A payment session ID used to obtain the details.\n\t * @example ```\"sid_y3oqhf46pyzuxjbcn2giaqnb44\"```\n\t */\n\tsession_id?: string | null\n\t/** \n\t * The URL to redirect your customer upon 3DS succeeded authentication.\n\t * @example ```\"http://commercelayer.dev/checkout_com/success\"```\n\t */\n\tsuccess_url?: string | null\n\t/** \n\t * The URL to redirect your customer upon 3DS failed authentication.\n\t * @example ```\"http://commercelayer.dev/checkout_com/failure\"```\n\t */\n\tfailure_url?: string | null\n\t/** \n\t * Send this attribute if you want to send additional details the payment request (i.e. upon 3DS check).\n\t * @example ```true```\n\t */\n\t_details?: boolean | null\n\t/** \n\t * Send this attribute if you want to refresh all the pending transactions, can be used as webhooks fallback logic.\n\t * @example ```true```\n\t */\n\t_refresh?: boolean | null\n\n\torder?: OrderRel | null\n\n}\n\n\nclass CheckoutComPayments extends ApiResource<CheckoutComPayment> {\n\n\tstatic readonly TYPE: CheckoutComPaymentType = 'checkout_com_payments' as const\n\n\tasync create(resource: CheckoutComPaymentCreate, params?: QueryParamsRetrieve<CheckoutComPayment>, options?: ResourcesConfig): Promise<CheckoutComPayment> {\n\t\treturn this.resources.create<CheckoutComPaymentCreate, CheckoutComPayment>({ ...resource, type: CheckoutComPayments.TYPE }, params, options)\n\t}\n\n\tasync update(resource: CheckoutComPaymentUpdate, params?: QueryParamsRetrieve<CheckoutComPayment>, options?: ResourcesConfig): Promise<CheckoutComPayment> {\n\t\treturn this.resources.update<CheckoutComPaymentUpdate, CheckoutComPayment>({ ...resource, type: CheckoutComPayments.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: CheckoutComPayments.TYPE } : id, options)\n\t}\n\n\tasync order(checkoutComPaymentId: string | CheckoutComPayment, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _checkoutComPaymentId = (checkoutComPaymentId as CheckoutComPayment).id || checkoutComPaymentId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `checkout_com_payments/${_checkoutComPaymentId}/order`, params, options) as unknown as Order\n\t}\n\n\tasync payment_gateway(checkoutComPaymentId: string | CheckoutComPayment, params?: QueryParamsRetrieve<PaymentGateway>, options?: ResourcesConfig): Promise<PaymentGateway> {\n\t\tconst _checkoutComPaymentId = (checkoutComPaymentId as CheckoutComPayment).id || checkoutComPaymentId as string\n\t\treturn this.resources.fetch<PaymentGateway>({ type: 'payment_gateways' }, `checkout_com_payments/${_checkoutComPaymentId}/payment_gateway`, params, options) as unknown as PaymentGateway\n\t}\n\n\tasync versions(checkoutComPaymentId: string | CheckoutComPayment, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _checkoutComPaymentId = (checkoutComPaymentId as CheckoutComPayment).id || checkoutComPaymentId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `checkout_com_payments/${_checkoutComPaymentId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _details(id: string | CheckoutComPayment, params?: QueryParamsRetrieve<CheckoutComPayment>, options?: ResourcesConfig): Promise<CheckoutComPayment> {\n\t\treturn this.resources.update<CheckoutComPaymentUpdate, CheckoutComPayment>({ id: (typeof id === 'string')? id: id.id, type: CheckoutComPayments.TYPE, _details: true }, params, options)\n\t}\n\n\tasync _refresh(id: string | CheckoutComPayment, params?: QueryParamsRetrieve<CheckoutComPayment>, options?: ResourcesConfig): Promise<CheckoutComPayment> {\n\t\treturn this.resources.update<CheckoutComPaymentUpdate, CheckoutComPayment>({ id: (typeof id === 'string')? id: id.id, type: CheckoutComPayments.TYPE, _refresh: true }, params, options)\n\t}\n\n\n\tisCheckoutComPayment(resource: any): resource is CheckoutComPayment {\n\t\treturn resource.type && (resource.type === CheckoutComPayments.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CheckoutComPaymentRel {\n\t\treturn super.relationshipOneToOne<CheckoutComPaymentRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CheckoutComPaymentRel[] {\n\t\treturn super.relationshipOneToMany<CheckoutComPaymentRel>(...ids)\n\t}\n\n\n\ttype(): CheckoutComPaymentType {\n\t\treturn CheckoutComPayments.TYPE\n\t}\n\n}\n\n\nconst instance = new CheckoutComPayments()\nexport default instance\n\nexport type { CheckoutComPayments, CheckoutComPayment, CheckoutComPaymentCreate, CheckoutComPaymentUpdate, CheckoutComPaymentType }\n"]}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { eW as CheckoutComPayment, eX as CheckoutComPaymentCreate, eZ as CheckoutComPaymentSort, lI as CheckoutComPaymentType, eY as CheckoutComPaymentUpdate, ak as CheckoutComPayments, aj as default } from '../api-IwWtsAqE.cjs';
|
2
2
|
import '../client.cjs';
|
3
3
|
import '../interceptor-k15jXzf0.cjs';
|
4
4
|
import '../types.cjs';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { eW as CheckoutComPayment, eX as CheckoutComPaymentCreate, eZ as CheckoutComPaymentSort, lI as CheckoutComPaymentType, eY as CheckoutComPaymentUpdate, ak as CheckoutComPayments, aj as default } from '../api-F1F37Dud.js';
|
2
2
|
import '../client.js';
|
3
3
|
import '../interceptor-k15jXzf0.js';
|
4
4
|
import '../types.js';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/resources/checkout_com_payments.ts"],"names":[],"mappings":";;AAqKA,MAAM,4BAA4B,WAAgC,CAAA;AAAA,EAEjE,OAAgB,IAA+B,GAAA,uBAAA;AAAA,EAE/C,MAAM,MAAA,CAAO,QAAoC,EAAA,MAAA,EAAkD,OAAwD,EAAA;AAC1J,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAqD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,mBAAoB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC5I,EAEA,MAAM,MAAA,CAAO,QAAoC,EAAA,MAAA,EAAkD,OAAwD,EAAA;AAC1J,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAqD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,mBAAoB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC5I,EAEA,MAAM,MAAO,CAAA,EAAA,EAAyB,OAA0C,EAAA;AAC/E,IAAA,MAAM,IAAK,CAAA,SAAA,CAA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GAAI,EAAG,CAAA,EAAA,EAAI,MAAM,mBAAoB,CAAA,IAAA,EAAM,UAAU,IAAK,EAAA,EAAG,QAAQ,OAAO,CAAA;AAAA;AACxL,EAEA,MAAM,QAAA,CAAS,EAAiC,EAAA,MAAA,EAAkD,OAAwD,EAAA;AACzJ,IAAA,OAAO,KAAK,SAAU,CAAA,MAAA,CAAqD,EAAE,EAAK,EAAA,OAAO,OAAO,QAAW,GAAA,EAAA,GAAI,EAAG,CAAA,EAAA,EAAI,MAAM,mBAAoB,CAAA,IAAA,EAAM,UAAU,IAAK,EAAA,EAAG,QAAQ,OAAO,CAAA;AAAA;AACxL,EAGA,qBAAqB,QAA+C,EAAA;AACnE,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,mBAAoB,CAAA,IAAA;AAAA;AAChE,EAGA,aAAa,EAAuD,EAAA;AACnE,IAAO,OAAA,KAAA,CAAM,qBAA4C,EAAE,CAAA;AAAA;AAC5D,EAEA,sBAAsB,GAAwC,EAAA;AAC7D,IAAO,OAAA,KAAA,CAAM,qBAA6C,CAAA,GAAG,GAAG,CAAA;AAAA;AACjE,EAGA,IAA+B,GAAA;AAC9B,IAAA,OAAO,mBAAoB,CAAA,IAAA;AAAA;AAG7B;AAGA,MAAM,QAAA,GAAW,IAAI,mBAAoB,EAAA;AACzC,IAAO,6BAAQ,GAAA","file":"checkout_com_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 CheckoutComPaymentType = 'checkout_com_payments'\ntype CheckoutComPaymentRel = ResourceRel & { type: CheckoutComPaymentType }\ntype OrderRel = ResourceRel & { type: OrderType }\n\n\nexport type CheckoutComPaymentSort = Pick<CheckoutComPayment, 'id'> & ResourceSort\n// export type CheckoutComPaymentFilter = Pick<CheckoutComPayment, 'id'> & ResourceFilter\n\n\ninterface CheckoutComPayment extends Resource {\n\t\n\treadonly type: CheckoutComPaymentType\n\n\t/** \n\t * The Checkout.com publishable API key.\n\t * @example ```\"pk_test_xxxx-yyyy-zzzz\"```\n\t */\n\tpublic_key?: string | null\n\t/** \n\t * The payment source type.\n\t * @example ```\"token\"```\n\t */\n\tpayment_type: string\n\t/** \n\t * The Checkout.com card or digital wallet token.\n\t * @example ```\"tok_4gzeau5o2uqubbk6fufs3m7p54\"```\n\t */\n\ttoken: string\n\t/** \n\t * A payment session ID used to obtain the details.\n\t * @example ```\"sid_y3oqhf46pyzuxjbcn2giaqnb44\"```\n\t */\n\tsession_id?: string | null\n\t/** \n\t * The URL to redirect your customer upon 3DS succeeded authentication.\n\t * @example ```\"http://commercelayer.dev/checkout_com/success\"```\n\t */\n\tsuccess_url?: string | null\n\t/** \n\t * The URL to redirect your customer upon 3DS failed authentication.\n\t * @example ```\"http://commercelayer.dev/checkout_com/failure\"```\n\t */\n\tfailure_url?: string | null\n\t/** \n\t * The payment source identifier that can be used for subsequent payments.\n\t * @example ```\"src_nwd3m4in3hkuddfpjsaevunhdy\"```\n\t */\n\tsource_id?: string | null\n\t/** \n\t * The customer's unique identifier. This can be passed as a source when making a payment.\n\t * @example ```\"cus_udst2tfldj6upmye2reztkmm4i\"```\n\t */\n\tcustomer_token?: string | null\n\t/** \n\t * The URI that the customer should be redirected to in order to complete the payment.\n\t * @example ```\"https://api.checkout.com/3ds/pay_mbabizu24mvu3mela5njyhpit4\"```\n\t */\n\tredirect_uri?: string | null\n\t/** \n\t * The Checkout.com payment response, used to fetch internal data.\n\t * @example ```{\"foo\":\"bar\"}```\n\t */\n\tpayment_response?: Record<string, any> | null\n\t/** \n\t * Indicates if the order current amount differs form the one of the associated authorization.\n\t */\n\tmismatched_amounts?: boolean | null\n\t/** \n\t * Information about the payment instrument used in the transaction.\n\t * @example ```{\"issuer\":\"cl bank\",\"card_type\":\"visa\"}```\n\t */\n\tpayment_instrument?: Record<string, any> | null\n\n\torder?: Order | null\n\tpayment_gateway?: PaymentGateway | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface CheckoutComPaymentCreate extends ResourceCreate {\n\t\n\t/** \n\t * The payment source type.\n\t * @example ```\"token\"```\n\t */\n\tpayment_type: string\n\t/** \n\t * The Checkout.com card or digital wallet token.\n\t * @example ```\"tok_4gzeau5o2uqubbk6fufs3m7p54\"```\n\t */\n\ttoken: string\n\t/** \n\t * A payment session ID used to obtain the details.\n\t * @example ```\"sid_y3oqhf46pyzuxjbcn2giaqnb44\"```\n\t */\n\tsession_id?: string | null\n\t/** \n\t * The URL to redirect your customer upon 3DS succeeded authentication.\n\t * @example ```\"http://commercelayer.dev/checkout_com/success\"```\n\t */\n\tsuccess_url?: string | null\n\t/** \n\t * The URL to redirect your customer upon 3DS failed authentication.\n\t * @example ```\"http://commercelayer.dev/checkout_com/failure\"```\n\t */\n\tfailure_url?: string | null\n\n\torder: OrderRel\n\n}\n\n\ninterface CheckoutComPaymentUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The payment source type.\n\t * @example ```\"token\"```\n\t */\n\tpayment_type?: string | null\n\t/** \n\t * The Checkout.com card or digital wallet token.\n\t * @example ```\"tok_4gzeau5o2uqubbk6fufs3m7p54\"```\n\t */\n\ttoken?: string | null\n\t/** \n\t * A payment session ID used to obtain the details.\n\t * @example ```\"sid_y3oqhf46pyzuxjbcn2giaqnb44\"```\n\t */\n\tsession_id?: string | null\n\t/** \n\t * The URL to redirect your customer upon 3DS succeeded authentication.\n\t * @example ```\"http://commercelayer.dev/checkout_com/success\"```\n\t */\n\tsuccess_url?: string | null\n\t/** \n\t * The URL to redirect your customer upon 3DS failed authentication.\n\t * @example ```\"http://commercelayer.dev/checkout_com/failure\"```\n\t */\n\tfailure_url?: string | null\n\t/** \n\t * Send this attribute if you want to send additional details the payment request (i.e. upon 3DS check).\n\t * @example ```true```\n\t */\n\t_details?: boolean | null\n\t/** \n\t * Send this attribute if you want to refresh all the pending transactions, can be used as webhooks fallback logic.\n\t * @example ```true```\n\t */\n\t_refresh?: boolean | null\n\n\torder?: OrderRel | null\n\n}\n\n\nclass CheckoutComPayments extends ApiResource<CheckoutComPayment> {\n\n\tstatic readonly TYPE: CheckoutComPaymentType = 'checkout_com_payments' as const\n\n\tasync create(resource: CheckoutComPaymentCreate, params?: QueryParamsRetrieve<CheckoutComPayment>, options?: ResourcesConfig): Promise<CheckoutComPayment> {\n\t\treturn this.resources.create<CheckoutComPaymentCreate, CheckoutComPayment>({ ...resource, type: CheckoutComPayments.TYPE }, params, options)\n\t}\n\n\tasync update(resource: CheckoutComPaymentUpdate, params?: QueryParamsRetrieve<CheckoutComPayment>, options?: ResourcesConfig): Promise<CheckoutComPayment> {\n\t\treturn this.resources.update<CheckoutComPaymentUpdate, CheckoutComPayment>({ ...resource, type: CheckoutComPayments.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: CheckoutComPayments.TYPE } : id, options)\n\t}\n\n\tasync order(checkoutComPaymentId: string | CheckoutComPayment, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _checkoutComPaymentId = (checkoutComPaymentId as CheckoutComPayment).id || checkoutComPaymentId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `checkout_com_payments/${_checkoutComPaymentId}/order`, params, options) as unknown as Order\n\t}\n\n\tasync payment_gateway(checkoutComPaymentId: string | CheckoutComPayment, params?: QueryParamsRetrieve<PaymentGateway>, options?: ResourcesConfig): Promise<PaymentGateway> {\n\t\tconst _checkoutComPaymentId = (checkoutComPaymentId as CheckoutComPayment).id || checkoutComPaymentId as string\n\t\treturn this.resources.fetch<PaymentGateway>({ type: 'payment_gateways' }, `checkout_com_payments/${_checkoutComPaymentId}/payment_gateway`, params, options) as unknown as PaymentGateway\n\t}\n\n\tasync versions(checkoutComPaymentId: string | CheckoutComPayment, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _checkoutComPaymentId = (checkoutComPaymentId as CheckoutComPayment).id || checkoutComPaymentId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `checkout_com_payments/${_checkoutComPaymentId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _details(id: string | CheckoutComPayment, params?: QueryParamsRetrieve<CheckoutComPayment>, options?: ResourcesConfig): Promise<CheckoutComPayment> {\n\t\treturn this.resources.update<CheckoutComPaymentUpdate, CheckoutComPayment>({ id: (typeof id === 'string')? id: id.id, type: CheckoutComPayments.TYPE, _details: true }, params, options)\n\t}\n\n\tasync _refresh(id: string | CheckoutComPayment, params?: QueryParamsRetrieve<CheckoutComPayment>, options?: ResourcesConfig): Promise<CheckoutComPayment> {\n\t\treturn this.resources.update<CheckoutComPaymentUpdate, CheckoutComPayment>({ id: (typeof id === 'string')? id: id.id, type: CheckoutComPayments.TYPE, _refresh: true }, params, options)\n\t}\n\n\n\tisCheckoutComPayment(resource: any): resource is CheckoutComPayment {\n\t\treturn resource.type && (resource.type === CheckoutComPayments.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CheckoutComPaymentRel {\n\t\treturn super.relationshipOneToOne<CheckoutComPaymentRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CheckoutComPaymentRel[] {\n\t\treturn super.relationshipOneToMany<CheckoutComPaymentRel>(...ids)\n\t}\n\n\n\ttype(): CheckoutComPaymentType {\n\t\treturn CheckoutComPayments.TYPE\n\t}\n\n}\n\n\nconst instance = new CheckoutComPayments()\nexport default instance\n\nexport type { CheckoutComPayment, CheckoutComPaymentCreate, CheckoutComPaymentUpdate, CheckoutComPaymentType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/checkout_com_payments.ts"],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C,EAAE,CAAA;AAAA;AAC5D,EAEA,sBAAsB,GAAwC,EAAA;AAC7D,IAAO,OAAA,KAAA,CAAM,qBAA6C,CAAA,GAAG,GAAG,CAAA;AAAA;AACjE,EAGA,IAA+B,GAAA;AAC9B,IAAA,OAAO,mBAAoB,CAAA,IAAA;AAAA;AAG7B;AAGA,MAAM,QAAA,GAAW,IAAI,mBAAoB,EAAA;AACzC,IAAO,6BAAQ,GAAA","file":"checkout_com_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 CheckoutComPaymentType = 'checkout_com_payments'\ntype CheckoutComPaymentRel = ResourceRel & { type: CheckoutComPaymentType }\ntype OrderRel = ResourceRel & { type: OrderType }\n\n\nexport type CheckoutComPaymentSort = Pick<CheckoutComPayment, 'id'> & ResourceSort\n// export type CheckoutComPaymentFilter = Pick<CheckoutComPayment, 'id'> & ResourceFilter\n\n\ninterface CheckoutComPayment extends Resource {\n\t\n\treadonly type: CheckoutComPaymentType\n\n\t/** \n\t * The Checkout.com publishable API key.\n\t * @example ```\"pk_test_xxxx-yyyy-zzzz\"```\n\t */\n\tpublic_key?: string | null\n\t/** \n\t * The payment source type.\n\t * @example ```\"token\"```\n\t */\n\tpayment_type: string\n\t/** \n\t * The Checkout.com card or digital wallet token.\n\t * @example ```\"tok_4gzeau5o2uqubbk6fufs3m7p54\"```\n\t */\n\ttoken: string\n\t/** \n\t * A payment session ID used to obtain the details.\n\t * @example ```\"sid_y3oqhf46pyzuxjbcn2giaqnb44\"```\n\t */\n\tsession_id?: string | null\n\t/** \n\t * The URL to redirect your customer upon 3DS succeeded authentication.\n\t * @example ```\"http://commercelayer.dev/checkout_com/success\"```\n\t */\n\tsuccess_url?: string | null\n\t/** \n\t * The URL to redirect your customer upon 3DS failed authentication.\n\t * @example ```\"http://commercelayer.dev/checkout_com/failure\"```\n\t */\n\tfailure_url?: string | null\n\t/** \n\t * The payment source identifier that can be used for subsequent payments.\n\t * @example ```\"src_nwd3m4in3hkuddfpjsaevunhdy\"```\n\t */\n\tsource_id?: string | null\n\t/** \n\t * The customer's unique identifier. This can be passed as a source when making a payment.\n\t * @example ```\"cus_udst2tfldj6upmye2reztkmm4i\"```\n\t */\n\tcustomer_token?: string | null\n\t/** \n\t * The URI that the customer should be redirected to in order to complete the payment.\n\t * @example ```\"https://api.checkout.com/3ds/pay_mbabizu24mvu3mela5njyhpit4\"```\n\t */\n\tredirect_uri?: string | null\n\t/** \n\t * The Checkout.com payment response, used to fetch internal data.\n\t * @example ```{\"foo\":\"bar\"}```\n\t */\n\tpayment_response?: Record<string, any> | null\n\t/** \n\t * Indicates if the order current amount differs form the one of the associated authorization.\n\t */\n\tmismatched_amounts?: boolean | null\n\t/** \n\t * Information about the payment instrument used in the transaction.\n\t * @example ```{\"issuer\":\"cl bank\",\"card_type\":\"visa\"}```\n\t */\n\tpayment_instrument?: Record<string, any> | null\n\n\torder?: Order | null\n\tpayment_gateway?: PaymentGateway | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface CheckoutComPaymentCreate extends ResourceCreate {\n\t\n\t/** \n\t * The payment source type.\n\t * @example ```\"token\"```\n\t */\n\tpayment_type: string\n\t/** \n\t * The Checkout.com card or digital wallet token.\n\t * @example ```\"tok_4gzeau5o2uqubbk6fufs3m7p54\"```\n\t */\n\ttoken: string\n\t/** \n\t * A payment session ID used to obtain the details.\n\t * @example ```\"sid_y3oqhf46pyzuxjbcn2giaqnb44\"```\n\t */\n\tsession_id?: string | null\n\t/** \n\t * The URL to redirect your customer upon 3DS succeeded authentication.\n\t * @example ```\"http://commercelayer.dev/checkout_com/success\"```\n\t */\n\tsuccess_url?: string | null\n\t/** \n\t * The URL to redirect your customer upon 3DS failed authentication.\n\t * @example ```\"http://commercelayer.dev/checkout_com/failure\"```\n\t */\n\tfailure_url?: string | null\n\n\torder: OrderRel\n\n}\n\n\ninterface CheckoutComPaymentUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The payment source type.\n\t * @example ```\"token\"```\n\t */\n\tpayment_type?: string | null\n\t/** \n\t * The Checkout.com card or digital wallet token.\n\t * @example ```\"tok_4gzeau5o2uqubbk6fufs3m7p54\"```\n\t */\n\ttoken?: string | null\n\t/** \n\t * A payment session ID used to obtain the details.\n\t * @example ```\"sid_y3oqhf46pyzuxjbcn2giaqnb44\"```\n\t */\n\tsession_id?: string | null\n\t/** \n\t * The URL to redirect your customer upon 3DS succeeded authentication.\n\t * @example ```\"http://commercelayer.dev/checkout_com/success\"```\n\t */\n\tsuccess_url?: string | null\n\t/** \n\t * The URL to redirect your customer upon 3DS failed authentication.\n\t * @example ```\"http://commercelayer.dev/checkout_com/failure\"```\n\t */\n\tfailure_url?: string | null\n\t/** \n\t * Send this attribute if you want to send additional details the payment request (i.e. upon 3DS check).\n\t * @example ```true```\n\t */\n\t_details?: boolean | null\n\t/** \n\t * Send this attribute if you want to refresh all the pending transactions, can be used as webhooks fallback logic.\n\t * @example ```true```\n\t */\n\t_refresh?: boolean | null\n\n\torder?: OrderRel | null\n\n}\n\n\nclass CheckoutComPayments extends ApiResource<CheckoutComPayment> {\n\n\tstatic readonly TYPE: CheckoutComPaymentType = 'checkout_com_payments' as const\n\n\tasync create(resource: CheckoutComPaymentCreate, params?: QueryParamsRetrieve<CheckoutComPayment>, options?: ResourcesConfig): Promise<CheckoutComPayment> {\n\t\treturn this.resources.create<CheckoutComPaymentCreate, CheckoutComPayment>({ ...resource, type: CheckoutComPayments.TYPE }, params, options)\n\t}\n\n\tasync update(resource: CheckoutComPaymentUpdate, params?: QueryParamsRetrieve<CheckoutComPayment>, options?: ResourcesConfig): Promise<CheckoutComPayment> {\n\t\treturn this.resources.update<CheckoutComPaymentUpdate, CheckoutComPayment>({ ...resource, type: CheckoutComPayments.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: CheckoutComPayments.TYPE } : id, options)\n\t}\n\n\tasync order(checkoutComPaymentId: string | CheckoutComPayment, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _checkoutComPaymentId = (checkoutComPaymentId as CheckoutComPayment).id || checkoutComPaymentId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `checkout_com_payments/${_checkoutComPaymentId}/order`, params, options) as unknown as Order\n\t}\n\n\tasync payment_gateway(checkoutComPaymentId: string | CheckoutComPayment, params?: QueryParamsRetrieve<PaymentGateway>, options?: ResourcesConfig): Promise<PaymentGateway> {\n\t\tconst _checkoutComPaymentId = (checkoutComPaymentId as CheckoutComPayment).id || checkoutComPaymentId as string\n\t\treturn this.resources.fetch<PaymentGateway>({ type: 'payment_gateways' }, `checkout_com_payments/${_checkoutComPaymentId}/payment_gateway`, params, options) as unknown as PaymentGateway\n\t}\n\n\tasync versions(checkoutComPaymentId: string | CheckoutComPayment, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _checkoutComPaymentId = (checkoutComPaymentId as CheckoutComPayment).id || checkoutComPaymentId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `checkout_com_payments/${_checkoutComPaymentId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _details(id: string | CheckoutComPayment, params?: QueryParamsRetrieve<CheckoutComPayment>, options?: ResourcesConfig): Promise<CheckoutComPayment> {\n\t\treturn this.resources.update<CheckoutComPaymentUpdate, CheckoutComPayment>({ id: (typeof id === 'string')? id: id.id, type: CheckoutComPayments.TYPE, _details: true }, params, options)\n\t}\n\n\tasync _refresh(id: string | CheckoutComPayment, params?: QueryParamsRetrieve<CheckoutComPayment>, options?: ResourcesConfig): Promise<CheckoutComPayment> {\n\t\treturn this.resources.update<CheckoutComPaymentUpdate, CheckoutComPayment>({ id: (typeof id === 'string')? id: id.id, type: CheckoutComPayments.TYPE, _refresh: true }, params, options)\n\t}\n\n\n\tisCheckoutComPayment(resource: any): resource is CheckoutComPayment {\n\t\treturn resource.type && (resource.type === CheckoutComPayments.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CheckoutComPaymentRel {\n\t\treturn super.relationshipOneToOne<CheckoutComPaymentRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CheckoutComPaymentRel[] {\n\t\treturn super.relationshipOneToMany<CheckoutComPaymentRel>(...ids)\n\t}\n\n\n\ttype(): CheckoutComPaymentType {\n\t\treturn CheckoutComPayments.TYPE\n\t}\n\n}\n\n\nconst instance = new CheckoutComPayments()\nexport default instance\n\nexport type { CheckoutComPayments, CheckoutComPayment, CheckoutComPaymentCreate, CheckoutComPaymentUpdate, CheckoutComPaymentType }\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/resources/cleanups.ts"],"names":["ApiResource"],"mappings":";;;;AAwGA,MAAM,iBAAiBA,oBAAqB,CAAA;AAAA,EAE3C,OAAgB,IAAoB,GAAA,UAAA;AAAA,EAEpC,MAAM,MAAA,CAAO,QAAyB,EAAA,MAAA,EAAuC,OAA6C,EAAA;AACzH,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA+B,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,QAAS,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC3G,EAEA,MAAM,MAAA,CAAO,QAAyB,EAAA,MAAA,EAAuC,OAA6C,EAAA;AACzH,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA+B,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,QAAS,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC3G,E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AA4C,EAAA;AACxD,IAAO,OAAA,KAAA,CAAM,qBAAiC,EAAE,CAAA;AAAA;AACjD,EAEA,sBAAsB,GAA6B,EAAA;AAClD,IAAO,OAAA,KAAA,CAAM,qBAAkC,CAAA,GAAG,GAAG,CAAA;AAAA;AACtD,EAGA,IAAoB,GAAA;AACnB,IAAA,OAAO,QAAS,CAAA,IAAA;AAAA;AAGlB;AAGA,MAAM,QAAA,GAAW,IAAI,QAAS,EAAA;AAC9B,IAAO,gBAAQ,GAAA","file":"cleanups.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 { Event } from './events'\nimport type { Version } from './versions'\n\n\ntype CleanupType = 'cleanups'\ntype CleanupRel = ResourceRel & { type: CleanupType }\n\n\nexport type CleanupSort = Pick<Cleanup, 'id' | 'resource_type' | 'status' | 'started_at' | 'completed_at' | 'interrupted_at' | 'records_count' | 'errors_count' | 'processed_count'> & ResourceSort\n// export type CleanupFilter = Pick<Cleanup, 'id' | 'resource_type' | 'status' | 'started_at' | 'completed_at' | 'interrupted_at' | 'records_count' | 'errors_count' | 'processed_count' | 'errors_log'> & ResourceFilter\n\n\ninterface Cleanup extends Resource {\n\t\n\treadonly type: CleanupType\n\n\t/** \n\t * The type of resource being cleaned.\n\t * @example ```\"skus\"```\n\t */\n\tresource_type: string\n\t/** \n\t * The cleanup job status. One of 'pending' (default), 'in_progress', 'interrupted', or 'completed'.\n\t * @example ```\"in_progress\"```\n\t */\n\tstatus: 'pending' | 'in_progress' | 'interrupted' | 'completed'\n\t/** \n\t * Time at which the cleanup was started.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tstarted_at?: string | null\n\t/** \n\t * Time at which the cleanup was completed.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tcompleted_at?: string | null\n\t/** \n\t * Time at which the cleanup was interrupted.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tinterrupted_at?: string | null\n\t/** \n\t * The filters used to select the records to be cleaned.\n\t * @example ```{\"code_eq\":\"AAA\"}```\n\t */\n\tfilters?: Record<string, any> | null\n\t/** \n\t * Indicates the number of records to be cleaned.\n\t * @example ```300```\n\t */\n\trecords_count?: number | null\n\t/** \n\t * Indicates the number of cleanup errors, if any.\n\t * @example ```30```\n\t */\n\terrors_count?: number | null\n\t/** \n\t * Indicates the number of records that have been cleaned.\n\t * @example ```270```\n\t */\n\tprocessed_count?: number | null\n\t/** \n\t * Contains the cleanup errors, if any.\n\t * @example ```{\"ABC\":{\"name\":[\"has already been taken\"]}}```\n\t */\n\terrors_log?: Record<string, any> | null\n\n\tevents?: Event[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface CleanupCreate extends ResourceCreate {\n\t\n\t/** \n\t * The type of resource being cleaned.\n\t * @example ```\"skus\"```\n\t */\n\tresource_type: string\n\t/** \n\t * The filters used to select the records to be cleaned.\n\t * @example ```{\"code_eq\":\"AAA\"}```\n\t */\n\tfilters?: Record<string, any> | null\n\t\n}\n\n\ninterface CleanupUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * Send this attribute if you want to mark status as 'interrupted'.\n\t * @example ```true```\n\t */\n\t_interrupt?: boolean | null\n\t\n}\n\n\nclass Cleanups extends ApiResource<Cleanup> {\n\n\tstatic readonly TYPE: CleanupType = 'cleanups' as const\n\n\tasync create(resource: CleanupCreate, params?: QueryParamsRetrieve<Cleanup>, options?: ResourcesConfig): Promise<Cleanup> {\n\t\treturn this.resources.create<CleanupCreate, Cleanup>({ ...resource, type: Cleanups.TYPE }, params, options)\n\t}\n\n\tasync update(resource: CleanupUpdate, params?: QueryParamsRetrieve<Cleanup>, options?: ResourcesConfig): Promise<Cleanup> {\n\t\treturn this.resources.update<CleanupUpdate, Cleanup>({ ...resource, type: Cleanups.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: Cleanups.TYPE } : id, options)\n\t}\n\n\tasync events(cleanupId: string | Cleanup, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _cleanupId = (cleanupId as Cleanup).id || cleanupId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `cleanups/${_cleanupId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync versions(cleanupId: string | Cleanup, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _cleanupId = (cleanupId as Cleanup).id || cleanupId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `cleanups/${_cleanupId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _interrupt(id: string | Cleanup, params?: QueryParamsRetrieve<Cleanup>, options?: ResourcesConfig): Promise<Cleanup> {\n\t\treturn this.resources.update<CleanupUpdate, Cleanup>({ id: (typeof id === 'string')? id: id.id, type: Cleanups.TYPE, _interrupt: true }, params, options)\n\t}\n\n\n\tisCleanup(resource: any): resource is Cleanup {\n\t\treturn resource.type && (resource.type === Cleanups.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CleanupRel {\n\t\treturn super.relationshipOneToOne<CleanupRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CleanupRel[] {\n\t\treturn super.relationshipOneToMany<CleanupRel>(...ids)\n\t}\n\n\n\ttype(): CleanupType {\n\t\treturn Cleanups.TYPE\n\t}\n\n}\n\n\nconst instance = new Cleanups()\nexport default instance\n\nexport type { Cleanup, CleanupCreate, CleanupUpdate, CleanupType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/cleanups.ts"],"names":["ApiResource"],"mappings":";;;;AAwGA,MAAM,iBAAiBA,oBAAqB,CAAA;AAAA,EAE3C,OAAgB,IAA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a,SAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC9G,EAEA,MAAM,UAAA,CAAW,EAAsB,EAAA,MAAA,EAAuC,OAA6C,EAAA;AAC1H,IAAA,OAAO,KAAK,SAAU,CAAA,MAAA,CAA+B,EAAE,EAAK,EAAA,OAAO,OAAO,QAAW,GAAA,EAAA,GAAI,EAAG,CAAA,EAAA,EAAI,MAAM,QAAS,CAAA,IAAA,EAAM,YAAY,IAAK,EAAA,EAAG,QAAQ,OAAO,CAAA;AAAA;AACzJ,EAGA,UAAU,QAAoC,EAAA;AAC7C,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,QAAS,CAAA,IAAA;AAAA;AACrD,EAGA,aAAa,EAA4C,EAAA;AACxD,IAAO,OAAA,KAAA,CAAM,qBAAiC,EAAE,CAAA;AAAA;AACjD,EAEA,sBAAsB,GAA6B,EAAA;AAClD,IAAO,OAAA,KAAA,CAAM,qBAAkC,CAAA,GAAG,GAAG,CAAA;AAAA;AACtD,EAGA,IAAoB,GAAA;AACnB,IAAA,OAAO,QAAS,CAAA,IAAA;AAAA;AAGlB;AAGA,MAAM,QAAA,GAAW,IAAI,QAAS,EAAA;AAC9B,IAAO,gBAAQ,GAAA","file":"cleanups.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 { Event } from './events'\nimport type { Version } from './versions'\n\n\ntype CleanupType = 'cleanups'\ntype CleanupRel = ResourceRel & { type: CleanupType }\n\n\nexport type CleanupSort = Pick<Cleanup, 'id' | 'resource_type' | 'status' | 'started_at' | 'completed_at' | 'interrupted_at' | 'records_count' | 'errors_count' | 'processed_count'> & ResourceSort\n// export type CleanupFilter = Pick<Cleanup, 'id' | 'resource_type' | 'status' | 'started_at' | 'completed_at' | 'interrupted_at' | 'records_count' | 'errors_count' | 'processed_count' | 'errors_log'> & ResourceFilter\n\n\ninterface Cleanup extends Resource {\n\t\n\treadonly type: CleanupType\n\n\t/** \n\t * The type of resource being cleaned.\n\t * @example ```\"skus\"```\n\t */\n\tresource_type: string\n\t/** \n\t * The cleanup job status. One of 'pending' (default), 'in_progress', 'interrupted', or 'completed'.\n\t * @example ```\"in_progress\"```\n\t */\n\tstatus: 'pending' | 'in_progress' | 'interrupted' | 'completed'\n\t/** \n\t * Time at which the cleanup was started.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tstarted_at?: string | null\n\t/** \n\t * Time at which the cleanup was completed.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tcompleted_at?: string | null\n\t/** \n\t * Time at which the cleanup was interrupted.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tinterrupted_at?: string | null\n\t/** \n\t * The filters used to select the records to be cleaned.\n\t * @example ```{\"code_eq\":\"AAA\"}```\n\t */\n\tfilters?: Record<string, any> | null\n\t/** \n\t * Indicates the number of records to be cleaned.\n\t * @example ```300```\n\t */\n\trecords_count?: number | null\n\t/** \n\t * Indicates the number of cleanup errors, if any.\n\t * @example ```30```\n\t */\n\terrors_count?: number | null\n\t/** \n\t * Indicates the number of records that have been cleaned.\n\t * @example ```270```\n\t */\n\tprocessed_count?: number | null\n\t/** \n\t * Contains the cleanup errors, if any.\n\t * @example ```{\"ABC\":{\"name\":[\"has already been taken\"]}}```\n\t */\n\terrors_log?: Record<string, any> | null\n\n\tevents?: Event[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface CleanupCreate extends ResourceCreate {\n\t\n\t/** \n\t * The type of resource being cleaned.\n\t * @example ```\"skus\"```\n\t */\n\tresource_type: string\n\t/** \n\t * The filters used to select the records to be cleaned.\n\t * @example ```{\"code_eq\":\"AAA\"}```\n\t */\n\tfilters?: Record<string, any> | null\n\t\n}\n\n\ninterface CleanupUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * Send this attribute if you want to mark status as 'interrupted'.\n\t * @example ```true```\n\t */\n\t_interrupt?: boolean | null\n\t\n}\n\n\nclass Cleanups extends ApiResource<Cleanup> {\n\n\tstatic readonly TYPE: CleanupType = 'cleanups' as const\n\n\tasync create(resource: CleanupCreate, params?: QueryParamsRetrieve<Cleanup>, options?: ResourcesConfig): Promise<Cleanup> {\n\t\treturn this.resources.create<CleanupCreate, Cleanup>({ ...resource, type: Cleanups.TYPE }, params, options)\n\t}\n\n\tasync update(resource: CleanupUpdate, params?: QueryParamsRetrieve<Cleanup>, options?: ResourcesConfig): Promise<Cleanup> {\n\t\treturn this.resources.update<CleanupUpdate, Cleanup>({ ...resource, type: Cleanups.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: Cleanups.TYPE } : id, options)\n\t}\n\n\tasync events(cleanupId: string | Cleanup, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _cleanupId = (cleanupId as Cleanup).id || cleanupId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `cleanups/${_cleanupId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync versions(cleanupId: string | Cleanup, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _cleanupId = (cleanupId as Cleanup).id || cleanupId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `cleanups/${_cleanupId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _interrupt(id: string | Cleanup, params?: QueryParamsRetrieve<Cleanup>, options?: ResourcesConfig): Promise<Cleanup> {\n\t\treturn this.resources.update<CleanupUpdate, Cleanup>({ id: (typeof id === 'string')? id: id.id, type: Cleanups.TYPE, _interrupt: true }, params, options)\n\t}\n\n\n\tisCleanup(resource: any): resource is Cleanup {\n\t\treturn resource.type && (resource.type === Cleanups.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CleanupRel {\n\t\treturn super.relationshipOneToOne<CleanupRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CleanupRel[] {\n\t\treturn super.relationshipOneToMany<CleanupRel>(...ids)\n\t}\n\n\n\ttype(): CleanupType {\n\t\treturn Cleanups.TYPE\n\t}\n\n}\n\n\nconst instance = new Cleanups()\nexport default instance\n\nexport type { Cleanups, Cleanup, CleanupCreate, CleanupUpdate, CleanupType }\n"]}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { e_ as Cleanup, e$ as CleanupCreate, f1 as CleanupSort, ne as CleanupType, f0 as CleanupUpdate, am as Cleanups, al as default } from '../api-IwWtsAqE.cjs';
|
2
2
|
import '../client.cjs';
|
3
3
|
import '../interceptor-k15jXzf0.cjs';
|
4
4
|
import '../types.cjs';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { e_ as Cleanup, e$ as CleanupCreate, f1 as CleanupSort, ne as CleanupType, f0 as CleanupUpdate, am as Cleanups, al as default } from '../api-F1F37Dud.js';
|
2
2
|
import '../client.js';
|
3
3
|
import '../interceptor-k15jXzf0.js';
|
4
4
|
import '../types.js';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/resources/cleanups.ts"],"names":[],"mappings":";;AAwGA,MAAM,iBAAiB,WAAqB,CAAA;AAAA,EAE3C,OAAgB,IAAoB,GAAA,UAAA;AAAA,EAEpC,MAAM,MAAA,CAAO,QAAyB,EAAA,MAAA,EAAuC,OAA6C,EAAA;AACzH,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA+B,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,QAAS,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC3G,EAEA,MAAM,MAAA,CAAO,QAAyB,EAAA,MAAA,E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,EAAA,EAAG,QAAQ,OAAO,CAAA;AAAA;AACzJ,EAGA,UAAU,QAAoC,EAAA;AAC7C,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,QAAS,CAAA,IAAA;AAAA;AACrD,EAGA,aAAa,EAA4C,EAAA;AACxD,IAAO,OAAA,KAAA,CAAM,qBAAiC,EAAE,CAAA;AAAA;AACjD,EAEA,sBAAsB,GAA6B,EAAA;AAClD,IAAO,OAAA,KAAA,CAAM,qBAAkC,CAAA,GAAG,GAAG,CAAA;AAAA;AACtD,EAGA,IAAoB,GAAA;AACnB,IAAA,OAAO,QAAS,CAAA,IAAA;AAAA;AAGlB;AAGA,MAAM,QAAA,GAAW,IAAI,QAAS,EAAA;AAC9B,IAAO,gBAAQ,GAAA","file":"cleanups.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 { Event } from './events'\nimport type { Version } from './versions'\n\n\ntype CleanupType = 'cleanups'\ntype CleanupRel = ResourceRel & { type: CleanupType }\n\n\nexport type CleanupSort = Pick<Cleanup, 'id' | 'resource_type' | 'status' | 'started_at' | 'completed_at' | 'interrupted_at' | 'records_count' | 'errors_count' | 'processed_count'> & ResourceSort\n// export type CleanupFilter = Pick<Cleanup, 'id' | 'resource_type' | 'status' | 'started_at' | 'completed_at' | 'interrupted_at' | 'records_count' | 'errors_count' | 'processed_count' | 'errors_log'> & ResourceFilter\n\n\ninterface Cleanup extends Resource {\n\t\n\treadonly type: CleanupType\n\n\t/** \n\t * The type of resource being cleaned.\n\t * @example ```\"skus\"```\n\t */\n\tresource_type: string\n\t/** \n\t * The cleanup job status. One of 'pending' (default), 'in_progress', 'interrupted', or 'completed'.\n\t * @example ```\"in_progress\"```\n\t */\n\tstatus: 'pending' | 'in_progress' | 'interrupted' | 'completed'\n\t/** \n\t * Time at which the cleanup was started.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tstarted_at?: string | null\n\t/** \n\t * Time at which the cleanup was completed.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tcompleted_at?: string | null\n\t/** \n\t * Time at which the cleanup was interrupted.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tinterrupted_at?: string | null\n\t/** \n\t * The filters used to select the records to be cleaned.\n\t * @example ```{\"code_eq\":\"AAA\"}```\n\t */\n\tfilters?: Record<string, any> | null\n\t/** \n\t * Indicates the number of records to be cleaned.\n\t * @example ```300```\n\t */\n\trecords_count?: number | null\n\t/** \n\t * Indicates the number of cleanup errors, if any.\n\t * @example ```30```\n\t */\n\terrors_count?: number | null\n\t/** \n\t * Indicates the number of records that have been cleaned.\n\t * @example ```270```\n\t */\n\tprocessed_count?: number | null\n\t/** \n\t * Contains the cleanup errors, if any.\n\t * @example ```{\"ABC\":{\"name\":[\"has already been taken\"]}}```\n\t */\n\terrors_log?: Record<string, any> | null\n\n\tevents?: Event[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface CleanupCreate extends ResourceCreate {\n\t\n\t/** \n\t * The type of resource being cleaned.\n\t * @example ```\"skus\"```\n\t */\n\tresource_type: string\n\t/** \n\t * The filters used to select the records to be cleaned.\n\t * @example ```{\"code_eq\":\"AAA\"}```\n\t */\n\tfilters?: Record<string, any> | null\n\t\n}\n\n\ninterface CleanupUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * Send this attribute if you want to mark status as 'interrupted'.\n\t * @example ```true```\n\t */\n\t_interrupt?: boolean | null\n\t\n}\n\n\nclass Cleanups extends ApiResource<Cleanup> {\n\n\tstatic readonly TYPE: CleanupType = 'cleanups' as const\n\n\tasync create(resource: CleanupCreate, params?: QueryParamsRetrieve<Cleanup>, options?: ResourcesConfig): Promise<Cleanup> {\n\t\treturn this.resources.create<CleanupCreate, Cleanup>({ ...resource, type: Cleanups.TYPE }, params, options)\n\t}\n\n\tasync update(resource: CleanupUpdate, params?: QueryParamsRetrieve<Cleanup>, options?: ResourcesConfig): Promise<Cleanup> {\n\t\treturn this.resources.update<CleanupUpdate, Cleanup>({ ...resource, type: Cleanups.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: Cleanups.TYPE } : id, options)\n\t}\n\n\tasync events(cleanupId: string | Cleanup, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _cleanupId = (cleanupId as Cleanup).id || cleanupId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `cleanups/${_cleanupId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync versions(cleanupId: string | Cleanup, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _cleanupId = (cleanupId as Cleanup).id || cleanupId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `cleanups/${_cleanupId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _interrupt(id: string | Cleanup, params?: QueryParamsRetrieve<Cleanup>, options?: ResourcesConfig): Promise<Cleanup> {\n\t\treturn this.resources.update<CleanupUpdate, Cleanup>({ id: (typeof id === 'string')? id: id.id, type: Cleanups.TYPE, _interrupt: true }, params, options)\n\t}\n\n\n\tisCleanup(resource: any): resource is Cleanup {\n\t\treturn resource.type && (resource.type === Cleanups.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CleanupRel {\n\t\treturn super.relationshipOneToOne<CleanupRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CleanupRel[] {\n\t\treturn super.relationshipOneToMany<CleanupRel>(...ids)\n\t}\n\n\n\ttype(): CleanupType {\n\t\treturn Cleanups.TYPE\n\t}\n\n}\n\n\nconst instance = new Cleanups()\nexport default instance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IAAM,MAAA,UAAA,GAAc,UAAsB,EAAM,IAAA,SAAA;AAChD,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAe,EAAE,IAAA,EAAM,UAAW,EAAA,EAAG,CAAY,SAAA,EAAA,UAAU,CAAa,SAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC9G,EAEA,MAAM,UAAA,CAAW,EAAsB,EAAA,MAAA,EAAuC,OAA6C,EAAA;AAC1H,IAAA,OAAO,KAAK,SAAU,CAAA,MAAA,CAA+B,EAAE,EAAK,EAAA,OAAO,OAAO,QAAW,GAAA,EAAA,GAAI,EAAG,CAAA,EAAA,EAAI,MAAM,QAAS,CAAA,IAAA,EAAM,YAAY,IAAK,EAAA,EAAG,QAAQ,OAAO,CAAA;AAAA;AACzJ,EAGA,UAAU,QAAoC,EAAA;AAC7C,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,QAAS,CAAA,IAAA;AAAA;AACrD,EAGA,aAAa,EAA4C,EAAA;AACxD,IAAO,OAAA,KAAA,CAAM,qBAAiC,EAAE,CAAA;AAAA;AACjD,EAEA,sBAAsB,GAA6B,EAAA;AAClD,IAAO,OAAA,KAAA,CAAM,qBAAkC,CAAA,GAAG,GAAG,CAAA;AAAA;AACtD,EAGA,IAAoB,GAAA;AACnB,IAAA,OAAO,QAAS,CAAA,IAAA;AAAA;AAGlB;AAGA,MAAM,QAAA,GAAW,IAAI,QAAS,EAAA;AAC9B,IAAO,gBAAQ,GAAA","file":"cleanups.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 { Event } from './events'\nimport type { Version } from './versions'\n\n\ntype CleanupType = 'cleanups'\ntype CleanupRel = ResourceRel & { type: CleanupType }\n\n\nexport type CleanupSort = Pick<Cleanup, 'id' | 'resource_type' | 'status' | 'started_at' | 'completed_at' | 'interrupted_at' | 'records_count' | 'errors_count' | 'processed_count'> & ResourceSort\n// export type CleanupFilter = Pick<Cleanup, 'id' | 'resource_type' | 'status' | 'started_at' | 'completed_at' | 'interrupted_at' | 'records_count' | 'errors_count' | 'processed_count' | 'errors_log'> & ResourceFilter\n\n\ninterface Cleanup extends Resource {\n\t\n\treadonly type: CleanupType\n\n\t/** \n\t * The type of resource being cleaned.\n\t * @example ```\"skus\"```\n\t */\n\tresource_type: string\n\t/** \n\t * The cleanup job status. One of 'pending' (default), 'in_progress', 'interrupted', or 'completed'.\n\t * @example ```\"in_progress\"```\n\t */\n\tstatus: 'pending' | 'in_progress' | 'interrupted' | 'completed'\n\t/** \n\t * Time at which the cleanup was started.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tstarted_at?: string | null\n\t/** \n\t * Time at which the cleanup was completed.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tcompleted_at?: string | null\n\t/** \n\t * Time at which the cleanup was interrupted.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tinterrupted_at?: string | null\n\t/** \n\t * The filters used to select the records to be cleaned.\n\t * @example ```{\"code_eq\":\"AAA\"}```\n\t */\n\tfilters?: Record<string, any> | null\n\t/** \n\t * Indicates the number of records to be cleaned.\n\t * @example ```300```\n\t */\n\trecords_count?: number | null\n\t/** \n\t * Indicates the number of cleanup errors, if any.\n\t * @example ```30```\n\t */\n\terrors_count?: number | null\n\t/** \n\t * Indicates the number of records that have been cleaned.\n\t * @example ```270```\n\t */\n\tprocessed_count?: number | null\n\t/** \n\t * Contains the cleanup errors, if any.\n\t * @example ```{\"ABC\":{\"name\":[\"has already been taken\"]}}```\n\t */\n\terrors_log?: Record<string, any> | null\n\n\tevents?: Event[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface CleanupCreate extends ResourceCreate {\n\t\n\t/** \n\t * The type of resource being cleaned.\n\t * @example ```\"skus\"```\n\t */\n\tresource_type: string\n\t/** \n\t * The filters used to select the records to be cleaned.\n\t * @example ```{\"code_eq\":\"AAA\"}```\n\t */\n\tfilters?: Record<string, any> | null\n\t\n}\n\n\ninterface CleanupUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * Send this attribute if you want to mark status as 'interrupted'.\n\t * @example ```true```\n\t */\n\t_interrupt?: boolean | null\n\t\n}\n\n\nclass Cleanups extends ApiResource<Cleanup> {\n\n\tstatic readonly TYPE: CleanupType = 'cleanups' as const\n\n\tasync create(resource: CleanupCreate, params?: QueryParamsRetrieve<Cleanup>, options?: ResourcesConfig): Promise<Cleanup> {\n\t\treturn this.resources.create<CleanupCreate, Cleanup>({ ...resource, type: Cleanups.TYPE }, params, options)\n\t}\n\n\tasync update(resource: CleanupUpdate, params?: QueryParamsRetrieve<Cleanup>, options?: ResourcesConfig): Promise<Cleanup> {\n\t\treturn this.resources.update<CleanupUpdate, Cleanup>({ ...resource, type: Cleanups.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: Cleanups.TYPE } : id, options)\n\t}\n\n\tasync events(cleanupId: string | Cleanup, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _cleanupId = (cleanupId as Cleanup).id || cleanupId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `cleanups/${_cleanupId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync versions(cleanupId: string | Cleanup, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _cleanupId = (cleanupId as Cleanup).id || cleanupId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `cleanups/${_cleanupId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _interrupt(id: string | Cleanup, params?: QueryParamsRetrieve<Cleanup>, options?: ResourcesConfig): Promise<Cleanup> {\n\t\treturn this.resources.update<CleanupUpdate, Cleanup>({ id: (typeof id === 'string')? id: id.id, type: Cleanups.TYPE, _interrupt: true }, params, options)\n\t}\n\n\n\tisCleanup(resource: any): resource is Cleanup {\n\t\treturn resource.type && (resource.type === Cleanups.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CleanupRel {\n\t\treturn super.relationshipOneToOne<CleanupRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CleanupRel[] {\n\t\treturn super.relationshipOneToMany<CleanupRel>(...ids)\n\t}\n\n\n\ttype(): CleanupType {\n\t\treturn Cleanups.TYPE\n\t}\n\n}\n\n\nconst instance = new Cleanups()\nexport default instance\n\nexport type { Cleanups, Cleanup, CleanupCreate, CleanupUpdate, CleanupType }\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/resources/coupon_codes_promotion_rules.ts"],"names":["ApiResource"],"mappings":";;;;AA6DA,MAAM,kCAAkCA,oBAAsC,CAAA;AAAA,EAE7E,OAAgB,IAAqC,GAAA,8BAAA;AAAA,EAErD,MAAM,MAAA,CAAO,QAA0C,EAAA,MAAA,EAAwD,OAA8D,EAAA;AAC5K,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAiE,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,yBAA0B,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC9J,EAEA,MAAM,MAAA,CAAO,QAA0C,EAAA,MAAA,EAAwD,OAA8D,EAAA;AAC5K,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAiE,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,yBAA0B,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC9J,EAEA,MAAM,MAAO,CAAA,EAAA,EAAyB,OAA0C,EAAA;AAC/E,IAAA,MAAM,IAAK,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":"coupon_codes_promotion_rules.cjs","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Version } from './versions'\nimport type { Coupon, CouponType } from './coupons'\nimport type { PercentageDiscountPromotion, PercentageDiscountPromotionType } from './percentage_discount_promotions'\nimport type { FreeShippingPromotion, FreeShippingPromotionType } from './free_shipping_promotions'\nimport type { BuyXPayYPromotion, BuyXPayYPromotionType } from './buy_x_pay_y_promotions'\nimport type { FreeGiftPromotion, FreeGiftPromotionType } from './free_gift_promotions'\nimport type { FixedPricePromotion, FixedPricePromotionType } from './fixed_price_promotions'\nimport type { ExternalPromotion, ExternalPromotionType } from './external_promotions'\nimport type { FixedAmountPromotion, FixedAmountPromotionType } from './fixed_amount_promotions'\nimport type { FlexPromotion, FlexPromotionType } from './flex_promotions'\n\n\ntype CouponCodesPromotionRuleType = 'coupon_codes_promotion_rules'\ntype CouponCodesPromotionRuleRel = ResourceRel & { type: CouponCodesPromotionRuleType }\ntype PercentageDiscountPromotionRel = ResourceRel & { type: PercentageDiscountPromotionType }\ntype FreeShippingPromotionRel = ResourceRel & { type: FreeShippingPromotionType }\ntype BuyXPayYPromotionRel = ResourceRel & { type: BuyXPayYPromotionType }\ntype FreeGiftPromotionRel = ResourceRel & { type: FreeGiftPromotionType }\ntype FixedPricePromotionRel = ResourceRel & { type: FixedPricePromotionType }\ntype ExternalPromotionRel = ResourceRel & { type: ExternalPromotionType }\ntype FixedAmountPromotionRel = ResourceRel & { type: FixedAmountPromotionType }\ntype FlexPromotionRel = ResourceRel & { type: FlexPromotionType }\ntype CouponRel = ResourceRel & { type: CouponType }\n\n\nexport type CouponCodesPromotionRuleSort = Pick<CouponCodesPromotionRule, 'id'> & ResourceSort\n// export type CouponCodesPromotionRuleFilter = Pick<CouponCodesPromotionRule, 'id'> & ResourceFilter\n\n\ninterface CouponCodesPromotionRule extends Resource {\n\t\n\treadonly type: CouponCodesPromotionRuleType\n\n\n\tpromotion?: PercentageDiscountPromotion | FreeShippingPromotion | BuyXPayYPromotion | FreeGiftPromotion | FixedPricePromotion | ExternalPromotion | FixedAmountPromotion | FlexPromotion | null\n\tversions?: Version[] | null\n\tcoupons?: Coupon[] | null\n\n}\n\n\ninterface CouponCodesPromotionRuleCreate extends ResourceCreate {\n\t\n\tpromotion: PercentageDiscountPromotionRel | FreeShippingPromotionRel | BuyXPayYPromotionRel | FreeGiftPromotionRel | FixedPricePromotionRel | ExternalPromotionRel | FixedAmountPromotionRel | FlexPromotionRel\n\tcoupons?: CouponRel[] | null\n\n}\n\n\ninterface CouponCodesPromotionRuleUpdate extends ResourceUpdate {\n\t\n\tpromotion?: PercentageDiscountPromotionRel | FreeShippingPromotionRel | BuyXPayYPromotionRel | FreeGiftPromotionRel | FixedPricePromotionRel | ExternalPromotionRel | FixedAmountPromotionRel | FlexPromotionRel | null\n\tcoupons?: CouponRel[] | null\n\n}\n\n\nclass CouponCodesPromotionRules extends ApiResource<CouponCodesPromotionRule> {\n\n\tstatic readonly TYPE: CouponCodesPromotionRuleType = 'coupon_codes_promotion_rules' as const\n\n\tasync create(resource: CouponCodesPromotionRuleCreate, params?: QueryParamsRetrieve<CouponCodesPromotionRule>, options?: ResourcesConfig): Promise<CouponCodesPromotionRule> {\n\t\treturn this.resources.create<CouponCodesPromotionRuleCreate, CouponCodesPromotionRule>({ ...resource, type: CouponCodesPromotionRules.TYPE }, params, options)\n\t}\n\n\tasync update(resource: CouponCodesPromotionRuleUpdate, params?: QueryParamsRetrieve<CouponCodesPromotionRule>, options?: ResourcesConfig): Promise<CouponCodesPromotionRule> {\n\t\treturn this.resources.update<CouponCodesPromotionRuleUpdate, CouponCodesPromotionRule>({ ...resource, type: CouponCodesPromotionRules.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: CouponCodesPromotionRules.TYPE } : id, options)\n\t}\n\n\tasync versions(couponCodesPromotionRuleId: string | CouponCodesPromotionRule, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _couponCodesPromotionRuleId = (couponCodesPromotionRuleId as CouponCodesPromotionRule).id || couponCodesPromotionRuleId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `coupon_codes_promotion_rules/${_couponCodesPromotionRuleId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync coupons(couponCodesPromotionRuleId: string | CouponCodesPromotionRule, params?: QueryParamsList<Coupon>, options?: ResourcesConfig): Promise<ListResponse<Coupon>> {\n\t\tconst _couponCodesPromotionRuleId = (couponCodesPromotionRuleId as CouponCodesPromotionRule).id || couponCodesPromotionRuleId as string\n\t\treturn this.resources.fetch<Coupon>({ type: 'coupons' }, `coupon_codes_promotion_rules/${_couponCodesPromotionRuleId}/coupons`, params, options) as unknown as ListResponse<Coupon>\n\t}\n\n\n\tisCouponCodesPromotionRule(resource: any): resource is CouponCodesPromotionRule {\n\t\treturn resource.type && (resource.type === CouponCodesPromotionRules.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CouponCodesPromotionRuleRel {\n\t\treturn super.relationshipOneToOne<CouponCodesPromotionRuleRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CouponCodesPromotionRuleRel[] {\n\t\treturn super.relationshipOneToMany<CouponCodesPromotionRuleRel>(...ids)\n\t}\n\n\n\ttype(): CouponCodesPromotionRuleType {\n\t\treturn CouponCodesPromotionRules.TYPE\n\t}\n\n}\n\n\nconst instance = new CouponCodesPromotionRules()\nexport default instance\n\nexport type { CouponCodesPromotionRule, CouponCodesPromotionRuleCreate, CouponCodesPromotionRuleUpdate, CouponCodesPromotionRuleType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/coupon_codes_promotion_rules.ts"],"names":["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AAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAc,EAAE,IAAA,EAAM,SAAU,EAAA,EAAG,CAAgC,6BAAA,EAAA,2BAA2B,CAAY,QAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAChJ,EAGA,2BAA2B,QAAqD,EAAA;AAC/E,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,yBAA0B,CAAA,IAAA;AAAA;AACtE,EAGA,aAAa,EAA6D,EAAA;AACzE,IAAO,OAAA,KAAA,CAAM,qBAAkD,EAAE,CAAA;AAAA;AAClE,EAEA,sBAAsB,GAA8C,EAAA;AACnE,IAAO,OAAA,KAAA,CAAM,qBAAmD,CAAA,GAAG,GAAG,CAAA;AAAA;AACvE,EAGA,IAAqC,GAAA;AACpC,IAAA,OAAO,yBAA0B,CAAA,IAAA;AAAA;AAGnC;AAGA,MAAM,QAAA,GAAW,IAAI,yBAA0B,EAAA;AAC/C,IAAO,oCAAQ,GAAA","file":"coupon_codes_promotion_rules.cjs","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Version } from './versions'\nimport type { Coupon, CouponType } from './coupons'\nimport type { PercentageDiscountPromotion, PercentageDiscountPromotionType } from './percentage_discount_promotions'\nimport type { FreeShippingPromotion, FreeShippingPromotionType } from './free_shipping_promotions'\nimport type { BuyXPayYPromotion, BuyXPayYPromotionType } from './buy_x_pay_y_promotions'\nimport type { FreeGiftPromotion, FreeGiftPromotionType } from './free_gift_promotions'\nimport type { FixedPricePromotion, FixedPricePromotionType } from './fixed_price_promotions'\nimport type { ExternalPromotion, ExternalPromotionType } from './external_promotions'\nimport type { FixedAmountPromotion, FixedAmountPromotionType } from './fixed_amount_promotions'\nimport type { FlexPromotion, FlexPromotionType } from './flex_promotions'\n\n\ntype CouponCodesPromotionRuleType = 'coupon_codes_promotion_rules'\ntype CouponCodesPromotionRuleRel = ResourceRel & { type: CouponCodesPromotionRuleType }\ntype PercentageDiscountPromotionRel = ResourceRel & { type: PercentageDiscountPromotionType }\ntype FreeShippingPromotionRel = ResourceRel & { type: FreeShippingPromotionType }\ntype BuyXPayYPromotionRel = ResourceRel & { type: BuyXPayYPromotionType }\ntype FreeGiftPromotionRel = ResourceRel & { type: FreeGiftPromotionType }\ntype FixedPricePromotionRel = ResourceRel & { type: FixedPricePromotionType }\ntype ExternalPromotionRel = ResourceRel & { type: ExternalPromotionType }\ntype FixedAmountPromotionRel = ResourceRel & { type: FixedAmountPromotionType }\ntype FlexPromotionRel = ResourceRel & { type: FlexPromotionType }\ntype CouponRel = ResourceRel & { type: CouponType }\n\n\nexport type CouponCodesPromotionRuleSort = Pick<CouponCodesPromotionRule, 'id'> & ResourceSort\n// export type CouponCodesPromotionRuleFilter = Pick<CouponCodesPromotionRule, 'id'> & ResourceFilter\n\n\ninterface CouponCodesPromotionRule extends Resource {\n\t\n\treadonly type: CouponCodesPromotionRuleType\n\n\n\tpromotion?: PercentageDiscountPromotion | FreeShippingPromotion | BuyXPayYPromotion | FreeGiftPromotion | FixedPricePromotion | ExternalPromotion | FixedAmountPromotion | FlexPromotion | null\n\tversions?: Version[] | null\n\tcoupons?: Coupon[] | null\n\n}\n\n\ninterface CouponCodesPromotionRuleCreate extends ResourceCreate {\n\t\n\tpromotion: PercentageDiscountPromotionRel | FreeShippingPromotionRel | BuyXPayYPromotionRel | FreeGiftPromotionRel | FixedPricePromotionRel | ExternalPromotionRel | FixedAmountPromotionRel | FlexPromotionRel\n\tcoupons?: CouponRel[] | null\n\n}\n\n\ninterface CouponCodesPromotionRuleUpdate extends ResourceUpdate {\n\t\n\tpromotion?: PercentageDiscountPromotionRel | FreeShippingPromotionRel | BuyXPayYPromotionRel | FreeGiftPromotionRel | FixedPricePromotionRel | ExternalPromotionRel | FixedAmountPromotionRel | FlexPromotionRel | null\n\tcoupons?: CouponRel[] | null\n\n}\n\n\nclass CouponCodesPromotionRules extends ApiResource<CouponCodesPromotionRule> {\n\n\tstatic readonly TYPE: CouponCodesPromotionRuleType = 'coupon_codes_promotion_rules' as const\n\n\tasync create(resource: CouponCodesPromotionRuleCreate, params?: QueryParamsRetrieve<CouponCodesPromotionRule>, options?: ResourcesConfig): Promise<CouponCodesPromotionRule> {\n\t\treturn this.resources.create<CouponCodesPromotionRuleCreate, CouponCodesPromotionRule>({ ...resource, type: CouponCodesPromotionRules.TYPE }, params, options)\n\t}\n\n\tasync update(resource: CouponCodesPromotionRuleUpdate, params?: QueryParamsRetrieve<CouponCodesPromotionRule>, options?: ResourcesConfig): Promise<CouponCodesPromotionRule> {\n\t\treturn this.resources.update<CouponCodesPromotionRuleUpdate, CouponCodesPromotionRule>({ ...resource, type: CouponCodesPromotionRules.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: CouponCodesPromotionRules.TYPE } : id, options)\n\t}\n\n\tasync versions(couponCodesPromotionRuleId: string | CouponCodesPromotionRule, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _couponCodesPromotionRuleId = (couponCodesPromotionRuleId as CouponCodesPromotionRule).id || couponCodesPromotionRuleId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `coupon_codes_promotion_rules/${_couponCodesPromotionRuleId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync coupons(couponCodesPromotionRuleId: string | CouponCodesPromotionRule, params?: QueryParamsList<Coupon>, options?: ResourcesConfig): Promise<ListResponse<Coupon>> {\n\t\tconst _couponCodesPromotionRuleId = (couponCodesPromotionRuleId as CouponCodesPromotionRule).id || couponCodesPromotionRuleId as string\n\t\treturn this.resources.fetch<Coupon>({ type: 'coupons' }, `coupon_codes_promotion_rules/${_couponCodesPromotionRuleId}/coupons`, params, options) as unknown as ListResponse<Coupon>\n\t}\n\n\n\tisCouponCodesPromotionRule(resource: any): resource is CouponCodesPromotionRule {\n\t\treturn resource.type && (resource.type === CouponCodesPromotionRules.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CouponCodesPromotionRuleRel {\n\t\treturn super.relationshipOneToOne<CouponCodesPromotionRuleRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CouponCodesPromotionRuleRel[] {\n\t\treturn super.relationshipOneToMany<CouponCodesPromotionRuleRel>(...ids)\n\t}\n\n\n\ttype(): CouponCodesPromotionRuleType {\n\t\treturn CouponCodesPromotionRules.TYPE\n\t}\n\n}\n\n\nconst instance = new CouponCodesPromotionRules()\nexport default instance\n\nexport type { CouponCodesPromotionRules, CouponCodesPromotionRule, CouponCodesPromotionRuleCreate, CouponCodesPromotionRuleUpdate, CouponCodesPromotionRuleType }\n"]}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { f2 as CouponCodesPromotionRule, f3 as CouponCodesPromotionRuleCreate, f5 as CouponCodesPromotionRuleSort, mp as CouponCodesPromotionRuleType, f4 as CouponCodesPromotionRuleUpdate, ao as CouponCodesPromotionRules, an as default } from '../api-IwWtsAqE.cjs';
|
2
2
|
import '../client.cjs';
|
3
3
|
import '../interceptor-k15jXzf0.cjs';
|
4
4
|
import '../types.cjs';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { f2 as CouponCodesPromotionRule, f3 as CouponCodesPromotionRuleCreate, f5 as CouponCodesPromotionRuleSort, mp as CouponCodesPromotionRuleType, f4 as CouponCodesPromotionRuleUpdate, ao as CouponCodesPromotionRules, an as default } from '../api-F1F37Dud.js';
|
2
2
|
import '../client.js';
|
3
3
|
import '../interceptor-k15jXzf0.js';
|
4
4
|
import '../types.js';
|