@commercelayer/sdk 7.0.0-beta.8 → 7.0.0-rc.1
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 +48 -35
- package/lib/api-DDgIE2i8.d.ts +17175 -0
- package/lib/api-DmIZO_Np.d.cts +17175 -0
- package/lib/api.cjs +796 -0
- package/lib/api.cjs.map +1 -0
- package/lib/api.d.cts +4 -0
- package/lib/api.d.ts +4 -0
- package/lib/api.js +133 -0
- package/lib/api.js.map +1 -0
- package/lib/client.cjs +160 -0
- package/lib/client.cjs.map +1 -0
- package/lib/client.d.cts +36 -0
- package/lib/client.d.ts +36 -0
- package/lib/client.js +151 -0
- package/lib/client.js.map +1 -0
- package/lib/commercelayer.cjs +114 -0
- package/lib/commercelayer.cjs.map +1 -0
- package/lib/commercelayer.d.cts +36 -0
- package/lib/commercelayer.d.ts +36 -0
- package/lib/commercelayer.js +104 -0
- package/lib/commercelayer.js.map +1 -0
- package/lib/config.cjs +23 -0
- package/lib/config.cjs.map +1 -0
- package/lib/config.d.cts +19 -0
- package/lib/config.d.ts +19 -0
- package/lib/config.js +19 -0
- package/lib/config.js.map +1 -0
- package/lib/debug.cjs +21 -0
- package/lib/debug.cjs.map +1 -0
- package/lib/debug.d.cts +4 -0
- package/lib/debug.d.ts +4 -0
- package/lib/debug.js +17 -0
- package/lib/debug.js.map +1 -0
- package/lib/enum.cjs +659 -0
- package/lib/enum.cjs.map +1 -0
- package/lib/enum.d.cts +4 -0
- package/lib/enum.d.ts +4 -0
- package/lib/enum.js +643 -0
- package/lib/enum.js.map +1 -0
- package/lib/error.cjs +101 -0
- package/lib/error.cjs.map +1 -0
- package/lib/error.d.cts +38 -0
- package/lib/error.d.ts +38 -0
- package/lib/error.js +93 -0
- package/lib/error.js.map +1 -0
- package/lib/fetch.cjs +69 -0
- package/lib/fetch.cjs.map +1 -0
- package/lib/fetch.d.cts +1 -0
- package/lib/fetch.d.ts +1 -0
- package/lib/fetch.js +62 -0
- package/lib/fetch.js.map +1 -0
- package/lib/index.cjs +34 -2
- package/lib/index.cjs.map +1 -0
- package/lib/index.d.cts +7 -17201
- package/lib/index.d.ts +7 -17201
- package/lib/index.js +5 -2
- package/lib/index.js.map +1 -0
- package/lib/interceptor-5MISI1yn.d.cts +54 -0
- package/lib/interceptor-5MISI1yn.d.ts +54 -0
- package/lib/interceptor.cjs +4 -0
- package/lib/interceptor.cjs.map +1 -0
- package/lib/interceptor.d.cts +1 -0
- package/lib/interceptor.d.ts +1 -0
- package/lib/interceptor.js +3 -0
- package/lib/interceptor.js.map +1 -0
- package/lib/jsonapi.cjs +81 -0
- package/lib/jsonapi.cjs.map +1 -0
- package/lib/jsonapi.d.cts +11 -0
- package/lib/jsonapi.d.ts +11 -0
- package/lib/jsonapi.js +73 -0
- package/lib/jsonapi.js.map +1 -0
- package/lib/model.cjs +4 -0
- package/lib/model.cjs.map +1 -0
- package/lib/model.d.cts +4 -0
- package/lib/model.d.ts +4 -0
- package/lib/model.js +3 -0
- package/lib/model.js.map +1 -0
- package/lib/query.cjs +66 -0
- package/lib/query.cjs.map +1 -0
- package/lib/query.d.cts +4 -0
- package/lib/query.d.ts +4 -0
- package/lib/query.js +58 -0
- package/lib/query.js.map +1 -0
- package/lib/resource.cjs +218 -0
- package/lib/resource.cjs.map +1 -0
- package/lib/resource.d.cts +4 -0
- package/lib/resource.d.ts +4 -0
- package/lib/resource.js +206 -0
- package/lib/resource.js.map +1 -0
- package/lib/resources/addresses.cjs +58 -0
- package/lib/resources/addresses.cjs.map +1 -0
- package/lib/resources/addresses.d.cts +4 -0
- package/lib/resources/addresses.d.ts +4 -0
- package/lib/resources/addresses.js +54 -0
- package/lib/resources/addresses.js.map +1 -0
- package/lib/resources/adjustments.cjs +40 -0
- package/lib/resources/adjustments.cjs.map +1 -0
- package/lib/resources/adjustments.d.cts +4 -0
- package/lib/resources/adjustments.d.ts +4 -0
- package/lib/resources/adjustments.js +36 -0
- package/lib/resources/adjustments.js.map +1 -0
- package/lib/resources/adyen_gateways.cjs +48 -0
- package/lib/resources/adyen_gateways.cjs.map +1 -0
- package/lib/resources/adyen_gateways.d.cts +4 -0
- package/lib/resources/adyen_gateways.d.ts +4 -0
- package/lib/resources/adyen_gateways.js +44 -0
- package/lib/resources/adyen_gateways.js.map +1 -0
- package/lib/resources/adyen_payments.cjs +54 -0
- package/lib/resources/adyen_payments.cjs.map +1 -0
- package/lib/resources/adyen_payments.d.cts +4 -0
- package/lib/resources/adyen_payments.d.ts +4 -0
- package/lib/resources/adyen_payments.js +50 -0
- package/lib/resources/adyen_payments.js.map +1 -0
- package/lib/resources/applications.cjs +30 -0
- package/lib/resources/applications.cjs.map +1 -0
- package/lib/resources/applications.d.cts +4 -0
- package/lib/resources/applications.d.ts +4 -0
- package/lib/resources/applications.js +26 -0
- package/lib/resources/applications.js.map +1 -0
- package/lib/resources/attachments.cjs +36 -0
- package/lib/resources/attachments.cjs.map +1 -0
- package/lib/resources/attachments.d.cts +4 -0
- package/lib/resources/attachments.d.ts +4 -0
- package/lib/resources/attachments.js +32 -0
- package/lib/resources/attachments.js.map +1 -0
- package/lib/resources/authorizations.cjs +69 -0
- package/lib/resources/authorizations.cjs.map +1 -0
- package/lib/resources/authorizations.d.cts +4 -0
- package/lib/resources/authorizations.d.ts +4 -0
- package/lib/resources/authorizations.js +65 -0
- package/lib/resources/authorizations.js.map +1 -0
- package/lib/resources/avalara_accounts.cjs +56 -0
- package/lib/resources/avalara_accounts.cjs.map +1 -0
- package/lib/resources/avalara_accounts.d.cts +4 -0
- package/lib/resources/avalara_accounts.d.ts +4 -0
- package/lib/resources/avalara_accounts.js +52 -0
- package/lib/resources/avalara_accounts.js.map +1 -0
- package/lib/resources/axerve_gateways.cjs +48 -0
- package/lib/resources/axerve_gateways.cjs.map +1 -0
- package/lib/resources/axerve_gateways.d.cts +4 -0
- package/lib/resources/axerve_gateways.d.ts +4 -0
- package/lib/resources/axerve_gateways.js +44 -0
- package/lib/resources/axerve_gateways.js.map +1 -0
- package/lib/resources/axerve_payments.cjs +51 -0
- package/lib/resources/axerve_payments.cjs.map +1 -0
- package/lib/resources/axerve_payments.d.cts +4 -0
- package/lib/resources/axerve_payments.d.ts +4 -0
- package/lib/resources/axerve_payments.js +47 -0
- package/lib/resources/axerve_payments.js.map +1 -0
- package/lib/resources/bing_geocoders.cjs +48 -0
- package/lib/resources/bing_geocoders.cjs.map +1 -0
- package/lib/resources/bing_geocoders.d.cts +4 -0
- package/lib/resources/bing_geocoders.d.ts +4 -0
- package/lib/resources/bing_geocoders.js +44 -0
- package/lib/resources/bing_geocoders.js.map +1 -0
- package/lib/resources/braintree_gateways.cjs +48 -0
- package/lib/resources/braintree_gateways.cjs.map +1 -0
- package/lib/resources/braintree_gateways.d.cts +4 -0
- package/lib/resources/braintree_gateways.d.ts +4 -0
- package/lib/resources/braintree_gateways.js +44 -0
- package/lib/resources/braintree_gateways.js.map +1 -0
- package/lib/resources/braintree_payments.cjs +48 -0
- package/lib/resources/braintree_payments.cjs.map +1 -0
- package/lib/resources/braintree_payments.d.cts +4 -0
- package/lib/resources/braintree_payments.d.ts +4 -0
- package/lib/resources/braintree_payments.js +44 -0
- package/lib/resources/braintree_payments.js.map +1 -0
- package/lib/resources/bundles.cjs +76 -0
- package/lib/resources/bundles.cjs.map +1 -0
- package/lib/resources/bundles.d.cts +4 -0
- package/lib/resources/bundles.d.ts +4 -0
- package/lib/resources/bundles.js +72 -0
- package/lib/resources/bundles.js.map +1 -0
- package/lib/resources/buy_x_pay_y_promotions.cjs +96 -0
- package/lib/resources/buy_x_pay_y_promotions.cjs.map +1 -0
- package/lib/resources/buy_x_pay_y_promotions.d.cts +4 -0
- package/lib/resources/buy_x_pay_y_promotions.d.ts +4 -0
- package/lib/resources/buy_x_pay_y_promotions.js +92 -0
- package/lib/resources/buy_x_pay_y_promotions.js.map +1 -0
- package/lib/resources/captures.cjs +70 -0
- package/lib/resources/captures.cjs.map +1 -0
- package/lib/resources/captures.d.cts +4 -0
- package/lib/resources/captures.d.ts +4 -0
- package/lib/resources/captures.js +66 -0
- package/lib/resources/captures.js.map +1 -0
- package/lib/resources/carrier_accounts.cjs +48 -0
- package/lib/resources/carrier_accounts.cjs.map +1 -0
- package/lib/resources/carrier_accounts.d.cts +4 -0
- package/lib/resources/carrier_accounts.d.ts +4 -0
- package/lib/resources/carrier_accounts.js +44 -0
- package/lib/resources/carrier_accounts.js.map +1 -0
- package/lib/resources/checkout_com_gateways.cjs +48 -0
- package/lib/resources/checkout_com_gateways.cjs.map +1 -0
- package/lib/resources/checkout_com_gateways.d.cts +4 -0
- package/lib/resources/checkout_com_gateways.d.ts +4 -0
- package/lib/resources/checkout_com_gateways.js +44 -0
- package/lib/resources/checkout_com_gateways.js.map +1 -0
- package/lib/resources/checkout_com_payments.cjs +54 -0
- package/lib/resources/checkout_com_payments.cjs.map +1 -0
- package/lib/resources/checkout_com_payments.d.cts +4 -0
- package/lib/resources/checkout_com_payments.d.ts +4 -0
- package/lib/resources/checkout_com_payments.js +50 -0
- package/lib/resources/checkout_com_payments.js.map +1 -0
- package/lib/resources/cleanups.cjs +47 -0
- package/lib/resources/cleanups.cjs.map +1 -0
- package/lib/resources/cleanups.d.cts +4 -0
- package/lib/resources/cleanups.d.ts +4 -0
- package/lib/resources/cleanups.js +43 -0
- package/lib/resources/cleanups.js.map +1 -0
- package/lib/resources/coupon_codes_promotion_rules.cjs +44 -0
- package/lib/resources/coupon_codes_promotion_rules.cjs.map +1 -0
- package/lib/resources/coupon_codes_promotion_rules.d.cts +4 -0
- package/lib/resources/coupon_codes_promotion_rules.d.ts +4 -0
- package/lib/resources/coupon_codes_promotion_rules.js +40 -0
- package/lib/resources/coupon_codes_promotion_rules.js.map +1 -0
- package/lib/resources/coupon_recipients.cjs +48 -0
- package/lib/resources/coupon_recipients.cjs.map +1 -0
- package/lib/resources/coupon_recipients.d.cts +4 -0
- package/lib/resources/coupon_recipients.d.ts +4 -0
- package/lib/resources/coupon_recipients.js +44 -0
- package/lib/resources/coupon_recipients.js.map +1 -0
- package/lib/resources/coupons.cjs +62 -0
- package/lib/resources/coupons.cjs.map +1 -0
- package/lib/resources/coupons.d.cts +4 -0
- package/lib/resources/coupons.d.ts +4 -0
- package/lib/resources/coupons.js +58 -0
- package/lib/resources/coupons.js.map +1 -0
- package/lib/resources/custom_promotion_rules.cjs +40 -0
- package/lib/resources/custom_promotion_rules.cjs.map +1 -0
- package/lib/resources/custom_promotion_rules.d.cts +4 -0
- package/lib/resources/custom_promotion_rules.d.ts +4 -0
- package/lib/resources/custom_promotion_rules.js +36 -0
- package/lib/resources/custom_promotion_rules.js.map +1 -0
- package/lib/resources/customer_addresses.cjs +52 -0
- package/lib/resources/customer_addresses.cjs.map +1 -0
- package/lib/resources/customer_addresses.d.cts +4 -0
- package/lib/resources/customer_addresses.d.ts +4 -0
- package/lib/resources/customer_addresses.js +48 -0
- package/lib/resources/customer_addresses.js.map +1 -0
- package/lib/resources/customer_groups.cjs +52 -0
- package/lib/resources/customer_groups.cjs.map +1 -0
- package/lib/resources/customer_groups.d.cts +4 -0
- package/lib/resources/customer_groups.d.ts +4 -0
- package/lib/resources/customer_groups.js +48 -0
- package/lib/resources/customer_groups.js.map +1 -0
- package/lib/resources/customer_password_resets.cjs +47 -0
- package/lib/resources/customer_password_resets.cjs.map +1 -0
- package/lib/resources/customer_password_resets.d.cts +4 -0
- package/lib/resources/customer_password_resets.d.ts +4 -0
- package/lib/resources/customer_password_resets.js +43 -0
- package/lib/resources/customer_password_resets.js.map +1 -0
- package/lib/resources/customer_payment_sources.cjs +48 -0
- package/lib/resources/customer_payment_sources.cjs.map +1 -0
- package/lib/resources/customer_payment_sources.d.cts +4 -0
- package/lib/resources/customer_payment_sources.d.ts +4 -0
- package/lib/resources/customer_payment_sources.js +44 -0
- package/lib/resources/customer_payment_sources.js.map +1 -0
- package/lib/resources/customer_subscriptions.cjs +48 -0
- package/lib/resources/customer_subscriptions.cjs.map +1 -0
- package/lib/resources/customer_subscriptions.d.cts +4 -0
- package/lib/resources/customer_subscriptions.d.ts +4 -0
- package/lib/resources/customer_subscriptions.js +44 -0
- package/lib/resources/customer_subscriptions.js.map +1 -0
- package/lib/resources/customers.cjs +86 -0
- package/lib/resources/customers.cjs.map +1 -0
- package/lib/resources/customers.d.cts +4 -0
- package/lib/resources/customers.d.ts +4 -0
- package/lib/resources/customers.js +82 -0
- package/lib/resources/customers.js.map +1 -0
- package/lib/resources/delivery_lead_times.cjs +52 -0
- package/lib/resources/delivery_lead_times.cjs.map +1 -0
- package/lib/resources/delivery_lead_times.d.cts +4 -0
- package/lib/resources/delivery_lead_times.d.ts +4 -0
- package/lib/resources/delivery_lead_times.js +48 -0
- package/lib/resources/delivery_lead_times.js.map +1 -0
- package/lib/resources/discount_engine_items.cjs +35 -0
- package/lib/resources/discount_engine_items.cjs.map +1 -0
- package/lib/resources/discount_engine_items.d.cts +4 -0
- package/lib/resources/discount_engine_items.d.ts +4 -0
- package/lib/resources/discount_engine_items.js +31 -0
- package/lib/resources/discount_engine_items.js.map +1 -0
- package/lib/resources/discount_engines.cjs +43 -0
- package/lib/resources/discount_engines.cjs.map +1 -0
- package/lib/resources/discount_engines.d.cts +4 -0
- package/lib/resources/discount_engines.d.ts +4 -0
- package/lib/resources/discount_engines.js +39 -0
- package/lib/resources/discount_engines.js.map +1 -0
- package/lib/resources/easypost_pickups.cjs +51 -0
- package/lib/resources/easypost_pickups.cjs.map +1 -0
- package/lib/resources/easypost_pickups.d.cts +4 -0
- package/lib/resources/easypost_pickups.d.ts +4 -0
- package/lib/resources/easypost_pickups.js +47 -0
- package/lib/resources/easypost_pickups.js.map +1 -0
- package/lib/resources/event_callbacks.cjs +31 -0
- package/lib/resources/event_callbacks.cjs.map +1 -0
- package/lib/resources/event_callbacks.d.cts +4 -0
- package/lib/resources/event_callbacks.d.ts +4 -0
- package/lib/resources/event_callbacks.js +27 -0
- package/lib/resources/event_callbacks.js.map +1 -0
- package/lib/resources/events.cjs +41 -0
- package/lib/resources/events.cjs.map +1 -0
- package/lib/resources/events.d.cts +4 -0
- package/lib/resources/events.d.ts +4 -0
- package/lib/resources/events.js +37 -0
- package/lib/resources/events.js.map +1 -0
- package/lib/resources/exports.cjs +47 -0
- package/lib/resources/exports.cjs.map +1 -0
- package/lib/resources/exports.d.cts +4 -0
- package/lib/resources/exports.d.ts +4 -0
- package/lib/resources/exports.js +43 -0
- package/lib/resources/exports.js.map +1 -0
- package/lib/resources/external_gateways.cjs +51 -0
- package/lib/resources/external_gateways.cjs.map +1 -0
- package/lib/resources/external_gateways.d.cts +4 -0
- package/lib/resources/external_gateways.d.ts +4 -0
- package/lib/resources/external_gateways.js +47 -0
- package/lib/resources/external_gateways.js.map +1 -0
- package/lib/resources/external_payments.cjs +52 -0
- package/lib/resources/external_payments.cjs.map +1 -0
- package/lib/resources/external_payments.d.cts +4 -0
- package/lib/resources/external_payments.d.ts +4 -0
- package/lib/resources/external_payments.js +48 -0
- package/lib/resources/external_payments.js.map +1 -0
- package/lib/resources/external_promotions.cjs +99 -0
- package/lib/resources/external_promotions.cjs.map +1 -0
- package/lib/resources/external_promotions.d.cts +4 -0
- package/lib/resources/external_promotions.d.ts +4 -0
- package/lib/resources/external_promotions.js +95 -0
- package/lib/resources/external_promotions.js.map +1 -0
- package/lib/resources/external_tax_calculators.cjs +55 -0
- package/lib/resources/external_tax_calculators.cjs.map +1 -0
- package/lib/resources/external_tax_calculators.d.cts +4 -0
- package/lib/resources/external_tax_calculators.d.ts +4 -0
- package/lib/resources/external_tax_calculators.js +51 -0
- package/lib/resources/external_tax_calculators.js.map +1 -0
- package/lib/resources/fixed_amount_promotions.cjs +96 -0
- package/lib/resources/fixed_amount_promotions.cjs.map +1 -0
- package/lib/resources/fixed_amount_promotions.d.cts +4 -0
- package/lib/resources/fixed_amount_promotions.d.ts +4 -0
- package/lib/resources/fixed_amount_promotions.js +92 -0
- package/lib/resources/fixed_amount_promotions.js.map +1 -0
- package/lib/resources/fixed_price_promotions.cjs +96 -0
- package/lib/resources/fixed_price_promotions.cjs.map +1 -0
- package/lib/resources/fixed_price_promotions.d.cts +4 -0
- package/lib/resources/fixed_price_promotions.d.ts +4 -0
- package/lib/resources/fixed_price_promotions.js +92 -0
- package/lib/resources/fixed_price_promotions.js.map +1 -0
- package/lib/resources/flex_promotions.cjs +72 -0
- package/lib/resources/flex_promotions.cjs.map +1 -0
- package/lib/resources/flex_promotions.d.cts +4 -0
- package/lib/resources/flex_promotions.d.ts +4 -0
- package/lib/resources/flex_promotions.js +68 -0
- package/lib/resources/flex_promotions.js.map +1 -0
- package/lib/resources/free_gift_promotions.cjs +96 -0
- package/lib/resources/free_gift_promotions.cjs.map +1 -0
- package/lib/resources/free_gift_promotions.d.cts +4 -0
- package/lib/resources/free_gift_promotions.d.ts +4 -0
- package/lib/resources/free_gift_promotions.js +92 -0
- package/lib/resources/free_gift_promotions.js.map +1 -0
- package/lib/resources/free_shipping_promotions.cjs +92 -0
- package/lib/resources/free_shipping_promotions.cjs.map +1 -0
- package/lib/resources/free_shipping_promotions.d.cts +4 -0
- package/lib/resources/free_shipping_promotions.d.ts +4 -0
- package/lib/resources/free_shipping_promotions.js +88 -0
- package/lib/resources/free_shipping_promotions.js.map +1 -0
- package/lib/resources/geocoders.cjs +39 -0
- package/lib/resources/geocoders.cjs.map +1 -0
- package/lib/resources/geocoders.d.cts +4 -0
- package/lib/resources/geocoders.d.ts +4 -0
- package/lib/resources/geocoders.js +35 -0
- package/lib/resources/geocoders.js.map +1 -0
- package/lib/resources/gift_card_recipients.cjs +48 -0
- package/lib/resources/gift_card_recipients.cjs.map +1 -0
- package/lib/resources/gift_card_recipients.d.cts +4 -0
- package/lib/resources/gift_card_recipients.d.ts +4 -0
- package/lib/resources/gift_card_recipients.js +44 -0
- package/lib/resources/gift_card_recipients.js.map +1 -0
- package/lib/resources/gift_cards.cjs +78 -0
- package/lib/resources/gift_cards.cjs.map +1 -0
- package/lib/resources/gift_cards.d.cts +4 -0
- package/lib/resources/gift_cards.d.ts +4 -0
- package/lib/resources/gift_cards.js +74 -0
- package/lib/resources/gift_cards.js.map +1 -0
- package/lib/resources/google_geocoders.cjs +48 -0
- package/lib/resources/google_geocoders.cjs.map +1 -0
- package/lib/resources/google_geocoders.d.cts +4 -0
- package/lib/resources/google_geocoders.d.ts +4 -0
- package/lib/resources/google_geocoders.js +44 -0
- package/lib/resources/google_geocoders.js.map +1 -0
- package/lib/resources/imports.cjs +43 -0
- package/lib/resources/imports.cjs.map +1 -0
- package/lib/resources/imports.d.cts +4 -0
- package/lib/resources/imports.d.ts +4 -0
- package/lib/resources/imports.js +39 -0
- package/lib/resources/imports.js.map +1 -0
- package/lib/resources/in_stock_subscriptions.cjs +62 -0
- package/lib/resources/in_stock_subscriptions.cjs.map +1 -0
- package/lib/resources/in_stock_subscriptions.d.cts +4 -0
- package/lib/resources/in_stock_subscriptions.d.ts +4 -0
- package/lib/resources/in_stock_subscriptions.js +58 -0
- package/lib/resources/in_stock_subscriptions.js.map +1 -0
- package/lib/resources/inventory_models.cjs +52 -0
- package/lib/resources/inventory_models.cjs.map +1 -0
- package/lib/resources/inventory_models.d.cts +4 -0
- package/lib/resources/inventory_models.d.ts +4 -0
- package/lib/resources/inventory_models.js +48 -0
- package/lib/resources/inventory_models.js.map +1 -0
- package/lib/resources/inventory_return_locations.cjs +48 -0
- package/lib/resources/inventory_return_locations.cjs.map +1 -0
- package/lib/resources/inventory_return_locations.d.cts +4 -0
- package/lib/resources/inventory_return_locations.d.ts +4 -0
- package/lib/resources/inventory_return_locations.js +44 -0
- package/lib/resources/inventory_return_locations.js.map +1 -0
- package/lib/resources/inventory_stock_locations.cjs +48 -0
- package/lib/resources/inventory_stock_locations.cjs.map +1 -0
- package/lib/resources/inventory_stock_locations.d.cts +4 -0
- package/lib/resources/inventory_stock_locations.d.ts +4 -0
- package/lib/resources/inventory_stock_locations.js +44 -0
- package/lib/resources/inventory_stock_locations.js.map +1 -0
- package/lib/resources/klarna_gateways.cjs +48 -0
- package/lib/resources/klarna_gateways.cjs.map +1 -0
- package/lib/resources/klarna_gateways.d.cts +4 -0
- package/lib/resources/klarna_gateways.d.ts +4 -0
- package/lib/resources/klarna_gateways.js +44 -0
- package/lib/resources/klarna_gateways.js.map +1 -0
- package/lib/resources/klarna_payments.cjs +51 -0
- package/lib/resources/klarna_payments.cjs.map +1 -0
- package/lib/resources/klarna_payments.d.cts +4 -0
- package/lib/resources/klarna_payments.d.ts +4 -0
- package/lib/resources/klarna_payments.js +47 -0
- package/lib/resources/klarna_payments.js.map +1 -0
- package/lib/resources/line_item_options.cjs +58 -0
- package/lib/resources/line_item_options.cjs.map +1 -0
- package/lib/resources/line_item_options.d.cts +4 -0
- package/lib/resources/line_item_options.d.ts +4 -0
- package/lib/resources/line_item_options.js +54 -0
- package/lib/resources/line_item_options.js.map +1 -0
- package/lib/resources/line_items.cjs +87 -0
- package/lib/resources/line_items.cjs.map +1 -0
- package/lib/resources/line_items.d.cts +4 -0
- package/lib/resources/line_items.d.ts +4 -0
- package/lib/resources/line_items.js +83 -0
- package/lib/resources/line_items.js.map +1 -0
- package/lib/resources/links.cjs +46 -0
- package/lib/resources/links.cjs.map +1 -0
- package/lib/resources/links.d.cts +4 -0
- package/lib/resources/links.d.ts +4 -0
- package/lib/resources/links.js +42 -0
- package/lib/resources/links.js.map +1 -0
- package/lib/resources/manual_gateways.cjs +44 -0
- package/lib/resources/manual_gateways.cjs.map +1 -0
- package/lib/resources/manual_gateways.d.cts +4 -0
- package/lib/resources/manual_gateways.d.ts +4 -0
- package/lib/resources/manual_gateways.js +40 -0
- package/lib/resources/manual_gateways.js.map +1 -0
- package/lib/resources/manual_tax_calculators.cjs +56 -0
- package/lib/resources/manual_tax_calculators.cjs.map +1 -0
- package/lib/resources/manual_tax_calculators.d.cts +4 -0
- package/lib/resources/manual_tax_calculators.d.ts +4 -0
- package/lib/resources/manual_tax_calculators.js +52 -0
- package/lib/resources/manual_tax_calculators.js.map +1 -0
- package/lib/resources/markets.cjs +98 -0
- package/lib/resources/markets.cjs.map +1 -0
- package/lib/resources/markets.d.cts +4 -0
- package/lib/resources/markets.d.ts +4 -0
- package/lib/resources/markets.js +94 -0
- package/lib/resources/markets.js.map +1 -0
- package/lib/resources/merchants.cjs +48 -0
- package/lib/resources/merchants.cjs.map +1 -0
- package/lib/resources/merchants.d.cts +4 -0
- package/lib/resources/merchants.d.ts +4 -0
- package/lib/resources/merchants.js +44 -0
- package/lib/resources/merchants.js.map +1 -0
- package/lib/resources/notifications.cjs +36 -0
- package/lib/resources/notifications.cjs.map +1 -0
- package/lib/resources/notifications.d.cts +4 -0
- package/lib/resources/notifications.d.ts +4 -0
- package/lib/resources/notifications.js +32 -0
- package/lib/resources/notifications.js.map +1 -0
- package/lib/resources/order_amount_promotion_rules.cjs +40 -0
- package/lib/resources/order_amount_promotion_rules.cjs.map +1 -0
- package/lib/resources/order_amount_promotion_rules.d.cts +4 -0
- package/lib/resources/order_amount_promotion_rules.d.ts +4 -0
- package/lib/resources/order_amount_promotion_rules.js +36 -0
- package/lib/resources/order_amount_promotion_rules.js.map +1 -0
- package/lib/resources/order_copies.cjs +52 -0
- package/lib/resources/order_copies.cjs.map +1 -0
- package/lib/resources/order_copies.d.cts +4 -0
- package/lib/resources/order_copies.d.ts +4 -0
- package/lib/resources/order_copies.js +48 -0
- package/lib/resources/order_copies.js.map +1 -0
- package/lib/resources/order_factories.cjs +39 -0
- package/lib/resources/order_factories.cjs.map +1 -0
- package/lib/resources/order_factories.d.cts +4 -0
- package/lib/resources/order_factories.d.ts +4 -0
- package/lib/resources/order_factories.js +35 -0
- package/lib/resources/order_factories.js.map +1 -0
- package/lib/resources/order_subscription_items.cjs +44 -0
- package/lib/resources/order_subscription_items.cjs.map +1 -0
- package/lib/resources/order_subscription_items.d.cts +4 -0
- package/lib/resources/order_subscription_items.d.ts +4 -0
- package/lib/resources/order_subscription_items.js +40 -0
- package/lib/resources/order_subscription_items.js.map +1 -0
- package/lib/resources/order_subscriptions.cjs +102 -0
- package/lib/resources/order_subscriptions.cjs.map +1 -0
- package/lib/resources/order_subscriptions.d.cts +4 -0
- package/lib/resources/order_subscriptions.d.ts +4 -0
- package/lib/resources/order_subscriptions.js +98 -0
- package/lib/resources/order_subscriptions.js.map +1 -0
- package/lib/resources/orders.cjs +279 -0
- package/lib/resources/orders.cjs.map +1 -0
- package/lib/resources/orders.d.cts +4 -0
- package/lib/resources/orders.d.ts +4 -0
- package/lib/resources/orders.js +275 -0
- package/lib/resources/orders.js.map +1 -0
- package/lib/resources/organizations.cjs +30 -0
- package/lib/resources/organizations.cjs.map +1 -0
- package/lib/resources/organizations.d.cts +4 -0
- package/lib/resources/organizations.d.ts +4 -0
- package/lib/resources/organizations.js +26 -0
- package/lib/resources/organizations.js.map +1 -0
- package/lib/resources/packages.cjs +52 -0
- package/lib/resources/packages.cjs.map +1 -0
- package/lib/resources/packages.d.cts +4 -0
- package/lib/resources/packages.d.ts +4 -0
- package/lib/resources/packages.js +48 -0
- package/lib/resources/packages.js.map +1 -0
- package/lib/resources/parcel_line_items.cjs +48 -0
- package/lib/resources/parcel_line_items.cjs.map +1 -0
- package/lib/resources/parcel_line_items.d.cts +4 -0
- package/lib/resources/parcel_line_items.d.ts +4 -0
- package/lib/resources/parcel_line_items.js +44 -0
- package/lib/resources/parcel_line_items.js.map +1 -0
- package/lib/resources/parcels.cjs +60 -0
- package/lib/resources/parcels.cjs.map +1 -0
- package/lib/resources/parcels.d.cts +4 -0
- package/lib/resources/parcels.d.ts +4 -0
- package/lib/resources/parcels.js +56 -0
- package/lib/resources/parcels.js.map +1 -0
- package/lib/resources/payment_gateways.cjs +35 -0
- package/lib/resources/payment_gateways.cjs.map +1 -0
- package/lib/resources/payment_gateways.d.cts +4 -0
- package/lib/resources/payment_gateways.d.ts +4 -0
- package/lib/resources/payment_gateways.js +31 -0
- package/lib/resources/payment_gateways.js.map +1 -0
- package/lib/resources/payment_methods.cjs +66 -0
- package/lib/resources/payment_methods.cjs.map +1 -0
- package/lib/resources/payment_methods.d.cts +4 -0
- package/lib/resources/payment_methods.d.ts +4 -0
- package/lib/resources/payment_methods.js +62 -0
- package/lib/resources/payment_methods.js.map +1 -0
- package/lib/resources/payment_options.cjs +44 -0
- package/lib/resources/payment_options.cjs.map +1 -0
- package/lib/resources/payment_options.d.cts +4 -0
- package/lib/resources/payment_options.d.ts +4 -0
- package/lib/resources/payment_options.js +40 -0
- package/lib/resources/payment_options.js.map +1 -0
- package/lib/resources/paypal_gateways.cjs +48 -0
- package/lib/resources/paypal_gateways.cjs.map +1 -0
- package/lib/resources/paypal_gateways.d.cts +4 -0
- package/lib/resources/paypal_gateways.d.ts +4 -0
- package/lib/resources/paypal_gateways.js +44 -0
- package/lib/resources/paypal_gateways.js.map +1 -0
- package/lib/resources/paypal_payments.cjs +48 -0
- package/lib/resources/paypal_payments.cjs.map +1 -0
- package/lib/resources/paypal_payments.d.cts +4 -0
- package/lib/resources/paypal_payments.d.ts +4 -0
- package/lib/resources/paypal_payments.js +44 -0
- package/lib/resources/paypal_payments.js.map +1 -0
- package/lib/resources/percentage_discount_promotions.cjs +96 -0
- package/lib/resources/percentage_discount_promotions.cjs.map +1 -0
- package/lib/resources/percentage_discount_promotions.d.cts +4 -0
- package/lib/resources/percentage_discount_promotions.d.ts +4 -0
- package/lib/resources/percentage_discount_promotions.js +92 -0
- package/lib/resources/percentage_discount_promotions.js.map +1 -0
- package/lib/resources/pickups.cjs +39 -0
- package/lib/resources/pickups.cjs.map +1 -0
- package/lib/resources/pickups.d.cts +4 -0
- package/lib/resources/pickups.d.ts +4 -0
- package/lib/resources/pickups.js +35 -0
- package/lib/resources/pickups.js.map +1 -0
- package/lib/resources/price_frequency_tiers.cjs +52 -0
- package/lib/resources/price_frequency_tiers.cjs.map +1 -0
- package/lib/resources/price_frequency_tiers.d.cts +4 -0
- package/lib/resources/price_frequency_tiers.d.ts +4 -0
- package/lib/resources/price_frequency_tiers.js +48 -0
- package/lib/resources/price_frequency_tiers.js.map +1 -0
- package/lib/resources/price_list_schedulers.cjs +58 -0
- package/lib/resources/price_list_schedulers.cjs.map +1 -0
- package/lib/resources/price_list_schedulers.d.cts +4 -0
- package/lib/resources/price_list_schedulers.d.ts +4 -0
- package/lib/resources/price_list_schedulers.js +54 -0
- package/lib/resources/price_list_schedulers.js.map +1 -0
- package/lib/resources/price_lists.cjs +52 -0
- package/lib/resources/price_lists.cjs.map +1 -0
- package/lib/resources/price_lists.d.cts +4 -0
- package/lib/resources/price_lists.d.ts +4 -0
- package/lib/resources/price_lists.js +48 -0
- package/lib/resources/price_lists.js.map +1 -0
- package/lib/resources/price_tiers.cjs +39 -0
- package/lib/resources/price_tiers.cjs.map +1 -0
- package/lib/resources/price_tiers.d.cts +4 -0
- package/lib/resources/price_tiers.d.ts +4 -0
- package/lib/resources/price_tiers.js +35 -0
- package/lib/resources/price_tiers.js.map +1 -0
- package/lib/resources/price_volume_tiers.cjs +52 -0
- package/lib/resources/price_volume_tiers.cjs.map +1 -0
- package/lib/resources/price_volume_tiers.d.cts +4 -0
- package/lib/resources/price_volume_tiers.d.ts +4 -0
- package/lib/resources/price_volume_tiers.js +48 -0
- package/lib/resources/price_volume_tiers.js.map +1 -0
- package/lib/resources/prices.cjs +76 -0
- package/lib/resources/prices.cjs.map +1 -0
- package/lib/resources/prices.d.cts +4 -0
- package/lib/resources/prices.d.ts +4 -0
- package/lib/resources/prices.js +72 -0
- package/lib/resources/prices.js.map +1 -0
- package/lib/resources/promotion_rules.cjs +31 -0
- package/lib/resources/promotion_rules.cjs.map +1 -0
- package/lib/resources/promotion_rules.d.cts +4 -0
- package/lib/resources/promotion_rules.d.ts +4 -0
- package/lib/resources/promotion_rules.js +27 -0
- package/lib/resources/promotion_rules.js.map +1 -0
- package/lib/resources/promotions.cjs +71 -0
- package/lib/resources/promotions.cjs.map +1 -0
- package/lib/resources/promotions.d.cts +4 -0
- package/lib/resources/promotions.d.ts +4 -0
- package/lib/resources/promotions.js +67 -0
- package/lib/resources/promotions.js.map +1 -0
- package/lib/resources/recurring_order_copies.cjs +52 -0
- package/lib/resources/recurring_order_copies.cjs.map +1 -0
- package/lib/resources/recurring_order_copies.d.cts +4 -0
- package/lib/resources/recurring_order_copies.d.ts +4 -0
- package/lib/resources/recurring_order_copies.js +48 -0
- package/lib/resources/recurring_order_copies.js.map +1 -0
- package/lib/resources/refunds.cjs +57 -0
- package/lib/resources/refunds.cjs.map +1 -0
- package/lib/resources/refunds.d.cts +4 -0
- package/lib/resources/refunds.d.ts +4 -0
- package/lib/resources/refunds.js +53 -0
- package/lib/resources/refunds.js.map +1 -0
- package/lib/resources/reserved_stocks.cjs +43 -0
- package/lib/resources/reserved_stocks.cjs.map +1 -0
- package/lib/resources/reserved_stocks.d.cts +4 -0
- package/lib/resources/reserved_stocks.d.ts +4 -0
- package/lib/resources/reserved_stocks.js +39 -0
- package/lib/resources/reserved_stocks.js.map +1 -0
- package/lib/resources/resource_errors.cjs +27 -0
- package/lib/resources/resource_errors.cjs.map +1 -0
- package/lib/resources/resource_errors.d.cts +4 -0
- package/lib/resources/resource_errors.d.ts +4 -0
- package/lib/resources/resource_errors.js +23 -0
- package/lib/resources/resource_errors.js.map +1 -0
- package/lib/resources/return_line_items.cjs +47 -0
- package/lib/resources/return_line_items.cjs.map +1 -0
- package/lib/resources/return_line_items.d.cts +4 -0
- package/lib/resources/return_line_items.d.ts +4 -0
- package/lib/resources/return_line_items.js +43 -0
- package/lib/resources/return_line_items.js.map +1 -0
- package/lib/resources/returns.cjs +127 -0
- package/lib/resources/returns.cjs.map +1 -0
- package/lib/resources/returns.d.cts +4 -0
- package/lib/resources/returns.d.ts +4 -0
- package/lib/resources/returns.js +123 -0
- package/lib/resources/returns.js.map +1 -0
- package/lib/resources/satispay_gateways.cjs +48 -0
- package/lib/resources/satispay_gateways.cjs.map +1 -0
- package/lib/resources/satispay_gateways.d.cts +4 -0
- package/lib/resources/satispay_gateways.d.ts +4 -0
- package/lib/resources/satispay_gateways.js +44 -0
- package/lib/resources/satispay_gateways.js.map +1 -0
- package/lib/resources/satispay_payments.cjs +51 -0
- package/lib/resources/satispay_payments.cjs.map +1 -0
- package/lib/resources/satispay_payments.d.cts +4 -0
- package/lib/resources/satispay_payments.d.ts +4 -0
- package/lib/resources/satispay_payments.js +47 -0
- package/lib/resources/satispay_payments.js.map +1 -0
- package/lib/resources/shipments.cjs +157 -0
- package/lib/resources/shipments.cjs.map +1 -0
- package/lib/resources/shipments.d.cts +4 -0
- package/lib/resources/shipments.d.ts +4 -0
- package/lib/resources/shipments.js +153 -0
- package/lib/resources/shipments.js.map +1 -0
- package/lib/resources/shipping_categories.cjs +48 -0
- package/lib/resources/shipping_categories.cjs.map +1 -0
- package/lib/resources/shipping_categories.d.cts +4 -0
- package/lib/resources/shipping_categories.d.ts +4 -0
- package/lib/resources/shipping_categories.js +44 -0
- package/lib/resources/shipping_categories.js.map +1 -0
- package/lib/resources/shipping_method_tiers.cjs +39 -0
- package/lib/resources/shipping_method_tiers.cjs.map +1 -0
- package/lib/resources/shipping_method_tiers.d.cts +4 -0
- package/lib/resources/shipping_method_tiers.d.ts +4 -0
- package/lib/resources/shipping_method_tiers.js +35 -0
- package/lib/resources/shipping_method_tiers.js.map +1 -0
- package/lib/resources/shipping_methods.cjs +85 -0
- package/lib/resources/shipping_methods.cjs.map +1 -0
- package/lib/resources/shipping_methods.d.cts +4 -0
- package/lib/resources/shipping_methods.d.ts +4 -0
- package/lib/resources/shipping_methods.js +81 -0
- package/lib/resources/shipping_methods.js.map +1 -0
- package/lib/resources/shipping_weight_tiers.cjs +48 -0
- package/lib/resources/shipping_weight_tiers.cjs.map +1 -0
- package/lib/resources/shipping_weight_tiers.d.cts +4 -0
- package/lib/resources/shipping_weight_tiers.d.ts +4 -0
- package/lib/resources/shipping_weight_tiers.js +44 -0
- package/lib/resources/shipping_weight_tiers.js.map +1 -0
- package/lib/resources/shipping_zones.cjs +44 -0
- package/lib/resources/shipping_zones.cjs.map +1 -0
- package/lib/resources/shipping_zones.d.cts +4 -0
- package/lib/resources/shipping_zones.d.ts +4 -0
- package/lib/resources/shipping_zones.js +40 -0
- package/lib/resources/shipping_zones.js.map +1 -0
- package/lib/resources/sku_list_items.cjs +48 -0
- package/lib/resources/sku_list_items.cjs.map +1 -0
- package/lib/resources/sku_list_items.d.cts +4 -0
- package/lib/resources/sku_list_items.d.ts +4 -0
- package/lib/resources/sku_list_items.js +44 -0
- package/lib/resources/sku_list_items.js.map +1 -0
- package/lib/resources/sku_list_promotion_rules.cjs +48 -0
- package/lib/resources/sku_list_promotion_rules.cjs.map +1 -0
- package/lib/resources/sku_list_promotion_rules.d.cts +4 -0
- package/lib/resources/sku_list_promotion_rules.d.ts +4 -0
- package/lib/resources/sku_list_promotion_rules.js +44 -0
- package/lib/resources/sku_list_promotion_rules.js.map +1 -0
- package/lib/resources/sku_lists.cjs +64 -0
- package/lib/resources/sku_lists.cjs.map +1 -0
- package/lib/resources/sku_lists.d.cts +4 -0
- package/lib/resources/sku_lists.d.ts +4 -0
- package/lib/resources/sku_lists.js +60 -0
- package/lib/resources/sku_lists.js.map +1 -0
- package/lib/resources/sku_options.cjs +62 -0
- package/lib/resources/sku_options.cjs.map +1 -0
- package/lib/resources/sku_options.d.cts +4 -0
- package/lib/resources/sku_options.d.ts +4 -0
- package/lib/resources/sku_options.js +58 -0
- package/lib/resources/sku_options.js.map +1 -0
- package/lib/resources/skus.cjs +106 -0
- package/lib/resources/skus.cjs.map +1 -0
- package/lib/resources/skus.d.cts +4 -0
- package/lib/resources/skus.d.ts +4 -0
- package/lib/resources/skus.js +102 -0
- package/lib/resources/skus.js.map +1 -0
- package/lib/resources/stock_items.cjs +63 -0
- package/lib/resources/stock_items.cjs.map +1 -0
- package/lib/resources/stock_items.d.cts +4 -0
- package/lib/resources/stock_items.d.ts +4 -0
- package/lib/resources/stock_items.js +59 -0
- package/lib/resources/stock_items.js.map +1 -0
- package/lib/resources/stock_line_items.cjs +69 -0
- package/lib/resources/stock_line_items.cjs.map +1 -0
- package/lib/resources/stock_line_items.d.cts +4 -0
- package/lib/resources/stock_line_items.d.ts +4 -0
- package/lib/resources/stock_line_items.js +65 -0
- package/lib/resources/stock_line_items.js.map +1 -0
- package/lib/resources/stock_locations.cjs +68 -0
- package/lib/resources/stock_locations.cjs.map +1 -0
- package/lib/resources/stock_locations.d.cts +4 -0
- package/lib/resources/stock_locations.d.ts +4 -0
- package/lib/resources/stock_locations.js +64 -0
- package/lib/resources/stock_locations.js.map +1 -0
- package/lib/resources/stock_reservations.cjs +67 -0
- package/lib/resources/stock_reservations.cjs.map +1 -0
- package/lib/resources/stock_reservations.d.cts +4 -0
- package/lib/resources/stock_reservations.d.ts +4 -0
- package/lib/resources/stock_reservations.js +63 -0
- package/lib/resources/stock_reservations.js.map +1 -0
- package/lib/resources/stock_transfers.cjs +90 -0
- package/lib/resources/stock_transfers.cjs.map +1 -0
- package/lib/resources/stock_transfers.d.cts +4 -0
- package/lib/resources/stock_transfers.d.ts +4 -0
- package/lib/resources/stock_transfers.js +86 -0
- package/lib/resources/stock_transfers.js.map +1 -0
- package/lib/resources/stores.cjs +64 -0
- package/lib/resources/stores.cjs.map +1 -0
- package/lib/resources/stores.d.cts +4 -0
- package/lib/resources/stores.d.ts +4 -0
- package/lib/resources/stores.js +60 -0
- package/lib/resources/stores.js.map +1 -0
- package/lib/resources/stripe_gateways.cjs +48 -0
- package/lib/resources/stripe_gateways.cjs.map +1 -0
- package/lib/resources/stripe_gateways.d.cts +4 -0
- package/lib/resources/stripe_gateways.d.ts +4 -0
- package/lib/resources/stripe_gateways.js +44 -0
- package/lib/resources/stripe_gateways.js.map +1 -0
- package/lib/resources/stripe_payments.cjs +54 -0
- package/lib/resources/stripe_payments.cjs.map +1 -0
- package/lib/resources/stripe_payments.d.cts +4 -0
- package/lib/resources/stripe_payments.d.ts +4 -0
- package/lib/resources/stripe_payments.js +50 -0
- package/lib/resources/stripe_payments.js.map +1 -0
- package/lib/resources/stripe_tax_accounts.cjs +56 -0
- package/lib/resources/stripe_tax_accounts.cjs.map +1 -0
- package/lib/resources/stripe_tax_accounts.d.cts +4 -0
- package/lib/resources/stripe_tax_accounts.d.ts +4 -0
- package/lib/resources/stripe_tax_accounts.js +52 -0
- package/lib/resources/stripe_tax_accounts.js.map +1 -0
- package/lib/resources/subscription_models.cjs +48 -0
- package/lib/resources/subscription_models.cjs.map +1 -0
- package/lib/resources/subscription_models.d.cts +4 -0
- package/lib/resources/subscription_models.d.ts +4 -0
- package/lib/resources/subscription_models.js +44 -0
- package/lib/resources/subscription_models.js.map +1 -0
- package/lib/resources/tags.cjs +36 -0
- package/lib/resources/tags.cjs.map +1 -0
- package/lib/resources/tags.d.cts +4 -0
- package/lib/resources/tags.d.ts +4 -0
- package/lib/resources/tags.js +32 -0
- package/lib/resources/tags.js.map +1 -0
- package/lib/resources/talon_one_accounts.cjs +52 -0
- package/lib/resources/talon_one_accounts.cjs.map +1 -0
- package/lib/resources/talon_one_accounts.d.cts +4 -0
- package/lib/resources/talon_one_accounts.d.ts +4 -0
- package/lib/resources/talon_one_accounts.js +48 -0
- package/lib/resources/talon_one_accounts.js.map +1 -0
- package/lib/resources/tax_calculators.cjs +43 -0
- package/lib/resources/tax_calculators.cjs.map +1 -0
- package/lib/resources/tax_calculators.d.cts +4 -0
- package/lib/resources/tax_calculators.d.ts +4 -0
- package/lib/resources/tax_calculators.js +39 -0
- package/lib/resources/tax_calculators.js.map +1 -0
- package/lib/resources/tax_categories.cjs +48 -0
- package/lib/resources/tax_categories.cjs.map +1 -0
- package/lib/resources/tax_categories.d.cts +4 -0
- package/lib/resources/tax_categories.d.ts +4 -0
- package/lib/resources/tax_categories.js +44 -0
- package/lib/resources/tax_categories.js.map +1 -0
- package/lib/resources/tax_rules.cjs +44 -0
- package/lib/resources/tax_rules.cjs.map +1 -0
- package/lib/resources/tax_rules.d.cts +4 -0
- package/lib/resources/tax_rules.d.ts +4 -0
- package/lib/resources/tax_rules.js +40 -0
- package/lib/resources/tax_rules.js.map +1 -0
- package/lib/resources/taxjar_accounts.cjs +56 -0
- package/lib/resources/taxjar_accounts.cjs.map +1 -0
- package/lib/resources/taxjar_accounts.d.cts +4 -0
- package/lib/resources/taxjar_accounts.d.ts +4 -0
- package/lib/resources/taxjar_accounts.js +52 -0
- package/lib/resources/taxjar_accounts.js.map +1 -0
- package/lib/resources/transactions.cjs +43 -0
- package/lib/resources/transactions.cjs.map +1 -0
- package/lib/resources/transactions.d.cts +4 -0
- package/lib/resources/transactions.d.ts +4 -0
- package/lib/resources/transactions.js +39 -0
- package/lib/resources/transactions.js.map +1 -0
- package/lib/resources/versions.cjs +27 -0
- package/lib/resources/versions.cjs.map +1 -0
- package/lib/resources/versions.d.cts +4 -0
- package/lib/resources/versions.d.ts +4 -0
- package/lib/resources/versions.js +23 -0
- package/lib/resources/versions.js.map +1 -0
- package/lib/resources/vertex_accounts.cjs +55 -0
- package/lib/resources/vertex_accounts.cjs.map +1 -0
- package/lib/resources/vertex_accounts.d.cts +4 -0
- package/lib/resources/vertex_accounts.d.ts +4 -0
- package/lib/resources/vertex_accounts.js +51 -0
- package/lib/resources/vertex_accounts.js.map +1 -0
- package/lib/resources/voids.cjs +53 -0
- package/lib/resources/voids.cjs.map +1 -0
- package/lib/resources/voids.d.cts +4 -0
- package/lib/resources/voids.d.ts +4 -0
- package/lib/resources/voids.js +49 -0
- package/lib/resources/voids.js.map +1 -0
- package/lib/resources/webhooks.cjs +53 -0
- package/lib/resources/webhooks.cjs.map +1 -0
- package/lib/resources/webhooks.d.cts +4 -0
- package/lib/resources/webhooks.d.ts +4 -0
- package/lib/resources/webhooks.js +49 -0
- package/lib/resources/webhooks.js.map +1 -0
- package/lib/resources/wire_transfers.cjs +44 -0
- package/lib/resources/wire_transfers.cjs.map +1 -0
- package/lib/resources/wire_transfers.d.cts +4 -0
- package/lib/resources/wire_transfers.d.ts +4 -0
- package/lib/resources/wire_transfers.js +40 -0
- package/lib/resources/wire_transfers.js.map +1 -0
- package/lib/static.cjs +49 -0
- package/lib/static.cjs.map +1 -0
- package/lib/static.d.cts +22 -0
- package/lib/static.d.ts +22 -0
- package/lib/static.js +47 -0
- package/lib/static.js.map +1 -0
- package/lib/types.cjs +4 -0
- package/lib/types.cjs.map +1 -0
- package/lib/types.d.cts +7 -0
- package/lib/types.d.ts +7 -0
- package/lib/types.js +3 -0
- package/lib/types.js.map +1 -0
- package/lib/util.cjs +39 -0
- package/lib/util.cjs.map +1 -0
- package/lib/util.d.cts +13 -0
- package/lib/util.d.ts +13 -0
- package/lib/util.js +34 -0
- package/lib/util.js.map +1 -0
- package/package.json +8 -10
@@ -0,0 +1,54 @@
|
|
1
|
+
import { ApiResource } from '../resource';
|
2
|
+
|
3
|
+
class Addresses extends ApiResource {
|
4
|
+
static TYPE = "addresses";
|
5
|
+
async create(resource, params, options) {
|
6
|
+
return this.resources.create({ ...resource, type: Addresses.TYPE }, params, options);
|
7
|
+
}
|
8
|
+
async update(resource, params, options) {
|
9
|
+
return this.resources.update({ ...resource, type: Addresses.TYPE }, params, options);
|
10
|
+
}
|
11
|
+
async delete(id, options) {
|
12
|
+
await this.resources.delete(typeof id === "string" ? { id, type: Addresses.TYPE } : id, options);
|
13
|
+
}
|
14
|
+
async geocoder(addressId, params, options) {
|
15
|
+
const _addressId = addressId.id || addressId;
|
16
|
+
return this.resources.fetch({ type: "geocoders" }, `addresses/${_addressId}/geocoder`, params, options);
|
17
|
+
}
|
18
|
+
async events(addressId, params, options) {
|
19
|
+
const _addressId = addressId.id || addressId;
|
20
|
+
return this.resources.fetch({ type: "events" }, `addresses/${_addressId}/events`, params, options);
|
21
|
+
}
|
22
|
+
async tags(addressId, params, options) {
|
23
|
+
const _addressId = addressId.id || addressId;
|
24
|
+
return this.resources.fetch({ type: "tags" }, `addresses/${_addressId}/tags`, params, options);
|
25
|
+
}
|
26
|
+
async versions(addressId, params, options) {
|
27
|
+
const _addressId = addressId.id || addressId;
|
28
|
+
return this.resources.fetch({ type: "versions" }, `addresses/${_addressId}/versions`, params, options);
|
29
|
+
}
|
30
|
+
async _add_tags(id, triggerValue, params, options) {
|
31
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: Addresses.TYPE, _add_tags: triggerValue }, params, options);
|
32
|
+
}
|
33
|
+
async _remove_tags(id, triggerValue, params, options) {
|
34
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: Addresses.TYPE, _remove_tags: triggerValue }, params, options);
|
35
|
+
}
|
36
|
+
isAddress(resource) {
|
37
|
+
return resource.type && resource.type === Addresses.TYPE;
|
38
|
+
}
|
39
|
+
relationship(id) {
|
40
|
+
return super.relationshipOneToOne(id);
|
41
|
+
}
|
42
|
+
relationshipToMany(...ids) {
|
43
|
+
return super.relationshipOneToMany(...ids);
|
44
|
+
}
|
45
|
+
type() {
|
46
|
+
return Addresses.TYPE;
|
47
|
+
}
|
48
|
+
}
|
49
|
+
const instance = new Addresses();
|
50
|
+
var addresses_default = instance;
|
51
|
+
|
52
|
+
export { addresses_default as default };
|
53
|
+
//# sourceMappingURL=addresses.js.map
|
54
|
+
//# sourceMappingURL=addresses.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../src/resources/addresses.ts"],"names":[],"mappings":";;AAgVA,MAAM,kBAAkB,WAAqB,CAAA;AAAA,EAE5C,OAAgB,IAAoB,GAAA,WAAA;AAAA,EAEpC,MAAM,MAAA,CAAO,QAAyB,EAAA,MAAA,EAAuC,OAA6C,EAAA;AACzH,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA+B,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,SAAU,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC5G,EAEA,MAAM,MAAA,CAAO,QAAyB,EAAA,MAAA,EAAuC,OAA6C,EAAA;AACzH,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA+B,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,SAAU,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO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ourcesContent":["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 { Geocoder, GeocoderType } from './geocoders'\nimport type { Event } from './events'\nimport type { Tag, TagType } from './tags'\nimport type { Version } from './versions'\n\n\ntype AddressType = 'addresses'\ntype AddressRel = ResourceRel & { type: AddressType }\ntype GeocoderRel = ResourceRel & { type: GeocoderType }\ntype TagRel = ResourceRel & { type: TagType }\n\n\nexport type AddressSort = Pick<Address, 'id' | 'city' | 'state_code' | 'country_code'> & ResourceSort\n// export type AddressFilter = Pick<Address, 'id' | 'business' | 'first_name' | 'last_name' | 'company' | 'line_1' | 'line_2' | 'city' | 'zip_code' | 'state_code' | 'country_code' | 'phone' | 'email' | 'notes' | 'lat' | 'lng' | 'billing_info'> & ResourceFilter\n\n\ninterface Address extends Resource {\n\t\n\treadonly type: AddressType\n\n\t/** \n\t * Indicates if it's a business or a personal address.\n\t */\n\tbusiness?: boolean | null\n\t/** \n\t * Address first name (personal).\n\t * @example ```\"John\"```\n\t */\n\tfirst_name?: string | null\n\t/** \n\t * Address last name (personal).\n\t * @example ```\"Smith\"```\n\t */\n\tlast_name?: string | null\n\t/** \n\t * Address company name (business).\n\t * @example ```\"The Red Brand Inc.\"```\n\t */\n\tcompany?: string | null\n\t/** \n\t * Company name (business) of first name and last name (personal).\n\t * @example ```\"John Smith\"```\n\t */\n\tfull_name?: string | null\n\t/** \n\t * Address line 1, i.e. Street address, PO Box.\n\t * @example ```\"2883 Geraldine Lane\"```\n\t */\n\tline_1: string\n\t/** \n\t * Address line 2, i.e. Apartment, Suite, Building.\n\t * @example ```\"Apt.23\"```\n\t */\n\tline_2?: string | null\n\t/** \n\t * Address city.\n\t * @example ```\"New York\"```\n\t */\n\tcity: string\n\t/** \n\t * ZIP or postal code.\n\t * @example ```\"10013\"```\n\t */\n\tzip_code?: string | null\n\t/** \n\t * State, province or region code.\n\t * @example ```\"NY\"```\n\t */\n\tstate_code: string\n\t/** \n\t * The international 2-letter country code as defined by the ISO 3166-1 standard.\n\t * @example ```\"US\"```\n\t */\n\tcountry_code: string\n\t/** \n\t * Phone number (including extension).\n\t * @example ```\"(212) 646-338-1228\"```\n\t */\n\tphone: string\n\t/** \n\t * Compact description of the address location, without the full name.\n\t * @example ```\"2883 Geraldine Lane Apt.23, 10013 New York NY (US) (212) 646-338-1228\"```\n\t */\n\tfull_address?: string | null\n\t/** \n\t * Compact description of the address location, including the full name.\n\t * @example ```\"John Smith, 2883 Geraldine Lane Apt.23, 10013 New York NY (US) (212) 646-338-1228\"```\n\t */\n\tname?: string | null\n\t/** \n\t * Email address.\n\t * @example ```\"john@example.com\"```\n\t */\n\temail?: string | null\n\t/** \n\t * A free notes attached to the address. When used as a shipping address, this can be useful to let the customers add specific delivery instructions.\n\t * @example ```\"Please ring the bell twice\"```\n\t */\n\tnotes?: string | null\n\t/** \n\t * The address geocoded latitude. This is automatically generated when creating a shipping/billing address for an order and a valid geocoder is attached to the order's market.\n\t * @example ```40.6971494```\n\t */\n\tlat?: number | null\n\t/** \n\t * The address geocoded longitude. This is automatically generated when creating a shipping/billing address for an order and a valid geocoder is attached to the order's market.\n\t * @example ```-74.2598672```\n\t */\n\tlng?: number | null\n\t/** \n\t * Indicates if the latitude and logitude are present, either geocoded or manually updated.\n\t * @example ```true```\n\t */\n\tis_localized?: boolean | null\n\t/** \n\t * Indicates if the address has been successfully geocoded.\n\t * @example ```true```\n\t */\n\tis_geocoded?: boolean | null\n\t/** \n\t * The geocoder provider name (either Google or Bing).\n\t * @example ```\"google\"```\n\t */\n\tprovider_name?: string | null\n\t/** \n\t * The map url of the geocoded address (if geocoded).\n\t * @example ```\"https://www.google.com/maps/search/?api=1&query=40.6971494,-74.2598672\"```\n\t */\n\tmap_url?: string | null\n\t/** \n\t * The static map image url of the geocoded address (if geocoded).\n\t * @example ```\"https://maps.googleapis.com/maps/api/staticmap?center=40.6971494,-74.2598672&size=640x320&zoom=15\"```\n\t */\n\tstatic_map_url?: string | null\n\t/** \n\t * Customer's billing information (i.e. VAT number, codice fiscale).\n\t * @example ```\"VAT ID IT02382940977\"```\n\t */\n\tbilling_info?: string | null\n\n\tgeocoder?: Geocoder | null\n\tevents?: Event[] | null\n\ttags?: Tag[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface AddressCreate extends ResourceCreate {\n\t\n\t/** \n\t * Indicates if it's a business or a personal address.\n\t */\n\tbusiness?: boolean | null\n\t/** \n\t * Address first name (personal).\n\t * @example ```\"John\"```\n\t */\n\tfirst_name?: string | null\n\t/** \n\t * Address last name (personal).\n\t * @example ```\"Smith\"```\n\t */\n\tlast_name?: string | null\n\t/** \n\t * Address company name (business).\n\t * @example ```\"The Red Brand Inc.\"```\n\t */\n\tcompany?: string | null\n\t/** \n\t * Address line 1, i.e. Street address, PO Box.\n\t * @example ```\"2883 Geraldine Lane\"```\n\t */\n\tline_1: string\n\t/** \n\t * Address line 2, i.e. Apartment, Suite, Building.\n\t * @example ```\"Apt.23\"```\n\t */\n\tline_2?: string | null\n\t/** \n\t * Address city.\n\t * @example ```\"New York\"```\n\t */\n\tcity: string\n\t/** \n\t * ZIP or postal code.\n\t * @example ```\"10013\"```\n\t */\n\tzip_code?: string | null\n\t/** \n\t * State, province or region code.\n\t * @example ```\"NY\"```\n\t */\n\tstate_code: string\n\t/** \n\t * The international 2-letter country code as defined by the ISO 3166-1 standard.\n\t * @example ```\"US\"```\n\t */\n\tcountry_code: string\n\t/** \n\t * Phone number (including extension).\n\t * @example ```\"(212) 646-338-1228\"```\n\t */\n\tphone: string\n\t/** \n\t * Email address.\n\t * @example ```\"john@example.com\"```\n\t */\n\temail?: string | null\n\t/** \n\t * A free notes attached to the address. When used as a shipping address, this can be useful to let the customers add specific delivery instructions.\n\t * @example ```\"Please ring the bell twice\"```\n\t */\n\tnotes?: string | null\n\t/** \n\t * The address geocoded latitude. This is automatically generated when creating a shipping/billing address for an order and a valid geocoder is attached to the order's market.\n\t * @example ```40.6971494```\n\t */\n\tlat?: number | null\n\t/** \n\t * The address geocoded longitude. This is automatically generated when creating a shipping/billing address for an order and a valid geocoder is attached to the order's market.\n\t * @example ```-74.2598672```\n\t */\n\tlng?: number | null\n\t/** \n\t * Customer's billing information (i.e. VAT number, codice fiscale).\n\t * @example ```\"VAT ID IT02382940977\"```\n\t */\n\tbilling_info?: string | null\n\n\tgeocoder?: GeocoderRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\ninterface AddressUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * Indicates if it's a business or a personal address.\n\t */\n\tbusiness?: boolean | null\n\t/** \n\t * Address first name (personal).\n\t * @example ```\"John\"```\n\t */\n\tfirst_name?: string | null\n\t/** \n\t * Address last name (personal).\n\t * @example ```\"Smith\"```\n\t */\n\tlast_name?: string | null\n\t/** \n\t * Address company name (business).\n\t * @example ```\"The Red Brand Inc.\"```\n\t */\n\tcompany?: string | null\n\t/** \n\t * Address line 1, i.e. Street address, PO Box.\n\t * @example ```\"2883 Geraldine Lane\"```\n\t */\n\tline_1?: string | null\n\t/** \n\t * Address line 2, i.e. Apartment, Suite, Building.\n\t * @example ```\"Apt.23\"```\n\t */\n\tline_2?: string | null\n\t/** \n\t * Address city.\n\t * @example ```\"New York\"```\n\t */\n\tcity?: string | null\n\t/** \n\t * ZIP or postal code.\n\t * @example ```\"10013\"```\n\t */\n\tzip_code?: string | null\n\t/** \n\t * State, province or region code.\n\t * @example ```\"NY\"```\n\t */\n\tstate_code?: string | null\n\t/** \n\t * The international 2-letter country code as defined by the ISO 3166-1 standard.\n\t * @example ```\"US\"```\n\t */\n\tcountry_code?: string | null\n\t/** \n\t * Phone number (including extension).\n\t * @example ```\"(212) 646-338-1228\"```\n\t */\n\tphone?: string | null\n\t/** \n\t * Email address.\n\t * @example ```\"john@example.com\"```\n\t */\n\temail?: string | null\n\t/** \n\t * A free notes attached to the address. When used as a shipping address, this can be useful to let the customers add specific delivery instructions.\n\t * @example ```\"Please ring the bell twice\"```\n\t */\n\tnotes?: string | null\n\t/** \n\t * The address geocoded latitude. This is automatically generated when creating a shipping/billing address for an order and a valid geocoder is attached to the order's market.\n\t * @example ```40.6971494```\n\t */\n\tlat?: number | null\n\t/** \n\t * The address geocoded longitude. This is automatically generated when creating a shipping/billing address for an order and a valid geocoder is attached to the order's market.\n\t * @example ```-74.2598672```\n\t */\n\tlng?: number | null\n\t/** \n\t * Customer's billing information (i.e. VAT number, codice fiscale).\n\t * @example ```\"VAT ID IT02382940977\"```\n\t */\n\tbilling_info?: string | null\n\t/** \n\t * Comma separated list of tags to be added. Duplicates, invalid and non existing ones are discarded. Cannot be passed by sales channels.\n\t */\n\t_add_tags?: string | null\n\t/** \n\t * Comma separated list of tags to be removed. Duplicates, invalid and non existing ones are discarded. Cannot be passed by sales channels.\n\t */\n\t_remove_tags?: string | null\n\n\tgeocoder?: GeocoderRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\nclass Addresses extends ApiResource<Address> {\n\n\tstatic readonly TYPE: AddressType = 'addresses' as const\n\n\tasync create(resource: AddressCreate, params?: QueryParamsRetrieve<Address>, options?: ResourcesConfig): Promise<Address> {\n\t\treturn this.resources.create<AddressCreate, Address>({ ...resource, type: Addresses.TYPE }, params, options)\n\t}\n\n\tasync update(resource: AddressUpdate, params?: QueryParamsRetrieve<Address>, options?: ResourcesConfig): Promise<Address> {\n\t\treturn this.resources.update<AddressUpdate, Address>({ ...resource, type: Addresses.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: Addresses.TYPE } : id, options)\n\t}\n\n\tasync geocoder(addressId: string | Address, params?: QueryParamsRetrieve<Geocoder>, options?: ResourcesConfig): Promise<Geocoder> {\n\t\tconst _addressId = (addressId as Address).id || addressId as string\n\t\treturn this.resources.fetch<Geocoder>({ type: 'geocoders' }, `addresses/${_addressId}/geocoder`, params, options) as unknown as Geocoder\n\t}\n\n\tasync events(addressId: string | Address, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _addressId = (addressId as Address).id || addressId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `addresses/${_addressId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync tags(addressId: string | Address, params?: QueryParamsList<Tag>, options?: ResourcesConfig): Promise<ListResponse<Tag>> {\n\t\tconst _addressId = (addressId as Address).id || addressId as string\n\t\treturn this.resources.fetch<Tag>({ type: 'tags' }, `addresses/${_addressId}/tags`, params, options) as unknown as ListResponse<Tag>\n\t}\n\n\tasync versions(addressId: string | Address, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _addressId = (addressId as Address).id || addressId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `addresses/${_addressId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _add_tags(id: string | Address, triggerValue: string, params?: QueryParamsRetrieve<Address>, options?: ResourcesConfig): Promise<Address> {\n\t\treturn this.resources.update<AddressUpdate, Address>({ id: (typeof id === 'string')? id: id.id, type: Addresses.TYPE, _add_tags: triggerValue }, params, options)\n\t}\n\n\tasync _remove_tags(id: string | Address, triggerValue: string, params?: QueryParamsRetrieve<Address>, options?: ResourcesConfig): Promise<Address> {\n\t\treturn this.resources.update<AddressUpdate, Address>({ id: (typeof id === 'string')? id: id.id, type: Addresses.TYPE, _remove_tags: triggerValue }, params, options)\n\t}\n\n\n\tisAddress(resource: any): resource is Address {\n\t\treturn resource.type && (resource.type === Addresses.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): AddressRel {\n\t\treturn super.relationshipOneToOne<AddressRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): AddressRel[] {\n\t\treturn super.relationshipOneToMany<AddressRel>(...ids)\n\t}\n\n\n\ttype(): AddressType {\n\t\treturn Addresses.TYPE\n\t}\n\n}\n\n\nconst instance = new Addresses()\nexport default instance\n\nexport type { Address, AddressCreate, AddressUpdate, AddressType }\n"]}
|
@@ -0,0 +1,40 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
var resource = require('../resource');
|
4
|
+
|
5
|
+
class Adjustments extends resource.ApiResource {
|
6
|
+
static TYPE = "adjustments";
|
7
|
+
async create(resource, params, options) {
|
8
|
+
return this.resources.create({ ...resource, type: Adjustments.TYPE }, params, options);
|
9
|
+
}
|
10
|
+
async update(resource, params, options) {
|
11
|
+
return this.resources.update({ ...resource, type: Adjustments.TYPE }, params, options);
|
12
|
+
}
|
13
|
+
async delete(id, options) {
|
14
|
+
await this.resources.delete(typeof id === "string" ? { id, type: Adjustments.TYPE } : id, options);
|
15
|
+
}
|
16
|
+
async versions(adjustmentId, params, options) {
|
17
|
+
const _adjustmentId = adjustmentId.id || adjustmentId;
|
18
|
+
return this.resources.fetch({ type: "versions" }, `adjustments/${_adjustmentId}/versions`, params, options);
|
19
|
+
}
|
20
|
+
isAdjustment(resource) {
|
21
|
+
return resource.type && resource.type === Adjustments.TYPE;
|
22
|
+
}
|
23
|
+
relationship(id) {
|
24
|
+
return super.relationshipOneToOne(id);
|
25
|
+
}
|
26
|
+
relationshipToMany(...ids) {
|
27
|
+
return super.relationshipOneToMany(...ids);
|
28
|
+
}
|
29
|
+
type() {
|
30
|
+
return Adjustments.TYPE;
|
31
|
+
}
|
32
|
+
}
|
33
|
+
const instance = new Adjustments();
|
34
|
+
var adjustments_default = instance;
|
35
|
+
|
36
|
+
module.exports = adjustments_default;
|
37
|
+
//# sourceMappingURL=adjustments.cjs.map
|
38
|
+
|
39
|
+
module.exports = exports.default;
|
40
|
+
//# sourceMappingURL=adjustments.cjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../src/resources/adjustments.ts"],"names":["ApiResource"],"mappings":";;;;AA2GA,MAAM,oBAAoBA,oBA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A;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":"adjustments.cjs","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Version } from './versions'\n\n\ntype AdjustmentType = 'adjustments'\ntype AdjustmentRel = ResourceRel & { type: AdjustmentType }\n\n\nexport type AdjustmentSort = Pick<Adjustment, 'id' | 'name' | 'currency_code' | 'amount_cents'> & ResourceSort\n// export type AdjustmentFilter = Pick<Adjustment, 'id' | 'name' | 'currency_code' | 'amount_cents'> & ResourceFilter\n\n\ninterface Adjustment extends Resource {\n\t\n\treadonly type: AdjustmentType\n\n\t/** \n\t * The adjustment name.\n\t * @example ```\"Additional service\"```\n\t */\n\tname: string\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code: string\n\t/** \n\t * The adjustment amount, in cents.\n\t * @example ```1500```\n\t */\n\tamount_cents: number\n\t/** \n\t * The adjustment amount, float.\n\t * @example ```15```\n\t */\n\tamount_float: number\n\t/** \n\t * The adjustment amount, formatted.\n\t * @example ```\"€15,00\"```\n\t */\n\tformatted_amount: string\n\t/** \n\t * Indicates if negative adjustment amount is distributed for tax calculation.\n\t * @example ```true```\n\t */\n\tdistribute_discount?: boolean | null\n\n\tversions?: Version[] | null\n\n}\n\n\ninterface AdjustmentCreate extends ResourceCreate {\n\t\n\t/** \n\t * The adjustment name.\n\t * @example ```\"Additional service\"```\n\t */\n\tname: string\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code: string\n\t/** \n\t * The adjustment amount, in cents.\n\t * @example ```1500```\n\t */\n\tamount_cents: number\n\t/** \n\t * Indicates if negative adjustment amount is distributed for tax calculation.\n\t * @example ```true```\n\t */\n\tdistribute_discount?: boolean | null\n\t\n}\n\n\ninterface AdjustmentUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The adjustment name.\n\t * @example ```\"Additional service\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * The adjustment amount, in cents.\n\t * @example ```1500```\n\t */\n\tamount_cents?: number | null\n\t/** \n\t * Indicates if negative adjustment amount is distributed for tax calculation.\n\t * @example ```true```\n\t */\n\tdistribute_discount?: boolean | null\n\t\n}\n\n\nclass Adjustments extends ApiResource<Adjustment> {\n\n\tstatic readonly TYPE: AdjustmentType = 'adjustments' as const\n\n\tasync create(resource: AdjustmentCreate, params?: QueryParamsRetrieve<Adjustment>, options?: ResourcesConfig): Promise<Adjustment> {\n\t\treturn this.resources.create<AdjustmentCreate, Adjustment>({ ...resource, type: Adjustments.TYPE }, params, options)\n\t}\n\n\tasync update(resource: AdjustmentUpdate, params?: QueryParamsRetrieve<Adjustment>, options?: ResourcesConfig): Promise<Adjustment> {\n\t\treturn this.resources.update<AdjustmentUpdate, Adjustment>({ ...resource, type: Adjustments.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: Adjustments.TYPE } : id, options)\n\t}\n\n\tasync versions(adjustmentId: string | Adjustment, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _adjustmentId = (adjustmentId as Adjustment).id || adjustmentId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `adjustments/${_adjustmentId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisAdjustment(resource: any): resource is Adjustment {\n\t\treturn resource.type && (resource.type === Adjustments.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): AdjustmentRel {\n\t\treturn super.relationshipOneToOne<AdjustmentRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): AdjustmentRel[] {\n\t\treturn super.relationshipOneToMany<AdjustmentRel>(...ids)\n\t}\n\n\n\ttype(): AdjustmentType {\n\t\treturn Adjustments.TYPE\n\t}\n\n}\n\n\nconst instance = new Adjustments()\nexport default instance\n\nexport type { Adjustment, AdjustmentCreate, AdjustmentUpdate, AdjustmentType }\n"]}
|
@@ -0,0 +1,36 @@
|
|
1
|
+
import { ApiResource } from '../resource';
|
2
|
+
|
3
|
+
class Adjustments extends ApiResource {
|
4
|
+
static TYPE = "adjustments";
|
5
|
+
async create(resource, params, options) {
|
6
|
+
return this.resources.create({ ...resource, type: Adjustments.TYPE }, params, options);
|
7
|
+
}
|
8
|
+
async update(resource, params, options) {
|
9
|
+
return this.resources.update({ ...resource, type: Adjustments.TYPE }, params, options);
|
10
|
+
}
|
11
|
+
async delete(id, options) {
|
12
|
+
await this.resources.delete(typeof id === "string" ? { id, type: Adjustments.TYPE } : id, options);
|
13
|
+
}
|
14
|
+
async versions(adjustmentId, params, options) {
|
15
|
+
const _adjustmentId = adjustmentId.id || adjustmentId;
|
16
|
+
return this.resources.fetch({ type: "versions" }, `adjustments/${_adjustmentId}/versions`, params, options);
|
17
|
+
}
|
18
|
+
isAdjustment(resource) {
|
19
|
+
return resource.type && resource.type === Adjustments.TYPE;
|
20
|
+
}
|
21
|
+
relationship(id) {
|
22
|
+
return super.relationshipOneToOne(id);
|
23
|
+
}
|
24
|
+
relationshipToMany(...ids) {
|
25
|
+
return super.relationshipOneToMany(...ids);
|
26
|
+
}
|
27
|
+
type() {
|
28
|
+
return Adjustments.TYPE;
|
29
|
+
}
|
30
|
+
}
|
31
|
+
const instance = new Adjustments();
|
32
|
+
var adjustments_default = instance;
|
33
|
+
|
34
|
+
export { adjustments_default as default };
|
35
|
+
//# sourceMappingURL=adjustments.js.map
|
36
|
+
//# sourceMappingURL=adjustments.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../src/resources/adjustments.ts"],"names":[],"mappings":";;AA2GA,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,EAEA,MAAM,QAAA,CAAS,YAAmC,EAAA,MAAA,EAAmC,OAA2D,EAAA;AAC/I,IAAM,MAAA,aAAA,GAAiB,aAA4B,EAAM,IAAA,YAAA;AACzD,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAe,EAAE,IAAA,EAAM,UAAW,EAAA,EAAG,CAAe,YAAA,EAAA,aAAa,CAAa,SAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACpH,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":"adjustments.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 { Version } from './versions'\n\n\ntype AdjustmentType = 'adjustments'\ntype AdjustmentRel = ResourceRel & { type: AdjustmentType }\n\n\nexport type AdjustmentSort = Pick<Adjustment, 'id' | 'name' | 'currency_code' | 'amount_cents'> & ResourceSort\n// export type AdjustmentFilter = Pick<Adjustment, 'id' | 'name' | 'currency_code' | 'amount_cents'> & ResourceFilter\n\n\ninterface Adjustment extends Resource {\n\t\n\treadonly type: AdjustmentType\n\n\t/** \n\t * The adjustment name.\n\t * @example ```\"Additional service\"```\n\t */\n\tname: string\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code: string\n\t/** \n\t * The adjustment amount, in cents.\n\t * @example ```1500```\n\t */\n\tamount_cents: number\n\t/** \n\t * The adjustment amount, float.\n\t * @example ```15```\n\t */\n\tamount_float: number\n\t/** \n\t * The adjustment amount, formatted.\n\t * @example ```\"€15,00\"```\n\t */\n\tformatted_amount: string\n\t/** \n\t * Indicates if negative adjustment amount is distributed for tax calculation.\n\t * @example ```true```\n\t */\n\tdistribute_discount?: boolean | null\n\n\tversions?: Version[] | null\n\n}\n\n\ninterface AdjustmentCreate extends ResourceCreate {\n\t\n\t/** \n\t * The adjustment name.\n\t * @example ```\"Additional service\"```\n\t */\n\tname: string\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code: string\n\t/** \n\t * The adjustment amount, in cents.\n\t * @example ```1500```\n\t */\n\tamount_cents: number\n\t/** \n\t * Indicates if negative adjustment amount is distributed for tax calculation.\n\t * @example ```true```\n\t */\n\tdistribute_discount?: boolean | null\n\t\n}\n\n\ninterface AdjustmentUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The adjustment name.\n\t * @example ```\"Additional service\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * The adjustment amount, in cents.\n\t * @example ```1500```\n\t */\n\tamount_cents?: number | null\n\t/** \n\t * Indicates if negative adjustment amount is distributed for tax calculation.\n\t * @example ```true```\n\t */\n\tdistribute_discount?: boolean | null\n\t\n}\n\n\nclass Adjustments extends ApiResource<Adjustment> {\n\n\tstatic readonly TYPE: AdjustmentType = 'adjustments' as const\n\n\tasync create(resource: AdjustmentCreate, params?: QueryParamsRetrieve<Adjustment>, options?: ResourcesConfig): Promise<Adjustment> {\n\t\treturn this.resources.create<AdjustmentCreate, Adjustment>({ ...resource, type: Adjustments.TYPE }, params, options)\n\t}\n\n\tasync update(resource: AdjustmentUpdate, params?: QueryParamsRetrieve<Adjustment>, options?: ResourcesConfig): Promise<Adjustment> {\n\t\treturn this.resources.update<AdjustmentUpdate, Adjustment>({ ...resource, type: Adjustments.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: Adjustments.TYPE } : id, options)\n\t}\n\n\tasync versions(adjustmentId: string | Adjustment, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _adjustmentId = (adjustmentId as Adjustment).id || adjustmentId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `adjustments/${_adjustmentId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisAdjustment(resource: any): resource is Adjustment {\n\t\treturn resource.type && (resource.type === Adjustments.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): AdjustmentRel {\n\t\treturn super.relationshipOneToOne<AdjustmentRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): AdjustmentRel[] {\n\t\treturn super.relationshipOneToMany<AdjustmentRel>(...ids)\n\t}\n\n\n\ttype(): AdjustmentType {\n\t\treturn Adjustments.TYPE\n\t}\n\n}\n\n\nconst instance = new Adjustments()\nexport default instance\n\nexport type { Adjustment, AdjustmentCreate, AdjustmentUpdate, AdjustmentType }\n"]}
|
@@ -0,0 +1,48 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
var resource = require('../resource');
|
4
|
+
|
5
|
+
class AdyenGateways extends resource.ApiResource {
|
6
|
+
static TYPE = "adyen_gateways";
|
7
|
+
async create(resource, params, options) {
|
8
|
+
return this.resources.create({ ...resource, type: AdyenGateways.TYPE }, params, options);
|
9
|
+
}
|
10
|
+
async update(resource, params, options) {
|
11
|
+
return this.resources.update({ ...resource, type: AdyenGateways.TYPE }, params, options);
|
12
|
+
}
|
13
|
+
async delete(id, options) {
|
14
|
+
await this.resources.delete(typeof id === "string" ? { id, type: AdyenGateways.TYPE } : id, options);
|
15
|
+
}
|
16
|
+
async payment_methods(adyenGatewayId, params, options) {
|
17
|
+
const _adyenGatewayId = adyenGatewayId.id || adyenGatewayId;
|
18
|
+
return this.resources.fetch({ type: "payment_methods" }, `adyen_gateways/${_adyenGatewayId}/payment_methods`, params, options);
|
19
|
+
}
|
20
|
+
async versions(adyenGatewayId, params, options) {
|
21
|
+
const _adyenGatewayId = adyenGatewayId.id || adyenGatewayId;
|
22
|
+
return this.resources.fetch({ type: "versions" }, `adyen_gateways/${_adyenGatewayId}/versions`, params, options);
|
23
|
+
}
|
24
|
+
async adyen_payments(adyenGatewayId, params, options) {
|
25
|
+
const _adyenGatewayId = adyenGatewayId.id || adyenGatewayId;
|
26
|
+
return this.resources.fetch({ type: "adyen_payments" }, `adyen_gateways/${_adyenGatewayId}/adyen_payments`, params, options);
|
27
|
+
}
|
28
|
+
isAdyenGateway(resource) {
|
29
|
+
return resource.type && resource.type === AdyenGateways.TYPE;
|
30
|
+
}
|
31
|
+
relationship(id) {
|
32
|
+
return super.relationshipOneToOne(id);
|
33
|
+
}
|
34
|
+
relationshipToMany(...ids) {
|
35
|
+
return super.relationshipOneToMany(...ids);
|
36
|
+
}
|
37
|
+
type() {
|
38
|
+
return AdyenGateways.TYPE;
|
39
|
+
}
|
40
|
+
}
|
41
|
+
const instance = new AdyenGateways();
|
42
|
+
var adyen_gateways_default = instance;
|
43
|
+
|
44
|
+
module.exports = adyen_gateways_default;
|
45
|
+
//# sourceMappingURL=adyen_gateways.cjs.map
|
46
|
+
|
47
|
+
module.exports = exports.default;
|
48
|
+
//# sourceMappingURL=adyen_gateways.cjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../src/resources/adyen_gateways.ts"],"names":["ApiResource"],"mappings":";;;;AAuLA,MAAM,sBAAsBA,oBAA0B,CAAA;AAAA,EAErD,OAAgB,IAAyB,GAAA,gBAAA;AAAA,EAEzC,MAAM,MAAA,CAAO,QAA8B,EAAA,MAAA,EAA4C,OAAkD,EAAA;AACxI,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAyC,EAAE,GAAG,QAAU,E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,GAAmB,eAAgC,EAAM,IAAA,cAAA;AAC/D,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAoB,EAAE,IAAA,EAAM,gBAAiB,EAAA,EAAG,CAAkB,eAAA,EAAA,eAAe,CAAmB,eAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC1I,EAGA,eAAe,QAAyC,EAAA;AACvD,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,aAAc,CAAA,IAAA;AAAA;AAC1D,EAGA,aAAa,EAAiD,EAAA;AAC7D,IAAO,OAAA,KAAA,CAAM,qBAAsC,EAAE,CAAA;AAAA;AACtD,EAEA,sBAAsB,GAAkC,EAAA;AACvD,IAAO,OAAA,KAAA,CAAM,qBAAuC,CAAA,GAAG,GAAG,CAAA;AAAA;AAC3D,EAGA,IAAyB,GAAA;AACxB,IAAA,OAAO,aAAc,CAAA,IAAA;AAAA;AAGvB;AAGA,MAAM,QAAA,GAAW,IAAI,aAAc,EAAA;AACnC,IAAO,sBAAQ,GAAA","file":"adyen_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 { AdyenPayment, AdyenPaymentType } from './adyen_payments'\n\n\ntype AdyenGatewayType = 'adyen_gateways'\ntype AdyenGatewayRel = ResourceRel & { type: AdyenGatewayType }\ntype AdyenPaymentRel = ResourceRel & { type: AdyenPaymentType }\n\n\nexport type AdyenGatewaySort = Pick<AdyenGateway, 'id' | 'name'> & ResourceSort\n// export type AdyenGatewayFilter = Pick<AdyenGateway, 'id' | 'name'> & ResourceFilter\n\n\ninterface AdyenGateway extends Resource {\n\t\n\treadonly type: AdyenGatewayType\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 prefix of the endpoint used for live transactions.\n\t * @example ```\"1797a841fbb37ca7-AdyenDemo\"```\n\t */\n\tlive_url_prefix: string\n\t/** \n\t * The checkout API version, supported range is from 66 to 71, default is 71.\n\t * @example ```71```\n\t */\n\tapi_version?: number | null\n\t/** \n\t * Indicates if the gateway will leverage on the Adyen notification webhooks, using latest API version.\n\t * @example ```true```\n\t */\n\tasync_api?: boolean | null\n\t/** \n\t * Send this attribute if you want to enable partial payments for the order.\n\t */\n\tpartial_payments?: boolean | null\n\t/** \n\t * Indicates if the gateway will use the native customer payment sources.\n\t * @example ```true```\n\t */\n\tnative_customer_payment_sources?: boolean | null\n\t/** \n\t * The gateway webhook endpoint secret, generated by Adyen customer area.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\twebhook_endpoint_secret?: string | null\n\t/** \n\t * The gateway webhook URL, generated automatically.\n\t * @example ```\"https://core.commercelayer.co/webhook_callbacks/adyen_gateways/xxxxx\"```\n\t */\n\twebhook_endpoint_url?: string | null\n\n\tpayment_methods?: PaymentMethod[] | null\n\tversions?: Version[] | null\n\tadyen_payments?: AdyenPayment[] | null\n\n}\n\n\ninterface AdyenGatewayCreate extends ResourceCreate {\n\t\n\t/** \n\t * The payment gateway's internal name.\n\t * @example ```\"US payment gateway\"```\n\t */\n\tname: string\n\t/** \n\t * The gateway merchant account.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tmerchant_account: string\n\t/** \n\t * The gateway API key.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tapi_key: string\n\t/** \n\t * The public key linked to your API credential.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tpublic_key?: string | null\n\t/** \n\t * The prefix of the endpoint used for live transactions.\n\t * @example ```\"1797a841fbb37ca7-AdyenDemo\"```\n\t */\n\tlive_url_prefix: string\n\t/** \n\t * The checkout API version, supported range is from 66 to 71, default is 71.\n\t * @example ```71```\n\t */\n\tapi_version?: number | null\n\t/** \n\t * Indicates if the gateway will leverage on the Adyen notification webhooks, using latest API version.\n\t * @example ```true```\n\t */\n\tasync_api?: boolean | null\n\t/** \n\t * Send this attribute if you want to enable partial payments for the order.\n\t */\n\tpartial_payments?: boolean | null\n\t/** \n\t * Indicates if the gateway will use the native customer payment sources.\n\t * @example ```true```\n\t */\n\tnative_customer_payment_sources?: boolean | null\n\t/** \n\t * The gateway webhook endpoint secret, generated by Adyen customer area.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\twebhook_endpoint_secret?: string | null\n\n\tadyen_payments?: AdyenPaymentRel[] | null\n\n}\n\n\ninterface AdyenGatewayUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The payment gateway's internal name.\n\t * @example ```\"US payment gateway\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The gateway merchant account.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tmerchant_account?: string | null\n\t/** \n\t * The gateway API key.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tapi_key?: string | null\n\t/** \n\t * The public key linked to your API credential.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tpublic_key?: string | null\n\t/** \n\t * The prefix of the endpoint used for live transactions.\n\t * @example ```\"1797a841fbb37ca7-AdyenDemo\"```\n\t */\n\tlive_url_prefix?: string | null\n\t/** \n\t * The checkout API version, supported range is from 66 to 71, default is 71.\n\t * @example ```71```\n\t */\n\tapi_version?: number | null\n\t/** \n\t * Indicates if the gateway will leverage on the Adyen notification webhooks, using latest API version.\n\t * @example ```true```\n\t */\n\tasync_api?: boolean | null\n\t/** \n\t * Send this attribute if you want to enable partial payments for the order.\n\t */\n\tpartial_payments?: boolean | null\n\t/** \n\t * Indicates if the gateway will use the native customer payment sources.\n\t * @example ```true```\n\t */\n\tnative_customer_payment_sources?: boolean | null\n\t/** \n\t * The gateway webhook endpoint secret, generated by Adyen customer area.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\twebhook_endpoint_secret?: string | null\n\n\tadyen_payments?: AdyenPaymentRel[] | null\n\n}\n\n\nclass AdyenGateways extends ApiResource<AdyenGateway> {\n\n\tstatic readonly TYPE: AdyenGatewayType = 'adyen_gateways' as const\n\n\tasync create(resource: AdyenGatewayCreate, params?: QueryParamsRetrieve<AdyenGateway>, options?: ResourcesConfig): Promise<AdyenGateway> {\n\t\treturn this.resources.create<AdyenGatewayCreate, AdyenGateway>({ ...resource, type: AdyenGateways.TYPE }, params, options)\n\t}\n\n\tasync update(resource: AdyenGatewayUpdate, params?: QueryParamsRetrieve<AdyenGateway>, options?: ResourcesConfig): Promise<AdyenGateway> {\n\t\treturn this.resources.update<AdyenGatewayUpdate, AdyenGateway>({ ...resource, type: AdyenGateways.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: AdyenGateways.TYPE } : id, options)\n\t}\n\n\tasync payment_methods(adyenGatewayId: string | AdyenGateway, params?: QueryParamsList<PaymentMethod>, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>> {\n\t\tconst _adyenGatewayId = (adyenGatewayId as AdyenGateway).id || adyenGatewayId as string\n\t\treturn this.resources.fetch<PaymentMethod>({ type: 'payment_methods' }, `adyen_gateways/${_adyenGatewayId}/payment_methods`, params, options) as unknown as ListResponse<PaymentMethod>\n\t}\n\n\tasync versions(adyenGatewayId: string | AdyenGateway, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _adyenGatewayId = (adyenGatewayId as AdyenGateway).id || adyenGatewayId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `adyen_gateways/${_adyenGatewayId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync adyen_payments(adyenGatewayId: string | AdyenGateway, params?: QueryParamsList<AdyenPayment>, options?: ResourcesConfig): Promise<ListResponse<AdyenPayment>> {\n\t\tconst _adyenGatewayId = (adyenGatewayId as AdyenGateway).id || adyenGatewayId as string\n\t\treturn this.resources.fetch<AdyenPayment>({ type: 'adyen_payments' }, `adyen_gateways/${_adyenGatewayId}/adyen_payments`, params, options) as unknown as ListResponse<AdyenPayment>\n\t}\n\n\n\tisAdyenGateway(resource: any): resource is AdyenGateway {\n\t\treturn resource.type && (resource.type === AdyenGateways.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): AdyenGatewayRel {\n\t\treturn super.relationshipOneToOne<AdyenGatewayRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): AdyenGatewayRel[] {\n\t\treturn super.relationshipOneToMany<AdyenGatewayRel>(...ids)\n\t}\n\n\n\ttype(): AdyenGatewayType {\n\t\treturn AdyenGateways.TYPE\n\t}\n\n}\n\n\nconst instance = new AdyenGateways()\nexport default instance\n\nexport type { AdyenGateway, AdyenGatewayCreate, AdyenGatewayUpdate, AdyenGatewayType }\n"]}
|
@@ -0,0 +1,44 @@
|
|
1
|
+
import { ApiResource } from '../resource';
|
2
|
+
|
3
|
+
class AdyenGateways extends ApiResource {
|
4
|
+
static TYPE = "adyen_gateways";
|
5
|
+
async create(resource, params, options) {
|
6
|
+
return this.resources.create({ ...resource, type: AdyenGateways.TYPE }, params, options);
|
7
|
+
}
|
8
|
+
async update(resource, params, options) {
|
9
|
+
return this.resources.update({ ...resource, type: AdyenGateways.TYPE }, params, options);
|
10
|
+
}
|
11
|
+
async delete(id, options) {
|
12
|
+
await this.resources.delete(typeof id === "string" ? { id, type: AdyenGateways.TYPE } : id, options);
|
13
|
+
}
|
14
|
+
async payment_methods(adyenGatewayId, params, options) {
|
15
|
+
const _adyenGatewayId = adyenGatewayId.id || adyenGatewayId;
|
16
|
+
return this.resources.fetch({ type: "payment_methods" }, `adyen_gateways/${_adyenGatewayId}/payment_methods`, params, options);
|
17
|
+
}
|
18
|
+
async versions(adyenGatewayId, params, options) {
|
19
|
+
const _adyenGatewayId = adyenGatewayId.id || adyenGatewayId;
|
20
|
+
return this.resources.fetch({ type: "versions" }, `adyen_gateways/${_adyenGatewayId}/versions`, params, options);
|
21
|
+
}
|
22
|
+
async adyen_payments(adyenGatewayId, params, options) {
|
23
|
+
const _adyenGatewayId = adyenGatewayId.id || adyenGatewayId;
|
24
|
+
return this.resources.fetch({ type: "adyen_payments" }, `adyen_gateways/${_adyenGatewayId}/adyen_payments`, params, options);
|
25
|
+
}
|
26
|
+
isAdyenGateway(resource) {
|
27
|
+
return resource.type && resource.type === AdyenGateways.TYPE;
|
28
|
+
}
|
29
|
+
relationship(id) {
|
30
|
+
return super.relationshipOneToOne(id);
|
31
|
+
}
|
32
|
+
relationshipToMany(...ids) {
|
33
|
+
return super.relationshipOneToMany(...ids);
|
34
|
+
}
|
35
|
+
type() {
|
36
|
+
return AdyenGateways.TYPE;
|
37
|
+
}
|
38
|
+
}
|
39
|
+
const instance = new AdyenGateways();
|
40
|
+
var adyen_gateways_default = instance;
|
41
|
+
|
42
|
+
export { adyen_gateways_default as default };
|
43
|
+
//# sourceMappingURL=adyen_gateways.js.map
|
44
|
+
//# sourceMappingURL=adyen_gateways.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../src/resources/adyen_gateways.ts"],"names":[],"mappings":";;AAuLA,MAAM,sBAAsB,WAA0B,CAAA;AAAA,EAErD,OAAgB,IAAyB,GAAA,gBAAA;AAAA,EAEzC,MAAM,MAAA,CAAO,QAA8B,EAAA,MAAA,EAA4C,OAAkD,EAAA;AACxI,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAyC,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,aAAc,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC1H,EAEA,MAAM,MAAA,CAAO,QAA8B,EAAA,MAAA,EAA4C,OAAkD,EAAA;AACxI,IAAO,OAAA,IAAA,CA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A,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC1I,EAGA,eAAe,QAAyC,EAAA;AACvD,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,aAAc,CAAA,IAAA;AAAA;AAC1D,EAGA,aAAa,EAAiD,EAAA;AAC7D,IAAO,OAAA,KAAA,CAAM,qBAAsC,EAAE,CAAA;AAAA;AACtD,EAEA,sBAAsB,GAAkC,EAAA;AACvD,IAAO,OAAA,KAAA,CAAM,qBAAuC,CAAA,GAAG,GAAG,CAAA;AAAA;AAC3D,EAGA,IAAyB,GAAA;AACxB,IAAA,OAAO,aAAc,CAAA,IAAA;AAAA;AAGvB;AAGA,MAAM,QAAA,GAAW,IAAI,aAAc,EAAA;AACnC,IAAO,sBAAQ,GAAA","file":"adyen_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 { AdyenPayment, AdyenPaymentType } from './adyen_payments'\n\n\ntype AdyenGatewayType = 'adyen_gateways'\ntype AdyenGatewayRel = ResourceRel & { type: AdyenGatewayType }\ntype AdyenPaymentRel = ResourceRel & { type: AdyenPaymentType }\n\n\nexport type AdyenGatewaySort = Pick<AdyenGateway, 'id' | 'name'> & ResourceSort\n// export type AdyenGatewayFilter = Pick<AdyenGateway, 'id' | 'name'> & ResourceFilter\n\n\ninterface AdyenGateway extends Resource {\n\t\n\treadonly type: AdyenGatewayType\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 prefix of the endpoint used for live transactions.\n\t * @example ```\"1797a841fbb37ca7-AdyenDemo\"```\n\t */\n\tlive_url_prefix: string\n\t/** \n\t * The checkout API version, supported range is from 66 to 71, default is 71.\n\t * @example ```71```\n\t */\n\tapi_version?: number | null\n\t/** \n\t * Indicates if the gateway will leverage on the Adyen notification webhooks, using latest API version.\n\t * @example ```true```\n\t */\n\tasync_api?: boolean | null\n\t/** \n\t * Send this attribute if you want to enable partial payments for the order.\n\t */\n\tpartial_payments?: boolean | null\n\t/** \n\t * Indicates if the gateway will use the native customer payment sources.\n\t * @example ```true```\n\t */\n\tnative_customer_payment_sources?: boolean | null\n\t/** \n\t * The gateway webhook endpoint secret, generated by Adyen customer area.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\twebhook_endpoint_secret?: string | null\n\t/** \n\t * The gateway webhook URL, generated automatically.\n\t * @example ```\"https://core.commercelayer.co/webhook_callbacks/adyen_gateways/xxxxx\"```\n\t */\n\twebhook_endpoint_url?: string | null\n\n\tpayment_methods?: PaymentMethod[] | null\n\tversions?: Version[] | null\n\tadyen_payments?: AdyenPayment[] | null\n\n}\n\n\ninterface AdyenGatewayCreate extends ResourceCreate {\n\t\n\t/** \n\t * The payment gateway's internal name.\n\t * @example ```\"US payment gateway\"```\n\t */\n\tname: string\n\t/** \n\t * The gateway merchant account.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tmerchant_account: string\n\t/** \n\t * The gateway API key.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tapi_key: string\n\t/** \n\t * The public key linked to your API credential.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tpublic_key?: string | null\n\t/** \n\t * The prefix of the endpoint used for live transactions.\n\t * @example ```\"1797a841fbb37ca7-AdyenDemo\"```\n\t */\n\tlive_url_prefix: string\n\t/** \n\t * The checkout API version, supported range is from 66 to 71, default is 71.\n\t * @example ```71```\n\t */\n\tapi_version?: number | null\n\t/** \n\t * Indicates if the gateway will leverage on the Adyen notification webhooks, using latest API version.\n\t * @example ```true```\n\t */\n\tasync_api?: boolean | null\n\t/** \n\t * Send this attribute if you want to enable partial payments for the order.\n\t */\n\tpartial_payments?: boolean | null\n\t/** \n\t * Indicates if the gateway will use the native customer payment sources.\n\t * @example ```true```\n\t */\n\tnative_customer_payment_sources?: boolean | null\n\t/** \n\t * The gateway webhook endpoint secret, generated by Adyen customer area.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\twebhook_endpoint_secret?: string | null\n\n\tadyen_payments?: AdyenPaymentRel[] | null\n\n}\n\n\ninterface AdyenGatewayUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The payment gateway's internal name.\n\t * @example ```\"US payment gateway\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The gateway merchant account.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tmerchant_account?: string | null\n\t/** \n\t * The gateway API key.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tapi_key?: string | null\n\t/** \n\t * The public key linked to your API credential.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tpublic_key?: string | null\n\t/** \n\t * The prefix of the endpoint used for live transactions.\n\t * @example ```\"1797a841fbb37ca7-AdyenDemo\"```\n\t */\n\tlive_url_prefix?: string | null\n\t/** \n\t * The checkout API version, supported range is from 66 to 71, default is 71.\n\t * @example ```71```\n\t */\n\tapi_version?: number | null\n\t/** \n\t * Indicates if the gateway will leverage on the Adyen notification webhooks, using latest API version.\n\t * @example ```true```\n\t */\n\tasync_api?: boolean | null\n\t/** \n\t * Send this attribute if you want to enable partial payments for the order.\n\t */\n\tpartial_payments?: boolean | null\n\t/** \n\t * Indicates if the gateway will use the native customer payment sources.\n\t * @example ```true```\n\t */\n\tnative_customer_payment_sources?: boolean | null\n\t/** \n\t * The gateway webhook endpoint secret, generated by Adyen customer area.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\twebhook_endpoint_secret?: string | null\n\n\tadyen_payments?: AdyenPaymentRel[] | null\n\n}\n\n\nclass AdyenGateways extends ApiResource<AdyenGateway> {\n\n\tstatic readonly TYPE: AdyenGatewayType = 'adyen_gateways' as const\n\n\tasync create(resource: AdyenGatewayCreate, params?: QueryParamsRetrieve<AdyenGateway>, options?: ResourcesConfig): Promise<AdyenGateway> {\n\t\treturn this.resources.create<AdyenGatewayCreate, AdyenGateway>({ ...resource, type: AdyenGateways.TYPE }, params, options)\n\t}\n\n\tasync update(resource: AdyenGatewayUpdate, params?: QueryParamsRetrieve<AdyenGateway>, options?: ResourcesConfig): Promise<AdyenGateway> {\n\t\treturn this.resources.update<AdyenGatewayUpdate, AdyenGateway>({ ...resource, type: AdyenGateways.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: AdyenGateways.TYPE } : id, options)\n\t}\n\n\tasync payment_methods(adyenGatewayId: string | AdyenGateway, params?: QueryParamsList<PaymentMethod>, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>> {\n\t\tconst _adyenGatewayId = (adyenGatewayId as AdyenGateway).id || adyenGatewayId as string\n\t\treturn this.resources.fetch<PaymentMethod>({ type: 'payment_methods' }, `adyen_gateways/${_adyenGatewayId}/payment_methods`, params, options) as unknown as ListResponse<PaymentMethod>\n\t}\n\n\tasync versions(adyenGatewayId: string | AdyenGateway, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _adyenGatewayId = (adyenGatewayId as AdyenGateway).id || adyenGatewayId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `adyen_gateways/${_adyenGatewayId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync adyen_payments(adyenGatewayId: string | AdyenGateway, params?: QueryParamsList<AdyenPayment>, options?: ResourcesConfig): Promise<ListResponse<AdyenPayment>> {\n\t\tconst _adyenGatewayId = (adyenGatewayId as AdyenGateway).id || adyenGatewayId as string\n\t\treturn this.resources.fetch<AdyenPayment>({ type: 'adyen_payments' }, `adyen_gateways/${_adyenGatewayId}/adyen_payments`, params, options) as unknown as ListResponse<AdyenPayment>\n\t}\n\n\n\tisAdyenGateway(resource: any): resource is AdyenGateway {\n\t\treturn resource.type && (resource.type === AdyenGateways.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): AdyenGatewayRel {\n\t\treturn super.relationshipOneToOne<AdyenGatewayRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): AdyenGatewayRel[] {\n\t\treturn super.relationshipOneToMany<AdyenGatewayRel>(...ids)\n\t}\n\n\n\ttype(): AdyenGatewayType {\n\t\treturn AdyenGateways.TYPE\n\t}\n\n}\n\n\nconst instance = new AdyenGateways()\nexport default instance\n\nexport type { AdyenGateway, AdyenGatewayCreate, AdyenGatewayUpdate, AdyenGatewayType }\n"]}
|
@@ -0,0 +1,54 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
var resource = require('../resource');
|
4
|
+
|
5
|
+
class AdyenPayments extends resource.ApiResource {
|
6
|
+
static TYPE = "adyen_payments";
|
7
|
+
async create(resource, params, options) {
|
8
|
+
return this.resources.create({ ...resource, type: AdyenPayments.TYPE }, params, options);
|
9
|
+
}
|
10
|
+
async update(resource, params, options) {
|
11
|
+
return this.resources.update({ ...resource, type: AdyenPayments.TYPE }, params, options);
|
12
|
+
}
|
13
|
+
async delete(id, options) {
|
14
|
+
await this.resources.delete(typeof id === "string" ? { id, type: AdyenPayments.TYPE } : id, options);
|
15
|
+
}
|
16
|
+
async order(adyenPaymentId, params, options) {
|
17
|
+
const _adyenPaymentId = adyenPaymentId.id || adyenPaymentId;
|
18
|
+
return this.resources.fetch({ type: "orders" }, `adyen_payments/${_adyenPaymentId}/order`, params, options);
|
19
|
+
}
|
20
|
+
async payment_gateway(adyenPaymentId, params, options) {
|
21
|
+
const _adyenPaymentId = adyenPaymentId.id || adyenPaymentId;
|
22
|
+
return this.resources.fetch({ type: "payment_gateways" }, `adyen_payments/${_adyenPaymentId}/payment_gateway`, params, options);
|
23
|
+
}
|
24
|
+
async versions(adyenPaymentId, params, options) {
|
25
|
+
const _adyenPaymentId = adyenPaymentId.id || adyenPaymentId;
|
26
|
+
return this.resources.fetch({ type: "versions" }, `adyen_payments/${_adyenPaymentId}/versions`, params, options);
|
27
|
+
}
|
28
|
+
async _authorize(id, params, options) {
|
29
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: AdyenPayments.TYPE, _authorize: true }, params, options);
|
30
|
+
}
|
31
|
+
async _details(id, params, options) {
|
32
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: AdyenPayments.TYPE, _details: true }, params, options);
|
33
|
+
}
|
34
|
+
isAdyenPayment(resource) {
|
35
|
+
return resource.type && resource.type === AdyenPayments.TYPE;
|
36
|
+
}
|
37
|
+
relationship(id) {
|
38
|
+
return super.relationshipOneToOne(id);
|
39
|
+
}
|
40
|
+
relationshipToMany(...ids) {
|
41
|
+
return super.relationshipOneToMany(...ids);
|
42
|
+
}
|
43
|
+
type() {
|
44
|
+
return AdyenPayments.TYPE;
|
45
|
+
}
|
46
|
+
}
|
47
|
+
const instance = new AdyenPayments();
|
48
|
+
var adyen_payments_default = instance;
|
49
|
+
|
50
|
+
module.exports = adyen_payments_default;
|
51
|
+
//# sourceMappingURL=adyen_payments.cjs.map
|
52
|
+
|
53
|
+
module.exports = exports.default;
|
54
|
+
//# sourceMappingURL=adyen_payments.cjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../src/resources/adyen_payments.ts"],"names":["ApiResource"],"mappings":";;;;AAmGA,MAAM,sBAAsBA,oBAA0B,CAAA;AAAA,EAErD,OAAgB,IAAyB,GAAA,gBAAA;AAAA,EAEzC,MAAM,MAAA,CAAO,QAA8B,EAAA,MAAA,EAA4C,OAAkD,EAAA;AACxI,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAyC,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,aAAc,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;A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AA,CAAe,EAAE,IAAA,EAAM,UAAW,EAAA,EAAG,CAAkB,eAAA,EAAA,eAAe,CAAa,SAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACzH,EAEA,MAAM,UAAA,CAAW,EAA2B,EAAA,MAAA,EAA4C,OAAkD,EAAA;AACzI,IAAA,OAAO,KAAK,SAAU,CAAA,MAAA,CAAyC,EAAE,EAAK,EAAA,OAAO,OAAO,QAAW,GAAA,EAAA,GAAI,EAAG,CAAA,EAAA,EAAI,MAAM,aAAc,CAAA,IAAA,EAAM,YAAY,IAAK,EAAA,EAAG,QAAQ,OAAO,CAAA;AAAA;AACxK,EAEA,MAAM,QAAA,CAAS,EAA2B,EAAA,MAAA,EAA4C,OAAkD,EAAA;AACvI,IAAA,OAAO,KAAK,SAAU,CAAA,MAAA,CAAyC,EAAE,EAAK,EAAA,OAAO,OAAO,QAAW,GAAA,EAAA,GAAI,EAAG,CAAA,EAAA,EAAI,MAAM,aAAc,CAAA,IAAA,EAAM,UAAU,IAAK,EAAA,EAAG,QAAQ,OAAO,CAAA;AAAA;AACtK,EAGA,eAAe,QAAyC,EAAA;AACvD,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,aAAc,CAAA,IAAA;AAAA;AAC1D,EAGA,aAAa,EAAiD,EAAA;AAC7D,IAAO,OAAA,KAAA,CAAM,qBAAsC,EAAE,CAAA;AAAA;AACtD,EAEA,sBAAsB,GAAkC,EAAA;AACvD,IAAO,OAAA,KAAA,CAAM,qBAAuC,CAAA,GAAG,GAAG,CAAA;AAAA;AAC3D,EAGA,IAAyB,GAAA;AACxB,IAAA,OAAO,aAAc,CAAA,IAAA;AAAA;AAGvB;AAGA,MAAM,QAAA,GAAW,IAAI,aAAc,EAAA;AACnC,IAAO,sBAAQ,GAAA","file":"adyen_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 AdyenPaymentType = 'adyen_payments'\ntype AdyenPaymentRel = ResourceRel & { type: AdyenPaymentType }\ntype OrderRel = ResourceRel & { type: OrderType }\n\n\nexport type AdyenPaymentSort = Pick<AdyenPayment, 'id'> & ResourceSort\n// export type AdyenPaymentFilter = Pick<AdyenPayment, 'id'> & ResourceFilter\n\n\ninterface AdyenPayment extends Resource {\n\t\n\treadonly type: AdyenPaymentType\n\n\t/** \n\t * The public key linked to your API credential.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tpublic_key?: string | null\n\t/** \n\t * The merchant available payment methods for the assoiated order (i.e. country and amount). Required by the Adyen JS SDK.\n\t * @example ```{\"foo\":\"bar\"}```\n\t */\n\tpayment_methods: Record<string, any>\n\t/** \n\t * The Adyen 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 Adyen additional details request data, collected by client.\n\t * @example ```{\"foo\":\"bar\"}```\n\t */\n\tpayment_request_details?: Record<string, any> | null\n\t/** \n\t * The Adyen payment response, used by client (includes 'resultCode' and 'action').\n\t * @example ```{\"foo\":\"bar\"}```\n\t */\n\tpayment_response?: Record<string, any> | null\n\t/** \n\t * Indicates if the order current amount differs form the one of the associated authorization.\n\t */\n\tmismatched_amounts?: boolean | null\n\t/** \n\t * Information about the payment instrument used in the transaction.\n\t * @example ```{\"issuer\":\"cl bank\",\"card_type\":\"visa\"}```\n\t */\n\tpayment_instrument?: Record<string, any> | null\n\n\torder?: Order | null\n\tpayment_gateway?: PaymentGateway | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface AdyenPaymentCreate extends ResourceCreate {\n\t\n\torder: OrderRel\n\n}\n\n\ninterface AdyenPaymentUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The Adyen 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 Adyen additional details request data, collected by client.\n\t * @example ```{\"foo\":\"bar\"}```\n\t */\n\tpayment_request_details?: Record<string, any> | null\n\t/** \n\t * Send this attribute if you want to authorize the payment.\n\t * @example ```true```\n\t */\n\t_authorize?: boolean | null\n\t/** \n\t * Send this attribute if you want to send additional details the payment request.\n\t * @example ```true```\n\t */\n\t_details?: boolean | null\n\n\torder?: OrderRel | null\n\n}\n\n\nclass AdyenPayments extends ApiResource<AdyenPayment> {\n\n\tstatic readonly TYPE: AdyenPaymentType = 'adyen_payments' as const\n\n\tasync create(resource: AdyenPaymentCreate, params?: QueryParamsRetrieve<AdyenPayment>, options?: ResourcesConfig): Promise<AdyenPayment> {\n\t\treturn this.resources.create<AdyenPaymentCreate, AdyenPayment>({ ...resource, type: AdyenPayments.TYPE }, params, options)\n\t}\n\n\tasync update(resource: AdyenPaymentUpdate, params?: QueryParamsRetrieve<AdyenPayment>, options?: ResourcesConfig): Promise<AdyenPayment> {\n\t\treturn this.resources.update<AdyenPaymentUpdate, AdyenPayment>({ ...resource, type: AdyenPayments.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: AdyenPayments.TYPE } : id, options)\n\t}\n\n\tasync order(adyenPaymentId: string | AdyenPayment, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _adyenPaymentId = (adyenPaymentId as AdyenPayment).id || adyenPaymentId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `adyen_payments/${_adyenPaymentId}/order`, params, options) as unknown as Order\n\t}\n\n\tasync payment_gateway(adyenPaymentId: string | AdyenPayment, params?: QueryParamsRetrieve<PaymentGateway>, options?: ResourcesConfig): Promise<PaymentGateway> {\n\t\tconst _adyenPaymentId = (adyenPaymentId as AdyenPayment).id || adyenPaymentId as string\n\t\treturn this.resources.fetch<PaymentGateway>({ type: 'payment_gateways' }, `adyen_payments/${_adyenPaymentId}/payment_gateway`, params, options) as unknown as PaymentGateway\n\t}\n\n\tasync versions(adyenPaymentId: string | AdyenPayment, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _adyenPaymentId = (adyenPaymentId as AdyenPayment).id || adyenPaymentId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `adyen_payments/${_adyenPaymentId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _authorize(id: string | AdyenPayment, params?: QueryParamsRetrieve<AdyenPayment>, options?: ResourcesConfig): Promise<AdyenPayment> {\n\t\treturn this.resources.update<AdyenPaymentUpdate, AdyenPayment>({ id: (typeof id === 'string')? id: id.id, type: AdyenPayments.TYPE, _authorize: true }, params, options)\n\t}\n\n\tasync _details(id: string | AdyenPayment, params?: QueryParamsRetrieve<AdyenPayment>, options?: ResourcesConfig): Promise<AdyenPayment> {\n\t\treturn this.resources.update<AdyenPaymentUpdate, AdyenPayment>({ id: (typeof id === 'string')? id: id.id, type: AdyenPayments.TYPE, _details: true }, params, options)\n\t}\n\n\n\tisAdyenPayment(resource: any): resource is AdyenPayment {\n\t\treturn resource.type && (resource.type === AdyenPayments.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): AdyenPaymentRel {\n\t\treturn super.relationshipOneToOne<AdyenPaymentRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): AdyenPaymentRel[] {\n\t\treturn super.relationshipOneToMany<AdyenPaymentRel>(...ids)\n\t}\n\n\n\ttype(): AdyenPaymentType {\n\t\treturn AdyenPayments.TYPE\n\t}\n\n}\n\n\nconst instance = new AdyenPayments()\nexport default instance\n\nexport type { AdyenPayment, AdyenPaymentCreate, AdyenPaymentUpdate, AdyenPaymentType }\n"]}
|
@@ -0,0 +1,50 @@
|
|
1
|
+
import { ApiResource } from '../resource';
|
2
|
+
|
3
|
+
class AdyenPayments extends ApiResource {
|
4
|
+
static TYPE = "adyen_payments";
|
5
|
+
async create(resource, params, options) {
|
6
|
+
return this.resources.create({ ...resource, type: AdyenPayments.TYPE }, params, options);
|
7
|
+
}
|
8
|
+
async update(resource, params, options) {
|
9
|
+
return this.resources.update({ ...resource, type: AdyenPayments.TYPE }, params, options);
|
10
|
+
}
|
11
|
+
async delete(id, options) {
|
12
|
+
await this.resources.delete(typeof id === "string" ? { id, type: AdyenPayments.TYPE } : id, options);
|
13
|
+
}
|
14
|
+
async order(adyenPaymentId, params, options) {
|
15
|
+
const _adyenPaymentId = adyenPaymentId.id || adyenPaymentId;
|
16
|
+
return this.resources.fetch({ type: "orders" }, `adyen_payments/${_adyenPaymentId}/order`, params, options);
|
17
|
+
}
|
18
|
+
async payment_gateway(adyenPaymentId, params, options) {
|
19
|
+
const _adyenPaymentId = adyenPaymentId.id || adyenPaymentId;
|
20
|
+
return this.resources.fetch({ type: "payment_gateways" }, `adyen_payments/${_adyenPaymentId}/payment_gateway`, params, options);
|
21
|
+
}
|
22
|
+
async versions(adyenPaymentId, params, options) {
|
23
|
+
const _adyenPaymentId = adyenPaymentId.id || adyenPaymentId;
|
24
|
+
return this.resources.fetch({ type: "versions" }, `adyen_payments/${_adyenPaymentId}/versions`, params, options);
|
25
|
+
}
|
26
|
+
async _authorize(id, params, options) {
|
27
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: AdyenPayments.TYPE, _authorize: true }, params, options);
|
28
|
+
}
|
29
|
+
async _details(id, params, options) {
|
30
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: AdyenPayments.TYPE, _details: true }, params, options);
|
31
|
+
}
|
32
|
+
isAdyenPayment(resource) {
|
33
|
+
return resource.type && resource.type === AdyenPayments.TYPE;
|
34
|
+
}
|
35
|
+
relationship(id) {
|
36
|
+
return super.relationshipOneToOne(id);
|
37
|
+
}
|
38
|
+
relationshipToMany(...ids) {
|
39
|
+
return super.relationshipOneToMany(...ids);
|
40
|
+
}
|
41
|
+
type() {
|
42
|
+
return AdyenPayments.TYPE;
|
43
|
+
}
|
44
|
+
}
|
45
|
+
const instance = new AdyenPayments();
|
46
|
+
var adyen_payments_default = instance;
|
47
|
+
|
48
|
+
export { adyen_payments_default as default };
|
49
|
+
//# sourceMappingURL=adyen_payments.js.map
|
50
|
+
//# sourceMappingURL=adyen_payments.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../src/resources/adyen_payments.ts"],"names":[],"mappings":";;AAmGA,MAAM,sBAAsB,WAA0B,CAAA;AAAA,EAErD,OAAgB,IAAyB,GAAA,gBAAA;AAAA,EAEzC,MAAM,MAAA,CAAO,QAA8B,EAAA,MAAA,EAA4C,OAAkD,EAAA;AACxI,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAyC,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,aAAc,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC1H,EAEA,MAAM,MAAA,CAAO,QAA8B,EAAA,MAAA,EAA4C,OAAkD,EAAA;AACxI,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAyC,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,aAAc,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC1H,EAEA,MAAM,MAAO,CAAA,EAAA,EAAyB,OAA0C,EAAA;AAC/E,IAAA,MAAM,IAAK,CAAA,SAAA,CAAU,MAAQ,CAAA,OAAO,EAAO,KAAA,QAAA,GAAW,EAAE,EAAA,EAAI,IAAM,EAAA,aAAA,CAAc,IAAK,EAAA,GAAI,IAAI,OAAO,CAAA;AAAA;AACrG,EAEA,MAAM,KAAA,CAAM,cAAuC,EAAA,MAAA,EAAqC,OAA2C,EAAA;AAClI,IAAM,MAAA,eA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AO,OAAO,QAAW,GAAA,EAAA,GAAI,EAAG,CAAA,EAAA,EAAI,MAAM,aAAc,CAAA,IAAA,EAAM,UAAU,IAAK,EAAA,EAAG,QAAQ,OAAO,CAAA;AAAA;AACtK,EAGA,eAAe,QAAyC,EAAA;AACvD,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,aAAc,CAAA,IAAA;AAAA;AAC1D,EAGA,aAAa,EAAiD,EAAA;AAC7D,IAAO,OAAA,KAAA,CAAM,qBAAsC,EAAE,CAAA;AAAA;AACtD,EAEA,sBAAsB,GAAkC,EAAA;AACvD,IAAO,OAAA,KAAA,CAAM,qBAAuC,CAAA,GAAG,GAAG,CAAA;AAAA;AAC3D,EAGA,IAAyB,GAAA;AACxB,IAAA,OAAO,aAAc,CAAA,IAAA;AAAA;AAGvB;AAGA,MAAM,QAAA,GAAW,IAAI,aAAc,EAAA;AACnC,IAAO,sBAAQ,GAAA","file":"adyen_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 AdyenPaymentType = 'adyen_payments'\ntype AdyenPaymentRel = ResourceRel & { type: AdyenPaymentType }\ntype OrderRel = ResourceRel & { type: OrderType }\n\n\nexport type AdyenPaymentSort = Pick<AdyenPayment, 'id'> & ResourceSort\n// export type AdyenPaymentFilter = Pick<AdyenPayment, 'id'> & ResourceFilter\n\n\ninterface AdyenPayment extends Resource {\n\t\n\treadonly type: AdyenPaymentType\n\n\t/** \n\t * The public key linked to your API credential.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tpublic_key?: string | null\n\t/** \n\t * The merchant available payment methods for the assoiated order (i.e. country and amount). Required by the Adyen JS SDK.\n\t * @example ```{\"foo\":\"bar\"}```\n\t */\n\tpayment_methods: Record<string, any>\n\t/** \n\t * The Adyen 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 Adyen additional details request data, collected by client.\n\t * @example ```{\"foo\":\"bar\"}```\n\t */\n\tpayment_request_details?: Record<string, any> | null\n\t/** \n\t * The Adyen payment response, used by client (includes 'resultCode' and 'action').\n\t * @example ```{\"foo\":\"bar\"}```\n\t */\n\tpayment_response?: Record<string, any> | null\n\t/** \n\t * Indicates if the order current amount differs form the one of the associated authorization.\n\t */\n\tmismatched_amounts?: boolean | null\n\t/** \n\t * Information about the payment instrument used in the transaction.\n\t * @example ```{\"issuer\":\"cl bank\",\"card_type\":\"visa\"}```\n\t */\n\tpayment_instrument?: Record<string, any> | null\n\n\torder?: Order | null\n\tpayment_gateway?: PaymentGateway | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface AdyenPaymentCreate extends ResourceCreate {\n\t\n\torder: OrderRel\n\n}\n\n\ninterface AdyenPaymentUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The Adyen 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 Adyen additional details request data, collected by client.\n\t * @example ```{\"foo\":\"bar\"}```\n\t */\n\tpayment_request_details?: Record<string, any> | null\n\t/** \n\t * Send this attribute if you want to authorize the payment.\n\t * @example ```true```\n\t */\n\t_authorize?: boolean | null\n\t/** \n\t * Send this attribute if you want to send additional details the payment request.\n\t * @example ```true```\n\t */\n\t_details?: boolean | null\n\n\torder?: OrderRel | null\n\n}\n\n\nclass AdyenPayments extends ApiResource<AdyenPayment> {\n\n\tstatic readonly TYPE: AdyenPaymentType = 'adyen_payments' as const\n\n\tasync create(resource: AdyenPaymentCreate, params?: QueryParamsRetrieve<AdyenPayment>, options?: ResourcesConfig): Promise<AdyenPayment> {\n\t\treturn this.resources.create<AdyenPaymentCreate, AdyenPayment>({ ...resource, type: AdyenPayments.TYPE }, params, options)\n\t}\n\n\tasync update(resource: AdyenPaymentUpdate, params?: QueryParamsRetrieve<AdyenPayment>, options?: ResourcesConfig): Promise<AdyenPayment> {\n\t\treturn this.resources.update<AdyenPaymentUpdate, AdyenPayment>({ ...resource, type: AdyenPayments.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: AdyenPayments.TYPE } : id, options)\n\t}\n\n\tasync order(adyenPaymentId: string | AdyenPayment, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _adyenPaymentId = (adyenPaymentId as AdyenPayment).id || adyenPaymentId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `adyen_payments/${_adyenPaymentId}/order`, params, options) as unknown as Order\n\t}\n\n\tasync payment_gateway(adyenPaymentId: string | AdyenPayment, params?: QueryParamsRetrieve<PaymentGateway>, options?: ResourcesConfig): Promise<PaymentGateway> {\n\t\tconst _adyenPaymentId = (adyenPaymentId as AdyenPayment).id || adyenPaymentId as string\n\t\treturn this.resources.fetch<PaymentGateway>({ type: 'payment_gateways' }, `adyen_payments/${_adyenPaymentId}/payment_gateway`, params, options) as unknown as PaymentGateway\n\t}\n\n\tasync versions(adyenPaymentId: string | AdyenPayment, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _adyenPaymentId = (adyenPaymentId as AdyenPayment).id || adyenPaymentId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `adyen_payments/${_adyenPaymentId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _authorize(id: string | AdyenPayment, params?: QueryParamsRetrieve<AdyenPayment>, options?: ResourcesConfig): Promise<AdyenPayment> {\n\t\treturn this.resources.update<AdyenPaymentUpdate, AdyenPayment>({ id: (typeof id === 'string')? id: id.id, type: AdyenPayments.TYPE, _authorize: true }, params, options)\n\t}\n\n\tasync _details(id: string | AdyenPayment, params?: QueryParamsRetrieve<AdyenPayment>, options?: ResourcesConfig): Promise<AdyenPayment> {\n\t\treturn this.resources.update<AdyenPaymentUpdate, AdyenPayment>({ id: (typeof id === 'string')? id: id.id, type: AdyenPayments.TYPE, _details: true }, params, options)\n\t}\n\n\n\tisAdyenPayment(resource: any): resource is AdyenPayment {\n\t\treturn resource.type && (resource.type === AdyenPayments.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): AdyenPaymentRel {\n\t\treturn super.relationshipOneToOne<AdyenPaymentRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): AdyenPaymentRel[] {\n\t\treturn super.relationshipOneToMany<AdyenPaymentRel>(...ids)\n\t}\n\n\n\ttype(): AdyenPaymentType {\n\t\treturn AdyenPayments.TYPE\n\t}\n\n}\n\n\nconst instance = new AdyenPayments()\nexport default instance\n\nexport type { AdyenPayment, AdyenPaymentCreate, AdyenPaymentUpdate, AdyenPaymentType }\n"]}
|
@@ -0,0 +1,30 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
var resource = require('../resource');
|
4
|
+
|
5
|
+
class Applications extends resource.ApiSingleton {
|
6
|
+
static TYPE = "applications";
|
7
|
+
isApplication(resource) {
|
8
|
+
return resource.type && resource.type === Applications.TYPE;
|
9
|
+
}
|
10
|
+
relationship(id) {
|
11
|
+
return super.relationshipOneToOne(id);
|
12
|
+
}
|
13
|
+
relationshipToMany(...ids) {
|
14
|
+
return super.relationshipOneToMany(...ids);
|
15
|
+
}
|
16
|
+
type() {
|
17
|
+
return Applications.TYPE;
|
18
|
+
}
|
19
|
+
path() {
|
20
|
+
return "application";
|
21
|
+
}
|
22
|
+
}
|
23
|
+
const instance = new Applications();
|
24
|
+
var applications_default = instance;
|
25
|
+
|
26
|
+
module.exports = applications_default;
|
27
|
+
//# sourceMappingURL=applications.cjs.map
|
28
|
+
|
29
|
+
module.exports = exports.default;
|
30
|
+
//# sourceMappingURL=applications.cjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../src/resources/applications.ts"],"names":["ApiSingleton"],"mappings":";;;;AA+CA,MAAM,qBAAqBA,qBAA0B,CAAA;AAAA,EAEpD,OAAgB,IAAwB,GAAA,cAAA;AAAA,EAKxC,cAAc,QAAwC,EAAA;AACrD,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,YAAa,CAAA,IAAA;AAAA;AACzD,EAGA,aAAa,EAAgD,EAAA;AAC5D,IAAO,OAAA,KAAA,CAAM,qBAAqC,EAAE,CAAA;AAAA;AACrD,EAEA,sBAAsB,GAAiC,EAAA;AACtD,IAAO,OAAA,KAAA,CAAM,qBAAsC,CAAA,GAAG,GAAG,CAAA;AAAA;AAC1D,EAGA,IAAwB,GAAA;AACvB,IAAA,OAAO,YAAa,CAAA,IAAA;AAAA;AACrB,EAEA,IAAe,GAAA;AACd,IAAO,OAAA,aAAA;AAAA;AAGT;AAGA,MAAM,QAAA,GAAW,IAAI,YAAa,EAAA;AAClC,IAAO,oBAAQ,GAAA","file":"applications.cjs","sourcesContent":["import { ApiSingleton } from '../resource'\nimport type { Resource, ResourceId, ResourceRel, ResourceSort, /* ResourceFilter */ } from '../resource'\n\n\n\n\ntype ApplicationType = 'applications'\ntype ApplicationRel = ResourceRel & { type: ApplicationType }\n\n\nexport type ApplicationSort = Pick<Application, 'id'> & ResourceSort\n// export type ApplicationFilter = Pick<Application, 'id' | 'name' | 'kind' | 'public_access' | 'scopes'> & ResourceFilter\n\n\ninterface Application extends Resource {\n\t\n\treadonly type: ApplicationType\n\n\t/** \n\t * The application's internal name.\n\t * @example ```\"My app\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The application's kind. One of 'sales_channel', 'integration', or 'webapp'.\n\t * @example ```\"sales-channel\"```\n\t */\n\tkind?: 'dashboard' | 'user' | 'metrics' | 'contentful' | 'bundles' | 'customers' | 'datocms' | 'exports' | 'external' | 'gift_cards' | 'imports' | 'integration' | 'inventory' | 'orders' | 'price_lists' | 'promotions' | 'resources' | 'returns' | 'sales_channel' | 'sanity' | 'shipments' | 'skus' | 'sku_lists' | 'stock_transfers' | 'subscriptions' | 'tags' | 'webapp' | 'webhooks' | 'zapier' | null\n\t/** \n\t * Indicates if the application has public access.\n\t * @example ```true```\n\t */\n\tpublic_access?: boolean | null\n\t/** \n\t * The application's redirect URI.\n\t * @example ```\"https://bluebrand.com/img/logo.svg\"```\n\t */\n\tredirect_uri?: string | null\n\t/** \n\t * The application's scopes.\n\t * @example ```\"market:all market:9 market:122 market:6 stock_location:6 stock_location:33\"```\n\t */\n\tscopes?: string | null\n\t\n}\n\n\nclass Applications extends ApiSingleton<Application> {\n\n\tstatic readonly TYPE: ApplicationType = 'applications' as const\n\n\t\n\n\n\tisApplication(resource: any): resource is Application {\n\t\treturn resource.type && (resource.type === Applications.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): ApplicationRel {\n\t\treturn super.relationshipOneToOne<ApplicationRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): ApplicationRel[] {\n\t\treturn super.relationshipOneToMany<ApplicationRel>(...ids)\n\t}\n\n\n\ttype(): ApplicationType {\n\t\treturn Applications.TYPE\n\t}\n\n\tpath(): string {\n\t\treturn 'application'\n\t}\n\n}\n\n\nconst instance = new Applications()\nexport default instance\n\nexport type { Application, ApplicationType }\n"]}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
import { ApiSingleton } from '../resource';
|
2
|
+
|
3
|
+
class Applications extends ApiSingleton {
|
4
|
+
static TYPE = "applications";
|
5
|
+
isApplication(resource) {
|
6
|
+
return resource.type && resource.type === Applications.TYPE;
|
7
|
+
}
|
8
|
+
relationship(id) {
|
9
|
+
return super.relationshipOneToOne(id);
|
10
|
+
}
|
11
|
+
relationshipToMany(...ids) {
|
12
|
+
return super.relationshipOneToMany(...ids);
|
13
|
+
}
|
14
|
+
type() {
|
15
|
+
return Applications.TYPE;
|
16
|
+
}
|
17
|
+
path() {
|
18
|
+
return "application";
|
19
|
+
}
|
20
|
+
}
|
21
|
+
const instance = new Applications();
|
22
|
+
var applications_default = instance;
|
23
|
+
|
24
|
+
export { applications_default as default };
|
25
|
+
//# sourceMappingURL=applications.js.map
|
26
|
+
//# sourceMappingURL=applications.js.map
|