@viu/emporix-sdk 3.2.0 → 3.3.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.
Files changed (43) hide show
  1. package/CHANGELOG.md +58 -0
  2. package/README.md +1 -1
  3. package/dist/availability.d.cts +1 -1
  4. package/dist/availability.d.ts +1 -1
  5. package/dist/cart.d.cts +1 -1
  6. package/dist/cart.d.ts +1 -1
  7. package/dist/category.d.cts +1 -1
  8. package/dist/category.d.ts +1 -1
  9. package/dist/checkout.d.cts +1 -1
  10. package/dist/checkout.d.ts +1 -1
  11. package/dist/companies.d.cts +1 -1
  12. package/dist/companies.d.ts +1 -1
  13. package/dist/contacts.d.cts +1 -1
  14. package/dist/contacts.d.ts +1 -1
  15. package/dist/{context-CcU93eAL.d.cts → context-CZdtWgQO.d.cts} +1 -1
  16. package/dist/{context-CcU93eAL.d.ts → context-CZdtWgQO.d.ts} +1 -1
  17. package/dist/{customer-groups-wmO0f-vj.d.ts → customer-groups-DhrOoC8M.d.ts} +1 -1
  18. package/dist/{customer-groups-Tt9VIA-m.d.cts → customer-groups-OEnqHFsX.d.cts} +1 -1
  19. package/dist/customer-groups.d.cts +2 -2
  20. package/dist/customer-groups.d.ts +2 -2
  21. package/dist/customer.d.cts +1 -1
  22. package/dist/customer.d.ts +1 -1
  23. package/dist/index.cjs +141 -72
  24. package/dist/index.cjs.map +1 -1
  25. package/dist/index.d.cts +281 -4
  26. package/dist/index.d.ts +281 -4
  27. package/dist/index.js +141 -73
  28. package/dist/index.js.map +1 -1
  29. package/dist/locations.d.cts +1 -1
  30. package/dist/locations.d.ts +1 -1
  31. package/dist/media.d.cts +1 -1
  32. package/dist/media.d.ts +1 -1
  33. package/dist/orders.d.cts +1 -1
  34. package/dist/orders.d.ts +1 -1
  35. package/dist/payment.d.cts +1 -1
  36. package/dist/payment.d.ts +1 -1
  37. package/dist/price.d.cts +1 -1
  38. package/dist/price.d.ts +1 -1
  39. package/dist/product.d.cts +1 -1
  40. package/dist/product.d.ts +1 -1
  41. package/dist/segment.d.cts +1 -1
  42. package/dist/segment.d.ts +1 -1
  43. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,63 @@
1
1
  # @viu/emporix-sdk
2
2
 
