@viu/emporix-sdk 2.38.1 → 3.1.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.
Files changed (43) hide show
  1. package/CHANGELOG.md +69 -0
  2. package/README.md +1 -1
  3. package/dist/availability.d.cts +1 -1
  4. package/dist/availability.d.ts +1 -1
  5. package/dist/cart.d.cts +1 -1
  6. package/dist/cart.d.ts +1 -1
  7. package/dist/category.d.cts +1 -1
  8. package/dist/category.d.ts +1 -1
  9. package/dist/checkout.d.cts +1 -1
  10. package/dist/checkout.d.ts +1 -1
  11. package/dist/companies.d.cts +1 -1
  12. package/dist/companies.d.ts +1 -1
  13. package/dist/contacts.d.cts +1 -1
  14. package/dist/contacts.d.ts +1 -1
  15. package/dist/{context-D64-B1Rz.d.cts → context-CcU93eAL.d.cts} +1 -1
  16. package/dist/{context-D64-B1Rz.d.ts → context-CcU93eAL.d.ts} +1 -1
  17. package/dist/{customer-groups-B6xrwf59.d.cts → customer-groups-Tt9VIA-m.d.cts} +1 -1
  18. package/dist/{customer-groups-YZg22bFc.d.ts → customer-groups-wmO0f-vj.d.ts} +1 -1
  19. package/dist/customer-groups.d.cts +2 -2
  20. package/dist/customer-groups.d.ts +2 -2
  21. package/dist/customer.d.cts +1 -1
  22. package/dist/customer.d.ts +1 -1
  23. package/dist/index.cjs +353 -144
  24. package/dist/index.cjs.map +1 -1
  25. package/dist/index.d.cts +158 -54
  26. package/dist/index.d.ts +158 -54
  27. package/dist/index.js +344 -144
  28. package/dist/index.js.map +1 -1
  29. package/dist/locations.d.cts +1 -1
  30. package/dist/locations.d.ts +1 -1
  31. package/dist/media.d.cts +1 -1
  32. package/dist/media.d.ts +1 -1
  33. package/dist/orders.d.cts +1 -1
  34. package/dist/orders.d.ts +1 -1
  35. package/dist/payment.d.cts +1 -1
  36. package/dist/payment.d.ts +1 -1
  37. package/dist/price.d.cts +1 -1
  38. package/dist/price.d.ts +1 -1
  39. package/dist/product.d.cts +1 -1
  40. package/dist/product.d.ts +1 -1
  41. package/dist/segment.d.cts +1 -1
  42. package/dist/segment.d.ts +1 -1
  43. package/package.json +1 -1
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
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-D64-B1Rz.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-D64-B1Rz.cjs';
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-CcU93eAL.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-CcU93eAL.cjs';
3
3
  import { CustomerService } from './customer.cjs';
4
4
  export { Address, AddressCreateInput, AddressUpdateInput, ChangeEmailInput, ConfirmEmailChangeInput, Customer, CustomerSession, CustomerSignupInput, CustomerUpdateInput, PasswordChangeInput, PasswordResetConfirmInput, PasswordResetRequestInput, ResendActivationInput } from './customer.cjs';
5
5
  import { ProductService } from './product.cjs';
