@viu/emporix-sdk 3.1.1 → 3.2.1

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.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#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
8
+
9
+ Updated services: import-service
10
+
11
+ ## 3.2.0
12
+
13
+ ### Minor Changes
14
+
15
+ - [#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
16
+
17
+ 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)),
18
+ all on the `importtool.import_trigger` scope the rest of that surface already uses:
19
+ - `client.imports.stats(query?)` — aggregated analytics: totals, a time series,
20
+ an error breakdown, per-stream health and stream changes. `sections` decides
21
+ which the service computes, so name what you render.
22
+ - `client.imports.listJobGroups()` — the dashboard's job groups, configurations
23
+ with their runs grouped under them.
24
+ - `client.imports.getHealthThresholds()` — the error rates above which a stream
25
+ counts as degraded or failing in `stats`. Read-only; changing them needs
26
+ `importtool.import_manage`.
27
+ - `client.imports.getLicense()` — import limits and current consumption.
28
+ - `client.imports.retryRun(runId)` — re-process only a run's failed records.
29
+
30
+ **`retryRun` returns a new run**, not a mutated original: its `id` differs and
31
+ `retry` is `true`. Poll it with `getRun` or follow it with `streamRun` exactly as
32
+ you would a triggered run. Like `triggerRun` it is not retried on a 5xx — a POST
33
+ that timed out may already have queued the retry.
34
+
35
+ The types for all five had already arrived with the spec sync, so this is the
36
+ facade catching up rather than new modelling. That is also why the gap was easy to
37
+ miss: a sync PR looks like a types-only diff, and five operations sitting there
38
+ without a wrapper show up in no diff at all.
39
+
40
+ Nothing was needed for the seven endpoints the same release _changed_. This
41
+ package's facade types are aliases of the generated ones, so the added response
42
+ fields — `aiEnabled`, `version`, `healthThresholds`, `createdBy` on a config, and
43
+ `retry` / `force` / `dryRun` on a run — were already reachable, as was `force` on
44
+ `triggerRun`'s body. Only that body's JSDoc was stale and now names all three
45
+ fields.
46
+
47
+ Upstream still marks the whole Import Service as preview; every new method says
48
+ so, like its neighbours.
49
+
3
50
  ## 3.1.1
4
51
 
5
52
  ### 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.1.1";
1245
+ var version = "3.2.1";
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