3
+ ## 3.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#314](https://github.com/viuteam/emporix-sdk/pull/314) [`f877f94`](https://github.com/viuteam/emporix-sdk/commit/f877f949ffea4ccf5242ecea34bf9e0596bef4a5) Thanks [@amnael1](https://github.com/amnael1)! - feat(sdk): add the audit log (changelog) service
8
+
9
+ Emporix's **Audit Logs (Changelog) Service** was never in the spec registry.
10
+ It is now vendored, generated and wrapped as `client.auditLogs` — tenant-wide
11
+ change history for platform entities: who changed what, when, and from which
12
+ value to which.
13
+
14
+ ```ts
15
+ const page = await client.auditLogs.list({ q: `entity:order entityId:${orderId}` });
16
+ for (const entry of page.items) {
17
+ console.log(entry.at, entry.actor, entry.paths); // { status: { before, after } }
18
+ }
19
+ ```
20
+
21
+ The whole upstream surface is **one paginated read**
22
+ (`GET /changelog/{tenant}/changelogs`), so the facade is one method.
23
+
24
+ **Service-account only**, on the `changelog.changelog_read` scope
25
+ (`changelog.changelog_manage` also grants it). There is no customer or anonymous
26
+ variant, so `@viu/emporix-sdk-react` and `@viu/emporix-sdk-angular` ship no
27
+ bindings for it — call it from a server.
28
+
29
+ Two behaviours the spec documents in prose rather than in its schema, and which
30
+ the JSDoc and [`docs/audit-logs.md`](https://github.com/viuteam/emporix-sdk/blob/main/docs/audit-logs.md)
31
+ now repeat where you will actually read them:
32
+ - **The window defaults to the last 30 days.** A query with no conjunctive
33
+ `occurredAt` lower bound gets a silent trailing 30-day window, so an
34
+ unfiltered `list()` is «the last month», not «everything ever». An
35
+ `occurredAt` that appears only inside an `OR` arm does not lift it.
36
+ - **`entityId` requires `entity`.** Filtering by id alone is a `400`, not an
37
+ empty page — and there is no path-based history endpoint, so scoping to one
38
+ document means naming both in `q`.
39
+
40
+ Paging is one-based and arrives in the response body rather than in
41
+ `X-Total-Count` headers, so `AuditLogPage` carries `totalElements` and
42
+ `totalPages` on top of the usual `PaginatedItems` shape — the same treatment
43
+ `ImportPage` gets. `pageSize` maxes out at 100; the service answers a larger
44
+ value with a `400` instead of clamping it.
45
+
46
+ `q` is a plain `string` here, deliberately not a `QueryFor<E>` mixin filter: a
47
+ `MixinFilter` targets an entity's own fields, and this endpoint indexes change
48
+ metadata rather than the document.
49
+
50
+ Upstream marks the service as preview — the contract may change without a major
51
+ version bump, and nearly every field of an entry is optional in the spec.
52
+
53
+ ## 3.2.1
54
+
55
+ ### Patch Changes
56
+
57
+ - [#312](https://github.com/viuteam/emporix-sdk/pull/312) [`bd78d7b`](https://github.com/viuteam/emporix-sdk/commit/bd78d7bb77b22df12f32f9d9f6289058183cddb2) Thanks [@viu-release-bot](https://github.com/apps/viu-release-bot)! - chore(sdk): sync generated types with upstream Emporix API specs
58
+
59
+ Updated services: import-service
60
+
3
61
  ## 3.2.0
4
62
 
5
63
  ### Minor Changes
package/README.md CHANGED
@@ -65,7 +65,7 @@ property on the `EmporixClient` instance:
65
65
  | Cart & checkout | `carts`, `checkout`, `payments`, `coupons`, `taxes`, `shipping`, `fees` |
66
66
  | Orders & fulfilment | `orders`, `salesOrders`, `quotes`, `invoices`, `returns`, `pickPack`, `availability`, `indexing` |
67
67
  | Customers & B2B | `customers`, `customerAdmin`, `companies`, `contacts`, `locations`, `customerGroups`, `approvals`, `rewardPoints`, `segments`, `iam` |
68
- | Platform & config | `sites`, `sessionContext`, `tenantConfig`, `clientConfig`, `media`, `schemas`, `webhooks`, `sequentialIds`, `units`, `countries`, `currencies`, `vendors`, `shoppingLists`, `cloudFunctions`, `ai`, `ragIndexer`, `imports` |
68
+ | Platform & config | `sites`, `sessionContext`, `tenantConfig`, `clientConfig`, `media`, `schemas`, `webhooks`, `sequentialIds`, `units`, `countries`, `currencies`, `vendors`, `shoppingLists`, `cloudFunctions`, `ai`, `ragIndexer`, `imports`, `auditLogs` |
69
69
 
70
70
  The sections below highlight the most-used services; per-service guides live in
71
71
  [`../../docs/`](../../docs).
@@ -1,4 +1,4 @@
1
- import { C as ClientContext, b as AuthContext, P as PaginatedItems } from './context-CcU93eAL.cjs';
1
+ import { C as ClientContext, b as AuthContext, P as PaginatedItems } from './context-CZdtWgQO.cjs';
2
2
 
3
3
  type AvailabilityDto = {
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { C as ClientContext, b as AuthContext, P as PaginatedItems } from './context-CcU93eAL.js';
1
+ import { C as ClientContext, b as AuthContext, P as PaginatedItems } from './context-CZdtWgQO.js';
2
2
 
3
3
  type AvailabilityDto = {
4
4
  /**
package/dist/cart.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { C as ClientContext, b as AuthContext } from './context-CcU93eAL.cjs';
1
+ import { C as ClientContext, b as AuthContext } from './context-CZdtWgQO.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-CcU93eAL.js';
1
+ import { C as ClientContext, b as AuthContext } from './context-CZdtWgQO.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-CcU93eAL.cjs';
1
+ import { C as ClientContext, b as AuthContext, P as PaginatedItems } from './context-CZdtWgQO.cjs';
2
2
  import { a as QueryFor } from './query-mLQs2WFr.cjs';
3
3
  import { Product } from './product.cjs';
4
4
 
@@ -1,4 +1,4 @@
1
- import { C as ClientContext, b as AuthContext, P as PaginatedItems } from './context-CcU93eAL.js';
1
+ import { C as ClientContext, b as AuthContext, P as PaginatedItems } from './context-CZdtWgQO.js';
2
2
  import { a as QueryFor } from './query-mLQs2WFr.js';
3
3
  import { Product } from './product.js';
4
4
 
@@ -1,4 +1,4 @@
1
- import { C as ClientContext, b as AuthContext } from './context-CcU93eAL.cjs';
1
+ import { C as ClientContext, b as AuthContext } from './context-CZdtWgQO.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-CcU93eAL.js';
1
+ import { C as ClientContext, b as AuthContext } from './context-CZdtWgQO.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-CcU93eAL.cjs';
1
+ import { C as ClientContext, b as AuthContext } from './context-CZdtWgQO.cjs';
2
2
  import { L as LegalEntity, e as LegalEntityCreate, f as LegalEntityUpdate } from './types.gen-fWB4nrso.cjs';
3
3
  export { A as AccountLimit, d as CustomerGroup, g as LegalInfo } from './types.gen-fWB4nrso.cjs';
4
4
 
@@ -1,4 +1,4 @@
1
- import { C as ClientContext, b as AuthContext } from './context-CcU93eAL.js';
1
+ import { C as ClientContext, b as AuthContext } from './context-CZdtWgQO.js';
2
2
  import { L as LegalEntity, e as LegalEntityCreate, f as LegalEntityUpdate } from './types.gen-fWB4nrso.js';
3
3
  export { A as AccountLimit, d as CustomerGroup, g as LegalInfo } from './types.gen-fWB4nrso.js';
4
4
 
@@ -1,4 +1,4 @@
1
- import { C as ClientContext, b as AuthContext } from './context-CcU93eAL.cjs';
1
+ import { C as ClientContext, b as AuthContext } from './context-CZdtWgQO.cjs';
2
2
  import { C as ContactAssignment, a as ContactAssignmentCreate, b as ContactAssignmentUpdate } from './types.gen-fWB4nrso.cjs';
3
3
 
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { C as ClientContext, b as AuthContext } from './context-CcU93eAL.js';
1
+ import { C as ClientContext, b as AuthContext } from './context-CZdtWgQO.js';
2
2
  import { C as ContactAssignment, a as ContactAssignmentCreate, b as ContactAssignmentUpdate } from './types.gen-fWB4nrso.js';
3
3
 
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" | "indexing" | "import" | "unit-handling" | "catalog" | "vendor" | "pick-pack" | "customer-admin" | "approval" | "invoice" | "quote" | "cloud-functions" | "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" | "indexing" | "import" | "audit-log" | "unit-handling" | "catalog" | "vendor" | "pick-pack" | "customer-admin" | "approval" | "invoice" | "quote" | "cloud-functions" | "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" | "indexing" | "import" | "unit-handling" | "catalog" | "vendor" | "pick-pack" | "customer-admin" | "approval" | "invoice" | "quote" | "cloud-functions" | "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" | "indexing" | "import" | "audit-log" | "unit-handling" | "catalog" | "vendor" | "pick-pack" | "customer-admin" | "approval" | "invoice" | "quote" | "cloud-functions" | "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-CcU93eAL.js';
1
+ import { C as ClientContext, b as AuthContext } from './context-CZdtWgQO.js';
2
2
 
3
3
  /**
4
4
  * Access control metadata.
@@ -1,4 +1,4 @@
1
- import { C as ClientContext, b as AuthContext } from './context-CcU93eAL.cjs';
1
+ import { C as ClientContext, b as AuthContext } from './context-CZdtWgQO.cjs';
2
2
 
3
3
  /**
4
4
  * Access control metadata.
@@ -1,2 +1,2 @@
1
- export { g as CustomerGroupsService, j as IamGroup, c as IamGroupMemberAssignment } from './customer-groups-Tt9VIA-m.cjs';
2
- import './context-CcU93eAL.cjs';
1
+ export { g as CustomerGroupsService, j as IamGroup, c as IamGroupMemberAssignment } from './customer-groups-OEnqHFsX.cjs';
2
+ import './context-CZdtWgQO.cjs';
@@ -1,2 +1,2 @@
1
- export { g as CustomerGroupsService, j as IamGroup, c as IamGroupMemberAssignment } from './customer-groups-wmO0f-vj.js';
2
- import './context-CcU93eAL.js';
1
+ export { g as CustomerGroupsService, j as IamGroup, c as IamGroupMemberAssignment } from './customer-groups-DhrOoC8M.js';
2
+ import './context-CZdtWgQO.js';
@@ -1,4 +1,4 @@
1
- import { C as ClientContext, A as AnonymousSession, b as AuthContext } from './context-CcU93eAL.cjs';
1
+ import { C as ClientContext, A as AnonymousSession, b as AuthContext } from './context-CZdtWgQO.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-CcU93eAL.js';
1
+ import { C as ClientContext, A as AnonymousSession, b as AuthContext } from './context-CZdtWgQO.js';
2
2
 
3
3
  type AccountId = {
4
4
  /**