@viu/emporix-sdk 4.6.3 → 4.6.4

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/dist/index.d.cts CHANGED
@@ -9920,21 +9920,61 @@ type ImportRun$1 = {
9920
9920
  */
9921
9921
  origin?: string;
9922
9922
  /**
9923
- * The run status. `ABORTED` means the service refused to start the run because of the import configuration, for example mappings that have never been published or a changed target schema. Nothing was read or written.
9924
- */
9925
- status?: 'QUEUED' | 'RUNNING' | 'SUCCEEDED' | 'PARTIAL' | 'FAILED' | 'CANCELLED' | 'ABORTED';
9923
+ * The run status. Possible values:
9924
+ *
9925
+ * * `QUEUED` – the run waits to start. Nothing has been read yet, and the run has no per-stream
9926
+ * progress. `queueWaitingFor` says what the run waits for.
9927
+ * * `RUNNING` – the run is executing.
9928
+ * * `RESUMABLE` – the run was interrupted, for example by a service restart, and resumes automatically
9929
+ * from its last checkpoint. It is not a final status.
9930
+ * * `SUCCEEDED` – the run finished, and every record was processed.
9931
+ * * `PARTIAL` – the run finished, but not completely: some records failed, a limit skipped records,
9932
+ * or a stream was not run. The `message` field and the per-stream progress give the details.
9933
+ * * `FAILED` – the run stopped because of an error.
9934
+ * * `CANCELLED` – the run was cancelled.
9935
+ * * `ABORTED` – the service refused to start the run because of the import configuration, for example
9936
+ * mappings that have never been published or a changed target schema. Nothing was read or written.
9937
+ */
9938
+ status?: 'QUEUED' | 'RUNNING' | 'RESUMABLE' | 'SUCCEEDED' | 'PARTIAL' | 'FAILED' | 'CANCELLED' | 'ABORTED';
9926
9939
  /**
9927
9940
  * The run mode.
9928
9941
  */
9929
9942
  mode?: 'FULL' | 'DELTA';
9930
9943
  /**
9931
- * When the run started.
9944
+ * When the run was requested. If the run was queued first, it began executing later, at `executionStartedAt`.
9932
9945
  */
9933
9946
  startedAt?: string;
9947
+ /**
9948
+ * When the run began executing. Equal to `startedAt`, or later by the time the run spent in the queue. `null` while the run is `QUEUED`, and on runs recorded before the field existed.
9949
+ */
9950
+ executionStartedAt?: string | null;
9934
9951
  /**
9935
9952
  * When the run finished.
9936
9953
  */
9937
9954
  finishedAt?: string;
9955
+ /**
9956
+ * `QUEUED` runs only. The run's position among the queued runs that can start, where `1` starts next. Runs of all tenants share the queue, and a tenant with fewer runs executing goes first. The value is approximate, because the queue changes while you read it. The field is absent when the run is not queued, when it waits for something other than a worker, or when the service has not yet calculated it.
9957
+ */
9958
+ queuePosition?: number;
9959
+ /**
9960
+ * `QUEUED` runs only. What the run waits for. Possible values:
9961
+ *
9962
+ * * `WORKER` – the run waits for a free worker. `queuePosition` gives its place in the queue.
9963
+ * * `PREVIOUS_RUN` – the run waits for the configuration's current run to finish.
9964
+ * * `TENANT_LIMIT` – the run waits for one of the tenant's runs to finish, because
9965
+ * `maxConcurrentImports` runs are already executing.
9966
+ *
9967
+ * The field is absent when the run is not queued, or when the service has not yet calculated it.
9968
+ */
9969
+ queueWaitingFor?: 'WORKER' | 'PREVIOUS_RUN' | 'TENANT_LIMIT';
9970
+ /**
9971
+ * The number of later scheduled run requests that were added to this run while it was queued. A configuration has at most one queued run, so a scheduled request that arrives while a real run of the whole configuration is queued does not queue a second run.
9972
+ */
9973
+ supersededRequests?: number;
9974
+ /**
9975
+ * When the latest scheduled run request counted in `supersededRequests` was made. Absent when `supersededRequests` is `0`.
9976
+ */
9977
+ lastRequestedAt?: string;
9938
9978
  /**
9939
9979
  * Records read (created + updated + skipped + deleted + failed).
9940
9980
  */
@@ -9996,7 +10036,7 @@ type ImportRun$1 = {
9996
10036
  */
9997
10037
  dryRunPublished?: boolean;
9998
10038
  /**
9999
- * The published mapping version each stream uses in this run, fixed when the run starts. Version `0` means that the stream has no published mappings. The field is absent on a dry run of the draft mappings and on runs recorded before it existed.
10039
+ * The published mapping version each stream uses in this run, fixed when the run starts executing. Version `0` means that the stream has no published mappings. The field is absent while the run is `QUEUED`, on a dry run of the draft mappings, and on runs recorded before it existed.
10000
10040
  */
10001
10041
  mappingVersions?: Array<{
10002
10042
  /**
@@ -10343,7 +10383,7 @@ type ImportLicense$1 = {
10343
10383
  */
10344
10384
  maxRecordsPerEntity?: number;
10345
10385
  /**
10346
- * The maximum number of runs that may be active at once for the tenant. A run requested beyond this limit is rejected with `429`.
10386
+ * The maximum number of runs that can execute at once for the tenant. A run requested beyond this limit is not rejected. It waits in the `QUEUED` status until one of the tenant's runs finishes.
10347
10387
  */
10348
10388
  maxConcurrentImports?: number;
10349
10389
  /**
@@ -10422,7 +10462,7 @@ type ImportStatsSummary = {
10422
10462
  */
10423
10463
  skipRate?: number;
10424
10464
  /**
10425
- * The mean duration of a finished run, in seconds.
10465
+ * The mean duration of a finished run, in seconds, measured from when the run began executing (`executionStartedAt`). Time spent in the queue is not counted.
10426
10466
  */
10427
10467
  avgRunDurationSec?: number;
10428
10468
  /**
@@ -10438,7 +10478,7 @@ type ImportStatsSummary = {
10438
10478
  */
10439
10479
  distinctEntities?: number;
10440
10480
  /**
10441
- * The number of runs currently in progress.
10481
+ * The number of runs currently in the `QUEUED`, `RUNNING`, or `RESUMABLE` status. When you filter by `streamId`, queued runs are not counted, because they have not started any stream yet.
10442
10482
  */
10443
10483
  activeRuns?: number;
10444
10484
  };
@@ -10804,9 +10844,19 @@ type ImportSchedule = Schedule;
10804
10844
  * normal one. `origin` echoes what asked for the run, and is absent on runs
10805
10845
  * recorded before that field existed.
10806
10846
  *
10847
+ * **Runs queue first** (since 2026-10-14). A requested run is `QUEUED` until a
10848
+ * worker is free, then `RUNNING`; `RESUMABLE` means it was interrupted and
10849
+ * resumes by itself — not a final status. `startedAt` is when the run was
10850
+ * requested, `executionStartedAt` when it began executing (`null` while queued).
10851
+ * A queued run carries `queueWaitingFor` (`WORKER`, `PREVIOUS_RUN` or
10852
+ * `TENANT_LIMIT`) and, while it waits for a worker, an approximate
10853
+ * `queuePosition`. `supersededRequests` counts later scheduled requests folded
10854
+ * into it, `lastRequestedAt` the latest of them.
10855
+ *
10807
10856
  * `mappingVersions` lists the published mapping version each stream runs with,
10808
- * fixed when the run starts — version `0` means the stream has no published
10809
- * mappings. It is absent on a dry run of the draft mappings and on runs recorded
10857
+ * fixed when the run starts executing — version `0` means the stream has no
10858
+ * published mappings. It is absent while the run is `QUEUED` (so on the run
10859
+ * `triggerRun` returns), on a dry run of the draft mappings and on runs recorded
10810
10860
  * before 2026-09-28. `dryRunPublished` says which mappings a dry run used.
10811
10861
  */
10812
10862
  type ImportRun = ImportRun$1;
@@ -11050,6 +11100,12 @@ declare class ImportService {
11050
11100
  * Trigger a run. `mode` defaults to `DELTA` server-side; `dryRun: true` maps
11051
11101
  * and validates without writing to the target.
11052
11102
  *
11103
+ * **The run comes back `QUEUED`, not `RUNNING`.** It starts when a worker is
11104
+ * free, usually within moments, or after one of the tenant's runs finishes when
11105
+ * `maxConcurrentImports` are already executing — no `429` any more. A
11106
+ * configuration holds at most one executing and one queued run: while it has a
11107
+ * run `QUEUED`, `RUNNING` or `RESUMABLE`, this call answers `409`.
11108
+ *
11053
11109
  * A dry run can also hand back what it *would* have written: pass
11054
11110
  * `sampleSize` (1–100, default 25) and read the run's `dryRunSample`. Set
11055
11111
  * `origin` to name what asked for the run — `trigger` only distinguishes
@@ -11113,6 +11169,9 @@ declare class ImportService {
11113
11169
  * with `accepted: false` when the run is unknown or already finished — that is
11114
11170
  * a result, not an error. A state conflict may instead come back as a `409`,
11115
11171
  * which does throw.
11172
+ *
11173
+ * A `QUEUED` run is cancelled at once, with or without `force`. A `RESUMABLE`
11174
+ * run stops only with `force: true`; without it the call answers `409`.
11116
11175
  */
11117
11176
  cancelRun(runId: string, opts?: {
11118
11177
  force?: boolean;
@@ -11183,7 +11242,9 @@ declare class ImportService {
11183
11242
  */
11184
11243
  getHealthThresholds(auth?: AuthContext): Promise<ImportHealthThresholds>;
11185
11244
  /**
11186
- * The tenant's import limits and current consumption.
11245
+ * The tenant's import limits and current consumption. `maxConcurrentImports`
11246
+ * caps executing runs only: a run beyond it waits `QUEUED` instead of being
11247
+ * rejected.
11187
11248
  *
11188
11249
  * **Preview upstream**: the contract may change without a major bump.
11189
11250
  */
@@ -11193,8 +11254,10 @@ declare class ImportService {
11193
11254
  *
11194
11255
  * Returns a **new** run — the retry is its own run with `retry: true`, not a
11195
11256
  * mutation of the original. Poll it with {@link getRun} or follow it with
11196
- * {@link streamRun} exactly as you would a triggered run. Like one, it runs the
11197
- * published mappings and can finish `ABORTED`.
11257
+ * {@link streamRun} exactly as you would a triggered run. Like one, it comes
11258
+ * back `QUEUED`, answers `409` while the configuration has a run `QUEUED`,
11259
+ * `RUNNING` or `RESUMABLE`, runs the published mappings and can finish
11260
+ * `ABORTED`.
11198
11261
  *
11199
11262
  * Not retried on a 5xx, for the same reason {@link triggerRun} is not: a POST
11200
11263
  * that timed out may already have queued the retry.
package/dist/index.d.ts CHANGED
@@ -9920,21 +9920,61 @@ type ImportRun$1 = {
9920
9920
  */
9921
9921
  origin?: string;
9922
9922
  /**
9923
- * The run status. `ABORTED` means the service refused to start the run because of the import configuration, for example mappings that have never been published or a changed target schema. Nothing was read or written.
9924
- */
9925
- status?: 'QUEUED' | 'RUNNING' | 'SUCCEEDED' | 'PARTIAL' | 'FAILED' | 'CANCELLED' | 'ABORTED';
9923
+ * The run status. Possible values:
9924
+ *
9925
+ * * `QUEUED` – the run waits to start. Nothing has been read yet, and the run has no per-stream
9926
+ * progress. `queueWaitingFor` says what the run waits for.
9927
+ * * `RUNNING` – the run is executing.
9928
+ * * `RESUMABLE` – the run was interrupted, for example by a service restart, and resumes automatically
9929
+ * from its last checkpoint. It is not a final status.
9930
+ * * `SUCCEEDED` – the run finished, and every record was processed.
9931
+ * * `PARTIAL` – the run finished, but not completely: some records failed, a limit skipped records,
9932
+ * or a stream was not run. The `message` field and the per-stream progress give the details.
9933
+ * * `FAILED` – the run stopped because of an error.
9934
+ * * `CANCELLED` – the run was cancelled.
9935
+ * * `ABORTED` – the service refused to start the run because of the import configuration, for example
9936
+ * mappings that have never been published or a changed target schema. Nothing was read or written.
9937
+ */
9938
+ status?: 'QUEUED' | 'RUNNING' | 'RESUMABLE' | 'SUCCEEDED' | 'PARTIAL' | 'FAILED' | 'CANCELLED' | 'ABORTED';
9926
9939
  /**
9927
9940
  * The run mode.
9928
9941
  */
9929
9942
  mode?: 'FULL' | 'DELTA';
9930
9943
  /**
9931
- * When the run started.
9944
+ * When the run was requested. If the run was queued first, it began executing later, at `executionStartedAt`.
9932
9945
  */
9933
9946
  startedAt?: string;
9947
+ /**
9948
+ * When the run began executing. Equal to `startedAt`, or later by the time the run spent in the queue. `null` while the run is `QUEUED`, and on runs recorded before the field existed.
9949
+ */
9950
+ executionStartedAt?: string | null;
9934
9951
  /**
9935
9952
  * When the run finished.
9936
9953
  */
9937
9954
  finishedAt?: string;
9955
+ /**
9956
+ * `QUEUED` runs only. The run's position among the queued runs that can start, where `1` starts next. Runs of all tenants share the queue, and a tenant with fewer runs executing goes first. The value is approximate, because the queue changes while you read it. The field is absent when the run is not queued, when it waits for something other than a worker, or when the service has not yet calculated it.
9957
+ */
9958
+ queuePosition?: number;
9959
+ /**
9960
+ * `QUEUED` runs only. What the run waits for. Possible values:
9961
+ *
9962
+ * * `WORKER` – the run waits for a free worker. `queuePosition` gives its place in the queue.
9963
+ * * `PREVIOUS_RUN` – the run waits for the configuration's current run to finish.
9964
+ * * `TENANT_LIMIT` – the run waits for one of the tenant's runs to finish, because
9965
+ * `maxConcurrentImports` runs are already executing.
9966
+ *
9967
+ * The field is absent when the run is not queued, or when the service has not yet calculated it.
9968
+ */
9969
+ queueWaitingFor?: 'WORKER' | 'PREVIOUS_RUN' | 'TENANT_LIMIT';
9970
+ /**
9971
+ * The number of later scheduled run requests that were added to this run while it was queued. A configuration has at most one queued run, so a scheduled request that arrives while a real run of the whole configuration is queued does not queue a second run.
9972
+ */
9973
+ supersededRequests?: number;
9974
+ /**
9975
+ * When the latest scheduled run request counted in `supersededRequests` was made. Absent when `supersededRequests` is `0`.
9976
+ */
9977
+ lastRequestedAt?: string;
9938
9978
  /**
9939
9979
  * Records read (created + updated + skipped + deleted + failed).
9940
9980
  */
@@ -9996,7 +10036,7 @@ type ImportRun$1 = {
9996
10036
  */
9997
10037
  dryRunPublished?: boolean;
9998
10038
  /**
9999
- * The published mapping version each stream uses in this run, fixed when the run starts. Version `0` means that the stream has no published mappings. The field is absent on a dry run of the draft mappings and on runs recorded before it existed.
10039
+ * The published mapping version each stream uses in this run, fixed when the run starts executing. Version `0` means that the stream has no published mappings. The field is absent while the run is `QUEUED`, on a dry run of the draft mappings, and on runs recorded before it existed.
10000
10040
  */
10001
10041
  mappingVersions?: Array<{
10002
10042
  /**
@@ -10343,7 +10383,7 @@ type ImportLicense$1 = {
10343
10383
  */
10344
10384
  maxRecordsPerEntity?: number;
10345
10385
  /**
10346
- * The maximum number of runs that may be active at once for the tenant. A run requested beyond this limit is rejected with `429`.
10386
+ * The maximum number of runs that can execute at once for the tenant. A run requested beyond this limit is not rejected. It waits in the `QUEUED` status until one of the tenant's runs finishes.
10347
10387
  */
10348
10388
  maxConcurrentImports?: number;
10349
10389
  /**
@@ -10422,7 +10462,7 @@ type ImportStatsSummary = {
10422
10462
  */
10423
10463
  skipRate?: number;
10424
10464
  /**
10425
- * The mean duration of a finished run, in seconds.
10465
+ * The mean duration of a finished run, in seconds, measured from when the run began executing (`executionStartedAt`). Time spent in the queue is not counted.
10426
10466
  */
10427
10467
  avgRunDurationSec?: number;
10428
10468
  /**
@@ -10438,7 +10478,7 @@ type ImportStatsSummary = {
10438
10478
  */
10439
10479
  distinctEntities?: number;
10440
10480
  /**
10441
- * The number of runs currently in progress.
10481
+ * The number of runs currently in the `QUEUED`, `RUNNING`, or `RESUMABLE` status. When you filter by `streamId`, queued runs are not counted, because they have not started any stream yet.
10442
10482
  */
10443
10483
  activeRuns?: number;
10444
10484
  };
@@ -10804,9 +10844,19 @@ type ImportSchedule = Schedule;
10804
10844
  * normal one. `origin` echoes what asked for the run, and is absent on runs
10805
10845
  * recorded before that field existed.
10806
10846
  *
10847
+ * **Runs queue first** (since 2026-10-14). A requested run is `QUEUED` until a
10848
+ * worker is free, then `RUNNING`; `RESUMABLE` means it was interrupted and
10849
+ * resumes by itself — not a final status. `startedAt` is when the run was
10850
+ * requested, `executionStartedAt` when it began executing (`null` while queued).
10851
+ * A queued run carries `queueWaitingFor` (`WORKER`, `PREVIOUS_RUN` or
10852
+ * `TENANT_LIMIT`) and, while it waits for a worker, an approximate
10853
+ * `queuePosition`. `supersededRequests` counts later scheduled requests folded
10854
+ * into it, `lastRequestedAt` the latest of them.
10855
+ *
10807
10856
  * `mappingVersions` lists the published mapping version each stream runs with,
10808
- * fixed when the run starts — version `0` means the stream has no published
10809
- * mappings. It is absent on a dry run of the draft mappings and on runs recorded
10857
+ * fixed when the run starts executing — version `0` means the stream has no
10858
+ * published mappings. It is absent while the run is `QUEUED` (so on the run
10859
+ * `triggerRun` returns), on a dry run of the draft mappings and on runs recorded
10810
10860
  * before 2026-09-28. `dryRunPublished` says which mappings a dry run used.
10811
10861
  */
10812
10862
  type ImportRun = ImportRun$1;
@@ -11050,6 +11100,12 @@ declare class ImportService {
11050
11100
  * Trigger a run. `mode` defaults to `DELTA` server-side; `dryRun: true` maps
11051
11101
  * and validates without writing to the target.
11052
11102
  *
11103
+ * **The run comes back `QUEUED`, not `RUNNING`.** It starts when a worker is
11104
+ * free, usually within moments, or after one of the tenant's runs finishes when
11105
+ * `maxConcurrentImports` are already executing — no `429` any more. A
11106
+ * configuration holds at most one executing and one queued run: while it has a
11107
+ * run `QUEUED`, `RUNNING` or `RESUMABLE`, this call answers `409`.
11108
+ *
11053
11109
  * A dry run can also hand back what it *would* have written: pass
11054
11110
  * `sampleSize` (1–100, default 25) and read the run's `dryRunSample`. Set
11055
11111
  * `origin` to name what asked for the run — `trigger` only distinguishes
@@ -11113,6 +11169,9 @@ declare class ImportService {
11113
11169
  * with `accepted: false` when the run is unknown or already finished — that is
11114
11170
  * a result, not an error. A state conflict may instead come back as a `409`,
11115
11171
  * which does throw.
11172
+ *
11173
+ * A `QUEUED` run is cancelled at once, with or without `force`. A `RESUMABLE`
11174
+ * run stops only with `force: true`; without it the call answers `409`.
11116
11175
  */
11117
11176
  cancelRun(runId: string, opts?: {
11118
11177
  force?: boolean;
@@ -11183,7 +11242,9 @@ declare class ImportService {
11183
11242
  */
11184
11243
  getHealthThresholds(auth?: AuthContext): Promise<ImportHealthThresholds>;
11185
11244
  /**
11186
- * The tenant's import limits and current consumption.
11245
+ * The tenant's import limits and current consumption. `maxConcurrentImports`
11246
+ * caps executing runs only: a run beyond it waits `QUEUED` instead of being
11247
+ * rejected.
11187
11248
  *
11188
11249
  * **Preview upstream**: the contract may change without a major bump.
11189
11250
  */
@@ -11193,8 +11254,10 @@ declare class ImportService {
11193
11254
  *
11194
11255
  * Returns a **new** run — the retry is its own run with `retry: true`, not a
11195
11256
  * mutation of the original. Poll it with {@link getRun} or follow it with
11196
- * {@link streamRun} exactly as you would a triggered run. Like one, it runs the
11197
- * published mappings and can finish `ABORTED`.
11257
+ * {@link streamRun} exactly as you would a triggered run. Like one, it comes
11258
+ * back `QUEUED`, answers `409` while the configuration has a run `QUEUED`,
11259
+ * `RUNNING` or `RESUMABLE`, runs the published mappings and can finish
11260
+ * `ABORTED`.
11198
11261
  *
11199
11262
  * Not retried on a 5xx, for the same reason {@link triggerRun} is not: a POST
11200
11263
  * that timed out may already have queued the retry.
package/dist/index.js CHANGED
@@ -948,7 +948,7 @@ var HttpClient = class {
948
948
  };
949
949
 
950
950
  // package.json
951
- var version = "4.6.3";
951
+ var version = "4.6.4";
952
952
 
953
953
  // src/version.ts
954
954
  var SDK_VERSION = version;
@@ -4694,6 +4694,12 @@ var ImportService = class {
4694
4694
  * Trigger a run. `mode` defaults to `DELTA` server-side; `dryRun: true` maps
4695
4695
  * and validates without writing to the target.
4696
4696
  *
4697
+ * **The run comes back `QUEUED`, not `RUNNING`.** It starts when a worker is
4698
+ * free, usually within moments, or after one of the tenant's runs finishes when
4699
+ * `maxConcurrentImports` are already executing — no `429` any more. A
4700
+ * configuration holds at most one executing and one queued run: while it has a
4701
+ * run `QUEUED`, `RUNNING` or `RESUMABLE`, this call answers `409`.
4702
+ *
4697
4703
  * A dry run can also hand back what it *would* have written: pass
4698
4704
  * `sampleSize` (1–100, default 25) and read the run's `dryRunSample`. Set
4699
4705
  * `origin` to name what asked for the run — `trigger` only distinguishes
@@ -4786,6 +4792,9 @@ var ImportService = class {
4786
4792
  * with `accepted: false` when the run is unknown or already finished — that is
4787
4793
  * a result, not an error. A state conflict may instead come back as a `409`,
4788
4794
  * which does throw.
4795
+ *
4796
+ * A `QUEUED` run is cancelled at once, with or without `force`. A `RESUMABLE`
4797
+ * run stops only with `force: true`; without it the call answers `409`.
4789
4798
  */
4790
4799
  async cancelRun(runId, opts = {}, auth2 = SERVICE23) {
4791
4800
  const query = {};
@@ -4943,7 +4952,9 @@ var ImportService = class {
4943
4952
  });
4944
4953
  }
4945
4954
  /**
4946
- * The tenant's import limits and current consumption.
4955
+ * The tenant's import limits and current consumption. `maxConcurrentImports`
4956
+ * caps executing runs only: a run beyond it waits `QUEUED` instead of being
4957
+ * rejected.
4947
4958
  *
4948
4959
  * **Preview upstream**: the contract may change without a major bump.
4949
4960
  */
@@ -4959,8 +4970,10 @@ var ImportService = class {
4959
4970
  *
4960
4971
  * Returns a **new** run — the retry is its own run with `retry: true`, not a
4961
4972
  * mutation of the original. Poll it with {@link getRun} or follow it with
4962
- * {@link streamRun} exactly as you would a triggered run. Like one, it runs the
4963
- * published mappings and can finish `ABORTED`.
4973
+ * {@link streamRun} exactly as you would a triggered run. Like one, it comes
4974
+ * back `QUEUED`, answers `409` while the configuration has a run `QUEUED`,
4975
+ * `RUNNING` or `RESUMABLE`, runs the published mappings and can finish
4976
+ * `ABORTED`.
4964
4977
  *
4965
4978
  * Not retried on a 5xx, for the same reason {@link triggerRun} is not: a POST
4966
4979
  * that timed out may already have queued the retry.