@distilled.cloud/trigger-dev 1.0.0-rc.18 → 1.0.0-rc.20

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.
@@ -1,5 +1,6 @@
1
1
  import * as API from "@distilled.cloud/core/api";
2
2
  import * as S from "@distilled.cloud/core/schema-lite";
3
+ import type * as Redacted from "effect/Redacted";
3
4
  import { type TriggerDevOpError, type TriggerDevOpContext } from "../protocol.ts";
4
5
  export type { TriggerDevOpError, TriggerDevOpContext };
5
6
  declare const BadRequest_base: S.TaggedErrorClass<"BadRequest", {
@@ -22,6 +23,16 @@ declare const Conflict_base: S.TaggedErrorClass<"Conflict", {
22
23
  });
23
24
  export declare class Conflict extends /*@__PURE__*/ Conflict_base {
24
25
  }
26
+ declare const Forbidden_base: S.TaggedErrorClass<"Forbidden", {
27
+ readonly code: any;
28
+ readonly message: any;
29
+ }> & (new (...args: any[]) => {
30
+ "@distilled.cloud/error/categories": {
31
+ AuthError: true;
32
+ };
33
+ });
34
+ export declare class Forbidden extends /*@__PURE__*/ Forbidden_base {
35
+ }
25
36
  declare const NotFound_base: S.TaggedErrorClass<"NotFound", {
26
37
  readonly code: any;
27
38
  readonly message: any;
@@ -48,48 +59,143 @@ export interface ActivateScheduleV1Request {
48
59
  }
49
60
  export type ScheduleObjectGeneratorType = "CRON";
50
61
  export interface ScheduleObjectGenerator {
51
- type?: ScheduleObjectGeneratorType;
62
+ type?: ScheduleObjectGeneratorType | undefined;
52
63
  /** The cron expression used to generate the schedule */
53
- expression?: string;
64
+ expression?: string | undefined;
54
65
  /** The description of the generator in plain english */
55
- description?: string;
66
+ description?: string | undefined;
56
67
  }
57
68
  /** Why the minimum window is applied. */
58
69
  export type ScheduleObjectAppliedSchedulePolicyReason = "free_schedule";
59
70
  /** Present only when a non-overridable plan policy applies a minimum window to this schedule (for example, a free-plan schedule's minimum run interval). The configured `window` is returned separately and unchanged. */
60
71
  export interface ScheduleObjectAppliedSchedulePolicy {
61
72
  /** The minimum window, in seconds, applied on top of the configured window. */
62
- minimumWindowSeconds?: number;
73
+ minimumWindowSeconds?: number | undefined;
63
74
  /** Why the minimum window is applied. */
64
- reason?: ScheduleObjectAppliedSchedulePolicyReason;
75
+ reason?: ScheduleObjectAppliedSchedulePolicyReason | undefined;
65
76
  }
66
77
  export interface ScheduleEnvironment {
67
- id?: string;
68
- type?: string;
69
- userName?: string;
78
+ id?: string | undefined;
79
+ type?: string | undefined;
80
+ userName?: string | undefined;
70
81
  }
71
82
  export type ScheduleObjectEnvironmentsList = Array<ScheduleEnvironment>;
72
83
  export interface ScheduleObject {
73
84
  /** The unique ID of the schedule, prefixed with 'sched_' */
74
- id?: string;
85
+ id?: string | undefined;
75
86
  /** The id of the scheduled task that will be triggered by this schedule */
76
- task?: string;
87
+ task?: string | undefined;
77
88
  /** The type of schedule, `DECLARATIVE` or `IMPERATIVE`. Declarative schedules are declared in your code by setting the `cron` property on a `schedules.task`. Imperative schedules are created in the dashboard or by using the imperative SDK functions like `schedules.create()`. */
78
- type?: string;
89
+ type?: string | undefined;
79
90
  /** Whether the schedule is active or not */
80
- active?: boolean;
91
+ active?: boolean | undefined;
81
92
  /** The deduplication key used to prevent creating duplicate schedules */
82
- deduplicationKey?: string;
93
+ deduplicationKey?: string | undefined;
83
94
  /** The external ID of the schedule. Can be anything that is useful to you (e.g., user ID, org ID, etc.) */
84
- externalId?: string;
85
- generator?: ScheduleObjectGenerator;
95
+ externalId?: string | undefined;
96
+ generator?: ScheduleObjectGenerator | undefined;
86
97
  /** Defaults to UTC. In IANA format, if set then it will trigger at the CRON frequency in that timezone and respect daylight savings time. */
87
- timezone?: string;
98
+ timezone?: string | undefined;
88
99
  /** The next time the schedule will run */
89
- nextRun?: string;
100
+ nextRun?: string | undefined;
90
101
  /** Present only when a non-overridable plan policy applies a minimum window to this schedule (for example, a free-plan schedule's minimum run interval). The configured `window` is returned separately and unchanged. */
91
- appliedSchedulePolicy?: ScheduleObjectAppliedSchedulePolicy;
92
- environments?: ScheduleObjectEnvironmentsList;
102
+ appliedSchedulePolicy?: ScheduleObjectAppliedSchedulePolicy | undefined;
103
+ environments?: ScheduleObjectEnvironmentsList | undefined;
104
+ }
105
+ export type DashboardWidgetDisplayCase0Type = "table";
106
+ export interface DashboardWidgetDisplayCase0SortingItem {
107
+ id?: string | undefined;
108
+ desc?: boolean | undefined;
109
+ }
110
+ export type DashboardWidgetDisplayCase0SortingList = Array<DashboardWidgetDisplayCase0SortingItem>;
111
+ export interface DashboardWidgetDisplayCase0 {
112
+ type: DashboardWidgetDisplayCase0Type;
113
+ prettyFormatting?: boolean | undefined;
114
+ sorting?: DashboardWidgetDisplayCase0SortingList | undefined;
115
+ }
116
+ export type DashboardWidgetDisplayCase1Type = "chart";
117
+ export type DashboardWidgetDisplayCase1ChartType = "bar" | "line";
118
+ export type DashboardWidgetDisplayCase1YAxisColumnsList = Array<string>;
119
+ export type DashboardWidgetDisplayCase1SortDirection = "asc" | "desc";
120
+ export type DashboardWidgetDisplayCase1Aggregation = "sum" | "avg" | "count" | "min" | "max";
121
+ export type DashboardWidgetDisplayCase1SeriesColorsMap = {
122
+ [key: string]: string | undefined;
123
+ };
124
+ export interface DashboardWidgetDisplayCase1 {
125
+ type: DashboardWidgetDisplayCase1Type;
126
+ chartType: DashboardWidgetDisplayCase1ChartType | (string & {});
127
+ xAxisColumn: string | null;
128
+ yAxisColumns: DashboardWidgetDisplayCase1YAxisColumnsList;
129
+ groupByColumn: string | null;
130
+ stacked: boolean;
131
+ sortByColumn: string | null;
132
+ sortDirection: DashboardWidgetDisplayCase1SortDirection | (string & {});
133
+ aggregation: DashboardWidgetDisplayCase1Aggregation | (string & {});
134
+ seriesColors?: DashboardWidgetDisplayCase1SeriesColorsMap | undefined;
135
+ }
136
+ export type DashboardWidgetDisplayCase2Type = "bignumber";
137
+ export type DashboardWidgetDisplayCase2Aggregation = "sum" | "avg" | "count" | "min" | "max" | "first" | "last";
138
+ export type DashboardWidgetDisplayCase2SortDirection = "asc" | "desc";
139
+ export interface DashboardWidgetDisplayCase2 {
140
+ type: DashboardWidgetDisplayCase2Type;
141
+ column: string;
142
+ aggregation: DashboardWidgetDisplayCase2Aggregation | (string & {});
143
+ sortDirection?: DashboardWidgetDisplayCase2SortDirection | (string & {}) | undefined;
144
+ abbreviate?: boolean | undefined;
145
+ prefix?: string | undefined;
146
+ suffix?: string | undefined;
147
+ }
148
+ export type DashboardWidgetDisplayCase3Type = "title";
149
+ export interface DashboardWidgetDisplayCase3 {
150
+ type: DashboardWidgetDisplayCase3Type;
151
+ }
152
+ /** How the widget renders its query results. */
153
+ export type DashboardWidgetDisplay = DashboardWidgetDisplayCase0 | DashboardWidgetDisplayCase1 | DashboardWidgetDisplayCase2 | DashboardWidgetDisplayCase3;
154
+ /** A position on the dashboard's 12-column grid. */
155
+ export interface DashboardWidgetPosition {
156
+ x: number;
157
+ y: number;
158
+ w: number;
159
+ h: number;
160
+ }
161
+ export interface AddDashboardWidgetV1Request {
162
+ /** The custom dashboard id, starting with `dashboard_` */
163
+ dashboardId: string;
164
+ /** Omit to generate one. Letters, numbers, `_` and `-`, unique within the dashboard. */
165
+ id?: string | undefined;
166
+ title: string;
167
+ /** A TRQL query. Required unless the display type is `title`. */
168
+ query?: string | undefined;
169
+ display: DashboardWidgetDisplay;
170
+ /** Fill empty time buckets, carrying gauges forward and zero-filling counters. */
171
+ fillGaps?: boolean | undefined;
172
+ position?: DashboardWidgetPosition | undefined;
173
+ revision?: string | undefined;
174
+ }
175
+ export interface DashboardObjectWidgetsItem {
176
+ id?: string | undefined;
177
+ title?: string | undefined;
178
+ query?: string | undefined;
179
+ display?: DashboardWidgetDisplay | undefined;
180
+ fillGaps?: boolean | undefined;
181
+ position?: DashboardWidgetPosition | undefined;
182
+ }
183
+ /** Widgets in grid order, top to bottom then left to right. */
184
+ export type DashboardObjectWidgetsList = Array<DashboardObjectWidgetsItem>;
185
+ export interface DashboardObject {
186
+ /** The dashboard id, starting with `dashboard_` */
187
+ id?: string | undefined;
188
+ title?: string | undefined;
189
+ description?: string | undefined;
190
+ revision?: string | undefined;
191
+ createdAt?: string | undefined;
192
+ updatedAt?: string | undefined;
193
+ /** Widgets in grid order, top to bottom then left to right. */
194
+ widgets?: DashboardObjectWidgetsList | undefined;
195
+ }
196
+ export interface AddDashboardWidgetV1Response {
197
+ widgetId?: string | undefined;
198
+ dashboard?: DashboardObject | undefined;
93
199
  }
94
200
  export type RunTagsCase1List = Array<string>;
95
201
  /** One or more tags to attach to a run. Runs can have a maximum of 10 tags. */
@@ -100,7 +206,7 @@ export interface AddRunTagsV1Request {
100
206
  tags: RunTags;
101
207
  }
102
208
  export interface AddRunTagsV1Response {
103
- message?: string;
209
+ message?: string | undefined;
104
210
  }
105
211
  export interface BulkAbortActionV1Request {
106
212
  /** The ID of a bulk action, starts with `bulk_`. */
@@ -115,13 +221,26 @@ export interface CancelRunV1Request {
115
221
  }
116
222
  export interface CancelRunV1Response {
117
223
  /** The ID of the run that was canceled. */
118
- id?: string;
224
+ id?: string | undefined;
225
+ }
226
+ export interface CancelWebhookWaiterV1Request {
227
+ /** The waiter's id, which is also its waitpoint id. */
228
+ waiterId: string;
229
+ }
230
+ /** Present when `cancelled` is `false`. A delivery already claimed the waiter. */
231
+ export type CancelWebhookWaiterResponseReason = "too_late";
232
+ export interface CancelWebhookWaiterResponse {
233
+ cancelled: boolean;
234
+ /** Present when `cancelled` is `false`. A delivery already claimed the waiter. */
235
+ reason?: CancelWebhookWaiterResponseReason | undefined;
236
+ /** With `too_late`, the delivery that resumed the run. */
237
+ deliveryId?: string | undefined;
119
238
  }
120
239
  export interface CloseSessionV1Request {
121
240
  /** The session's friendly ID (`session_...`) or your `externalId`. The server disambiguates by the `session_` prefix. */
122
241
  session: string;
123
242
  /** Optional reason recorded on the session row. */
124
- reason?: string;
243
+ reason?: string | undefined;
125
244
  }
126
245
  /** Base payload passed to every run this session triggers. For `chat.agent` this carries `{ chatId, ...clientData }`. */
127
246
  export type SessionTriggerConfigBasePayloadMap = {
@@ -134,21 +253,21 @@ export interface SessionTriggerConfig {
134
253
  /** Base payload passed to every run this session triggers. For `chat.agent` this carries `{ chatId, ...clientData }`. */
135
254
  basePayload: SessionTriggerConfigBasePayloadMap;
136
255
  /** Machine preset for each run, e.g. `small-1x`. */
137
- machine?: string;
256
+ machine?: string | undefined;
138
257
  /** Queue to schedule runs on. */
139
- queue?: string;
258
+ queue?: string | undefined;
140
259
  /** Tags applied to every run this session triggers. */
141
- tags?: SessionTriggerConfigTagsList;
260
+ tags?: SessionTriggerConfigTagsList | undefined;
142
261
  /** Maximum retry attempts per run. */
143
- maxAttempts?: number;
262
+ maxAttempts?: number | undefined;
144
263
  /** Per-run wall-clock cap in seconds. */
145
- maxDuration?: number;
264
+ maxDuration?: number | undefined;
146
265
  /** Pin every run to a specific worker version. */
147
- lockToVersion?: string;
266
+ lockToVersion?: string | undefined;
148
267
  /** Region to schedule runs in. */
149
- region?: string;
268
+ region?: string | undefined;
150
269
  /** Idle timeout surfaced to `chat.agent` via the wire payload. */
151
- idleTimeoutInSeconds?: number;
270
+ idleTimeoutInSeconds?: number | undefined;
152
271
  }
153
272
  /** Tags on the session row. */
154
273
  export type SessionObjectTagsList = Array<string>;
@@ -161,24 +280,24 @@ export interface SessionObject {
161
280
  /** The session's friendly ID, prefixed with `session_`. */
162
281
  id: string;
163
282
  /** Your stable identity for the session, if one was set. */
164
- externalId?: string | null;
283
+ externalId?: string | null | undefined;
165
284
  /** The session type discriminator. */
166
285
  type: string;
167
286
  /** The task this session triggers runs against. */
168
287
  taskIdentifier: string;
169
- triggerConfig?: SessionTriggerConfig;
288
+ triggerConfig?: SessionTriggerConfig | undefined;
170
289
  /** Friendly ID of the live run for this session, if any. Prefixed with `run_`. Omitted on list rows. */
171
- currentRunId?: string | null;
290
+ currentRunId?: string | null | undefined;
172
291
  /** Tags on the session row. */
173
292
  tags: SessionObjectTagsList;
174
293
  /** Arbitrary JSON metadata, or `null` if unset. */
175
- metadata?: SessionObjectMetadataMap | null;
294
+ metadata?: SessionObjectMetadataMap | null | undefined;
176
295
  /** When the session was closed, or `null` if open. */
177
- closedAt?: string | null;
296
+ closedAt?: string | null | undefined;
178
297
  /** The optional reason recorded when the session was closed. */
179
- closedReason?: string | null;
298
+ closedReason?: string | null | undefined;
180
299
  /** The session's retention deadline, or `null` if none. */
181
- expiresAt?: string | null;
300
+ expiresAt?: string | null | undefined;
182
301
  createdAt: string;
183
302
  updatedAt: string;
184
303
  }
@@ -196,7 +315,7 @@ export interface CompleteWaitpointTokenV1Request {
196
315
  /** The ID of the waitpoint token to complete. */
197
316
  waitpointId: string;
198
317
  /** Any JSON-serializable value to pass back to the run waiting on this token. The data will be returned from `wait.forToken()` as the result payload. */
199
- data?: unknown;
318
+ data?: unknown | undefined;
200
319
  }
201
320
  export type CreateBulkActionRequestBodyCase0Action = "cancel";
202
321
  export type BulkActionFilterStatusCase0 = "PENDING_VERSION" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "COMPLETED" | "CANCELED" | "FAILED" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE";
@@ -231,61 +350,61 @@ export type BulkActionFilterRegionCase1List = Array<string>;
231
350
  export type BulkActionFilterRegion = string | BulkActionFilterRegionCase1List;
232
351
  /** Selects runs using SDK-style run-list filter fields, excluding pagination fields. In HTTP requests these fields are sent as JSON body properties, so time fields are top-level (`from`, `to`, `period`) instead of nested under `createdAt`. Provide at least one property. */
233
352
  export interface BulkActionFilter {
234
- status?: BulkActionFilterStatus;
353
+ status?: BulkActionFilterStatus | undefined;
235
354
  /** The identifier of the task that was run. */
236
- taskIdentifier?: BulkActionFilterTaskIdentifier;
355
+ taskIdentifier?: BulkActionFilterTaskIdentifier | undefined;
237
356
  /** The worker version that executed the run. */
238
- version?: BulkActionFilterVersion;
357
+ version?: BulkActionFilterVersion | undefined;
239
358
  /** Start of the time range as an ISO date string or Unix timestamp in milliseconds. */
240
- from?: BulkActionFilterFrom;
359
+ from?: BulkActionFilterFrom | undefined;
241
360
  /** End of the time range as an ISO date string or Unix timestamp in milliseconds. */
242
- to?: BulkActionFilterTo;
361
+ to?: BulkActionFilterTo | undefined;
243
362
  /** Relative time period to select, such as `24h` or `30d`. */
244
- period?: string;
363
+ period?: string | undefined;
245
364
  /** Select runs that were processed by another bulk action. */
246
- bulkAction?: string;
365
+ bulkAction?: string | undefined;
247
366
  /** Select runs with one or more tags. */
248
- tag?: BulkActionFilterTag;
367
+ tag?: BulkActionFilterTag | undefined;
249
368
  /** Select runs created by a schedule. */
250
- schedule?: string;
369
+ schedule?: string | undefined;
251
370
  /** Select test or non-test runs. */
252
- isTest?: boolean;
371
+ isTest?: boolean | undefined;
253
372
  /** Select runs in a batch. */
254
- batch?: string;
255
- queue?: BulkActionFilterQueue;
373
+ batch?: string | undefined;
374
+ queue?: BulkActionFilterQueue | undefined;
256
375
  /** Select runs by machine preset. */
257
- machine?: BulkActionFilterMachine;
376
+ machine?: BulkActionFilterMachine | undefined;
258
377
  /** Select runs by region. */
259
- region?: BulkActionFilterRegion;
378
+ region?: BulkActionFilterRegion | undefined;
260
379
  }
261
380
  export interface CreateBulkActionRequestBodyCase0 {
262
381
  action: CreateBulkActionRequestBodyCase0Action;
263
382
  filter: BulkActionFilter;
264
- name?: string;
383
+ name?: string | undefined;
265
384
  }
266
385
  export type CreateBulkActionRequestBodyCase1Action = "cancel";
267
386
  export type CreateBulkActionRequestBodyCase1RunIdsList = Array<string>;
268
387
  export interface CreateBulkActionRequestBodyCase1 {
269
388
  action: CreateBulkActionRequestBodyCase1Action;
270
389
  runIds: CreateBulkActionRequestBodyCase1RunIdsList;
271
- name?: string;
390
+ name?: string | undefined;
272
391
  }
273
392
  export type CreateBulkActionRequestBodyCase2Action = "replay";
274
393
  export interface CreateBulkActionRequestBodyCase2 {
275
394
  action: CreateBulkActionRequestBodyCase2Action;
276
395
  filter: BulkActionFilter;
277
- name?: string;
396
+ name?: string | undefined;
278
397
  /** Region identifier to replay runs in. When omitted, each replay keeps the original run's region. */
279
- targetRegion?: string;
398
+ targetRegion?: string | undefined;
280
399
  }
281
400
  export type CreateBulkActionRequestBodyCase3Action = "replay";
282
401
  export type CreateBulkActionRequestBodyCase3RunIdsList = Array<string>;
283
402
  export interface CreateBulkActionRequestBodyCase3 {
284
403
  action: CreateBulkActionRequestBodyCase3Action;
285
404
  runIds: CreateBulkActionRequestBodyCase3RunIdsList;
286
- name?: string;
405
+ name?: string | undefined;
287
406
  /** Region identifier to replay runs in. When omitted, each replay keeps the original run's region. */
288
- targetRegion?: string;
407
+ targetRegion?: string | undefined;
289
408
  }
290
409
  export type CreateBulkActionRequestBody = CreateBulkActionRequestBodyCase0 | CreateBulkActionRequestBodyCase1 | CreateBulkActionRequestBodyCase2 | CreateBulkActionRequestBodyCase3;
291
410
  export interface CreateBulkActionV1Request {
@@ -293,6 +412,25 @@ export interface CreateBulkActionV1Request {
293
412
  }
294
413
  export interface CreateBulkActionV1Response {
295
414
  }
415
+ export interface DashboardWidgetInput {
416
+ /** Omit to generate one. Letters, numbers, `_` and `-`, unique within the dashboard. */
417
+ id?: string | undefined;
418
+ title: string;
419
+ /** A TRQL query. Required unless the display type is `title`. */
420
+ query?: string | undefined;
421
+ display: DashboardWidgetDisplay;
422
+ /** Fill empty time buckets, carrying gauges forward and zero-filling counters. */
423
+ fillGaps?: boolean | undefined;
424
+ position?: DashboardWidgetPosition | undefined;
425
+ }
426
+ /** Widgets without a position are stacked full width below the positioned ones, in order. */
427
+ export type CreateDashboardV1RequestWidgetsList = Array<DashboardWidgetInput>;
428
+ export interface CreateDashboardV1Request {
429
+ title: string;
430
+ description?: string | undefined;
431
+ /** Widgets without a position are stacked full width below the positioned ones, in order. */
432
+ widgets?: CreateDashboardV1RequestWidgetsList | undefined;
433
+ }
296
434
  export type CreateProjectEnvvarV1RequestEnv = "dev" | "staging" | "prod";
297
435
  export interface CreateProjectEnvvarV1Request {
298
436
  /** The external ref of the project. You can find this in the project settings. Starts with `proj_`. */
@@ -309,9 +447,9 @@ export interface CreateScheduleV1Request {
309
447
  task: string;
310
448
  cron: string;
311
449
  deduplicationKey: string;
312
- externalId?: string;
450
+ externalId?: string | undefined;
313
451
  /** Defaults to "UTC". In IANA format ("America/New_York"). If set then it will trigger at the CRON frequency in that timezone and respect daylight savings time. */
314
- timezone?: string;
452
+ timezone?: string | undefined;
315
453
  }
316
454
  /** Up to 10 tags on the session row, for dashboard filtering. */
317
455
  export type CreateSessionV1RequestTagsList = Array<string>;
@@ -326,13 +464,13 @@ export interface CreateSessionV1Request {
326
464
  taskIdentifier: string;
327
465
  triggerConfig: SessionTriggerConfig;
328
466
  /** Your stable identity for the session, unique per environment. Cannot start with the reserved `session_` prefix. Reusing an `externalId` makes create idempotent; reusing one whose session is closed or expired returns `409`. */
329
- externalId?: string;
467
+ externalId?: string | undefined;
330
468
  /** Up to 10 tags on the session row, for dashboard filtering. */
331
- tags?: CreateSessionV1RequestTagsList;
469
+ tags?: CreateSessionV1RequestTagsList | undefined;
332
470
  /** Arbitrary JSON metadata. */
333
- metadata?: CreateSessionV1RequestMetadataMap;
471
+ metadata?: CreateSessionV1RequestMetadataMap | undefined;
334
472
  /** Absolute expiry timestamp for retention. */
335
- expiresAt?: string;
473
+ expiresAt?: string | undefined;
336
474
  }
337
475
  /** Tags on the session row. */
338
476
  export type CreateSessionV1ResponseTagsList = Array<string>;
@@ -344,24 +482,24 @@ export interface CreateSessionV1Response {
344
482
  /** The session's friendly ID, prefixed with `session_`. */
345
483
  id: string;
346
484
  /** Your stable identity for the session, if one was set. */
347
- externalId?: string | null;
485
+ externalId?: string | null | undefined;
348
486
  /** The session type discriminator. */
349
487
  type: string;
350
488
  /** The task this session triggers runs against. */
351
489
  taskIdentifier: string;
352
- triggerConfig?: SessionTriggerConfig;
490
+ triggerConfig?: SessionTriggerConfig | undefined;
353
491
  /** Friendly ID of the live run for this session, if any. Prefixed with `run_`. Omitted on list rows. */
354
- currentRunId?: string | null;
492
+ currentRunId?: string | null | undefined;
355
493
  /** Tags on the session row. */
356
494
  tags: CreateSessionV1ResponseTagsList;
357
495
  /** Arbitrary JSON metadata, or `null` if unset. */
358
- metadata?: CreateSessionV1ResponseMetadataMap | null;
496
+ metadata?: CreateSessionV1ResponseMetadataMap | null | undefined;
359
497
  /** When the session was closed, or `null` if open. */
360
- closedAt?: string | null;
498
+ closedAt?: string | null | undefined;
361
499
  /** The optional reason recorded when the session was closed. */
362
- closedReason?: string | null;
500
+ closedReason?: string | null | undefined;
363
501
  /** The session's retention deadline, or `null` if none. */
364
- expiresAt?: string | null;
502
+ expiresAt?: string | null | undefined;
365
503
  createdAt: string;
366
504
  updatedAt: string;
367
505
  /** Friendly ID of the first run triggered alongside the session. */
@@ -376,13 +514,13 @@ export type CreateWaitpointTokenV1RequestTagsCase1List = Array<string>;
376
514
  export type CreateWaitpointTokenV1RequestTags = string | CreateWaitpointTokenV1RequestTagsCase1List;
377
515
  export interface CreateWaitpointTokenV1Request {
378
516
  /** An optional idempotency key. If you pass the same key twice before it expires, you will receive the original token back. The returned token may already be completed, in which case `wait.forToken()` will continue immediately. */
379
- idempotencyKey?: string;
517
+ idempotencyKey?: string | undefined;
380
518
  /** How long the idempotency key is valid, after which passing the same key creates a new waitpoint. Accepts durations like "30s", "1m", "2h", "3d". */
381
- idempotencyKeyTTL?: string;
519
+ idempotencyKeyTTL?: string | undefined;
382
520
  /** How long to wait before the token times out. When a run is waiting for a timed-out token, `wait.forToken()` returns with `ok: false`. Accepts an ISO 8601 date string or duration shorthand like "30s", "1m", "2h", "3d", "4w". */
383
- timeout?: string;
521
+ timeout?: string | undefined;
384
522
  /** Tags to attach to the waitpoint. You can set up to 10 tags, each under 128 characters. We recommend namespacing tags with a prefix like `user:1234567` or `org_9876543`. */
385
- tags?: CreateWaitpointTokenV1RequestTags;
523
+ tags?: CreateWaitpointTokenV1RequestTags | undefined;
386
524
  }
387
525
  export interface CreateWaitpointTokenResponse {
388
526
  /** The unique ID of the waitpoint token. */
@@ -392,10 +530,59 @@ export interface CreateWaitpointTokenResponse {
392
530
  /** An HTTP callback URL. A POST request to this URL (with an optional JSON body) will complete the waitpoint without needing an API key. */
393
531
  url: string;
394
532
  }
533
+ export type CreateWebhookWaiterV1RequestMatchValue = string | number | boolean;
534
+ /** Up to five paths, each mapped to the value it must equal. `event.*` reads the event body, `header.*` a request header (case-insensitive) and `webhook.*` the endpoint (`id`, `source`, `externalRef`, `tenantId` or `deliveryId`). Omit it to create a waiter with its own `url`. */
535
+ export type CreateWebhookWaiterV1RequestMatchMap = {
536
+ [key: string]: CreateWebhookWaiterV1RequestMatchValue | undefined;
537
+ };
538
+ export type CreateWebhookWaiterV1RequestTagsCase1List = Array<string>;
539
+ /** Up to 10 tags, added to the `webhook:<endpoint id>` tag every waiter gets. */
540
+ export type CreateWebhookWaiterV1RequestTags = string | CreateWebhookWaiterV1RequestTagsCase1List;
541
+ export interface CreateWebhookWaiterV1Request {
542
+ /** The endpoint's declared id (the `id` passed to `webhooks.endpoint.define`) or its `wh_` id. A value starting with `wh_` is always a generated id, since declared ids can't start with `wh_`. A declared id names the endpoint's declared instance in the key's environment. */
543
+ endpointId: string;
544
+ /** Up to five paths, each mapped to the value it must equal. `event.*` reads the event body, `header.*` a request header (case-insensitive) and `webhook.*` the endpoint (`id`, `source`, `externalRef`, `tenantId` or `deliveryId`). Omit it to create a waiter with its own `url`. */
545
+ match?: CreateWebhookWaiterV1RequestMatchMap | undefined;
546
+ /** A [filter](/webhooks/filters) the event must also pass, checked after `match`. */
547
+ filter?: string | undefined;
548
+ /** A duration such as `30m` or `1h`, or an ISO 8601 date. Defaults to 24 hours, up to 90 days. */
549
+ timeout?: string | undefined;
550
+ /** Up to 10 tags, added to the `webhook:<endpoint id>` tag every waiter gets. */
551
+ tags?: CreateWebhookWaiterV1RequestTags | undefined;
552
+ /** A create with a key already used in the environment returns the original waiter with `isCached: true`, even if it has completed. */
553
+ idempotencyKey?: string | undefined;
554
+ /** How long the idempotency key lasts, such as `1h` or `30d`. */
555
+ idempotencyKeyTTL?: string | undefined;
556
+ }
557
+ export interface CreateWebhookWaiterResponse {
558
+ /** The waiter's id, which is also its waitpoint id. Wait on it with `webhooks.waiter.wait()` or `wait.forToken()`. */
559
+ id: string;
560
+ /** Only for a waiter created without `match`: the URL to give the provider as its per-request webhook. A delivery to it is verified with the endpoint's source and resumes only this waiter. */
561
+ url?: string | undefined;
562
+ /** When the waiter times out. */
563
+ expiresAt: string;
564
+ /** `true` if an existing waiter was returned for the same `idempotencyKey`. */
565
+ isCached: boolean;
566
+ }
395
567
  export interface DeactivateScheduleV1Request {
396
568
  /** The ID of the schedule. */
397
569
  schedule_id: string;
398
570
  }
571
+ export interface DeleteDashboardV1Request {
572
+ /** The custom dashboard id, starting with `dashboard_` */
573
+ dashboardId: string;
574
+ }
575
+ export interface DeleteDashboardV1Response {
576
+ id?: string | undefined;
577
+ }
578
+ export interface DeleteDashboardWidgetV1Request {
579
+ /** The custom dashboard id, starting with `dashboard_` */
580
+ dashboardId: string;
581
+ /** The widget id */
582
+ widgetId: string;
583
+ /** The revision you last read. The delete fails with a 409 if the dashboard changed since. */
584
+ revision?: string | undefined;
585
+ }
399
586
  export type DeleteProjectEnvvarV1RequestEnv = "dev" | "staging" | "prod";
400
587
  export interface DeleteProjectEnvvarV1Request {
401
588
  /** The external ref of the project. You can find this in the project settings. Starts with `proj_`. */
@@ -411,6 +598,102 @@ export interface DeleteScheduleV1Request {
411
598
  }
412
599
  export interface DeleteScheduleV1Response {
413
600
  }
601
+ export interface DisableWebhookEndpointV1Request {
602
+ /** The endpoint's declared id (the `id` passed to `webhooks.endpoint.define`) or its `wh_` id. A value starting with `wh_` is always a generated id, since declared ids can't start with `wh_`. A declared id names the endpoint's declared instance in the key's environment. */
603
+ endpointId: string;
604
+ }
605
+ /** `active` accepts deliveries. `inactive` was disabled, or is no longer in the current deployment, and its URL responds with `404`. */
606
+ export type DisableWebhookEndpointV1ResponseStatus = "active" | "inactive" | "deleting";
607
+ /** Who supplies the signing secret: `provider` issues it (store it with the set secret endpoint), `integrator` means you choose it (generate one), and `either` accepts both. */
608
+ export type DisableWebhookEndpointV1ResponseSecretProvisioning = "provider" | "integrator" | "either";
609
+ /** `task` triggers a run. `session` routes the event into an agent's session. */
610
+ export type DisableWebhookEndpointV1ResponseSubscribersItemType = "task" | "session";
611
+ export interface DisableWebhookEndpointV1ResponseSubscribersItem {
612
+ /** The subscriber id, used as `targetId` when replaying: a `webhook()` task's id, or `agentId:eventId` for an agent's `chat.event` or channel. */
613
+ id: string;
614
+ /** `task` triggers a run. `session` routes the event into an agent's session. */
615
+ type: DisableWebhookEndpointV1ResponseSubscribersItemType;
616
+ /** The subscribing task, or the agent for a `session` subscriber. */
617
+ taskId: string;
618
+ /** The filter that decides which events the subscriber takes. `null` takes every event. */
619
+ filter: string | null;
620
+ }
621
+ /** The tasks and agents that receive the endpoint's deliveries. */
622
+ export type DisableWebhookEndpointV1ResponseSubscribersList = Array<DisableWebhookEndpointV1ResponseSubscribersItem>;
623
+ export interface DisableWebhookEndpointV1Response {
624
+ /** The endpoint's id. */
625
+ id: string;
626
+ /** The `id` the endpoint is declared with in code (`webhooks.endpoint.define({ id })`). */
627
+ declaredId: string;
628
+ /** The provider source that verifies and types the endpoint's events. */
629
+ source: string;
630
+ /** `active` accepts deliveries. `inactive` was disabled, or is no longer in the current deployment, and its URL responds with `404`. */
631
+ status: DisableWebhookEndpointV1ResponseStatus;
632
+ /** Who supplies the signing secret: `provider` issues it (store it with the set secret endpoint), `integrator` means you choose it (generate one), and `either` accepts both. */
633
+ secretProvisioning: DisableWebhookEndpointV1ResponseSecretProvisioning;
634
+ /** Whether a signing secret or public key is set. Every delivery is rejected until it is. */
635
+ secretSet: boolean;
636
+ /** Reserved for dynamic endpoints. `null` for a declared endpoint. */
637
+ tenantId: string | null;
638
+ /** Reserved for dynamic endpoints. `null` for a declared endpoint. */
639
+ externalRef: string | null;
640
+ /** The webhook URL to register with the provider. */
641
+ url: string;
642
+ createdAt: string;
643
+ updatedAt: string;
644
+ /** The tasks and agents that receive the endpoint's deliveries. */
645
+ subscribers: DisableWebhookEndpointV1ResponseSubscribersList;
646
+ /** Instructions for an AI coding agent to register the endpoint with its provider and set up the signing secret. */
647
+ setupPrompt: string;
648
+ }
649
+ export interface EnableWebhookEndpointV1Request {
650
+ /** The endpoint's declared id (the `id` passed to `webhooks.endpoint.define`) or its `wh_` id. A value starting with `wh_` is always a generated id, since declared ids can't start with `wh_`. A declared id names the endpoint's declared instance in the key's environment. */
651
+ endpointId: string;
652
+ }
653
+ /** `active` accepts deliveries. `inactive` was disabled, or is no longer in the current deployment, and its URL responds with `404`. */
654
+ export type EnableWebhookEndpointV1ResponseStatus = "active" | "inactive" | "deleting";
655
+ /** Who supplies the signing secret: `provider` issues it (store it with the set secret endpoint), `integrator` means you choose it (generate one), and `either` accepts both. */
656
+ export type EnableWebhookEndpointV1ResponseSecretProvisioning = "provider" | "integrator" | "either";
657
+ /** `task` triggers a run. `session` routes the event into an agent's session. */
658
+ export type EnableWebhookEndpointV1ResponseSubscribersItemType = "task" | "session";
659
+ export interface EnableWebhookEndpointV1ResponseSubscribersItem {
660
+ /** The subscriber id, used as `targetId` when replaying: a `webhook()` task's id, or `agentId:eventId` for an agent's `chat.event` or channel. */
661
+ id: string;
662
+ /** `task` triggers a run. `session` routes the event into an agent's session. */
663
+ type: EnableWebhookEndpointV1ResponseSubscribersItemType;
664
+ /** The subscribing task, or the agent for a `session` subscriber. */
665
+ taskId: string;
666
+ /** The filter that decides which events the subscriber takes. `null` takes every event. */
667
+ filter: string | null;
668
+ }
669
+ /** The tasks and agents that receive the endpoint's deliveries. */
670
+ export type EnableWebhookEndpointV1ResponseSubscribersList = Array<EnableWebhookEndpointV1ResponseSubscribersItem>;
671
+ export interface EnableWebhookEndpointV1Response {
672
+ /** The endpoint's id. */
673
+ id: string;
674
+ /** The `id` the endpoint is declared with in code (`webhooks.endpoint.define({ id })`). */
675
+ declaredId: string;
676
+ /** The provider source that verifies and types the endpoint's events. */
677
+ source: string;
678
+ /** `active` accepts deliveries. `inactive` was disabled, or is no longer in the current deployment, and its URL responds with `404`. */
679
+ status: EnableWebhookEndpointV1ResponseStatus;
680
+ /** Who supplies the signing secret: `provider` issues it (store it with the set secret endpoint), `integrator` means you choose it (generate one), and `either` accepts both. */
681
+ secretProvisioning: EnableWebhookEndpointV1ResponseSecretProvisioning;
682
+ /** Whether a signing secret or public key is set. Every delivery is rejected until it is. */
683
+ secretSet: boolean;
684
+ /** Reserved for dynamic endpoints. `null` for a declared endpoint. */
685
+ tenantId: string | null;
686
+ /** Reserved for dynamic endpoints. `null` for a declared endpoint. */
687
+ externalRef: string | null;
688
+ /** The webhook URL to register with the provider. */
689
+ url: string;
690
+ createdAt: string;
691
+ updatedAt: string;
692
+ /** The tasks and agents that receive the endpoint's deliveries. */
693
+ subscribers: EnableWebhookEndpointV1ResponseSubscribersList;
694
+ /** Instructions for an AI coding agent to register the endpoint with its provider and set up the signing secret. */
695
+ setupPrompt: string;
696
+ }
414
697
  /** The scope of data to query - environment (default), project, or organization */
415
698
  export type ExecuteQueryV1RequestScope = "environment" | "project" | "organization";
416
699
  /** Response format - "json" returns structured data (default), "csv" returns CSV string */
@@ -419,31 +702,31 @@ export interface ExecuteQueryV1Request {
419
702
  /** The TRQL query to execute */
420
703
  query: string;
421
704
  /** The scope of data to query - environment (default), project, or organization */
422
- scope?: ExecuteQueryV1RequestScope | (string & {});
705
+ scope?: ExecuteQueryV1RequestScope | (string & {}) | undefined;
423
706
  /** Time period shorthand (e.g., "7d", "30d", "1h"). Cannot be used with from/to. */
424
- period?: string | null;
707
+ period?: string | null | undefined;
425
708
  /** Start of time range as ISO 8601 timestamp. Must be used with 'to'. */
426
- from?: string | null;
709
+ from?: string | null | undefined;
427
710
  /** End of time range as ISO 8601 timestamp. Must be used with 'from'. */
428
- to?: string | null;
711
+ to?: string | null | undefined;
429
712
  /** Response format - "json" returns structured data (default), "csv" returns CSV string */
430
- format?: ExecuteQueryV1RequestFormat | (string & {});
713
+ format?: ExecuteQueryV1RequestFormat | (string & {}) | undefined;
431
714
  }
432
715
  export type ExecuteQueryResponseCase0Format = "json";
433
716
  /** Array of result rows */
434
717
  export type ExecuteQueryResponseCase0ResultsList = Array<unknown>;
435
718
  /** JSON format response */
436
719
  export interface ExecuteQueryResponseCase0 {
437
- format?: ExecuteQueryResponseCase0Format;
720
+ format?: ExecuteQueryResponseCase0Format | undefined;
438
721
  /** Array of result rows */
439
- results?: ExecuteQueryResponseCase0ResultsList;
722
+ results?: ExecuteQueryResponseCase0ResultsList | undefined;
440
723
  }
441
724
  export type ExecuteQueryResponseCase1Format = "csv";
442
725
  /** CSV format response */
443
726
  export interface ExecuteQueryResponseCase1 {
444
- format?: ExecuteQueryResponseCase1Format;
727
+ format?: ExecuteQueryResponseCase1Format | undefined;
445
728
  /** CSV-formatted results */
446
- results?: string;
729
+ results?: string | undefined;
447
730
  }
448
731
  export type ExecuteQueryResponse = ExecuteQueryResponseCase0 | ExecuteQueryResponseCase1;
449
732
  export type ExecuteQueryV1Response = ExecuteQueryResponse;
@@ -453,7 +736,7 @@ export interface GetBatchResultsV1Request {
453
736
  }
454
737
  export interface GetBatchResultsV1ResponseItemsItemUsage {
455
738
  /** Duration of the run in milliseconds. */
456
- durationMs?: number;
739
+ durationMs?: number | undefined;
457
740
  }
458
741
  export interface GetBatchResultsV1ResponseItemsItem {
459
742
  /** Whether this run completed successfully. */
@@ -461,22 +744,22 @@ export interface GetBatchResultsV1ResponseItemsItem {
461
744
  /** The run ID. */
462
745
  id: string;
463
746
  /** The serialized output as a string (present when ok is true). Use outputType to determine how to parse it -- for "application/json" use JSON.parse(). */
464
- output?: string;
747
+ output?: string | undefined;
465
748
  /** The content type of the serialized output, e.g. "application/json". */
466
- outputType?: string;
749
+ outputType?: string | undefined;
467
750
  /** Error details (present when ok is false). */
468
- error?: unknown;
469
- usage?: GetBatchResultsV1ResponseItemsItemUsage;
751
+ error?: unknown | undefined;
752
+ usage?: GetBatchResultsV1ResponseItemsItemUsage | undefined;
470
753
  /** The task identifier. */
471
- taskIdentifier?: string;
754
+ taskIdentifier?: string | undefined;
472
755
  }
473
756
  /** Execution results for each run in the batch. */
474
757
  export type GetBatchResultsV1ResponseItemsList = Array<GetBatchResultsV1ResponseItemsItem>;
475
758
  export interface GetBatchResultsV1Response {
476
759
  /** The batch ID. */
477
- id?: string;
760
+ id?: string | undefined;
478
761
  /** Execution results for each run in the batch. */
479
- items?: GetBatchResultsV1ResponseItemsList;
762
+ items?: GetBatchResultsV1ResponseItemsList | undefined;
480
763
  }
481
764
  export interface GetBatchV1Request {
482
765
  /** The ID of the batch, starts with `batch_`. */
@@ -488,35 +771,35 @@ export type GetBatchV1ResponseStatus = "PENDING" | "PROCESSING" | "COMPLETED" |
488
771
  export type GetBatchV1ResponseRunsList = Array<string>;
489
772
  export interface GetBatchV1ResponseErrorsItem {
490
773
  /** The index of the failed item. */
491
- index?: number;
774
+ index?: number | undefined;
492
775
  /** The task identifier of the failed item. */
493
- taskIdentifier?: string;
776
+ taskIdentifier?: string | undefined;
494
777
  /** The error details. */
495
- error?: unknown;
778
+ error?: unknown | undefined;
496
779
  /** An optional error code. */
497
- errorCode?: string | null;
780
+ errorCode?: string | null | undefined;
498
781
  }
499
782
  /** Error details for failed items (present for PARTIAL_FAILED batches). */
500
783
  export type GetBatchV1ResponseErrorsList = Array<GetBatchV1ResponseErrorsItem>;
501
784
  export interface GetBatchV1Response {
502
785
  /** The batch ID. */
503
- id?: string;
786
+ id?: string | undefined;
504
787
  /** The current status of the batch. */
505
- status?: GetBatchV1ResponseStatus;
788
+ status?: GetBatchV1ResponseStatus | undefined;
506
789
  /** The idempotency key provided when triggering, if any. */
507
- idempotencyKey?: string | null;
508
- createdAt?: string;
509
- updatedAt?: string;
790
+ idempotencyKey?: string | null | undefined;
791
+ createdAt?: string | undefined;
792
+ updatedAt?: string | undefined;
510
793
  /** The total number of runs in the batch. */
511
- runCount?: number;
794
+ runCount?: number | undefined;
512
795
  /** Array of run IDs in the batch. */
513
- runs?: GetBatchV1ResponseRunsList;
796
+ runs?: GetBatchV1ResponseRunsList | undefined;
514
797
  /** Number of successful runs (populated after completion). */
515
- successfulRunCount?: number | null;
798
+ successfulRunCount?: number | null | undefined;
516
799
  /** Number of failed runs (populated after completion). */
517
- failedRunCount?: number | null;
800
+ failedRunCount?: number | null | undefined;
518
801
  /** Error details for failed items (present for PARTIAL_FAILED batches). */
519
- errors?: GetBatchV1ResponseErrorsList | null;
802
+ errors?: GetBatchV1ResponseErrorsList | null | undefined;
520
803
  }
521
804
  export interface GetBulkActionV1Request {
522
805
  /** The ID of a bulk action, starts with `bulk_`. */
@@ -536,38 +819,40 @@ export interface BulkActionObject {
536
819
  /** The bulk action ID, prefixed with `bulk_`. */
537
820
  id: string;
538
821
  /** The name provided when the bulk action was created. */
539
- name?: string;
822
+ name?: string | undefined;
540
823
  type: BulkActionObjectType;
541
824
  status: BulkActionObjectStatus;
542
825
  counts: BulkActionObjectCounts;
543
826
  createdAt: string;
544
- completedAt?: string;
827
+ completedAt?: string | undefined;
545
828
  }
546
829
  export interface GetConcurrencyLimitV1Request {
547
830
  /** The limit's name, as declared with `concurrencyLimit()` */
548
831
  name: string;
832
+ /** Return the view for this concurrencyKey instead of the limit itself. */
833
+ concurrencyKey?: string | undefined;
549
834
  }
550
835
  /** Caps each concurrencyKey pool; runs without a key share one pool */
551
836
  export interface ConcurrencyLimitObjectPerKey {
552
837
  /** Enforced right now (null = no per-key bound). Enforcement clamps it to the environment concurrency limit at admit time. */
553
- current?: number | null;
838
+ current?: number | null | undefined;
554
839
  /** The declared value an override reverts to on reset */
555
- base?: number | null;
840
+ base?: number | null | undefined;
556
841
  /** The overridden value, when an override is active */
557
- override?: number | null;
842
+ override?: number | null | undefined;
558
843
  /** When the override was applied */
559
- overriddenAt?: string | null;
844
+ overriddenAt?: string | null | undefined;
560
845
  }
561
846
  /** Caps every run holding this limit, keys or not */
562
847
  export interface ConcurrencyLimitObjectTotal {
563
848
  /** Enforced right now (null = no total bound). Enforcement clamps it to the environment concurrency limit at admit time. */
564
- current?: number | null;
849
+ current?: number | null | undefined;
565
850
  /** The declared value an override reverts to on reset */
566
- base?: number | null;
851
+ base?: number | null | undefined;
567
852
  /** The overridden value, when an override is active */
568
- override?: number | null;
853
+ override?: number | null | undefined;
569
854
  /** When the override was applied */
570
- overriddenAt?: string | null;
855
+ overriddenAt?: string | null | undefined;
571
856
  }
572
857
  export interface ConcurrencyLimitObject {
573
858
  /** The limit's id, starting with `climit_` */
@@ -583,7 +868,37 @@ export interface ConcurrencyLimitObject {
583
868
  /** Runs that are queued and must clear this limit to execute */
584
869
  queued: number;
585
870
  /** Whether the limit is paused. A paused limit admits no runs until resumed; its configured bounds are kept. */
586
- paused?: boolean;
871
+ paused?: boolean | undefined;
872
+ }
873
+ /** The per-key bound for this key */
874
+ export interface ConcurrencyLimitKeyObjectPerKey {
875
+ /** Enforced right now for this key (the override when one is in force, else the limit's perKey), clamped to the environment concurrency limit */
876
+ current?: number | null | undefined;
877
+ /** The limit's own perKey as enforced */
878
+ base?: number | null | undefined;
879
+ /** The key's temporary override, when one is in force */
880
+ override?: number | null | undefined;
881
+ /** When the key's override lapses; null when there is none */
882
+ expiresAt?: string | null | undefined;
883
+ }
884
+ /** A limit's view for one concurrencyKey, returned when a request names a concurrencyKey. */
885
+ export interface ConcurrencyLimitKeyObject {
886
+ /** The limit's name, as declared with `concurrencyLimit()` */
887
+ name: string;
888
+ /** The concurrencyKey this view is for */
889
+ concurrencyKey: string;
890
+ /** The per-key bound for this key */
891
+ perKey: ConcurrencyLimitKeyObjectPerKey;
892
+ /** Runs executing for this key that hold this limit */
893
+ running: number;
894
+ /** Whether the limit is paused. A paused limit admits no runs, override or not. */
895
+ paused: boolean;
896
+ }
897
+ export type GetConcurrencyLimitV1ResponseBody = ConcurrencyLimitObject | ConcurrencyLimitKeyObject;
898
+ export type GetConcurrencyLimitV1Response = GetConcurrencyLimitV1ResponseBody;
899
+ export interface GetDashboardV1Request {
900
+ /** The custom dashboard id, starting with `dashboard_` */
901
+ dashboardId: string;
587
902
  }
588
903
  export interface GetDeploymentV1Request {
589
904
  /** The deployment ID. */
@@ -592,41 +907,41 @@ export interface GetDeploymentV1Request {
592
907
  /** The current status of the deployment */
593
908
  export type GetDeploymentV1ResponseStatus = "PENDING" | "INSTALLING" | "BUILDING" | "DEPLOYING" | "DEPLOYED" | "FAILED" | "CANCELED" | "TIMED_OUT";
594
909
  export interface GetDeploymentV1ResponseWorkerTasksItem {
595
- id?: string;
596
- slug?: string;
597
- filePath?: string;
598
- exportName?: string;
910
+ id?: string | undefined;
911
+ slug?: string | undefined;
912
+ filePath?: string | undefined;
913
+ exportName?: string | undefined;
599
914
  }
600
915
  export type GetDeploymentV1ResponseWorkerTasksList = Array<GetDeploymentV1ResponseWorkerTasksItem>;
601
916
  /** Worker information if available */
602
917
  export interface GetDeploymentV1ResponseWorker {
603
- id?: string;
604
- version?: string;
605
- tasks?: GetDeploymentV1ResponseWorkerTasksList;
918
+ id?: string | undefined;
919
+ version?: string | undefined;
920
+ tasks?: GetDeploymentV1ResponseWorkerTasksList | undefined;
606
921
  }
607
922
  export interface GetDeploymentV1Response {
608
923
  /** The deployment ID */
609
- id?: string;
924
+ id?: string | undefined;
610
925
  /** The current status of the deployment */
611
- status?: GetDeploymentV1ResponseStatus;
926
+ status?: GetDeploymentV1ResponseStatus | undefined;
612
927
  /** Hash of the deployment content */
613
- contentHash?: string;
928
+ contentHash?: string | undefined;
614
929
  /** The short code for the deployment */
615
- shortCode?: string;
930
+ shortCode?: string | undefined;
616
931
  /** The deployment version (e.g., "20250228.1") */
617
- version?: string;
932
+ version?: string | undefined;
618
933
  /** Reference to the deployment image */
619
- imageReference?: string | null;
934
+ imageReference?: string | null | undefined;
620
935
  /** Platform of the deployment image */
621
- imagePlatform?: string;
936
+ imagePlatform?: string | undefined;
622
937
  /** The external deployment id this deployment was deployed under (`--external-id`), used by version skew protection to pin runs. Absent if the deployment was deployed without one */
623
- externalId?: string;
938
+ externalId?: string | undefined;
624
939
  /** External build data if applicable */
625
- externalBuildData?: unknown | null;
940
+ externalBuildData?: unknown | null | undefined;
626
941
  /** Error data if the deployment failed */
627
- errorData?: unknown | null;
942
+ errorData?: unknown | null | undefined;
628
943
  /** Worker information if available */
629
- worker?: GetDeploymentV1ResponseWorker | null;
944
+ worker?: GetDeploymentV1ResponseWorker | null | undefined;
630
945
  }
631
946
  export interface GetErrorV1Request {
632
947
  /** The ID of an error group, starts with `error_`. */
@@ -653,16 +968,16 @@ export interface ErrorObject {
653
968
  /** The most recent worker versions the error has occurred in (up to five) */
654
969
  affectedVersions: ErrorObjectAffectedVersionsList;
655
970
  status: ErrorObjectStatus;
656
- resolvedAt?: string | null;
657
- resolvedInVersion?: string | null;
971
+ resolvedAt?: string | null | undefined;
972
+ resolvedInVersion?: string | null | undefined;
658
973
  /** The ID of the user who resolved the error, when attributable */
659
- resolvedBy?: string | null;
660
- ignoredAt?: string | null;
661
- ignoredUntil?: string | null;
662
- ignoredReason?: string | null;
663
- ignoredByUserId?: string | null;
664
- ignoredUntilOccurrenceRate?: number | null;
665
- ignoredUntilTotalOccurrences?: number | null;
974
+ resolvedBy?: string | null | undefined;
975
+ ignoredAt?: string | null | undefined;
976
+ ignoredUntil?: string | null | undefined;
977
+ ignoredReason?: string | null | undefined;
978
+ ignoredByUserId?: string | null | undefined;
979
+ ignoredUntilOccurrenceRate?: number | null | undefined;
980
+ ignoredUntilTotalOccurrences?: number | null | undefined;
666
981
  }
667
982
  export interface GetLatestDeploymentV1Request {
668
983
  }
@@ -670,19 +985,19 @@ export interface GetLatestDeploymentV1Request {
670
985
  export type GetLatestDeploymentV1ResponseStatus = "PENDING" | "INSTALLING" | "BUILDING" | "DEPLOYING" | "DEPLOYED" | "FAILED" | "CANCELED" | "TIMED_OUT";
671
986
  export interface GetLatestDeploymentV1Response {
672
987
  /** The deployment ID */
673
- id?: string;
988
+ id?: string | undefined;
674
989
  /** The current status of the deployment */
675
- status?: GetLatestDeploymentV1ResponseStatus;
990
+ status?: GetLatestDeploymentV1ResponseStatus | undefined;
676
991
  /** Hash of the deployment content */
677
- contentHash?: string;
992
+ contentHash?: string | undefined;
678
993
  /** The short code for the deployment */
679
- shortCode?: string;
994
+ shortCode?: string | undefined;
680
995
  /** The deployment version (e.g., "20250228.1") */
681
- version?: string;
996
+ version?: string | undefined;
682
997
  /** Reference to the deployment image */
683
- imageReference?: string | null;
998
+ imageReference?: string | null | undefined;
684
999
  /** Error data if the deployment failed */
685
- errorData?: unknown | null;
1000
+ errorData?: unknown | null | undefined;
686
1001
  }
687
1002
  export type GetProjectEnvvarV1RequestEnv = "dev" | "staging" | "prod";
688
1003
  export interface GetProjectEnvvarV1Request {
@@ -703,38 +1018,38 @@ export interface GetQuerySchemaV1Request {
703
1018
  export type GetQuerySchemaV1ResponseTablesItemColumnsItemAllowedValuesList = Array<string>;
704
1019
  export interface GetQuerySchemaV1ResponseTablesItemColumnsItem {
705
1020
  /** Column name */
706
- name?: string;
1021
+ name?: string | undefined;
707
1022
  /** ClickHouse data type */
708
- type?: string;
1023
+ type?: string | undefined;
709
1024
  /** Column description */
710
- description?: string;
1025
+ description?: string | undefined;
711
1026
  /** Example value */
712
- example?: string;
1027
+ example?: string | undefined;
713
1028
  /** Allowed values for enum-like columns */
714
- allowedValues?: GetQuerySchemaV1ResponseTablesItemColumnsItemAllowedValuesList;
1029
+ allowedValues?: GetQuerySchemaV1ResponseTablesItemColumnsItemAllowedValuesList | undefined;
715
1030
  /** Whether this is a core column included in default queries */
716
- coreColumn?: boolean;
1031
+ coreColumn?: boolean | undefined;
717
1032
  }
718
1033
  export type GetQuerySchemaV1ResponseTablesItemColumnsList = Array<GetQuerySchemaV1ResponseTablesItemColumnsItem>;
719
1034
  export interface GetQuerySchemaV1ResponseTablesItem {
720
1035
  /** Table name used in TRQL queries */
721
- name?: string;
1036
+ name?: string | undefined;
722
1037
  /** Description of the table */
723
- description?: string;
1038
+ description?: string | undefined;
724
1039
  /** The primary time column for this table */
725
- timeColumn?: string;
726
- columns?: GetQuerySchemaV1ResponseTablesItemColumnsList;
1040
+ timeColumn?: string | undefined;
1041
+ columns?: GetQuerySchemaV1ResponseTablesItemColumnsList | undefined;
727
1042
  }
728
1043
  export type GetQuerySchemaV1ResponseTablesList = Array<GetQuerySchemaV1ResponseTablesItem>;
729
1044
  export interface GetQuerySchemaV1Response {
730
- tables?: GetQuerySchemaV1ResponseTablesList;
1045
+ tables?: GetQuerySchemaV1ResponseTablesList | undefined;
731
1046
  }
732
1047
  export type GetQueueV1RequestType = "id" | "task" | "custom";
733
1048
  export interface GetQueueV1Request {
734
1049
  /** The queue ID (e.g., `queue_1234`), or the name of the queue when using the `type` query parameter. */
735
1050
  queueParam: string;
736
1051
  /** How to interpret the `queueParam` path parameter: - `id`: Treat as a queue ID (default) - `task`: Treat as a task ID to get the task's default queue - `custom`: Treat as a custom queue name */
737
- type?: GetQueueV1RequestType | (string & {});
1052
+ type?: GetQueueV1RequestType | (string & {}) | undefined;
738
1053
  }
739
1054
  /** The type of queue: - `task`: Created automatically for each task - `custom`: Created explicitly in your code using `queue()` */
740
1055
  export type QueueObjectType = "task" | "custom";
@@ -743,15 +1058,15 @@ export type QueueObjectVersion = "V1" | "V2";
743
1058
  /** Detailed concurrency information. V1 queues only. */
744
1059
  export interface QueueObjectConcurrency {
745
1060
  /** The effective/current concurrency limit */
746
- current?: number | null;
1061
+ current?: number | null | undefined;
747
1062
  /** The base concurrency limit defined in code */
748
- base?: number | null;
1063
+ base?: number | null | undefined;
749
1064
  /** The override concurrency limit (if set) */
750
- override?: number | null;
1065
+ override?: number | null | undefined;
751
1066
  /** When the concurrency limit was overridden */
752
- overriddenAt?: string | null;
1067
+ overriddenAt?: string | null | undefined;
753
1068
  /** Who overrode the concurrency limit (null if via API) */
754
- overriddenBy?: string | null;
1069
+ overriddenBy?: string | null | undefined;
755
1070
  }
756
1071
  export interface QueueObject {
757
1072
  /** The queue ID, e.g., `queue_1234` */
@@ -769,9 +1084,9 @@ export interface QueueObject {
769
1084
  /** Whether the queue is paused. When paused, no new runs will start. */
770
1085
  paused: boolean;
771
1086
  /** The queue's own concurrency limit. Meaningful on V1 queues; always null on V2 queues. */
772
- concurrencyLimit?: number | null;
1087
+ concurrencyLimit?: number | null | undefined;
773
1088
  /** Detailed concurrency information. V1 queues only. */
774
- concurrency?: QueueObjectConcurrency;
1089
+ concurrency?: QueueObjectConcurrency | undefined;
775
1090
  }
776
1091
  export interface GetRunEventsV1Request {
777
1092
  /** The ID of an run, starts with `run_`. The run ID will be returned when you trigger a run on a task. */
@@ -783,64 +1098,64 @@ export type GetRunEventsV1ResponseEventsItemLevel = "TRACE" | "DEBUG" | "LOG" |
783
1098
  export type GetRunEventsV1ResponseEventsItemKind = "UNSPECIFIED" | "INTERNAL" | "SERVER" | "CLIENT" | "PRODUCER" | "CONSUMER" | "UNRECOGNIZED" | "LOG";
784
1099
  export interface GetRunEventsV1ResponseEventsItemEventsItem {
785
1100
  /** The event name (e.g. "exception", "cancellation", "attempt_failed"). */
786
- name?: string;
1101
+ name?: string | undefined;
787
1102
  /** The time the event occurred. */
788
- time?: string;
1103
+ time?: string | undefined;
789
1104
  /** Event-specific properties. */
790
- properties?: unknown;
1105
+ properties?: unknown | undefined;
791
1106
  }
792
1107
  /** Span events (e.g. exceptions, cancellations) that occurred during this event. */
793
1108
  export type GetRunEventsV1ResponseEventsItemEventsList = Array<GetRunEventsV1ResponseEventsItemEventsItem>;
794
1109
  export type GetRunEventsV1ResponseEventsItemStyleAccessoryStyle = "codepath";
795
1110
  /** Accessory display element. */
796
1111
  export interface GetRunEventsV1ResponseEventsItemStyleAccessory {
797
- text?: string;
798
- style?: GetRunEventsV1ResponseEventsItemStyleAccessoryStyle;
1112
+ text?: string | undefined;
1113
+ style?: GetRunEventsV1ResponseEventsItemStyleAccessoryStyle | undefined;
799
1114
  }
800
1115
  /** Display style metadata for the event. */
801
1116
  export interface GetRunEventsV1ResponseEventsItemStyle {
802
1117
  /** Icon identifier for display. */
803
- icon?: string;
1118
+ icon?: string | undefined;
804
1119
  /** Visual variant (e.g. "success", "failure"). */
805
- variant?: string;
1120
+ variant?: string | undefined;
806
1121
  /** Accessory display element. */
807
- accessory?: GetRunEventsV1ResponseEventsItemStyleAccessory;
1122
+ accessory?: GetRunEventsV1ResponseEventsItemStyleAccessory | undefined;
808
1123
  }
809
1124
  export interface GetRunEventsV1ResponseEventsItem {
810
1125
  /** The span ID of the event. */
811
- spanId?: string;
1126
+ spanId?: string | undefined;
812
1127
  /** The parent span ID, if any. */
813
- parentId?: string | null;
1128
+ parentId?: string | null | undefined;
814
1129
  /** The run ID associated with this event. */
815
- runId?: string | null;
1130
+ runId?: string | null | undefined;
816
1131
  /** The event message. */
817
- message?: string;
1132
+ message?: string | undefined;
818
1133
  /** The start time of the event as a bigint string (nanoseconds since epoch). */
819
- startTime?: string;
1134
+ startTime?: string | undefined;
820
1135
  /** The duration of the event in nanoseconds. */
821
- duration?: number;
1136
+ duration?: number | undefined;
822
1137
  /** Whether this event represents an error. */
823
- isError?: boolean;
1138
+ isError?: boolean | undefined;
824
1139
  /** Whether this event is partial (still in progress). */
825
- isPartial?: boolean;
1140
+ isPartial?: boolean | undefined;
826
1141
  /** Whether this event was cancelled. */
827
- isCancelled?: boolean;
1142
+ isCancelled?: boolean | undefined;
828
1143
  /** The log level of the event. */
829
- level?: GetRunEventsV1ResponseEventsItemLevel;
1144
+ level?: GetRunEventsV1ResponseEventsItemLevel | undefined;
830
1145
  /** The kind of span event. */
831
- kind?: GetRunEventsV1ResponseEventsItemKind;
1146
+ kind?: GetRunEventsV1ResponseEventsItemKind | undefined;
832
1147
  /** The attempt number this event belongs to. */
833
- attemptNumber?: number | null;
1148
+ attemptNumber?: number | null | undefined;
834
1149
  /** The task identifier. */
835
- taskSlug?: string;
1150
+ taskSlug?: string | undefined;
836
1151
  /** Span events (e.g. exceptions, cancellations) that occurred during this event. */
837
- events?: GetRunEventsV1ResponseEventsItemEventsList;
1152
+ events?: GetRunEventsV1ResponseEventsItemEventsList | undefined;
838
1153
  /** Display style metadata for the event. */
839
- style?: GetRunEventsV1ResponseEventsItemStyle;
1154
+ style?: GetRunEventsV1ResponseEventsItemStyle | undefined;
840
1155
  }
841
1156
  export type GetRunEventsV1ResponseEventsList = Array<GetRunEventsV1ResponseEventsItem>;
842
1157
  export interface GetRunEventsV1Response {
843
- events?: GetRunEventsV1ResponseEventsList;
1158
+ events?: GetRunEventsV1ResponseEventsList | undefined;
844
1159
  }
845
1160
  export interface GetRunResultV1Request {
846
1161
  /** The ID of an run, starts with `run_`. The run ID will be returned when you trigger a run on a task. */
@@ -854,19 +1169,23 @@ export interface GetRunResultV1Response {
854
1169
  /** The run ID. */
855
1170
  id: string;
856
1171
  /** The serialized output as a string (present when ok is true). Use outputType to determine how to parse it -- for "application/json" use JSON.parse(). */
857
- output?: string;
1172
+ output?: string | undefined;
858
1173
  /** The content type of the serialized output, e.g. "application/json". */
859
- outputType?: string;
1174
+ outputType?: string | undefined;
860
1175
  /** Error details (present when ok is false). */
861
- error?: unknown;
1176
+ error?: unknown | undefined;
862
1177
  /** Execution usage stats. */
863
- usage?: GetBatchResultsV1ResponseItemsItemUsage;
1178
+ usage?: GetBatchResultsV1ResponseItemsItemUsage | undefined;
864
1179
  /** The task identifier. */
865
- taskIdentifier?: string;
1180
+ taskIdentifier?: string | undefined;
866
1181
  }
867
1182
  export interface GetRunTraceV1Request {
868
1183
  /** The ID of an run, starts with `run_`. The run ID will be returned when you trigger a run on a task. */
869
1184
  runId: string;
1185
+ /** Turns on paging. Spans per page; values are clamped to 1,000-10,000. Defaults to 10,000 when only `page[after]` is sent. */
1186
+ page_size_?: number | undefined;
1187
+ /** Turns on paging. The `pagination.next` cursor from the previous page, passed back unchanged. Omit it for the first page. */
1188
+ page_after_?: string | undefined;
870
1189
  }
871
1190
  export type SpanDetailedSummaryDataLevel = "TRACE" | "DEBUG" | "LOG" | "INFO" | "WARN" | "ERROR";
872
1191
  export type SpanDetailedSummaryDataEventsItem = GetRunEventsV1ResponseEventsItemEventsItem;
@@ -874,45 +1193,85 @@ export type SpanDetailedSummaryDataEventsItem = GetRunEventsV1ResponseEventsItem
874
1193
  export type SpanDetailedSummaryDataEventsList = Array<GetRunEventsV1ResponseEventsItemEventsItem>;
875
1194
  export interface SpanDetailedSummaryData {
876
1195
  /** The span message. */
877
- message?: string;
1196
+ message?: string | undefined;
878
1197
  /** The task identifier, if applicable. */
879
- taskSlug?: string;
1198
+ taskSlug?: string | undefined;
880
1199
  /** The start time of the span. */
881
- startTime?: string;
1200
+ startTime?: string | undefined;
882
1201
  /** The duration of the span in nanoseconds. */
883
- duration?: number;
884
- isError?: boolean;
885
- isPartial?: boolean;
886
- isCancelled?: boolean;
887
- level?: SpanDetailedSummaryDataLevel;
888
- attemptNumber?: number | null;
1202
+ duration?: number | undefined;
1203
+ isError?: boolean | undefined;
1204
+ isPartial?: boolean | undefined;
1205
+ isCancelled?: boolean | undefined;
1206
+ level?: SpanDetailedSummaryDataLevel | undefined;
1207
+ attemptNumber?: number | null | undefined;
889
1208
  /** Arbitrary OTel attributes attached to the span. */
890
- properties?: unknown;
1209
+ properties?: unknown | undefined;
891
1210
  /** Span events (e.g. exceptions, cancellations) that occurred during this span. */
892
- events?: SpanDetailedSummaryDataEventsList;
1211
+ events?: SpanDetailedSummaryDataEventsList | undefined;
893
1212
  }
894
1213
  /** Nested child spans. Each child has the same structure as the parent span. */
895
1214
  export type SpanDetailedSummaryChildrenList = Array<SpanDetailedSummary>;
896
1215
  export interface SpanDetailedSummary {
897
1216
  /** The span ID. */
898
- id?: string;
1217
+ id?: string | undefined;
899
1218
  /** The parent span ID, if any. */
900
- parentId?: string | null;
1219
+ parentId?: string | null | undefined;
901
1220
  /** The run ID this span belongs to. */
902
- runId?: string;
903
- data?: SpanDetailedSummaryData;
1221
+ runId?: string | undefined;
1222
+ data?: SpanDetailedSummaryData | undefined;
904
1223
  /** Nested child spans. Each child has the same structure as the parent span. */
905
- children?: SpanDetailedSummaryChildrenList;
1224
+ children?: SpanDetailedSummaryChildrenList | undefined;
906
1225
  }
907
- export interface GetRunTraceV1ResponseTrace {
1226
+ export interface GetRunTraceV1ResponseBodyCase0Trace {
908
1227
  /** The OTel trace ID. */
909
- traceId?: string;
1228
+ traceId?: string | undefined;
910
1229
  /** The requested run's span, with nested descendant spans as `children`. Not necessarily the trace-wide root span. */
911
- rootSpan?: SpanDetailedSummary;
912
- }
913
- export interface GetRunTraceV1Response {
914
- trace?: GetRunTraceV1ResponseTrace;
915
- }
1230
+ rootSpan?: SpanDetailedSummary | undefined;
1231
+ }
1232
+ export interface GetRunTraceV1ResponseBodyCase0 {
1233
+ trace?: GetRunTraceV1ResponseBodyCase0Trace | undefined;
1234
+ }
1235
+ export type GetRunTraceV1ResponseBodyCase1DataItemLevel = "TRACE" | "DEBUG" | "LOG" | "INFO" | "WARN" | "ERROR";
1236
+ export interface GetRunTraceV1ResponseBodyCase1DataItem {
1237
+ id?: string | undefined;
1238
+ parentId?: string | undefined;
1239
+ runId?: string | undefined;
1240
+ message?: string | undefined;
1241
+ startTime?: string | undefined;
1242
+ /** Duration in nanoseconds. */
1243
+ duration?: number | undefined;
1244
+ isError?: boolean | undefined;
1245
+ /** Still in progress. */
1246
+ isPartial?: boolean | undefined;
1247
+ isCancelled?: boolean | undefined;
1248
+ level?: GetRunTraceV1ResponseBodyCase1DataItemLevel | undefined;
1249
+ attemptNumber?: number | undefined;
1250
+ }
1251
+ /** Spans on this page, in start-time order. A span can appear on two pages (in progress, then finished); keep the finished one. */
1252
+ export type GetRunTraceV1ResponseBodyCase1DataList = Array<GetRunTraceV1ResponseBodyCase1DataItem>;
1253
+ export interface GetRunTraceV1ResponseBodyCase1AttemptFailuresItem {
1254
+ spanId?: string | undefined;
1255
+ attemptNumber?: number | undefined;
1256
+ runId?: string | undefined;
1257
+ }
1258
+ /** Failed-attempt records on this page. A span still in progress under a failed attempt of its run counts as errored. */
1259
+ export type GetRunTraceV1ResponseBodyCase1AttemptFailuresList = Array<GetRunTraceV1ResponseBodyCase1AttemptFailuresItem>;
1260
+ export interface GetRunTraceV1ResponseBodyCase1Pagination {
1261
+ /** Cursor for the next page. Absent on the last page. */
1262
+ next?: string | undefined;
1263
+ /** Some spans or records were left out. Either paging stopped early (for example while an emergency span limit is in place) or a span had more records than one read allows; `next` is still returned in that case. */
1264
+ truncated?: boolean | undefined;
1265
+ }
1266
+ export interface GetRunTraceV1ResponseBodyCase1 {
1267
+ /** Spans on this page, in start-time order. A span can appear on two pages (in progress, then finished); keep the finished one. */
1268
+ data?: GetRunTraceV1ResponseBodyCase1DataList | undefined;
1269
+ /** Failed-attempt records on this page. A span still in progress under a failed attempt of its run counts as errored. */
1270
+ attemptFailures?: GetRunTraceV1ResponseBodyCase1AttemptFailuresList | undefined;
1271
+ pagination?: GetRunTraceV1ResponseBodyCase1Pagination | undefined;
1272
+ }
1273
+ export type GetRunTraceV1ResponseBody = GetRunTraceV1ResponseBodyCase0 | GetRunTraceV1ResponseBodyCase1;
1274
+ export type GetRunTraceV1Response = GetRunTraceV1ResponseBody;
916
1275
  export interface GetRunV1Request {
917
1276
  /** The ID of an run, starts with `run_`. The run ID will be returned when you trigger a run on a task. */
918
1277
  runId: string;
@@ -937,82 +1296,82 @@ export interface CommonRunObject {
937
1296
  /** The identifier of the task that was run */
938
1297
  taskIdentifier: string;
939
1298
  /** The version of the worker that executed the run */
940
- version?: string;
1299
+ version?: string | undefined;
941
1300
  /** The idempotency key used to prevent creating duplicate runs, if provided */
942
- idempotencyKey?: string;
1301
+ idempotencyKey?: string | undefined;
943
1302
  createdAt: string;
944
1303
  updatedAt: string;
945
1304
  /** Whether the run is a test run or not */
946
- isTest?: boolean;
1305
+ isTest?: boolean | undefined;
947
1306
  /** The time the run started */
948
- startedAt?: string;
1307
+ startedAt?: string | undefined;
949
1308
  /** The time the run finished */
950
- finishedAt?: string;
1309
+ finishedAt?: string | undefined;
951
1310
  /** If the run was triggered with a delay, this will be the time the run will be enqueued to execute */
952
- delayedUntil?: string;
953
- ttl?: unknown;
1311
+ delayedUntil?: string | undefined;
1312
+ ttl?: unknown | undefined;
954
1313
  /** If the run had a TTL and that time has passed, when the run "expired". */
955
- expiredAt?: string;
1314
+ expiredAt?: string | undefined;
956
1315
  /** Tags can be attached to a run to make it easy to find runs (in the dashboard or using SDK functions like `runs.list`) */
957
- tags?: CommonRunObjectTagsList;
1316
+ tags?: CommonRunObjectTagsList | undefined;
958
1317
  /** The metadata of the run. See [Metadata](/runs/metadata) for more information. */
959
- metadata?: unknown;
1318
+ metadata?: unknown | undefined;
960
1319
  /** The compute cost of the run (so far) in cents. This cost does not apply to DEV runs. */
961
- costInCents?: number;
1320
+ costInCents?: number | undefined;
962
1321
  /** The invocation cost of the run in cents. This cost does not apply to DEV runs. */
963
- baseCostInCents?: number;
1322
+ baseCostInCents?: number | undefined;
964
1323
  /** The duration of compute (so far) in milliseconds. This does not include waits. */
965
- durationMs?: number;
1324
+ durationMs?: number | undefined;
966
1325
  /** The depth of the run in the task run hierarchy. The root run has a depth of 0. */
967
- depth?: number;
1326
+ depth?: number | undefined;
968
1327
  /** The ID of the batch that this run belongs to */
969
- batchId?: string;
1328
+ batchId?: string | undefined;
970
1329
  /** The name of the function that triggered the run */
971
- triggerFunction?: CommonRunObjectTriggerFunction;
1330
+ triggerFunction?: CommonRunObjectTriggerFunction | undefined;
972
1331
  }
973
1332
  /** The immediate children of the run. Will be omitted if the run has no children */
974
1333
  export type GetRunV1ResponseRelatedRunsChildrenList = Array<CommonRunObject>;
975
1334
  export interface GetRunV1ResponseRelatedRuns {
976
1335
  /** The root run of the run hierarchy. Will be omitted if the run is the root run */
977
- root?: CommonRunObject;
1336
+ root?: CommonRunObject | undefined;
978
1337
  /** The parent run of the run. Will be omitted if the run is the root run */
979
- parent?: CommonRunObject;
1338
+ parent?: CommonRunObject | undefined;
980
1339
  /** The immediate children of the run. Will be omitted if the run has no children */
981
- children?: GetRunV1ResponseRelatedRunsChildrenList;
1340
+ children?: GetRunV1ResponseRelatedRunsChildrenList | undefined;
982
1341
  }
983
1342
  export type GetRunV1ResponseScheduleGeneratorType = "CRON";
984
1343
  export interface GetRunV1ResponseScheduleGenerator {
985
- type?: GetRunV1ResponseScheduleGeneratorType;
1344
+ type?: GetRunV1ResponseScheduleGeneratorType | undefined;
986
1345
  /** The cron expression used to generate the schedule */
987
- expression?: string;
1346
+ expression?: string | undefined;
988
1347
  /** The description of the generator in plain english */
989
- description?: string;
1348
+ description?: string | undefined;
990
1349
  }
991
1350
  /** The schedule that triggered the run. Will be omitted if the run was not triggered by a schedule */
992
1351
  export interface GetRunV1ResponseSchedule {
993
1352
  /** The unique ID of the schedule, prefixed with `sched_` */
994
1353
  id: string;
995
1354
  /** The external ID of the schedule. Can be anything that is useful to you (e.g., user ID, org ID, etc.) */
996
- externalId?: string;
1355
+ externalId?: string | undefined;
997
1356
  /** The deduplication key used to prevent creating duplicate schedules */
998
- deduplicationKey?: string;
1357
+ deduplicationKey?: string | undefined;
999
1358
  generator: GetRunV1ResponseScheduleGenerator;
1000
1359
  }
1001
1360
  export type GetRunV1ResponseAttemptsItemStatus = "PENDING" | "EXECUTING" | "PAUSED" | "COMPLETED" | "FAILED" | "CANCELED";
1002
1361
  export interface SerializedError {
1003
1362
  message: string;
1004
- name?: string;
1005
- stackTrace?: string;
1363
+ name?: string | undefined;
1364
+ stackTrace?: string | undefined;
1006
1365
  }
1007
1366
  export interface GetRunV1ResponseAttemptsItem {
1008
1367
  /** The unique ID of the attempt, prefixed with `attempt_` */
1009
1368
  id: string;
1010
1369
  status: GetRunV1ResponseAttemptsItemStatus;
1011
- error?: SerializedError;
1370
+ error?: SerializedError | undefined;
1012
1371
  createdAt: string;
1013
1372
  updatedAt: string;
1014
- startedAt?: string;
1015
- completedAt?: string;
1373
+ startedAt?: string | undefined;
1374
+ completedAt?: string | undefined;
1016
1375
  }
1017
1376
  export type GetRunV1ResponseAttemptsList = Array<GetRunV1ResponseAttemptsItem>;
1018
1377
  export interface GetRunV1Response {
@@ -1023,49 +1382,49 @@ export interface GetRunV1Response {
1023
1382
  /** The identifier of the task that was run */
1024
1383
  taskIdentifier: string;
1025
1384
  /** The version of the worker that executed the run */
1026
- version?: string;
1385
+ version?: string | undefined;
1027
1386
  /** The idempotency key used to prevent creating duplicate runs, if provided */
1028
- idempotencyKey?: string;
1387
+ idempotencyKey?: string | undefined;
1029
1388
  createdAt: string;
1030
1389
  updatedAt: string;
1031
1390
  /** Whether the run is a test run or not */
1032
- isTest?: boolean;
1391
+ isTest?: boolean | undefined;
1033
1392
  /** The time the run started */
1034
- startedAt?: string;
1393
+ startedAt?: string | undefined;
1035
1394
  /** The time the run finished */
1036
- finishedAt?: string;
1395
+ finishedAt?: string | undefined;
1037
1396
  /** If the run was triggered with a delay, this will be the time the run will be enqueued to execute */
1038
- delayedUntil?: string;
1039
- ttl?: unknown;
1397
+ delayedUntil?: string | undefined;
1398
+ ttl?: unknown | undefined;
1040
1399
  /** If the run had a TTL and that time has passed, when the run "expired". */
1041
- expiredAt?: string;
1400
+ expiredAt?: string | undefined;
1042
1401
  /** Tags can be attached to a run to make it easy to find runs (in the dashboard or using SDK functions like `runs.list`) */
1043
- tags?: GetRunV1ResponseTagsList;
1402
+ tags?: GetRunV1ResponseTagsList | undefined;
1044
1403
  /** The metadata of the run. See [Metadata](/runs/metadata) for more information. */
1045
- metadata?: unknown;
1404
+ metadata?: unknown | undefined;
1046
1405
  /** The compute cost of the run (so far) in cents. This cost does not apply to DEV runs. */
1047
- costInCents?: number;
1406
+ costInCents?: number | undefined;
1048
1407
  /** The invocation cost of the run in cents. This cost does not apply to DEV runs. */
1049
- baseCostInCents?: number;
1408
+ baseCostInCents?: number | undefined;
1050
1409
  /** The duration of compute (so far) in milliseconds. This does not include waits. */
1051
- durationMs?: number;
1410
+ durationMs?: number | undefined;
1052
1411
  /** The depth of the run in the task run hierarchy. The root run has a depth of 0. */
1053
- depth?: number;
1412
+ depth?: number | undefined;
1054
1413
  /** The ID of the batch that this run belongs to */
1055
- batchId?: string;
1414
+ batchId?: string | undefined;
1056
1415
  /** The name of the function that triggered the run */
1057
- triggerFunction?: GetRunV1ResponseTriggerFunction;
1416
+ triggerFunction?: GetRunV1ResponseTriggerFunction | undefined;
1058
1417
  /** The payload that was sent to the task. Will be omitted if the request was made with a Public API key */
1059
- payload?: unknown;
1418
+ payload?: unknown | undefined;
1060
1419
  /** The presigned URL to download the payload. Will only be included if the payload is too large to be included in the response. Expires in 5 minutes. */
1061
- payloadPresignedUrl?: string;
1420
+ payloadPresignedUrl?: string | undefined;
1062
1421
  /** The output of the run. Will be omitted if the request was made with a Public API key */
1063
- output?: unknown;
1422
+ output?: unknown | undefined;
1064
1423
  /** The presigned URL to download the output. Will only be included if the output is too large to be included in the response. Expires in 5 minutes. */
1065
- outputPresignedUrl?: string;
1066
- relatedRuns?: GetRunV1ResponseRelatedRuns;
1424
+ outputPresignedUrl?: string | undefined;
1425
+ relatedRuns?: GetRunV1ResponseRelatedRuns | undefined;
1067
1426
  /** The schedule that triggered the run. Will be omitted if the run was not triggered by a schedule */
1068
- schedule?: GetRunV1ResponseSchedule;
1427
+ schedule?: GetRunV1ResponseSchedule | undefined;
1069
1428
  attempts: GetRunV1ResponseAttemptsList;
1070
1429
  }
1071
1430
  export interface GetScheduleV1Request {
@@ -1078,11 +1437,11 @@ export interface GetSessionV1Request {
1078
1437
  }
1079
1438
  export interface GetTimezonesV1Request {
1080
1439
  /** Defaults to false. Whether to include UTC in the results or not. */
1081
- excludeUtc?: boolean;
1440
+ excludeUtc?: boolean | undefined;
1082
1441
  }
1083
1442
  export type GetTimezonesResultTimezonesList = Array<string>;
1084
1443
  export interface GetTimezonesResult {
1085
- timezones?: GetTimezonesResultTimezonesList;
1444
+ timezones?: GetTimezonesResultTimezonesList | undefined;
1086
1445
  }
1087
1446
  export interface GetWaitpointTokenV1Request {
1088
1447
  /** The ID of the waitpoint token. */
@@ -1100,156 +1459,278 @@ export interface WaitpointTokenObject {
1100
1459
  /** The current status of the waitpoint token. */
1101
1460
  status: WaitpointTokenObjectStatus;
1102
1461
  /** The idempotency key used when creating the token, if any. */
1103
- idempotencyKey?: string | null;
1462
+ idempotencyKey?: string | null | undefined;
1104
1463
  /** When the idempotency key expires. */
1105
- idempotencyKeyExpiresAt?: string | null;
1464
+ idempotencyKeyExpiresAt?: string | null | undefined;
1106
1465
  /** When the token will time out, if a timeout was set. */
1107
- timeoutAt?: string | null;
1466
+ timeoutAt?: string | null | undefined;
1108
1467
  /** When the token was completed, if it has been completed. */
1109
- completedAt?: string | null;
1468
+ completedAt?: string | null | undefined;
1110
1469
  /** The serialized output data passed when completing the token. Only present when `status` is `COMPLETED`. */
1111
- output?: string | null;
1470
+ output?: string | null | undefined;
1112
1471
  /** The content type of the output (e.g. `"application/json"`). */
1113
- outputType?: string | null;
1472
+ outputType?: string | null | undefined;
1114
1473
  /** Whether the output represents an error (e.g. a timeout). */
1115
- outputIsError?: boolean | null;
1474
+ outputIsError?: boolean | null | undefined;
1116
1475
  /** Tags attached to the waitpoint. */
1117
1476
  tags: WaitpointTokenObjectTagsList;
1118
1477
  /** When the waitpoint token was created. */
1119
1478
  createdAt: string;
1120
1479
  }
1480
+ export interface GetWebhookDeliveryV1Request {
1481
+ /** The delivery's id, starts with `whd_`. */
1482
+ deliveryId: string;
1483
+ }
1484
+ /** The endpoint the delivery arrived on, or `null` if it has since been removed. */
1485
+ export interface GetWebhookDeliveryV1ResponseEndpoint {
1486
+ id: string;
1487
+ declaredId: string;
1488
+ }
1489
+ /** `pending` is waiting to be routed (including after a retryable error), `processing` is being routed, `succeeded` reached at least one subscriber or waiting run with nothing failed, `failed` means a subscriber failed after its retries, `filtered` means no subscriber's filter took it, and `unmatched` means runs were waiting on the endpoint but none matched and no subscriber took it. */
1490
+ export type WebhookDeliveryStatus = "pending" | "processing" | "succeeded" | "failed" | "filtered" | "unmatched";
1491
+ /** The request headers, with credentials such as signatures removed. */
1492
+ export type GetWebhookDeliveryV1ResponseHeadersMap = {
1493
+ [key: string]: string | undefined;
1494
+ };
1495
+ export type WebhookDeliveryTargetType = "task" | "session" | "waiter";
1496
+ export type WebhookDeliveryTargetStatus = "pending" | "succeeded" | "failed" | "filtered";
1497
+ /** For the `waiter` summary, how many waiting runs matched, were resumed, and failed to resume. */
1498
+ export interface WebhookDeliveryTargetWaiters {
1499
+ matched: number;
1500
+ resumed: number;
1501
+ failed: number;
1502
+ }
1503
+ export interface WebhookDeliveryTarget {
1504
+ /** The subscriber id, or `waiters` for the waiting-runs summary. */
1505
+ id: string;
1506
+ type: WebhookDeliveryTargetType;
1507
+ status: WebhookDeliveryTargetStatus;
1508
+ /** For a `filtered` target, the filter clause that failed and the value it saw. */
1509
+ reason: string | null;
1510
+ error: string | null;
1511
+ /** The run the subscriber started. */
1512
+ runId: string | null;
1513
+ /** The session the event was routed into, for a `session` subscriber. */
1514
+ sessionId: string | null;
1515
+ /** For the `waiter` summary, how many waiting runs matched, were resumed, and failed to resume. */
1516
+ waiters: WebhookDeliveryTargetWaiters | null;
1517
+ }
1518
+ /** One entry per subscriber, plus a `waiter` entry when the delivery matched waiting runs. */
1519
+ export type GetWebhookDeliveryV1ResponseTargetsList = Array<WebhookDeliveryTarget>;
1520
+ export interface GetWebhookDeliveryV1Response {
1521
+ /** The delivery's id. */
1522
+ id: string;
1523
+ /** The endpoint the delivery arrived on, or `null` if it has since been removed. */
1524
+ endpoint: GetWebhookDeliveryV1ResponseEndpoint | null;
1525
+ status: WebhookDeliveryStatus;
1526
+ /** The provider's id for the delivery, such as a Stripe event id or GitHub's `X-GitHub-Delivery` header. */
1527
+ externalDeliveryId: string;
1528
+ /** Whether the request carried an `x-trigger-test` header, as test sends from the dashboard do. */
1529
+ isTest: boolean;
1530
+ createdAt: string;
1531
+ processedAt: string | null;
1532
+ /** The key the delivery was deduplicated on. */
1533
+ idempotencyKey: string;
1534
+ /** The verified event body, capped in size. */
1535
+ event: unknown;
1536
+ /** The request headers, with credentials such as signatures removed. */
1537
+ headers: GetWebhookDeliveryV1ResponseHeadersMap | null;
1538
+ /** A hash of the raw request body. */
1539
+ rawBodyHash: string | null;
1540
+ /** For a `failed` delivery, the error and the subscriber it came from. */
1541
+ error: string | null;
1542
+ /** For a `filtered` delivery, why no subscriber took it. */
1543
+ filterReason: string | null;
1544
+ /** One entry per subscriber, plus a `waiter` entry when the delivery matched waiting runs. */
1545
+ targets: GetWebhookDeliveryV1ResponseTargetsList;
1546
+ updatedAt: string;
1547
+ }
1548
+ export interface GetWebhookEndpointV1Request {
1549
+ /** The endpoint's declared id (the `id` passed to `webhooks.endpoint.define`) or its `wh_` id. A value starting with `wh_` is always a generated id, since declared ids can't start with `wh_`. A declared id names the endpoint's declared instance in the key's environment. */
1550
+ endpointId: string;
1551
+ }
1552
+ /** `active` accepts deliveries. `inactive` was disabled, or is no longer in the current deployment, and its URL responds with `404`. */
1553
+ export type GetWebhookEndpointV1ResponseStatus = "active" | "inactive" | "deleting";
1554
+ /** Who supplies the signing secret: `provider` issues it (store it with the set secret endpoint), `integrator` means you choose it (generate one), and `either` accepts both. */
1555
+ export type GetWebhookEndpointV1ResponseSecretProvisioning = "provider" | "integrator" | "either";
1556
+ /** `task` triggers a run. `session` routes the event into an agent's session. */
1557
+ export type GetWebhookEndpointV1ResponseSubscribersItemType = "task" | "session";
1558
+ export interface GetWebhookEndpointV1ResponseSubscribersItem {
1559
+ /** The subscriber id, used as `targetId` when replaying: a `webhook()` task's id, or `agentId:eventId` for an agent's `chat.event` or channel. */
1560
+ id: string;
1561
+ /** `task` triggers a run. `session` routes the event into an agent's session. */
1562
+ type: GetWebhookEndpointV1ResponseSubscribersItemType;
1563
+ /** The subscribing task, or the agent for a `session` subscriber. */
1564
+ taskId: string;
1565
+ /** The filter that decides which events the subscriber takes. `null` takes every event. */
1566
+ filter: string | null;
1567
+ }
1568
+ /** The tasks and agents that receive the endpoint's deliveries. */
1569
+ export type GetWebhookEndpointV1ResponseSubscribersList = Array<GetWebhookEndpointV1ResponseSubscribersItem>;
1570
+ export interface GetWebhookEndpointV1Response {
1571
+ /** The endpoint's id. */
1572
+ id: string;
1573
+ /** The `id` the endpoint is declared with in code (`webhooks.endpoint.define({ id })`). */
1574
+ declaredId: string;
1575
+ /** The provider source that verifies and types the endpoint's events. */
1576
+ source: string;
1577
+ /** `active` accepts deliveries. `inactive` was disabled, or is no longer in the current deployment, and its URL responds with `404`. */
1578
+ status: GetWebhookEndpointV1ResponseStatus;
1579
+ /** Who supplies the signing secret: `provider` issues it (store it with the set secret endpoint), `integrator` means you choose it (generate one), and `either` accepts both. */
1580
+ secretProvisioning: GetWebhookEndpointV1ResponseSecretProvisioning;
1581
+ /** Whether a signing secret or public key is set. Every delivery is rejected until it is. */
1582
+ secretSet: boolean;
1583
+ /** Reserved for dynamic endpoints. `null` for a declared endpoint. */
1584
+ tenantId: string | null;
1585
+ /** Reserved for dynamic endpoints. `null` for a declared endpoint. */
1586
+ externalRef: string | null;
1587
+ /** The webhook URL to register with the provider. */
1588
+ url: string;
1589
+ createdAt: string;
1590
+ updatedAt: string;
1591
+ /** The tasks and agents that receive the endpoint's deliveries. */
1592
+ subscribers: GetWebhookEndpointV1ResponseSubscribersList;
1593
+ /** Instructions for an AI coding agent to register the endpoint with its provider and set up the signing secret. */
1594
+ setupPrompt: string;
1595
+ }
1121
1596
  export interface IgnoreErrorV1Request {
1122
1597
  /** The ID of an error group, starts with `error_`. */
1123
1598
  errorId: string;
1124
1599
  /** How long to ignore the error for, in milliseconds. */
1125
- duration?: number;
1600
+ duration?: number | undefined;
1126
1601
  /** Re-surface the error if its occurrence rate exceeds this many occurrences per minute. */
1127
- occurrenceRate?: number;
1602
+ occurrenceRate?: number | undefined;
1128
1603
  /** Re-surface the error once it accrues this many new occurrences after being ignored. */
1129
- totalOccurrences?: number;
1604
+ totalOccurrences?: number | undefined;
1130
1605
  /** An optional human-readable reason for ignoring the error. */
1131
- reason?: string;
1606
+ reason?: string | undefined;
1132
1607
  }
1133
1608
  export interface ListBulkActionsV1RequestPage {
1134
1609
  /** Number of bulk actions per page. Maximum is 100. */
1135
- size?: number;
1610
+ size?: number | undefined;
1136
1611
  /** The cursor to start the page after. */
1137
- after?: string;
1612
+ after?: string | undefined;
1138
1613
  /** The cursor to start the page before. */
1139
- before?: string;
1614
+ before?: string | undefined;
1140
1615
  }
1141
1616
  export interface ListBulkActionsV1Request {
1142
1617
  /** Use this parameter to paginate bulk actions. Pass `page[after]` or `page[before]` using the cursor returned in the previous response. */
1143
- page?: ListBulkActionsV1RequestPage;
1618
+ page?: ListBulkActionsV1RequestPage | undefined;
1144
1619
  }
1145
1620
  export type ListBulkActionsResultDataList = Array<BulkActionObject>;
1146
1621
  export interface ListBulkActionsResultPagination {
1147
1622
  /** Pass this cursor as `page[after]` to retrieve the next page. */
1148
- next?: string;
1623
+ next?: string | undefined;
1149
1624
  /** Pass this cursor as `page[before]` to retrieve the previous page. */
1150
- previous?: string;
1625
+ previous?: string | undefined;
1151
1626
  }
1152
1627
  export interface ListBulkActionsResult {
1153
1628
  data: ListBulkActionsResultDataList;
1154
1629
  pagination: ListBulkActionsResultPagination;
1155
1630
  }
1156
1631
  export interface ListConcurrencyLimitsV1Request {
1157
- page?: number;
1158
- perPage?: number;
1632
+ page?: number | undefined;
1633
+ perPage?: number | undefined;
1159
1634
  }
1160
1635
  export type ListConcurrencyLimitsV1ResponseDataList = Array<ConcurrencyLimitObject>;
1161
1636
  export interface ListConcurrencyLimitsV1ResponsePagination {
1162
- currentPage?: number;
1163
- totalPages?: number;
1164
- count?: number;
1637
+ currentPage?: number | undefined;
1638
+ totalPages?: number | undefined;
1639
+ count?: number | undefined;
1165
1640
  }
1166
1641
  export interface ListConcurrencyLimitsV1Response {
1167
- data?: ListConcurrencyLimitsV1ResponseDataList;
1168
- pagination?: ListConcurrencyLimitsV1ResponsePagination;
1642
+ data?: ListConcurrencyLimitsV1ResponseDataList | undefined;
1643
+ pagination?: ListConcurrencyLimitsV1ResponsePagination | undefined;
1169
1644
  }
1170
1645
  export interface ListDashboardsV1Request {
1171
1646
  }
1647
+ /** Built-in dashboards are read-only. Custom dashboards can be changed with the endpoints below. */
1648
+ export type ListDashboardsV1ResponseDashboardsItemType = "builtIn" | "custom";
1172
1649
  /** Widget display type */
1173
1650
  export type ListDashboardsV1ResponseDashboardsItemWidgetsItemType = "bignumber" | "chart" | "table";
1174
1651
  export interface ListDashboardsV1ResponseDashboardsItemWidgetsItem {
1175
1652
  /** Widget identifier */
1176
- id?: string;
1653
+ id?: string | undefined;
1177
1654
  /** Widget display title */
1178
- title?: string;
1655
+ title?: string | undefined;
1179
1656
  /** The TRQL query this widget executes */
1180
- query?: string;
1657
+ query?: string | undefined;
1181
1658
  /** Widget display type */
1182
- type?: ListDashboardsV1ResponseDashboardsItemWidgetsItemType;
1659
+ type?: ListDashboardsV1ResponseDashboardsItemWidgetsItemType | undefined;
1183
1660
  }
1184
1661
  export type ListDashboardsV1ResponseDashboardsItemWidgetsList = Array<ListDashboardsV1ResponseDashboardsItemWidgetsItem>;
1185
1662
  export interface ListDashboardsV1ResponseDashboardsItem {
1186
- /** Dashboard identifier (e.g. "overview", "llm") */
1187
- key?: string;
1663
+ /** Dashboard identifier. Built-in dashboards use a key like "overview" or "llm"; custom dashboards use their id. */
1664
+ key?: string | undefined;
1188
1665
  /** Dashboard display title */
1189
- title?: string;
1190
- widgets?: ListDashboardsV1ResponseDashboardsItemWidgetsList;
1666
+ title?: string | undefined;
1667
+ /** Built-in dashboards are read-only. Custom dashboards can be changed with the endpoints below. */
1668
+ type?: ListDashboardsV1ResponseDashboardsItemType | undefined;
1669
+ /** The dashboard description (custom dashboards only) */
1670
+ description?: string | undefined;
1671
+ widgets?: ListDashboardsV1ResponseDashboardsItemWidgetsList | undefined;
1191
1672
  }
1192
1673
  export type ListDashboardsV1ResponseDashboardsList = Array<ListDashboardsV1ResponseDashboardsItem>;
1193
1674
  export interface ListDashboardsV1Response {
1194
- dashboards?: ListDashboardsV1ResponseDashboardsList;
1675
+ dashboards?: ListDashboardsV1ResponseDashboardsList | undefined;
1195
1676
  }
1196
1677
  export type ListDeploymentsV1RequestStatus = "PENDING" | "BUILDING" | "DEPLOYING" | "DEPLOYED" | "FAILED" | "CANCELED" | "TIMED_OUT";
1197
1678
  export interface ListDeploymentsV1Request {
1198
1679
  /** The deployment ID to start the search from, to get the next page. */
1199
- page_after_?: string;
1680
+ page_after_?: string | undefined;
1200
1681
  /** The number of deployments to return (default 20, min 5, max 100). */
1201
- page_size_?: number;
1682
+ page_size_?: number | undefined;
1202
1683
  /** Filter deployments by status. */
1203
- status?: ListDeploymentsV1RequestStatus | (string & {});
1684
+ status?: ListDeploymentsV1RequestStatus | (string & {}) | undefined;
1204
1685
  /** Filter deployments created within this period (e.g. 1d, 7d, 3h). */
1205
- period?: string;
1686
+ period?: string | undefined;
1206
1687
  /** Filter deployments created on or after this date (ISO 8601). */
1207
- from?: string;
1688
+ from?: string | undefined;
1208
1689
  /** Filter deployments created on or before this date (ISO 8601). Only applied when `from` is also provided. */
1209
- to?: string;
1690
+ to?: string | undefined;
1210
1691
  }
1211
1692
  /** The current status of the deployment */
1212
1693
  export type ListDeploymentsV1ResponseDataItemStatus = "PENDING" | "BUILDING" | "DEPLOYING" | "DEPLOYED" | "FAILED" | "CANCELED" | "TIMED_OUT";
1213
1694
  export interface ListDeploymentsV1ResponseDataItem {
1214
1695
  /** The deployment ID */
1215
- id?: string;
1696
+ id?: string | undefined;
1216
1697
  /** When the deployment was created */
1217
- createdAt?: string;
1698
+ createdAt?: string | undefined;
1218
1699
  /** The short code for the deployment */
1219
- shortCode?: string;
1700
+ shortCode?: string | undefined;
1220
1701
  /** The deployment version (e.g., "20250228.1") */
1221
- version?: string;
1702
+ version?: string | undefined;
1222
1703
  /** The runtime used (e.g., "node") */
1223
- runtime?: string | null;
1704
+ runtime?: string | null | undefined;
1224
1705
  /** The runtime version */
1225
- runtimeVersion?: string | null;
1706
+ runtimeVersion?: string | null | undefined;
1226
1707
  /** The current status of the deployment */
1227
- status?: ListDeploymentsV1ResponseDataItemStatus;
1708
+ status?: ListDeploymentsV1ResponseDataItemStatus | undefined;
1228
1709
  /** When the deployment was promoted to DEPLOYED */
1229
- deployedAt?: string | null;
1710
+ deployedAt?: string | null | undefined;
1230
1711
  /** Git metadata associated with the deployment */
1231
- git?: unknown | null;
1712
+ git?: unknown | null | undefined;
1232
1713
  /** Error data if the deployment failed */
1233
- error?: unknown | null;
1714
+ error?: unknown | null | undefined;
1234
1715
  /** The external deployment id this deployment was deployed under (`--external-id`), used by version skew protection to pin runs. Absent if the deployment was deployed without one */
1235
- externalId?: string;
1716
+ externalId?: string | undefined;
1236
1717
  }
1237
1718
  export type ListDeploymentsV1ResponseDataList = Array<ListDeploymentsV1ResponseDataItem>;
1238
1719
  export interface ListDeploymentsV1ResponsePagination {
1239
1720
  /** Cursor for the next page. Pass as `page[after]` to get the next page. Omitted if there are no more results. */
1240
- next?: string;
1721
+ next?: string | undefined;
1241
1722
  }
1242
1723
  export interface ListDeploymentsV1Response {
1243
- data?: ListDeploymentsV1ResponseDataList;
1244
- pagination?: ListDeploymentsV1ResponsePagination;
1724
+ data?: ListDeploymentsV1ResponseDataList | undefined;
1725
+ pagination?: ListDeploymentsV1ResponsePagination | undefined;
1245
1726
  }
1246
1727
  export interface ListErrorsV1RequestPage {
1247
1728
  /** Number of errors per page. Maximum is 100. */
1248
- size?: number;
1729
+ size?: number | undefined;
1249
1730
  /** The ID of the error to start the page after. Sets the pagination direction to forward. */
1250
- after?: string;
1731
+ after?: string | undefined;
1251
1732
  /** The ID of the error to start the page before. Sets the pagination direction to backward. */
1252
- before?: string;
1733
+ before?: string | undefined;
1253
1734
  }
1254
1735
  /** The identifier of the task the error belongs to */
1255
1736
  export type ErrorsFilterTaskIdentifierList = Array<string>;
@@ -1260,25 +1741,25 @@ export type ErrorsFilterStatusItem = "unresolved" | "resolved" | "ignored";
1260
1741
  export type ErrorsFilterStatusList = Array<ErrorsFilterStatusItem | (string & {})>;
1261
1742
  export interface ErrorsFilter {
1262
1743
  /** The identifier of the task the error belongs to */
1263
- taskIdentifier?: ErrorsFilterTaskIdentifierList;
1744
+ taskIdentifier?: ErrorsFilterTaskIdentifierList | undefined;
1264
1745
  /** The worker version the error occurred in */
1265
- version?: ErrorsFilterVersionList;
1746
+ version?: ErrorsFilterVersionList | undefined;
1266
1747
  /** The lifecycle status of the error group */
1267
- status?: ErrorsFilterStatusList;
1748
+ status?: ErrorsFilterStatusList | undefined;
1268
1749
  /** Free-text search across the error type and message */
1269
- search?: string;
1750
+ search?: string | undefined;
1270
1751
  /** The start of the time range to count occurrences within */
1271
- from?: string;
1752
+ from?: string | undefined;
1272
1753
  /** The end of the time range to count occurrences within */
1273
- to?: string;
1754
+ to?: string | undefined;
1274
1755
  /** A relative time range to count occurrences within */
1275
- period?: string;
1756
+ period?: string | undefined;
1276
1757
  }
1277
1758
  export interface ListErrorsV1Request {
1278
1759
  /** Paginate the results. Specify the number of errors per page, and the ID of the error to start the page after or before. For object fields like `page`, use the "form" encoding style. For example, to get the next page, use `page[after]=error_1234`. */
1279
- page?: ListErrorsV1RequestPage;
1760
+ page?: ListErrorsV1RequestPage | undefined;
1280
1761
  /** Filter the error groups. Filter by task identifier, version, status, search text, and time range. For array fields, provide multiple values as a comma-separated list. For example, to get unresolved and ignored errors, use `filter[status]=unresolved,ignored`. For the time range, use `filter[period]` (e.g. `filter[period]=7d`) or `filter[from]` / `filter[to]` with ISO timestamps. */
1281
- filter?: ErrorsFilter;
1762
+ filter?: ErrorsFilter | undefined;
1282
1763
  }
1283
1764
  export type ErrorListItemStatus = "unresolved" | "resolved" | "ignored";
1284
1765
  export interface ErrorListItem {
@@ -1299,19 +1780,19 @@ export interface ErrorListItem {
1299
1780
  firstSeen: string;
1300
1781
  /** When the error group was last seen (global) */
1301
1782
  lastSeen: string;
1302
- resolvedAt?: string | null;
1303
- ignoredUntil?: string | null;
1783
+ resolvedAt?: string | null | undefined;
1784
+ ignoredUntil?: string | null | undefined;
1304
1785
  }
1305
1786
  export type ListErrorsResultDataList = Array<ErrorListItem>;
1306
1787
  export interface ListErrorsResultPagination {
1307
1788
  /** The error ID to start the next page after. Pass it as `page[after]`. */
1308
- next?: string;
1789
+ next?: string | undefined;
1309
1790
  /** The error ID to start the previous page before. Pass it as `page[before]`. */
1310
- previous?: string;
1791
+ previous?: string | undefined;
1311
1792
  }
1312
1793
  export interface ListErrorsResult {
1313
- data?: ListErrorsResultDataList;
1314
- pagination?: ListErrorsResultPagination;
1794
+ data?: ListErrorsResultDataList | undefined;
1795
+ pagination?: ListErrorsResultPagination | undefined;
1315
1796
  }
1316
1797
  export type ListProjectEnvvarsV1RequestEnv = "dev" | "staging" | "prod";
1317
1798
  export interface ListProjectEnvvarsV1Request {
@@ -1328,19 +1809,19 @@ export type ListEnvironmentVariablesResponse = Array<EnvVar>;
1328
1809
  export type ListProjectEnvvarsV1Response = ListEnvironmentVariablesResponse;
1329
1810
  export interface ListProjectRunsV1RequestPage {
1330
1811
  /** Number of runs per page. Maximum is 100. */
1331
- size?: number;
1812
+ size?: number | undefined;
1332
1813
  /** The ID of the run to start the page after. This will set the direction of the pagination to forward. */
1333
- after?: string;
1814
+ after?: string | undefined;
1334
1815
  /** The ID of the run to start the page before. This will set the direction of the pagination to backward. */
1335
- before?: string;
1816
+ before?: string | undefined;
1336
1817
  }
1337
1818
  export interface ListProjectRunsV1RequestFilterCreatedAt {
1338
1819
  /** The start date to filter the runs by */
1339
- from?: string;
1820
+ from?: string | undefined;
1340
1821
  /** The end date to filter the runs by */
1341
- to?: string;
1822
+ to?: string | undefined;
1342
1823
  /** The period to filter the runs by */
1343
- period?: string;
1824
+ period?: string | undefined;
1344
1825
  }
1345
1826
  /** The status of the run */
1346
1827
  export type ListProjectRunsV1RequestFilterStatusItem = "PENDING_VERSION" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "COMPLETED" | "CANCELED" | "FAILED" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE";
@@ -1355,31 +1836,31 @@ export type ListProjectRunsV1RequestFilterTagList = Array<string>;
1355
1836
  export type ListProjectRunsV1RequestFilterEnvItem = "dev" | "staging" | "prod";
1356
1837
  export type ListProjectRunsV1RequestFilterEnvList = Array<ListProjectRunsV1RequestFilterEnvItem | (string & {})>;
1357
1838
  export interface ListProjectRunsV1RequestFilter {
1358
- createdAt?: ListProjectRunsV1RequestFilterCreatedAt;
1359
- status?: ListProjectRunsV1RequestFilterStatusList;
1839
+ createdAt?: ListProjectRunsV1RequestFilterCreatedAt | undefined;
1840
+ status?: ListProjectRunsV1RequestFilterStatusList | undefined;
1360
1841
  /** The identifier of the task that was run */
1361
- taskIdentifier?: ListProjectRunsV1RequestFilterTaskIdentifierList;
1842
+ taskIdentifier?: ListProjectRunsV1RequestFilterTaskIdentifierList | undefined;
1362
1843
  /** The version of the worker that executed the run */
1363
- version?: ListProjectRunsV1RequestFilterVersionList;
1844
+ version?: ListProjectRunsV1RequestFilterVersionList | undefined;
1364
1845
  /** The bulk action ID to filter the runs by */
1365
- bulkAction?: string;
1846
+ bulkAction?: string | undefined;
1366
1847
  /** The schedule ID to filter the runs by */
1367
- schedule?: string;
1848
+ schedule?: string | undefined;
1368
1849
  /** Whether the run is a test run or not */
1369
- isTest?: boolean;
1850
+ isTest?: boolean | undefined;
1370
1851
  /** The tags that are attached to the run */
1371
- tag?: ListProjectRunsV1RequestFilterTagList;
1852
+ tag?: ListProjectRunsV1RequestFilterTagList | undefined;
1372
1853
  /** An error group ID (starts with `error_`). Lists the runs behind that error group. */
1373
- error?: string;
1374
- env?: ListProjectRunsV1RequestFilterEnvList;
1854
+ error?: string | undefined;
1855
+ env?: ListProjectRunsV1RequestFilterEnvList | undefined;
1375
1856
  }
1376
1857
  export interface ListProjectRunsV1Request {
1377
1858
  /** The external ref of the project. You can find this in the project settings. Starts with `proj_`. */
1378
1859
  projectRef: string;
1379
1860
  /** Use this parameter to paginate the results. You can specify the number of runs per page, and the ID of the run to start the page after or before. For object fields like `page`, you should use the "form" encoding style. For example, to get the next page of runs, you can use `page[after]=run_1234`. */
1380
- page?: ListProjectRunsV1RequestPage;
1861
+ page?: ListProjectRunsV1RequestPage | undefined;
1381
1862
  /** Use this parameter to filter the runs. You can filter by created at, environment, status, task identifier, and version. For array fields, you can provide multiple values to filter by using a comma-separated list. For example, to get QUEUED and EXECUTING runs, you can use `filter[status]=QUEUED,EXECUTING`. For object fields, you should use the "form" encoding style. For example, to filter by the period, you can use `filter[createdAt][period]=1d`. */
1382
- filter?: ListProjectRunsV1RequestFilter;
1863
+ filter?: ListProjectRunsV1RequestFilter | undefined;
1383
1864
  }
1384
1865
  /** The status of the run */
1385
1866
  export type ListRunItemStatus = "PENDING_VERSION" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "COMPLETED" | "CANCELED" | "FAILED" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE";
@@ -1390,7 +1871,7 @@ export interface ListRunItemEnv {
1390
1871
  /** The name of the environment */
1391
1872
  name: string;
1392
1873
  /** If this is a dev environment, the username of the user represented by this environment */
1393
- user?: string;
1874
+ user?: string | undefined;
1394
1875
  }
1395
1876
  /** Tags can be attached to a run to make it easy to find runs (in the dashboard or using SDK functions like `runs.list`) */
1396
1877
  export type ListRunItemTagsList = Array<string>;
@@ -1402,59 +1883,59 @@ export interface ListRunItem {
1402
1883
  /** The identifier of the task that was run */
1403
1884
  taskIdentifier: string;
1404
1885
  /** The version of the worker that executed the run */
1405
- version?: string;
1886
+ version?: string | undefined;
1406
1887
  /** The environment of the run */
1407
1888
  env: ListRunItemEnv;
1408
1889
  /** The idempotency key used to prevent creating duplicate runs, if provided */
1409
- idempotencyKey?: string;
1890
+ idempotencyKey?: string | undefined;
1410
1891
  /** Whether the run is a test run or not */
1411
1892
  isTest: boolean;
1412
1893
  createdAt: string;
1413
1894
  updatedAt: string;
1414
1895
  /** The time the run started */
1415
- startedAt?: string;
1896
+ startedAt?: string | undefined;
1416
1897
  /** The time the run finished */
1417
- finishedAt?: string;
1898
+ finishedAt?: string | undefined;
1418
1899
  /** If the run was triggered with a delay, this will be the time the run will be enqueued to execute */
1419
- delayedUntil?: string;
1420
- ttl?: unknown;
1900
+ delayedUntil?: string | undefined;
1901
+ ttl?: unknown | undefined;
1421
1902
  /** If the run had a TTL and that time has passed, when the run "expired". */
1422
- expiredAt?: string;
1903
+ expiredAt?: string | undefined;
1423
1904
  /** Tags can be attached to a run to make it easy to find runs (in the dashboard or using SDK functions like `runs.list`) */
1424
- tags?: ListRunItemTagsList;
1905
+ tags?: ListRunItemTagsList | undefined;
1425
1906
  /** The compute cost of the run (so far) in cents. This cost does not apply to DEV runs. */
1426
- costInCents?: number;
1907
+ costInCents?: number | undefined;
1427
1908
  /** The invocation cost of the run in cents. This cost does not apply to DEV runs. */
1428
- baseCostInCents?: number;
1909
+ baseCostInCents?: number | undefined;
1429
1910
  /** The duration of compute (so far) in milliseconds. This does not include waits. */
1430
- durationMs?: number;
1911
+ durationMs?: number | undefined;
1431
1912
  }
1432
1913
  export type ListRunsResultDataList = Array<ListRunItem>;
1433
1914
  export interface ListRunsResultPagination {
1434
1915
  /** The run ID to start the next page after. This should be used as the `page[after]` parameter in the next request. */
1435
- next?: string;
1916
+ next?: string | undefined;
1436
1917
  /** The run ID to start the previous page before. This should be used as the `page[before]` parameter in the next request. */
1437
- previous?: string;
1918
+ previous?: string | undefined;
1438
1919
  }
1439
1920
  export interface ListRunsResult {
1440
- data?: ListRunsResultDataList;
1441
- pagination?: ListRunsResultPagination;
1921
+ data?: ListRunsResultDataList | undefined;
1922
+ pagination?: ListRunsResultPagination | undefined;
1442
1923
  }
1443
1924
  export interface ListQueuesV1Request {
1444
1925
  /** Page number of the queue listing (1-based) */
1445
- page?: number;
1926
+ page?: number | undefined;
1446
1927
  /** Number of queues per page */
1447
- perPage?: number;
1928
+ perPage?: number | undefined;
1448
1929
  }
1449
1930
  /** An array of queue objects */
1450
1931
  export type ListQueuesResultDataList = Array<QueueObject>;
1451
1932
  export interface ListQueuesResultPagination {
1452
1933
  /** The current page number */
1453
- currentPage?: number;
1934
+ currentPage?: number | undefined;
1454
1935
  /** The total number of pages */
1455
- totalPages?: number;
1936
+ totalPages?: number | undefined;
1456
1937
  /** The total number of queues */
1457
- count?: number;
1938
+ count?: number | undefined;
1458
1939
  }
1459
1940
  export interface ListQueuesResult {
1460
1941
  /** An array of queue objects */
@@ -1473,48 +1954,48 @@ export type CommonRunsFilterVersionList = Array<string>;
1473
1954
  /** The tags that are attached to the run */
1474
1955
  export type CommonRunsFilterTagList = Array<string>;
1475
1956
  export interface CommonRunsFilter {
1476
- createdAt?: ListProjectRunsV1RequestFilterCreatedAt;
1477
- status?: CommonRunsFilterStatusList;
1957
+ createdAt?: ListProjectRunsV1RequestFilterCreatedAt | undefined;
1958
+ status?: CommonRunsFilterStatusList | undefined;
1478
1959
  /** The identifier of the task that was run */
1479
- taskIdentifier?: CommonRunsFilterTaskIdentifierList;
1960
+ taskIdentifier?: CommonRunsFilterTaskIdentifierList | undefined;
1480
1961
  /** The version of the worker that executed the run */
1481
- version?: CommonRunsFilterVersionList;
1962
+ version?: CommonRunsFilterVersionList | undefined;
1482
1963
  /** The bulk action ID to filter the runs by */
1483
- bulkAction?: string;
1964
+ bulkAction?: string | undefined;
1484
1965
  /** The schedule ID to filter the runs by */
1485
- schedule?: string;
1966
+ schedule?: string | undefined;
1486
1967
  /** Whether the run is a test run or not */
1487
- isTest?: boolean;
1968
+ isTest?: boolean | undefined;
1488
1969
  /** The tags that are attached to the run */
1489
- tag?: CommonRunsFilterTagList;
1970
+ tag?: CommonRunsFilterTagList | undefined;
1490
1971
  /** An error group ID (starts with `error_`). Lists the runs behind that error group. */
1491
- error?: string;
1972
+ error?: string | undefined;
1492
1973
  }
1493
1974
  export interface ListRunsV1Request {
1494
1975
  /** Use this parameter to paginate the results. You can specify the number of runs per page, and the ID of the run to start the page after or before. For object fields like `page`, you should use the "form" encoding style. For example, to get the next page of runs, you can use `page[after]=run_1234`. */
1495
- page?: ListProjectRunsV1RequestPage;
1976
+ page?: ListProjectRunsV1RequestPage | undefined;
1496
1977
  /** Use this parameter to filter the runs. You can filter by created at, status, task identifier, and version. For array fields, you can provide multiple values to filter by using a comma-separated list. For example, to get QUEUED and EXECUTING runs, you can use `filter[status]=QUEUED,EXECUTING`. For object fields, you should use the "form" encoding style. For example, to filter by the period, you can use `filter[createdAt][period]=1d`. */
1497
- filter?: CommonRunsFilter;
1978
+ filter?: CommonRunsFilter | undefined;
1498
1979
  }
1499
1980
  export interface ListSchedulesV1Request {
1500
1981
  /** Page number of the schedule listing */
1501
- page?: number;
1982
+ page?: number | undefined;
1502
1983
  /** Number of schedules per page */
1503
- perPage?: number;
1984
+ perPage?: number | undefined;
1504
1985
  }
1505
1986
  export type ListSchedulesResultDataList = Array<ScheduleObject>;
1506
1987
  export type ListSchedulesResultPagination = ListConcurrencyLimitsV1ResponsePagination;
1507
1988
  export interface ListSchedulesResult {
1508
- data?: ListSchedulesResultDataList;
1509
- pagination?: ListConcurrencyLimitsV1ResponsePagination;
1989
+ data?: ListSchedulesResultDataList | undefined;
1990
+ pagination?: ListConcurrencyLimitsV1ResponsePagination | undefined;
1510
1991
  }
1511
1992
  export interface ListSessionsV1RequestPage {
1512
1993
  /** Number of sessions per page. Maximum is 100. */
1513
- size?: number;
1994
+ size?: number | undefined;
1514
1995
  /** The ID of the session to start the page after. Sets the pagination direction to forward. */
1515
- after?: string;
1996
+ after?: string | undefined;
1516
1997
  /** The ID of the session to start the page before. Sets the pagination direction to backward. */
1517
- before?: string;
1998
+ before?: string | undefined;
1518
1999
  }
1519
2000
  /** The session type(s) to filter by. */
1520
2001
  export type SessionsFilterTypeList = Array<string>;
@@ -1527,90 +2008,186 @@ export type SessionsFilterStatusItem = "ACTIVE" | "CLOSED" | "EXPIRED";
1527
2008
  export type SessionsFilterStatusList = Array<SessionsFilterStatusItem | (string & {})>;
1528
2009
  export interface SessionsFilterCreatedAt {
1529
2010
  /** The start date to filter the sessions by. */
1530
- from?: string;
2011
+ from?: string | undefined;
1531
2012
  /** The end date to filter the sessions by. */
1532
- to?: string;
2013
+ to?: string | undefined;
1533
2014
  /** The period to filter the sessions by. */
1534
- period?: string;
2015
+ period?: string | undefined;
1535
2016
  }
1536
2017
  export interface SessionsFilter {
1537
2018
  /** The session type(s) to filter by. */
1538
- type?: SessionsFilterTypeList;
2019
+ type?: SessionsFilterTypeList | undefined;
1539
2020
  /** The tags to filter by. */
1540
- tags?: SessionsFilterTagsList;
2021
+ tags?: SessionsFilterTagsList | undefined;
1541
2022
  /** The task identifier(s) to filter by. */
1542
- taskIdentifier?: SessionsFilterTaskIdentifierList;
2023
+ taskIdentifier?: SessionsFilterTaskIdentifierList | undefined;
1543
2024
  /** Exact match on your `externalId`. */
1544
- externalId?: string;
2025
+ externalId?: string | undefined;
1545
2026
  /** The lifecycle status(es) to filter by. */
1546
- status?: SessionsFilterStatusList;
1547
- createdAt?: SessionsFilterCreatedAt;
2027
+ status?: SessionsFilterStatusList | undefined;
2028
+ createdAt?: SessionsFilterCreatedAt | undefined;
1548
2029
  }
1549
2030
  export interface ListSessionsV1Request {
1550
2031
  /** Paginate the results. Specify the number of sessions per page, and the ID of the session to start the page after or before. For object fields like `page`, use the "form" encoding style. For example, to get the next page, use `page[after]=session_1234`. */
1551
- page?: ListSessionsV1RequestPage;
2032
+ page?: ListSessionsV1RequestPage | undefined;
1552
2033
  /** Use this parameter to filter the sessions. You can filter by type, tags, task identifier, external id, status, and created at. For array fields, you can provide multiple values to filter by using a comma-separated list. For example, to get ACTIVE and CLOSED sessions, you can use `filter[status]=ACTIVE,CLOSED`. For object fields, you should use the "form" encoding style. For example, to filter by the period, you can use `filter[createdAt][period]=1d`. */
1553
- filter?: SessionsFilter;
2034
+ filter?: SessionsFilter | undefined;
1554
2035
  }
1555
2036
  export type ListSessionsResultDataList = Array<SessionObject>;
1556
2037
  export interface ListSessionsResultPagination {
1557
2038
  /** The session ID to start the next page after. Pass it as the `page[after]` parameter on the next request. */
1558
- next?: string;
2039
+ next?: string | undefined;
1559
2040
  /** The session ID to start the previous page before. Pass it as the `page[before]` parameter on the next request. */
1560
- previous?: string;
2041
+ previous?: string | undefined;
1561
2042
  }
1562
2043
  export interface ListSessionsResult {
1563
- data?: ListSessionsResultDataList;
1564
- pagination?: ListSessionsResultPagination;
2044
+ data?: ListSessionsResultDataList | undefined;
2045
+ pagination?: ListSessionsResultPagination | undefined;
1565
2046
  }
1566
2047
  export interface ListWaitpointTokensV1Request {
1567
2048
  /** Number of tokens to return per page (1-100). */
1568
- page_size_?: number;
2049
+ page_size_?: number | undefined;
1569
2050
  /** Return tokens after this cursor (from `pagination.next` in a previous response). */
1570
- page_after_?: string;
2051
+ page_after_?: string | undefined;
1571
2052
  /** Return tokens before this cursor (from `pagination.previous` in a previous response). */
1572
- page_before_?: string;
2053
+ page_before_?: string | undefined;
1573
2054
  /** Comma-separated list of statuses to filter by. Allowed values: `WAITING`, `COMPLETED`, `TIMED_OUT`. */
1574
- filter_status_?: string;
2055
+ filter_status_?: string | undefined;
1575
2056
  /** Filter by idempotency key. */
1576
- filter_idempotencyKey_?: string;
2057
+ filter_idempotencyKey_?: string | undefined;
1577
2058
  /** Comma-separated list of tags to filter by. */
1578
- filter_tags_?: string;
2059
+ filter_tags_?: string | undefined;
1579
2060
  /** Shorthand time period to filter by creation date (e.g. `1h`, `24h`, `7d`). Cannot be combined with `filter[createdAt][from]` or `filter[createdAt][to]`. */
1580
- filter_createdAt__period_?: string;
2061
+ filter_createdAt__period_?: string | undefined;
1581
2062
  /** Filter tokens created at or after this ISO 8601 timestamp. */
1582
- filter_createdAt__from_?: string;
2063
+ filter_createdAt__from_?: string | undefined;
1583
2064
  /** Filter tokens created at or before this ISO 8601 timestamp. */
1584
- filter_createdAt__to_?: string;
2065
+ filter_createdAt__to_?: string | undefined;
1585
2066
  }
1586
2067
  /** An array of waitpoint token objects. */
1587
2068
  export type ListWaitpointTokensResultDataList = Array<WaitpointTokenObject>;
1588
2069
  export interface ListWaitpointTokensResultPagination {
1589
2070
  /** Cursor for the next page. Pass as `page[after]` in the next request. */
1590
- next?: string | null;
2071
+ next?: string | null | undefined;
1591
2072
  /** Cursor for the previous page. Pass as `page[before]` in the next request. */
1592
- previous?: string | null;
2073
+ previous?: string | null | undefined;
1593
2074
  }
1594
2075
  export interface ListWaitpointTokensResult {
1595
2076
  /** An array of waitpoint token objects. */
1596
2077
  data: ListWaitpointTokensResultDataList;
1597
2078
  pagination: ListWaitpointTokensResultPagination;
1598
2079
  }
2080
+ export interface ListWebhookDeliveriesV1Request {
2081
+ /** Number of deliveries to return per page (1 to 100). */
2082
+ page_size_?: number | undefined;
2083
+ /** Return older deliveries, after this cursor (from `pagination.next` in a previous response). */
2084
+ page_after_?: string | undefined;
2085
+ /** Return newer deliveries, before this cursor (from `pagination.previous` in a previous response). */
2086
+ page_before_?: string | undefined;
2087
+ /** Comma-separated endpoints, each a declared id or a `wh_` id. */
2088
+ filter_endpoint_?: string | undefined;
2089
+ /** Comma-separated statuses. Allowed values: `pending`, `processing`, `succeeded`, `failed`, `filtered`, `unmatched`. */
2090
+ filter_status_?: string | undefined;
2091
+ /** A duration back from now, such as `1h` or `7d`. */
2092
+ filter_period_?: string | undefined;
2093
+ /** Only deliveries created at or after this ISO 8601 timestamp. */
2094
+ filter_from_?: string | undefined;
2095
+ /** Only deliveries created at or before this ISO 8601 timestamp. */
2096
+ filter_to_?: string | undefined;
2097
+ }
2098
+ /** The endpoint the delivery arrived on, or `null` if it has since been removed. */
2099
+ export type WebhookDeliveryListItemEndpoint = GetWebhookDeliveryV1ResponseEndpoint;
2100
+ export interface WebhookDeliveryListItem {
2101
+ /** The delivery's id. */
2102
+ id: string;
2103
+ /** The endpoint the delivery arrived on, or `null` if it has since been removed. */
2104
+ endpoint: GetWebhookDeliveryV1ResponseEndpoint | null;
2105
+ status: WebhookDeliveryStatus;
2106
+ /** The provider's id for the delivery, such as a Stripe event id or GitHub's `X-GitHub-Delivery` header. */
2107
+ externalDeliveryId: string;
2108
+ /** Whether the request carried an `x-trigger-test` header, as test sends from the dashboard do. */
2109
+ isTest: boolean;
2110
+ createdAt: string;
2111
+ processedAt: string | null;
2112
+ }
2113
+ export type ListWebhookDeliveriesResultDataList = Array<WebhookDeliveryListItem>;
2114
+ export interface ListWebhookDeliveriesResultPagination {
2115
+ /** Pass as `page[after]` to get the next, older page. */
2116
+ next?: string | undefined;
2117
+ /** Pass as `page[before]` to get the previous, newer page. */
2118
+ previous?: string | undefined;
2119
+ }
2120
+ export interface ListWebhookDeliveriesResult {
2121
+ data: ListWebhookDeliveriesResultDataList;
2122
+ pagination: ListWebhookDeliveriesResultPagination;
2123
+ }
2124
+ export interface ListWebhookEndpointsV1Request {
2125
+ /** Comma-separated declared endpoint ids to return. */
2126
+ filter_webhook_?: string | undefined;
2127
+ }
2128
+ /** `active` accepts deliveries. `inactive` was disabled, or is no longer in the current deployment, and its URL responds with `404`. */
2129
+ export type WebhookEndpointObjectStatus = "active" | "inactive" | "deleting";
2130
+ /** Who supplies the signing secret: `provider` issues it (store it with the set secret endpoint), `integrator` means you choose it (generate one), and `either` accepts both. */
2131
+ export type WebhookEndpointObjectSecretProvisioning = "provider" | "integrator" | "either";
2132
+ export interface WebhookEndpointObject {
2133
+ /** The endpoint's id. */
2134
+ id: string;
2135
+ /** The `id` the endpoint is declared with in code (`webhooks.endpoint.define({ id })`). */
2136
+ declaredId: string;
2137
+ /** The provider source that verifies and types the endpoint's events. */
2138
+ source: string;
2139
+ /** `active` accepts deliveries. `inactive` was disabled, or is no longer in the current deployment, and its URL responds with `404`. */
2140
+ status: WebhookEndpointObjectStatus;
2141
+ /** Who supplies the signing secret: `provider` issues it (store it with the set secret endpoint), `integrator` means you choose it (generate one), and `either` accepts both. */
2142
+ secretProvisioning: WebhookEndpointObjectSecretProvisioning;
2143
+ /** Whether a signing secret or public key is set. Every delivery is rejected until it is. */
2144
+ secretSet: boolean;
2145
+ /** Reserved for dynamic endpoints. `null` for a declared endpoint. */
2146
+ tenantId: string | null;
2147
+ /** Reserved for dynamic endpoints. `null` for a declared endpoint. */
2148
+ externalRef: string | null;
2149
+ /** The webhook URL to register with the provider. */
2150
+ url: string;
2151
+ createdAt: string;
2152
+ updatedAt: string;
2153
+ }
2154
+ export type ListWebhookEndpointsResultDataList = Array<WebhookEndpointObject>;
2155
+ export interface ListWebhookEndpointsResult {
2156
+ data: ListWebhookEndpointsResultDataList;
2157
+ }
2158
+ /** Override the limit itself. At least one of `perKey` or `total` must be provided. */
2159
+ export interface OverrideConcurrencyLimitV1RequestBodyCase0 {
2160
+ /** Caps each concurrencyKey pool; runs without a key share one pool. May not exceed the environment concurrency limit. */
2161
+ perKey?: number | undefined;
2162
+ /** Caps every run holding this limit, keys or not. May not exceed the environment concurrency limit. */
2163
+ total?: number | undefined;
2164
+ }
2165
+ /** How long the override lasts, as a duration such as "7d" or a number of seconds. Default 7 days, maximum 30 days. */
2166
+ export type OverrideConcurrencyLimitV1RequestBodyCase1Ttl = string | number;
2167
+ /** Override the limit's `perKey` for one concurrencyKey only. The override is temporary (see `ttl`), changes no other bound, and applies to every task holding the limit. `total` cannot be given here. */
2168
+ export interface OverrideConcurrencyLimitV1RequestBodyCase1 {
2169
+ /** The concurrencyKey whose cap is overridden. */
2170
+ concurrencyKey: string;
2171
+ /** The cap for this key; `0` blocks it. May not exceed the environment concurrency limit. */
2172
+ perKey: number;
2173
+ /** How long the override lasts, as a duration such as "7d" or a number of seconds. Default 7 days, maximum 30 days. */
2174
+ ttl?: OverrideConcurrencyLimitV1RequestBodyCase1Ttl | undefined;
2175
+ }
2176
+ export type OverrideConcurrencyLimitV1RequestBody = OverrideConcurrencyLimitV1RequestBodyCase0 | OverrideConcurrencyLimitV1RequestBodyCase1;
1599
2177
  export interface OverrideConcurrencyLimitV1Request {
1600
2178
  /** The limit's name */
1601
2179
  name: string;
1602
- /** Caps each concurrencyKey pool; runs without a key share one pool. May not exceed the environment concurrency limit. */
1603
- perKey?: number;
1604
- /** Caps every run holding this limit, keys or not. May not exceed the environment concurrency limit. */
1605
- total?: number;
2180
+ body: OverrideConcurrencyLimitV1RequestBody;
1606
2181
  }
2182
+ export type OverrideConcurrencyLimitV1ResponseBody = ConcurrencyLimitObject | ConcurrencyLimitKeyObject;
2183
+ export type OverrideConcurrencyLimitV1Response = OverrideConcurrencyLimitV1ResponseBody;
1607
2184
  /** How to interpret the `queueParam` path parameter: - `id`: Treat as a queue ID (default) - `task`: Treat as a task ID to get the task's default queue - `custom`: Treat as a custom queue name */
1608
2185
  export type OverrideQueueConcurrencyV1RequestType = "id" | "task" | "custom";
1609
2186
  export interface OverrideQueueConcurrencyV1Request {
1610
2187
  /** The queue ID (e.g., `queue_1234`), or the name of the queue when using the `type` body parameter. */
1611
2188
  queueParam: string;
1612
2189
  /** How to interpret the `queueParam` path parameter: - `id`: Treat as a queue ID (default) - `task`: Treat as a task ID to get the task's default queue - `custom`: Treat as a custom queue name */
1613
- type?: OverrideQueueConcurrencyV1RequestType | (string & {});
2190
+ type?: OverrideQueueConcurrencyV1RequestType | (string & {}) | undefined;
1614
2191
  /** The new concurrency limit to set for the queue. It may not exceed your environment's maximum concurrency limit: a higher value is rejected with a 400, not capped to the maximum. */
1615
2192
  concurrencyLimit: number;
1616
2193
  }
@@ -1630,7 +2207,7 @@ export interface PauseQueueV1Request {
1630
2207
  /** The queue ID (e.g., `queue_1234`), or the name of the queue when using the `type` body parameter. */
1631
2208
  queueParam: string;
1632
2209
  /** How to interpret the `queueParam` path parameter: - `id`: Treat as a queue ID (default) - `task`: Treat as a task ID to get the task's default queue - `custom`: Treat as a custom queue name */
1633
- type?: PauseQueueV1RequestType | (string & {});
2210
+ type?: PauseQueueV1RequestType | (string & {}) | undefined;
1634
2211
  /** Whether to pause or resume the queue */
1635
2212
  action: PauseQueueV1RequestAction | (string & {});
1636
2213
  }
@@ -1640,42 +2217,123 @@ export interface PromoteDeploymentV1Request {
1640
2217
  }
1641
2218
  export interface PromoteDeploymentV1Response {
1642
2219
  /** The deployment ID */
1643
- id?: string;
2220
+ id?: string | undefined;
1644
2221
  /** The deployment version (e.g., "20250228.1") */
1645
- version?: string;
2222
+ version?: string | undefined;
1646
2223
  /** The short code for the deployment */
1647
- shortCode?: string;
2224
+ shortCode?: string | undefined;
2225
+ }
2226
+ export type ReplaceDashboardV1RequestWidgetsList = Array<DashboardWidgetInput>;
2227
+ export interface ReplaceDashboardV1Request {
2228
+ /** The custom dashboard id, starting with `dashboard_` */
2229
+ dashboardId: string;
2230
+ title?: string | undefined;
2231
+ description?: string | undefined;
2232
+ widgets: ReplaceDashboardV1RequestWidgetsList;
2233
+ revision?: string | undefined;
2234
+ }
2235
+ export interface ReplayWebhookDeliveryV1Request {
2236
+ /** The delivery's id, starts with `whd_`. */
2237
+ deliveryId: string;
2238
+ /** The subscriber to replay to: a `webhook()` task's id, or `agentId:eventId` for an agent's `chat.event` or channel. Listed in the endpoint's `subscribers`. */
2239
+ targetId?: string | undefined;
2240
+ }
2241
+ export interface ReplayWebhookDeliveryResponse {
2242
+ /** The new delivery. Retrieve it once it's processed to see the runs it started. */
2243
+ deliveryId: string;
2244
+ /** The delivery that was replayed. */
2245
+ replayedFrom: string;
1648
2246
  }
1649
2247
  export interface ResetConcurrencyLimitV1Request {
1650
2248
  /** The limit's name */
1651
2249
  name: string;
2250
+ /** Clear the per-key override for this concurrencyKey only. */
2251
+ concurrencyKey?: string | undefined;
1652
2252
  }
2253
+ export type ResetConcurrencyLimitV1ResponseBody = ConcurrencyLimitObject | ConcurrencyLimitKeyObject;
2254
+ export type ResetConcurrencyLimitV1Response = ResetConcurrencyLimitV1ResponseBody;
1653
2255
  /** How to interpret the `queueParam` path parameter: - `id`: Treat as a queue ID (default) - `task`: Treat as a task ID to get the task's default queue - `custom`: Treat as a custom queue name */
1654
2256
  export type ResetQueueConcurrencyV1RequestType = "id" | "task" | "custom";
1655
2257
  export interface ResetQueueConcurrencyV1Request {
1656
2258
  /** The queue ID (e.g., `queue_1234`), or the name of the queue when using the `type` body parameter. */
1657
2259
  queueParam: string;
1658
2260
  /** How to interpret the `queueParam` path parameter: - `id`: Treat as a queue ID (default) - `task`: Treat as a task ID to get the task's default queue - `custom`: Treat as a custom queue name */
1659
- type?: ResetQueueConcurrencyV1RequestType | (string & {});
2261
+ type?: ResetQueueConcurrencyV1RequestType | (string & {}) | undefined;
1660
2262
  }
1661
2263
  export interface ResolveErrorV1Request {
1662
2264
  /** The ID of an error group, starts with `error_`. */
1663
2265
  errorId: string;
1664
2266
  /** The worker version the error was resolved in. */
1665
- resolvedInVersion?: string;
2267
+ resolvedInVersion?: string | undefined;
2268
+ }
2269
+ export interface RotateWebhookEndpointSecretV1Request {
2270
+ /** The endpoint's declared id (the `id` passed to `webhooks.endpoint.define`) or its `wh_` id. A value starting with `wh_` is always a generated id, since declared ids can't start with `wh_`. A declared id names the endpoint's declared instance in the key's environment. */
2271
+ endpointId: string;
2272
+ previousSecretTtlSeconds?: number | undefined;
1666
2273
  }
2274
+ export interface RotateWebhookEndpointSecretResponse {
2275
+ /** The endpoint's `wh_` id. */
2276
+ id: string;
2277
+ secretSet: boolean;
2278
+ /** The new signing secret. It is returned only in this response and can't be read again. */
2279
+ secret: string | Redacted.Redacted<string>;
2280
+ /** When the replaced secret stops verifying deliveries. Absent when it was replaced immediately. */
2281
+ previousSecretExpiresAt?: string | undefined;
2282
+ }
2283
+ /** How `payload` is encoded. Defaults to `application/json`. With `application/super+json`, `payload` must be a SuperJSON string, which keeps types like `Date` and `BigInt`. The SDK sends this automatically. */
2284
+ export type RunReplayV1RequestPayloadType = "application/json" | "application/super+json";
2285
+ /** Metadata for the new run. Omit it to reuse the original run's metadata. */
2286
+ export type RunReplayV1RequestMetadataMap = {
2287
+ [key: string]: unknown | undefined;
2288
+ };
2289
+ /** The machine preset for the new run. */
2290
+ export type RunReplayV1RequestMachine = "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
2291
+ /** How long the new run can stay queued before it expires, as a duration string (`10m`) or a number of seconds. */
2292
+ export type RunReplayV1RequestTtl = string | number;
1667
2293
  export interface RunReplayV1Request {
1668
2294
  /** The ID of an run, starts with `run_`. The run ID will be returned when you trigger a run on a task. */
1669
2295
  runId: string;
2296
+ /** The payload for the new run. Omit it to reuse the original run's payload. */
2297
+ payload?: unknown | undefined;
2298
+ /** How `payload` is encoded. Defaults to `application/json`. With `application/super+json`, `payload` must be a SuperJSON string, which keeps types like `Date` and `BigInt`. The SDK sends this automatically. */
2299
+ payloadType?: RunReplayV1RequestPayloadType | (string & {}) | undefined;
2300
+ /** Metadata for the new run. Omit it to reuse the original run's metadata. */
2301
+ metadata?: RunReplayV1RequestMetadataMap | undefined;
2302
+ /** Tags for the new run. Replaces the original run's tags. */
2303
+ tags?: RunTags | undefined;
2304
+ /** The name of an existing queue in the environment to run on. */
2305
+ queue?: string | undefined;
2306
+ /** The concurrency key for the new run. */
2307
+ concurrencyKey?: string | undefined;
2308
+ /** The machine preset for the new run. */
2309
+ machine?: RunReplayV1RequestMachine | (string & {}) | undefined;
2310
+ /** Lock the new run to this deployed version, for example `20250101.1`. Defaults to the current version. */
2311
+ version?: string | undefined;
2312
+ /** The region to run in. Defaults to the original run's region. */
2313
+ region?: string | undefined;
2314
+ /** Delay the new run, as a duration (`1h30m`) or an ISO 8601 date. */
2315
+ delay?: string | undefined;
2316
+ /** How long the new run can stay queued before it expires, as a duration string (`10m`) or a number of seconds. */
2317
+ ttl?: RunReplayV1RequestTtl | undefined;
2318
+ /** An idempotency key for the new run. A repeated request with the same key returns the same run. */
2319
+ idempotencyKey?: string | undefined;
2320
+ /** How long the idempotency key is valid, as a duration (`1h`). */
2321
+ idempotencyKeyTTL?: string | undefined;
2322
+ /** The maximum number of attempts for the new run. */
2323
+ maxAttempts?: number | undefined;
2324
+ /** The maximum duration of the new run in seconds. */
2325
+ maxDuration?: number | undefined;
2326
+ /** Priority offset in seconds. Higher values are dequeued sooner. */
2327
+ priority?: number | undefined;
1670
2328
  }
1671
2329
  export interface RunReplayV1Response {
1672
2330
  /** The ID of the new run. */
1673
- id?: string;
2331
+ id?: string | undefined;
1674
2332
  }
1675
2333
  export interface RunRescheduleV1Request {
1676
2334
  /** The ID of an run, starts with `run_`. The run ID will be returned when you trigger a run on a task. */
1677
2335
  runId: string;
1678
- delay?: string;
2336
+ delay?: string | undefined;
1679
2337
  }
1680
2338
  /** The status of the run */
1681
2339
  export type RunRescheduleV1ResponseStatus = "PENDING_VERSION" | "DELAYED" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "COMPLETED" | "CANCELED" | "FAILED" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE";
@@ -1687,28 +2345,28 @@ export type RunRescheduleV1ResponseTriggerFunction = "trigger" | "triggerAndWait
1687
2345
  export type RunRescheduleV1ResponseRelatedRunsChildrenList = Array<CommonRunObject>;
1688
2346
  export interface RunRescheduleV1ResponseRelatedRuns {
1689
2347
  /** The root run of the run hierarchy. Will be omitted if the run is the root run */
1690
- root?: CommonRunObject;
2348
+ root?: CommonRunObject | undefined;
1691
2349
  /** The parent run of the run. Will be omitted if the run is the root run */
1692
- parent?: CommonRunObject;
2350
+ parent?: CommonRunObject | undefined;
1693
2351
  /** The immediate children of the run. Will be omitted if the run has no children */
1694
- children?: RunRescheduleV1ResponseRelatedRunsChildrenList;
2352
+ children?: RunRescheduleV1ResponseRelatedRunsChildrenList | undefined;
1695
2353
  }
1696
2354
  export type RunRescheduleV1ResponseScheduleGeneratorType = "CRON";
1697
2355
  export interface RunRescheduleV1ResponseScheduleGenerator {
1698
- type?: RunRescheduleV1ResponseScheduleGeneratorType;
2356
+ type?: RunRescheduleV1ResponseScheduleGeneratorType | undefined;
1699
2357
  /** The cron expression used to generate the schedule */
1700
- expression?: string;
2358
+ expression?: string | undefined;
1701
2359
  /** The description of the generator in plain english */
1702
- description?: string;
2360
+ description?: string | undefined;
1703
2361
  }
1704
2362
  /** The schedule that triggered the run. Will be omitted if the run was not triggered by a schedule */
1705
2363
  export interface RunRescheduleV1ResponseSchedule {
1706
2364
  /** The unique ID of the schedule, prefixed with `sched_` */
1707
2365
  id: string;
1708
2366
  /** The external ID of the schedule. Can be anything that is useful to you (e.g., user ID, org ID, etc.) */
1709
- externalId?: string;
2367
+ externalId?: string | undefined;
1710
2368
  /** The deduplication key used to prevent creating duplicate schedules */
1711
- deduplicationKey?: string;
2369
+ deduplicationKey?: string | undefined;
1712
2370
  generator: RunRescheduleV1ResponseScheduleGenerator;
1713
2371
  }
1714
2372
  export type RunRescheduleV1ResponseAttemptsItemStatus = "PENDING" | "EXECUTING" | "PAUSED" | "COMPLETED" | "FAILED" | "CANCELED";
@@ -1716,11 +2374,11 @@ export interface RunRescheduleV1ResponseAttemptsItem {
1716
2374
  /** The unique ID of the attempt, prefixed with `attempt_` */
1717
2375
  id: string;
1718
2376
  status: RunRescheduleV1ResponseAttemptsItemStatus;
1719
- error?: SerializedError;
2377
+ error?: SerializedError | undefined;
1720
2378
  createdAt: string;
1721
2379
  updatedAt: string;
1722
- startedAt?: string;
1723
- completedAt?: string;
2380
+ startedAt?: string | undefined;
2381
+ completedAt?: string | undefined;
1724
2382
  }
1725
2383
  export type RunRescheduleV1ResponseAttemptsList = Array<RunRescheduleV1ResponseAttemptsItem>;
1726
2384
  export interface RunRescheduleV1Response {
@@ -1731,78 +2389,92 @@ export interface RunRescheduleV1Response {
1731
2389
  /** The identifier of the task that was run */
1732
2390
  taskIdentifier: string;
1733
2391
  /** The version of the worker that executed the run */
1734
- version?: string;
2392
+ version?: string | undefined;
1735
2393
  /** The idempotency key used to prevent creating duplicate runs, if provided */
1736
- idempotencyKey?: string;
2394
+ idempotencyKey?: string | undefined;
1737
2395
  createdAt: string;
1738
2396
  updatedAt: string;
1739
2397
  /** Whether the run is a test run or not */
1740
- isTest?: boolean;
2398
+ isTest?: boolean | undefined;
1741
2399
  /** The time the run started */
1742
- startedAt?: string;
2400
+ startedAt?: string | undefined;
1743
2401
  /** The time the run finished */
1744
- finishedAt?: string;
2402
+ finishedAt?: string | undefined;
1745
2403
  /** If the run was triggered with a delay, this will be the time the run will be enqueued to execute */
1746
- delayedUntil?: string;
1747
- ttl?: unknown;
2404
+ delayedUntil?: string | undefined;
2405
+ ttl?: unknown | undefined;
1748
2406
  /** If the run had a TTL and that time has passed, when the run "expired". */
1749
- expiredAt?: string;
2407
+ expiredAt?: string | undefined;
1750
2408
  /** Tags can be attached to a run to make it easy to find runs (in the dashboard or using SDK functions like `runs.list`) */
1751
- tags?: RunRescheduleV1ResponseTagsList;
2409
+ tags?: RunRescheduleV1ResponseTagsList | undefined;
1752
2410
  /** The metadata of the run. See [Metadata](/runs/metadata) for more information. */
1753
- metadata?: unknown;
2411
+ metadata?: unknown | undefined;
1754
2412
  /** The compute cost of the run (so far) in cents. This cost does not apply to DEV runs. */
1755
- costInCents?: number;
2413
+ costInCents?: number | undefined;
1756
2414
  /** The invocation cost of the run in cents. This cost does not apply to DEV runs. */
1757
- baseCostInCents?: number;
2415
+ baseCostInCents?: number | undefined;
1758
2416
  /** The duration of compute (so far) in milliseconds. This does not include waits. */
1759
- durationMs?: number;
2417
+ durationMs?: number | undefined;
1760
2418
  /** The depth of the run in the task run hierarchy. The root run has a depth of 0. */
1761
- depth?: number;
2419
+ depth?: number | undefined;
1762
2420
  /** The ID of the batch that this run belongs to */
1763
- batchId?: string;
2421
+ batchId?: string | undefined;
1764
2422
  /** The name of the function that triggered the run */
1765
- triggerFunction?: RunRescheduleV1ResponseTriggerFunction;
2423
+ triggerFunction?: RunRescheduleV1ResponseTriggerFunction | undefined;
1766
2424
  /** The payload that was sent to the task. Will be omitted if the request was made with a Public API key */
1767
- payload?: unknown;
2425
+ payload?: unknown | undefined;
1768
2426
  /** The presigned URL to download the payload. Will only be included if the payload is too large to be included in the response. Expires in 5 minutes. */
1769
- payloadPresignedUrl?: string;
2427
+ payloadPresignedUrl?: string | undefined;
1770
2428
  /** The output of the run. Will be omitted if the request was made with a Public API key */
1771
- output?: unknown;
2429
+ output?: unknown | undefined;
1772
2430
  /** The presigned URL to download the output. Will only be included if the output is too large to be included in the response. Expires in 5 minutes. */
1773
- outputPresignedUrl?: string;
1774
- relatedRuns?: RunRescheduleV1ResponseRelatedRuns;
2431
+ outputPresignedUrl?: string | undefined;
2432
+ relatedRuns?: RunRescheduleV1ResponseRelatedRuns | undefined;
1775
2433
  /** The schedule that triggered the run. Will be omitted if the run was not triggered by a schedule */
1776
- schedule?: RunRescheduleV1ResponseSchedule;
2434
+ schedule?: RunRescheduleV1ResponseSchedule | undefined;
1777
2435
  attempts: RunRescheduleV1ResponseAttemptsList;
1778
2436
  }
2437
+ export interface SetWebhookEndpointSecretV1Request {
2438
+ /** The endpoint's declared id (the `id` passed to `webhooks.endpoint.define`) or its `wh_` id. A value starting with `wh_` is always a generated id, since declared ids can't start with `wh_`. A declared id names the endpoint's declared instance in the key's environment. */
2439
+ endpointId: string;
2440
+ /** The signing secret or public key. Leading and trailing whitespace is trimmed. */
2441
+ secret: string | Redacted.Redacted<string>;
2442
+ previousSecretTtlSeconds?: number | undefined;
2443
+ }
2444
+ export interface SetWebhookEndpointSecretResponse {
2445
+ /** The endpoint's `wh_` id. */
2446
+ id: string;
2447
+ secretSet: boolean;
2448
+ /** When the replaced secret stops verifying deliveries. Absent when it was replaced immediately. */
2449
+ previousSecretExpiresAt?: string | undefined;
2450
+ }
1779
2451
  export interface QueueOptions {
1780
2452
  /** You can define a shared queue and then pass the name in to your task. */
1781
- name?: string;
2453
+ name?: string | undefined;
1782
2454
  /** An optional property that specifies the maximum number of concurrent run executions. If this property is omitted, the task can potentially use up the full concurrency of an environment. */
1783
- concurrencyLimit?: number;
2455
+ concurrencyLimit?: number | undefined;
1784
2456
  }
1785
2457
  /** The machine preset to use for this run. This will override the task's machine preset and any defaults. */
1786
2458
  export type TriggerTaskRequestBodyOptionsMachine = "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
1787
2459
  export interface TriggerTaskRequestBodyOptions {
1788
- queue?: QueueOptions;
2460
+ queue?: QueueOptions | undefined;
1789
2461
  /** Scope the concurrency limit to a specific key. */
1790
- concurrencyKey?: string;
2462
+ concurrencyKey?: string | undefined;
1791
2463
  /** An optional property that specifies the idempotency key used to prevent creating duplicate runs. If you provide an existing idempotency key, we will return the existing run ID. */
1792
- idempotencyKey?: string;
1793
- ttl?: unknown;
1794
- delay?: string;
2464
+ idempotencyKey?: string | undefined;
2465
+ ttl?: unknown | undefined;
2466
+ delay?: string | undefined;
1795
2467
  /** Tags to attach to the run. Tags can be used to filter runs in the dashboard and using the SDK. You can set up to 10 tags per run, each must be less than 128 characters. We recommend prefixing tags with a namespace using an underscore or colon, like `user_1234567` or `org:9876543`. Stripe uses underscores. */
1796
- tags?: RunTags;
2468
+ tags?: RunTags | undefined;
1797
2469
  /** The machine preset to use for this run. This will override the task's machine preset and any defaults. */
1798
- machine?: TriggerTaskRequestBodyOptionsMachine | (string & {});
2470
+ machine?: TriggerTaskRequestBodyOptionsMachine | (string & {}) | undefined;
1799
2471
  }
1800
2472
  export interface TriggerTaskRequestBody {
1801
2473
  /** The payload can include any valid JSON */
1802
- payload?: unknown;
2474
+ payload?: unknown | undefined;
1803
2475
  /** The context can include any valid JSON */
1804
- context?: unknown;
1805
- options?: TriggerTaskRequestBodyOptions;
2476
+ context?: unknown | undefined;
2477
+ options?: TriggerTaskRequestBodyOptions | undefined;
1806
2478
  }
1807
2479
  /** An array of payloads to trigger the task with (max 1,000 items). */
1808
2480
  export type TriggerBatchTaskByIdV1RequestItemsList = Array<TriggerTaskRequestBody>;
@@ -1823,24 +2495,24 @@ export interface BatchTriggerTaskResponse {
1823
2495
  /** The machine preset to use for this run. This will override the task's machine preset and any defaults. */
1824
2496
  export type BatchTriggerTaskRequestBodyItemOptionsMachine = "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
1825
2497
  export interface BatchTriggerTaskRequestBodyItemOptions {
1826
- queue?: QueueOptions;
2498
+ queue?: QueueOptions | undefined;
1827
2499
  /** Scope the concurrency limit to a specific key. */
1828
- concurrencyKey?: string;
2500
+ concurrencyKey?: string | undefined;
1829
2501
  /** An optional property that specifies the idempotency key used to prevent creating duplicate runs. If you provide an existing idempotency key, we will return the existing run ID. */
1830
- idempotencyKey?: string;
1831
- ttl?: unknown;
1832
- delay?: string;
2502
+ idempotencyKey?: string | undefined;
2503
+ ttl?: unknown | undefined;
2504
+ delay?: string | undefined;
1833
2505
  /** Tags to attach to the run. Tags can be used to filter runs in the dashboard and using the SDK. You can set up to 10 tags per run, each must be less than 128 characters. We recommend prefixing tags with a namespace using an underscore or colon, like `user_1234567` or `org:9876543`. Stripe uses underscores. */
1834
- tags?: RunTags;
2506
+ tags?: RunTags | undefined;
1835
2507
  /** The machine preset to use for this run. This will override the task's machine preset and any defaults. */
1836
- machine?: BatchTriggerTaskRequestBodyItemOptionsMachine | (string & {});
2508
+ machine?: BatchTriggerTaskRequestBodyItemOptionsMachine | (string & {}) | undefined;
1837
2509
  }
1838
2510
  export interface BatchTriggerTaskRequestBodyItem {
1839
2511
  /** The payload can include any valid JSON */
1840
- payload?: unknown;
2512
+ payload?: unknown | undefined;
1841
2513
  /** The context can include any valid JSON */
1842
- context?: unknown;
1843
- options?: BatchTriggerTaskRequestBodyItemOptions;
2514
+ context?: unknown | undefined;
2515
+ options?: BatchTriggerTaskRequestBodyItemOptions | undefined;
1844
2516
  /** The task identifier to trigger. This is the `id` set in your `task()` functions. */
1845
2517
  task: string;
1846
2518
  }
@@ -1853,35 +2525,54 @@ export interface TriggerBatchTaskV1Request {
1853
2525
  /** The machine preset to use for this run. This will override the task's machine preset and any defaults. */
1854
2526
  export type TriggerTaskV1RequestOptionsMachine = "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
1855
2527
  export interface TriggerTaskV1RequestOptions {
1856
- queue?: QueueOptions;
2528
+ queue?: QueueOptions | undefined;
1857
2529
  /** Scope the concurrency limit to a specific key. */
1858
- concurrencyKey?: string;
2530
+ concurrencyKey?: string | undefined;
1859
2531
  /** An optional property that specifies the idempotency key used to prevent creating duplicate runs. If you provide an existing idempotency key, we will return the existing run ID. */
1860
- idempotencyKey?: string;
1861
- ttl?: unknown;
1862
- delay?: string;
2532
+ idempotencyKey?: string | undefined;
2533
+ ttl?: unknown | undefined;
2534
+ delay?: string | undefined;
1863
2535
  /** Tags to attach to the run. Tags can be used to filter runs in the dashboard and using the SDK. You can set up to 10 tags per run, each must be less than 128 characters. We recommend prefixing tags with a namespace using an underscore or colon, like `user_1234567` or `org:9876543`. Stripe uses underscores. */
1864
- tags?: RunTags;
2536
+ tags?: RunTags | undefined;
1865
2537
  /** The machine preset to use for this run. This will override the task's machine preset and any defaults. */
1866
- machine?: TriggerTaskV1RequestOptionsMachine | (string & {});
2538
+ machine?: TriggerTaskV1RequestOptionsMachine | (string & {}) | undefined;
1867
2539
  }
1868
2540
  export interface TriggerTaskV1Request {
1869
2541
  /** The id of a task. If the id contains characters that are reserved in a URL path, such as a slash (`/`), percent-encode it when building the request path (e.g. `types/zod` becomes `types%2Fzod`). */
1870
2542
  taskIdentifier: string;
1871
2543
  /** The payload can include any valid JSON */
1872
- payload?: unknown;
2544
+ payload?: unknown | undefined;
1873
2545
  /** The context can include any valid JSON */
1874
- context?: unknown;
1875
- options?: TriggerTaskV1RequestOptions;
2546
+ context?: unknown | undefined;
2547
+ options?: TriggerTaskV1RequestOptions | undefined;
1876
2548
  }
1877
2549
  export interface TriggerTaskResponse {
1878
2550
  /** The ID of the run that was triggered. */
1879
- id?: string;
2551
+ id?: string | undefined;
1880
2552
  }
1881
2553
  export interface UnresolveErrorV1Request {
1882
2554
  /** The ID of an error group, starts with `error_`. */
1883
2555
  errorId: string;
1884
2556
  }
2557
+ export interface UpdateDashboardV1Request {
2558
+ /** The custom dashboard id, starting with `dashboard_` */
2559
+ dashboardId: string;
2560
+ title?: string | undefined;
2561
+ description?: string | undefined;
2562
+ revision?: string | undefined;
2563
+ }
2564
+ export interface UpdateDashboardWidgetV1Request {
2565
+ /** The custom dashboard id, starting with `dashboard_` */
2566
+ dashboardId: string;
2567
+ /** The widget id */
2568
+ widgetId: string;
2569
+ title?: string | undefined;
2570
+ query?: string | undefined;
2571
+ display?: DashboardWidgetDisplay | undefined;
2572
+ fillGaps?: boolean | undefined;
2573
+ position?: DashboardWidgetPosition | undefined;
2574
+ revision?: string | undefined;
2575
+ }
1885
2576
  export type UpdateProjectEnvvarV1RequestEnv = "dev" | "staging" | "prod";
1886
2577
  export interface UpdateProjectEnvvarV1Request {
1887
2578
  /** The external ref of the project. You can find this in the project settings. Starts with `proj_`. */
@@ -1897,20 +2588,20 @@ export interface UpdateRunMetadataV1Request {
1897
2588
  /** The ID of an run, starts with `run_`. The run ID will be returned when you trigger a run on a task. */
1898
2589
  runId: string;
1899
2590
  /** The new metadata to set on the run. */
1900
- metadata?: unknown;
2591
+ metadata?: unknown | undefined;
1901
2592
  }
1902
2593
  export interface UpdateRunMetadataV1Response {
1903
2594
  /** The updated metadata of the run. */
1904
- metadata?: unknown;
2595
+ metadata?: unknown | undefined;
1905
2596
  }
1906
2597
  export interface UpdateScheduleV1Request {
1907
2598
  /** The ID of the schedule. */
1908
2599
  schedule_id: string;
1909
2600
  task: string;
1910
2601
  cron: string;
1911
- externalId?: string;
2602
+ externalId?: string | undefined;
1912
2603
  /** Defaults to "UTC". In IANA format ("America/New_York"). If set then it will trigger at the CRON frequency in that timezone and respect daylight savings time. */
1913
- timezone?: string;
2604
+ timezone?: string | undefined;
1914
2605
  }
1915
2606
  /** Replaces the tags on the session row. */
1916
2607
  export type UpdateSessionV1RequestTagsList = Array<string>;
@@ -1922,11 +2613,11 @@ export interface UpdateSessionV1Request {
1922
2613
  /** The session's friendly ID (`session_...`) or your `externalId`. The server disambiguates by the `session_` prefix. */
1923
2614
  session: string;
1924
2615
  /** Replaces the tags on the session row. */
1925
- tags?: UpdateSessionV1RequestTagsList;
2616
+ tags?: UpdateSessionV1RequestTagsList | undefined;
1926
2617
  /** Replaces the metadata. Pass `null` to clear it. */
1927
- metadata?: UpdateSessionV1RequestMetadataMap | null;
2618
+ metadata?: UpdateSessionV1RequestMetadataMap | null | undefined;
1928
2619
  /** Read-only after create: cannot be changed or cleared. Sending a value different from the current one (including `null` when one is set) returns `422`; sending the same value is idempotent. */
1929
- externalId?: string | null;
2620
+ externalId?: string | null | undefined;
1930
2621
  }
1931
2622
  export type UploadProjectEnvvarsV1RequestEnv = "dev" | "staging" | "prod";
1932
2623
  export type UploadProjectEnvvarsV1RequestVariablesList = Array<EnvVar>;
@@ -1937,11 +2628,14 @@ export interface UploadProjectEnvvarsV1Request {
1937
2628
  env: UploadProjectEnvvarsV1RequestEnv | (string & {});
1938
2629
  variables: UploadProjectEnvvarsV1RequestVariablesList;
1939
2630
  /** Whether to override existing variables or not */
1940
- override?: boolean;
2631
+ override?: boolean | undefined;
1941
2632
  }
1942
2633
  export type ActivateScheduleV1Error = NotFound | TriggerDevOpError;
1943
2634
  /** Activate Schedule Activate a schedule by its ID. This will only work on `IMPERATIVE` schedules that were created in the dashboard or using the imperative SDK functions like `schedules.create()`. */
1944
2635
  export declare const activateScheduleV1: API.OperationMethod<ActivateScheduleV1Request, ScheduleObject, ActivateScheduleV1Error, TriggerDevOpContext>;
2636
+ export type AddDashboardWidgetV1Error = BadRequest | Forbidden | NotFound | Conflict | TriggerDevOpError;
2637
+ /** Add a dashboard widget Add a widget to a custom dashboard. Without a position it is placed full width at the bottom. */
2638
+ export declare const addDashboardWidgetV1: API.OperationMethod<AddDashboardWidgetV1Request, AddDashboardWidgetV1Response, AddDashboardWidgetV1Error, TriggerDevOpContext>;
1945
2639
  export type AddRunTagsV1Error = BadRequest | UnprocessableEntity | TriggerDevOpError;
1946
2640
  /** Add tags to a run Adds one or more tags to a run. Runs can have a maximum of 10 tags. Duplicate tags are ignored. */
1947
2641
  export declare const addRunTagsV1: API.OperationMethod<AddRunTagsV1Request, AddRunTagsV1Response, AddRunTagsV1Error, TriggerDevOpContext>;
@@ -1951,6 +2645,9 @@ export declare const bulkAbortActionV1: API.OperationMethod<BulkAbortActionV1Req
1951
2645
  export type CancelRunV1Error = BadRequest | NotFound | TriggerDevOpError;
1952
2646
  /** Cancel a run Cancels an in-progress run. If the run is already completed, this will have no effect. */
1953
2647
  export declare const cancelRunV1: API.OperationMethod<CancelRunV1Request, CancelRunV1Response, CancelRunV1Error, TriggerDevOpContext>;
2648
+ export type CancelWebhookWaiterV1Error = NotFound | TriggerDevOpError;
2649
+ /** Cancel a webhook waiter Cancel a waiter. It stops matching deliveries, frees its slot toward the endpoint's limit, and fails the run's wait. If a delivery already claimed the waiter, the cancel is too late: the response has `cancelled: false` with `reason: "too_late"`, and the run resumes with that delivery's event. */
2650
+ export declare const cancelWebhookWaiterV1: API.OperationMethod<CancelWebhookWaiterV1Request, CancelWebhookWaiterResponse, CancelWebhookWaiterV1Error, TriggerDevOpContext>;
1954
2651
  export type CloseSessionV1Error = NotFound | TriggerDevOpError;
1955
2652
  /** Close a session Close a session. Closing is terminal and idempotent -- closing an already-closed session returns the existing row unchanged. A closed session cannot be reopened, and reusing its `externalId` on create returns `409`. Requires a secret key -- a session public token cannot close a session. */
1956
2653
  export declare const closeSessionV1: API.OperationMethod<CloseSessionV1Request, SessionObject, CloseSessionV1Error, TriggerDevOpContext>;
@@ -1963,6 +2660,9 @@ export declare const completeWaitpointTokenV1: API.OperationMethod<CompleteWaitp
1963
2660
  export type CreateBulkActionV1Error = BadRequest | UnprocessableEntity | TriggerDevOpError;
1964
2661
  /** Create bulk action Create an asynchronous bulk action to cancel or replay runs selected by run IDs or filters. */
1965
2662
  export declare const createBulkActionV1: API.OperationMethod<CreateBulkActionV1Request, CreateBulkActionV1Response, CreateBulkActionV1Error, TriggerDevOpContext>;
2663
+ export type CreateDashboardV1Error = BadRequest | Forbidden | TriggerDevOpError;
2664
+ /** Create a dashboard Create a custom dashboard, optionally with its widgets. Every widget query is checked against the queryable tables before it is saved. Creating more dashboards than your plan allows returns a 403. */
2665
+ export declare const createDashboardV1: API.OperationMethod<CreateDashboardV1Request, DashboardObject, CreateDashboardV1Error, TriggerDevOpContext>;
1966
2666
  export type CreateProjectEnvvarV1Error = BadRequest | NotFound | TriggerDevOpError;
1967
2667
  /** Create environment variable Create a new environment variable for a specific project and environment. */
1968
2668
  export declare const createProjectEnvvarV1: API.OperationMethod<CreateProjectEnvvarV1Request, SucceedResponse, CreateProjectEnvvarV1Error, TriggerDevOpContext>;
@@ -1975,15 +2675,30 @@ export declare const createSessionV1: API.OperationMethod<CreateSessionV1Request
1975
2675
  export type CreateWaitpointTokenV1Error = UnprocessableEntity | TriggerDevOpError;
1976
2676
  /** Create a waitpoint token Creates a new waitpoint token that can be used to pause a run until an external event completes it. The token includes a `url` which can be called via HTTP POST to complete the waitpoint. Use the token ID with `wait.forToken()` inside a task to pause execution until the token is completed. */
1977
2677
  export declare const createWaitpointTokenV1: API.OperationMethod<CreateWaitpointTokenV1Request, CreateWaitpointTokenResponse, CreateWaitpointTokenV1Error, TriggerDevOpContext>;
2678
+ export type CreateWebhookWaiterV1Error = NotFound | UnprocessableEntity | TriggerDevOpError;
2679
+ /** Create a webhook waiter Create a waiter on an endpoint. A waiter is a waitpoint that completes when a matching delivery arrives on the endpoint, so a run waiting on its id resumes with the verified event. It only matches deliveries that arrive after it was created. Omit `match` to get a waiter with its own `url`, for providers that take a webhook URL per request. */
2680
+ export declare const createWebhookWaiterV1: API.OperationMethod<CreateWebhookWaiterV1Request, CreateWebhookWaiterResponse, CreateWebhookWaiterV1Error, TriggerDevOpContext>;
1978
2681
  export type DeactivateScheduleV1Error = NotFound | TriggerDevOpError;
1979
2682
  /** Deactivate Schedule. Deactivate a schedule by its ID. This will only work on `IMPERATIVE` schedules that were created in the dashboard or using the imperative SDK functions like `schedules.create()`. */
1980
2683
  export declare const deactivateScheduleV1: API.OperationMethod<DeactivateScheduleV1Request, ScheduleObject, DeactivateScheduleV1Error, TriggerDevOpContext>;
2684
+ export type DeleteDashboardV1Error = NotFound | TriggerDevOpError;
2685
+ /** Delete a dashboard Delete a custom dashboard. */
2686
+ export declare const deleteDashboardV1: API.OperationMethod<DeleteDashboardV1Request, DeleteDashboardV1Response, DeleteDashboardV1Error, TriggerDevOpContext>;
2687
+ export type DeleteDashboardWidgetV1Error = NotFound | Conflict | TriggerDevOpError;
2688
+ /** Delete a dashboard widget Remove a widget from a custom dashboard. */
2689
+ export declare const deleteDashboardWidgetV1: API.OperationMethod<DeleteDashboardWidgetV1Request, DashboardObject, DeleteDashboardWidgetV1Error, TriggerDevOpContext>;
1981
2690
  export type DeleteProjectEnvvarV1Error = BadRequest | NotFound | TriggerDevOpError;
1982
2691
  /** Delete environment variable Delete a specific environment variable for a specific project and environment. */
1983
2692
  export declare const deleteProjectEnvvarV1: API.OperationMethod<DeleteProjectEnvvarV1Request, SucceedResponse, DeleteProjectEnvvarV1Error, TriggerDevOpContext>;
1984
2693
  export type DeleteScheduleV1Error = NotFound | TriggerDevOpError;
1985
2694
  /** Delete Schedule Delete a schedule by its ID. This will only work on `IMPERATIVE` schedules that were created in the dashboard or using the imperative SDK functions like `schedules.create()`. */
1986
2695
  export declare const deleteScheduleV1: API.OperationMethod<DeleteScheduleV1Request, DeleteScheduleV1Response, DeleteScheduleV1Error, TriggerDevOpContext>;
2696
+ export type DisableWebhookEndpointV1Error = NotFound | TriggerDevOpError;
2697
+ /** Disable a webhook endpoint Pause an endpoint. Its status becomes `inactive` and its URL responds with `404` until you enable it, so providers see failed deliveries and retry on their own schedule. Returns the updated endpoint. */
2698
+ export declare const disableWebhookEndpointV1: API.OperationMethod<DisableWebhookEndpointV1Request, DisableWebhookEndpointV1Response, DisableWebhookEndpointV1Error, TriggerDevOpContext>;
2699
+ export type EnableWebhookEndpointV1Error = NotFound | TriggerDevOpError;
2700
+ /** Enable a webhook endpoint Resume a disabled endpoint so its URL accepts deliveries again. Returns the updated endpoint. */
2701
+ export declare const enableWebhookEndpointV1: API.OperationMethod<EnableWebhookEndpointV1Request, EnableWebhookEndpointV1Response, EnableWebhookEndpointV1Error, TriggerDevOpContext>;
1987
2702
  export type ExecuteQueryV1Error = BadRequest | TriggerDevOpError;
1988
2703
  /** Execute a TRQL query Execute a TRQL (Trigger.dev Query Language) query against your run data. TRQL is a SQL-style query language that allows you to analyze runs, calculate metrics, and export data. */
1989
2704
  export declare const executeQueryV1: API.OperationMethod<ExecuteQueryV1Request, ExecuteQueryV1Response, ExecuteQueryV1Error, TriggerDevOpContext>;
@@ -1997,8 +2712,11 @@ export type GetBulkActionV1Error = NotFound | TriggerDevOpError;
1997
2712
  /** Retrieve bulk action Retrieve the status and aggregate processing counts for a bulk action. */
1998
2713
  export declare const getBulkActionV1: API.OperationMethod<GetBulkActionV1Request, BulkActionObject, GetBulkActionV1Error, TriggerDevOpContext>;
1999
2714
  export type GetConcurrencyLimitV1Error = NotFound | TriggerDevOpError;
2000
- /** Retrieve concurrency limit Retrieve a concurrency limit by name, with its bounds and live running and queued counts. */
2001
- export declare const getConcurrencyLimitV1: API.OperationMethod<GetConcurrencyLimitV1Request, ConcurrencyLimitObject, GetConcurrencyLimitV1Error, TriggerDevOpContext>;
2715
+ /** Retrieve concurrency limit Retrieve a concurrency limit by name, with its bounds and live running and queued counts. With the concurrencyKey query parameter, retrieve the limit's view for that one key instead (its per-key bound, any per-key override and when it expires, and the runs executing for the key). */
2716
+ export declare const getConcurrencyLimitV1: API.OperationMethod<GetConcurrencyLimitV1Request, GetConcurrencyLimitV1Response, GetConcurrencyLimitV1Error, TriggerDevOpContext>;
2717
+ export type GetDashboardV1Error = NotFound | TriggerDevOpError;
2718
+ /** Retrieve a dashboard Retrieve a custom dashboard with every widget, its query, display and grid position. */
2719
+ export declare const getDashboardV1: API.OperationMethod<GetDashboardV1Request, DashboardObject, GetDashboardV1Error, TriggerDevOpContext>;
2002
2720
  export type GetDeploymentV1Error = NotFound | TriggerDevOpError;
2003
2721
  /** Get deployment Retrieve information about a specific deployment by its ID. */
2004
2722
  export declare const getDeploymentV1: API.OperationMethod<GetDeploymentV1Request, GetDeploymentV1Response, GetDeploymentV1Error, TriggerDevOpContext>;
@@ -2023,8 +2741,8 @@ export declare const getRunEventsV1: API.OperationMethod<GetRunEventsV1Request,
2023
2741
  export type GetRunResultV1Error = NotFound | TriggerDevOpError;
2024
2742
  /** Retrieve run result Returns the execution result of a completed run. Returns 404 if the run doesn't exist or hasn't finished yet. */
2025
2743
  export declare const getRunResultV1: API.OperationMethod<GetRunResultV1Request, GetRunResultV1Response, GetRunResultV1Error, TriggerDevOpContext>;
2026
- export type GetRunTraceV1Error = NotFound | TriggerDevOpError;
2027
- /** Retrieve run trace Returns the OTel trace subtree for the requested run -- the run's span as `rootSpan`, its ancestor chain, and its descendant spans. For child or nested runs in a large trace, this is scoped to that run rather than the trace-wide root. */
2744
+ export type GetRunTraceV1Error = BadRequest | NotFound | TriggerDevOpError;
2745
+ /** Retrieve run trace Returns the OTel trace subtree for the requested run -- the run's span as `rootSpan`, its ancestor chain, and its descendant spans. For child or nested runs in a large trace, this is scoped to that run rather than the trace-wide root. Pass `page[size]` or `page[after]` to page the trace as flat spans instead; paging works for runs at the root of their trace. */
2028
2746
  export declare const getRunTraceV1: API.OperationMethod<GetRunTraceV1Request, GetRunTraceV1Response, GetRunTraceV1Error, TriggerDevOpContext>;
2029
2747
  export type GetRunV1Error = BadRequest | NotFound | TriggerDevOpError;
2030
2748
  /** Retrieve a run Retrieve information about a run, including its status, payload, output, and attempts. If you authenticate with a Public API key, we will omit the payload and output fields for security reasons. */
@@ -2041,6 +2759,12 @@ export declare const getTimezonesV1: API.OperationMethod<GetTimezonesV1Request,
2041
2759
  export type GetWaitpointTokenV1Error = NotFound | TriggerDevOpError;
2042
2760
  /** Retrieve a waitpoint token Retrieves a waitpoint token by its ID, including its current status and output if it has been completed. */
2043
2761
  export declare const getWaitpointTokenV1: API.OperationMethod<GetWaitpointTokenV1Request, WaitpointTokenObject, GetWaitpointTokenV1Error, TriggerDevOpContext>;
2762
+ export type GetWebhookDeliveryV1Error = NotFound | TriggerDevOpError;
2763
+ /** Retrieve a webhook delivery Retrieve one delivery: its status and error, the event body and headers it carried, and a `targets` entry per subscriber with the run or session it started or why its filter skipped the event. When the delivery resumed waiting runs, one more entry summarizes them. */
2764
+ export declare const getWebhookDeliveryV1: API.OperationMethod<GetWebhookDeliveryV1Request, GetWebhookDeliveryV1Response, GetWebhookDeliveryV1Error, TriggerDevOpContext>;
2765
+ export type GetWebhookEndpointV1Error = NotFound | TriggerDevOpError;
2766
+ /** Retrieve a webhook endpoint Retrieve one webhook endpoint with its subscribers, the filter each one applies, and its setup prompt: instructions for registering the endpoint and its signing secret with the provider. */
2767
+ export declare const getWebhookEndpointV1: API.OperationMethod<GetWebhookEndpointV1Request, GetWebhookEndpointV1Response, GetWebhookEndpointV1Error, TriggerDevOpContext>;
2044
2768
  export type IgnoreErrorV1Error = NotFound | TriggerDevOpError;
2045
2769
  /** Ignore an error Mark an error group as ignored. Provide a `duration` to ignore it for a fixed window, and/or thresholds that re-surface the error when exceeded. Send a JSON body (use `{}` to ignore indefinitely). */
2046
2770
  export declare const ignoreErrorV1: API.OperationMethod<IgnoreErrorV1Request, ErrorObject, IgnoreErrorV1Error, TriggerDevOpContext>;
@@ -2051,7 +2775,7 @@ export type ListConcurrencyLimitsV1Error = TriggerDevOpError;
2051
2775
  /** List concurrency limits List the environment's declared concurrency limits (anonymous inline limits appear under their derived `task/<task-id>` names), with each limit's bounds and its live running and queued counts. Results are ordered by the underlying row name, so named limits sort before `task/`-derived inline limits. */
2052
2776
  export declare const listConcurrencyLimitsV1: API.OperationMethod<ListConcurrencyLimitsV1Request, ListConcurrencyLimitsV1Response, ListConcurrencyLimitsV1Error, TriggerDevOpContext>;
2053
2777
  export type ListDashboardsV1Error = TriggerDevOpError;
2054
- /** List built-in dashboards List available built-in dashboards with their widgets. Each dashboard contains pre-built TRQL queries for common metrics like run success rates, costs, and LLM usage. */
2778
+ /** List dashboards List the built-in dashboards and your organization's custom dashboards, with their widgets. Built-in dashboards contain pre-built TRQL queries for common metrics like run success rates, costs, and LLM usage. */
2055
2779
  export declare const listDashboardsV1: API.OperationMethod<ListDashboardsV1Request, ListDashboardsV1Response, ListDashboardsV1Error, TriggerDevOpContext>;
2056
2780
  export type ListDeploymentsV1Error = TriggerDevOpError;
2057
2781
  /** List deployments List deployments for the authenticated environment, ordered by most recent first. */
@@ -2069,7 +2793,7 @@ export type ListQueuesV1Error = TriggerDevOpError;
2069
2793
  /** List all queues List all queues in your environment with pagination support. */
2070
2794
  export declare const listQueuesV1: API.OperationMethod<ListQueuesV1Request, ListQueuesResult, ListQueuesV1Error, TriggerDevOpContext>;
2071
2795
  export type ListRunsV1Error = BadRequest | TriggerDevOpError;
2072
- /** List runs List runs in a specific environment. You can filter the runs by status, created at, task identifier, version, and more. */
2796
+ /** List runs List runs in a specific environment. You can filter the runs by status, created at, task identifier, version, and more. Without a `filter[createdAt]` value, only runs created in the last 7 days are returned. This endpoint is for browsing, reporting, and bulk operations, not for coordinating runs, so don't call it before every trigger or poll it in a loop. See [runs.list() best practices](/runs/list-best-practices). */
2073
2797
  export declare const listRunsV1: API.OperationMethod<ListRunsV1Request, ListRunsResult, ListRunsV1Error, TriggerDevOpContext>;
2074
2798
  export type ListSchedulesV1Error = TriggerDevOpError;
2075
2799
  /** List all schedules List all schedules. You can also paginate the results. */
@@ -2080,9 +2804,15 @@ export declare const listSessionsV1: API.OperationMethod<ListSessionsV1Request,
2080
2804
  export type ListWaitpointTokensV1Error = UnprocessableEntity | TriggerDevOpError;
2081
2805
  /** List waitpoint tokens Returns a paginated list of waitpoint tokens for the current environment. Results are ordered by creation date, newest first. Use cursor-based pagination with `page[after]` and `page[before]` to navigate pages. */
2082
2806
  export declare const listWaitpointTokensV1: API.OperationMethod<ListWaitpointTokensV1Request, ListWaitpointTokensResult, ListWaitpointTokensV1Error, TriggerDevOpContext>;
2807
+ export type ListWebhookDeliveriesV1Error = BadRequest | TriggerDevOpError;
2808
+ /** List webhook deliveries List the verified events providers sent to the environment's endpoints, newest first. Filter by endpoint, status and time range, and page with `page[after]` and `page[before]`. */
2809
+ export declare const listWebhookDeliveriesV1: API.OperationMethod<ListWebhookDeliveriesV1Request, ListWebhookDeliveriesResult, ListWebhookDeliveriesV1Error, TriggerDevOpContext>;
2810
+ export type ListWebhookEndpointsV1Error = TriggerDevOpError;
2811
+ /** List webhook endpoints List the hosted webhook endpoints in the environment, ordered by declared id. Each endpoint includes its webhook URL and whether its signing secret is set. The secret itself is never returned. */
2812
+ export declare const listWebhookEndpointsV1: API.OperationMethod<ListWebhookEndpointsV1Request, ListWebhookEndpointsResult, ListWebhookEndpointsV1Error, TriggerDevOpContext>;
2083
2813
  export type OverrideConcurrencyLimitV1Error = BadRequest | NotFound | Conflict | TriggerDevOpError;
2084
2814
  /** Override concurrency limit Override a concurrency limit's bounds. Only the given fields change; the declared values are kept and restored by reset. To stop runs holding a limit, prefer the pause endpoint (it keeps the configured bounds); overriding `total` to `0` also blocks every run holding the limit. */
2085
- export declare const overrideConcurrencyLimitV1: API.OperationMethod<OverrideConcurrencyLimitV1Request, ConcurrencyLimitObject, OverrideConcurrencyLimitV1Error, TriggerDevOpContext>;
2815
+ export declare const overrideConcurrencyLimitV1: API.OperationMethod<OverrideConcurrencyLimitV1Request, OverrideConcurrencyLimitV1Response, OverrideConcurrencyLimitV1Error, TriggerDevOpContext>;
2086
2816
  export type OverrideQueueConcurrencyV1Error = BadRequest | NotFound | TriggerDevOpError;
2087
2817
  /** Override queue concurrency limit Override the concurrency limit of a queue. This is useful for temporarily scaling up or down based on demand. */
2088
2818
  export declare const overrideQueueConcurrencyV1: API.OperationMethod<OverrideQueueConcurrencyV1Request, QueueObject, OverrideQueueConcurrencyV1Error, TriggerDevOpContext>;
@@ -2095,21 +2825,33 @@ export declare const pauseQueueV1: API.OperationMethod<PauseQueueV1Request, Queu
2095
2825
  export type PromoteDeploymentV1Error = BadRequest | NotFound | TriggerDevOpError;
2096
2826
  /** Promote deployment Promote a previously deployed version to be the current version for the environment. This makes the specified version active for new task runs. */
2097
2827
  export declare const promoteDeploymentV1: API.OperationMethod<PromoteDeploymentV1Request, PromoteDeploymentV1Response, PromoteDeploymentV1Error, TriggerDevOpContext>;
2828
+ export type ReplaceDashboardV1Error = BadRequest | Forbidden | NotFound | Conflict | TriggerDevOpError;
2829
+ /** Replace a dashboard's widgets Replace every widget on a custom dashboard, and optionally its title and description. A widget that already exists keeps its position unless you pass a new one; new widgets without a position are stacked full width below the others, in order. */
2830
+ export declare const replaceDashboardV1: API.OperationMethod<ReplaceDashboardV1Request, DashboardObject, ReplaceDashboardV1Error, TriggerDevOpContext>;
2831
+ export type ReplayWebhookDeliveryV1Error = Forbidden | NotFound | TriggerDevOpError;
2832
+ /** Replay a webhook delivery Route a delivery's stored event again as a new delivery. Without `targetId` every current subscriber is checked against its filter again. With `targetId` the event goes to that one subscriber, even if its filter skipped it. A replay never resumes waiting runs. Replays start real runs, so the key needs permission to trigger every task the replay runs, and to write sessions if it reaches an agent's subscriber. */
2833
+ export declare const replayWebhookDeliveryV1: API.OperationMethod<ReplayWebhookDeliveryV1Request, ReplayWebhookDeliveryResponse, ReplayWebhookDeliveryV1Error, TriggerDevOpContext>;
2098
2834
  export type ResetConcurrencyLimitV1Error = BadRequest | NotFound | Conflict | TriggerDevOpError;
2099
- /** Reset concurrency limit Reset a concurrency limit back to the values declared in your code, clearing any override. */
2100
- export declare const resetConcurrencyLimitV1: API.OperationMethod<ResetConcurrencyLimitV1Request, ConcurrencyLimitObject, ResetConcurrencyLimitV1Error, TriggerDevOpContext>;
2835
+ /** Reset concurrency limit Reset a concurrency limit back to the values declared in your code, clearing any override. With a concurrencyKey in the body, clear that key's per-key override instead and leave the limit itself alone. */
2836
+ export declare const resetConcurrencyLimitV1: API.OperationMethod<ResetConcurrencyLimitV1Request, ResetConcurrencyLimitV1Response, ResetConcurrencyLimitV1Error, TriggerDevOpContext>;
2101
2837
  export type ResetQueueConcurrencyV1Error = BadRequest | NotFound | TriggerDevOpError;
2102
2838
  /** Reset queue concurrency limit Reset the concurrency limit of a queue back to its base value defined in code. */
2103
2839
  export declare const resetQueueConcurrencyV1: API.OperationMethod<ResetQueueConcurrencyV1Request, QueueObject, ResetQueueConcurrencyV1Error, TriggerDevOpContext>;
2104
2840
  export type ResolveErrorV1Error = NotFound | TriggerDevOpError;
2105
2841
  /** Resolve an error Mark an error group as resolved. Optionally record the worker version that resolved it. Send a JSON body (use `{}` when you have no fields to set). */
2106
2842
  export declare const resolveErrorV1: API.OperationMethod<ResolveErrorV1Request, ErrorObject, ResolveErrorV1Error, TriggerDevOpContext>;
2107
- export type RunReplayV1Error = BadRequest | NotFound | TriggerDevOpError;
2108
- /** Replay a run Creates a new run with the same payload and options as the original run. */
2843
+ export type RotateWebhookEndpointSecretV1Error = BadRequest | NotFound | TriggerDevOpError;
2844
+ /** Generate a webhook signing secret Generate a new signing secret for the endpoint, store it, and return it once. Use this for providers where you choose the secret, such as GitHub. It replaces the existing secret. Pass `previousSecretTtlSeconds` to keep accepting the old secret while you update the provider; without it, deliveries signed with the old secret fail verification straight away. Endpoints whose source verifies with a public key refuse this; set the provider's key with the set secret endpoint instead. */
2845
+ export declare const rotateWebhookEndpointSecretV1: API.OperationMethod<RotateWebhookEndpointSecretV1Request, RotateWebhookEndpointSecretResponse, RotateWebhookEndpointSecretV1Error, TriggerDevOpContext>;
2846
+ export type RunReplayV1Error = BadRequest | Forbidden | NotFound | TriggerDevOpError;
2847
+ /** Replay a run Creates a new run with the same payload and options as the original run, in the same environment. Send a body to override the payload, metadata, or trigger options for the new run. The body is optional; an empty body replays the run unchanged. */
2109
2848
  export declare const runReplayV1: API.OperationMethod<RunReplayV1Request, RunReplayV1Response, RunReplayV1Error, TriggerDevOpContext>;
2110
2849
  export type RunRescheduleV1Error = BadRequest | NotFound | TriggerDevOpError;
2111
2850
  /** Rescheduled a delayed run Updates a delayed run with a new delay. Only valid when the run is in the DELAYED state. */
2112
2851
  export declare const runRescheduleV1: API.OperationMethod<RunRescheduleV1Request, RunRescheduleV1Response, RunRescheduleV1Error, TriggerDevOpContext>;
2852
+ export type SetWebhookEndpointSecretV1Error = BadRequest | NotFound | TriggerDevOpError;
2853
+ /** Set a webhook signing secret Store the signing secret or public key the provider issued for this endpoint, such as the `whsec_` secret Stripe returns when you create a webhook endpoint. It replaces the existing secret. Pass `previousSecretTtlSeconds` to keep accepting the old secret for a while, for example while the provider rolls its secret. */
2854
+ export declare const setWebhookEndpointSecretV1: API.OperationMethod<SetWebhookEndpointSecretV1Request, SetWebhookEndpointSecretResponse, SetWebhookEndpointSecretV1Error, TriggerDevOpContext>;
2113
2855
  export type TriggerBatchTaskByIdV1Error = BadRequest | NotFound | TriggerDevOpError;
2114
2856
  /** Batch trigger a specific task Batch trigger a specific task with up to 1,000 payloads. All items in the batch run the same task. */
2115
2857
  export declare const triggerBatchTaskByIdV1: API.OperationMethod<TriggerBatchTaskByIdV1Request, BatchTriggerTaskResponse, TriggerBatchTaskByIdV1Error, TriggerDevOpContext>;
@@ -2122,6 +2864,12 @@ export declare const triggerTaskV1: API.OperationMethod<TriggerTaskV1Request, Tr
2122
2864
  export type UnresolveErrorV1Error = NotFound | TriggerDevOpError;
2123
2865
  /** Unresolve an error Move a resolved or ignored error group back to unresolved. */
2124
2866
  export declare const unresolveErrorV1: API.OperationMethod<UnresolveErrorV1Request, ErrorObject, UnresolveErrorV1Error, TriggerDevOpContext>;
2867
+ export type UpdateDashboardV1Error = NotFound | Conflict | TriggerDevOpError;
2868
+ /** Update a dashboard Rename a custom dashboard or change its description. */
2869
+ export declare const updateDashboardV1: API.OperationMethod<UpdateDashboardV1Request, DashboardObject, UpdateDashboardV1Error, TriggerDevOpContext>;
2870
+ export type UpdateDashboardWidgetV1Error = BadRequest | NotFound | Conflict | TriggerDevOpError;
2871
+ /** Update a dashboard widget Change a widget's title, query, display or position. */
2872
+ export declare const updateDashboardWidgetV1: API.OperationMethod<UpdateDashboardWidgetV1Request, DashboardObject, UpdateDashboardWidgetV1Error, TriggerDevOpContext>;
2125
2873
  export type UpdateProjectEnvvarV1Error = BadRequest | NotFound | TriggerDevOpError;
2126
2874
  /** Update environment variable Update a specific environment variable for a specific project and environment. */
2127
2875
  export declare const updateProjectEnvvarV1: API.OperationMethod<UpdateProjectEnvvarV1Request, SucceedResponse, UpdateProjectEnvvarV1Error, TriggerDevOpContext>;