@viu/emporix-sdk 4.6.3 → 4.6.5

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
@@ -5119,6 +5119,7 @@ type BaseCoupon = {
5119
5119
  discountCalculationType?: 'TOTAL' | 'SUBTOTAL';
5120
5120
  categoryRestricted?: CategoryRestricted;
5121
5121
  segmentRestricted?: SegmentRestricted;
5122
+ vendorRestricted?: VendorRestricted;
5122
5123
  restrictions?: Restrictions$1;
5123
5124
  /**
5124
5125
  * The Id of the customer who originally received the coupon (seller-only).
@@ -5209,6 +5210,7 @@ type CouponCreation = {
5209
5210
  discountCalculationType?: 'TOTAL' | 'SUBTOTAL';
5210
5211
  categoryRestricted?: CategoryRestricted;
5211
5212
  segmentRestricted?: SegmentRestricted;
5213
+ vendorRestricted?: VendorRestricted;
5212
5214
  restrictions?: Restrictions$1;
5213
5215
  /**
5214
5216
  * The Id of the customer who originally received the coupon (seller-only).
@@ -5247,6 +5249,12 @@ type SegmentRestricted = boolean;
5247
5249
  *
5248
5250
  */
5249
5251
  type CategoryRestricted = boolean;
5252
+ /**
5253
+ * Defines if the coupon applies only to products from specific vendors. If the value is `true`, `restrictions.vendors` must be provided.
5254
+ * A vendor restriction can be combined with other restriction types.
5255
+ *
5256
+ */
5257
+ type VendorRestricted = boolean;
5250
5258
  /**
5251
5259
  * Money amount
5252
5260
  *
@@ -5314,7 +5322,7 @@ type Restrictions$1 = {
5314
5322
  * Must be provided in ISO 8601 format (http://www.iso.org/iso/home/standards/iso8601.htm), e.g. '2015-01-31T23:59:59.999Z'.
5315
5323
  */
5316
5324
  validUntil?: string;
5317
- minOrderValue?: CurrencyAmount;
5325
+ minOrderValue?: CurrencyAmount & unknown;
5318
5326
  /**
5319
5327
  * The list of product's categories to which this coupon applies to. Must be defined only if the `categoryRestricted` flag is set to true. Must be disjoint with excludedCategories list.
5320
5328
  */
@@ -5327,6 +5335,10 @@ type Restrictions$1 = {
5327
5335
  * The list of segments to which this coupon applies to. Can be defined only if the `segmentRestricted` flag is set to true.
5328
5336
  */
5329
5337
  segments?: Array<string>;
5338
+ /**
5339
+ * The list of vendor identifiers to which this coupon applies. Must be provided when `vendorRestricted` is `true`, and must be empty when `vendorRestricted` is `false`.
5340
+ */
5341
+ vendors?: Array<string>;
5330
5342
  };
5331
5343
  type ResourceLocation$1 = {
5332
5344
  /**
@@ -9920,21 +9932,61 @@ type ImportRun$1 = {
9920
9932
  */
9921
9933
  origin?: string;
9922
9934
  /**
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';
9935
+ * The run status. Possible values:
9936
+ *
9937
+ * * `QUEUED` – the run waits to start. Nothing has been read yet, and the run has no per-stream
9938
+ * progress. `queueWaitingFor` says what the run waits for.
9939
+ * * `RUNNING` – the run is executing.
9940
+ * * `RESUMABLE` – the run was interrupted, for example by a service restart, and resumes automatically
9941
+ * from its last checkpoint. It is not a final status.
9942
+ * * `SUCCEEDED` – the run finished, and every record was processed.
9943
+ * * `PARTIAL` – the run finished, but not completely: some records failed, a limit skipped records,
9944
+ * or a stream was not run. The `message` field and the per-stream progress give the details.
9945
+ * * `FAILED` – the run stopped because of an error.
9946
+ * * `CANCELLED` – the run was cancelled.
9947
+ * * `ABORTED` – the service refused to start the run because of the import configuration, for example
9948
+ * mappings that have never been published or a changed target schema. Nothing was read or written.
9949
+ */
9950
+ status?: 'QUEUED' | 'RUNNING' | 'RESUMABLE' | 'SUCCEEDED' | 'PARTIAL' | 'FAILED' | 'CANCELLED' | 'ABORTED';
9926
9951
  /**
9927
9952
  * The run mode.
9928
9953
  */
9929
9954
  mode?: 'FULL' | 'DELTA';
9930
9955
  /**
9931
- * When the run started.
9956
+ * When the run was requested. If the run was queued first, it began executing later, at `executionStartedAt`.
9932
9957
  */
9933
9958
  startedAt?: string;
9959
+ /**
9960
+ * 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.
9961
+ */
9962
+ executionStartedAt?: string | null;
9934
9963
  /**
9935
9964
  * When the run finished.
9936
9965
  */
9937
9966
  finishedAt?: string;
9967
+ /**
9968
+ * `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.
9969
+ */
9970
+ queuePosition?: number;
9971
+ /**
9972
+ * `QUEUED` runs only. What the run waits for. Possible values:
9973
+ *
9974
+ * * `WORKER` – the run waits for a free worker. `queuePosition` gives its place in the queue.
9975
+ * * `PREVIOUS_RUN` – the run waits for the configuration's current run to finish.
9976
+ * * `TENANT_LIMIT` – the run waits for one of the tenant's runs to finish, because
9977
+ * `maxConcurrentImports` runs are already executing.
9978
+ *
9979
+ * The field is absent when the run is not queued, or when the service has not yet calculated it.
9980
+ */
9981
+ queueWaitingFor?: 'WORKER' | 'PREVIOUS_RUN' | 'TENANT_LIMIT';
9982
+ /**
9983
+ * 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.
9984
+ */
9985
+ supersededRequests?: number;
9986
+ /**
9987
+ * When the latest scheduled run request counted in `supersededRequests` was made. Absent when `supersededRequests` is `0`.
9988
+ */
9989
+ lastRequestedAt?: string;
9938
9990
  /**
9939
9991
  * Records read (created + updated + skipped + deleted + failed).
9940
9992
  */
@@ -9996,7 +10048,7 @@ type ImportRun$1 = {
9996
10048
  */
9997
10049
  dryRunPublished?: boolean;
9998
10050
  /**
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.
10051
+ * 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
10052
  */
10001
10053
  mappingVersions?: Array<{
10002
10054
  /**
@@ -10343,7 +10395,7 @@ type ImportLicense$1 = {
10343
10395
  */
10344
10396
  maxRecordsPerEntity?: number;
10345
10397
  /**
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`.
10398
+ * 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
10399
  */
10348
10400
  maxConcurrentImports?: number;
10349
10401
  /**
@@ -10422,7 +10474,7 @@ type ImportStatsSummary = {
10422
10474
  */
10423
10475
  skipRate?: number;
10424
10476
  /**
10425
- * The mean duration of a finished run, in seconds.
10477
+ * 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
10478
  */
10427
10479
  avgRunDurationSec?: number;
10428
10480
  /**
@@ -10438,7 +10490,7 @@ type ImportStatsSummary = {
10438
10490
  */
10439
10491
  distinctEntities?: number;
10440
10492
  /**
10441
- * The number of runs currently in progress.
10493
+ * 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
10494
  */
10443
10495
  activeRuns?: number;
10444
10496
  };
@@ -10804,9 +10856,19 @@ type ImportSchedule = Schedule;
10804
10856
  * normal one. `origin` echoes what asked for the run, and is absent on runs
10805
10857
  * recorded before that field existed.
10806
10858
  *
10859
+ * **Runs queue first** (since 2026-10-14). A requested run is `QUEUED` until a
10860
+ * worker is free, then `RUNNING`; `RESUMABLE` means it was interrupted and
10861
+ * resumes by itself — not a final status. `startedAt` is when the run was
10862
+ * requested, `executionStartedAt` when it began executing (`null` while queued).
10863
+ * A queued run carries `queueWaitingFor` (`WORKER`, `PREVIOUS_RUN` or
10864
+ * `TENANT_LIMIT`) and, while it waits for a worker, an approximate
10865
+ * `queuePosition`. `supersededRequests` counts later scheduled requests folded
10866
+ * into it, `lastRequestedAt` the latest of them.
10867
+ *
10807
10868
  * `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
10869
+ * fixed when the run starts executing — version `0` means the stream has no
10870
+ * published mappings. It is absent while the run is `QUEUED` (so on the run
10871
+ * `triggerRun` returns), on a dry run of the draft mappings and on runs recorded
10810
10872
  * before 2026-09-28. `dryRunPublished` says which mappings a dry run used.
10811
10873
  */
10812
10874
  type ImportRun = ImportRun$1;
@@ -11050,6 +11112,12 @@ declare class ImportService {
11050
11112
  * Trigger a run. `mode` defaults to `DELTA` server-side; `dryRun: true` maps
11051
11113
  * and validates without writing to the target.
11052
11114
  *
11115
+ * **The run comes back `QUEUED`, not `RUNNING`.** It starts when a worker is
11116
+ * free, usually within moments, or after one of the tenant's runs finishes when
11117
+ * `maxConcurrentImports` are already executing — no `429` any more. A
11118
+ * configuration holds at most one executing and one queued run: while it has a
11119
+ * run `QUEUED`, `RUNNING` or `RESUMABLE`, this call answers `409`.
11120
+ *
11053
11121
  * A dry run can also hand back what it *would* have written: pass
11054
11122
  * `sampleSize` (1–100, default 25) and read the run's `dryRunSample`. Set
11055
11123
  * `origin` to name what asked for the run — `trigger` only distinguishes
@@ -11113,6 +11181,9 @@ declare class ImportService {
11113
11181
  * with `accepted: false` when the run is unknown or already finished — that is
11114
11182
  * a result, not an error. A state conflict may instead come back as a `409`,
11115
11183
  * which does throw.
11184
+ *
11185
+ * A `QUEUED` run is cancelled at once, with or without `force`. A `RESUMABLE`
11186
+ * run stops only with `force: true`; without it the call answers `409`.
11116
11187
  */
11117
11188
  cancelRun(runId: string, opts?: {
11118
11189
  force?: boolean;
@@ -11183,7 +11254,9 @@ declare class ImportService {
11183
11254
  */
11184
11255
  getHealthThresholds(auth?: AuthContext): Promise<ImportHealthThresholds>;
11185
11256
  /**
11186
- * The tenant's import limits and current consumption.
11257
+ * The tenant's import limits and current consumption. `maxConcurrentImports`
11258
+ * caps executing runs only: a run beyond it waits `QUEUED` instead of being
11259
+ * rejected.
11187
11260
  *
11188
11261
  * **Preview upstream**: the contract may change without a major bump.
11189
11262
  */
@@ -11193,8 +11266,10 @@ declare class ImportService {
11193
11266
  *
11194
11267
  * Returns a **new** run — the retry is its own run with `retry: true`, not a
11195
11268
  * 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`.
11269
+ * {@link streamRun} exactly as you would a triggered run. Like one, it comes
11270
+ * back `QUEUED`, answers `409` while the configuration has a run `QUEUED`,
11271
+ * `RUNNING` or `RESUMABLE`, runs the published mappings and can finish
11272
+ * `ABORTED`.
11198
11273
  *
11199
11274
  * Not retried on a 5xx, for the same reason {@link triggerRun} is not: a POST
11200
11275
  * that timed out may already have queued the retry.
package/dist/index.d.ts CHANGED
@@ -5119,6 +5119,7 @@ type BaseCoupon = {
5119
5119
  discountCalculationType?: 'TOTAL' | 'SUBTOTAL';
5120
5120
  categoryRestricted?: CategoryRestricted;
5121
5121
  segmentRestricted?: SegmentRestricted;
5122
+ vendorRestricted?: VendorRestricted;
5122
5123
  restrictions?: Restrictions$1;
5123
5124
  /**
5124
5125
  * The Id of the customer who originally received the coupon (seller-only).
@@ -5209,6 +5210,7 @@ type CouponCreation = {
5209
5210
  discountCalculationType?: 'TOTAL' | 'SUBTOTAL';
5210
5211
  categoryRestricted?: CategoryRestricted;
5211
5212
  segmentRestricted?: SegmentRestricted;
5213
+ vendorRestricted?: VendorRestricted;
5212
5214
  restrictions?: Restrictions$1;
5213
5215
  /**
5214
5216
  * The Id of the customer who originally received the coupon (seller-only).
@@ -5247,6 +5249,12 @@ type SegmentRestricted = boolean;
5247
5249
  *
5248
5250
  */
5249
5251
  type CategoryRestricted = boolean;
5252
+ /**
5253
+ * Defines if the coupon applies only to products from specific vendors. If the value is `true`, `restrictions.vendors` must be provided.
5254
+ * A vendor restriction can be combined with other restriction types.
5255
+ *
5256
+ */
5257
+ type VendorRestricted = boolean;
5250
5258
  /**
5251
5259
  * Money amount
5252
5260
  *
@@ -5314,7 +5322,7 @@ type Restrictions$1 = {
5314
5322
  * Must be provided in ISO 8601 format (http://www.iso.org/iso/home/standards/iso8601.htm), e.g. '2015-01-31T23:59:59.999Z'.
5315
5323
  */
5316
5324
  validUntil?: string;
5317
- minOrderValue?: CurrencyAmount;
5325
+ minOrderValue?: CurrencyAmount & unknown;
5318
5326
  /**
5319
5327
  * The list of product's categories to which this coupon applies to. Must be defined only if the `categoryRestricted` flag is set to true. Must be disjoint with excludedCategories list.
5320
5328
  */
@@ -5327,6 +5335,10 @@ type Restrictions$1 = {
5327
5335
  * The list of segments to which this coupon applies to. Can be defined only if the `segmentRestricted` flag is set to true.
5328
5336
  */
5329
5337
  segments?: Array<string>;
5338
+ /**
5339
+ * The list of vendor identifiers to which this coupon applies. Must be provided when `vendorRestricted` is `true`, and must be empty when `vendorRestricted` is `false`.
5340
+ */
5341
+ vendors?: Array<string>;
5330
5342
  };
5331
5343
  type ResourceLocation$1 = {
5332
5344
  /**
@@ -9920,21 +9932,61 @@ type ImportRun$1 = {
9920
9932
  */
9921
9933
  origin?: string;
9922
9934
  /**
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';
9935
+ * The run status. Possible values:
9936
+ *
9937
+ * * `QUEUED` – the run waits to start. Nothing has been read yet, and the run has no per-stream
9938
+ * progress. `queueWaitingFor` says what the run waits for.
9939
+ * * `RUNNING` – the run is executing.
9940
+ * * `RESUMABLE` – the run was interrupted, for example by a service restart, and resumes automatically
9941
+ * from its last checkpoint. It is not a final status.
9942
+ * * `SUCCEEDED` – the run finished, and every record was processed.
9943
+ * * `PARTIAL` – the run finished, but not completely: some records failed, a limit skipped records,
9944
+ * or a stream was not run. The `message` field and the per-stream progress give the details.
9945
+ * * `FAILED` – the run stopped because of an error.
9946
+ * * `CANCELLED` – the run was cancelled.
9947
+ * * `ABORTED` – the service refused to start the run because of the import configuration, for example
9948
+ * mappings that have never been published or a changed target schema. Nothing was read or written.
9949
+ */
9950
+ status?: 'QUEUED' | 'RUNNING' | 'RESUMABLE' | 'SUCCEEDED' | 'PARTIAL' | 'FAILED' | 'CANCELLED' | 'ABORTED';
9926
9951
  /**
9927
9952
  * The run mode.
9928
9953
  */
9929
9954
  mode?: 'FULL' | 'DELTA';
9930
9955
  /**
9931
- * When the run started.
9956
+ * When the run was requested. If the run was queued first, it began executing later, at `executionStartedAt`.
9932
9957
  */
9933
9958
  startedAt?: string;
9959
+ /**
9960
+ * 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.
9961
+ */
9962
+ executionStartedAt?: string | null;
9934
9963
  /**
9935
9964
  * When the run finished.
9936
9965
  */
9937
9966
  finishedAt?: string;
9967
+ /**
9968
+ * `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.
9969
+ */
9970
+ queuePosition?: number;
9971
+ /**
9972
+ * `QUEUED` runs only. What the run waits for. Possible values:
9973
+ *
9974
+ * * `WORKER` – the run waits for a free worker. `queuePosition` gives its place in the queue.
9975
+ * * `PREVIOUS_RUN` – the run waits for the configuration's current run to finish.
9976
+ * * `TENANT_LIMIT` – the run waits for one of the tenant's runs to finish, because
9977
+ * `maxConcurrentImports` runs are already executing.
9978
+ *
9979
+ * The field is absent when the run is not queued, or when the service has not yet calculated it.
9980
+ */
9981
+ queueWaitingFor?: 'WORKER' | 'PREVIOUS_RUN' | 'TENANT_LIMIT';
9982
+ /**
9983
+ * 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.
9984
+ */
9985
+ supersededRequests?: number;
9986
+ /**
9987
+ * When the latest scheduled run request counted in `supersededRequests` was made. Absent when `supersededRequests` is `0`.
9988
+ */
9989
+ lastRequestedAt?: string;
9938
9990
  /**
9939
9991
  * Records read (created + updated + skipped + deleted + failed).
9940
9992
  */
@@ -9996,7 +10048,7 @@ type ImportRun$1 = {
9996
10048
  */
9997
10049
  dryRunPublished?: boolean;
9998
10050
  /**
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.
10051
+ * 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
10052
  */
10001
10053
  mappingVersions?: Array<{
10002
10054
  /**
@@ -10343,7 +10395,7 @@ type ImportLicense$1 = {
10343
10395
  */
10344
10396
  maxRecordsPerEntity?: number;
10345
10397
  /**
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`.
10398
+ * 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
10399
  */
10348
10400
  maxConcurrentImports?: number;
10349
10401
  /**
@@ -10422,7 +10474,7 @@ type ImportStatsSummary = {
10422
10474
  */
10423
10475
  skipRate?: number;
10424
10476
  /**
10425
- * The mean duration of a finished run, in seconds.
10477
+ * 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
10478
  */
10427
10479
  avgRunDurationSec?: number;
10428
10480
  /**
@@ -10438,7 +10490,7 @@ type ImportStatsSummary = {
10438
10490
  */
10439
10491
  distinctEntities?: number;
10440
10492
  /**
10441
- * The number of runs currently in progress.
10493
+ * 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
10494
  */
10443
10495
  activeRuns?: number;
10444
10496
  };
@@ -10804,9 +10856,19 @@ type ImportSchedule = Schedule;
10804
10856
  * normal one. `origin` echoes what asked for the run, and is absent on runs
10805
10857
  * recorded before that field existed.
10806
10858
  *
10859
+ * **Runs queue first** (since 2026-10-14). A requested run is `QUEUED` until a
10860
+ * worker is free, then `RUNNING`; `RESUMABLE` means it was interrupted and
10861
+ * resumes by itself — not a final status. `startedAt` is when the run was
10862
+ * requested, `executionStartedAt` when it began executing (`null` while queued).
10863
+ * A queued run carries `queueWaitingFor` (`WORKER`, `PREVIOUS_RUN` or
10864
+ * `TENANT_LIMIT`) and, while it waits for a worker, an approximate
10865
+ * `queuePosition`. `supersededRequests` counts later scheduled requests folded
10866
+ * into it, `lastRequestedAt` the latest of them.
10867
+ *
10807
10868
  * `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
10869
+ * fixed when the run starts executing — version `0` means the stream has no
10870
+ * published mappings. It is absent while the run is `QUEUED` (so on the run
10871
+ * `triggerRun` returns), on a dry run of the draft mappings and on runs recorded
10810
10872
  * before 2026-09-28. `dryRunPublished` says which mappings a dry run used.
10811
10873
  */
10812
10874
  type ImportRun = ImportRun$1;
@@ -11050,6 +11112,12 @@ declare class ImportService {
11050
11112
  * Trigger a run. `mode` defaults to `DELTA` server-side; `dryRun: true` maps
11051
11113
  * and validates without writing to the target.
11052
11114
  *
11115
+ * **The run comes back `QUEUED`, not `RUNNING`.** It starts when a worker is
11116
+ * free, usually within moments, or after one of the tenant's runs finishes when
11117
+ * `maxConcurrentImports` are already executing — no `429` any more. A
11118
+ * configuration holds at most one executing and one queued run: while it has a
11119
+ * run `QUEUED`, `RUNNING` or `RESUMABLE`, this call answers `409`.
11120
+ *
11053
11121
  * A dry run can also hand back what it *would* have written: pass
11054
11122
  * `sampleSize` (1–100, default 25) and read the run's `dryRunSample`. Set
11055
11123
  * `origin` to name what asked for the run — `trigger` only distinguishes
@@ -11113,6 +11181,9 @@ declare class ImportService {
11113
11181
  * with `accepted: false` when the run is unknown or already finished — that is
11114
11182
  * a result, not an error. A state conflict may instead come back as a `409`,
11115
11183
  * which does throw.
11184
+ *
11185
+ * A `QUEUED` run is cancelled at once, with or without `force`. A `RESUMABLE`
11186
+ * run stops only with `force: true`; without it the call answers `409`.
11116
11187
  */
11117
11188
  cancelRun(runId: string, opts?: {
11118
11189
  force?: boolean;
@@ -11183,7 +11254,9 @@ declare class ImportService {
11183
11254
  */
11184
11255
  getHealthThresholds(auth?: AuthContext): Promise<ImportHealthThresholds>;
11185
11256
  /**
11186
- * The tenant's import limits and current consumption.
11257
+ * The tenant's import limits and current consumption. `maxConcurrentImports`
11258
+ * caps executing runs only: a run beyond it waits `QUEUED` instead of being
11259
+ * rejected.
11187
11260
  *
11188
11261
  * **Preview upstream**: the contract may change without a major bump.
11189
11262
  */
@@ -11193,8 +11266,10 @@ declare class ImportService {
11193
11266
  *
11194
11267
  * Returns a **new** run — the retry is its own run with `retry: true`, not a
11195
11268
  * 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`.
11269
+ * {@link streamRun} exactly as you would a triggered run. Like one, it comes
11270
+ * back `QUEUED`, answers `409` while the configuration has a run `QUEUED`,
11271
+ * `RUNNING` or `RESUMABLE`, runs the published mappings and can finish
11272
+ * `ABORTED`.
11198
11273
  *
11199
11274
  * Not retried on a 5xx, for the same reason {@link triggerRun} is not: a POST
11200
11275
  * 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.5";
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.