@viu/emporix-sdk 2.13.1 → 2.14.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/CHANGELOG.md +8 -0
- package/README.md +1 -1
- package/dist/availability.cjs +3 -1
- package/dist/availability.cjs.map +1 -1
- package/dist/availability.d.cts +1 -1
- package/dist/availability.d.ts +1 -1
- package/dist/availability.js +2 -2
- package/dist/cart.cjs.map +1 -1
- package/dist/cart.d.cts +1 -1
- package/dist/cart.d.ts +1 -1
- package/dist/cart.js +2 -2
- package/dist/category.cjs +3 -1
- package/dist/category.cjs.map +1 -1
- package/dist/category.d.cts +1 -1
- package/dist/category.d.ts +1 -1
- package/dist/category.js +1 -1
- package/dist/checkout.cjs.map +1 -1
- package/dist/checkout.d.cts +1 -1
- package/dist/checkout.d.ts +1 -1
- package/dist/checkout.js +2 -2
- package/dist/{chunk-BFQ732VZ.js → chunk-3BDDYX3V.js} +3 -3
- package/dist/{chunk-BFQ732VZ.js.map → chunk-3BDDYX3V.js.map} +1 -1
- package/dist/{chunk-BK25FDTH.js → chunk-BDFOD7W3.js} +9 -5
- package/dist/chunk-BDFOD7W3.js.map +1 -0
- package/dist/{chunk-XMEP74BU.js → chunk-BPVMQFO4.js} +6 -4
- package/dist/chunk-BPVMQFO4.js.map +1 -0
- package/dist/{chunk-Z6PNI5VT.js → chunk-CR2JRH7T.js} +3 -3
- package/dist/{chunk-Z6PNI5VT.js.map → chunk-CR2JRH7T.js.map} +1 -1
- package/dist/{chunk-HKPZI7Y5.js → chunk-EINAVCV2.js} +3 -3
- package/dist/{chunk-HKPZI7Y5.js.map → chunk-EINAVCV2.js.map} +1 -1
- package/dist/{chunk-WSXRUYBE.js → chunk-FU5WQALW.js} +3 -3
- package/dist/{chunk-WSXRUYBE.js.map → chunk-FU5WQALW.js.map} +1 -1
- package/dist/{chunk-B4UOYJKW.js → chunk-MIUVJEGR.js} +8 -4
- package/dist/chunk-MIUVJEGR.js.map +1 -0
- package/dist/{chunk-I3YYGSN2.js → chunk-P3UHYMDH.js} +3 -3
- package/dist/{chunk-I3YYGSN2.js.map → chunk-P3UHYMDH.js.map} +1 -1
- package/dist/{chunk-TLH6SLAF.js → chunk-UOBOFCFU.js} +27 -34
- package/dist/chunk-UOBOFCFU.js.map +1 -0
- package/dist/{chunk-KTODT6DV.js → chunk-UWGGF4MC.js} +7 -3
- package/dist/chunk-UWGGF4MC.js.map +1 -0
- package/dist/{chunk-AUVJ5V47.js → chunk-WWCCB22A.js} +5 -3
- package/dist/chunk-WWCCB22A.js.map +1 -0
- package/dist/{chunk-OMYVOOSX.js → chunk-XG2TKFY5.js} +3 -3
- package/dist/{chunk-OMYVOOSX.js.map → chunk-XG2TKFY5.js.map} +1 -1
- package/dist/companies.d.cts +1 -1
- package/dist/companies.d.ts +1 -1
- package/dist/contacts.d.cts +1 -1
- package/dist/contacts.d.ts +1 -1
- package/dist/{context-CD7F_LHT.d.cts → context-DhoFgoKf.d.cts} +13 -0
- package/dist/{context-CD7F_LHT.d.ts → context-DhoFgoKf.d.ts} +13 -0
- package/dist/customer-groups.d.cts +1 -1
- package/dist/customer-groups.d.ts +1 -1
- package/dist/customer.cjs +23 -31
- package/dist/customer.cjs.map +1 -1
- package/dist/customer.d.cts +1 -1
- package/dist/customer.d.ts +1 -1
- package/dist/customer.js +3 -3
- package/dist/index.cjs +114 -50
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -3
- package/dist/index.d.ts +9 -3
- package/dist/index.js +90 -36
- package/dist/index.js.map +1 -1
- package/dist/locations.d.cts +1 -1
- package/dist/locations.d.ts +1 -1
- package/dist/media.cjs.map +1 -1
- package/dist/media.d.cts +1 -1
- package/dist/media.d.ts +1 -1
- package/dist/media.js +2 -2
- package/dist/orders.d.cts +1 -1
- package/dist/orders.d.ts +1 -1
- package/dist/payment.cjs.map +1 -1
- package/dist/payment.d.cts +1 -1
- package/dist/payment.d.ts +1 -1
- package/dist/payment.js +3 -3
- package/dist/price.cjs +6 -2
- package/dist/price.cjs.map +1 -1
- package/dist/price.d.cts +1 -1
- package/dist/price.d.ts +1 -1
- package/dist/price.js +2 -2
- package/dist/product.cjs +6 -2
- package/dist/product.cjs.map +1 -1
- package/dist/product.d.cts +1 -1
- package/dist/product.d.ts +1 -1
- package/dist/product.js +1 -1
- package/dist/segment.cjs.map +1 -1
- package/dist/segment.d.cts +1 -1
- package/dist/segment.d.ts +1 -1
- package/dist/segment.js +3 -3
- package/package.json +1 -1
- package/dist/chunk-AUVJ5V47.js.map +0 -1
- package/dist/chunk-B4UOYJKW.js.map +0 -1
- package/dist/chunk-BK25FDTH.js.map +0 -1
- package/dist/chunk-KTODT6DV.js.map +0 -1
- package/dist/chunk-TLH6SLAF.js.map +0 -1
- package/dist/chunk-XMEP74BU.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as ClientContext, b as AuthContext, P as PaginatedItems, T as TokenProvider, n as ResolvedConfig, E as EmporixConfig, j as LogLevel, o as ServiceName, e as CustomerTokenRefresher } from './context-
|
|
2
|
-
export { A as AnonymousSession, a as AnonymousSessionStore, c as AuthKind, d as CustomerRefreshRegistry, D as DEFAULT_HOST, f as DefaultTokenProvider, H as HttpClient, g as HttpClientOptions, L as LEVEL, h as LevelResolver, i as LogFields, k as Logger, l as LoggerConfig, m as LoggerObjectConfig, R as RequestOptions, S as ServiceCredentials, p as StorefrontCredentials, q as auth, r as createConsoleLogger, s as createNoopLogger, t as iterateAll, u as redact, v as resolveToken, w as validateConfig } from './context-
|
|
1
|
+
import { C as ClientContext, b as AuthContext, P as PaginatedItems, T as TokenProvider, n as ResolvedConfig, E as EmporixConfig, j as LogLevel, o as ServiceName, e as CustomerTokenRefresher } from './context-DhoFgoKf.cjs';
|
|
2
|
+
export { A as AnonymousSession, a as AnonymousSessionStore, c as AuthKind, d as CustomerRefreshRegistry, D as DEFAULT_HOST, f as DefaultTokenProvider, H as HttpClient, g as HttpClientOptions, L as LEVEL, h as LevelResolver, i as LogFields, k as Logger, l as LoggerConfig, m as LoggerObjectConfig, R as RequestOptions, S as ServiceCredentials, p as StorefrontCredentials, q as auth, r as createConsoleLogger, s as createNoopLogger, t as iterateAll, u as redact, v as resolveToken, w as validateConfig } from './context-DhoFgoKf.cjs';
|
|
3
3
|
import { CustomerService } from './customer.cjs';
|
|
4
4
|
export { Address, AddressCreateInput, AddressUpdateInput, Customer, CustomerSession, CustomerSignupInput, CustomerUpdateInput, PasswordChangeInput, PasswordResetConfirmInput, PasswordResetRequestInput } from './customer.cjs';
|
|
5
5
|
import { ProductService } from './product.cjs';
|
|
@@ -52,6 +52,12 @@ declare class EmporixValidationError extends EmporixError {
|
|
|
52
52
|
/** 5xx — server-side failure. */
|
|
53
53
|
declare class EmporixServerError extends EmporixError {
|
|
54
54
|
}
|
|
55
|
+
/** Request aborted by the configured connect/read timeout. No HTTP status. */
|
|
56
|
+
declare class EmporixTimeoutError extends EmporixError {
|
|
57
|
+
}
|
|
58
|
+
/** DNS/TLS/connection-level failure before or during the exchange. No HTTP status. */
|
|
59
|
+
declare class EmporixNetworkError extends EmporixError {
|
|
60
|
+
}
|
|
55
61
|
/**
|
|
56
62
|
* 403 with a `missing scope: <name>` hint in the body's `details` array.
|
|
57
63
|
* Subclasses {@link EmporixForbiddenError} so existing 403 catches still work.
|
|
@@ -7177,4 +7183,4 @@ declare class EmporixClient {
|
|
|
7177
7183
|
*/
|
|
7178
7184
|
declare function productIdFromYrn(yrn: string | undefined): string;
|
|
7179
7185
|
|
|
7180
|
-
export { type AddedPoints, type AdminCustomer, type AdminCustomerAddress, type AdminCustomerAddressInput, type AdminCustomerAddressList, type AdminCustomerAddressUpdate, type AdminCustomerCreated, type AdminCustomerInput, type AdminCustomerList, type AdminCustomerPatch, type AdminCustomerSearchQuery, type AdminCustomerUpdate, type Agent, type AgentInput, type AgentPatchOp, type AgentSearchQuery, AiService, type Approval, type ApprovalCreated, type ApprovalInput, type ApprovalList, type ApprovalPatch, type ApprovalPermittedInput, type ApprovalPermittedResult, ApprovalService, type ApprovalUsersQuery, type ApprovalUsersResult, type Assignee, AuthContext, AvailabilityService, type BatchNextIdEntry, type Brand, type BrandInput, type BrandList, BrandService, type BrandUpdate, CartService, type Catalog, type CatalogCreated, type CatalogInput, type CatalogList, type CatalogPatch, CatalogService, type CatalogUpdate, CategoryService, type CgRelation, type CgRelationList, type ChatRequest, type ChatResponse, CheckoutService, ClientConfigService, type ClientConfiguration, ClientContext, CloudFunctionsService, CompaniesService, type CompletionMessage, type CompletionRequest, type CompletionResponse, type Configuration$1 as Configuration, type ConfigurationDraft, ContactsService, type ConversionFactorInput, type ConversionFactorResult, type ConvertUnitInput, type ConvertUnitResult, type Country, type CountryList, CountryService, type CountryUpdate, type Coupon$1 as Coupon, type CouponCreated, type CouponInput, type CouponList, CouponService, type CouponUpdate, type Currency, type CurrencyCreated, type CurrencyInput, type CurrencyList, CurrencyService, type CurrencyUpdate, type CustomEntity, type CustomEntityDraft, type CustomInstance, type CustomInstanceDraft, CustomerAdminService, CustomerGroupsService, CustomerService, type CustomerSummaryBatch, CustomerTokenRefresher, type DeleteAgentOptions, type DeleteConfigOptions, type DeliveryCreated, type DeliveryCycleInput, type DeliverySlot, type DeliverySlotList, type DeliveryTime$1 as DeliveryTime, type DeliveryTimeInput, type DeliveryTimeList, type DeliveryTimeUpdate, type DeliveryWindow$2 as DeliveryWindow, type DeliveryWindowList, type DeliveryWindowValidation, EmporixAuthError, EmporixClient, EmporixConfig, EmporixError, EmporixForbiddenError, EmporixInsufficientScopeError, EmporixNotFoundError, EmporixServerError, EmporixValidationError, type ExchangeRate, type ExchangeRateCreated, type ExchangeRateInput, type ExchangeRateList, type ExchangeRateUpdate, type Fee$1 as Fee, type FeeDraft, FeeService, type FindSiteInput, type IndexConfig, type IndexConfigCreated, type IndexPublicConfig, IndexingService, type InstanceSearchBody, type InvokeCloudFunctionOptions, type ItemFee, type ItemFeeDraft, type ItemFeeSearch, type JobIdResponse, type Label, type LabelInput, type LabelList, LabelService, type LabelUpdate, type ListConfigOptions, type ListCustomEntitiesOptions, type ListFeesQuery, type ListInstancesQuery, type ListSchemasQuery, LocationsService, LogLevel, MediaService, type MetadataFilter, type MinimumFee, type NewPointsEntry, type NextIdCommandRequest, type NextIdOptions, type NextIdResponse, type NextIdsBatchRequest, type NextIdsBatchResponse, type OrderCycleList, type OrderEntryEventCreate, type OrderStatusChange, OrdersService, type PackagingProductsChange, type PackingEvent, type PackingEventList, PaginatedItems, PaymentGatewayService, type PickOrder, type PickOrderList, type PickPackAck, PickPackService, type PointsSummary, PriceService, ProductService, type QuoteInput, type QuoteResult, type QuoteSlotInput, RagIndexerService, type RagType, type RecalculationJob, type RecalculationJobCreated, type RecalculationJobInput, type RedeemCouponResult, type RedeemMyPointsInput, type RedeemOption, type RedeemOptionList, type RedeemedPoints, type Redemption, type RedemptionCreated, type RedemptionInput, type ReferralCoupon, type Region, type RegionList, type ReindexInput, ResolvedConfig, type ResourceCreated, type Return, type ReturnCreated, type ReturnInput, type ReturnList, type ReturnPatch, type ReturnUpdate, ReturnsService, RewardPointsService, SalesOrdersService, type Schema, type SchemaAttribute, type SchemaDraft, SchemaService, type SchemaTypeName, type SchemaUpdate, SegmentService, SepaExportService, type SepaJob, type SepaJobCreated, type SepaJobInput, type SequenceSchema, type SequenceSchemaCreate, SequentialIdService, ServiceName, type SessionContext, type SessionContextPatch, SessionContextService, type SetItemFeesOptions, type ShippingGroup, type ShippingGroupList, type ShippingMethod, type ShippingMethodList, type ShippingPatch, ShippingService, type ShoppingList, type ShoppingListDraft, type ShoppingListItem, ShoppingListService, type Site$1 as Site, type SiteList, SiteService, type TaxCalculationInput, type TaxCalculationRequest, type TaxCalculationResult, type TaxClass, type TaxConfig, type TaxConfigCreated, type TaxCreation as TaxConfigInput, type TaxUpdate as TaxConfigUpdate, type TaxLocation, TaxService, TenantConfigService, type TextRequest, type TextResponse, TokenProvider, type Unit, type UnitCreated, UnitHandlingService, type UnitInput, type UnitUpdate, type Vendor, type VendorCreated, type VendorInput, type VendorList, type VendorLocation, type VendorLocationInput, type VendorLocationList, type VendorLocationUpdate, type VendorSearchQuery, VendorService, type VendorUpdate, type WebhookConfig, type WebhookConfigCreated, type WebhookConfigDraft, type WebhookConfigPatch, type WebhookDashboardAccess, WebhookService, type WebhookStatistics, type WebhookStatisticsQuery, type WebhookSubscription, type WebhookSubscriptionUpdateItem, type WebhookSubscriptionUpdateResultItem, type Zone, type ZoneList, errorFromResponse, productIdFromYrn };
|
|
7186
|
+
export { type AddedPoints, type AdminCustomer, type AdminCustomerAddress, type AdminCustomerAddressInput, type AdminCustomerAddressList, type AdminCustomerAddressUpdate, type AdminCustomerCreated, type AdminCustomerInput, type AdminCustomerList, type AdminCustomerPatch, type AdminCustomerSearchQuery, type AdminCustomerUpdate, type Agent, type AgentInput, type AgentPatchOp, type AgentSearchQuery, AiService, type Approval, type ApprovalCreated, type ApprovalInput, type ApprovalList, type ApprovalPatch, type ApprovalPermittedInput, type ApprovalPermittedResult, ApprovalService, type ApprovalUsersQuery, type ApprovalUsersResult, type Assignee, AuthContext, AvailabilityService, type BatchNextIdEntry, type Brand, type BrandInput, type BrandList, BrandService, type BrandUpdate, CartService, type Catalog, type CatalogCreated, type CatalogInput, type CatalogList, type CatalogPatch, CatalogService, type CatalogUpdate, CategoryService, type CgRelation, type CgRelationList, type ChatRequest, type ChatResponse, CheckoutService, ClientConfigService, type ClientConfiguration, ClientContext, CloudFunctionsService, CompaniesService, type CompletionMessage, type CompletionRequest, type CompletionResponse, type Configuration$1 as Configuration, type ConfigurationDraft, ContactsService, type ConversionFactorInput, type ConversionFactorResult, type ConvertUnitInput, type ConvertUnitResult, type Country, type CountryList, CountryService, type CountryUpdate, type Coupon$1 as Coupon, type CouponCreated, type CouponInput, type CouponList, CouponService, type CouponUpdate, type Currency, type CurrencyCreated, type CurrencyInput, type CurrencyList, CurrencyService, type CurrencyUpdate, type CustomEntity, type CustomEntityDraft, type CustomInstance, type CustomInstanceDraft, CustomerAdminService, CustomerGroupsService, CustomerService, type CustomerSummaryBatch, CustomerTokenRefresher, type DeleteAgentOptions, type DeleteConfigOptions, type DeliveryCreated, type DeliveryCycleInput, type DeliverySlot, type DeliverySlotList, type DeliveryTime$1 as DeliveryTime, type DeliveryTimeInput, type DeliveryTimeList, type DeliveryTimeUpdate, type DeliveryWindow$2 as DeliveryWindow, type DeliveryWindowList, type DeliveryWindowValidation, EmporixAuthError, EmporixClient, EmporixConfig, EmporixError, EmporixForbiddenError, EmporixInsufficientScopeError, EmporixNetworkError, EmporixNotFoundError, EmporixServerError, EmporixTimeoutError, EmporixValidationError, type ExchangeRate, type ExchangeRateCreated, type ExchangeRateInput, type ExchangeRateList, type ExchangeRateUpdate, type Fee$1 as Fee, type FeeDraft, FeeService, type FindSiteInput, type IndexConfig, type IndexConfigCreated, type IndexPublicConfig, IndexingService, type InstanceSearchBody, type InvokeCloudFunctionOptions, type ItemFee, type ItemFeeDraft, type ItemFeeSearch, type JobIdResponse, type Label, type LabelInput, type LabelList, LabelService, type LabelUpdate, type ListConfigOptions, type ListCustomEntitiesOptions, type ListFeesQuery, type ListInstancesQuery, type ListSchemasQuery, LocationsService, LogLevel, MediaService, type MetadataFilter, type MinimumFee, type NewPointsEntry, type NextIdCommandRequest, type NextIdOptions, type NextIdResponse, type NextIdsBatchRequest, type NextIdsBatchResponse, type OrderCycleList, type OrderEntryEventCreate, type OrderStatusChange, OrdersService, type PackagingProductsChange, type PackingEvent, type PackingEventList, PaginatedItems, PaymentGatewayService, type PickOrder, type PickOrderList, type PickPackAck, PickPackService, type PointsSummary, PriceService, ProductService, type QuoteInput, type QuoteResult, type QuoteSlotInput, RagIndexerService, type RagType, type RecalculationJob, type RecalculationJobCreated, type RecalculationJobInput, type RedeemCouponResult, type RedeemMyPointsInput, type RedeemOption, type RedeemOptionList, type RedeemedPoints, type Redemption, type RedemptionCreated, type RedemptionInput, type ReferralCoupon, type Region, type RegionList, type ReindexInput, ResolvedConfig, type ResourceCreated, type Return, type ReturnCreated, type ReturnInput, type ReturnList, type ReturnPatch, type ReturnUpdate, ReturnsService, RewardPointsService, SalesOrdersService, type Schema, type SchemaAttribute, type SchemaDraft, SchemaService, type SchemaTypeName, type SchemaUpdate, SegmentService, SepaExportService, type SepaJob, type SepaJobCreated, type SepaJobInput, type SequenceSchema, type SequenceSchemaCreate, SequentialIdService, ServiceName, type SessionContext, type SessionContextPatch, SessionContextService, type SetItemFeesOptions, type ShippingGroup, type ShippingGroupList, type ShippingMethod, type ShippingMethodList, type ShippingPatch, ShippingService, type ShoppingList, type ShoppingListDraft, type ShoppingListItem, ShoppingListService, type Site$1 as Site, type SiteList, SiteService, type TaxCalculationInput, type TaxCalculationRequest, type TaxCalculationResult, type TaxClass, type TaxConfig, type TaxConfigCreated, type TaxCreation as TaxConfigInput, type TaxUpdate as TaxConfigUpdate, type TaxLocation, TaxService, TenantConfigService, type TextRequest, type TextResponse, TokenProvider, type Unit, type UnitCreated, UnitHandlingService, type UnitInput, type UnitUpdate, type Vendor, type VendorCreated, type VendorInput, type VendorList, type VendorLocation, type VendorLocationInput, type VendorLocationList, type VendorLocationUpdate, type VendorSearchQuery, VendorService, type VendorUpdate, type WebhookConfig, type WebhookConfigCreated, type WebhookConfigDraft, type WebhookConfigPatch, type WebhookDashboardAccess, WebhookService, type WebhookStatistics, type WebhookStatisticsQuery, type WebhookSubscription, type WebhookSubscriptionUpdateItem, type WebhookSubscriptionUpdateResultItem, type Zone, type ZoneList, errorFromResponse, productIdFromYrn };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as ClientContext, b as AuthContext, P as PaginatedItems, T as TokenProvider, n as ResolvedConfig, E as EmporixConfig, j as LogLevel, o as ServiceName, e as CustomerTokenRefresher } from './context-
|
|
2
|
-
export { A as AnonymousSession, a as AnonymousSessionStore, c as AuthKind, d as CustomerRefreshRegistry, D as DEFAULT_HOST, f as DefaultTokenProvider, H as HttpClient, g as HttpClientOptions, L as LEVEL, h as LevelResolver, i as LogFields, k as Logger, l as LoggerConfig, m as LoggerObjectConfig, R as RequestOptions, S as ServiceCredentials, p as StorefrontCredentials, q as auth, r as createConsoleLogger, s as createNoopLogger, t as iterateAll, u as redact, v as resolveToken, w as validateConfig } from './context-
|
|
1
|
+
import { C as ClientContext, b as AuthContext, P as PaginatedItems, T as TokenProvider, n as ResolvedConfig, E as EmporixConfig, j as LogLevel, o as ServiceName, e as CustomerTokenRefresher } from './context-DhoFgoKf.js';
|
|
2
|
+
export { A as AnonymousSession, a as AnonymousSessionStore, c as AuthKind, d as CustomerRefreshRegistry, D as DEFAULT_HOST, f as DefaultTokenProvider, H as HttpClient, g as HttpClientOptions, L as LEVEL, h as LevelResolver, i as LogFields, k as Logger, l as LoggerConfig, m as LoggerObjectConfig, R as RequestOptions, S as ServiceCredentials, p as StorefrontCredentials, q as auth, r as createConsoleLogger, s as createNoopLogger, t as iterateAll, u as redact, v as resolveToken, w as validateConfig } from './context-DhoFgoKf.js';
|
|
3
3
|
import { CustomerService } from './customer.js';
|
|
4
4
|
export { Address, AddressCreateInput, AddressUpdateInput, Customer, CustomerSession, CustomerSignupInput, CustomerUpdateInput, PasswordChangeInput, PasswordResetConfirmInput, PasswordResetRequestInput } from './customer.js';
|
|
5
5
|
import { ProductService } from './product.js';
|
|
@@ -52,6 +52,12 @@ declare class EmporixValidationError extends EmporixError {
|
|
|
52
52
|
/** 5xx — server-side failure. */
|
|
53
53
|
declare class EmporixServerError extends EmporixError {
|
|
54
54
|
}
|
|
55
|
+
/** Request aborted by the configured connect/read timeout. No HTTP status. */
|
|
56
|
+
declare class EmporixTimeoutError extends EmporixError {
|
|
57
|
+
}
|
|
58
|
+
/** DNS/TLS/connection-level failure before or during the exchange. No HTTP status. */
|
|
59
|
+
declare class EmporixNetworkError extends EmporixError {
|
|
60
|
+
}
|
|
55
61
|
/**
|
|
56
62
|
* 403 with a `missing scope: <name>` hint in the body's `details` array.
|
|
57
63
|
* Subclasses {@link EmporixForbiddenError} so existing 403 catches still work.
|
|
@@ -7177,4 +7183,4 @@ declare class EmporixClient {
|
|
|
7177
7183
|
*/
|
|
7178
7184
|
declare function productIdFromYrn(yrn: string | undefined): string;
|
|
7179
7185
|
|
|
7180
|
-
export { type AddedPoints, type AdminCustomer, type AdminCustomerAddress, type AdminCustomerAddressInput, type AdminCustomerAddressList, type AdminCustomerAddressUpdate, type AdminCustomerCreated, type AdminCustomerInput, type AdminCustomerList, type AdminCustomerPatch, type AdminCustomerSearchQuery, type AdminCustomerUpdate, type Agent, type AgentInput, type AgentPatchOp, type AgentSearchQuery, AiService, type Approval, type ApprovalCreated, type ApprovalInput, type ApprovalList, type ApprovalPatch, type ApprovalPermittedInput, type ApprovalPermittedResult, ApprovalService, type ApprovalUsersQuery, type ApprovalUsersResult, type Assignee, AuthContext, AvailabilityService, type BatchNextIdEntry, type Brand, type BrandInput, type BrandList, BrandService, type BrandUpdate, CartService, type Catalog, type CatalogCreated, type CatalogInput, type CatalogList, type CatalogPatch, CatalogService, type CatalogUpdate, CategoryService, type CgRelation, type CgRelationList, type ChatRequest, type ChatResponse, CheckoutService, ClientConfigService, type ClientConfiguration, ClientContext, CloudFunctionsService, CompaniesService, type CompletionMessage, type CompletionRequest, type CompletionResponse, type Configuration$1 as Configuration, type ConfigurationDraft, ContactsService, type ConversionFactorInput, type ConversionFactorResult, type ConvertUnitInput, type ConvertUnitResult, type Country, type CountryList, CountryService, type CountryUpdate, type Coupon$1 as Coupon, type CouponCreated, type CouponInput, type CouponList, CouponService, type CouponUpdate, type Currency, type CurrencyCreated, type CurrencyInput, type CurrencyList, CurrencyService, type CurrencyUpdate, type CustomEntity, type CustomEntityDraft, type CustomInstance, type CustomInstanceDraft, CustomerAdminService, CustomerGroupsService, CustomerService, type CustomerSummaryBatch, CustomerTokenRefresher, type DeleteAgentOptions, type DeleteConfigOptions, type DeliveryCreated, type DeliveryCycleInput, type DeliverySlot, type DeliverySlotList, type DeliveryTime$1 as DeliveryTime, type DeliveryTimeInput, type DeliveryTimeList, type DeliveryTimeUpdate, type DeliveryWindow$2 as DeliveryWindow, type DeliveryWindowList, type DeliveryWindowValidation, EmporixAuthError, EmporixClient, EmporixConfig, EmporixError, EmporixForbiddenError, EmporixInsufficientScopeError, EmporixNotFoundError, EmporixServerError, EmporixValidationError, type ExchangeRate, type ExchangeRateCreated, type ExchangeRateInput, type ExchangeRateList, type ExchangeRateUpdate, type Fee$1 as Fee, type FeeDraft, FeeService, type FindSiteInput, type IndexConfig, type IndexConfigCreated, type IndexPublicConfig, IndexingService, type InstanceSearchBody, type InvokeCloudFunctionOptions, type ItemFee, type ItemFeeDraft, type ItemFeeSearch, type JobIdResponse, type Label, type LabelInput, type LabelList, LabelService, type LabelUpdate, type ListConfigOptions, type ListCustomEntitiesOptions, type ListFeesQuery, type ListInstancesQuery, type ListSchemasQuery, LocationsService, LogLevel, MediaService, type MetadataFilter, type MinimumFee, type NewPointsEntry, type NextIdCommandRequest, type NextIdOptions, type NextIdResponse, type NextIdsBatchRequest, type NextIdsBatchResponse, type OrderCycleList, type OrderEntryEventCreate, type OrderStatusChange, OrdersService, type PackagingProductsChange, type PackingEvent, type PackingEventList, PaginatedItems, PaymentGatewayService, type PickOrder, type PickOrderList, type PickPackAck, PickPackService, type PointsSummary, PriceService, ProductService, type QuoteInput, type QuoteResult, type QuoteSlotInput, RagIndexerService, type RagType, type RecalculationJob, type RecalculationJobCreated, type RecalculationJobInput, type RedeemCouponResult, type RedeemMyPointsInput, type RedeemOption, type RedeemOptionList, type RedeemedPoints, type Redemption, type RedemptionCreated, type RedemptionInput, type ReferralCoupon, type Region, type RegionList, type ReindexInput, ResolvedConfig, type ResourceCreated, type Return, type ReturnCreated, type ReturnInput, type ReturnList, type ReturnPatch, type ReturnUpdate, ReturnsService, RewardPointsService, SalesOrdersService, type Schema, type SchemaAttribute, type SchemaDraft, SchemaService, type SchemaTypeName, type SchemaUpdate, SegmentService, SepaExportService, type SepaJob, type SepaJobCreated, type SepaJobInput, type SequenceSchema, type SequenceSchemaCreate, SequentialIdService, ServiceName, type SessionContext, type SessionContextPatch, SessionContextService, type SetItemFeesOptions, type ShippingGroup, type ShippingGroupList, type ShippingMethod, type ShippingMethodList, type ShippingPatch, ShippingService, type ShoppingList, type ShoppingListDraft, type ShoppingListItem, ShoppingListService, type Site$1 as Site, type SiteList, SiteService, type TaxCalculationInput, type TaxCalculationRequest, type TaxCalculationResult, type TaxClass, type TaxConfig, type TaxConfigCreated, type TaxCreation as TaxConfigInput, type TaxUpdate as TaxConfigUpdate, type TaxLocation, TaxService, TenantConfigService, type TextRequest, type TextResponse, TokenProvider, type Unit, type UnitCreated, UnitHandlingService, type UnitInput, type UnitUpdate, type Vendor, type VendorCreated, type VendorInput, type VendorList, type VendorLocation, type VendorLocationInput, type VendorLocationList, type VendorLocationUpdate, type VendorSearchQuery, VendorService, type VendorUpdate, type WebhookConfig, type WebhookConfigCreated, type WebhookConfigDraft, type WebhookConfigPatch, type WebhookDashboardAccess, WebhookService, type WebhookStatistics, type WebhookStatisticsQuery, type WebhookSubscription, type WebhookSubscriptionUpdateItem, type WebhookSubscriptionUpdateResultItem, type Zone, type ZoneList, errorFromResponse, productIdFromYrn };
|
|
7186
|
+
export { type AddedPoints, type AdminCustomer, type AdminCustomerAddress, type AdminCustomerAddressInput, type AdminCustomerAddressList, type AdminCustomerAddressUpdate, type AdminCustomerCreated, type AdminCustomerInput, type AdminCustomerList, type AdminCustomerPatch, type AdminCustomerSearchQuery, type AdminCustomerUpdate, type Agent, type AgentInput, type AgentPatchOp, type AgentSearchQuery, AiService, type Approval, type ApprovalCreated, type ApprovalInput, type ApprovalList, type ApprovalPatch, type ApprovalPermittedInput, type ApprovalPermittedResult, ApprovalService, type ApprovalUsersQuery, type ApprovalUsersResult, type Assignee, AuthContext, AvailabilityService, type BatchNextIdEntry, type Brand, type BrandInput, type BrandList, BrandService, type BrandUpdate, CartService, type Catalog, type CatalogCreated, type CatalogInput, type CatalogList, type CatalogPatch, CatalogService, type CatalogUpdate, CategoryService, type CgRelation, type CgRelationList, type ChatRequest, type ChatResponse, CheckoutService, ClientConfigService, type ClientConfiguration, ClientContext, CloudFunctionsService, CompaniesService, type CompletionMessage, type CompletionRequest, type CompletionResponse, type Configuration$1 as Configuration, type ConfigurationDraft, ContactsService, type ConversionFactorInput, type ConversionFactorResult, type ConvertUnitInput, type ConvertUnitResult, type Country, type CountryList, CountryService, type CountryUpdate, type Coupon$1 as Coupon, type CouponCreated, type CouponInput, type CouponList, CouponService, type CouponUpdate, type Currency, type CurrencyCreated, type CurrencyInput, type CurrencyList, CurrencyService, type CurrencyUpdate, type CustomEntity, type CustomEntityDraft, type CustomInstance, type CustomInstanceDraft, CustomerAdminService, CustomerGroupsService, CustomerService, type CustomerSummaryBatch, CustomerTokenRefresher, type DeleteAgentOptions, type DeleteConfigOptions, type DeliveryCreated, type DeliveryCycleInput, type DeliverySlot, type DeliverySlotList, type DeliveryTime$1 as DeliveryTime, type DeliveryTimeInput, type DeliveryTimeList, type DeliveryTimeUpdate, type DeliveryWindow$2 as DeliveryWindow, type DeliveryWindowList, type DeliveryWindowValidation, EmporixAuthError, EmporixClient, EmporixConfig, EmporixError, EmporixForbiddenError, EmporixInsufficientScopeError, EmporixNetworkError, EmporixNotFoundError, EmporixServerError, EmporixTimeoutError, EmporixValidationError, type ExchangeRate, type ExchangeRateCreated, type ExchangeRateInput, type ExchangeRateList, type ExchangeRateUpdate, type Fee$1 as Fee, type FeeDraft, FeeService, type FindSiteInput, type IndexConfig, type IndexConfigCreated, type IndexPublicConfig, IndexingService, type InstanceSearchBody, type InvokeCloudFunctionOptions, type ItemFee, type ItemFeeDraft, type ItemFeeSearch, type JobIdResponse, type Label, type LabelInput, type LabelList, LabelService, type LabelUpdate, type ListConfigOptions, type ListCustomEntitiesOptions, type ListFeesQuery, type ListInstancesQuery, type ListSchemasQuery, LocationsService, LogLevel, MediaService, type MetadataFilter, type MinimumFee, type NewPointsEntry, type NextIdCommandRequest, type NextIdOptions, type NextIdResponse, type NextIdsBatchRequest, type NextIdsBatchResponse, type OrderCycleList, type OrderEntryEventCreate, type OrderStatusChange, OrdersService, type PackagingProductsChange, type PackingEvent, type PackingEventList, PaginatedItems, PaymentGatewayService, type PickOrder, type PickOrderList, type PickPackAck, PickPackService, type PointsSummary, PriceService, ProductService, type QuoteInput, type QuoteResult, type QuoteSlotInput, RagIndexerService, type RagType, type RecalculationJob, type RecalculationJobCreated, type RecalculationJobInput, type RedeemCouponResult, type RedeemMyPointsInput, type RedeemOption, type RedeemOptionList, type RedeemedPoints, type Redemption, type RedemptionCreated, type RedemptionInput, type ReferralCoupon, type Region, type RegionList, type ReindexInput, ResolvedConfig, type ResourceCreated, type Return, type ReturnCreated, type ReturnInput, type ReturnList, type ReturnPatch, type ReturnUpdate, ReturnsService, RewardPointsService, SalesOrdersService, type Schema, type SchemaAttribute, type SchemaDraft, SchemaService, type SchemaTypeName, type SchemaUpdate, SegmentService, SepaExportService, type SepaJob, type SepaJobCreated, type SepaJobInput, type SequenceSchema, type SequenceSchemaCreate, SequentialIdService, ServiceName, type SessionContext, type SessionContextPatch, SessionContextService, type SetItemFeesOptions, type ShippingGroup, type ShippingGroupList, type ShippingMethod, type ShippingMethodList, type ShippingPatch, ShippingService, type ShoppingList, type ShoppingListDraft, type ShoppingListItem, ShoppingListService, type Site$1 as Site, type SiteList, SiteService, type TaxCalculationInput, type TaxCalculationRequest, type TaxCalculationResult, type TaxClass, type TaxConfig, type TaxConfigCreated, type TaxCreation as TaxConfigInput, type TaxUpdate as TaxConfigUpdate, type TaxLocation, TaxService, TenantConfigService, type TextRequest, type TextResponse, TokenProvider, type Unit, type UnitCreated, UnitHandlingService, type UnitInput, type UnitUpdate, type Vendor, type VendorCreated, type VendorInput, type VendorList, type VendorLocation, type VendorLocationInput, type VendorLocationList, type VendorLocationUpdate, type VendorSearchQuery, VendorService, type VendorUpdate, type WebhookConfig, type WebhookConfigCreated, type WebhookConfigDraft, type WebhookConfigPatch, type WebhookDashboardAccess, WebhookService, type WebhookStatistics, type WebhookStatisticsQuery, type WebhookSubscription, type WebhookSubscriptionUpdateItem, type WebhookSubscriptionUpdateResultItem, type Zone, type ZoneList, errorFromResponse, productIdFromYrn };
|
package/dist/index.js
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
import { LocationsService } from './chunk-LGLFJL3S.js';
|
|
2
2
|
export { LocationsService } from './chunk-LGLFJL3S.js';
|
|
3
|
-
import { MediaService } from './chunk-
|
|
4
|
-
export { MediaService } from './chunk-
|
|
3
|
+
import { MediaService } from './chunk-FU5WQALW.js';
|
|
4
|
+
export { MediaService } from './chunk-FU5WQALW.js';
|
|
5
5
|
import { OrdersService, SalesOrdersService } from './chunk-WW3H7VJ5.js';
|
|
6
6
|
export { OrdersService, SalesOrdersService } from './chunk-WW3H7VJ5.js';
|
|
7
|
-
import { PaymentGatewayService } from './chunk-
|
|
8
|
-
export { PaymentGatewayService } from './chunk-
|
|
9
|
-
import { PriceService } from './chunk-
|
|
10
|
-
export { PriceService } from './chunk-
|
|
11
|
-
import { ProductService } from './chunk-
|
|
12
|
-
export { ProductService } from './chunk-
|
|
13
|
-
import { SegmentService } from './chunk-
|
|
14
|
-
export { SegmentService } from './chunk-
|
|
15
|
-
import { AvailabilityService } from './chunk-
|
|
16
|
-
export { AvailabilityService } from './chunk-
|
|
17
|
-
import { CartService } from './chunk-
|
|
18
|
-
export { CartService } from './chunk-
|
|
19
|
-
import { CategoryService } from './chunk-
|
|
20
|
-
export { CategoryService } from './chunk-
|
|
7
|
+
import { PaymentGatewayService } from './chunk-EINAVCV2.js';
|
|
8
|
+
export { PaymentGatewayService } from './chunk-EINAVCV2.js';
|
|
9
|
+
import { PriceService } from './chunk-BDFOD7W3.js';
|
|
10
|
+
export { PriceService } from './chunk-BDFOD7W3.js';
|
|
11
|
+
import { ProductService } from './chunk-MIUVJEGR.js';
|
|
12
|
+
export { ProductService } from './chunk-MIUVJEGR.js';
|
|
13
|
+
import { SegmentService } from './chunk-CR2JRH7T.js';
|
|
14
|
+
export { SegmentService } from './chunk-CR2JRH7T.js';
|
|
15
|
+
import { AvailabilityService } from './chunk-BPVMQFO4.js';
|
|
16
|
+
export { AvailabilityService } from './chunk-BPVMQFO4.js';
|
|
17
|
+
import { CartService } from './chunk-P3UHYMDH.js';
|
|
18
|
+
export { CartService } from './chunk-P3UHYMDH.js';
|
|
19
|
+
import { CategoryService } from './chunk-WWCCB22A.js';
|
|
20
|
+
export { CategoryService } from './chunk-WWCCB22A.js';
|
|
21
21
|
export { iterateAll } from './chunk-GWJ2U2CP.js';
|
|
22
|
-
import { CheckoutService } from './chunk-
|
|
23
|
-
export { CheckoutService } from './chunk-
|
|
22
|
+
import { CheckoutService } from './chunk-XG2TKFY5.js';
|
|
23
|
+
export { CheckoutService } from './chunk-XG2TKFY5.js';
|
|
24
24
|
import { CompaniesService } from './chunk-MM6JF3Z7.js';
|
|
25
25
|
export { CompaniesService } from './chunk-MM6JF3Z7.js';
|
|
26
26
|
import { ContactsService } from './chunk-HAEVK6IS.js';
|
|
27
27
|
export { ContactsService } from './chunk-HAEVK6IS.js';
|
|
28
28
|
import { CustomerGroupsService } from './chunk-LGOC5XOI.js';
|
|
29
29
|
export { CustomerGroupsService } from './chunk-LGOC5XOI.js';
|
|
30
|
-
import { CustomerService } from './chunk-
|
|
31
|
-
export { CustomerService } from './chunk-
|
|
32
|
-
import './chunk-
|
|
33
|
-
import { EmporixAuthError, errorFromResponse, EmporixNotFoundError } from './chunk-
|
|
34
|
-
export { EmporixAuthError, EmporixError, EmporixForbiddenError, EmporixInsufficientScopeError, EmporixNotFoundError, EmporixServerError, EmporixValidationError, errorFromResponse } from './chunk-
|
|
30
|
+
import { CustomerService } from './chunk-UOBOFCFU.js';
|
|
31
|
+
export { CustomerService } from './chunk-UOBOFCFU.js';
|
|
32
|
+
import './chunk-3BDDYX3V.js';
|
|
33
|
+
import { EmporixAuthError, EmporixTimeoutError, EmporixNetworkError, errorFromResponse, EmporixNotFoundError } from './chunk-UWGGF4MC.js';
|
|
34
|
+
export { EmporixAuthError, EmporixError, EmporixForbiddenError, EmporixInsufficientScopeError, EmporixNetworkError, EmporixNotFoundError, EmporixServerError, EmporixTimeoutError, EmporixValidationError, errorFromResponse } from './chunk-UWGGF4MC.js';
|
|
35
35
|
|
|
36
36
|
// src/core/config.ts
|
|
37
37
|
var DEFAULT_HOST = "https://api.emporix.io";
|
|
@@ -407,6 +407,26 @@ var DefaultTokenProvider = class {
|
|
|
407
407
|
this.serviceLocks.set(set, p);
|
|
408
408
|
return p;
|
|
409
409
|
}
|
|
410
|
+
/**
|
|
411
|
+
* fetch with the configured read timeout. Token endpoints sit in front of
|
|
412
|
+
* single-flight locks — one hung call would otherwise block every request
|
|
413
|
+
* on this credential set forever.
|
|
414
|
+
*/
|
|
415
|
+
async boundedFetch(url, init = {}) {
|
|
416
|
+
const ms = this.cfg.timeouts?.readMs ?? 6e4;
|
|
417
|
+
const controller = new AbortController();
|
|
418
|
+
const timer = setTimeout(() => controller.abort(), ms);
|
|
419
|
+
try {
|
|
420
|
+
return await fetch(url, { ...init, signal: controller.signal });
|
|
421
|
+
} catch (err) {
|
|
422
|
+
if (err.name === "AbortError") {
|
|
423
|
+
throw new EmporixTimeoutError(`token request timed out after ${ms}ms`);
|
|
424
|
+
}
|
|
425
|
+
throw new EmporixNetworkError(`token request network failure: ${err.message}`);
|
|
426
|
+
} finally {
|
|
427
|
+
clearTimeout(timer);
|
|
428
|
+
}
|
|
429
|
+
}
|
|
410
430
|
async requestServiceToken(set) {
|
|
411
431
|
const c = this.creds(set);
|
|
412
432
|
const body = new URLSearchParams({
|
|
@@ -415,7 +435,7 @@ var DefaultTokenProvider = class {
|
|
|
415
435
|
client_secret: c.secret
|
|
416
436
|
});
|
|
417
437
|
if (c.scope) body.set("scope", c.scope);
|
|
418
|
-
const res = await
|
|
438
|
+
const res = await this.boundedFetch(`${this.cfg.host}/oauth/token`, {
|
|
419
439
|
method: "POST",
|
|
420
440
|
headers: { "Content-Type": "application/x-www-form-urlencoded" },
|
|
421
441
|
body
|
|
@@ -488,7 +508,7 @@ var DefaultTokenProvider = class {
|
|
|
488
508
|
url.searchParams.set("refresh_token", this.anon.refreshToken);
|
|
489
509
|
}
|
|
490
510
|
try {
|
|
491
|
-
const res = await
|
|
511
|
+
const res = await this.boundedFetch(url, { method: "GET" });
|
|
492
512
|
const json = await res.json().catch(() => ({}));
|
|
493
513
|
if (!res.ok) {
|
|
494
514
|
this.notifyRefresh("anonymous", false);
|
|
@@ -564,10 +584,18 @@ var HttpClient = class {
|
|
|
564
584
|
attempt
|
|
565
585
|
});
|
|
566
586
|
const controller = new AbortController();
|
|
567
|
-
const
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
587
|
+
const overallMs = o.timeoutMs ?? this.opts.timeouts.readMs;
|
|
588
|
+
const connectMs = Math.min(this.opts.timeouts.connectMs, overallMs);
|
|
589
|
+
const timeoutMsg = `${o.method} ${o.path} timed out after ${overallMs}ms (connect budget ${connectMs}ms)`;
|
|
590
|
+
let connectTimer;
|
|
591
|
+
let overallTimer;
|
|
592
|
+
const overallBudget = new Promise((_, reject) => {
|
|
593
|
+
overallTimer = setTimeout(() => {
|
|
594
|
+
controller.abort();
|
|
595
|
+
reject(new EmporixTimeoutError(timeoutMsg));
|
|
596
|
+
}, overallMs);
|
|
597
|
+
});
|
|
598
|
+
connectTimer = setTimeout(() => controller.abort(), connectMs);
|
|
571
599
|
const isFormData = typeof FormData !== "undefined" && o.body instanceof FormData;
|
|
572
600
|
const init = {
|
|
573
601
|
method: o.method,
|
|
@@ -578,12 +606,27 @@ var HttpClient = class {
|
|
|
578
606
|
init.body = isFormData ? o.body : JSON.stringify(o.body);
|
|
579
607
|
}
|
|
580
608
|
let res;
|
|
609
|
+
let text;
|
|
581
610
|
try {
|
|
582
|
-
res = await fetch(url, init);
|
|
611
|
+
res = await Promise.race([fetch(url, init), overallBudget]);
|
|
612
|
+
clearTimeout(connectTimer);
|
|
613
|
+
connectTimer = void 0;
|
|
614
|
+
const body = res.text();
|
|
615
|
+
body.catch(() => {
|
|
616
|
+
});
|
|
617
|
+
text = await Promise.race([body, overallBudget]);
|
|
618
|
+
} catch (err) {
|
|
619
|
+
if (err instanceof EmporixTimeoutError) throw err;
|
|
620
|
+
if (err.name === "AbortError") {
|
|
621
|
+
throw new EmporixTimeoutError(timeoutMsg);
|
|
622
|
+
}
|
|
623
|
+
throw new EmporixNetworkError(
|
|
624
|
+
`${o.method} ${o.path} network failure: ${err.message}`
|
|
625
|
+
);
|
|
583
626
|
} finally {
|
|
584
|
-
clearTimeout(
|
|
627
|
+
if (connectTimer !== void 0) clearTimeout(connectTimer);
|
|
628
|
+
if (overallTimer !== void 0) clearTimeout(overallTimer);
|
|
585
629
|
}
|
|
586
|
-
const text = await res.text();
|
|
587
630
|
const parsed = text ? safeJson(text) : void 0;
|
|
588
631
|
if (res.ok) {
|
|
589
632
|
log.debug("http ok", { status: res.status });
|
|
@@ -613,10 +656,12 @@ var HttpClient = class {
|
|
|
613
656
|
}
|
|
614
657
|
throw errorFromResponse(res.status, `${o.method} ${o.path} \u2192 401`, parsed);
|
|
615
658
|
}
|
|
616
|
-
const
|
|
659
|
+
const idempotent = o.method === "GET" || o.method === "PUT" || o.method === "DELETE" || o.idempotent === true;
|
|
660
|
+
const retryable = idempotent && (res.status >= 500 || res.status === 429);
|
|
617
661
|
if (retryable && attempt < maxAttempts) {
|
|
618
|
-
const
|
|
619
|
-
const
|
|
662
|
+
const retryAfterHeader = res.headers.get("Retry-After");
|
|
663
|
+
const retryAfter = retryAfterHeader ? Number(retryAfterHeader) : Number.NaN;
|
|
664
|
+
const backoff = Number.isFinite(retryAfter) && retryAfter >= 0 ? Math.min(retryAfter * 1e3, 8e3) : Math.min(1e3 * 2 ** (attempt - 1), 8e3) + Math.random() * 100;
|
|
620
665
|
log.warn("retryable failure", { status: res.status, attempt, backoffMs: backoff });
|
|
621
666
|
await this.sleep(backoff);
|
|
622
667
|
continue;
|
|
@@ -668,6 +713,15 @@ var HttpClient = class {
|
|
|
668
713
|
}
|
|
669
714
|
try {
|
|
670
715
|
return await fetch(url, init);
|
|
716
|
+
} catch (err) {
|
|
717
|
+
if (err.name === "AbortError") {
|
|
718
|
+
throw new EmporixTimeoutError(
|
|
719
|
+
`${o.method} ${o.path} timed out after ${o.timeoutMs ?? this.opts.timeouts.readMs}ms`
|
|
720
|
+
);
|
|
721
|
+
}
|
|
722
|
+
throw new EmporixNetworkError(
|
|
723
|
+
`${o.method} ${o.path} network failure: ${err.message}`
|
|
724
|
+
);
|
|
671
725
|
} finally {
|
|
672
726
|
clearTimeout(timer);
|
|
673
727
|
}
|
|
@@ -3480,7 +3534,7 @@ var ApprovalService = class {
|
|
|
3480
3534
|
};
|
|
3481
3535
|
|
|
3482
3536
|
// package.json
|
|
3483
|
-
var version = "2.
|
|
3537
|
+
var version = "2.14.0";
|
|
3484
3538
|
|
|
3485
3539
|
// src/version.ts
|
|
3486
3540
|
var SDK_VERSION = version;
|