@commercelayer/sdk 7.0.0-rc.2 → 7.0.0-rc.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/lib/{api-DDgIE2i8.d.ts → api-F1F37Dud.d.ts} +27 -8
- package/lib/{api-DmIZO_Np.d.cts → api-IwWtsAqE.d.cts} +27 -8
- package/lib/api.d.cts +2 -2
- package/lib/api.d.ts +2 -2
- package/lib/bundle.cjs +568 -0
- package/lib/bundle.cjs.map +1 -0
- package/lib/bundle.d.cts +145 -0
- package/lib/bundle.d.ts +145 -0
- package/lib/bundle.js +546 -0
- package/lib/bundle.js.map +1 -0
- package/lib/client.d.cts +1 -1
- package/lib/client.d.ts +1 -1
- package/lib/commercelayer.cjs +2 -1
- package/lib/commercelayer.cjs.map +1 -1
- package/lib/commercelayer.d.cts +5 -6
- package/lib/commercelayer.d.ts +5 -6
- package/lib/commercelayer.js +2 -2
- package/lib/commercelayer.js.map +1 -1
- package/lib/config.d.cts +1 -1
- package/lib/config.d.ts +1 -1
- package/lib/enum.d.cts +2 -2
- package/lib/enum.d.ts +2 -2
- package/lib/error.cjs.map +1 -1
- package/lib/error.js.map +1 -1
- package/lib/fetch.cjs +2 -0
- package/lib/fetch.cjs.map +1 -1
- package/lib/fetch.d.cts +1 -1
- package/lib/fetch.d.ts +1 -1
- package/lib/fetch.js +2 -0
- package/lib/fetch.js.map +1 -1
- package/lib/index.d.cts +2 -2
- package/lib/index.d.ts +2 -2
- package/lib/{interceptor-5MISI1yn.d.cts → interceptor-k15jXzf0.d.cts} +3 -2
- package/lib/{interceptor-5MISI1yn.d.ts → interceptor-k15jXzf0.d.ts} +3 -2
- package/lib/interceptor.d.cts +1 -1
- package/lib/interceptor.d.ts +1 -1
- package/lib/jsonapi.d.cts +2 -2
- package/lib/jsonapi.d.ts +2 -2
- package/lib/model.d.cts +2 -2
- package/lib/model.d.ts +2 -2
- package/lib/query.d.cts +2 -2
- package/lib/query.d.ts +2 -2
- package/lib/resource.cjs +7 -6
- package/lib/resource.cjs.map +1 -1
- package/lib/resource.d.cts +2 -2
- package/lib/resource.d.ts +2 -2
- package/lib/resource.js +7 -6
- package/lib/resource.js.map +1 -1
- package/lib/resources/addresses.cjs.map +1 -1
- package/lib/resources/addresses.d.cts +2 -2
- package/lib/resources/addresses.d.ts +2 -2
- package/lib/resources/addresses.js.map +1 -1
- package/lib/resources/adjustments.cjs.map +1 -1
- package/lib/resources/adjustments.d.cts +2 -2
- package/lib/resources/adjustments.d.ts +2 -2
- package/lib/resources/adjustments.js.map +1 -1
- package/lib/resources/adyen_gateways.cjs.map +1 -1
- package/lib/resources/adyen_gateways.d.cts +2 -2
- package/lib/resources/adyen_gateways.d.ts +2 -2
- package/lib/resources/adyen_gateways.js.map +1 -1
- package/lib/resources/adyen_payments.cjs.map +1 -1
- package/lib/resources/adyen_payments.d.cts +2 -2
- package/lib/resources/adyen_payments.d.ts +2 -2
- package/lib/resources/adyen_payments.js.map +1 -1
- package/lib/resources/applications.cjs.map +1 -1
- package/lib/resources/applications.d.cts +2 -2
- package/lib/resources/applications.d.ts +2 -2
- package/lib/resources/applications.js.map +1 -1
- package/lib/resources/attachments.cjs.map +1 -1
- package/lib/resources/attachments.d.cts +2 -2
- package/lib/resources/attachments.d.ts +2 -2
- package/lib/resources/attachments.js.map +1 -1
- package/lib/resources/authorizations.cjs.map +1 -1
- package/lib/resources/authorizations.d.cts +2 -2
- package/lib/resources/authorizations.d.ts +2 -2
- package/lib/resources/authorizations.js.map +1 -1
- package/lib/resources/avalara_accounts.cjs.map +1 -1
- package/lib/resources/avalara_accounts.d.cts +2 -2
- package/lib/resources/avalara_accounts.d.ts +2 -2
- package/lib/resources/avalara_accounts.js.map +1 -1
- package/lib/resources/axerve_gateways.cjs.map +1 -1
- package/lib/resources/axerve_gateways.d.cts +2 -2
- package/lib/resources/axerve_gateways.d.ts +2 -2
- package/lib/resources/axerve_gateways.js.map +1 -1
- package/lib/resources/axerve_payments.cjs.map +1 -1
- package/lib/resources/axerve_payments.d.cts +2 -2
- package/lib/resources/axerve_payments.d.ts +2 -2
- package/lib/resources/axerve_payments.js.map +1 -1
- package/lib/resources/bing_geocoders.cjs.map +1 -1
- package/lib/resources/bing_geocoders.d.cts +2 -2
- package/lib/resources/bing_geocoders.d.ts +2 -2
- package/lib/resources/bing_geocoders.js.map +1 -1
- package/lib/resources/braintree_gateways.cjs.map +1 -1
- package/lib/resources/braintree_gateways.d.cts +2 -2
- package/lib/resources/braintree_gateways.d.ts +2 -2
- package/lib/resources/braintree_gateways.js.map +1 -1
- package/lib/resources/braintree_payments.cjs.map +1 -1
- package/lib/resources/braintree_payments.d.cts +2 -2
- package/lib/resources/braintree_payments.d.ts +2 -2
- package/lib/resources/braintree_payments.js.map +1 -1
- package/lib/resources/bundles.cjs.map +1 -1
- package/lib/resources/bundles.d.cts +2 -2
- package/lib/resources/bundles.d.ts +2 -2
- package/lib/resources/bundles.js.map +1 -1
- package/lib/resources/buy_x_pay_y_promotions.cjs.map +1 -1
- package/lib/resources/buy_x_pay_y_promotions.d.cts +2 -2
- package/lib/resources/buy_x_pay_y_promotions.d.ts +2 -2
- package/lib/resources/buy_x_pay_y_promotions.js.map +1 -1
- package/lib/resources/captures.cjs.map +1 -1
- package/lib/resources/captures.d.cts +2 -2
- package/lib/resources/captures.d.ts +2 -2
- package/lib/resources/captures.js.map +1 -1
- package/lib/resources/carrier_accounts.cjs.map +1 -1
- package/lib/resources/carrier_accounts.d.cts +2 -2
- package/lib/resources/carrier_accounts.d.ts +2 -2
- package/lib/resources/carrier_accounts.js.map +1 -1
- package/lib/resources/checkout_com_gateways.cjs.map +1 -1
- package/lib/resources/checkout_com_gateways.d.cts +2 -2
- package/lib/resources/checkout_com_gateways.d.ts +2 -2
- package/lib/resources/checkout_com_gateways.js.map +1 -1
- package/lib/resources/checkout_com_payments.cjs.map +1 -1
- package/lib/resources/checkout_com_payments.d.cts +2 -2
- package/lib/resources/checkout_com_payments.d.ts +2 -2
- package/lib/resources/checkout_com_payments.js.map +1 -1
- package/lib/resources/cleanups.cjs.map +1 -1
- package/lib/resources/cleanups.d.cts +2 -2
- package/lib/resources/cleanups.d.ts +2 -2
- package/lib/resources/cleanups.js.map +1 -1
- package/lib/resources/coupon_codes_promotion_rules.cjs.map +1 -1
- package/lib/resources/coupon_codes_promotion_rules.d.cts +2 -2
- package/lib/resources/coupon_codes_promotion_rules.d.ts +2 -2
- package/lib/resources/coupon_codes_promotion_rules.js.map +1 -1
- package/lib/resources/coupon_recipients.cjs.map +1 -1
- package/lib/resources/coupon_recipients.d.cts +2 -2
- package/lib/resources/coupon_recipients.d.ts +2 -2
- package/lib/resources/coupon_recipients.js.map +1 -1
- package/lib/resources/coupons.cjs.map +1 -1
- package/lib/resources/coupons.d.cts +2 -2
- package/lib/resources/coupons.d.ts +2 -2
- package/lib/resources/coupons.js.map +1 -1
- package/lib/resources/custom_promotion_rules.cjs.map +1 -1
- package/lib/resources/custom_promotion_rules.d.cts +2 -2
- package/lib/resources/custom_promotion_rules.d.ts +2 -2
- package/lib/resources/custom_promotion_rules.js.map +1 -1
- package/lib/resources/customer_addresses.cjs.map +1 -1
- package/lib/resources/customer_addresses.d.cts +2 -2
- package/lib/resources/customer_addresses.d.ts +2 -2
- package/lib/resources/customer_addresses.js.map +1 -1
- package/lib/resources/customer_groups.cjs.map +1 -1
- package/lib/resources/customer_groups.d.cts +2 -2
- package/lib/resources/customer_groups.d.ts +2 -2
- package/lib/resources/customer_groups.js.map +1 -1
- package/lib/resources/customer_password_resets.cjs.map +1 -1
- package/lib/resources/customer_password_resets.d.cts +2 -2
- package/lib/resources/customer_password_resets.d.ts +2 -2
- package/lib/resources/customer_password_resets.js.map +1 -1
- package/lib/resources/customer_payment_sources.cjs.map +1 -1
- package/lib/resources/customer_payment_sources.d.cts +2 -2
- package/lib/resources/customer_payment_sources.d.ts +2 -2
- package/lib/resources/customer_payment_sources.js.map +1 -1
- package/lib/resources/customer_subscriptions.cjs.map +1 -1
- package/lib/resources/customer_subscriptions.d.cts +2 -2
- package/lib/resources/customer_subscriptions.d.ts +2 -2
- package/lib/resources/customer_subscriptions.js.map +1 -1
- package/lib/resources/customers.cjs.map +1 -1
- package/lib/resources/customers.d.cts +2 -2
- package/lib/resources/customers.d.ts +2 -2
- package/lib/resources/customers.js.map +1 -1
- package/lib/resources/delivery_lead_times.cjs.map +1 -1
- package/lib/resources/delivery_lead_times.d.cts +2 -2
- package/lib/resources/delivery_lead_times.d.ts +2 -2
- package/lib/resources/delivery_lead_times.js.map +1 -1
- package/lib/resources/discount_engine_items.cjs.map +1 -1
- package/lib/resources/discount_engine_items.d.cts +2 -2
- package/lib/resources/discount_engine_items.d.ts +2 -2
- package/lib/resources/discount_engine_items.js.map +1 -1
- package/lib/resources/discount_engines.cjs.map +1 -1
- package/lib/resources/discount_engines.d.cts +2 -2
- package/lib/resources/discount_engines.d.ts +2 -2
- package/lib/resources/discount_engines.js.map +1 -1
- package/lib/resources/easypost_pickups.cjs.map +1 -1
- package/lib/resources/easypost_pickups.d.cts +2 -2
- package/lib/resources/easypost_pickups.d.ts +2 -2
- package/lib/resources/easypost_pickups.js.map +1 -1
- package/lib/resources/event_callbacks.cjs.map +1 -1
- package/lib/resources/event_callbacks.d.cts +2 -2
- package/lib/resources/event_callbacks.d.ts +2 -2
- package/lib/resources/event_callbacks.js.map +1 -1
- package/lib/resources/events.cjs.map +1 -1
- package/lib/resources/events.d.cts +2 -2
- package/lib/resources/events.d.ts +2 -2
- package/lib/resources/events.js.map +1 -1
- package/lib/resources/exports.cjs.map +1 -1
- package/lib/resources/exports.d.cts +2 -2
- package/lib/resources/exports.d.ts +2 -2
- package/lib/resources/exports.js.map +1 -1
- package/lib/resources/external_gateways.cjs.map +1 -1
- package/lib/resources/external_gateways.d.cts +2 -2
- package/lib/resources/external_gateways.d.ts +2 -2
- package/lib/resources/external_gateways.js.map +1 -1
- package/lib/resources/external_payments.cjs.map +1 -1
- package/lib/resources/external_payments.d.cts +2 -2
- package/lib/resources/external_payments.d.ts +2 -2
- package/lib/resources/external_payments.js.map +1 -1
- package/lib/resources/external_promotions.cjs.map +1 -1
- package/lib/resources/external_promotions.d.cts +2 -2
- package/lib/resources/external_promotions.d.ts +2 -2
- package/lib/resources/external_promotions.js.map +1 -1
- package/lib/resources/external_tax_calculators.cjs.map +1 -1
- package/lib/resources/external_tax_calculators.d.cts +2 -2
- package/lib/resources/external_tax_calculators.d.ts +2 -2
- package/lib/resources/external_tax_calculators.js.map +1 -1
- package/lib/resources/fixed_amount_promotions.cjs.map +1 -1
- package/lib/resources/fixed_amount_promotions.d.cts +2 -2
- package/lib/resources/fixed_amount_promotions.d.ts +2 -2
- package/lib/resources/fixed_amount_promotions.js.map +1 -1
- package/lib/resources/fixed_price_promotions.cjs.map +1 -1
- package/lib/resources/fixed_price_promotions.d.cts +2 -2
- package/lib/resources/fixed_price_promotions.d.ts +2 -2
- package/lib/resources/fixed_price_promotions.js.map +1 -1
- package/lib/resources/flex_promotions.cjs.map +1 -1
- package/lib/resources/flex_promotions.d.cts +2 -2
- package/lib/resources/flex_promotions.d.ts +2 -2
- package/lib/resources/flex_promotions.js.map +1 -1
- package/lib/resources/free_gift_promotions.cjs.map +1 -1
- package/lib/resources/free_gift_promotions.d.cts +2 -2
- package/lib/resources/free_gift_promotions.d.ts +2 -2
- package/lib/resources/free_gift_promotions.js.map +1 -1
- package/lib/resources/free_shipping_promotions.cjs.map +1 -1
- package/lib/resources/free_shipping_promotions.d.cts +2 -2
- package/lib/resources/free_shipping_promotions.d.ts +2 -2
- package/lib/resources/free_shipping_promotions.js.map +1 -1
- package/lib/resources/geocoders.cjs.map +1 -1
- package/lib/resources/geocoders.d.cts +2 -2
- package/lib/resources/geocoders.d.ts +2 -2
- package/lib/resources/geocoders.js.map +1 -1
- package/lib/resources/gift_card_recipients.cjs.map +1 -1
- package/lib/resources/gift_card_recipients.d.cts +2 -2
- package/lib/resources/gift_card_recipients.d.ts +2 -2
- package/lib/resources/gift_card_recipients.js.map +1 -1
- package/lib/resources/gift_cards.cjs.map +1 -1
- package/lib/resources/gift_cards.d.cts +2 -2
- package/lib/resources/gift_cards.d.ts +2 -2
- package/lib/resources/gift_cards.js.map +1 -1
- package/lib/resources/google_geocoders.cjs.map +1 -1
- package/lib/resources/google_geocoders.d.cts +2 -2
- package/lib/resources/google_geocoders.d.ts +2 -2
- package/lib/resources/google_geocoders.js.map +1 -1
- package/lib/resources/imports.cjs.map +1 -1
- package/lib/resources/imports.d.cts +2 -2
- package/lib/resources/imports.d.ts +2 -2
- package/lib/resources/imports.js.map +1 -1
- package/lib/resources/in_stock_subscriptions.cjs.map +1 -1
- package/lib/resources/in_stock_subscriptions.d.cts +2 -2
- package/lib/resources/in_stock_subscriptions.d.ts +2 -2
- package/lib/resources/in_stock_subscriptions.js.map +1 -1
- package/lib/resources/inventory_models.cjs.map +1 -1
- package/lib/resources/inventory_models.d.cts +2 -2
- package/lib/resources/inventory_models.d.ts +2 -2
- package/lib/resources/inventory_models.js.map +1 -1
- package/lib/resources/inventory_return_locations.cjs.map +1 -1
- package/lib/resources/inventory_return_locations.d.cts +2 -2
- package/lib/resources/inventory_return_locations.d.ts +2 -2
- package/lib/resources/inventory_return_locations.js.map +1 -1
- package/lib/resources/inventory_stock_locations.cjs.map +1 -1
- package/lib/resources/inventory_stock_locations.d.cts +2 -2
- package/lib/resources/inventory_stock_locations.d.ts +2 -2
- package/lib/resources/inventory_stock_locations.js.map +1 -1
- package/lib/resources/klarna_gateways.cjs.map +1 -1
- package/lib/resources/klarna_gateways.d.cts +2 -2
- package/lib/resources/klarna_gateways.d.ts +2 -2
- package/lib/resources/klarna_gateways.js.map +1 -1
- package/lib/resources/klarna_payments.cjs.map +1 -1
- package/lib/resources/klarna_payments.d.cts +2 -2
- package/lib/resources/klarna_payments.d.ts +2 -2
- package/lib/resources/klarna_payments.js.map +1 -1
- package/lib/resources/line_item_options.cjs.map +1 -1
- package/lib/resources/line_item_options.d.cts +2 -2
- package/lib/resources/line_item_options.d.ts +2 -2
- package/lib/resources/line_item_options.js.map +1 -1
- package/lib/resources/line_items.cjs.map +1 -1
- package/lib/resources/line_items.d.cts +2 -2
- package/lib/resources/line_items.d.ts +2 -2
- package/lib/resources/line_items.js.map +1 -1
- package/lib/resources/links.cjs.map +1 -1
- package/lib/resources/links.d.cts +2 -2
- package/lib/resources/links.d.ts +2 -2
- package/lib/resources/links.js.map +1 -1
- package/lib/resources/manual_gateways.cjs.map +1 -1
- package/lib/resources/manual_gateways.d.cts +2 -2
- package/lib/resources/manual_gateways.d.ts +2 -2
- package/lib/resources/manual_gateways.js.map +1 -1
- package/lib/resources/manual_tax_calculators.cjs.map +1 -1
- package/lib/resources/manual_tax_calculators.d.cts +2 -2
- package/lib/resources/manual_tax_calculators.d.ts +2 -2
- package/lib/resources/manual_tax_calculators.js.map +1 -1
- package/lib/resources/markets.cjs +4 -0
- package/lib/resources/markets.cjs.map +1 -1
- package/lib/resources/markets.d.cts +2 -2
- package/lib/resources/markets.d.ts +2 -2
- package/lib/resources/markets.js +4 -0
- package/lib/resources/markets.js.map +1 -1
- package/lib/resources/merchants.cjs.map +1 -1
- package/lib/resources/merchants.d.cts +2 -2
- package/lib/resources/merchants.d.ts +2 -2
- package/lib/resources/merchants.js.map +1 -1
- package/lib/resources/notifications.cjs.map +1 -1
- package/lib/resources/notifications.d.cts +2 -2
- package/lib/resources/notifications.d.ts +2 -2
- package/lib/resources/notifications.js.map +1 -1
- package/lib/resources/order_amount_promotion_rules.cjs.map +1 -1
- package/lib/resources/order_amount_promotion_rules.d.cts +2 -2
- package/lib/resources/order_amount_promotion_rules.d.ts +2 -2
- package/lib/resources/order_amount_promotion_rules.js.map +1 -1
- package/lib/resources/order_copies.cjs.map +1 -1
- package/lib/resources/order_copies.d.cts +2 -2
- package/lib/resources/order_copies.d.ts +2 -2
- package/lib/resources/order_copies.js.map +1 -1
- package/lib/resources/order_factories.cjs.map +1 -1
- package/lib/resources/order_factories.d.cts +2 -2
- package/lib/resources/order_factories.d.ts +2 -2
- package/lib/resources/order_factories.js.map +1 -1
- package/lib/resources/order_subscription_items.cjs.map +1 -1
- package/lib/resources/order_subscription_items.d.cts +2 -2
- package/lib/resources/order_subscription_items.d.ts +2 -2
- package/lib/resources/order_subscription_items.js.map +1 -1
- package/lib/resources/order_subscriptions.cjs.map +1 -1
- package/lib/resources/order_subscriptions.d.cts +2 -2
- package/lib/resources/order_subscriptions.d.ts +2 -2
- package/lib/resources/order_subscriptions.js.map +1 -1
- package/lib/resources/orders.cjs +4 -0
- package/lib/resources/orders.cjs.map +1 -1
- package/lib/resources/orders.d.cts +2 -2
- package/lib/resources/orders.d.ts +2 -2
- package/lib/resources/orders.js +4 -0
- package/lib/resources/orders.js.map +1 -1
- package/lib/resources/organizations.cjs.map +1 -1
- package/lib/resources/organizations.d.cts +2 -2
- package/lib/resources/organizations.d.ts +2 -2
- package/lib/resources/organizations.js.map +1 -1
- package/lib/resources/packages.cjs.map +1 -1
- package/lib/resources/packages.d.cts +2 -2
- package/lib/resources/packages.d.ts +2 -2
- package/lib/resources/packages.js.map +1 -1
- package/lib/resources/parcel_line_items.cjs.map +1 -1
- package/lib/resources/parcel_line_items.d.cts +2 -2
- package/lib/resources/parcel_line_items.d.ts +2 -2
- package/lib/resources/parcel_line_items.js.map +1 -1
- package/lib/resources/parcels.cjs.map +1 -1
- package/lib/resources/parcels.d.cts +2 -2
- package/lib/resources/parcels.d.ts +2 -2
- package/lib/resources/parcels.js.map +1 -1
- package/lib/resources/payment_gateways.cjs.map +1 -1
- package/lib/resources/payment_gateways.d.cts +2 -2
- package/lib/resources/payment_gateways.d.ts +2 -2
- package/lib/resources/payment_gateways.js.map +1 -1
- package/lib/resources/payment_methods.cjs.map +1 -1
- package/lib/resources/payment_methods.d.cts +2 -2
- package/lib/resources/payment_methods.d.ts +2 -2
- package/lib/resources/payment_methods.js.map +1 -1
- package/lib/resources/payment_options.cjs.map +1 -1
- package/lib/resources/payment_options.d.cts +2 -2
- package/lib/resources/payment_options.d.ts +2 -2
- package/lib/resources/payment_options.js.map +1 -1
- package/lib/resources/paypal_gateways.cjs.map +1 -1
- package/lib/resources/paypal_gateways.d.cts +2 -2
- package/lib/resources/paypal_gateways.d.ts +2 -2
- package/lib/resources/paypal_gateways.js.map +1 -1
- package/lib/resources/paypal_payments.cjs.map +1 -1
- package/lib/resources/paypal_payments.d.cts +2 -2
- package/lib/resources/paypal_payments.d.ts +2 -2
- package/lib/resources/paypal_payments.js.map +1 -1
- package/lib/resources/percentage_discount_promotions.cjs.map +1 -1
- package/lib/resources/percentage_discount_promotions.d.cts +2 -2
- package/lib/resources/percentage_discount_promotions.d.ts +2 -2
- package/lib/resources/percentage_discount_promotions.js.map +1 -1
- package/lib/resources/pickups.cjs.map +1 -1
- package/lib/resources/pickups.d.cts +2 -2
- package/lib/resources/pickups.d.ts +2 -2
- package/lib/resources/pickups.js.map +1 -1
- package/lib/resources/price_frequency_tiers.cjs.map +1 -1
- package/lib/resources/price_frequency_tiers.d.cts +2 -2
- package/lib/resources/price_frequency_tiers.d.ts +2 -2
- package/lib/resources/price_frequency_tiers.js.map +1 -1
- package/lib/resources/price_list_schedulers.cjs.map +1 -1
- package/lib/resources/price_list_schedulers.d.cts +2 -2
- package/lib/resources/price_list_schedulers.d.ts +2 -2
- package/lib/resources/price_list_schedulers.js.map +1 -1
- package/lib/resources/price_lists.cjs.map +1 -1
- package/lib/resources/price_lists.d.cts +2 -2
- package/lib/resources/price_lists.d.ts +2 -2
- package/lib/resources/price_lists.js.map +1 -1
- package/lib/resources/price_tiers.cjs.map +1 -1
- package/lib/resources/price_tiers.d.cts +2 -2
- package/lib/resources/price_tiers.d.ts +2 -2
- package/lib/resources/price_tiers.js.map +1 -1
- package/lib/resources/price_volume_tiers.cjs.map +1 -1
- package/lib/resources/price_volume_tiers.d.cts +2 -2
- package/lib/resources/price_volume_tiers.d.ts +2 -2
- package/lib/resources/price_volume_tiers.js.map +1 -1
- package/lib/resources/prices.cjs.map +1 -1
- package/lib/resources/prices.d.cts +2 -2
- package/lib/resources/prices.d.ts +2 -2
- package/lib/resources/prices.js.map +1 -1
- package/lib/resources/promotion_rules.cjs.map +1 -1
- package/lib/resources/promotion_rules.d.cts +2 -2
- package/lib/resources/promotion_rules.d.ts +2 -2
- package/lib/resources/promotion_rules.js.map +1 -1
- package/lib/resources/promotions.cjs.map +1 -1
- package/lib/resources/promotions.d.cts +2 -2
- package/lib/resources/promotions.d.ts +2 -2
- package/lib/resources/promotions.js.map +1 -1
- package/lib/resources/recurring_order_copies.cjs.map +1 -1
- package/lib/resources/recurring_order_copies.d.cts +2 -2
- package/lib/resources/recurring_order_copies.d.ts +2 -2
- package/lib/resources/recurring_order_copies.js.map +1 -1
- package/lib/resources/refunds.cjs.map +1 -1
- package/lib/resources/refunds.d.cts +2 -2
- package/lib/resources/refunds.d.ts +2 -2
- package/lib/resources/refunds.js.map +1 -1
- package/lib/resources/reserved_stocks.cjs.map +1 -1
- package/lib/resources/reserved_stocks.d.cts +2 -2
- package/lib/resources/reserved_stocks.d.ts +2 -2
- package/lib/resources/reserved_stocks.js.map +1 -1
- package/lib/resources/resource_errors.cjs.map +1 -1
- package/lib/resources/resource_errors.d.cts +2 -2
- package/lib/resources/resource_errors.d.ts +2 -2
- package/lib/resources/resource_errors.js.map +1 -1
- package/lib/resources/return_line_items.cjs.map +1 -1
- package/lib/resources/return_line_items.d.cts +2 -2
- package/lib/resources/return_line_items.d.ts +2 -2
- package/lib/resources/return_line_items.js.map +1 -1
- package/lib/resources/returns.cjs.map +1 -1
- package/lib/resources/returns.d.cts +2 -2
- package/lib/resources/returns.d.ts +2 -2
- package/lib/resources/returns.js.map +1 -1
- package/lib/resources/satispay_gateways.cjs.map +1 -1
- package/lib/resources/satispay_gateways.d.cts +2 -2
- package/lib/resources/satispay_gateways.d.ts +2 -2
- package/lib/resources/satispay_gateways.js.map +1 -1
- package/lib/resources/satispay_payments.cjs.map +1 -1
- package/lib/resources/satispay_payments.d.cts +2 -2
- package/lib/resources/satispay_payments.d.ts +2 -2
- package/lib/resources/satispay_payments.js.map +1 -1
- package/lib/resources/shipments.cjs.map +1 -1
- package/lib/resources/shipments.d.cts +2 -2
- package/lib/resources/shipments.d.ts +2 -2
- package/lib/resources/shipments.js.map +1 -1
- package/lib/resources/shipping_categories.cjs.map +1 -1
- package/lib/resources/shipping_categories.d.cts +2 -2
- package/lib/resources/shipping_categories.d.ts +2 -2
- package/lib/resources/shipping_categories.js.map +1 -1
- package/lib/resources/shipping_method_tiers.cjs.map +1 -1
- package/lib/resources/shipping_method_tiers.d.cts +2 -2
- package/lib/resources/shipping_method_tiers.d.ts +2 -2
- package/lib/resources/shipping_method_tiers.js.map +1 -1
- package/lib/resources/shipping_methods.cjs.map +1 -1
- package/lib/resources/shipping_methods.d.cts +2 -2
- package/lib/resources/shipping_methods.d.ts +2 -2
- package/lib/resources/shipping_methods.js.map +1 -1
- package/lib/resources/shipping_weight_tiers.cjs.map +1 -1
- package/lib/resources/shipping_weight_tiers.d.cts +2 -2
- package/lib/resources/shipping_weight_tiers.d.ts +2 -2
- package/lib/resources/shipping_weight_tiers.js.map +1 -1
- package/lib/resources/shipping_zones.cjs.map +1 -1
- package/lib/resources/shipping_zones.d.cts +2 -2
- package/lib/resources/shipping_zones.d.ts +2 -2
- package/lib/resources/shipping_zones.js.map +1 -1
- package/lib/resources/sku_list_items.cjs.map +1 -1
- package/lib/resources/sku_list_items.d.cts +2 -2
- package/lib/resources/sku_list_items.d.ts +2 -2
- package/lib/resources/sku_list_items.js.map +1 -1
- package/lib/resources/sku_list_promotion_rules.cjs.map +1 -1
- package/lib/resources/sku_list_promotion_rules.d.cts +2 -2
- package/lib/resources/sku_list_promotion_rules.d.ts +2 -2
- package/lib/resources/sku_list_promotion_rules.js.map +1 -1
- package/lib/resources/sku_lists.cjs.map +1 -1
- package/lib/resources/sku_lists.d.cts +2 -2
- package/lib/resources/sku_lists.d.ts +2 -2
- package/lib/resources/sku_lists.js.map +1 -1
- package/lib/resources/sku_options.cjs.map +1 -1
- package/lib/resources/sku_options.d.cts +2 -2
- package/lib/resources/sku_options.d.ts +2 -2
- package/lib/resources/sku_options.js.map +1 -1
- package/lib/resources/skus.cjs.map +1 -1
- package/lib/resources/skus.d.cts +2 -2
- package/lib/resources/skus.d.ts +2 -2
- package/lib/resources/skus.js.map +1 -1
- package/lib/resources/stock_items.cjs.map +1 -1
- package/lib/resources/stock_items.d.cts +2 -2
- package/lib/resources/stock_items.d.ts +2 -2
- package/lib/resources/stock_items.js.map +1 -1
- package/lib/resources/stock_line_items.cjs.map +1 -1
- package/lib/resources/stock_line_items.d.cts +2 -2
- package/lib/resources/stock_line_items.d.ts +2 -2
- package/lib/resources/stock_line_items.js.map +1 -1
- package/lib/resources/stock_locations.cjs.map +1 -1
- package/lib/resources/stock_locations.d.cts +2 -2
- package/lib/resources/stock_locations.d.ts +2 -2
- package/lib/resources/stock_locations.js.map +1 -1
- package/lib/resources/stock_reservations.cjs.map +1 -1
- package/lib/resources/stock_reservations.d.cts +2 -2
- package/lib/resources/stock_reservations.d.ts +2 -2
- package/lib/resources/stock_reservations.js.map +1 -1
- package/lib/resources/stock_transfers.cjs.map +1 -1
- package/lib/resources/stock_transfers.d.cts +2 -2
- package/lib/resources/stock_transfers.d.ts +2 -2
- package/lib/resources/stock_transfers.js.map +1 -1
- package/lib/resources/stores.cjs.map +1 -1
- package/lib/resources/stores.d.cts +2 -2
- package/lib/resources/stores.d.ts +2 -2
- package/lib/resources/stores.js.map +1 -1
- package/lib/resources/stripe_gateways.cjs.map +1 -1
- package/lib/resources/stripe_gateways.d.cts +2 -2
- package/lib/resources/stripe_gateways.d.ts +2 -2
- package/lib/resources/stripe_gateways.js.map +1 -1
- package/lib/resources/stripe_payments.cjs.map +1 -1
- package/lib/resources/stripe_payments.d.cts +2 -2
- package/lib/resources/stripe_payments.d.ts +2 -2
- package/lib/resources/stripe_payments.js.map +1 -1
- package/lib/resources/stripe_tax_accounts.cjs.map +1 -1
- package/lib/resources/stripe_tax_accounts.d.cts +2 -2
- package/lib/resources/stripe_tax_accounts.d.ts +2 -2
- package/lib/resources/stripe_tax_accounts.js.map +1 -1
- package/lib/resources/subscription_models.cjs.map +1 -1
- package/lib/resources/subscription_models.d.cts +2 -2
- package/lib/resources/subscription_models.d.ts +2 -2
- package/lib/resources/subscription_models.js.map +1 -1
- package/lib/resources/tags.cjs.map +1 -1
- package/lib/resources/tags.d.cts +2 -2
- package/lib/resources/tags.d.ts +2 -2
- package/lib/resources/tags.js.map +1 -1
- package/lib/resources/talon_one_accounts.cjs.map +1 -1
- package/lib/resources/talon_one_accounts.d.cts +2 -2
- package/lib/resources/talon_one_accounts.d.ts +2 -2
- package/lib/resources/talon_one_accounts.js.map +1 -1
- package/lib/resources/tax_calculators.cjs.map +1 -1
- package/lib/resources/tax_calculators.d.cts +2 -2
- package/lib/resources/tax_calculators.d.ts +2 -2
- package/lib/resources/tax_calculators.js.map +1 -1
- package/lib/resources/tax_categories.cjs.map +1 -1
- package/lib/resources/tax_categories.d.cts +2 -2
- package/lib/resources/tax_categories.d.ts +2 -2
- package/lib/resources/tax_categories.js.map +1 -1
- package/lib/resources/tax_rules.cjs.map +1 -1
- package/lib/resources/tax_rules.d.cts +2 -2
- package/lib/resources/tax_rules.d.ts +2 -2
- package/lib/resources/tax_rules.js.map +1 -1
- package/lib/resources/taxjar_accounts.cjs.map +1 -1
- package/lib/resources/taxjar_accounts.d.cts +2 -2
- package/lib/resources/taxjar_accounts.d.ts +2 -2
- package/lib/resources/taxjar_accounts.js.map +1 -1
- package/lib/resources/transactions.cjs.map +1 -1
- package/lib/resources/transactions.d.cts +2 -2
- package/lib/resources/transactions.d.ts +2 -2
- package/lib/resources/transactions.js.map +1 -1
- package/lib/resources/versions.cjs.map +1 -1
- package/lib/resources/versions.d.cts +2 -2
- package/lib/resources/versions.d.ts +2 -2
- package/lib/resources/versions.js.map +1 -1
- package/lib/resources/vertex_accounts.cjs.map +1 -1
- package/lib/resources/vertex_accounts.d.cts +2 -2
- package/lib/resources/vertex_accounts.d.ts +2 -2
- package/lib/resources/vertex_accounts.js.map +1 -1
- package/lib/resources/voids.cjs.map +1 -1
- package/lib/resources/voids.d.cts +2 -2
- package/lib/resources/voids.d.ts +2 -2
- package/lib/resources/voids.js.map +1 -1
- package/lib/resources/webhooks.cjs.map +1 -1
- package/lib/resources/webhooks.d.cts +2 -2
- package/lib/resources/webhooks.d.ts +2 -2
- package/lib/resources/webhooks.js.map +1 -1
- package/lib/resources/wire_transfers.cjs.map +1 -1
- package/lib/resources/wire_transfers.d.cts +2 -2
- package/lib/resources/wire_transfers.d.ts +2 -2
- package/lib/resources/wire_transfers.js.map +1 -1
- package/lib/static.d.cts +2 -2
- package/lib/static.d.ts +2 -2
- package/package.json +15 -4
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/resources/attachments.ts"],"names":[],"mappings":";;AAiKA,MAAM,oBAAoB,WAAwB,CAAA;AAAA,EAEjD,OAAgB,IAAuB,GAAA,aAAA;AAAA,EAEvC,MAAM,MAAA,CAAO,QAA4B,EAAA,MAAA,EAA0C,OAAgD,EAAA;AAClI,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAqC,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,WAAY,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACpH,EAEA,MAAM,MAAA,CAAO,QAA4B,EAAA,MAAA,EAA0C,OAAgD,EAAA;AAClI,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAqC,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,WAAY,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACpH,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,WAAA,CAAY,IAAK,EAAA,GAAI,IAAI,OAAO,CAAA;AAAA;AACnG,EAGA,aAAa,QAAuC,EAAA;AACnD,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,WAAY,CAAA,IAAA;AAAA;AACxD,EAGA,aAAa,EAA+C,EAAA;AAC3D,IAAO,OAAA,KAAA,CAAM,qBAAoC,EAAE,CAAA;AAAA;AACpD,EAEA,sBAAsB,GAAgC,EAAA;AACrD,IAAO,OAAA,KAAA,CAAM,qBAAqC,CAAA,GAAG,GAAG,CAAA;AAAA;AACzD,EAGA,IAAuB,GAAA;AACtB,IAAA,OAAO,WAAY,CAAA,IAAA;AAAA;AAGrB;AAGA,MAAM,QAAA,GAAW,IAAI,WAAY,EAAA;AACjC,IAAO,mBAAQ,GAAA","file":"attachments.js","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve } from '../query'\n\nimport type { Geocoder, GeocoderType } from './geocoders'\nimport type { PriceList, PriceListType } from './price_lists'\nimport type { PaymentMethod, PaymentMethodType } from './payment_methods'\nimport type { Market, MarketType } from './markets'\nimport type { CustomerGroup, CustomerGroupType } from './customer_groups'\nimport type { Order, OrderType } from './orders'\nimport type { Transaction, TransactionType } from './transactions'\nimport type { Promotion, PromotionType } from './promotions'\nimport type { TaxCalculator, TaxCalculatorType } from './tax_calculators'\nimport type { TaxCategory, TaxCategoryType } from './tax_categories'\nimport type { Sku, SkuType } from './skus'\nimport type { ShippingCategory, ShippingCategoryType } from './shipping_categories'\nimport type { Bundle, BundleType } from './bundles'\nimport type { SkuList, SkuListType } from './sku_lists'\nimport type { StockItem, StockItemType } from './stock_items'\nimport type { StockLocation, StockLocationType } from './stock_locations'\nimport type { Return, ReturnType } from './returns'\nimport type { CarrierAccount, CarrierAccountType } from './carrier_accounts'\nimport type { CouponRecipient, CouponRecipientType } from './coupon_recipients'\nimport type { Customer, CustomerType } from './customers'\nimport type { DeliveryLeadTime, DeliveryLeadTimeType } from './delivery_lead_times'\nimport type { ShippingMethod, ShippingMethodType } from './shipping_methods'\nimport type { DiscountEngine, DiscountEngineType } from './discount_engines'\nimport type { Shipment, ShipmentType } from './shipments'\nimport type { Parcel, ParcelType } from './parcels'\nimport type { GiftCardRecipient, GiftCardRecipientType } from './gift_card_recipients'\nimport type { GiftCard, GiftCardType } from './gift_cards'\nimport type { InventoryModel, InventoryModelType } from './inventory_models'\nimport type { StockTransfer, StockTransferType } from './stock_transfers'\nimport type { SkuOption, SkuOptionType } from './sku_options'\nimport type { Merchant, MerchantType } from './merchants'\nimport type { SubscriptionModel, SubscriptionModelType } from './subscription_models'\nimport type { PaymentOption, PaymentOptionType } from './payment_options'\nimport type { Package, PackageType } from './packages'\nimport type { Price, PriceType } from './prices'\nimport type { PriceTier, PriceTierType } from './price_tiers'\nimport type { ShippingMethodTier, ShippingMethodTierType } from './shipping_method_tiers'\nimport type { ShippingZone, ShippingZoneType } from './shipping_zones'\n\n\ntype AttachmentType = 'attachments'\ntype AttachmentRel = ResourceRel & { type: AttachmentType }\ntype GeocoderRel = ResourceRel & { type: GeocoderType }\ntype PriceListRel = ResourceRel & { type: PriceListType }\ntype PaymentMethodRel = ResourceRel & { type: PaymentMethodType }\ntype MarketRel = ResourceRel & { type: MarketType }\ntype CustomerGroupRel = ResourceRel & { type: CustomerGroupType }\ntype OrderRel = ResourceRel & { type: OrderType }\ntype TransactionRel = ResourceRel & { type: TransactionType }\ntype PromotionRel = ResourceRel & { type: PromotionType }\ntype TaxCalculatorRel = ResourceRel & { type: TaxCalculatorType }\ntype TaxCategoryRel = ResourceRel & { type: TaxCategoryType }\ntype SkuRel = ResourceRel & { type: SkuType }\ntype ShippingCategoryRel = ResourceRel & { type: ShippingCategoryType }\ntype BundleRel = ResourceRel & { type: BundleType }\ntype SkuListRel = ResourceRel & { type: SkuListType }\ntype StockItemRel = ResourceRel & { type: StockItemType }\ntype StockLocationRel = ResourceRel & { type: StockLocationType }\ntype ReturnRel = ResourceRel & { type: ReturnType }\ntype CarrierAccountRel = ResourceRel & { type: CarrierAccountType }\ntype CouponRecipientRel = ResourceRel & { type: CouponRecipientType }\ntype CustomerRel = ResourceRel & { type: CustomerType }\ntype DeliveryLeadTimeRel = ResourceRel & { type: DeliveryLeadTimeType }\ntype ShippingMethodRel = ResourceRel & { type: ShippingMethodType }\ntype DiscountEngineRel = ResourceRel & { type: DiscountEngineType }\ntype ShipmentRel = ResourceRel & { type: ShipmentType }\ntype ParcelRel = ResourceRel & { type: ParcelType }\ntype GiftCardRecipientRel = ResourceRel & { type: GiftCardRecipientType }\ntype GiftCardRel = ResourceRel & { type: GiftCardType }\ntype InventoryModelRel = ResourceRel & { type: InventoryModelType }\ntype StockTransferRel = ResourceRel & { type: StockTransferType }\ntype SkuOptionRel = ResourceRel & { type: SkuOptionType }\ntype MerchantRel = ResourceRel & { type: MerchantType }\ntype SubscriptionModelRel = ResourceRel & { type: SubscriptionModelType }\ntype PaymentOptionRel = ResourceRel & { type: PaymentOptionType }\ntype PackageRel = ResourceRel & { type: PackageType }\ntype PriceRel = ResourceRel & { type: PriceType }\ntype PriceTierRel = ResourceRel & { type: PriceTierType }\ntype ShippingMethodTierRel = ResourceRel & { type: ShippingMethodTierType }\ntype ShippingZoneRel = ResourceRel & { type: ShippingZoneType }\n\n\nexport type AttachmentSort = Pick<Attachment, 'id' | 'name'> & ResourceSort\n// export type AttachmentFilter = Pick<Attachment, 'id' | 'name' | 'description'> & ResourceFilter\n\n\ninterface Attachment extends Resource {\n\t\n\treadonly type: AttachmentType\n\n\t/** \n\t * The internal name of the attachment.\n\t * @example ```\"DDT transport document\"```\n\t */\n\tname: string\n\t/** \n\t * An internal description of the attachment.\n\t * @example ```\"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\"```\n\t */\n\tdescription?: string | null\n\t/** \n\t * The attachment URL.\n\t * @example ```\"https://s3.yourdomain.com/attachment.pdf\"```\n\t */\n\turl?: string | null\n\n\tattachable?: Geocoder | PriceList | PaymentMethod | Market | CustomerGroup | Order | Transaction | Promotion | TaxCalculator | TaxCategory | Sku | ShippingCategory | Bundle | SkuList | StockItem | StockLocation | Return | CarrierAccount | CouponRecipient | Customer | DeliveryLeadTime | ShippingMethod | DiscountEngine | Shipment | Parcel | GiftCardRecipient | GiftCard | InventoryModel | StockTransfer | SkuOption | Merchant | SubscriptionModel | PaymentOption | Package | Price | PriceTier | ShippingMethodTier | ShippingZone | null\n\n}\n\n\ninterface AttachmentCreate extends ResourceCreate {\n\t\n\t/** \n\t * The internal name of the attachment.\n\t * @example ```\"DDT transport document\"```\n\t */\n\tname: string\n\t/** \n\t * An internal description of the attachment.\n\t * @example ```\"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\"```\n\t */\n\tdescription?: string | null\n\t/** \n\t * The attachment URL.\n\t * @example ```\"https://s3.yourdomain.com/attachment.pdf\"```\n\t */\n\turl?: string | null\n\n\tattachable: GeocoderRel | PriceListRel | PaymentMethodRel | MarketRel | CustomerGroupRel | OrderRel | TransactionRel | PromotionRel | TaxCalculatorRel | TaxCategoryRel | SkuRel | ShippingCategoryRel | BundleRel | SkuListRel | StockItemRel | StockLocationRel | ReturnRel | CarrierAccountRel | CouponRecipientRel | CustomerRel | DeliveryLeadTimeRel | ShippingMethodRel | DiscountEngineRel | ShipmentRel | ParcelRel | GiftCardRecipientRel | GiftCardRel | InventoryModelRel | StockTransferRel | SkuOptionRel | MerchantRel | SubscriptionModelRel | PaymentOptionRel | PackageRel | PriceRel | PriceTierRel | ShippingMethodTierRel | ShippingZoneRel\n\n}\n\n\ninterface AttachmentUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The internal name of the attachment.\n\t * @example ```\"DDT transport document\"```\n\t */\n\tname?: string | null\n\t/** \n\t * An internal description of the attachment.\n\t * @example ```\"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\"```\n\t */\n\tdescription?: string | null\n\t/** \n\t * The attachment URL.\n\t * @example ```\"https://s3.yourdomain.com/attachment.pdf\"```\n\t */\n\turl?: string | null\n\n\tattachable?: GeocoderRel | PriceListRel | PaymentMethodRel | MarketRel | CustomerGroupRel | OrderRel | TransactionRel | PromotionRel | TaxCalculatorRel | TaxCategoryRel | SkuRel | ShippingCategoryRel | BundleRel | SkuListRel | StockItemRel | StockLocationRel | ReturnRel | CarrierAccountRel | CouponRecipientRel | CustomerRel | DeliveryLeadTimeRel | ShippingMethodRel | DiscountEngineRel | ShipmentRel | ParcelRel | GiftCardRecipientRel | GiftCardRel | InventoryModelRel | StockTransferRel | SkuOptionRel | MerchantRel | SubscriptionModelRel | PaymentOptionRel | PackageRel | PriceRel | PriceTierRel | ShippingMethodTierRel | ShippingZoneRel | null\n\n}\n\n\nclass Attachments extends ApiResource<Attachment> {\n\n\tstatic readonly TYPE: AttachmentType = 'attachments' as const\n\n\tasync create(resource: AttachmentCreate, params?: QueryParamsRetrieve<Attachment>, options?: ResourcesConfig): Promise<Attachment> {\n\t\treturn this.resources.create<AttachmentCreate, Attachment>({ ...resource, type: Attachments.TYPE }, params, options)\n\t}\n\n\tasync update(resource: AttachmentUpdate, params?: QueryParamsRetrieve<Attachment>, options?: ResourcesConfig): Promise<Attachment> {\n\t\treturn this.resources.update<AttachmentUpdate, Attachment>({ ...resource, type: Attachments.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: Attachments.TYPE } : id, options)\n\t}\n\n\n\tisAttachment(resource: any): resource is Attachment {\n\t\treturn resource.type && (resource.type === Attachments.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): AttachmentRel {\n\t\treturn super.relationshipOneToOne<AttachmentRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): AttachmentRel[] {\n\t\treturn super.relationshipOneToMany<AttachmentRel>(...ids)\n\t}\n\n\n\ttype(): AttachmentType {\n\t\treturn Attachments.TYPE\n\t}\n\n}\n\n\nconst instance = new Attachments()\nexport default instance\n\nexport type { Attachment, AttachmentCreate, AttachmentUpdate, AttachmentType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/attachments.ts"],"names":[],"mappings":";;AAiKA,MAAM,oBAAoB,WAAwB,CAAA;AAAA,EAEjD,OAAgB,IAAuB,GAAA,aAAA;AAAA,EAEvC,MAAM,MAAA,CAAO,QAA4B,EAAA,MAAA,EAA0C,OAAgD,EAAA;AAClI,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAqC,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,WAAY,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACpH,EAEA,MAAM,MAAA,CAAO,QAA4B,EAAA,MAAA,EAA0C,OAAgD,EAAA;AAClI,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAqC,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,WAAY,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACpH,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,WAAA,CAAY,IAAK,EAAA,GAAI,IAAI,OAAO,CAAA;AAAA;AACnG,EAGA,aAAa,QAAuC,EAAA;AACnD,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,WAAY,CAAA,IAAA;AAAA;AACxD,EAGA,aAAa,EAA+C,EAAA;AAC3D,IAAO,OAAA,KAAA,CAAM,qBAAoC,EAAE,CAAA;AAAA;AACpD,EAEA,sBAAsB,GAAgC,EAAA;AACrD,IAAO,OAAA,KAAA,CAAM,qBAAqC,CAAA,GAAG,GAAG,CAAA;AAAA;AACzD,EAGA,IAAuB,GAAA;AACtB,IAAA,OAAO,WAAY,CAAA,IAAA;AAAA;AAGrB;AAGA,MAAM,QAAA,GAAW,IAAI,WAAY,EAAA;AACjC,IAAO,mBAAQ,GAAA","file":"attachments.js","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve } from '../query'\n\nimport type { Geocoder, GeocoderType } from './geocoders'\nimport type { PriceList, PriceListType } from './price_lists'\nimport type { PaymentMethod, PaymentMethodType } from './payment_methods'\nimport type { Market, MarketType } from './markets'\nimport type { CustomerGroup, CustomerGroupType } from './customer_groups'\nimport type { Order, OrderType } from './orders'\nimport type { Transaction, TransactionType } from './transactions'\nimport type { Promotion, PromotionType } from './promotions'\nimport type { TaxCalculator, TaxCalculatorType } from './tax_calculators'\nimport type { TaxCategory, TaxCategoryType } from './tax_categories'\nimport type { Sku, SkuType } from './skus'\nimport type { ShippingCategory, ShippingCategoryType } from './shipping_categories'\nimport type { Bundle, BundleType } from './bundles'\nimport type { SkuList, SkuListType } from './sku_lists'\nimport type { StockItem, StockItemType } from './stock_items'\nimport type { StockLocation, StockLocationType } from './stock_locations'\nimport type { Return, ReturnType } from './returns'\nimport type { CarrierAccount, CarrierAccountType } from './carrier_accounts'\nimport type { CouponRecipient, CouponRecipientType } from './coupon_recipients'\nimport type { Customer, CustomerType } from './customers'\nimport type { DeliveryLeadTime, DeliveryLeadTimeType } from './delivery_lead_times'\nimport type { ShippingMethod, ShippingMethodType } from './shipping_methods'\nimport type { DiscountEngine, DiscountEngineType } from './discount_engines'\nimport type { Shipment, ShipmentType } from './shipments'\nimport type { Parcel, ParcelType } from './parcels'\nimport type { GiftCardRecipient, GiftCardRecipientType } from './gift_card_recipients'\nimport type { GiftCard, GiftCardType } from './gift_cards'\nimport type { InventoryModel, InventoryModelType } from './inventory_models'\nimport type { StockTransfer, StockTransferType } from './stock_transfers'\nimport type { SkuOption, SkuOptionType } from './sku_options'\nimport type { Merchant, MerchantType } from './merchants'\nimport type { SubscriptionModel, SubscriptionModelType } from './subscription_models'\nimport type { PaymentOption, PaymentOptionType } from './payment_options'\nimport type { Package, PackageType } from './packages'\nimport type { Price, PriceType } from './prices'\nimport type { PriceTier, PriceTierType } from './price_tiers'\nimport type { ShippingMethodTier, ShippingMethodTierType } from './shipping_method_tiers'\nimport type { ShippingZone, ShippingZoneType } from './shipping_zones'\n\n\ntype AttachmentType = 'attachments'\ntype AttachmentRel = ResourceRel & { type: AttachmentType }\ntype GeocoderRel = ResourceRel & { type: GeocoderType }\ntype PriceListRel = ResourceRel & { type: PriceListType }\ntype PaymentMethodRel = ResourceRel & { type: PaymentMethodType }\ntype MarketRel = ResourceRel & { type: MarketType }\ntype CustomerGroupRel = ResourceRel & { type: CustomerGroupType }\ntype OrderRel = ResourceRel & { type: OrderType }\ntype TransactionRel = ResourceRel & { type: TransactionType }\ntype PromotionRel = ResourceRel & { type: PromotionType }\ntype TaxCalculatorRel = ResourceRel & { type: TaxCalculatorType }\ntype TaxCategoryRel = ResourceRel & { type: TaxCategoryType }\ntype SkuRel = ResourceRel & { type: SkuType }\ntype ShippingCategoryRel = ResourceRel & { type: ShippingCategoryType }\ntype BundleRel = ResourceRel & { type: BundleType }\ntype SkuListRel = ResourceRel & { type: SkuListType }\ntype StockItemRel = ResourceRel & { type: StockItemType }\ntype StockLocationRel = ResourceRel & { type: StockLocationType }\ntype ReturnRel = ResourceRel & { type: ReturnType }\ntype CarrierAccountRel = ResourceRel & { type: CarrierAccountType }\ntype CouponRecipientRel = ResourceRel & { type: CouponRecipientType }\ntype CustomerRel = ResourceRel & { type: CustomerType }\ntype DeliveryLeadTimeRel = ResourceRel & { type: DeliveryLeadTimeType }\ntype ShippingMethodRel = ResourceRel & { type: ShippingMethodType }\ntype DiscountEngineRel = ResourceRel & { type: DiscountEngineType }\ntype ShipmentRel = ResourceRel & { type: ShipmentType }\ntype ParcelRel = ResourceRel & { type: ParcelType }\ntype GiftCardRecipientRel = ResourceRel & { type: GiftCardRecipientType }\ntype GiftCardRel = ResourceRel & { type: GiftCardType }\ntype InventoryModelRel = ResourceRel & { type: InventoryModelType }\ntype StockTransferRel = ResourceRel & { type: StockTransferType }\ntype SkuOptionRel = ResourceRel & { type: SkuOptionType }\ntype MerchantRel = ResourceRel & { type: MerchantType }\ntype SubscriptionModelRel = ResourceRel & { type: SubscriptionModelType }\ntype PaymentOptionRel = ResourceRel & { type: PaymentOptionType }\ntype PackageRel = ResourceRel & { type: PackageType }\ntype PriceRel = ResourceRel & { type: PriceType }\ntype PriceTierRel = ResourceRel & { type: PriceTierType }\ntype ShippingMethodTierRel = ResourceRel & { type: ShippingMethodTierType }\ntype ShippingZoneRel = ResourceRel & { type: ShippingZoneType }\n\n\nexport type AttachmentSort = Pick<Attachment, 'id' | 'name'> & ResourceSort\n// export type AttachmentFilter = Pick<Attachment, 'id' | 'name' | 'description'> & ResourceFilter\n\n\ninterface Attachment extends Resource {\n\t\n\treadonly type: AttachmentType\n\n\t/** \n\t * The internal name of the attachment.\n\t * @example ```\"DDT transport document\"```\n\t */\n\tname: string\n\t/** \n\t * An internal description of the attachment.\n\t * @example ```\"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\"```\n\t */\n\tdescription?: string | null\n\t/** \n\t * The attachment URL.\n\t * @example ```\"https://s3.yourdomain.com/attachment.pdf\"```\n\t */\n\turl?: string | null\n\n\tattachable?: Geocoder | PriceList | PaymentMethod | Market | CustomerGroup | Order | Transaction | Promotion | TaxCalculator | TaxCategory | Sku | ShippingCategory | Bundle | SkuList | StockItem | StockLocation | Return | CarrierAccount | CouponRecipient | Customer | DeliveryLeadTime | ShippingMethod | DiscountEngine | Shipment | Parcel | GiftCardRecipient | GiftCard | InventoryModel | StockTransfer | SkuOption | Merchant | SubscriptionModel | PaymentOption | Package | Price | PriceTier | ShippingMethodTier | ShippingZone | null\n\n}\n\n\ninterface AttachmentCreate extends ResourceCreate {\n\t\n\t/** \n\t * The internal name of the attachment.\n\t * @example ```\"DDT transport document\"```\n\t */\n\tname: string\n\t/** \n\t * An internal description of the attachment.\n\t * @example ```\"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\"```\n\t */\n\tdescription?: string | null\n\t/** \n\t * The attachment URL.\n\t * @example ```\"https://s3.yourdomain.com/attachment.pdf\"```\n\t */\n\turl?: string | null\n\n\tattachable: GeocoderRel | PriceListRel | PaymentMethodRel | MarketRel | CustomerGroupRel | OrderRel | TransactionRel | PromotionRel | TaxCalculatorRel | TaxCategoryRel | SkuRel | ShippingCategoryRel | BundleRel | SkuListRel | StockItemRel | StockLocationRel | ReturnRel | CarrierAccountRel | CouponRecipientRel | CustomerRel | DeliveryLeadTimeRel | ShippingMethodRel | DiscountEngineRel | ShipmentRel | ParcelRel | GiftCardRecipientRel | GiftCardRel | InventoryModelRel | StockTransferRel | SkuOptionRel | MerchantRel | SubscriptionModelRel | PaymentOptionRel | PackageRel | PriceRel | PriceTierRel | ShippingMethodTierRel | ShippingZoneRel\n\n}\n\n\ninterface AttachmentUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The internal name of the attachment.\n\t * @example ```\"DDT transport document\"```\n\t */\n\tname?: string | null\n\t/** \n\t * An internal description of the attachment.\n\t * @example ```\"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\"```\n\t */\n\tdescription?: string | null\n\t/** \n\t * The attachment URL.\n\t * @example ```\"https://s3.yourdomain.com/attachment.pdf\"```\n\t */\n\turl?: string | null\n\n\tattachable?: GeocoderRel | PriceListRel | PaymentMethodRel | MarketRel | CustomerGroupRel | OrderRel | TransactionRel | PromotionRel | TaxCalculatorRel | TaxCategoryRel | SkuRel | ShippingCategoryRel | BundleRel | SkuListRel | StockItemRel | StockLocationRel | ReturnRel | CarrierAccountRel | CouponRecipientRel | CustomerRel | DeliveryLeadTimeRel | ShippingMethodRel | DiscountEngineRel | ShipmentRel | ParcelRel | GiftCardRecipientRel | GiftCardRel | InventoryModelRel | StockTransferRel | SkuOptionRel | MerchantRel | SubscriptionModelRel | PaymentOptionRel | PackageRel | PriceRel | PriceTierRel | ShippingMethodTierRel | ShippingZoneRel | null\n\n}\n\n\nclass Attachments extends ApiResource<Attachment> {\n\n\tstatic readonly TYPE: AttachmentType = 'attachments' as const\n\n\tasync create(resource: AttachmentCreate, params?: QueryParamsRetrieve<Attachment>, options?: ResourcesConfig): Promise<Attachment> {\n\t\treturn this.resources.create<AttachmentCreate, Attachment>({ ...resource, type: Attachments.TYPE }, params, options)\n\t}\n\n\tasync update(resource: AttachmentUpdate, params?: QueryParamsRetrieve<Attachment>, options?: ResourcesConfig): Promise<Attachment> {\n\t\treturn this.resources.update<AttachmentUpdate, Attachment>({ ...resource, type: Attachments.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: Attachments.TYPE } : id, options)\n\t}\n\n\n\tisAttachment(resource: any): resource is Attachment {\n\t\treturn resource.type && (resource.type === Attachments.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): AttachmentRel {\n\t\treturn super.relationshipOneToOne<AttachmentRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): AttachmentRel[] {\n\t\treturn super.relationshipOneToMany<AttachmentRel>(...ids)\n\t}\n\n\n\ttype(): AttachmentType {\n\t\treturn Attachments.TYPE\n\t}\n\n}\n\n\nconst instance = new Attachments()\nexport default instance\n\nexport type { Attachments, Attach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,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,cAAe,CAAA,IAAA;AAAA;AAC3D,EAGA,aAAa,EAAkD,EAAA;AAC9D,IAAO,OAAA,KAAA,CAAM,qBAAuC,EAAE,CAAA;AAAA;AACvD,EAEA,sBAAsB,GAAmC,EAAA;AACxD,IAAO,OAAA,KAAA,CAAM,qBAAwC,CAAA,GAAG,GAAG,CAAA;AAAA;AAC5D,EAGA,IAA0B,GAAA;AACzB,IAAA,OAAO,cAAe,CAAA,IAAA;AAAA;AAGxB;AAGA,MAAM,QAAA,GAAW,IAAI,cAAe,EAAA;AACpC,IAAO,sBAAQ,GAAA","file":"authorizations.cjs","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 { Capture } from './captures'\nimport type { Void } from './voids'\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 AuthorizationType = 'authorizations'\ntype AuthorizationRel = ResourceRel & { type: AuthorizationType }\n\n\nexport type AuthorizationSort = Pick<Authorization, 'id' | 'number' | 'amount_cents'> & ResourceSort\n// export type AuthorizationFilter = Pick<Authorization, 'id' | 'number' | 'currency_code' | 'amount_cents' | 'succeeded' | 'message' | 'error_code' | 'error_detail' | 'token' | 'gateway_transaction_id'> & ResourceFilter\n\n\ninterface Authorization extends Resource {\n\t\n\treadonly type: AuthorizationType\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 CVV code returned by the payment gateway.\n\t * @example ```\"000\"```\n\t */\n\tcvv_code?: string | null\n\t/** \n\t * The CVV message returned by the payment gateway.\n\t * @example ```\"validated\"```\n\t */\n\tcvv_message?: string | null\n\t/** \n\t * The AVS code returned by the payment gateway.\n\t * @example ```\"000\"```\n\t */\n\tavs_code?: string | null\n\t/** \n\t * The AVS message returned by the payment gateway.\n\t * @example ```\"validated\"```\n\t */\n\tavs_message?: string | null\n\t/** \n\t * The fraud review message, if any, returned by the payment gateway.\n\t * @example ```\"passed\"```\n\t */\n\tfraud_review?: string | null\n\t/** \n\t * The amount to be captured, in cents.\n\t * @example ```500```\n\t */\n\tcapture_amount_cents?: number | null\n\t/** \n\t * The amount to be captured, float.\n\t * @example ```5```\n\t */\n\tcapture_amount_float?: number | null\n\t/** \n\t * The amount to be captured, formatted.\n\t * @example ```\"€5,00\"```\n\t */\n\tformatted_capture_amount?: string | null\n\t/** \n\t * The balance to be captured, in cents.\n\t * @example ```1000```\n\t */\n\tcapture_balance_cents?: number | null\n\t/** \n\t * The balance to be captured, float.\n\t * @example ```10```\n\t */\n\tcapture_balance_float?: number | null\n\t/** \n\t * The balance to be captured, formatted.\n\t * @example ```\"€10,00\"```\n\t */\n\tformatted_capture_balance?: string | null\n\t/** \n\t * The balance to be voided, in cents.\n\t * @example ```1500```\n\t */\n\tvoid_balance_cents?: number | null\n\t/** \n\t * The balance to be voided, float.\n\t * @example ```15```\n\t */\n\tvoid_balance_float?: number | null\n\t/** \n\t * The balance to be voided, formatted.\n\t * @example ```\"€15,00\"```\n\t */\n\tformatted_void_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\tcaptures?: Capture[] | null\n\tvoids?: Void[] | null\n\n}\n\n\ninterface AuthorizationUpdate 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 capture for this authorization.\n\t * @example ```true```\n\t */\n\t_capture?: boolean | null\n\t/** \n\t * Send this attribute as a value in cents if you want to overwrite the amount to be captured.\n\t * @example ```500```\n\t */\n\t_capture_amount_cents?: number | null\n\t/** \n\t * Send this attribute if you want to create a void for this authorization.\n\t * @example ```true```\n\t */\n\t_void?: boolean | null\n\t/** \n\t * Send this attribute if you want to void a succeeded authorization 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 Authorizations extends ApiResource<Authorization> {\n\n\tstatic readonly TYPE: AuthorizationType = 'authorizations' as const\n\n\tasync update(resource: AuthorizationUpdate, params?: QueryParamsRetrieve<Authorization>, options?: ResourcesConfig): Promise<Authorization> {\n\t\treturn this.resources.update<AuthorizationUpdate, Authorization>({ ...resource, type: Authorizations.TYPE }, params, options)\n\t}\n\n\tasync order(authorizationId: string | Authorization, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _authorizationId = (authorizationId as Authorization).id || authorizationId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `authorizations/${_authorizationId}/order`, params, options) as unknown as Order\n\t}\n\n\tasync attachments(authorizationId: string | Authorization, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _authorizationId = (authorizationId as Authorization).id || authorizationId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `authorizations/${_authorizationId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(authorizationId: string | Authorization, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _authorizationId = (authorizationId as Authorization).id || authorizationId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `authorizations/${_authorizationId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync versions(authorizationId: string | Authorization, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _authorizationId = (authorizationId as Authorization).id || authorizationId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `authorizations/${_authorizationId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync captures(authorizationId: string | Authorization, params?: QueryParamsList<Capture>, options?: ResourcesConfig): Promise<ListResponse<Capture>> {\n\t\tconst _authorizationId = (authorizationId as Authorization).id || authorizationId as string\n\t\treturn this.resources.fetch<Capture>({ type: 'captures' }, `authorizations/${_authorizationId}/captures`, params, options) as unknown as ListResponse<Capture>\n\t}\n\n\tasync voids(authorizationId: string | Authorization, params?: QueryParamsList<Void>, options?: ResourcesConfig): Promise<ListResponse<Void>> {\n\t\tconst _authorizationId = (authorizationId as Authorization).id || authorizationId as string\n\t\treturn this.resources.fetch<Void>({ type: 'voids' }, `authorizations/${_authorizationId}/voids`, params, options) as unknown as ListResponse<Void>\n\t}\n\n\tasync _forward(id: string | Authorization, params?: QueryParamsRetrieve<Authorization>, options?: ResourcesConfig): Promise<Authorization> {\n\t\treturn this.resources.update<AuthorizationUpdate, Authorization>({ id: (typeof id === 'string')? id: id.id, type: Authorizations.TYPE, _forward: true }, params, options)\n\t}\n\n\tasync _capture(id: string | Authorization, params?: QueryParamsRetrieve<Authorization>, options?: ResourcesConfig): Promise<Authorization> {\n\t\treturn this.resources.update<AuthorizationUpdate, Authorization>({ id: (typeof id === 'string')? id: id.id, type: Authorizations.TYPE, _capture: true }, params, options)\n\t}\n\n\tasync _capture_amount_cents(id: string | Authorization, triggerValue: number, params?: QueryParamsRetrieve<Authorization>, options?: ResourcesConfig): Promise<Authorization> {\n\t\treturn this.resources.update<AuthorizationUpdate, Authorization>({ id: (typeof id === 'string')? id: id.id, type: Authorizations.TYPE, _capture_amount_cents: triggerValue }, params, options)\n\t}\n\n\tasync _void(id: string | Authorization, params?: QueryParamsRetrieve<Authorization>, options?: ResourcesConfig): Promise<Authorization> {\n\t\treturn this.resources.update<AuthorizationUpdate, Authorization>({ id: (typeof id === 'string')? id: id.id, type: Authorizations.TYPE, _void: true }, params, options)\n\t}\n\n\tasync _cancel(id: string | Authorization, params?: QueryParamsRetrieve<Authorization>, options?: ResourcesConfig): Promise<Authorization> {\n\t\treturn this.resources.update<AuthorizationUpdate, Authorization>({ id: (typeof id === 'string')? id: id.id, type: Authorizations.TYPE, _cancel: true }, params, options)\n\t}\n\n\n\tisAuthorization(resource: any): resource is Authorization {\n\t\treturn resource.type && (resource.type === Authorizations.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): AuthorizationRel {\n\t\treturn super.relationshipOneToOne<AuthorizationRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): AuthorizationRel[] {\n\t\treturn super.relationshipOneToMany<AuthorizationRel>(...ids)\n\t}\n\n\n\ttype(): AuthorizationType {\n\t\treturn Authorizations.TYPE\n\t}\n\n}\n\n\nconst instance = new Authorizations()\nexport default instance\n\nexport type { Authorization, AuthorizationUpdate, AuthorizationType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/authorizations.ts"],"names":["ApiResource"],"mappings":";;;;AA6MA,MAAM,uBAAuBA,oBAA2B,CAAA;AAAA,EAEvD,OAAgB,IAA0B,GAAA,gBAAA;AAAA,EAE1C,MAAM,MAAA,CAAO,QAA+B,EAAA,MAAA,EAA6C,OAAmD,EAAA;AAC3I,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA2C,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,cAAe,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC7H,EAEA,MAAM,KAAA,CAAM,eAAyC,EAAA,MAAA,EAAqC,OAA2C,EAAA;AACpI,IAAM,MAAA,gBAAA,GAAoB,gBAAkC,EAAM,IAAA,eAAA;AAClE,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAa,EAAE,IAAA,EAAM,QAAS,EAAA,EAAG,CAAkB,eAAA,EAAA,gBAAgB,CAAU,MAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACnH,EAEA,MAAM,WAAA,CAAY,eAAyC,EAAA,MAAA,EAAsC,OAA8D,EAAA;AAC9J,IAAM,MAAA,gBAAA,GAAoB,gBAAkC,EAAM,IAA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AAA,EAAM,OAAO,IAAK,EAAA,EAAG,QAAQ,OAAO,CAAA;AAAA;AACtK,EAEA,MAAM,OAAA,CAAQ,EAA4B,EAAA,MAAA,EAA6C,OAAmD,EAAA;AACzI,IAAA,OAAO,KAAK,SAAU,CAAA,MAAA,CAA2C,EAAE,EAAK,EAAA,OAAO,OAAO,QAAW,GAAA,EAAA,GAAI,EAAG,CAAA,EAAA,EAAI,MAAM,cAAe,CAAA,IAAA,EAAM,SAAS,IAAK,EAAA,EAAG,QAAQ,OAAO,CAAA;AAAA;AACxK,EAGA,gBAAgB,QAA0C,EAAA;AACzD,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,cAAe,CAAA,IAAA;AAAA;AAC3D,EAGA,aAAa,EAAkD,EAAA;AAC9D,IAAO,OAAA,KAAA,CAAM,qBAAuC,EAAE,CAAA;AAAA;AACvD,EAEA,sBAAsB,GAAmC,EAAA;AACxD,IAAO,OAAA,KAAA,CAAM,qBAAwC,CAAA,GAAG,GAAG,CAAA;AAAA;AAC5D,EAGA,IAA0B,GAAA;AACzB,IAAA,OAAO,cAAe,CAAA,IAAA;AAAA;AAGxB;AAGA,MAAM,QAAA,GAAW,IAAI,cAAe,EAAA;AACpC,IAAO,sBAAQ,GAAA","file":"authorizations.cjs","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 { Capture } from './captures'\nimport type { Void } from './voids'\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 AuthorizationType = 'authorizations'\ntype AuthorizationRel = ResourceRel & { type: AuthorizationType }\n\n\nexport type AuthorizationSort = Pick<Authorization, 'id' | 'number' | 'amount_cents'> & ResourceSort\n// export type AuthorizationFilter = Pick<Authorization, 'id' | 'number' | 'currency_code' | 'amount_cents' | 'succeeded' | 'message' | 'error_code' | 'error_detail' | 'token' | 'gateway_transaction_id'> & ResourceFilter\n\n\ninterface Authorization extends Resource {\n\t\n\treadonly type: AuthorizationType\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 CVV code returned by the payment gateway.\n\t * @example ```\"000\"```\n\t */\n\tcvv_code?: string | null\n\t/** \n\t * The CVV message returned by the payment gateway.\n\t * @example ```\"validated\"```\n\t */\n\tcvv_message?: string | null\n\t/** \n\t * The AVS code returned by the payment gateway.\n\t * @example ```\"000\"```\n\t */\n\tavs_code?: string | null\n\t/** \n\t * The AVS message returned by the payment gateway.\n\t * @example ```\"validated\"```\n\t */\n\tavs_message?: string | null\n\t/** \n\t * The fraud review message, if any, returned by the payment gateway.\n\t * @example ```\"passed\"```\n\t */\n\tfraud_review?: string | null\n\t/** \n\t * The amount to be captured, in cents.\n\t * @example ```500```\n\t */\n\tcapture_amount_cents?: number | null\n\t/** \n\t * The amount to be captured, float.\n\t * @example ```5```\n\t */\n\tcapture_amount_float?: number | null\n\t/** \n\t * The amount to be captured, formatted.\n\t * @example ```\"€5,00\"```\n\t */\n\tformatted_capture_amount?: string | null\n\t/** \n\t * The balance to be captured, in cents.\n\t * @example ```1000```\n\t */\n\tcapture_balance_cents?: number | null\n\t/** \n\t * The balance to be captured, float.\n\t * @example ```10```\n\t */\n\tcapture_balance_float?: number | null\n\t/** \n\t * The balance to be captured, formatted.\n\t * @example ```\"€10,00\"```\n\t */\n\tformatted_capture_balance?: string | null\n\t/** \n\t * The balance to be voided, in cents.\n\t * @example ```1500```\n\t */\n\tvoid_balance_cents?: number | null\n\t/** \n\t * The balance to be voided, float.\n\t * @example ```15```\n\t */\n\tvoid_balance_float?: number | null\n\t/** \n\t * The balance to be voided, formatted.\n\t * @example ```\"€15,00\"```\n\t */\n\tformatted_void_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\tcaptures?: Capture[] | null\n\tvoids?: Void[] | null\n\n}\n\n\ninterface AuthorizationUpdate 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 capture for this authorization.\n\t * @example ```true```\n\t */\n\t_capture?: boolean | null\n\t/** \n\t * Send this attribute as a value in cents if you want to overwrite the amount to be captured.\n\t * @example ```500```\n\t */\n\t_capture_amount_cents?: number | null\n\t/** \n\t * Send this attribute if you want to create a void for this authorization.\n\t * @example ```true```\n\t */\n\t_void?: boolean | null\n\t/** \n\t * Send this attribute if you want to void a succeeded authorization 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 Authorizations extends ApiResource<Authorization> {\n\n\tstatic readonly TYPE: AuthorizationType = 'authorizations' as const\n\n\tasync update(resource: AuthorizationUpdate, params?: QueryParamsRetrieve<Authorization>, options?: ResourcesConfig): Promise<Authorization> {\n\t\treturn this.resources.update<AuthorizationUpdate, Authorization>({ ...resource, type: Authorizations.TYPE }, params, options)\n\t}\n\n\tasync order(authorizationId: string | Authorization, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _authorizationId = (authorizationId as Authorization).id || authorizationId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `authorizations/${_authorizationId}/order`, params, options) as unknown as Order\n\t}\n\n\tasync attachments(authorizationId: string | Authorization, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _authorizationId = (authorizationId as Authorization).id || authorizationId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `authorizations/${_authorizationId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(authorizationId: string | Authorization, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _authorizationId = (authorizationId as Authorization).id || authorizationId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `authorizations/${_authorizationId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync versions(authorizationId: string | Authorization, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _authorizationId = (authorizationId as Authorization).id || authorizationId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `authorizations/${_authorizationId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync captures(authorizationId: string | Authorization, params?: QueryParamsList<Capture>, options?: ResourcesConfig): Promise<ListResponse<Capture>> {\n\t\tconst _authorizationId = (authorizationId as Authorization).id || authorizationId as string\n\t\treturn this.resources.fetch<Capture>({ type: 'captures' }, `authorizations/${_authorizationId}/captures`, params, options) as unknown as ListResponse<Capture>\n\t}\n\n\tasync voids(authorizationId: string | Authorization, params?: QueryParamsList<Void>, options?: ResourcesConfig): Promise<ListResponse<Void>> {\n\t\tconst _authorizationId = (authorizationId as Authorization).id || authorizationId as string\n\t\treturn this.resources.fetch<Void>({ type: 'voids' }, `authorizations/${_authorizationId}/voids`, params, options) as unknown as ListResponse<Void>\n\t}\n\n\tasync _forward(id: string | Authorization, params?: QueryParamsRetrieve<Authorization>, options?: ResourcesConfig): Promise<Authorization> {\n\t\treturn this.resources.update<AuthorizationUpdate, Authorization>({ id: (typeof id === 'string')? id: id.id, type: Authorizations.TYPE, _forward: true }, params, options)\n\t}\n\n\tasync _capture(id: string | Authorization, params?: QueryParamsRetrieve<Authorization>, options?: ResourcesConfig): Promise<Authorization> {\n\t\treturn this.resources.update<AuthorizationUpdate, Authorization>({ id: (typeof id === 'string')? id: id.id, type: Authorizations.TYPE, _capture: true }, params, options)\n\t}\n\n\tasync _capture_amount_cents(id: string | Authorization, triggerValue: number, params?: QueryParamsRetrieve<Authorization>, options?: ResourcesConfig): Promise<Authorization> {\n\t\treturn this.resources.update<AuthorizationUpdate, Authorization>({ id: (typeof id === 'string')? id: id.id, type: Authorizations.TYPE, _capture_amount_cents: triggerValue }, params, options)\n\t}\n\n\tasync _void(id: string | Authorization, params?: QueryParamsRetrieve<Authorization>, options?: ResourcesConfig): Promise<Authorization> {\n\t\treturn this.resources.update<AuthorizationUpdate, Authorization>({ id: (typeof id === 'string')? id: id.id, type: Authorizations.TYPE, _void: true }, params, options)\n\t}\n\n\tasync _cancel(id: string | Authorization, params?: QueryParamsRetrieve<Authorization>, options?: ResourcesConfig): Promise<Authorization> {\n\t\treturn this.resources.update<AuthorizationUpdate, Authorization>({ id: (typeof id === 'string')? id: id.id, type: Authorizations.TYPE, _cancel: true }, params, options)\n\t}\n\n\n\tisAuthorization(resource: any): resource is Authorization {\n\t\treturn resource.type && (resource.type === Authorizations.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): AuthorizationRel {\n\t\treturn super.relationshipOneToOne<AuthorizationRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): AuthorizationRel[] {\n\t\treturn super.relationshipOneToMany<AuthorizationRel>(...ids)\n\t}\n\n\n\ttype(): AuthorizationType {\n\t\treturn Authorizations.TYPE\n\t}\n\n}\n\n\nconst instance = new Authorizations()\nexport default instance\n\nexport type { Authorizations, Authorization, AuthorizationUpdate, AuthorizationType }\n"]}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { ec as Authorization, ee as AuthorizationSort, lV as AuthorizationType, ed as AuthorizationUpdate, Y as Authorizations, X as default } from '../api-IwWtsAqE.cjs';
|
2
2
|
import '../client.cjs';
|
3
|
-
import '../interceptor-
|
3
|
+
import '../interceptor-k15jXzf0.cjs';
|
4
4
|
import '../types.cjs';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { ec as Authorization, ee as AuthorizationSort, lV as AuthorizationType, ed as AuthorizationUpdate, Y as Authorizations, X as default } from '../api-F1F37Dud.js';
|
2
2
|
import '../client.js';
|
3
|
-
import '../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;AACzD,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,cAAe,CAAA,IAAA;AAAA;AAC3D,EAGA,aAAa,EAAkD,EAAA;AAC9D,IAAO,OAAA,KAAA,CAAM,qBAAuC,EAAE,CAAA;AAAA;AACvD,EAEA,sBAAsB,GAAmC,EAAA;AACxD,IAAO,OAAA,KAAA,CAAM,qBAAwC,CAAA,GAAG,GAAG,CAAA;AAAA;AAC5D,EAGA,IAA0B,GAAA;AACzB,IAAA,OAAO,cAAe,CAAA,IAAA;AAAA;AAGxB;AAGA,MAAM,QAAA,GAAW,IAAI,cAAe,EAAA;AACpC,IAAO,sBAAQ,GAAA","file":"authorizations.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 { Capture } from './captures'\nimport type { Void } from './voids'\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 AuthorizationType = 'authorizations'\ntype AuthorizationRel = ResourceRel & { type: AuthorizationType }\n\n\nexport type AuthorizationSort = Pick<Authorization, 'id' | 'number' | 'amount_cents'> & ResourceSort\n// export type AuthorizationFilter = Pick<Authorization, 'id' | 'number' | 'currency_code' | 'amount_cents' | 'succeeded' | 'message' | 'error_code' | 'error_detail' | 'token' | 'gateway_transaction_id'> & ResourceFilter\n\n\ninterface Authorization extends Resource {\n\t\n\treadonly type: AuthorizationType\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 CVV code returned by the payment gateway.\n\t * @example ```\"000\"```\n\t */\n\tcvv_code?: string | null\n\t/** \n\t * The CVV message returned by the payment gateway.\n\t * @example ```\"validated\"```\n\t */\n\tcvv_message?: string | null\n\t/** \n\t * The AVS code returned by the payment gateway.\n\t * @example ```\"000\"```\n\t */\n\tavs_code?: string | null\n\t/** \n\t * The AVS message returned by the payment gateway.\n\t * @example ```\"validated\"```\n\t */\n\tavs_message?: string | null\n\t/** \n\t * The fraud review message, if any, returned by the payment gateway.\n\t * @example ```\"passed\"```\n\t */\n\tfraud_review?: string | null\n\t/** \n\t * The amount to be captured, in cents.\n\t * @example ```500```\n\t */\n\tcapture_amount_cents?: number | null\n\t/** \n\t * The amount to be captured, float.\n\t * @example ```5```\n\t */\n\tcapture_amount_float?: number | null\n\t/** \n\t * The amount to be captured, formatted.\n\t * @example ```\"€5,00\"```\n\t */\n\tformatted_capture_amount?: string | null\n\t/** \n\t * The balance to be captured, in cents.\n\t * @example ```1000```\n\t */\n\tcapture_balance_cents?: number | null\n\t/** \n\t * The balance to be captured, float.\n\t * @example ```10```\n\t */\n\tcapture_balance_float?: number | null\n\t/** \n\t * The balance to be captured, formatted.\n\t * @example ```\"€10,00\"```\n\t */\n\tformatted_capture_balance?: string | null\n\t/** \n\t * The balance to be voided, in cents.\n\t * @example ```1500```\n\t */\n\tvoid_balance_cents?: number | null\n\t/** \n\t * The balance to be voided, float.\n\t * @example ```15```\n\t */\n\tvoid_balance_float?: number | null\n\t/** \n\t * The balance to be voided, formatted.\n\t * @example ```\"€15,00\"```\n\t */\n\tformatted_void_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\tcaptures?: Capture[] | null\n\tvoids?: Void[] | null\n\n}\n\n\ninterface AuthorizationUpdate 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 capture for this authorization.\n\t * @example ```true```\n\t */\n\t_capture?: boolean | null\n\t/** \n\t * Send this attribute as a value in cents if you want to overwrite the amount to be captured.\n\t * @example ```500```\n\t */\n\t_capture_amount_cents?: number | null\n\t/** \n\t * Send this attribute if you want to create a void for this authorization.\n\t * @example ```true```\n\t */\n\t_void?: boolean | null\n\t/** \n\t * Send this attribute if you want to void a succeeded authorization 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 Authorizations extends ApiResource<Authorization> {\n\n\tstatic readonly TYPE: AuthorizationType = 'authorizations' as const\n\n\tasync update(resource: AuthorizationUpdate, params?: QueryParamsRetrieve<Authorization>, options?: ResourcesConfig): Promise<Authorization> {\n\t\treturn this.resources.update<AuthorizationUpdate, Authorization>({ ...resource, type: Authorizations.TYPE }, params, options)\n\t}\n\n\tasync order(authorizationId: string | Authorization, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _authorizationId = (authorizationId as Authorization).id || authorizationId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `authorizations/${_authorizationId}/order`, params, options) as unknown as Order\n\t}\n\n\tasync attachments(authorizationId: string | Authorization, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _authorizationId = (authorizationId as Authorization).id || authorizationId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `authorizations/${_authorizationId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(authorizationId: string | Authorization, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _authorizationId = (authorizationId as Authorization).id || authorizationId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `authorizations/${_authorizationId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync versions(authorizationId: string | Authorization, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _authorizationId = (authorizationId as Authorization).id || authorizationId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `authorizations/${_authorizationId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync captures(authorizationId: string | Authorization, params?: QueryParamsList<Capture>, options?: ResourcesConfig): Promise<ListResponse<Capture>> {\n\t\tconst _authorizationId = (authorizationId as Authorization).id || authorizationId as string\n\t\treturn this.resources.fetch<Capture>({ type: 'captures' }, `authorizations/${_authorizationId}/captures`, params, options) as unknown as ListResponse<Capture>\n\t}\n\n\tasync voids(authorizationId: string | Authorization, params?: QueryParamsList<Void>, options?: ResourcesConfig): Promise<ListResponse<Void>> {\n\t\tconst _authorizationId = (authorizationId as Authorization).id || authorizationId as string\n\t\treturn this.resources.fetch<Void>({ type: 'voids' }, `authorizations/${_authorizationId}/voids`, params, options) as unknown as ListResponse<Void>\n\t}\n\n\tasync _forward(id: string | Authorization, params?: QueryParamsRetrieve<Authorization>, options?: ResourcesConfig): Promise<Authorization> {\n\t\treturn this.resources.update<AuthorizationUpdate, Authorization>({ id: (typeof id === 'string')? id: id.id, type: Authorizations.TYPE, _forward: true }, params, options)\n\t}\n\n\tasync _capture(id: string | Authorization, params?: QueryParamsRetrieve<Authorization>, options?: ResourcesConfig): Promise<Authorization> {\n\t\treturn this.resources.update<AuthorizationUpdate, Authorization>({ id: (typeof id === 'string')? id: id.id, type: Authorizations.TYPE, _capture: true }, params, options)\n\t}\n\n\tasync _capture_amount_cents(id: string | Authorization, triggerValue: number, params?: QueryParamsRetrieve<Authorization>, options?: ResourcesConfig): Promise<Authorization> {\n\t\treturn this.resources.update<AuthorizationUpdate, Authorization>({ id: (typeof id === 'string')? id: id.id, type: Authorizations.TYPE, _capture_amount_cents: triggerValue }, params, options)\n\t}\n\n\tasync _void(id: string | Authorization, params?: QueryParamsRetrieve<Authorization>, options?: ResourcesConfig): Promise<Authorization> {\n\t\treturn this.resources.update<AuthorizationUpdate, Authorization>({ id: (typeof id === 'string')? id: id.id, type: Authorizations.TYPE, _void: true }, params, options)\n\t}\n\n\tasync _cancel(id: string | Authorization, params?: QueryParamsRetrieve<Authorization>, options?: ResourcesConfig): Promise<Authorization> {\n\t\treturn this.resources.update<AuthorizationUpdate, Authorization>({ id: (typeof id === 'string')? id: id.id, type: Authorizations.TYPE, _cancel: true }, params, options)\n\t}\n\n\n\tisAuthorization(resource: any): resource is Authorization {\n\t\treturn resource.type && (resource.type === Authorizations.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): AuthorizationRel {\n\t\treturn super.relationshipOneToOne<AuthorizationRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): AuthorizationRel[] {\n\t\treturn super.relationshipOneToMany<AuthorizationRel>(...ids)\n\t}\n\n\n\ttype(): AuthorizationType {\n\t\treturn Authorizations.TYPE\n\t}\n\n}\n\n\nconst instance = new Authorizations()\nexport default instance\n\nexport type { Authorization, AuthorizationUpdate, AuthorizationType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/authorizations.ts"],"names":[],"mappings":";;AA6MA,MAAM,uBAAuB,WAA2B,CAAA;AAAA,EAEvD,OAAgB,IAA0B,GAAA,gBAAA;AAAA,EAE1C,MAAM,MAAA,CAAO,QAA+B,EAAA,MAAA,EAA6C,OAAmD,EAAA;AAC3I,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA2C,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,cAAe,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC7H,EAEA,MAAM,KAAA,CAAM,eAAyC,EAAA,MAAA,EAAqC,OAA2C,EAAA;AACpI,IAAM,MAAA,gBAAA,GAAoB,gBAAkC,EAAM,IAAA,eAAA;AAClE,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAa,EAAE,IAAA,EAAM,QAAS,EAAA,EAAG,CAAkB,eAAA,EAAA,gBAAgB,CAAU,MAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACnH,EAEA,MAAM,WAAA,CAAY,eAAyC,EAAA,MAAA,EAAsC,OAA8D,EAAA;AAC9J,IAAM,MAAA,gBAAA,GAAoB,gBAAkC,EAAM,IAAA,eAAA;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M,OAAO,IAAK,EAAA,EAAG,QAAQ,OAAO,CAAA;AAAA;AACtK,EAEA,MAAM,OAAA,CAAQ,EAA4B,EAAA,MAAA,EAA6C,OAAmD,EAAA;AACzI,IAAA,OAAO,KAAK,SAAU,CAAA,MAAA,CAA2C,EAAE,EAAK,EAAA,OAAO,OAAO,QAAW,GAAA,EAAA,GAAI,EAAG,CAAA,EAAA,EAAI,MAAM,cAAe,CAAA,IAAA,EAAM,SAAS,IAAK,EAAA,EAAG,QAAQ,OAAO,CAAA;AAAA;AACxK,EAGA,gBAAgB,QAA0C,EAAA;AACzD,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,cAAe,CAAA,IAAA;AAAA;AAC3D,EAGA,aAAa,EAAkD,EAAA;AAC9D,IAAO,OAAA,KAAA,CAAM,qBAAuC,EAAE,CAAA;AAAA;AACvD,EAEA,sBAAsB,GAAmC,EAAA;AACxD,IAAO,OAAA,KAAA,CAAM,qBAAwC,CAAA,GAAG,GAAG,CAAA;AAAA;AAC5D,EAGA,IAA0B,GAAA;AACzB,IAAA,OAAO,cAAe,CAAA,IAAA;AAAA;AAGxB;AAGA,MAAM,QAAA,GAAW,IAAI,cAAe,EAAA;AACpC,IAAO,sBAAQ,GAAA","file":"authorizations.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 { Capture } from './captures'\nimport type { Void } from './voids'\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 AuthorizationType = 'authorizations'\ntype AuthorizationRel = ResourceRel & { type: AuthorizationType }\n\n\nexport type AuthorizationSort = Pick<Authorization, 'id' | 'number' | 'amount_cents'> & ResourceSort\n// export type AuthorizationFilter = Pick<Authorization, 'id' | 'number' | 'currency_code' | 'amount_cents' | 'succeeded' | 'message' | 'error_code' | 'error_detail' | 'token' | 'gateway_transaction_id'> & ResourceFilter\n\n\ninterface Authorization extends Resource {\n\t\n\treadonly type: AuthorizationType\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 CVV code returned by the payment gateway.\n\t * @example ```\"000\"```\n\t */\n\tcvv_code?: string | null\n\t/** \n\t * The CVV message returned by the payment gateway.\n\t * @example ```\"validated\"```\n\t */\n\tcvv_message?: string | null\n\t/** \n\t * The AVS code returned by the payment gateway.\n\t * @example ```\"000\"```\n\t */\n\tavs_code?: string | null\n\t/** \n\t * The AVS message returned by the payment gateway.\n\t * @example ```\"validated\"```\n\t */\n\tavs_message?: string | null\n\t/** \n\t * The fraud review message, if any, returned by the payment gateway.\n\t * @example ```\"passed\"```\n\t */\n\tfraud_review?: string | null\n\t/** \n\t * The amount to be captured, in cents.\n\t * @example ```500```\n\t */\n\tcapture_amount_cents?: number | null\n\t/** \n\t * The amount to be captured, float.\n\t * @example ```5```\n\t */\n\tcapture_amount_float?: number | null\n\t/** \n\t * The amount to be captured, formatted.\n\t * @example ```\"€5,00\"```\n\t */\n\tformatted_capture_amount?: string | null\n\t/** \n\t * The balance to be captured, in cents.\n\t * @example ```1000```\n\t */\n\tcapture_balance_cents?: number | null\n\t/** \n\t * The balance to be captured, float.\n\t * @example ```10```\n\t */\n\tcapture_balance_float?: number | null\n\t/** \n\t * The balance to be captured, formatted.\n\t * @example ```\"€10,00\"```\n\t */\n\tformatted_capture_balance?: string | null\n\t/** \n\t * The balance to be voided, in cents.\n\t * @example ```1500```\n\t */\n\tvoid_balance_cents?: number | null\n\t/** \n\t * The balance to be voided, float.\n\t * @example ```15```\n\t */\n\tvoid_balance_float?: number | null\n\t/** \n\t * The balance to be voided, formatted.\n\t * @example ```\"€15,00\"```\n\t */\n\tformatted_void_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\tcaptures?: Capture[] | null\n\tvoids?: Void[] | null\n\n}\n\n\ninterface AuthorizationUpdate 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 capture for this authorization.\n\t * @example ```true```\n\t */\n\t_capture?: boolean | null\n\t/** \n\t * Send this attribute as a value in cents if you want to overwrite the amount to be captured.\n\t * @example ```500```\n\t */\n\t_capture_amount_cents?: number | null\n\t/** \n\t * Send this attribute if you want to create a void for this authorization.\n\t * @example ```true```\n\t */\n\t_void?: boolean | null\n\t/** \n\t * Send this attribute if you want to void a succeeded authorization 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 Authorizations extends ApiResource<Authorization> {\n\n\tstatic readonly TYPE: AuthorizationType = 'authorizations' as const\n\n\tasync update(resource: AuthorizationUpdate, params?: QueryParamsRetrieve<Authorization>, options?: ResourcesConfig): Promise<Authorization> {\n\t\treturn this.resources.update<AuthorizationUpdate, Authorization>({ ...resource, type: Authorizations.TYPE }, params, options)\n\t}\n\n\tasync order(authorizationId: string | Authorization, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _authorizationId = (authorizationId as Authorization).id || authorizationId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `authorizations/${_authorizationId}/order`, params, options) as unknown as Order\n\t}\n\n\tasync attachments(authorizationId: string | Authorization, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _authorizationId = (authorizationId as Authorization).id || authorizationId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `authorizations/${_authorizationId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(authorizationId: string | Authorization, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _authorizationId = (authorizationId as Authorization).id || authorizationId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `authorizations/${_authorizationId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync versions(authorizationId: string | Authorization, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _authorizationId = (authorizationId as Authorization).id || authorizationId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `authorizations/${_authorizationId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync captures(authorizationId: string | Authorization, params?: QueryParamsList<Capture>, options?: ResourcesConfig): Promise<ListResponse<Capture>> {\n\t\tconst _authorizationId = (authorizationId as Authorization).id || authorizationId as string\n\t\treturn this.resources.fetch<Capture>({ type: 'captures' }, `authorizations/${_authorizationId}/captures`, params, options) as unknown as ListResponse<Capture>\n\t}\n\n\tasync voids(authorizationId: string | Authorization, params?: QueryParamsList<Void>, options?: ResourcesConfig): Promise<ListResponse<Void>> {\n\t\tconst _authorizationId = (authorizationId as Authorization).id || authorizationId as string\n\t\treturn this.resources.fetch<Void>({ type: 'voids' }, `authorizations/${_authorizationId}/voids`, params, options) as unknown as ListResponse<Void>\n\t}\n\n\tasync _forward(id: string | Authorization, params?: QueryParamsRetrieve<Authorization>, options?: ResourcesConfig): Promise<Authorization> {\n\t\treturn this.resources.update<AuthorizationUpdate, Authorization>({ id: (typeof id === 'string')? id: id.id, type: Authorizations.TYPE, _forward: true }, params, options)\n\t}\n\n\tasync _capture(id: string | Authorization, params?: QueryParamsRetrieve<Authorization>, options?: ResourcesConfig): Promise<Authorization> {\n\t\treturn this.resources.update<AuthorizationUpdate, Authorization>({ id: (typeof id === 'string')? id: id.id, type: Authorizations.TYPE, _capture: true }, params, options)\n\t}\n\n\tasync _capture_amount_cents(id: string | Authorization, triggerValue: number, params?: QueryParamsRetrieve<Authorization>, options?: ResourcesConfig): Promise<Authorization> {\n\t\treturn this.resources.update<AuthorizationUpdate, Authorization>({ id: (typeof id === 'string')? id: id.id, type: Authorizations.TYPE, _capture_amount_cents: triggerValue }, params, options)\n\t}\n\n\tasync _void(id: string | Authorization, params?: QueryParamsRetrieve<Authorization>, options?: ResourcesConfig): Promise<Authorization> {\n\t\treturn this.resources.update<AuthorizationUpdate, Authorization>({ id: (typeof id === 'string')? id: id.id, type: Authorizations.TYPE, _void: true }, params, options)\n\t}\n\n\tasync _cancel(id: string | Authorization, params?: QueryParamsRetrieve<Authorization>, options?: ResourcesConfig): Promise<Authorization> {\n\t\treturn this.resources.update<AuthorizationUpdate, Authorization>({ id: (typeof id === 'string')? id: id.id, type: Authorizations.TYPE, _cancel: true }, params, options)\n\t}\n\n\n\tisAuthorization(resource: any): resource is Authorization {\n\t\treturn resource.type && (resource.type === Authorizations.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): AuthorizationRel {\n\t\treturn super.relationshipOneToOne<AuthorizationRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): AuthorizationRel[] {\n\t\treturn super.relationshipOneToMany<AuthorizationRel>(...ids)\n\t}\n\n\n\ttype(): AuthorizationType {\n\t\treturn Authorizations.TYPE\n\t}\n\n}\n\n\nconst instance = new Authorizations()\nexport default instance\n\nexport type { Authorizations, Authorization, AuthorizationUpdate, AuthorizationType }\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/resources/avalara_accounts.ts"],"names":["ApiResource"],"mappings":";;;;AAuIA,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,CAA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["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Market } from './markets'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Version } from './versions'\nimport type { TaxCategory, TaxCategoryType } from './tax_categories'\n\n\ntype AvalaraAccountType = 'avalara_accounts'\ntype AvalaraAccountRel = ResourceRel & { type: AvalaraAccountType }\ntype TaxCategoryRel = ResourceRel & { type: TaxCategoryType }\n\n\nexport type AvalaraAccountSort = Pick<AvalaraAccount, 'id' | 'name'> & ResourceSort\n// export type AvalaraAccountFilter = Pick<AvalaraAccount, 'id' | 'name'> & ResourceFilter\n\n\ninterface AvalaraAccount extends Resource {\n\t\n\treadonly type: AvalaraAccountType\n\n\t/** \n\t * The tax calculator's internal name.\n\t * @example ```\"Personal tax calculator\"```\n\t */\n\tname: string\n\t/** \n\t * The Avalara account username.\n\t * @example ```\"user@mydomain.com\"```\n\t */\n\tusername: string\n\t/** \n\t * The Avalara company code.\n\t * @example ```\"MYCOMPANY\"```\n\t */\n\tcompany_code: string\n\t/** \n\t * Indicates if the transaction will be recorded and visible on the Avalara website.\n\t * @example ```true```\n\t */\n\tcommit_invoice?: boolean | null\n\t/** \n\t * Indicates if the seller is responsible for paying/remitting the customs duty & import tax to the customs authorities.\n\t * @example ```true```\n\t */\n\tddp?: boolean | null\n\n\tmarkets?: Market[] | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\tversions?: Version[] | null\n\ttax_categories?: TaxCategory[] | null\n\n}\n\n\ninterface AvalaraAccountCreate extends ResourceCreate {\n\t\n\t/** \n\t * The tax calculator's internal name.\n\t * @example ```\"Personal tax calculator\"```\n\t */\n\tname: string\n\t/** \n\t * The Avalara account username.\n\t * @example ```\"user@mydomain.com\"```\n\t */\n\tusername: string\n\t/** \n\t * The Avalara account password.\n\t * @example ```\"secret\"```\n\t */\n\tpassword: string\n\t/** \n\t * The Avalara company code.\n\t * @example ```\"MYCOMPANY\"```\n\t */\n\tcompany_code: string\n\t/** \n\t * Indicates if the transaction will be recorded and visible on the Avalara website.\n\t * @example ```true```\n\t */\n\tcommit_invoice?: boolean | null\n\t/** \n\t * Indicates if the seller is responsible for paying/remitting the customs duty & import tax to the customs authorities.\n\t * @example ```true```\n\t */\n\tddp?: boolean | null\n\n\ttax_categories?: TaxCategoryRel[] | null\n\n}\n\n\ninterface AvalaraAccountUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The tax calculator's internal name.\n\t * @example ```\"Personal tax calculator\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The Avalara account username.\n\t * @example ```\"user@mydomain.com\"```\n\t */\n\tusername?: string | null\n\t/** \n\t * The Avalara account password.\n\t * @example ```\"secret\"```\n\t */\n\tpassword?: string | null\n\t/** \n\t * The Avalara company code.\n\t * @example ```\"MYCOMPANY\"```\n\t */\n\tcompany_code?: string | null\n\t/** \n\t * Indicates if the transaction will be recorded and visible on the Avalara website.\n\t * @example ```true```\n\t */\n\tcommit_invoice?: boolean | null\n\t/** \n\t * Indicates if the seller is responsible for paying/remitting the customs duty & import tax to the customs authorities.\n\t * @example ```true```\n\t */\n\tddp?: boolean | null\n\n\ttax_categories?: TaxCategoryRel[] | null\n\n}\n\n\nclass AvalaraAccounts extends ApiResource<AvalaraAccount> {\n\n\tstatic readonly TYPE: AvalaraAccountType = 'avalara_accounts' as const\n\n\tasync create(resource: AvalaraAccountCreate, params?: QueryParamsRetrieve<AvalaraAccount>, options?: ResourcesConfig): Promise<AvalaraAccount> {\n\t\treturn this.resources.create<AvalaraAccountCreate, AvalaraAccount>({ ...resource, type: AvalaraAccounts.TYPE }, params, options)\n\t}\n\n\tasync update(resource: AvalaraAccountUpdate, params?: QueryParamsRetrieve<AvalaraAccount>, options?: ResourcesConfig): Promise<AvalaraAccount> {\n\t\treturn this.resources.update<AvalaraAccountUpdate, AvalaraAccount>({ ...resource, type: AvalaraAccounts.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: AvalaraAccounts.TYPE } : id, options)\n\t}\n\n\tasync markets(avalaraAccountId: string | AvalaraAccount, params?: QueryParamsList<Market>, options?: ResourcesConfig): Promise<ListResponse<Market>> {\n\t\tconst _avalaraAccountId = (avalaraAccountId as AvalaraAccount).id || avalaraAccountId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `avalara_accounts/${_avalaraAccountId}/markets`, params, options) as unknown as ListResponse<Market>\n\t}\n\n\tasync attachments(avalaraAccountId: string | AvalaraAccount, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _avalaraAccountId = (avalaraAccountId as AvalaraAccount).id || avalaraAccountId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `avalara_accounts/${_avalaraAccountId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(avalaraAccountId: string | AvalaraAccount, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _avalaraAccountId = (avalaraAccountId as AvalaraAccount).id || avalaraAccountId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `avalara_accounts/${_avalaraAccountId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync versions(avalaraAccountId: string | AvalaraAccount, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _avalaraAccountId = (avalaraAccountId as AvalaraAccount).id || avalaraAccountId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `avalara_accounts/${_avalaraAccountId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync tax_categories(avalaraAccountId: string | AvalaraAccount, params?: QueryParamsList<TaxCategory>, options?: ResourcesConfig): Promise<ListResponse<TaxCategory>> {\n\t\tconst _avalaraAccountId = (avalaraAccountId as AvalaraAccount).id || avalaraAccountId as string\n\t\treturn this.resources.fetch<TaxCategory>({ type: 'tax_categories' }, `avalara_accounts/${_avalaraAccountId}/tax_categories`, params, options) as unknown as ListResponse<TaxCategory>\n\t}\n\n\n\tisAvalaraAccount(resource: any): resource is AvalaraAccount {\n\t\treturn resource.type && (resource.type === AvalaraAccounts.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): AvalaraAccountRel {\n\t\treturn super.relationshipOneToOne<AvalaraAccountRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): AvalaraAccountRel[] {\n\t\treturn super.relationshipOneToMany<AvalaraAccountRel>(...ids)\n\t}\n\n\n\ttype(): AvalaraAccountType {\n\t\treturn AvalaraAccounts.TYPE\n\t}\n\n}\n\n\nconst instance = new AvalaraAccounts()\nexport default instance\n\nexport type { AvalaraAccount, AvalaraAccountCreate, AvalaraAccountUpdate, AvalaraAccountType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/avalara_accounts.ts"],"names":["ApiResource"],"mappings":";;;;AAuIA,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;AA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M,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,EAEA,MAAM,cAAA,CAAe,gBAA2C,EAAA,MAAA,EAAuC,OAA+D,EAAA;AACrK,IAAM,MAAA,iBAAA,GAAqB,iBAAoC,EAAM,IAAA,gBAAA;AACrE,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAmB,EAAE,IAAA,EAAM,gBAAiB,EAAA,EAAG,CAAoB,iBAAA,EAAA,iBAAiB,CAAmB,eAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC7I,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":"avalara_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 } from './markets'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Version } from './versions'\nimport type { TaxCategory, TaxCategoryType } from './tax_categories'\n\n\ntype AvalaraAccountType = 'avalara_accounts'\ntype AvalaraAccountRel = ResourceRel & { type: AvalaraAccountType }\ntype TaxCategoryRel = ResourceRel & { type: TaxCategoryType }\n\n\nexport type AvalaraAccountSort = Pick<AvalaraAccount, 'id' | 'name'> & ResourceSort\n// export type AvalaraAccountFilter = Pick<AvalaraAccount, 'id' | 'name'> & ResourceFilter\n\n\ninterface AvalaraAccount extends Resource {\n\t\n\treadonly type: AvalaraAccountType\n\n\t/** \n\t * The tax calculator's internal name.\n\t * @example ```\"Personal tax calculator\"```\n\t */\n\tname: string\n\t/** \n\t * The Avalara account username.\n\t * @example ```\"user@mydomain.com\"```\n\t */\n\tusername: string\n\t/** \n\t * The Avalara company code.\n\t * @example ```\"MYCOMPANY\"```\n\t */\n\tcompany_code: string\n\t/** \n\t * Indicates if the transaction will be recorded and visible on the Avalara website.\n\t * @example ```true```\n\t */\n\tcommit_invoice?: boolean | null\n\t/** \n\t * Indicates if the seller is responsible for paying/remitting the customs duty & import tax to the customs authorities.\n\t * @example ```true```\n\t */\n\tddp?: boolean | null\n\n\tmarkets?: Market[] | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\tversions?: Version[] | null\n\ttax_categories?: TaxCategory[] | null\n\n}\n\n\ninterface AvalaraAccountCreate extends ResourceCreate {\n\t\n\t/** \n\t * The tax calculator's internal name.\n\t * @example ```\"Personal tax calculator\"```\n\t */\n\tname: string\n\t/** \n\t * The Avalara account username.\n\t * @example ```\"user@mydomain.com\"```\n\t */\n\tusername: string\n\t/** \n\t * The Avalara account password.\n\t * @example ```\"secret\"```\n\t */\n\tpassword: string\n\t/** \n\t * The Avalara company code.\n\t * @example ```\"MYCOMPANY\"```\n\t */\n\tcompany_code: string\n\t/** \n\t * Indicates if the transaction will be recorded and visible on the Avalara website.\n\t * @example ```true```\n\t */\n\tcommit_invoice?: boolean | null\n\t/** \n\t * Indicates if the seller is responsible for paying/remitting the customs duty & import tax to the customs authorities.\n\t * @example ```true```\n\t */\n\tddp?: boolean | null\n\n\ttax_categories?: TaxCategoryRel[] | null\n\n}\n\n\ninterface AvalaraAccountUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The tax calculator's internal name.\n\t * @example ```\"Personal tax calculator\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The Avalara account username.\n\t * @example ```\"user@mydomain.com\"```\n\t */\n\tusername?: string | null\n\t/** \n\t * The Avalara account password.\n\t * @example ```\"secret\"```\n\t */\n\tpassword?: string | null\n\t/** \n\t * The Avalara company code.\n\t * @example ```\"MYCOMPANY\"```\n\t */\n\tcompany_code?: string | null\n\t/** \n\t * Indicates if the transaction will be recorded and visible on the Avalara website.\n\t * @example ```true```\n\t */\n\tcommit_invoice?: boolean | null\n\t/** \n\t * Indicates if the seller is responsible for paying/remitting the customs duty & import tax to the customs authorities.\n\t * @example ```true```\n\t */\n\tddp?: boolean | null\n\n\ttax_categories?: TaxCategoryRel[] | null\n\n}\n\n\nclass AvalaraAccounts extends ApiResource<AvalaraAccount> {\n\n\tstatic readonly TYPE: AvalaraAccountType = 'avalara_accounts' as const\n\n\tasync create(resource: AvalaraAccountCreate, params?: QueryParamsRetrieve<AvalaraAccount>, options?: ResourcesConfig): Promise<AvalaraAccount> {\n\t\treturn this.resources.create<AvalaraAccountCreate, AvalaraAccount>({ ...resource, type: AvalaraAccounts.TYPE }, params, options)\n\t}\n\n\tasync update(resource: AvalaraAccountUpdate, params?: QueryParamsRetrieve<AvalaraAccount>, options?: ResourcesConfig): Promise<AvalaraAccount> {\n\t\treturn this.resources.update<AvalaraAccountUpdate, AvalaraAccount>({ ...resource, type: AvalaraAccounts.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: AvalaraAccounts.TYPE } : id, options)\n\t}\n\n\tasync markets(avalaraAccountId: string | AvalaraAccount, params?: QueryParamsList<Market>, options?: ResourcesConfig): Promise<ListResponse<Market>> {\n\t\tconst _avalaraAccountId = (avalaraAccountId as AvalaraAccount).id || avalaraAccountId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `avalara_accounts/${_avalaraAccountId}/markets`, params, options) as unknown as ListResponse<Market>\n\t}\n\n\tasync attachments(avalaraAccountId: string | AvalaraAccount, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _avalaraAccountId = (avalaraAccountId as AvalaraAccount).id || avalaraAccountId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `avalara_accounts/${_avalaraAccountId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(avalaraAccountId: string | AvalaraAccount, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _avalaraAccountId = (avalaraAccountId as AvalaraAccount).id || avalaraAccountId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `avalara_accounts/${_avalaraAccountId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync versions(avalaraAccountId: string | AvalaraAccount, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _avalaraAccountId = (avalaraAccountId as AvalaraAccount).id || avalaraAccountId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `avalara_accounts/${_avalaraAccountId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync tax_categories(avalaraAccountId: string | AvalaraAccount, params?: QueryParamsList<TaxCategory>, options?: ResourcesConfig): Promise<ListResponse<TaxCategory>> {\n\t\tconst _avalaraAccountId = (avalaraAccountId as AvalaraAccount).id || avalaraAccountId as string\n\t\treturn this.resources.fetch<TaxCategory>({ type: 'tax_categories' }, `avalara_accounts/${_avalaraAccountId}/tax_categories`, params, options) as unknown as ListResponse<TaxCategory>\n\t}\n\n\n\tisAvalaraAccount(resource: any): resource is AvalaraAccount {\n\t\treturn resource.type && (resource.type === AvalaraAccounts.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): AvalaraAccountRel {\n\t\treturn super.relationshipOneToOne<AvalaraAccountRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): AvalaraAccountRel[] {\n\t\treturn super.relationshipOneToMany<AvalaraAccountRel>(...ids)\n\t}\n\n\n\ttype(): AvalaraAccountType {\n\t\treturn AvalaraAccounts.TYPE\n\t}\n\n}\n\n\nconst instance = new AvalaraAccounts()\nexport default instance\n\nexport type { AvalaraAccounts, AvalaraAccount, AvalaraAccountCreate, AvalaraAccountUpdate, AvalaraAccountType }\n"]}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { ef as AvalaraAccount, eg as AvalaraAccountCreate, ei as AvalaraAccountSort, mY as AvalaraAccountType, eh as AvalaraAccountUpdate, _ as AvalaraAccounts, Z as default } from '../api-IwWtsAqE.cjs';
|
2
2
|
import '../client.cjs';
|
3
|
-
import '../interceptor-
|
3
|
+
import '../interceptor-k15jXzf0.cjs';
|
4
4
|
import '../types.cjs';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { ef as AvalaraAccount, eg as AvalaraAccountCreate, ei as AvalaraAccountSort, mY as AvalaraAccountType, eh as AvalaraAccountUpdate, _ as AvalaraAccounts, Z as default } from '../api-F1F37Dud.js';
|
2
2
|
import '../client.js';
|
3
|
-
import '../interceptor-
|
3
|
+
import '../interceptor-k15jXzf0.js';
|
4
4
|
import '../types.js';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/resources/avalara_accounts.ts"],"names":[],"mappings":";;AAuIA,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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AA2B,GAAA;AAC1B,IAAA,OAAO,eAAgB,CAAA,IAAA;AAAA;AAGzB;AAGA,MAAM,QAAA,GAAW,IAAI,eAAgB,EAAA;AACrC,IAAO,wBAAQ,GAAA","file":"avalara_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 } from './markets'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Version } from './versions'\nimport type { TaxCategory, TaxCategoryType } from './tax_categories'\n\n\ntype AvalaraAccountType = 'avalara_accounts'\ntype AvalaraAccountRel = ResourceRel & { type: AvalaraAccountType }\ntype TaxCategoryRel = ResourceRel & { type: TaxCategoryType }\n\n\nexport type AvalaraAccountSort = Pick<AvalaraAccount, 'id' | 'name'> & ResourceSort\n// export type AvalaraAccountFilter = Pick<AvalaraAccount, 'id' | 'name'> & ResourceFilter\n\n\ninterface AvalaraAccount extends Resource {\n\t\n\treadonly type: AvalaraAccountType\n\n\t/** \n\t * The tax calculator's internal name.\n\t * @example ```\"Personal tax calculator\"```\n\t */\n\tname: string\n\t/** \n\t * The Avalara account username.\n\t * @example ```\"user@mydomain.com\"```\n\t */\n\tusername: string\n\t/** \n\t * The Avalara company code.\n\t * @example ```\"MYCOMPANY\"```\n\t */\n\tcompany_code: string\n\t/** \n\t * Indicates if the transaction will be recorded and visible on the Avalara website.\n\t * @example ```true```\n\t */\n\tcommit_invoice?: boolean | null\n\t/** \n\t * Indicates if the seller is responsible for paying/remitting the customs duty & import tax to the customs authorities.\n\t * @example ```true```\n\t */\n\tddp?: boolean | null\n\n\tmarkets?: Market[] | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\tversions?: Version[] | null\n\ttax_categories?: TaxCategory[] | null\n\n}\n\n\ninterface AvalaraAccountCreate extends ResourceCreate {\n\t\n\t/** \n\t * The tax calculator's internal name.\n\t * @example ```\"Personal tax calculator\"```\n\t */\n\tname: string\n\t/** \n\t * The Avalara account username.\n\t * @example ```\"user@mydomain.com\"```\n\t */\n\tusername: string\n\t/** \n\t * The Avalara account password.\n\t * @example ```\"secret\"```\n\t */\n\tpassword: string\n\t/** \n\t * The Avalara company code.\n\t * @example ```\"MYCOMPANY\"```\n\t */\n\tcompany_code: string\n\t/** \n\t * Indicates if the transaction will be recorded and visible on the Avalara website.\n\t * @example ```true```\n\t */\n\tcommit_invoice?: boolean | null\n\t/** \n\t * Indicates if the seller is responsible for paying/remitting the customs duty & import tax to the customs authorities.\n\t * @example ```true```\n\t */\n\tddp?: boolean | null\n\n\ttax_categories?: TaxCategoryRel[] | null\n\n}\n\n\ninterface AvalaraAccountUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The tax calculator's internal name.\n\t * @example ```\"Personal tax calculator\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The Avalara account username.\n\t * @example ```\"user@mydomain.com\"```\n\t */\n\tusername?: string | null\n\t/** \n\t * The Avalara account password.\n\t * @example ```\"secret\"```\n\t */\n\tpassword?: string | null\n\t/** \n\t * The Avalara company code.\n\t * @example ```\"MYCOMPANY\"```\n\t */\n\tcompany_code?: string | null\n\t/** \n\t * Indicates if the transaction will be recorded and visible on the Avalara website.\n\t * @example ```true```\n\t */\n\tcommit_invoice?: boolean | null\n\t/** \n\t * Indicates if the seller is responsible for paying/remitting the customs duty & import tax to the customs authorities.\n\t * @example ```true```\n\t */\n\tddp?: boolean | null\n\n\ttax_categories?: TaxCategoryRel[] | null\n\n}\n\n\nclass AvalaraAccounts extends ApiResource<AvalaraAccount> {\n\n\tstatic readonly TYPE: AvalaraAccountType = 'avalara_accounts' as const\n\n\tasync create(resource: AvalaraAccountCreate, params?: QueryParamsRetrieve<AvalaraAccount>, options?: ResourcesConfig): Promise<AvalaraAccount> {\n\t\treturn this.resources.create<AvalaraAccountCreate, AvalaraAccount>({ ...resource, type: AvalaraAccounts.TYPE }, params, options)\n\t}\n\n\tasync update(resource: AvalaraAccountUpdate, params?: QueryParamsRetrieve<AvalaraAccount>, options?: ResourcesConfig): Promise<AvalaraAccount> {\n\t\treturn this.resources.update<AvalaraAccountUpdate, AvalaraAccount>({ ...resource, type: AvalaraAccounts.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: AvalaraAccounts.TYPE } : id, options)\n\t}\n\n\tasync markets(avalaraAccountId: string | AvalaraAccount, params?: QueryParamsList<Market>, options?: ResourcesConfig): Promise<ListResponse<Market>> {\n\t\tconst _avalaraAccountId = (avalaraAccountId as AvalaraAccount).id || avalaraAccountId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `avalara_accounts/${_avalaraAccountId}/markets`, params, options) as unknown as ListResponse<Market>\n\t}\n\n\tasync attachments(avalaraAccountId: string | AvalaraAccount, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _avalaraAccountId = (avalaraAccountId as AvalaraAccount).id || avalaraAccountId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `avalara_accounts/${_avalaraAccountId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(avalaraAccountId: string | AvalaraAccount, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _avalaraAccountId = (avalaraAccountId as AvalaraAccount).id || avalaraAccountId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `avalara_accounts/${_avalaraAccountId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync versions(avalaraAccountId: string | AvalaraAccount, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _avalaraAccountId = (avalaraAccountId as AvalaraAccount).id || avalaraAccountId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `avalara_accounts/${_avalaraAccountId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync tax_categories(avalaraAccountId: string | AvalaraAccount, params?: QueryParamsList<TaxCategory>, options?: ResourcesConfig): Promise<ListResponse<TaxCategory>> {\n\t\tconst _avalaraAccountId = (avalaraAccountId as AvalaraAccount).id || avalaraAccountId as string\n\t\treturn this.resources.fetch<TaxCategory>({ type: 'tax_categories' }, `avalara_accounts/${_avalaraAccountId}/tax_categories`, params, options) as unknown as ListResponse<TaxCategory>\n\t}\n\n\n\tisAvalaraAccount(resource: any): resource is AvalaraAccount {\n\t\treturn resource.type && (resource.type === AvalaraAccounts.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): AvalaraAccountRel {\n\t\treturn super.relationshipOneToOne<AvalaraAccountRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): AvalaraAccountRel[] {\n\t\treturn super.relationshipOneToMany<AvalaraAccountRel>(...ids)\n\t}\n\n\n\ttype(): AvalaraAccountType {\n\t\treturn AvalaraAccounts.TYPE\n\t}\n\n}\n\n\nconst instance = new AvalaraAccounts()\nexport default instance\n\nexport type { AvalaraAccount, AvalaraAccountCreate, AvalaraAccountUpdate, AvalaraAccountType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/avalara_accounts.ts"],"names":[],"mappings":";;AAuIA,MAAM,wBAAwB,WAA4B,CAAA;AAAA,EAEzD,OAAgB,IAA2B,GAAA,kBAAA;AAAA,EAE3C,MAAM,MAAA,CAAO,QAAgC,EAAA,MAAA,EAA8C,OAAoD,EAAA;AAC9I,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA6C,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,eAAgB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAChI,EAEA,MAAM,MAAA,CAAO,QAAgC,EAAA,MAAA,EAA8C,OAAoD,EAAA;AAC9I,IAAO,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ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Market } from './markets'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Version } from './versions'\nimport type { TaxCategory, TaxCategoryType } from './tax_categories'\n\n\ntype AvalaraAccountType = 'avalara_accounts'\ntype AvalaraAccountRel = ResourceRel & { type: AvalaraAccountType }\ntype TaxCategoryRel = ResourceRel & { type: TaxCategoryType }\n\n\nexport type AvalaraAccountSort = Pick<AvalaraAccount, 'id' | 'name'> & ResourceSort\n// export type AvalaraAccountFilter = Pick<AvalaraAccount, 'id' | 'name'> & ResourceFilter\n\n\ninterface AvalaraAccount extends Resource {\n\t\n\treadonly type: AvalaraAccountType\n\n\t/** \n\t * The tax calculator's internal name.\n\t * @example ```\"Personal tax calculator\"```\n\t */\n\tname: string\n\t/** \n\t * The Avalara account username.\n\t * @example ```\"user@mydomain.com\"```\n\t */\n\tusername: string\n\t/** \n\t * The Avalara company code.\n\t * @example ```\"MYCOMPANY\"```\n\t */\n\tcompany_code: string\n\t/** \n\t * Indicates if the transaction will be recorded and visible on the Avalara website.\n\t * @example ```true```\n\t */\n\tcommit_invoice?: boolean | null\n\t/** \n\t * Indicates if the seller is responsible for paying/remitting the customs duty & import tax to the customs authorities.\n\t * @example ```true```\n\t */\n\tddp?: boolean | null\n\n\tmarkets?: Market[] | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\tversions?: Version[] | null\n\ttax_categories?: TaxCategory[] | null\n\n}\n\n\ninterface AvalaraAccountCreate extends ResourceCreate {\n\t\n\t/** \n\t * The tax calculator's internal name.\n\t * @example ```\"Personal tax calculator\"```\n\t */\n\tname: string\n\t/** \n\t * The Avalara account username.\n\t * @example ```\"user@mydomain.com\"```\n\t */\n\tusername: string\n\t/** \n\t * The Avalara account password.\n\t * @example ```\"secret\"```\n\t */\n\tpassword: string\n\t/** \n\t * The Avalara company code.\n\t * @example ```\"MYCOMPANY\"```\n\t */\n\tcompany_code: string\n\t/** \n\t * Indicates if the transaction will be recorded and visible on the Avalara website.\n\t * @example ```true```\n\t */\n\tcommit_invoice?: boolean | null\n\t/** \n\t * Indicates if the seller is responsible for paying/remitting the customs duty & import tax to the customs authorities.\n\t * @example ```true```\n\t */\n\tddp?: boolean | null\n\n\ttax_categories?: TaxCategoryRel[] | null\n\n}\n\n\ninterface AvalaraAccountUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The tax calculator's internal name.\n\t * @example ```\"Personal tax calculator\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The Avalara account username.\n\t * @example ```\"user@mydomain.com\"```\n\t */\n\tusername?: string | null\n\t/** \n\t * The Avalara account password.\n\t * @example ```\"secret\"```\n\t */\n\tpassword?: string | null\n\t/** \n\t * The Avalara company code.\n\t * @example ```\"MYCOMPANY\"```\n\t */\n\tcompany_code?: string | null\n\t/** \n\t * Indicates if the transaction will be recorded and visible on the Avalara website.\n\t * @example ```true```\n\t */\n\tcommit_invoice?: boolean | null\n\t/** \n\t * Indicates if the seller is responsible for paying/remitting the customs duty & import tax to the customs authorities.\n\t * @example ```true```\n\t */\n\tddp?: boolean | null\n\n\ttax_categories?: TaxCategoryRel[] | null\n\n}\n\n\nclass AvalaraAccounts extends ApiResource<AvalaraAccount> {\n\n\tstatic readonly TYPE: AvalaraAccountType = 'avalara_accounts' as const\n\n\tasync create(resource: AvalaraAccountCreate, params?: QueryParamsRetrieve<AvalaraAccount>, options?: ResourcesConfig): Promise<AvalaraAccount> {\n\t\treturn this.resources.create<AvalaraAccountCreate, AvalaraAccount>({ ...resource, type: AvalaraAccounts.TYPE }, params, options)\n\t}\n\n\tasync update(resource: AvalaraAccountUpdate, params?: QueryParamsRetrieve<AvalaraAccount>, options?: ResourcesConfig): Promise<AvalaraAccount> {\n\t\treturn this.resources.update<AvalaraAccountUpdate, AvalaraAccount>({ ...resource, type: AvalaraAccounts.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: AvalaraAccounts.TYPE } : id, options)\n\t}\n\n\tasync markets(avalaraAccountId: string | AvalaraAccount, params?: QueryParamsList<Market>, options?: ResourcesConfig): Promise<ListResponse<Market>> {\n\t\tconst _avalaraAccountId = (avalaraAccountId as AvalaraAccount).id || avalaraAccountId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `avalara_accounts/${_avalaraAccountId}/markets`, params, options) as unknown as ListResponse<Market>\n\t}\n\n\tasync attachments(avalaraAccountId: string | AvalaraAccount, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _avalaraAccountId = (avalaraAccountId as AvalaraAccount).id || avalaraAccountId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `avalara_accounts/${_avalaraAccountId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(avalaraAccountId: string | AvalaraAccount, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _avalaraAccountId = (avalaraAccountId as AvalaraAccount).id || avalaraAccountId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `avalara_accounts/${_avalaraAccountId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync versions(avalaraAccountId: string | AvalaraAccount, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _avalaraAccountId = (avalaraAccountId as AvalaraAccount).id || avalaraAccountId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `avalara_accounts/${_avalaraAccountId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync tax_categories(avalaraAccountId: string | AvalaraAccount, params?: QueryParamsList<TaxCategory>, options?: ResourcesConfig): Promise<ListResponse<TaxCategory>> {\n\t\tconst _avalaraAccountId = (avalaraAccountId as AvalaraAccount).id || avalaraAccountId as string\n\t\treturn this.resources.fetch<TaxCategory>({ type: 'tax_categories' }, `avalara_accounts/${_avalaraAccountId}/tax_categories`, params, options) as unknown as ListResponse<TaxCategory>\n\t}\n\n\n\tisAvalaraAccount(resource: any): resource is AvalaraAccount {\n\t\treturn resource.type && (resource.type === AvalaraAccounts.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): AvalaraAccountRel {\n\t\treturn super.relationshipOneToOne<AvalaraAccountRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): AvalaraAccountRel[] {\n\t\treturn super.relationshipOneToMany<AvalaraAccountRel>(...ids)\n\t}\n\n\n\ttype(): AvalaraAccountType {\n\t\treturn AvalaraAccounts.TYPE\n\t}\n\n}\n\n\nconst instance = new AvalaraAccounts()\nexport default instance\n\nexport type { AvalaraAccounts, AvalaraAccount, AvalaraAccountCreate, AvalaraAccountUpdate, AvalaraAccountType }\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/resources/axerve_gateways.ts"],"names":["ApiResource"],"mappings":";;;;AA2FA,MAAM,uBAAuBA,oBAA2B,CAAA;AAAA,EAEvD,OAAgB,IAA0B,GAAA,iBAAA;AAAA,EAE1C,MAAM,MAAA,CAAO,QAA+B,EAAA,MAAA,EAA6C,OAAmD,EAAA;AAC3I,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA2C,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,cAAe,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC7H,EAEA,MAAM,MAAA,CAAO,QAA+B,EAAA,MAAA,EAA6C,OAAmD,EAAA;AAC3I,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA2C,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,cAAe,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC7H,EAEA,MAAM,MAAO,CAAA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,CAAA,IAAA;AAAA;AAC3D,EAGA,aAAa,EAAkD,EAAA;AAC9D,IAAO,OAAA,KAAA,CAAM,qBAAuC,EAAE,CAAA;AAAA;AACvD,EAEA,sBAAsB,GAAmC,EAAA;AACxD,IAAO,OAAA,KAAA,CAAM,qBAAwC,CAAA,GAAG,GAAG,CAAA;AAAA;AAC5D,EAGA,IAA0B,GAAA;AACzB,IAAA,OAAO,cAAe,CAAA,IAAA;AAAA;AAGxB;AAGA,MAAM,QAAA,GAAW,IAAI,cAAe,EAAA;AACpC,IAAO,uBAAQ,GAAA","file":"axerve_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 { AxervePayment, AxervePaymentType } from './axerve_payments'\n\n\ntype AxerveGatewayType = 'axerve_gateways'\ntype AxerveGatewayRel = ResourceRel & { type: AxerveGatewayType }\ntype AxervePaymentRel = ResourceRel & { type: AxervePaymentType }\n\n\nexport type AxerveGatewaySort = Pick<AxerveGateway, 'id' | 'name'> & ResourceSort\n// export type AxerveGatewayFilter = Pick<AxerveGateway, 'id' | 'name'> & ResourceFilter\n\n\ninterface AxerveGateway extends Resource {\n\t\n\treadonly type: AxerveGatewayType\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 merchant login code.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tlogin: string\n\t/** \n\t * The gateway webhook URL, generated automatically.\n\t * @example ```\"https://core.commercelayer.co/webhook_callbacks/axerve_gateways/xxxxx\"```\n\t */\n\twebhook_endpoint_url?: string | null\n\n\tpayment_methods?: PaymentMethod[] | null\n\tversions?: Version[] | null\n\taxerve_payments?: AxervePayment[] | null\n\n}\n\n\ninterface AxerveGatewayCreate 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 merchant login code.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tlogin: string\n\t/** \n\t * The gateway API key.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tapi_key: string\n\n\taxerve_payments?: AxervePaymentRel[] | null\n\n}\n\n\ninterface AxerveGatewayUpdate 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 merchant login code.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tlogin?: string | null\n\t/** \n\t * The gateway API key.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tapi_key?: string | null\n\n\taxerve_payments?: AxervePaymentRel[] | null\n\n}\n\n\nclass AxerveGateways extends ApiResource<AxerveGateway> {\n\n\tstatic readonly TYPE: AxerveGatewayType = 'axerve_gateways' as const\n\n\tasync create(resource: AxerveGatewayCreate, params?: QueryParamsRetrieve<AxerveGateway>, options?: ResourcesConfig): Promise<AxerveGateway> {\n\t\treturn this.resources.create<AxerveGatewayCreate, AxerveGateway>({ ...resource, type: AxerveGateways.TYPE }, params, options)\n\t}\n\n\tasync update(resource: AxerveGatewayUpdate, params?: QueryParamsRetrieve<AxerveGateway>, options?: ResourcesConfig): Promise<AxerveGateway> {\n\t\treturn this.resources.update<AxerveGatewayUpdate, AxerveGateway>({ ...resource, type: AxerveGateways.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: AxerveGateways.TYPE } : id, options)\n\t}\n\n\tasync payment_methods(axerveGatewayId: string | AxerveGateway, params?: QueryParamsList<PaymentMethod>, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>> {\n\t\tconst _axerveGatewayId = (axerveGatewayId as AxerveGateway).id || axerveGatewayId as string\n\t\treturn this.resources.fetch<PaymentMethod>({ type: 'payment_methods' }, `axerve_gateways/${_axerveGatewayId}/payment_methods`, params, options) as unknown as ListResponse<PaymentMethod>\n\t}\n\n\tasync versions(axerveGatewayId: string | AxerveGateway, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _axerveGatewayId = (axerveGatewayId as AxerveGateway).id || axerveGatewayId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `axerve_gateways/${_axerveGatewayId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync axerve_payments(axerveGatewayId: string | AxerveGateway, params?: QueryParamsList<AxervePayment>, options?: ResourcesConfig): Promise<ListResponse<AxervePayment>> {\n\t\tconst _axerveGatewayId = (axerveGatewayId as AxerveGateway).id || axerveGatewayId as string\n\t\treturn this.resources.fetch<AxervePayment>({ type: 'axerve_payments' }, `axerve_gateways/${_axerveGatewayId}/axerve_payments`, params, options) as unknown as ListResponse<AxervePayment>\n\t}\n\n\n\tisAxerveGateway(resource: any): resource is AxerveGateway {\n\t\treturn resource.type && (resource.type === AxerveGateways.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): AxerveGatewayRel {\n\t\treturn super.relationshipOneToOne<AxerveGatewayRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): AxerveGatewayRel[] {\n\t\treturn super.relationshipOneToMany<AxerveGatewayRel>(...ids)\n\t}\n\n\n\ttype(): AxerveGatewayType {\n\t\treturn AxerveGateways.TYPE\n\t}\n\n}\n\n\nconst instance = new AxerveGateways()\nexport default instance\n\nexport type { AxerveGateway, AxerveGatewayCreate, AxerveGatewayUpdate, AxerveGatewayType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/axerve_gateways.ts"],"names":["ApiResource"],"mappings":";;;;AA2FA,MAAM,uBAAuBA,oBAA2B,CAAA;A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M,UAAW,EAAA,EAAG,CAAmB,gBAAA,EAAA,gBAAgB,CAAa,SAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC3H,EAEA,MAAM,eAAA,CAAgB,eAAyC,EAAA,MAAA,EAAyC,OAAiE,EAAA;AACxK,IAAM,MAAA,gBAAA,GAAoB,gBAAkC,EAAM,IAAA,eAAA;AAClE,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAqB,EAAE,IAAA,EAAM,iBAAkB,EAAA,EAAG,CAAmB,gBAAA,EAAA,gBAAgB,CAAoB,gBAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC/I,EAGA,gBAAgB,QAA0C,EAAA;AACzD,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,cAAe,CAAA,IAAA;AAAA;AAC3D,EAGA,aAAa,EAAkD,EAAA;AAC9D,IAAO,OAAA,KAAA,CAAM,qBAAuC,EAAE,CAAA;AAAA;AACvD,EAEA,sBAAsB,GAAmC,EAAA;AACxD,IAAO,OAAA,KAAA,CAAM,qBAAwC,CAAA,GAAG,GAAG,CAAA;AAAA;AAC5D,EAGA,IAA0B,GAAA;AACzB,IAAA,OAAO,cAAe,CAAA,IAAA;AAAA;AAGxB;AAGA,MAAM,QAAA,GAAW,IAAI,cAAe,EAAA;AACpC,IAAO,uBAAQ,GAAA","file":"axerve_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 { AxervePayment, AxervePaymentType } from './axerve_payments'\n\n\ntype AxerveGatewayType = 'axerve_gateways'\ntype AxerveGatewayRel = ResourceRel & { type: AxerveGatewayType }\ntype AxervePaymentRel = ResourceRel & { type: AxervePaymentType }\n\n\nexport type AxerveGatewaySort = Pick<AxerveGateway, 'id' | 'name'> & ResourceSort\n// export type AxerveGatewayFilter = Pick<AxerveGateway, 'id' | 'name'> & ResourceFilter\n\n\ninterface AxerveGateway extends Resource {\n\t\n\treadonly type: AxerveGatewayType\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 merchant login code.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tlogin: string\n\t/** \n\t * The gateway webhook URL, generated automatically.\n\t * @example ```\"https://core.commercelayer.co/webhook_callbacks/axerve_gateways/xxxxx\"```\n\t */\n\twebhook_endpoint_url?: string | null\n\n\tpayment_methods?: PaymentMethod[] | null\n\tversions?: Version[] | null\n\taxerve_payments?: AxervePayment[] | null\n\n}\n\n\ninterface AxerveGatewayCreate 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 merchant login code.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tlogin: string\n\t/** \n\t * The gateway API key.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tapi_key: string\n\n\taxerve_payments?: AxervePaymentRel[] | null\n\n}\n\n\ninterface AxerveGatewayUpdate 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 merchant login code.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tlogin?: string | null\n\t/** \n\t * The gateway API key.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tapi_key?: string | null\n\n\taxerve_payments?: AxervePaymentRel[] | null\n\n}\n\n\nclass AxerveGateways extends ApiResource<AxerveGateway> {\n\n\tstatic readonly TYPE: AxerveGatewayType = 'axerve_gateways' as const\n\n\tasync create(resource: AxerveGatewayCreate, params?: QueryParamsRetrieve<AxerveGateway>, options?: ResourcesConfig): Promise<AxerveGateway> {\n\t\treturn this.resources.create<AxerveGatewayCreate, AxerveGateway>({ ...resource, type: AxerveGateways.TYPE }, params, options)\n\t}\n\n\tasync update(resource: AxerveGatewayUpdate, params?: QueryParamsRetrieve<AxerveGateway>, options?: ResourcesConfig): Promise<AxerveGateway> {\n\t\treturn this.resources.update<AxerveGatewayUpdate, AxerveGateway>({ ...resource, type: AxerveGateways.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: AxerveGateways.TYPE } : id, options)\n\t}\n\n\tasync payment_methods(axerveGatewayId: string | AxerveGateway, params?: QueryParamsList<PaymentMethod>, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>> {\n\t\tconst _axerveGatewayId = (axerveGatewayId as AxerveGateway).id || axerveGatewayId as string\n\t\treturn this.resources.fetch<PaymentMethod>({ type: 'payment_methods' }, `axerve_gateways/${_axerveGatewayId}/payment_methods`, params, options) as unknown as ListResponse<PaymentMethod>\n\t}\n\n\tasync versions(axerveGatewayId: string | AxerveGateway, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _axerveGatewayId = (axerveGatewayId as AxerveGateway).id || axerveGatewayId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `axerve_gateways/${_axerveGatewayId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync axerve_payments(axerveGatewayId: string | AxerveGateway, params?: QueryParamsList<AxervePayment>, options?: ResourcesConfig): Promise<ListResponse<AxervePayment>> {\n\t\tconst _axerveGatewayId = (axerveGatewayId as AxerveGateway).id || axerveGatewayId as string\n\t\treturn this.resources.fetch<AxervePayment>({ type: 'axerve_payments' }, `axerve_gateways/${_axerveGatewayId}/axerve_payments`, params, options) as unknown as ListResponse<AxervePayment>\n\t}\n\n\n\tisAxerveGateway(resource: any): resource is AxerveGateway {\n\t\treturn resource.type && (resource.type === AxerveGateways.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): AxerveGatewayRel {\n\t\treturn super.relationshipOneToOne<AxerveGatewayRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): AxerveGatewayRel[] {\n\t\treturn super.relationshipOneToMany<AxerveGatewayRel>(...ids)\n\t}\n\n\n\ttype(): AxerveGatewayType {\n\t\treturn AxerveGateways.TYPE\n\t}\n\n}\n\n\nconst instance = new AxerveGateways()\nexport default instance\n\nexport type { AxerveGateways, AxerveGateway, AxerveGatewayCreate, AxerveGatewayUpdate, AxerveGatewayType }\n"]}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { ej as AxerveGateway, ek as AxerveGatewayCreate, em as AxerveGatewaySort, na as AxerveGatewayType, el as AxerveGatewayUpdate, a0 as AxerveGateways, $ as default } from '../api-IwWtsAqE.cjs';
|
2
2
|
import '../client.cjs';
|
3
|
-
import '../interceptor-
|
3
|
+
import '../interceptor-k15jXzf0.cjs';
|
4
4
|
import '../types.cjs';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { ej as AxerveGateway, ek as AxerveGatewayCreate, em as AxerveGatewaySort, na as AxerveGatewayType, el as AxerveGatewayUpdate, a0 as AxerveGateways, $ as default } from '../api-F1F37Dud.js';
|
2
2
|
import '../client.js';
|
3
|
-
import '../interceptor-
|
3
|
+
import '../interceptor-k15jXzf0.js';
|
4
4
|
import '../types.js';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/resources/axerve_gateways.ts"],"names":[],"mappings":";;AA2FA,MAAM,uBAAuB,WAA2B,CAAA;AAAA,EAEvD,OAAgB,IAA0B,GAAA,iBAAA;AAAA,EAE1C,MAAM,MAAA,CAAO,QAA+B,EAAA,MAAA,EAA6C,OAAmD,EAAA;AAC3I,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CA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,OAAiE,EAAA;AACxK,IAAM,MAAA,gBAAA,GAAoB,gBAAkC,EAAM,IAAA,eAAA;AAClE,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAqB,EAAE,IAAA,EAAM,iBAAkB,EAAA,EAAG,CAAmB,gBAAA,EAAA,gBAAgB,CAAoB,gBAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC/I,EAGA,gBAAgB,QAA0C,EAAA;AACzD,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,cAAe,CAAA,IAAA;AAAA;AAC3D,EAGA,aAAa,EAAkD,EAAA;AAC9D,IAAO,OAAA,KAAA,CAAM,qBAAuC,EAAE,CAAA;AAAA;AACvD,EAEA,sBAAsB,GAAmC,EAAA;AACxD,IAAO,OAAA,KAAA,CAAM,qBAAwC,CAAA,GAAG,GAAG,CAAA;AAAA;AAC5D,EAGA,IAA0B,GAAA;AACzB,IAAA,OAAO,cAAe,CAAA,IAAA;AAAA;AAGxB;AAGA,MAAM,QAAA,GAAW,IAAI,cAAe,EAAA;AACpC,IAAO,uBAAQ,GAAA","file":"axerve_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 { AxervePayment, AxervePaymentType } from './axerve_payments'\n\n\ntype AxerveGatewayType = 'axerve_gateways'\ntype AxerveGatewayRel = ResourceRel & { type: AxerveGatewayType }\ntype AxervePaymentRel = ResourceRel & { type: AxervePaymentType }\n\n\nexport type AxerveGatewaySort = Pick<AxerveGateway, 'id' | 'name'> & ResourceSort\n// export type AxerveGatewayFilter = Pick<AxerveGateway, 'id' | 'name'> & ResourceFilter\n\n\ninterface AxerveGateway extends Resource {\n\t\n\treadonly type: AxerveGatewayType\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 merchant login code.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tlogin: string\n\t/** \n\t * The gateway webhook URL, generated automatically.\n\t * @example ```\"https://core.commercelayer.co/webhook_callbacks/axerve_gateways/xxxxx\"```\n\t */\n\twebhook_endpoint_url?: string | null\n\n\tpayment_methods?: PaymentMethod[] | null\n\tversions?: Version[] | null\n\taxerve_payments?: AxervePayment[] | null\n\n}\n\n\ninterface AxerveGatewayCreate 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 merchant login code.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tlogin: string\n\t/** \n\t * The gateway API key.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tapi_key: string\n\n\taxerve_payments?: AxervePaymentRel[] | null\n\n}\n\n\ninterface AxerveGatewayUpdate 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 merchant login code.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tlogin?: string | null\n\t/** \n\t * The gateway API key.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tapi_key?: string | null\n\n\taxerve_payments?: AxervePaymentRel[] | null\n\n}\n\n\nclass AxerveGateways extends ApiResource<AxerveGateway> {\n\n\tstatic readonly TYPE: AxerveGatewayType = 'axerve_gateways' as const\n\n\tasync create(resource: AxerveGatewayCreate, params?: QueryParamsRetrieve<AxerveGateway>, options?: ResourcesConfig): Promise<AxerveGateway> {\n\t\treturn this.resources.create<AxerveGatewayCreate, AxerveGateway>({ ...resource, type: AxerveGateways.TYPE }, params, options)\n\t}\n\n\tasync update(resource: AxerveGatewayUpdate, params?: QueryParamsRetrieve<AxerveGateway>, options?: ResourcesConfig): Promise<AxerveGateway> {\n\t\treturn this.resources.update<AxerveGatewayUpdate, AxerveGateway>({ ...resource, type: AxerveGateways.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: AxerveGateways.TYPE } : id, options)\n\t}\n\n\tasync payment_methods(axerveGatewayId: string | AxerveGateway, params?: QueryParamsList<PaymentMethod>, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>> {\n\t\tconst _axerveGatewayId = (axerveGatewayId as AxerveGateway).id || axerveGatewayId as string\n\t\treturn this.resources.fetch<PaymentMethod>({ type: 'payment_methods' }, `axerve_gateways/${_axerveGatewayId}/payment_methods`, params, options) as unknown as ListResponse<PaymentMethod>\n\t}\n\n\tasync versions(axerveGatewayId: string | AxerveGateway, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _axerveGatewayId = (axerveGatewayId as AxerveGateway).id || axerveGatewayId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `axerve_gateways/${_axerveGatewayId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync axerve_payments(axerveGatewayId: string | AxerveGateway, params?: QueryParamsList<AxervePayment>, options?: ResourcesConfig): Promise<ListResponse<AxervePayment>> {\n\t\tconst _axerveGatewayId = (axerveGatewayId as AxerveGateway).id || axerveGatewayId as string\n\t\treturn this.resources.fetch<AxervePayment>({ type: 'axerve_payments' }, `axerve_gateways/${_axerveGatewayId}/axerve_payments`, params, options) as unknown as ListResponse<AxervePayment>\n\t}\n\n\n\tisAxerveGateway(resource: any): resource is AxerveGateway {\n\t\treturn resource.type && (resource.type === AxerveGateways.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): AxerveGatewayRel {\n\t\treturn super.relationshipOneToOne<AxerveGatewayRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): AxerveGatewayRel[] {\n\t\treturn super.relationshipOneToMany<AxerveGatewayRel>(...ids)\n\t}\n\n\n\ttype(): AxerveGatewayType {\n\t\treturn AxerveGateways.TYPE\n\t}\n\n}\n\n\nconst instance = new AxerveGateways()\nexport default instance\n\nexport type { AxerveGateway, AxerveGatewayCreate, AxerveGatewayUpdate, AxerveGatewayType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/axerve_gateways.ts"],"names":[],"mappings":";;AA2FA,MAAM,uBAAuB,WAA2B,CAAA;AAAA,EAEvD,OAAgB,IAA0B,GAAA,iBAAA;AAAA,EAE1C,MAAM,MAAA,CAAO,QAA+B,EAAA,MAAA,EAA6C,OAAmD,EAAA;AAC3I,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA2C,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,cAAe,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC7H,EAEA,MAAM,MAAA,CAAO,QAA+B,EAAA,MAAA,EAA6C,OAAmD,EAAA;AAC3I,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA2C,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,cAAe,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC7H,EAEA,MAAM,MAAO,CAAA,EAAA,EAAyB,OAA0C,EAAA;AAC/E,IAAA,MAAM,IAAK,CAAA,SAAA,CAAU,MAAQ,CAAA,OAAO,EAAO,KAAA,QAAA,GAAW,EAAE,EAAA,EAAI,IAAM,EAAA,cAAA,CAAe,IAAK,EAAA,GAAI,IAAI,OAAO,CAAA;AAAA;AACtG,EAEA,MAAM,eAAA,CAAgB,eAAyC,EAAA,MAAA,EAAyC,OAAiE,EAAA;AACxK,IAAM,MAAA,gBAAA,GAAoB,gBAAkC,EAAM,IAAA,eAAA;AAClE,IAAO,OAAA,IAAA,CAAK,SAAU,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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 { AxervePayment, AxervePaymentType } from './axerve_payments'\n\n\ntype AxerveGatewayType = 'axerve_gateways'\ntype AxerveGatewayRel = ResourceRel & { type: AxerveGatewayType }\ntype AxervePaymentRel = ResourceRel & { type: AxervePaymentType }\n\n\nexport type AxerveGatewaySort = Pick<AxerveGateway, 'id' | 'name'> & ResourceSort\n// export type AxerveGatewayFilter = Pick<AxerveGateway, 'id' | 'name'> & ResourceFilter\n\n\ninterface AxerveGateway extends Resource {\n\t\n\treadonly type: AxerveGatewayType\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 merchant login code.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tlogin: string\n\t/** \n\t * The gateway webhook URL, generated automatically.\n\t * @example ```\"https://core.commercelayer.co/webhook_callbacks/axerve_gateways/xxxxx\"```\n\t */\n\twebhook_endpoint_url?: string | null\n\n\tpayment_methods?: PaymentMethod[] | null\n\tversions?: Version[] | null\n\taxerve_payments?: AxervePayment[] | null\n\n}\n\n\ninterface AxerveGatewayCreate 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 merchant login code.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tlogin: string\n\t/** \n\t * The gateway API key.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tapi_key: string\n\n\taxerve_payments?: AxervePaymentRel[] | null\n\n}\n\n\ninterface AxerveGatewayUpdate 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 merchant login code.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tlogin?: string | null\n\t/** \n\t * The gateway API key.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tapi_key?: string | null\n\n\taxerve_payments?: AxervePaymentRel[] | null\n\n}\n\n\nclass AxerveGateways extends ApiResource<AxerveGateway> {\n\n\tstatic readonly TYPE: AxerveGatewayType = 'axerve_gateways' as const\n\n\tasync create(resource: AxerveGatewayCreate, params?: QueryParamsRetrieve<AxerveGateway>, options?: ResourcesConfig): Promise<AxerveGateway> {\n\t\treturn this.resources.create<AxerveGatewayCreate, AxerveGateway>({ ...resource, type: AxerveGateways.TYPE }, params, options)\n\t}\n\n\tasync update(resource: AxerveGatewayUpdate, params?: QueryParamsRetrieve<AxerveGateway>, options?: ResourcesConfig): Promise<AxerveGateway> {\n\t\treturn this.resources.update<AxerveGatewayUpdate, AxerveGateway>({ ...resource, type: AxerveGateways.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: AxerveGateways.TYPE } : id, options)\n\t}\n\n\tasync payment_methods(axerveGatewayId: string | AxerveGateway, params?: QueryParamsList<PaymentMethod>, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>> {\n\t\tconst _axerveGatewayId = (axerveGatewayId as AxerveGateway).id || axerveGatewayId as string\n\t\treturn this.resources.fetch<PaymentMethod>({ type: 'payment_methods' }, `axerve_gateways/${_axerveGatewayId}/payment_methods`, params, options) as unknown as ListResponse<PaymentMethod>\n\t}\n\n\tasync versions(axerveGatewayId: string | AxerveGateway, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _axerveGatewayId = (axerveGatewayId as AxerveGateway).id || axerveGatewayId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `axerve_gateways/${_axerveGatewayId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync axerve_payments(axerveGatewayId: string | AxerveGateway, params?: QueryParamsList<AxervePayment>, options?: ResourcesConfig): Promise<ListResponse<AxervePayment>> {\n\t\tconst _axerveGatewayId = (axerveGatewayId as AxerveGateway).id || axerveGatewayId as string\n\t\treturn this.resources.fetch<AxervePayment>({ type: 'axerve_payments' }, `axerve_gateways/${_axerveGatewayId}/axerve_payments`, params, options) as unknown as ListResponse<AxervePayment>\n\t}\n\n\n\tisAxerveGateway(resource: any): resource is AxerveGateway {\n\t\treturn resource.type && (resource.type === AxerveGateways.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): AxerveGatewayRel {\n\t\treturn super.relationshipOneToOne<AxerveGatewayRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): AxerveGatewayRel[] {\n\t\treturn super.relationshipOneToMany<AxerveGatewayRel>(...ids)\n\t}\n\n\n\ttype(): AxerveGatewayType {\n\t\treturn AxerveGateways.TYPE\n\t}\n\n}\n\n\nconst instance = new AxerveGateways()\nexport default instance\n\nexport type { AxerveGateways, AxerveGateway, AxerveGatewayCreate, AxerveGatewayUpdate, AxerveGatewayType }\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/resources/axerve_payments.ts"],"names":["ApiResource"],"mappings":";;;;AAmHA,MAAM,uBAAuBA,oBAA2B,CAAA;AAAA,EAEvD,OAAgB,IAA0B,GAAA,iBAAA;AAAA,EAE1C,MAAM,MAAA,CAAO,QAA+B,EAAA,MAAA,EAA6C,OAAmD,EAAA;AAC3I,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA2C,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,cAAe,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC7H,EAEA,MAAM,MAAA,CAAO,QAA+B,EAAA,MAAA,EAA6C,OAAmD,EAAA;AA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AAA,gBAAgB,CAAa,SAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC3H,EAEA,MAAM,OAAA,CAAQ,EAA4B,EAAA,MAAA,EAA6C,OAAmD,EAAA;AACzI,IAAA,OAAO,KAAK,SAAU,CAAA,MAAA,CAA2C,EAAE,EAAK,EAAA,OAAO,OAAO,QAAW,GAAA,EAAA,GAAI,EAAG,CAAA,EAAA,EAAI,MAAM,cAAe,CAAA,IAAA,EAAM,SAAS,IAAK,EAAA,EAAG,QAAQ,OAAO,CAAA;AAAA;AACxK,EAGA,gBAAgB,QAA0C,EAAA;AACzD,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,cAAe,CAAA,IAAA;AAAA;AAC3D,EAGA,aAAa,EAAkD,EAAA;AAC9D,IAAO,OAAA,KAAA,CAAM,qBAAuC,EAAE,CAAA;AAAA;AACvD,EAEA,sBAAsB,GAAmC,EAAA;AACxD,IAAO,OAAA,KAAA,CAAM,qBAAwC,CAAA,GAAG,GAAG,CAAA;AAAA;AAC5D,EAGA,IAA0B,GAAA;AACzB,IAAA,OAAO,cAAe,CAAA,IAAA;AAAA;AAGxB;AAGA,MAAM,QAAA,GAAW,IAAI,cAAe,EAAA;AACpC,IAAO,uBAAQ,GAAA","file":"axerve_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 AxervePaymentType = 'axerve_payments'\ntype AxervePaymentRel = ResourceRel & { type: AxervePaymentType }\ntype OrderRel = ResourceRel & { type: OrderType }\n\n\nexport type AxervePaymentSort = Pick<AxervePayment, 'id'> & ResourceSort\n// export type AxervePaymentFilter = Pick<AxervePayment, 'id'> & ResourceFilter\n\n\ninterface AxervePayment extends Resource {\n\t\n\treadonly type: AxervePaymentType\n\n\t/** \n\t * The merchant login code.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tlogin: string\n\t/** \n\t * The URL where the payer is redirected after they approve the payment.\n\t * @example ```\"https://yourdomain.com/thankyou\"```\n\t */\n\treturn_url: string\n\t/** \n\t * The Axerve payment request data, collected by client.\n\t * @example ```{\"foo\":\"bar\"}```\n\t */\n\tpayment_request_data?: Record<string, any> | null\n\t/** \n\t * The IP adress of the client creating the payment.\n\t * @example ```\"213.45.120.5\"```\n\t */\n\tclient_ip?: string | null\n\t/** \n\t * The details of the buyer creating the payment.\n\t * @example ```{\"cardHolder\":{\"email\":\"george.harrison@gmail.com\"},\"shippingAddress\":{\"firstName\":\"George\"}}```\n\t */\n\tbuyer_details?: Record<string, any> | null\n\t/** \n\t * Requires the creation of a token to represent this payment, mandatory to use customer's wallet and order subscriptions.\n\t * @example ```true```\n\t */\n\trequest_token?: boolean | 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 AxervePaymentCreate extends ResourceCreate {\n\t\n\t/** \n\t * The URL where the payer is redirected after they approve the payment.\n\t * @example ```\"https://yourdomain.com/thankyou\"```\n\t */\n\treturn_url: string\n\t/** \n\t * The IP adress of the client creating the payment.\n\t * @example ```\"213.45.120.5\"```\n\t */\n\tclient_ip?: string | null\n\t/** \n\t * The details of the buyer creating the payment.\n\t * @example ```{\"cardHolder\":{\"email\":\"george.harrison@gmail.com\"},\"shippingAddress\":{\"firstName\":\"George\"}}```\n\t */\n\tbuyer_details?: Record<string, any> | null\n\t/** \n\t * Requires the creation of a token to represent this payment, mandatory to use customer's wallet and order subscriptions.\n\t * @example ```true```\n\t */\n\trequest_token?: boolean | null\n\n\torder: OrderRel\n\n}\n\n\ninterface AxervePaymentUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The Axerve payment request data, collected by client.\n\t * @example ```{\"foo\":\"bar\"}```\n\t */\n\tpayment_request_data?: Record<string, any> | null\n\t/** \n\t * Send this attribute if you want to update the payment with fresh order data.\n\t * @example ```true```\n\t */\n\t_update?: boolean | null\n\n\torder?: OrderRel | null\n\n}\n\n\nclass AxervePayments extends ApiResource<AxervePayment> {\n\n\tstatic readonly TYPE: AxervePaymentType = 'axerve_payments' as const\n\n\tasync create(resource: AxervePaymentCreate, params?: QueryParamsRetrieve<AxervePayment>, options?: ResourcesConfig): Promise<AxervePayment> {\n\t\treturn this.resources.create<AxervePaymentCreate, AxervePayment>({ ...resource, type: AxervePayments.TYPE }, params, options)\n\t}\n\n\tasync update(resource: AxervePaymentUpdate, params?: QueryParamsRetrieve<AxervePayment>, options?: ResourcesConfig): Promise<AxervePayment> {\n\t\treturn this.resources.update<AxervePaymentUpdate, AxervePayment>({ ...resource, type: AxervePayments.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: AxervePayments.TYPE } : id, options)\n\t}\n\n\tasync order(axervePaymentId: string | AxervePayment, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _axervePaymentId = (axervePaymentId as AxervePayment).id || axervePaymentId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `axerve_payments/${_axervePaymentId}/order`, params, options) as unknown as Order\n\t}\n\n\tasync payment_gateway(axervePaymentId: string | AxervePayment, params?: QueryParamsRetrieve<PaymentGateway>, options?: ResourcesConfig): Promise<PaymentGateway> {\n\t\tconst _axervePaymentId = (axervePaymentId as AxervePayment).id || axervePaymentId as string\n\t\treturn this.resources.fetch<PaymentGateway>({ type: 'payment_gateways' }, `axerve_payments/${_axervePaymentId}/payment_gateway`, params, options) as unknown as PaymentGateway\n\t}\n\n\tasync versions(axervePaymentId: string | AxervePayment, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _axervePaymentId = (axervePaymentId as AxervePayment).id || axervePaymentId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `axerve_payments/${_axervePaymentId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _update(id: string | AxervePayment, params?: QueryParamsRetrieve<AxervePayment>, options?: ResourcesConfig): Promise<AxervePayment> {\n\t\treturn this.resources.update<AxervePaymentUpdate, AxervePayment>({ id: (typeof id === 'string')? id: id.id, type: AxervePayments.TYPE, _update: true }, params, options)\n\t}\n\n\n\tisAxervePayment(resource: any): resource is AxervePayment {\n\t\treturn resource.type && (resource.type === AxervePayments.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): AxervePaymentRel {\n\t\treturn super.relationshipOneToOne<AxervePaymentRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): AxervePaymentRel[] {\n\t\treturn super.relationshipOneToMany<AxervePaymentRel>(...ids)\n\t}\n\n\n\ttype(): AxervePaymentType {\n\t\treturn AxervePayments.TYPE\n\t}\n\n}\n\n\nconst instance = new AxervePayments()\nexport default instance\n\nexport type { AxervePayment, AxervePaymentCreate, AxervePaymentUpdate, AxervePaymentType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/axerve_payments.ts"],"names":["ApiResource"],"mappings":";;;;AAmHA,MAAM,uBAAuBA,oBAA2B,CAAA;AAAA,EAEvD,OAAgB,IAA0B,GAAA,iBAAA;AAAA,EAE1C,MAAM,MAAA,CAAO,QAA+B,EAAA,MAAA,EAA6C,OAAmD,EAAA;AAC3I,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA2C,EAAE,GAAG,QAAU,EA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AAA,gBAAA,GAAoB,gBAAkC,EAAM,IAAA,eAAA;AAClE,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAe,EAAE,IAAA,EAAM,UAAW,EAAA,EAAG,CAAmB,gBAAA,EAAA,gBAAgB,CAAa,SAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC3H,EAEA,MAAM,OAAA,CAAQ,EAA4B,EAAA,MAAA,EAA6C,OAAmD,EAAA;AACzI,IAAA,OAAO,KAAK,SAAU,CAAA,MAAA,CAA2C,EAAE,EAAK,EAAA,OAAO,OAAO,QAAW,GAAA,EAAA,GAAI,EAAG,CAAA,EAAA,EAAI,MAAM,cAAe,CAAA,IAAA,EAAM,SAAS,IAAK,EAAA,EAAG,QAAQ,OAAO,CAAA;AAAA;AACxK,EAGA,gBAAgB,QAA0C,EAAA;AACzD,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,cAAe,CAAA,IAAA;AAAA;AAC3D,EAGA,aAAa,EAAkD,EAAA;AAC9D,IAAO,OAAA,KAAA,CAAM,qBAAuC,EAAE,CAAA;AAAA;AACvD,EAEA,sBAAsB,GAAmC,EAAA;AACxD,IAAO,OAAA,KAAA,CAAM,qBAAwC,CAAA,GAAG,GAAG,CAAA;AAAA;AAC5D,EAGA,IAA0B,GAAA;AACzB,IAAA,OAAO,cAAe,CAAA,IAAA;AAAA;AAGxB;AAGA,MAAM,QAAA,GAAW,IAAI,cAAe,EAAA;AACpC,IAAO,uBAAQ,GAAA","file":"axerve_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 AxervePaymentType = 'axerve_payments'\ntype AxervePaymentRel = ResourceRel & { type: AxervePaymentType }\ntype OrderRel = ResourceRel & { type: OrderType }\n\n\nexport type AxervePaymentSort = Pick<AxervePayment, 'id'> & ResourceSort\n// export type AxervePaymentFilter = Pick<AxervePayment, 'id'> & ResourceFilter\n\n\ninterface AxervePayment extends Resource {\n\t\n\treadonly type: AxervePaymentType\n\n\t/** \n\t * The merchant login code.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tlogin: string\n\t/** \n\t * The URL where the payer is redirected after they approve the payment.\n\t * @example ```\"https://yourdomain.com/thankyou\"```\n\t */\n\treturn_url: string\n\t/** \n\t * The Axerve payment request data, collected by client.\n\t * @example ```{\"foo\":\"bar\"}```\n\t */\n\tpayment_request_data?: Record<string, any> | null\n\t/** \n\t * The IP adress of the client creating the payment.\n\t * @example ```\"213.45.120.5\"```\n\t */\n\tclient_ip?: string | null\n\t/** \n\t * The details of the buyer creating the payment.\n\t * @example ```{\"cardHolder\":{\"email\":\"george.harrison@gmail.com\"},\"shippingAddress\":{\"firstName\":\"George\"}}```\n\t */\n\tbuyer_details?: Record<string, any> | null\n\t/** \n\t * Requires the creation of a token to represent this payment, mandatory to use customer's wallet and order subscriptions.\n\t * @example ```true```\n\t */\n\trequest_token?: boolean | 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 AxervePaymentCreate extends ResourceCreate {\n\t\n\t/** \n\t * The URL where the payer is redirected after they approve the payment.\n\t * @example ```\"https://yourdomain.com/thankyou\"```\n\t */\n\treturn_url: string\n\t/** \n\t * The IP adress of the client creating the payment.\n\t * @example ```\"213.45.120.5\"```\n\t */\n\tclient_ip?: string | null\n\t/** \n\t * The details of the buyer creating the payment.\n\t * @example ```{\"cardHolder\":{\"email\":\"george.harrison@gmail.com\"},\"shippingAddress\":{\"firstName\":\"George\"}}```\n\t */\n\tbuyer_details?: Record<string, any> | null\n\t/** \n\t * Requires the creation of a token to represent this payment, mandatory to use customer's wallet and order subscriptions.\n\t * @example ```true```\n\t */\n\trequest_token?: boolean | null\n\n\torder: OrderRel\n\n}\n\n\ninterface AxervePaymentUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The Axerve payment request data, collected by client.\n\t * @example ```{\"foo\":\"bar\"}```\n\t */\n\tpayment_request_data?: Record<string, any> | null\n\t/** \n\t * Send this attribute if you want to update the payment with fresh order data.\n\t * @example ```true```\n\t */\n\t_update?: boolean | null\n\n\torder?: OrderRel | null\n\n}\n\n\nclass AxervePayments extends ApiResource<AxervePayment> {\n\n\tstatic readonly TYPE: AxervePaymentType = 'axerve_payments' as const\n\n\tasync create(resource: AxervePaymentCreate, params?: QueryParamsRetrieve<AxervePayment>, options?: ResourcesConfig): Promise<AxervePayment> {\n\t\treturn this.resources.create<AxervePaymentCreate, AxervePayment>({ ...resource, type: AxervePayments.TYPE }, params, options)\n\t}\n\n\tasync update(resource: AxervePaymentUpdate, params?: QueryParamsRetrieve<AxervePayment>, options?: ResourcesConfig): Promise<AxervePayment> {\n\t\treturn this.resources.update<AxervePaymentUpdate, AxervePayment>({ ...resource, type: AxervePayments.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: AxervePayments.TYPE } : id, options)\n\t}\n\n\tasync order(axervePaymentId: string | AxervePayment, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _axervePaymentId = (axervePaymentId as AxervePayment).id || axervePaymentId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `axerve_payments/${_axervePaymentId}/order`, params, options) as unknown as Order\n\t}\n\n\tasync payment_gateway(axervePaymentId: string | AxervePayment, params?: QueryParamsRetrieve<PaymentGateway>, options?: ResourcesConfig): Promise<PaymentGateway> {\n\t\tconst _axervePaymentId = (axervePaymentId as AxervePayment).id || axervePaymentId as string\n\t\treturn this.resources.fetch<PaymentGateway>({ type: 'payment_gateways' }, `axerve_payments/${_axervePaymentId}/payment_gateway`, params, options) as unknown as PaymentGateway\n\t}\n\n\tasync versions(axervePaymentId: string | AxervePayment, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _axervePaymentId = (axervePaymentId as AxervePayment).id || axervePaymentId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `axerve_payments/${_axervePaymentId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _update(id: string | AxervePayment, params?: QueryParamsRetrieve<AxervePayment>, options?: ResourcesConfig): Promise<AxervePayment> {\n\t\treturn this.resources.update<AxervePaymentUpdate, AxervePayment>({ id: (typeof id === 'string')? id: id.id, type: AxervePayments.TYPE, _update: true }, params, options)\n\t}\n\n\n\tisAxervePayment(resource: any): resource is AxervePayment {\n\t\treturn resource.type && (resource.type === AxervePayments.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): AxervePaymentRel {\n\t\treturn super.relationshipOneToOne<AxervePaymentRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): AxervePaymentRel[] {\n\t\treturn super.relationshipOneToMany<AxervePaymentRel>(...ids)\n\t}\n\n\n\ttype(): AxervePaymentType {\n\t\treturn AxervePayments.TYPE\n\t}\n\n}\n\n\nconst instance = new AxervePayments()\nexport default instance\n\nexport type { AxervePayments, AxervePayment, AxervePaymentCreate, AxervePaymentUpdate, AxervePaymentType }\n"]}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { en as AxervePayment, eo as AxervePaymentCreate, eq as AxervePaymentSort, lG as AxervePaymentType, ep as AxervePaymentUpdate, a2 as AxervePayments, a1 as default } from '../api-IwWtsAqE.cjs';
|
2
2
|
import '../client.cjs';
|
3
|
-
import '../interceptor-
|
3
|
+
import '../interceptor-k15jXzf0.cjs';
|
4
4
|
import '../types.cjs';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { en as AxervePayment, eo as AxervePaymentCreate, eq as AxervePaymentSort, lG as AxervePaymentType, ep as AxervePaymentUpdate, a2 as AxervePayments, a1 as default } from '../api-F1F37Dud.js';
|
2
2
|
import '../client.js';
|
3
|
-
import '../interceptor-
|
3
|
+
import '../interceptor-k15jXzf0.js';
|
4
4
|
import '../types.js';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/resources/axerve_payments.ts"],"names":[],"mappings":";;AAmHA,MAAM,uBAAuB,WAA2B,CAAA;AAAA,EAEvD,OAAgB,IAA0B,GAAA,iBAAA;AAAA,EAE1C,MAAM,MAAA,CAAO,QAA+B,EAAA,MAAA,EAA6C,OAAmD,EAAA;AAC3I,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA2C,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,cAAe,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC7H,EAEA,MAAM,MAAA,CAAO,QAA+B,EAAA,MAAA,EAA6C,OAAmD,EAAA;AAC3I,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA2C,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,cAAe,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC7H,EAEA,MAAM,MAAO,CAAA,EAAA,EAAyB,OAA0C,EAAA;AAC/E,IAAA,MAAM,IAAK,CAAA,SAAA,CAAU,MAAQ,CAAA,OAAO,EAAO,KAAA,QAAA,GAAW,EAAE,EAAA,EAAI,IAAM,EAAA,cAAA,CAAe,IAAK,EAAA,GAAI,IAAI,OAAO,CAAA;AAAA;AACtG,EA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AA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,cAAe,CAAA,IAAA;AAAA;AAC3D,EAGA,aAAa,EAAkD,EAAA;AAC9D,IAAO,OAAA,KAAA,CAAM,qBAAuC,EAAE,CAAA;AAAA;AACvD,EAEA,sBAAsB,GAAmC,EAAA;AACxD,IAAO,OAAA,KAAA,CAAM,qBAAwC,CAAA,GAAG,GAAG,CAAA;AAAA;AAC5D,EAGA,IAA0B,GAAA;AACzB,IAAA,OAAO,cAAe,CAAA,IAAA;AAAA;AAGxB;AAGA,MAAM,QAAA,GAAW,IAAI,cAAe,EAAA;AACpC,IAAO,uBAAQ,GAAA","file":"axerve_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 AxervePaymentType = 'axerve_payments'\ntype AxervePaymentRel = ResourceRel & { type: AxervePaymentType }\ntype OrderRel = ResourceRel & { type: OrderType }\n\n\nexport type AxervePaymentSort = Pick<AxervePayment, 'id'> & ResourceSort\n// export type AxervePaymentFilter = Pick<AxervePayment, 'id'> & ResourceFilter\n\n\ninterface AxervePayment extends Resource {\n\t\n\treadonly type: AxervePaymentType\n\n\t/** \n\t * The merchant login code.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tlogin: string\n\t/** \n\t * The URL where the payer is redirected after they approve the payment.\n\t * @example ```\"https://yourdomain.com/thankyou\"```\n\t */\n\treturn_url: string\n\t/** \n\t * The Axerve payment request data, collected by client.\n\t * @example ```{\"foo\":\"bar\"}```\n\t */\n\tpayment_request_data?: Record<string, any> | null\n\t/** \n\t * The IP adress of the client creating the payment.\n\t * @example ```\"213.45.120.5\"```\n\t */\n\tclient_ip?: string | null\n\t/** \n\t * The details of the buyer creating the payment.\n\t * @example ```{\"cardHolder\":{\"email\":\"george.harrison@gmail.com\"},\"shippingAddress\":{\"firstName\":\"George\"}}```\n\t */\n\tbuyer_details?: Record<string, any> | null\n\t/** \n\t * Requires the creation of a token to represent this payment, mandatory to use customer's wallet and order subscriptions.\n\t * @example ```true```\n\t */\n\trequest_token?: boolean | 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 AxervePaymentCreate extends ResourceCreate {\n\t\n\t/** \n\t * The URL where the payer is redirected after they approve the payment.\n\t * @example ```\"https://yourdomain.com/thankyou\"```\n\t */\n\treturn_url: string\n\t/** \n\t * The IP adress of the client creating the payment.\n\t * @example ```\"213.45.120.5\"```\n\t */\n\tclient_ip?: string | null\n\t/** \n\t * The details of the buyer creating the payment.\n\t * @example ```{\"cardHolder\":{\"email\":\"george.harrison@gmail.com\"},\"shippingAddress\":{\"firstName\":\"George\"}}```\n\t */\n\tbuyer_details?: Record<string, any> | null\n\t/** \n\t * Requires the creation of a token to represent this payment, mandatory to use customer's wallet and order subscriptions.\n\t * @example ```true```\n\t */\n\trequest_token?: boolean | null\n\n\torder: OrderRel\n\n}\n\n\ninterface AxervePaymentUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The Axerve payment request data, collected by client.\n\t * @example ```{\"foo\":\"bar\"}```\n\t */\n\tpayment_request_data?: Record<string, any> | null\n\t/** \n\t * Send this attribute if you want to update the payment with fresh order data.\n\t * @example ```true```\n\t */\n\t_update?: boolean | null\n\n\torder?: OrderRel | null\n\n}\n\n\nclass AxervePayments extends ApiResource<AxervePayment> {\n\n\tstatic readonly TYPE: AxervePaymentType = 'axerve_payments' as const\n\n\tasync create(resource: AxervePaymentCreate, params?: QueryParamsRetrieve<AxervePayment>, options?: ResourcesConfig): Promise<AxervePayment> {\n\t\treturn this.resources.create<AxervePaymentCreate, AxervePayment>({ ...resource, type: AxervePayments.TYPE }, params, options)\n\t}\n\n\tasync update(resource: AxervePaymentUpdate, params?: QueryParamsRetrieve<AxervePayment>, options?: ResourcesConfig): Promise<AxervePayment> {\n\t\treturn this.resources.update<AxervePaymentUpdate, AxervePayment>({ ...resource, type: AxervePayments.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: AxervePayments.TYPE } : id, options)\n\t}\n\n\tasync order(axervePaymentId: string | AxervePayment, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _axervePaymentId = (axervePaymentId as AxervePayment).id || axervePaymentId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `axerve_payments/${_axervePaymentId}/order`, params, options) as unknown as Order\n\t}\n\n\tasync payment_gateway(axervePaymentId: string | AxervePayment, params?: QueryParamsRetrieve<PaymentGateway>, options?: ResourcesConfig): Promise<PaymentGateway> {\n\t\tconst _axervePaymentId = (axervePaymentId as AxervePayment).id || axervePaymentId as string\n\t\treturn this.resources.fetch<PaymentGateway>({ type: 'payment_gateways' }, `axerve_payments/${_axervePaymentId}/payment_gateway`, params, options) as unknown as PaymentGateway\n\t}\n\n\tasync versions(axervePaymentId: string | AxervePayment, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _axervePaymentId = (axervePaymentId as AxervePayment).id || axervePaymentId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `axerve_payments/${_axervePaymentId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _update(id: string | AxervePayment, params?: QueryParamsRetrieve<AxervePayment>, options?: ResourcesConfig): Promise<AxervePayment> {\n\t\treturn this.resources.update<AxervePaymentUpdate, AxervePayment>({ id: (typeof id === 'string')? id: id.id, type: AxervePayments.TYPE, _update: true }, params, options)\n\t}\n\n\n\tisAxervePayment(resource: any): resource is AxervePayment {\n\t\treturn resource.type && (resource.type === AxervePayments.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): AxervePaymentRel {\n\t\treturn super.relationshipOneToOne<AxervePaymentRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): AxervePaymentRel[] {\n\t\treturn super.relationshipOneToMany<AxervePaymentRel>(...ids)\n\t}\n\n\n\ttype(): AxervePaymentType {\n\t\treturn AxervePayments.TYPE\n\t}\n\n}\n\n\nconst instance = new AxervePayments()\nexport default instance\n\nexport type { AxervePayment, AxervePaymentCreate, AxervePaymentUpdate, AxervePaymentType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/axerve_payments.ts"],"names":[],"mappings":";;AAmHA,MAAM,uBAAuB,WAA2B,CAAA;AAAA,EAEvD,OAAgB,IAA0B,GAAA,iBAAA;AAAA,EAE1C,MAAM,MAAA,CAAO,QAA+B,EAAA,MAAA,EAA6C,OAAmD,EAAA;AAC3I,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA2C,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,cAAe,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC7H,EAEA,MAAM,MAAA,CAAO,QAA+B,EAAA,MAAA,EAA6C,OAAmD,EAAA;AAC3I,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA2C,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,cAAe,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC7H,EAEA,MAAM,MAAO,CAAA,EAAA,EAAyB,OAA0C,EAAA;AAC/E,IAAA,MAAM,IAAK,CAAA,SAAA,CAAU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AA,EAAA,EAAI,MAAM,cAAe,CAAA,IAAA,EAAM,SAAS,IAAK,EAAA,EAAG,QAAQ,OAAO,CAAA;AAAA;AACxK,EAGA,gBAAgB,QAA0C,EAAA;AACzD,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,cAAe,CAAA,IAAA;AAAA;AAC3D,EAGA,aAAa,EAAkD,EAAA;AAC9D,IAAO,OAAA,KAAA,CAAM,qBAAuC,EAAE,CAAA;AAAA;AACvD,EAEA,sBAAsB,GAAmC,EAAA;AACxD,IAAO,OAAA,KAAA,CAAM,qBAAwC,CAAA,GAAG,GAAG,CAAA;AAAA;AAC5D,EAGA,IAA0B,GAAA;AACzB,IAAA,OAAO,cAAe,CAAA,IAAA;AAAA;AAGxB;AAGA,MAAM,QAAA,GAAW,IAAI,cAAe,EAAA;AACpC,IAAO,uBAAQ,GAAA","file":"axerve_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 AxervePaymentType = 'axerve_payments'\ntype AxervePaymentRel = ResourceRel & { type: AxervePaymentType }\ntype OrderRel = ResourceRel & { type: OrderType }\n\n\nexport type AxervePaymentSort = Pick<AxervePayment, 'id'> & ResourceSort\n// export type AxervePaymentFilter = Pick<AxervePayment, 'id'> & ResourceFilter\n\n\ninterface AxervePayment extends Resource {\n\t\n\treadonly type: AxervePaymentType\n\n\t/** \n\t * The merchant login code.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tlogin: string\n\t/** \n\t * The URL where the payer is redirected after they approve the payment.\n\t * @example ```\"https://yourdomain.com/thankyou\"```\n\t */\n\treturn_url: string\n\t/** \n\t * The Axerve payment request data, collected by client.\n\t * @example ```{\"foo\":\"bar\"}```\n\t */\n\tpayment_request_data?: Record<string, any> | null\n\t/** \n\t * The IP adress of the client creating the payment.\n\t * @example ```\"213.45.120.5\"```\n\t */\n\tclient_ip?: string | null\n\t/** \n\t * The details of the buyer creating the payment.\n\t * @example ```{\"cardHolder\":{\"email\":\"george.harrison@gmail.com\"},\"shippingAddress\":{\"firstName\":\"George\"}}```\n\t */\n\tbuyer_details?: Record<string, any> | null\n\t/** \n\t * Requires the creation of a token to represent this payment, mandatory to use customer's wallet and order subscriptions.\n\t * @example ```true```\n\t */\n\trequest_token?: boolean | 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 AxervePaymentCreate extends ResourceCreate {\n\t\n\t/** \n\t * The URL where the payer is redirected after they approve the payment.\n\t * @example ```\"https://yourdomain.com/thankyou\"```\n\t */\n\treturn_url: string\n\t/** \n\t * The IP adress of the client creating the payment.\n\t * @example ```\"213.45.120.5\"```\n\t */\n\tclient_ip?: string | null\n\t/** \n\t * The details of the buyer creating the payment.\n\t * @example ```{\"cardHolder\":{\"email\":\"george.harrison@gmail.com\"},\"shippingAddress\":{\"firstName\":\"George\"}}```\n\t */\n\tbuyer_details?: Record<string, any> | null\n\t/** \n\t * Requires the creation of a token to represent this payment, mandatory to use customer's wallet and order subscriptions.\n\t * @example ```true```\n\t */\n\trequest_token?: boolean | null\n\n\torder: OrderRel\n\n}\n\n\ninterface AxervePaymentUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The Axerve payment request data, collected by client.\n\t * @example ```{\"foo\":\"bar\"}```\n\t */\n\tpayment_request_data?: Record<string, any> | null\n\t/** \n\t * Send this attribute if you want to update the payment with fresh order data.\n\t * @example ```true```\n\t */\n\t_update?: boolean | null\n\n\torder?: OrderRel | null\n\n}\n\n\nclass AxervePayments extends ApiResource<AxervePayment> {\n\n\tstatic readonly TYPE: AxervePaymentType = 'axerve_payments' as const\n\n\tasync create(resource: AxervePaymentCreate, params?: QueryParamsRetrieve<AxervePayment>, options?: ResourcesConfig): Promise<AxervePayment> {\n\t\treturn this.resources.create<AxervePaymentCreate, AxervePayment>({ ...resource, type: AxervePayments.TYPE }, params, options)\n\t}\n\n\tasync update(resource: AxervePaymentUpdate, params?: QueryParamsRetrieve<AxervePayment>, options?: ResourcesConfig): Promise<AxervePayment> {\n\t\treturn this.resources.update<AxervePaymentUpdate, AxervePayment>({ ...resource, type: AxervePayments.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: AxervePayments.TYPE } : id, options)\n\t}\n\n\tasync order(axervePaymentId: string | AxervePayment, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _axervePaymentId = (axervePaymentId as AxervePayment).id || axervePaymentId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `axerve_payments/${_axervePaymentId}/order`, params, options) as unknown as Order\n\t}\n\n\tasync payment_gateway(axervePaymentId: string | AxervePayment, params?: QueryParamsRetrieve<PaymentGateway>, options?: ResourcesConfig): Promise<PaymentGateway> {\n\t\tconst _axervePaymentId = (axervePaymentId as AxervePayment).id || axervePaymentId as string\n\t\treturn this.resources.fetch<PaymentGateway>({ type: 'payment_gateways' }, `axerve_payments/${_axervePaymentId}/payment_gateway`, params, options) as unknown as PaymentGateway\n\t}\n\n\tasync versions(axervePaymentId: string | AxervePayment, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _axervePaymentId = (axervePaymentId as AxervePayment).id || axervePaymentId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `axerve_payments/${_axervePaymentId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _update(id: string | AxervePayment, params?: QueryParamsRetrieve<AxervePayment>, options?: ResourcesConfig): Promise<AxervePayment> {\n\t\treturn this.resources.update<AxervePaymentUpdate, AxervePayment>({ id: (typeof id === 'string')? id: id.id, type: AxervePayments.TYPE, _update: true }, params, options)\n\t}\n\n\n\tisAxervePayment(resource: any): resource is AxervePayment {\n\t\treturn resource.type && (resource.type === AxervePayments.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): AxervePaymentRel {\n\t\treturn super.relationshipOneToOne<AxervePaymentRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): AxervePaymentRel[] {\n\t\treturn super.relationshipOneToMany<AxervePaymentRel>(...ids)\n\t}\n\n\n\ttype(): AxervePaymentType {\n\t\treturn AxervePayments.TYPE\n\t}\n\n}\n\n\nconst instance = new AxervePayments()\nexport default instance\n\nexport type { AxervePayments, AxervePayment, AxervePaymentCreate, AxervePaymentUpdate, AxervePaymentType }\n"]}
|