@commercelayer/sdk 7.0.0-beta.1 → 7.0.0-beta.10
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/lib/api-BYcswOJ0.d.cts +16784 -0
- package/lib/api-Cknm0QL_.d.ts +16784 -0
- package/lib/api.cjs +936 -0
- package/lib/api.d.cts +4 -0
- package/lib/api.d.ts +4 -0
- package/lib/api.js +275 -0
- package/lib/client.cjs +170 -0
- package/lib/client.d.cts +36 -0
- package/lib/client.d.ts +36 -0
- package/lib/client.js +161 -0
- package/lib/commercelayer.cjs +798 -0
- package/lib/commercelayer.d.cts +167 -0
- package/lib/commercelayer.d.ts +167 -0
- package/lib/commercelayer.js +768 -0
- package/lib/common.cjs +17 -0
- package/lib/common.d.cts +13 -0
- package/lib/common.d.ts +13 -0
- package/lib/common.js +13 -0
- package/lib/config.cjs +21 -0
- package/lib/config.d.cts +19 -0
- package/lib/config.d.ts +19 -0
- package/lib/config.js +17 -0
- package/lib/debug.cjs +19 -0
- package/lib/debug.d.cts +4 -0
- package/lib/debug.d.ts +4 -0
- package/lib/debug.js +15 -0
- package/lib/error.cjs +97 -0
- package/lib/error.d.cts +35 -0
- package/lib/error.d.ts +35 -0
- package/lib/error.js +91 -0
- package/lib/fetch.cjs +83 -0
- package/lib/fetch.d.cts +1 -0
- package/lib/fetch.d.ts +1 -0
- package/lib/fetch.js +76 -0
- package/lib/index.cjs +32 -2
- package/lib/index.d.cts +8 -16916
- package/lib/index.d.ts +8 -16916
- package/lib/index.js +3 -2
- package/lib/instance.cjs +272 -0
- package/lib/instance.d.cts +141 -0
- package/lib/instance.d.ts +141 -0
- package/lib/instance.js +139 -0
- package/lib/interceptor-5MISI1yn.d.cts +54 -0
- package/lib/interceptor-5MISI1yn.d.ts +54 -0
- package/lib/interceptor.cjs +2 -0
- package/lib/interceptor.d.cts +1 -0
- package/lib/interceptor.d.ts +1 -0
- package/lib/interceptor.js +1 -0
- package/lib/jsonapi.cjs +79 -0
- package/lib/jsonapi.d.cts +11 -0
- package/lib/jsonapi.d.ts +11 -0
- package/lib/jsonapi.js +71 -0
- package/lib/model.cjs +2 -0
- package/lib/model.d.cts +4 -0
- package/lib/model.d.ts +4 -0
- package/lib/model.js +1 -0
- package/lib/query.cjs +64 -0
- package/lib/query.d.cts +4 -0
- package/lib/query.d.ts +4 -0
- package/lib/query.js +56 -0
- package/lib/resource.cjs +222 -0
- package/lib/resource.d.cts +4 -0
- package/lib/resource.d.ts +4 -0
- package/lib/resource.js +209 -0
- package/lib/resources/addresses.cjs +53 -0
- package/lib/resources/addresses.d.cts +4 -0
- package/lib/resources/addresses.d.ts +4 -0
- package/lib/resources/addresses.js +49 -0
- package/lib/resources/adjustments.cjs +41 -0
- package/lib/resources/adjustments.d.cts +4 -0
- package/lib/resources/adjustments.d.ts +4 -0
- package/lib/resources/adjustments.js +37 -0
- package/lib/resources/adyen_gateways.cjs +49 -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 +45 -0
- package/lib/resources/adyen_payments.cjs +55 -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 +51 -0
- package/lib/resources/applications.cjs +31 -0
- package/lib/resources/applications.d.cts +4 -0
- package/lib/resources/applications.d.ts +4 -0
- package/lib/resources/applications.js +27 -0
- package/lib/resources/attachments.cjs +37 -0
- package/lib/resources/attachments.d.cts +4 -0
- package/lib/resources/attachments.d.ts +4 -0
- package/lib/resources/attachments.js +33 -0
- package/lib/resources/authorizations.cjs +70 -0
- package/lib/resources/authorizations.d.cts +4 -0
- package/lib/resources/authorizations.d.ts +4 -0
- package/lib/resources/authorizations.js +66 -0
- package/lib/resources/avalara_accounts.cjs +57 -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 +53 -0
- package/lib/resources/axerve_gateways.cjs +49 -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 +45 -0
- package/lib/resources/axerve_payments.cjs +52 -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 +48 -0
- package/lib/resources/bing_geocoders.cjs +49 -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 +45 -0
- package/lib/resources/braintree_gateways.cjs +49 -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 +45 -0
- package/lib/resources/braintree_payments.cjs +49 -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 +45 -0
- package/lib/resources/bundles.cjs +71 -0
- package/lib/resources/bundles.d.cts +4 -0
- package/lib/resources/bundles.d.ts +4 -0
- package/lib/resources/bundles.js +67 -0
- package/lib/resources/buy_x_pay_y_promotions.cjs +91 -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 +87 -0
- package/lib/resources/captures.cjs +71 -0
- package/lib/resources/captures.d.cts +4 -0
- package/lib/resources/captures.d.ts +4 -0
- package/lib/resources/captures.js +67 -0
- package/lib/resources/carrier_accounts.cjs +49 -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 +45 -0
- package/lib/resources/checkout_com_gateways.cjs +49 -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 +45 -0
- package/lib/resources/checkout_com_payments.cjs +55 -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 +51 -0
- package/lib/resources/cleanups.cjs +48 -0
- package/lib/resources/cleanups.d.cts +4 -0
- package/lib/resources/cleanups.d.ts +4 -0
- package/lib/resources/cleanups.js +44 -0
- package/lib/resources/coupon_codes_promotion_rules.cjs +45 -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 +41 -0
- package/lib/resources/coupon_recipients.cjs +49 -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 +45 -0
- package/lib/resources/coupons.cjs +57 -0
- package/lib/resources/coupons.d.cts +4 -0
- package/lib/resources/coupons.d.ts +4 -0
- package/lib/resources/coupons.js +53 -0
- package/lib/resources/custom_promotion_rules.cjs +41 -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 +37 -0
- package/lib/resources/customer_addresses.cjs +53 -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 +49 -0
- package/lib/resources/customer_groups.cjs +53 -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 +49 -0
- package/lib/resources/customer_password_resets.cjs +48 -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 +44 -0
- package/lib/resources/customer_payment_sources.cjs +49 -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 +45 -0
- package/lib/resources/customer_subscriptions.cjs +49 -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 +45 -0
- package/lib/resources/customers.cjs +81 -0
- package/lib/resources/customers.d.cts +4 -0
- package/lib/resources/customers.d.ts +4 -0
- package/lib/resources/customers.js +77 -0
- package/lib/resources/delivery_lead_times.cjs +53 -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 +49 -0
- package/lib/resources/discount_engine_items.cjs +36 -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 +32 -0
- package/lib/resources/discount_engines.cjs +44 -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 +40 -0
- package/lib/resources/easypost_pickups.cjs +52 -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 +48 -0
- package/lib/resources/event_callbacks.cjs +32 -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 +28 -0
- package/lib/resources/events.cjs +42 -0
- package/lib/resources/events.d.cts +4 -0
- package/lib/resources/events.d.ts +4 -0
- package/lib/resources/events.js +38 -0
- package/lib/resources/exports.cjs +48 -0
- package/lib/resources/exports.d.cts +4 -0
- package/lib/resources/exports.d.ts +4 -0
- package/lib/resources/exports.js +44 -0
- package/lib/resources/external_gateways.cjs +52 -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 +48 -0
- package/lib/resources/external_payments.cjs +53 -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 +49 -0
- package/lib/resources/external_promotions.cjs +94 -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 +90 -0
- package/lib/resources/external_tax_calculators.cjs +56 -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 +52 -0
- package/lib/resources/fixed_amount_promotions.cjs +91 -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 +87 -0
- package/lib/resources/fixed_price_promotions.cjs +91 -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 +87 -0
- package/lib/resources/flex_promotions.cjs +67 -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 +63 -0
- package/lib/resources/free_gift_promotions.cjs +91 -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 +87 -0
- package/lib/resources/free_shipping_promotions.cjs +87 -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 +83 -0
- package/lib/resources/geocoders.cjs +40 -0
- package/lib/resources/geocoders.d.cts +4 -0
- package/lib/resources/geocoders.d.ts +4 -0
- package/lib/resources/geocoders.js +36 -0
- package/lib/resources/gift_card_recipients.cjs +49 -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 +45 -0
- package/lib/resources/gift_cards.cjs +73 -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 +69 -0
- package/lib/resources/google_geocoders.cjs +49 -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 +45 -0
- package/lib/resources/imports.cjs +44 -0
- package/lib/resources/imports.d.cts +4 -0
- package/lib/resources/imports.d.ts +4 -0
- package/lib/resources/imports.js +40 -0
- package/lib/resources/in_stock_subscriptions.cjs +63 -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 +59 -0
- package/lib/resources/inventory_models.cjs +53 -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 +49 -0
- package/lib/resources/inventory_return_locations.cjs +49 -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 +45 -0
- package/lib/resources/inventory_stock_locations.cjs +49 -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 +45 -0
- package/lib/resources/klarna_gateways.cjs +49 -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 +45 -0
- package/lib/resources/klarna_payments.cjs +52 -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 +48 -0
- package/lib/resources/line_item_options.cjs +53 -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 +49 -0
- package/lib/resources/line_items.cjs +82 -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 +78 -0
- package/lib/resources/links.cjs +47 -0
- package/lib/resources/links.d.cts +4 -0
- package/lib/resources/links.d.ts +4 -0
- package/lib/resources/links.js +43 -0
- package/lib/resources/manual_gateways.cjs +45 -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 +41 -0
- package/lib/resources/manual_tax_calculators.cjs +57 -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 +53 -0
- package/lib/resources/markets.cjs +91 -0
- package/lib/resources/markets.d.cts +4 -0
- package/lib/resources/markets.d.ts +4 -0
- package/lib/resources/markets.js +87 -0
- package/lib/resources/merchants.cjs +49 -0
- package/lib/resources/merchants.d.cts +4 -0
- package/lib/resources/merchants.d.ts +4 -0
- package/lib/resources/merchants.js +45 -0
- package/lib/resources/notifications.cjs +37 -0
- package/lib/resources/notifications.d.cts +4 -0
- package/lib/resources/notifications.d.ts +4 -0
- package/lib/resources/notifications.js +33 -0
- package/lib/resources/order_amount_promotion_rules.cjs +41 -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 +37 -0
- package/lib/resources/order_copies.cjs +53 -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 +49 -0
- package/lib/resources/order_factories.cjs +40 -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 +36 -0
- package/lib/resources/order_subscription_items.cjs +45 -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 +41 -0
- package/lib/resources/order_subscriptions.cjs +97 -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 +93 -0
- package/lib/resources/orders.cjs +266 -0
- package/lib/resources/orders.d.cts +4 -0
- package/lib/resources/orders.d.ts +4 -0
- package/lib/resources/orders.js +262 -0
- package/lib/resources/organizations.cjs +31 -0
- package/lib/resources/organizations.d.cts +4 -0
- package/lib/resources/organizations.d.ts +4 -0
- package/lib/resources/organizations.js +27 -0
- package/lib/resources/packages.cjs +53 -0
- package/lib/resources/packages.d.cts +4 -0
- package/lib/resources/packages.d.ts +4 -0
- package/lib/resources/packages.js +49 -0
- package/lib/resources/parcel_line_items.cjs +49 -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 +45 -0
- package/lib/resources/parcels.cjs +61 -0
- package/lib/resources/parcels.d.cts +4 -0
- package/lib/resources/parcels.d.ts +4 -0
- package/lib/resources/parcels.js +57 -0
- package/lib/resources/payment_gateways.cjs +36 -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 +32 -0
- package/lib/resources/payment_methods.cjs +67 -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 +63 -0
- package/lib/resources/payment_options.cjs +45 -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 +41 -0
- package/lib/resources/paypal_gateways.cjs +49 -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 +45 -0
- package/lib/resources/paypal_payments.cjs +49 -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 +45 -0
- package/lib/resources/percentage_discount_promotions.cjs +91 -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 +87 -0
- package/lib/resources/pickups.cjs +40 -0
- package/lib/resources/pickups.d.cts +4 -0
- package/lib/resources/pickups.d.ts +4 -0
- package/lib/resources/pickups.js +36 -0
- package/lib/resources/price_frequency_tiers.cjs +53 -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 +49 -0
- package/lib/resources/price_list_schedulers.cjs +59 -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 +55 -0
- package/lib/resources/price_lists.cjs +53 -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 +49 -0
- package/lib/resources/price_tiers.cjs +40 -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 +36 -0
- package/lib/resources/price_volume_tiers.cjs +53 -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 +49 -0
- package/lib/resources/prices.cjs +77 -0
- package/lib/resources/prices.d.cts +4 -0
- package/lib/resources/prices.d.ts +4 -0
- package/lib/resources/prices.js +73 -0
- package/lib/resources/promotion_rules.cjs +32 -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 +28 -0
- package/lib/resources/promotions.cjs +72 -0
- package/lib/resources/promotions.d.cts +4 -0
- package/lib/resources/promotions.d.ts +4 -0
- package/lib/resources/promotions.js +68 -0
- package/lib/resources/recurring_order_copies.cjs +53 -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 +49 -0
- package/lib/resources/refunds.cjs +58 -0
- package/lib/resources/refunds.d.cts +4 -0
- package/lib/resources/refunds.d.ts +4 -0
- package/lib/resources/refunds.js +54 -0
- package/lib/resources/reserved_stocks.cjs +44 -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 +40 -0
- package/lib/resources/resource_errors.cjs +28 -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 +24 -0
- package/lib/resources/return_line_items.cjs +48 -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 +44 -0
- package/lib/resources/returns.cjs +122 -0
- package/lib/resources/returns.d.cts +4 -0
- package/lib/resources/returns.d.ts +4 -0
- package/lib/resources/returns.js +118 -0
- package/lib/resources/satispay_gateways.cjs +49 -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 +45 -0
- package/lib/resources/satispay_payments.cjs +52 -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 +48 -0
- package/lib/resources/shipments.cjs +152 -0
- package/lib/resources/shipments.d.cts +4 -0
- package/lib/resources/shipments.d.ts +4 -0
- package/lib/resources/shipments.js +148 -0
- package/lib/resources/shipping_categories.cjs +49 -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 +45 -0
- package/lib/resources/shipping_method_tiers.cjs +40 -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 +36 -0
- package/lib/resources/shipping_methods.cjs +86 -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 +82 -0
- package/lib/resources/shipping_weight_tiers.cjs +49 -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 +45 -0
- package/lib/resources/shipping_zones.cjs +45 -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 +41 -0
- package/lib/resources/sku_list_items.cjs +49 -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 +45 -0
- package/lib/resources/sku_list_promotion_rules.cjs +49 -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 +45 -0
- package/lib/resources/sku_lists.cjs +65 -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 +61 -0
- package/lib/resources/sku_options.cjs +57 -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 +53 -0
- package/lib/resources/skus.cjs +101 -0
- package/lib/resources/skus.d.cts +4 -0
- package/lib/resources/skus.d.ts +4 -0
- package/lib/resources/skus.js +97 -0
- package/lib/resources/stock_items.cjs +64 -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 +60 -0
- package/lib/resources/stock_line_items.cjs +70 -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 +66 -0
- package/lib/resources/stock_locations.cjs +69 -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 +65 -0
- package/lib/resources/stock_reservations.cjs +68 -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 +64 -0
- package/lib/resources/stock_transfers.cjs +91 -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 +87 -0
- package/lib/resources/stores.cjs +65 -0
- package/lib/resources/stores.d.cts +4 -0
- package/lib/resources/stores.d.ts +4 -0
- package/lib/resources/stores.js +61 -0
- package/lib/resources/stripe_gateways.cjs +49 -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 +45 -0
- package/lib/resources/stripe_payments.cjs +55 -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 +51 -0
- package/lib/resources/stripe_tax_accounts.cjs +57 -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 +53 -0
- package/lib/resources/subscription_models.cjs +49 -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 +45 -0
- package/lib/resources/tags.cjs +37 -0
- package/lib/resources/tags.d.cts +4 -0
- package/lib/resources/tags.d.ts +4 -0
- package/lib/resources/tags.js +33 -0
- package/lib/resources/talon_one_accounts.cjs +53 -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 +49 -0
- package/lib/resources/tax_calculators.cjs +44 -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 +40 -0
- package/lib/resources/tax_categories.cjs +49 -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 +45 -0
- package/lib/resources/tax_rules.cjs +45 -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 +41 -0
- package/lib/resources/taxjar_accounts.cjs +57 -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 +53 -0
- package/lib/resources/transactions.cjs +44 -0
- package/lib/resources/transactions.d.cts +4 -0
- package/lib/resources/transactions.d.ts +4 -0
- package/lib/resources/transactions.js +40 -0
- package/lib/resources/versions.cjs +28 -0
- package/lib/resources/versions.d.cts +4 -0
- package/lib/resources/versions.d.ts +4 -0
- package/lib/resources/versions.js +24 -0
- package/lib/resources/vertex_accounts.cjs +56 -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 +52 -0
- package/lib/resources/voids.cjs +54 -0
- package/lib/resources/voids.d.cts +4 -0
- package/lib/resources/voids.d.ts +4 -0
- package/lib/resources/voids.js +50 -0
- package/lib/resources/webhooks.cjs +54 -0
- package/lib/resources/webhooks.d.cts +4 -0
- package/lib/resources/webhooks.d.ts +4 -0
- package/lib/resources/webhooks.js +50 -0
- package/lib/resources/wire_transfers.cjs +45 -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 +41 -0
- package/lib/static.cjs +39 -0
- package/lib/static.d.cts +19 -0
- package/lib/static.d.ts +19 -0
- package/lib/static.js +33 -0
- package/lib/types.cjs +2 -0
- package/lib/types.d.cts +7 -0
- package/lib/types.d.ts +7 -0
- package/lib/types.js +1 -0
- package/lib/util.cjs +37 -0
- package/lib/util.d.cts +13 -0
- package/lib/util.d.ts +13 -0
- package/lib/util.js +32 -0
- package/package.json +12 -10
@@ -0,0 +1,56 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
var resource = require('../resource');
|
4
|
+
|
5
|
+
var __defProp = Object.defineProperty;
|
6
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
7
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, key + "" , value);
|
8
|
+
const _VertexAccounts = class _VertexAccounts extends resource.ApiResource {
|
9
|
+
async create(resource, params, options) {
|
10
|
+
return this.resources.create({ ...resource, type: _VertexAccounts.TYPE }, params, options);
|
11
|
+
}
|
12
|
+
async update(resource, params, options) {
|
13
|
+
return this.resources.update({ ...resource, type: _VertexAccounts.TYPE }, params, options);
|
14
|
+
}
|
15
|
+
async delete(id, options) {
|
16
|
+
await this.resources.delete(typeof id === "string" ? { id, type: _VertexAccounts.TYPE } : id, options);
|
17
|
+
}
|
18
|
+
async markets(vertexAccountId, params, options) {
|
19
|
+
const _vertexAccountId = vertexAccountId.id || vertexAccountId;
|
20
|
+
return this.resources.fetch({ type: "markets" }, `vertex_accounts/${_vertexAccountId}/markets`, params, options);
|
21
|
+
}
|
22
|
+
async attachments(vertexAccountId, params, options) {
|
23
|
+
const _vertexAccountId = vertexAccountId.id || vertexAccountId;
|
24
|
+
return this.resources.fetch({ type: "attachments" }, `vertex_accounts/${_vertexAccountId}/attachments`, params, options);
|
25
|
+
}
|
26
|
+
async events(vertexAccountId, params, options) {
|
27
|
+
const _vertexAccountId = vertexAccountId.id || vertexAccountId;
|
28
|
+
return this.resources.fetch({ type: "events" }, `vertex_accounts/${_vertexAccountId}/events`, params, options);
|
29
|
+
}
|
30
|
+
async versions(vertexAccountId, params, options) {
|
31
|
+
const _vertexAccountId = vertexAccountId.id || vertexAccountId;
|
32
|
+
return this.resources.fetch({ type: "versions" }, `vertex_accounts/${_vertexAccountId}/versions`, params, options);
|
33
|
+
}
|
34
|
+
async _refresh_token(id, params, options) {
|
35
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _VertexAccounts.TYPE, _refresh_token: true }, params, options);
|
36
|
+
}
|
37
|
+
isVertexAccount(resource) {
|
38
|
+
return resource.type && resource.type === _VertexAccounts.TYPE;
|
39
|
+
}
|
40
|
+
relationship(id) {
|
41
|
+
return super.relationshipOneToOne(id);
|
42
|
+
}
|
43
|
+
relationshipToMany(...ids) {
|
44
|
+
return super.relationshipOneToMany(...ids);
|
45
|
+
}
|
46
|
+
type() {
|
47
|
+
return _VertexAccounts.TYPE;
|
48
|
+
}
|
49
|
+
};
|
50
|
+
__publicField(_VertexAccounts, "TYPE", "vertex_accounts");
|
51
|
+
let VertexAccounts = _VertexAccounts;
|
52
|
+
var vertex_accounts_default = VertexAccounts;
|
53
|
+
|
54
|
+
module.exports = vertex_accounts_default;
|
55
|
+
|
56
|
+
module.exports = exports.default;
|
@@ -0,0 +1,52 @@
|
|
1
|
+
import { ApiResource } from '../resource';
|
2
|
+
|
3
|
+
var __defProp = Object.defineProperty;
|
4
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
5
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, key + "" , value);
|
6
|
+
const _VertexAccounts = class _VertexAccounts extends ApiResource {
|
7
|
+
async create(resource, params, options) {
|
8
|
+
return this.resources.create({ ...resource, type: _VertexAccounts.TYPE }, params, options);
|
9
|
+
}
|
10
|
+
async update(resource, params, options) {
|
11
|
+
return this.resources.update({ ...resource, type: _VertexAccounts.TYPE }, params, options);
|
12
|
+
}
|
13
|
+
async delete(id, options) {
|
14
|
+
await this.resources.delete(typeof id === "string" ? { id, type: _VertexAccounts.TYPE } : id, options);
|
15
|
+
}
|
16
|
+
async markets(vertexAccountId, params, options) {
|
17
|
+
const _vertexAccountId = vertexAccountId.id || vertexAccountId;
|
18
|
+
return this.resources.fetch({ type: "markets" }, `vertex_accounts/${_vertexAccountId}/markets`, params, options);
|
19
|
+
}
|
20
|
+
async attachments(vertexAccountId, params, options) {
|
21
|
+
const _vertexAccountId = vertexAccountId.id || vertexAccountId;
|
22
|
+
return this.resources.fetch({ type: "attachments" }, `vertex_accounts/${_vertexAccountId}/attachments`, params, options);
|
23
|
+
}
|
24
|
+
async events(vertexAccountId, params, options) {
|
25
|
+
const _vertexAccountId = vertexAccountId.id || vertexAccountId;
|
26
|
+
return this.resources.fetch({ type: "events" }, `vertex_accounts/${_vertexAccountId}/events`, params, options);
|
27
|
+
}
|
28
|
+
async versions(vertexAccountId, params, options) {
|
29
|
+
const _vertexAccountId = vertexAccountId.id || vertexAccountId;
|
30
|
+
return this.resources.fetch({ type: "versions" }, `vertex_accounts/${_vertexAccountId}/versions`, params, options);
|
31
|
+
}
|
32
|
+
async _refresh_token(id, params, options) {
|
33
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _VertexAccounts.TYPE, _refresh_token: true }, params, options);
|
34
|
+
}
|
35
|
+
isVertexAccount(resource) {
|
36
|
+
return resource.type && resource.type === _VertexAccounts.TYPE;
|
37
|
+
}
|
38
|
+
relationship(id) {
|
39
|
+
return super.relationshipOneToOne(id);
|
40
|
+
}
|
41
|
+
relationshipToMany(...ids) {
|
42
|
+
return super.relationshipOneToMany(...ids);
|
43
|
+
}
|
44
|
+
type() {
|
45
|
+
return _VertexAccounts.TYPE;
|
46
|
+
}
|
47
|
+
};
|
48
|
+
__publicField(_VertexAccounts, "TYPE", "vertex_accounts");
|
49
|
+
let VertexAccounts = _VertexAccounts;
|
50
|
+
var vertex_accounts_default = VertexAccounts;
|
51
|
+
|
52
|
+
export { vertex_accounts_default as default };
|
@@ -0,0 +1,54 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
var resource = require('../resource');
|
4
|
+
|
5
|
+
var __defProp = Object.defineProperty;
|
6
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
7
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, key + "" , value);
|
8
|
+
const _Voids = class _Voids extends resource.ApiResource {
|
9
|
+
async update(resource, params, options) {
|
10
|
+
return this.resources.update({ ...resource, type: _Voids.TYPE }, params, options);
|
11
|
+
}
|
12
|
+
async order(voidId, params, options) {
|
13
|
+
const _voidId = voidId.id || voidId;
|
14
|
+
return this.resources.fetch({ type: "orders" }, `voids/${_voidId}/order`, params, options);
|
15
|
+
}
|
16
|
+
async attachments(voidId, params, options) {
|
17
|
+
const _voidId = voidId.id || voidId;
|
18
|
+
return this.resources.fetch({ type: "attachments" }, `voids/${_voidId}/attachments`, params, options);
|
19
|
+
}
|
20
|
+
async events(voidId, params, options) {
|
21
|
+
const _voidId = voidId.id || voidId;
|
22
|
+
return this.resources.fetch({ type: "events" }, `voids/${_voidId}/events`, params, options);
|
23
|
+
}
|
24
|
+
async versions(voidId, params, options) {
|
25
|
+
const _voidId = voidId.id || voidId;
|
26
|
+
return this.resources.fetch({ type: "versions" }, `voids/${_voidId}/versions`, params, options);
|
27
|
+
}
|
28
|
+
async reference_authorization(voidId, params, options) {
|
29
|
+
const _voidId = voidId.id || voidId;
|
30
|
+
return this.resources.fetch({ type: "authorizations" }, `voids/${_voidId}/reference_authorization`, params, options);
|
31
|
+
}
|
32
|
+
async _forward(id, params, options) {
|
33
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Voids.TYPE, _forward: true }, params, options);
|
34
|
+
}
|
35
|
+
isVoid(resource) {
|
36
|
+
return resource.type && resource.type === _Voids.TYPE;
|
37
|
+
}
|
38
|
+
relationship(id) {
|
39
|
+
return super.relationshipOneToOne(id);
|
40
|
+
}
|
41
|
+
relationshipToMany(...ids) {
|
42
|
+
return super.relationshipOneToMany(...ids);
|
43
|
+
}
|
44
|
+
type() {
|
45
|
+
return _Voids.TYPE;
|
46
|
+
}
|
47
|
+
};
|
48
|
+
__publicField(_Voids, "TYPE", "voids");
|
49
|
+
let Voids = _Voids;
|
50
|
+
var voids_default = Voids;
|
51
|
+
|
52
|
+
module.exports = voids_default;
|
53
|
+
|
54
|
+
module.exports = exports.default;
|
@@ -0,0 +1,50 @@
|
|
1
|
+
import { ApiResource } from '../resource';
|
2
|
+
|
3
|
+
var __defProp = Object.defineProperty;
|
4
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
5
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, key + "" , value);
|
6
|
+
const _Voids = class _Voids extends ApiResource {
|
7
|
+
async update(resource, params, options) {
|
8
|
+
return this.resources.update({ ...resource, type: _Voids.TYPE }, params, options);
|
9
|
+
}
|
10
|
+
async order(voidId, params, options) {
|
11
|
+
const _voidId = voidId.id || voidId;
|
12
|
+
return this.resources.fetch({ type: "orders" }, `voids/${_voidId}/order`, params, options);
|
13
|
+
}
|
14
|
+
async attachments(voidId, params, options) {
|
15
|
+
const _voidId = voidId.id || voidId;
|
16
|
+
return this.resources.fetch({ type: "attachments" }, `voids/${_voidId}/attachments`, params, options);
|
17
|
+
}
|
18
|
+
async events(voidId, params, options) {
|
19
|
+
const _voidId = voidId.id || voidId;
|
20
|
+
return this.resources.fetch({ type: "events" }, `voids/${_voidId}/events`, params, options);
|
21
|
+
}
|
22
|
+
async versions(voidId, params, options) {
|
23
|
+
const _voidId = voidId.id || voidId;
|
24
|
+
return this.resources.fetch({ type: "versions" }, `voids/${_voidId}/versions`, params, options);
|
25
|
+
}
|
26
|
+
async reference_authorization(voidId, params, options) {
|
27
|
+
const _voidId = voidId.id || voidId;
|
28
|
+
return this.resources.fetch({ type: "authorizations" }, `voids/${_voidId}/reference_authorization`, params, options);
|
29
|
+
}
|
30
|
+
async _forward(id, params, options) {
|
31
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Voids.TYPE, _forward: true }, params, options);
|
32
|
+
}
|
33
|
+
isVoid(resource) {
|
34
|
+
return resource.type && resource.type === _Voids.TYPE;
|
35
|
+
}
|
36
|
+
relationship(id) {
|
37
|
+
return super.relationshipOneToOne(id);
|
38
|
+
}
|
39
|
+
relationshipToMany(...ids) {
|
40
|
+
return super.relationshipOneToMany(...ids);
|
41
|
+
}
|
42
|
+
type() {
|
43
|
+
return _Voids.TYPE;
|
44
|
+
}
|
45
|
+
};
|
46
|
+
__publicField(_Voids, "TYPE", "voids");
|
47
|
+
let Voids = _Voids;
|
48
|
+
var voids_default = Voids;
|
49
|
+
|
50
|
+
export { voids_default as default };
|
@@ -0,0 +1,54 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
var resource = require('../resource');
|
4
|
+
|
5
|
+
var __defProp = Object.defineProperty;
|
6
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
7
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, key + "" , value);
|
8
|
+
const _Webhooks = class _Webhooks extends resource.ApiResource {
|
9
|
+
async create(resource, params, options) {
|
10
|
+
return this.resources.create({ ...resource, type: _Webhooks.TYPE }, params, options);
|
11
|
+
}
|
12
|
+
async update(resource, params, options) {
|
13
|
+
return this.resources.update({ ...resource, type: _Webhooks.TYPE }, params, options);
|
14
|
+
}
|
15
|
+
async delete(id, options) {
|
16
|
+
await this.resources.delete(typeof id === "string" ? { id, type: _Webhooks.TYPE } : id, options);
|
17
|
+
}
|
18
|
+
async last_event_callbacks(webhookId, params, options) {
|
19
|
+
const _webhookId = webhookId.id || webhookId;
|
20
|
+
return this.resources.fetch({ type: "event_callbacks" }, `webhooks/${_webhookId}/last_event_callbacks`, params, options);
|
21
|
+
}
|
22
|
+
async versions(webhookId, params, options) {
|
23
|
+
const _webhookId = webhookId.id || webhookId;
|
24
|
+
return this.resources.fetch({ type: "versions" }, `webhooks/${_webhookId}/versions`, params, options);
|
25
|
+
}
|
26
|
+
async _disable(id, params, options) {
|
27
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Webhooks.TYPE, _disable: true }, params, options);
|
28
|
+
}
|
29
|
+
async _enable(id, params, options) {
|
30
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Webhooks.TYPE, _enable: true }, params, options);
|
31
|
+
}
|
32
|
+
async _reset_circuit(id, params, options) {
|
33
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Webhooks.TYPE, _reset_circuit: true }, params, options);
|
34
|
+
}
|
35
|
+
isWebhook(resource) {
|
36
|
+
return resource.type && resource.type === _Webhooks.TYPE;
|
37
|
+
}
|
38
|
+
relationship(id) {
|
39
|
+
return super.relationshipOneToOne(id);
|
40
|
+
}
|
41
|
+
relationshipToMany(...ids) {
|
42
|
+
return super.relationshipOneToMany(...ids);
|
43
|
+
}
|
44
|
+
type() {
|
45
|
+
return _Webhooks.TYPE;
|
46
|
+
}
|
47
|
+
};
|
48
|
+
__publicField(_Webhooks, "TYPE", "webhooks");
|
49
|
+
let Webhooks = _Webhooks;
|
50
|
+
var webhooks_default = Webhooks;
|
51
|
+
|
52
|
+
module.exports = webhooks_default;
|
53
|
+
|
54
|
+
module.exports = exports.default;
|
@@ -0,0 +1,50 @@
|
|
1
|
+
import { ApiResource } from '../resource';
|
2
|
+
|
3
|
+
var __defProp = Object.defineProperty;
|
4
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
5
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, key + "" , value);
|
6
|
+
const _Webhooks = class _Webhooks extends ApiResource {
|
7
|
+
async create(resource, params, options) {
|
8
|
+
return this.resources.create({ ...resource, type: _Webhooks.TYPE }, params, options);
|
9
|
+
}
|
10
|
+
async update(resource, params, options) {
|
11
|
+
return this.resources.update({ ...resource, type: _Webhooks.TYPE }, params, options);
|
12
|
+
}
|
13
|
+
async delete(id, options) {
|
14
|
+
await this.resources.delete(typeof id === "string" ? { id, type: _Webhooks.TYPE } : id, options);
|
15
|
+
}
|
16
|
+
async last_event_callbacks(webhookId, params, options) {
|
17
|
+
const _webhookId = webhookId.id || webhookId;
|
18
|
+
return this.resources.fetch({ type: "event_callbacks" }, `webhooks/${_webhookId}/last_event_callbacks`, params, options);
|
19
|
+
}
|
20
|
+
async versions(webhookId, params, options) {
|
21
|
+
const _webhookId = webhookId.id || webhookId;
|
22
|
+
return this.resources.fetch({ type: "versions" }, `webhooks/${_webhookId}/versions`, params, options);
|
23
|
+
}
|
24
|
+
async _disable(id, params, options) {
|
25
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Webhooks.TYPE, _disable: true }, params, options);
|
26
|
+
}
|
27
|
+
async _enable(id, params, options) {
|
28
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Webhooks.TYPE, _enable: true }, params, options);
|
29
|
+
}
|
30
|
+
async _reset_circuit(id, params, options) {
|
31
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Webhooks.TYPE, _reset_circuit: true }, params, options);
|
32
|
+
}
|
33
|
+
isWebhook(resource) {
|
34
|
+
return resource.type && resource.type === _Webhooks.TYPE;
|
35
|
+
}
|
36
|
+
relationship(id) {
|
37
|
+
return super.relationshipOneToOne(id);
|
38
|
+
}
|
39
|
+
relationshipToMany(...ids) {
|
40
|
+
return super.relationshipOneToMany(...ids);
|
41
|
+
}
|
42
|
+
type() {
|
43
|
+
return _Webhooks.TYPE;
|
44
|
+
}
|
45
|
+
};
|
46
|
+
__publicField(_Webhooks, "TYPE", "webhooks");
|
47
|
+
let Webhooks = _Webhooks;
|
48
|
+
var webhooks_default = Webhooks;
|
49
|
+
|
50
|
+
export { webhooks_default as default };
|
@@ -0,0 +1,45 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
var resource = require('../resource');
|
4
|
+
|
5
|
+
var __defProp = Object.defineProperty;
|
6
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
7
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, key + "" , value);
|
8
|
+
const _WireTransfers = class _WireTransfers extends resource.ApiResource {
|
9
|
+
async create(resource, params, options) {
|
10
|
+
return this.resources.create({ ...resource, type: _WireTransfers.TYPE }, params, options);
|
11
|
+
}
|
12
|
+
async update(resource, params, options) {
|
13
|
+
return this.resources.update({ ...resource, type: _WireTransfers.TYPE }, params, options);
|
14
|
+
}
|
15
|
+
async delete(id, options) {
|
16
|
+
await this.resources.delete(typeof id === "string" ? { id, type: _WireTransfers.TYPE } : id, options);
|
17
|
+
}
|
18
|
+
async order(wireTransferId, params, options) {
|
19
|
+
const _wireTransferId = wireTransferId.id || wireTransferId;
|
20
|
+
return this.resources.fetch({ type: "orders" }, `wire_transfers/${_wireTransferId}/order`, params, options);
|
21
|
+
}
|
22
|
+
async versions(wireTransferId, params, options) {
|
23
|
+
const _wireTransferId = wireTransferId.id || wireTransferId;
|
24
|
+
return this.resources.fetch({ type: "versions" }, `wire_transfers/${_wireTransferId}/versions`, params, options);
|
25
|
+
}
|
26
|
+
isWireTransfer(resource) {
|
27
|
+
return resource.type && resource.type === _WireTransfers.TYPE;
|
28
|
+
}
|
29
|
+
relationship(id) {
|
30
|
+
return super.relationshipOneToOne(id);
|
31
|
+
}
|
32
|
+
relationshipToMany(...ids) {
|
33
|
+
return super.relationshipOneToMany(...ids);
|
34
|
+
}
|
35
|
+
type() {
|
36
|
+
return _WireTransfers.TYPE;
|
37
|
+
}
|
38
|
+
};
|
39
|
+
__publicField(_WireTransfers, "TYPE", "wire_transfers");
|
40
|
+
let WireTransfers = _WireTransfers;
|
41
|
+
var wire_transfers_default = WireTransfers;
|
42
|
+
|
43
|
+
module.exports = wire_transfers_default;
|
44
|
+
|
45
|
+
module.exports = exports.default;
|
@@ -0,0 +1,41 @@
|
|
1
|
+
import { ApiResource } from '../resource';
|
2
|
+
|
3
|
+
var __defProp = Object.defineProperty;
|
4
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
5
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, key + "" , value);
|
6
|
+
const _WireTransfers = class _WireTransfers extends ApiResource {
|
7
|
+
async create(resource, params, options) {
|
8
|
+
return this.resources.create({ ...resource, type: _WireTransfers.TYPE }, params, options);
|
9
|
+
}
|
10
|
+
async update(resource, params, options) {
|
11
|
+
return this.resources.update({ ...resource, type: _WireTransfers.TYPE }, params, options);
|
12
|
+
}
|
13
|
+
async delete(id, options) {
|
14
|
+
await this.resources.delete(typeof id === "string" ? { id, type: _WireTransfers.TYPE } : id, options);
|
15
|
+
}
|
16
|
+
async order(wireTransferId, params, options) {
|
17
|
+
const _wireTransferId = wireTransferId.id || wireTransferId;
|
18
|
+
return this.resources.fetch({ type: "orders" }, `wire_transfers/${_wireTransferId}/order`, params, options);
|
19
|
+
}
|
20
|
+
async versions(wireTransferId, params, options) {
|
21
|
+
const _wireTransferId = wireTransferId.id || wireTransferId;
|
22
|
+
return this.resources.fetch({ type: "versions" }, `wire_transfers/${_wireTransferId}/versions`, params, options);
|
23
|
+
}
|
24
|
+
isWireTransfer(resource) {
|
25
|
+
return resource.type && resource.type === _WireTransfers.TYPE;
|
26
|
+
}
|
27
|
+
relationship(id) {
|
28
|
+
return super.relationshipOneToOne(id);
|
29
|
+
}
|
30
|
+
relationshipToMany(...ids) {
|
31
|
+
return super.relationshipOneToMany(...ids);
|
32
|
+
}
|
33
|
+
type() {
|
34
|
+
return _WireTransfers.TYPE;
|
35
|
+
}
|
36
|
+
};
|
37
|
+
__publicField(_WireTransfers, "TYPE", "wire_transfers");
|
38
|
+
let WireTransfers = _WireTransfers;
|
39
|
+
var wire_transfers_default = WireTransfers;
|
40
|
+
|
41
|
+
export { wire_transfers_default as default };
|
package/lib/static.cjs
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
var api = require('./api');
|
4
|
+
var error = require('./error');
|
5
|
+
var CommerceLayer = require('./commercelayer');
|
6
|
+
var util = require('./util');
|
7
|
+
|
8
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
9
|
+
|
10
|
+
var CommerceLayer__default = /*#__PURE__*/_interopDefault(CommerceLayer);
|
11
|
+
|
12
|
+
const CommerceLayerStatic = {
|
13
|
+
resources: (sort) => {
|
14
|
+
return sort ? [...api.resourceList].sort() : api.resourceList;
|
15
|
+
},
|
16
|
+
singletons: (sort) => {
|
17
|
+
return sort ? [...api.singletonList].sort() : api.singletonList;
|
18
|
+
},
|
19
|
+
isSingleton: (resource) => {
|
20
|
+
return api.singletonList.includes(resource);
|
21
|
+
},
|
22
|
+
isSdkError: (error$1) => {
|
23
|
+
return error.SdkError.isSdkError(error$1);
|
24
|
+
},
|
25
|
+
isApiError: (error$1) => {
|
26
|
+
return error.ApiError.isApiError(error$1);
|
27
|
+
},
|
28
|
+
init: (config) => {
|
29
|
+
return CommerceLayer__default.default(config);
|
30
|
+
},
|
31
|
+
isTokenExpired: (token) => {
|
32
|
+
return util.isTokenExpired(token);
|
33
|
+
},
|
34
|
+
get schemaVersion() {
|
35
|
+
return CommerceLayer.OPEN_API_SCHEMA_VERSION;
|
36
|
+
}
|
37
|
+
};
|
38
|
+
|
39
|
+
exports.CommerceLayerStatic = CommerceLayerStatic;
|
package/lib/static.d.cts
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
import { hf as ResourceTypeLock } from './api-BYcswOJ0.cjs';
|
2
|
+
import { SdkError, ApiError } from './error.cjs';
|
3
|
+
import { CommerceLayerInitConfig, CommerceLayerClient } from './commercelayer.cjs';
|
4
|
+
import './client.cjs';
|
5
|
+
import './interceptor-5MISI1yn.cjs';
|
6
|
+
import './types.cjs';
|
7
|
+
|
8
|
+
declare const CommerceLayerStatic: {
|
9
|
+
resources: (sort?: boolean) => readonly string[];
|
10
|
+
singletons: (sort?: boolean) => readonly string[];
|
11
|
+
isSingleton: (resource: ResourceTypeLock) => boolean;
|
12
|
+
isSdkError: (error: unknown) => error is SdkError;
|
13
|
+
isApiError: (error: unknown) => error is ApiError;
|
14
|
+
init: (config: CommerceLayerInitConfig) => CommerceLayerClient;
|
15
|
+
isTokenExpired: (token: string) => boolean;
|
16
|
+
readonly schemaVersion: string;
|
17
|
+
};
|
18
|
+
|
19
|
+
export { CommerceLayerStatic };
|
package/lib/static.d.ts
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
import { hf as ResourceTypeLock } from './api-Cknm0QL_.js';
|
2
|
+
import { SdkError, ApiError } from './error.js';
|
3
|
+
import { CommerceLayerInitConfig, CommerceLayerClient } from './commercelayer.js';
|
4
|
+
import './client.js';
|
5
|
+
import './interceptor-5MISI1yn.js';
|
6
|
+
import './types.js';
|
7
|
+
|
8
|
+
declare const CommerceLayerStatic: {
|
9
|
+
resources: (sort?: boolean) => readonly string[];
|
10
|
+
singletons: (sort?: boolean) => readonly string[];
|
11
|
+
isSingleton: (resource: ResourceTypeLock) => boolean;
|
12
|
+
isSdkError: (error: unknown) => error is SdkError;
|
13
|
+
isApiError: (error: unknown) => error is ApiError;
|
14
|
+
init: (config: CommerceLayerInitConfig) => CommerceLayerClient;
|
15
|
+
isTokenExpired: (token: string) => boolean;
|
16
|
+
readonly schemaVersion: string;
|
17
|
+
};
|
18
|
+
|
19
|
+
export { CommerceLayerStatic };
|
package/lib/static.js
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
import { singletonList, resourceList } from './api';
|
2
|
+
import { ApiError, SdkError } from './error';
|
3
|
+
import CommerceLayer, { OPEN_API_SCHEMA_VERSION } from './commercelayer';
|
4
|
+
import { isTokenExpired } from './util';
|
5
|
+
|
6
|
+
const CommerceLayerStatic = {
|
7
|
+
resources: (sort) => {
|
8
|
+
return sort ? [...resourceList].sort() : resourceList;
|
9
|
+
},
|
10
|
+
singletons: (sort) => {
|
11
|
+
return sort ? [...singletonList].sort() : singletonList;
|
12
|
+
},
|
13
|
+
isSingleton: (resource) => {
|
14
|
+
return singletonList.includes(resource);
|
15
|
+
},
|
16
|
+
isSdkError: (error) => {
|
17
|
+
return SdkError.isSdkError(error);
|
18
|
+
},
|
19
|
+
isApiError: (error) => {
|
20
|
+
return ApiError.isApiError(error);
|
21
|
+
},
|
22
|
+
init: (config) => {
|
23
|
+
return CommerceLayer(config);
|
24
|
+
},
|
25
|
+
isTokenExpired: (token) => {
|
26
|
+
return isTokenExpired(token);
|
27
|
+
},
|
28
|
+
get schemaVersion() {
|
29
|
+
return OPEN_API_SCHEMA_VERSION;
|
30
|
+
}
|
31
|
+
};
|
32
|
+
|
33
|
+
export { CommerceLayerStatic };
|
package/lib/types.cjs
ADDED
package/lib/types.d.cts
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
type ObjectType = Record<string, any>;
|
2
|
+
type CreateArrayWithLengthX<LENGTH extends number, ACC extends unknown[] = []> = ACC['length'] extends LENGTH ? ACC : CreateArrayWithLengthX<LENGTH, [...ACC, 1]>;
|
3
|
+
type NumericNumberRange<START_ARR extends number[], END extends number, ACC extends number = never> = START_ARR['length'] extends END ? ACC | END : NumericNumberRange<[...START_ARR, 1], END, ACC | START_ARR['length']>;
|
4
|
+
type PositiveNumberRange<MAX extends number> = NumericNumberRange<CreateArrayWithLengthX<1>, MAX>;
|
5
|
+
type StringKey<T> = Extract<keyof T, string>;
|
6
|
+
|
7
|
+
export type { ObjectType, PositiveNumberRange, StringKey };
|
package/lib/types.d.ts
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
type ObjectType = Record<string, any>;
|
2
|
+
type CreateArrayWithLengthX<LENGTH extends number, ACC extends unknown[] = []> = ACC['length'] extends LENGTH ? ACC : CreateArrayWithLengthX<LENGTH, [...ACC, 1]>;
|
3
|
+
type NumericNumberRange<START_ARR extends number[], END extends number, ACC extends number = never> = START_ARR['length'] extends END ? ACC | END : NumericNumberRange<[...START_ARR, 1], END, ACC | START_ARR['length']>;
|
4
|
+
type PositiveNumberRange<MAX extends number> = NumericNumberRange<CreateArrayWithLengthX<1>, MAX>;
|
5
|
+
type StringKey<T> = Extract<keyof T, string>;
|
6
|
+
|
7
|
+
export type { ObjectType, PositiveNumberRange, StringKey };
|
package/lib/types.js
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
|
package/lib/util.cjs
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
const sleep = async (ms) => {
|
4
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
5
|
+
};
|
6
|
+
const sortObjectFields = (obj) => {
|
7
|
+
const sorted = Object.keys(obj).sort().reduce((accumulator, key) => {
|
8
|
+
accumulator[key] = obj[key];
|
9
|
+
return accumulator;
|
10
|
+
}, {});
|
11
|
+
return sorted;
|
12
|
+
};
|
13
|
+
const extractTokenData = (token) => {
|
14
|
+
try {
|
15
|
+
const data = JSON.parse(atob(token.split(".")[1]));
|
16
|
+
return {
|
17
|
+
organization: data.organization.slug,
|
18
|
+
domain: data.iss ? String(data.iss).replace("https://auth.", "") : void 0,
|
19
|
+
expiration: data.exp
|
20
|
+
};
|
21
|
+
} catch (err) {
|
22
|
+
return void 0;
|
23
|
+
}
|
24
|
+
};
|
25
|
+
const isTokenExpired = (token) => {
|
26
|
+
try {
|
27
|
+
const tokenData = extractTokenData(token);
|
28
|
+
return tokenData?.expiration ? tokenData.expiration * 1e3 - Date.now() < 0 : false;
|
29
|
+
} catch (err) {
|
30
|
+
return false;
|
31
|
+
}
|
32
|
+
};
|
33
|
+
|
34
|
+
exports.extractTokenData = extractTokenData;
|
35
|
+
exports.isTokenExpired = isTokenExpired;
|
36
|
+
exports.sleep = sleep;
|
37
|
+
exports.sortObjectFields = sortObjectFields;
|
package/lib/util.d.cts
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
import { ObjectType } from './types.cjs';
|
2
|
+
|
3
|
+
declare const sleep: (ms: number) => Promise<NodeJS.Timeout>;
|
4
|
+
declare const sortObjectFields: (obj: ObjectType) => ObjectType;
|
5
|
+
type TokenData = {
|
6
|
+
organization: string;
|
7
|
+
domain?: string;
|
8
|
+
expiration: number;
|
9
|
+
};
|
10
|
+
declare const extractTokenData: (token: string) => TokenData | undefined;
|
11
|
+
declare const isTokenExpired: (token: string) => boolean;
|
12
|
+
|
13
|
+
export { type TokenData, extractTokenData, isTokenExpired, sleep, sortObjectFields };
|