@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 +41 -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-hksRbb95.d.cts → context-CgUWXqEt.d.cts} +1 -1
- package/dist/{context-hksRbb95.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 +450 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1858 -49
- package/dist/index.d.ts +1858 -49
- package/dist/index.js +446 -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,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` (
|
|
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" | "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;
|
package/dist/customer.d.cts
CHANGED
package/dist/customer.d.ts
CHANGED