@@ -21,7 +21,7 @@ export { Segment, SegmentAssignmentBulkResult, SegmentBulkItem, SegmentBulkResul
21
21
  import { CompaniesService } from './companies.cjs';
22
22
  import { ContactsService } from './contacts.cjs';
23
23
  import { LocationsService } from './locations.cjs';
24
- 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-B6xrwf59.cjs';
24
+ 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-Tt9VIA-m.cjs';
25
25
  import { OrdersService, SalesOrdersService } from './orders.cjs';
26
26
  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';
27
27
  import { AvailabilityService } from './availability.cjs';
@@ -234,6 +234,160 @@ declare function createServerStorage(jar: ServerCookieJar): EmporixStorage;
234
234
  */
235
235
  declare function serverAuth(storage: EmporixStorage): AuthContext;
236
236
 
237
+ /**
238
+ * The browser session-storage backends: memory, localStorage, sessionStorage,
239
+ * document.cookie.
240
+ *
241
+ * The contract and the framework-free backends live in `./session-storage`;
242
+ * these are the ones that need browser globals. They were in
243
+ * `@viu/emporix-sdk-react` until `@viu/emporix-sdk-angular` needed them too —
244
+ * `localStorage` is not a React API, and duplicating a storage backend per
245
+ * binding means two of them writing subtly different values under the same key.
246
+ *
247
+ * Every export is a named factory and the package sets `sideEffects: false`, so
248
+ * a Node consumer that imports none of them bundles none of them. That is
249
+ * asserted by `scripts/check-treeshake.mjs`.
250
+ */
251
+
252
+ /**
253
+ * The three methods these backends use from a Web `Storage`.
254
+ *
255
+ * Declared locally on purpose. This package compiles with `lib: ["ES2022"]` and
256
+ * no `"DOM"` — that is the invariant which keeps the SDK runnable on Node, edge
257
+ * runtimes and workers, and adding DOM to the lib to satisfy this one file would
258
+ * switch that compile-time guard off for all ~60 services. So every browser
259
+ * global below is reached through a narrowed `globalThis` instead of an ambient
260
+ * declaration, which is also the pattern the localStorage and sessionStorage
261
+ * availability checks already used before this code moved here.
262
+ */
263
+ interface WebStorageLike {
264
+ getItem(key: string): string | null;
265
+ setItem(key: string, value: string): void;
266
+ removeItem(key: string): void;
267
+ }
268
+ /**
269
+ * Internal: create a swallow-on-throw listener set used by all the storage
270
+ * backends for `subscribeAll`. Centralizes the try/catch wrapper so a buggy
271
+ * telemetry handler never breaks a storage write.
272
+ */
273
+ declare function createListenerSet<T>(): {
274
+ add(l: (value: T) => void): () => void;
275
+ notify(value: T): void;
276
+ };
277
+ /** In-memory token store. Default, SSR-safe, no persistence. */
278
+ declare function createMemoryStorage(opts?: {
279
+ initial?: string;
280
+ }): EmporixStorage;
281
+ /**
282
+ * Internal: build an {@link EmporixStorage} backed by any Web `Storage`
283
+ * instance (`localStorage` or `sessionStorage`). Both share the identical
284
+ * `getItem`/`setItem`/`removeItem` surface, so the 8-key wiring lives here once.
285
+ * Callers own the availability check + memory fallback before delegating.
286
+ */
287
+ declare function fromWebStorage(storage: WebStorageLike, opts?: {
288
+ key?: string;
289
+ }): EmporixStorage;
290
+ /**
291
+ * Browser `localStorage`-backed store: persistent and shared across tabs.
292
+ * Falls back to memory on the server (or when localStorage is unavailable).
293
+ */
294
+ declare function createLocalStorage(opts?: {
295
+ key?: string;
296
+ }): EmporixStorage;
297
+ /** @deprecated Use {@link createLocalStorage}. Kept for backward compatibility. */
298
+ declare const createLocalStorageStorage: typeof createLocalStorage;
299
+ /**
300
+ * Browser `sessionStorage`-backed store: per-tab persistence that survives a
301
+ * reload but is cleared when the tab closes and is not shared across tabs.
302
+ * Falls back to memory on the server (or when sessionStorage is unavailable).
303
+ */
304
+ declare function createSessionStorage(opts?: {
305
+ key?: string;
306
+ }): EmporixStorage;
307
+ /**
308
+ * Cookie-backed store. `Secure` defaults to on for https origins; override
309
+ * with `secure: false` only for non-https dev setups. Consumer must still pick
310
+ * an appropriate `sameSite` for CSRF safety.
311
+ */
312
+ declare function createCookieStorage(opts?: {
313
+ name?: string;
314
+ secure?: boolean;
315
+ sameSite?: "lax" | "strict" | "none";
316
+ }): EmporixStorage;
317
+
318
+ /**
319
+ * The cache-key shape every framework binding shares.
320
+ *
321
+ * Shape: `["emporix", resource, ...args, { tenant, authKind, siteCode?, language? }]`
322
+ *
323
+ * It lives in the core SDK for the same reason {@link STORAGE_KEYS} does: it is
324
+ * not a React concern. `@viu/emporix-sdk-react` and `@viu/emporix-sdk-angular`
325
+ * must produce byte-identical keys or the two bindings, the docs and the
326
+ * devtools all describe different caches. One definition is the only way that
327
+ * holds — a copy per binding would agree on the day it was written and nowhere
328
+ * after.
329
+ *
330
+ * The trailing meta object groups the discriminators that differentiate cache
331
+ * entries across tenants, auth-kinds and (where applicable) active sites.
332
+ * `siteCode` is included only when explicitly passed — non-site-aware reads
333
+ * pass `undefined` and the field is dropped.
334
+ */
335
+ declare function emporixKey<TArgs extends readonly unknown[]>(resource: string, args: TArgs, context: {
336
+ tenant: string;
337
+ authKind: string;
338
+ siteCode?: string | null;
339
+ language?: string | null;
340
+ }): readonly ["emporix", string, ...TArgs, Record<string, unknown>];
341
+ /** Which site discriminators go into the query key's meta object. */
342
+ type SiteFields = "full" | "language" | "none";
343
+ /**
344
+ * Builds the site portion of a query key's meta object. Shared by every read
345
+ * path — React's `useEmporixQuery`, its `prefetchEmporix`, and Angular's
346
+ * `emporixQueryOptions` — so none of them can disagree about which
347
+ * discriminators a resource carries. Key parity is structural, not tested.
348
+ *
349
+ * Note `null` is preserved rather than dropped: an unbound site is a distinct
350
+ * cache identity from a bound one, and {@link emporixKey} only omits a field
351
+ * when it is `undefined`.
352
+ */
353
+ declare function siteMeta(site: SiteFields, siteCode: string | null, language: string | null): {
354
+ siteCode?: string | null;
355
+ language?: string | null;
356
+ };
357
+
358
+ /**
359
+ * In-memory customer-session store, keyed by storage instance.
360
+ *
361
+ * Moved out of the React bindings: it is a subscribe/snapshot store over
362
+ * {@link EmporixStorage} with no framework API in it. React consumes it through
363
+ * `useSyncExternalStore`, Angular through a `signal` — the store itself does not
364
+ * know or care, which is exactly why it does not belong in either binding.
365
+ */
366
+
367
+ /**
368
+ * The three session tokens the customer session tracks. `token` is mirrored
369
+ * from persistent storage; `refreshToken` and `saasToken` are in-memory only
370
+ * (deliberately never persisted).
371
+ */
372
+ interface CustomerSessionState {
373
+ token: string | null;
374
+ refreshToken: string | null;
375
+ saasToken: string | null;
376
+ }
377
+ interface CustomerSessionStore {
378
+ getSnapshot: () => CustomerSessionState;
379
+ setState: (next: CustomerSessionState | ((prev: CustomerSessionState) => CustomerSessionState)) => void;
380
+ subscribe: (listener: () => void) => () => void;
381
+ }
382
+ /**
383
+ * Shared in-memory store for the customer session, keyed by the storage
384
+ * instance. Every consumer reads and writes the same store, so a login in one
385
+ * place (the auth form) is visible in another (the checkout page) — without
386
+ * this, the in-memory `saasToken` lived in a single component's local state and
387
+ * customer checkout would 401 elsewhere.
388
+ */
389
+ declare function getCustomerSessionStore(storage: EmporixStorage): CustomerSessionStore;
390
+
237
391
  /**
238
392
  * Address
239
393
  *
@@ -8564,55 +8718,6 @@ declare class ReturnsService {
8564
8718
  deleteReturn(returnId: string, auth?: AuthContext): Promise<void>;
8565
8719
  }
8566
8720
 
8567
- type CreateJob = {
8568
- siteCode: string;
8569
- };
8570
- type JobDetails = {
8571
- jobId?: string;
8572
- status?: string;
8573
- siteCode?: string;
8574
- fileId?: string;
8575
- active?: boolean;
8576
- ordersExportedCount?: number;
8577
- createdAt?: string;
8578
- completedAt?: string;
8579
- };
8580
- type JobId = {
8581
- id: string;
8582
- };
8583
-
8584
- /**
8585
- * Public types for the SEPA Export Service — stable names aliased over the
8586
- * generated `sepa-export` types.
8587
- */
8588
-
8589
- /** A SEPA export job (read / list item). */
8590
- type SepaJob = JobDetails;
8591
- /** Create-job body (`POST /jobs`). */
8592
- type SepaJobInput = CreateJob;
8593
- /** `POST /jobs` response — the created job's id. */
8594
- type SepaJobCreated = JobId;
8595
-
8596
- /**
8597
- * Emporix SEPA Export Service (`/sepa-export/{tenant}/…`): export jobs and file
8598
- * retrieval. Server-side; defaults to the service token.
8599
- *
8600
- * @deprecated since 2026-05-25, removal 2026-08-24 — the SEPA Export service is
8601
- * being sunset by Emporix; all endpoints are no longer maintained.
8602
- */
8603
- declare class SepaExportService {
8604
- private readonly ctx;
8605
- static readonly channel: "sepa-export";
8606
- constructor(ctx: ClientContext);
8607
- private base;
8608
- /** Retrieve a SEPA export file by id. Returns the raw file content (text). */
8609
- getFile(fileId: string, auth?: AuthContext): Promise<string>;
8610
- /** List export jobs. */
8611
- listJobs(query?: Record<string, string | number>, auth?: AuthContext): Promise<SepaJob[]>;
8612
- /** Create an export job. */
8613
- createJob(input: SepaJobInput, auth?: AuthContext): Promise<SepaJobCreated>;
8614
- }
8615
-
8616
8721
  /**
8617
8722
  * Informs about status of reindex job. `PENDING` means that the maximum number of parallel `IN_PROGRESS` jobs is reached and such job will be processed when one of current `IN_PROGRESS` jobs is released. `PUBLISHED` means that all the indexing events were emitted. `SUCCESS` means that all the indexing events were consumed.
8618
8723
  */
@@ -11858,7 +11963,6 @@ declare class EmporixClient {
11858
11963
  readonly invoices: InvoiceService;
11859
11964
  readonly quotes: QuoteService;
11860
11965
  readonly returns: ReturnsService;
11861
- readonly sepaExport: SepaExportService;
11862
11966
  readonly indexing: IndexingService;
11863
11967
  readonly imports: ImportService;
11864
11968
  readonly units: UnitHandlingService;
@@ -11980,4 +12084,4 @@ declare function productIdFromYrn(yrn: string | undefined): string;
11980
12084
  */
11981
12085
  declare function productYrn(tenant: string, productId: string): string;
11982
12086
 
11983
- export { type AddedPoints, type AdminCustomer, type AdminCustomerAddress, type AdminCustomerAddressInput, type AdminCustomerAddressList, type AdminCustomerAddressUpdate, type AdminCustomerCreated, type AdminCustomerImport, type AdminCustomerImportAccount, type AdminCustomerImportResult, type AdminCustomerInput, type AdminCustomerLegacyAuth, type AdminCustomerList, type AdminCustomerPatch, type AdminCustomerSearchQuery, type AdminCustomerUpdate, type AdminPasswordMigrationRetention, type AdminPasswordMigrationRetentionInput, type Agent, type AgentAnalytics, type AgentExecutions, type AgentFromTemplate, type AgentInput, type AgentPatchOp, type AgentRequestLog, type AgentSearchQuery, type AgentSessionLog, type AgentTemplate, type AgenticPatchOp, type AgentsExport, type AgentsExportRequest, type AgentsImport, type AgentsImportRequest, AiService, type AnalyticsQuery, type Approval, type ApprovalCreated, type ApprovalDecision, type ApprovalInput, type ApprovalList, type ApprovalPatch, type ApprovalPermittedInput, type ApprovalPermittedResult, ApprovalService, type ApprovalUsersQuery, type ApprovalUsersResult, type Assignee, type Attachment, type AttachmentOptions, AuthContext, AvailabilityService, type BatchNextIdEntry, type Brand, type BrandInput, type BrandList, BrandService, type BrandUpdate, type BulkInstanceResult, type BulkPatchInstanceItem, CartService, type Catalog, type CatalogCreated, type CatalogInput, type CatalogList, type CatalogPatch, CatalogService, type CatalogUpdate, CategoryService, type CgRelation, type CgRelationList, type ChatRequest, type ChatResponse, type ChatStreamOptions, CheckoutService, ClientConfigService, type ClientConfiguration, ClientContext, CloudFunctionsService, type CommerceEvents, CompaniesService, type CompletionMessage, type CompletionRequest, type CompletionResponse, type Configuration$1 as Configuration, type ConfigurationDraft, ContactsService, type Conversation, type ConversationSearchQuery, type ConversionFactorInput, type ConversionFactorResult, type ConvertUnitInput, type ConvertUnitResult, type CookieIo, type Country, type CountryList, CountryService, type CountryUpdate, type Coupon$1 as Coupon, type CouponCreated, type CouponInput, type CouponList, CouponService, type CouponUpdate, type Created, 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, type EmporixCore, EmporixError, EmporixForbiddenError, EmporixInsufficientScopeError, EmporixNetworkError, EmporixNotFoundError, EmporixServerError, type EmporixStorage, type EmporixStorageKey, EmporixTimeoutError, EmporixValidationError, type ExchangeRate, type ExchangeRateCreated, type ExchangeRateInput, type ExchangeRateList, type ExchangeRateUpdate, type ExecutionsQuery, type Fee$1 as Fee, type FeeDraft, FeeService, type FindSiteInput, type GetOptions, type IamAccessControl, type IamAccessControlCreated, type IamAccessControlUpsert, type IamGroup, type IamGroupCreate, type IamGroupCreated, AssignmentCreateRequest as IamGroupMemberAssignment, type IamGroupMemberCreated, type IamGroupMemberInput, type IamGroupUpdate, type IamScope, type IamScopeCreated, type IamScopeUpsert, IamService, type IamUser, type IamUserCreate, type IamUserCreated, type IamUserDetail, type IamUserScopes, type IamUserUpdate, type ImportCancelResult, type ImportConfig, type ImportErrorRecord, type ImportPage, type ImportPageOptions, type ImportRecordOutcome, type ImportRun, type ImportRunDetail, type ImportRunEvent, type ImportRunInput, type ImportRunMode, type ImportRunStatus, type ImportRunStream, type ImportSchedule, ImportService, type ImportStream, type ImportedRecord, type IndexConfig, type IndexConfigCreated, type IndexPublicConfig, IndexingService, type InstanceSearchBody, type InvoiceJob, type InvoiceJobCreated, type InvoiceJobDraft, InvoiceService, type InvokeCloudFunctionOptions, type ItemFee, type ItemFeeDraft, type ItemFeeSearch, type ItemFeeSearchByProductId, type ItemFeeSearchByProductIds, type Job, type JobIdResponse, type Label, type LabelInput, type LabelList, LabelService, type LabelUpdate, type ListConfigOptions, type ListCustomEntitiesOptions, type ListFeesQuery, type ListInstancesQuery, type ListQuery, type ListQuoteReasonsQuery, type ListQuotesQuery, type ListReindexJobsOptions, type ListSchemaReferencesQuery, type ListSchemasQuery, LocationsService, LogLevel, type McpServer, type McpServerInput, MediaService, type MetadataFilter, type MinimumFee, type MutateOptions, type NewPointsEntry, type NextIdCommandRequest, type NextIdOptions, type NextIdResponse, type NextIdsBatchRequest, type NextIdsBatchResponse, type OAuthConfig, type OAuthInput, type OrderCycleList, type OrderEntryEventCreate, type OrderStatusChange, OrdersService, type PackagingProductsChange, type PackingEvent, type PackingEventList, PaginatedItems, PaymentGatewayService, type PersistedAnonymousSession, type PickOrder, type PickOrderList, type PickPackAck, PickPackService, type PointsSummary, PriceService, ProductService, type ProviderModels, QueryFor, type Quote, type QuoteCreated, type QuoteDraft, type QuoteHistory, type QuoteInput, type QuoteReason, type QuoteReasonCreated, type QuoteReasonDraft, type QuoteReasonUpdate, type QuoteResult, QuoteService, type QuoteSlotInput, type QuoteUpdate, 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 ReindexEntityType, type ReindexInput, type ReindexJob, type ReindexJobInput, type ReindexJobStatus, ResolvedConfig, type ResourceCreated, type Return, type ReturnCreated, type ReturnInput, type ReturnList, type ReturnPatch, type ReturnUpdate, ReturnsService, RewardPointsService, STORAGE_KEYS, SalesOrdersService, type Schema, type SchemaAttribute, type SchemaDraft, type SchemaExport, type SchemaImportInput, type SchemaInstanceBulkCreateItem, type SchemaInstanceBulkUpsertItem, type SchemaReference, type SchemaReferenceCreated, type SchemaReferenceInput, type SchemaReferenceUpdateInput, SchemaService, type SchemaTypeName, type SchemaUpdate, type SearchImportedRecordsOptions, type SearchInstancesQuery, type SearchQuery, type SearchStreamRecordsOptions, SegmentService, SepaExportService, type SepaJob, type SepaJobCreated, type SepaJobInput, type SequenceSchema, type SequenceSchemaCreate, SequentialIdService, type ServerCookieJar, type ServiceClass, ServiceName, type SessionAttributeInput, type SessionContext, type SessionContextPatch, SessionContextService, type SetItemFeesOptions, type ShippingFee, type ShippingGroup, type ShippingGroupList, type ShippingMethod, type ShippingMethodList, type ShippingPatch, ShippingService, type ShoppingList, type ShoppingListDraft, type ShoppingListItem, ShoppingListService, type Site$1 as Site, type SiteCreated, type SiteInput, type SiteList, type SiteMixin, type SiteMixinCreated, type SiteMixins, SiteService, StoredAnonymousSession, 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, type Token, type TokenInput, TokenProvider, type TokenStorage, type Tool, type ToolInput, 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, approvalStatusPatch, createCookieBackedStorage, createCore, createEmporixClient, createServerStorage, errorFromResponse, parseAnonymousSession, pickFee, productIdFromYrn, productYrn, resolveZone, serverAuth };
12087
+ export { type AddedPoints, type AdminCustomer, type AdminCustomerAddress, type AdminCustomerAddressInput, type AdminCustomerAddressList, type AdminCustomerAddressUpdate, type AdminCustomerCreated, type AdminCustomerImport, type AdminCustomerImportAccount, type AdminCustomerImportResult, type AdminCustomerInput, type AdminCustomerLegacyAuth, type AdminCustomerList, type AdminCustomerPatch, type AdminCustomerSearchQuery, type AdminCustomerUpdate, type AdminPasswordMigrationRetention, type AdminPasswordMigrationRetentionInput, type Agent, type AgentAnalytics, type AgentExecutions, type AgentFromTemplate, type AgentInput, type AgentPatchOp, type AgentRequestLog, type AgentSearchQuery, type AgentSessionLog, type AgentTemplate, type AgenticPatchOp, type AgentsExport, type AgentsExportRequest, type AgentsImport, type AgentsImportRequest, AiService, type AnalyticsQuery, type Approval, type ApprovalCreated, type ApprovalDecision, type ApprovalInput, type ApprovalList, type ApprovalPatch, type ApprovalPermittedInput, type ApprovalPermittedResult, ApprovalService, type ApprovalUsersQuery, type ApprovalUsersResult, type Assignee, type Attachment, type AttachmentOptions, AuthContext, AvailabilityService, type BatchNextIdEntry, type Brand, type BrandInput, type BrandList, BrandService, type BrandUpdate, type BulkInstanceResult, type BulkPatchInstanceItem, CartService, type Catalog, type CatalogCreated, type CatalogInput, type CatalogList, type CatalogPatch, CatalogService, type CatalogUpdate, CategoryService, type CgRelation, type CgRelationList, type ChatRequest, type ChatResponse, type ChatStreamOptions, CheckoutService, ClientConfigService, type ClientConfiguration, ClientContext, CloudFunctionsService, type CommerceEvents, CompaniesService, type CompletionMessage, type CompletionRequest, type CompletionResponse, type Configuration$1 as Configuration, type ConfigurationDraft, ContactsService, type Conversation, type ConversationSearchQuery, type ConversionFactorInput, type ConversionFactorResult, type ConvertUnitInput, type ConvertUnitResult, type CookieIo, type Country, type CountryList, CountryService, type CountryUpdate, type Coupon$1 as Coupon, type CouponCreated, type CouponInput, type CouponList, CouponService, type CouponUpdate, type Created, type Currency, type CurrencyCreated, type CurrencyInput, type CurrencyList, CurrencyService, type CurrencyUpdate, type CustomEntity, type CustomEntityDraft, type CustomInstance, type CustomInstanceDraft, CustomerAdminService, CustomerGroupsService, CustomerService, type CustomerSessionState, type CustomerSessionStore, 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, type EmporixCore, EmporixError, EmporixForbiddenError, EmporixInsufficientScopeError, EmporixNetworkError, EmporixNotFoundError, EmporixServerError, type EmporixStorage, type EmporixStorageKey, EmporixTimeoutError, EmporixValidationError, type ExchangeRate, type ExchangeRateCreated, type ExchangeRateInput, type ExchangeRateList, type ExchangeRateUpdate, type ExecutionsQuery, type Fee$1 as Fee, type FeeDraft, FeeService, type FindSiteInput, type GetOptions, type IamAccessControl, type IamAccessControlCreated, type IamAccessControlUpsert, type IamGroup, type IamGroupCreate, type IamGroupCreated, AssignmentCreateRequest as IamGroupMemberAssignment, type IamGroupMemberCreated, type IamGroupMemberInput, type IamGroupUpdate, type IamScope, type IamScopeCreated, type IamScopeUpsert, IamService, type IamUser, type IamUserCreate, type IamUserCreated, type IamUserDetail, type IamUserScopes, type IamUserUpdate, type ImportCancelResult, type ImportConfig, type ImportErrorRecord, type ImportPage, type ImportPageOptions, type ImportRecordOutcome, type ImportRun, type ImportRunDetail, type ImportRunEvent, type ImportRunInput, type ImportRunMode, type ImportRunStatus, type ImportRunStream, type ImportSchedule, ImportService, type ImportStream, type ImportedRecord, type IndexConfig, type IndexConfigCreated, type IndexPublicConfig, IndexingService, type InstanceSearchBody, type InvoiceJob, type InvoiceJobCreated, type InvoiceJobDraft, InvoiceService, type InvokeCloudFunctionOptions, type ItemFee, type ItemFeeDraft, type ItemFeeSearch, type ItemFeeSearchByProductId, type ItemFeeSearchByProductIds, type Job, type JobIdResponse, type Label, type LabelInput, type LabelList, LabelService, type LabelUpdate, type ListConfigOptions, type ListCustomEntitiesOptions, type ListFeesQuery, type ListInstancesQuery, type ListQuery, type ListQuoteReasonsQuery, type ListQuotesQuery, type ListReindexJobsOptions, type ListSchemaReferencesQuery, type ListSchemasQuery, LocationsService, LogLevel, type McpServer, type McpServerInput, MediaService, type MetadataFilter, type MinimumFee, type MutateOptions, type NewPointsEntry, type NextIdCommandRequest, type NextIdOptions, type NextIdResponse, type NextIdsBatchRequest, type NextIdsBatchResponse, type OAuthConfig, type OAuthInput, type OrderCycleList, type OrderEntryEventCreate, type OrderStatusChange, OrdersService, type PackagingProductsChange, type PackingEvent, type PackingEventList, PaginatedItems, PaymentGatewayService, type PersistedAnonymousSession, type PickOrder, type PickOrderList, type PickPackAck, PickPackService, type PointsSummary, PriceService, ProductService, type ProviderModels, QueryFor, type Quote, type QuoteCreated, type QuoteDraft, type QuoteHistory, type QuoteInput, type QuoteReason, type QuoteReasonCreated, type QuoteReasonDraft, type QuoteReasonUpdate, type QuoteResult, QuoteService, type QuoteSlotInput, type QuoteUpdate, 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 ReindexEntityType, type ReindexInput, type ReindexJob, type ReindexJobInput, type ReindexJobStatus, ResolvedConfig, type ResourceCreated, type Return, type ReturnCreated, type ReturnInput, type ReturnList, type ReturnPatch, type ReturnUpdate, ReturnsService, RewardPointsService, STORAGE_KEYS, SalesOrdersService, type Schema, type SchemaAttribute, type SchemaDraft, type SchemaExport, type SchemaImportInput, type SchemaInstanceBulkCreateItem, type SchemaInstanceBulkUpsertItem, type SchemaReference, type SchemaReferenceCreated, type SchemaReferenceInput, type SchemaReferenceUpdateInput, SchemaService, type SchemaTypeName, type SchemaUpdate, type SearchImportedRecordsOptions, type SearchInstancesQuery, type SearchQuery, type SearchStreamRecordsOptions, SegmentService, type SequenceSchema, type SequenceSchemaCreate, SequentialIdService, type ServerCookieJar, type ServiceClass, ServiceName, type SessionAttributeInput, type SessionContext, type SessionContextPatch, SessionContextService, type SetItemFeesOptions, type ShippingFee, type ShippingGroup, type ShippingGroupList, type ShippingMethod, type ShippingMethodList, type ShippingPatch, ShippingService, type ShoppingList, type ShoppingListDraft, type ShoppingListItem, ShoppingListService, type Site$1 as Site, type SiteCreated, type SiteFields, type SiteInput, type SiteList, type SiteMixin, type SiteMixinCreated, type SiteMixins, SiteService, StoredAnonymousSession, 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, type Token, type TokenInput, TokenProvider, type TokenStorage, type Tool, type ToolInput, 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, approvalStatusPatch, createCookieBackedStorage, createCookieStorage, createCore, createEmporixClient, createListenerSet, createLocalStorage, createLocalStorageStorage, createMemoryStorage, createServerStorage, createSessionStorage, emporixKey, errorFromResponse, fromWebStorage, getCustomerSessionStore, parseAnonymousSession, pickFee, productIdFromYrn, productYrn, resolveZone, serverAuth, siteMeta };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
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-D64-B1Rz.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-D64-B1Rz.js';
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-CcU93eAL.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-CcU93eAL.js';
3
3
  import { CustomerService } from './customer.js';
4
4
  export { Address, AddressCreateInput, AddressUpdateInput, ChangeEmailInput, ConfirmEmailChangeInput, Customer, CustomerSession, CustomerSignupInput, CustomerUpdateInput, PasswordChangeInput, PasswordResetConfirmInput, PasswordResetRequestInput, ResendActivationInput } from './customer.js';
5
5
  import { ProductService } from './product.js';
@@ -21,7 +21,7 @@ export { Segment, SegmentAssignmentBulkResult, SegmentBulkItem, SegmentBulkResul
21
21
  import { CompaniesService } from './companies.js';
22
22
  import { ContactsService } from './contacts.js';
23
23
  import { LocationsService } from './locations.js';
24
- 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-YZg22bFc.js';
24
+ 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-wmO0f-vj.js';
25
25
  import { OrdersService, SalesOrdersService } from './orders.js';
26
26
  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';
27
27
  import { AvailabilityService } from './availability.js';
@@ -234,6 +234,160 @@ declare function createServerStorage(jar: ServerCookieJar): EmporixStorage;
234
234
  */
235
235
  declare function serverAuth(storage: EmporixStorage): AuthContext;
236
236
 
237
+ /**
238
+ * The browser session-storage backends: memory, localStorage, sessionStorage,
239
+ * document.cookie.
240
+ *
241
+ * The contract and the framework-free backends live in `./session-storage`;
242
+ * these are the ones that need browser globals. They were in
243
+ * `@viu/emporix-sdk-react` until `@viu/emporix-sdk-angular` needed them too —
244
+ * `localStorage` is not a React API, and duplicating a storage backend per
245
+ * binding means two of them writing subtly different values under the same key.
246
+ *
247
+ * Every export is a named factory and the package sets `sideEffects: false`, so
248
+ * a Node consumer that imports none of them bundles none of them. That is
249
+ * asserted by `scripts/check-treeshake.mjs`.
250
+ */
251
+
252
+ /**
253
+ * The three methods these backends use from a Web `Storage`.
254
+ *
255
+ * Declared locally on purpose. This package compiles with `lib: ["ES2022"]` and
256
+ * no `"DOM"` — that is the invariant which keeps the SDK runnable on Node, edge
257
+ * runtimes and workers, and adding DOM to the lib to satisfy this one file would
258
+ * switch that compile-time guard off for all ~60 services. So every browser
259
+ * global below is reached through a narrowed `globalThis` instead of an ambient
260
+ * declaration, which is also the pattern the localStorage and sessionStorage
261
+ * availability checks already used before this code moved here.
262
+ */
263
+ interface WebStorageLike {
264
+ getItem(key: string): string | null;
265
+ setItem(key: string, value: string): void;
266
+ removeItem(key: string): void;
267
+ }
268
+ /**
269
+ * Internal: create a swallow-on-throw listener set used by all the storage
270
+ * backends for `subscribeAll`. Centralizes the try/catch wrapper so a buggy
271
+ * telemetry handler never breaks a storage write.
272
+ */
273
+ declare function createListenerSet<T>(): {
274
+ add(l: (value: T) => void): () => void;
275
+ notify(value: T): void;
276
+ };
277
+ /** In-memory token store. Default, SSR-safe, no persistence. */
278
+ declare function createMemoryStorage(opts?: {
279
+ initial?: string;
280
+ }): EmporixStorage;
281
+ /**
282
+ * Internal: build an {@link EmporixStorage} backed by any Web `Storage`
283
+ * instance (`localStorage` or `sessionStorage`). Both share the identical
284
+ * `getItem`/`setItem`/`removeItem` surface, so the 8-key wiring lives here once.
285
+ * Callers own the availability check + memory fallback before delegating.
286
+ */
287
+ declare function fromWebStorage(storage: WebStorageLike, opts?: {
288
+ key?: string;
289
+ }): EmporixStorage;
290
+ /**
291
+ * Browser `localStorage`-backed store: persistent and shared across tabs.
292
+ * Falls back to memory on the server (or when localStorage is unavailable).
293
+ */
294
+ declare function createLocalStorage(opts?: {
295
+ key?: string;
296
+ }): EmporixStorage;
297
+ /** @deprecated Use {@link createLocalStorage}. Kept for backward compatibility. */
298
+ declare const createLocalStorageStorage: typeof createLocalStorage;
299
+ /**
300
+ * Browser `sessionStorage`-backed store: per-tab persistence that survives a
301
+ * reload but is cleared when the tab closes and is not shared across tabs.
302
+ * Falls back to memory on the server (or when sessionStorage is unavailable).
303
+ */
304
+ declare function createSessionStorage(opts?: {
305
+ key?: string;
306
+ }): EmporixStorage;
307
+ /**
308
+ * Cookie-backed store. `Secure` defaults to on for https origins; override
309
+ * with `secure: false` only for non-https dev setups. Consumer must still pick
310
+ * an appropriate `sameSite` for CSRF safety.
311
+ */
312
+ declare function createCookieStorage(opts?: {
313
+ name?: string;
314
+ secure?: boolean;
315
+ sameSite?: "lax" | "strict" | "none";
316
+ }): EmporixStorage;
317
+
318
+ /**
319
+ * The cache-key shape every framework binding shares.
320
+ *
321
+ * Shape: `["emporix", resource, ...args, { tenant, authKind, siteCode?, language? }]`
322
+ *
323
+ * It lives in the core SDK for the same reason {@link STORAGE_KEYS} does: it is
324
+ * not a React concern. `@viu/emporix-sdk-react` and `@viu/emporix-sdk-angular`
325
+ * must produce byte-identical keys or the two bindings, the docs and the
326
+ * devtools all describe different caches. One definition is the only way that
327
+ * holds — a copy per binding would agree on the day it was written and nowhere
328
+ * after.
329
+ *
330
+ * The trailing meta object groups the discriminators that differentiate cache
331
+ * entries across tenants, auth-kinds and (where applicable) active sites.
332
+ * `siteCode` is included only when explicitly passed — non-site-aware reads
333
+ * pass `undefined` and the field is dropped.
334
+ */
335
+ declare function emporixKey<TArgs extends readonly unknown[]>(resource: string, args: TArgs, context: {
336
+ tenant: string;
337
+ authKind: string;
338
+ siteCode?: string | null;
339
+ language?: string | null;
340
+ }): readonly ["emporix", string, ...TArgs, Record<string, unknown>];
341
+ /** Which site discriminators go into the query key's meta object. */
342
+ type SiteFields = "full" | "language" | "none";
343
+ /**
344
+ * Builds the site portion of a query key's meta object. Shared by every read
345
+ * path — React's `useEmporixQuery`, its `prefetchEmporix`, and Angular's
346
+ * `emporixQueryOptions` — so none of them can disagree about which
347
+ * discriminators a resource carries. Key parity is structural, not tested.
348
+ *
349
+ * Note `null` is preserved rather than dropped: an unbound site is a distinct
350
+ * cache identity from a bound one, and {@link emporixKey} only omits a field
351
+ * when it is `undefined`.
352
+ */
353
+ declare function siteMeta(site: SiteFields, siteCode: string | null, language: string | null): {
354
+ siteCode?: string | null;
355
+ language?: string | null;
356
+ };
357
+
358
+ /**
359
+ * In-memory customer-session store, keyed by storage instance.
360
+ *
361
+ * Moved out of the React bindings: it is a subscribe/snapshot store over
362
+ * {@link EmporixStorage} with no framework API in it. React consumes it through
363
+ * `useSyncExternalStore`, Angular through a `signal` — the store itself does not
364
+ * know or care, which is exactly why it does not belong in either binding.
365
+ */
366
+
367
+ /**
368
+ * The three session tokens the customer session tracks. `token` is mirrored
369
+ * from persistent storage; `refreshToken` and `saasToken` are in-memory only
370
+ * (deliberately never persisted).
371
+ */
372
+ interface CustomerSessionState {
373
+ token: string | null;
374
+ refreshToken: string | null;
375
+ saasToken: string | null;
376
+ }
377
+ interface CustomerSessionStore {
378
+ getSnapshot: () => CustomerSessionState;
379
+ setState: (next: CustomerSessionState | ((prev: CustomerSessionState) => CustomerSessionState)) => void;
380
+ subscribe: (listener: () => void) => () => void;
381
+ }
382
+ /**
383
+ * Shared in-memory store for the customer session, keyed by the storage
384
+ * instance. Every consumer reads and writes the same store, so a login in one
385
+ * place (the auth form) is visible in another (the checkout page) — without
386
+ * this, the in-memory `saasToken` lived in a single component's local state and
387
+ * customer checkout would 401 elsewhere.
388
+ */
389
+ declare function getCustomerSessionStore(storage: EmporixStorage): CustomerSessionStore;
390
+
237
391
  /**
238
392
  * Address
239
393
  *
@@ -8564,55 +8718,6 @@ declare class ReturnsService {
8564
8718
  deleteReturn(returnId: string, auth?: AuthContext): Promise<void>;
8565
8719
  }
8566
8720
 
8567
- type CreateJob = {
8568
- siteCode: string;
8569
- };
8570
- type JobDetails = {
8571
- jobId?: string;
8572
- status?: string;
8573
- siteCode?: string;
8574
- fileId?: string;
8575
- active?: boolean;
8576
- ordersExportedCount?: number;
8577
- createdAt?: string;
8578
- completedAt?: string;
8579
- };
8580
- type JobId = {
8581
- id: string;
8582
- };
8583
-
8584
- /**
8585
- * Public types for the SEPA Export Service — stable names aliased over the
8586
- * generated `sepa-export` types.
8587
- */
8588
-
8589
- /** A SEPA export job (read / list item). */
8590
- type SepaJob = JobDetails;
8591
- /** Create-job body (`POST /jobs`). */
8592
- type SepaJobInput = CreateJob;
8593
- /** `POST /jobs` response — the created job's id. */
8594
- type SepaJobCreated = JobId;
8595
-
8596
- /**
8597
- * Emporix SEPA Export Service (`/sepa-export/{tenant}/…`): export jobs and file
8598
- * retrieval. Server-side; defaults to the service token.
8599
- *
8600
- * @deprecated since 2026-05-25, removal 2026-08-24 — the SEPA Export service is
8601
- * being sunset by Emporix; all endpoints are no longer maintained.
8602
- */
8603
- declare class SepaExportService {
8604
- private readonly ctx;
8605
- static readonly channel: "sepa-export";
8606
- constructor(ctx: ClientContext);
8607
- private base;
8608
- /** Retrieve a SEPA export file by id. Returns the raw file content (text). */
8609
- getFile(fileId: string, auth?: AuthContext): Promise<string>;
8610
- /** List export jobs. */
8611
- listJobs(query?: Record<string, string | number>, auth?: AuthContext): Promise<SepaJob[]>;
8612
- /** Create an export job. */
8613
- createJob(input: SepaJobInput, auth?: AuthContext): Promise<SepaJobCreated>;
8614
- }
8615
-
8616
8721
  /**
8617
8722
  * Informs about status of reindex job. `PENDING` means that the maximum number of parallel `IN_PROGRESS` jobs is reached and such job will be processed when one of current `IN_PROGRESS` jobs is released. `PUBLISHED` means that all the indexing events were emitted. `SUCCESS` means that all the indexing events were consumed.
8618
8723
  */
@@ -11858,7 +11963,6 @@ declare class EmporixClient {
11858
11963
  readonly invoices: InvoiceService;
11859
11964
  readonly quotes: QuoteService;
11860
11965
  readonly returns: ReturnsService;
11861
- readonly sepaExport: SepaExportService;
11862
11966
  readonly indexing: IndexingService;
11863
11967
  readonly imports: ImportService;
11864
11968
  readonly units: UnitHandlingService;
@@ -11980,4 +12084,4 @@ declare function productIdFromYrn(yrn: string | undefined): string;
11980
12084
  */
11981
12085
  declare function productYrn(tenant: string, productId: string): string;
11982
12086
 
11983
- export { type AddedPoints, type AdminCustomer, type AdminCustomerAddress, type AdminCustomerAddressInput, type AdminCustomerAddressList, type AdminCustomerAddressUpdate, type AdminCustomerCreated, type AdminCustomerImport, type AdminCustomerImportAccount, type AdminCustomerImportResult, type AdminCustomerInput, type AdminCustomerLegacyAuth, type AdminCustomerList, type AdminCustomerPatch, type AdminCustomerSearchQuery, type AdminCustomerUpdate, type AdminPasswordMigrationRetention, type AdminPasswordMigrationRetentionInput, type Agent, type AgentAnalytics, type AgentExecutions, type AgentFromTemplate, type AgentInput, type AgentPatchOp, type AgentRequestLog, type AgentSearchQuery, type AgentSessionLog, type AgentTemplate, type AgenticPatchOp, type AgentsExport, type AgentsExportRequest, type AgentsImport, type AgentsImportRequest, AiService, type AnalyticsQuery, type Approval, type ApprovalCreated, type ApprovalDecision, type ApprovalInput, type ApprovalList, type ApprovalPatch, type ApprovalPermittedInput, type ApprovalPermittedResult, ApprovalService, type ApprovalUsersQuery, type ApprovalUsersResult, type Assignee, type Attachment, type AttachmentOptions, AuthContext, AvailabilityService, type BatchNextIdEntry, type Brand, type BrandInput, type BrandList, BrandService, type BrandUpdate, type BulkInstanceResult, type BulkPatchInstanceItem, CartService, type Catalog, type CatalogCreated, type CatalogInput, type CatalogList, type CatalogPatch, CatalogService, type CatalogUpdate, CategoryService, type CgRelation, type CgRelationList, type ChatRequest, type ChatResponse, type ChatStreamOptions, CheckoutService, ClientConfigService, type ClientConfiguration, ClientContext, CloudFunctionsService, type CommerceEvents, CompaniesService, type CompletionMessage, type CompletionRequest, type CompletionResponse, type Configuration$1 as Configuration, type ConfigurationDraft, ContactsService, type Conversation, type ConversationSearchQuery, type ConversionFactorInput, type ConversionFactorResult, type ConvertUnitInput, type ConvertUnitResult, type CookieIo, type Country, type CountryList, CountryService, type CountryUpdate, type Coupon$1 as Coupon, type CouponCreated, type CouponInput, type CouponList, CouponService, type CouponUpdate, type Created, 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, type EmporixCore, EmporixError, EmporixForbiddenError, EmporixInsufficientScopeError, EmporixNetworkError, EmporixNotFoundError, EmporixServerError, type EmporixStorage, type EmporixStorageKey, EmporixTimeoutError, EmporixValidationError, type ExchangeRate, type ExchangeRateCreated, type ExchangeRateInput, type ExchangeRateList, type ExchangeRateUpdate, type ExecutionsQuery, type Fee$1 as Fee, type FeeDraft, FeeService, type FindSiteInput, type GetOptions, type IamAccessControl, type IamAccessControlCreated, type IamAccessControlUpsert, type IamGroup, type IamGroupCreate, type IamGroupCreated, AssignmentCreateRequest as IamGroupMemberAssignment, type IamGroupMemberCreated, type IamGroupMemberInput, type IamGroupUpdate, type IamScope, type IamScopeCreated, type IamScopeUpsert, IamService, type IamUser, type IamUserCreate, type IamUserCreated, type IamUserDetail, type IamUserScopes, type IamUserUpdate, type ImportCancelResult, type ImportConfig, type ImportErrorRecord, type ImportPage, type ImportPageOptions, type ImportRecordOutcome, type ImportRun, type ImportRunDetail, type ImportRunEvent, type ImportRunInput, type ImportRunMode, type ImportRunStatus, type ImportRunStream, type ImportSchedule, ImportService, type ImportStream, type ImportedRecord, type IndexConfig, type IndexConfigCreated, type IndexPublicConfig, IndexingService, type InstanceSearchBody, type InvoiceJob, type InvoiceJobCreated, type InvoiceJobDraft, InvoiceService, type InvokeCloudFunctionOptions, type ItemFee, type ItemFeeDraft, type ItemFeeSearch, type ItemFeeSearchByProductId, type ItemFeeSearchByProductIds, type Job, type JobIdResponse, type Label, type LabelInput, type LabelList, LabelService, type LabelUpdate, type ListConfigOptions, type ListCustomEntitiesOptions, type ListFeesQuery, type ListInstancesQuery, type ListQuery, type ListQuoteReasonsQuery, type ListQuotesQuery, type ListReindexJobsOptions, type ListSchemaReferencesQuery, type ListSchemasQuery, LocationsService, LogLevel, type McpServer, type McpServerInput, MediaService, type MetadataFilter, type MinimumFee, type MutateOptions, type NewPointsEntry, type NextIdCommandRequest, type NextIdOptions, type NextIdResponse, type NextIdsBatchRequest, type NextIdsBatchResponse, type OAuthConfig, type OAuthInput, type OrderCycleList, type OrderEntryEventCreate, type OrderStatusChange, OrdersService, type PackagingProductsChange, type PackingEvent, type PackingEventList, PaginatedItems, PaymentGatewayService, type PersistedAnonymousSession, type PickOrder, type PickOrderList, type PickPackAck, PickPackService, type PointsSummary, PriceService, ProductService, type ProviderModels, QueryFor, type Quote, type QuoteCreated, type QuoteDraft, type QuoteHistory, type QuoteInput, type QuoteReason, type QuoteReasonCreated, type QuoteReasonDraft, type QuoteReasonUpdate, type QuoteResult, QuoteService, type QuoteSlotInput, type QuoteUpdate, 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 ReindexEntityType, type ReindexInput, type ReindexJob, type ReindexJobInput, type ReindexJobStatus, ResolvedConfig, type ResourceCreated, type Return, type ReturnCreated, type ReturnInput, type ReturnList, type ReturnPatch, type ReturnUpdate, ReturnsService, RewardPointsService, STORAGE_KEYS, SalesOrdersService, type Schema, type SchemaAttribute, type SchemaDraft, type SchemaExport, type SchemaImportInput, type SchemaInstanceBulkCreateItem, type SchemaInstanceBulkUpsertItem, type SchemaReference, type SchemaReferenceCreated, type SchemaReferenceInput, type SchemaReferenceUpdateInput, SchemaService, type SchemaTypeName, type SchemaUpdate, type SearchImportedRecordsOptions, type SearchInstancesQuery, type SearchQuery, type SearchStreamRecordsOptions, SegmentService, SepaExportService, type SepaJob, type SepaJobCreated, type SepaJobInput, type SequenceSchema, type SequenceSchemaCreate, SequentialIdService, type ServerCookieJar, type ServiceClass, ServiceName, type SessionAttributeInput, type SessionContext, type SessionContextPatch, SessionContextService, type SetItemFeesOptions, type ShippingFee, type ShippingGroup, type ShippingGroupList, type ShippingMethod, type ShippingMethodList, type ShippingPatch, ShippingService, type ShoppingList, type ShoppingListDraft, type ShoppingListItem, ShoppingListService, type Site$1 as Site, type SiteCreated, type SiteInput, type SiteList, type SiteMixin, type SiteMixinCreated, type SiteMixins, SiteService, StoredAnonymousSession, 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, type Token, type TokenInput, TokenProvider, type TokenStorage, type Tool, type ToolInput, 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, approvalStatusPatch, createCookieBackedStorage, createCore, createEmporixClient, createServerStorage, errorFromResponse, parseAnonymousSession, pickFee, productIdFromYrn, productYrn, resolveZone, serverAuth };
12087
+ export { type AddedPoints, type AdminCustomer, type AdminCustomerAddress, type AdminCustomerAddressInput, type AdminCustomerAddressList, type AdminCustomerAddressUpdate, type AdminCustomerCreated, type AdminCustomerImport, type AdminCustomerImportAccount, type AdminCustomerImportResult, type AdminCustomerInput, type AdminCustomerLegacyAuth, type AdminCustomerList, type AdminCustomerPatch, type AdminCustomerSearchQuery, type AdminCustomerUpdate, type AdminPasswordMigrationRetention, type AdminPasswordMigrationRetentionInput, type Agent, type AgentAnalytics, type AgentExecutions, type AgentFromTemplate, type AgentInput, type AgentPatchOp, type AgentRequestLog, type AgentSearchQuery, type AgentSessionLog, type AgentTemplate, type AgenticPatchOp, type AgentsExport, type AgentsExportRequest, type AgentsImport, type AgentsImportRequest, AiService, type AnalyticsQuery, type Approval, type ApprovalCreated, type ApprovalDecision, type ApprovalInput, type ApprovalList, type ApprovalPatch, type ApprovalPermittedInput, type ApprovalPermittedResult, ApprovalService, type ApprovalUsersQuery, type ApprovalUsersResult, type Assignee, type Attachment, type AttachmentOptions, AuthContext, AvailabilityService, type BatchNextIdEntry, type Brand, type BrandInput, type BrandList, BrandService, type BrandUpdate, type BulkInstanceResult, type BulkPatchInstanceItem, CartService, type Catalog, type CatalogCreated, type CatalogInput, type CatalogList, type CatalogPatch, CatalogService, type CatalogUpdate, CategoryService, type CgRelation, type CgRelationList, type ChatRequest, type ChatResponse, type ChatStreamOptions, CheckoutService, ClientConfigService, type ClientConfiguration, ClientContext, CloudFunctionsService, type CommerceEvents, CompaniesService, type CompletionMessage, type CompletionRequest, type CompletionResponse, type Configuration$1 as Configuration, type ConfigurationDraft, ContactsService, type Conversation, type ConversationSearchQuery, type ConversionFactorInput, type ConversionFactorResult, type ConvertUnitInput, type ConvertUnitResult, type CookieIo, type Country, type CountryList, CountryService, type CountryUpdate, type Coupon$1 as Coupon, type CouponCreated, type CouponInput, type CouponList, CouponService, type CouponUpdate, type Created, type Currency, type CurrencyCreated, type CurrencyInput, type CurrencyList, CurrencyService, type CurrencyUpdate, type CustomEntity, type CustomEntityDraft, type CustomInstance, type CustomInstanceDraft, CustomerAdminService, CustomerGroupsService, CustomerService, type CustomerSessionState, type CustomerSessionStore, 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, type EmporixCore, EmporixError, EmporixForbiddenError, EmporixInsufficientScopeError, EmporixNetworkError, EmporixNotFoundError, EmporixServerError, type EmporixStorage, type EmporixStorageKey, EmporixTimeoutError, EmporixValidationError, type ExchangeRate, type ExchangeRateCreated, type ExchangeRateInput, type ExchangeRateList, type ExchangeRateUpdate, type ExecutionsQuery, type Fee$1 as Fee, type FeeDraft, FeeService, type FindSiteInput, type GetOptions, type IamAccessControl, type IamAccessControlCreated, type IamAccessControlUpsert, type IamGroup, type IamGroupCreate, type IamGroupCreated, AssignmentCreateRequest as IamGroupMemberAssignment, type IamGroupMemberCreated, type IamGroupMemberInput, type IamGroupUpdate, type IamScope, type IamScopeCreated, type IamScopeUpsert, IamService, type IamUser, type IamUserCreate, type IamUserCreated, type IamUserDetail, type IamUserScopes, type IamUserUpdate, type ImportCancelResult, type ImportConfig, type ImportErrorRecord, type ImportPage, type ImportPageOptions, type ImportRecordOutcome, type ImportRun, type ImportRunDetail, type ImportRunEvent, type ImportRunInput, type ImportRunMode, type ImportRunStatus, type ImportRunStream, type ImportSchedule, ImportService, type ImportStream, type ImportedRecord, type IndexConfig, type IndexConfigCreated, type IndexPublicConfig, IndexingService, type InstanceSearchBody, type InvoiceJob, type InvoiceJobCreated, type InvoiceJobDraft, InvoiceService, type InvokeCloudFunctionOptions, type ItemFee, type ItemFeeDraft, type ItemFeeSearch, type ItemFeeSearchByProductId, type ItemFeeSearchByProductIds, type Job, type JobIdResponse, type Label, type LabelInput, type LabelList, LabelService, type LabelUpdate, type ListConfigOptions, type ListCustomEntitiesOptions, type ListFeesQuery, type ListInstancesQuery, type ListQuery, type ListQuoteReasonsQuery, type ListQuotesQuery, type ListReindexJobsOptions, type ListSchemaReferencesQuery, type ListSchemasQuery, LocationsService, LogLevel, type McpServer, type McpServerInput, MediaService, type MetadataFilter, type MinimumFee, type MutateOptions, type NewPointsEntry, type NextIdCommandRequest, type NextIdOptions, type NextIdResponse, type NextIdsBatchRequest, type NextIdsBatchResponse, type OAuthConfig, type OAuthInput, type OrderCycleList, type OrderEntryEventCreate, type OrderStatusChange, OrdersService, type PackagingProductsChange, type PackingEvent, type PackingEventList, PaginatedItems, PaymentGatewayService, type PersistedAnonymousSession, type PickOrder, type PickOrderList, type PickPackAck, PickPackService, type PointsSummary, PriceService, ProductService, type ProviderModels, QueryFor, type Quote, type QuoteCreated, type QuoteDraft, type QuoteHistory, type QuoteInput, type QuoteReason, type QuoteReasonCreated, type QuoteReasonDraft, type QuoteReasonUpdate, type QuoteResult, QuoteService, type QuoteSlotInput, type QuoteUpdate, 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 ReindexEntityType, type ReindexInput, type ReindexJob, type ReindexJobInput, type ReindexJobStatus, ResolvedConfig, type ResourceCreated, type Return, type ReturnCreated, type ReturnInput, type ReturnList, type ReturnPatch, type ReturnUpdate, ReturnsService, RewardPointsService, STORAGE_KEYS, SalesOrdersService, type Schema, type SchemaAttribute, type SchemaDraft, type SchemaExport, type SchemaImportInput, type SchemaInstanceBulkCreateItem, type SchemaInstanceBulkUpsertItem, type SchemaReference, type SchemaReferenceCreated, type SchemaReferenceInput, type SchemaReferenceUpdateInput, SchemaService, type SchemaTypeName, type SchemaUpdate, type SearchImportedRecordsOptions, type SearchInstancesQuery, type SearchQuery, type SearchStreamRecordsOptions, SegmentService, type SequenceSchema, type SequenceSchemaCreate, SequentialIdService, type ServerCookieJar, type ServiceClass, ServiceName, type SessionAttributeInput, type SessionContext, type SessionContextPatch, SessionContextService, type SetItemFeesOptions, type ShippingFee, type ShippingGroup, type ShippingGroupList, type ShippingMethod, type ShippingMethodList, type ShippingPatch, ShippingService, type ShoppingList, type ShoppingListDraft, type ShoppingListItem, ShoppingListService, type Site$1 as Site, type SiteCreated, type SiteFields, type SiteInput, type SiteList, type SiteMixin, type SiteMixinCreated, type SiteMixins, SiteService, StoredAnonymousSession, 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, type Token, type TokenInput, TokenProvider, type TokenStorage, type Tool, type ToolInput, 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, approvalStatusPatch, createCookieBackedStorage, createCookieStorage, createCore, createEmporixClient, createListenerSet, createLocalStorage, createLocalStorageStorage, createMemoryStorage, createServerStorage, createSessionStorage, emporixKey, errorFromResponse, fromWebStorage, getCustomerSessionStore, parseAnonymousSession, pickFee, productIdFromYrn, productYrn, resolveZone, serverAuth, siteMeta };