@viu/emporix-sdk 4.3.1 → 4.4.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 +26 -0
- package/README.md +1 -0
- package/dist/availability.d.cts +1 -1
- package/dist/availability.d.ts +1 -1
- package/dist/cart.d.cts +1 -1
- package/dist/cart.d.ts +1 -1
- package/dist/category.cjs +3 -0
- package/dist/category.cjs.map +1 -1
- package/dist/category.d.cts +17 -11
- package/dist/category.d.ts +17 -11
- package/dist/category.js +1 -1
- package/dist/checkout.d.cts +1 -1
- package/dist/checkout.d.ts +1 -1
- package/dist/{chunk-2SHTDVOC.js → chunk-J2AN2FMK.js} +7 -2
- package/dist/chunk-J2AN2FMK.js.map +1 -0
- package/dist/{chunk-MSQ3GEIW.js → chunk-KJEBG7MP.js} +5 -2
- package/dist/chunk-KJEBG7MP.js.map +1 -0
- 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-5lt8Q0MT.d.ts → context-C-A10NL3.d.cts} +23 -0
- package/dist/{context-5lt8Q0MT.d.cts → context-C-A10NL3.d.ts} +23 -0
- package/dist/{customer-groups-8cgS8S5d.d.cts → customer-groups-C6jPLdvd.d.cts} +1 -1
- package/dist/{customer-groups-DizW_a-w.d.ts → customer-groups-E1fY1FR2.d.ts} +1 -1
- package/dist/customer-groups.d.cts +2 -2
- package/dist/customer-groups.d.ts +2 -2
- package/dist/customer.d.cts +1 -1
- package/dist/customer.d.ts +1 -1
- package/dist/index.cjs +16 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +12 -9
- package/dist/index.js.map +1 -1
- package/dist/locations.d.cts +1 -1
- package/dist/locations.d.ts +1 -1
- package/dist/media.d.cts +1 -1
- package/dist/media.d.ts +1 -1
- package/dist/orders.d.cts +1 -1
- package/dist/orders.d.ts +1 -1
- package/dist/payment.d.cts +1 -1
- package/dist/payment.d.ts +1 -1
- package/dist/price.d.cts +1 -1
- package/dist/price.d.ts +1 -1
- package/dist/product.cjs +5 -0
- package/dist/product.cjs.map +1 -1
- package/dist/product.d.cts +8 -2
- package/dist/product.d.ts +8 -2
- package/dist/product.js +1 -1
- package/dist/segment.d.cts +1 -1
- package/dist/segment.d.ts +1 -1
- package/package.json +1 -1
- package/dist/chunk-2SHTDVOC.js.map +0 -1
- package/dist/chunk-MSQ3GEIW.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { q as StoredAnonymousSession, b as AuthContext, C as ClientContext, P as PaginatedItems, T as TokenProvider, o as ResolvedConfig, E as EmporixConfig, k as LogLevel, p 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, h as HttpResult, L as LEVEL, i as LevelResolver, j as LogFields, l as Logger, m as LoggerConfig, n as LoggerObjectConfig, R as RequestOptions, S as ServiceCredentials, r as StorefrontCredentials, s as auth, t as createConsoleLogger, u as createNoopLogger, v as iterateAll, w as redact, x as resolveToken, y as validateConfig } from './context-
|
|
1
|
+
import { q as StoredAnonymousSession, b as AuthContext, C as ClientContext, P as PaginatedItems, T as TokenProvider, o as ResolvedConfig, E as EmporixConfig, k as LogLevel, p as ServiceName, e as CustomerTokenRefresher } from './context-C-A10NL3.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, h as HttpResult, L as LEVEL, i as LevelResolver, j as LogFields, l as Logger, m as LoggerConfig, n as LoggerObjectConfig, R as RequestOptions, S as ServiceCredentials, r as StorefrontCredentials, s as auth, t as createConsoleLogger, u as createNoopLogger, v as iterateAll, w as redact, x as resolveToken, y as validateConfig } from './context-C-A10NL3.cjs';
|
|
3
3
|
import { S as SearchPaging } from './search-DU6tE356.cjs';
|
|
4
4
|
import { CustomerService } from './customer.cjs';
|
|
5
5
|
export { Address, AddressCreateInput, AddressUpdateInput, ChangeEmailInput, ConfirmEmailChangeInput, Customer, CustomerSession, CustomerSignupInput, CustomerTokenValidation, CustomerUpdateInput, PasswordChangeInput, PasswordResetConfirmInput, PasswordResetRequestInput, ResendActivationInput } from './customer.cjs';
|
|
6
6
|
import { ProductService } from './product.cjs';
|
|
7
7
|
export { Media, Product, ProductBulkCreateInput, ProductBulkResult, ProductBulkUpdateInput, ProductCreateInput, ProductCreated, ProductPatchInput, ProductRecalculationInput, ProductRecalculationJob, ProductRecalculationJobStatus, ProductRecalculationResult, ProductTemplate, ProductTemplateCreateInput, ProductTemplateCreated, ProductTemplateUpdateInput, ProductUpdateInput, ProductWriteOptions } from './product.cjs';
|
|
8
8
|
import { CategoryService } from './category.cjs';
|
|
9
|
-
export { Category, CategoryAssignment, CategoryAssignmentBulkInput, CategoryAssignmentBulkResult, CategoryAssignmentCreated, CategoryAssignmentInput, CategoryAssignmentRefBulkInput, CategoryCreateInput, CategoryCreated, CategoryNode, CategoryPatchInput, CategoryTreeSearchInput, CategoryUpdateInput } from './category.cjs';
|
|
9
|
+
export { Category, CategoryAssignment, CategoryAssignmentBulkInput, CategoryAssignmentBulkResult, CategoryAssignmentCreated, CategoryAssignmentInput, CategoryAssignmentRefBulkInput, CategoryCreateInput, CategoryCreated, CategoryNode, CategoryPatchInput, CategoryTreeSearchInput, CategoryUpdateInput, CategoryWriteOptions } from './category.cjs';
|
|
10
10
|
import { CartService } from './cart.cjs';
|
|
11
11
|
export { Cart, CartAddress, CartCommand, CartCommandBodies, CartCommandResult, CartCreated, CartDeliveryRestrictions, CartDiscount, CartDiscountInput, CartExecuteOptions, CartExecuteResult, CartItem, CartItemBatchEntry, CartItemInput, CartItemUpdate, CartItemsBatchResponse, CartItemsBatchUpdateInput, CartItemsBatchUpdateResult, CartSearchInput, CartSummary, CartUpdateInput, CartValidationResult, CreateCartInput } from './cart.cjs';
|
|
12
12
|
import { CheckoutService } from './checkout.cjs';
|
|
@@ -23,7 +23,7 @@ import { CompaniesService } from './companies.cjs';
|
|
|
23
23
|
export { LegalEntitySearchInput } from './companies.cjs';
|
|
24
24
|
import { ContactsService } from './contacts.cjs';
|
|
25
25
|
import { LocationsService } from './locations.cjs';
|
|
26
|
-
import { m as UserResponse, U as UserCreateRequest, l as UserIdResponse, k as UserExtendedResponse, o as UserUpdateRequest, j as GroupsQueryDocument, n as UserScopesResponse, a as AccessControlQueryDocument, G as GroupCreateRequest, h as GroupIdResponse, i as GroupUpdateRequest, c as AssignmentCreateRequest, d as AssignmentIdResponse, b as AccessControlUpsertRequest, A as AccessControlIdResponse, e as CustomScopeQueryDocument, f as CustomScopeUpsertRequest, C as CustomScopeIdResponse, g as CustomerGroupsService } from './customer-groups-
|
|
26
|
+
import { m as UserResponse, U as UserCreateRequest, l as UserIdResponse, k as UserExtendedResponse, o as UserUpdateRequest, j as GroupsQueryDocument, n as UserScopesResponse, a as AccessControlQueryDocument, G as GroupCreateRequest, h as GroupIdResponse, i as GroupUpdateRequest, c as AssignmentCreateRequest, d as AssignmentIdResponse, b as AccessControlUpsertRequest, A as AccessControlIdResponse, e as CustomScopeQueryDocument, f as CustomScopeUpsertRequest, C as CustomScopeIdResponse, g as CustomerGroupsService } from './customer-groups-C6jPLdvd.cjs';
|
|
27
27
|
import { OrdersService, SalesOrdersService } from './orders.cjs';
|
|
28
28
|
export { GetOrderOptions, ListLegalEntityOrdersOptions, ListMyOrdersOptions, ListSalesOrdersOptions, Order, OrderEntry, OrderStatus, OrderTransitionOptions, SalesOrder, SalesOrderCalculationInput, SalesOrderCreateInput, SalesOrderCreated, SalesOrderEntriesInput, SalesOrderHistoricalTransitions, SalesOrderPatch, SalesOrderReplaceInput, SalesOrderSearchInput, SalesOrderSplitInput, SalesOrderSplitResult, Transition, UpdateSalesOrderOptions } from './orders.cjs';
|
|
29
29
|
import { AvailabilityService } from './availability.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { q as StoredAnonymousSession, b as AuthContext, C as ClientContext, P as PaginatedItems, T as TokenProvider, o as ResolvedConfig, E as EmporixConfig, k as LogLevel, p 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, h as HttpResult, L as LEVEL, i as LevelResolver, j as LogFields, l as Logger, m as LoggerConfig, n as LoggerObjectConfig, R as RequestOptions, S as ServiceCredentials, r as StorefrontCredentials, s as auth, t as createConsoleLogger, u as createNoopLogger, v as iterateAll, w as redact, x as resolveToken, y as validateConfig } from './context-
|
|
1
|
+
import { q as StoredAnonymousSession, b as AuthContext, C as ClientContext, P as PaginatedItems, T as TokenProvider, o as ResolvedConfig, E as EmporixConfig, k as LogLevel, p as ServiceName, e as CustomerTokenRefresher } from './context-C-A10NL3.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, h as HttpResult, L as LEVEL, i as LevelResolver, j as LogFields, l as Logger, m as LoggerConfig, n as LoggerObjectConfig, R as RequestOptions, S as ServiceCredentials, r as StorefrontCredentials, s as auth, t as createConsoleLogger, u as createNoopLogger, v as iterateAll, w as redact, x as resolveToken, y as validateConfig } from './context-C-A10NL3.js';
|
|
3
3
|
import { S as SearchPaging } from './search-DU6tE356.js';
|
|
4
4
|
import { CustomerService } from './customer.js';
|
|
5
5
|
export { Address, AddressCreateInput, AddressUpdateInput, ChangeEmailInput, ConfirmEmailChangeInput, Customer, CustomerSession, CustomerSignupInput, CustomerTokenValidation, CustomerUpdateInput, PasswordChangeInput, PasswordResetConfirmInput, PasswordResetRequestInput, ResendActivationInput } from './customer.js';
|
|
6
6
|
import { ProductService } from './product.js';
|
|
7
7
|
export { Media, Product, ProductBulkCreateInput, ProductBulkResult, ProductBulkUpdateInput, ProductCreateInput, ProductCreated, ProductPatchInput, ProductRecalculationInput, ProductRecalculationJob, ProductRecalculationJobStatus, ProductRecalculationResult, ProductTemplate, ProductTemplateCreateInput, ProductTemplateCreated, ProductTemplateUpdateInput, ProductUpdateInput, ProductWriteOptions } from './product.js';
|
|
8
8
|
import { CategoryService } from './category.js';
|
|
9
|
-
export { Category, CategoryAssignment, CategoryAssignmentBulkInput, CategoryAssignmentBulkResult, CategoryAssignmentCreated, CategoryAssignmentInput, CategoryAssignmentRefBulkInput, CategoryCreateInput, CategoryCreated, CategoryNode, CategoryPatchInput, CategoryTreeSearchInput, CategoryUpdateInput } from './category.js';
|
|
9
|
+
export { Category, CategoryAssignment, CategoryAssignmentBulkInput, CategoryAssignmentBulkResult, CategoryAssignmentCreated, CategoryAssignmentInput, CategoryAssignmentRefBulkInput, CategoryCreateInput, CategoryCreated, CategoryNode, CategoryPatchInput, CategoryTreeSearchInput, CategoryUpdateInput, CategoryWriteOptions } from './category.js';
|
|
10
10
|
import { CartService } from './cart.js';
|
|
11
11
|
export { Cart, CartAddress, CartCommand, CartCommandBodies, CartCommandResult, CartCreated, CartDeliveryRestrictions, CartDiscount, CartDiscountInput, CartExecuteOptions, CartExecuteResult, CartItem, CartItemBatchEntry, CartItemInput, CartItemUpdate, CartItemsBatchResponse, CartItemsBatchUpdateInput, CartItemsBatchUpdateResult, CartSearchInput, CartSummary, CartUpdateInput, CartValidationResult, CreateCartInput } from './cart.js';
|
|
12
12
|
import { CheckoutService } from './checkout.js';
|
|
@@ -23,7 +23,7 @@ import { CompaniesService } from './companies.js';
|
|
|
23
23
|
export { LegalEntitySearchInput } from './companies.js';
|
|
24
24
|
import { ContactsService } from './contacts.js';
|
|
25
25
|
import { LocationsService } from './locations.js';
|
|
26
|
-
import { m as UserResponse, U as UserCreateRequest, l as UserIdResponse, k as UserExtendedResponse, o as UserUpdateRequest, j as GroupsQueryDocument, n as UserScopesResponse, a as AccessControlQueryDocument, G as GroupCreateRequest, h as GroupIdResponse, i as GroupUpdateRequest, c as AssignmentCreateRequest, d as AssignmentIdResponse, b as AccessControlUpsertRequest, A as AccessControlIdResponse, e as CustomScopeQueryDocument, f as CustomScopeUpsertRequest, C as CustomScopeIdResponse, g as CustomerGroupsService } from './customer-groups-
|
|
26
|
+
import { m as UserResponse, U as UserCreateRequest, l as UserIdResponse, k as UserExtendedResponse, o as UserUpdateRequest, j as GroupsQueryDocument, n as UserScopesResponse, a as AccessControlQueryDocument, G as GroupCreateRequest, h as GroupIdResponse, i as GroupUpdateRequest, c as AssignmentCreateRequest, d as AssignmentIdResponse, b as AccessControlUpsertRequest, A as AccessControlIdResponse, e as CustomScopeQueryDocument, f as CustomScopeUpsertRequest, C as CustomScopeIdResponse, g as CustomerGroupsService } from './customer-groups-E1fY1FR2.js';
|
|
27
27
|
import { OrdersService, SalesOrdersService } from './orders.js';
|
|
28
28
|
export { GetOrderOptions, ListLegalEntityOrdersOptions, ListMyOrdersOptions, ListSalesOrdersOptions, Order, OrderEntry, OrderStatus, OrderTransitionOptions, SalesOrder, SalesOrderCalculationInput, SalesOrderCreateInput, SalesOrderCreated, SalesOrderEntriesInput, SalesOrderHistoricalTransitions, SalesOrderPatch, SalesOrderReplaceInput, SalesOrderSearchInput, SalesOrderSplitInput, SalesOrderSplitResult, Transition, UpdateSalesOrderOptions } from './orders.js';
|
|
29
29
|
import { AvailabilityService } from './availability.js';
|
package/dist/index.js
CHANGED
|
@@ -8,16 +8,16 @@ import { auth, resolveToken, DefaultTokenProvider, CustomerRefreshRegistry, Paym
|
|
|
8
8
|
export { CustomerRefreshRegistry, DefaultTokenProvider, PaymentGatewayService, auth, resolveToken } from './chunk-4VRUMCS2.js';
|
|
9
9
|
import { PriceService } from './chunk-K4KXT6NX.js';
|
|
10
10
|
export { PriceService } from './chunk-K4KXT6NX.js';
|
|
11
|
-
import { ProductService } from './chunk-
|
|
12
|
-
export { ProductService } from './chunk-
|
|
11
|
+
import { ProductService } from './chunk-J2AN2FMK.js';
|
|
12
|
+
export { ProductService } from './chunk-J2AN2FMK.js';
|
|
13
13
|
import { SegmentService } from './chunk-N2CE3J4M.js';
|
|
14
14
|
export { SegmentService } from './chunk-N2CE3J4M.js';
|
|
15
15
|
import { AvailabilityService } from './chunk-XQAOHHXL.js';
|
|
16
16
|
export { AvailabilityService } from './chunk-XQAOHHXL.js';
|
|
17
17
|
import { CartService } from './chunk-S2ERKGYL.js';
|
|
18
18
|
export { CartService } from './chunk-S2ERKGYL.js';
|
|
19
|
-
import { CategoryService } from './chunk-
|
|
20
|
-
export { CategoryService } from './chunk-
|
|
19
|
+
import { CategoryService } from './chunk-KJEBG7MP.js';
|
|
20
|
+
export { CategoryService } from './chunk-KJEBG7MP.js';
|
|
21
21
|
export { iterateAll } from './chunk-W6SLZNRX.js';
|
|
22
22
|
import { resolveQuery } from './chunk-S5HEIQDK.js';
|
|
23
23
|
export { resolveQuery } from './chunk-S5HEIQDK.js';
|
|
@@ -76,7 +76,8 @@ function validateConfig(input) {
|
|
|
76
76
|
maxLifetimeSeconds: input.cache?.maxLifetimeSeconds ?? 3600
|
|
77
77
|
},
|
|
78
78
|
logger: input.logger,
|
|
79
|
-
fetch: input.fetch
|
|
79
|
+
fetch: input.fetch,
|
|
80
|
+
contentLanguage: input.contentLanguage
|
|
80
81
|
};
|
|
81
82
|
}
|
|
82
83
|
|
|
@@ -689,10 +690,11 @@ var HttpClient = class {
|
|
|
689
690
|
buildHeaders(o, token, isFormData) {
|
|
690
691
|
return {
|
|
691
692
|
// Before `o.headers` on purpose: a caller may override the tenant for a
|
|
692
|
-
// single request, the way `Accept-Language` can be
|
|
693
|
-
// `Authorization` is non-negotiable.
|
|
693
|
+
// single request, the way `Accept-Language` and `Content-Language` can be
|
|
694
|
+
// overridden. Only `Authorization` is non-negotiable.
|
|
694
695
|
...this.opts.tenant !== void 0 ? { "Emporix-Tenant": this.opts.tenant } : {},
|
|
695
696
|
...this.opts.requestContext?.language ? { "Accept-Language": this.opts.requestContext.language } : {},
|
|
697
|
+
...this.opts.contentLanguage && o.body !== void 0 ? { "Content-Language": this.opts.contentLanguage } : {},
|
|
696
698
|
...o.headers ?? {},
|
|
697
699
|
Authorization: `Bearer ${token}`,
|
|
698
700
|
// JSON bodies: set Content-Type. FormData bodies: let `fetch`
|
|
@@ -946,7 +948,7 @@ var HttpClient = class {
|
|
|
946
948
|
};
|
|
947
949
|
|
|
948
950
|
// package.json
|
|
949
|
-
var version = "4.
|
|
951
|
+
var version = "4.4.0";
|
|
950
952
|
|
|
951
953
|
// src/version.ts
|
|
952
954
|
var SDK_VERSION = version;
|
|
@@ -989,7 +991,8 @@ function createCore(config) {
|
|
|
989
991
|
requestContext,
|
|
990
992
|
// exactOptionalPropertyTypes: `{ fetch: undefined }` is a type error
|
|
991
993
|
// against `fetch?: typeof globalThis.fetch`, so spread conditionally.
|
|
992
|
-
...cfg.fetch !== void 0 ? { fetch: cfg.fetch } : {}
|
|
994
|
+
...cfg.fetch !== void 0 ? { fetch: cfg.fetch } : {},
|
|
995
|
+
...cfg.contentLanguage !== void 0 ? { contentLanguage: cfg.contentLanguage } : {}
|
|
993
996
|
})
|
|
994
997
|
});
|
|
995
998
|
return {
|