@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,114 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
+
|
5
|
+
var _enum = require('./enum');
|
6
|
+
var error = require('./error');
|
7
|
+
var resource = require('./resource');
|
8
|
+
var Debug = require('./debug');
|
9
|
+
|
10
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
11
|
+
|
12
|
+
var Debug__default = /*#__PURE__*/_interopDefault(Debug);
|
13
|
+
|
14
|
+
const debug = Debug__default.default("commercelayer");
|
15
|
+
const OPEN_API_SCHEMA_VERSION = "7.8.3";
|
16
|
+
class CommerceLayerClient {
|
17
|
+
static get openApiSchemaVersion() {
|
18
|
+
return OPEN_API_SCHEMA_VERSION;
|
19
|
+
}
|
20
|
+
openApiSchemaVersion = OPEN_API_SCHEMA_VERSION;
|
21
|
+
static cl;
|
22
|
+
// ##__CL_RESOURCES_DEF_START__##
|
23
|
+
// ##__CL_RESOURCES_DEF_TEMPLATE:: ##__TAB__#####__RESOURCE_TYPE__##?: api.##__RESOURCE_CLASS__##
|
24
|
+
// ##__CL_RESOURCES_DEF_STOP__##
|
25
|
+
static get(config) {
|
26
|
+
if (config) return CommerceLayerClient.cl = new CommerceLayerClient(config);
|
27
|
+
else if (!CommerceLayerClient.cl) throw new Error("CommerceLayer client not initialized");
|
28
|
+
return CommerceLayerClient.cl;
|
29
|
+
}
|
30
|
+
constructor(config) {
|
31
|
+
debug("new commercelayer instance %O", config);
|
32
|
+
resource.ApiResourceAdapter.init(config);
|
33
|
+
}
|
34
|
+
// ##__CL_RESOURCES_LEAZY_LOADING_START__##
|
35
|
+
// ##__CL_RESOURCES_LEAZY_LOADING_TEMPLATE:: ##__TAB__##get ##__RESOURCE_TYPE__##(): api.##__RESOURCE_CLASS__## { return this.###__RESOURCE_TYPE__## || (this.###__RESOURCE_TYPE__## = new api.##__RESOURCE_CLASS__##(this.#adapter)) }
|
36
|
+
// ##__CL_RESOURCES_LEAZY_LOADING_STOP__##
|
37
|
+
// private get adapter(): ResourceAdapter { return ApiResourceAdapter.get() }
|
38
|
+
get currentOrganization() {
|
39
|
+
return resource.ApiResourceAdapter.get().client?.currentOrganization;
|
40
|
+
}
|
41
|
+
get currentAccessToken() {
|
42
|
+
return resource.ApiResourceAdapter.get().client?.currentAccessToken;
|
43
|
+
}
|
44
|
+
get interceptors() {
|
45
|
+
return resource.ApiResourceAdapter.get().client?.interceptors;
|
46
|
+
}
|
47
|
+
localConfig(config) {
|
48
|
+
}
|
49
|
+
config(config) {
|
50
|
+
debug("config %o", config);
|
51
|
+
this.localConfig(config);
|
52
|
+
resource.ApiResourceAdapter.config(config);
|
53
|
+
return this;
|
54
|
+
}
|
55
|
+
resources(sort) {
|
56
|
+
return _enum.getResources(sort);
|
57
|
+
}
|
58
|
+
isApiError(error$1) {
|
59
|
+
return error.isApiError(error$1);
|
60
|
+
}
|
61
|
+
addRequestInterceptor(onSuccess, onFailure) {
|
62
|
+
this.interceptors.request = { onSuccess, onFailure };
|
63
|
+
return 1;
|
64
|
+
}
|
65
|
+
addResponseInterceptor(onSuccess, onFailure) {
|
66
|
+
this.interceptors.response = { onSuccess, onFailure };
|
67
|
+
return 1;
|
68
|
+
}
|
69
|
+
removeInterceptor(type, id = 1) {
|
70
|
+
this.interceptors[type] = void 0;
|
71
|
+
}
|
72
|
+
removeInterceptors() {
|
73
|
+
this.removeInterceptor("request");
|
74
|
+
this.removeInterceptor("response");
|
75
|
+
this.removeRawResponseReader();
|
76
|
+
}
|
77
|
+
addRawResponseReader(options) {
|
78
|
+
const reader = {
|
79
|
+
id: 0,
|
80
|
+
rawResponse: void 0,
|
81
|
+
headers: void 0,
|
82
|
+
ok: true
|
83
|
+
};
|
84
|
+
async function rawResponseInterceptor(response) {
|
85
|
+
reader.rawResponse = await response?.clone().json().catch(() => {
|
86
|
+
});
|
87
|
+
reader.ok = response.ok;
|
88
|
+
if (options?.headers) {
|
89
|
+
const ho = {};
|
90
|
+
response.headers.forEach((value, key) => {
|
91
|
+
ho[key] = value;
|
92
|
+
});
|
93
|
+
reader.headers = ho;
|
94
|
+
}
|
95
|
+
return response;
|
96
|
+
}
|
97
|
+
this.interceptors.rawReader = { onSuccess: rawResponseInterceptor, onFailure: rawResponseInterceptor };
|
98
|
+
reader.id = 1;
|
99
|
+
return reader;
|
100
|
+
}
|
101
|
+
removeRawResponseReader() {
|
102
|
+
this.interceptors.rawReader = void 0;
|
103
|
+
}
|
104
|
+
}
|
105
|
+
const CommerceLayer = (config) => {
|
106
|
+
return CommerceLayerClient.get(config);
|
107
|
+
};
|
108
|
+
var commercelayer_default = CommerceLayer;
|
109
|
+
|
110
|
+
exports.CommerceLayer = CommerceLayer;
|
111
|
+
exports.OPEN_API_SCHEMA_VERSION = OPEN_API_SCHEMA_VERSION;
|
112
|
+
exports.default = commercelayer_default;
|
113
|
+
//# sourceMappingURL=commercelayer.cjs.map
|
114
|
+
//# sourceMappingURL=commercelayer.cjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../src/commercelayer.ts"],"names":["Debug","ApiResourceAdapter","getResources","error","isApiError"],"mappings":";;;;;;;;;;;;;AASA,MAAM,KAAA,GAAQA,uBAAM,eAAe,CAAA;AAInC,MAAM,uBAA0B,GAAA;AAchC,MAAM,mBAAoB,CAAA;AAAA,EAEzB,WAAW,oBAA+B,GAAA;AAAE,IAAO,OAAA,uBAAA;AAAA;AAAwB,EAClE,oBAAuB,GAAA,uBAAA;AAAA,EAEhC,OAAe,EAAA;AAAA;AAAA;AAAA;AAAA,EAOf,OAAO,IAAK,MAAuD,EAAA;AAClE,IAAA,IAAI,QAAgB,OAAA,mBAAA,CAAoB,EAAK,GAAA,IAAI,oBAAoB,MAAM,CAAA;AAAA,SAAA,IAEvE,CAAC,mBAAoB,CAAA,EAAA,EAAU,MAAA,IAAI,MAAM,sCAAsC,CAAA;AACnF,IAAA,OAAO,mBAAoB,CAAA,EAAA;AAAA;AAC5B,EAGQ,YAAY,MAAiC,EAAA;AAEpD,IAAA,KAAA,CAAM,iCAAiC,MAAM,CAAA;AAE7C,IAAAC,2BAAA,CAAmB,KAAK,MAAM,CAAA;AAAA;AAM/B;AAAA;AAAA;AAAA;AAAA,EAOA,IAAI,mBAA8B,GAAA;AAAE,IAAO,OAAAA,2BAAA,CAAmB,GAAI,EAAA,CAAE,MAAQ,EAAA,mBAAA;AAAA;AAAoB,EAChG,IAAI,kBAA6B,GAAA;AAAE,IAAO,OAAAA,2BAAA,CAAmB,GAAI,EAAA,CAAE,MAAQ,EAAA,kBAAA;AAAA;AAAmB,EAC9F,IAAY,YAAmC,GAAA;AAAE,IAAO,OAAAA,2BAAA,CAAmB,GAAI,EAAA,CAAE,MAAQ,EAAA,YAAA;AAAA;AAAa,EAG9F,YAAY,MAAkC,EAAA;AAAA;AAEtD,EAGA,OAAO,MAAmC,EAAA;AAEzC,IAAA,KAAA,CAAM,aAAa,MAAM,CAAA;AAGzB,IAAA,IAAA,CAAK,YAAY,MAAM,CAAA;AAEvB,IAAAA,2BAAA,CAAmB,OAAO,MAAM,CAAA;AAEhC,IAAO,OAAA,IAAA;AAAA;AAER,EAGA,UAAU,IAAmC,EAAA;AAC5C,IAAA,OAAOC,mBAAa,IAAI,CAAA;AAAA;AACzB,EAEA,WAAWC,OAA+B,EAAA;AACzC,IAAA,OAAOC,iBAAWD,OAAK,CAAA;AAAA;AACxB,EAGA,qBAAA,CAAsB,WAAgC,SAAsC,EAAA;AAC3F,IAAA,IAAA,CAAK,YAAa,CAAA,OAAA,GAAU,EAAE,SAAA,EAAW,SAAU,EAAA;AACnD,IAAO,OAAA,CAAA;AAAA;AACR,EAEA,sBAAA,CAAuB,WAAiC,SAAsC,EAAA;AAC7F,IAAA,IAAA,CAAK,YAAa,CAAA,QAAA,GAAW,EAAE,SAAA,EAAW,SAAU,EAAA;AACpD,IAAO,OAAA,CAAA;AAAA;AACR,EAEA,iBAAA,CAAkB,IAAuB,EAAA,EAAA,GAAa,CAAS,EAAA;AAC9D,IAAK,IAAA,CAAA,YAAA,CAAa,IAAI,CAAI,GAAA,MAAA;AAAA;AAC3B,EAEA,kBAA2B,GAAA;AAC1B,IAAA,IAAA,CAAK,kBAAkB,SAAS,CAAA;AAChC,IAAA,IAAA,CAAK,kBAAkB,UAAU,CAAA;AACjC,IAAA,IAAA,CAAK,uBAAwB,EAAA;AAAA;AAC9B,EAEA,qBAAqB,OAAmD,EAAA;AAEvE,IAAA,MAAM,MAA4B,GAAA;AAAA,MACjC,EAAI,EAAA,CAAA;AAAA,MACJ,WAAa,EAAA,MAAA;AAAA,MACb,OAAS,EAAA,MAAA;AAAA,MACT,EAAI,EAAA;AAAA,KACL;AAEA,IAAA,eAAe,uBAAuB,QAA6C,EAAA;AAClF,MAAO,MAAA,CAAA,WAAA,GAAc,MAAM,QAAU,EAAA,KAAA,GAAQ,IAAK,EAAA,CAAE,MAAM,MAAM;AAAA,OAAE,CAAA;AAClE,MAAA,MAAA,CAAO,KAAK,QAAS,CAAA,EAAA;AACrB,MAAA,IAAI,SAAS,OAAS,EAAA;AACrB,QAAA,MAAM,KAAiB,EAAC;AACxB,QAAA,QAAA,CAAS,OAAQ,CAAA,OAAA,CAAQ,CAAC,KAAA,EAAO,GAAQ,KAAA;AAAE,UAAA,EAAA,CAAG,GAAG,CAAI,GAAA,KAAA;AAAA,SAAO,CAAA;AAC5D,QAAA,MAAA,CAAO,OAAU,GAAA,EAAA;AAAA;AAElB,MAAO,OAAA,QAAA;AAAA;AAGiB,IAAA,IAAA,CAAK,aAAa,SAAY,GAAA,EAAE,SAAW,EAAA,sBAAA,EAAwB,WAAW,sBAAuB,EAAA;AAC9H,IAAA,MAAA,CAAO,EAAK,GAAA,CAAA;AAEZ,IAAO,OAAA,MAAA;AAAA;AAER,EAEA,uBAAwE,GAAA;AAKvE,IAAA,IAAA,CAAK,aAAa,SAAY,GAAA,MAAA;AAAA;AAGhC;AAIM,MAAA,aAAA,GAAgB,CAAC,MAAyD,KAAA;AAC/E,EAAO,OAAA,mBAAA,CAAoB,IAAI,MAAM,CAAA;AACtC;AAGA,IAAO,qBAAQ,GAAA","file":"commercelayer.cjs","sourcesContent":["\n// import * as api from './api'\nimport { getResources } from './enum'\nimport { isApiError, type ApiError } from './error'\nimport type { ErrorInterceptor, InterceptorType, RawResponseReader, RequestInterceptor, ResponseInterceptor, ResponseObj, HeadersObj, InterceptorManager } from './interceptor'\nimport { ApiResourceAdapter, type ResourcesInitConfig } from './resource'\n\n\nimport Debug from './debug'\nconst debug = Debug('commercelayer')\n\n\n// Autogenerated schema version number, do not remove this line\nconst OPEN_API_SCHEMA_VERSION = '7.8.3'\nexport { OPEN_API_SCHEMA_VERSION }\n\n\n// SDK local configuration\ntype SdkConfig = {\n\t// abc?: string\n}\n\ntype CommerceLayerInitConfig = SdkConfig & ResourcesInitConfig\ntype CommerceLayerConfig = Partial<CommerceLayerInitConfig>\n\n\n\nclass CommerceLayerClient {\n\n\tstatic get openApiSchemaVersion(): string { return OPEN_API_SCHEMA_VERSION }\n\treadonly openApiSchemaVersion = OPEN_API_SCHEMA_VERSION\n\n\tprivate static cl: CommerceLayerClient\n\n\t// ##__CL_RESOURCES_DEF_START__##\n\t// ##__CL_RESOURCES_DEF_TEMPLATE:: ##__TAB__#####__RESOURCE_TYPE__##?: api.##__RESOURCE_CLASS__##\n\t// ##__CL_RESOURCES_DEF_STOP__##\n\n\n\tstatic get (config?: CommerceLayerInitConfig): CommerceLayerClient {\n\t\tif (config) return (CommerceLayerClient.cl = new CommerceLayerClient(config))\n\t\telse\n\t\tif (!CommerceLayerClient.cl) throw new Error('CommerceLayer client not initialized')\n\t\treturn CommerceLayerClient.cl\n\t}\n\n\n\tprivate constructor(config: CommerceLayerInitConfig) {\n\n\t\tdebug('new commercelayer instance %O', config)\n\n\t\tApiResourceAdapter.init(config)\n\n\t\t// ##__CL_RESOURCES_INIT_START__##\n\t\t// ##__CL_RESOURCES_INIT_TEMPLATE:: ##__TAB__####__TAB__##this.##__RESOURCE_TYPE__## = new api.##__RESOURCE_CLASS__##(this.#adapter)\n\t\t// ##__CL_RESOURCES_INIT_STOP__##\n\n\t}\n\n\t// ##__CL_RESOURCES_LEAZY_LOADING_START__##\n\t// ##__CL_RESOURCES_LEAZY_LOADING_TEMPLATE:: ##__TAB__##get ##__RESOURCE_TYPE__##(): api.##__RESOURCE_CLASS__## { return this.###__RESOURCE_TYPE__## || (this.###__RESOURCE_TYPE__## = new api.##__RESOURCE_CLASS__##(this.#adapter)) }\n\t// ##__CL_RESOURCES_LEAZY_LOADING_STOP__##\n\n\t// private get adapter(): ResourceAdapter { return ApiResourceAdapter.get() }\n\tget currentOrganization(): string { return ApiResourceAdapter.get().client?.currentOrganization }\n\tget currentAccessToken(): string { return ApiResourceAdapter.get().client?.currentAccessToken }\n\tprivate get interceptors(): InterceptorManager { return ApiResourceAdapter.get().client?.interceptors }\n\n\n\tprivate localConfig(config: Partial<SdkConfig>): void {\n\t\t// if (config.abc) this.abc = config.abc\n\t}\n\n\n\tconfig(config: CommerceLayerConfig): this {\n\n\t\tdebug('config %o', config)\n\n\t\t// CommerceLayer config\n\t\tthis.localConfig(config)\n\t\t// ResourceAdapter config\n\t\tApiResourceAdapter.config(config)\n\n\t\treturn this\n\n\t}\n\n\t\n\tresources(sort?: boolean): readonly string[] {\n\t\treturn getResources(sort)\n\t}\n\n\tisApiError(error: any): error is ApiError {\n\t\treturn isApiError(error)\n\t}\n\n\n\taddRequestInterceptor(onSuccess?: RequestInterceptor, onFailure?: ErrorInterceptor): number {\n\t\tthis.interceptors.request = { onSuccess, onFailure }\n\t\treturn 1\n\t}\n\n\taddResponseInterceptor(onSuccess?: ResponseInterceptor, onFailure?: ErrorInterceptor): number {\n\t\tthis.interceptors.response = { onSuccess, onFailure }\n\t\treturn 1\n\t}\n\n\tremoveInterceptor(type: InterceptorType, id: number = 1): void {\n\t\tthis.interceptors[type] = undefined\n\t}\n\n\tremoveInterceptors(): void {\n\t\tthis.removeInterceptor('request')\n\t\tthis.removeInterceptor('response')\n\t\tthis.removeRawResponseReader()\n\t}\n\n\taddRawResponseReader(options?: { headers: boolean }): RawResponseReader {\n\n\t\tconst reader: RawResponseReader = {\n\t\t\tid: 0,\n\t\t\trawResponse: undefined,\n\t\t\theaders: undefined,\n\t\t\tok: true\n\t\t}\n\n\t\tasync function rawResponseInterceptor(response: ResponseObj): Promise<ResponseObj> {\n\t\t\treader.rawResponse = await response?.clone().json().catch(() => {})\n\t\t\treader.ok = response.ok\n\t\t\tif (options?.headers) {\n\t\t\t\tconst ho: HeadersObj = {}\n\t\t\t\tresponse.headers.forEach((value, key) => { ho[key] = value })\n\t\t\t\treader.headers = ho\n\t\t\t}\n\t\t\treturn response\n\t\t}\n\t\t\n\t\t/* const interceptor = */this.interceptors.rawReader = { onSuccess: rawResponseInterceptor, onFailure: rawResponseInterceptor }\n\t\treader.id = 1 // interceptor\n\n\t\treturn reader\n\n\t}\n\n\tremoveRawResponseReader(/* reader: number | RawResponseReader */): void {\n\t\t/*\n\t\tconst id = (typeof reader === 'number') ? reader : reader?.id\n\t\tif (id && (id >= 0)) this.removeInterceptor('response', id)\n\t\t*/\n\t\tthis.interceptors.rawReader = undefined\n\t}\n\n}\n\n\n\nconst CommerceLayer = (config: CommerceLayerInitConfig): CommerceLayerClient => {\n\treturn CommerceLayerClient.get(config)\n}\n\n\nexport default CommerceLayer\nexport { CommerceLayer }\n\nexport type { CommerceLayerClient, CommerceLayerConfig, CommerceLayerInitConfig }\n"]}
|
@@ -0,0 +1,36 @@
|
|
1
|
+
import { ApiError } from './error.cjs';
|
2
|
+
import { b as RequestInterceptor, c as ErrorInterceptor, d as ResponseInterceptor, I as InterceptorType, e as RawResponseReader } from './interceptor-5MISI1yn.cjs';
|
3
|
+
import { r as ResourcesInitConfig } from './api-DmIZO_Np.cjs';
|
4
|
+
import './client.cjs';
|
5
|
+
import './types.cjs';
|
6
|
+
|
7
|
+
declare const OPEN_API_SCHEMA_VERSION = "7.8.3";
|
8
|
+
|
9
|
+
type SdkConfig = {};
|
10
|
+
type CommerceLayerInitConfig = SdkConfig & ResourcesInitConfig;
|
11
|
+
type CommerceLayerConfig = Partial<CommerceLayerInitConfig>;
|
12
|
+
declare class CommerceLayerClient {
|
13
|
+
static get openApiSchemaVersion(): string;
|
14
|
+
readonly openApiSchemaVersion = "7.8.3";
|
15
|
+
private static cl;
|
16
|
+
static get(config?: CommerceLayerInitConfig): CommerceLayerClient;
|
17
|
+
private constructor();
|
18
|
+
get currentOrganization(): string;
|
19
|
+
get currentAccessToken(): string;
|
20
|
+
private get interceptors();
|
21
|
+
private localConfig;
|
22
|
+
config(config: CommerceLayerConfig): this;
|
23
|
+
resources(sort?: boolean): readonly string[];
|
24
|
+
isApiError(error: any): error is ApiError;
|
25
|
+
addRequestInterceptor(onSuccess?: RequestInterceptor, onFailure?: ErrorInterceptor): number;
|
26
|
+
addResponseInterceptor(onSuccess?: ResponseInterceptor, onFailure?: ErrorInterceptor): number;
|
27
|
+
removeInterceptor(type: InterceptorType, id?: number): void;
|
28
|
+
removeInterceptors(): void;
|
29
|
+
addRawResponseReader(options?: {
|
30
|
+
headers: boolean;
|
31
|
+
}): RawResponseReader;
|
32
|
+
removeRawResponseReader(): void;
|
33
|
+
}
|
34
|
+
declare const CommerceLayer: (config: CommerceLayerInitConfig) => CommerceLayerClient;
|
35
|
+
|
36
|
+
export { CommerceLayer, CommerceLayerClient, type CommerceLayerConfig, type CommerceLayerInitConfig, OPEN_API_SCHEMA_VERSION, CommerceLayer as default };
|
@@ -0,0 +1,36 @@
|
|
1
|
+
import { ApiError } from './error.js';
|
2
|
+
import { b as RequestInterceptor, c as ErrorInterceptor, d as ResponseInterceptor, I as InterceptorType, e as RawResponseReader } from './interceptor-5MISI1yn.js';
|
3
|
+
import { r as ResourcesInitConfig } from './api-DDgIE2i8.js';
|
4
|
+
import './client.js';
|
5
|
+
import './types.js';
|
6
|
+
|
7
|
+
declare const OPEN_API_SCHEMA_VERSION = "7.8.3";
|
8
|
+
|
9
|
+
type SdkConfig = {};
|
10
|
+
type CommerceLayerInitConfig = SdkConfig & ResourcesInitConfig;
|
11
|
+
type CommerceLayerConfig = Partial<CommerceLayerInitConfig>;
|
12
|
+
declare class CommerceLayerClient {
|
13
|
+
static get openApiSchemaVersion(): string;
|
14
|
+
readonly openApiSchemaVersion = "7.8.3";
|
15
|
+
private static cl;
|
16
|
+
static get(config?: CommerceLayerInitConfig): CommerceLayerClient;
|
17
|
+
private constructor();
|
18
|
+
get currentOrganization(): string;
|
19
|
+
get currentAccessToken(): string;
|
20
|
+
private get interceptors();
|
21
|
+
private localConfig;
|
22
|
+
config(config: CommerceLayerConfig): this;
|
23
|
+
resources(sort?: boolean): readonly string[];
|
24
|
+
isApiError(error: any): error is ApiError;
|
25
|
+
addRequestInterceptor(onSuccess?: RequestInterceptor, onFailure?: ErrorInterceptor): number;
|
26
|
+
addResponseInterceptor(onSuccess?: ResponseInterceptor, onFailure?: ErrorInterceptor): number;
|
27
|
+
removeInterceptor(type: InterceptorType, id?: number): void;
|
28
|
+
removeInterceptors(): void;
|
29
|
+
addRawResponseReader(options?: {
|
30
|
+
headers: boolean;
|
31
|
+
}): RawResponseReader;
|
32
|
+
removeRawResponseReader(): void;
|
33
|
+
}
|
34
|
+
declare const CommerceLayer: (config: CommerceLayerInitConfig) => CommerceLayerClient;
|
35
|
+
|
36
|
+
export { CommerceLayer, CommerceLayerClient, type CommerceLayerConfig, type CommerceLayerInitConfig, OPEN_API_SCHEMA_VERSION, CommerceLayer as default };
|
@@ -0,0 +1,104 @@
|
|
1
|
+
import { getResources } from './enum';
|
2
|
+
import { isApiError } from './error';
|
3
|
+
import { ApiResourceAdapter } from './resource';
|
4
|
+
import Debug from './debug';
|
5
|
+
|
6
|
+
const debug = Debug("commercelayer");
|
7
|
+
const OPEN_API_SCHEMA_VERSION = "7.8.3";
|
8
|
+
class CommerceLayerClient {
|
9
|
+
static get openApiSchemaVersion() {
|
10
|
+
return OPEN_API_SCHEMA_VERSION;
|
11
|
+
}
|
12
|
+
openApiSchemaVersion = OPEN_API_SCHEMA_VERSION;
|
13
|
+
static cl;
|
14
|
+
// ##__CL_RESOURCES_DEF_START__##
|
15
|
+
// ##__CL_RESOURCES_DEF_TEMPLATE:: ##__TAB__#####__RESOURCE_TYPE__##?: api.##__RESOURCE_CLASS__##
|
16
|
+
// ##__CL_RESOURCES_DEF_STOP__##
|
17
|
+
static get(config) {
|
18
|
+
if (config) return CommerceLayerClient.cl = new CommerceLayerClient(config);
|
19
|
+
else if (!CommerceLayerClient.cl) throw new Error("CommerceLayer client not initialized");
|
20
|
+
return CommerceLayerClient.cl;
|
21
|
+
}
|
22
|
+
constructor(config) {
|
23
|
+
debug("new commercelayer instance %O", config);
|
24
|
+
ApiResourceAdapter.init(config);
|
25
|
+
}
|
26
|
+
// ##__CL_RESOURCES_LEAZY_LOADING_START__##
|
27
|
+
// ##__CL_RESOURCES_LEAZY_LOADING_TEMPLATE:: ##__TAB__##get ##__RESOURCE_TYPE__##(): api.##__RESOURCE_CLASS__## { return this.###__RESOURCE_TYPE__## || (this.###__RESOURCE_TYPE__## = new api.##__RESOURCE_CLASS__##(this.#adapter)) }
|
28
|
+
// ##__CL_RESOURCES_LEAZY_LOADING_STOP__##
|
29
|
+
// private get adapter(): ResourceAdapter { return ApiResourceAdapter.get() }
|
30
|
+
get currentOrganization() {
|
31
|
+
return ApiResourceAdapter.get().client?.currentOrganization;
|
32
|
+
}
|
33
|
+
get currentAccessToken() {
|
34
|
+
return ApiResourceAdapter.get().client?.currentAccessToken;
|
35
|
+
}
|
36
|
+
get interceptors() {
|
37
|
+
return ApiResourceAdapter.get().client?.interceptors;
|
38
|
+
}
|
39
|
+
localConfig(config) {
|
40
|
+
}
|
41
|
+
config(config) {
|
42
|
+
debug("config %o", config);
|
43
|
+
this.localConfig(config);
|
44
|
+
ApiResourceAdapter.config(config);
|
45
|
+
return this;
|
46
|
+
}
|
47
|
+
resources(sort) {
|
48
|
+
return getResources(sort);
|
49
|
+
}
|
50
|
+
isApiError(error) {
|
51
|
+
return isApiError(error);
|
52
|
+
}
|
53
|
+
addRequestInterceptor(onSuccess, onFailure) {
|
54
|
+
this.interceptors.request = { onSuccess, onFailure };
|
55
|
+
return 1;
|
56
|
+
}
|
57
|
+
addResponseInterceptor(onSuccess, onFailure) {
|
58
|
+
this.interceptors.response = { onSuccess, onFailure };
|
59
|
+
return 1;
|
60
|
+
}
|
61
|
+
removeInterceptor(type, id = 1) {
|
62
|
+
this.interceptors[type] = void 0;
|
63
|
+
}
|
64
|
+
removeInterceptors() {
|
65
|
+
this.removeInterceptor("request");
|
66
|
+
this.removeInterceptor("response");
|
67
|
+
this.removeRawResponseReader();
|
68
|
+
}
|
69
|
+
addRawResponseReader(options) {
|
70
|
+
const reader = {
|
71
|
+
id: 0,
|
72
|
+
rawResponse: void 0,
|
73
|
+
headers: void 0,
|
74
|
+
ok: true
|
75
|
+
};
|
76
|
+
async function rawResponseInterceptor(response) {
|
77
|
+
reader.rawResponse = await response?.clone().json().catch(() => {
|
78
|
+
});
|
79
|
+
reader.ok = response.ok;
|
80
|
+
if (options?.headers) {
|
81
|
+
const ho = {};
|
82
|
+
response.headers.forEach((value, key) => {
|
83
|
+
ho[key] = value;
|
84
|
+
});
|
85
|
+
reader.headers = ho;
|
86
|
+
}
|
87
|
+
return response;
|
88
|
+
}
|
89
|
+
this.interceptors.rawReader = { onSuccess: rawResponseInterceptor, onFailure: rawResponseInterceptor };
|
90
|
+
reader.id = 1;
|
91
|
+
return reader;
|
92
|
+
}
|
93
|
+
removeRawResponseReader() {
|
94
|
+
this.interceptors.rawReader = void 0;
|
95
|
+
}
|
96
|
+
}
|
97
|
+
const CommerceLayer = (config) => {
|
98
|
+
return CommerceLayerClient.get(config);
|
99
|
+
};
|
100
|
+
var commercelayer_default = CommerceLayer;
|
101
|
+
|
102
|
+
export { CommerceLayer, OPEN_API_SCHEMA_VERSION, commercelayer_default as default };
|
103
|
+
//# sourceMappingURL=commercelayer.js.map
|
104
|
+
//# sourceMappingURL=commercelayer.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../src/commercelayer.ts"],"names":[],"mappings":";;;;;AASA,MAAM,KAAA,GAAQ,MAAM,eAAe,CAAA;AAInC,MAAM,uBAA0B,GAAA;AAchC,MAAM,mBAAoB,CAAA;AAAA,EAEzB,WAAW,oBAA+B,GAAA;AAAE,IAAO,OAAA,uBAAA;AAAA;AAAwB,EAClE,oBAAuB,GAAA,uBAAA;AAAA,EAEhC,OAAe,EAAA;AAAA;AAAA;AAAA;AAAA,EAOf,OAAO,IAAK,MAAuD,EAAA;AAClE,IAAA,IAAI,QAAgB,OAAA,mBAAA,CAAoB,EAAK,GAAA,IAAI,oBAAoB,MAAM,CAAA;AAAA,SAAA,IAEvE,CAAC,mBAAoB,CAAA,EAAA,EAAU,MAAA,IAAI,MAAM,sCAAsC,CAAA;AACnF,IAAA,OAAO,mBAAoB,CAAA,EAAA;AAAA;AAC5B,EAGQ,YAAY,MAAiC,EAAA;AAEpD,IAAA,KAAA,CAAM,iCAAiC,MAAM,CAAA;AAE7C,IAAA,kBAAA,CAAmB,KAAK,MAAM,CAAA;AAAA;AAM/B;AAAA;AAAA;AAAA;AAAA,EAOA,IAAI,mBAA8B,GAAA;AAAE,IAAO,OAAA,kBAAA,CAAmB,GAAI,EAAA,CAAE,MAAQ,EAAA,mBAAA;AAAA;AAAoB,EAChG,IAAI,kBAA6B,GAAA;AAAE,IAAO,OAAA,kBAAA,CAAmB,GAAI,EAAA,CAAE,MAAQ,EAAA,kBAAA;AAAA;AAAmB,EAC9F,IAAY,YAAmC,GAAA;AAAE,IAAO,OAAA,kBAAA,CAAmB,GAAI,EAAA,CAAE,MAAQ,EAAA,YAAA;AAAA;AAAa,EAG9F,YAAY,MAAkC,EAAA;AAAA;AAEtD,EAGA,OAAO,MAAmC,EAAA;AAEzC,IAAA,KAAA,CAAM,aAAa,MAAM,CAAA;AAGzB,IAAA,IAAA,CAAK,YAAY,MAAM,CAAA;AAEvB,IAAA,kBAAA,CAAmB,OAAO,MAAM,CAAA;AAEhC,IAAO,OAAA,IAAA;AAAA;AAER,EAGA,UAAU,IAAmC,EAAA;AAC5C,IAAA,OAAO,aAAa,IAAI,CAAA;AAAA;AACzB,EAEA,WAAW,KAA+B,EAAA;AACzC,IAAA,OAAO,WAAW,KAAK,CAAA;AAAA;AACxB,EAGA,qBAAA,CAAsB,WAAgC,SAAsC,EAAA;AAC3F,IAAA,IAAA,CAAK,YAAa,CAAA,OAAA,GAAU,EAAE,SAAA,EAAW,SAAU,EAAA;AACnD,IAAO,OAAA,CAAA;AAAA;AACR,EAEA,sBAAA,CAAuB,WAAiC,SAAsC,EAAA;AAC7F,IAAA,IAAA,CAAK,YAAa,CAAA,QAAA,GAAW,EAAE,SAAA,EAAW,SAAU,EAAA;AACpD,IAAO,OAAA,CAAA;AAAA;AACR,EAEA,iBAAA,CAAkB,IAAuB,EAAA,EAAA,GAAa,CAAS,EAAA;AAC9D,IAAK,IAAA,CAAA,YAAA,CAAa,IAAI,CAAI,GAAA,MAAA;AAAA;AAC3B,EAEA,kBAA2B,GAAA;AAC1B,IAAA,IAAA,CAAK,kBAAkB,SAAS,CAAA;AAChC,IAAA,IAAA,CAAK,kBAAkB,UAAU,CAAA;AACjC,IAAA,IAAA,CAAK,uBAAwB,EAAA;AAAA;AAC9B,EAEA,qBAAqB,OAAmD,EAAA;AAEvE,IAAA,MAAM,MAA4B,GAAA;AAAA,MACjC,EAAI,EAAA,CAAA;AAAA,MACJ,WAAa,EAAA,MAAA;AAAA,MACb,OAAS,EAAA,MAAA;AAAA,MACT,EAAI,EAAA;AAAA,KACL;AAEA,IAAA,eAAe,uBAAuB,QAA6C,EAAA;AAClF,MAAO,MAAA,CAAA,WAAA,GAAc,MAAM,QAAU,EAAA,KAAA,GAAQ,IAAK,EAAA,CAAE,MAAM,MAAM;AAAA,OAAE,CAAA;AAClE,MAAA,MAAA,CAAO,KAAK,QAAS,CAAA,EAAA;AACrB,MAAA,IAAI,SAAS,OAAS,EAAA;AACrB,QAAA,MAAM,KAAiB,EAAC;AACxB,QAAA,QAAA,CAAS,OAAQ,CAAA,OAAA,CAAQ,CAAC,KAAA,EAAO,GAAQ,KAAA;AAAE,UAAA,EAAA,CAAG,GAAG,CAAI,GAAA,KAAA;AAAA,SAAO,CAAA;AAC5D,QAAA,MAAA,CAAO,OAAU,GAAA,EAAA;AAAA;AAElB,MAAO,OAAA,QAAA;AAAA;AAGiB,IAAA,IAAA,CAAK,aAAa,SAAY,GAAA,EAAE,SAAW,EAAA,sBAAA,EAAwB,WAAW,sBAAuB,EAAA;AAC9H,IAAA,MAAA,CAAO,EAAK,GAAA,CAAA;AAEZ,IAAO,OAAA,MAAA;AAAA;AAER,EAEA,uBAAwE,GAAA;AAKvE,IAAA,IAAA,CAAK,aAAa,SAAY,GAAA,MAAA;AAAA;AAGhC;AAIM,MAAA,aAAA,GAAgB,CAAC,MAAyD,KAAA;AAC/E,EAAO,OAAA,mBAAA,CAAoB,IAAI,MAAM,CAAA;AACtC;AAGA,IAAO,qBAAQ,GAAA","file":"commercelayer.js","sourcesContent":["\n// import * as api from './api'\nimport { getResources } from './enum'\nimport { isApiError, type ApiError } from './error'\nimport type { ErrorInterceptor, InterceptorType, RawResponseReader, RequestInterceptor, ResponseInterceptor, ResponseObj, HeadersObj, InterceptorManager } from './interceptor'\nimport { ApiResourceAdapter, type ResourcesInitConfig } from './resource'\n\n\nimport Debug from './debug'\nconst debug = Debug('commercelayer')\n\n\n// Autogenerated schema version number, do not remove this line\nconst OPEN_API_SCHEMA_VERSION = '7.8.3'\nexport { OPEN_API_SCHEMA_VERSION }\n\n\n// SDK local configuration\ntype SdkConfig = {\n\t// abc?: string\n}\n\ntype CommerceLayerInitConfig = SdkConfig & ResourcesInitConfig\ntype CommerceLayerConfig = Partial<CommerceLayerInitConfig>\n\n\n\nclass CommerceLayerClient {\n\n\tstatic get openApiSchemaVersion(): string { return OPEN_API_SCHEMA_VERSION }\n\treadonly openApiSchemaVersion = OPEN_API_SCHEMA_VERSION\n\n\tprivate static cl: CommerceLayerClient\n\n\t// ##__CL_RESOURCES_DEF_START__##\n\t// ##__CL_RESOURCES_DEF_TEMPLATE:: ##__TAB__#####__RESOURCE_TYPE__##?: api.##__RESOURCE_CLASS__##\n\t// ##__CL_RESOURCES_DEF_STOP__##\n\n\n\tstatic get (config?: CommerceLayerInitConfig): CommerceLayerClient {\n\t\tif (config) return (CommerceLayerClient.cl = new CommerceLayerClient(config))\n\t\telse\n\t\tif (!CommerceLayerClient.cl) throw new Error('CommerceLayer client not initialized')\n\t\treturn CommerceLayerClient.cl\n\t}\n\n\n\tprivate constructor(config: CommerceLayerInitConfig) {\n\n\t\tdebug('new commercelayer instance %O', config)\n\n\t\tApiResourceAdapter.init(config)\n\n\t\t// ##__CL_RESOURCES_INIT_START__##\n\t\t// ##__CL_RESOURCES_INIT_TEMPLATE:: ##__TAB__####__TAB__##this.##__RESOURCE_TYPE__## = new api.##__RESOURCE_CLASS__##(this.#adapter)\n\t\t// ##__CL_RESOURCES_INIT_STOP__##\n\n\t}\n\n\t// ##__CL_RESOURCES_LEAZY_LOADING_START__##\n\t// ##__CL_RESOURCES_LEAZY_LOADING_TEMPLATE:: ##__TAB__##get ##__RESOURCE_TYPE__##(): api.##__RESOURCE_CLASS__## { return this.###__RESOURCE_TYPE__## || (this.###__RESOURCE_TYPE__## = new api.##__RESOURCE_CLASS__##(this.#adapter)) }\n\t// ##__CL_RESOURCES_LEAZY_LOADING_STOP__##\n\n\t// private get adapter(): ResourceAdapter { return ApiResourceAdapter.get() }\n\tget currentOrganization(): string { return ApiResourceAdapter.get().client?.currentOrganization }\n\tget currentAccessToken(): string { return ApiResourceAdapter.get().client?.currentAccessToken }\n\tprivate get interceptors(): InterceptorManager { return ApiResourceAdapter.get().client?.interceptors }\n\n\n\tprivate localConfig(config: Partial<SdkConfig>): void {\n\t\t// if (config.abc) this.abc = config.abc\n\t}\n\n\n\tconfig(config: CommerceLayerConfig): this {\n\n\t\tdebug('config %o', config)\n\n\t\t// CommerceLayer config\n\t\tthis.localConfig(config)\n\t\t// ResourceAdapter config\n\t\tApiResourceAdapter.config(config)\n\n\t\treturn this\n\n\t}\n\n\t\n\tresources(sort?: boolean): readonly string[] {\n\t\treturn getResources(sort)\n\t}\n\n\tisApiError(error: any): error is ApiError {\n\t\treturn isApiError(error)\n\t}\n\n\n\taddRequestInterceptor(onSuccess?: RequestInterceptor, onFailure?: ErrorInterceptor): number {\n\t\tthis.interceptors.request = { onSuccess, onFailure }\n\t\treturn 1\n\t}\n\n\taddResponseInterceptor(onSuccess?: ResponseInterceptor, onFailure?: ErrorInterceptor): number {\n\t\tthis.interceptors.response = { onSuccess, onFailure }\n\t\treturn 1\n\t}\n\n\tremoveInterceptor(type: InterceptorType, id: number = 1): void {\n\t\tthis.interceptors[type] = undefined\n\t}\n\n\tremoveInterceptors(): void {\n\t\tthis.removeInterceptor('request')\n\t\tthis.removeInterceptor('response')\n\t\tthis.removeRawResponseReader()\n\t}\n\n\taddRawResponseReader(options?: { headers: boolean }): RawResponseReader {\n\n\t\tconst reader: RawResponseReader = {\n\t\t\tid: 0,\n\t\t\trawResponse: undefined,\n\t\t\theaders: undefined,\n\t\t\tok: true\n\t\t}\n\n\t\tasync function rawResponseInterceptor(response: ResponseObj): Promise<ResponseObj> {\n\t\t\treader.rawResponse = await response?.clone().json().catch(() => {})\n\t\t\treader.ok = response.ok\n\t\t\tif (options?.headers) {\n\t\t\t\tconst ho: HeadersObj = {}\n\t\t\t\tresponse.headers.forEach((value, key) => { ho[key] = value })\n\t\t\t\treader.headers = ho\n\t\t\t}\n\t\t\treturn response\n\t\t}\n\t\t\n\t\t/* const interceptor = */this.interceptors.rawReader = { onSuccess: rawResponseInterceptor, onFailure: rawResponseInterceptor }\n\t\treader.id = 1 // interceptor\n\n\t\treturn reader\n\n\t}\n\n\tremoveRawResponseReader(/* reader: number | RawResponseReader */): void {\n\t\t/*\n\t\tconst id = (typeof reader === 'number') ? reader : reader?.id\n\t\tif (id && (id >= 0)) this.removeInterceptor('response', id)\n\t\t*/\n\t\tthis.interceptors.rawReader = undefined\n\t}\n\n}\n\n\n\nconst CommerceLayer = (config: CommerceLayerInitConfig): CommerceLayerClient => {\n\treturn CommerceLayerClient.get(config)\n}\n\n\nexport default CommerceLayer\nexport { CommerceLayer }\n\nexport type { CommerceLayerClient, CommerceLayerConfig, CommerceLayerInitConfig }\n"]}
|
package/lib/config.cjs
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
const config = {
|
4
|
+
default: {
|
5
|
+
domain: "commercelayer.io",
|
6
|
+
pageNumber: 1,
|
7
|
+
pageSize: 10
|
8
|
+
},
|
9
|
+
client: {
|
10
|
+
timeout: 15e3,
|
11
|
+
requiredAttributes: ["organization", "accessToken"]
|
12
|
+
},
|
13
|
+
jsonapi: {
|
14
|
+
maxResourceIncluded: 2
|
15
|
+
}
|
16
|
+
};
|
17
|
+
var config_default = config;
|
18
|
+
|
19
|
+
module.exports = config_default;
|
20
|
+
//# sourceMappingURL=config.cjs.map
|
21
|
+
|
22
|
+
module.exports = exports.default;
|
23
|
+
//# sourceMappingURL=config.cjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../src/config.ts"],"names":[],"mappings":";;AAEA,MAAM,MAAS,GAAA;AAAA,EACd,OAAS,EAAA;AAAA,IACR,MAAQ,EAAA,kBAAA;AAAA,IACR,UAAY,EAAA,CAAA;AAAA,IACZ,QAAU,EAAA;AAAA,GACX;AAAA,EACA,MAAQ,EAAA;AAAA,IACP,OAAS,EAAA,IAAA;AAAA,IACT,kBAAA,EAAoB,CAAC,cAAA,EAAgB,aAAa;AAAA,GACnD;AAAA,EACA,OAAS,EAAA;AAAA,IACR,mBAAqB,EAAA;AAAA;AAEvB,CAAA;AAGA,IAAO,cAAQ,GAAA","file":"config.cjs","sourcesContent":["import { ApiClientInitConfig } from \"./client\"\n\nconst config = {\n\tdefault: {\n\t\tdomain: 'commercelayer.io',\n\t\tpageNumber: 1,\n\t\tpageSize: 10,\n\t},\n\tclient: {\n\t\ttimeout: 15000,\n\t\trequiredAttributes: ['organization', 'accessToken'] as Array<keyof ApiClientInitConfig>,\n\t},\n\tjsonapi: {\n\t\tmaxResourceIncluded: 2\n\t}\n} as const\n\n\nexport default config\n"]}
|
package/lib/config.d.cts
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
import { ApiClientInitConfig } from './client.cjs';
|
2
|
+
import './interceptor-5MISI1yn.cjs';
|
3
|
+
|
4
|
+
declare const config: {
|
5
|
+
readonly default: {
|
6
|
+
readonly domain: "commercelayer.io";
|
7
|
+
readonly pageNumber: 1;
|
8
|
+
readonly pageSize: 10;
|
9
|
+
};
|
10
|
+
readonly client: {
|
11
|
+
readonly timeout: 15000;
|
12
|
+
readonly requiredAttributes: Array<keyof ApiClientInitConfig>;
|
13
|
+
};
|
14
|
+
readonly jsonapi: {
|
15
|
+
readonly maxResourceIncluded: 2;
|
16
|
+
};
|
17
|
+
};
|
18
|
+
|
19
|
+
export = config;
|
package/lib/config.d.ts
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
import { ApiClientInitConfig } from './client.js';
|
2
|
+
import './interceptor-5MISI1yn.js';
|
3
|
+
|
4
|
+
declare const config: {
|
5
|
+
readonly default: {
|
6
|
+
readonly domain: "commercelayer.io";
|
7
|
+
readonly pageNumber: 1;
|
8
|
+
readonly pageSize: 10;
|
9
|
+
};
|
10
|
+
readonly client: {
|
11
|
+
readonly timeout: 15000;
|
12
|
+
readonly requiredAttributes: Array<keyof ApiClientInitConfig>;
|
13
|
+
};
|
14
|
+
readonly jsonapi: {
|
15
|
+
readonly maxResourceIncluded: 2;
|
16
|
+
};
|
17
|
+
};
|
18
|
+
|
19
|
+
export { config as default };
|
package/lib/config.js
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
const config = {
|
2
|
+
default: {
|
3
|
+
domain: "commercelayer.io",
|
4
|
+
pageNumber: 1,
|
5
|
+
pageSize: 10
|
6
|
+
},
|
7
|
+
client: {
|
8
|
+
timeout: 15e3,
|
9
|
+
requiredAttributes: ["organization", "accessToken"]
|
10
|
+
},
|
11
|
+
jsonapi: {
|
12
|
+
maxResourceIncluded: 2
|
13
|
+
}
|
14
|
+
};
|
15
|
+
var config_default = config;
|
16
|
+
|
17
|
+
export { config_default as default };
|
18
|
+
//# sourceMappingURL=config.js.map
|
19
|
+
//# sourceMappingURL=config.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../src/config.ts"],"names":[],"mappings":"AAEA,MAAM,MAAS,GAAA;AAAA,EACd,OAAS,EAAA;AAAA,IACR,MAAQ,EAAA,kBAAA;AAAA,IACR,UAAY,EAAA,CAAA;AAAA,IACZ,QAAU,EAAA;AAAA,GACX;AAAA,EACA,MAAQ,EAAA;AAAA,IACP,OAAS,EAAA,IAAA;AAAA,IACT,kBAAA,EAAoB,CAAC,cAAA,EAAgB,aAAa;AAAA,GACnD;AAAA,EACA,OAAS,EAAA;AAAA,IACR,mBAAqB,EAAA;AAAA;AAEvB,CAAA;AAGA,IAAO,cAAQ,GAAA","file":"config.js","sourcesContent":["import { ApiClientInitConfig } from \"./client\"\n\nconst config = {\n\tdefault: {\n\t\tdomain: 'commercelayer.io',\n\t\tpageNumber: 1,\n\t\tpageSize: 10,\n\t},\n\tclient: {\n\t\ttimeout: 15000,\n\t\trequiredAttributes: ['organization', 'accessToken'] as Array<keyof ApiClientInitConfig>,\n\t},\n\tjsonapi: {\n\t\tmaxResourceIncluded: 2\n\t}\n} as const\n\n\nexport default config\n"]}
|
package/lib/debug.cjs
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
const debuggerFunction = (_pattern, ..._args) => {
|
4
|
+
};
|
5
|
+
let debuggerFactory = (_namespace) => debuggerFunction;
|
6
|
+
try {
|
7
|
+
const debugModule = require("debug");
|
8
|
+
if (debugModule && typeof debugModule === "function") debuggerFactory = debugModule;
|
9
|
+
} catch (error) {
|
10
|
+
}
|
11
|
+
const debugPrefix = "clsdk";
|
12
|
+
const debug = (namespace) => {
|
13
|
+
return debuggerFactory(`${debugPrefix}:${namespace}`);
|
14
|
+
};
|
15
|
+
var debug_default = debug;
|
16
|
+
|
17
|
+
module.exports = debug_default;
|
18
|
+
//# sourceMappingURL=debug.cjs.map
|
19
|
+
|
20
|
+
module.exports = exports.default;
|
21
|
+
//# sourceMappingURL=debug.cjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../src/debug.ts"],"names":[],"mappings":";;AAOA,MAAM,gBAAA,GAAmB,CAAC,QAAA,EAAA,GAAqB,KAAuB,KAAA;AAEtE,CAAA;AAEA,IAAI,eAAA,GAAmC,CAAC,UAAiC,KAAA,gBAAA;AAIzE,IAAI;AACH,EAAM,MAAA,WAAA,GAAc,QAAQ,OAAO,CAAA;AACnC,EAAA,IAAI,WAAgB,IAAA,OAAO,WAAgB,KAAA,UAAA,EAA+B,eAAA,GAAA,WAAA;AAC3E,CAAA,CAAA,OAAS,KAAO,EAAA;AAEhB;AAGA,MAAM,WAAc,GAAA,OAAA;AAsBpB,MAAM,KAAA,GAAQ,CAAC,SAAgC,KAAA;AAC9C,EAAA,OAAO,eAAgB,CAAA,CAAA,EAAG,WAAW,CAAA,CAAA,EAAI,SAAS,CAAE,CAAA,CAAA;AACrD,CAAA;AAGA,IAAO,aAAQ,GAAA","file":"debug.cjs","sourcesContent":["\ntype Debugger = (pattern: string, ...args: any[]) => void\n\ntype DebuggerFactory = (namespace: string) => Debugger\n\n\n/* Nope debugger */\nconst debuggerFunction = (_pattern: string, ..._args: any[]): void => {\n\t// console.log(_pattern)\n}\n\nlet debuggerFactory: DebuggerFactory = (_namespace: string): Debugger => debuggerFunction\n\n\n/* Try loading 'debug' module */\ntry {\n\tconst debugModule = require('debug')\n\tif (debugModule && (typeof debugModule === 'function')) debuggerFactory = debugModule\n} catch (error) {\n\t//\n}\n\n\nconst debugPrefix = 'clsdk'\n\n\n/* Retrieve the name of the caller 'module' */\n/*\nconst caller = (): string => {\n\n\tconst err = new Error()\n\n\tError.prepareStackTrace = (_, stack) => stack\n\tconst stack = err.stack as unknown as NodeJS.CallSite[]\n\tError.prepareStackTrace = undefined\n\n\tconst fileName = stack[2].getFileName() || '/'\n\n\treturn fileName.replace(/^.*[\\\\/]/, '').replace('.ts', '')\n\n}\n*/\n\n\n/* Return a debugger for the defined namespace */\nconst debug = (namespace: string): Debugger => {\n\treturn debuggerFactory(`${debugPrefix}:${namespace}`)\n}\n\n\nexport default debug\n"]}
|
package/lib/debug.d.cts
ADDED
package/lib/debug.d.ts
ADDED
package/lib/debug.js
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
const debuggerFunction = (_pattern, ..._args) => {
|
2
|
+
};
|
3
|
+
let debuggerFactory = (_namespace) => debuggerFunction;
|
4
|
+
try {
|
5
|
+
const debugModule = require("debug");
|
6
|
+
if (debugModule && typeof debugModule === "function") debuggerFactory = debugModule;
|
7
|
+
} catch (error) {
|
8
|
+
}
|
9
|
+
const debugPrefix = "clsdk";
|
10
|
+
const debug = (namespace) => {
|
11
|
+
return debuggerFactory(`${debugPrefix}:${namespace}`);
|
12
|
+
};
|
13
|
+
var debug_default = debug;
|
14
|
+
|
15
|
+
export { debug_default as default };
|
16
|
+
//# sourceMappingURL=debug.js.map
|
17
|
+
//# sourceMappingURL=debug.js.map
|
package/lib/debug.js.map
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../src/debug.ts"],"names":[],"mappings":"AAOA,MAAM,gBAAA,GAAmB,CAAC,QAAA,EAAA,GAAqB,KAAuB,KAAA;AAEtE,CAAA;AAEA,IAAI,eAAA,GAAmC,CAAC,UAAiC,KAAA,gBAAA;AAIzE,IAAI;AACH,EAAM,MAAA,WAAA,GAAc,QAAQ,OAAO,CAAA;AACnC,EAAA,IAAI,WAAgB,IAAA,OAAO,WAAgB,KAAA,UAAA,EAA+B,eAAA,GAAA,WAAA;AAC3E,CAAA,CAAA,OAAS,KAAO,EAAA;AAEhB;AAGA,MAAM,WAAc,GAAA,OAAA;AAsBpB,MAAM,KAAA,GAAQ,CAAC,SAAgC,KAAA;AAC9C,EAAA,OAAO,eAAgB,CAAA,CAAA,EAAG,WAAW,CAAA,CAAA,EAAI,SAAS,CAAE,CAAA,CAAA;AACrD,CAAA;AAGA,IAAO,aAAQ,GAAA","file":"debug.js","sourcesContent":["\ntype Debugger = (pattern: string, ...args: any[]) => void\n\ntype DebuggerFactory = (namespace: string) => Debugger\n\n\n/* Nope debugger */\nconst debuggerFunction = (_pattern: string, ..._args: any[]): void => {\n\t// console.log(_pattern)\n}\n\nlet debuggerFactory: DebuggerFactory = (_namespace: string): Debugger => debuggerFunction\n\n\n/* Try loading 'debug' module */\ntry {\n\tconst debugModule = require('debug')\n\tif (debugModule && (typeof debugModule === 'function')) debuggerFactory = debugModule\n} catch (error) {\n\t//\n}\n\n\nconst debugPrefix = 'clsdk'\n\n\n/* Retrieve the name of the caller 'module' */\n/*\nconst caller = (): string => {\n\n\tconst err = new Error()\n\n\tError.prepareStackTrace = (_, stack) => stack\n\tconst stack = err.stack as unknown as NodeJS.CallSite[]\n\tError.prepareStackTrace = undefined\n\n\tconst fileName = stack[2].getFileName() || '/'\n\n\treturn fileName.replace(/^.*[\\\\/]/, '').replace('.ts', '')\n\n}\n*/\n\n\n/* Return a debugger for the defined namespace */\nconst debug = (namespace: string): Debugger => {\n\treturn debuggerFactory(`${debugPrefix}:${namespace}`)\n}\n\n\nexport default debug\n"]}
|