@distilled.cloud/trigger-dev 0.0.0 → 1.0.0-rc.11

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.
Files changed (47) hide show
  1. package/LICENSE +201 -0
  2. package/lib/credentials.d.ts +31 -0
  3. package/lib/credentials.d.ts.map +1 -0
  4. package/lib/credentials.js +37 -0
  5. package/lib/credentials.js.map +1 -0
  6. package/lib/errors.d.ts +36 -0
  7. package/lib/errors.d.ts.map +1 -0
  8. package/lib/errors.js +26 -0
  9. package/lib/errors.js.map +1 -0
  10. package/lib/index.d.ts +24 -0
  11. package/lib/index.d.ts.map +1 -0
  12. package/lib/index.js +28 -0
  13. package/lib/index.js.map +1 -0
  14. package/lib/pagination.d.ts +8 -0
  15. package/lib/pagination.d.ts.map +1 -0
  16. package/lib/pagination.js +8 -0
  17. package/lib/pagination.js.map +1 -0
  18. package/lib/protocol.d.ts +19 -0
  19. package/lib/protocol.d.ts.map +1 -0
  20. package/lib/protocol.js +43 -0
  21. package/lib/protocol.js.map +1 -0
  22. package/lib/retry.d.ts +32 -0
  23. package/lib/retry.d.ts.map +1 -0
  24. package/lib/retry.js +32 -0
  25. package/lib/retry.js.map +1 -0
  26. package/lib/services/index.d.ts +2 -0
  27. package/lib/services/index.d.ts.map +1 -0
  28. package/lib/services/index.js +3 -0
  29. package/lib/services/index.js.map +1 -0
  30. package/lib/services/trigger-dev.d.ts +2355 -0
  31. package/lib/services/trigger-dev.d.ts.map +1 -0
  32. package/lib/services/trigger-dev.js +2140 -0
  33. package/lib/services/trigger-dev.js.map +1 -0
  34. package/lib/traits.d.ts +11 -0
  35. package/lib/traits.d.ts.map +1 -0
  36. package/lib/traits.js +11 -0
  37. package/lib/traits.js.map +1 -0
  38. package/package.json +77 -6
  39. package/src/credentials.ts +61 -0
  40. package/src/errors.ts +50 -0
  41. package/src/index.ts +36 -0
  42. package/src/pagination.ts +7 -0
  43. package/src/protocol.ts +67 -0
  44. package/src/retry.ts +56 -0
  45. package/src/services/index.ts +2 -0
  46. package/src/services/trigger-dev.ts +5629 -0
  47. package/src/traits.ts +44 -0
