@lineai/agent-platform-types 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,584 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Persisted records returned by the agent platform API. These represent
4
+ * Firestore documents the orchestrator owns:
5
+ *
6
+ * organizations/{orgId}/projects/{projectId}/services/agent-platform/
7
+ * tasks/{taskId} ← TaskRecord
8
+ * tasks/{taskId}/runs/{runId} ← RunRecord
9
+ */
10
+ export declare const TaskStatusSchema: z.ZodEnum<["pending", "running", "succeeded", "failed", "cancelled"]>;
11
+ export type TaskStatus = z.infer<typeof TaskStatusSchema>;
12
+ export declare const RunStatusSchema: z.ZodEnum<["running", "succeeded", "failed"]>;
13
+ export type RunStatus = z.infer<typeof RunStatusSchema>;
14
+ export declare const RunMetricsSchema: z.ZodObject<{
15
+ turns: z.ZodNumber;
16
+ durationMs: z.ZodNumber;
17
+ tokens: z.ZodOptional<z.ZodObject<{
18
+ input: z.ZodNumber;
19
+ output: z.ZodNumber;
20
+ cacheRead: z.ZodOptional<z.ZodNumber>;
21
+ cacheCreation: z.ZodOptional<z.ZodNumber>;
22
+ source: z.ZodEnum<["sdk", "reconciled"]>;
23
+ }, "strip", z.ZodTypeAny, {
24
+ input: number;
25
+ output: number;
26
+ source: "sdk" | "reconciled";
27
+ cacheRead?: number | undefined;
28
+ cacheCreation?: number | undefined;
29
+ }, {
30
+ input: number;
31
+ output: number;
32
+ source: "sdk" | "reconciled";
33
+ cacheRead?: number | undefined;
34
+ cacheCreation?: number | undefined;
35
+ }>>;
36
+ }, "strip", z.ZodTypeAny, {
37
+ turns: number;
38
+ durationMs: number;
39
+ tokens?: {
40
+ input: number;
41
+ output: number;
42
+ source: "sdk" | "reconciled";
43
+ cacheRead?: number | undefined;
44
+ cacheCreation?: number | undefined;
45
+ } | undefined;
46
+ }, {
47
+ turns: number;
48
+ durationMs: number;
49
+ tokens?: {
50
+ input: number;
51
+ output: number;
52
+ source: "sdk" | "reconciled";
53
+ cacheRead?: number | undefined;
54
+ cacheCreation?: number | undefined;
55
+ } | undefined;
56
+ }>;
57
+ export type RunMetrics = z.infer<typeof RunMetricsSchema>;
58
+ export declare const RunRecordSchema: z.ZodObject<{
59
+ id: z.ZodString;
60
+ taskId: z.ZodString;
61
+ status: z.ZodEnum<["running", "succeeded", "failed"]>;
62
+ sessionId: z.ZodOptional<z.ZodString>;
63
+ jobName: z.ZodOptional<z.ZodString>;
64
+ startedAt: z.ZodString;
65
+ completedAt: z.ZodOptional<z.ZodString>;
66
+ result: z.ZodOptional<z.ZodString>;
67
+ error: z.ZodOptional<z.ZodString>;
68
+ artifacts: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
69
+ metrics: z.ZodObject<{
70
+ turns: z.ZodNumber;
71
+ durationMs: z.ZodNumber;
72
+ tokens: z.ZodOptional<z.ZodObject<{
73
+ input: z.ZodNumber;
74
+ output: z.ZodNumber;
75
+ cacheRead: z.ZodOptional<z.ZodNumber>;
76
+ cacheCreation: z.ZodOptional<z.ZodNumber>;
77
+ source: z.ZodEnum<["sdk", "reconciled"]>;
78
+ }, "strip", z.ZodTypeAny, {
79
+ input: number;
80
+ output: number;
81
+ source: "sdk" | "reconciled";
82
+ cacheRead?: number | undefined;
83
+ cacheCreation?: number | undefined;
84
+ }, {
85
+ input: number;
86
+ output: number;
87
+ source: "sdk" | "reconciled";
88
+ cacheRead?: number | undefined;
89
+ cacheCreation?: number | undefined;
90
+ }>>;
91
+ }, "strip", z.ZodTypeAny, {
92
+ turns: number;
93
+ durationMs: number;
94
+ tokens?: {
95
+ input: number;
96
+ output: number;
97
+ source: "sdk" | "reconciled";
98
+ cacheRead?: number | undefined;
99
+ cacheCreation?: number | undefined;
100
+ } | undefined;
101
+ }, {
102
+ turns: number;
103
+ durationMs: number;
104
+ tokens?: {
105
+ input: number;
106
+ output: number;
107
+ source: "sdk" | "reconciled";
108
+ cacheRead?: number | undefined;
109
+ cacheCreation?: number | undefined;
110
+ } | undefined;
111
+ }>;
112
+ }, "strip", z.ZodTypeAny, {
113
+ status: "running" | "succeeded" | "failed";
114
+ id: string;
115
+ taskId: string;
116
+ startedAt: string;
117
+ artifacts: string[];
118
+ metrics: {
119
+ turns: number;
120
+ durationMs: number;
121
+ tokens?: {
122
+ input: number;
123
+ output: number;
124
+ source: "sdk" | "reconciled";
125
+ cacheRead?: number | undefined;
126
+ cacheCreation?: number | undefined;
127
+ } | undefined;
128
+ };
129
+ sessionId?: string | undefined;
130
+ jobName?: string | undefined;
131
+ completedAt?: string | undefined;
132
+ result?: string | undefined;
133
+ error?: string | undefined;
134
+ }, {
135
+ status: "running" | "succeeded" | "failed";
136
+ id: string;
137
+ taskId: string;
138
+ startedAt: string;
139
+ metrics: {
140
+ turns: number;
141
+ durationMs: number;
142
+ tokens?: {
143
+ input: number;
144
+ output: number;
145
+ source: "sdk" | "reconciled";
146
+ cacheRead?: number | undefined;
147
+ cacheCreation?: number | undefined;
148
+ } | undefined;
149
+ };
150
+ sessionId?: string | undefined;
151
+ jobName?: string | undefined;
152
+ completedAt?: string | undefined;
153
+ result?: string | undefined;
154
+ error?: string | undefined;
155
+ artifacts?: string[] | undefined;
156
+ }>;
157
+ export type RunRecord = z.infer<typeof RunRecordSchema>;
158
+ export declare const TaskRecordSchema: z.ZodObject<{
159
+ id: z.ZodString;
160
+ workflowId: z.ZodOptional<z.ZodString>;
161
+ status: z.ZodEnum<["pending", "running", "succeeded", "failed", "cancelled"]>;
162
+ createdAt: z.ZodString;
163
+ createdBy: z.ZodString;
164
+ idempotencyKey: z.ZodOptional<z.ZodString>;
165
+ definition: z.ZodRecord<z.ZodString, z.ZodUnknown>;
166
+ callbackUrl: z.ZodOptional<z.ZodString>;
167
+ orgId: z.ZodString;
168
+ projectId: z.ZodString;
169
+ }, "strip", z.ZodTypeAny, {
170
+ status: "pending" | "running" | "succeeded" | "failed" | "cancelled";
171
+ id: string;
172
+ createdBy: string;
173
+ definition: Record<string, unknown>;
174
+ createdAt: string;
175
+ orgId: string;
176
+ projectId: string;
177
+ idempotencyKey?: string | undefined;
178
+ callbackUrl?: string | undefined;
179
+ workflowId?: string | undefined;
180
+ }, {
181
+ status: "pending" | "running" | "succeeded" | "failed" | "cancelled";
182
+ id: string;
183
+ createdBy: string;
184
+ definition: Record<string, unknown>;
185
+ createdAt: string;
186
+ orgId: string;
187
+ projectId: string;
188
+ idempotencyKey?: string | undefined;
189
+ callbackUrl?: string | undefined;
190
+ workflowId?: string | undefined;
191
+ }>;
192
+ export type TaskRecord = z.infer<typeof TaskRecordSchema>;
193
+ export declare const TaskDetailResponseSchema: z.ZodObject<{
194
+ id: z.ZodString;
195
+ workflowId: z.ZodOptional<z.ZodString>;
196
+ status: z.ZodEnum<["pending", "running", "succeeded", "failed", "cancelled"]>;
197
+ createdAt: z.ZodString;
198
+ createdBy: z.ZodString;
199
+ idempotencyKey: z.ZodOptional<z.ZodString>;
200
+ definition: z.ZodRecord<z.ZodString, z.ZodUnknown>;
201
+ callbackUrl: z.ZodOptional<z.ZodString>;
202
+ orgId: z.ZodString;
203
+ projectId: z.ZodString;
204
+ } & {
205
+ latestRun: z.ZodOptional<z.ZodObject<{
206
+ id: z.ZodString;
207
+ taskId: z.ZodString;
208
+ status: z.ZodEnum<["running", "succeeded", "failed"]>;
209
+ sessionId: z.ZodOptional<z.ZodString>;
210
+ jobName: z.ZodOptional<z.ZodString>;
211
+ startedAt: z.ZodString;
212
+ completedAt: z.ZodOptional<z.ZodString>;
213
+ result: z.ZodOptional<z.ZodString>;
214
+ error: z.ZodOptional<z.ZodString>;
215
+ artifacts: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
216
+ metrics: z.ZodObject<{
217
+ turns: z.ZodNumber;
218
+ durationMs: z.ZodNumber;
219
+ tokens: z.ZodOptional<z.ZodObject<{
220
+ input: z.ZodNumber;
221
+ output: z.ZodNumber;
222
+ cacheRead: z.ZodOptional<z.ZodNumber>;
223
+ cacheCreation: z.ZodOptional<z.ZodNumber>;
224
+ source: z.ZodEnum<["sdk", "reconciled"]>;
225
+ }, "strip", z.ZodTypeAny, {
226
+ input: number;
227
+ output: number;
228
+ source: "sdk" | "reconciled";
229
+ cacheRead?: number | undefined;
230
+ cacheCreation?: number | undefined;
231
+ }, {
232
+ input: number;
233
+ output: number;
234
+ source: "sdk" | "reconciled";
235
+ cacheRead?: number | undefined;
236
+ cacheCreation?: number | undefined;
237
+ }>>;
238
+ }, "strip", z.ZodTypeAny, {
239
+ turns: number;
240
+ durationMs: number;
241
+ tokens?: {
242
+ input: number;
243
+ output: number;
244
+ source: "sdk" | "reconciled";
245
+ cacheRead?: number | undefined;
246
+ cacheCreation?: number | undefined;
247
+ } | undefined;
248
+ }, {
249
+ turns: number;
250
+ durationMs: number;
251
+ tokens?: {
252
+ input: number;
253
+ output: number;
254
+ source: "sdk" | "reconciled";
255
+ cacheRead?: number | undefined;
256
+ cacheCreation?: number | undefined;
257
+ } | undefined;
258
+ }>;
259
+ }, "strip", z.ZodTypeAny, {
260
+ status: "running" | "succeeded" | "failed";
261
+ id: string;
262
+ taskId: string;
263
+ startedAt: string;
264
+ artifacts: string[];
265
+ metrics: {
266
+ turns: number;
267
+ durationMs: number;
268
+ tokens?: {
269
+ input: number;
270
+ output: number;
271
+ source: "sdk" | "reconciled";
272
+ cacheRead?: number | undefined;
273
+ cacheCreation?: number | undefined;
274
+ } | undefined;
275
+ };
276
+ sessionId?: string | undefined;
277
+ jobName?: string | undefined;
278
+ completedAt?: string | undefined;
279
+ result?: string | undefined;
280
+ error?: string | undefined;
281
+ }, {
282
+ status: "running" | "succeeded" | "failed";
283
+ id: string;
284
+ taskId: string;
285
+ startedAt: string;
286
+ metrics: {
287
+ turns: number;
288
+ durationMs: number;
289
+ tokens?: {
290
+ input: number;
291
+ output: number;
292
+ source: "sdk" | "reconciled";
293
+ cacheRead?: number | undefined;
294
+ cacheCreation?: number | undefined;
295
+ } | undefined;
296
+ };
297
+ sessionId?: string | undefined;
298
+ jobName?: string | undefined;
299
+ completedAt?: string | undefined;
300
+ result?: string | undefined;
301
+ error?: string | undefined;
302
+ artifacts?: string[] | undefined;
303
+ }>>;
304
+ runs: z.ZodOptional<z.ZodArray<z.ZodObject<{
305
+ id: z.ZodString;
306
+ taskId: z.ZodString;
307
+ status: z.ZodEnum<["running", "succeeded", "failed"]>;
308
+ sessionId: z.ZodOptional<z.ZodString>;
309
+ jobName: z.ZodOptional<z.ZodString>;
310
+ startedAt: z.ZodString;
311
+ completedAt: z.ZodOptional<z.ZodString>;
312
+ result: z.ZodOptional<z.ZodString>;
313
+ error: z.ZodOptional<z.ZodString>;
314
+ artifacts: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
315
+ metrics: z.ZodObject<{
316
+ turns: z.ZodNumber;
317
+ durationMs: z.ZodNumber;
318
+ tokens: z.ZodOptional<z.ZodObject<{
319
+ input: z.ZodNumber;
320
+ output: z.ZodNumber;
321
+ cacheRead: z.ZodOptional<z.ZodNumber>;
322
+ cacheCreation: z.ZodOptional<z.ZodNumber>;
323
+ source: z.ZodEnum<["sdk", "reconciled"]>;
324
+ }, "strip", z.ZodTypeAny, {
325
+ input: number;
326
+ output: number;
327
+ source: "sdk" | "reconciled";
328
+ cacheRead?: number | undefined;
329
+ cacheCreation?: number | undefined;
330
+ }, {
331
+ input: number;
332
+ output: number;
333
+ source: "sdk" | "reconciled";
334
+ cacheRead?: number | undefined;
335
+ cacheCreation?: number | undefined;
336
+ }>>;
337
+ }, "strip", z.ZodTypeAny, {
338
+ turns: number;
339
+ durationMs: number;
340
+ tokens?: {
341
+ input: number;
342
+ output: number;
343
+ source: "sdk" | "reconciled";
344
+ cacheRead?: number | undefined;
345
+ cacheCreation?: number | undefined;
346
+ } | undefined;
347
+ }, {
348
+ turns: number;
349
+ durationMs: number;
350
+ tokens?: {
351
+ input: number;
352
+ output: number;
353
+ source: "sdk" | "reconciled";
354
+ cacheRead?: number | undefined;
355
+ cacheCreation?: number | undefined;
356
+ } | undefined;
357
+ }>;
358
+ }, "strip", z.ZodTypeAny, {
359
+ status: "running" | "succeeded" | "failed";
360
+ id: string;
361
+ taskId: string;
362
+ startedAt: string;
363
+ artifacts: string[];
364
+ metrics: {
365
+ turns: number;
366
+ durationMs: number;
367
+ tokens?: {
368
+ input: number;
369
+ output: number;
370
+ source: "sdk" | "reconciled";
371
+ cacheRead?: number | undefined;
372
+ cacheCreation?: number | undefined;
373
+ } | undefined;
374
+ };
375
+ sessionId?: string | undefined;
376
+ jobName?: string | undefined;
377
+ completedAt?: string | undefined;
378
+ result?: string | undefined;
379
+ error?: string | undefined;
380
+ }, {
381
+ status: "running" | "succeeded" | "failed";
382
+ id: string;
383
+ taskId: string;
384
+ startedAt: string;
385
+ metrics: {
386
+ turns: number;
387
+ durationMs: number;
388
+ tokens?: {
389
+ input: number;
390
+ output: number;
391
+ source: "sdk" | "reconciled";
392
+ cacheRead?: number | undefined;
393
+ cacheCreation?: number | undefined;
394
+ } | undefined;
395
+ };
396
+ sessionId?: string | undefined;
397
+ jobName?: string | undefined;
398
+ completedAt?: string | undefined;
399
+ result?: string | undefined;
400
+ error?: string | undefined;
401
+ artifacts?: string[] | undefined;
402
+ }>, "many">>;
403
+ }, "strip", z.ZodTypeAny, {
404
+ status: "pending" | "running" | "succeeded" | "failed" | "cancelled";
405
+ id: string;
406
+ createdBy: string;
407
+ definition: Record<string, unknown>;
408
+ createdAt: string;
409
+ orgId: string;
410
+ projectId: string;
411
+ idempotencyKey?: string | undefined;
412
+ callbackUrl?: string | undefined;
413
+ workflowId?: string | undefined;
414
+ latestRun?: {
415
+ status: "running" | "succeeded" | "failed";
416
+ id: string;
417
+ taskId: string;
418
+ startedAt: string;
419
+ artifacts: string[];
420
+ metrics: {
421
+ turns: number;
422
+ durationMs: number;
423
+ tokens?: {
424
+ input: number;
425
+ output: number;
426
+ source: "sdk" | "reconciled";
427
+ cacheRead?: number | undefined;
428
+ cacheCreation?: number | undefined;
429
+ } | undefined;
430
+ };
431
+ sessionId?: string | undefined;
432
+ jobName?: string | undefined;
433
+ completedAt?: string | undefined;
434
+ result?: string | undefined;
435
+ error?: string | undefined;
436
+ } | undefined;
437
+ runs?: {
438
+ status: "running" | "succeeded" | "failed";
439
+ id: string;
440
+ taskId: string;
441
+ startedAt: string;
442
+ artifacts: string[];
443
+ metrics: {
444
+ turns: number;
445
+ durationMs: number;
446
+ tokens?: {
447
+ input: number;
448
+ output: number;
449
+ source: "sdk" | "reconciled";
450
+ cacheRead?: number | undefined;
451
+ cacheCreation?: number | undefined;
452
+ } | undefined;
453
+ };
454
+ sessionId?: string | undefined;
455
+ jobName?: string | undefined;
456
+ completedAt?: string | undefined;
457
+ result?: string | undefined;
458
+ error?: string | undefined;
459
+ }[] | undefined;
460
+ }, {
461
+ status: "pending" | "running" | "succeeded" | "failed" | "cancelled";
462
+ id: string;
463
+ createdBy: string;
464
+ definition: Record<string, unknown>;
465
+ createdAt: string;
466
+ orgId: string;
467
+ projectId: string;
468
+ idempotencyKey?: string | undefined;
469
+ callbackUrl?: string | undefined;
470
+ workflowId?: string | undefined;
471
+ latestRun?: {
472
+ status: "running" | "succeeded" | "failed";
473
+ id: string;
474
+ taskId: string;
475
+ startedAt: string;
476
+ metrics: {
477
+ turns: number;
478
+ durationMs: number;
479
+ tokens?: {
480
+ input: number;
481
+ output: number;
482
+ source: "sdk" | "reconciled";
483
+ cacheRead?: number | undefined;
484
+ cacheCreation?: number | undefined;
485
+ } | undefined;
486
+ };
487
+ sessionId?: string | undefined;
488
+ jobName?: string | undefined;
489
+ completedAt?: string | undefined;
490
+ result?: string | undefined;
491
+ error?: string | undefined;
492
+ artifacts?: string[] | undefined;
493
+ } | undefined;
494
+ runs?: {
495
+ status: "running" | "succeeded" | "failed";
496
+ id: string;
497
+ taskId: string;
498
+ startedAt: string;
499
+ metrics: {
500
+ turns: number;
501
+ durationMs: number;
502
+ tokens?: {
503
+ input: number;
504
+ output: number;
505
+ source: "sdk" | "reconciled";
506
+ cacheRead?: number | undefined;
507
+ cacheCreation?: number | undefined;
508
+ } | undefined;
509
+ };
510
+ sessionId?: string | undefined;
511
+ jobName?: string | undefined;
512
+ completedAt?: string | undefined;
513
+ result?: string | undefined;
514
+ error?: string | undefined;
515
+ artifacts?: string[] | undefined;
516
+ }[] | undefined;
517
+ }>;
518
+ export type TaskDetailResponse = z.infer<typeof TaskDetailResponseSchema>;
519
+ export declare const TaskListResponseSchema: z.ZodObject<{
520
+ tasks: z.ZodArray<z.ZodObject<{
521
+ id: z.ZodString;
522
+ workflowId: z.ZodOptional<z.ZodString>;
523
+ status: z.ZodEnum<["pending", "running", "succeeded", "failed", "cancelled"]>;
524
+ createdAt: z.ZodString;
525
+ createdBy: z.ZodString;
526
+ idempotencyKey: z.ZodOptional<z.ZodString>;
527
+ definition: z.ZodRecord<z.ZodString, z.ZodUnknown>;
528
+ callbackUrl: z.ZodOptional<z.ZodString>;
529
+ orgId: z.ZodString;
530
+ projectId: z.ZodString;
531
+ }, "strip", z.ZodTypeAny, {
532
+ status: "pending" | "running" | "succeeded" | "failed" | "cancelled";
533
+ id: string;
534
+ createdBy: string;
535
+ definition: Record<string, unknown>;
536
+ createdAt: string;
537
+ orgId: string;
538
+ projectId: string;
539
+ idempotencyKey?: string | undefined;
540
+ callbackUrl?: string | undefined;
541
+ workflowId?: string | undefined;
542
+ }, {
543
+ status: "pending" | "running" | "succeeded" | "failed" | "cancelled";
544
+ id: string;
545
+ createdBy: string;
546
+ definition: Record<string, unknown>;
547
+ createdAt: string;
548
+ orgId: string;
549
+ projectId: string;
550
+ idempotencyKey?: string | undefined;
551
+ callbackUrl?: string | undefined;
552
+ workflowId?: string | undefined;
553
+ }>, "many">;
554
+ nextPageToken: z.ZodOptional<z.ZodString>;
555
+ }, "strip", z.ZodTypeAny, {
556
+ tasks: {
557
+ status: "pending" | "running" | "succeeded" | "failed" | "cancelled";
558
+ id: string;
559
+ createdBy: string;
560
+ definition: Record<string, unknown>;
561
+ createdAt: string;
562
+ orgId: string;
563
+ projectId: string;
564
+ idempotencyKey?: string | undefined;
565
+ callbackUrl?: string | undefined;
566
+ workflowId?: string | undefined;
567
+ }[];
568
+ nextPageToken?: string | undefined;
569
+ }, {
570
+ tasks: {
571
+ status: "pending" | "running" | "succeeded" | "failed" | "cancelled";
572
+ id: string;
573
+ createdBy: string;
574
+ definition: Record<string, unknown>;
575
+ createdAt: string;
576
+ orgId: string;
577
+ projectId: string;
578
+ idempotencyKey?: string | undefined;
579
+ callbackUrl?: string | undefined;
580
+ workflowId?: string | undefined;
581
+ }[];
582
+ nextPageToken?: string | undefined;
583
+ }>;
584
+ export type TaskListResponse = z.infer<typeof TaskListResponseSchema>;
@@ -0,0 +1,64 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Persisted records returned by the agent platform API. These represent
4
+ * Firestore documents the orchestrator owns:
5
+ *
6
+ * organizations/{orgId}/projects/{projectId}/services/agent-platform/
7
+ * tasks/{taskId} ← TaskRecord
8
+ * tasks/{taskId}/runs/{runId} ← RunRecord
9
+ */
10
+ export const TaskStatusSchema = z.enum([
11
+ 'pending',
12
+ 'running',
13
+ 'succeeded',
14
+ 'failed',
15
+ 'cancelled',
16
+ ]);
17
+ export const RunStatusSchema = z.enum(['running', 'succeeded', 'failed']);
18
+ export const RunMetricsSchema = z.object({
19
+ turns: z.number(),
20
+ durationMs: z.number(),
21
+ tokens: z
22
+ .object({
23
+ input: z.number(),
24
+ output: z.number(),
25
+ cacheRead: z.number().optional(),
26
+ cacheCreation: z.number().optional(),
27
+ source: z.enum(['sdk', 'reconciled']),
28
+ })
29
+ .optional(),
30
+ });
31
+ export const RunRecordSchema = z.object({
32
+ id: z.string(),
33
+ taskId: z.string(),
34
+ status: RunStatusSchema,
35
+ sessionId: z.string().optional(),
36
+ jobName: z.string().optional(),
37
+ startedAt: z.string(),
38
+ completedAt: z.string().optional(),
39
+ result: z.string().optional(),
40
+ error: z.string().optional(),
41
+ artifacts: z.array(z.string()).default([]),
42
+ metrics: RunMetricsSchema,
43
+ });
44
+ export const TaskRecordSchema = z.object({
45
+ id: z.string(),
46
+ workflowId: z.string().optional(),
47
+ status: TaskStatusSchema,
48
+ createdAt: z.string(),
49
+ createdBy: z.string(),
50
+ idempotencyKey: z.string().optional(),
51
+ definition: z.record(z.unknown()),
52
+ callbackUrl: z.string().optional(),
53
+ orgId: z.string(),
54
+ projectId: z.string(),
55
+ });
56
+ export const TaskDetailResponseSchema = TaskRecordSchema.extend({
57
+ latestRun: RunRecordSchema.optional(),
58
+ runs: z.array(RunRecordSchema).optional(),
59
+ });
60
+ export const TaskListResponseSchema = z.object({
61
+ tasks: z.array(TaskRecordSchema),
62
+ nextPageToken: z.string().optional(),
63
+ });
64
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVjb3Jkcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9yZWNvcmRzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxDQUFDLEVBQUUsTUFBTSxLQUFLLENBQUM7QUFFeEI7Ozs7Ozs7R0FPRztBQUVILE1BQU0sQ0FBQyxNQUFNLGdCQUFnQixHQUFHLENBQUMsQ0FBQyxJQUFJLENBQUM7SUFDckMsU0FBUztJQUNULFNBQVM7SUFDVCxXQUFXO0lBQ1gsUUFBUTtJQUNSLFdBQVc7Q0FDWixDQUFDLENBQUM7QUFHSCxNQUFNLENBQUMsTUFBTSxlQUFlLEdBQUcsQ0FBQyxDQUFDLElBQUksQ0FBQyxDQUFDLFNBQVMsRUFBRSxXQUFXLEVBQUUsUUFBUSxDQUFDLENBQUMsQ0FBQztBQUcxRSxNQUFNLENBQUMsTUFBTSxnQkFBZ0IsR0FBRyxDQUFDLENBQUMsTUFBTSxDQUFDO0lBQ3ZDLEtBQUssRUFBRSxDQUFDLENBQUMsTUFBTSxFQUFFO0lBQ2pCLFVBQVUsRUFBRSxDQUFDLENBQU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