@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 @@
|
|
1
|
+
{"version":3,"sources":["../../src/resources/imports.ts"],"names":[],"mappings":";;AAyIA,MAAM,gBAAgB,WAAoB,CAAA;AAAA,EAEzC,OAAgB,IAAmB,GAAA,SAAA;AAAA,EAEnC,MAAM,MAAA,CAAO,QAAwB,EAAA,MAAA,EAAsC,OAA4C,EAAA;AACtH,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA6B,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,OAAQ,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACxG,EAEA,MAAM,MAAA,CAAO,QAAwB,EAAA,MAAA,EAAsC,OAA4C,EAAA;AACtH,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA6B,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,OAAQ,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACxG,EAEA,MAAM,MAAO,CAAA,EAAA,EAAyB,OAA0C,EAAA;AAC/E,IAAA,MAAM,IAAK,CAAA,SAAA,CAAU,MAAQ,CAAA,OAAO,EAAO,KAAA,QAAA,GAAW,EAAE,EAAA,EAAI,IAAM,EAAA,OAAA,CAAQ,IAAK,EAAA,GAAI,IAAI,OAAO,CAAA;AAAA;AAC/F,EAEA,MAAM,MAAA,CAAO,QAA2B,EAAA,MAAA,EAAiC,OAAyD,EAAA;AACjI,IAAM,MAAA,SAAA,GAAa,SAAoB,EAAM,IAAA,QAAA;AAC7C,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAa,EAAE,IAAA,EAAM,QAAS,EAAA,EAAG,CAAW,QAAA,EAAA,SAAS,CAAW,OAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACtG,EAEA,MAAM,UAAA,CAAW,EAAqB,EAAA,MAAA,EAAsC,OAA4C,EAAA;AACvH,IAAA,OAAO,KAAK,SAAU,CAAA,MAAA,CAA6B,EAAE,EAAK,EAAA,OAAO,OAAO,QAAW,GAAA,EAAA,GAAI,EAAG,CAAA,EAAA,EAAI,MAAM,OAAQ,CAAA,IAAA,EAAM,YAAY,IAAK,EAAA,EAAG,QAAQ,OAAO,CAAA;AAAA;AACtJ,EAGA,SAAS,QAAmC,EAAA;AAC3C,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,OAAQ,CAAA,IAAA;AAAA;AACpD,EAGA,aAAa,EAA2C,EAAA;AACvD,IAAO,OAAA,KAAA,CAAM,qBAAgC,EAAE,CAAA;AAAA;AAChD,EAEA,sBAAsB,GAA4B,EAAA;AACjD,IAAO,OAAA,KAAA,CAAM,qBAAiC,CAAA,GAAG,GAAG,CAAA;AAAA;AACrD,EAGA,IAAmB,GAAA;AAClB,IAAA,OAAO,OAAQ,CAAA,IAAA;AAAA;AAGjB;AAGA,MAAM,QAAA,GAAW,IAAI,OAAQ,EAAA;AAC7B,IAAO,eAAQ,GAAA","file":"imports.js","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Event } from './events'\n\n\ntype ImportType = 'imports'\ntype ImportRel = ResourceRel & { type: ImportType }\n\n\nexport type ImportSort = Pick<Import, 'id' | 'resource_type' | 'format' | 'parent_resource_id' | 'status' | 'started_at' | 'completed_at' | 'interrupted_at' | 'inputs_size' | 'errors_count' | 'warnings_count' | 'processed_count' | 'attachment_url'> & ResourceSort\n// export type ImportFilter = Pick<Import, 'id' | 'resource_type' | 'format' | 'parent_resource_id' | 'status' | 'started_at' | 'completed_at' | 'interrupted_at' | 'inputs_size' | 'errors_count' | 'warnings_count' | 'processed_count' | 'errors_log' | 'warnings_log' | 'attachment_url'> & ResourceFilter\n\n\ninterface Import extends Resource {\n\t\n\treadonly type: ImportType\n\n\t/** \n\t * The type of resource being imported.\n\t * @example ```\"skus\"```\n\t */\n\tresource_type: string\n\t/** \n\t * The format of the import inputs one of 'json' (default) or 'csv'.\n\t * @example ```\"json\"```\n\t */\n\tformat?: string | null\n\t/** \n\t * The ID of the parent resource to be associated with imported data.\n\t * @example ```\"1234\"```\n\t */\n\tparent_resource_id?: string | null\n\t/** \n\t * The import job status. One of 'pending' (default), 'in_progress', 'interrupted', or 'completed'.\n\t * @example ```\"in_progress\"```\n\t */\n\tstatus: 'pending' | 'in_progress' | 'interrupted' | 'completed'\n\t/** \n\t * Time at which the import was started.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tstarted_at?: string | null\n\t/** \n\t * Time at which the import was completed.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tcompleted_at?: string | null\n\t/** \n\t * Time at which the import was interrupted.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tinterrupted_at?: string | null\n\t/** \n\t * Array of objects representing the resources that are being imported.\n\t * @example ```[{\"code\":\"ABC\",\"name\":\"Foo\"},{\"code\":\"DEF\",\"name\":\"Bar\"}]```\n\t */\n\tinputs: Array<Record<string, any>>\n\t/** \n\t * Indicates the size of the objects to be imported.\n\t * @example ```300```\n\t */\n\tinputs_size?: number | null\n\t/** \n\t * Indicates the number of import errors, if any.\n\t * @example ```30```\n\t */\n\terrors_count?: number | null\n\t/** \n\t * Indicates the number of import warnings, if any.\n\t * @example ```1```\n\t */\n\twarnings_count?: number | null\n\t/** \n\t * Indicates the number of records that have been processed (created or updated).\n\t * @example ```270```\n\t */\n\tprocessed_count?: number | null\n\t/** \n\t * Contains the import errors, if any.\n\t * @example ```{\"ABC\":{\"name\":[\"has already been taken\"]}}```\n\t */\n\terrors_log?: Record<string, any> | null\n\t/** \n\t * Contains the import warnings, if any.\n\t * @example ```{\"ABC\":[\"could not be deleted\"]}```\n\t */\n\twarnings_log?: Record<string, any> | null\n\t/** \n\t * The URL the the raw inputs file, which will be generated at import start.\n\t * @example ```\"http://cl_imports.s3.amazonaws.com/\"```\n\t */\n\tattachment_url?: string | null\n\n\tevents?: Event[] | null\n\n}\n\n\ninterface ImportCreate extends ResourceCreate {\n\t\n\t/** \n\t * The type of resource being imported.\n\t * @example ```\"skus\"```\n\t */\n\tresource_type: string\n\t/** \n\t * The format of the import inputs one of 'json' (default) or 'csv'.\n\t * @example ```\"json\"```\n\t */\n\tformat?: string | null\n\t/** \n\t * The ID of the parent resource to be associated with imported data.\n\t * @example ```\"1234\"```\n\t */\n\tparent_resource_id?: string | null\n\t/** \n\t * Array of objects representing the resources that are being imported.\n\t * @example ```[{\"code\":\"ABC\",\"name\":\"Foo\"},{\"code\":\"DEF\",\"name\":\"Bar\"}]```\n\t */\n\tinputs: Array<Record<string, any>>\n\t\n}\n\n\ninterface ImportUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * Send this attribute if you want to mark status as 'interrupted'.\n\t * @example ```true```\n\t */\n\t_interrupt?: boolean | null\n\t\n}\n\n\nclass Imports extends ApiResource<Import> {\n\n\tstatic readonly TYPE: ImportType = 'imports' as const\n\n\tasync create(resource: ImportCreate, params?: QueryParamsRetrieve<Import>, options?: ResourcesConfig): Promise<Import> {\n\t\treturn this.resources.create<ImportCreate, Import>({ ...resource, type: Imports.TYPE }, params, options)\n\t}\n\n\tasync update(resource: ImportUpdate, params?: QueryParamsRetrieve<Import>, options?: ResourcesConfig): Promise<Import> {\n\t\treturn this.resources.update<ImportUpdate, Import>({ ...resource, type: Imports.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: Imports.TYPE } : id, options)\n\t}\n\n\tasync events(importId: string | Import, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _importId = (importId as Import).id || importId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `imports/${_importId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync _interrupt(id: string | Import, params?: QueryParamsRetrieve<Import>, options?: ResourcesConfig): Promise<Import> {\n\t\treturn this.resources.update<ImportUpdate, Import>({ id: (typeof id === 'string')? id: id.id, type: Imports.TYPE, _interrupt: true }, params, options)\n\t}\n\n\n\tisImport(resource: any): resource is Import {\n\t\treturn resource.type && (resource.type === Imports.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): ImportRel {\n\t\treturn super.relationshipOneToOne<ImportRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): ImportRel[] {\n\t\treturn super.relationshipOneToMany<ImportRel>(...ids)\n\t}\n\n\n\ttype(): ImportType {\n\t\treturn Imports.TYPE\n\t}\n\n}\n\n\nconst instance = new Imports()\nexport default instance\n\nexport type { Import, ImportCreate, ImportUpdate, ImportType }\n"]}
|
@@ -0,0 +1,62 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
var resource = require('../resource');
|
4
|
+
|
5
|
+
class InStockSubscriptions extends resource.ApiResource {
|
6
|
+
static TYPE = "in_stock_subscriptions";
|
7
|
+
async create(resource, params, options) {
|
8
|
+
return this.resources.create({ ...resource, type: InStockSubscriptions.TYPE }, params, options);
|
9
|
+
}
|
10
|
+
async update(resource, params, options) {
|
11
|
+
return this.resources.update({ ...resource, type: InStockSubscriptions.TYPE }, params, options);
|
12
|
+
}
|
13
|
+
async delete(id, options) {
|
14
|
+
await this.resources.delete(typeof id === "string" ? { id, type: InStockSubscriptions.TYPE } : id, options);
|
15
|
+
}
|
16
|
+
async market(inStockSubscriptionId, params, options) {
|
17
|
+
const _inStockSubscriptionId = inStockSubscriptionId.id || inStockSubscriptionId;
|
18
|
+
return this.resources.fetch({ type: "markets" }, `in_stock_subscriptions/${_inStockSubscriptionId}/market`, params, options);
|
19
|
+
}
|
20
|
+
async customer(inStockSubscriptionId, params, options) {
|
21
|
+
const _inStockSubscriptionId = inStockSubscriptionId.id || inStockSubscriptionId;
|
22
|
+
return this.resources.fetch({ type: "customers" }, `in_stock_subscriptions/${_inStockSubscriptionId}/customer`, params, options);
|
23
|
+
}
|
24
|
+
async sku(inStockSubscriptionId, params, options) {
|
25
|
+
const _inStockSubscriptionId = inStockSubscriptionId.id || inStockSubscriptionId;
|
26
|
+
return this.resources.fetch({ type: "skus" }, `in_stock_subscriptions/${_inStockSubscriptionId}/sku`, params, options);
|
27
|
+
}
|
28
|
+
async events(inStockSubscriptionId, params, options) {
|
29
|
+
const _inStockSubscriptionId = inStockSubscriptionId.id || inStockSubscriptionId;
|
30
|
+
return this.resources.fetch({ type: "events" }, `in_stock_subscriptions/${_inStockSubscriptionId}/events`, params, options);
|
31
|
+
}
|
32
|
+
async versions(inStockSubscriptionId, params, options) {
|
33
|
+
const _inStockSubscriptionId = inStockSubscriptionId.id || inStockSubscriptionId;
|
34
|
+
return this.resources.fetch({ type: "versions" }, `in_stock_subscriptions/${_inStockSubscriptionId}/versions`, params, options);
|
35
|
+
}
|
36
|
+
async _activate(id, params, options) {
|
37
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: InStockSubscriptions.TYPE, _activate: true }, params, options);
|
38
|
+
}
|
39
|
+
async _deactivate(id, params, options) {
|
40
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: InStockSubscriptions.TYPE, _deactivate: true }, params, options);
|
41
|
+
}
|
42
|
+
isInStockSubscription(resource) {
|
43
|
+
return resource.type && resource.type === InStockSubscriptions.TYPE;
|
44
|
+
}
|
45
|
+
relationship(id) {
|
46
|
+
return super.relationshipOneToOne(id);
|
47
|
+
}
|
48
|
+
relationshipToMany(...ids) {
|
49
|
+
return super.relationshipOneToMany(...ids);
|
50
|
+
}
|
51
|
+
type() {
|
52
|
+
return InStockSubscriptions.TYPE;
|
53
|
+
}
|
54
|
+
}
|
55
|
+
const instance = new InStockSubscriptions();
|
56
|
+
var in_stock_subscriptions_default = instance;
|
57
|
+
|
58
|
+
module.exports = in_stock_subscriptions_default;
|
59
|
+
//# sourceMappingURL=in_stock_subscriptions.cjs.map
|
60
|
+
|
61
|
+
module.exports = exports.default;
|
62
|
+
//# sourceMappingURL=in_stock_subscriptions.cjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../src/resources/in_stock_subscriptions.ts"],"names":["ApiResource"],"mappings":";;;;AA+GA,MAAM,6BAA6BA,oBAAiC,CAAA;AAAA,EAEnE,OAAgB,IAAgC,GAAA,wBAAA;AAAA,EAEhD,MAAM,MAAA,CAAO,QAAqC,EAAA,MAAA,EAAmD,OAAyD,EAAA;AAC7J,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAuD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,oBAAqB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC/I,EAEA,MAAM,MAAA,CAAO,QAAqC,EAAA,MAAA,EAAmD,OAAyD,EAAA;AAC7J,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAuD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,oBAAqB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC/I,EAEA,MAAM,MAAO,CAAA,EAAA,EAAyB,OAA0C,EAAA;AAC/E,IAAA,MAAM,IAAK,CAAA,SAAA,CAAU,MAAQ,CAAA,OAAO,EAAO,KAAA,QA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A,KAAA,CAAM,qBAA8C,CAAA,GAAG,GAAG,CAAA;AAAA;AAClE,EAGA,IAAgC,GAAA;AAC/B,IAAA,OAAO,oBAAqB,CAAA,IAAA;AAAA;AAG9B;AAGA,MAAM,QAAA,GAAW,IAAI,oBAAqB,EAAA;AAC1C,IAAO,8BAAQ,GAAA","file":"in_stock_subscriptions.cjs","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Market, MarketType } from './markets'\nimport type { Customer, CustomerType } from './customers'\nimport type { Sku, SkuType } from './skus'\nimport type { Event } from './events'\nimport type { Version } from './versions'\n\n\ntype InStockSubscriptionType = 'in_stock_subscriptions'\ntype InStockSubscriptionRel = ResourceRel & { type: InStockSubscriptionType }\ntype MarketRel = ResourceRel & { type: MarketType }\ntype CustomerRel = ResourceRel & { type: CustomerType }\ntype SkuRel = ResourceRel & { type: SkuType }\n\n\nexport type InStockSubscriptionSort = Pick<InStockSubscription, 'id' | 'status' | 'stock_threshold'> & ResourceSort\n// export type InStockSubscriptionFilter = Pick<InStockSubscription, 'id' | 'status' | 'stock_threshold'> & ResourceFilter\n\n\ninterface InStockSubscription extends Resource {\n\t\n\treadonly type: InStockSubscriptionType\n\n\t/** \n\t * The subscription status. One of 'active' (default), 'inactive', or 'notified'.\n\t * @example ```\"active\"```\n\t */\n\tstatus: 'active' | 'inactive' | 'notified'\n\t/** \n\t * The email of the associated customer, replace the relationship.\n\t * @example ```\"john@example.com\"```\n\t */\n\tcustomer_email?: string | null\n\t/** \n\t * The code of the associated SKU, replace the relationship.\n\t * @example ```\"TSHIRTMM000000FFFFFFXLXX\"```\n\t */\n\tsku_code?: string | null\n\t/** \n\t * The threshold at which to trigger the back in stock notification.\n\t * @example ```3```\n\t */\n\tstock_threshold?: number | null\n\n\tmarket?: Market | null\n\tcustomer?: Customer | null\n\tsku?: Sku | null\n\tevents?: Event[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface InStockSubscriptionCreate extends ResourceCreate {\n\t\n\t/** \n\t * The email of the associated customer, replace the relationship.\n\t * @example ```\"john@example.com\"```\n\t */\n\tcustomer_email?: string | null\n\t/** \n\t * The code of the associated SKU, replace the relationship.\n\t * @example ```\"TSHIRTMM000000FFFFFFXLXX\"```\n\t */\n\tsku_code?: string | null\n\t/** \n\t * The threshold at which to trigger the back in stock notification.\n\t * @example ```3```\n\t */\n\tstock_threshold?: number | null\n\n\tmarket: MarketRel\n\tcustomer: CustomerRel\n\tsku: SkuRel\n\n}\n\n\ninterface InStockSubscriptionUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The code of the associated SKU, replace the relationship.\n\t * @example ```\"TSHIRTMM000000FFFFFFXLXX\"```\n\t */\n\tsku_code?: string | null\n\t/** \n\t * The threshold at which to trigger the back in stock notification.\n\t * @example ```3```\n\t */\n\tstock_threshold?: number | null\n\t/** \n\t * Send this attribute if you want to activate an inactive subscription.\n\t * @example ```true```\n\t */\n\t_activate?: boolean | null\n\t/** \n\t * Send this attribute if you want to dactivate an active subscription.\n\t * @example ```true```\n\t */\n\t_deactivate?: boolean | null\n\n\tmarket?: MarketRel | null\n\tcustomer?: CustomerRel | null\n\tsku?: SkuRel | null\n\n}\n\n\nclass InStockSubscriptions extends ApiResource<InStockSubscription> {\n\n\tstatic readonly TYPE: InStockSubscriptionType = 'in_stock_subscriptions' as const\n\n\tasync create(resource: InStockSubscriptionCreate, params?: QueryParamsRetrieve<InStockSubscription>, options?: ResourcesConfig): Promise<InStockSubscription> {\n\t\treturn this.resources.create<InStockSubscriptionCreate, InStockSubscription>({ ...resource, type: InStockSubscriptions.TYPE }, params, options)\n\t}\n\n\tasync update(resource: InStockSubscriptionUpdate, params?: QueryParamsRetrieve<InStockSubscription>, options?: ResourcesConfig): Promise<InStockSubscription> {\n\t\treturn this.resources.update<InStockSubscriptionUpdate, InStockSubscription>({ ...resource, type: InStockSubscriptions.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: InStockSubscriptions.TYPE } : id, options)\n\t}\n\n\tasync market(inStockSubscriptionId: string | InStockSubscription, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\tconst _inStockSubscriptionId = (inStockSubscriptionId as InStockSubscription).id || inStockSubscriptionId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `in_stock_subscriptions/${_inStockSubscriptionId}/market`, params, options) as unknown as Market\n\t}\n\n\tasync customer(inStockSubscriptionId: string | InStockSubscription, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\tconst _inStockSubscriptionId = (inStockSubscriptionId as InStockSubscription).id || inStockSubscriptionId as string\n\t\treturn this.resources.fetch<Customer>({ type: 'customers' }, `in_stock_subscriptions/${_inStockSubscriptionId}/customer`, params, options) as unknown as Customer\n\t}\n\n\tasync sku(inStockSubscriptionId: string | InStockSubscription, params?: QueryParamsRetrieve<Sku>, options?: ResourcesConfig): Promise<Sku> {\n\t\tconst _inStockSubscriptionId = (inStockSubscriptionId as InStockSubscription).id || inStockSubscriptionId as string\n\t\treturn this.resources.fetch<Sku>({ type: 'skus' }, `in_stock_subscriptions/${_inStockSubscriptionId}/sku`, params, options) as unknown as Sku\n\t}\n\n\tasync events(inStockSubscriptionId: string | InStockSubscription, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _inStockSubscriptionId = (inStockSubscriptionId as InStockSubscription).id || inStockSubscriptionId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `in_stock_subscriptions/${_inStockSubscriptionId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync versions(inStockSubscriptionId: string | InStockSubscription, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _inStockSubscriptionId = (inStockSubscriptionId as InStockSubscription).id || inStockSubscriptionId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `in_stock_subscriptions/${_inStockSubscriptionId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _activate(id: string | InStockSubscription, params?: QueryParamsRetrieve<InStockSubscription>, options?: ResourcesConfig): Promise<InStockSubscription> {\n\t\treturn this.resources.update<InStockSubscriptionUpdate, InStockSubscription>({ id: (typeof id === 'string')? id: id.id, type: InStockSubscriptions.TYPE, _activate: true }, params, options)\n\t}\n\n\tasync _deactivate(id: string | InStockSubscription, params?: QueryParamsRetrieve<InStockSubscription>, options?: ResourcesConfig): Promise<InStockSubscription> {\n\t\treturn this.resources.update<InStockSubscriptionUpdate, InStockSubscription>({ id: (typeof id === 'string')? id: id.id, type: InStockSubscriptions.TYPE, _deactivate: true }, params, options)\n\t}\n\n\n\tisInStockSubscription(resource: any): resource is InStockSubscription {\n\t\treturn resource.type && (resource.type === InStockSubscriptions.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): InStockSubscriptionRel {\n\t\treturn super.relationshipOneToOne<InStockSubscriptionRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): InStockSubscriptionRel[] {\n\t\treturn super.relationshipOneToMany<InStockSubscriptionRel>(...ids)\n\t}\n\n\n\ttype(): InStockSubscriptionType {\n\t\treturn InStockSubscriptions.TYPE\n\t}\n\n}\n\n\nconst instance = new InStockSubscriptions()\nexport default instance\n\nexport type { InStockSubscription, InStockSubscriptionCreate, InStockSubscriptionUpdate, InStockSubscriptionType }\n"]}
|
@@ -0,0 +1,4 @@
|
|
1
|
+
export { eO as InStockSubscription, eP as InStockSubscriptionCreate, eR as InStockSubscriptionSort, li as InStockSubscriptionType, eQ as InStockSubscriptionUpdate, ay as default } from '../api-DmIZO_Np.cjs';
|
2
|
+
import '../client.cjs';
|
3
|
+
import '../interceptor-5MISI1yn.cjs';
|
4
|
+
import '../types.cjs';
|
@@ -0,0 +1,4 @@
|
|
1
|
+
export { eO as InStockSubscription, eP as InStockSubscriptionCreate, eR as InStockSubscriptionSort, li as InStockSubscriptionType, eQ as InStockSubscriptionUpdate, ay as default } from '../api-DDgIE2i8.js';
|
2
|
+
import '../client.js';
|
3
|
+
import '../interceptor-5MISI1yn.js';
|
4
|
+
import '../types.js';
|
@@ -0,0 +1,58 @@
|
|
1
|
+
import { ApiResource } from '../resource';
|
2
|
+
|
3
|
+
class InStockSubscriptions extends ApiResource {
|
4
|
+
static TYPE = "in_stock_subscriptions";
|
5
|
+
async create(resource, params, options) {
|
6
|
+
return this.resources.create({ ...resource, type: InStockSubscriptions.TYPE }, params, options);
|
7
|
+
}
|
8
|
+
async update(resource, params, options) {
|
9
|
+
return this.resources.update({ ...resource, type: InStockSubscriptions.TYPE }, params, options);
|
10
|
+
}
|
11
|
+
async delete(id, options) {
|
12
|
+
await this.resources.delete(typeof id === "string" ? { id, type: InStockSubscriptions.TYPE } : id, options);
|
13
|
+
}
|
14
|
+
async market(inStockSubscriptionId, params, options) {
|
15
|
+
const _inStockSubscriptionId = inStockSubscriptionId.id || inStockSubscriptionId;
|
16
|
+
return this.resources.fetch({ type: "markets" }, `in_stock_subscriptions/${_inStockSubscriptionId}/market`, params, options);
|
17
|
+
}
|
18
|
+
async customer(inStockSubscriptionId, params, options) {
|
19
|
+
const _inStockSubscriptionId = inStockSubscriptionId.id || inStockSubscriptionId;
|
20
|
+
return this.resources.fetch({ type: "customers" }, `in_stock_subscriptions/${_inStockSubscriptionId}/customer`, params, options);
|
21
|
+
}
|
22
|
+
async sku(inStockSubscriptionId, params, options) {
|
23
|
+
const _inStockSubscriptionId = inStockSubscriptionId.id || inStockSubscriptionId;
|
24
|
+
return this.resources.fetch({ type: "skus" }, `in_stock_subscriptions/${_inStockSubscriptionId}/sku`, params, options);
|
25
|
+
}
|
26
|
+
async events(inStockSubscriptionId, params, options) {
|
27
|
+
const _inStockSubscriptionId = inStockSubscriptionId.id || inStockSubscriptionId;
|
28
|
+
return this.resources.fetch({ type: "events" }, `in_stock_subscriptions/${_inStockSubscriptionId}/events`, params, options);
|
29
|
+
}
|
30
|
+
async versions(inStockSubscriptionId, params, options) {
|
31
|
+
const _inStockSubscriptionId = inStockSubscriptionId.id || inStockSubscriptionId;
|
32
|
+
return this.resources.fetch({ type: "versions" }, `in_stock_subscriptions/${_inStockSubscriptionId}/versions`, params, options);
|
33
|
+
}
|
34
|
+
async _activate(id, params, options) {
|
35
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: InStockSubscriptions.TYPE, _activate: true }, params, options);
|
36
|
+
}
|
37
|
+
async _deactivate(id, params, options) {
|
38
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: InStockSubscriptions.TYPE, _deactivate: true }, params, options);
|
39
|
+
}
|
40
|
+
isInStockSubscription(resource) {
|
41
|
+
return resource.type && resource.type === InStockSubscriptions.TYPE;
|
42
|
+
}
|
43
|
+
relationship(id) {
|
44
|
+
return super.relationshipOneToOne(id);
|
45
|
+
}
|
46
|
+
relationshipToMany(...ids) {
|
47
|
+
return super.relationshipOneToMany(...ids);
|
48
|
+
}
|
49
|
+
type() {
|
50
|
+
return InStockSubscriptions.TYPE;
|
51
|
+
}
|
52
|
+
}
|
53
|
+
const instance = new InStockSubscriptions();
|
54
|
+
var in_stock_subscriptions_default = instance;
|
55
|
+
|
56
|
+
export { in_stock_subscriptions_default as default };
|
57
|
+
//# sourceMappingURL=in_stock_subscriptions.js.map
|
58
|
+
//# sourceMappingURL=in_stock_subscriptions.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../src/resources/in_stock_subscriptions.ts"],"names":[],"mappings":";;AA+GA,MAAM,6BAA6B,WAAiC,CAAA;AAAA,EAEnE,OAAgB,IAAgC,GAAA,wBAAA;AAAA,EAEhD,MAAM,MAAA,CAAO,QAAqC,EAAA,MAAA,EAAmD,OAAyD,EAAA;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AY,EAAkC,EAAA,MAAA,EAAmD,OAAyD,EAAA;AAC/J,IAAA,OAAO,KAAK,SAAU,CAAA,MAAA,CAAuD,EAAE,EAAK,EAAA,OAAO,OAAO,QAAW,GAAA,EAAA,GAAI,EAAG,CAAA,EAAA,EAAI,MAAM,oBAAqB,CAAA,IAAA,EAAM,aAAa,IAAK,EAAA,EAAG,QAAQ,OAAO,CAAA;AAAA;AAC9L,EAGA,sBAAsB,QAAgD,EAAA;AACrE,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,oBAAqB,CAAA,IAAA;AAAA;AACjE,EAGA,aAAa,EAAwD,EAAA;AACpE,IAAO,OAAA,KAAA,CAAM,qBAA6C,EAAE,CAAA;AAAA;AAC7D,EAEA,sBAAsB,GAAyC,EAAA;AAC9D,IAAO,OAAA,KAAA,CAAM,qBAA8C,CAAA,GAAG,GAAG,CAAA;AAAA;AAClE,EAGA,IAAgC,GAAA;AAC/B,IAAA,OAAO,oBAAqB,CAAA,IAAA;AAAA;AAG9B;AAGA,MAAM,QAAA,GAAW,IAAI,oBAAqB,EAAA;AAC1C,IAAO,8BAAQ,GAAA","file":"in_stock_subscriptions.js","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Market, MarketType } from './markets'\nimport type { Customer, CustomerType } from './customers'\nimport type { Sku, SkuType } from './skus'\nimport type { Event } from './events'\nimport type { Version } from './versions'\n\n\ntype InStockSubscriptionType = 'in_stock_subscriptions'\ntype InStockSubscriptionRel = ResourceRel & { type: InStockSubscriptionType }\ntype MarketRel = ResourceRel & { type: MarketType }\ntype CustomerRel = ResourceRel & { type: CustomerType }\ntype SkuRel = ResourceRel & { type: SkuType }\n\n\nexport type InStockSubscriptionSort = Pick<InStockSubscription, 'id' | 'status' | 'stock_threshold'> & ResourceSort\n// export type InStockSubscriptionFilter = Pick<InStockSubscription, 'id' | 'status' | 'stock_threshold'> & ResourceFilter\n\n\ninterface InStockSubscription extends Resource {\n\t\n\treadonly type: InStockSubscriptionType\n\n\t/** \n\t * The subscription status. One of 'active' (default), 'inactive', or 'notified'.\n\t * @example ```\"active\"```\n\t */\n\tstatus: 'active' | 'inactive' | 'notified'\n\t/** \n\t * The email of the associated customer, replace the relationship.\n\t * @example ```\"john@example.com\"```\n\t */\n\tcustomer_email?: string | null\n\t/** \n\t * The code of the associated SKU, replace the relationship.\n\t * @example ```\"TSHIRTMM000000FFFFFFXLXX\"```\n\t */\n\tsku_code?: string | null\n\t/** \n\t * The threshold at which to trigger the back in stock notification.\n\t * @example ```3```\n\t */\n\tstock_threshold?: number | null\n\n\tmarket?: Market | null\n\tcustomer?: Customer | null\n\tsku?: Sku | null\n\tevents?: Event[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface InStockSubscriptionCreate extends ResourceCreate {\n\t\n\t/** \n\t * The email of the associated customer, replace the relationship.\n\t * @example ```\"john@example.com\"```\n\t */\n\tcustomer_email?: string | null\n\t/** \n\t * The code of the associated SKU, replace the relationship.\n\t * @example ```\"TSHIRTMM000000FFFFFFXLXX\"```\n\t */\n\tsku_code?: string | null\n\t/** \n\t * The threshold at which to trigger the back in stock notification.\n\t * @example ```3```\n\t */\n\tstock_threshold?: number | null\n\n\tmarket: MarketRel\n\tcustomer: CustomerRel\n\tsku: SkuRel\n\n}\n\n\ninterface InStockSubscriptionUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The code of the associated SKU, replace the relationship.\n\t * @example ```\"TSHIRTMM000000FFFFFFXLXX\"```\n\t */\n\tsku_code?: string | null\n\t/** \n\t * The threshold at which to trigger the back in stock notification.\n\t * @example ```3```\n\t */\n\tstock_threshold?: number | null\n\t/** \n\t * Send this attribute if you want to activate an inactive subscription.\n\t * @example ```true```\n\t */\n\t_activate?: boolean | null\n\t/** \n\t * Send this attribute if you want to dactivate an active subscription.\n\t * @example ```true```\n\t */\n\t_deactivate?: boolean | null\n\n\tmarket?: MarketRel | null\n\tcustomer?: CustomerRel | null\n\tsku?: SkuRel | null\n\n}\n\n\nclass InStockSubscriptions extends ApiResource<InStockSubscription> {\n\n\tstatic readonly TYPE: InStockSubscriptionType = 'in_stock_subscriptions' as const\n\n\tasync create(resource: InStockSubscriptionCreate, params?: QueryParamsRetrieve<InStockSubscription>, options?: ResourcesConfig): Promise<InStockSubscription> {\n\t\treturn this.resources.create<InStockSubscriptionCreate, InStockSubscription>({ ...resource, type: InStockSubscriptions.TYPE }, params, options)\n\t}\n\n\tasync update(resource: InStockSubscriptionUpdate, params?: QueryParamsRetrieve<InStockSubscription>, options?: ResourcesConfig): Promise<InStockSubscription> {\n\t\treturn this.resources.update<InStockSubscriptionUpdate, InStockSubscription>({ ...resource, type: InStockSubscriptions.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: InStockSubscriptions.TYPE } : id, options)\n\t}\n\n\tasync market(inStockSubscriptionId: string | InStockSubscription, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\tconst _inStockSubscriptionId = (inStockSubscriptionId as InStockSubscription).id || inStockSubscriptionId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `in_stock_subscriptions/${_inStockSubscriptionId}/market`, params, options) as unknown as Market\n\t}\n\n\tasync customer(inStockSubscriptionId: string | InStockSubscription, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\tconst _inStockSubscriptionId = (inStockSubscriptionId as InStockSubscription).id || inStockSubscriptionId as string\n\t\treturn this.resources.fetch<Customer>({ type: 'customers' }, `in_stock_subscriptions/${_inStockSubscriptionId}/customer`, params, options) as unknown as Customer\n\t}\n\n\tasync sku(inStockSubscriptionId: string | InStockSubscription, params?: QueryParamsRetrieve<Sku>, options?: ResourcesConfig): Promise<Sku> {\n\t\tconst _inStockSubscriptionId = (inStockSubscriptionId as InStockSubscription).id || inStockSubscriptionId as string\n\t\treturn this.resources.fetch<Sku>({ type: 'skus' }, `in_stock_subscriptions/${_inStockSubscriptionId}/sku`, params, options) as unknown as Sku\n\t}\n\n\tasync events(inStockSubscriptionId: string | InStockSubscription, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _inStockSubscriptionId = (inStockSubscriptionId as InStockSubscription).id || inStockSubscriptionId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `in_stock_subscriptions/${_inStockSubscriptionId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync versions(inStockSubscriptionId: string | InStockSubscription, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _inStockSubscriptionId = (inStockSubscriptionId as InStockSubscription).id || inStockSubscriptionId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `in_stock_subscriptions/${_inStockSubscriptionId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _activate(id: string | InStockSubscription, params?: QueryParamsRetrieve<InStockSubscription>, options?: ResourcesConfig): Promise<InStockSubscription> {\n\t\treturn this.resources.update<InStockSubscriptionUpdate, InStockSubscription>({ id: (typeof id === 'string')? id: id.id, type: InStockSubscriptions.TYPE, _activate: true }, params, options)\n\t}\n\n\tasync _deactivate(id: string | InStockSubscription, params?: QueryParamsRetrieve<InStockSubscription>, options?: ResourcesConfig): Promise<InStockSubscription> {\n\t\treturn this.resources.update<InStockSubscriptionUpdate, InStockSubscription>({ id: (typeof id === 'string')? id: id.id, type: InStockSubscriptions.TYPE, _deactivate: true }, params, options)\n\t}\n\n\n\tisInStockSubscription(resource: any): resource is InStockSubscription {\n\t\treturn resource.type && (resource.type === InStockSubscriptions.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): InStockSubscriptionRel {\n\t\treturn super.relationshipOneToOne<InStockSubscriptionRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): InStockSubscriptionRel[] {\n\t\treturn super.relationshipOneToMany<InStockSubscriptionRel>(...ids)\n\t}\n\n\n\ttype(): InStockSubscriptionType {\n\t\treturn InStockSubscriptions.TYPE\n\t}\n\n}\n\n\nconst instance = new InStockSubscriptions()\nexport default instance\n\nexport type { InStockSubscription, InStockSubscriptionCreate, InStockSubscriptionUpdate, InStockSubscriptionType }\n"]}
|
@@ -0,0 +1,52 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
var resource = require('../resource');
|
4
|
+
|
5
|
+
class InventoryModels extends resource.ApiResource {
|
6
|
+
static TYPE = "inventory_models";
|
7
|
+
async create(resource, params, options) {
|
8
|
+
return this.resources.create({ ...resource, type: InventoryModels.TYPE }, params, options);
|
9
|
+
}
|
10
|
+
async update(resource, params, options) {
|
11
|
+
return this.resources.update({ ...resource, type: InventoryModels.TYPE }, params, options);
|
12
|
+
}
|
13
|
+
async delete(id, options) {
|
14
|
+
await this.resources.delete(typeof id === "string" ? { id, type: InventoryModels.TYPE } : id, options);
|
15
|
+
}
|
16
|
+
async inventory_stock_locations(inventoryModelId, params, options) {
|
17
|
+
const _inventoryModelId = inventoryModelId.id || inventoryModelId;
|
18
|
+
return this.resources.fetch({ type: "inventory_stock_locations" }, `inventory_models/${_inventoryModelId}/inventory_stock_locations`, params, options);
|
19
|
+
}
|
20
|
+
async inventory_return_locations(inventoryModelId, params, options) {
|
21
|
+
const _inventoryModelId = inventoryModelId.id || inventoryModelId;
|
22
|
+
return this.resources.fetch({ type: "inventory_return_locations" }, `inventory_models/${_inventoryModelId}/inventory_return_locations`, params, options);
|
23
|
+
}
|
24
|
+
async attachments(inventoryModelId, params, options) {
|
25
|
+
const _inventoryModelId = inventoryModelId.id || inventoryModelId;
|
26
|
+
return this.resources.fetch({ type: "attachments" }, `inventory_models/${_inventoryModelId}/attachments`, params, options);
|
27
|
+
}
|
28
|
+
async versions(inventoryModelId, params, options) {
|
29
|
+
const _inventoryModelId = inventoryModelId.id || inventoryModelId;
|
30
|
+
return this.resources.fetch({ type: "versions" }, `inventory_models/${_inventoryModelId}/versions`, params, options);
|
31
|
+
}
|
32
|
+
isInventoryModel(resource) {
|
33
|
+
return resource.type && resource.type === InventoryModels.TYPE;
|
34
|
+
}
|
35
|
+
relationship(id) {
|
36
|
+
return super.relationshipOneToOne(id);
|
37
|
+
}
|
38
|
+
relationshipToMany(...ids) {
|
39
|
+
return super.relationshipOneToMany(...ids);
|
40
|
+
}
|
41
|
+
type() {
|
42
|
+
return InventoryModels.TYPE;
|
43
|
+
}
|
44
|
+
}
|
45
|
+
const instance = new InventoryModels();
|
46
|
+
var inventory_models_default = instance;
|
47
|
+
|
48
|
+
module.exports = inventory_models_default;
|
49
|
+
//# sourceMappingURL=inventory_models.cjs.map
|
50
|
+
|
51
|
+
module.exports = exports.default;
|
52
|
+
//# sourceMappingURL=inventory_models.cjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../src/resources/inventory_models.ts"],"names":["ApiResource"],"mappings":";;;;AAqIA,MAAM,wBAAwBA,oBAA4B,CAAA;AAAA,EAEzD,OAAgB,IAA2B,GAAA,kBAAA;AAAA,EAE3C,MAAM,MAAA,CAAO,QAAgC,EAAA,MAAA,EAA8C,OAAoD,EAAA;AAC9I,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA6C,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,eAAgB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAChI,EAEA,MAAM,MAAA,CAAO,QAAgC,EAAA,MAAA,EAA8C,OAAoD,EAAA;AAC9I,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA6C,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,eAAgB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,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mC,OAA2D,EAAA;AACvJ,IAAM,MAAA,iBAAA,GAAqB,iBAAoC,EAAM,IAAA,gBAAA;AACrE,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAe,EAAE,IAAA,EAAM,UAAW,EAAA,EAAG,CAAoB,iBAAA,EAAA,iBAAiB,CAAa,SAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC7H,EAGA,iBAAiB,QAA2C,EAAA;AAC3D,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,eAAgB,CAAA,IAAA;AAAA;AAC5D,EAGA,aAAa,EAAmD,EAAA;AAC/D,IAAO,OAAA,KAAA,CAAM,qBAAwC,EAAE,CAAA;AAAA;AACxD,EAEA,sBAAsB,GAAoC,EAAA;AACzD,IAAO,OAAA,KAAA,CAAM,qBAAyC,CAAA,GAAG,GAAG,CAAA;AAAA;AAC7D,EAGA,IAA2B,GAAA;AAC1B,IAAA,OAAO,eAAgB,CAAA,IAAA;AAAA;AAGzB;AAGA,MAAM,QAAA,GAAW,IAAI,eAAgB,EAAA;AACrC,IAAO,wBAAQ,GAAA","file":"inventory_models.cjs","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { InventoryStockLocation } from './inventory_stock_locations'\nimport type { InventoryReturnLocation } from './inventory_return_locations'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype InventoryModelType = 'inventory_models'\ntype InventoryModelRel = ResourceRel & { type: InventoryModelType }\n\n\nexport type InventoryModelSort = Pick<InventoryModel, 'id' | 'name' | 'strategy' | 'stock_locations_cutoff' | 'stock_reservation_cutoff'> & ResourceSort\n// export type InventoryModelFilter = Pick<InventoryModel, 'id' | 'name' | 'strategy' | 'stock_locations_cutoff' | 'stock_reservation_cutoff'> & ResourceFilter\n\n\ninterface InventoryModel extends Resource {\n\t\n\treadonly type: InventoryModelType\n\n\t/** \n\t * The inventory model's internal name.\n\t * @example ```\"EU Inventory Model\"```\n\t */\n\tname: string\n\t/** \n\t * The inventory model's shipping strategy: one between 'no_split' (default), 'split_shipments', 'ship_from_primary' and 'ship_from_first_available_or_primary'.\n\t * @example ```\"no_split\"```\n\t */\n\tstrategy?: string | null\n\t/** \n\t * The maximum number of stock locations used for inventory computation.\n\t * @example ```3```\n\t */\n\tstock_locations_cutoff?: number | null\n\t/** \n\t * The duration in seconds of the generated stock reservations.\n\t * @example ```3600```\n\t */\n\tstock_reservation_cutoff?: number | null\n\t/** \n\t * Indicates if the the stock transfers must be put on hold automatically with the associated shipment.\n\t * @example ```true```\n\t */\n\tput_stock_transfers_on_hold?: boolean | null\n\t/** \n\t * Indicates if the the stock will be decremented manually after the order approval.\n\t * @example ```true```\n\t */\n\tmanual_stock_decrement?: boolean | null\n\n\tinventory_stock_locations?: InventoryStockLocation[] | null\n\tinventory_return_locations?: InventoryReturnLocation[] | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface InventoryModelCreate extends ResourceCreate {\n\t\n\t/** \n\t * The inventory model's internal name.\n\t * @example ```\"EU Inventory Model\"```\n\t */\n\tname: string\n\t/** \n\t * The inventory model's shipping strategy: one between 'no_split' (default), 'split_shipments', 'ship_from_primary' and 'ship_from_first_available_or_primary'.\n\t * @example ```\"no_split\"```\n\t */\n\tstrategy?: string | null\n\t/** \n\t * The maximum number of stock locations used for inventory computation.\n\t * @example ```3```\n\t */\n\tstock_locations_cutoff?: number | null\n\t/** \n\t * The duration in seconds of the generated stock reservations.\n\t * @example ```3600```\n\t */\n\tstock_reservation_cutoff?: number | null\n\t/** \n\t * Indicates if the the stock transfers must be put on hold automatically with the associated shipment.\n\t * @example ```true```\n\t */\n\tput_stock_transfers_on_hold?: boolean | null\n\t/** \n\t * Indicates if the the stock will be decremented manually after the order approval.\n\t * @example ```true```\n\t */\n\tmanual_stock_decrement?: boolean | null\n\t\n}\n\n\ninterface InventoryModelUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The inventory model's internal name.\n\t * @example ```\"EU Inventory Model\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The inventory model's shipping strategy: one between 'no_split' (default), 'split_shipments', 'ship_from_primary' and 'ship_from_first_available_or_primary'.\n\t * @example ```\"no_split\"```\n\t */\n\tstrategy?: string | null\n\t/** \n\t * The maximum number of stock locations used for inventory computation.\n\t * @example ```3```\n\t */\n\tstock_locations_cutoff?: number | null\n\t/** \n\t * The duration in seconds of the generated stock reservations.\n\t * @example ```3600```\n\t */\n\tstock_reservation_cutoff?: number | null\n\t/** \n\t * Indicates if the the stock transfers must be put on hold automatically with the associated shipment.\n\t * @example ```true```\n\t */\n\tput_stock_transfers_on_hold?: boolean | null\n\t/** \n\t * Indicates if the the stock will be decremented manually after the order approval.\n\t * @example ```true```\n\t */\n\tmanual_stock_decrement?: boolean | null\n\t\n}\n\n\nclass InventoryModels extends ApiResource<InventoryModel> {\n\n\tstatic readonly TYPE: InventoryModelType = 'inventory_models' as const\n\n\tasync create(resource: InventoryModelCreate, params?: QueryParamsRetrieve<InventoryModel>, options?: ResourcesConfig): Promise<InventoryModel> {\n\t\treturn this.resources.create<InventoryModelCreate, InventoryModel>({ ...resource, type: InventoryModels.TYPE }, params, options)\n\t}\n\n\tasync update(resource: InventoryModelUpdate, params?: QueryParamsRetrieve<InventoryModel>, options?: ResourcesConfig): Promise<InventoryModel> {\n\t\treturn this.resources.update<InventoryModelUpdate, InventoryModel>({ ...resource, type: InventoryModels.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: InventoryModels.TYPE } : id, options)\n\t}\n\n\tasync inventory_stock_locations(inventoryModelId: string | InventoryModel, params?: QueryParamsList<InventoryStockLocation>, options?: ResourcesConfig): Promise<ListResponse<InventoryStockLocation>> {\n\t\tconst _inventoryModelId = (inventoryModelId as InventoryModel).id || inventoryModelId as string\n\t\treturn this.resources.fetch<InventoryStockLocation>({ type: 'inventory_stock_locations' }, `inventory_models/${_inventoryModelId}/inventory_stock_locations`, params, options) as unknown as ListResponse<InventoryStockLocation>\n\t}\n\n\tasync inventory_return_locations(inventoryModelId: string | InventoryModel, params?: QueryParamsList<InventoryReturnLocation>, options?: ResourcesConfig): Promise<ListResponse<InventoryReturnLocation>> {\n\t\tconst _inventoryModelId = (inventoryModelId as InventoryModel).id || inventoryModelId as string\n\t\treturn this.resources.fetch<InventoryReturnLocation>({ type: 'inventory_return_locations' }, `inventory_models/${_inventoryModelId}/inventory_return_locations`, params, options) as unknown as ListResponse<InventoryReturnLocation>\n\t}\n\n\tasync attachments(inventoryModelId: string | InventoryModel, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _inventoryModelId = (inventoryModelId as InventoryModel).id || inventoryModelId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `inventory_models/${_inventoryModelId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(inventoryModelId: string | InventoryModel, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _inventoryModelId = (inventoryModelId as InventoryModel).id || inventoryModelId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `inventory_models/${_inventoryModelId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisInventoryModel(resource: any): resource is InventoryModel {\n\t\treturn resource.type && (resource.type === InventoryModels.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): InventoryModelRel {\n\t\treturn super.relationshipOneToOne<InventoryModelRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): InventoryModelRel[] {\n\t\treturn super.relationshipOneToMany<InventoryModelRel>(...ids)\n\t}\n\n\n\ttype(): InventoryModelType {\n\t\treturn InventoryModels.TYPE\n\t}\n\n}\n\n\nconst instance = new InventoryModels()\nexport default instance\n\nexport type { InventoryModel, InventoryModelCreate, InventoryModelUpdate, InventoryModelType }\n"]}
|
@@ -0,0 +1,48 @@
|
|
1
|
+
import { ApiResource } from '../resource';
|
2
|
+
|
3
|
+
class InventoryModels extends ApiResource {
|
4
|
+
static TYPE = "inventory_models";
|
5
|
+
async create(resource, params, options) {
|
6
|
+
return this.resources.create({ ...resource, type: InventoryModels.TYPE }, params, options);
|
7
|
+
}
|
8
|
+
async update(resource, params, options) {
|
9
|
+
return this.resources.update({ ...resource, type: InventoryModels.TYPE }, params, options);
|
10
|
+
}
|
11
|
+
async delete(id, options) {
|
12
|
+
await this.resources.delete(typeof id === "string" ? { id, type: InventoryModels.TYPE } : id, options);
|
13
|
+
}
|
14
|
+
async inventory_stock_locations(inventoryModelId, params, options) {
|
15
|
+
const _inventoryModelId = inventoryModelId.id || inventoryModelId;
|
16
|
+
return this.resources.fetch({ type: "inventory_stock_locations" }, `inventory_models/${_inventoryModelId}/inventory_stock_locations`, params, options);
|
17
|
+
}
|
18
|
+
async inventory_return_locations(inventoryModelId, params, options) {
|
19
|
+
const _inventoryModelId = inventoryModelId.id || inventoryModelId;
|
20
|
+
return this.resources.fetch({ type: "inventory_return_locations" }, `inventory_models/${_inventoryModelId}/inventory_return_locations`, params, options);
|
21
|
+
}
|
22
|
+
async attachments(inventoryModelId, params, options) {
|
23
|
+
const _inventoryModelId = inventoryModelId.id || inventoryModelId;
|
24
|
+
return this.resources.fetch({ type: "attachments" }, `inventory_models/${_inventoryModelId}/attachments`, params, options);
|
25
|
+
}
|
26
|
+
async versions(inventoryModelId, params, options) {
|
27
|
+
const _inventoryModelId = inventoryModelId.id || inventoryModelId;
|
28
|
+
return this.resources.fetch({ type: "versions" }, `inventory_models/${_inventoryModelId}/versions`, params, options);
|
29
|
+
}
|
30
|
+
isInventoryModel(resource) {
|
31
|
+
return resource.type && resource.type === InventoryModels.TYPE;
|
32
|
+
}
|
33
|
+
relationship(id) {
|
34
|
+
return super.relationshipOneToOne(id);
|
35
|
+
}
|
36
|
+
relationshipToMany(...ids) {
|
37
|
+
return super.relationshipOneToMany(...ids);
|
38
|
+
}
|
39
|
+
type() {
|
40
|
+
return InventoryModels.TYPE;
|
41
|
+
}
|
42
|
+
}
|
43
|
+
const instance = new InventoryModels();
|
44
|
+
var inventory_models_default = instance;
|
45
|
+
|
46
|
+
export { inventory_models_default as default };
|
47
|
+
//# sourceMappingURL=inventory_models.js.map
|
48
|
+
//# sourceMappingURL=inventory_models.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../src/resources/inventory_models.ts"],"names":[],"mappings":";;AAqIA,MAAM,wBAAwB,WAA4B,CAAA;AAAA,EAEzD,OAAgB,IAA2B,GAAA,kBAAA;AAAA,EAE3C,MAAM,MAAA,CAAO,QAAgC,EAAA,MAAA,EAA8C,OAAoD,EAAA;AAC9I,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA6C,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,eAAgB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAChI,EAEA,MAAM,MAAA,CAAO,QAAgC,EAAA,MAAA,EAA8C,OAAoD,EAAA;AAC9I,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA6C,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,eAAgB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAChI,EAEA,MAAM,MAAO,CAAA,EAAA,EAAyB,OAA0C,EAAA;AAC/E,IAAA,MAAM,IAAK,CAAA,SAAA,CAAU,MAAQ,CAAA,OAAO,EAAO,KAAA,QAAA,GAAW,EAAE,EAAA,EAAI,IAAM,EAAA,eAAA,CAAgB,IAAK,EAAA,GAAI,IAAI,OAAO,CAAA;AAAA;AACvG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;AAAA;AAC7H,EAGA,iBAAiB,QAA2C,EAAA;AAC3D,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,eAAgB,CAAA,IAAA;AAAA;AAC5D,EAGA,aAAa,EAAmD,EAAA;AAC/D,IAAO,OAAA,KAAA,CAAM,qBAAwC,EAAE,CAAA;AAAA;AACxD,EAEA,sBAAsB,GAAoC,EAAA;AACzD,IAAO,OAAA,KAAA,CAAM,qBAAyC,CAAA,GAAG,GAAG,CAAA;AAAA;AAC7D,EAGA,IAA2B,GAAA;AAC1B,IAAA,OAAO,eAAgB,CAAA,IAAA;AAAA;AAGzB;AAGA,MAAM,QAAA,GAAW,IAAI,eAAgB,EAAA;AACrC,IAAO,wBAAQ,GAAA","file":"inventory_models.js","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { InventoryStockLocation } from './inventory_stock_locations'\nimport type { InventoryReturnLocation } from './inventory_return_locations'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype InventoryModelType = 'inventory_models'\ntype InventoryModelRel = ResourceRel & { type: InventoryModelType }\n\n\nexport type InventoryModelSort = Pick<InventoryModel, 'id' | 'name' | 'strategy' | 'stock_locations_cutoff' | 'stock_reservation_cutoff'> & ResourceSort\n// export type InventoryModelFilter = Pick<InventoryModel, 'id' | 'name' | 'strategy' | 'stock_locations_cutoff' | 'stock_reservation_cutoff'> & ResourceFilter\n\n\ninterface InventoryModel extends Resource {\n\t\n\treadonly type: InventoryModelType\n\n\t/** \n\t * The inventory model's internal name.\n\t * @example ```\"EU Inventory Model\"```\n\t */\n\tname: string\n\t/** \n\t * The inventory model's shipping strategy: one between 'no_split' (default), 'split_shipments', 'ship_from_primary' and 'ship_from_first_available_or_primary'.\n\t * @example ```\"no_split\"```\n\t */\n\tstrategy?: string | null\n\t/** \n\t * The maximum number of stock locations used for inventory computation.\n\t * @example ```3```\n\t */\n\tstock_locations_cutoff?: number | null\n\t/** \n\t * The duration in seconds of the generated stock reservations.\n\t * @example ```3600```\n\t */\n\tstock_reservation_cutoff?: number | null\n\t/** \n\t * Indicates if the the stock transfers must be put on hold automatically with the associated shipment.\n\t * @example ```true```\n\t */\n\tput_stock_transfers_on_hold?: boolean | null\n\t/** \n\t * Indicates if the the stock will be decremented manually after the order approval.\n\t * @example ```true```\n\t */\n\tmanual_stock_decrement?: boolean | null\n\n\tinventory_stock_locations?: InventoryStockLocation[] | null\n\tinventory_return_locations?: InventoryReturnLocation[] | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface InventoryModelCreate extends ResourceCreate {\n\t\n\t/** \n\t * The inventory model's internal name.\n\t * @example ```\"EU Inventory Model\"```\n\t */\n\tname: string\n\t/** \n\t * The inventory model's shipping strategy: one between 'no_split' (default), 'split_shipments', 'ship_from_primary' and 'ship_from_first_available_or_primary'.\n\t * @example ```\"no_split\"```\n\t */\n\tstrategy?: string | null\n\t/** \n\t * The maximum number of stock locations used for inventory computation.\n\t * @example ```3```\n\t */\n\tstock_locations_cutoff?: number | null\n\t/** \n\t * The duration in seconds of the generated stock reservations.\n\t * @example ```3600```\n\t */\n\tstock_reservation_cutoff?: number | null\n\t/** \n\t * Indicates if the the stock transfers must be put on hold automatically with the associated shipment.\n\t * @example ```true```\n\t */\n\tput_stock_transfers_on_hold?: boolean | null\n\t/** \n\t * Indicates if the the stock will be decremented manually after the order approval.\n\t * @example ```true```\n\t */\n\tmanual_stock_decrement?: boolean | null\n\t\n}\n\n\ninterface InventoryModelUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The inventory model's internal name.\n\t * @example ```\"EU Inventory Model\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The inventory model's shipping strategy: one between 'no_split' (default), 'split_shipments', 'ship_from_primary' and 'ship_from_first_available_or_primary'.\n\t * @example ```\"no_split\"```\n\t */\n\tstrategy?: string | null\n\t/** \n\t * The maximum number of stock locations used for inventory computation.\n\t * @example ```3```\n\t */\n\tstock_locations_cutoff?: number | null\n\t/** \n\t * The duration in seconds of the generated stock reservations.\n\t * @example ```3600```\n\t */\n\tstock_reservation_cutoff?: number | null\n\t/** \n\t * Indicates if the the stock transfers must be put on hold automatically with the associated shipment.\n\t * @example ```true```\n\t */\n\tput_stock_transfers_on_hold?: boolean | null\n\t/** \n\t * Indicates if the the stock will be decremented manually after the order approval.\n\t * @example ```true```\n\t */\n\tmanual_stock_decrement?: boolean | null\n\t\n}\n\n\nclass InventoryModels extends ApiResource<InventoryModel> {\n\n\tstatic readonly TYPE: InventoryModelType = 'inventory_models' as const\n\n\tasync create(resource: InventoryModelCreate, params?: QueryParamsRetrieve<InventoryModel>, options?: ResourcesConfig): Promise<InventoryModel> {\n\t\treturn this.resources.create<InventoryModelCreate, InventoryModel>({ ...resource, type: InventoryModels.TYPE }, params, options)\n\t}\n\n\tasync update(resource: InventoryModelUpdate, params?: QueryParamsRetrieve<InventoryModel>, options?: ResourcesConfig): Promise<InventoryModel> {\n\t\treturn this.resources.update<InventoryModelUpdate, InventoryModel>({ ...resource, type: InventoryModels.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: InventoryModels.TYPE } : id, options)\n\t}\n\n\tasync inventory_stock_locations(inventoryModelId: string | InventoryModel, params?: QueryParamsList<InventoryStockLocation>, options?: ResourcesConfig): Promise<ListResponse<InventoryStockLocation>> {\n\t\tconst _inventoryModelId = (inventoryModelId as InventoryModel).id || inventoryModelId as string\n\t\treturn this.resources.fetch<InventoryStockLocation>({ type: 'inventory_stock_locations' }, `inventory_models/${_inventoryModelId}/inventory_stock_locations`, params, options) as unknown as ListResponse<InventoryStockLocation>\n\t}\n\n\tasync inventory_return_locations(inventoryModelId: string | InventoryModel, params?: QueryParamsList<InventoryReturnLocation>, options?: ResourcesConfig): Promise<ListResponse<InventoryReturnLocation>> {\n\t\tconst _inventoryModelId = (inventoryModelId as InventoryModel).id || inventoryModelId as string\n\t\treturn this.resources.fetch<InventoryReturnLocation>({ type: 'inventory_return_locations' }, `inventory_models/${_inventoryModelId}/inventory_return_locations`, params, options) as unknown as ListResponse<InventoryReturnLocation>\n\t}\n\n\tasync attachments(inventoryModelId: string | InventoryModel, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _inventoryModelId = (inventoryModelId as InventoryModel).id || inventoryModelId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `inventory_models/${_inventoryModelId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(inventoryModelId: string | InventoryModel, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _inventoryModelId = (inventoryModelId as InventoryModel).id || inventoryModelId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `inventory_models/${_inventoryModelId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisInventoryModel(resource: any): resource is InventoryModel {\n\t\treturn resource.type && (resource.type === InventoryModels.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): InventoryModelRel {\n\t\treturn super.relationshipOneToOne<InventoryModelRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): InventoryModelRel[] {\n\t\treturn super.relationshipOneToMany<InventoryModelRel>(...ids)\n\t}\n\n\n\ttype(): InventoryModelType {\n\t\treturn InventoryModels.TYPE\n\t}\n\n}\n\n\nconst instance = new InventoryModels()\nexport default instance\n\nexport type { InventoryModel, InventoryModelCreate, InventoryModelUpdate, InventoryModelType }\n"]}
|
@@ -0,0 +1,48 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
var resource = require('../resource');
|
4
|
+
|
5
|
+
class InventoryReturnLocations extends resource.ApiResource {
|
6
|
+
static TYPE = "inventory_return_locations";
|
7
|
+
async create(resource, params, options) {
|
8
|
+
return this.resources.create({ ...resource, type: InventoryReturnLocations.TYPE }, params, options);
|
9
|
+
}
|
10
|
+
async update(resource, params, options) {
|
11
|
+
return this.resources.update({ ...resource, type: InventoryReturnLocations.TYPE }, params, options);
|
12
|
+
}
|
13
|
+
async delete(id, options) {
|
14
|
+
await this.resources.delete(typeof id === "string" ? { id, type: InventoryReturnLocations.TYPE } : id, options);
|
15
|
+
}
|
16
|
+
async stock_location(inventoryReturnLocationId, params, options) {
|
17
|
+
const _inventoryReturnLocationId = inventoryReturnLocationId.id || inventoryReturnLocationId;
|
18
|
+
return this.resources.fetch({ type: "stock_locations" }, `inventory_return_locations/${_inventoryReturnLocationId}/stock_location`, params, options);
|
19
|
+
}
|
20
|
+
async inventory_model(inventoryReturnLocationId, params, options) {
|
21
|
+
const _inventoryReturnLocationId = inventoryReturnLocationId.id || inventoryReturnLocationId;
|
22
|
+
return this.resources.fetch({ type: "inventory_models" }, `inventory_return_locations/${_inventoryReturnLocationId}/inventory_model`, params, options);
|
23
|
+
}
|
24
|
+
async versions(inventoryReturnLocationId, params, options) {
|
25
|
+
const _inventoryReturnLocationId = inventoryReturnLocationId.id || inventoryReturnLocationId;
|
26
|
+
return this.resources.fetch({ type: "versions" }, `inventory_return_locations/${_inventoryReturnLocationId}/versions`, params, options);
|
27
|
+
}
|
28
|
+
isInventoryReturnLocation(resource) {
|
29
|
+
return resource.type && resource.type === InventoryReturnLocations.TYPE;
|
30
|
+
}
|
31
|
+
relationship(id) {
|
32
|
+
return super.relationshipOneToOne(id);
|
33
|
+
}
|
34
|
+
relationshipToMany(...ids) {
|
35
|
+
return super.relationshipOneToMany(...ids);
|
36
|
+
}
|
37
|
+
type() {
|
38
|
+
return InventoryReturnLocations.TYPE;
|
39
|
+
}
|
40
|
+
}
|
41
|
+
const instance = new InventoryReturnLocations();
|
42
|
+
var inventory_return_locations_default = instance;
|
43
|
+
|
44
|
+
module.exports = inventory_return_locations_default;
|
45
|
+
//# sourceMappingURL=inventory_return_locations.cjs.map
|
46
|
+
|
47
|
+
module.exports = exports.default;
|
48
|
+
//# sourceMappingURL=inventory_return_locations.cjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../src/resources/inventory_return_locations.ts"],"names":["ApiResource"],"mappings":";;;;AAgEA,MAAM,iCAAiCA,oBAAqC,CAAA;AAAA,EAE3E,OAAgB,IAAoC,GAAA,4BAAA;AAAA,EAEpD,MAAM,MAAA,CAAO,QAAyC,EAAA,MAAA,EAAuD,OAA6D,EAAA;AACzK,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA+D,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,wBAAyB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC3J,EAEA,MAAM,MAAA,CAAO,QAAyC,EAAA,MAAA,EAAuD,OAA6D,EAAA;AACzK,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA+D,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,wBAAyB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC3J,EAEA,MAAM,MAAO,CAAA,EAAA,EAAyB,OAA0C,EAAA;AAC/E,IAAA,MAAM,IAAK,CAAA,SAAA,CAAU,MAAQ,CAAA,OAAO,EAAO,KAAA,QAAA,GAAW,EAAE,EAAA,EAAI,IAAM,EAAA,wBAAA,CAAyB,IAAK,EAAA,GAAI,IAAI,OAAO,CAAA;AAAA;AAChH,EAEA,MAAM,cAAA,CAAe,yBAA6D,EAAA,MAAA,EAA6C,OAAmD,EAAA;AACjL,IAAM,MAAA,0BAAA,GAA8B,0BAAsD,EAAM,IAAA,yBAAA;AAChG,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAqB,EAAE,IAAA,EAAM,iBAAkB,E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port type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { StockLocation, StockLocationType } from './stock_locations'\nimport type { InventoryModel, InventoryModelType } from './inventory_models'\nimport type { Version } from './versions'\n\n\ntype InventoryReturnLocationType = 'inventory_return_locations'\ntype InventoryReturnLocationRel = ResourceRel & { type: InventoryReturnLocationType }\ntype StockLocationRel = ResourceRel & { type: StockLocationType }\ntype InventoryModelRel = ResourceRel & { type: InventoryModelType }\n\n\nexport type InventoryReturnLocationSort = Pick<InventoryReturnLocation, 'id' | 'priority'> & ResourceSort\n// export type InventoryReturnLocationFilter = Pick<InventoryReturnLocation, 'id' | 'priority'> & ResourceFilter\n\n\ninterface InventoryReturnLocation extends Resource {\n\t\n\treadonly type: InventoryReturnLocationType\n\n\t/** \n\t * The inventory return location priority within the associated invetory model.\n\t * @example ```1```\n\t */\n\tpriority: number\n\n\tstock_location?: StockLocation | null\n\tinventory_model?: InventoryModel | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface InventoryReturnLocationCreate extends ResourceCreate {\n\t\n\t/** \n\t * The inventory return location priority within the associated invetory model.\n\t * @example ```1```\n\t */\n\tpriority: number\n\n\tstock_location: StockLocationRel\n\tinventory_model: InventoryModelRel\n\n}\n\n\ninterface InventoryReturnLocationUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The inventory return location priority within the associated invetory model.\n\t * @example ```1```\n\t */\n\tpriority?: number | null\n\n\tstock_location?: StockLocationRel | null\n\tinventory_model?: InventoryModelRel | null\n\n}\n\n\nclass InventoryReturnLocations extends ApiResource<InventoryReturnLocation> {\n\n\tstatic readonly TYPE: InventoryReturnLocationType = 'inventory_return_locations' as const\n\n\tasync create(resource: InventoryReturnLocationCreate, params?: QueryParamsRetrieve<InventoryReturnLocation>, options?: ResourcesConfig): Promise<InventoryReturnLocation> {\n\t\treturn this.resources.create<InventoryReturnLocationCreate, InventoryReturnLocation>({ ...resource, type: InventoryReturnLocations.TYPE }, params, options)\n\t}\n\n\tasync update(resource: InventoryReturnLocationUpdate, params?: QueryParamsRetrieve<InventoryReturnLocation>, options?: ResourcesConfig): Promise<InventoryReturnLocation> {\n\t\treturn this.resources.update<InventoryReturnLocationUpdate, InventoryReturnLocation>({ ...resource, type: InventoryReturnLocations.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: InventoryReturnLocations.TYPE } : id, options)\n\t}\n\n\tasync stock_location(inventoryReturnLocationId: string | InventoryReturnLocation, params?: QueryParamsRetrieve<StockLocation>, options?: ResourcesConfig): Promise<StockLocation> {\n\t\tconst _inventoryReturnLocationId = (inventoryReturnLocationId as InventoryReturnLocation).id || inventoryReturnLocationId as string\n\t\treturn this.resources.fetch<StockLocation>({ type: 'stock_locations' }, `inventory_return_locations/${_inventoryReturnLocationId}/stock_location`, params, options) as unknown as StockLocation\n\t}\n\n\tasync inventory_model(inventoryReturnLocationId: string | InventoryReturnLocation, params?: QueryParamsRetrieve<InventoryModel>, options?: ResourcesConfig): Promise<InventoryModel> {\n\t\tconst _inventoryReturnLocationId = (inventoryReturnLocationId as InventoryReturnLocation).id || inventoryReturnLocationId as string\n\t\treturn this.resources.fetch<InventoryModel>({ type: 'inventory_models' }, `inventory_return_locations/${_inventoryReturnLocationId}/inventory_model`, params, options) as unknown as InventoryModel\n\t}\n\n\tasync versions(inventoryReturnLocationId: string | InventoryReturnLocation, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _inventoryReturnLocationId = (inventoryReturnLocationId as InventoryReturnLocation).id || inventoryReturnLocationId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `inventory_return_locations/${_inventoryReturnLocationId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisInventoryReturnLocation(resource: any): resource is InventoryReturnLocation {\n\t\treturn resource.type && (resource.type === InventoryReturnLocations.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): InventoryReturnLocationRel {\n\t\treturn super.relationshipOneToOne<InventoryReturnLocationRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): InventoryReturnLocationRel[] {\n\t\treturn super.relationshipOneToMany<InventoryReturnLocationRel>(...ids)\n\t}\n\n\n\ttype(): InventoryReturnLocationType {\n\t\treturn InventoryReturnLocations.TYPE\n\t}\n\n}\n\n\nconst instance = new InventoryReturnLocations()\nexport default instance\n\nexport type { InventoryReturnLocation, InventoryReturnLocationCreate, InventoryReturnLocationUpdate, InventoryReturnLocationType }\n"]}
|
@@ -0,0 +1,4 @@
|
|
1
|
+
export { eW as InventoryReturnLocation, eX as InventoryReturnLocationCreate, eZ as InventoryReturnLocationSort, jt as InventoryReturnLocationType, eY as InventoryReturnLocationUpdate, aA as default } from '../api-DmIZO_Np.cjs';
|
2
|
+
import '../client.cjs';
|
3
|
+
import '../interceptor-5MISI1yn.cjs';
|
4
|
+
import '../types.cjs';
|
@@ -0,0 +1,4 @@
|
|
1
|
+
export { eW as InventoryReturnLocation, eX as InventoryReturnLocationCreate, eZ as InventoryReturnLocationSort, jt as InventoryReturnLocationType, eY as InventoryReturnLocationUpdate, aA as default } from '../api-DDgIE2i8.js';
|
2
|
+
import '../client.js';
|
3
|
+
import '../interceptor-5MISI1yn.js';
|
4
|
+
import '../types.js';
|
@@ -0,0 +1,44 @@
|
|
1
|
+
import { ApiResource } from '../resource';
|
2
|
+
|
3
|
+
class InventoryReturnLocations extends ApiResource {
|
4
|
+
static TYPE = "inventory_return_locations";
|
5
|
+
async create(resource, params, options) {
|
6
|
+
return this.resources.create({ ...resource, type: InventoryReturnLocations.TYPE }, params, options);
|
7
|
+
}
|
8
|
+
async update(resource, params, options) {
|
9
|
+
return this.resources.update({ ...resource, type: InventoryReturnLocations.TYPE }, params, options);
|
10
|
+
}
|
11
|
+
async delete(id, options) {
|
12
|
+
await this.resources.delete(typeof id === "string" ? { id, type: InventoryReturnLocations.TYPE } : id, options);
|
13
|
+
}
|
14
|
+
async stock_location(inventoryReturnLocationId, params, options) {
|
15
|
+
const _inventoryReturnLocationId = inventoryReturnLocationId.id || inventoryReturnLocationId;
|
16
|
+
return this.resources.fetch({ type: "stock_locations" }, `inventory_return_locations/${_inventoryReturnLocationId}/stock_location`, params, options);
|
17
|
+
}
|
18
|
+
async inventory_model(inventoryReturnLocationId, params, options) {
|
19
|
+
const _inventoryReturnLocationId = inventoryReturnLocationId.id || inventoryReturnLocationId;
|
20
|
+
return this.resources.fetch({ type: "inventory_models" }, `inventory_return_locations/${_inventoryReturnLocationId}/inventory_model`, params, options);
|
21
|
+
}
|
22
|
+
async versions(inventoryReturnLocationId, params, options) {
|
23
|
+
const _inventoryReturnLocationId = inventoryReturnLocationId.id || inventoryReturnLocationId;
|
24
|
+
return this.resources.fetch({ type: "versions" }, `inventory_return_locations/${_inventoryReturnLocationId}/versions`, params, options);
|
25
|
+
}
|
26
|
+
isInventoryReturnLocation(resource) {
|
27
|
+
return resource.type && resource.type === InventoryReturnLocations.TYPE;
|
28
|
+
}
|
29
|
+
relationship(id) {
|
30
|
+
return super.relationshipOneToOne(id);
|
31
|
+
}
|
32
|
+
relationshipToMany(...ids) {
|
33
|
+
return super.relationshipOneToMany(...ids);
|
34
|
+
}
|
35
|
+
type() {
|
36
|
+
return InventoryReturnLocations.TYPE;
|
37
|
+
}
|
38
|
+
}
|
39
|
+
const instance = new InventoryReturnLocations();
|
40
|
+
var inventory_return_locations_default = instance;
|
41
|
+
|
42
|
+
export { inventory_return_locations_default as default };
|
43
|
+
//# sourceMappingURL=inventory_return_locations.js.map
|
44
|
+
//# sourceMappingURL=inventory_return_locations.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../src/resources/inventory_return_locations.ts"],"names":[],"mappings":";;AAgEA,MAAM,iCAAiC,WAAqC,CAAA;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AAA,EAAM,kBAAmB,EAAA,EAAG,CAA8B,2BAAA,EAAA,0BAA0B,CAAoB,gBAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACtK,EAEA,MAAM,QAAA,CAAS,yBAA6D,EAAA,MAAA,EAAmC,OAA2D,EAAA;AACzK,IAAM,MAAA,0BAAA,GAA8B,0BAAsD,EAAM,IAAA,yBAAA;AAChG,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAe,EAAE,IAAA,EAAM,UAAW,EAAA,EAAG,CAA8B,2BAAA,EAAA,0BAA0B,CAAa,SAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAChJ,EAGA,0BAA0B,QAAoD,EAAA;AAC7E,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,wBAAyB,CAAA,IAAA;AAAA;AACrE,EAGA,aAAa,EAA4D,EAAA;AACxE,IAAO,OAAA,KAAA,CAAM,qBAAiD,EAAE,CAAA;AAAA;AACjE,EAEA,sBAAsB,GAA6C,EAAA;AAClE,IAAO,OAAA,KAAA,CAAM,qBAAkD,CAAA,GAAG,GAAG,CAAA;AAAA;AACtE,EAGA,IAAoC,GAAA;AACnC,IAAA,OAAO,wBAAyB,CAAA,IAAA;AAAA;AAGlC;AAGA,MAAM,QAAA,GAAW,IAAI,wBAAyB,EAAA;AAC9C,IAAO,kCAAQ,GAAA","file":"inventory_return_locations.js","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { StockLocation, StockLocationType } from './stock_locations'\nimport type { InventoryModel, InventoryModelType } from './inventory_models'\nimport type { Version } from './versions'\n\n\ntype InventoryReturnLocationType = 'inventory_return_locations'\ntype InventoryReturnLocationRel = ResourceRel & { type: InventoryReturnLocationType }\ntype StockLocationRel = ResourceRel & { type: StockLocationType }\ntype InventoryModelRel = ResourceRel & { type: InventoryModelType }\n\n\nexport type InventoryReturnLocationSort = Pick<InventoryReturnLocation, 'id' | 'priority'> & ResourceSort\n// export type InventoryReturnLocationFilter = Pick<InventoryReturnLocation, 'id' | 'priority'> & ResourceFilter\n\n\ninterface InventoryReturnLocation extends Resource {\n\t\n\treadonly type: InventoryReturnLocationType\n\n\t/** \n\t * The inventory return location priority within the associated invetory model.\n\t * @example ```1```\n\t */\n\tpriority: number\n\n\tstock_location?: StockLocation | null\n\tinventory_model?: InventoryModel | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface InventoryReturnLocationCreate extends ResourceCreate {\n\t\n\t/** \n\t * The inventory return location priority within the associated invetory model.\n\t * @example ```1```\n\t */\n\tpriority: number\n\n\tstock_location: StockLocationRel\n\tinventory_model: InventoryModelRel\n\n}\n\n\ninterface InventoryReturnLocationUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The inventory return location priority within the associated invetory model.\n\t * @example ```1```\n\t */\n\tpriority?: number | null\n\n\tstock_location?: StockLocationRel | null\n\tinventory_model?: InventoryModelRel | null\n\n}\n\n\nclass InventoryReturnLocations extends ApiResource<InventoryReturnLocation> {\n\n\tstatic readonly TYPE: InventoryReturnLocationType = 'inventory_return_locations' as const\n\n\tasync create(resource: InventoryReturnLocationCreate, params?: QueryParamsRetrieve<InventoryReturnLocation>, options?: ResourcesConfig): Promise<InventoryReturnLocation> {\n\t\treturn this.resources.create<InventoryReturnLocationCreate, InventoryReturnLocation>({ ...resource, type: InventoryReturnLocations.TYPE }, params, options)\n\t}\n\n\tasync update(resource: InventoryReturnLocationUpdate, params?: QueryParamsRetrieve<InventoryReturnLocation>, options?: ResourcesConfig): Promise<InventoryReturnLocation> {\n\t\treturn this.resources.update<InventoryReturnLocationUpdate, InventoryReturnLocation>({ ...resource, type: InventoryReturnLocations.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: InventoryReturnLocations.TYPE } : id, options)\n\t}\n\n\tasync stock_location(inventoryReturnLocationId: string | InventoryReturnLocation, params?: QueryParamsRetrieve<StockLocation>, options?: ResourcesConfig): Promise<StockLocation> {\n\t\tconst _inventoryReturnLocationId = (inventoryReturnLocationId as InventoryReturnLocation).id || inventoryReturnLocationId as string\n\t\treturn this.resources.fetch<StockLocation>({ type: 'stock_locations' }, `inventory_return_locations/${_inventoryReturnLocationId}/stock_location`, params, options) as unknown as StockLocation\n\t}\n\n\tasync inventory_model(inventoryReturnLocationId: string | InventoryReturnLocation, params?: QueryParamsRetrieve<InventoryModel>, options?: ResourcesConfig): Promise<InventoryModel> {\n\t\tconst _inventoryReturnLocationId = (inventoryReturnLocationId as InventoryReturnLocation).id || inventoryReturnLocationId as string\n\t\treturn this.resources.fetch<InventoryModel>({ type: 'inventory_models' }, `inventory_return_locations/${_inventoryReturnLocationId}/inventory_model`, params, options) as unknown as InventoryModel\n\t}\n\n\tasync versions(inventoryReturnLocationId: string | InventoryReturnLocation, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _inventoryReturnLocationId = (inventoryReturnLocationId as InventoryReturnLocation).id || inventoryReturnLocationId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `inventory_return_locations/${_inventoryReturnLocationId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisInventoryReturnLocation(resource: any): resource is InventoryReturnLocation {\n\t\treturn resource.type && (resource.type === InventoryReturnLocations.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): InventoryReturnLocationRel {\n\t\treturn super.relationshipOneToOne<InventoryReturnLocationRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): InventoryReturnLocationRel[] {\n\t\treturn super.relationshipOneToMany<InventoryReturnLocationRel>(...ids)\n\t}\n\n\n\ttype(): InventoryReturnLocationType {\n\t\treturn InventoryReturnLocations.TYPE\n\t}\n\n}\n\n\nconst instance = new InventoryReturnLocations()\nexport default instance\n\nexport type { InventoryReturnLocation, InventoryReturnLocationCreate, InventoryReturnLocationUpdate, InventoryReturnLocationType }\n"]}
|
@@ -0,0 +1,48 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
var resource = require('../resource');
|
4
|
+
|
5
|
+
class InventoryStockLocations extends resource.ApiResource {
|
6
|
+
static TYPE = "inventory_stock_locations";
|
7
|
+
async create(resource, params, options) {
|
8
|
+
return this.resources.create({ ...resource, type: InventoryStockLocations.TYPE }, params, options);
|
9
|
+
}
|
10
|
+
async update(resource, params, options) {
|
11
|
+
return this.resources.update({ ...resource, type: InventoryStockLocations.TYPE }, params, options);
|
12
|
+
}
|
13
|
+
async delete(id, options) {
|
14
|
+
await this.resources.delete(typeof id === "string" ? { id, type: InventoryStockLocations.TYPE } : id, options);
|
15
|
+
}
|
16
|
+
async stock_location(inventoryStockLocationId, params, options) {
|
17
|
+
const _inventoryStockLocationId = inventoryStockLocationId.id || inventoryStockLocationId;
|
18
|
+
return this.resources.fetch({ type: "stock_locations" }, `inventory_stock_locations/${_inventoryStockLocationId}/stock_location`, params, options);
|
19
|
+
}
|
20
|
+
async inventory_model(inventoryStockLocationId, params, options) {
|
21
|
+
const _inventoryStockLocationId = inventoryStockLocationId.id || inventoryStockLocationId;
|
22
|
+
return this.resources.fetch({ type: "inventory_models" }, `inventory_stock_locations/${_inventoryStockLocationId}/inventory_model`, params, options);
|
23
|
+
}
|
24
|
+
async versions(inventoryStockLocationId, params, options) {
|
25
|
+
const _inventoryStockLocationId = inventoryStockLocationId.id || inventoryStockLocationId;
|
26
|
+
return this.resources.fetch({ type: "versions" }, `inventory_stock_locations/${_inventoryStockLocationId}/versions`, params, options);
|
27
|
+
}
|
28
|
+
isInventoryStockLocation(resource) {
|
29
|
+
return resource.type && resource.type === InventoryStockLocations.TYPE;
|
30
|
+
}
|
31
|
+
relationship(id) {
|
32
|
+
return super.relationshipOneToOne(id);
|
33
|
+
}
|
34
|
+
relationshipToMany(...ids) {
|
35
|
+
return super.relationshipOneToMany(...ids);
|
36
|
+
}
|
37
|
+
type() {
|
38
|
+
return InventoryStockLocations.TYPE;
|
39
|
+
}
|
40
|
+
}
|
41
|
+
const instance = new InventoryStockLocations();
|
42
|
+
var inventory_stock_locations_default = instance;
|
43
|
+
|
44
|
+
module.exports = inventory_stock_locations_default;
|
45
|
+
//# sourceMappingURL=inventory_stock_locations.cjs.map
|
46
|
+
|
47
|
+
module.exports = exports.default;
|
48
|
+
//# sourceMappingURL=inventory_stock_locations.cjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../src/resources/inventory_stock_locations.ts"],"names":["ApiResource"],"mappings":";;;;AA4EA,MAAM,gCAAgCA,oBAAoC,CAAA;AAAA,EAEzE,OAAgB,IAAmC,GAAA,2BAAA;AAAA,EAEnD,MAAM,MAAA,CAAO,QAAwC,EAAA,MAAA,EAAsD,OAA4D,EAAA;AACtK,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA6D,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,uBAAwB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACxJ,EAEA,MAAM,MAAA,CAAO,QAAwC,EAAA,MAAA,EAAsD,OAA4D,EAAA;AACtK,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA6D,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,uBAAwB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACxJ,EAEA,MAAM,MAAO,CAAA,EAAA,EAAyB,OAA0C,EAAA;AAC/E,IAAA,MAAM,IAAK,CAAA,SAAA,CAAU,MAAQ,CAAA,OAAO,EAAO,KAAA,QAAA,GAAW,EAAE,EAAA,EAAI,IAAM,EAAA,uBAAA,CAAwB,IAAK,EAAA,GAAI,IAA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AM,qBAAiD,CAAA,GAAG,GAAG,CAAA;AAAA;AACrE,EAGA,IAAmC,GAAA;AAClC,IAAA,OAAO,uBAAwB,CAAA,IAAA;AAAA;AAGjC;AAGA,MAAM,QAAA,GAAW,IAAI,uBAAwB,EAAA;AAC7C,IAAO,iCAAQ,GAAA","file":"inventory_stock_locations.cjs","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { StockLocation, StockLocationType } from './stock_locations'\nimport type { InventoryModel, InventoryModelType } from './inventory_models'\nimport type { Version } from './versions'\n\n\ntype InventoryStockLocationType = 'inventory_stock_locations'\ntype InventoryStockLocationRel = ResourceRel & { type: InventoryStockLocationType }\ntype StockLocationRel = ResourceRel & { type: StockLocationType }\ntype InventoryModelRel = ResourceRel & { type: InventoryModelType }\n\n\nexport type InventoryStockLocationSort = Pick<InventoryStockLocation, 'id' | 'priority' | 'on_hold'> & ResourceSort\n// export type InventoryStockLocationFilter = Pick<InventoryStockLocation, 'id' | 'priority' | 'on_hold'> & ResourceFilter\n\n\ninterface InventoryStockLocation extends Resource {\n\t\n\treadonly type: InventoryStockLocationType\n\n\t/** \n\t * The stock location priority within the associated invetory model.\n\t * @example ```1```\n\t */\n\tpriority: number\n\t/** \n\t * Indicates if the shipment should be put on hold if fulfilled from the associated stock location. This is useful to manage use cases like back-orders, pre-orders or personalized orders that need to be customized before being fulfilled.\n\t */\n\ton_hold?: boolean | null\n\n\tstock_location?: StockLocation | null\n\tinventory_model?: InventoryModel | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface InventoryStockLocationCreate extends ResourceCreate {\n\t\n\t/** \n\t * The stock location priority within the associated invetory model.\n\t * @example ```1```\n\t */\n\tpriority: number\n\t/** \n\t * Indicates if the shipment should be put on hold if fulfilled from the associated stock location. This is useful to manage use cases like back-orders, pre-orders or personalized orders that need to be customized before being fulfilled.\n\t */\n\ton_hold?: boolean | null\n\n\tstock_location: StockLocationRel\n\tinventory_model: InventoryModelRel\n\n}\n\n\ninterface InventoryStockLocationUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The stock location priority within the associated invetory model.\n\t * @example ```1```\n\t */\n\tpriority?: number | null\n\t/** \n\t * Indicates if the shipment should be put on hold if fulfilled from the associated stock location. This is useful to manage use cases like back-orders, pre-orders or personalized orders that need to be customized before being fulfilled.\n\t */\n\ton_hold?: boolean | null\n\n\tstock_location?: StockLocationRel | null\n\tinventory_model?: InventoryModelRel | null\n\n}\n\n\nclass InventoryStockLocations extends ApiResource<InventoryStockLocation> {\n\n\tstatic readonly TYPE: InventoryStockLocationType = 'inventory_stock_locations' as const\n\n\tasync create(resource: InventoryStockLocationCreate, params?: QueryParamsRetrieve<InventoryStockLocation>, options?: ResourcesConfig): Promise<InventoryStockLocation> {\n\t\treturn this.resources.create<InventoryStockLocationCreate, InventoryStockLocation>({ ...resource, type: InventoryStockLocations.TYPE }, params, options)\n\t}\n\n\tasync update(resource: InventoryStockLocationUpdate, params?: QueryParamsRetrieve<InventoryStockLocation>, options?: ResourcesConfig): Promise<InventoryStockLocation> {\n\t\treturn this.resources.update<InventoryStockLocationUpdate, InventoryStockLocation>({ ...resource, type: InventoryStockLocations.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: InventoryStockLocations.TYPE } : id, options)\n\t}\n\n\tasync stock_location(inventoryStockLocationId: string | InventoryStockLocation, params?: QueryParamsRetrieve<StockLocation>, options?: ResourcesConfig): Promise<StockLocation> {\n\t\tconst _inventoryStockLocationId = (inventoryStockLocationId as InventoryStockLocation).id || inventoryStockLocationId as string\n\t\treturn this.resources.fetch<StockLocation>({ type: 'stock_locations' }, `inventory_stock_locations/${_inventoryStockLocationId}/stock_location`, params, options) as unknown as StockLocation\n\t}\n\n\tasync inventory_model(inventoryStockLocationId: string | InventoryStockLocation, params?: QueryParamsRetrieve<InventoryModel>, options?: ResourcesConfig): Promise<InventoryModel> {\n\t\tconst _inventoryStockLocationId = (inventoryStockLocationId as InventoryStockLocation).id || inventoryStockLocationId as string\n\t\treturn this.resources.fetch<InventoryModel>({ type: 'inventory_models' }, `inventory_stock_locations/${_inventoryStockLocationId}/inventory_model`, params, options) as unknown as InventoryModel\n\t}\n\n\tasync versions(inventoryStockLocationId: string | InventoryStockLocation, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _inventoryStockLocationId = (inventoryStockLocationId as InventoryStockLocation).id || inventoryStockLocationId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `inventory_stock_locations/${_inventoryStockLocationId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisInventoryStockLocation(resource: any): resource is InventoryStockLocation {\n\t\treturn resource.type && (resource.type === InventoryStockLocations.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): InventoryStockLocationRel {\n\t\treturn super.relationshipOneToOne<InventoryStockLocationRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): InventoryStockLocationRel[] {\n\t\treturn super.relationshipOneToMany<InventoryStockLocationRel>(...ids)\n\t}\n\n\n\ttype(): InventoryStockLocationType {\n\t\treturn InventoryStockLocations.TYPE\n\t}\n\n}\n\n\nconst instance = new InventoryStockLocations()\nexport default instance\n\nexport type { InventoryStockLocation, InventoryStockLocationCreate, InventoryStockLocationUpdate, InventoryStockLocationType }\n"]}
|
@@ -0,0 +1,4 @@
|
|
1
|
+
export { e_ as InventoryStockLocation, e$ as InventoryStockLocationCreate, f1 as InventoryStockLocationSort, jv as InventoryStockLocationType, f0 as InventoryStockLocationUpdate, aB as default } from '../api-DmIZO_Np.cjs';
|
2
|
+
import '../client.cjs';
|
3
|
+
import '../interceptor-5MISI1yn.cjs';
|
4
|
+
import '../types.cjs';
|
@@ -0,0 +1,4 @@
|
|
1
|
+
export { e_ as InventoryStockLocation, e$ as InventoryStockLocationCreate, f1 as InventoryStockLocationSort, jv as InventoryStockLocationType, f0 as InventoryStockLocationUpdate, aB as default } from '../api-DDgIE2i8.js';
|
2
|
+
import '../client.js';
|
3
|
+
import '../interceptor-5MISI1yn.js';
|
4
|
+
import '../types.js';
|