@qtsurfer/api-client 0.19.0 → 0.20.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.
@@ -121,6 +121,9 @@ import type {
121
121
  UpdateLiveParamsData,
122
122
  UpdateLiveParamsResponse,
123
123
  UpdateLiveParamsError,
124
+ SendLiveCommandData,
125
+ SendLiveCommandResponse,
126
+ SendLiveCommandError,
124
127
  GetLiveRunSignalsData,
125
128
  GetLiveRunSignalsResponse,
126
129
  GetLiveRunSignalsError,
@@ -374,6 +377,10 @@ export const downloadKlines = <ThrowOnError extends boolean = false>(
374
377
  * many strategies you have. Check a specific strategy's validation with `GET
375
378
  * /strategy/{strategyId}`.
376
379
  *
380
+ * With `includeDeleted=true`, strategies you have deleted are listed too, each with the
381
+ * `deletedAt` it was deleted at — useful to keep a copy of your list in sync, telling a
382
+ * deleted strategy apart from one that never existed.
383
+ *
377
384
  */
378
385
  export const listStrategies = <ThrowOnError extends boolean = false>(
379
386
  options?: Options<ListStrategiesData, ThrowOnError>
@@ -411,6 +418,11 @@ export const listStrategies = <ThrowOnError extends boolean = false>(
411
418
  * included, is read from `GET /strategy/{strategyId}`. One place to ask, so there is no second
412
419
  * answer to keep in step.
413
420
  *
421
+ * A `200` means the source parsed and compiled, not that it will run. What only shows once the
422
+ * strategy sets up its indicators is found by `validate`: for QTScript, a window on an indicator
423
+ * name that is not registered (`window nosuch m1 { ... }`) registers, and `validate` ends `failed`
424
+ * on that line.
425
+ *
414
426
  * For **Java**, the `strategyId` is derived from what the code *means*, not from how it is
415
427
  * written. Adding a comment, inserting a blank line, re-indenting, reordering imports, or
416
428
  * moving a method around all return the **same** id — you have not created a second strategy.
@@ -976,6 +988,10 @@ export const getBacktestResult = <ThrowOnError extends boolean = false>(
976
988
  * Every dataset you have created and not deleted, most recently created first. Never a `404`
977
989
  * — an empty array if you have none, same convention as `GET /strategies`.
978
990
  *
991
+ * With `includeDeleted=true`, datasets you have deleted are listed too, each with the
992
+ * `deletedAt` it was deleted at — useful to keep a copy of your list in sync, telling a
993
+ * deleted dataset apart from one that never existed.
994
+ *
979
995
  */
980
996
  export const listDatasets = <ThrowOnError extends boolean = false>(
981
997
  options?: Options<ListDatasetsData, ThrowOnError>
@@ -1408,8 +1424,9 @@ export const listLive = <ThrowOnError extends boolean = false>(
1408
1424
 
1409
1425
  /**
1410
1426
  * Browse public live runs
1411
- * Every run whose owner marked it `public` and is currently live and running — anyone's,
1412
- * yours included, and listed without revealing who owns it. Most recently started first.
1427
+ * Every run whose owner marked it `public`, that has been promoted to `live` and is running —
1428
+ * anyone's, yours included, and listed without revealing who owns it. A `public` run still in
1429
+ * its `sandbox` trial is not listed. Most recently started first.
1413
1430
  *
1414
1431
  * This is the only `Live Execution` endpoint that needs no `Authorization` header.
1415
1432
  *
@@ -1498,6 +1515,46 @@ export const updateLiveParams = <ThrowOnError extends boolean = false>(
1498
1515
  });
1499
1516
  };
1500
1517
 
1518
+ /**
1519
+ * Tell a running strategy a command
1520
+ * Tells a running strategy something **while it stays live**, without restarting it — for a strategy that
1521
+ * implements the engine's `CommandRequestHandler`. Owner only.
1522
+ *
1523
+ * A command is an event, not a stored setting: it is delivered once to every execution behind the run, at
1524
+ * the same market position, and nothing about it is written to the run's state. **It is transient** — a
1525
+ * replica that restarts replays only its recent market history, so a command from before that only reaches
1526
+ * one that was already running when it arrived. Anything the strategy needs to remember across a restart
1527
+ * belongs in a parameter (`PUT /live/{runId}/params`), which does have a stored value; a command does not.
1528
+ *
1529
+ * The command's text is a plain string; an optional `properties` object of your own choosing travels
1530
+ * alongside it. Each entry lands as a top-level entry on the `CommandRequest` the handler receives —
1531
+ * `request.get("<key>")` in Java, `$command.<key>` sugar in QTScript — no key is off limits, since the
1532
+ * command's own text is kept separately.
1533
+ *
1534
+ */
1535
+ export const sendLiveCommand = <ThrowOnError extends boolean = false>(
1536
+ options: Options<SendLiveCommandData, ThrowOnError>
1537
+ ) => {
1538
+ return (options.client ?? _heyApiClient).post<
1539
+ SendLiveCommandResponse,
1540
+ SendLiveCommandError,
1541
+ ThrowOnError
1542
+ >({
1543
+ security: [
1544
+ {
1545
+ scheme: "bearer",
1546
+ type: "http",
1547
+ },
1548
+ ],
1549
+ url: "/live/{runId}/commands",
1550
+ ...options,
1551
+ headers: {
1552
+ "Content-Type": "application/json",
1553
+ ...options?.headers,
1554
+ },
1555
+ });
1556
+ };
1557
+
1501
1558
  /**
1502
1559
  * Read a run's signals
1503
1560
  * Returns one page of the signals a run has already produced, newest-last, optionally from a
@@ -1521,8 +1578,9 @@ export const updateLiveParams = <ThrowOnError extends boolean = false>(
1521
1578
  * serving a shortened page that looks complete. Treat that as a normal outcome: read
1522
1579
  * `availableSinceMs` from the error and start again from there.
1523
1580
  *
1524
- * Readable by the run's owner, and by anyone if the run is `public` — the same rule the
1525
- * signal channel applies to a subscription.
1581
+ * Readable by the run's owner, and by anyone if the run is `public` and has reached the `live`
1582
+ * stage — the same rule the signal channel applies to a subscription. A `sandbox` run is read
1583
+ * by its owner only, whatever visibility it asked for.
1526
1584
  *
1527
1585
  */
1528
1586
  export const getLiveRunSignals = <ThrowOnError extends boolean = false>(
@@ -1556,8 +1614,8 @@ export const getLiveRunSignals = <ThrowOnError extends boolean = false>(
1556
1614
  * mark`, taken every minute of market time). Until either exists the account holds its
1557
1615
  * starting capital.
1558
1616
  *
1559
- * Readable by the run's owner, and by anyone if the run is `public`. A run started without
1560
- * a `paper` block answers `404`.
1617
+ * Readable by the run's owner, and by anyone if the run is `public` and has reached the `live`
1618
+ * stage. A run started without a `paper` block answers `404`.
1561
1619
  *
1562
1620
  */
1563
1621
  export const getLiveRunPaper = <ThrowOnError extends boolean = false>(
@@ -1590,7 +1648,8 @@ export const getLiveRunPaper = <ThrowOnError extends boolean = false>(
1590
1648
  * `currency` narrows to one account; without it, every account's points come interleaved by
1591
1649
  * time, each carrying its currency.
1592
1650
  *
1593
- * Readable by the run's owner, and by anyone if the run is `public`.
1651
+ * Readable by the run's owner, and by anyone if the run is `public` and has reached the `live`
1652
+ * stage.
1594
1653
  *
1595
1654
  */
1596
1655
  export const getLiveRunPaperEquity = <ThrowOnError extends boolean = false>(
@@ -119,12 +119,34 @@ export type Account = {
119
119
  * Your current subscription tier.
120
120
  */
121
121
  tier: string;
122
+ /**
123
+ * Maximum number of strategy executions (and sweeps) you can have running at the same time
124
+ * through the API. Starting one past this number is answered with `429`, whose message
125
+ * carries the same number. The value already includes any API allowance your plan has.
126
+ *
127
+ */
128
+ maxExecute: number;
129
+ /**
130
+ * Maximum length, in days, of the time range of a backtest on one of your own datasets.
131
+ */
132
+ maxRangeDays: number;
133
+ /**
134
+ * Largest full grid, in parameter combinations, a sweep may run with the `grid` sampler.
135
+ * A grid with more combinations is refused with `400`; the `random` and `lhs` samplers run
136
+ * only their `samples` and are not held to it.
137
+ *
138
+ */
139
+ maxSweepCartesian: number;
140
+ /**
141
+ * Maximum length, in hours, of the time range of one dataset import from an exchange.
142
+ */
143
+ maxImportRangeHours: number;
122
144
  /**
123
145
  * Maximum number of active datasets your tier allows.
124
146
  */
125
147
  maxDatasets: number;
126
148
  /**
127
- * Maximum size, in bytes, of a single dataset version.
149
+ * Maximum size, in bytes, of a single dataset version as stored, that is the `bytes` of its ready version. For a CSV upload that is the converted file, not the file you upload, so estimate from the number of rows. The Datasets guide has the details.
128
150
  */
129
151
  maxDatasetBytes: number;
130
152
  /**
@@ -512,6 +534,11 @@ export type SweepAxis =
512
534
  };
513
535
 
514
536
  export type SweepSpecRequest = {
537
+ /**
538
+ * `grid` runs every combination of the axes and is held to your plan's
539
+ * `maxSweepCartesian` (`GET /account`); `random` and `lhs` run `samples` combinations and are not.
540
+ *
541
+ */
515
542
  sampler?: "grid" | "random" | "lhs";
516
543
  /**
517
544
  * Reproducibility seed. If omitted, the server generates one with Java's
@@ -1208,6 +1235,12 @@ export type StrategySummary = {
1208
1235
  *
1209
1236
  */
1210
1237
  requiredSources?: Array<string>;
1238
+ /**
1239
+ * When you deleted this strategy. Only ever present in `GET /strategies?includeDeleted=true`,
1240
+ * and only on strategies you have deleted.
1241
+ *
1242
+ */
1243
+ deletedAt?: string;
1211
1244
  };
1212
1245
 
1213
1246
  /**
@@ -1321,6 +1354,12 @@ export type Dataset = {
1321
1354
  *
1322
1355
  */
1323
1356
  currentVersionId?: string;
1357
+ /**
1358
+ * When you deleted this dataset. Only ever present in `GET /datasets?includeDeleted=true`,
1359
+ * and only on datasets you have deleted.
1360
+ *
1361
+ */
1362
+ deletedAt?: string;
1324
1363
  /**
1325
1364
  * When `currentVersionId` last changed. Absent until it has a value.
1326
1365
  */
@@ -1775,11 +1814,11 @@ export type StartLiveRequest = {
1775
1814
  [key: string]: unknown;
1776
1815
  };
1777
1816
  /**
1778
- * A `public` run appears in `GET /live/public` and its signal channel accepts subscriptions from anyone, not only you.
1817
+ * A `public` run appears in `GET /live/public` and its signal channel accepts subscriptions from anyone, not only you — from the moment it is promoted to `live`. While it is a `sandbox` trial, `public` is only what you asked for, and only you can read it.
1779
1818
  */
1780
1819
  visibility?: "private" | "public";
1781
1820
  /**
1782
- * Request that this run's signals be relayed over its WebSocket channel once it reaches the `live` stage — see the "Live execution" guide. Has no effect while the run is still in the `sandbox` stage, regardless of this value.
1821
+ * Request that this run's signals be relayed over its WebSocket channel, from its first signal — in the `sandbox` stage too, where only you can subscribe to it. See the "Live execution" guide.
1783
1822
  */
1784
1823
  relay?: boolean;
1785
1824
  name?: string;
@@ -1842,6 +1881,19 @@ export type UpdateLiveParamsRequest = {
1842
1881
  };
1843
1882
  };
1844
1883
 
1884
+ export type SendLiveCommandRequest = {
1885
+ /**
1886
+ * The command's text — non-blank.
1887
+ */
1888
+ command: string;
1889
+ /**
1890
+ * An optional map of your own choosing, alongside command. Absent means none; when given, it must be a JSON object, and `command` and `properties` are the only keys the body may carry. Each entry lands as a top-level entry on the strategy's `CommandRequest` — no key is off limits, since the command's own text is kept separately.
1891
+ */
1892
+ properties?: {
1893
+ [key: string]: unknown;
1894
+ };
1895
+ };
1896
+
1845
1897
  /**
1846
1898
  * A live run's full state, as returned by starting, reading, or stopping it through its strategy.
1847
1899
  */
@@ -1855,11 +1907,11 @@ export type LiveRun = {
1855
1907
  description?: string;
1856
1908
  visibility: "private" | "public";
1857
1909
  /**
1858
- * A new run always starts `SANDBOX` — a trial run compared against a second execution for agreement — and moves to `LIVE` once it passes.
1910
+ * A new run always starts `SANDBOX`, a 24-hour trial in which it is compared against a second execution and checked for resource use and stability. A run that passes moves to `LIVE` automatically when the 24 hours are up.
1859
1911
  */
1860
1912
  stage: "SANDBOX" | "LIVE";
1861
1913
  /**
1862
- * `STARTING` until first observed running; otherwise the runner's own reported state (e.g. `RUNNING`).
1914
+ * The run's health right now: `STARTING` (no runner has reported on it yet), `RUNNING`, `LAGGING` (behind the market data, usually while catching up; clears by itself), `HUNG` (stuck inside one strategy call for longer than allowed; clears when it returns), `DEGRADED` (its independent executions produced different signals), `FAILED` (refused, could not start or failed while running; `reason` says why) or `STOPPED`. `LAGGING`, `HUNG` and `DEGRADED` come and go on a running run. The set may grow: read an unknown value as a running run with something to look at. See the Live execution guide.
1863
1915
  */
1864
1916
  state: string;
1865
1917
  /**
@@ -1867,7 +1919,17 @@ export type LiveRun = {
1867
1919
  */
1868
1920
  desired: "RUNNING" | "STOPPED";
1869
1921
  /**
1870
- * Present only when the run stopped because it exceeded its resource allowance.
1922
+ * Why the run stopped or failed, when there is something to say; absent otherwise. It is never a
1923
+ * stack trace or an internal message. Either `resource: ...` (the platform stopped the run for
1924
+ * exceeding its resource allowance; the text says which limit) or one of a fixed set of sentences for
1925
+ * a `FAILED` run: the strategy cannot consume the source type the run was started with, the run's
1926
+ * definition was refused, the run could not start after several attempts, the strategy failed while
1927
+ * processing data, the run lost its data feed, or the generic `The run failed.`. The set may grow:
1928
+ * read an unrecognised sentence as a failure and do not parse it. A `FAILED` run usually stays
1929
+ * `desired: RUNNING` until you stop it, and counts as active (`409` on a new start, and toward your
1930
+ * live-run limit) until then; one that can never run because its strategy cannot consume its source
1931
+ * type is stopped by the platform itself (`desired: STOPPED`), so it holds no place.
1932
+ *
1871
1933
  */
1872
1934
  reason?: string;
1873
1935
  sources: Array<LiveSource>;
@@ -1879,7 +1941,7 @@ export type LiveRun = {
1879
1941
  */
1880
1942
  paramsVersion: number;
1881
1943
  /**
1882
- * Whether this run's signals are being relayed over the WebSocket channel described in the "Live execution" guide, right now. This is the effective value — `false` on a `sandbox` run regardless of what was requested at start; matches the requested value once `stage` reaches `live`.
1944
+ * Whether this run's signals are relayed over the WebSocket channel described in the "Live execution" guide. It is the value requested at start, in either stage.
1883
1945
  */
1884
1946
  relay: boolean;
1885
1947
  /**
@@ -1887,7 +1949,7 @@ export type LiveRun = {
1887
1949
  */
1888
1950
  startedAtMs: number;
1889
1951
  /**
1890
- * The sandbox trial's promotion verdict, once one exists. Shape is not yet stabilized as public API — treat as opaque diagnostics.
1952
+ * The sandbox trial's promotion verdict. Absent for the whole 24-hour trial and present once it ends, so an absent `gate` means the trial has not finished. `passed` is the verdict; the rest is diagnostic detail whose shape is not yet stabilized as public API: treat it as opaque.
1891
1953
  */
1892
1954
  gate?: {
1893
1955
  [key: string]: unknown;
@@ -1924,17 +1986,31 @@ export type LiveRunSummary = {
1924
1986
  description?: string;
1925
1987
  visibility: "private" | "public";
1926
1988
  /**
1927
- * A new run always starts `SANDBOX` — a trial run compared against a second execution for agreement — and moves to `LIVE` once it passes.
1989
+ * A new run always starts `SANDBOX`, a 24-hour trial in which it is compared against a second execution and checked for resource use and stability. A run that passes moves to `LIVE` automatically when the 24 hours are up.
1928
1990
  */
1929
1991
  stage: "SANDBOX" | "LIVE";
1930
1992
  /**
1931
- * `STARTING` until first observed running; otherwise the runner's own reported state (e.g. `RUNNING`).
1993
+ * The run's health right now: `STARTING` (no runner has reported on it yet), `RUNNING`, `LAGGING` (behind the market data, usually while catching up; clears by itself), `HUNG` (stuck inside one strategy call for longer than allowed; clears when it returns), `DEGRADED` (its independent executions produced different signals), `FAILED` (refused, could not start or failed while running; `reason` says why) or `STOPPED`. `LAGGING`, `HUNG` and `DEGRADED` come and go on a running run. The set may grow: read an unknown value as a running run with something to look at. See the Live execution guide.
1932
1994
  */
1933
1995
  state: string;
1934
1996
  /**
1935
1997
  * What you last asked for. `state` can lag this briefly after `DELETE`.
1936
1998
  */
1937
1999
  desired: "RUNNING" | "STOPPED";
2000
+ /**
2001
+ * Why the run stopped or failed, when there is something to say; absent otherwise. It is never a
2002
+ * stack trace or an internal message. Either `resource: ...` (the platform stopped the run for
2003
+ * exceeding its resource allowance; the text says which limit) or one of a fixed set of sentences for
2004
+ * a `FAILED` run: the strategy cannot consume the source type the run was started with, the run's
2005
+ * definition was refused, the run could not start after several attempts, the strategy failed while
2006
+ * processing data, the run lost its data feed, or the generic `The run failed.`. The set may grow:
2007
+ * read an unrecognised sentence as a failure and do not parse it. A `FAILED` run usually stays
2008
+ * `desired: RUNNING` until you stop it, and counts as active (`409` on a new start, and toward your
2009
+ * live-run limit) until then; one that can never run because its strategy cannot consume its source
2010
+ * type is stopped by the platform itself (`desired: STOPPED`), so it holds no place.
2011
+ *
2012
+ */
2013
+ reason?: string;
1938
2014
  sources: Array<LiveSource>;
1939
2015
  /**
1940
2016
  * Epoch milliseconds this run was started.
@@ -2140,7 +2216,7 @@ export type LiveSignal = {
2140
2216
  instrument: LiveSignalInstrument | null;
2141
2217
  order?: LiveSignalOrder;
2142
2218
  /**
2143
- * The signal's own free-form payload.
2219
+ * The signal's own free-form payload, what the strategy put there with `signal.set(...)`. Whoever may read the run may read it, so on a `public` run it is public. A signal whose `data` is over 8 KiB (8,192 bytes of its JSON) is not pushed on the WebSocket channel, and `GET /live/{runId}/signals` returns it whole.
2144
2220
  */
2145
2221
  data?: {
2146
2222
  [key: string]: unknown;
@@ -2192,6 +2268,18 @@ export type LiveParamsUpdateResult = {
2192
2268
  effectiveAtMs: number;
2193
2269
  };
2194
2270
 
2271
+ export type LiveCommandResult = {
2272
+ runId: string;
2273
+ /**
2274
+ * This command's own id, generated fresh for this call. A retried request is a second, distinct command — this endpoint takes no idempotency key.
2275
+ */
2276
+ commandId: string;
2277
+ /**
2278
+ * Epoch milliseconds — the market position every execution applies this command at.
2279
+ */
2280
+ effectiveAtMs: number;
2281
+ };
2282
+
2195
2283
  export type AuthenticateData = {
2196
2284
  body?: never;
2197
2285
  path?: never;
@@ -2473,7 +2561,14 @@ export type DownloadKlinesResponse =
2473
2561
  export type ListStrategiesData = {
2474
2562
  body?: never;
2475
2563
  path?: never;
2476
- query?: never;
2564
+ query?: {
2565
+ /**
2566
+ * `true` also lists the strategies you have deleted, each with its `deletedAt`. Any other
2567
+ * value, or leaving it out, lists only the ones you have not deleted.
2568
+ *
2569
+ */
2570
+ includeDeleted?: boolean;
2571
+ };
2477
2572
  url: "/strategies";
2478
2573
  };
2479
2574
 
@@ -2508,6 +2603,10 @@ export type CompileStrategyErrors = {
2508
2603
  *
2509
2604
  */
2510
2605
  400: ResponseError;
2606
+ /**
2607
+ * The source is larger than 32 KiB (32768 bytes). Every endpoint that reads a request body caps it, and the message names the cap; see the Strategy guide.
2608
+ */
2609
+ 413: ResponseError;
2511
2610
  /**
2512
2611
  * Too many compilations in flight. Retry later.
2513
2612
  */
@@ -2807,7 +2906,9 @@ export type ExecuteSweepData = {
2807
2906
  export type ExecuteSweepErrors = {
2808
2907
  /**
2809
2908
  * Invalid sweep specification, a `type` that cannot be swept yet (`funding`), or the
2810
- * expanded grid exceeds the server limit.
2909
+ * expanded grid exceeds the server limit. A full `grid` with more combinations than your
2910
+ * plan allows (`maxSweepCartesian` in `GET /account`) is refused with a message that asks
2911
+ * for the `random` or `lhs` sampler.
2811
2912
  *
2812
2913
  */
2813
2914
  400: ResponseError;
@@ -3202,7 +3303,14 @@ export type GetBacktestResultResponse =
3202
3303
  export type ListDatasetsData = {
3203
3304
  body?: never;
3204
3305
  path?: never;
3205
- query?: never;
3306
+ query?: {
3307
+ /**
3308
+ * `true` also lists the datasets you have deleted, each with its `deletedAt`. Any other
3309
+ * value, or leaving it out, lists only the ones you have not deleted.
3310
+ *
3311
+ */
3312
+ includeDeleted?: boolean;
3313
+ };
3206
3314
  url: "/datasets";
3207
3315
  };
3208
3316
 
@@ -3388,7 +3496,7 @@ export type FinalizeDatasetUploadErrors = {
3388
3496
  */
3389
3497
  409: ResponseError;
3390
3498
  /**
3391
- * The uploaded file exceeds your tier's size limit for a dataset.
3499
+ * The uploaded file is many times your tier's size limit for a dataset. The limit itself applies to the stored size, which is known only after conversion, so an upload that passes here can still end `failed` when ingest finishes.
3392
3500
  */
3393
3501
  413: ResponseError;
3394
3502
  /**
@@ -3611,7 +3719,7 @@ export type StartLiveData = {
3611
3719
 
3612
3720
  export type StartLiveErrors = {
3613
3721
  /**
3614
- * Malformed `sources` (not exactly one entry, missing field, unsupported `type`), an invalid `visibility`, an invalid `paper` block (an unknown field, a wrong type or an out-of-range value), or no `paper` block for a strategy that listens to its own execution events.
3722
+ * Malformed `sources` (not exactly one entry, missing field, unsupported `type`), a `type` the strategy cannot consume (a ticker strategy with a `kline` source, or the reverse; the message names both), an invalid `visibility`, an invalid `paper` block (an unknown field, a wrong type or an out-of-range value), or no `paper` block for a strategy that listens to its own execution events.
3615
3723
  */
3616
3724
  400: ResponseError;
3617
3725
  /**
@@ -3765,7 +3873,7 @@ export type UpdateLiveParamsErrors = {
3765
3873
  */
3766
3874
  404: ResponseError;
3767
3875
  /**
3768
- * This run's compilation has no declared properties on record — recompile the strategy to enable runtime parameter updates.
3876
+ * This run's compiled strategy has no record of the parameters it declares. Register the strategy again with `POST /strategy` and start a new run, since a run keeps the compiled version it started with.
3769
3877
  */
3770
3878
  409: ResponseError;
3771
3879
  };
@@ -3783,6 +3891,55 @@ export type UpdateLiveParamsResponses = {
3783
3891
  export type UpdateLiveParamsResponse =
3784
3892
  UpdateLiveParamsResponses[keyof UpdateLiveParamsResponses];
3785
3893
 
3894
+ export type SendLiveCommandData = {
3895
+ body: SendLiveCommandRequest;
3896
+ path: {
3897
+ runId: string;
3898
+ };
3899
+ query?: never;
3900
+ url: "/live/{runId}/commands";
3901
+ };
3902
+
3903
+ export type SendLiveCommandErrors = {
3904
+ /**
3905
+ * `command` missing, not a string, blank; `properties` given but not an object; or the body carries any key other than `command` and `properties`.
3906
+ */
3907
+ 400: ResponseError;
3908
+ /**
3909
+ * No such run, or you do not own it.
3910
+ */
3911
+ 404: ResponseError;
3912
+ /**
3913
+ * One of three reasons, each its own message: the run is not running, so there is nothing to tell;
3914
+ * this run's compiled strategy has no record of whether it handles commands — register the strategy
3915
+ * again with `POST /strategy` and start a new run, since a run keeps the compiled version it started
3916
+ * with; or the strategy does not implement `CommandRequestHandler` at all.
3917
+ *
3918
+ */
3919
+ 409: ResponseError;
3920
+ /**
3921
+ * The request body is larger than 2 KiB (2048 bytes). Every endpoint that reads a request body caps it, and the message names the cap.
3922
+ */
3923
+ 413: ResponseError;
3924
+ /**
3925
+ * The command could not be delivered right now, and it was not sent — unlike a parameter update, a command has no fallback path. Try again.
3926
+ */
3927
+ 503: ResponseError;
3928
+ };
3929
+
3930
+ export type SendLiveCommandError =
3931
+ SendLiveCommandErrors[keyof SendLiveCommandErrors];
3932
+
3933
+ export type SendLiveCommandResponses = {
3934
+ /**
3935
+ * Accepted — on its way to every execution behind the run.
3936
+ */
3937
+ 202: LiveCommandResult;
3938
+ };
3939
+
3940
+ export type SendLiveCommandResponse =
3941
+ SendLiveCommandResponses[keyof SendLiveCommandResponses];
3942
+
3786
3943
  export type GetLiveRunSignalsData = {
3787
3944
  body?: never;
3788
3945
  path: {