@viu/emporix-sdk 2.2.0 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,126 @@
1
1
  # @viu/emporix-sdk
2
2
 
3
+ ## 2.4.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#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
8
+ Unit Handling (`client.units`) bindings: SEPA export jobs + file retrieval;
9
+ search-index provider configurations + reindex; unit CRUD, unit types, and
10
+ conversion commands. Server-side only — these use the service (clientCredentials)
11
+ token.
12
+
13
+ - [#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
14
+ `client.labels`: full CRUD (`listBrands`/`getBrand`/`createBrand`/`updateBrand`/
15
+ `patchBrand`/`deleteBrand` and the label equivalents). Server-side only — these
16
+ use the service (clientCredentials) token; brand reads also work anonymously.
17
+
18
+ - [#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`
19
+ (countries + regions: `listCountries`/`getCountry`/`patchCountry`/`listRegions`/
20
+ `getRegion`) and `client.currencies` (currencies + exchange rates: full CRUD on
21
+ both). Server-side only — these use the service (clientCredentials) token.
22
+
23
+ - [#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
24
+ (`listCoupons`, `getCoupon`, `createCoupon`, `updateCoupon`, `patchCoupon`,
25
+ `deleteCoupon`), validation (`validateCoupon`), redemptions (`listRedemptions`,
26
+ `redeemCoupon`, `getRedemption`, `deleteRedemption`), and referral coupons
27
+ (`getReferralCoupon`, `createReferralCoupon`). Methods default to the service
28
+ token and are auth-overridable. Adds React hooks `useValidateCoupon` and
29
+ `useRedeemCoupon` for storefront validate/redeem (browser auth context).
30
+
31
+ - [#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
32
+ (`listReturns`, `getReturn`, `createReturn`, `updateReturn`, `patchReturn`,
33
+ `deleteReturn`). Methods default to the service token and are auth-overridable;
34
+ `patchReturn` takes a JSON-Patch op-array. Adds React hooks `useMyReturns`,
35
+ `useReturn`, and `useCreateReturn` for customer self-service (browser customer
36
+ token).
37
+
38
+ - [#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
39
+ customer-points management (`listAllSummaries`, `getCustomerPoints`,
40
+ `createCustomerPoints`, `deleteCustomerPoints`, `getCustomerSummary`,
41
+ `addPoints`, `redeemPoints`), the signed-in customer's own points
42
+ (`getMyPoints`, `getMySummary`, `redeemMyPoints` → coupon code), and redeem
43
+ options (`listRedeemOptions`, `createRedeemOption`, `updateRedeemOption`,
44
+ `deleteRedeemOption`). Admin methods default to the service token; the
45
+ `/public/*` methods require a customer token. Adds React hooks
46
+ `useMyRewardPoints`, `useMyRewardPointsSummary`, `useRedeemRewardPoints` and
47
+ `useRedeemOptions`.
48
+
49
+ - [#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
50
+ (`getAreaDeliveryWindows`, `getCartDeliveryWindows`, `incrementDeliveryWindowCounter`,
51
+ `validateDeliveryWindow`), delivery times (`listDeliveryTimes`, `getDeliveryTime`,
52
+ `createDeliveryTime`, `createDeliveryTimesBulk`, `updateDeliveryTime`,
53
+ `patchDeliveryTime`, `deleteDeliveryTime`), delivery time slots (`listSlots`,
54
+ `getSlot`, `createSlot`, `updateSlot`, `patchSlot`, `deleteSlot`, `deleteAllSlots`),
55
+ and delivery cycles (`generateDeliveryCycle`). Server-side only.
56
+
57
+ - [#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`:
58
+ sites (`findSites`), zones and methods (full CRUD), cost/quote (`quote`,
59
+ `quoteMinimum`, `quoteSlot`), shipping groups, and customer-group relations.
60
+ Server-side only — these use the service (clientCredentials) token. Delivery
61
+ scheduling (windows, times, slots, cycles) is not yet bound.
62
+
63
+ - [#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
64
+ configurations (`listTaxConfigs`, `getTaxConfig`, `createTaxConfig`,
65
+ `updateTaxConfig`, `deleteTaxConfig`) and net/gross tax calculation
66
+ (`calculateTax`). Server-side only — these use the service (clientCredentials)
67
+ token and must not be called from a browser.
68
+
69
+ ## 2.3.0
70
+
71
+ ### Minor Changes
72
+
73
+ - [#67](https://github.com/viuteam/emporix-sdk/pull/67) [`97cda33`](https://github.com/viuteam/emporix-sdk/commit/97cda33466e633836c046ae00dbdde051352c5f2) Thanks [@amnael1](https://github.com/amnael1)! - Add AI RAG Indexer binding: `client.ragIndexer` exposes `ragMetadata()` and
74
+ `filterMetadata()` to discover the indexed embedding / filterable fields, plus
75
+ `reindex()` to trigger a full asynchronous index rebuild. Server-side only —
76
+ these use the service (clientCredentials) token (`ai.agent_read` /
77
+ `ai.agent_manage`) and must not be called from a browser.
78
+
79
+ - [#72](https://github.com/viuteam/emporix-sdk/pull/72) [`7a3885a`](https://github.com/viuteam/emporix-sdk/commit/7a3885ad58d20c8e5726fa9e976a68588ea90e43) Thanks [@amnael1](https://github.com/amnael1)! - Add Emporix AI Service bindings via `client.ai`: text generation
80
+ (`generateText`), chat completions (`complete`), agent CRUD (`listAgents`,
81
+ `getAgent`, `upsertAgent`, `patchAgent`, `deleteAgent`, `searchAgents`), and
82
+ synchronous / asynchronous agentic chat (`chat`, `chatAsync`). Server-side only
83
+ — these use the service (clientCredentials) token and must not be called from a
84
+ browser; both chat endpoints return arrays. Templates, import/export,
85
+ logs/sessions and tokens are not yet bound.
86
+
87
+ - [#69](https://github.com/viuteam/emporix-sdk/pull/69) [`c79332e`](https://github.com/viuteam/emporix-sdk/commit/c79332e80f478d2d5d71d820279eda74d55eb08c) Thanks [@amnael1](https://github.com/amnael1)! - Add Fee Service bindings: `client.fees` provides CRUD over fee definitions
88
+ (`list`/`get`/`create`/`update`/`delete`) plus item- and product-fee mappings
89
+ (`listItemFees`/`getItemFees`/`createItemFee`/`setItemFees`/`deleteItemFees`/
90
+ `searchItemFees`, `getProductFees`/`setProductFees`/`deleteProductFees`).
91
+ Server-side only — these use the service (clientCredentials) token and must not
92
+ be called from a browser.
93
+
94
+ - [#71](https://github.com/viuteam/emporix-sdk/pull/71) [`993a563`](https://github.com/viuteam/emporix-sdk/commit/993a563a2d6e20dcf218a1367c3f2dd5e77cce0e) Thanks [@amnael1](https://github.com/amnael1)! - Add Schema Service bindings: `client.schemas` provides CRUD over schemas
95
+ (`listSchemas`/`getSchema`/`createSchema`/`updateSchema`/`deleteSchema`) plus
96
+ `validateSchemaFile`, entity types (`listTypes`/`setSchemaTypes`), custom
97
+ entities (`listCustomEntities`/`getCustomEntity`/`createCustomEntity`/
98
+ `updateCustomEntity`/`deleteCustomEntity`), and custom instances
99
+ (`listInstances`/`getInstance`/`createInstance`/`replaceInstance`/
100
+ `patchInstance`/`deleteInstance`/`searchInstances`). Server-side only — these
101
+ use the service (clientCredentials) token and must not be called from a
102
+ browser. References, export/import and bulk instance ops are not yet exposed.
103
+
104
+ - [#68](https://github.com/viuteam/emporix-sdk/pull/68) [`9861d87`](https://github.com/viuteam/emporix-sdk/commit/9861d87a2e672400e2eaf1c90052bef62641c93f) Thanks [@amnael1](https://github.com/amnael1)! - Add Sequential ID Service binding: `client.sequentialIds` provides sequence
105
+ schema admin (`listSchemas`/`getSchema`/`createSchema`/`deleteSchema`/
106
+ `setActiveSchema`/`listSchemasByType`) and id generation (`nextId`,
107
+ `nextIdsBatch`). Server-side only — these use the service (clientCredentials)
108
+ token and must not be called from a browser.
109
+
110
+ - [#65](https://github.com/viuteam/emporix-sdk/pull/65) [`dca34d0`](https://github.com/viuteam/emporix-sdk/commit/dca34d044e54c305ea2a310ba349dc800ced331a) Thanks [@amnael1](https://github.com/amnael1)! - Add Shopping List bindings: `client.shoppingLists` (per-customer named lists —
111
+ list/create/replace/delete plus read-modify-write item helpers, last-write-wins)
112
+ and React hooks (`useShoppingLists`, `useCreateShoppingList`, `useAddToShoppingList`,
113
+ `useRemoveFromShoppingList`, `useSetShoppingListItemQuantity`, `useDeleteShoppingList`).
114
+
115
+ - [#70](https://github.com/viuteam/emporix-sdk/pull/70) [`21063a1`](https://github.com/viuteam/emporix-sdk/commit/21063a161029c9ea22278c08f89b59a36cb7fb01) Thanks [@amnael1](https://github.com/amnael1)! - Add Webhook Service bindings: `client.webhooks` provides the event-subscription
116
+ catalog + batch toggle (`listEventSubscriptions` / `updateEventSubscriptions`),
117
+ delivery-config CRUD (`listConfigs` / `getConfig` / `createConfig` /
118
+ `replaceConfig` / `patchConfig` / `deleteConfig`), `getStatistics`, and
119
+ `getDashboardAccess`. `updateEventSubscriptions` returns the HTTP-207 per-item
120
+ result array so callers can handle partial failures; `patchConfig` takes the
121
+ op-based (`UPSERT`/`REMOVE`) update array. Server-side only — these use the
122
+ service (clientCredentials) token and must not be called from a browser.
123
+
3
124
  ## 2.2.0
4
125
 
5
126
  ### Minor Changes
@@ -1,4 +1,4 @@
1
- import { C as ClientContext, b as AuthContext } from './context-Bs5ZSwds.cjs';
1
+ import { C as ClientContext, b as AuthContext } from './context-hksRbb95.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-Bs5ZSwds.js';
1
+ import { C as ClientContext, b as AuthContext } from './context-hksRbb95.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-Bs5ZSwds.cjs';
1
+ import { C as ClientContext, b as AuthContext } from './context-hksRbb95.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-Bs5ZSwds.js';
1
+ import { C as ClientContext, b as AuthContext } from './context-hksRbb95.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-Bs5ZSwds.cjs';
1
+ import { C as ClientContext, b as AuthContext, P as PaginatedItems } from './context-hksRbb95.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-Bs5ZSwds.js';
1
+ import { C as ClientContext, b as AuthContext, P as PaginatedItems } from './context-hksRbb95.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-Bs5ZSwds.cjs';
1
+ import { C as ClientContext, b as AuthContext } from './context-hksRbb95.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-Bs5ZSwds.js';
1
+ import { C as ClientContext, b as AuthContext } from './context-hksRbb95.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-Bs5ZSwds.cjs';
1
+ import { C as ClientContext, b as AuthContext } from './context-hksRbb95.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-Bs5ZSwds.js';
1
+ import { C as ClientContext, b as AuthContext } from './context-hksRbb95.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-Bs5ZSwds.cjs';
1
+ import { C as ClientContext, b as AuthContext } from './context-hksRbb95.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-Bs5ZSwds.js';
1
+ import { C as ClientContext, b as AuthContext } from './context-hksRbb95.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" | "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" | "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" | "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" | "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-Bs5ZSwds.cjs';
1
+ import { C as ClientContext, b as AuthContext } from './context-hksRbb95.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-Bs5ZSwds.js';
1
+ import { C as ClientContext, b as AuthContext } from './context-hksRbb95.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-Bs5ZSwds.cjs';
1
+ import { C as ClientContext, A as AnonymousSession, b as AuthContext } from './context-hksRbb95.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-Bs5ZSwds.js';
1
+ import { C as ClientContext, A as AnonymousSession, b as AuthContext } from './context-hksRbb95.js';
2
2
 
3
3
  type AccountId = {
4
4
  /**