@@ -0,0 +1,2140 @@
1
+ // AUTO-GENERATED by scripts/generate.ts from .generated-specs (specs/spec-mirror-trigger-dev). Do not edit.
2
+ import * as S from "@distilled.cloud/core/schema";
3
+ import * as API from "@distilled.cloud/core/api";
4
+ import * as C from "@distilled.cloud/core/category";
5
+ import * as T from "../traits.js";
6
+ import { TriggerDevProtocol, } from "../protocol.js";
7
+ import { UnknownTriggerDevError } from "../errors.js";
8
+ import * as Retry from "../retry.js";
9
+ export class BadRequest extends /*@__PURE__*/ /*@__PURE__*/ T.applyErrorMatchers(
10
+ /*@__PURE__*/ S.TaggedError()("BadRequest", {
11
+ code: S.Number,
12
+ message: S.String,
13
+ }).pipe(C.withBadRequestError), [{ status: 400 }]) {
14
+ }
15
+ export class Conflict extends /*@__PURE__*/ /*@__PURE__*/ T.applyErrorMatchers(
16
+ /*@__PURE__*/ S.TaggedError()("Conflict", {
17
+ code: S.Number,
18
+ message: S.String,
19
+ }).pipe(C.withConflictError), [{ status: 409 }]) {
20
+ }
21
+ export class NotFound extends /*@__PURE__*/ /*@__PURE__*/ T.applyErrorMatchers(
22
+ /*@__PURE__*/ S.TaggedError()("NotFound", {
23
+ code: S.Number,
24
+ message: S.String,
25
+ }).pipe(C.withBadRequestError), [{ status: 404 }]) {
26
+ }
27
+ export class UnprocessableEntity extends /*@__PURE__*/ /*@__PURE__*/ T.applyErrorMatchers(
28
+ /*@__PURE__*/ S.TaggedError()("UnprocessableEntity", {
29
+ code: S.Number,
30
+ message: S.String,
31
+ }).pipe(C.withBadRequestError), [{ status: 422 }]) {
32
+ }
33
+ export const ActivateScheduleV1Request = /*@__PURE__*/ S.suspend(() => S.Struct({
34
+ schedule_id: S.String.pipe(T.Label()),
35
+ }).pipe(T.Http({
36
+ method: "POST",
37
+ uri: "/api/v1/schedules/{schedule_id}/activate",
38
+ code: 200,
39
+ }))).annotate({
40
+ identifier: "ActivateScheduleV1Request",
41
+ });
42
+ export const ScheduleObjectGeneratorType = S.String;
43
+ export const ScheduleObjectGenerator = /*@__PURE__*/ S.suspend(() => S.Struct({
44
+ type: S.optional(ScheduleObjectGeneratorType),
45
+ expression: S.optional(S.String),
46
+ description: S.optional(S.String),
47
+ })).annotate({
48
+ identifier: "ScheduleObjectGenerator",
49
+ });
50
+ export const ScheduleEnvironment = /*@__PURE__*/ S.suspend(() => S.Struct({
51
+ id: S.optional(S.String),
52
+ type: S.optional(S.String),
53
+ userName: S.optional(S.String),
54
+ })).annotate({
55
+ identifier: "ScheduleEnvironment",
56
+ });
57
+ export const ScheduleObjectEnvironmentsList = /*@__PURE__*/ S.Array(ScheduleEnvironment);
58
+ export const ScheduleObject = /*@__PURE__*/ S.suspend(() => S.Struct({
59
+ id: S.optional(S.String),
60
+ task: S.optional(S.String),
61
+ type: S.optional(S.String),
62
+ active: S.optional(S.Boolean),
63
+ deduplicationKey: S.optional(S.String),
64
+ externalId: S.optional(S.String),
65
+ generator: S.optional(ScheduleObjectGenerator),
66
+ timezone: S.optional(S.String),
67
+ nextRun: S.optional(S.String),
68
+ environments: S.optional(ScheduleObjectEnvironmentsList),
69
+ })).annotate({ identifier: "ScheduleObject" });
70
+ export const RunTagsCase1List = /*@__PURE__*/ S.Array(S.String);
71
+ export const RunTags = S.Unknown;
72
+ export const AddRunTagsV1Request = /*@__PURE__*/ S.suspend(() => S.Struct({
73
+ runId: S.String.pipe(T.Label()),
74
+ tags: RunTags,
75
+ }).pipe(T.Http({ method: "POST", uri: "/api/v1/runs/{runId}/tags", code: 200 }))).annotate({
76
+ identifier: "AddRunTagsV1Request",
77
+ });
78
+ export const AddRunTagsV1Response = /*@__PURE__*/ S.suspend(() => S.Struct({
79
+ message: S.optional(S.String),
80
+ })).annotate({
81
+ identifier: "AddRunTagsV1Response",
82
+ });
83
+ export const BulkAbortActionV1Request = /*@__PURE__*/ S.suspend(() => S.Struct({
84
+ bulkActionId: S.String.pipe(T.Label()),
85
+ }).pipe(T.Http({
86
+ method: "POST",
87
+ uri: "/api/v1/bulk-actions/{bulkActionId}/abort",
88
+ code: 200,
89
+ }))).annotate({
90
+ identifier: "BulkAbortActionV1Request",
91
+ });
92
+ export const AbortBulkActionResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
93
+ id: S.String,
94
+ })).annotate({
95
+ identifier: "AbortBulkActionResponse",
96
+ });
97
+ export const CancelRunV1Request = /*@__PURE__*/ S.suspend(() => S.Struct({
98
+ runId: S.String.pipe(T.Label()),
99
+ }).pipe(T.Http({ method: "POST", uri: "/api/v2/runs/{runId}/cancel", code: 200 }))).annotate({
100
+ identifier: "CancelRunV1Request",
101
+ });
102
+ export const CancelRunV1Response = /*@__PURE__*/ S.suspend(() => S.Struct({
103
+ id: S.optional(S.String),
104
+ })).annotate({
105
+ identifier: "CancelRunV1Response",
106
+ });
107
+ export const CloseSessionV1Request = /*@__PURE__*/ S.suspend(() => S.Struct({
108
+ session: S.String.pipe(T.Label()),
109
+ reason: S.optional(S.String),
110
+ }).pipe(T.Http({
111
+ method: "POST",
112
+ uri: "/api/v1/sessions/{session}/close",
113
+ code: 200,
114
+ }))).annotate({
115
+ identifier: "CloseSessionV1Request",
116
+ });
117
+ export const SessionTriggerConfigBasePayloadMap = /*@__PURE__*/ S.Record(S.String, S.Unknown);
118
+ export const SessionTriggerConfigTagsList = /*@__PURE__*/ S.Array(S.String);
119
+ export const SessionTriggerConfig = /*@__PURE__*/ S.suspend(() => S.Struct({
120
+ basePayload: SessionTriggerConfigBasePayloadMap,
121
+ machine: S.optional(S.String),
122
+ queue: S.optional(S.String),
123
+ tags: S.optional(SessionTriggerConfigTagsList),
124
+ maxAttempts: S.optional(S.Number),
125
+ maxDuration: S.optional(S.Number),
126
+ lockToVersion: S.optional(S.String),
127
+ region: S.optional(S.String),
128
+ idleTimeoutInSeconds: S.optional(S.Number),
129
+ })).annotate({
130
+ identifier: "SessionTriggerConfig",
131
+ });
132
+ export const SessionObjectTagsList = /*@__PURE__*/ S.Array(S.String);
133
+ export const SessionObjectMetadataMap = /*@__PURE__*/ S.Record(S.String, S.Unknown);
134
+ export const SessionObject = /*@__PURE__*/ S.suspend(() => S.Struct({
135
+ id: S.String,
136
+ externalId: S.optional(S.NullOr(S.String)),
137
+ type: S.String,
138
+ taskIdentifier: S.String,
139
+ triggerConfig: S.optional(SessionTriggerConfig),
140
+ currentRunId: S.optional(S.NullOr(S.String)),
141
+ tags: SessionObjectTagsList,
142
+ metadata: S.optional(S.NullOr(SessionObjectMetadataMap)),
143
+ closedAt: S.optional(S.NullOr(S.String)),
144
+ closedReason: S.optional(S.NullOr(S.String)),
145
+ expiresAt: S.optional(S.NullOr(S.String)),
146
+ createdAt: S.String,
147
+ updatedAt: S.String,
148
+ })).annotate({ identifier: "SessionObject" });
149
+ export const CompleteWaitpointTokenCallbackV1Request = /*@__PURE__*/ S.suspend(() => S.Struct({
150
+ waitpointId: S.String.pipe(T.Label()),
151
+ callbackHash: S.String.pipe(T.Label()),
152
+ }).pipe(T.Http({
153
+ method: "POST",
154
+ uri: "/api/v1/waitpoints/tokens/{waitpointId}/callback/{callbackHash}",
155
+ code: 200,
156
+ }))).annotate({
157
+ identifier: "CompleteWaitpointTokenCallbackV1Request",
158
+ });
159
+ export const CompleteWaitpointTokenResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
160
+ success: S.Boolean,
161
+ })).annotate({
162
+ identifier: "CompleteWaitpointTokenResponse",
163
+ });
164
+ export const CompleteWaitpointTokenV1Request = /*@__PURE__*/ S.suspend(() => S.Struct({
165
+ waitpointId: S.String.pipe(T.Label()),
166
+ data: S.optional(S.Unknown),
167
+ }).pipe(T.Http({
168
+ method: "POST",
169
+ uri: "/api/v1/waitpoints/tokens/{waitpointId}/complete",
170
+ code: 200,
171
+ }))).annotate({
172
+ identifier: "CompleteWaitpointTokenV1Request",
173
+ });
174
+ export const CreateBulkActionRequestBodyCase0Action = S.String;
175
+ export const BulkActionFilterStatusCase0 = S.String;
176
+ export const BulkActionFilterStatusCase1Item = S.String;
177
+ export const BulkActionFilterStatusCase1List = /*@__PURE__*/ S.Array(BulkActionFilterStatusCase1Item);
178
+ export const BulkActionFilterStatus = S.Unknown;
179
+ export const BulkActionFilterTaskIdentifierCase1List = /*@__PURE__*/ S.Array(S.String);
180
+ export const BulkActionFilterTaskIdentifier = S.Unknown;
181
+ export const BulkActionFilterVersionCase1List = /*@__PURE__*/ S.Array(S.String);
182
+ export const BulkActionFilterVersion = S.Unknown;
183
+ export const BulkActionFilterFrom = S.Unknown;
184
+ export const BulkActionFilterTo = S.Unknown;
185
+ export const BulkActionFilterTagCase1List = /*@__PURE__*/ S.Array(S.String);
186
+ export const BulkActionFilterTag = S.Unknown;
187
+ export const QueueTypeNameType = S.String;
188
+ export const QueueTypeName = /*@__PURE__*/ S.suspend(() => S.Struct({
189
+ type: QueueTypeNameType,
190
+ name: S.String,
191
+ })).annotate({ identifier: "QueueTypeName" });
192
+ export const BulkActionFilterQueueCase1List = /*@__PURE__*/ S.Array(QueueTypeName);
193
+ export const BulkActionFilterQueue = S.Unknown;
194
+ export const BulkActionFilterMachineCase1List = /*@__PURE__*/ S.Array(S.String);
195
+ export const BulkActionFilterMachine = S.Unknown;
196
+ export const BulkActionFilterRegionCase1List = /*@__PURE__*/ S.Array(S.String);
197
+ export const BulkActionFilterRegion = S.Unknown;
198
+ export const BulkActionFilter = /*@__PURE__*/ S.suspend(() => S.Struct({
199
+ status: S.optional(BulkActionFilterStatus),
200
+ taskIdentifier: S.optional(BulkActionFilterTaskIdentifier),
201
+ version: S.optional(BulkActionFilterVersion),
202
+ from: S.optional(BulkActionFilterFrom),
203
+ to: S.optional(BulkActionFilterTo),
204
+ period: S.optional(S.String),
205
+ bulkAction: S.optional(S.String),
206
+ tag: S.optional(BulkActionFilterTag),
207
+ schedule: S.optional(S.String),
208
+ isTest: S.optional(S.Boolean),
209
+ batch: S.optional(S.String),
210
+ queue: S.optional(BulkActionFilterQueue),
211
+ machine: S.optional(BulkActionFilterMachine),
212
+ region: S.optional(BulkActionFilterRegion),
213
+ })).annotate({
214
+ identifier: "BulkActionFilter",
215
+ });
216
+ export const CreateBulkActionRequestBodyCase0 = /*@__PURE__*/ S.suspend(() => S.Struct({
217
+ action: CreateBulkActionRequestBodyCase0Action,
218
+ filter: BulkActionFilter,
219
+ name: S.optional(S.String),
220
+ })).annotate({
221
+ identifier: "CreateBulkActionRequestBodyCase0",
222
+ });
223
+ export const CreateBulkActionRequestBodyCase1Action = S.String;
224
+ export const CreateBulkActionRequestBodyCase1RunIdsList = /*@__PURE__*/ S.Array(S.String);
225
+ export const CreateBulkActionRequestBodyCase1 = /*@__PURE__*/ S.suspend(() => S.Struct({
226
+ action: CreateBulkActionRequestBodyCase1Action,
227
+ runIds: CreateBulkActionRequestBodyCase1RunIdsList,
228
+ name: S.optional(S.String),
229
+ })).annotate({
230
+ identifier: "CreateBulkActionRequestBodyCase1",
231
+ });
232
+ export const CreateBulkActionRequestBodyCase2Action = S.String;
233
+ export const CreateBulkActionRequestBodyCase2 = /*@__PURE__*/ S.suspend(() => S.Struct({
234
+ action: CreateBulkActionRequestBodyCase2Action,
235
+ filter: BulkActionFilter,
236
+ name: S.optional(S.String),
237
+ targetRegion: S.optional(S.String),
238
+ })).annotate({
239
+ identifier: "CreateBulkActionRequestBodyCase2",
240
+ });
241
+ export const CreateBulkActionRequestBodyCase3Action = S.String;
242
+ export const CreateBulkActionRequestBodyCase3RunIdsList = /*@__PURE__*/ S.Array(S.String);
243
+ export const CreateBulkActionRequestBodyCase3 = /*@__PURE__*/ S.suspend(() => S.Struct({
244
+ action: CreateBulkActionRequestBodyCase3Action,
245
+ runIds: CreateBulkActionRequestBodyCase3RunIdsList,
246
+ name: S.optional(S.String),
247
+ targetRegion: S.optional(S.String),
248
+ })).annotate({
249
+ identifier: "CreateBulkActionRequestBodyCase3",
250
+ });
251
+ export const CreateBulkActionRequestBody = S.Unknown;
252
+ export const CreateBulkActionV1Request = /*@__PURE__*/ S.suspend(() => S.Struct({
253
+ body: CreateBulkActionRequestBody.pipe(T.HttpBody()),
254
+ }).pipe(T.Http({ method: "POST", uri: "/api/v1/bulk-actions", code: 200 }))).annotate({
255
+ identifier: "CreateBulkActionV1Request",
256
+ });
257
+ export const CreateBulkActionV1Response = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
258
+ identifier: "CreateBulkActionV1Response",
259
+ });
260
+ export const CreateProjectEnvvarV1RequestEnv = S.String;
261
+ export const CreateProjectEnvvarV1Request = /*@__PURE__*/ S.suspend(() => S.Struct({
262
+ projectRef: S.String.pipe(T.Label()),
263
+ env: CreateProjectEnvvarV1RequestEnv.pipe(T.Label()),
264
+ name: S.String,
265
+ value: S.String,
266
+ }).pipe(T.Http({
267
+ method: "POST",
268
+ uri: "/api/v1/projects/{projectRef}/envvars/{env}",
269
+ code: 200,
270
+ }))).annotate({
271
+ identifier: "CreateProjectEnvvarV1Request",
272
+ });
273
+ export const SucceedResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
274
+ success: S.Boolean,
275
+ })).annotate({
276
+ identifier: "SucceedResponse",
277
+ });
278
+ export const CreateScheduleV1Request = /*@__PURE__*/ S.suspend(() => S.Struct({
279
+ task: S.String,
280
+ cron: S.String,
281
+ deduplicationKey: S.String,
282
+ externalId: S.optional(S.String),
283
+ timezone: S.optional(S.String),
284
+ }).pipe(T.Http({ method: "POST", uri: "/api/v1/schedules", code: 200 }))).annotate({
285
+ identifier: "CreateScheduleV1Request",
286
+ });
287
+ export const CreateSessionV1RequestTagsList = /*@__PURE__*/ S.Array(S.String);
288
+ export const CreateSessionV1RequestMetadataMap = /*@__PURE__*/ S.Record(S.String, S.Unknown);
289
+ export const CreateSessionV1Request = /*@__PURE__*/ S.suspend(() => S.Struct({
290
+ type: S.String,
291
+ taskIdentifier: S.String,
292
+ triggerConfig: SessionTriggerConfig,
293
+ externalId: S.optional(S.String),
294
+ tags: S.optional(CreateSessionV1RequestTagsList),
295
+ metadata: S.optional(CreateSessionV1RequestMetadataMap),
296
+ expiresAt: S.optional(S.String),
297
+ }).pipe(T.Http({ method: "POST", uri: "/api/v1/sessions", code: 200 }))).annotate({
298
+ identifier: "CreateSessionV1Request",
299
+ });
300
+ export const CreateSessionV1ResponseTagsList = /*@__PURE__*/ S.Array(S.String);
301
+ export const CreateSessionV1ResponseMetadataMap = /*@__PURE__*/ S.Record(S.String, S.Unknown);
302
+ export const CreateSessionV1Response = /*@__PURE__*/ S.suspend(() => S.Struct({
303
+ id: S.String,
304
+ externalId: S.optional(S.NullOr(S.String)),
305
+ type: S.String,
306
+ taskIdentifier: S.String,
307
+ triggerConfig: S.optional(SessionTriggerConfig),
308
+ currentRunId: S.optional(S.NullOr(S.String)),
309
+ tags: CreateSessionV1ResponseTagsList,
310
+ metadata: S.optional(S.NullOr(CreateSessionV1ResponseMetadataMap)),
311
+ closedAt: S.optional(S.NullOr(S.String)),
312
+ closedReason: S.optional(S.NullOr(S.String)),
313
+ expiresAt: S.optional(S.NullOr(S.String)),
314
+ createdAt: S.String,
315
+ updatedAt: S.String,
316
+ runId: S.String,
317
+ publicAccessToken: S.String,
318
+ isCached: S.Boolean,
319
+ })).annotate({
320
+ identifier: "CreateSessionV1Response",
321
+ });
322
+ export const CreateWaitpointTokenV1RequestTagsCase1List = /*@__PURE__*/ S.Array(S.String);
323
+ export const CreateWaitpointTokenV1RequestTags = S.Unknown;
324
+ export const CreateWaitpointTokenV1Request = /*@__PURE__*/ S.suspend(() => S.Struct({
325
+ idempotencyKey: S.optional(S.String),
326
+ idempotencyKeyTTL: S.optional(S.String),
327
+ timeout: S.optional(S.String),
328
+ tags: S.optional(CreateWaitpointTokenV1RequestTags),
329
+ }).pipe(T.Http({ method: "POST", uri: "/api/v1/waitpoints/tokens", code: 200 }))).annotate({
330
+ identifier: "CreateWaitpointTokenV1Request",
331
+ });
332
+ export const CreateWaitpointTokenResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
333
+ id: S.String,
334
+ isCached: S.Boolean,
335
+ url: S.String,
336
+ })).annotate({
337
+ identifier: "CreateWaitpointTokenResponse",
338
+ });
339
+ export const DeactivateScheduleV1Request = /*@__PURE__*/ S.suspend(() => S.Struct({
340
+ schedule_id: S.String.pipe(T.Label()),
341
+ }).pipe(T.Http({
342
+ method: "POST",
343
+ uri: "/api/v1/schedules/{schedule_id}/deactivate",
344
+ code: 200,
345
+ }))).annotate({
346
+ identifier: "DeactivateScheduleV1Request",
347
+ });
348
+ export const DeleteProjectEnvvarV1RequestEnv = S.String;
349
+ export const DeleteProjectEnvvarV1Request = /*@__PURE__*/ S.suspend(() => S.Struct({
350
+ projectRef: S.String.pipe(T.Label()),
351
+ env: DeleteProjectEnvvarV1RequestEnv.pipe(T.Label()),
352
+ name: S.String.pipe(T.Label()),
353
+ }).pipe(T.Http({
354
+ method: "DELETE",
355
+ uri: "/api/v1/projects/{projectRef}/envvars/{env}/{name}",
356
+ code: 200,
357
+ }))).annotate({
358
+ identifier: "DeleteProjectEnvvarV1Request",
359
+ });
360
+ export const DeleteScheduleV1Request = /*@__PURE__*/ S.suspend(() => S.Struct({
361
+ schedule_id: S.String.pipe(T.Label()),
362
+ }).pipe(T.Http({
363
+ method: "DELETE",
364
+ uri: "/api/v1/schedules/{schedule_id}",
365
+ code: 200,
366
+ }))).annotate({
367
+ identifier: "DeleteScheduleV1Request",
368
+ });
369
+ export const DeleteScheduleV1Response = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
370
+ identifier: "DeleteScheduleV1Response",
371
+ });
372
+ export const ExecuteQueryV1RequestScope = S.String;
373
+ export const ExecuteQueryV1RequestFormat = S.String;
374
+ export const ExecuteQueryV1Request = /*@__PURE__*/ S.suspend(() => S.Struct({
375
+ query: S.String,
376
+ scope: S.optional(ExecuteQueryV1RequestScope),
377
+ period: S.optional(S.NullOr(S.String)),
378
+ from: S.optional(S.NullOr(S.String)),
379
+ to: S.optional(S.NullOr(S.String)),
380
+ format: S.optional(ExecuteQueryV1RequestFormat),
381
+ }).pipe(T.Http({ method: "POST", uri: "/api/v1/query", code: 200 }))).annotate({
382
+ identifier: "ExecuteQueryV1Request",
383
+ });
384
+ export const ExecuteQueryResponseCase0Format = S.String;
385
+ export const ExecuteQueryResponseCase0ResultsList = /*@__PURE__*/ S.Array(S.Unknown);
386
+ export const ExecuteQueryResponseCase0 = /*@__PURE__*/ S.suspend(() => S.Struct({
387
+ format: S.optional(ExecuteQueryResponseCase0Format),
388
+ results: S.optional(ExecuteQueryResponseCase0ResultsList),
389
+ })).annotate({
390
+ identifier: "ExecuteQueryResponseCase0",
391
+ });
392
+ export const ExecuteQueryResponseCase1Format = S.String;
393
+ export const ExecuteQueryResponseCase1 = /*@__PURE__*/ S.suspend(() => S.Struct({
394
+ format: S.optional(ExecuteQueryResponseCase1Format),
395
+ results: S.optional(S.String),
396
+ })).annotate({
397
+ identifier: "ExecuteQueryResponseCase1",
398
+ });
399
+ export const ExecuteQueryResponse = S.Unknown;
400
+ export const ExecuteQueryV1Response = /*@__PURE__*/ S.suspend(() => ExecuteQueryResponse.pipe(T.RawResponseRoot())).annotate({
401
+ identifier: "ExecuteQueryV1Response",
402
+ });
403
+ export const GetBatchResultsV1Request = /*@__PURE__*/ S.suspend(() => S.Struct({
404
+ batchId: S.String.pipe(T.Label()),
405
+ }).pipe(T.Http({
406
+ method: "GET",
407
+ uri: "/api/v1/batches/{batchId}/results",
408
+ code: 200,
409
+ }))).annotate({
410
+ identifier: "GetBatchResultsV1Request",
411
+ });
412
+ export const GetBatchResultsV1ResponseItemsItemUsage = /*@__PURE__*/ S.suspend(() => S.Struct({
413
+ durationMs: S.optional(S.Number),
414
+ })).annotate({
415
+ identifier: "GetBatchResultsV1ResponseItemsItemUsage",
416
+ });
417
+ export const GetBatchResultsV1ResponseItemsItem = /*@__PURE__*/ S.suspend(() => S.Struct({
418
+ ok: S.Boolean,
419
+ id: S.String,
420
+ output: S.optional(S.String),
421
+ outputType: S.optional(S.String),
422
+ error: S.optional(S.Unknown),
423
+ usage: S.optional(GetBatchResultsV1ResponseItemsItemUsage),
424
+ taskIdentifier: S.optional(S.String),
425
+ })).annotate({
426
+ identifier: "GetBatchResultsV1ResponseItemsItem",
427
+ });
428
+ export const GetBatchResultsV1ResponseItemsList = /*@__PURE__*/ S.Array(GetBatchResultsV1ResponseItemsItem);
429
+ export const GetBatchResultsV1Response = /*@__PURE__*/ S.suspend(() => S.Struct({
430
+ id: S.optional(S.String),
431
+ items: S.optional(GetBatchResultsV1ResponseItemsList),
432
+ })).annotate({
433
+ identifier: "GetBatchResultsV1Response",
434
+ });
435
+ export const GetBatchV1Request = /*@__PURE__*/ S.suspend(() => S.Struct({
436
+ batchId: S.String.pipe(T.Label()),
437
+ }).pipe(T.Http({ method: "GET", uri: "/api/v1/batches/{batchId}", code: 200 }))).annotate({
438
+ identifier: "GetBatchV1Request",
439
+ });
440
+ export const GetBatchV1ResponseStatus = S.String;
441
+ export const GetBatchV1ResponseRunsList = /*@__PURE__*/ S.Array(S.String);
442
+ export const GetBatchV1ResponseErrorsItem = /*@__PURE__*/ S.suspend(() => S.Struct({
443
+ index: S.optional(S.Number),
444
+ taskIdentifier: S.optional(S.String),
445
+ error: S.optional(S.Unknown),
446
+ errorCode: S.optional(S.NullOr(S.String)),
447
+ })).annotate({
448
+ identifier: "GetBatchV1ResponseErrorsItem",
449
+ });
450
+ export const GetBatchV1ResponseErrorsList = /*@__PURE__*/ S.Array(GetBatchV1ResponseErrorsItem);
451
+ export const GetBatchV1Response = /*@__PURE__*/ S.suspend(() => S.Struct({
452
+ id: S.optional(S.String),
453
+ status: S.optional(GetBatchV1ResponseStatus),
454
+ idempotencyKey: S.optional(S.NullOr(S.String)),
455
+ createdAt: S.optional(S.String),
456
+ updatedAt: S.optional(S.String),
457
+ runCount: S.optional(S.Number),
458
+ runs: S.optional(GetBatchV1ResponseRunsList),
459
+ successfulRunCount: S.optional(S.NullOr(S.Number)),
460
+ failedRunCount: S.optional(S.NullOr(S.Number)),
461
+ errors: S.optional(S.NullOr(GetBatchV1ResponseErrorsList)),
462
+ })).annotate({
463
+ identifier: "GetBatchV1Response",
464
+ });
465
+ export const GetBulkActionV1Request = /*@__PURE__*/ S.suspend(() => S.Struct({
466
+ bulkActionId: S.String.pipe(T.Label()),
467
+ }).pipe(T.Http({
468
+ method: "GET",
469
+ uri: "/api/v1/bulk-actions/{bulkActionId}",
470
+ code: 200,
471
+ }))).annotate({
472
+ identifier: "GetBulkActionV1Request",
473
+ });
474
+ export const BulkActionObjectType = S.String;
475
+ export const BulkActionObjectStatus = S.String;
476
+ export const BulkActionObjectCounts = /*@__PURE__*/ S.suspend(() => S.Struct({
477
+ total: S.Number,
478
+ success: S.Number,
479
+ failure: S.Number,
480
+ })).annotate({
481
+ identifier: "BulkActionObjectCounts",
482
+ });
483
+ export const BulkActionObject = /*@__PURE__*/ S.suspend(() => S.Struct({
484
+ id: S.String,
485
+ name: S.optional(S.String),
486
+ type: BulkActionObjectType,
487
+ status: BulkActionObjectStatus,
488
+ counts: BulkActionObjectCounts,
489
+ createdAt: S.String,
490
+ completedAt: S.optional(S.String),
491
+ })).annotate({
492
+ identifier: "BulkActionObject",
493
+ });
494
+ export const GetDeploymentV1Request = /*@__PURE__*/ S.suspend(() => S.Struct({
495
+ deploymentId: S.String.pipe(T.Label()),
496
+ }).pipe(T.Http({
497
+ method: "GET",
498
+ uri: "/api/v1/deployments/{deploymentId}",
499
+ code: 200,
500
+ }))).annotate({
501
+ identifier: "GetDeploymentV1Request",
502
+ });
503
+ export const GetDeploymentV1ResponseStatus = S.String;
504
+ export const GetDeploymentV1ResponseWorkerTasksItem = /*@__PURE__*/ S.suspend(() => S.Struct({
505
+ id: S.optional(S.String),
506
+ slug: S.optional(S.String),
507
+ filePath: S.optional(S.String),
508
+ exportName: S.optional(S.String),
509
+ })).annotate({
510
+ identifier: "GetDeploymentV1ResponseWorkerTasksItem",
511
+ });
512
+ export const GetDeploymentV1ResponseWorkerTasksList = /*@__PURE__*/ S.Array(GetDeploymentV1ResponseWorkerTasksItem);
513
+ export const GetDeploymentV1ResponseWorker = /*@__PURE__*/ S.suspend(() => S.Struct({
514
+ id: S.optional(S.String),
515
+ version: S.optional(S.String),
516
+ tasks: S.optional(GetDeploymentV1ResponseWorkerTasksList),
517
+ })).annotate({
518
+ identifier: "GetDeploymentV1ResponseWorker",
519
+ });
520
+ export const GetDeploymentV1Response = /*@__PURE__*/ S.suspend(() => S.Struct({
521
+ id: S.optional(S.String),
522
+ status: S.optional(GetDeploymentV1ResponseStatus),
523
+ contentHash: S.optional(S.String),
524
+ shortCode: S.optional(S.String),
525
+ version: S.optional(S.String),
526
+ imageReference: S.optional(S.NullOr(S.String)),
527
+ imagePlatform: S.optional(S.String),
528
+ externalBuildData: S.optional(S.NullOr(S.Unknown)),
529
+ errorData: S.optional(S.NullOr(S.Unknown)),
530
+ worker: S.optional(S.NullOr(GetDeploymentV1ResponseWorker)),
531
+ })).annotate({
532
+ identifier: "GetDeploymentV1Response",
533
+ });
534
+ export const GetErrorV1Request = /*@__PURE__*/ S.suspend(() => S.Struct({
535
+ errorId: S.String.pipe(T.Label()),
536
+ }).pipe(T.Http({ method: "GET", uri: "/api/v1/errors/{errorId}", code: 200 }))).annotate({
537
+ identifier: "GetErrorV1Request",
538
+ });
539
+ export const ErrorObjectAffectedVersionsList = /*@__PURE__*/ S.Array(S.String);
540
+ export const ErrorObjectStatus = S.String;
541
+ export const ErrorObject = /*@__PURE__*/ S.suspend(() => S.Struct({
542
+ id: S.String,
543
+ fingerprint: S.String,
544
+ taskIdentifier: S.String,
545
+ errorType: S.String,
546
+ errorMessage: S.String,
547
+ count: S.Number,
548
+ firstSeen: S.String,
549
+ lastSeen: S.String,
550
+ affectedVersions: ErrorObjectAffectedVersionsList,
551
+ status: ErrorObjectStatus,
552
+ resolvedAt: S.optional(S.NullOr(S.String)),
553
+ resolvedInVersion: S.optional(S.NullOr(S.String)),
554
+ resolvedBy: S.optional(S.NullOr(S.String)),
555
+ ignoredAt: S.optional(S.NullOr(S.String)),
556
+ ignoredUntil: S.optional(S.NullOr(S.String)),
557
+ ignoredReason: S.optional(S.NullOr(S.String)),
558
+ ignoredByUserId: S.optional(S.NullOr(S.String)),
559
+ ignoredUntilOccurrenceRate: S.optional(S.NullOr(S.Number)),
560
+ ignoredUntilTotalOccurrences: S.optional(S.NullOr(S.Number)),
561
+ })).annotate({ identifier: "ErrorObject" });
562
+ export const GetLatestDeploymentV1Request = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.Http({ method: "GET", uri: "/api/v1/deployments/latest", code: 200 }))).annotate({
563
+ identifier: "GetLatestDeploymentV1Request",
564
+ });
565
+ export const GetLatestDeploymentV1ResponseStatus = S.String;
566
+ export const GetLatestDeploymentV1Response = /*@__PURE__*/ S.suspend(() => S.Struct({
567
+ id: S.optional(S.String),
568
+ status: S.optional(GetLatestDeploymentV1ResponseStatus),
569
+ contentHash: S.optional(S.String),
570
+ shortCode: S.optional(S.String),
571
+ version: S.optional(S.String),
572
+ imageReference: S.optional(S.NullOr(S.String)),
573
+ errorData: S.optional(S.NullOr(S.Unknown)),
574
+ })).annotate({
575
+ identifier: "GetLatestDeploymentV1Response",
576
+ });
577
+ export const GetProjectEnvvarV1RequestEnv = S.String;
578
+ export const GetProjectEnvvarV1Request = /*@__PURE__*/ S.suspend(() => S.Struct({
579
+ projectRef: S.String.pipe(T.Label()),
580
+ env: GetProjectEnvvarV1RequestEnv.pipe(T.Label()),
581
+ name: S.String.pipe(T.Label()),
582
+ }).pipe(T.Http({
583
+ method: "GET",
584
+ uri: "/api/v1/projects/{projectRef}/envvars/{env}/{name}",
585
+ code: 200,
586
+ }))).annotate({
587
+ identifier: "GetProjectEnvvarV1Request",
588
+ });
589
+ export const EnvVarValue = /*@__PURE__*/ S.suspend(() => S.Struct({
590
+ value: S.String,
591
+ })).annotate({ identifier: "EnvVarValue" });
592
+ export const GetQuerySchemaV1Request = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.Http({ method: "GET", uri: "/api/v1/query/schema", code: 200 }))).annotate({
593
+ identifier: "GetQuerySchemaV1Request",
594
+ });
595
+ export const GetQuerySchemaV1ResponseTablesItemColumnsItemAllowedValuesList =
596
+ /*@__PURE__*/ S.Array(S.String);
597
+ export const GetQuerySchemaV1ResponseTablesItemColumnsItem =
598
+ /*@__PURE__*/ S.suspend(() => S.Struct({
599
+ name: S.optional(S.String),
600
+ type: S.optional(S.String),
601
+ description: S.optional(S.String),
602
+ example: S.optional(S.String),
603
+ allowedValues: S.optional(GetQuerySchemaV1ResponseTablesItemColumnsItemAllowedValuesList),
604
+ coreColumn: S.optional(S.Boolean),
605
+ })).annotate({
606
+ identifier: "GetQuerySchemaV1ResponseTablesItemColumnsItem",
607
+ });
608
+ export const GetQuerySchemaV1ResponseTablesItemColumnsList =
609
+ /*@__PURE__*/ S.Array(GetQuerySchemaV1ResponseTablesItemColumnsItem);
610
+ export const GetQuerySchemaV1ResponseTablesItem = /*@__PURE__*/ S.suspend(() => S.Struct({
611
+ name: S.optional(S.String),
612
+ description: S.optional(S.String),
613
+ timeColumn: S.optional(S.String),
614
+ columns: S.optional(GetQuerySchemaV1ResponseTablesItemColumnsList),
615
+ })).annotate({
616
+ identifier: "GetQuerySchemaV1ResponseTablesItem",
617
+ });
618
+ export const GetQuerySchemaV1ResponseTablesList = /*@__PURE__*/ S.Array(GetQuerySchemaV1ResponseTablesItem);
619
+ export const GetQuerySchemaV1Response = /*@__PURE__*/ S.suspend(() => S.Struct({
620
+ tables: S.optional(GetQuerySchemaV1ResponseTablesList),
621
+ })).annotate({
622
+ identifier: "GetQuerySchemaV1Response",
623
+ });
624
+ export const GetQueueV1RequestType = S.String;
625
+ export const GetQueueV1Request = /*@__PURE__*/ S.suspend(() => S.Struct({
626
+ queueParam: S.String.pipe(T.Label()),
627
+ type: S.optional(GetQueueV1RequestType.pipe(T.Query())),
628
+ }).pipe(T.Http({ method: "GET", uri: "/api/v1/queues/{queueParam}", code: 200 }))).annotate({
629
+ identifier: "GetQueueV1Request",
630
+ });
631
+ export const QueueObjectType = S.String;
632
+ export const QueueObjectConcurrency = /*@__PURE__*/ S.suspend(() => S.Struct({
633
+ current: S.optional(S.NullOr(S.Number)),
634
+ base: S.optional(S.NullOr(S.Number)),
635
+ override: S.optional(S.NullOr(S.Number)),
636
+ overriddenAt: S.optional(S.NullOr(S.String)),
637
+ overriddenBy: S.optional(S.NullOr(S.String)),
638
+ })).annotate({
639
+ identifier: "QueueObjectConcurrency",
640
+ });
641
+ export const QueueObject = /*@__PURE__*/ S.suspend(() => S.Struct({
642
+ id: S.String,
643
+ name: S.String,
644
+ type: QueueObjectType,
645
+ running: S.Number,
646
+ queued: S.Number,
647
+ paused: S.Boolean,
648
+ concurrencyLimit: S.optional(S.NullOr(S.Number)),
649
+ concurrency: S.optional(QueueObjectConcurrency),
650
+ })).annotate({ identifier: "QueueObject" });
651
+ export const GetRunEventsV1Request = /*@__PURE__*/ S.suspend(() => S.Struct({
652
+ runId: S.String.pipe(T.Label()),
653
+ }).pipe(T.Http({ method: "GET", uri: "/api/v1/runs/{runId}/events", code: 200 }))).annotate({
654
+ identifier: "GetRunEventsV1Request",
655
+ });
656
+ export const GetRunEventsV1ResponseEventsItemLevel = S.String;
657
+ export const GetRunEventsV1ResponseEventsItemKind = S.String;
658
+ export const GetRunEventsV1ResponseEventsItemEventsItem =
659
+ /*@__PURE__*/ S.suspend(() => S.Struct({
660
+ name: S.optional(S.String),
661
+ time: S.optional(S.String),
662
+ properties: S.optional(S.Unknown),
663
+ })).annotate({
664
+ identifier: "GetRunEventsV1ResponseEventsItemEventsItem",
665
+ });
666
+ export const GetRunEventsV1ResponseEventsItemEventsList = /*@__PURE__*/ S.Array(GetRunEventsV1ResponseEventsItemEventsItem);
667
+ export const GetRunEventsV1ResponseEventsItemStyleAccessoryStyle = S.String;
668
+ export const GetRunEventsV1ResponseEventsItemStyleAccessory =
669
+ /*@__PURE__*/ S.suspend(() => S.Struct({
670
+ text: S.optional(S.String),
671
+ style: S.optional(GetRunEventsV1ResponseEventsItemStyleAccessoryStyle),
672
+ })).annotate({
673
+ identifier: "GetRunEventsV1ResponseEventsItemStyleAccessory",
674
+ });
675
+ export const GetRunEventsV1ResponseEventsItemStyle = /*@__PURE__*/ S.suspend(() => S.Struct({
676
+ icon: S.optional(S.String),
677
+ variant: S.optional(S.String),
678
+ accessory: S.optional(GetRunEventsV1ResponseEventsItemStyleAccessory),
679
+ })).annotate({
680
+ identifier: "GetRunEventsV1ResponseEventsItemStyle",
681
+ });
682
+ export const GetRunEventsV1ResponseEventsItem = /*@__PURE__*/ S.suspend(() => S.Struct({
683
+ spanId: S.optional(S.String),
684
+ parentId: S.optional(S.NullOr(S.String)),
685
+ runId: S.optional(S.NullOr(S.String)),
686
+ message: S.optional(S.String),
687
+ startTime: S.optional(S.String),
688
+ duration: S.optional(S.Number),
689
+ isError: S.optional(S.Boolean),
690
+ isPartial: S.optional(S.Boolean),
691
+ isCancelled: S.optional(S.Boolean),
692
+ level: S.optional(GetRunEventsV1ResponseEventsItemLevel),
693
+ kind: S.optional(GetRunEventsV1ResponseEventsItemKind),
694
+ attemptNumber: S.optional(S.NullOr(S.Number)),
695
+ taskSlug: S.optional(S.String),
696
+ events: S.optional(GetRunEventsV1ResponseEventsItemEventsList),
697
+ style: S.optional(GetRunEventsV1ResponseEventsItemStyle),
698
+ })).annotate({
699
+ identifier: "GetRunEventsV1ResponseEventsItem",
700
+ });
701
+ export const GetRunEventsV1ResponseEventsList = /*@__PURE__*/ S.Array(GetRunEventsV1ResponseEventsItem);
702
+ export const GetRunEventsV1Response = /*@__PURE__*/ S.suspend(() => S.Struct({
703
+ events: S.optional(GetRunEventsV1ResponseEventsList),
704
+ })).annotate({
705
+ identifier: "GetRunEventsV1Response",
706
+ });
707
+ export const GetRunResultV1Request = /*@__PURE__*/ S.suspend(() => S.Struct({
708
+ runId: S.String.pipe(T.Label()),
709
+ }).pipe(T.Http({ method: "GET", uri: "/api/v1/runs/{runId}/result", code: 200 }))).annotate({
710
+ identifier: "GetRunResultV1Request",
711
+ });
712
+ export const GetRunResultV1ResponseUsage = GetBatchResultsV1ResponseItemsItemUsage;
713
+ export const GetRunResultV1Response = /*@__PURE__*/ S.suspend(() => S.Struct({
714
+ ok: S.Boolean,
715
+ id: S.String,
716
+ output: S.optional(S.String),
717
+ outputType: S.optional(S.String),
718
+ error: S.optional(S.Unknown),
719
+ usage: S.optional(GetBatchResultsV1ResponseItemsItemUsage),
720
+ taskIdentifier: S.optional(S.String),
721
+ })).annotate({
722
+ identifier: "GetRunResultV1Response",
723
+ });
724
+ export const GetRunTraceV1Request = /*@__PURE__*/ S.suspend(() => S.Struct({
725
+ runId: S.String.pipe(T.Label()),
726
+ }).pipe(T.Http({ method: "GET", uri: "/api/v1/runs/{runId}/trace", code: 200 }))).annotate({
727
+ identifier: "GetRunTraceV1Request",
728
+ });
729
+ export const SpanDetailedSummaryDataLevel = S.String;
730
+ export const SpanDetailedSummaryDataEventsItem = GetRunEventsV1ResponseEventsItemEventsItem;
731
+ export const SpanDetailedSummaryDataEventsList = /*@__PURE__*/ S.Array(GetRunEventsV1ResponseEventsItemEventsItem);
732
+ export const SpanDetailedSummaryData = /*@__PURE__*/ S.suspend(() => S.Struct({
733
+ message: S.optional(S.String),
734
+ taskSlug: S.optional(S.String),
735
+ startTime: S.optional(S.String),
736
+ duration: S.optional(S.Number),
737
+ isError: S.optional(S.Boolean),
738
+ isPartial: S.optional(S.Boolean),
739
+ isCancelled: S.optional(S.Boolean),
740
+ level: S.optional(SpanDetailedSummaryDataLevel),
741
+ attemptNumber: S.optional(S.NullOr(S.Number)),
742
+ properties: S.optional(S.Unknown),
743
+ events: S.optional(SpanDetailedSummaryDataEventsList),
744
+ })).annotate({
745
+ identifier: "SpanDetailedSummaryData",
746
+ });
747
+ export const SpanDetailedSummaryChildrenList = /*@__PURE__*/ S.Array(S.suspend(() => SpanDetailedSummary));
748
+ export const SpanDetailedSummary = /*@__PURE__*/ S.suspend(() => S.Struct({
749
+ id: S.optional(S.String),
750
+ parentId: S.optional(S.NullOr(S.String)),
751
+ runId: S.optional(S.String),
752
+ data: S.optional(SpanDetailedSummaryData),
753
+ children: S.optional(SpanDetailedSummaryChildrenList),
754
+ })).annotate({
755
+ identifier: "SpanDetailedSummary",
756
+ });
757
+ export const GetRunTraceV1ResponseTrace = /*@__PURE__*/ S.suspend(() => S.Struct({
758
+ traceId: S.optional(S.String),
759
+ rootSpan: S.optional(SpanDetailedSummary),
760
+ })).annotate({
761
+ identifier: "GetRunTraceV1ResponseTrace",
762
+ });
763
+ export const GetRunTraceV1Response = /*@__PURE__*/ S.suspend(() => S.Struct({
764
+ trace: S.optional(GetRunTraceV1ResponseTrace),
765
+ })).annotate({
766
+ identifier: "GetRunTraceV1Response",
767
+ });
768
+ export const GetRunV1Request = /*@__PURE__*/ S.suspend(() => S.Struct({
769
+ runId: S.String.pipe(T.Label()),
770
+ }).pipe(T.Http({ method: "GET", uri: "/api/v3/runs/{runId}", code: 200 }))).annotate({
771
+ identifier: "GetRunV1Request",
772
+ });
773
+ export const GetRunV1ResponseStatus = S.String;
774
+ export const GetRunV1ResponseTagsList = /*@__PURE__*/ S.Array(S.String);
775
+ export const GetRunV1ResponseTriggerFunction = S.String;
776
+ export const CommonRunObjectStatus = S.String;
777
+ export const CommonRunObjectTagsList = /*@__PURE__*/ S.Array(S.String);
778
+ export const CommonRunObjectTriggerFunction = S.String;
779
+ export const CommonRunObject = /*@__PURE__*/ S.suspend(() => S.Struct({
780
+ id: S.String,
781
+ status: CommonRunObjectStatus,
782
+ taskIdentifier: S.String,
783
+ version: S.optional(S.String),
784
+ idempotencyKey: S.optional(S.String),
785
+ createdAt: S.String,
786
+ updatedAt: S.String,
787
+ isTest: S.optional(S.Boolean),
788
+ startedAt: S.optional(S.String),
789
+ finishedAt: S.optional(S.String),
790
+ delayedUntil: S.optional(S.String),
791
+ ttl: S.optional(S.Unknown),
792
+ expiredAt: S.optional(S.String),
793
+ tags: S.optional(CommonRunObjectTagsList),
794
+ metadata: S.optional(S.Unknown),
795
+ costInCents: S.optional(S.Number),
796
+ baseCostInCents: S.optional(S.Number),
797
+ durationMs: S.optional(S.Number),
798
+ depth: S.optional(S.Number),
799
+ batchId: S.optional(S.String),
800
+ triggerFunction: S.optional(CommonRunObjectTriggerFunction),
801
+ })).annotate({
802
+ identifier: "CommonRunObject",
803
+ });
804
+ export const GetRunV1ResponseRelatedRunsChildrenList = /*@__PURE__*/ S.Array(CommonRunObject);
805
+ export const GetRunV1ResponseRelatedRuns = /*@__PURE__*/ S.suspend(() => S.Struct({
806
+ root: S.optional(CommonRunObject),
807
+ parent: S.optional(CommonRunObject),
808
+ children: S.optional(GetRunV1ResponseRelatedRunsChildrenList),
809
+ })).annotate({
810
+ identifier: "GetRunV1ResponseRelatedRuns",
811
+ });
812
+ export const GetRunV1ResponseScheduleGeneratorType = S.String;
813
+ export const GetRunV1ResponseScheduleGenerator = /*@__PURE__*/ S.suspend(() => S.Struct({
814
+ type: S.optional(GetRunV1ResponseScheduleGeneratorType),
815
+ expression: S.optional(S.String),
816
+ description: S.optional(S.String),
817
+ })).annotate({
818
+ identifier: "GetRunV1ResponseScheduleGenerator",
819
+ });
820
+ export const GetRunV1ResponseSchedule = /*@__PURE__*/ S.suspend(() => S.Struct({
821
+ id: S.String,
822
+ externalId: S.optional(S.String),
823
+ deduplicationKey: S.optional(S.String),
824
+ generator: GetRunV1ResponseScheduleGenerator,
825
+ })).annotate({
826
+ identifier: "GetRunV1ResponseSchedule",
827
+ });
828
+ export const GetRunV1ResponseAttemptsItemStatus = S.String;
829
+ export const SerializedError = /*@__PURE__*/ S.suspend(() => S.Struct({
830
+ message: S.String,
831
+ name: S.optional(S.String),
832
+ stackTrace: S.optional(S.String),
833
+ })).annotate({
834
+ identifier: "SerializedError",
835
+ });
836
+ export const GetRunV1ResponseAttemptsItem = /*@__PURE__*/ S.suspend(() => S.Struct({
837
+ id: S.String,
838
+ status: GetRunV1ResponseAttemptsItemStatus,
839
+ error: S.optional(SerializedError),
840
+ createdAt: S.String,
841
+ updatedAt: S.String,
842
+ startedAt: S.optional(S.String),
843
+ completedAt: S.optional(S.String),
844
+ })).annotate({
845
+ identifier: "GetRunV1ResponseAttemptsItem",
846
+ });
847
+ export const GetRunV1ResponseAttemptsList = /*@__PURE__*/ S.Array(GetRunV1ResponseAttemptsItem);
848
+ export const GetRunV1Response = /*@__PURE__*/ S.suspend(() => S.Struct({
849
+ id: S.String,
850
+ status: GetRunV1ResponseStatus,
851
+ taskIdentifier: S.String,
852
+ version: S.optional(S.String),
853
+ idempotencyKey: S.optional(S.String),
854
+ createdAt: S.String,
855
+ updatedAt: S.String,
856
+ isTest: S.optional(S.Boolean),
857
+ startedAt: S.optional(S.String),
858
+ finishedAt: S.optional(S.String),
859
+ delayedUntil: S.optional(S.String),
860
+ ttl: S.optional(S.Unknown),
861
+ expiredAt: S.optional(S.String),
862
+ tags: S.optional(GetRunV1ResponseTagsList),
863
+ metadata: S.optional(S.Unknown),
864
+ costInCents: S.optional(S.Number),
865
+ baseCostInCents: S.optional(S.Number),
866
+ durationMs: S.optional(S.Number),
867
+ depth: S.optional(S.Number),
868
+ batchId: S.optional(S.String),
869
+ triggerFunction: S.optional(GetRunV1ResponseTriggerFunction),
870
+ payload: S.optional(S.Unknown),
871
+ payloadPresignedUrl: S.optional(S.String),
872
+ output: S.optional(S.Unknown),
873
+ outputPresignedUrl: S.optional(S.String),
874
+ relatedRuns: S.optional(GetRunV1ResponseRelatedRuns),
875
+ schedule: S.optional(GetRunV1ResponseSchedule),
876
+ attempts: GetRunV1ResponseAttemptsList,
877
+ })).annotate({
878
+ identifier: "GetRunV1Response",
879
+ });
880
+ export const GetScheduleV1Request = /*@__PURE__*/ S.suspend(() => S.Struct({
881
+ schedule_id: S.String.pipe(T.Label()),
882
+ }).pipe(T.Http({
883
+ method: "GET",
884
+ uri: "/api/v1/schedules/{schedule_id}",
885
+ code: 200,
886
+ }))).annotate({
887
+ identifier: "GetScheduleV1Request",
888
+ });
889
+ export const GetSessionV1Request = /*@__PURE__*/ S.suspend(() => S.Struct({
890
+ session: S.String.pipe(T.Label()),
891
+ }).pipe(T.Http({ method: "GET", uri: "/api/v1/sessions/{session}", code: 200 }))).annotate({
892
+ identifier: "GetSessionV1Request",
893
+ });
894
+ export const GetTimezonesV1Request = /*@__PURE__*/ S.suspend(() => S.Struct({
895
+ excludeUtc: S.optional(S.Boolean.pipe(T.Query())),
896
+ }).pipe(T.Http({ method: "GET", uri: "/api/v1/timezones", code: 200 }))).annotate({
897
+ identifier: "GetTimezonesV1Request",
898
+ });
899
+ export const GetTimezonesResultTimezonesList = /*@__PURE__*/ S.Array(S.String);
900
+ export const GetTimezonesResult = /*@__PURE__*/ S.suspend(() => S.Struct({
901
+ timezones: S.optional(GetTimezonesResultTimezonesList),
902
+ })).annotate({
903
+ identifier: "GetTimezonesResult",
904
+ });
905
+ export const GetWaitpointTokenV1Request = /*@__PURE__*/ S.suspend(() => S.Struct({
906
+ waitpointId: S.String.pipe(T.Label()),
907
+ }).pipe(T.Http({
908
+ method: "GET",
909
+ uri: "/api/v1/waitpoints/tokens/{waitpointId}",
910
+ code: 200,
911
+ }))).annotate({
912
+ identifier: "GetWaitpointTokenV1Request",
913
+ });
914
+ export const WaitpointTokenObjectStatus = S.String;
915
+ export const WaitpointTokenObjectTagsList = /*@__PURE__*/ S.Array(S.String);
916
+ export const WaitpointTokenObject = /*@__PURE__*/ S.suspend(() => S.Struct({
917
+ id: S.String,
918
+ url: S.String,
919
+ status: WaitpointTokenObjectStatus,
920
+ idempotencyKey: S.optional(S.NullOr(S.String)),
921
+ idempotencyKeyExpiresAt: S.optional(S.NullOr(S.String)),
922
+ timeoutAt: S.optional(S.NullOr(S.String)),
923
+ completedAt: S.optional(S.NullOr(S.String)),
924
+ output: S.optional(S.NullOr(S.String)),
925
+ outputType: S.optional(S.NullOr(S.String)),
926
+ outputIsError: S.optional(S.NullOr(S.Boolean)),
927
+ tags: WaitpointTokenObjectTagsList,
928
+ createdAt: S.String,
929
+ })).annotate({
930
+ identifier: "WaitpointTokenObject",
931
+ });
932
+ export const IgnoreErrorV1Request = /*@__PURE__*/ S.suspend(() => S.Struct({
933
+ errorId: S.String.pipe(T.Label()),
934
+ duration: S.optional(S.Number),
935
+ occurrenceRate: S.optional(S.Number),
936
+ totalOccurrences: S.optional(S.Number),
937
+ reason: S.optional(S.String),
938
+ }).pipe(T.Http({
939
+ method: "POST",
940
+ uri: "/api/v1/errors/{errorId}/ignore",
941
+ code: 200,
942
+ }))).annotate({
943
+ identifier: "IgnoreErrorV1Request",
944
+ });
945
+ export const ListBulkActionsV1RequestPage = /*@__PURE__*/ S.suspend(() => S.Struct({
946
+ size: S.optional(S.Number),
947
+ after: S.optional(S.String),
948
+ before: S.optional(S.String),
949
+ })).annotate({
950
+ identifier: "ListBulkActionsV1RequestPage",
951
+ });
952
+ export const ListBulkActionsV1Request = /*@__PURE__*/ S.suspend(() => S.Struct({
953
+ page: S.optional(ListBulkActionsV1RequestPage.pipe(T.Query())),
954
+ }).pipe(T.Http({ method: "GET", uri: "/api/v1/bulk-actions", code: 200 }))).annotate({
955
+ identifier: "ListBulkActionsV1Request",
956
+ });
957
+ export const ListBulkActionsResultDataList = /*@__PURE__*/ S.Array(BulkActionObject);
958
+ export const ListBulkActionsResultPagination = /*@__PURE__*/ S.suspend(() => S.Struct({
959
+ next: S.optional(S.String),
960
+ previous: S.optional(S.String),
961
+ })).annotate({
962
+ identifier: "ListBulkActionsResultPagination",
963
+ });
964
+ export const ListBulkActionsResult = /*@__PURE__*/ S.suspend(() => S.Struct({
965
+ data: ListBulkActionsResultDataList,
966
+ pagination: ListBulkActionsResultPagination,
967
+ })).annotate({
968
+ identifier: "ListBulkActionsResult",
969
+ });
970
+ export const ListDashboardsV1Request = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.Http({ method: "GET", uri: "/api/v1/query/dashboards", code: 200 }))).annotate({
971
+ identifier: "ListDashboardsV1Request",
972
+ });
973
+ export const ListDashboardsV1ResponseDashboardsItemWidgetsItemType = S.String;
974
+ export const ListDashboardsV1ResponseDashboardsItemWidgetsItem =
975
+ /*@__PURE__*/ S.suspend(() => S.Struct({
976
+ id: S.optional(S.String),
977
+ title: S.optional(S.String),
978
+ query: S.optional(S.String),
979
+ type: S.optional(ListDashboardsV1ResponseDashboardsItemWidgetsItemType),
980
+ })).annotate({
981
+ identifier: "ListDashboardsV1ResponseDashboardsItemWidgetsItem",
982
+ });
983
+ export const ListDashboardsV1ResponseDashboardsItemWidgetsList =
984
+ /*@__PURE__*/ S.Array(ListDashboardsV1ResponseDashboardsItemWidgetsItem);
985
+ export const ListDashboardsV1ResponseDashboardsItem = /*@__PURE__*/ S.suspend(() => S.Struct({
986
+ key: S.optional(S.String),
987
+ title: S.optional(S.String),
988
+ widgets: S.optional(ListDashboardsV1ResponseDashboardsItemWidgetsList),
989
+ })).annotate({
990
+ identifier: "ListDashboardsV1ResponseDashboardsItem",
991
+ });
992
+ export const ListDashboardsV1ResponseDashboardsList = /*@__PURE__*/ S.Array(ListDashboardsV1ResponseDashboardsItem);
993
+ export const ListDashboardsV1Response = /*@__PURE__*/ S.suspend(() => S.Struct({
994
+ dashboards: S.optional(ListDashboardsV1ResponseDashboardsList),
995
+ })).annotate({
996
+ identifier: "ListDashboardsV1Response",
997
+ });
998
+ export const ListDeploymentsV1RequestStatus = S.String;
999
+ export const ListDeploymentsV1Request = /*@__PURE__*/ S.suspend(() => S.Struct({
1000
+ page_after_: S.optional(S.String.pipe(T.Query("page[after]"))),
1001
+ page_size_: S.optional(S.Number.pipe(T.Query("page[size]"))),
1002
+ status: S.optional(ListDeploymentsV1RequestStatus.pipe(T.Query())),
1003
+ period: S.optional(S.String.pipe(T.Query())),
1004
+ from: S.optional(S.String.pipe(T.Query())),
1005
+ to: S.optional(S.String.pipe(T.Query())),
1006
+ }).pipe(T.Http({ method: "GET", uri: "/api/v1/deployments", code: 200 }))).annotate({
1007
+ identifier: "ListDeploymentsV1Request",
1008
+ });
1009
+ export const ListDeploymentsV1ResponseDataItemStatus = S.String;
1010
+ export const ListDeploymentsV1ResponseDataItem = /*@__PURE__*/ S.suspend(() => S.Struct({
1011
+ id: S.optional(S.String),
1012
+ createdAt: S.optional(S.String),
1013
+ shortCode: S.optional(S.String),
1014
+ version: S.optional(S.String),
1015
+ runtime: S.optional(S.NullOr(S.String)),
1016
+ runtimeVersion: S.optional(S.NullOr(S.String)),
1017
+ status: S.optional(ListDeploymentsV1ResponseDataItemStatus),
1018
+ deployedAt: S.optional(S.NullOr(S.String)),
1019
+ git: S.optional(S.NullOr(S.Unknown)),
1020
+ error: S.optional(S.NullOr(S.Unknown)),
1021
+ })).annotate({
1022
+ identifier: "ListDeploymentsV1ResponseDataItem",
1023
+ });
1024
+ export const ListDeploymentsV1ResponseDataList = /*@__PURE__*/ S.Array(ListDeploymentsV1ResponseDataItem);
1025
+ export const ListDeploymentsV1ResponsePagination = /*@__PURE__*/ S.suspend(() => S.Struct({
1026
+ next: S.optional(S.String),
1027
+ })).annotate({
1028
+ identifier: "ListDeploymentsV1ResponsePagination",
1029
+ });
1030
+ export const ListDeploymentsV1Response = /*@__PURE__*/ S.suspend(() => S.Struct({
1031
+ data: S.optional(ListDeploymentsV1ResponseDataList),
1032
+ pagination: S.optional(ListDeploymentsV1ResponsePagination),
1033
+ })).annotate({
1034
+ identifier: "ListDeploymentsV1Response",
1035
+ });
1036
+ export const ListErrorsV1RequestPage = /*@__PURE__*/ S.suspend(() => S.Struct({
1037
+ size: S.optional(S.Number),
1038
+ after: S.optional(S.String),
1039
+ before: S.optional(S.String),
1040
+ })).annotate({
1041
+ identifier: "ListErrorsV1RequestPage",
1042
+ });
1043
+ export const ErrorsFilterTaskIdentifierList = /*@__PURE__*/ S.Array(S.String);
1044
+ export const ErrorsFilterVersionList = /*@__PURE__*/ S.Array(S.String);
1045
+ export const ErrorsFilterStatusItem = S.String;
1046
+ export const ErrorsFilterStatusList = /*@__PURE__*/ S.Array(ErrorsFilterStatusItem);
1047
+ export const ErrorsFilter = /*@__PURE__*/ S.suspend(() => S.Struct({
1048
+ taskIdentifier: S.optional(ErrorsFilterTaskIdentifierList),
1049
+ version: S.optional(ErrorsFilterVersionList),
1050
+ status: S.optional(ErrorsFilterStatusList),
1051
+ search: S.optional(S.String),
1052
+ from: S.optional(S.String),
1053
+ to: S.optional(S.String),
1054
+ period: S.optional(S.String),
1055
+ })).annotate({ identifier: "ErrorsFilter" });
1056
+ export const ListErrorsV1Request = /*@__PURE__*/ S.suspend(() => S.Struct({
1057
+ page: S.optional(ListErrorsV1RequestPage.pipe(T.Query())),
1058
+ filter: S.optional(ErrorsFilter.pipe(T.Query())),
1059
+ }).pipe(T.Http({ method: "GET", uri: "/api/v1/errors", code: 200 }))).annotate({
1060
+ identifier: "ListErrorsV1Request",
1061
+ });
1062
+ export const ErrorListItemStatus = S.String;
1063
+ export const ErrorListItem = /*@__PURE__*/ S.suspend(() => S.Struct({
1064
+ id: S.String,
1065
+ fingerprint: S.String,
1066
+ taskIdentifier: S.String,
1067
+ errorType: S.String,
1068
+ errorMessage: S.String,
1069
+ status: ErrorListItemStatus,
1070
+ count: S.Number,
1071
+ firstSeen: S.String,
1072
+ lastSeen: S.String,
1073
+ resolvedAt: S.optional(S.NullOr(S.String)),
1074
+ ignoredUntil: S.optional(S.NullOr(S.String)),
1075
+ })).annotate({ identifier: "ErrorListItem" });
1076
+ export const ListErrorsResultDataList = /*@__PURE__*/ S.Array(ErrorListItem);
1077
+ export const ListErrorsResultPagination = /*@__PURE__*/ S.suspend(() => S.Struct({
1078
+ next: S.optional(S.String),
1079
+ previous: S.optional(S.String),
1080
+ })).annotate({
1081
+ identifier: "ListErrorsResultPagination",
1082
+ });
1083
+ export const ListErrorsResult = /*@__PURE__*/ S.suspend(() => S.Struct({
1084
+ data: S.optional(ListErrorsResultDataList),
1085
+ pagination: S.optional(ListErrorsResultPagination),
1086
+ })).annotate({
1087
+ identifier: "ListErrorsResult",
1088
+ });
1089
+ export const ListProjectEnvvarsV1RequestEnv = S.String;
1090
+ export const ListProjectEnvvarsV1Request = /*@__PURE__*/ S.suspend(() => S.Struct({
1091
+ projectRef: S.String.pipe(T.Label()),
1092
+ env: ListProjectEnvvarsV1RequestEnv.pipe(T.Label()),
1093
+ }).pipe(T.Http({
1094
+ method: "GET",
1095
+ uri: "/api/v1/projects/{projectRef}/envvars/{env}",
1096
+ code: 200,
1097
+ }))).annotate({
1098
+ identifier: "ListProjectEnvvarsV1Request",
1099
+ });
1100
+ export const EnvVar = /*@__PURE__*/ S.suspend(() => S.Struct({
1101
+ name: S.String,
1102
+ value: S.String,
1103
+ })).annotate({ identifier: "EnvVar" });
1104
+ export const ListEnvironmentVariablesResponse = /*@__PURE__*/ S.Array(EnvVar);
1105
+ export const ListProjectEnvvarsV1Response = /*@__PURE__*/ S.suspend(() => ListEnvironmentVariablesResponse.pipe(T.RawResponseRoot())).annotate({
1106
+ identifier: "ListProjectEnvvarsV1Response",
1107
+ });
1108
+ export const ListProjectRunsV1RequestPage = /*@__PURE__*/ S.suspend(() => S.Struct({
1109
+ size: S.optional(S.Number),
1110
+ after: S.optional(S.String),
1111
+ before: S.optional(S.String),
1112
+ })).annotate({
1113
+ identifier: "ListProjectRunsV1RequestPage",
1114
+ });
1115
+ export const ListProjectRunsV1RequestFilterCreatedAt = /*@__PURE__*/ S.suspend(() => S.Struct({
1116
+ from: S.optional(S.String),
1117
+ to: S.optional(S.String),
1118
+ period: S.optional(S.String),
1119
+ })).annotate({
1120
+ identifier: "ListProjectRunsV1RequestFilterCreatedAt",
1121
+ });
1122
+ export const ListProjectRunsV1RequestFilterStatusItem = S.String;
1123
+ export const ListProjectRunsV1RequestFilterStatusList = /*@__PURE__*/ S.Array(ListProjectRunsV1RequestFilterStatusItem);
1124
+ export const ListProjectRunsV1RequestFilterTaskIdentifierList =
1125
+ /*@__PURE__*/ S.Array(S.String);
1126
+ export const ListProjectRunsV1RequestFilterVersionList = /*@__PURE__*/ S.Array(S.String);
1127
+ export const ListProjectRunsV1RequestFilterTagList = /*@__PURE__*/ S.Array(S.String);
1128
+ export const ListProjectRunsV1RequestFilterEnvItem = S.String;
1129
+ export const ListProjectRunsV1RequestFilterEnvList = /*@__PURE__*/ S.Array(ListProjectRunsV1RequestFilterEnvItem);
1130
+ export const ListProjectRunsV1RequestFilter = /*@__PURE__*/ S.suspend(() => S.Struct({
1131
+ createdAt: S.optional(ListProjectRunsV1RequestFilterCreatedAt),
1132
+ status: S.optional(ListProjectRunsV1RequestFilterStatusList),
1133
+ taskIdentifier: S.optional(ListProjectRunsV1RequestFilterTaskIdentifierList),
1134
+ version: S.optional(ListProjectRunsV1RequestFilterVersionList),
1135
+ bulkAction: S.optional(S.String),
1136
+ schedule: S.optional(S.String),
1137
+ isTest: S.optional(S.Boolean),
1138
+ tag: S.optional(ListProjectRunsV1RequestFilterTagList),
1139
+ error: S.optional(S.String),
1140
+ env: S.optional(ListProjectRunsV1RequestFilterEnvList),
1141
+ })).annotate({
1142
+ identifier: "ListProjectRunsV1RequestFilter",
1143
+ });
1144
+ export const ListProjectRunsV1Request = /*@__PURE__*/ S.suspend(() => S.Struct({
1145
+ projectRef: S.String.pipe(T.Label()),
1146
+ page: S.optional(ListProjectRunsV1RequestPage.pipe(T.Query())),
1147
+ filter: S.optional(ListProjectRunsV1RequestFilter.pipe(T.Query())),
1148
+ }).pipe(T.Http({
1149
+ method: "GET",
1150
+ uri: "/api/v1/projects/{projectRef}/runs",
1151
+ code: 200,
1152
+ }))).annotate({
1153
+ identifier: "ListProjectRunsV1Request",
1154
+ });
1155
+ export const ListRunItemStatus = S.String;
1156
+ export const ListRunItemEnv = /*@__PURE__*/ S.suspend(() => S.Struct({
1157
+ id: S.String,
1158
+ name: S.String,
1159
+ user: S.optional(S.String),
1160
+ })).annotate({ identifier: "ListRunItemEnv" });
1161
+ export const ListRunItemTagsList = /*@__PURE__*/ S.Array(S.String);
1162
+ export const ListRunItem = /*@__PURE__*/ S.suspend(() => S.Struct({
1163
+ id: S.String,
1164
+ status: ListRunItemStatus,
1165
+ taskIdentifier: S.String,
1166
+ version: S.optional(S.String),
1167
+ env: ListRunItemEnv,
1168
+ idempotencyKey: S.optional(S.String),
1169
+ isTest: S.Boolean,
1170
+ createdAt: S.String,
1171
+ updatedAt: S.String,
1172
+ startedAt: S.optional(S.String),
1173
+ finishedAt: S.optional(S.String),
1174
+ delayedUntil: S.optional(S.String),
1175
+ ttl: S.optional(S.Unknown),
1176
+ expiredAt: S.optional(S.String),
1177
+ tags: S.optional(ListRunItemTagsList),
1178
+ costInCents: S.optional(S.Number),
1179
+ baseCostInCents: S.optional(S.Number),
1180
+ durationMs: S.optional(S.Number),
1181
+ })).annotate({ identifier: "ListRunItem" });
1182
+ export const ListRunsResultDataList = /*@__PURE__*/ S.Array(ListRunItem);
1183
+ export const ListRunsResultPagination = /*@__PURE__*/ S.suspend(() => S.Struct({
1184
+ next: S.optional(S.String),
1185
+ previous: S.optional(S.String),
1186
+ })).annotate({
1187
+ identifier: "ListRunsResultPagination",
1188
+ });
1189
+ export const ListRunsResult = /*@__PURE__*/ S.suspend(() => S.Struct({
1190
+ data: S.optional(ListRunsResultDataList),
1191
+ pagination: S.optional(ListRunsResultPagination),
1192
+ })).annotate({ identifier: "ListRunsResult" });
1193
+ export const ListQueuesV1Request = /*@__PURE__*/ S.suspend(() => S.Struct({
1194
+ page: S.optional(S.Number.pipe(T.Query())),
1195
+ perPage: S.optional(S.Number.pipe(T.Query())),
1196
+ }).pipe(T.Http({ method: "GET", uri: "/api/v1/queues", code: 200 }))).annotate({
1197
+ identifier: "ListQueuesV1Request",
1198
+ });
1199
+ export const ListQueuesResultDataList = /*@__PURE__*/ S.Array(QueueObject);
1200
+ export const ListQueuesResultPagination = /*@__PURE__*/ S.suspend(() => S.Struct({
1201
+ currentPage: S.optional(S.Number),
1202
+ totalPages: S.optional(S.Number),
1203
+ count: S.optional(S.Number),
1204
+ })).annotate({
1205
+ identifier: "ListQueuesResultPagination",
1206
+ });
1207
+ export const ListQueuesResult = /*@__PURE__*/ S.suspend(() => S.Struct({
1208
+ data: ListQueuesResultDataList,
1209
+ pagination: ListQueuesResultPagination,
1210
+ })).annotate({
1211
+ identifier: "ListQueuesResult",
1212
+ });
1213
+ export const ListRunsV1RequestPage = ListProjectRunsV1RequestPage;
1214
+ export const CommonRunsFilterCreatedAt = ListProjectRunsV1RequestFilterCreatedAt;
1215
+ export const CommonRunsFilterStatusItem = S.String;
1216
+ export const CommonRunsFilterStatusList = /*@__PURE__*/ S.Array(CommonRunsFilterStatusItem);
1217
+ export const CommonRunsFilterTaskIdentifierList = /*@__PURE__*/ S.Array(S.String);
1218
+ export const CommonRunsFilterVersionList = /*@__PURE__*/ S.Array(S.String);
1219
+ export const CommonRunsFilterTagList = /*@__PURE__*/ S.Array(S.String);
1220
+ export const CommonRunsFilter = /*@__PURE__*/ S.suspend(() => S.Struct({
1221
+ createdAt: S.optional(ListProjectRunsV1RequestFilterCreatedAt),
1222
+ status: S.optional(CommonRunsFilterStatusList),
1223
+ taskIdentifier: S.optional(CommonRunsFilterTaskIdentifierList),
1224
+ version: S.optional(CommonRunsFilterVersionList),
1225
+ bulkAction: S.optional(S.String),
1226
+ schedule: S.optional(S.String),
1227
+ isTest: S.optional(S.Boolean),
1228
+ tag: S.optional(CommonRunsFilterTagList),
1229
+ error: S.optional(S.String),
1230
+ })).annotate({
1231
+ identifier: "CommonRunsFilter",
1232
+ });
1233
+ export const ListRunsV1Request = /*@__PURE__*/ S.suspend(() => S.Struct({
1234
+ page: S.optional(ListProjectRunsV1RequestPage.pipe(T.Query())),
1235
+ filter: S.optional(CommonRunsFilter.pipe(T.Query())),
1236
+ }).pipe(T.Http({ method: "GET", uri: "/api/v1/runs", code: 200 }))).annotate({
1237
+ identifier: "ListRunsV1Request",
1238
+ });
1239
+ export const ListSchedulesV1Request = /*@__PURE__*/ S.suspend(() => S.Struct({
1240
+ page: S.optional(S.Number.pipe(T.Query())),
1241
+ perPage: S.optional(S.Number.pipe(T.Query())),
1242
+ }).pipe(T.Http({ method: "GET", uri: "/api/v1/schedules", code: 200 }))).annotate({
1243
+ identifier: "ListSchedulesV1Request",
1244
+ });
1245
+ export const ListSchedulesResultDataList = /*@__PURE__*/ S.Array(ScheduleObject);
1246
+ export const ListSchedulesResultPagination = /*@__PURE__*/ S.suspend(() => S.Struct({
1247
+ currentPage: S.optional(S.Number),
1248
+ totalPages: S.optional(S.Number),
1249
+ count: S.optional(S.Number),
1250
+ })).annotate({
1251
+ identifier: "ListSchedulesResultPagination",
1252
+ });
1253
+ export const ListSchedulesResult = /*@__PURE__*/ S.suspend(() => S.Struct({
1254
+ data: S.optional(ListSchedulesResultDataList),
1255
+ pagination: S.optional(ListSchedulesResultPagination),
1256
+ })).annotate({
1257
+ identifier: "ListSchedulesResult",
1258
+ });
1259
+ export const ListSessionsV1RequestPage = /*@__PURE__*/ S.suspend(() => S.Struct({
1260
+ size: S.optional(S.Number),
1261
+ after: S.optional(S.String),
1262
+ before: S.optional(S.String),
1263
+ })).annotate({
1264
+ identifier: "ListSessionsV1RequestPage",
1265
+ });
1266
+ export const SessionsFilterTypeList = /*@__PURE__*/ S.Array(S.String);
1267
+ export const SessionsFilterTagsList = /*@__PURE__*/ S.Array(S.String);
1268
+ export const SessionsFilterTaskIdentifierList = /*@__PURE__*/ S.Array(S.String);
1269
+ export const SessionsFilterStatusItem = S.String;
1270
+ export const SessionsFilterStatusList = /*@__PURE__*/ S.Array(SessionsFilterStatusItem);
1271
+ export const SessionsFilterCreatedAt = /*@__PURE__*/ S.suspend(() => S.Struct({
1272
+ from: S.optional(S.String),
1273
+ to: S.optional(S.String),
1274
+ period: S.optional(S.String),
1275
+ })).annotate({
1276
+ identifier: "SessionsFilterCreatedAt",
1277
+ });
1278
+ export const SessionsFilter = /*@__PURE__*/ S.suspend(() => S.Struct({
1279
+ type: S.optional(SessionsFilterTypeList),
1280
+ tags: S.optional(SessionsFilterTagsList),
1281
+ taskIdentifier: S.optional(SessionsFilterTaskIdentifierList),
1282
+ externalId: S.optional(S.String),
1283
+ status: S.optional(SessionsFilterStatusList),
1284
+ createdAt: S.optional(SessionsFilterCreatedAt),
1285
+ })).annotate({ identifier: "SessionsFilter" });
1286
+ export const ListSessionsV1Request = /*@__PURE__*/ S.suspend(() => S.Struct({
1287
+ page: S.optional(ListSessionsV1RequestPage.pipe(T.Query())),
1288
+ filter: S.optional(SessionsFilter.pipe(T.Query())),
1289
+ }).pipe(T.Http({ method: "GET", uri: "/api/v1/sessions", code: 200 }))).annotate({
1290
+ identifier: "ListSessionsV1Request",
1291
+ });
1292
+ export const ListSessionsResultDataList = /*@__PURE__*/ S.Array(SessionObject);
1293
+ export const ListSessionsResultPagination = /*@__PURE__*/ S.suspend(() => S.Struct({
1294
+ next: S.optional(S.String),
1295
+ previous: S.optional(S.String),
1296
+ })).annotate({
1297
+ identifier: "ListSessionsResultPagination",
1298
+ });
1299
+ export const ListSessionsResult = /*@__PURE__*/ S.suspend(() => S.Struct({
1300
+ data: S.optional(ListSessionsResultDataList),
1301
+ pagination: S.optional(ListSessionsResultPagination),
1302
+ })).annotate({
1303
+ identifier: "ListSessionsResult",
1304
+ });
1305
+ export const ListWaitpointTokensV1Request = /*@__PURE__*/ S.suspend(() => S.Struct({
1306
+ page_size_: S.optional(S.Number.pipe(T.Query("page[size]"))),
1307
+ page_after_: S.optional(S.String.pipe(T.Query("page[after]"))),
1308
+ page_before_: S.optional(S.String.pipe(T.Query("page[before]"))),
1309
+ filter_status_: S.optional(S.String.pipe(T.Query("filter[status]"))),
1310
+ filter_idempotencyKey_: S.optional(S.String.pipe(T.Query("filter[idempotencyKey]"))),
1311
+ filter_tags_: S.optional(S.String.pipe(T.Query("filter[tags]"))),
1312
+ filter_createdAt__period_: S.optional(S.String.pipe(T.Query("filter[createdAt][period]"))),
1313
+ filter_createdAt__from_: S.optional(S.String.pipe(T.Query("filter[createdAt][from]"))),
1314
+ filter_createdAt__to_: S.optional(S.String.pipe(T.Query("filter[createdAt][to]"))),
1315
+ }).pipe(T.Http({ method: "GET", uri: "/api/v1/waitpoints/tokens", code: 200 }))).annotate({
1316
+ identifier: "ListWaitpointTokensV1Request",
1317
+ });
1318
+ export const ListWaitpointTokensResultDataList = /*@__PURE__*/ S.Array(WaitpointTokenObject);
1319
+ export const ListWaitpointTokensResultPagination = /*@__PURE__*/ S.suspend(() => S.Struct({
1320
+ next: S.optional(S.NullOr(S.String)),
1321
+ previous: S.optional(S.NullOr(S.String)),
1322
+ })).annotate({
1323
+ identifier: "ListWaitpointTokensResultPagination",
1324
+ });
1325
+ export const ListWaitpointTokensResult = /*@__PURE__*/ S.suspend(() => S.Struct({
1326
+ data: ListWaitpointTokensResultDataList,
1327
+ pagination: ListWaitpointTokensResultPagination,
1328
+ })).annotate({
1329
+ identifier: "ListWaitpointTokensResult",
1330
+ });
1331
+ export const OverrideQueueConcurrencyV1RequestType = S.String;
1332
+ export const OverrideQueueConcurrencyV1Request = /*@__PURE__*/ S.suspend(() => S.Struct({
1333
+ queueParam: S.String.pipe(T.Label()),
1334
+ type: S.optional(OverrideQueueConcurrencyV1RequestType),
1335
+ concurrencyLimit: S.Number,
1336
+ }).pipe(T.Http({
1337
+ method: "POST",
1338
+ uri: "/api/v1/queues/{queueParam}/concurrency/override",
1339
+ code: 200,
1340
+ }))).annotate({
1341
+ identifier: "OverrideQueueConcurrencyV1Request",
1342
+ });
1343
+ export const PauseQueueV1RequestType = S.String;
1344
+ export const PauseQueueV1RequestAction = S.String;
1345
+ export const PauseQueueV1Request = /*@__PURE__*/ S.suspend(() => S.Struct({
1346
+ queueParam: S.String.pipe(T.Label()),
1347
+ type: S.optional(PauseQueueV1RequestType),
1348
+ action: PauseQueueV1RequestAction,
1349
+ }).pipe(T.Http({
1350
+ method: "POST",
1351
+ uri: "/api/v1/queues/{queueParam}/pause",
1352
+ code: 200,
1353
+ }))).annotate({
1354
+ identifier: "PauseQueueV1Request",
1355
+ });
1356
+ export const PromoteDeploymentV1Request = /*@__PURE__*/ S.suspend(() => S.Struct({
1357
+ version: S.String.pipe(T.Label()),
1358
+ }).pipe(T.Http({
1359
+ method: "POST",
1360
+ uri: "/api/v1/deployments/{version}/promote",
1361
+ code: 200,
1362
+ }))).annotate({
1363
+ identifier: "PromoteDeploymentV1Request",
1364
+ });
1365
+ export const PromoteDeploymentV1Response = /*@__PURE__*/ S.suspend(() => S.Struct({
1366
+ id: S.optional(S.String),
1367
+ version: S.optional(S.String),
1368
+ shortCode: S.optional(S.String),
1369
+ })).annotate({
1370
+ identifier: "PromoteDeploymentV1Response",
1371
+ });
1372
+ export const ResetQueueConcurrencyV1RequestType = S.String;
1373
+ export const ResetQueueConcurrencyV1Request = /*@__PURE__*/ S.suspend(() => S.Struct({
1374
+ queueParam: S.String.pipe(T.Label()),
1375
+ type: S.optional(ResetQueueConcurrencyV1RequestType),
1376
+ }).pipe(T.Http({
1377
+ method: "POST",
1378
+ uri: "/api/v1/queues/{queueParam}/concurrency/reset",
1379
+ code: 200,
1380
+ }))).annotate({
1381
+ identifier: "ResetQueueConcurrencyV1Request",
1382
+ });
1383
+ export const ResolveErrorV1Request = /*@__PURE__*/ S.suspend(() => S.Struct({
1384
+ errorId: S.String.pipe(T.Label()),
1385
+ resolvedInVersion: S.optional(S.String),
1386
+ }).pipe(T.Http({
1387
+ method: "POST",
1388
+ uri: "/api/v1/errors/{errorId}/resolve",
1389
+ code: 200,
1390
+ }))).annotate({
1391
+ identifier: "ResolveErrorV1Request",
1392
+ });
1393
+ export const RunReplayV1Request = /*@__PURE__*/ S.suspend(() => S.Struct({
1394
+ runId: S.String.pipe(T.Label()),
1395
+ }).pipe(T.Http({ method: "POST", uri: "/api/v1/runs/{runId}/replay", code: 200 }))).annotate({
1396
+ identifier: "RunReplayV1Request",
1397
+ });
1398
+ export const RunReplayV1Response = /*@__PURE__*/ S.suspend(() => S.Struct({
1399
+ id: S.optional(S.String),
1400
+ })).annotate({
1401
+ identifier: "RunReplayV1Response",
1402
+ });
1403
+ export const RunRescheduleV1Request = /*@__PURE__*/ S.suspend(() => S.Struct({
1404
+ runId: S.String.pipe(T.Label()),
1405
+ delay: S.optional(S.String),
1406
+ }).pipe(T.Http({
1407
+ method: "POST",
1408
+ uri: "/api/v1/runs/{runId}/reschedule",
1409
+ code: 200,
1410
+ }))).annotate({
1411
+ identifier: "RunRescheduleV1Request",
1412
+ });
1413
+ export const RunRescheduleV1ResponseStatus = S.String;
1414
+ export const RunRescheduleV1ResponseTagsList = /*@__PURE__*/ S.Array(S.String);
1415
+ export const RunRescheduleV1ResponseTriggerFunction = S.String;
1416
+ export const RunRescheduleV1ResponseRelatedRunsChildrenList =
1417
+ /*@__PURE__*/ S.Array(CommonRunObject);
1418
+ export const RunRescheduleV1ResponseRelatedRuns = /*@__PURE__*/ S.suspend(() => S.Struct({
1419
+ root: S.optional(CommonRunObject),
1420
+ parent: S.optional(CommonRunObject),
1421
+ children: S.optional(RunRescheduleV1ResponseRelatedRunsChildrenList),
1422
+ })).annotate({
1423
+ identifier: "RunRescheduleV1ResponseRelatedRuns",
1424
+ });
1425
+ export const RunRescheduleV1ResponseScheduleGeneratorType = S.String;
1426
+ export const RunRescheduleV1ResponseScheduleGenerator = /*@__PURE__*/ S.suspend(() => S.Struct({
1427
+ type: S.optional(RunRescheduleV1ResponseScheduleGeneratorType),
1428
+ expression: S.optional(S.String),
1429
+ description: S.optional(S.String),
1430
+ })).annotate({
1431
+ identifier: "RunRescheduleV1ResponseScheduleGenerator",
1432
+ });
1433
+ export const RunRescheduleV1ResponseSchedule = /*@__PURE__*/ S.suspend(() => S.Struct({
1434
+ id: S.String,
1435
+ externalId: S.optional(S.String),
1436
+ deduplicationKey: S.optional(S.String),
1437
+ generator: RunRescheduleV1ResponseScheduleGenerator,
1438
+ })).annotate({
1439
+ identifier: "RunRescheduleV1ResponseSchedule",
1440
+ });
1441
+ export const RunRescheduleV1ResponseAttemptsItemStatus = S.String;
1442
+ export const RunRescheduleV1ResponseAttemptsItem = /*@__PURE__*/ S.suspend(() => S.Struct({
1443
+ id: S.String,
1444
+ status: RunRescheduleV1ResponseAttemptsItemStatus,
1445
+ error: S.optional(SerializedError),
1446
+ createdAt: S.String,
1447
+ updatedAt: S.String,
1448
+ startedAt: S.optional(S.String),
1449
+ completedAt: S.optional(S.String),
1450
+ })).annotate({
1451
+ identifier: "RunRescheduleV1ResponseAttemptsItem",
1452
+ });
1453
+ export const RunRescheduleV1ResponseAttemptsList = /*@__PURE__*/ S.Array(RunRescheduleV1ResponseAttemptsItem);
1454
+ export const RunRescheduleV1Response = /*@__PURE__*/ S.suspend(() => S.Struct({
1455
+ id: S.String,
1456
+ status: RunRescheduleV1ResponseStatus,
1457
+ taskIdentifier: S.String,
1458
+ version: S.optional(S.String),
1459
+ idempotencyKey: S.optional(S.String),
1460
+ createdAt: S.String,
1461
+ updatedAt: S.String,
1462
+ isTest: S.optional(S.Boolean),
1463
+ startedAt: S.optional(S.String),
1464
+ finishedAt: S.optional(S.String),
1465
+ delayedUntil: S.optional(S.String),
1466
+ ttl: S.optional(S.Unknown),
1467
+ expiredAt: S.optional(S.String),
1468
+ tags: S.optional(RunRescheduleV1ResponseTagsList),
1469
+ metadata: S.optional(S.Unknown),
1470
+ costInCents: S.optional(S.Number),
1471
+ baseCostInCents: S.optional(S.Number),
1472
+ durationMs: S.optional(S.Number),
1473
+ depth: S.optional(S.Number),
1474
+ batchId: S.optional(S.String),
1475
+ triggerFunction: S.optional(RunRescheduleV1ResponseTriggerFunction),
1476
+ payload: S.optional(S.Unknown),
1477
+ payloadPresignedUrl: S.optional(S.String),
1478
+ output: S.optional(S.Unknown),
1479
+ outputPresignedUrl: S.optional(S.String),
1480
+ relatedRuns: S.optional(RunRescheduleV1ResponseRelatedRuns),
1481
+ schedule: S.optional(RunRescheduleV1ResponseSchedule),
1482
+ attempts: RunRescheduleV1ResponseAttemptsList,
1483
+ })).annotate({
1484
+ identifier: "RunRescheduleV1Response",
1485
+ });
1486
+ export const QueueOptions = /*@__PURE__*/ S.suspend(() => S.Struct({
1487
+ name: S.optional(S.String),
1488
+ concurrencyLimit: S.optional(S.Number),
1489
+ })).annotate({ identifier: "QueueOptions" });
1490
+ export const TriggerTaskRequestBodyOptionsMachine = S.String;
1491
+ export const TriggerTaskRequestBodyOptions = /*@__PURE__*/ S.suspend(() => S.Struct({
1492
+ queue: S.optional(QueueOptions),
1493
+ concurrencyKey: S.optional(S.String),
1494
+ idempotencyKey: S.optional(S.String),
1495
+ ttl: S.optional(S.Unknown),
1496
+ delay: S.optional(S.String),
1497
+ tags: S.optional(RunTags),
1498
+ machine: S.optional(TriggerTaskRequestBodyOptionsMachine),
1499
+ })).annotate({
1500
+ identifier: "TriggerTaskRequestBodyOptions",
1501
+ });
1502
+ export const TriggerTaskRequestBody = /*@__PURE__*/ S.suspend(() => S.Struct({
1503
+ payload: S.optional(S.Unknown),
1504
+ context: S.optional(S.Unknown),
1505
+ options: S.optional(TriggerTaskRequestBodyOptions),
1506
+ })).annotate({
1507
+ identifier: "TriggerTaskRequestBody",
1508
+ });
1509
+ export const TriggerBatchTaskByIdV1RequestItemsList = /*@__PURE__*/ S.Array(TriggerTaskRequestBody);
1510
+ export const TriggerBatchTaskByIdV1Request = /*@__PURE__*/ S.suspend(() => S.Struct({
1511
+ taskIdentifier: S.String.pipe(T.Label()),
1512
+ items: TriggerBatchTaskByIdV1RequestItemsList,
1513
+ }).pipe(T.Http({
1514
+ method: "POST",
1515
+ uri: "/api/v1/tasks/{taskIdentifier}/batch",
1516
+ code: 200,
1517
+ }))).annotate({
1518
+ identifier: "TriggerBatchTaskByIdV1Request",
1519
+ });
1520
+ export const BatchTriggerTaskResponseRunsList = /*@__PURE__*/ S.Array(S.String);
1521
+ export const BatchTriggerTaskResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
1522
+ batchId: S.String,
1523
+ runs: BatchTriggerTaskResponseRunsList,
1524
+ })).annotate({
1525
+ identifier: "BatchTriggerTaskResponse",
1526
+ });
1527
+ export const BatchTriggerTaskRequestBodyItemOptionsMachine = S.String;
1528
+ export const BatchTriggerTaskRequestBodyItemOptions = /*@__PURE__*/ S.suspend(() => S.Struct({
1529
+ queue: S.optional(QueueOptions),
1530
+ concurrencyKey: S.optional(S.String),
1531
+ idempotencyKey: S.optional(S.String),
1532
+ ttl: S.optional(S.Unknown),
1533
+ delay: S.optional(S.String),
1534
+ tags: S.optional(RunTags),
1535
+ machine: S.optional(BatchTriggerTaskRequestBodyItemOptionsMachine),
1536
+ })).annotate({
1537
+ identifier: "BatchTriggerTaskRequestBodyItemOptions",
1538
+ });
1539
+ export const BatchTriggerTaskRequestBodyItem = /*@__PURE__*/ S.suspend(() => S.Struct({
1540
+ payload: S.optional(S.Unknown),
1541
+ context: S.optional(S.Unknown),
1542
+ options: S.optional(BatchTriggerTaskRequestBodyItemOptions),
1543
+ task: S.String,
1544
+ })).annotate({
1545
+ identifier: "BatchTriggerTaskRequestBodyItem",
1546
+ });
1547
+ export const TriggerBatchTaskV1RequestItemsList = /*@__PURE__*/ S.Array(BatchTriggerTaskRequestBodyItem);
1548
+ export const TriggerBatchTaskV1Request = /*@__PURE__*/ S.suspend(() => S.Struct({
1549
+ items: TriggerBatchTaskV1RequestItemsList,
1550
+ }).pipe(T.Http({ method: "POST", uri: "/api/v1/tasks/batch", code: 200 }))).annotate({
1551
+ identifier: "TriggerBatchTaskV1Request",
1552
+ });
1553
+ export const TriggerTaskV1RequestOptionsMachine = S.String;
1554
+ export const TriggerTaskV1RequestOptions = /*@__PURE__*/ S.suspend(() => S.Struct({
1555
+ queue: S.optional(QueueOptions),
1556
+ concurrencyKey: S.optional(S.String),
1557
+ idempotencyKey: S.optional(S.String),
1558
+ ttl: S.optional(S.Unknown),
1559
+ delay: S.optional(S.String),
1560
+ tags: S.optional(RunTags),
1561
+ machine: S.optional(TriggerTaskV1RequestOptionsMachine),
1562
+ })).annotate({
1563
+ identifier: "TriggerTaskV1RequestOptions",
1564
+ });
1565
+ export const TriggerTaskV1Request = /*@__PURE__*/ S.suspend(() => S.Struct({
1566
+ taskIdentifier: S.String.pipe(T.Label()),
1567
+ payload: S.optional(S.Unknown),
1568
+ context: S.optional(S.Unknown),
1569
+ options: S.optional(TriggerTaskV1RequestOptions),
1570
+ }).pipe(T.Http({
1571
+ method: "POST",
1572
+ uri: "/api/v1/tasks/{taskIdentifier}/trigger",
1573
+ code: 200,
1574
+ }))).annotate({
1575
+ identifier: "TriggerTaskV1Request",
1576
+ });
1577
+ export const TriggerTaskResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
1578
+ id: S.optional(S.String),
1579
+ })).annotate({
1580
+ identifier: "TriggerTaskResponse",
1581
+ });
1582
+ export const UnresolveErrorV1Request = /*@__PURE__*/ S.suspend(() => S.Struct({
1583
+ errorId: S.String.pipe(T.Label()),
1584
+ }).pipe(T.Http({
1585
+ method: "POST",
1586
+ uri: "/api/v1/errors/{errorId}/unresolve",
1587
+ code: 200,
1588
+ }))).annotate({
1589
+ identifier: "UnresolveErrorV1Request",
1590
+ });
1591
+ export const UpdateProjectEnvvarV1RequestEnv = S.String;
1592
+ export const UpdateProjectEnvvarV1Request = /*@__PURE__*/ S.suspend(() => S.Struct({
1593
+ projectRef: S.String.pipe(T.Label()),
1594
+ env: UpdateProjectEnvvarV1RequestEnv.pipe(T.Label()),
1595
+ name: S.String.pipe(T.Label()),
1596
+ value: S.String,
1597
+ }).pipe(T.Http({
1598
+ method: "PUT",
1599
+ uri: "/api/v1/projects/{projectRef}/envvars/{env}/{name}",
1600
+ code: 200,
1601
+ }))).annotate({
1602
+ identifier: "UpdateProjectEnvvarV1Request",
1603
+ });
1604
+ export const UpdateRunMetadataV1Request = /*@__PURE__*/ S.suspend(() => S.Struct({
1605
+ runId: S.String.pipe(T.Label()),
1606
+ metadata: S.optional(S.Unknown),
1607
+ }).pipe(T.Http({ method: "PUT", uri: "/api/v1/runs/{runId}/metadata", code: 200 }))).annotate({
1608
+ identifier: "UpdateRunMetadataV1Request",
1609
+ });
1610
+ export const UpdateRunMetadataV1Response = /*@__PURE__*/ S.suspend(() => S.Struct({
1611
+ metadata: S.optional(S.Unknown),
1612
+ })).annotate({
1613
+ identifier: "UpdateRunMetadataV1Response",
1614
+ });
1615
+ export const UpdateScheduleV1Request = /*@__PURE__*/ S.suspend(() => S.Struct({
1616
+ schedule_id: S.String.pipe(T.Label()),
1617
+ task: S.String,
1618
+ cron: S.String,
1619
+ externalId: S.optional(S.String),
1620
+ timezone: S.optional(S.String),
1621
+ }).pipe(T.Http({
1622
+ method: "PUT",
1623
+ uri: "/api/v1/schedules/{schedule_id}",
1624
+ code: 200,
1625
+ }))).annotate({
1626
+ identifier: "UpdateScheduleV1Request",
1627
+ });
1628
+ export const UpdateSessionV1RequestTagsList = /*@__PURE__*/ S.Array(S.String);
1629
+ export const UpdateSessionV1RequestMetadataMap = /*@__PURE__*/ S.Record(S.String, S.Unknown);
1630
+ export const UpdateSessionV1Request = /*@__PURE__*/ S.suspend(() => S.Struct({
1631
+ session: S.String.pipe(T.Label()),
1632
+ tags: S.optional(UpdateSessionV1RequestTagsList),
1633
+ metadata: S.optional(S.NullOr(UpdateSessionV1RequestMetadataMap)),
1634
+ externalId: S.optional(S.NullOr(S.String)),
1635
+ }).pipe(T.Http({ method: "PATCH", uri: "/api/v1/sessions/{session}", code: 200 }))).annotate({
1636
+ identifier: "UpdateSessionV1Request",
1637
+ });
1638
+ export const UploadProjectEnvvarsV1RequestEnv = S.String;
1639
+ export const UploadProjectEnvvarsV1RequestVariablesList = /*@__PURE__*/ S.Array(EnvVar);
1640
+ export const UploadProjectEnvvarsV1Request = /*@__PURE__*/ S.suspend(() => S.Struct({
1641
+ projectRef: S.String.pipe(T.Label()),
1642
+ env: UploadProjectEnvvarsV1RequestEnv.pipe(T.Label()),
1643
+ variables: UploadProjectEnvvarsV1RequestVariablesList,
1644
+ override: S.optional(S.Boolean),
1645
+ }).pipe(T.Http({
1646
+ method: "POST",
1647
+ uri: "/api/v1/projects/{projectRef}/envvars/{env}/import",
1648
+ code: 200,
1649
+ }))).annotate({
1650
+ identifier: "UploadProjectEnvvarsV1Request",
1651
+ });
1652
+ /** 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()`. */
1653
+ export const activateScheduleV1 = /*@__PURE__*/ API.make(() => ({
1654
+ input: ActivateScheduleV1Request,
1655
+ output: ScheduleObject,
1656
+ errors: [NotFound, UnknownTriggerDevError],
1657
+ protocol: TriggerDevProtocol,
1658
+ retry: Retry.Retry,
1659
+ }));
1660
+ /** 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. */
1661
+ export const addRunTagsV1 = /*@__PURE__*/ API.make(() => ({
1662
+ input: AddRunTagsV1Request,
1663
+ output: AddRunTagsV1Response,
1664
+ errors: [BadRequest, UnprocessableEntity, UnknownTriggerDevError],
1665
+ protocol: TriggerDevProtocol,
1666
+ retry: Retry.Retry,
1667
+ }));
1668
+ /** Abort bulk action Abort a pending bulk action so it stops processing additional runs. Runs already processed by the action are not undone. */
1669
+ export const bulkAbortActionV1 = /*@__PURE__*/ API.make(() => ({
1670
+ input: BulkAbortActionV1Request,
1671
+ output: AbortBulkActionResponse,
1672
+ errors: [BadRequest, NotFound, UnknownTriggerDevError],
1673
+ protocol: TriggerDevProtocol,
1674
+ retry: Retry.Retry,
1675
+ }));
1676
+ /** Cancel a run Cancels an in-progress run. If the run is already completed, this will have no effect. */
1677
+ export const cancelRunV1 = /*@__PURE__*/ API.make(() => ({
1678
+ input: CancelRunV1Request,
1679
+ output: CancelRunV1Response,
1680
+ errors: [BadRequest, NotFound, UnknownTriggerDevError],
1681
+ protocol: TriggerDevProtocol,
1682
+ retry: Retry.Retry,
1683
+ }));
1684
+ /** 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. */
1685
+ export const closeSessionV1 = /*@__PURE__*/ API.make(() => ({
1686
+ input: CloseSessionV1Request,
1687
+ output: SessionObject,
1688
+ errors: [NotFound, UnknownTriggerDevError],
1689
+ protocol: TriggerDevProtocol,
1690
+ retry: Retry.Retry,
1691
+ }));
1692
+ /** Complete a waitpoint token via HTTP callback Completes a waitpoint token using the pre-signed callback URL returned in the `url` field when the token was created. No API key is required — the `callbackHash` in the URL acts as the authentication token. This is designed to be given directly to external services (e.g. as a webhook URL) so they can unblock a waiting run without needing access to your API key. The entire request body is passed as the output data to the waiting run. If the token is already completed, this is a no-op and returns `success: true`. */
1693
+ export const completeWaitpointTokenCallbackV1 = /*@__PURE__*/ API.make(() => ({
1694
+ input: CompleteWaitpointTokenCallbackV1Request,
1695
+ output: CompleteWaitpointTokenResponse,
1696
+ errors: [NotFound, UnknownTriggerDevError],
1697
+ protocol: TriggerDevProtocol,
1698
+ retry: Retry.Retry,
1699
+ }));
1700
+ /** Complete a waitpoint token Completes a waitpoint token, unblocking any run that is waiting for it via `wait.forToken()`. An optional `data` payload can be passed and will be returned to the waiting run. If the token is already completed, this is a no-op and returns `success: true`. This endpoint accepts both secret API keys and short-lived JWTs (public access tokens), making it safe to call from frontend clients. */
1701
+ export const completeWaitpointTokenV1 = /*@__PURE__*/ API.make(() => ({
1702
+ input: CompleteWaitpointTokenV1Request,
1703
+ output: CompleteWaitpointTokenResponse,
1704
+ errors: [NotFound, UnknownTriggerDevError],
1705
+ protocol: TriggerDevProtocol,
1706
+ retry: Retry.Retry,
1707
+ }));
1708
+ /** Create bulk action Create an asynchronous bulk action to cancel or replay runs selected by run IDs or filters. */
1709
+ export const createBulkActionV1 = /*@__PURE__*/ API.make(() => ({
1710
+ input: CreateBulkActionV1Request,
1711
+ output: CreateBulkActionV1Response,
1712
+ errors: [BadRequest, UnprocessableEntity, UnknownTriggerDevError],
1713
+ protocol: TriggerDevProtocol,
1714
+ retry: Retry.Retry,
1715
+ }));
1716
+ /** Create environment variable Create a new environment variable for a specific project and environment. */
1717
+ export const createProjectEnvvarV1 = /*@__PURE__*/ API.make(() => ({
1718
+ input: CreateProjectEnvvarV1Request,
1719
+ output: SucceedResponse,
1720
+ errors: [BadRequest, NotFound, UnknownTriggerDevError],
1721
+ protocol: TriggerDevProtocol,
1722
+ retry: Retry.Retry,
1723
+ }));
1724
+ /** Create a schedule Create a new `IMPERATIVE` schedule based on the specified options. */
1725
+ export const createScheduleV1 = /*@__PURE__*/ API.make(() => ({
1726
+ input: CreateScheduleV1Request,
1727
+ output: ScheduleObject,
1728
+ errors: [BadRequest, UnprocessableEntity, UnknownTriggerDevError],
1729
+ protocol: TriggerDevProtocol,
1730
+ retry: Retry.Retry,
1731
+ }));
1732
+ /** Create a session Create a Session and trigger its first run in one atomic call. A Session is the durable identity for a bi-directional stream of records (the `.in` and `.out` channels) that survives across the runs processing it. Idempotent on `externalId` within an environment. Calling create again with an `externalId` that already maps to an open session returns the existing session with `isCached: true` and `201` becomes `200`. Reusing an `externalId` whose session is already closed or expired returns `409`. Authorize with a secret key, or a public token carrying `write:sessions` for the session you are creating. */
1733
+ export const createSessionV1 = /*@__PURE__*/ API.make(() => ({
1734
+ input: CreateSessionV1Request,
1735
+ output: CreateSessionV1Response,
1736
+ errors: [Conflict, UnprocessableEntity, UnknownTriggerDevError],
1737
+ protocol: TriggerDevProtocol,
1738
+ retry: Retry.Retry,
1739
+ }));
1740
+ /** 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. */
1741
+ export const createWaitpointTokenV1 = /*@__PURE__*/ API.make(() => ({
1742
+ input: CreateWaitpointTokenV1Request,
1743
+ output: CreateWaitpointTokenResponse,
1744
+ errors: [UnprocessableEntity, UnknownTriggerDevError],
1745
+ protocol: TriggerDevProtocol,
1746
+ retry: Retry.Retry,
1747
+ }));
1748
+ /** 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()`. */
1749
+ export const deactivateScheduleV1 = /*@__PURE__*/ API.make(() => ({
1750
+ input: DeactivateScheduleV1Request,
1751
+ output: ScheduleObject,
1752
+ errors: [NotFound, UnknownTriggerDevError],
1753
+ protocol: TriggerDevProtocol,
1754
+ retry: Retry.Retry,
1755
+ }));
1756
+ /** Delete environment variable Delete a specific environment variable for a specific project and environment. */
1757
+ export const deleteProjectEnvvarV1 = /*@__PURE__*/ API.make(() => ({
1758
+ input: DeleteProjectEnvvarV1Request,
1759
+ output: SucceedResponse,
1760
+ errors: [BadRequest, NotFound, UnknownTriggerDevError],
1761
+ protocol: TriggerDevProtocol,
1762
+ retry: Retry.Retry,
1763
+ }));
1764
+ /** 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()`. */
1765
+ export const deleteScheduleV1 = /*@__PURE__*/ API.make(() => ({
1766
+ input: DeleteScheduleV1Request,
1767
+ output: DeleteScheduleV1Response,
1768
+ errors: [NotFound, UnknownTriggerDevError],
1769
+ protocol: TriggerDevProtocol,
1770
+ retry: Retry.Retry,
1771
+ }));
1772
+ /** 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. */
1773
+ export const executeQueryV1 = /*@__PURE__*/ API.make(() => ({
1774
+ input: ExecuteQueryV1Request,
1775
+ output: ExecuteQueryV1Response,
1776
+ errors: [BadRequest, UnknownTriggerDevError],
1777
+ protocol: TriggerDevProtocol,
1778
+ retry: Retry.Retry,
1779
+ }));
1780
+ /** Retrieve batch results Returns the execution results of all completed runs in a batch. Only finished runs (successful or failed) are included in the items array — runs that are still executing are omitted. Returns 404 if the batch doesn't exist. */
1781
+ export const getBatchResultsV1 = /*@__PURE__*/ API.make(() => ({
1782
+ input: GetBatchResultsV1Request,
1783
+ output: GetBatchResultsV1Response,
1784
+ errors: [NotFound, UnknownTriggerDevError],
1785
+ protocol: TriggerDevProtocol,
1786
+ retry: Retry.Retry,
1787
+ }));
1788
+ /** Retrieve a batch Retrieve a batch by its ID, including its status and the IDs of all runs in the batch. */
1789
+ export const getBatchV1 = /*@__PURE__*/ API.make(() => ({
1790
+ input: GetBatchV1Request,
1791
+ output: GetBatchV1Response,
1792
+ errors: [NotFound, UnknownTriggerDevError],
1793
+ protocol: TriggerDevProtocol,
1794
+ retry: Retry.Retry,
1795
+ }));
1796
+ /** Retrieve bulk action Retrieve the status and aggregate processing counts for a bulk action. */
1797
+ export const getBulkActionV1 = /*@__PURE__*/ API.make(() => ({
1798
+ input: GetBulkActionV1Request,
1799
+ output: BulkActionObject,
1800
+ errors: [NotFound, UnknownTriggerDevError],
1801
+ protocol: TriggerDevProtocol,
1802
+ retry: Retry.Retry,
1803
+ }));
1804
+ /** Get deployment Retrieve information about a specific deployment by its ID. */
1805
+ export const getDeploymentV1 = /*@__PURE__*/ API.make(() => ({
1806
+ input: GetDeploymentV1Request,
1807
+ output: GetDeploymentV1Response,
1808
+ errors: [NotFound, UnknownTriggerDevError],
1809
+ protocol: TriggerDevProtocol,
1810
+ retry: Retry.Retry,
1811
+ }));
1812
+ /** Retrieve an error Retrieve detailed information about a single error group, including its lifecycle state and the worker versions it has affected. */
1813
+ export const getErrorV1 = /*@__PURE__*/ API.make(() => ({
1814
+ input: GetErrorV1Request,
1815
+ output: ErrorObject,
1816
+ errors: [NotFound, UnknownTriggerDevError],
1817
+ protocol: TriggerDevProtocol,
1818
+ retry: Retry.Retry,
1819
+ }));
1820
+ /** Get latest deployment Retrieve information about the latest unmanaged deployment for the authenticated project. */
1821
+ export const getLatestDeploymentV1 = /*@__PURE__*/ API.make(() => ({
1822
+ input: GetLatestDeploymentV1Request,
1823
+ output: GetLatestDeploymentV1Response,
1824
+ errors: [NotFound, UnknownTriggerDevError],
1825
+ protocol: TriggerDevProtocol,
1826
+ retry: Retry.Retry,
1827
+ }));
1828
+ /** Retrieve environment variable Retrieve a specific environment variable for a specific project and environment. */
1829
+ export const getProjectEnvvarV1 = /*@__PURE__*/ API.make(() => ({
1830
+ input: GetProjectEnvvarV1Request,
1831
+ output: EnvVarValue,
1832
+ errors: [BadRequest, NotFound, UnknownTriggerDevError],
1833
+ protocol: TriggerDevProtocol,
1834
+ retry: Retry.Retry,
1835
+ }));
1836
+ /** Get query schema Get the schema for TRQL queries, including all available tables, their columns, data types, descriptions, and allowed values. */
1837
+ export const getQuerySchemaV1 = /*@__PURE__*/ API.make(() => ({
1838
+ input: GetQuerySchemaV1Request,
1839
+ output: GetQuerySchemaV1Response,
1840
+ errors: [UnknownTriggerDevError],
1841
+ protocol: TriggerDevProtocol,
1842
+ retry: Retry.Retry,
1843
+ }));
1844
+ /** Retrieve a queue Get a queue by its ID, or by type and name. */
1845
+ export const getQueueV1 = /*@__PURE__*/ API.make(() => ({
1846
+ input: GetQueueV1Request,
1847
+ output: QueueObject,
1848
+ errors: [NotFound, UnknownTriggerDevError],
1849
+ protocol: TriggerDevProtocol,
1850
+ retry: Retry.Retry,
1851
+ }));
1852
+ /** Retrieve run events Returns all OTel span events for a run. Useful for debugging and observability. */
1853
+ export const getRunEventsV1 = /*@__PURE__*/ API.make(() => ({
1854
+ input: GetRunEventsV1Request,
1855
+ output: GetRunEventsV1Response,
1856
+ errors: [NotFound, UnknownTriggerDevError],
1857
+ protocol: TriggerDevProtocol,
1858
+ retry: Retry.Retry,
1859
+ }));
1860
+ /** Retrieve run result Returns the execution result of a completed run. Returns 404 if the run doesn't exist or hasn't finished yet. */
1861
+ export const getRunResultV1 = /*@__PURE__*/ API.make(() => ({
1862
+ input: GetRunResultV1Request,
1863
+ output: GetRunResultV1Response,
1864
+ errors: [NotFound, UnknownTriggerDevError],
1865
+ protocol: TriggerDevProtocol,
1866
+ retry: Retry.Retry,
1867
+ }));
1868
+ /** 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. */
1869
+ export const getRunTraceV1 = /*@__PURE__*/ API.make(() => ({
1870
+ input: GetRunTraceV1Request,
1871
+ output: GetRunTraceV1Response,
1872
+ errors: [NotFound, UnknownTriggerDevError],
1873
+ protocol: TriggerDevProtocol,
1874
+ retry: Retry.Retry,
1875
+ }));
1876
+ /** 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. */
1877
+ export const getRunV1 = /*@__PURE__*/ API.make(() => ({
1878
+ input: GetRunV1Request,
1879
+ output: GetRunV1Response,
1880
+ errors: [BadRequest, NotFound, UnknownTriggerDevError],
1881
+ protocol: TriggerDevProtocol,
1882
+ retry: Retry.Retry,
1883
+ }));
1884
+ /** Retrieve Schedule Get a schedule by its ID. */
1885
+ export const getScheduleV1 = /*@__PURE__*/ API.make(() => ({
1886
+ input: GetScheduleV1Request,
1887
+ output: ScheduleObject,
1888
+ errors: [NotFound, UnknownTriggerDevError],
1889
+ protocol: TriggerDevProtocol,
1890
+ retry: Retry.Retry,
1891
+ }));
1892
+ /** Retrieve a session Retrieve a single session by its friendly id (`session_…`) or your `externalId`. The response includes `triggerConfig` and the friendly `currentRunId` of the live run, if any. */
1893
+ export const getSessionV1 = /*@__PURE__*/ API.make(() => ({
1894
+ input: GetSessionV1Request,
1895
+ output: SessionObject,
1896
+ errors: [NotFound, UnknownTriggerDevError],
1897
+ protocol: TriggerDevProtocol,
1898
+ retry: Retry.Retry,
1899
+ }));
1900
+ /** Get all supported timezones Get all supported timezones that schedule tasks support. */
1901
+ export const getTimezonesV1 = /*@__PURE__*/ API.make(() => ({
1902
+ input: GetTimezonesV1Request,
1903
+ output: GetTimezonesResult,
1904
+ errors: [UnknownTriggerDevError],
1905
+ protocol: TriggerDevProtocol,
1906
+ retry: Retry.Retry,
1907
+ }));
1908
+ /** Retrieve a waitpoint token Retrieves a waitpoint token by its ID, including its current status and output if it has been completed. */
1909
+ export const getWaitpointTokenV1 = /*@__PURE__*/ API.make(() => ({
1910
+ input: GetWaitpointTokenV1Request,
1911
+ output: WaitpointTokenObject,
1912
+ errors: [NotFound, UnknownTriggerDevError],
1913
+ protocol: TriggerDevProtocol,
1914
+ retry: Retry.Retry,
1915
+ }));
1916
+ /** 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). */
1917
+ export const ignoreErrorV1 = /*@__PURE__*/ API.make(() => ({
1918
+ input: IgnoreErrorV1Request,
1919
+ output: ErrorObject,
1920
+ errors: [NotFound, UnknownTriggerDevError],
1921
+ protocol: TriggerDevProtocol,
1922
+ retry: Retry.Retry,
1923
+ }));
1924
+ /** List bulk actions List bulk actions in the current environment. Bulk actions are returned newest first and can be paginated with cursor pagination. */
1925
+ export const listBulkActionsV1 = /*@__PURE__*/ API.make(() => ({
1926
+ input: ListBulkActionsV1Request,
1927
+ output: ListBulkActionsResult,
1928
+ errors: [BadRequest, UnknownTriggerDevError],
1929
+ protocol: TriggerDevProtocol,
1930
+ retry: Retry.Retry,
1931
+ }));
1932
+ /** 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. */
1933
+ export const listDashboardsV1 = /*@__PURE__*/ API.make(() => ({
1934
+ input: ListDashboardsV1Request,
1935
+ output: ListDashboardsV1Response,
1936
+ errors: [UnknownTriggerDevError],
1937
+ protocol: TriggerDevProtocol,
1938
+ retry: Retry.Retry,
1939
+ }));
1940
+ /** List deployments List deployments for the authenticated environment, ordered by most recent first. */
1941
+ export const listDeploymentsV1 = /*@__PURE__*/ API.make(() => ({
1942
+ input: ListDeploymentsV1Request,
1943
+ output: ListDeploymentsV1Response,
1944
+ errors: [UnknownTriggerDevError],
1945
+ protocol: TriggerDevProtocol,
1946
+ retry: Retry.Retry,
1947
+ }));
1948
+ /** List errors List error groups in a specific environment. Runs that fail are grouped by a fingerprint derived from the error type, message, and stack trace. Filter by task identifier, version, status, search text, and time range. */
1949
+ export const listErrorsV1 = /*@__PURE__*/ API.make(() => ({
1950
+ input: ListErrorsV1Request,
1951
+ output: ListErrorsResult,
1952
+ errors: [BadRequest, UnknownTriggerDevError],
1953
+ protocol: TriggerDevProtocol,
1954
+ retry: Retry.Retry,
1955
+ }));
1956
+ /** List environment variables List all environment variables for a specific project and environment. */
1957
+ export const listProjectEnvvarsV1 = /*@__PURE__*/ API.make(() => ({
1958
+ input: ListProjectEnvvarsV1Request,
1959
+ output: ListProjectEnvvarsV1Response,
1960
+ errors: [BadRequest, NotFound, UnknownTriggerDevError],
1961
+ protocol: TriggerDevProtocol,
1962
+ retry: Retry.Retry,
1963
+ }));
1964
+ /** List project runs List runs in a project, across multiple environments, using Personal Access Token auth. You can filter the runs by status, created at, task identifier, version, and more. */
1965
+ export const listProjectRunsV1 = /*@__PURE__*/ API.make(() => ({
1966
+ input: ListProjectRunsV1Request,
1967
+ output: ListRunsResult,
1968
+ errors: [BadRequest, UnknownTriggerDevError],
1969
+ protocol: TriggerDevProtocol,
1970
+ retry: Retry.Retry,
1971
+ }));
1972
+ /** List all queues List all queues in your environment with pagination support. */
1973
+ export const listQueuesV1 = /*@__PURE__*/ API.make(() => ({
1974
+ input: ListQueuesV1Request,
1975
+ output: ListQueuesResult,
1976
+ errors: [UnknownTriggerDevError],
1977
+ protocol: TriggerDevProtocol,
1978
+ retry: Retry.Retry,
1979
+ }));
1980
+ /** List runs List runs in a specific environment. You can filter the runs by status, created at, task identifier, version, and more. */
1981
+ export const listRunsV1 = /*@__PURE__*/ API.make(() => ({
1982
+ input: ListRunsV1Request,
1983
+ output: ListRunsResult,
1984
+ errors: [BadRequest, UnknownTriggerDevError],
1985
+ protocol: TriggerDevProtocol,
1986
+ retry: Retry.Retry,
1987
+ }));
1988
+ /** List all schedules List all schedules. You can also paginate the results. */
1989
+ export const listSchedulesV1 = /*@__PURE__*/ API.make(() => ({
1990
+ input: ListSchedulesV1Request,
1991
+ output: ListSchedulesResult,
1992
+ errors: [UnknownTriggerDevError],
1993
+ protocol: TriggerDevProtocol,
1994
+ retry: Retry.Retry,
1995
+ }));
1996
+ /** List sessions List sessions in the current environment, newest first. Filter by type, tags, task identifier, external id, status, and creation window. Use cursor-based pagination with `page[after]` and `page[before]` to navigate pages. List rows omit `triggerConfig`; retrieve a single session to read it. */
1997
+ export const listSessionsV1 = /*@__PURE__*/ API.make(() => ({
1998
+ input: ListSessionsV1Request,
1999
+ output: ListSessionsResult,
2000
+ errors: [BadRequest, UnknownTriggerDevError],
2001
+ protocol: TriggerDevProtocol,
2002
+ retry: Retry.Retry,
2003
+ }));
2004
+ /** 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. */
2005
+ export const listWaitpointTokensV1 = /*@__PURE__*/ API.make(() => ({
2006
+ input: ListWaitpointTokensV1Request,
2007
+ output: ListWaitpointTokensResult,
2008
+ errors: [UnprocessableEntity, UnknownTriggerDevError],
2009
+ protocol: TriggerDevProtocol,
2010
+ retry: Retry.Retry,
2011
+ }));
2012
+ /** Override queue concurrency limit Override the concurrency limit of a queue. This is useful for temporarily scaling up or down based on demand. */
2013
+ export const overrideQueueConcurrencyV1 = /*@__PURE__*/ API.make(() => ({
2014
+ input: OverrideQueueConcurrencyV1Request,
2015
+ output: QueueObject,
2016
+ errors: [BadRequest, NotFound, UnknownTriggerDevError],
2017
+ protocol: TriggerDevProtocol,
2018
+ retry: Retry.Retry,
2019
+ }));
2020
+ /** Pause or resume a queue Pause a queue to prevent new runs from starting, or resume a paused queue. Runs that are currently executing will continue to completion. */
2021
+ export const pauseQueueV1 = /*@__PURE__*/ API.make(() => ({
2022
+ input: PauseQueueV1Request,
2023
+ output: QueueObject,
2024
+ errors: [BadRequest, NotFound, UnknownTriggerDevError],
2025
+ protocol: TriggerDevProtocol,
2026
+ retry: Retry.Retry,
2027
+ }));
2028
+ /** 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. */
2029
+ export const promoteDeploymentV1 = /*@__PURE__*/ API.make(() => ({
2030
+ input: PromoteDeploymentV1Request,
2031
+ output: PromoteDeploymentV1Response,
2032
+ errors: [BadRequest, NotFound, UnknownTriggerDevError],
2033
+ protocol: TriggerDevProtocol,
2034
+ retry: Retry.Retry,
2035
+ }));
2036
+ /** Reset queue concurrency limit Reset the concurrency limit of a queue back to its base value defined in code. */
2037
+ export const resetQueueConcurrencyV1 = /*@__PURE__*/ API.make(() => ({
2038
+ input: ResetQueueConcurrencyV1Request,
2039
+ output: QueueObject,
2040
+ errors: [BadRequest, NotFound, UnknownTriggerDevError],
2041
+ protocol: TriggerDevProtocol,
2042
+ retry: Retry.Retry,
2043
+ }));
2044
+ /** 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). */
2045
+ export const resolveErrorV1 = /*@__PURE__*/ API.make(() => ({
2046
+ input: ResolveErrorV1Request,
2047
+ output: ErrorObject,
2048
+ errors: [NotFound, UnknownTriggerDevError],
2049
+ protocol: TriggerDevProtocol,
2050
+ retry: Retry.Retry,
2051
+ }));
2052
+ /** Replay a run Creates a new run with the same payload and options as the original run. */
2053
+ export const runReplayV1 = /*@__PURE__*/ API.make(() => ({
2054
+ input: RunReplayV1Request,
2055
+ output: RunReplayV1Response,
2056
+ errors: [BadRequest, NotFound, UnknownTriggerDevError],
2057
+ protocol: TriggerDevProtocol,
2058
+ retry: Retry.Retry,
2059
+ }));
2060
+ /** Rescheduled a delayed run Updates a delayed run with a new delay. Only valid when the run is in the DELAYED state. */
2061
+ export const runRescheduleV1 = /*@__PURE__*/ API.make(() => ({
2062
+ input: RunRescheduleV1Request,
2063
+ output: RunRescheduleV1Response,
2064
+ errors: [BadRequest, NotFound, UnknownTriggerDevError],
2065
+ protocol: TriggerDevProtocol,
2066
+ retry: Retry.Retry,
2067
+ }));
2068
+ /** 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. */
2069
+ export const triggerBatchTaskByIdV1 = /*@__PURE__*/ API.make(() => ({
2070
+ input: TriggerBatchTaskByIdV1Request,
2071
+ output: BatchTriggerTaskResponse,
2072
+ errors: [BadRequest, NotFound, UnknownTriggerDevError],
2073
+ protocol: TriggerDevProtocol,
2074
+ retry: Retry.Retry,
2075
+ }));
2076
+ /** Batch trigger tasks Batch trigger tasks with up to 1,000 payloads with SDK 4.3.1+ (500 in prior versions). */
2077
+ export const triggerBatchTaskV1 = /*@__PURE__*/ API.make(() => ({
2078
+ input: TriggerBatchTaskV1Request,
2079
+ output: BatchTriggerTaskResponse,
2080
+ errors: [BadRequest, NotFound, UnknownTriggerDevError],
2081
+ protocol: TriggerDevProtocol,
2082
+ retry: Retry.Retry,
2083
+ }));
2084
+ /** Trigger a task Trigger a task by its identifier. */
2085
+ export const triggerTaskV1 = /*@__PURE__*/ API.make(() => ({
2086
+ input: TriggerTaskV1Request,
2087
+ output: TriggerTaskResponse,
2088
+ errors: [BadRequest, NotFound, UnknownTriggerDevError],
2089
+ protocol: TriggerDevProtocol,
2090
+ retry: Retry.Retry,
2091
+ }));
2092
+ /** Unresolve an error Move a resolved or ignored error group back to unresolved. */
2093
+ export const unresolveErrorV1 = /*@__PURE__*/ API.make(() => ({
2094
+ input: UnresolveErrorV1Request,
2095
+ output: ErrorObject,
2096
+ errors: [NotFound, UnknownTriggerDevError],
2097
+ protocol: TriggerDevProtocol,
2098
+ retry: Retry.Retry,
2099
+ }));
2100
+ /** Update environment variable Update a specific environment variable for a specific project and environment. */
2101
+ export const updateProjectEnvvarV1 = /*@__PURE__*/ API.make(() => ({
2102
+ input: UpdateProjectEnvvarV1Request,
2103
+ output: SucceedResponse,
2104
+ errors: [BadRequest, NotFound, UnknownTriggerDevError],
2105
+ protocol: TriggerDevProtocol,
2106
+ retry: Retry.Retry,
2107
+ }));
2108
+ /** Update run metadata Update the metadata of a run. */
2109
+ export const updateRunMetadataV1 = /*@__PURE__*/ API.make(() => ({
2110
+ input: UpdateRunMetadataV1Request,
2111
+ output: UpdateRunMetadataV1Response,
2112
+ errors: [BadRequest, NotFound, UnknownTriggerDevError],
2113
+ protocol: TriggerDevProtocol,
2114
+ retry: Retry.Retry,
2115
+ }));
2116
+ /** Update Schedule Update 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()`. */
2117
+ export const updateScheduleV1 = /*@__PURE__*/ API.make(() => ({
2118
+ input: UpdateScheduleV1Request,
2119
+ output: ScheduleObject,
2120
+ errors: [BadRequest, NotFound, UnprocessableEntity, UnknownTriggerDevError],
2121
+ protocol: TriggerDevProtocol,
2122
+ retry: Retry.Retry,
2123
+ }));
2124
+ /** Update a session Update a session's `tags` or `metadata`. Pass `metadata: null` to clear it. Requires a secret key — a session public token cannot update a session. `externalId` is read-only after create: it 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 accepted as a no-op. */
2125
+ export const updateSessionV1 = /*@__PURE__*/ API.make(() => ({
2126
+ input: UpdateSessionV1Request,
2127
+ output: SessionObject,
2128
+ errors: [NotFound, UnprocessableEntity, UnknownTriggerDevError],
2129
+ protocol: TriggerDevProtocol,
2130
+ retry: Retry.Retry,
2131
+ }));
2132
+ /** Upload environment variables Upload mulitple environment variables for a specific project and environment. */
2133
+ export const uploadProjectEnvvarsV1 = /*@__PURE__*/ API.make(() => ({
2134
+ input: UploadProjectEnvvarsV1Request,
2135
+ output: SucceedResponse,
2136
+ errors: [BadRequest, NotFound, UnknownTriggerDevError],
2137
+ protocol: TriggerDevProtocol,
2138
+ retry: Retry.Retry,
2139
+ }));
2140
+ //# sourceMappingURL=trigger-dev.js.map