@viu/emporix-sdk 2.4.0 → 2.6.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 +58 -0
- package/README.md +23 -3
- 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.d.cts +1 -1
- package/dist/category.d.ts +1 -1
- package/dist/checkout.d.cts +1 -1
- package/dist/checkout.d.ts +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-hksRbb95.d.cts → context-DJDTlhLW.d.cts} +31 -2
- package/dist/{context-hksRbb95.d.ts → context-DJDTlhLW.d.ts} +31 -2
- package/dist/customer-groups.d.cts +1 -1
- package/dist/customer-groups.d.ts +1 -1
- package/dist/customer.d.cts +1 -1
- package/dist/customer.d.ts +1 -1
- package/dist/index.cjs +497 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1927 -110
- package/dist/index.d.ts +1927 -110
- package/dist/index.js +492 -4
- 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.d.cts +1 -1
- package/dist/product.d.ts +1 -1
- package/dist/segment.d.cts +1 -1
- package/dist/segment.d.ts +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,63 @@
|
|
|
1
1
|
# @viu/emporix-sdk
|
|
2
2
|
|
|
3
|
+
## 2.6.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#92](https://github.com/viuteam/emporix-sdk/pull/92) [`45a2bd8`](https://github.com/viuteam/emporix-sdk/commit/45a2bd8d83cb46d775301790cb2efc60805efc90) Thanks [@amnael1](https://github.com/amnael1)! - Add opt-in reactive customer-token auto-refresh.
|
|
8
|
+
|
|
9
|
+
Core: `EmporixClient.setCustomerTokenRefresher(refresher)` registers a
|
|
10
|
+
single-flight `CustomerTokenRefresher`; on a `customer`-kind 401 the HTTP layer
|
|
11
|
+
refreshes once and retries. Off by default — the customer token stays
|
|
12
|
+
caller-owned.
|
|
13
|
+
|
|
14
|
+
React: `EmporixProvider` gains `autoRefreshCustomerToken` and
|
|
15
|
+
`onCustomerSessionExpired`. When enabled, a customer 401 is transparently
|
|
16
|
+
refreshed via the stored refresh token (anonymous-authorized
|
|
17
|
+
`GET /refreshauthtoken`) and the request is retried; B2B `legalEntityId` is
|
|
18
|
+
preserved.
|
|
19
|
+
|
|
20
|
+
## 2.5.0
|
|
21
|
+
|
|
22
|
+
### Minor Changes
|
|
23
|
+
|
|
24
|
+
- [#87](https://github.com/viuteam/emporix-sdk/pull/87) [`83f5797`](https://github.com/viuteam/emporix-sdk/commit/83f5797ed8f38b63d67b9d392c0410be7a75997b) Thanks [@amnael1](https://github.com/amnael1)! - Add Emporix Approval Service bindings for B2B cart/quote approval workflows.
|
|
25
|
+
|
|
26
|
+
Core `client.approvals` (`ApprovalService`): `listApprovals`, `getApproval`,
|
|
27
|
+
`createApproval`, `updateApproval` (JSON-Patch approve/reject), `deleteApproval`,
|
|
28
|
+
`checkPermitted`, and `searchApprovers`. Every endpoint is customer-token-only.
|
|
29
|
+
|
|
30
|
+
React: `useApprovals`, `useApproval`, `useCreateApproval`, and `useUpdateApproval`
|
|
31
|
+
(customer-only) for B2B approval self-service.
|
|
32
|
+
|
|
33
|
+
- [#83](https://github.com/viuteam/emporix-sdk/pull/83) [`1e473ad`](https://github.com/viuteam/emporix-sdk/commit/1e473ad0abe057450abcb777d0e29312cda37530) Thanks [@amnael1](https://github.com/amnael1)! - Add Emporix Catalog Management (`client.catalogs`) and Vendor Service
|
|
34
|
+
(`client.vendors`) bindings: catalog CRUD (incl. catalogs-for-category) and
|
|
35
|
+
vendor + vendor-location CRUD with vendor search. Server-side only — these use
|
|
36
|
+
the service (clientCredentials) token.
|
|
37
|
+
|
|
38
|
+
- [#86](https://github.com/viuteam/emporix-sdk/pull/86) [`38c2510`](https://github.com/viuteam/emporix-sdk/commit/38c2510eefef3a69a941761d412163535cb6aad9) Thanks [@amnael1](https://github.com/amnael1)! - Add Emporix tenant-managed Customer Service bindings via `client.customerAdmin`:
|
|
39
|
+
admin/seller CRUD over customer profiles (`listCustomers`, `searchCustomers`,
|
|
40
|
+
`getCustomer`, `createCustomer`, `upsertCustomer`, `patchCustomer`,
|
|
41
|
+
`deleteCustomer`) and their addresses (`listAddresses`, `getAddress`,
|
|
42
|
+
`addAddress`, `upsertAddress`, `patchAddress`, `deleteAddress`, `addAddressTags`,
|
|
43
|
+
`removeAddressTags`). Server-side only — distinct from the storefront
|
|
44
|
+
`client.customers`.
|
|
45
|
+
|
|
46
|
+
- [#85](https://github.com/viuteam/emporix-sdk/pull/85) [`c874141`](https://github.com/viuteam/emporix-sdk/commit/c874141484731d383e5732b7b358062d412460e4) Thanks [@amnael1](https://github.com/amnael1)! - Add Emporix Pick-Pack Service bindings via `client.pickPack`: packlist orders
|
|
47
|
+
(`listOrders`, `getOrder`, `updateOrder`, `finishOrder`, `listOrderCycles`),
|
|
48
|
+
assignees (`addAssignee`, `removeAssignee`), packaging (`updatePackaging`),
|
|
49
|
+
packing events (`createEvent`, `listEvents`), and recalculation jobs
|
|
50
|
+
(`triggerRecalculation`, `getRecalculationJob`). Server-side only.
|
|
51
|
+
|
|
52
|
+
### Patch Changes
|
|
53
|
+
|
|
54
|
+
- [#88](https://github.com/viuteam/emporix-sdk/pull/88) [`ea9fc34`](https://github.com/viuteam/emporix-sdk/commit/ea9fc34c78e4620f3da2bf17040739f3dfd19669) Thanks [@amnael1](https://github.com/amnael1)! - Refresh package READMEs to reflect the full service and hook surface. The
|
|
55
|
+
`@viu/emporix-sdk` README now lists all 44 services (grouped by area) and the
|
|
56
|
+
correct published subpath exports; the `@viu/emporix-sdk-react` README documents
|
|
57
|
+
every exported hook (orders, availability, coupon, reward-points, returns,
|
|
58
|
+
approvals, shopping-lists, and the chunked price hook). Docs-only — no API
|
|
59
|
+
changes.
|
|
60
|
+
|
|
3
61
|
## 2.4.0
|
|
4
62
|
|
|
5
63
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -44,6 +44,22 @@ await sdk.products.list(undefined, auth.service("partner"));
|
|
|
44
44
|
await sdk.customers.me(auth.raw(externalJwt));
|
|
45
45
|
```
|
|
46
46
|
|
|
47
|
+
## Services
|
|
48
|
+
|
|
49
|
+
The client exposes the full Emporix surface as namespaced services. Each is a
|
|
50
|
+
property on the `EmporixClient` instance:
|
|
51
|
+
|
|
52
|
+
| Area | Services |
|
|
53
|
+
| --- | --- |
|
|
54
|
+
| Catalog | `products`, `categories`, `prices`, `brands`, `labels`, `catalogs` |
|
|
55
|
+
| Cart & checkout | `carts`, `checkout`, `payments`, `coupons`, `taxes`, `shipping`, `fees` |
|
|
56
|
+
| Orders & fulfilment | `orders`, `salesOrders`, `returns`, `pickPack`, `availability`, `indexing` |
|
|
57
|
+
| Customers & B2B | `customers`, `customerAdmin`, `companies`, `contacts`, `locations`, `customerGroups`, `approvals`, `rewardPoints`, `segments` |
|
|
58
|
+
| Platform & config | `sites`, `sessionContext`, `tenantConfig`, `clientConfig`, `media`, `schemas`, `webhooks`, `sequentialIds`, `units`, `countries`, `currencies`, `vendors`, `shoppingLists`, `sepaExport`, `ai`, `ragIndexer` |
|
|
59
|
+
|
|
60
|
+
The sections below highlight the most-used services; per-service guides live in
|
|
61
|
+
[`../../docs/`](../../docs).
|
|
62
|
+
|
|
47
63
|
## Configuration
|
|
48
64
|
|
|
49
65
|
| Option | Default | Notes |
|
|
@@ -125,9 +141,13 @@ stock record. There is no restock-date field. See [`../../docs/availability.md`]
|
|
|
125
141
|
|
|
126
142
|
## Subpath exports
|
|
127
143
|
|
|
128
|
-
`@viu/emporix-sdk` (
|
|
129
|
-
|
|
130
|
-
`./
|
|
144
|
+
`@viu/emporix-sdk` (the package root) re-exports **everything** — every service,
|
|
145
|
+
type, and helper. Tree-shakeable subpaths are published for the high-traffic
|
|
146
|
+
services: `./customer`, `./product`, `./category`, `./cart`, `./checkout`,
|
|
147
|
+
`./payment`, `./price`, `./media`, `./segment`, `./companies`, `./contacts`,
|
|
148
|
+
`./locations`, `./customer-groups`, `./orders`, `./availability`. All other
|
|
149
|
+
services (Tax, Coupon, RewardPoints, Shipping, Returns, Catalog, Vendor,
|
|
150
|
+
PickPack, CustomerAdmin, Approval, …) are reached from the package root.
|
|
131
151
|
|
|
132
152
|
## Authors
|
|
133
153
|
|
package/dist/availability.d.cts
CHANGED
package/dist/availability.d.ts
CHANGED
package/dist/cart.d.cts
CHANGED
package/dist/cart.d.ts
CHANGED
package/dist/category.d.cts
CHANGED
package/dist/category.d.ts
CHANGED
package/dist/checkout.d.cts
CHANGED
package/dist/checkout.d.ts
CHANGED
package/dist/companies.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as ClientContext, b as AuthContext } from './context-
|
|
1
|
+
import { C as ClientContext, b as AuthContext } from './context-DJDTlhLW.cjs';
|
|
2
2
|
import { L as LegalEntity, f as LegalEntityCreate, h as LegalEntityUpdate } from './types.gen-D1QuqPLs.cjs';
|
|
3
3
|
export { A as AccountLimit, e as CustomerGroupRef, g as LegalEntityType, i as LegalInfo } from './types.gen-D1QuqPLs.cjs';
|
|
4
4
|
|
package/dist/companies.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as ClientContext, b as AuthContext } from './context-
|
|
1
|
+
import { C as ClientContext, b as AuthContext } from './context-DJDTlhLW.js';
|
|
2
2
|
import { L as LegalEntity, f as LegalEntityCreate, h as LegalEntityUpdate } from './types.gen-D1QuqPLs.js';
|
|
3
3
|
export { A as AccountLimit, e as CustomerGroupRef, g as LegalEntityType, i as LegalInfo } from './types.gen-D1QuqPLs.js';
|
|
4
4
|
|
package/dist/contacts.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as ClientContext, b as AuthContext } from './context-
|
|
1
|
+
import { C as ClientContext, b as AuthContext } from './context-DJDTlhLW.cjs';
|
|
2
2
|
import { C as ContactAssignment, a as ContactAssignmentCreate, c as ContactAssignmentUpdate } from './types.gen-D1QuqPLs.cjs';
|
|
3
3
|
export { b as ContactAssignmentType } from './types.gen-D1QuqPLs.cjs';
|
|
4
4
|
|
package/dist/contacts.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as ClientContext, b as AuthContext } from './context-
|
|
1
|
+
import { C as ClientContext, b as AuthContext } from './context-DJDTlhLW.js';
|
|
2
2
|
import { C as ContactAssignment, a as ContactAssignmentCreate, c as ContactAssignmentUpdate } from './types.gen-D1QuqPLs.js';
|
|
3
3
|
export { b as ContactAssignmentType } from './types.gen-D1QuqPLs.js';
|
|
4
4
|
|
|
@@ -3,7 +3,7 @@ type LogLevel = "trace" | "debug" | "info" | "warn" | "error" | "silent";
|
|
|
3
3
|
/** Numeric ordering used for fast comparison. */
|
|
4
4
|
declare const LEVEL: Record<LogLevel, number>;
|
|
5
5
|
/** Services that bind their own logger and are independently level-controllable. */
|
|
6
|
-
type ServiceName = "customer" | "product" | "category" | "cart" | "checkout" | "payment" | "price" | "media" | "segment" | "site" | "session-context" | "customer-management" | "iam" | "orders" | "sales-orders" | "availability" | "configuration" | "shopping-list" | "ai-rag-indexer" | "sequential-id" | "fee" | "webhook" | "schema" | "ai" | "tax" | "coupon" | "reward-points" | "brand" | "label" | "country" | "currency" | "shipping" | "returns" | "sepa-export" | "indexing" | "unit-handling" | "http" | "auth";
|
|
6
|
+
type ServiceName = "customer" | "product" | "category" | "cart" | "checkout" | "payment" | "price" | "media" | "segment" | "site" | "session-context" | "customer-management" | "iam" | "orders" | "sales-orders" | "availability" | "configuration" | "shopping-list" | "ai-rag-indexer" | "sequential-id" | "fee" | "webhook" | "schema" | "ai" | "tax" | "coupon" | "reward-points" | "brand" | "label" | "country" | "currency" | "shipping" | "returns" | "sepa-export" | "indexing" | "unit-handling" | "catalog" | "vendor" | "pick-pack" | "customer-admin" | "approval" | "http" | "auth";
|
|
7
7
|
/** Arbitrary structured fields attached to a log line. */
|
|
8
8
|
interface LogFields {
|
|
9
9
|
[key: string]: unknown;
|
|
@@ -161,6 +161,19 @@ type AuthContext = {
|
|
|
161
161
|
kind: "raw";
|
|
162
162
|
token: string;
|
|
163
163
|
};
|
|
164
|
+
/**
|
|
165
|
+
* Supplies a fresh customer token when a `customer`-kind request 401s. The host
|
|
166
|
+
* (e.g. EmporixProvider) implements this; the SDK never refreshes the
|
|
167
|
+
* caller-owned customer token unless a refresher is registered.
|
|
168
|
+
*/
|
|
169
|
+
interface CustomerTokenRefresher {
|
|
170
|
+
/**
|
|
171
|
+
* Called on a `customer`-kind 401. Receives the token that just failed;
|
|
172
|
+
* returns a fresh customer token to retry with, or `null` to give up (the
|
|
173
|
+
* 401 then propagates as EmporixAuthError).
|
|
174
|
+
*/
|
|
175
|
+
refresh(expiredToken: string): Promise<string | null>;
|
|
176
|
+
}
|
|
164
177
|
/** An obtained anonymous storefront session. */
|
|
165
178
|
interface AnonymousSession {
|
|
166
179
|
accessToken: string;
|
|
@@ -232,6 +245,20 @@ declare const auth: {
|
|
|
232
245
|
};
|
|
233
246
|
/** Resolves an {@link AuthContext} to a concrete bearer token. */
|
|
234
247
|
declare function resolveToken(ctx: AuthContext, provider: TokenProvider): Promise<string>;
|
|
248
|
+
/**
|
|
249
|
+
* Late-bindable, single-flight holder for an optional
|
|
250
|
+
* {@link CustomerTokenRefresher}. Single-flight is required because Emporix
|
|
251
|
+
* rotates the refresh token on each refresh — concurrent refreshes would
|
|
252
|
+
* invalidate each other. Off (returns `null`) until a refresher is set.
|
|
253
|
+
*/
|
|
254
|
+
declare class CustomerRefreshRegistry {
|
|
255
|
+
private refresher;
|
|
256
|
+
private inflight;
|
|
257
|
+
set(refresher: CustomerTokenRefresher | null): void;
|
|
258
|
+
get enabled(): boolean;
|
|
259
|
+
/** Concurrent callers share one in-flight refresh. */
|
|
260
|
+
refresh(expiredToken: string): Promise<string | null>;
|
|
261
|
+
}
|
|
235
262
|
/** SDK-owned token provider: client-credentials service tokens + anonymous session. */
|
|
236
263
|
declare class DefaultTokenProvider implements TokenProvider {
|
|
237
264
|
private readonly cfg;
|
|
@@ -290,6 +317,8 @@ interface HttpClientOptions {
|
|
|
290
317
|
};
|
|
291
318
|
/** Override the retry backoff delay (ms → Promise). Defaults to a real timer. */
|
|
292
319
|
sleep?: (ms: number) => Promise<void>;
|
|
320
|
+
/** Opt-in customer-token refresher registry (off unless a refresher is set). */
|
|
321
|
+
customerRefresh?: CustomerRefreshRegistry;
|
|
293
322
|
}
|
|
294
323
|
/** Fetch wrapper: auth resolution, JSON parsing, typed error mapping, logging. */
|
|
295
324
|
declare class HttpClient {
|
|
@@ -341,4 +370,4 @@ interface PaginatedItems<T> {
|
|
|
341
370
|
*/
|
|
342
371
|
declare function iterateAll<T>(fetchPage: (pageNumber: number) => Promise<PaginatedItems<T>>, start?: number): AsyncIterable<T>;
|
|
343
372
|
|
|
344
|
-
export { type AnonymousSession as A, type ClientContext as C, DEFAULT_HOST as D, type EmporixConfig as E, HttpClient as H, LEVEL as L, type PaginatedItems as P, type RequestOptions as R, type ServiceCredentials as S, type TokenProvider as T, type AnonymousSessionStore as a, type AuthContext as b, type AuthKind as c,
|
|
373
|
+
export { type AnonymousSession as A, type ClientContext as C, DEFAULT_HOST as D, type EmporixConfig as E, HttpClient as H, LEVEL as L, type PaginatedItems as P, type RequestOptions as R, type ServiceCredentials as S, type TokenProvider as T, type AnonymousSessionStore as a, type AuthContext as b, type AuthKind as c, CustomerRefreshRegistry as d, type CustomerTokenRefresher as e, DefaultTokenProvider as f, type HttpClientOptions as g, LevelResolver as h, type LogFields as i, type LogLevel as j, type Logger as k, type LoggerConfig as l, type LoggerObjectConfig as m, type ResolvedConfig as n, type ServiceName as o, type StorefrontCredentials as p, auth as q, createConsoleLogger as r, createNoopLogger as s, iterateAll as t, redact as u, resolveToken as v, validateConfig as w };
|
|
@@ -3,7 +3,7 @@ type LogLevel = "trace" | "debug" | "info" | "warn" | "error" | "silent";
|
|
|
3
3
|
/** Numeric ordering used for fast comparison. */
|
|
4
4
|
declare const LEVEL: Record<LogLevel, number>;
|
|
5
5
|
/** Services that bind their own logger and are independently level-controllable. */
|
|
6
|
-
type ServiceName = "customer" | "product" | "category" | "cart" | "checkout" | "payment" | "price" | "media" | "segment" | "site" | "session-context" | "customer-management" | "iam" | "orders" | "sales-orders" | "availability" | "configuration" | "shopping-list" | "ai-rag-indexer" | "sequential-id" | "fee" | "webhook" | "schema" | "ai" | "tax" | "coupon" | "reward-points" | "brand" | "label" | "country" | "currency" | "shipping" | "returns" | "sepa-export" | "indexing" | "unit-handling" | "http" | "auth";
|
|
6
|
+
type ServiceName = "customer" | "product" | "category" | "cart" | "checkout" | "payment" | "price" | "media" | "segment" | "site" | "session-context" | "customer-management" | "iam" | "orders" | "sales-orders" | "availability" | "configuration" | "shopping-list" | "ai-rag-indexer" | "sequential-id" | "fee" | "webhook" | "schema" | "ai" | "tax" | "coupon" | "reward-points" | "brand" | "label" | "country" | "currency" | "shipping" | "returns" | "sepa-export" | "indexing" | "unit-handling" | "catalog" | "vendor" | "pick-pack" | "customer-admin" | "approval" | "http" | "auth";
|
|
7
7
|
/** Arbitrary structured fields attached to a log line. */
|
|
8
8
|
interface LogFields {
|
|
9
9
|
[key: string]: unknown;
|
|
@@ -161,6 +161,19 @@ type AuthContext = {
|
|
|
161
161
|
kind: "raw";
|
|
162
162
|
token: string;
|
|
163
163
|
};
|
|
164
|
+
/**
|
|
165
|
+
* Supplies a fresh customer token when a `customer`-kind request 401s. The host
|
|
166
|
+
* (e.g. EmporixProvider) implements this; the SDK never refreshes the
|
|
167
|
+
* caller-owned customer token unless a refresher is registered.
|
|
168
|
+
*/
|
|
169
|
+
interface CustomerTokenRefresher {
|
|
170
|
+
/**
|
|
171
|
+
* Called on a `customer`-kind 401. Receives the token that just failed;
|
|
172
|
+
* returns a fresh customer token to retry with, or `null` to give up (the
|
|
173
|
+
* 401 then propagates as EmporixAuthError).
|
|
174
|
+
*/
|
|
175
|
+
refresh(expiredToken: string): Promise<string | null>;
|
|
176
|
+
}
|
|
164
177
|
/** An obtained anonymous storefront session. */
|
|
165
178
|
interface AnonymousSession {
|
|
166
179
|
accessToken: string;
|
|
@@ -232,6 +245,20 @@ declare const auth: {
|
|
|
232
245
|
};
|
|
233
246
|
/** Resolves an {@link AuthContext} to a concrete bearer token. */
|
|
234
247
|
declare function resolveToken(ctx: AuthContext, provider: TokenProvider): Promise<string>;
|
|
248
|
+
/**
|
|
249
|
+
* Late-bindable, single-flight holder for an optional
|
|
250
|
+
* {@link CustomerTokenRefresher}. Single-flight is required because Emporix
|
|
251
|
+
* rotates the refresh token on each refresh — concurrent refreshes would
|
|
252
|
+
* invalidate each other. Off (returns `null`) until a refresher is set.
|
|
253
|
+
*/
|
|
254
|
+
declare class CustomerRefreshRegistry {
|
|
255
|
+
private refresher;
|
|
256
|
+
private inflight;
|
|
257
|
+
set(refresher: CustomerTokenRefresher | null): void;
|
|
258
|
+
get enabled(): boolean;
|
|
259
|
+
/** Concurrent callers share one in-flight refresh. */
|
|
260
|
+
refresh(expiredToken: string): Promise<string | null>;
|
|
261
|
+
}
|
|
235
262
|
/** SDK-owned token provider: client-credentials service tokens + anonymous session. */
|
|
236
263
|
declare class DefaultTokenProvider implements TokenProvider {
|
|
237
264
|
private readonly cfg;
|
|
@@ -290,6 +317,8 @@ interface HttpClientOptions {
|
|
|
290
317
|
};
|
|
291
318
|
/** Override the retry backoff delay (ms → Promise). Defaults to a real timer. */
|
|
292
319
|
sleep?: (ms: number) => Promise<void>;
|
|
320
|
+
/** Opt-in customer-token refresher registry (off unless a refresher is set). */
|
|
321
|
+
customerRefresh?: CustomerRefreshRegistry;
|
|
293
322
|
}
|
|
294
323
|
/** Fetch wrapper: auth resolution, JSON parsing, typed error mapping, logging. */
|
|
295
324
|
declare class HttpClient {
|
|
@@ -341,4 +370,4 @@ interface PaginatedItems<T> {
|
|
|
341
370
|
*/
|
|
342
371
|
declare function iterateAll<T>(fetchPage: (pageNumber: number) => Promise<PaginatedItems<T>>, start?: number): AsyncIterable<T>;
|
|
343
372
|
|
|
344
|
-
export { type AnonymousSession as A, type ClientContext as C, DEFAULT_HOST as D, type EmporixConfig as E, HttpClient as H, LEVEL as L, type PaginatedItems as P, type RequestOptions as R, type ServiceCredentials as S, type TokenProvider as T, type AnonymousSessionStore as a, type AuthContext as b, type AuthKind as c,
|
|
373
|
+
export { type AnonymousSession as A, type ClientContext as C, DEFAULT_HOST as D, type EmporixConfig as E, HttpClient as H, LEVEL as L, type PaginatedItems as P, type RequestOptions as R, type ServiceCredentials as S, type TokenProvider as T, type AnonymousSessionStore as a, type AuthContext as b, type AuthKind as c, CustomerRefreshRegistry as d, type CustomerTokenRefresher as e, DefaultTokenProvider as f, type HttpClientOptions as g, LevelResolver as h, type LogFields as i, type LogLevel as j, type Logger as k, type LoggerConfig as l, type LoggerObjectConfig as m, type ResolvedConfig as n, type ServiceName as o, type StorefrontCredentials as p, auth as q, createConsoleLogger as r, createNoopLogger as s, iterateAll as t, redact as u, resolveToken as v, validateConfig as w };
|
package/dist/customer.d.cts
CHANGED
package/dist/customer.d.ts
CHANGED