@viu/emporix-sdk 2.3.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,112 @@
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
+
44
+ ## 2.4.0
45
+
46
+ ### Minor Changes
47
+
48
+ - [#82](https://github.com/viuteam/emporix-sdk/pull/82) [`4b55f1d`](https://github.com/viuteam/emporix-sdk/commit/4b55f1d3cd482b6a233a6e7a1ac7de063de89526) Thanks [@amnael1](https://github.com/amnael1)! - Add Emporix SEPA Export (`client.sepaExport`), Indexing (`client.indexing`), and
49
+ Unit Handling (`client.units`) bindings: SEPA export jobs + file retrieval;
50
+ search-index provider configurations + reindex; unit CRUD, unit types, and
51
+ conversion commands. Server-side only — these use the service (clientCredentials)
52
+ token.
53
+
54
+ - [#77](https://github.com/viuteam/emporix-sdk/pull/77) [`7adb16a`](https://github.com/viuteam/emporix-sdk/commit/7adb16a289f8480bb87f8d9d271b8502c957239c) Thanks [@amnael1](https://github.com/amnael1)! - Add Emporix Brand and Label Service bindings via `client.brands` and
55
+ `client.labels`: full CRUD (`listBrands`/`getBrand`/`createBrand`/`updateBrand`/
56
+ `patchBrand`/`deleteBrand` and the label equivalents). Server-side only — these
57
+ use the service (clientCredentials) token; brand reads also work anonymously.
58
+
59
+ - [#78](https://github.com/viuteam/emporix-sdk/pull/78) [`83ed37e`](https://github.com/viuteam/emporix-sdk/commit/83ed37e4e38767358e06208e64cb87004b261744) Thanks [@amnael1](https://github.com/amnael1)! - Add Emporix Country and Currency Service bindings via `client.countries`
60
+ (countries + regions: `listCountries`/`getCountry`/`patchCountry`/`listRegions`/
61
+ `getRegion`) and `client.currencies` (currencies + exchange rates: full CRUD on
62
+ both). Server-side only — these use the service (clientCredentials) token.
63
+
64
+ - [#75](https://github.com/viuteam/emporix-sdk/pull/75) [`2174664`](https://github.com/viuteam/emporix-sdk/commit/21746648f890410a46c95c37b218bb6bbc98ebe7) Thanks [@amnael1](https://github.com/amnael1)! - Add Emporix Coupon Service bindings via `client.coupons`: coupon CRUD
65
+ (`listCoupons`, `getCoupon`, `createCoupon`, `updateCoupon`, `patchCoupon`,
66
+ `deleteCoupon`), validation (`validateCoupon`), redemptions (`listRedemptions`,
67
+ `redeemCoupon`, `getRedemption`, `deleteRedemption`), and referral coupons
68
+ (`getReferralCoupon`, `createReferralCoupon`). Methods default to the service
69
+ token and are auth-overridable. Adds React hooks `useValidateCoupon` and
70
+ `useRedeemCoupon` for storefront validate/redeem (browser auth context).
71
+
72
+ - [#81](https://github.com/viuteam/emporix-sdk/pull/81) [`f626ef6`](https://github.com/viuteam/emporix-sdk/commit/f626ef6ef25c6856c027402b854bf81bb14fe864) Thanks [@amnael1](https://github.com/amnael1)! - Add Emporix Returns Service bindings via `client.returns`: CRUD over returns
73
+ (`listReturns`, `getReturn`, `createReturn`, `updateReturn`, `patchReturn`,
74
+ `deleteReturn`). Methods default to the service token and are auth-overridable;
75
+ `patchReturn` takes a JSON-Patch op-array. Adds React hooks `useMyReturns`,
76
+ `useReturn`, and `useCreateReturn` for customer self-service (browser customer
77
+ token).
78
+
79
+ - [#76](https://github.com/viuteam/emporix-sdk/pull/76) [`2dddd6a`](https://github.com/viuteam/emporix-sdk/commit/2dddd6a213fa9d70bbaf0acc790eee51a7d813a8) Thanks [@amnael1](https://github.com/amnael1)! - Add Emporix Reward Points Service bindings via `client.rewardPoints`: admin
80
+ customer-points management (`listAllSummaries`, `getCustomerPoints`,
81
+ `createCustomerPoints`, `deleteCustomerPoints`, `getCustomerSummary`,
82
+ `addPoints`, `redeemPoints`), the signed-in customer's own points
83
+ (`getMyPoints`, `getMySummary`, `redeemMyPoints` → coupon code), and redeem
84
+ options (`listRedeemOptions`, `createRedeemOption`, `updateRedeemOption`,
85
+ `deleteRedeemOption`). Admin methods default to the service token; the
86
+ `/public/*` methods require a customer token. Adds React hooks
87
+ `useMyRewardPoints`, `useMyRewardPointsSummary`, `useRedeemRewardPoints` and
88
+ `useRedeemOptions`.
89
+
90
+ - [#80](https://github.com/viuteam/emporix-sdk/pull/80) [`46ddb50`](https://github.com/viuteam/emporix-sdk/commit/46ddb50f7fcf3f59269e60b5535db533cf984949) Thanks [@amnael1](https://github.com/amnael1)! - Extend `client.shipping` with delivery scheduling: delivery windows
91
+ (`getAreaDeliveryWindows`, `getCartDeliveryWindows`, `incrementDeliveryWindowCounter`,
92
+ `validateDeliveryWindow`), delivery times (`listDeliveryTimes`, `getDeliveryTime`,
93
+ `createDeliveryTime`, `createDeliveryTimesBulk`, `updateDeliveryTime`,
94
+ `patchDeliveryTime`, `deleteDeliveryTime`), delivery time slots (`listSlots`,
95
+ `getSlot`, `createSlot`, `updateSlot`, `patchSlot`, `deleteSlot`, `deleteAllSlots`),
96
+ and delivery cycles (`generateDeliveryCycle`). Server-side only.
97
+
98
+ - [#79](https://github.com/viuteam/emporix-sdk/pull/79) [`04b138e`](https://github.com/viuteam/emporix-sdk/commit/04b138e4c3df69786e9bcdccc9a6ce0f1c329214) Thanks [@amnael1](https://github.com/amnael1)! - Add Emporix Shipping Service bindings (Phase 1 — config) via `client.shipping`:
99
+ sites (`findSites`), zones and methods (full CRUD), cost/quote (`quote`,
100
+ `quoteMinimum`, `quoteSlot`), shipping groups, and customer-group relations.
101
+ Server-side only — these use the service (clientCredentials) token. Delivery
102
+ scheduling (windows, times, slots, cycles) is not yet bound.
103
+
104
+ - [#73](https://github.com/viuteam/emporix-sdk/pull/73) [`ce6d3c1`](https://github.com/viuteam/emporix-sdk/commit/ce6d3c1d096e5f521b3d59dad9fb266fd1d743a3) Thanks [@amnael1](https://github.com/amnael1)! - Add Emporix Tax Service bindings via `client.taxes`: CRUD over per-location tax
105
+ configurations (`listTaxConfigs`, `getTaxConfig`, `createTaxConfig`,
106
+ `updateTaxConfig`, `deleteTaxConfig`) and net/gross tax calculation
107
+ (`calculateTax`). Server-side only — these use the service (clientCredentials)
108
+ token and must not be called from a browser.
109
+
3
110
  ## 2.3.0
4
111
 
5
112
  ### 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-CQFcPZnt.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-CQFcPZnt.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-CQFcPZnt.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-CQFcPZnt.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-CQFcPZnt.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-CQFcPZnt.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-CQFcPZnt.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-CQFcPZnt.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-CQFcPZnt.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-CQFcPZnt.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-CQFcPZnt.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-CQFcPZnt.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" | "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" | "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-CQFcPZnt.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-CQFcPZnt.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-CQFcPZnt.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-CQFcPZnt.js';
1
+ import { C as ClientContext, A as AnonymousSession, b as AuthContext } from './context-CgUWXqEt.js';
2
2
 
3
3
  type AccountId = {
4
4
  /**