@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 +107 -0
- package/README.md +23 -3
- package/dist/availability.d.cts +1 -1
- package/dist/availability.d.ts +1 -1
- package/dist/cart.d.cts +1 -1
- package/dist/cart.d.ts +1 -1
- package/dist/category.d.cts +1 -1
- package/dist/category.d.ts +1 -1
- package/dist/checkout.d.cts +1 -1
- package/dist/checkout.d.ts +1 -1
- package/dist/companies.d.cts +1 -1
- package/dist/companies.d.ts +1 -1
- package/dist/contacts.d.cts +1 -1
- package/dist/contacts.d.ts +1 -1
- package/dist/{context-CQFcPZnt.d.cts → context-CgUWXqEt.d.cts} +1 -1
- package/dist/{context-CQFcPZnt.d.ts → context-CgUWXqEt.d.ts} +1 -1
- package/dist/customer-groups.d.cts +1 -1
- package/dist/customer-groups.d.ts +1 -1
- package/dist/customer.d.cts +1 -1
- package/dist/customer.d.ts +1 -1
- package/dist/index.cjs +1771 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4914 -25
- package/dist/index.d.ts +4914 -25
- package/dist/index.js +1755 -2
- package/dist/index.js.map +1 -1
- package/dist/locations.d.cts +1 -1
- package/dist/locations.d.ts +1 -1
- package/dist/media.d.cts +1 -1
- package/dist/media.d.ts +1 -1
- package/dist/orders.d.cts +1 -1
- package/dist/orders.d.ts +1 -1
- package/dist/payment.d.cts +1 -1
- package/dist/payment.d.ts +1 -1
- package/dist/price.d.cts +1 -1
- package/dist/price.d.ts +1 -1
- package/dist/product.d.cts +1 -1
- package/dist/product.d.ts +1 -1
- package/dist/segment.d.cts +1 -1
- package/dist/segment.d.ts +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,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` (
|
|
129
|
-
|
|
130
|
-
`./
|
|
144
|
+
`@viu/emporix-sdk` (the package root) re-exports **everything** — every service,
|
|
145
|
+
type, and helper. Tree-shakeable subpaths are published for the high-traffic
|
|
146
|
+
services: `./customer`, `./product`, `./category`, `./cart`, `./checkout`,
|
|
147
|
+
`./payment`, `./price`, `./media`, `./segment`, `./companies`, `./contacts`,
|
|
148
|
+
`./locations`, `./customer-groups`, `./orders`, `./availability`. All other
|
|
149
|
+
services (Tax, Coupon, RewardPoints, Shipping, Returns, Catalog, Vendor,
|
|
150
|
+
PickPack, CustomerAdmin, Approval, …) are reached from the package root.
|
|
131
151
|
|
|
132
152
|
## Authors
|
|
133
153
|
|
package/dist/availability.d.cts
CHANGED
package/dist/availability.d.ts
CHANGED
package/dist/cart.d.cts
CHANGED
package/dist/cart.d.ts
CHANGED
package/dist/category.d.cts
CHANGED
package/dist/category.d.ts
CHANGED
package/dist/checkout.d.cts
CHANGED
package/dist/checkout.d.ts
CHANGED
package/dist/companies.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as ClientContext, b as AuthContext } from './context-
|
|
1
|
+
import { C as ClientContext, b as AuthContext } from './context-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
|
|
package/dist/companies.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as ClientContext, b as AuthContext } from './context-
|
|
1
|
+
import { C as ClientContext, b as AuthContext } from './context-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
|
|
package/dist/contacts.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as ClientContext, b as AuthContext } from './context-
|
|
1
|
+
import { C as ClientContext, b as AuthContext } from './context-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
|
|
package/dist/contacts.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as ClientContext, b as AuthContext } from './context-
|
|
1
|
+
import { C as ClientContext, b as AuthContext } from './context-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;
|
package/dist/customer.d.cts
CHANGED
package/dist/customer.d.ts
CHANGED