@viu/emporix-sdk 3.4.1 → 3.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,53 @@
1
1
  # @viu/emporix-sdk
2
2
 
3
+ ## 3.5.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#330](https://github.com/viuteam/emporix-sdk/pull/330) [`016e339`](https://github.com/viuteam/emporix-sdk/commit/016e339c21957504d0b1842fdfcc540c0d9afac1) Thanks [@amnael1](https://github.com/amnael1)! - feat(sdk): forward sort on listReindexJobs and document the BATTERY_INCLUDED credential validation
8
+
9
+ `client.indexing.listReindexJobs({ sort })` now reaches the service. The spec has
10
+ declared `sort` on `GET /indexing/{tenant}/reindex-jobs` since the 2026-06-18
11
+ baseline sync and 11 other services already expose it, so this was drift rather
12
+ than a deliberate omission — the option existed nowhere in the SDK while every
13
+ neighbouring list method had it.
14
+
15
+ The rest is documentation for a behavioural change that arrived with the
16
+ 2026-09-06 spec sync ([#327](https://github.com/viuteam/emporix-sdk/pull/327))
17
+ and added **no** new endpoints, which is why nothing in the facade had to move:
18
+ on the `BATTERY_INCLUDED` provider every write validates the stored `indexName`
19
+ and `writeKey` against the search backend before it takes effect.
20
+
21
+ - credentials invalid → `400`, nothing written and no job created
22
+ - validation temporarily unreachable → `502`, likewise nothing written
23
+
24
+ That covers `createConfiguration`, `updateConfiguration`, `reindex`, and
25
+ `createReindexJob` when `entityType` is `PRODUCT`. The practical consequence is
26
+ in the JSDoc and in `docs/indexing.md` now: **a `400` from these calls is not
27
+ necessarily a malformed body** — it may be the write key, and the two failures
28
+ are indistinguishable from the request alone.
29
+
30
+ `docs/indexing.md` also gained the reindex-jobs API it had been missing
31
+ entirely: it documented only the deprecated `reindex()` (removal 2026-12-01),
32
+ never `createReindexJob` / `listReindexJobs` / `getReindexJob`, so it pointed
33
+ readers at the endpoint that is going away. It now also notes that every field
34
+ on `ReindexJob` is optional in the spec, `id` included, so a returned job has to
35
+ be narrowed before it can be polled.
36
+
37
+ ### Patch Changes
38
+
39
+ - [#329](https://github.com/viuteam/emporix-sdk/pull/329) [`4ba3017`](https://github.com/viuteam/emporix-sdk/commit/4ba301702ad1396324c252df2a1bbc41762481cc) Thanks [@viu-release-bot](https://github.com/apps/viu-release-bot)! - chore(sdk): sync generated types with upstream Emporix API specs
40
+
41
+ Updated services: ai-service
42
+
43
+ ## 3.4.2
44
+
45
+ ### Patch Changes
46
+
47
+ - [#327](https://github.com/viuteam/emporix-sdk/pull/327) [`64020de`](https://github.com/viuteam/emporix-sdk/commit/64020deb9b8fd5ca38a111c7359bf25de77127f2) Thanks [@viu-release-bot](https://github.com/apps/viu-release-bot)! - chore(sdk): sync generated types with upstream Emporix API specs
48
+
49
+ Updated services: indexing-service
50
+
3
51
  ## 3.4.1
4
52
 
5
53
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -1242,7 +1242,7 @@ var HttpClient = class {
1242
1242
  };
1243
1243
 
1244
1244
  // package.json
1245
- var version = "3.4.1";
1245
+ var version = "3.5.0";
1246
1246
 
1247
1247
  // src/version.ts
1248
1248
  var SDK_VERSION = version;
@@ -7947,7 +7947,7 @@ var IndexingService = class {
7947
7947
  auth: auth2
7948
7948
  });
7949
7949
  }
7950
- /** Create a configuration. */
7950
+ /** Create a configuration. Nothing is stored if credential validation fails. */
7951
7951
  async createConfiguration(input, auth2 = SERVICE28) {
7952
7952
  return this.ctx.http.request({
7953
7953
  method: "POST",
@@ -7956,7 +7956,7 @@ var IndexingService = class {
7956
7956
  body: input
7957
7957
  });
7958
7958
  }
7959
- /** Update a configuration by provider name. */
7959
+ /** Update a configuration. Left unchanged if credential validation fails. */
7960
7960
  async updateConfiguration(provider, input, auth2 = SERVICE28) {
7961
7961
  await this.ctx.http.request({
7962
7962
  method: "PUT",
@@ -7990,6 +7990,9 @@ var IndexingService = class {
7990
7990
  * given `entityType`; set `rag: true` to also rebuild the RAG vector index
7991
7991
  * (PRODUCT only). Resolves to the created job (`201`) or, when a job for that
7992
7992
  * `entityType` is already `IN_PROGRESS`, that running job (`200`).
7993
+ *
7994
+ * On `BATTERY_INCLUDED` with `entityType: "PRODUCT"` the stored credentials
7995
+ * are validated first; no job is created on the `400`/`502` cases above.
7993
7996
  */
7994
7997
  async createReindexJob(input, auth2 = SERVICE28) {
7995
7998
  return this.ctx.http.request({
@@ -8005,6 +8008,7 @@ var IndexingService = class {
8005
8008
  const pageSize = opts.pageSize ?? 50;
8006
8009
  const query = { pageNumber, pageSize };
8007
8010
  if (opts.q !== void 0) query.q = opts.q;
8011
+ if (opts.sort !== void 0) query.sort = opts.sort;
8008
8012
  return requestPage(
8009
8013
  this.ctx.http,
8010
8014
  {
@@ -8029,7 +8033,8 @@ var IndexingService = class {
8029
8033
  });
8030
8034
  }
8031
8035
  /**
8032
- * Trigger a reindex.
8036
+ * Trigger a reindex. On `BATTERY_INCLUDED` the same credential validation
8037
+ * runs first, so this can fail with `400`/`502` before any job starts.
8033
8038
  * @deprecated since 2026-06-18, removal 2026-12-01 — use {@link createReindexJob}
8034
8039
  * (`createReindexJob({ entityType: "PRODUCT" })`), which returns a trackable job.
8035
8040
  */