@viu/emporix-sdk 2.4.0 → 2.5.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 CHANGED
@@ -1,5 +1,46 @@
1
1
  # @viu/emporix-sdk
2
2
 
3
+ ## 2.5.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#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.
8
+
9
+ Core `client.approvals` (`ApprovalService`): `listApprovals`, `getApproval`,
10
+ `createApproval`, `updateApproval` (JSON-Patch approve/reject), `deleteApproval`,
11
+ `checkPermitted`, and `searchApprovers`. Every endpoint is customer-token-only.
12
+
13
+ React: `useApprovals`, `useApproval`, `useCreateApproval`, and `useUpdateApproval`
14
+ (customer-only) for B2B approval self-service.
15
+
16
+ - [#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
17
+ (`client.vendors`) bindings: catalog CRUD (incl. catalogs-for-category) and
18
+ vendor + vendor-location CRUD with vendor search. Server-side only — these use
19
+ the service (clientCredentials) token.
20
+
21
+ - [#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`:
22
+ admin/seller CRUD over customer profiles (`listCustomers`, `searchCustomers`,
23
+ `getCustomer`, `createCustomer`, `upsertCustomer`, `patchCustomer`,
24
+ `deleteCustomer`) and their addresses (`listAddresses`, `getAddress`,
25
+ `addAddress`, `upsertAddress`, `patchAddress`, `deleteAddress`, `addAddressTags`,
26
+ `removeAddressTags`). Server-side only — distinct from the storefront
27
+ `client.customers`.
28
+
29
+ - [#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
30
+ (`listOrders`, `getOrder`, `updateOrder`, `finishOrder`, `listOrderCycles`),
31
+ assignees (`addAssignee`, `removeAssignee`), packaging (`updatePackaging`),
32
+ packing events (`createEvent`, `listEvents`), and recalculation jobs
33
+ (`triggerRecalculation`, `getRecalculationJob`). Server-side only.
34
+
35
+ ### Patch Changes
36
+
37
+ - [#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
38
+ `@viu/emporix-sdk` README now lists all 44 services (grouped by area) and the
39
+ correct published subpath exports; the `@viu/emporix-sdk-react` README documents
40
+ every exported hook (orders, availability, coupon, reward-points, returns,
41
+ approvals, shopping-lists, and the chunked price hook). Docs-only — no API
42
+ changes.
43
+
3
44
  ## 2.4.0
4
45
 
5
46
  ### 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` (everything) plus `./customer`, `./product`, `./category`,
129
- `./cart`, `./checkout`, `./payment`, `./price`, `./media`, `./segment`,
130
- `./companies`, `./contacts`, `./locations`, `./customer-groups`, `./availability` for tree-shaking.
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
 
@@ -1,4 +1,4 @@
1
- import { C as ClientContext, b as AuthContext } from './context-hksRbb95.cjs';
1
+ import { C as ClientContext, b as AuthContext } from './context-CgUWXqEt.cjs';
2
2
 
3
3
  type DistributionChannel = 'ASSORTMENT' | 'HOME_DELIVERY' | 'PICKUP';
4
4
  type Availability$1 = {
@@ -1,4 +1,4 @@
1
- import { C as ClientContext, b as AuthContext } from './context-hksRbb95.js';
1
+ import { C as ClientContext, b as AuthContext } from './context-CgUWXqEt.js';
2
2
 
3
3
  type DistributionChannel = 'ASSORTMENT' | 'HOME_DELIVERY' | 'PICKUP';
4
4
  type Availability$1 = {
package/dist/cart.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { C as ClientContext, b as AuthContext } from './context-hksRbb95.cjs';
1
+ import { C as ClientContext, b as AuthContext } from './context-CgUWXqEt.cjs';
2
2
 
3
3
  /**
4
4
  * Access control identifier that determines who can view or manage the cart.
package/dist/cart.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { C as ClientContext, b as AuthContext } from './context-hksRbb95.js';
1
+ import { C as ClientContext, b as AuthContext } from './context-CgUWXqEt.js';
2
2
 
3
3
  /**
4
4
  * Access control identifier that determines who can view or manage the cart.
@@ -1,4 +1,4 @@
1
- import { C as ClientContext, b as AuthContext, P as PaginatedItems } from './context-hksRbb95.cjs';
1
+ import { C as ClientContext, b as AuthContext, P as PaginatedItems } from './context-CgUWXqEt.cjs';
2
2
  import { Product } from './product.cjs';
3
3
 
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { C as ClientContext, b as AuthContext, P as PaginatedItems } from './context-hksRbb95.js';
1
+ import { C as ClientContext, b as AuthContext, P as PaginatedItems } from './context-CgUWXqEt.js';
2
2
  import { Product } from './product.js';
3
3
 
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { C as ClientContext, b as AuthContext } from './context-hksRbb95.cjs';
1
+ import { C as ClientContext, b as AuthContext } from './context-CgUWXqEt.cjs';
2
2
 
3
3
  /**
4
4
  * Information about the customer's address.
@@ -1,4 +1,4 @@
1
- import { C as ClientContext, b as AuthContext } from './context-hksRbb95.js';
1
+ import { C as ClientContext, b as AuthContext } from './context-CgUWXqEt.js';
2
2
 
3
3
  /**
4
4
  * Information about the customer's address.
@@ -1,4 +1,4 @@
1
- import { C as ClientContext, b as AuthContext } from './context-hksRbb95.cjs';
1
+ import { C as ClientContext, b as AuthContext } from './context-CgUWXqEt.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
 
@@ -1,4 +1,4 @@
1
- import { C as ClientContext, b as AuthContext } from './context-hksRbb95.js';
1
+ import { C as ClientContext, b as AuthContext } from './context-CgUWXqEt.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
 
@@ -1,4 +1,4 @@
1
- import { C as ClientContext, b as AuthContext } from './context-hksRbb95.cjs';
1
+ import { C as ClientContext, b as AuthContext } from './context-CgUWXqEt.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
 
@@ -1,4 +1,4 @@
1
- import { C as ClientContext, b as AuthContext } from './context-hksRbb95.js';
1
+ import { C as ClientContext, b as AuthContext } from './context-CgUWXqEt.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;
@@ -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;
@@ -1,4 +1,4 @@
1
- import { C as ClientContext, b as AuthContext } from './context-hksRbb95.cjs';
1
+ import { C as ClientContext, b as AuthContext } from './context-CgUWXqEt.cjs';
2
2
 
3
3
  /**
4
4
  * Hand-written mirror of the minimal IAM Service group shape needed for
@@ -1,4 +1,4 @@
1
- import { C as ClientContext, b as AuthContext } from './context-hksRbb95.js';
1
+ import { C as ClientContext, b as AuthContext } from './context-CgUWXqEt.js';
2
2
 
3
3
  /**
4
4
  * Hand-written mirror of the minimal IAM Service group shape needed for
@@ -1,4 +1,4 @@
1
- import { C as ClientContext, A as AnonymousSession, b as AuthContext } from './context-hksRbb95.cjs';
1
+ import { C as ClientContext, A as AnonymousSession, b as AuthContext } from './context-CgUWXqEt.cjs';
2
2
 
3
3
  type AccountId = {
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { C as ClientContext, A as AnonymousSession, b as AuthContext } from './context-hksRbb95.js';
1
+ import { C as ClientContext, A as AnonymousSession, b as AuthContext } from './context-CgUWXqEt.js';
2
2
 
3
3
  type AccountId = {
4
4
  /**