@commercelayer/sdk 7.1.0 → 7.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/{api-DIJqRuGh.d.ts → api-LDVr5RYG.d.ts} +25 -0
- package/lib/{api-BljuENr-.d.cts → api-egU4nY4x.d.cts} +25 -0
- package/lib/api.cjs +4 -4
- package/lib/api.d.cts +1 -1
- package/lib/api.d.ts +1 -1
- package/lib/api.js +2 -2
- package/lib/bundle.cjs +6 -6
- package/lib/bundle.d.cts +1 -1
- package/lib/bundle.d.ts +1 -1
- package/lib/bundle.js +3 -3
- package/lib/{chunk-G2OYFKP2.cjs → chunk-4IOIA2JQ.cjs} +5 -2
- package/lib/chunk-4IOIA2JQ.cjs.map +1 -0
- package/lib/{chunk-MT3V3H5R.cjs → chunk-7NKYU3IT.cjs} +4 -4
- package/lib/{chunk-MT3V3H5R.cjs.map → chunk-7NKYU3IT.cjs.map} +1 -1
- package/lib/{chunk-D7A27LT5.js → chunk-CB4HWBPX.js} +3 -3
- package/lib/{chunk-D7A27LT5.js.map → chunk-CB4HWBPX.js.map} +1 -1
- package/lib/{chunk-JVQVN3JM.js → chunk-NQHQV4PY.js} +2 -2
- package/lib/chunk-NQHQV4PY.js.map +1 -0
- package/lib/{chunk-CRPD5Q5Y.js → chunk-NTAREPLJ.js} +5 -2
- package/lib/chunk-NTAREPLJ.js.map +1 -0
- package/lib/{chunk-L2QR7VHD.js → chunk-PXJFGL6U.js} +3 -3
- package/lib/{chunk-L2QR7VHD.js.map → chunk-PXJFGL6U.js.map} +1 -1
- package/lib/{chunk-RVECNXMX.cjs → chunk-TN2MXFJV.cjs} +3 -3
- package/lib/{chunk-RVECNXMX.cjs.map → chunk-TN2MXFJV.cjs.map} +1 -1
- package/lib/{chunk-AB7QWMMM.cjs → chunk-YPGYBULL.cjs} +2 -2
- package/lib/chunk-YPGYBULL.cjs.map +1 -0
- package/lib/commercelayer.cjs +5 -5
- package/lib/commercelayer.d.cts +3 -3
- package/lib/commercelayer.d.ts +3 -3
- package/lib/commercelayer.js +1 -1
- package/lib/enum.d.cts +1 -1
- package/lib/enum.d.ts +1 -1
- package/lib/index.cjs +9 -9
- package/lib/index.d.cts +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +4 -4
- package/lib/jsonapi.d.cts +1 -1
- package/lib/jsonapi.d.ts +1 -1
- package/lib/model.d.cts +1 -1
- package/lib/model.d.ts +1 -1
- package/lib/query.d.cts +1 -1
- package/lib/query.d.ts +1 -1
- package/lib/resource.d.cts +1 -1
- package/lib/resource.d.ts +1 -1
- package/lib/resources/addresses.d.cts +2 -2
- package/lib/resources/addresses.d.ts +1 -1
- package/lib/resources/adjustments.d.cts +2 -2
- package/lib/resources/adjustments.d.ts +1 -1
- package/lib/resources/adyen_gateways.d.cts +2 -2
- package/lib/resources/adyen_gateways.d.ts +1 -1
- package/lib/resources/adyen_payments.d.cts +2 -2
- package/lib/resources/adyen_payments.d.ts +1 -1
- package/lib/resources/applications.d.cts +2 -2
- package/lib/resources/applications.d.ts +1 -1
- package/lib/resources/attachments.d.cts +2 -2
- package/lib/resources/attachments.d.ts +1 -1
- package/lib/resources/authorizations.d.cts +2 -2
- package/lib/resources/authorizations.d.ts +1 -1
- package/lib/resources/avalara_accounts.d.cts +2 -2
- package/lib/resources/avalara_accounts.d.ts +1 -1
- package/lib/resources/axerve_gateways.d.cts +2 -2
- package/lib/resources/axerve_gateways.d.ts +1 -1
- package/lib/resources/axerve_payments.d.cts +2 -2
- package/lib/resources/axerve_payments.d.ts +1 -1
- package/lib/resources/bing_geocoders.d.cts +2 -2
- package/lib/resources/bing_geocoders.d.ts +1 -1
- package/lib/resources/braintree_gateways.d.cts +2 -2
- package/lib/resources/braintree_gateways.d.ts +1 -1
- package/lib/resources/braintree_payments.d.cts +2 -2
- package/lib/resources/braintree_payments.d.ts +1 -1
- package/lib/resources/bundles.d.cts +2 -2
- package/lib/resources/bundles.d.ts +1 -1
- package/lib/resources/buy_x_pay_y_promotions.d.cts +2 -2
- package/lib/resources/buy_x_pay_y_promotions.d.ts +1 -1
- package/lib/resources/captures.d.cts +2 -2
- package/lib/resources/captures.d.ts +1 -1
- package/lib/resources/carrier_accounts.d.cts +2 -2
- package/lib/resources/carrier_accounts.d.ts +1 -1
- package/lib/resources/checkout_com_gateways.d.cts +2 -2
- package/lib/resources/checkout_com_gateways.d.ts +1 -1
- package/lib/resources/checkout_com_payments.d.cts +2 -2
- package/lib/resources/checkout_com_payments.d.ts +1 -1
- package/lib/resources/cleanups.d.cts +2 -2
- package/lib/resources/cleanups.d.ts +1 -1
- package/lib/resources/coupon_codes_promotion_rules.d.cts +2 -2
- package/lib/resources/coupon_codes_promotion_rules.d.ts +1 -1
- package/lib/resources/coupon_recipients.d.cts +2 -2
- package/lib/resources/coupon_recipients.d.ts +1 -1
- package/lib/resources/coupons.d.cts +2 -2
- package/lib/resources/coupons.d.ts +1 -1
- package/lib/resources/custom_promotion_rules.d.cts +2 -2
- package/lib/resources/custom_promotion_rules.d.ts +1 -1
- package/lib/resources/customer_addresses.d.cts +2 -2
- package/lib/resources/customer_addresses.d.ts +1 -1
- package/lib/resources/customer_groups.d.cts +2 -2
- package/lib/resources/customer_groups.d.ts +1 -1
- package/lib/resources/customer_password_resets.d.cts +2 -2
- package/lib/resources/customer_password_resets.d.ts +1 -1
- package/lib/resources/customer_payment_sources.d.cts +2 -2
- package/lib/resources/customer_payment_sources.d.ts +1 -1
- package/lib/resources/customer_subscriptions.d.cts +2 -2
- package/lib/resources/customer_subscriptions.d.ts +1 -1
- package/lib/resources/customers.d.cts +2 -2
- package/lib/resources/customers.d.ts +1 -1
- package/lib/resources/delivery_lead_times.d.cts +2 -2
- package/lib/resources/delivery_lead_times.d.ts +1 -1
- package/lib/resources/discount_engine_items.d.cts +2 -2
- package/lib/resources/discount_engine_items.d.ts +1 -1
- package/lib/resources/discount_engines.d.cts +2 -2
- package/lib/resources/discount_engines.d.ts +1 -1
- package/lib/resources/easypost_pickups.d.cts +2 -2
- package/lib/resources/easypost_pickups.d.ts +1 -1
- package/lib/resources/event_callbacks.d.cts +2 -2
- package/lib/resources/event_callbacks.d.ts +1 -1
- package/lib/resources/event_stores.d.cts +2 -2
- package/lib/resources/event_stores.d.ts +1 -1
- package/lib/resources/events.d.cts +2 -2
- package/lib/resources/events.d.ts +1 -1
- package/lib/resources/exports.d.cts +2 -2
- package/lib/resources/exports.d.ts +1 -1
- package/lib/resources/external_gateways.d.cts +2 -2
- package/lib/resources/external_gateways.d.ts +1 -1
- package/lib/resources/external_payments.d.cts +2 -2
- package/lib/resources/external_payments.d.ts +1 -1
- package/lib/resources/external_promotions.d.cts +2 -2
- package/lib/resources/external_promotions.d.ts +1 -1
- package/lib/resources/external_tax_calculators.d.cts +2 -2
- package/lib/resources/external_tax_calculators.d.ts +1 -1
- package/lib/resources/fixed_amount_promotions.d.cts +2 -2
- package/lib/resources/fixed_amount_promotions.d.ts +1 -1
- package/lib/resources/fixed_price_promotions.d.cts +2 -2
- package/lib/resources/fixed_price_promotions.d.ts +1 -1
- package/lib/resources/flex_promotions.d.cts +2 -2
- package/lib/resources/flex_promotions.d.ts +1 -1
- package/lib/resources/free_gift_promotions.d.cts +2 -2
- package/lib/resources/free_gift_promotions.d.ts +1 -1
- package/lib/resources/free_shipping_promotions.d.cts +2 -2
- package/lib/resources/free_shipping_promotions.d.ts +1 -1
- package/lib/resources/geocoders.d.cts +2 -2
- package/lib/resources/geocoders.d.ts +1 -1
- package/lib/resources/gift_card_recipients.d.cts +2 -2
- package/lib/resources/gift_card_recipients.d.ts +1 -1
- package/lib/resources/gift_cards.d.cts +2 -2
- package/lib/resources/gift_cards.d.ts +1 -1
- package/lib/resources/google_geocoders.d.cts +2 -2
- package/lib/resources/google_geocoders.d.ts +1 -1
- package/lib/resources/imports.d.cts +2 -2
- package/lib/resources/imports.d.ts +1 -1
- package/lib/resources/in_stock_subscriptions.d.cts +2 -2
- package/lib/resources/in_stock_subscriptions.d.ts +1 -1
- package/lib/resources/inventory_models.d.cts +2 -2
- package/lib/resources/inventory_models.d.ts +1 -1
- package/lib/resources/inventory_return_locations.d.cts +2 -2
- package/lib/resources/inventory_return_locations.d.ts +1 -1
- package/lib/resources/inventory_stock_locations.d.cts +2 -2
- package/lib/resources/inventory_stock_locations.d.ts +1 -1
- package/lib/resources/klarna_gateways.d.cts +2 -2
- package/lib/resources/klarna_gateways.d.ts +1 -1
- package/lib/resources/klarna_payments.d.cts +2 -2
- package/lib/resources/klarna_payments.d.ts +1 -1
- package/lib/resources/line_item_options.d.cts +2 -2
- package/lib/resources/line_item_options.d.ts +1 -1
- package/lib/resources/line_items.cjs +2 -2
- package/lib/resources/line_items.d.cts +2 -2
- package/lib/resources/line_items.d.ts +1 -1
- package/lib/resources/line_items.js +1 -1
- package/lib/resources/links.d.cts +2 -2
- package/lib/resources/links.d.ts +1 -1
- package/lib/resources/manual_gateways.d.cts +2 -2
- package/lib/resources/manual_gateways.d.ts +1 -1
- package/lib/resources/manual_tax_calculators.d.cts +2 -2
- package/lib/resources/manual_tax_calculators.d.ts +1 -1
- package/lib/resources/markets.d.cts +2 -2
- package/lib/resources/markets.d.ts +1 -1
- package/lib/resources/merchants.d.cts +2 -2
- package/lib/resources/merchants.d.ts +1 -1
- package/lib/resources/notifications.d.cts +2 -2
- package/lib/resources/notifications.d.ts +1 -1
- package/lib/resources/order_amount_promotion_rules.d.cts +2 -2
- package/lib/resources/order_amount_promotion_rules.d.ts +1 -1
- package/lib/resources/order_copies.d.cts +2 -2
- package/lib/resources/order_copies.d.ts +1 -1
- package/lib/resources/order_factories.d.cts +2 -2
- package/lib/resources/order_factories.d.ts +1 -1
- package/lib/resources/order_subscription_items.d.cts +2 -2
- package/lib/resources/order_subscription_items.d.ts +1 -1
- package/lib/resources/order_subscriptions.d.cts +2 -2
- package/lib/resources/order_subscriptions.d.ts +1 -1
- package/lib/resources/orders.d.cts +2 -2
- package/lib/resources/orders.d.ts +1 -1
- package/lib/resources/organizations.cjs +2 -2
- package/lib/resources/organizations.d.cts +2 -2
- package/lib/resources/organizations.d.ts +1 -1
- package/lib/resources/organizations.js +1 -1
- package/lib/resources/packages.d.cts +2 -2
- package/lib/resources/packages.d.ts +1 -1
- package/lib/resources/parcel_line_items.d.cts +2 -2
- package/lib/resources/parcel_line_items.d.ts +1 -1
- package/lib/resources/parcels.d.cts +2 -2
- package/lib/resources/parcels.d.ts +1 -1
- package/lib/resources/payment_gateways.d.cts +2 -2
- package/lib/resources/payment_gateways.d.ts +1 -1
- package/lib/resources/payment_methods.d.cts +2 -2
- package/lib/resources/payment_methods.d.ts +1 -1
- package/lib/resources/payment_options.d.cts +2 -2
- package/lib/resources/payment_options.d.ts +1 -1
- package/lib/resources/paypal_gateways.d.cts +2 -2
- package/lib/resources/paypal_gateways.d.ts +1 -1
- package/lib/resources/paypal_payments.d.cts +2 -2
- package/lib/resources/paypal_payments.d.ts +1 -1
- package/lib/resources/percentage_discount_promotions.d.cts +2 -2
- package/lib/resources/percentage_discount_promotions.d.ts +1 -1
- package/lib/resources/pickups.d.cts +2 -2
- package/lib/resources/pickups.d.ts +1 -1
- package/lib/resources/price_frequency_tiers.d.cts +2 -2
- package/lib/resources/price_frequency_tiers.d.ts +1 -1
- package/lib/resources/price_list_schedulers.d.cts +2 -2
- package/lib/resources/price_list_schedulers.d.ts +1 -1
- package/lib/resources/price_lists.d.cts +2 -2
- package/lib/resources/price_lists.d.ts +1 -1
- package/lib/resources/price_tiers.d.cts +2 -2
- package/lib/resources/price_tiers.d.ts +1 -1
- package/lib/resources/price_volume_tiers.d.cts +2 -2
- package/lib/resources/price_volume_tiers.d.ts +1 -1
- package/lib/resources/prices.d.cts +2 -2
- package/lib/resources/prices.d.ts +1 -1
- package/lib/resources/promotion_rules.d.cts +2 -2
- package/lib/resources/promotion_rules.d.ts +1 -1
- package/lib/resources/promotions.d.cts +2 -2
- package/lib/resources/promotions.d.ts +1 -1
- package/lib/resources/recurring_order_copies.d.cts +2 -2
- package/lib/resources/recurring_order_copies.d.ts +1 -1
- package/lib/resources/refunds.d.cts +2 -2
- package/lib/resources/refunds.d.ts +1 -1
- package/lib/resources/reserved_stocks.d.cts +2 -2
- package/lib/resources/reserved_stocks.d.ts +1 -1
- package/lib/resources/resource_errors.d.cts +2 -2
- package/lib/resources/resource_errors.d.ts +1 -1
- package/lib/resources/return_line_items.d.cts +2 -2
- package/lib/resources/return_line_items.d.ts +1 -1
- package/lib/resources/returns.d.cts +2 -2
- package/lib/resources/returns.d.ts +1 -1
- package/lib/resources/satispay_gateways.d.cts +2 -2
- package/lib/resources/satispay_gateways.d.ts +1 -1
- package/lib/resources/satispay_payments.d.cts +2 -2
- package/lib/resources/satispay_payments.d.ts +1 -1
- package/lib/resources/shipments.d.cts +2 -2
- package/lib/resources/shipments.d.ts +1 -1
- package/lib/resources/shipping_categories.d.cts +2 -2
- package/lib/resources/shipping_categories.d.ts +1 -1
- package/lib/resources/shipping_method_tiers.d.cts +2 -2
- package/lib/resources/shipping_method_tiers.d.ts +1 -1
- package/lib/resources/shipping_methods.d.cts +2 -2
- package/lib/resources/shipping_methods.d.ts +1 -1
- package/lib/resources/shipping_weight_tiers.d.cts +2 -2
- package/lib/resources/shipping_weight_tiers.d.ts +1 -1
- package/lib/resources/shipping_zones.d.cts +2 -2
- package/lib/resources/shipping_zones.d.ts +1 -1
- package/lib/resources/sku_list_items.d.cts +2 -2
- package/lib/resources/sku_list_items.d.ts +1 -1
- package/lib/resources/sku_list_promotion_rules.d.cts +2 -2
- package/lib/resources/sku_list_promotion_rules.d.ts +1 -1
- package/lib/resources/sku_lists.d.cts +2 -2
- package/lib/resources/sku_lists.d.ts +1 -1
- package/lib/resources/sku_options.d.cts +2 -2
- package/lib/resources/sku_options.d.ts +1 -1
- package/lib/resources/skus.d.cts +2 -2
- package/lib/resources/skus.d.ts +1 -1
- package/lib/resources/stock_items.d.cts +2 -2
- package/lib/resources/stock_items.d.ts +1 -1
- package/lib/resources/stock_line_items.d.cts +2 -2
- package/lib/resources/stock_line_items.d.ts +1 -1
- package/lib/resources/stock_locations.d.cts +2 -2
- package/lib/resources/stock_locations.d.ts +1 -1
- package/lib/resources/stock_reservations.d.cts +2 -2
- package/lib/resources/stock_reservations.d.ts +1 -1
- package/lib/resources/stock_transfers.d.cts +2 -2
- package/lib/resources/stock_transfers.d.ts +1 -1
- package/lib/resources/stores.d.cts +2 -2
- package/lib/resources/stores.d.ts +1 -1
- package/lib/resources/stripe_gateways.d.cts +2 -2
- package/lib/resources/stripe_gateways.d.ts +1 -1
- package/lib/resources/stripe_payments.d.cts +2 -2
- package/lib/resources/stripe_payments.d.ts +1 -1
- package/lib/resources/stripe_tax_accounts.d.cts +2 -2
- package/lib/resources/stripe_tax_accounts.d.ts +1 -1
- package/lib/resources/subscription_models.d.cts +2 -2
- package/lib/resources/subscription_models.d.ts +1 -1
- package/lib/resources/tags.d.cts +2 -2
- package/lib/resources/tags.d.ts +1 -1
- package/lib/resources/talon_one_accounts.d.cts +2 -2
- package/lib/resources/talon_one_accounts.d.ts +1 -1
- package/lib/resources/tax_calculators.d.cts +2 -2
- package/lib/resources/tax_calculators.d.ts +1 -1
- package/lib/resources/tax_categories.d.cts +2 -2
- package/lib/resources/tax_categories.d.ts +1 -1
- package/lib/resources/tax_rules.d.cts +2 -2
- package/lib/resources/tax_rules.d.ts +1 -1
- package/lib/resources/taxjar_accounts.d.cts +2 -2
- package/lib/resources/taxjar_accounts.d.ts +1 -1
- package/lib/resources/transactions.d.cts +2 -2
- package/lib/resources/transactions.d.ts +1 -1
- package/lib/resources/versions.d.cts +2 -2
- package/lib/resources/versions.d.ts +1 -1
- package/lib/resources/vertex_accounts.d.cts +2 -2
- package/lib/resources/vertex_accounts.d.ts +1 -1
- package/lib/resources/voids.d.cts +2 -2
- package/lib/resources/voids.d.ts +1 -1
- package/lib/resources/webhooks.d.cts +2 -2
- package/lib/resources/webhooks.d.ts +1 -1
- package/lib/resources/wire_transfers.d.cts +2 -2
- package/lib/resources/wire_transfers.d.ts +1 -1
- package/lib/static.cjs +3 -3
- package/lib/static.d.cts +1 -1
- package/lib/static.d.ts +1 -1
- package/lib/static.js +2 -2
- package/package.json +5 -6
- package/lib/chunk-AB7QWMMM.cjs.map +0 -1
- package/lib/chunk-CRPD5Q5Y.js.map +0 -1
- package/lib/chunk-G2OYFKP2.cjs.map +0 -1
- package/lib/chunk-JVQVN3JM.js.map +0 -1
@@ -8370,6 +8370,11 @@ interface LineItemCreate extends ResourceCreate {
|
|
8370
8370
|
* @example ```true```
|
8371
8371
|
*/
|
8372
8372
|
_reserve_stock?: boolean | null;
|
8373
|
+
/**
|
8374
|
+
* Send this attribute if you want to reset the quantity restocked by a return or by an order/shipment cancel. This will allow for multiple returns, albeit you need to adjust the stock manually. Cannot be passed by sales channels.
|
8375
|
+
* @example ```true```
|
8376
|
+
*/
|
8377
|
+
_reset_restocked_quantity?: boolean | null;
|
8373
8378
|
/**
|
8374
8379
|
* The unit amount of the line item, in cents. Can be specified only via an integration application, or when the item is missing, otherwise is automatically computed by using one of the available methods. Cannot be passed by sales channels.
|
8375
8380
|
* @example ```10000```
|
@@ -8430,6 +8435,11 @@ interface LineItemUpdate extends ResourceUpdate {
|
|
8430
8435
|
* @example ```true```
|
8431
8436
|
*/
|
8432
8437
|
_reserve_stock?: boolean | null;
|
8438
|
+
/**
|
8439
|
+
* Send this attribute if you want to reset the quantity restocked by a return or by an order/shipment cancel. This will allow for multiple returns, albeit you need to adjust the stock manually. Cannot be passed by sales channels.
|
8440
|
+
* @example ```true```
|
8441
|
+
*/
|
8442
|
+
_reset_restocked_quantity?: boolean | null;
|
8433
8443
|
/**
|
8434
8444
|
* The unit amount of the line item, in cents. Can be specified only via an integration application, or when the item is missing, otherwise is automatically computed by using one of the available methods. Cannot be passed by sales channels.
|
8435
8445
|
* @example ```10000```
|
@@ -8492,6 +8502,7 @@ declare class LineItems extends ApiResource<LineItem> {
|
|
8492
8502
|
event_stores(lineItemId: string | LineItem, params?: QueryParamsList<EventStore>, options?: ResourcesConfig): Promise<ListResponse<EventStore>>;
|
8493
8503
|
_external_price(id: string | LineItem, params?: QueryParamsRetrieve<LineItem>, options?: ResourcesConfig): Promise<LineItem>;
|
8494
8504
|
_reserve_stock(id: string | LineItem, params?: QueryParamsRetrieve<LineItem>, options?: ResourcesConfig): Promise<LineItem>;
|
8505
|
+
_reset_restocked_quantity(id: string | LineItem, params?: QueryParamsRetrieve<LineItem>, options?: ResourcesConfig): Promise<LineItem>;
|
8495
8506
|
_reset_circuit(id: string | LineItem, params?: QueryParamsRetrieve<LineItem>, options?: ResourcesConfig): Promise<LineItem>;
|
8496
8507
|
_add_tags(id: string | LineItem, triggerValue: string, params?: QueryParamsRetrieve<LineItem>, options?: ResourcesConfig): Promise<LineItem>;
|
8497
8508
|
_remove_tags(id: string | LineItem, triggerValue: string, params?: QueryParamsRetrieve<LineItem>, options?: ResourcesConfig): Promise<LineItem>;
|
@@ -16324,6 +16335,11 @@ interface Organization extends Resource {
|
|
16324
16335
|
* @example ```5000```
|
16325
16336
|
*/
|
16326
16337
|
api_max_regex_length?: number | null;
|
16338
|
+
/**
|
16339
|
+
* Indicates if AVS checking will be enforced during payment workflow by passing specific attributes, default is true.
|
16340
|
+
* @example ```true```
|
16341
|
+
*/
|
16342
|
+
addresses_avs_check?: boolean | null;
|
16327
16343
|
/**
|
16328
16344
|
* Indicates if the phone attribute is required for addresses, default is true.
|
16329
16345
|
* @example ```true```
|
@@ -16375,6 +16391,10 @@ interface Organization extends Resource {
|
|
16375
16391
|
* @example ```true```
|
16376
16392
|
*/
|
16377
16393
|
orders_invalid_gift_card_errors?: boolean | null;
|
16394
|
+
/**
|
16395
|
+
* Enables the validation of the generated stock line items and stock transfers before placing the order, default is false.
|
16396
|
+
*/
|
16397
|
+
orders_validate_shipping_stock?: boolean | null;
|
16378
16398
|
/**
|
16379
16399
|
* The maximum number of SKUs allowed for bundles, default is 10.
|
16380
16400
|
* @example ```10```
|
@@ -16488,6 +16508,11 @@ interface Organization extends Resource {
|
|
16488
16508
|
* Enables raising of API errors in case of external promotion failure, default is false.
|
16489
16509
|
*/
|
16490
16510
|
external_promotions_errors?: boolean | null;
|
16511
|
+
/**
|
16512
|
+
* Enables raising of API errors in case of external price failure, default is true.
|
16513
|
+
* @example ```true```
|
16514
|
+
*/
|
16515
|
+
external_prices_errors?: boolean | null;
|
16491
16516
|
event_stores?: EventStore[] | null;
|
16492
16517
|
}
|
16493
16518
|
declare class Organizations extends ApiSingleton<Organization> {
|
@@ -8370,6 +8370,11 @@ interface LineItemCreate extends ResourceCreate {
|
|
8370
8370
|
* @example ```true```
|
8371
8371
|
*/
|
8372
8372
|
_reserve_stock?: boolean | null;
|
8373
|
+
/**
|
8374
|
+
* Send this attribute if you want to reset the quantity restocked by a return or by an order/shipment cancel. This will allow for multiple returns, albeit you need to adjust the stock manually. Cannot be passed by sales channels.
|
8375
|
+
* @example ```true```
|
8376
|
+
*/
|
8377
|
+
_reset_restocked_quantity?: boolean | null;
|
8373
8378
|
/**
|
8374
8379
|
* The unit amount of the line item, in cents. Can be specified only via an integration application, or when the item is missing, otherwise is automatically computed by using one of the available methods. Cannot be passed by sales channels.
|
8375
8380
|
* @example ```10000```
|
@@ -8430,6 +8435,11 @@ interface LineItemUpdate extends ResourceUpdate {
|
|
8430
8435
|
* @example ```true```
|
8431
8436
|
*/
|
8432
8437
|
_reserve_stock?: boolean | null;
|
8438
|
+
/**
|
8439
|
+
* Send this attribute if you want to reset the quantity restocked by a return or by an order/shipment cancel. This will allow for multiple returns, albeit you need to adjust the stock manually. Cannot be passed by sales channels.
|
8440
|
+
* @example ```true```
|
8441
|
+
*/
|
8442
|
+
_reset_restocked_quantity?: boolean | null;
|
8433
8443
|
/**
|
8434
8444
|
* The unit amount of the line item, in cents. Can be specified only via an integration application, or when the item is missing, otherwise is automatically computed by using one of the available methods. Cannot be passed by sales channels.
|
8435
8445
|
* @example ```10000```
|
@@ -8492,6 +8502,7 @@ declare class LineItems extends ApiResource<LineItem> {
|
|
8492
8502
|
event_stores(lineItemId: string | LineItem, params?: QueryParamsList<EventStore>, options?: ResourcesConfig): Promise<ListResponse<EventStore>>;
|
8493
8503
|
_external_price(id: string | LineItem, params?: QueryParamsRetrieve<LineItem>, options?: ResourcesConfig): Promise<LineItem>;
|
8494
8504
|
_reserve_stock(id: string | LineItem, params?: QueryParamsRetrieve<LineItem>, options?: ResourcesConfig): Promise<LineItem>;
|
8505
|
+
_reset_restocked_quantity(id: string | LineItem, params?: QueryParamsRetrieve<LineItem>, options?: ResourcesConfig): Promise<LineItem>;
|
8495
8506
|
_reset_circuit(id: string | LineItem, params?: QueryParamsRetrieve<LineItem>, options?: ResourcesConfig): Promise<LineItem>;
|
8496
8507
|
_add_tags(id: string | LineItem, triggerValue: string, params?: QueryParamsRetrieve<LineItem>, options?: ResourcesConfig): Promise<LineItem>;
|
8497
8508
|
_remove_tags(id: string | LineItem, triggerValue: string, params?: QueryParamsRetrieve<LineItem>, options?: ResourcesConfig): Promise<LineItem>;
|
@@ -16324,6 +16335,11 @@ interface Organization extends Resource {
|
|
16324
16335
|
* @example ```5000```
|
16325
16336
|
*/
|
16326
16337
|
api_max_regex_length?: number | null;
|
16338
|
+
/**
|
16339
|
+
* Indicates if AVS checking will be enforced during payment workflow by passing specific attributes, default is true.
|
16340
|
+
* @example ```true```
|
16341
|
+
*/
|
16342
|
+
addresses_avs_check?: boolean | null;
|
16327
16343
|
/**
|
16328
16344
|
* Indicates if the phone attribute is required for addresses, default is true.
|
16329
16345
|
* @example ```true```
|
@@ -16375,6 +16391,10 @@ interface Organization extends Resource {
|
|
16375
16391
|
* @example ```true```
|
16376
16392
|
*/
|
16377
16393
|
orders_invalid_gift_card_errors?: boolean | null;
|
16394
|
+
/**
|
16395
|
+
* Enables the validation of the generated stock line items and stock transfers before placing the order, default is false.
|
16396
|
+
*/
|
16397
|
+
orders_validate_shipping_stock?: boolean | null;
|
16378
16398
|
/**
|
16379
16399
|
* The maximum number of SKUs allowed for bundles, default is 10.
|
16380
16400
|
* @example ```10```
|
@@ -16488,6 +16508,11 @@ interface Organization extends Resource {
|
|
16488
16508
|
* Enables raising of API errors in case of external promotion failure, default is false.
|
16489
16509
|
*/
|
16490
16510
|
external_promotions_errors?: boolean | null;
|
16511
|
+
/**
|
16512
|
+
* Enables raising of API errors in case of external price failure, default is true.
|
16513
|
+
* @example ```true```
|
16514
|
+
*/
|
16515
|
+
external_prices_errors?: boolean | null;
|
16491
16516
|
event_stores?: EventStore[] | null;
|
16492
16517
|
}
|
16493
16518
|
declare class Organizations extends ApiSingleton<Organization> {
|
package/lib/api.cjs
CHANGED
@@ -57,7 +57,7 @@ var chunkRK3E3UJ2_cjs = require('./chunk-RK3E3UJ2.cjs');
|
|
57
57
|
var chunkZPEK2ZCL_cjs = require('./chunk-ZPEK2ZCL.cjs');
|
58
58
|
var chunkF6WABN7F_cjs = require('./chunk-F6WABN7F.cjs');
|
59
59
|
var chunkLIIFLHEH_cjs = require('./chunk-LIIFLHEH.cjs');
|
60
|
-
var
|
60
|
+
var chunkYPGYBULL_cjs = require('./chunk-YPGYBULL.cjs');
|
61
61
|
var chunkO3NWYOPV_cjs = require('./chunk-O3NWYOPV.cjs');
|
62
62
|
var chunkFMGDNZQ6_cjs = require('./chunk-FMGDNZQ6.cjs');
|
63
63
|
var chunk6STKOQR7_cjs = require('./chunk-6STKOQR7.cjs');
|
@@ -76,7 +76,7 @@ var chunkQYVJGMYT_cjs = require('./chunk-QYVJGMYT.cjs');
|
|
76
76
|
var chunkA76SFMAB_cjs = require('./chunk-A76SFMAB.cjs');
|
77
77
|
var chunkJYSIXEKG_cjs = require('./chunk-JYSIXEKG.cjs');
|
78
78
|
var chunkTZAGUXNS_cjs = require('./chunk-TZAGUXNS.cjs');
|
79
|
-
var
|
79
|
+
var chunk4IOIA2JQ_cjs = require('./chunk-4IOIA2JQ.cjs');
|
80
80
|
var chunkT5AO4445_cjs = require('./chunk-T5AO4445.cjs');
|
81
81
|
var chunk6ZUGJHNV_cjs = require('./chunk-6ZUGJHNV.cjs');
|
82
82
|
var chunkUHKV2XBV_cjs = require('./chunk-UHKV2XBV.cjs');
|
@@ -371,7 +371,7 @@ Object.defineProperty(exports, "orders", {
|
|
371
371
|
});
|
372
372
|
Object.defineProperty(exports, "organization", {
|
373
373
|
enumerable: true,
|
374
|
-
get: function () { return
|
374
|
+
get: function () { return chunkYPGYBULL_cjs.organizations_default; }
|
375
375
|
});
|
376
376
|
Object.defineProperty(exports, "packages", {
|
377
377
|
enumerable: true,
|
@@ -447,7 +447,7 @@ Object.defineProperty(exports, "line_item_options", {
|
|
447
447
|
});
|
448
448
|
Object.defineProperty(exports, "line_items", {
|
449
449
|
enumerable: true,
|
450
|
-
get: function () { return
|
450
|
+
get: function () { return chunk4IOIA2JQ_cjs.line_items_default; }
|
451
451
|
});
|
452
452
|
Object.defineProperty(exports, "links", {
|
453
453
|
enumerable: true,
|
package/lib/api.d.cts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
export { H as Addresses, J as Adjustments, N as AdyenGateways, P as AdyenPayments, W as Applications, Y as Attachments, _ as Authorizations, a0 as AvalaraAccounts, a2 as AxerveGateways, a4 as AxervePayments, a6 as BingGeocoders, a8 as BraintreeGateways, aa as BraintreePayments, ac as Bundles, ae as BuyXPayYPromotions, ag as Captures, ai as CarrierAccounts, ak as CheckoutComGateways, am as CheckoutComPayments, ao as Cleanups, aq as CouponCodesPromotionRules, as as CouponRecipients, au as Coupons, aw as CustomPromotionRules, ay as CustomerAddresses, aA as CustomerGroups, aC as CustomerPasswordResets, aE as CustomerPaymentSources, aG as CustomerSubscriptions, aI as Customers, aK as DeliveryLeadTimes, aM as DiscountEngineItems, aO as DiscountEngines, aQ as EasypostPickups, aS as EventCallbacks, aU as EventStores, aW as Events, aY as Exports, a_ as ExternalGateways, b0 as ExternalPayments, b2 as ExternalPromotions, b4 as ExternalTaxCalculators, b6 as FixedAmountPromotions, b8 as FixedPricePromotions, ba as FlexPromotions, bc as FreeGiftPromotions, be as FreeShippingPromotions, bg as Geocoders, bi as GiftCardRecipients, bk as GiftCards, bm as GoogleGeocoders, bo as Imports, bq as InStockSubscriptions, bs as InventoryModels, bu as InventoryReturnLocations, bw as InventoryStockLocations, by as KlarnaGateways, bA as KlarnaPayments, bC as LineItemOptions, bE as LineItems, bG as Links, bI as ManualGateways, bK as ManualTaxCalculators, bM as Markets, bO as Merchants, bQ as Notifications, bS as OrderAmountPromotionRules, bU as OrderCopies, bW as OrderFactories, bY as OrderSubscriptionItems, b_ as OrderSubscriptions, c0 as Orders, c2 as Organizations, c4 as Packages, c6 as ParcelLineItems, c8 as Parcels, ca as PaymentGateways, cc as PaymentMethods, ce as PaymentOptions, cg as PaypalGateways, ci as PaypalPayments, ck as PercentageDiscountPromotions, cm as Pickups, co as PriceFrequencyTiers, cq as PriceListSchedulers, cs as PriceLists, cu as PriceTiers, cw as PriceVolumeTiers, cy as Prices, cA as PromotionRules, cC as Promotions, cE as RecurringOrderCopies, cG as Refunds, cI as ReservedStocks, cK as ResourceErrors, cM as ReturnLineItems, cO as Returns, cQ as SatispayGateways, cS as SatispayPayments, cU as Shipments, cW as ShippingCategories, cY as ShippingMethodTiers, c_ as ShippingMethods, d0 as ShippingWeightTiers, d2 as ShippingZones, d4 as SkuListItems, d6 as SkuListPromotionRules, d8 as SkuLists, da as SkuOptions, dc as Skus, de as StockItems, dg as StockLineItems, di as StockLocations, dk as StockReservations, dm as StockTransfers, dp as Stores, dr as StripeGateways, dt as StripePayments, dv as StripeTaxAccounts, dx as SubscriptionModels, dz as Tags, dB as TalonOneAccounts, dD as TaxCalculators, dF as TaxCategories, dH as TaxRules, dJ as TaxjarAccounts, dL as Transactions, dN as Versions, dP as VertexAccounts, dR as Voids, dT as Webhooks, dV as WireTransfers, G as addresses, I as adjustments, K as adyen_gateways, O as adyen_payments, S as application, X as attachments, Z as authorizations, $ as avalara_accounts, a1 as axerve_gateways, a3 as axerve_payments, a5 as bing_geocoders, a7 as braintree_gateways, a9 as braintree_payments, ab as bundles, ad as buy_x_pay_y_promotions, af as captures, ah as carrier_accounts, aj as checkout_com_gateways, al as checkout_com_payments, an as cleanups, ap as coupon_codes_promotion_rules, ar as coupon_recipients, at as coupons, av as custom_promotion_rules, ax as customer_addresses, az as customer_groups, aB as customer_password_resets, aD as customer_payment_sources, aF as customer_subscriptions, aH as customers, aJ as delivery_lead_times, aL as discount_engine_items, aN as discount_engines, aP as easypost_pickups, aR as event_callbacks, aT as event_stores, aV as events, aX as exports, aZ as external_gateways, a$ as external_payments, b1 as external_promotions, b3 as external_tax_calculators, b5 as fixed_amount_promotions, b7 as fixed_price_promotions, b9 as flex_promotions, bb as free_gift_promotions, bd as free_shipping_promotions, bf as geocoders, bh as gift_card_recipients, bj as gift_cards, bl as google_geocoders, bn as imports, bp as in_stock_subscriptions, br as inventory_models, bt as inventory_return_locations, bv as inventory_stock_locations, bx as klarna_gateways, bz as klarna_payments, bB as line_item_options, bD as line_items, bF as links, bH as manual_gateways, bJ as manual_tax_calculators, bL as markets, bN as merchants, bP as notifications, bR as order_amount_promotion_rules, bT as order_copies, bV as order_factories, bX as order_subscription_items, bZ as order_subscriptions, b$ as orders, c1 as organization, c3 as packages, c5 as parcel_line_items, c7 as parcels, c9 as payment_gateways, cb as payment_methods, cd as payment_options, cf as paypal_gateways, ch as paypal_payments, cj as percentage_discount_promotions, cl as pickups, cn as price_frequency_tiers, cp as price_list_schedulers, cr as price_lists, ct as price_tiers, cv as price_volume_tiers, cx as prices, cz as promotion_rules, cB as promotions, cD as recurring_order_copies, cF as refunds, cH as reserved_stocks, cJ as resource_errors, cL as return_line_items, cN as returns, cP as satispay_gateways, cR as satispay_payments, cT as shipments, cV as shipping_categories, cX as shipping_method_tiers, cZ as shipping_methods, c$ as shipping_weight_tiers, d1 as shipping_zones, d3 as sku_list_items, d5 as sku_list_promotion_rules, d7 as sku_lists, d9 as sku_options, db as skus, dd as stock_items, df as stock_line_items, dh as stock_locations, dj as stock_reservations, dl as stock_transfers, dn as stores, dq as stripe_gateways, ds as stripe_payments, du as stripe_tax_accounts, dw as subscription_models, dy as tags, dA as talon_one_accounts, dC as tax_calculators, dE as tax_categories, dG as tax_rules, dI as taxjar_accounts, dK as transactions, dM as versions, dO as vertex_accounts, dQ as voids, dS as webhooks, dU as wire_transfers } from './api-
|
1
|
+
export { H as Addresses, J as Adjustments, N as AdyenGateways, P as AdyenPayments, W as Applications, Y as Attachments, _ as Authorizations, a0 as AvalaraAccounts, a2 as AxerveGateways, a4 as AxervePayments, a6 as BingGeocoders, a8 as BraintreeGateways, aa as BraintreePayments, ac as Bundles, ae as BuyXPayYPromotions, ag as Captures, ai as CarrierAccounts, ak as CheckoutComGateways, am as CheckoutComPayments, ao as Cleanups, aq as CouponCodesPromotionRules, as as CouponRecipients, au as Coupons, aw as CustomPromotionRules, ay as CustomerAddresses, aA as CustomerGroups, aC as CustomerPasswordResets, aE as CustomerPaymentSources, aG as CustomerSubscriptions, aI as Customers, aK as DeliveryLeadTimes, aM as DiscountEngineItems, aO as DiscountEngines, aQ as EasypostPickups, aS as EventCallbacks, aU as EventStores, aW as Events, aY as Exports, a_ as ExternalGateways, b0 as ExternalPayments, b2 as ExternalPromotions, b4 as ExternalTaxCalculators, b6 as FixedAmountPromotions, b8 as FixedPricePromotions, ba as FlexPromotions, bc as FreeGiftPromotions, be as FreeShippingPromotions, bg as Geocoders, bi as GiftCardRecipients, bk as GiftCards, bm as GoogleGeocoders, bo as Imports, bq as InStockSubscriptions, bs as InventoryModels, bu as InventoryReturnLocations, bw as InventoryStockLocations, by as KlarnaGateways, bA as KlarnaPayments, bC as LineItemOptions, bE as LineItems, bG as Links, bI as ManualGateways, bK as ManualTaxCalculators, bM as Markets, bO as Merchants, bQ as Notifications, bS as OrderAmountPromotionRules, bU as OrderCopies, bW as OrderFactories, bY as OrderSubscriptionItems, b_ as OrderSubscriptions, c0 as Orders, c2 as Organizations, c4 as Packages, c6 as ParcelLineItems, c8 as Parcels, ca as PaymentGateways, cc as PaymentMethods, ce as PaymentOptions, cg as PaypalGateways, ci as PaypalPayments, ck as PercentageDiscountPromotions, cm as Pickups, co as PriceFrequencyTiers, cq as PriceListSchedulers, cs as PriceLists, cu as PriceTiers, cw as PriceVolumeTiers, cy as Prices, cA as PromotionRules, cC as Promotions, cE as RecurringOrderCopies, cG as Refunds, cI as ReservedStocks, cK as ResourceErrors, cM as ReturnLineItems, cO as Returns, cQ as SatispayGateways, cS as SatispayPayments, cU as Shipments, cW as ShippingCategories, cY as ShippingMethodTiers, c_ as ShippingMethods, d0 as ShippingWeightTiers, d2 as ShippingZones, d4 as SkuListItems, d6 as SkuListPromotionRules, d8 as SkuLists, da as SkuOptions, dc as Skus, de as StockItems, dg as StockLineItems, di as StockLocations, dk as StockReservations, dm as StockTransfers, dp as Stores, dr as StripeGateways, dt as StripePayments, dv as StripeTaxAccounts, dx as SubscriptionModels, dz as Tags, dB as TalonOneAccounts, dD as TaxCalculators, dF as TaxCategories, dH as TaxRules, dJ as TaxjarAccounts, dL as Transactions, dN as Versions, dP as VertexAccounts, dR as Voids, dT as Webhooks, dV as WireTransfers, G as addresses, I as adjustments, K as adyen_gateways, O as adyen_payments, S as application, X as attachments, Z as authorizations, $ as avalara_accounts, a1 as axerve_gateways, a3 as axerve_payments, a5 as bing_geocoders, a7 as braintree_gateways, a9 as braintree_payments, ab as bundles, ad as buy_x_pay_y_promotions, af as captures, ah as carrier_accounts, aj as checkout_com_gateways, al as checkout_com_payments, an as cleanups, ap as coupon_codes_promotion_rules, ar as coupon_recipients, at as coupons, av as custom_promotion_rules, ax as customer_addresses, az as customer_groups, aB as customer_password_resets, aD as customer_payment_sources, aF as customer_subscriptions, aH as customers, aJ as delivery_lead_times, aL as discount_engine_items, aN as discount_engines, aP as easypost_pickups, aR as event_callbacks, aT as event_stores, aV as events, aX as exports, aZ as external_gateways, a$ as external_payments, b1 as external_promotions, b3 as external_tax_calculators, b5 as fixed_amount_promotions, b7 as fixed_price_promotions, b9 as flex_promotions, bb as free_gift_promotions, bd as free_shipping_promotions, bf as geocoders, bh as gift_card_recipients, bj as gift_cards, bl as google_geocoders, bn as imports, bp as in_stock_subscriptions, br as inventory_models, bt as inventory_return_locations, bv as inventory_stock_locations, bx as klarna_gateways, bz as klarna_payments, bB as line_item_options, bD as line_items, bF as links, bH as manual_gateways, bJ as manual_tax_calculators, bL as markets, bN as merchants, bP as notifications, bR as order_amount_promotion_rules, bT as order_copies, bV as order_factories, bX as order_subscription_items, bZ as order_subscriptions, b$ as orders, c1 as organization, c3 as packages, c5 as parcel_line_items, c7 as parcels, c9 as payment_gateways, cb as payment_methods, cd as payment_options, cf as paypal_gateways, ch as paypal_payments, cj as percentage_discount_promotions, cl as pickups, cn as price_frequency_tiers, cp as price_list_schedulers, cr as price_lists, ct as price_tiers, cv as price_volume_tiers, cx as prices, cz as promotion_rules, cB as promotions, cD as recurring_order_copies, cF as refunds, cH as reserved_stocks, cJ as resource_errors, cL as return_line_items, cN as returns, cP as satispay_gateways, cR as satispay_payments, cT as shipments, cV as shipping_categories, cX as shipping_method_tiers, cZ as shipping_methods, c$ as shipping_weight_tiers, d1 as shipping_zones, d3 as sku_list_items, d5 as sku_list_promotion_rules, d7 as sku_lists, d9 as sku_options, db as skus, dd as stock_items, df as stock_line_items, dh as stock_locations, dj as stock_reservations, dl as stock_transfers, dn as stores, dq as stripe_gateways, ds as stripe_payments, du as stripe_tax_accounts, dw as subscription_models, dy as tags, dA as talon_one_accounts, dC as tax_calculators, dE as tax_categories, dG as tax_rules, dI as taxjar_accounts, dK as transactions, dM as versions, dO as vertex_accounts, dQ as voids, dS as webhooks, dU as wire_transfers } from './api-egU4nY4x.cjs';
|
2
2
|
import './client.cjs';
|
3
3
|
import './interceptor-k15jXzf0.cjs';
|
4
4
|
import './types.cjs';
|
package/lib/api.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
export { H as Addresses, J as Adjustments, N as AdyenGateways, P as AdyenPayments, W as Applications, Y as Attachments, _ as Authorizations, a0 as AvalaraAccounts, a2 as AxerveGateways, a4 as AxervePayments, a6 as BingGeocoders, a8 as BraintreeGateways, aa as BraintreePayments, ac as Bundles, ae as BuyXPayYPromotions, ag as Captures, ai as CarrierAccounts, ak as CheckoutComGateways, am as CheckoutComPayments, ao as Cleanups, aq as CouponCodesPromotionRules, as as CouponRecipients, au as Coupons, aw as CustomPromotionRules, ay as CustomerAddresses, aA as CustomerGroups, aC as CustomerPasswordResets, aE as CustomerPaymentSources, aG as CustomerSubscriptions, aI as Customers, aK as DeliveryLeadTimes, aM as DiscountEngineItems, aO as DiscountEngines, aQ as EasypostPickups, aS as EventCallbacks, aU as EventStores, aW as Events, aY as Exports, a_ as ExternalGateways, b0 as ExternalPayments, b2 as ExternalPromotions, b4 as ExternalTaxCalculators, b6 as FixedAmountPromotions, b8 as FixedPricePromotions, ba as FlexPromotions, bc as FreeGiftPromotions, be as FreeShippingPromotions, bg as Geocoders, bi as GiftCardRecipients, bk as GiftCards, bm as GoogleGeocoders, bo as Imports, bq as InStockSubscriptions, bs as InventoryModels, bu as InventoryReturnLocations, bw as InventoryStockLocations, by as KlarnaGateways, bA as KlarnaPayments, bC as LineItemOptions, bE as LineItems, bG as Links, bI as ManualGateways, bK as ManualTaxCalculators, bM as Markets, bO as Merchants, bQ as Notifications, bS as OrderAmountPromotionRules, bU as OrderCopies, bW as OrderFactories, bY as OrderSubscriptionItems, b_ as OrderSubscriptions, c0 as Orders, c2 as Organizations, c4 as Packages, c6 as ParcelLineItems, c8 as Parcels, ca as PaymentGateways, cc as PaymentMethods, ce as PaymentOptions, cg as PaypalGateways, ci as PaypalPayments, ck as PercentageDiscountPromotions, cm as Pickups, co as PriceFrequencyTiers, cq as PriceListSchedulers, cs as PriceLists, cu as PriceTiers, cw as PriceVolumeTiers, cy as Prices, cA as PromotionRules, cC as Promotions, cE as RecurringOrderCopies, cG as Refunds, cI as ReservedStocks, cK as ResourceErrors, cM as ReturnLineItems, cO as Returns, cQ as SatispayGateways, cS as SatispayPayments, cU as Shipments, cW as ShippingCategories, cY as ShippingMethodTiers, c_ as ShippingMethods, d0 as ShippingWeightTiers, d2 as ShippingZones, d4 as SkuListItems, d6 as SkuListPromotionRules, d8 as SkuLists, da as SkuOptions, dc as Skus, de as StockItems, dg as StockLineItems, di as StockLocations, dk as StockReservations, dm as StockTransfers, dp as Stores, dr as StripeGateways, dt as StripePayments, dv as StripeTaxAccounts, dx as SubscriptionModels, dz as Tags, dB as TalonOneAccounts, dD as TaxCalculators, dF as TaxCategories, dH as TaxRules, dJ as TaxjarAccounts, dL as Transactions, dN as Versions, dP as VertexAccounts, dR as Voids, dT as Webhooks, dV as WireTransfers, G as addresses, I as adjustments, K as adyen_gateways, O as adyen_payments, S as application, X as attachments, Z as authorizations, $ as avalara_accounts, a1 as axerve_gateways, a3 as axerve_payments, a5 as bing_geocoders, a7 as braintree_gateways, a9 as braintree_payments, ab as bundles, ad as buy_x_pay_y_promotions, af as captures, ah as carrier_accounts, aj as checkout_com_gateways, al as checkout_com_payments, an as cleanups, ap as coupon_codes_promotion_rules, ar as coupon_recipients, at as coupons, av as custom_promotion_rules, ax as customer_addresses, az as customer_groups, aB as customer_password_resets, aD as customer_payment_sources, aF as customer_subscriptions, aH as customers, aJ as delivery_lead_times, aL as discount_engine_items, aN as discount_engines, aP as easypost_pickups, aR as event_callbacks, aT as event_stores, aV as events, aX as exports, aZ as external_gateways, a$ as external_payments, b1 as external_promotions, b3 as external_tax_calculators, b5 as fixed_amount_promotions, b7 as fixed_price_promotions, b9 as flex_promotions, bb as free_gift_promotions, bd as free_shipping_promotions, bf as geocoders, bh as gift_card_recipients, bj as gift_cards, bl as google_geocoders, bn as imports, bp as in_stock_subscriptions, br as inventory_models, bt as inventory_return_locations, bv as inventory_stock_locations, bx as klarna_gateways, bz as klarna_payments, bB as line_item_options, bD as line_items, bF as links, bH as manual_gateways, bJ as manual_tax_calculators, bL as markets, bN as merchants, bP as notifications, bR as order_amount_promotion_rules, bT as order_copies, bV as order_factories, bX as order_subscription_items, bZ as order_subscriptions, b$ as orders, c1 as organization, c3 as packages, c5 as parcel_line_items, c7 as parcels, c9 as payment_gateways, cb as payment_methods, cd as payment_options, cf as paypal_gateways, ch as paypal_payments, cj as percentage_discount_promotions, cl as pickups, cn as price_frequency_tiers, cp as price_list_schedulers, cr as price_lists, ct as price_tiers, cv as price_volume_tiers, cx as prices, cz as promotion_rules, cB as promotions, cD as recurring_order_copies, cF as refunds, cH as reserved_stocks, cJ as resource_errors, cL as return_line_items, cN as returns, cP as satispay_gateways, cR as satispay_payments, cT as shipments, cV as shipping_categories, cX as shipping_method_tiers, cZ as shipping_methods, c$ as shipping_weight_tiers, d1 as shipping_zones, d3 as sku_list_items, d5 as sku_list_promotion_rules, d7 as sku_lists, d9 as sku_options, db as skus, dd as stock_items, df as stock_line_items, dh as stock_locations, dj as stock_reservations, dl as stock_transfers, dn as stores, dq as stripe_gateways, ds as stripe_payments, du as stripe_tax_accounts, dw as subscription_models, dy as tags, dA as talon_one_accounts, dC as tax_calculators, dE as tax_categories, dG as tax_rules, dI as taxjar_accounts, dK as transactions, dM as versions, dO as vertex_accounts, dQ as voids, dS as webhooks, dU as wire_transfers } from './api-
|
1
|
+
export { H as Addresses, J as Adjustments, N as AdyenGateways, P as AdyenPayments, W as Applications, Y as Attachments, _ as Authorizations, a0 as AvalaraAccounts, a2 as AxerveGateways, a4 as AxervePayments, a6 as BingGeocoders, a8 as BraintreeGateways, aa as BraintreePayments, ac as Bundles, ae as BuyXPayYPromotions, ag as Captures, ai as CarrierAccounts, ak as CheckoutComGateways, am as CheckoutComPayments, ao as Cleanups, aq as CouponCodesPromotionRules, as as CouponRecipients, au as Coupons, aw as CustomPromotionRules, ay as CustomerAddresses, aA as CustomerGroups, aC as CustomerPasswordResets, aE as CustomerPaymentSources, aG as CustomerSubscriptions, aI as Customers, aK as DeliveryLeadTimes, aM as DiscountEngineItems, aO as DiscountEngines, aQ as EasypostPickups, aS as EventCallbacks, aU as EventStores, aW as Events, aY as Exports, a_ as ExternalGateways, b0 as ExternalPayments, b2 as ExternalPromotions, b4 as ExternalTaxCalculators, b6 as FixedAmountPromotions, b8 as FixedPricePromotions, ba as FlexPromotions, bc as FreeGiftPromotions, be as FreeShippingPromotions, bg as Geocoders, bi as GiftCardRecipients, bk as GiftCards, bm as GoogleGeocoders, bo as Imports, bq as InStockSubscriptions, bs as InventoryModels, bu as InventoryReturnLocations, bw as InventoryStockLocations, by as KlarnaGateways, bA as KlarnaPayments, bC as LineItemOptions, bE as LineItems, bG as Links, bI as ManualGateways, bK as ManualTaxCalculators, bM as Markets, bO as Merchants, bQ as Notifications, bS as OrderAmountPromotionRules, bU as OrderCopies, bW as OrderFactories, bY as OrderSubscriptionItems, b_ as OrderSubscriptions, c0 as Orders, c2 as Organizations, c4 as Packages, c6 as ParcelLineItems, c8 as Parcels, ca as PaymentGateways, cc as PaymentMethods, ce as PaymentOptions, cg as PaypalGateways, ci as PaypalPayments, ck as PercentageDiscountPromotions, cm as Pickups, co as PriceFrequencyTiers, cq as PriceListSchedulers, cs as PriceLists, cu as PriceTiers, cw as PriceVolumeTiers, cy as Prices, cA as PromotionRules, cC as Promotions, cE as RecurringOrderCopies, cG as Refunds, cI as ReservedStocks, cK as ResourceErrors, cM as ReturnLineItems, cO as Returns, cQ as SatispayGateways, cS as SatispayPayments, cU as Shipments, cW as ShippingCategories, cY as ShippingMethodTiers, c_ as ShippingMethods, d0 as ShippingWeightTiers, d2 as ShippingZones, d4 as SkuListItems, d6 as SkuListPromotionRules, d8 as SkuLists, da as SkuOptions, dc as Skus, de as StockItems, dg as StockLineItems, di as StockLocations, dk as StockReservations, dm as StockTransfers, dp as Stores, dr as StripeGateways, dt as StripePayments, dv as StripeTaxAccounts, dx as SubscriptionModels, dz as Tags, dB as TalonOneAccounts, dD as TaxCalculators, dF as TaxCategories, dH as TaxRules, dJ as TaxjarAccounts, dL as Transactions, dN as Versions, dP as VertexAccounts, dR as Voids, dT as Webhooks, dV as WireTransfers, G as addresses, I as adjustments, K as adyen_gateways, O as adyen_payments, S as application, X as attachments, Z as authorizations, $ as avalara_accounts, a1 as axerve_gateways, a3 as axerve_payments, a5 as bing_geocoders, a7 as braintree_gateways, a9 as braintree_payments, ab as bundles, ad as buy_x_pay_y_promotions, af as captures, ah as carrier_accounts, aj as checkout_com_gateways, al as checkout_com_payments, an as cleanups, ap as coupon_codes_promotion_rules, ar as coupon_recipients, at as coupons, av as custom_promotion_rules, ax as customer_addresses, az as customer_groups, aB as customer_password_resets, aD as customer_payment_sources, aF as customer_subscriptions, aH as customers, aJ as delivery_lead_times, aL as discount_engine_items, aN as discount_engines, aP as easypost_pickups, aR as event_callbacks, aT as event_stores, aV as events, aX as exports, aZ as external_gateways, a$ as external_payments, b1 as external_promotions, b3 as external_tax_calculators, b5 as fixed_amount_promotions, b7 as fixed_price_promotions, b9 as flex_promotions, bb as free_gift_promotions, bd as free_shipping_promotions, bf as geocoders, bh as gift_card_recipients, bj as gift_cards, bl as google_geocoders, bn as imports, bp as in_stock_subscriptions, br as inventory_models, bt as inventory_return_locations, bv as inventory_stock_locations, bx as klarna_gateways, bz as klarna_payments, bB as line_item_options, bD as line_items, bF as links, bH as manual_gateways, bJ as manual_tax_calculators, bL as markets, bN as merchants, bP as notifications, bR as order_amount_promotion_rules, bT as order_copies, bV as order_factories, bX as order_subscription_items, bZ as order_subscriptions, b$ as orders, c1 as organization, c3 as packages, c5 as parcel_line_items, c7 as parcels, c9 as payment_gateways, cb as payment_methods, cd as payment_options, cf as paypal_gateways, ch as paypal_payments, cj as percentage_discount_promotions, cl as pickups, cn as price_frequency_tiers, cp as price_list_schedulers, cr as price_lists, ct as price_tiers, cv as price_volume_tiers, cx as prices, cz as promotion_rules, cB as promotions, cD as recurring_order_copies, cF as refunds, cH as reserved_stocks, cJ as resource_errors, cL as return_line_items, cN as returns, cP as satispay_gateways, cR as satispay_payments, cT as shipments, cV as shipping_categories, cX as shipping_method_tiers, cZ as shipping_methods, c$ as shipping_weight_tiers, d1 as shipping_zones, d3 as sku_list_items, d5 as sku_list_promotion_rules, d7 as sku_lists, d9 as sku_options, db as skus, dd as stock_items, df as stock_line_items, dh as stock_locations, dj as stock_reservations, dl as stock_transfers, dn as stores, dq as stripe_gateways, ds as stripe_payments, du as stripe_tax_accounts, dw as subscription_models, dy as tags, dA as talon_one_accounts, dC as tax_calculators, dE as tax_categories, dG as tax_rules, dI as taxjar_accounts, dK as transactions, dM as versions, dO as vertex_accounts, dQ as voids, dS as webhooks, dU as wire_transfers } from './api-LDVr5RYG.js';
|
2
2
|
import './client.js';
|
3
3
|
import './interceptor-k15jXzf0.js';
|
4
4
|
import './types.js';
|
package/lib/api.js
CHANGED
@@ -55,7 +55,7 @@ export { price_list_schedulers_default as price_list_schedulers } from './chunk-
|
|
55
55
|
export { price_lists_default as price_lists } from './chunk-OPPZLGKC.js';
|
56
56
|
export { order_subscriptions_default as order_subscriptions } from './chunk-KAZKQXUO.js';
|
57
57
|
export { orders_default as orders } from './chunk-LUS6TTEC.js';
|
58
|
-
export { organizations_default as organization } from './chunk-
|
58
|
+
export { organizations_default as organization } from './chunk-NQHQV4PY.js';
|
59
59
|
export { packages_default as packages } from './chunk-H5CKBXQS.js';
|
60
60
|
export { parcel_line_items_default as parcel_line_items } from './chunk-OA7RZ24N.js';
|
61
61
|
export { parcels_default as parcels } from './chunk-JAOFRM22.js';
|
@@ -74,7 +74,7 @@ export { inventory_stock_locations_default as inventory_stock_locations } from '
|
|
74
74
|
export { klarna_gateways_default as klarna_gateways } from './chunk-DEYOBMM5.js';
|
75
75
|
export { klarna_payments_default as klarna_payments } from './chunk-I3ZMOPMJ.js';
|
76
76
|
export { line_item_options_default as line_item_options } from './chunk-JPKZBEAY.js';
|
77
|
-
export { line_items_default as line_items } from './chunk-
|
77
|
+
export { line_items_default as line_items } from './chunk-NTAREPLJ.js';
|
78
78
|
export { links_default as links } from './chunk-67TJ6ALR.js';
|
79
79
|
export { manual_gateways_default as manual_gateways } from './chunk-TWQ4THAG.js';
|
80
80
|
export { free_shipping_promotions_default as free_shipping_promotions } from './chunk-ZDTIKZYR.js';
|
package/lib/bundle.cjs
CHANGED
@@ -57,7 +57,7 @@ var chunkRK3E3UJ2_cjs = require('./chunk-RK3E3UJ2.cjs');
|
|
57
57
|
var chunkZPEK2ZCL_cjs = require('./chunk-ZPEK2ZCL.cjs');
|
58
58
|
var chunkF6WABN7F_cjs = require('./chunk-F6WABN7F.cjs');
|
59
59
|
var chunkLIIFLHEH_cjs = require('./chunk-LIIFLHEH.cjs');
|
60
|
-
var
|
60
|
+
var chunkYPGYBULL_cjs = require('./chunk-YPGYBULL.cjs');
|
61
61
|
var chunkO3NWYOPV_cjs = require('./chunk-O3NWYOPV.cjs');
|
62
62
|
var chunkFMGDNZQ6_cjs = require('./chunk-FMGDNZQ6.cjs');
|
63
63
|
var chunk6STKOQR7_cjs = require('./chunk-6STKOQR7.cjs');
|
@@ -76,7 +76,7 @@ var chunkQYVJGMYT_cjs = require('./chunk-QYVJGMYT.cjs');
|
|
76
76
|
var chunkA76SFMAB_cjs = require('./chunk-A76SFMAB.cjs');
|
77
77
|
var chunkJYSIXEKG_cjs = require('./chunk-JYSIXEKG.cjs');
|
78
78
|
var chunkTZAGUXNS_cjs = require('./chunk-TZAGUXNS.cjs');
|
79
|
-
var
|
79
|
+
var chunk4IOIA2JQ_cjs = require('./chunk-4IOIA2JQ.cjs');
|
80
80
|
var chunkT5AO4445_cjs = require('./chunk-T5AO4445.cjs');
|
81
81
|
var chunk6ZUGJHNV_cjs = require('./chunk-6ZUGJHNV.cjs');
|
82
82
|
var chunkUHKV2XBV_cjs = require('./chunk-UHKV2XBV.cjs');
|
@@ -133,7 +133,7 @@ var chunkFCGKL7AI_cjs = require('./chunk-FCGKL7AI.cjs');
|
|
133
133
|
var chunkFNTJOIQB_cjs = require('./chunk-FNTJOIQB.cjs');
|
134
134
|
var chunkD7SALAS2_cjs = require('./chunk-D7SALAS2.cjs');
|
135
135
|
var chunkUTFSZHUD_cjs = require('./chunk-UTFSZHUD.cjs');
|
136
|
-
var
|
136
|
+
var chunkTN2MXFJV_cjs = require('./chunk-TN2MXFJV.cjs');
|
137
137
|
require('./chunk-U22VLCMN.cjs');
|
138
138
|
require('./chunk-YY5ENJSH.cjs');
|
139
139
|
require('./chunk-ZWVME7CU.cjs');
|
@@ -146,7 +146,7 @@ require('./chunk-JEQ2X3Z6.cjs');
|
|
146
146
|
|
147
147
|
// src/bundle.ts
|
148
148
|
var debug = chunkJVF5KY2J_cjs.debug_default("bundle");
|
149
|
-
var CommerceLayerBundle = class _CommerceLayerBundle extends
|
149
|
+
var CommerceLayerBundle = class _CommerceLayerBundle extends chunkTN2MXFJV_cjs.CommerceLayerClient {
|
150
150
|
// ##__CL_RESOURCES_DEF_START__##
|
151
151
|
// ##__CL_RESOURCES_DEF_TEMPLATE:: ##__TAB__#####__RESOURCE_TYPE__##?: api.##__RESOURCE_CLASS__##
|
152
152
|
// ##__CL_RESOURCES_DEF_STOP__##
|
@@ -343,7 +343,7 @@ var CommerceLayerBundle = class _CommerceLayerBundle extends chunkRVECNXMX_cjs.C
|
|
343
343
|
return chunkTZAGUXNS_cjs.line_item_options_default;
|
344
344
|
}
|
345
345
|
get line_items() {
|
346
|
-
return
|
346
|
+
return chunk4IOIA2JQ_cjs.line_items_default;
|
347
347
|
}
|
348
348
|
get links() {
|
349
349
|
return chunkT5AO4445_cjs.links_default;
|
@@ -382,7 +382,7 @@ var CommerceLayerBundle = class _CommerceLayerBundle extends chunkRVECNXMX_cjs.C
|
|
382
382
|
return chunkLIIFLHEH_cjs.orders_default;
|
383
383
|
}
|
384
384
|
get organization() {
|
385
|
-
return
|
385
|
+
return chunkYPGYBULL_cjs.organizations_default;
|
386
386
|
}
|
387
387
|
get packages() {
|
388
388
|
return chunkO3NWYOPV_cjs.packages_default;
|
package/lib/bundle.d.cts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { CommerceLayerInitConfig, CommerceLayerClient } from './commercelayer.cjs';
|
2
|
-
import { H as Addresses, J as Adjustments, N as AdyenGateways, P as AdyenPayments, W as Applications, Y as Attachments, _ as Authorizations, a0 as AvalaraAccounts, a2 as AxerveGateways, a4 as AxervePayments, a6 as BingGeocoders, a8 as BraintreeGateways, aa as BraintreePayments, ac as Bundles, ae as BuyXPayYPromotions, ag as Captures, ai as CarrierAccounts, ak as CheckoutComGateways, am as CheckoutComPayments, ao as Cleanups, aq as CouponCodesPromotionRules, as as CouponRecipients, au as Coupons, aw as CustomPromotionRules, ay as CustomerAddresses, aA as CustomerGroups, aC as CustomerPasswordResets, aE as CustomerPaymentSources, aG as CustomerSubscriptions, aI as Customers, aK as DeliveryLeadTimes, aM as DiscountEngineItems, aO as DiscountEngines, aQ as EasypostPickups, aS as EventCallbacks, aU as EventStores, aW as Events, aY as Exports, a_ as ExternalGateways, b0 as ExternalPayments, b2 as ExternalPromotions, b4 as ExternalTaxCalculators, b6 as FixedAmountPromotions, b8 as FixedPricePromotions, ba as FlexPromotions, bc as FreeGiftPromotions, be as FreeShippingPromotions, bg as Geocoders, bi as GiftCardRecipients, bk as GiftCards, bm as GoogleGeocoders, bo as Imports, bq as InStockSubscriptions, bs as InventoryModels, bu as InventoryReturnLocations, bw as InventoryStockLocations, by as KlarnaGateways, bA as KlarnaPayments, bC as LineItemOptions, bE as LineItems, bG as Links, bI as ManualGateways, bK as ManualTaxCalculators, bM as Markets, bO as Merchants, bQ as Notifications, bS as OrderAmountPromotionRules, bU as OrderCopies, bW as OrderFactories, bY as OrderSubscriptionItems, b_ as OrderSubscriptions, c0 as Orders, c2 as Organizations, c4 as Packages, c6 as ParcelLineItems, c8 as Parcels, ca as PaymentGateways, cc as PaymentMethods, ce as PaymentOptions, cg as PaypalGateways, ci as PaypalPayments, ck as PercentageDiscountPromotions, cm as Pickups, co as PriceFrequencyTiers, cq as PriceListSchedulers, cs as PriceLists, cu as PriceTiers, cw as PriceVolumeTiers, cy as Prices, cA as PromotionRules, cC as Promotions, cE as RecurringOrderCopies, cG as Refunds, cI as ReservedStocks, cK as ResourceErrors, cM as ReturnLineItems, cO as Returns, cQ as SatispayGateways, cS as SatispayPayments, cU as Shipments, cW as ShippingCategories, cY as ShippingMethodTiers, c_ as ShippingMethods, d0 as ShippingWeightTiers, d2 as ShippingZones, d4 as SkuListItems, d6 as SkuListPromotionRules, d8 as SkuLists, da as SkuOptions, dc as Skus, de as StockItems, dg as StockLineItems, di as StockLocations, dk as StockReservations, dm as StockTransfers, dp as Stores, dr as StripeGateways, dt as StripePayments, dv as StripeTaxAccounts, dx as SubscriptionModels, dz as Tags, dB as TalonOneAccounts, dD as TaxCalculators, dF as TaxCategories, dH as TaxRules, dJ as TaxjarAccounts, dL as Transactions, dN as Versions, dP as VertexAccounts, dR as Voids, dT as Webhooks, dV as WireTransfers } from './api-
|
2
|
+
import { H as Addresses, J as Adjustments, N as AdyenGateways, P as AdyenPayments, W as Applications, Y as Attachments, _ as Authorizations, a0 as AvalaraAccounts, a2 as AxerveGateways, a4 as AxervePayments, a6 as BingGeocoders, a8 as BraintreeGateways, aa as BraintreePayments, ac as Bundles, ae as BuyXPayYPromotions, ag as Captures, ai as CarrierAccounts, ak as CheckoutComGateways, am as CheckoutComPayments, ao as Cleanups, aq as CouponCodesPromotionRules, as as CouponRecipients, au as Coupons, aw as CustomPromotionRules, ay as CustomerAddresses, aA as CustomerGroups, aC as CustomerPasswordResets, aE as CustomerPaymentSources, aG as CustomerSubscriptions, aI as Customers, aK as DeliveryLeadTimes, aM as DiscountEngineItems, aO as DiscountEngines, aQ as EasypostPickups, aS as EventCallbacks, aU as EventStores, aW as Events, aY as Exports, a_ as ExternalGateways, b0 as ExternalPayments, b2 as ExternalPromotions, b4 as ExternalTaxCalculators, b6 as FixedAmountPromotions, b8 as FixedPricePromotions, ba as FlexPromotions, bc as FreeGiftPromotions, be as FreeShippingPromotions, bg as Geocoders, bi as GiftCardRecipients, bk as GiftCards, bm as GoogleGeocoders, bo as Imports, bq as InStockSubscriptions, bs as InventoryModels, bu as InventoryReturnLocations, bw as InventoryStockLocations, by as KlarnaGateways, bA as KlarnaPayments, bC as LineItemOptions, bE as LineItems, bG as Links, bI as ManualGateways, bK as ManualTaxCalculators, bM as Markets, bO as Merchants, bQ as Notifications, bS as OrderAmountPromotionRules, bU as OrderCopies, bW as OrderFactories, bY as OrderSubscriptionItems, b_ as OrderSubscriptions, c0 as Orders, c2 as Organizations, c4 as Packages, c6 as ParcelLineItems, c8 as Parcels, ca as PaymentGateways, cc as PaymentMethods, ce as PaymentOptions, cg as PaypalGateways, ci as PaypalPayments, ck as PercentageDiscountPromotions, cm as Pickups, co as PriceFrequencyTiers, cq as PriceListSchedulers, cs as PriceLists, cu as PriceTiers, cw as PriceVolumeTiers, cy as Prices, cA as PromotionRules, cC as Promotions, cE as RecurringOrderCopies, cG as Refunds, cI as ReservedStocks, cK as ResourceErrors, cM as ReturnLineItems, cO as Returns, cQ as SatispayGateways, cS as SatispayPayments, cU as Shipments, cW as ShippingCategories, cY as ShippingMethodTiers, c_ as ShippingMethods, d0 as ShippingWeightTiers, d2 as ShippingZones, d4 as SkuListItems, d6 as SkuListPromotionRules, d8 as SkuLists, da as SkuOptions, dc as Skus, de as StockItems, dg as StockLineItems, di as StockLocations, dk as StockReservations, dm as StockTransfers, dp as Stores, dr as StripeGateways, dt as StripePayments, dv as StripeTaxAccounts, dx as SubscriptionModels, dz as Tags, dB as TalonOneAccounts, dD as TaxCalculators, dF as TaxCategories, dH as TaxRules, dJ as TaxjarAccounts, dL as Transactions, dN as Versions, dP as VertexAccounts, dR as Voids, dT as Webhooks, dV as WireTransfers } from './api-egU4nY4x.cjs';
|
3
3
|
import './error.cjs';
|
4
4
|
import './interceptor-k15jXzf0.cjs';
|
5
5
|
import './client.cjs';
|
package/lib/bundle.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { CommerceLayerInitConfig, CommerceLayerClient } from './commercelayer.js';
|
2
|
-
import { H as Addresses, J as Adjustments, N as AdyenGateways, P as AdyenPayments, W as Applications, Y as Attachments, _ as Authorizations, a0 as AvalaraAccounts, a2 as AxerveGateways, a4 as AxervePayments, a6 as BingGeocoders, a8 as BraintreeGateways, aa as BraintreePayments, ac as Bundles, ae as BuyXPayYPromotions, ag as Captures, ai as CarrierAccounts, ak as CheckoutComGateways, am as CheckoutComPayments, ao as Cleanups, aq as CouponCodesPromotionRules, as as CouponRecipients, au as Coupons, aw as CustomPromotionRules, ay as CustomerAddresses, aA as CustomerGroups, aC as CustomerPasswordResets, aE as CustomerPaymentSources, aG as CustomerSubscriptions, aI as Customers, aK as DeliveryLeadTimes, aM as DiscountEngineItems, aO as DiscountEngines, aQ as EasypostPickups, aS as EventCallbacks, aU as EventStores, aW as Events, aY as Exports, a_ as ExternalGateways, b0 as ExternalPayments, b2 as ExternalPromotions, b4 as ExternalTaxCalculators, b6 as FixedAmountPromotions, b8 as FixedPricePromotions, ba as FlexPromotions, bc as FreeGiftPromotions, be as FreeShippingPromotions, bg as Geocoders, bi as GiftCardRecipients, bk as GiftCards, bm as GoogleGeocoders, bo as Imports, bq as InStockSubscriptions, bs as InventoryModels, bu as InventoryReturnLocations, bw as InventoryStockLocations, by as KlarnaGateways, bA as KlarnaPayments, bC as LineItemOptions, bE as LineItems, bG as Links, bI as ManualGateways, bK as ManualTaxCalculators, bM as Markets, bO as Merchants, bQ as Notifications, bS as OrderAmountPromotionRules, bU as OrderCopies, bW as OrderFactories, bY as OrderSubscriptionItems, b_ as OrderSubscriptions, c0 as Orders, c2 as Organizations, c4 as Packages, c6 as ParcelLineItems, c8 as Parcels, ca as PaymentGateways, cc as PaymentMethods, ce as PaymentOptions, cg as PaypalGateways, ci as PaypalPayments, ck as PercentageDiscountPromotions, cm as Pickups, co as PriceFrequencyTiers, cq as PriceListSchedulers, cs as PriceLists, cu as PriceTiers, cw as PriceVolumeTiers, cy as Prices, cA as PromotionRules, cC as Promotions, cE as RecurringOrderCopies, cG as Refunds, cI as ReservedStocks, cK as ResourceErrors, cM as ReturnLineItems, cO as Returns, cQ as SatispayGateways, cS as SatispayPayments, cU as Shipments, cW as ShippingCategories, cY as ShippingMethodTiers, c_ as ShippingMethods, d0 as ShippingWeightTiers, d2 as ShippingZones, d4 as SkuListItems, d6 as SkuListPromotionRules, d8 as SkuLists, da as SkuOptions, dc as Skus, de as StockItems, dg as StockLineItems, di as StockLocations, dk as StockReservations, dm as StockTransfers, dp as Stores, dr as StripeGateways, dt as StripePayments, dv as StripeTaxAccounts, dx as SubscriptionModels, dz as Tags, dB as TalonOneAccounts, dD as TaxCalculators, dF as TaxCategories, dH as TaxRules, dJ as TaxjarAccounts, dL as Transactions, dN as Versions, dP as VertexAccounts, dR as Voids, dT as Webhooks, dV as WireTransfers } from './api-
|
2
|
+
import { H as Addresses, J as Adjustments, N as AdyenGateways, P as AdyenPayments, W as Applications, Y as Attachments, _ as Authorizations, a0 as AvalaraAccounts, a2 as AxerveGateways, a4 as AxervePayments, a6 as BingGeocoders, a8 as BraintreeGateways, aa as BraintreePayments, ac as Bundles, ae as BuyXPayYPromotions, ag as Captures, ai as CarrierAccounts, ak as CheckoutComGateways, am as CheckoutComPayments, ao as Cleanups, aq as CouponCodesPromotionRules, as as CouponRecipients, au as Coupons, aw as CustomPromotionRules, ay as CustomerAddresses, aA as CustomerGroups, aC as CustomerPasswordResets, aE as CustomerPaymentSources, aG as CustomerSubscriptions, aI as Customers, aK as DeliveryLeadTimes, aM as DiscountEngineItems, aO as DiscountEngines, aQ as EasypostPickups, aS as EventCallbacks, aU as EventStores, aW as Events, aY as Exports, a_ as ExternalGateways, b0 as ExternalPayments, b2 as ExternalPromotions, b4 as ExternalTaxCalculators, b6 as FixedAmountPromotions, b8 as FixedPricePromotions, ba as FlexPromotions, bc as FreeGiftPromotions, be as FreeShippingPromotions, bg as Geocoders, bi as GiftCardRecipients, bk as GiftCards, bm as GoogleGeocoders, bo as Imports, bq as InStockSubscriptions, bs as InventoryModels, bu as InventoryReturnLocations, bw as InventoryStockLocations, by as KlarnaGateways, bA as KlarnaPayments, bC as LineItemOptions, bE as LineItems, bG as Links, bI as ManualGateways, bK as ManualTaxCalculators, bM as Markets, bO as Merchants, bQ as Notifications, bS as OrderAmountPromotionRules, bU as OrderCopies, bW as OrderFactories, bY as OrderSubscriptionItems, b_ as OrderSubscriptions, c0 as Orders, c2 as Organizations, c4 as Packages, c6 as ParcelLineItems, c8 as Parcels, ca as PaymentGateways, cc as PaymentMethods, ce as PaymentOptions, cg as PaypalGateways, ci as PaypalPayments, ck as PercentageDiscountPromotions, cm as Pickups, co as PriceFrequencyTiers, cq as PriceListSchedulers, cs as PriceLists, cu as PriceTiers, cw as PriceVolumeTiers, cy as Prices, cA as PromotionRules, cC as Promotions, cE as RecurringOrderCopies, cG as Refunds, cI as ReservedStocks, cK as ResourceErrors, cM as ReturnLineItems, cO as Returns, cQ as SatispayGateways, cS as SatispayPayments, cU as Shipments, cW as ShippingCategories, cY as ShippingMethodTiers, c_ as ShippingMethods, d0 as ShippingWeightTiers, d2 as ShippingZones, d4 as SkuListItems, d6 as SkuListPromotionRules, d8 as SkuLists, da as SkuOptions, dc as Skus, de as StockItems, dg as StockLineItems, di as StockLocations, dk as StockReservations, dm as StockTransfers, dp as Stores, dr as StripeGateways, dt as StripePayments, dv as StripeTaxAccounts, dx as SubscriptionModels, dz as Tags, dB as TalonOneAccounts, dD as TaxCalculators, dF as TaxCategories, dH as TaxRules, dJ as TaxjarAccounts, dL as Transactions, dN as Versions, dP as VertexAccounts, dR as Voids, dT as Webhooks, dV as WireTransfers } from './api-LDVr5RYG.js';
|
3
3
|
import './error.js';
|
4
4
|
import './interceptor-k15jXzf0.js';
|
5
5
|
import './client.js';
|
package/lib/bundle.js
CHANGED
@@ -55,7 +55,7 @@ import { price_list_schedulers_default } from './chunk-4XQNILDJ.js';
|
|
55
55
|
import { price_lists_default } from './chunk-OPPZLGKC.js';
|
56
56
|
import { order_subscriptions_default } from './chunk-KAZKQXUO.js';
|
57
57
|
import { orders_default } from './chunk-LUS6TTEC.js';
|
58
|
-
import { organizations_default } from './chunk-
|
58
|
+
import { organizations_default } from './chunk-NQHQV4PY.js';
|
59
59
|
import { packages_default } from './chunk-H5CKBXQS.js';
|
60
60
|
import { parcel_line_items_default } from './chunk-OA7RZ24N.js';
|
61
61
|
import { parcels_default } from './chunk-JAOFRM22.js';
|
@@ -74,7 +74,7 @@ import { inventory_stock_locations_default } from './chunk-5TL34ZY6.js';
|
|
74
74
|
import { klarna_gateways_default } from './chunk-DEYOBMM5.js';
|
75
75
|
import { klarna_payments_default } from './chunk-I3ZMOPMJ.js';
|
76
76
|
import { line_item_options_default } from './chunk-JPKZBEAY.js';
|
77
|
-
import { line_items_default } from './chunk-
|
77
|
+
import { line_items_default } from './chunk-NTAREPLJ.js';
|
78
78
|
import { links_default } from './chunk-67TJ6ALR.js';
|
79
79
|
import { manual_gateways_default } from './chunk-TWQ4THAG.js';
|
80
80
|
import { free_shipping_promotions_default } from './chunk-ZDTIKZYR.js';
|
@@ -131,7 +131,7 @@ import { adyen_gateways_default } from './chunk-PIYKFPYB.js';
|
|
131
131
|
import { adyen_payments_default } from './chunk-GRBPCPJQ.js';
|
132
132
|
import { applications_default } from './chunk-YTXFX5LA.js';
|
133
133
|
import { attachments_default } from './chunk-KIB4XYWP.js';
|
134
|
-
import { CommerceLayerClient } from './chunk-
|
134
|
+
import { CommerceLayerClient } from './chunk-CB4HWBPX.js';
|
135
135
|
import './chunk-XKERR6OR.js';
|
136
136
|
import './chunk-CHYP5F26.js';
|
137
137
|
import './chunk-UUY77JM3.js';
|
@@ -60,6 +60,9 @@ var LineItems = class _LineItems extends chunkU22VLCMN_cjs.ApiResource {
|
|
60
60
|
async _reserve_stock(id, params, options) {
|
61
61
|
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _LineItems.TYPE, _reserve_stock: true }, params, options);
|
62
62
|
}
|
63
|
+
async _reset_restocked_quantity(id, params, options) {
|
64
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _LineItems.TYPE, _reset_restocked_quantity: true }, params, options);
|
65
|
+
}
|
63
66
|
async _reset_circuit(id, params, options) {
|
64
67
|
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _LineItems.TYPE, _reset_circuit: true }, params, options);
|
65
68
|
}
|
@@ -86,5 +89,5 @@ var instance = new LineItems();
|
|
86
89
|
var line_items_default = instance;
|
87
90
|
|
88
91
|
exports.line_items_default = line_items_default;
|
89
|
-
//# sourceMappingURL=chunk-
|
90
|
-
//# sourceMappingURL=chunk-
|
92
|
+
//# sourceMappingURL=chunk-4IOIA2JQ.cjs.map
|
93
|
+
//# sourceMappingURL=chunk-4IOIA2JQ.cjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../src/resources/line_items.ts"],"names":["ApiResource"],"mappings":";;;;;AAwZA,IAAM,SAAA,GAAN,MAAM,UAAA,SAAkBA,6BAAA,CAAsB;AAAA,EAE7C,OAAgB,IAAA,GAAqB,YAAA;AAAA,EAErC,MAAM,MAAA,CAAO,QAAA,EAA0B,MAAA,EAAwC,OAAA,EAA8C;AAC5H,IAAA,OAAO,IAAA,CAAK,SAAA,CAAU,MAAA,CAAiC,EAAE,GAAG,QAAA,EAAU,IAAA,EAAM,UAAA,CAAU,IAAA,EAAK,EAAG,MAAA,EAAQ,OAAO,CAAA;AAAA,EAC9G;AAAA,EAEA,MAAM,MAAA,CAAO,QAAA,EAA0B,MAAA,EAAwC,OAAA,EAA8C;AAC5H,IAAA,OAAO,IAAA,CAAK,SAAA,CAAU,MAAA,CAAiC,EAAE,GAAG,QAAA,EAAU,IAAA,EAAM,UAAA,CAAU,IAAA,EAAK,EAAG,MAAA,EAAQ,OAAO,CAAA;AAAA,EAC9G;AAAA,EAEA,MAAM,MAAA,CAAO,EAAA,EAAyB,OAAA,EAA0C;AAC/E,IAAA,MAAM,IAAA,CAAK,SAAA,CAAU,MAAA,CAAQ,OAAO,EAAA,KAAO,QAAA,GAAW,EAAE,EAAA,EAAI,IAAA,EAAM,UAAA,CAAU,IAAA,E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AA,KAAS,UAAA,CAAU,IAAA;AAAA,EACtD;AAAA,EAGA,aAAa,EAAA,EAA6C;AACzD,IAAA,OAAO,KAAA,CAAM,qBAAkC,EAAE,CAAA;AAAA,EAClD;AAAA,EAEA,sBAAsB,GAAA,EAA8B;AACnD,IAAA,OAAO,KAAA,CAAM,qBAAA,CAAmC,GAAG,GAAG,CAAA;AAAA,EACvD;AAAA,EAGA,IAAA,GAAqB;AACpB,IAAA,OAAO,UAAA,CAAU,IAAA;AAAA,EAClB;AAED,CAAA;AAGA,IAAM,QAAA,GAAW,IAAI,SAAA,EAAU;AAC/B,IAAO,kBAAA,GAAQ","file":"chunk-4IOIA2JQ.cjs","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Order, OrderType } from './orders'\nimport type { LineItemOption } from './line_item_options'\nimport type { ReturnLineItem } from './return_line_items'\nimport type { StockReservation } from './stock_reservations'\nimport type { StockLineItem } from './stock_line_items'\nimport type { StockTransfer } from './stock_transfers'\nimport type { Notification } from './notifications'\nimport type { Event } from './events'\nimport type { Tag, TagType } from './tags'\nimport type { EventStore } from './event_stores'\nimport type { Sku, SkuType } from './skus'\nimport type { Bundle, BundleType } from './bundles'\nimport type { GiftCard, GiftCardType } from './gift_cards'\nimport type { Shipment, ShipmentType } from './shipments'\nimport type { PaymentMethod, PaymentMethodType } from './payment_methods'\nimport type { Adjustment, AdjustmentType } from './adjustments'\nimport type { DiscountEngineItem, DiscountEngineItemType } from './discount_engine_items'\nimport type { PercentageDiscountPromotion, PercentageDiscountPromotionType } from './percentage_discount_promotions'\nimport type { FreeShippingPromotion, FreeShippingPromotionType } from './free_shipping_promotions'\nimport type { BuyXPayYPromotion, BuyXPayYPromotionType } from './buy_x_pay_y_promotions'\nimport type { FreeGiftPromotion, FreeGiftPromotionType } from './free_gift_promotions'\nimport type { FixedPricePromotion, FixedPricePromotionType } from './fixed_price_promotions'\nimport type { ExternalPromotion, ExternalPromotionType } from './external_promotions'\nimport type { FixedAmountPromotion, FixedAmountPromotionType } from './fixed_amount_promotions'\nimport type { FlexPromotion, FlexPromotionType } from './flex_promotions'\n\n\ntype LineItemType = 'line_items'\ntype LineItemRel = ResourceRel & { type: LineItemType }\ntype OrderRel = ResourceRel & { type: OrderType }\ntype SkuRel = ResourceRel & { type: SkuType }\ntype BundleRel = ResourceRel & { type: BundleType }\ntype GiftCardRel = ResourceRel & { type: GiftCardType }\ntype ShipmentRel = ResourceRel & { type: ShipmentType }\ntype PaymentMethodRel = ResourceRel & { type: PaymentMethodType }\ntype AdjustmentRel = ResourceRel & { type: AdjustmentType }\ntype DiscountEngineItemRel = ResourceRel & { type: DiscountEngineItemType }\ntype PercentageDiscountPromotionRel = ResourceRel & { type: PercentageDiscountPromotionType }\ntype FreeShippingPromotionRel = ResourceRel & { type: FreeShippingPromotionType }\ntype BuyXPayYPromotionRel = ResourceRel & { type: BuyXPayYPromotionType }\ntype FreeGiftPromotionRel = ResourceRel & { type: FreeGiftPromotionType }\ntype FixedPricePromotionRel = ResourceRel & { type: FixedPricePromotionType }\ntype ExternalPromotionRel = ResourceRel & { type: ExternalPromotionType }\ntype FixedAmountPromotionRel = ResourceRel & { type: FixedAmountPromotionType }\ntype FlexPromotionRel = ResourceRel & { type: FlexPromotionType }\ntype TagRel = ResourceRel & { type: TagType }\n\n\nexport type LineItemSort = Pick<LineItem, 'id' | 'currency_code' | 'unit_amount_cents' | 'compare_at_amount_cents' | 'options_amount_cents' | 'discount_cents' | 'total_amount_cents' | 'tax_amount_cents' | 'name' | 'item_type' | 'circuit_state' | 'circuit_failure_count'> & ResourceSort\n// export type LineItemFilter = Pick<LineItem, 'id' | 'sku_code' | 'quantity' | 'currency_code' | 'unit_amount_cents' | 'compare_at_amount_cents' | 'options_amount_cents' | 'discount_cents' | 'total_amount_cents' | 'tax_amount_cents' | 'name' | 'image_url' | 'item_type' | 'circuit_state' | 'circuit_failure_count'> & ResourceFilter\n\n\ninterface LineItem extends Resource {\n\t\n\treadonly type: LineItemType\n\n\t/** \n\t * The code of the associated SKU.\n\t * @example ```\"TSHIRTMM000000FFFFFFXLXX\"```\n\t */\n\tsku_code?: string | null\n\t/** \n\t * The code of the associated bundle.\n\t * @example ```\"BUNDLEMM000000FFFFFFXLXX\"```\n\t */\n\tbundle_code?: string | null\n\t/** \n\t * The line item quantity.\n\t * @example ```4```\n\t */\n\tquantity: number\n\t/** \n\t * When creating or updating a new line item, set this attribute to '1' if you want to inject the unit_amount_cents price from an external source. Any successive price computation will be done externally, until the attribute is reset to '0'.\n\t * @example ```true```\n\t */\n\t_external_price?: boolean | null\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard, automatically inherited from the order's market.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * The unit amount of the line item, in cents. Can be specified only via an integration application, or when the item is missing, otherwise is automatically computed by using one of the available methods. Cannot be passed by sales channels.\n\t * @example ```10000```\n\t */\n\tunit_amount_cents?: number | null\n\t/** \n\t * The unit amount of the line item, float. This can be useful to track the purchase on thrid party systems, e.g Google Analyitcs Enhanced Ecommerce.\n\t * @example ```100```\n\t */\n\tunit_amount_float?: number | null\n\t/** \n\t * The unit amount of the line item, formatted. This can be useful to display the amount with currency in you views.\n\t * @example ```\"€100,00\"```\n\t */\n\tformatted_unit_amount?: string | null\n\t/** \n\t * The compared price amount, in cents. Useful to display a percentage discount.\n\t * @example ```13000```\n\t */\n\tcompare_at_amount_cents?: number | null\n\t/** \n\t * The compared price amount, float.\n\t * @example ```130```\n\t */\n\tcompare_at_amount_float?: number | null\n\t/** \n\t * The compared price amount, formatted.\n\t * @example ```\"€130,00\"```\n\t */\n\tformatted_compare_at_amount?: string | null\n\t/** \n\t * The options amount of the line item, in cents. Cannot be passed by sales channels.\n\t * @example ```1000```\n\t */\n\toptions_amount_cents?: number | null\n\t/** \n\t * The options amount of the line item, float.\n\t * @example ```10```\n\t */\n\toptions_amount_float?: number | null\n\t/** \n\t * The options amount of the line item, formatted.\n\t * @example ```\"€10,00\"```\n\t */\n\tformatted_options_amount?: string | null\n\t/** \n\t * The discount applied to the line item, in cents. When you apply a discount to an order, this is automatically calculated basing on the line item total_amount_cents value.\n\t * @example ```-1000```\n\t */\n\tdiscount_cents?: number | null\n\t/** \n\t * The discount applied to the line item, float. When you apply a discount to an order, this is automatically calculated basing on the line item total_amount_cents value.\n\t * @example ```10```\n\t */\n\tdiscount_float?: number | null\n\t/** \n\t * The discount applied to the line item, fromatted. When you apply a discount to an order, this is automatically calculated basing on the line item total_amount_cents value.\n\t * @example ```\"€10,00\"```\n\t */\n\tformatted_discount?: string | null\n\t/** \n\t * Calculated as unit amount x quantity + options amount, in cents.\n\t * @example ```18800```\n\t */\n\ttotal_amount_cents?: number | null\n\t/** \n\t * Calculated as unit amount x quantity + options amount, float. This can be useful to track the purchase on thrid party systems, e.g Google Analyitcs Enhanced Ecommerce.\n\t * @example ```188```\n\t */\n\ttotal_amount_float: number\n\t/** \n\t * Calculated as unit amount x quantity + options amount, formatted. This can be useful to display the amount with currency in you views.\n\t * @example ```\"€188,00\"```\n\t */\n\tformatted_total_amount?: string | null\n\t/** \n\t * The collected tax amount, otherwise calculated as total amount cents - discount cent * tax rate, in cents.\n\t * @example ```1880```\n\t */\n\ttax_amount_cents?: number | null\n\t/** \n\t * The collected tax amount, otherwise calculated as total amount cents - discount cent * tax rate, float.\n\t * @example ```18.8```\n\t */\n\ttax_amount_float: number\n\t/** \n\t * The collected tax amount, otherwise calculated as total amount cents - discount cent * tax rate, formatted.\n\t * @example ```\"€18,80\"```\n\t */\n\tformatted_tax_amount?: string | null\n\t/** \n\t * The name of the line item. When blank, it gets populated with the name of the associated item (if present).\n\t * @example ```\"Men's Black T-shirt with White Logo (XL)\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The image_url of the line item. When blank, it gets populated with the image_url of the associated item (if present, SKU only).\n\t * @example ```\"https://img.yourdomain.com/skus/xYZkjABcde.png\"```\n\t */\n\timage_url?: string | null\n\t/** \n\t * The discount breakdown for this line item (if calculated).\n\t * @example ```{\"41\":{\"name\":\"10% ALL\",\"cents\":-900,\"weight\":0.416,\"coupon_code\":\"XXXXXXXX\"}}```\n\t */\n\tdiscount_breakdown?: Record<string, any> | null\n\t/** \n\t * The tax rate for this line item (if calculated).\n\t * @example ```0.22```\n\t */\n\ttax_rate?: number | null\n\t/** \n\t * The tax breakdown for this line item (if calculated).\n\t * @example ```{\"id\":\"1234\",\"city_amount\":\"0.0\",\"state_amount\":6.6,\"city_tax_rate\":0,\"county_amount\":2.78,\"taxable_amount\":139,\"county_tax_rate\":0.02,\"tax_collectable\":10.08,\"special_tax_rate\":0.005,\"combined_tax_rate\":0.0725,\"city_taxable_amount\":0,\"state_sales_tax_rate\":0.0475,\"state_taxable_amount\":139,\"county_taxable_amount\":139,\"special_district_amount\":0.7,\"special_district_taxable_amount\":139}```\n\t */\n\ttax_breakdown?: Record<string, any> | null\n\t/** \n\t * The type of the associated item. One of 'skus', 'bundles', 'gift_cards', 'shipments', 'payment_methods', 'adjustments', 'discount_engine_items', 'percentage_discount_promotions', 'free_shipping_promotions', 'buy_x_pay_y_promotions', 'free_gift_promotions', 'fixed_price_promotions', 'external_promotions', 'fixed_amount_promotions', or 'flex_promotions'.\n\t * @example ```\"skus\"```\n\t */\n\titem_type?: 'skus' | 'bundles' | 'gift_cards' | 'shipments' | 'payment_methods' | 'adjustments' | 'discount_engine_items' | 'percentage_discount_promotions' | 'free_shipping_promotions' | 'buy_x_pay_y_promotions' | 'free_gift_promotions' | 'fixed_price_promotions' | 'external_promotions' | 'fixed_amount_promotions' | 'flex_promotions' | null\n\t/** \n\t * The frequency which generates a subscription. Must be supported by existing associated subscription_model.\n\t * @example ```\"monthly\"```\n\t */\n\tfrequency?: string | null\n\t/** \n\t * The coupon code, if any, used to trigger this promotion line item. null for other line item types or if the promotion line item wasn't triggered by a coupon.\n\t * @example ```\"SUMMERDISCOUNT\"```\n\t */\n\tcoupon_code?: string | null\n\t/** \n\t * The rule outcomes.\n\t * @example ```[]```\n\t */\n\trule_outcomes?: Record<string, any> | null\n\t/** \n\t * The circuit breaker state, by default it is 'closed'. It can become 'open' once the number of consecutive failures overlaps the specified threshold, in such case no further calls to the failing callback are made.\n\t * @example ```\"closed\"```\n\t */\n\tcircuit_state?: string | null\n\t/** \n\t * The number of consecutive failures recorded by the circuit breaker associated to this resource, will be reset on first successful call to callback.\n\t * @example ```5```\n\t */\n\tcircuit_failure_count?: number | null\n\n\torder?: Order | null\n\titem?: Sku | Bundle | GiftCard | Shipment | PaymentMethod | Adjustment | DiscountEngineItem | PercentageDiscountPromotion | FreeShippingPromotion | BuyXPayYPromotion | FreeGiftPromotion | FixedPricePromotion | ExternalPromotion | FixedAmountPromotion | FlexPromotion | null\n\tsku?: Sku | null\n\tbundle?: Bundle | null\n\tadjustment?: Adjustment | null\n\tgift_card?: GiftCard | null\n\tshipment?: Shipment | null\n\tpayment_method?: PaymentMethod | null\n\tline_item_options?: LineItemOption[] | null\n\treturn_line_items?: ReturnLineItem[] | null\n\tstock_reservations?: StockReservation[] | null\n\tstock_line_items?: StockLineItem[] | null\n\tstock_transfers?: StockTransfer[] | null\n\tnotifications?: Notification[] | null\n\tevents?: Event[] | null\n\ttags?: Tag[] | null\n\tevent_stores?: EventStore[] | null\n\n}\n\n\ninterface LineItemCreate extends ResourceCreate {\n\t\n\t/** \n\t * The code of the associated SKU.\n\t * @example ```\"TSHIRTMM000000FFFFFFXLXX\"```\n\t */\n\tsku_code?: string | null\n\t/** \n\t * The code of the associated bundle.\n\t * @example ```\"BUNDLEMM000000FFFFFFXLXX\"```\n\t */\n\tbundle_code?: string | null\n\t/** \n\t * The line item quantity.\n\t * @example ```4```\n\t */\n\tquantity: number\n\t/** \n\t * When creating or updating a new line item, set this attribute to '1' if you want to inject the unit_amount_cents price from an external source. Any successive price computation will be done externally, until the attribute is reset to '0'.\n\t * @example ```true```\n\t */\n\t_external_price?: boolean | null\n\t/** \n\t * When creating a new line item, set this attribute to '1' if you want to update the line item quantity (if present) instead of creating a new line item for the same SKU.\n\t * @example ```true```\n\t */\n\t_update_quantity?: boolean | null\n\t/** \n\t * Send this attribute if you want to reserve the stock for the line item's SKUs quantity. Stock reservations expiration depends on the inventory model's cutoff. When used on update the existing active stock reservations are renewed. Cannot be passed by sales channels.\n\t * @example ```true```\n\t */\n\t_reserve_stock?: boolean | null\n\t/** \n\t * Send this attribute if you want to reset the quantity restocked by a return or by an order/shipment cancel. This will allow for multiple returns, albeit you need to adjust the stock manually. Cannot be passed by sales channels.\n\t * @example ```true```\n\t */\n\t_reset_restocked_quantity?: boolean | null\n\t/** \n\t * The unit amount of the line item, in cents. Can be specified only via an integration application, or when the item is missing, otherwise is automatically computed by using one of the available methods. Cannot be passed by sales channels.\n\t * @example ```10000```\n\t */\n\tunit_amount_cents?: number | null\n\t/** \n\t * The compared price amount, in cents. Useful to display a percentage discount.\n\t * @example ```13000```\n\t */\n\tcompare_at_amount_cents?: number | null\n\t/** \n\t * The name of the line item. When blank, it gets populated with the name of the associated item (if present).\n\t * @example ```\"Men's Black T-shirt with White Logo (XL)\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The image_url of the line item. When blank, it gets populated with the image_url of the associated item (if present, SKU only).\n\t * @example ```\"https://img.yourdomain.com/skus/xYZkjABcde.png\"```\n\t */\n\timage_url?: string | null\n\t/** \n\t * The type of the associated item. One of 'skus', 'bundles', 'gift_cards', 'shipments', 'payment_methods', 'adjustments', 'discount_engine_items', 'percentage_discount_promotions', 'free_shipping_promotions', 'buy_x_pay_y_promotions', 'free_gift_promotions', 'fixed_price_promotions', 'external_promotions', 'fixed_amount_promotions', or 'flex_promotions'.\n\t * @example ```\"skus\"```\n\t */\n\titem_type?: 'skus' | 'bundles' | 'gift_cards' | 'shipments' | 'payment_methods' | 'adjustments' | 'discount_engine_items' | 'percentage_discount_promotions' | 'free_shipping_promotions' | 'buy_x_pay_y_promotions' | 'free_gift_promotions' | 'fixed_price_promotions' | 'external_promotions' | 'fixed_amount_promotions' | 'flex_promotions' | null\n\t/** \n\t * The frequency which generates a subscription. Must be supported by existing associated subscription_model.\n\t * @example ```\"monthly\"```\n\t */\n\tfrequency?: string | null\n\n\torder: OrderRel\n\titem?: SkuRel | BundleRel | GiftCardRel | ShipmentRel | PaymentMethodRel | AdjustmentRel | DiscountEngineItemRel | PercentageDiscountPromotionRel | FreeShippingPromotionRel | BuyXPayYPromotionRel | FreeGiftPromotionRel | FixedPricePromotionRel | ExternalPromotionRel | FixedAmountPromotionRel | FlexPromotionRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\ninterface LineItemUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The code of the associated SKU.\n\t * @example ```\"TSHIRTMM000000FFFFFFXLXX\"```\n\t */\n\tsku_code?: string | null\n\t/** \n\t * The code of the associated bundle.\n\t * @example ```\"BUNDLEMM000000FFFFFFXLXX\"```\n\t */\n\tbundle_code?: string | null\n\t/** \n\t * The line item quantity.\n\t * @example ```4```\n\t */\n\tquantity?: number | null\n\t/** \n\t * When creating or updating a new line item, set this attribute to '1' if you want to inject the unit_amount_cents price from an external source. Any successive price computation will be done externally, until the attribute is reset to '0'.\n\t * @example ```true```\n\t */\n\t_external_price?: boolean | null\n\t/** \n\t * Send this attribute if you want to reserve the stock for the line item's SKUs quantity. Stock reservations expiration depends on the inventory model's cutoff. When used on update the existing active stock reservations are renewed. Cannot be passed by sales channels.\n\t * @example ```true```\n\t */\n\t_reserve_stock?: boolean | null\n\t/** \n\t * Send this attribute if you want to reset the quantity restocked by a return or by an order/shipment cancel. This will allow for multiple returns, albeit you need to adjust the stock manually. Cannot be passed by sales channels.\n\t * @example ```true```\n\t */\n\t_reset_restocked_quantity?: boolean | null\n\t/** \n\t * The unit amount of the line item, in cents. Can be specified only via an integration application, or when the item is missing, otherwise is automatically computed by using one of the available methods. Cannot be passed by sales channels.\n\t * @example ```10000```\n\t */\n\tunit_amount_cents?: number | null\n\t/** \n\t * The compared price amount, in cents. Useful to display a percentage discount.\n\t * @example ```13000```\n\t */\n\tcompare_at_amount_cents?: number | null\n\t/** \n\t * The options amount of the line item, in cents. Cannot be passed by sales channels.\n\t * @example ```1000```\n\t */\n\toptions_amount_cents?: number | null\n\t/** \n\t * The name of the line item. When blank, it gets populated with the name of the associated item (if present).\n\t * @example ```\"Men's Black T-shirt with White Logo (XL)\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The image_url of the line item. When blank, it gets populated with the image_url of the associated item (if present, SKU only).\n\t * @example ```\"https://img.yourdomain.com/skus/xYZkjABcde.png\"```\n\t */\n\timage_url?: string | null\n\t/** \n\t * The frequency which generates a subscription. Must be supported by existing associated subscription_model.\n\t * @example ```\"monthly\"```\n\t */\n\tfrequency?: string | null\n\t/** \n\t * Send this attribute if you want to reset the circuit breaker associated to this resource to 'closed' state and zero failures count. Cannot be passed by sales channels.\n\t * @example ```true```\n\t */\n\t_reset_circuit?: boolean | null\n\t/** \n\t * Comma separated list of tags to be added. Duplicates, invalid and non existing ones are discarded. Cannot be passed by sales channels.\n\t */\n\t_add_tags?: string | null\n\t/** \n\t * Comma separated list of tags to be removed. Duplicates, invalid and non existing ones are discarded. Cannot be passed by sales channels.\n\t */\n\t_remove_tags?: string | null\n\n\ttags?: TagRel[] | null\n\n}\n\n\nclass LineItems extends ApiResource<LineItem> {\n\n\tstatic readonly TYPE: LineItemType = 'line_items' as const\n\n\tasync create(resource: LineItemCreate, params?: QueryParamsRetrieve<LineItem>, options?: ResourcesConfig): Promise<LineItem> {\n\t\treturn this.resources.create<LineItemCreate, LineItem>({ ...resource, type: LineItems.TYPE }, params, options)\n\t}\n\n\tasync update(resource: LineItemUpdate, params?: QueryParamsRetrieve<LineItem>, options?: ResourcesConfig): Promise<LineItem> {\n\t\treturn this.resources.update<LineItemUpdate, LineItem>({ ...resource, type: LineItems.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: LineItems.TYPE } : id, options)\n\t}\n\n\tasync order(lineItemId: string | LineItem, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _lineItemId = (lineItemId as LineItem).id || lineItemId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `line_items/${_lineItemId}/order`, params, options) as unknown as Order\n\t}\n\n\tasync line_item_options(lineItemId: string | LineItem, params?: QueryParamsList<LineItemOption>, options?: ResourcesConfig): Promise<ListResponse<LineItemOption>> {\n\t\tconst _lineItemId = (lineItemId as LineItem).id || lineItemId as string\n\t\treturn this.resources.fetch<LineItemOption>({ type: 'line_item_options' }, `line_items/${_lineItemId}/line_item_options`, params, options) as unknown as ListResponse<LineItemOption>\n\t}\n\n\tasync return_line_items(lineItemId: string | LineItem, params?: QueryParamsList<ReturnLineItem>, options?: ResourcesConfig): Promise<ListResponse<ReturnLineItem>> {\n\t\tconst _lineItemId = (lineItemId as LineItem).id || lineItemId as string\n\t\treturn this.resources.fetch<ReturnLineItem>({ type: 'return_line_items' }, `line_items/${_lineItemId}/return_line_items`, params, options) as unknown as ListResponse<ReturnLineItem>\n\t}\n\n\tasync stock_reservations(lineItemId: string | LineItem, params?: QueryParamsList<StockReservation>, options?: ResourcesConfig): Promise<ListResponse<StockReservation>> {\n\t\tconst _lineItemId = (lineItemId as LineItem).id || lineItemId as string\n\t\treturn this.resources.fetch<StockReservation>({ type: 'stock_reservations' }, `line_items/${_lineItemId}/stock_reservations`, params, options) as unknown as ListResponse<StockReservation>\n\t}\n\n\tasync stock_line_items(lineItemId: string | LineItem, params?: QueryParamsList<StockLineItem>, options?: ResourcesConfig): Promise<ListResponse<StockLineItem>> {\n\t\tconst _lineItemId = (lineItemId as LineItem).id || lineItemId as string\n\t\treturn this.resources.fetch<StockLineItem>({ type: 'stock_line_items' }, `line_items/${_lineItemId}/stock_line_items`, params, options) as unknown as ListResponse<StockLineItem>\n\t}\n\n\tasync stock_transfers(lineItemId: string | LineItem, params?: QueryParamsList<StockTransfer>, options?: ResourcesConfig): Promise<ListResponse<StockTransfer>> {\n\t\tconst _lineItemId = (lineItemId as LineItem).id || lineItemId as string\n\t\treturn this.resources.fetch<StockTransfer>({ type: 'stock_transfers' }, `line_items/${_lineItemId}/stock_transfers`, params, options) as unknown as ListResponse<StockTransfer>\n\t}\n\n\tasync notifications(lineItemId: string | LineItem, params?: QueryParamsList<Notification>, options?: ResourcesConfig): Promise<ListResponse<Notification>> {\n\t\tconst _lineItemId = (lineItemId as LineItem).id || lineItemId as string\n\t\treturn this.resources.fetch<Notification>({ type: 'notifications' }, `line_items/${_lineItemId}/notifications`, params, options) as unknown as ListResponse<Notification>\n\t}\n\n\tasync events(lineItemId: string | LineItem, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _lineItemId = (lineItemId as LineItem).id || lineItemId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `line_items/${_lineItemId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync tags(lineItemId: string | LineItem, params?: QueryParamsList<Tag>, options?: ResourcesConfig): Promise<ListResponse<Tag>> {\n\t\tconst _lineItemId = (lineItemId as LineItem).id || lineItemId as string\n\t\treturn this.resources.fetch<Tag>({ type: 'tags' }, `line_items/${_lineItemId}/tags`, params, options) as unknown as ListResponse<Tag>\n\t}\n\n\tasync event_stores(lineItemId: string | LineItem, params?: QueryParamsList<EventStore>, options?: ResourcesConfig): Promise<ListResponse<EventStore>> {\n\t\tconst _lineItemId = (lineItemId as LineItem).id || lineItemId as string\n\t\treturn this.resources.fetch<EventStore>({ type: 'event_stores' }, `line_items/${_lineItemId}/event_stores`, params, options) as unknown as ListResponse<EventStore>\n\t}\n\n\tasync _external_price(id: string | LineItem, params?: QueryParamsRetrieve<LineItem>, options?: ResourcesConfig): Promise<LineItem> {\n\t\treturn this.resources.update<LineItemUpdate, LineItem>({ id: (typeof id === 'string')? id: id.id, type: LineItems.TYPE, _external_price: true }, params, options)\n\t}\n\n\tasync _reserve_stock(id: string | LineItem, params?: QueryParamsRetrieve<LineItem>, options?: ResourcesConfig): Promise<LineItem> {\n\t\treturn this.resources.update<LineItemUpdate, LineItem>({ id: (typeof id === 'string')? id: id.id, type: LineItems.TYPE, _reserve_stock: true }, params, options)\n\t}\n\n\tasync _reset_restocked_quantity(id: string | LineItem, params?: QueryParamsRetrieve<LineItem>, options?: ResourcesConfig): Promise<LineItem> {\n\t\treturn this.resources.update<LineItemUpdate, LineItem>({ id: (typeof id === 'string')? id: id.id, type: LineItems.TYPE, _reset_restocked_quantity: true }, params, options)\n\t}\n\n\tasync _reset_circuit(id: string | LineItem, params?: QueryParamsRetrieve<LineItem>, options?: ResourcesConfig): Promise<LineItem> {\n\t\treturn this.resources.update<LineItemUpdate, LineItem>({ id: (typeof id === 'string')? id: id.id, type: LineItems.TYPE, _reset_circuit: true }, params, options)\n\t}\n\n\tasync _add_tags(id: string | LineItem, triggerValue: string, params?: QueryParamsRetrieve<LineItem>, options?: ResourcesConfig): Promise<LineItem> {\n\t\treturn this.resources.update<LineItemUpdate, LineItem>({ id: (typeof id === 'string')? id: id.id, type: LineItems.TYPE, _add_tags: triggerValue }, params, options)\n\t}\n\n\tasync _remove_tags(id: string | LineItem, triggerValue: string, params?: QueryParamsRetrieve<LineItem>, options?: ResourcesConfig): Promise<LineItem> {\n\t\treturn this.resources.update<LineItemUpdate, LineItem>({ id: (typeof id === 'string')? id: id.id, type: LineItems.TYPE, _remove_tags: triggerValue }, params, options)\n\t}\n\n\n\tisLineItem(resource: any): resource is LineItem {\n\t\treturn resource.type && (resource.type === LineItems.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): LineItemRel {\n\t\treturn super.relationshipOneToOne<LineItemRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): LineItemRel[] {\n\t\treturn super.relationshipOneToMany<LineItemRel>(...ids)\n\t}\n\n\n\ttype(): LineItemType {\n\t\treturn LineItems.TYPE\n\t}\n\n}\n\n\nconst instance = new LineItems()\nexport default instance\n\nexport type { LineItems, LineItem, LineItemCreate, LineItemUpdate, LineItemType }\n"]}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
'use strict';
|
2
2
|
|
3
|
-
var
|
3
|
+
var chunkTN2MXFJV_cjs = require('./chunk-TN2MXFJV.cjs');
|
4
4
|
var chunkSRW7OWVS_cjs = require('./chunk-SRW7OWVS.cjs');
|
5
5
|
var chunk7Z7FQA33_cjs = require('./chunk-7Z7FQA33.cjs');
|
6
6
|
var chunkIKHD5UQP_cjs = require('./chunk-IKHD5UQP.cjs');
|
@@ -41,10 +41,10 @@ var CommerceLayerStatic = {
|
|
41
41
|
return chunkSRW7OWVS_cjs.isTokenExpired(token);
|
42
42
|
},
|
43
43
|
get schemaVersion() {
|
44
|
-
return
|
44
|
+
return chunkTN2MXFJV_cjs.OPEN_API_SCHEMA_VERSION;
|
45
45
|
}
|
46
46
|
};
|
47
47
|
|
48
48
|
exports.CommerceLayerStatic = CommerceLayerStatic;
|
49
|
-
//# sourceMappingURL=chunk-
|
50
|
-
//# sourceMappingURL=chunk-
|
49
|
+
//# sourceMappingURL=chunk-7NKYU3IT.cjs.map
|
50
|
+
//# sourceMappingURL=chunk-7NKYU3IT.cjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/static.ts"],"names":["getResources","getSingletons","isSingleton","isCreatable","isUpdatable","isDeletable","isTaggable","isVersionable","isSdkError","isApiError","isTokenExpired","OPEN_API_SCHEMA_VERSION"],"mappings":";;;;;;;;AASO,IAAM,mBAAA,GAAsB;AAAA,EAElC,SAAA,EAAW,CAAC,IAAA,KAAsC;AACjD,IAAA,OAAOA,+BAAa,IAAI,CAAA;AAAA,EACzB,CAAA;AAAA,EAEA,UAAA,EAAY,CAAC,IAAA,KAAsC;AAClD,IAAA,OAAOC,gCAAc,IAAI,CAAA;AAAA,EAC1B,CAAA;AAAA,EAEA,WAAA,EAAa,CAAC,QAAA,KAAwC;AACrD,IAAA,OAAOC,8BAAY,QAAQ,CAAA;AAAA,EAC5B,CAAA;AAAA,EAEA,WAAA,EAAa,CAAC,QAAA,KAAwC;AACrD,IAAA,OAAOC,8BAAY,QAAQ,CAAA;AAAA,EAC5B,CAAA;AAAA,EAEA,WAAA,EAAa,CAAC,QAAA,KAAwC;AACrD,IAAA,OAAOC,8BAAY,QAAQ,CAAA;AAAA,EAC5B,CAAA;AAAA,EAEA,WAAA,EAAa,CAAC,QAAA,KAAwC;AACrD,IAAA,OAAOC,8BAAY,QAAQ,CAAA;AAAA,EAC5B,CAAA;AAAA,EAEA,UAAA,EAAY,CAAC,QAAA,KAAwC;AACpD,IAAA,OAAOC,6BAAW,QAAQ,CAAA;AAAA,EAC3B,CAAA;AAAA,EAEA,aAAA,EAAe,CAAC,QAAA,KAAwC;AACvD,IAAA,OAAOC,gCAAc,QAAQ,CAAA;AAAA,EAC9B,CAAA;AAAA,EAEA,UAAA,EAAY,CAAC,KAAA,KAAsC;AAClD,IAAA,OAAOC,6BAAW,KAAK,CAAA;AAAA,EACxB,CAAA;AAAA,EAEA,UAAA,EAAY,CAAC,KAAA,KAAsC;AAClD,IAAA,OAAOC,6BAAW,KAAK,CAAA;AAAA,EACxB,CAAA;AAAA,EAEA,cAAA,EAAgB,CAAC,KAAA,KAA2B;AAC3C,IAAA,OAAOC,iCAAe,KAAK,CAAA;AAAA,EAC5B,CAAA;AAAA,EAEA,IAAI,aAAA,GAAwB;AAAE,IAAA,OAAOC,yCAAA;AAAA,EAAwB;AAE9D","file":"chunk-
|
1
|
+
{"version":3,"sources":["../src/static.ts"],"names":["getResources","getSingletons","isSingleton","isCreatable","isUpdatable","isDeletable","isTaggable","isVersionable","isSdkError","isApiError","isTokenExpired","OPEN_API_SCHEMA_VERSION"],"mappings":";;;;;;;;AASO,IAAM,mBAAA,GAAs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\nimport type { ResourceTypeLock } from './enum'\nimport { getResources, getSingletons, isCreatable, isDeletable, isSingleton, isTaggable, isUpdatable, isVersionable } from './enum'\nimport { OPEN_API_SCHEMA_VERSION } from './commercelayer'\nimport { type SdkError, type ApiError, isSdkError, isApiError} from './error'\nimport { isTokenExpired } from './util'\n\n\n/* Static functions */\nexport const CommerceLayerStatic = {\n\n\tresources: (sort?: boolean): readonly string[] => {\n\t\treturn getResources(sort)\n\t},\n\n\tsingletons: (sort?: boolean): readonly string[] => {\n\t\treturn getSingletons(sort)\n\t},\n\n\tisSingleton: (resource: ResourceTypeLock): boolean => {\n\t\treturn isSingleton(resource)\n\t},\n\n\tisCreatable: (resource: ResourceTypeLock): boolean => {\n\t\treturn isCreatable(resource)\n\t},\n\n\tisUpdatable: (resource: ResourceTypeLock): boolean => {\n\t\treturn isUpdatable(resource)\n\t},\n\n\tisDeletable: (resource: ResourceTypeLock): boolean => {\n\t\treturn isDeletable(resource)\n\t},\n\n\tisTaggable: (resource: ResourceTypeLock): boolean => {\n\t\treturn isTaggable(resource)\n\t},\n\n\tisVersionable: (resource: ResourceTypeLock): boolean => {\n\t\treturn isVersionable(resource)\n\t},\n\n\tisSdkError: (error: unknown): error is SdkError => {\n\t\treturn isSdkError(error)\n\t},\n\n\tisApiError: (error: unknown): error is ApiError => {\n\t\treturn isApiError(error)\n\t},\n\n\tisTokenExpired: (token: string): boolean => {\n\t\treturn isTokenExpired(token)\n\t},\n\n\tget schemaVersion(): string { return OPEN_API_SCHEMA_VERSION }\n\n}\n"]}
|
@@ -5,7 +5,7 @@ import { debug_default } from './chunk-XD7GS4QW.js';
|
|
5
5
|
|
6
6
|
// src/commercelayer.ts
|
7
7
|
var debug = debug_default("commercelayer");
|
8
|
-
var OPEN_API_SCHEMA_VERSION = "7.9.
|
8
|
+
var OPEN_API_SCHEMA_VERSION = "7.9.8";
|
9
9
|
var CommerceLayerClient = class _CommerceLayerClient {
|
10
10
|
openApiSchemaVersion = OPEN_API_SCHEMA_VERSION;
|
11
11
|
static cl;
|
@@ -98,5 +98,5 @@ var CommerceLayer = (config) => {
|
|
98
98
|
var commercelayer_default = CommerceLayer;
|
99
99
|
|
100
100
|
export { CommerceLayer, CommerceLayerClient, OPEN_API_SCHEMA_VERSION, commercelayer_default };
|
101
|
-
//# sourceMappingURL=chunk-
|
102
|
-
//# sourceMappingURL=chunk-
|
101
|
+
//# sourceMappingURL=chunk-CB4HWBPX.js.map
|
102
|
+
//# sourceMappingURL=chunk-CB4HWBPX.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/commercelayer.ts"],"names":[],"mappings":";;;;;;AASA,IAAM,KAAA,GAAQ,cAAM,eAAe,CAAA;AAI5B,IAAM,uBAAA,GAA0B;AAavC,IAAM,mBAAA,GAAN,MAAM,oBAAA,CAAoB;AAAA,EAEhB,oBAAA,GAAuB,uBAAA;AAAA,EAEhC,OAAiB,EAAA;AAAA;AAAA;AAAA;AAAA,EAQjB,OAAO,IAAK,MAAA,EAAuD;AAClE,IAAA,IAAI,QAAQ,OAAQ,oBAAA,CAAoB,EAAA,GAAK,IAAI,qBAAoB,MAAM,CAAA;AAAA,SAAA,IAEvE,CAAC,oBAAA,CAAoB,EAAA,EAAI,MAAM,IAAI,MAAM,sCAAsC,CAAA;AACnF,IAAA,OAAO,oBAAA,CAAoB,EAAA;AAAA,EAC5B;AAAA,EAGU,YAAY,MAAA,EAAiC;AAEtD,IAAA,KAAA,CAAM,iCAAiC,MAAM,CAAA;AAE7C,IAAA,kBAAA,CAAmB,KAAK,MAAM,CAAA;AAAA,EAM/B;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,IAAI,mBAAA,GAA8B;AAAE,IAAA,OAAO,kBAAA,CAAmB,GAAA,EAAI,CAAE,MAAA,EAAQ,mBAAA;AAAA,EAAoB;AAAA,EAChG,IAAI,kBAAA,GAA6B;AAAE,IAAA,OAAO,kBAAA,CAAmB,GAAA,EAAI,CAAE,MAAA,EAAQ,kBAAA;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;AAAA,QAAM,CAAC,CAAA;AAC5D,QAAA,MAAA,CAAO,OAAA,GAAU,EAAA;AAAA,MAClB;AACA,MAAA,OAAO,QAAA;AAAA,IACR;AAEyB,IAAA,IAAA,CAAK,aAAa,SAAA,GAAY,EAAE,SAAA,EAAW,sBAAA,EAAwB,WAAW,sBAAA,EAAuB;AAC9H,IAAA,MAAA,CAAO,EAAA,GAAK,CAAA;AAEZ,IAAA,OAAO,MAAA;AAAA,EAER;AAAA,EAEA,uBAAA,GAAwE;AAKvE,IAAA,IAAA,CAAK,aAAa,SAAA,GAAY,MAAA;AAAA,EAC/B;AAED;AAIA,IAAM,aAAA,GAAgB,CAAC,MAAA,KAAyD;AAC/E,EAAA,OAAO,mBAAA,CAAoB,IAAI,MAAM,CAAA;AACtC;AAGA,IAAO,qBAAA,GAAQ","file":"chunk-CB4HWBPX.js","sourcesContent":["\n// import * as api from './api'\nimport { getResources } from './enum'\nimport { isApiError, type ApiError } from './error'\nimport type { ErrorInterceptor, InterceptorType, RawResponseReader, RequestInterceptor, ResponseInterceptor, ResponseObj, HeadersObj, InterceptorManager } from './interceptor'\nimport { ApiResourceAdapter, type ResourcesInitConfig } from './resource'\n\n\nimport Debug from './debug'\nconst debug = Debug('commercelayer')\n\n\n// Autogenerated version number, do not remove this line\nexport const OPEN_API_SCHEMA_VERSION = '7.9.8'\n\n\n// SDK local configuration\ntype SdkConfig = {\n\t// abc?: string\n}\n\ntype CommerceLayerInitConfig = SdkConfig & ResourcesInitConfig\ntype CommerceLayerConfig = Partial<CommerceLayerInitConfig>\n\n\n\nclass CommerceLayerClient {\n\n\treadonly openApiSchemaVersion = OPEN_API_SCHEMA_VERSION\n\n\tprotected static cl: CommerceLayerClient\n\n\t// ##__CL_RESOURCES_DEF_START__##\n\t// ##__CL_RESOURCES_DEF_TEMPLATE:: ##__TAB__#####__RESOURCE_TYPE__##?: api.##__RESOURCE_CLASS__##\n\n\t// ##__CL_RESOURCES_DEF_STOP__##\n\n\n\tstatic get (config?: CommerceLayerInitConfig): CommerceLayerClient {\n\t\tif (config) return (CommerceLayerClient.cl = new CommerceLayerClient(config))\n\t\telse\n\t\tif (!CommerceLayerClient.cl) throw new Error('CommerceLayer client not initialized')\n\t\treturn CommerceLayerClient.cl\n\t}\n\n\n\tprotected constructor(config: CommerceLayerInitConfig) {\n\n\t\tdebug('new commercelayer instance %O', config)\n\n\t\tApiResourceAdapter.init(config)\n\n\t\t// ##__CL_RESOURCES_INIT_START__##\n\t\t// ##__CL_RESOURCES_INIT_TEMPLATE:: ##__TAB__####__TAB__##this.##__RESOURCE_TYPE__## = new api.##__RESOURCE_CLASS__##(this.#adapter)\n\t\t// ##__CL_RESOURCES_INIT_STOP__##\n\n\t}\n\n\t// ##__CL_RESOURCES_LEAZY_LOADING_START__##\n\t// ##__CL_RESOURCES_LEAZY_LOADING_TEMPLATE:: ##__TAB__##get ##__RESOURCE_TYPE__##(): api.##__RESOURCE_CLASS__## { return this.###__RESOURCE_TYPE__## || (this.###__RESOURCE_TYPE__## = new api.##__RESOURCE_CLASS__##(this.#adapter)) }\n\n\t// ##__CL_RESOURCES_LEAZY_LOADING_STOP__##\n\n\t// private get adapter(): ResourceAdapter { return ApiResourceAdapter.get() }\n\tget currentOrganization(): string { return ApiResourceAdapter.get().client?.currentOrganization }\n\tget currentAccessToken(): string { return ApiResourceAdapter.get().client?.currentAccessToken }\n\tprivate get interceptors(): InterceptorManager { return ApiResourceAdapter.get().client?.interceptors }\n\n\n\tprivate localConfig(config: Partial<SdkConfig>): void {\n\t\t// if (config.abc) this.abc = config.abc\n\t}\n\n\n\tconfig(config: CommerceLayerConfig): this {\n\n\t\tdebug('config %o', config)\n\n\t\t// CommerceLayer config\n\t\tthis.localConfig(config)\n\t\t// ResourceAdapter config\n\t\tApiResourceAdapter.config(config)\n\n\t\treturn this\n\n\t}\n\n\t\n\tresources(sort?: boolean): readonly string[] {\n\t\treturn getResources(sort)\n\t}\n\n\tisApiError(error: any): error is ApiError {\n\t\treturn isApiError(error)\n\t}\n\n\n\taddRequestInterceptor(onSuccess?: RequestInterceptor, onFailure?: ErrorInterceptor): number {\n\t\tthis.interceptors.request = { onSuccess, onFailure }\n\t\treturn 1\n\t}\n\n\taddResponseInterceptor(onSuccess?: ResponseInterceptor, onFailure?: ErrorInterceptor): number {\n\t\tthis.interceptors.response = { onSuccess, onFailure }\n\t\treturn 1\n\t}\n\n\tremoveInterceptor(type: InterceptorType, id: number = 1): void {\n\t\tthis.interceptors[type] = undefined\n\t}\n\n\tremoveInterceptors(): void {\n\t\tthis.removeInterceptor('request')\n\t\tthis.removeInterceptor('response')\n\t\tthis.removeRawResponseReader()\n\t}\n\n\taddRawResponseReader(options?: { headers: boolean }): RawResponseReader {\n\n\t\tconst reader: RawResponseReader = {\n\t\t\tid: 0,\n\t\t\trawResponse: undefined,\n\t\t\theaders: undefined,\n\t\t\tok: true\n\t\t}\n\n\t\tasync function rawResponseInterceptor(response: ResponseObj): Promise<ResponseObj> {\n\t\t\treader.rawResponse = await response?.clone().json().catch(() => {})\n\t\t\treader.ok = response.ok\n\t\t\tif (options?.headers) {\n\t\t\t\tconst ho: HeadersObj = {}\n\t\t\t\tresponse.headers.forEach((value, key) => { ho[key] = value })\n\t\t\t\treader.headers = ho\n\t\t\t}\n\t\t\treturn response\n\t\t}\n\t\t\n\t\t/* const interceptor = */this.interceptors.rawReader = { onSuccess: rawResponseInterceptor, onFailure: rawResponseInterceptor }\n\t\treader.id = 1 // interceptor\n\n\t\treturn reader\n\n\t}\n\n\tremoveRawResponseReader(/* reader: number | RawResponseReader */): void {\n\t\t/*\n\t\tconst id = (typeof reader === 'number') ? reader : reader?.id\n\t\tif (id && (id >= 0)) this.removeInterceptor('response', id)\n\t\t*/\n\t\tthis.interceptors.rawReader = undefined\n\t}\n\n}\n\n\n\nconst CommerceLayer = (config: CommerceLayerInitConfig): CommerceLayerClient => {\n\treturn CommerceLayerClient.get(config)\n}\n\n\nexport default CommerceLayer\nexport { CommerceLayer }\n\nexport { CommerceLayerClient }\nexport type { CommerceLayerConfig, CommerceLayerInitConfig }\n"]}
|
@@ -27,5 +27,5 @@ var instance = new Organizations();
|
|
27
27
|
var organizations_default = instance;
|
28
28
|
|
29
29
|
export { organizations_default };
|
30
|
-
//# sourceMappingURL=chunk-
|
31
|
-
//# sourceMappingURL=chunk-
|
30
|
+
//# sourceMappingURL=chunk-NQHQV4PY.js.map
|
31
|
+
//# sourceMappingURL=chunk-NQHQV4PY.js.map
|