@viu/emporix-sdk 3.1.0 → 3.2.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,52 @@
1
1
  # @viu/emporix-sdk
2
2
 
3
+ ## 3.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#311](https://github.com/viuteam/emporix-sdk/pull/311) [`93816b2`](https://github.com/viuteam/emporix-sdk/commit/93816b231b01babfbbf42704279bcd53809462fe) Thanks [@amnael1](https://github.com/amnael1)! - feat(sdk): add the import analytics reads and failed-record retry
8
+
9
+ Five operations Emporix added to the Import Service on 2026-08-26 ([changelog](https://developer.emporix.io/changelog#import-service-analytics-and-failed-record-retry)),
10
+ all on the `importtool.import_trigger` scope the rest of that surface already uses:
11
+ - `client.imports.stats(query?)` — aggregated analytics: totals, a time series,
12
+ an error breakdown, per-stream health and stream changes. `sections` decides
13
+ which the service computes, so name what you render.
14
+ - `client.imports.listJobGroups()` — the dashboard's job groups, configurations
15
+ with their runs grouped under them.
16
+ - `client.imports.getHealthThresholds()` — the error rates above which a stream
17
+ counts as degraded or failing in `stats`. Read-only; changing them needs
18
+ `importtool.import_manage`.
19
+ - `client.imports.getLicense()` — import limits and current consumption.
20
+ - `client.imports.retryRun(runId)` — re-process only a run's failed records.
21
+
22
+ **`retryRun` returns a new run**, not a mutated original: its `id` differs and
23
+ `retry` is `true`. Poll it with `getRun` or follow it with `streamRun` exactly as
24
+ you would a triggered run. Like `triggerRun` it is not retried on a 5xx — a POST
25
+ that timed out may already have queued the retry.
26
+
27
+ The types for all five had already arrived with the spec sync, so this is the
28
+ facade catching up rather than new modelling. That is also why the gap was easy to
29
+ miss: a sync PR looks like a types-only diff, and five operations sitting there
30
+ without a wrapper show up in no diff at all.
31
+
32
+ Nothing was needed for the seven endpoints the same release _changed_. This
33
+ package's facade types are aliases of the generated ones, so the added response
34
+ fields — `aiEnabled`, `version`, `healthThresholds`, `createdBy` on a config, and
35
+ `retry` / `force` / `dryRun` on a run — were already reachable, as was `force` on
36
+ `triggerRun`'s body. Only that body's JSDoc was stale and now names all three
37
+ fields.
38
+
39
+ Upstream still marks the whole Import Service as preview; every new method says
40
+ so, like its neighbours.
41
+
42
+ ## 3.1.1
43
+
44
+ ### Patch Changes
45
+
46
+ - [#305](https://github.com/viuteam/emporix-sdk/pull/305) [`4dfeefc`](https://github.com/viuteam/emporix-sdk/commit/4dfeefcdab7fe9d6b41e31d9cee6f4763b8862f2) Thanks [@viu-release-bot](https://github.com/apps/viu-release-bot)! - chore(sdk): sync generated types with upstream Emporix API specs
47
+
48
+ Updated services: ai-service,import-service
49
+
3
50
  ## 3.1.0
4
51
 
5
52
  ### Minor 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.1.0";
1245
+ var version = "3.2.0";
1246
1246
 
1247
1247
  // src/version.ts
1248
1248
  var SDK_VERSION = version;
@@ -8267,6 +8267,91 @@ var ImportService = class {
8267
8267
  });
8268
8268
  return toPage(wire, args);
8269
8269
  }
8270
+ // ─── Analytics and retry (upstream release 2026-08-26) ─────────────────────
8271
+ /**
8272
+ * Aggregated import analytics.
8273
+ *
8274
+ * Every section is optional in the response, and `sections` is what decides
8275
+ * which the service computes — asking for all of them on a tenant with a long
8276
+ * history is the expensive call, so name the ones you render.
8277
+ *
8278
+ * `from` / `to` are ISO timestamps. Omitted, the service picks its own window;
8279
+ * do not assume it is «everything».
8280
+ *
8281
+ * **Preview upstream**: the contract may change without a major bump.
8282
+ */
8283
+ async stats(query = {}, auth2 = SERVICE29) {
8284
+ return this.ctx.http.request({
8285
+ method: "GET",
8286
+ path: `${this.base()}/stats`,
8287
+ query: { ...query },
8288
+ auth: auth2
8289
+ });
8290
+ }
8291
+ /**
8292
+ * The dashboard's job groups: configurations with their runs grouped under
8293
+ * them.
8294
+ *
8295
+ * Named after the path rather than the summary («Retrieving job groups»)
8296
+ * because the resource lives under `/dashboard` and is shaped for that view —
8297
+ * a caller wanting plain run history wants {@link listRuns}.
8298
+ *
8299
+ * **Preview upstream**: the contract may change without a major bump.
8300
+ */
8301
+ async listJobGroups(auth2 = SERVICE29) {
8302
+ return this.ctx.http.request({
8303
+ method: "GET",
8304
+ path: `${this.base()}/dashboard/job-groups`,
8305
+ auth: auth2
8306
+ });
8307
+ }
8308
+ /**
8309
+ * The tenant's health thresholds — the error rates above which a stream counts
8310
+ * as degraded or failing in {@link stats}.
8311
+ *
8312
+ * Read-only here: changing them needs `importtool.import_manage`, which this
8313
+ * service does not cover.
8314
+ *
8315
+ * **Preview upstream**: the contract may change without a major bump.
8316
+ */
8317
+ async getHealthThresholds(auth2 = SERVICE29) {
8318
+ return this.ctx.http.request({
8319
+ method: "GET",
8320
+ path: `${this.base()}/settings/health-thresholds`,
8321
+ auth: auth2
8322
+ });
8323
+ }
8324
+ /**
8325
+ * The tenant's import limits and current consumption.
8326
+ *
8327
+ * **Preview upstream**: the contract may change without a major bump.
8328
+ */
8329
+ async getLicense(auth2 = SERVICE29) {
8330
+ return this.ctx.http.request({
8331
+ method: "GET",
8332
+ path: `${this.base()}/license`,
8333
+ auth: auth2
8334
+ });
8335
+ }
8336
+ /**
8337
+ * Retry only the failed records of a finished run.
8338
+ *
8339
+ * Returns a **new** run — the retry is its own run with `retry: true`, not a
8340
+ * mutation of the original. Poll it with {@link getRun} or follow it with
8341
+ * {@link streamRun} exactly as you would a triggered run.
8342
+ *
8343
+ * Not retried on a 5xx, for the same reason {@link triggerRun} is not: a POST
8344
+ * that timed out may already have queued the retry.
8345
+ *
8346
+ * **Preview upstream**: the contract may change without a major bump.
8347
+ */
8348
+ async retryRun(runId, auth2 = SERVICE29) {
8349
+ return this.ctx.http.request({
8350
+ method: "POST",
8351
+ path: `${this.base()}/runs/${encodeURIComponent(runId)}/retry`,
8352
+ auth: auth2
8353
+ });
8354
+ }
8270
8355
  };
8271
8356
 
8272
8357
  // src/services/unit-handling.ts