@devpad/api 2.3.2 → 2.3.3

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,2293 @@
1
+ import { InferSelectModel } from 'drizzle-orm';
2
+ import { z } from 'zod';
3
+ import { g as api_keys, t as project, D as todo_updates, f as action, A as ActionType, m as milestone, j as goal, x as task, i as codebase_tasks, y as task_link, v as tag, r as pipeline_run, s as pipeline_stage_event, n as pipeline_grant, q as pipeline_package, p as pipeline_analysis_template, o as pipeline_oidc_trust, h as apply_log, k as ignore_path, l as pipeline_approval, u as session, w as tag_config, z as task_rollup, B as task_tag, E as tracker_result, H as user } from './schema.d-D3xGKqB8.js';
4
+
5
+ declare const upsert_project: z.ZodObject<{
6
+ id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
7
+ project_id: z.ZodString;
8
+ owner_id: z.ZodOptional<z.ZodString>;
9
+ name: z.ZodString;
10
+ description: z.ZodNullable<z.ZodString>;
11
+ specification: z.ZodNullable<z.ZodString>;
12
+ repo_url: z.ZodNullable<z.ZodString>;
13
+ repo_id: z.ZodNullable<z.ZodNumber>;
14
+ icon_url: z.ZodNullable<z.ZodString>;
15
+ status: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"DEVELOPMENT">, z.ZodLiteral<"PAUSED">, z.ZodLiteral<"RELEASED">, z.ZodLiteral<"LIVE">, z.ZodLiteral<"FINISHED">, z.ZodLiteral<"ABANDONED">, z.ZodLiteral<"STOPPED">]>>;
16
+ deleted: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
17
+ link_url: z.ZodNullable<z.ZodString>;
18
+ link_text: z.ZodNullable<z.ZodString>;
19
+ visibility: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"PUBLIC">, z.ZodLiteral<"PRIVATE">, z.ZodLiteral<"HIDDEN">, z.ZodLiteral<"ARCHIVED">, z.ZodLiteral<"DRAFT">, z.ZodLiteral<"DELETED">]>>;
20
+ current_version: z.ZodNullable<z.ZodString>;
21
+ force: z.ZodOptional<z.ZodBoolean>;
22
+ }, "strip", z.ZodTypeAny, {
23
+ name: string;
24
+ deleted: boolean;
25
+ project_id: string;
26
+ description: string | null;
27
+ specification: string | null;
28
+ repo_url: string | null;
29
+ repo_id: number | null;
30
+ icon_url: string | null;
31
+ link_url: string | null;
32
+ link_text: string | null;
33
+ current_version: string | null;
34
+ id?: string | null | undefined;
35
+ status?: "DEVELOPMENT" | "PAUSED" | "RELEASED" | "LIVE" | "FINISHED" | "ABANDONED" | "STOPPED" | undefined;
36
+ owner_id?: string | undefined;
37
+ visibility?: "PUBLIC" | "PRIVATE" | "HIDDEN" | "ARCHIVED" | "DRAFT" | "DELETED" | undefined;
38
+ force?: boolean | undefined;
39
+ }, {
40
+ name: string;
41
+ project_id: string;
42
+ description: string | null;
43
+ specification: string | null;
44
+ repo_url: string | null;
45
+ repo_id: number | null;
46
+ icon_url: string | null;
47
+ link_url: string | null;
48
+ link_text: string | null;
49
+ current_version: string | null;
50
+ id?: string | null | undefined;
51
+ status?: "DEVELOPMENT" | "PAUSED" | "RELEASED" | "LIVE" | "FINISHED" | "ABANDONED" | "STOPPED" | undefined;
52
+ deleted?: boolean | undefined;
53
+ owner_id?: string | undefined;
54
+ visibility?: "PUBLIC" | "PRIVATE" | "HIDDEN" | "ARCHIVED" | "DRAFT" | "DELETED" | undefined;
55
+ force?: boolean | undefined;
56
+ }>;
57
+ declare const upsert_todo: z.ZodObject<{
58
+ id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
59
+ title: z.ZodOptional<z.ZodString>;
60
+ summary: z.ZodNullable<z.ZodOptional<z.ZodString>>;
61
+ description: z.ZodNullable<z.ZodOptional<z.ZodString>>;
62
+ progress: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"UNSTARTED">, z.ZodLiteral<"IN_PROGRESS">, z.ZodLiteral<"COMPLETED">]>>;
63
+ visibility: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"PUBLIC">, z.ZodLiteral<"PRIVATE">, z.ZodLiteral<"HIDDEN">, z.ZodLiteral<"ARCHIVED">, z.ZodLiteral<"DRAFT">, z.ZodLiteral<"DELETED">]>>;
64
+ start_time: z.ZodNullable<z.ZodOptional<z.ZodString>>;
65
+ end_time: z.ZodNullable<z.ZodOptional<z.ZodString>>;
66
+ priority: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"LOW">, z.ZodLiteral<"MEDIUM">, z.ZodLiteral<"HIGH">]>>;
67
+ owner_id: z.ZodString;
68
+ project_id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
69
+ goal_id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
70
+ parent_id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
71
+ rank: z.ZodOptional<z.ZodString>;
72
+ kind: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"task">, z.ZodLiteral<"phase">, z.ZodLiteral<"approval">]>>;
73
+ completion_policy: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"manual">, z.ZodLiteral<"auto_children">]>>;
74
+ force: z.ZodOptional<z.ZodBoolean>;
75
+ }, "strip", z.ZodTypeAny, {
76
+ owner_id: string;
77
+ id?: string | null | undefined;
78
+ kind?: "task" | "phase" | "approval" | undefined;
79
+ project_id?: string | null | undefined;
80
+ description?: string | null | undefined;
81
+ visibility?: "PUBLIC" | "PRIVATE" | "HIDDEN" | "ARCHIVED" | "DRAFT" | "DELETED" | undefined;
82
+ title?: string | undefined;
83
+ progress?: "UNSTARTED" | "IN_PROGRESS" | "COMPLETED" | undefined;
84
+ goal_id?: string | null | undefined;
85
+ start_time?: string | null | undefined;
86
+ end_time?: string | null | undefined;
87
+ summary?: string | null | undefined;
88
+ priority?: "LOW" | "MEDIUM" | "HIGH" | undefined;
89
+ parent_id?: string | null | undefined;
90
+ rank?: string | undefined;
91
+ completion_policy?: "manual" | "auto_children" | undefined;
92
+ force?: boolean | undefined;
93
+ }, {
94
+ owner_id: string;
95
+ id?: string | null | undefined;
96
+ kind?: "task" | "phase" | "approval" | undefined;
97
+ project_id?: string | null | undefined;
98
+ description?: string | null | undefined;
99
+ visibility?: "PUBLIC" | "PRIVATE" | "HIDDEN" | "ARCHIVED" | "DRAFT" | "DELETED" | undefined;
100
+ title?: string | undefined;
101
+ progress?: "UNSTARTED" | "IN_PROGRESS" | "COMPLETED" | undefined;
102
+ goal_id?: string | null | undefined;
103
+ start_time?: string | null | undefined;
104
+ end_time?: string | null | undefined;
105
+ summary?: string | null | undefined;
106
+ priority?: "LOW" | "MEDIUM" | "HIGH" | undefined;
107
+ parent_id?: string | null | undefined;
108
+ rank?: string | undefined;
109
+ completion_policy?: "manual" | "auto_children" | undefined;
110
+ force?: boolean | undefined;
111
+ }>;
112
+ declare const update_action: z.ZodUnion<[z.ZodLiteral<"CONFIRM">, z.ZodLiteral<"UNLINK">, z.ZodLiteral<"CREATE">, z.ZodLiteral<"IGNORE">, z.ZodLiteral<"DELETE">, z.ZodLiteral<"COMPLETE">]>;
113
+ declare const upsert_tag: z.ZodObject<{
114
+ id: z.ZodOptional<z.ZodString>;
115
+ title: z.ZodString;
116
+ color: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodLiteral<"red">, z.ZodLiteral<"green">, z.ZodLiteral<"blue">, z.ZodLiteral<"yellow">, z.ZodLiteral<"purple">, z.ZodLiteral<"orange">, z.ZodLiteral<"teal">, z.ZodLiteral<"pink">, z.ZodLiteral<"gray">, z.ZodLiteral<"cyan">, z.ZodLiteral<"lime">]>>>;
117
+ deleted: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
118
+ render: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
119
+ owner_id: z.ZodString;
120
+ }, "strip", z.ZodTypeAny, {
121
+ deleted: boolean;
122
+ owner_id: string;
123
+ title: string;
124
+ render: boolean;
125
+ id?: string | undefined;
126
+ color?: "red" | "green" | "blue" | "yellow" | "purple" | "orange" | "teal" | "pink" | "gray" | "cyan" | "lime" | null | undefined;
127
+ }, {
128
+ owner_id: string;
129
+ title: string;
130
+ id?: string | undefined;
131
+ deleted?: boolean | undefined;
132
+ color?: "red" | "green" | "blue" | "yellow" | "purple" | "orange" | "teal" | "pink" | "gray" | "cyan" | "lime" | null | undefined;
133
+ render?: boolean | undefined;
134
+ }>;
135
+ declare const project_config: z.ZodObject<{
136
+ tags: z.ZodArray<z.ZodObject<{
137
+ name: z.ZodString;
138
+ match: z.ZodArray<z.ZodString, "many">;
139
+ }, "strip", z.ZodTypeAny, {
140
+ name: string;
141
+ match: string[];
142
+ }, {
143
+ name: string;
144
+ match: string[];
145
+ }>, "many">;
146
+ ignore: z.ZodArray<z.ZodString, "many">;
147
+ }, "strip", z.ZodTypeAny, {
148
+ tags: {
149
+ name: string;
150
+ match: string[];
151
+ }[];
152
+ ignore: string[];
153
+ }, {
154
+ tags: {
155
+ name: string;
156
+ match: string[];
157
+ }[];
158
+ ignore: string[];
159
+ }>;
160
+ declare const save_config_request: z.ZodObject<{
161
+ id: z.ZodString;
162
+ config: z.ZodObject<{
163
+ tags: z.ZodArray<z.ZodObject<{
164
+ name: z.ZodString;
165
+ match: z.ZodArray<z.ZodString, "many">;
166
+ }, "strip", z.ZodTypeAny, {
167
+ name: string;
168
+ match: string[];
169
+ }, {
170
+ name: string;
171
+ match: string[];
172
+ }>, "many">;
173
+ ignore: z.ZodArray<z.ZodString, "many">;
174
+ }, "strip", z.ZodTypeAny, {
175
+ tags: {
176
+ name: string;
177
+ match: string[];
178
+ }[];
179
+ ignore: string[];
180
+ }, {
181
+ tags: {
182
+ name: string;
183
+ match: string[];
184
+ }[];
185
+ ignore: string[];
186
+ }>;
187
+ scan_branch: z.ZodOptional<z.ZodString>;
188
+ }, "strip", z.ZodTypeAny, {
189
+ id: string;
190
+ config: {
191
+ tags: {
192
+ name: string;
193
+ match: string[];
194
+ }[];
195
+ ignore: string[];
196
+ };
197
+ scan_branch?: string | undefined;
198
+ }, {
199
+ id: string;
200
+ config: {
201
+ tags: {
202
+ name: string;
203
+ match: string[];
204
+ }[];
205
+ ignore: string[];
206
+ };
207
+ scan_branch?: string | undefined;
208
+ }>;
209
+ declare const save_tags_request: z.ZodArray<z.ZodObject<{
210
+ id: z.ZodOptional<z.ZodString>;
211
+ title: z.ZodString;
212
+ color: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodLiteral<"red">, z.ZodLiteral<"green">, z.ZodLiteral<"blue">, z.ZodLiteral<"yellow">, z.ZodLiteral<"purple">, z.ZodLiteral<"orange">, z.ZodLiteral<"teal">, z.ZodLiteral<"pink">, z.ZodLiteral<"gray">, z.ZodLiteral<"cyan">, z.ZodLiteral<"lime">]>>>;
213
+ deleted: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
214
+ render: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
215
+ owner_id: z.ZodString;
216
+ }, "strip", z.ZodTypeAny, {
217
+ deleted: boolean;
218
+ owner_id: string;
219
+ title: string;
220
+ render: boolean;
221
+ id?: string | undefined;
222
+ color?: "red" | "green" | "blue" | "yellow" | "purple" | "orange" | "teal" | "pink" | "gray" | "cyan" | "lime" | null | undefined;
223
+ }, {
224
+ owner_id: string;
225
+ title: string;
226
+ id?: string | undefined;
227
+ deleted?: boolean | undefined;
228
+ color?: "red" | "green" | "blue" | "yellow" | "purple" | "orange" | "teal" | "pink" | "gray" | "cyan" | "lime" | null | undefined;
229
+ render?: boolean | undefined;
230
+ }>, "many">;
231
+ declare const update_user: z.ZodObject<{
232
+ id: z.ZodString;
233
+ name: z.ZodOptional<z.ZodString>;
234
+ image_url: z.ZodOptional<z.ZodString>;
235
+ task_view: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"list">, z.ZodLiteral<"grid">]>>;
236
+ email_verified: z.ZodOptional<z.ZodBoolean>;
237
+ }, "strip", z.ZodTypeAny, {
238
+ id: string;
239
+ name?: string | undefined;
240
+ task_view?: "list" | "grid" | undefined;
241
+ email_verified?: boolean | undefined;
242
+ image_url?: string | undefined;
243
+ }, {
244
+ id: string;
245
+ name?: string | undefined;
246
+ task_view?: "list" | "grid" | undefined;
247
+ email_verified?: boolean | undefined;
248
+ image_url?: string | undefined;
249
+ }>;
250
+ declare const config_schema: z.ZodObject<{
251
+ tags: z.ZodArray<z.ZodObject<{
252
+ name: z.ZodString;
253
+ match: z.ZodArray<z.ZodString, "many">;
254
+ }, "strip", z.ZodTypeAny, {
255
+ name: string;
256
+ match: string[];
257
+ }, {
258
+ name: string;
259
+ match: string[];
260
+ }>, "many">;
261
+ ignore: z.ZodArray<z.ZodString, "many">;
262
+ }, "strip", z.ZodTypeAny, {
263
+ tags: {
264
+ name: string;
265
+ match: string[];
266
+ }[];
267
+ ignore: string[];
268
+ }, {
269
+ tags: {
270
+ name: string;
271
+ match: string[];
272
+ }[];
273
+ ignore: string[];
274
+ }>;
275
+ declare const upsert_milestone: z.ZodObject<{
276
+ id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
277
+ project_id: z.ZodString;
278
+ name: z.ZodString;
279
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
280
+ target_time: z.ZodOptional<z.ZodNullable<z.ZodString>>;
281
+ target_version: z.ZodOptional<z.ZodNullable<z.ZodString>>;
282
+ finished_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
283
+ after_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
284
+ force: z.ZodOptional<z.ZodBoolean>;
285
+ }, "strip", z.ZodTypeAny, {
286
+ name: string;
287
+ project_id: string;
288
+ id?: string | null | undefined;
289
+ description?: string | null | undefined;
290
+ target_time?: string | null | undefined;
291
+ target_version?: string | null | undefined;
292
+ finished_at?: string | null | undefined;
293
+ after_id?: string | null | undefined;
294
+ force?: boolean | undefined;
295
+ }, {
296
+ name: string;
297
+ project_id: string;
298
+ id?: string | null | undefined;
299
+ description?: string | null | undefined;
300
+ target_time?: string | null | undefined;
301
+ target_version?: string | null | undefined;
302
+ finished_at?: string | null | undefined;
303
+ after_id?: string | null | undefined;
304
+ force?: boolean | undefined;
305
+ }>;
306
+ declare const upsert_goal: z.ZodObject<{
307
+ id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
308
+ milestone_id: z.ZodString;
309
+ name: z.ZodString;
310
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
311
+ target_time: z.ZodOptional<z.ZodNullable<z.ZodString>>;
312
+ finished_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
313
+ force: z.ZodOptional<z.ZodBoolean>;
314
+ }, "strip", z.ZodTypeAny, {
315
+ name: string;
316
+ milestone_id: string;
317
+ id?: string | null | undefined;
318
+ description?: string | null | undefined;
319
+ target_time?: string | null | undefined;
320
+ finished_at?: string | null | undefined;
321
+ force?: boolean | undefined;
322
+ }, {
323
+ name: string;
324
+ milestone_id: string;
325
+ id?: string | null | undefined;
326
+ description?: string | null | undefined;
327
+ target_time?: string | null | undefined;
328
+ finished_at?: string | null | undefined;
329
+ force?: boolean | undefined;
330
+ }>;
331
+ declare const rollout_shape: z.ZodUnion<[z.ZodLiteral<"gradual">, z.ZodLiteral<"atomic">]>;
332
+ type RolloutShapeZ = z.infer<typeof rollout_shape>;
333
+ declare const run_kind: z.ZodUnion<[z.ZodLiteral<"deploy">, z.ZodLiteral<"rollback">]>;
334
+ type RunKindZ = z.infer<typeof run_kind>;
335
+ declare const run_status: z.ZodUnion<[z.ZodLiteral<"queued">, z.ZodLiteral<"deploying">, z.ZodLiteral<"baking">, z.ZodLiteral<"awaiting_approval">, z.ZodLiteral<"rolling_back">, z.ZodLiteral<"completed">, z.ZodLiteral<"rolled_back">, z.ZodLiteral<"failed">, z.ZodLiteral<"cancelled">]>;
336
+ declare const forced_atomic_reason: z.ZodUnion<[z.ZodLiteral<"do_migrations">, z.ZodLiteral<"asset_affinity_none">]>;
337
+ declare const stage_event_kind: z.ZodUnion<[z.ZodLiteral<"deploy_started">, z.ZodLiteral<"deploy_completed">, z.ZodLiteral<"bake_started">, z.ZodLiteral<"bake_completed">, z.ZodLiteral<"gate_verdict">, z.ZodLiteral<"approval_requested">, z.ZodLiteral<"rollback_started">, z.ZodLiteral<"rollback_completed">, z.ZodLiteral<"warning">, z.ZodLiteral<"error">]>;
338
+ declare const approval_decision: z.ZodUnion<[z.ZodLiteral<"approved">, z.ZodLiteral<"denied">]>;
339
+ declare const grant_scope: z.ZodString;
340
+ declare const rollout_stage: z.ZodObject<{
341
+ name: z.ZodString;
342
+ traffic: z.ZodNumber;
343
+ bake: z.ZodNullable<z.ZodString>;
344
+ }, "strip", z.ZodTypeAny, {
345
+ name: string;
346
+ traffic: number;
347
+ bake: string | null;
348
+ }, {
349
+ name: string;
350
+ traffic: number;
351
+ bake: string | null;
352
+ }>;
353
+ declare const resolved_rollout: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
354
+ type: z.ZodLiteral<"gradual">;
355
+ stages: z.ZodArray<z.ZodObject<{
356
+ name: z.ZodString;
357
+ traffic: z.ZodNumber;
358
+ bake: z.ZodNullable<z.ZodString>;
359
+ }, "strip", z.ZodTypeAny, {
360
+ name: string;
361
+ traffic: number;
362
+ bake: string | null;
363
+ }, {
364
+ name: string;
365
+ traffic: number;
366
+ bake: string | null;
367
+ }>, "many">;
368
+ }, "strip", z.ZodTypeAny, {
369
+ type: "gradual";
370
+ stages: {
371
+ name: string;
372
+ traffic: number;
373
+ bake: string | null;
374
+ }[];
375
+ }, {
376
+ type: "gradual";
377
+ stages: {
378
+ name: string;
379
+ traffic: number;
380
+ bake: string | null;
381
+ }[];
382
+ }>, z.ZodObject<{
383
+ type: z.ZodLiteral<"atomic">;
384
+ }, "strip", z.ZodTypeAny, {
385
+ type: "atomic";
386
+ }, {
387
+ type: "atomic";
388
+ }>]>;
389
+ declare const gate_descriptor: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
390
+ type: z.ZodLiteral<"manual">;
391
+ }, "strip", z.ZodTypeAny, {
392
+ type: "manual";
393
+ }, {
394
+ type: "manual";
395
+ }>, z.ZodObject<{
396
+ type: z.ZodLiteral<"auto">;
397
+ afterBake: z.ZodOptional<z.ZodBoolean>;
398
+ }, "strip", z.ZodTypeAny, {
399
+ type: "auto";
400
+ afterBake?: boolean | undefined;
401
+ }, {
402
+ type: "auto";
403
+ afterBake?: boolean | undefined;
404
+ }>, z.ZodObject<{
405
+ type: z.ZodLiteral<"analysis">;
406
+ template: z.ZodString;
407
+ }, "strip", z.ZodTypeAny, {
408
+ type: "analysis";
409
+ template: string;
410
+ }, {
411
+ type: "analysis";
412
+ template: string;
413
+ }>]>;
414
+ declare const resolved_gates: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
415
+ type: z.ZodLiteral<"manual">;
416
+ }, "strip", z.ZodTypeAny, {
417
+ type: "manual";
418
+ }, {
419
+ type: "manual";
420
+ }>, z.ZodObject<{
421
+ type: z.ZodLiteral<"auto">;
422
+ afterBake: z.ZodOptional<z.ZodBoolean>;
423
+ }, "strip", z.ZodTypeAny, {
424
+ type: "auto";
425
+ afterBake?: boolean | undefined;
426
+ }, {
427
+ type: "auto";
428
+ afterBake?: boolean | undefined;
429
+ }>, z.ZodObject<{
430
+ type: z.ZodLiteral<"analysis">;
431
+ template: z.ZodString;
432
+ }, "strip", z.ZodTypeAny, {
433
+ type: "analysis";
434
+ template: string;
435
+ }, {
436
+ type: "analysis";
437
+ template: string;
438
+ }>]>>;
439
+ declare const upsert_pipeline_package: z.ZodObject<{
440
+ id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
441
+ owner_id: z.ZodString;
442
+ name: z.ZodString;
443
+ repo_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
444
+ default_template_ref: z.ZodOptional<z.ZodNullable<z.ZodString>>;
445
+ script_name_overrides: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
446
+ project_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
447
+ }, "strip", z.ZodTypeAny, {
448
+ name: string;
449
+ owner_id: string;
450
+ id?: string | null | undefined;
451
+ project_id?: string | null | undefined;
452
+ repo_url?: string | null | undefined;
453
+ default_template_ref?: string | null | undefined;
454
+ script_name_overrides?: Record<string, string> | null | undefined;
455
+ }, {
456
+ name: string;
457
+ owner_id: string;
458
+ id?: string | null | undefined;
459
+ project_id?: string | null | undefined;
460
+ repo_url?: string | null | undefined;
461
+ default_template_ref?: string | null | undefined;
462
+ script_name_overrides?: Record<string, string> | null | undefined;
463
+ }>;
464
+ declare const upsert_pipeline_run: z.ZodObject<{
465
+ id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
466
+ package_id: z.ZodString;
467
+ version_set_id: z.ZodString;
468
+ shape: z.ZodUnion<[z.ZodLiteral<"gradual">, z.ZodLiteral<"atomic">]>;
469
+ kind: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"deploy">, z.ZodLiteral<"rollback">]>>;
470
+ status: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"queued">, z.ZodLiteral<"deploying">, z.ZodLiteral<"baking">, z.ZodLiteral<"awaiting_approval">, z.ZodLiteral<"rolling_back">, z.ZodLiteral<"completed">, z.ZodLiteral<"rolled_back">, z.ZodLiteral<"failed">, z.ZodLiteral<"cancelled">]>>;
471
+ current_stage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
472
+ resolved_rollout: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
473
+ type: z.ZodLiteral<"gradual">;
474
+ stages: z.ZodArray<z.ZodObject<{
475
+ name: z.ZodString;
476
+ traffic: z.ZodNumber;
477
+ bake: z.ZodNullable<z.ZodString>;
478
+ }, "strip", z.ZodTypeAny, {
479
+ name: string;
480
+ traffic: number;
481
+ bake: string | null;
482
+ }, {
483
+ name: string;
484
+ traffic: number;
485
+ bake: string | null;
486
+ }>, "many">;
487
+ }, "strip", z.ZodTypeAny, {
488
+ type: "gradual";
489
+ stages: {
490
+ name: string;
491
+ traffic: number;
492
+ bake: string | null;
493
+ }[];
494
+ }, {
495
+ type: "gradual";
496
+ stages: {
497
+ name: string;
498
+ traffic: number;
499
+ bake: string | null;
500
+ }[];
501
+ }>, z.ZodObject<{
502
+ type: z.ZodLiteral<"atomic">;
503
+ }, "strip", z.ZodTypeAny, {
504
+ type: "atomic";
505
+ }, {
506
+ type: "atomic";
507
+ }>]>;
508
+ resolved_gates: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
509
+ type: z.ZodLiteral<"manual">;
510
+ }, "strip", z.ZodTypeAny, {
511
+ type: "manual";
512
+ }, {
513
+ type: "manual";
514
+ }>, z.ZodObject<{
515
+ type: z.ZodLiteral<"auto">;
516
+ afterBake: z.ZodOptional<z.ZodBoolean>;
517
+ }, "strip", z.ZodTypeAny, {
518
+ type: "auto";
519
+ afterBake?: boolean | undefined;
520
+ }, {
521
+ type: "auto";
522
+ afterBake?: boolean | undefined;
523
+ }>, z.ZodObject<{
524
+ type: z.ZodLiteral<"analysis">;
525
+ template: z.ZodString;
526
+ }, "strip", z.ZodTypeAny, {
527
+ type: "analysis";
528
+ template: string;
529
+ }, {
530
+ type: "analysis";
531
+ template: string;
532
+ }>]>>;
533
+ forced_atomic_reason: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodLiteral<"do_migrations">, z.ZodLiteral<"asset_affinity_none">]>>>;
534
+ started_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
535
+ finished_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
536
+ }, "strip", z.ZodTypeAny, {
537
+ package_id: string;
538
+ version_set_id: string;
539
+ shape: "gradual" | "atomic";
540
+ resolved_rollout: {
541
+ type: "gradual";
542
+ stages: {
543
+ name: string;
544
+ traffic: number;
545
+ bake: string | null;
546
+ }[];
547
+ } | {
548
+ type: "atomic";
549
+ };
550
+ resolved_gates: Record<string, {
551
+ type: "manual";
552
+ } | {
553
+ type: "auto";
554
+ afterBake?: boolean | undefined;
555
+ } | {
556
+ type: "analysis";
557
+ template: string;
558
+ }>;
559
+ id?: string | null | undefined;
560
+ status?: "queued" | "deploying" | "baking" | "awaiting_approval" | "rolling_back" | "completed" | "rolled_back" | "failed" | "cancelled" | undefined;
561
+ kind?: "deploy" | "rollback" | undefined;
562
+ finished_at?: string | null | undefined;
563
+ current_stage?: string | null | undefined;
564
+ forced_atomic_reason?: "do_migrations" | "asset_affinity_none" | null | undefined;
565
+ started_at?: string | null | undefined;
566
+ }, {
567
+ package_id: string;
568
+ version_set_id: string;
569
+ shape: "gradual" | "atomic";
570
+ resolved_rollout: {
571
+ type: "gradual";
572
+ stages: {
573
+ name: string;
574
+ traffic: number;
575
+ bake: string | null;
576
+ }[];
577
+ } | {
578
+ type: "atomic";
579
+ };
580
+ resolved_gates: Record<string, {
581
+ type: "manual";
582
+ } | {
583
+ type: "auto";
584
+ afterBake?: boolean | undefined;
585
+ } | {
586
+ type: "analysis";
587
+ template: string;
588
+ }>;
589
+ id?: string | null | undefined;
590
+ status?: "queued" | "deploying" | "baking" | "awaiting_approval" | "rolling_back" | "completed" | "rolled_back" | "failed" | "cancelled" | undefined;
591
+ kind?: "deploy" | "rollback" | undefined;
592
+ finished_at?: string | null | undefined;
593
+ current_stage?: string | null | undefined;
594
+ forced_atomic_reason?: "do_migrations" | "asset_affinity_none" | null | undefined;
595
+ started_at?: string | null | undefined;
596
+ }>;
597
+ declare const insert_pipeline_stage_event: z.ZodObject<{
598
+ run_id: z.ZodString;
599
+ stage_name: z.ZodString;
600
+ kind: z.ZodUnion<[z.ZodLiteral<"deploy_started">, z.ZodLiteral<"deploy_completed">, z.ZodLiteral<"bake_started">, z.ZodLiteral<"bake_completed">, z.ZodLiteral<"gate_verdict">, z.ZodLiteral<"approval_requested">, z.ZodLiteral<"rollback_started">, z.ZodLiteral<"rollback_completed">, z.ZodLiteral<"warning">, z.ZodLiteral<"error">]>;
601
+ payload: z.ZodOptional<z.ZodUnknown>;
602
+ }, "strip", z.ZodTypeAny, {
603
+ kind: "error" | "deploy_started" | "deploy_completed" | "bake_started" | "bake_completed" | "gate_verdict" | "approval_requested" | "rollback_started" | "rollback_completed" | "warning";
604
+ run_id: string;
605
+ stage_name: string;
606
+ payload?: unknown;
607
+ }, {
608
+ kind: "error" | "deploy_started" | "deploy_completed" | "bake_started" | "bake_completed" | "gate_verdict" | "approval_requested" | "rollback_started" | "rollback_completed" | "warning";
609
+ run_id: string;
610
+ stage_name: string;
611
+ payload?: unknown;
612
+ }>;
613
+ declare const upsert_pipeline_grant: z.ZodObject<{
614
+ id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
615
+ package_id: z.ZodString;
616
+ stage_name: z.ZodString;
617
+ scope: z.ZodString;
618
+ granted_by: z.ZodOptional<z.ZodNullable<z.ZodString>>;
619
+ granted_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
620
+ }, "strip", z.ZodTypeAny, {
621
+ scope: string;
622
+ package_id: string;
623
+ stage_name: string;
624
+ id?: string | null | undefined;
625
+ granted_by?: string | null | undefined;
626
+ granted_at?: string | null | undefined;
627
+ }, {
628
+ scope: string;
629
+ package_id: string;
630
+ stage_name: string;
631
+ id?: string | null | undefined;
632
+ granted_by?: string | null | undefined;
633
+ granted_at?: string | null | undefined;
634
+ }>;
635
+ declare const upsert_pipeline_approval: z.ZodObject<{
636
+ run_id: z.ZodString;
637
+ stage_name: z.ZodString;
638
+ decision: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodLiteral<"approved">, z.ZodLiteral<"denied">]>>>;
639
+ reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
640
+ decided_by: z.ZodOptional<z.ZodNullable<z.ZodString>>;
641
+ decided_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
642
+ }, "strip", z.ZodTypeAny, {
643
+ run_id: string;
644
+ stage_name: string;
645
+ decision?: "approved" | "denied" | null | undefined;
646
+ reason?: string | null | undefined;
647
+ decided_by?: string | null | undefined;
648
+ decided_at?: string | null | undefined;
649
+ }, {
650
+ run_id: string;
651
+ stage_name: string;
652
+ decision?: "approved" | "denied" | null | undefined;
653
+ reason?: string | null | undefined;
654
+ decided_by?: string | null | undefined;
655
+ decided_at?: string | null | undefined;
656
+ }>;
657
+ declare const upsert_pipeline_analysis_template: z.ZodObject<{
658
+ id: z.ZodOptional<z.ZodString>;
659
+ owner_id: z.ZodString;
660
+ name: z.ZodString;
661
+ query_dsl: z.ZodUnknown;
662
+ threshold_dsl: z.ZodString;
663
+ window_ms: z.ZodNumber;
664
+ }, "strip", z.ZodTypeAny, {
665
+ name: string;
666
+ owner_id: string;
667
+ threshold_dsl: string;
668
+ window_ms: number;
669
+ id?: string | undefined;
670
+ query_dsl?: unknown;
671
+ }, {
672
+ name: string;
673
+ owner_id: string;
674
+ threshold_dsl: string;
675
+ window_ms: number;
676
+ id?: string | undefined;
677
+ query_dsl?: unknown;
678
+ }>;
679
+ declare const pipeline_oidc_provider: z.ZodLiteral<"github">;
680
+ declare const upsert_pipeline_oidc_trust: z.ZodObject<{
681
+ id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
682
+ owner_id: z.ZodString;
683
+ provider: z.ZodOptional<z.ZodLiteral<"github">>;
684
+ github_owner: z.ZodString;
685
+ repo_pattern: z.ZodOptional<z.ZodString>;
686
+ allowed_refs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
687
+ allowed_environments: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
688
+ expected_audience: z.ZodString;
689
+ allowed_actions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
690
+ session_ttl_seconds: z.ZodOptional<z.ZodNumber>;
691
+ last_used_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
692
+ }, "strip", z.ZodTypeAny, {
693
+ owner_id: string;
694
+ github_owner: string;
695
+ expected_audience: string;
696
+ id?: string | null | undefined;
697
+ last_used_at?: string | null | undefined;
698
+ provider?: "github" | undefined;
699
+ repo_pattern?: string | undefined;
700
+ allowed_refs?: string[] | undefined;
701
+ allowed_environments?: string[] | undefined;
702
+ allowed_actions?: string[] | undefined;
703
+ session_ttl_seconds?: number | undefined;
704
+ }, {
705
+ owner_id: string;
706
+ github_owner: string;
707
+ expected_audience: string;
708
+ id?: string | null | undefined;
709
+ last_used_at?: string | null | undefined;
710
+ provider?: "github" | undefined;
711
+ repo_pattern?: string | undefined;
712
+ allowed_refs?: string[] | undefined;
713
+ allowed_environments?: string[] | undefined;
714
+ allowed_actions?: string[] | undefined;
715
+ session_ttl_seconds?: number | undefined;
716
+ }>;
717
+ declare const webhook_event_body: z.ZodObject<{
718
+ stage_name: z.ZodString;
719
+ kind: z.ZodEnum<["deploy_started", "deploy_completed", "bake_started", "bake_completed", "gate_verdict", "approval_requested", "rollback_started", "rollback_completed", "warning", "error"]>;
720
+ payload: z.ZodOptional<z.ZodUnknown>;
721
+ idempotency_key: z.ZodString;
722
+ }, "strip", z.ZodTypeAny, {
723
+ kind: "error" | "deploy_started" | "deploy_completed" | "bake_started" | "bake_completed" | "gate_verdict" | "approval_requested" | "rollback_started" | "rollback_completed" | "warning";
724
+ idempotency_key: string;
725
+ stage_name: string;
726
+ payload?: unknown;
727
+ }, {
728
+ kind: "error" | "deploy_started" | "deploy_completed" | "bake_started" | "bake_completed" | "gate_verdict" | "approval_requested" | "rollback_started" | "rollback_completed" | "warning";
729
+ idempotency_key: string;
730
+ stage_name: string;
731
+ payload?: unknown;
732
+ }>;
733
+ type WebhookEventBody = z.infer<typeof webhook_event_body>;
734
+ declare const dashboard_window_query: z.ZodObject<{
735
+ package_id: z.ZodString;
736
+ window_ms: z.ZodDefault<z.ZodNumber>;
737
+ }, "strip", z.ZodTypeAny, {
738
+ package_id: string;
739
+ window_ms: number;
740
+ }, {
741
+ package_id: string;
742
+ window_ms?: number | undefined;
743
+ }>;
744
+ type DashboardWindowQuery = z.infer<typeof dashboard_window_query>;
745
+ declare const dashboard_response: z.ZodObject<{
746
+ run_counts: z.ZodObject<{
747
+ total: z.ZodNumber;
748
+ completed: z.ZodNumber;
749
+ failed: z.ZodNumber;
750
+ cancelled: z.ZodNumber;
751
+ rolled_back: z.ZodNumber;
752
+ in_flight: z.ZodNumber;
753
+ }, "strip", z.ZodTypeAny, {
754
+ completed: number;
755
+ rolled_back: number;
756
+ failed: number;
757
+ cancelled: number;
758
+ total: number;
759
+ in_flight: number;
760
+ }, {
761
+ completed: number;
762
+ rolled_back: number;
763
+ failed: number;
764
+ cancelled: number;
765
+ total: number;
766
+ in_flight: number;
767
+ }>;
768
+ verdict_counts: z.ZodObject<{
769
+ manual: z.ZodObject<{
770
+ pass: z.ZodNumber;
771
+ fail: z.ZodNumber;
772
+ pending: z.ZodNumber;
773
+ }, "strip", z.ZodTypeAny, {
774
+ pass: number;
775
+ fail: number;
776
+ pending: number;
777
+ }, {
778
+ pass: number;
779
+ fail: number;
780
+ pending: number;
781
+ }>;
782
+ auto: z.ZodObject<{
783
+ pass: z.ZodNumber;
784
+ fail: z.ZodNumber;
785
+ pending: z.ZodNumber;
786
+ }, "strip", z.ZodTypeAny, {
787
+ pass: number;
788
+ fail: number;
789
+ pending: number;
790
+ }, {
791
+ pass: number;
792
+ fail: number;
793
+ pending: number;
794
+ }>;
795
+ analysis: z.ZodObject<{
796
+ pass: z.ZodNumber;
797
+ fail: z.ZodNumber;
798
+ pending: z.ZodNumber;
799
+ }, "strip", z.ZodTypeAny, {
800
+ pass: number;
801
+ fail: number;
802
+ pending: number;
803
+ }, {
804
+ pass: number;
805
+ fail: number;
806
+ pending: number;
807
+ }>;
808
+ }, "strip", z.ZodTypeAny, {
809
+ manual: {
810
+ pass: number;
811
+ fail: number;
812
+ pending: number;
813
+ };
814
+ auto: {
815
+ pass: number;
816
+ fail: number;
817
+ pending: number;
818
+ };
819
+ analysis: {
820
+ pass: number;
821
+ fail: number;
822
+ pending: number;
823
+ };
824
+ }, {
825
+ manual: {
826
+ pass: number;
827
+ fail: number;
828
+ pending: number;
829
+ };
830
+ auto: {
831
+ pass: number;
832
+ fail: number;
833
+ pending: number;
834
+ };
835
+ analysis: {
836
+ pass: number;
837
+ fail: number;
838
+ pending: number;
839
+ };
840
+ }>;
841
+ latency_p50_ms: z.ZodNullable<z.ZodNumber>;
842
+ latency_p95_ms: z.ZodNullable<z.ZodNumber>;
843
+ approval_turnaround_p50_ms: z.ZodNullable<z.ZodNumber>;
844
+ rollback_rate: z.ZodNullable<z.ZodNumber>;
845
+ }, "strip", z.ZodTypeAny, {
846
+ run_counts: {
847
+ completed: number;
848
+ rolled_back: number;
849
+ failed: number;
850
+ cancelled: number;
851
+ total: number;
852
+ in_flight: number;
853
+ };
854
+ verdict_counts: {
855
+ manual: {
856
+ pass: number;
857
+ fail: number;
858
+ pending: number;
859
+ };
860
+ auto: {
861
+ pass: number;
862
+ fail: number;
863
+ pending: number;
864
+ };
865
+ analysis: {
866
+ pass: number;
867
+ fail: number;
868
+ pending: number;
869
+ };
870
+ };
871
+ latency_p50_ms: number | null;
872
+ latency_p95_ms: number | null;
873
+ approval_turnaround_p50_ms: number | null;
874
+ rollback_rate: number | null;
875
+ }, {
876
+ run_counts: {
877
+ completed: number;
878
+ rolled_back: number;
879
+ failed: number;
880
+ cancelled: number;
881
+ total: number;
882
+ in_flight: number;
883
+ };
884
+ verdict_counts: {
885
+ manual: {
886
+ pass: number;
887
+ fail: number;
888
+ pending: number;
889
+ };
890
+ auto: {
891
+ pass: number;
892
+ fail: number;
893
+ pending: number;
894
+ };
895
+ analysis: {
896
+ pass: number;
897
+ fail: number;
898
+ pending: number;
899
+ };
900
+ };
901
+ latency_p50_ms: number | null;
902
+ latency_p95_ms: number | null;
903
+ approval_turnaround_p50_ms: number | null;
904
+ rollback_rate: number | null;
905
+ }>;
906
+ type DashboardResponse = z.infer<typeof dashboard_response>;
907
+ declare const external_ref: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
908
+ type: z.ZodLiteral<"pr">;
909
+ url: z.ZodString;
910
+ }, "strip", z.ZodTypeAny, {
911
+ type: "pr";
912
+ url: string;
913
+ }, {
914
+ type: "pr";
915
+ url: string;
916
+ }>, z.ZodObject<{
917
+ type: z.ZodLiteral<"commit">;
918
+ sha: z.ZodString;
919
+ }, "strip", z.ZodTypeAny, {
920
+ type: "commit";
921
+ sha: string;
922
+ }, {
923
+ type: "commit";
924
+ sha: string;
925
+ }>, z.ZodObject<{
926
+ type: z.ZodLiteral<"file">;
927
+ path: z.ZodString;
928
+ }, "strip", z.ZodTypeAny, {
929
+ path: string;
930
+ type: "file";
931
+ }, {
932
+ path: string;
933
+ type: "file";
934
+ }>, z.ZodObject<{
935
+ type: z.ZodLiteral<"doc">;
936
+ doc_id: z.ZodString;
937
+ }, "strip", z.ZodTypeAny, {
938
+ type: "doc";
939
+ doc_id: string;
940
+ }, {
941
+ type: "doc";
942
+ doc_id: string;
943
+ }>, z.ZodObject<{
944
+ type: z.ZodLiteral<"metric">;
945
+ name: z.ZodString;
946
+ }, "strip", z.ZodTypeAny, {
947
+ name: string;
948
+ type: "metric";
949
+ }, {
950
+ name: string;
951
+ type: "metric";
952
+ }>, z.ZodObject<{
953
+ type: z.ZodLiteral<"pipeline_run">;
954
+ run_id: z.ZodString;
955
+ }, "strip", z.ZodTypeAny, {
956
+ type: "pipeline_run";
957
+ run_id: string;
958
+ }, {
959
+ type: "pipeline_run";
960
+ run_id: string;
961
+ }>]>;
962
+ declare const task_link_kind: z.ZodEnum<["blocks", "relates_to", "references", "discovered_from", "tracks_metric"]>;
963
+ declare const upsert_task_link: z.ZodObject<{
964
+ id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
965
+ src_id: z.ZodString;
966
+ dst_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
967
+ kind: z.ZodEnum<["blocks", "relates_to", "references", "discovered_from", "tracks_metric"]>;
968
+ ref: z.ZodOptional<z.ZodNullable<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
969
+ type: z.ZodLiteral<"pr">;
970
+ url: z.ZodString;
971
+ }, "strip", z.ZodTypeAny, {
972
+ type: "pr";
973
+ url: string;
974
+ }, {
975
+ type: "pr";
976
+ url: string;
977
+ }>, z.ZodObject<{
978
+ type: z.ZodLiteral<"commit">;
979
+ sha: z.ZodString;
980
+ }, "strip", z.ZodTypeAny, {
981
+ type: "commit";
982
+ sha: string;
983
+ }, {
984
+ type: "commit";
985
+ sha: string;
986
+ }>, z.ZodObject<{
987
+ type: z.ZodLiteral<"file">;
988
+ path: z.ZodString;
989
+ }, "strip", z.ZodTypeAny, {
990
+ path: string;
991
+ type: "file";
992
+ }, {
993
+ path: string;
994
+ type: "file";
995
+ }>, z.ZodObject<{
996
+ type: z.ZodLiteral<"doc">;
997
+ doc_id: z.ZodString;
998
+ }, "strip", z.ZodTypeAny, {
999
+ type: "doc";
1000
+ doc_id: string;
1001
+ }, {
1002
+ type: "doc";
1003
+ doc_id: string;
1004
+ }>, z.ZodObject<{
1005
+ type: z.ZodLiteral<"metric">;
1006
+ name: z.ZodString;
1007
+ }, "strip", z.ZodTypeAny, {
1008
+ name: string;
1009
+ type: "metric";
1010
+ }, {
1011
+ name: string;
1012
+ type: "metric";
1013
+ }>, z.ZodObject<{
1014
+ type: z.ZodLiteral<"pipeline_run">;
1015
+ run_id: z.ZodString;
1016
+ }, "strip", z.ZodTypeAny, {
1017
+ type: "pipeline_run";
1018
+ run_id: string;
1019
+ }, {
1020
+ type: "pipeline_run";
1021
+ run_id: string;
1022
+ }>]>>>;
1023
+ note: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1024
+ }, "strip", z.ZodTypeAny, {
1025
+ kind: "blocks" | "relates_to" | "references" | "discovered_from" | "tracks_metric";
1026
+ src_id: string;
1027
+ id?: string | null | undefined;
1028
+ ref?: {
1029
+ type: "pr";
1030
+ url: string;
1031
+ } | {
1032
+ type: "commit";
1033
+ sha: string;
1034
+ } | {
1035
+ path: string;
1036
+ type: "file";
1037
+ } | {
1038
+ type: "doc";
1039
+ doc_id: string;
1040
+ } | {
1041
+ name: string;
1042
+ type: "metric";
1043
+ } | {
1044
+ type: "pipeline_run";
1045
+ run_id: string;
1046
+ } | null | undefined;
1047
+ note?: string | null | undefined;
1048
+ dst_id?: string | null | undefined;
1049
+ }, {
1050
+ kind: "blocks" | "relates_to" | "references" | "discovered_from" | "tracks_metric";
1051
+ src_id: string;
1052
+ id?: string | null | undefined;
1053
+ ref?: {
1054
+ type: "pr";
1055
+ url: string;
1056
+ } | {
1057
+ type: "commit";
1058
+ sha: string;
1059
+ } | {
1060
+ path: string;
1061
+ type: "file";
1062
+ } | {
1063
+ type: "doc";
1064
+ doc_id: string;
1065
+ } | {
1066
+ name: string;
1067
+ type: "metric";
1068
+ } | {
1069
+ type: "pipeline_run";
1070
+ run_id: string;
1071
+ } | null | undefined;
1072
+ note?: string | null | undefined;
1073
+ dst_id?: string | null | undefined;
1074
+ }>;
1075
+ declare const apply_op: z.ZodDiscriminatedUnion<"op", [z.ZodObject<{
1076
+ op: z.ZodLiteral<"create">;
1077
+ handle: z.ZodOptional<z.ZodString>;
1078
+ data: z.ZodObject<{
1079
+ id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1080
+ title: z.ZodOptional<z.ZodString>;
1081
+ summary: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1082
+ description: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1083
+ progress: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"UNSTARTED">, z.ZodLiteral<"IN_PROGRESS">, z.ZodLiteral<"COMPLETED">]>>;
1084
+ visibility: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"PUBLIC">, z.ZodLiteral<"PRIVATE">, z.ZodLiteral<"HIDDEN">, z.ZodLiteral<"ARCHIVED">, z.ZodLiteral<"DRAFT">, z.ZodLiteral<"DELETED">]>>;
1085
+ start_time: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1086
+ end_time: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1087
+ priority: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"LOW">, z.ZodLiteral<"MEDIUM">, z.ZodLiteral<"HIGH">]>>;
1088
+ owner_id: z.ZodString;
1089
+ project_id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1090
+ goal_id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1091
+ parent_id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1092
+ rank: z.ZodOptional<z.ZodString>;
1093
+ kind: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"task">, z.ZodLiteral<"phase">, z.ZodLiteral<"approval">]>>;
1094
+ completion_policy: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"manual">, z.ZodLiteral<"auto_children">]>>;
1095
+ force: z.ZodOptional<z.ZodBoolean>;
1096
+ }, "strip", z.ZodTypeAny, {
1097
+ owner_id: string;
1098
+ id?: string | null | undefined;
1099
+ kind?: "task" | "phase" | "approval" | undefined;
1100
+ project_id?: string | null | undefined;
1101
+ description?: string | null | undefined;
1102
+ visibility?: "PUBLIC" | "PRIVATE" | "HIDDEN" | "ARCHIVED" | "DRAFT" | "DELETED" | undefined;
1103
+ title?: string | undefined;
1104
+ progress?: "UNSTARTED" | "IN_PROGRESS" | "COMPLETED" | undefined;
1105
+ goal_id?: string | null | undefined;
1106
+ start_time?: string | null | undefined;
1107
+ end_time?: string | null | undefined;
1108
+ summary?: string | null | undefined;
1109
+ priority?: "LOW" | "MEDIUM" | "HIGH" | undefined;
1110
+ parent_id?: string | null | undefined;
1111
+ rank?: string | undefined;
1112
+ completion_policy?: "manual" | "auto_children" | undefined;
1113
+ force?: boolean | undefined;
1114
+ }, {
1115
+ owner_id: string;
1116
+ id?: string | null | undefined;
1117
+ kind?: "task" | "phase" | "approval" | undefined;
1118
+ project_id?: string | null | undefined;
1119
+ description?: string | null | undefined;
1120
+ visibility?: "PUBLIC" | "PRIVATE" | "HIDDEN" | "ARCHIVED" | "DRAFT" | "DELETED" | undefined;
1121
+ title?: string | undefined;
1122
+ progress?: "UNSTARTED" | "IN_PROGRESS" | "COMPLETED" | undefined;
1123
+ goal_id?: string | null | undefined;
1124
+ start_time?: string | null | undefined;
1125
+ end_time?: string | null | undefined;
1126
+ summary?: string | null | undefined;
1127
+ priority?: "LOW" | "MEDIUM" | "HIGH" | undefined;
1128
+ parent_id?: string | null | undefined;
1129
+ rank?: string | undefined;
1130
+ completion_policy?: "manual" | "auto_children" | undefined;
1131
+ force?: boolean | undefined;
1132
+ }>;
1133
+ }, "strip", z.ZodTypeAny, {
1134
+ data: {
1135
+ owner_id: string;
1136
+ id?: string | null | undefined;
1137
+ kind?: "task" | "phase" | "approval" | undefined;
1138
+ project_id?: string | null | undefined;
1139
+ description?: string | null | undefined;
1140
+ visibility?: "PUBLIC" | "PRIVATE" | "HIDDEN" | "ARCHIVED" | "DRAFT" | "DELETED" | undefined;
1141
+ title?: string | undefined;
1142
+ progress?: "UNSTARTED" | "IN_PROGRESS" | "COMPLETED" | undefined;
1143
+ goal_id?: string | null | undefined;
1144
+ start_time?: string | null | undefined;
1145
+ end_time?: string | null | undefined;
1146
+ summary?: string | null | undefined;
1147
+ priority?: "LOW" | "MEDIUM" | "HIGH" | undefined;
1148
+ parent_id?: string | null | undefined;
1149
+ rank?: string | undefined;
1150
+ completion_policy?: "manual" | "auto_children" | undefined;
1151
+ force?: boolean | undefined;
1152
+ };
1153
+ op: "create";
1154
+ handle?: string | undefined;
1155
+ }, {
1156
+ data: {
1157
+ owner_id: string;
1158
+ id?: string | null | undefined;
1159
+ kind?: "task" | "phase" | "approval" | undefined;
1160
+ project_id?: string | null | undefined;
1161
+ description?: string | null | undefined;
1162
+ visibility?: "PUBLIC" | "PRIVATE" | "HIDDEN" | "ARCHIVED" | "DRAFT" | "DELETED" | undefined;
1163
+ title?: string | undefined;
1164
+ progress?: "UNSTARTED" | "IN_PROGRESS" | "COMPLETED" | undefined;
1165
+ goal_id?: string | null | undefined;
1166
+ start_time?: string | null | undefined;
1167
+ end_time?: string | null | undefined;
1168
+ summary?: string | null | undefined;
1169
+ priority?: "LOW" | "MEDIUM" | "HIGH" | undefined;
1170
+ parent_id?: string | null | undefined;
1171
+ rank?: string | undefined;
1172
+ completion_policy?: "manual" | "auto_children" | undefined;
1173
+ force?: boolean | undefined;
1174
+ };
1175
+ op: "create";
1176
+ handle?: string | undefined;
1177
+ }>, z.ZodObject<{
1178
+ op: z.ZodLiteral<"update">;
1179
+ id: z.ZodString;
1180
+ base_rev: z.ZodNumber;
1181
+ data: z.ZodObject<{
1182
+ id: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
1183
+ title: z.ZodOptional<z.ZodOptional<z.ZodString>>;
1184
+ summary: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
1185
+ description: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
1186
+ progress: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"UNSTARTED">, z.ZodLiteral<"IN_PROGRESS">, z.ZodLiteral<"COMPLETED">]>>>;
1187
+ visibility: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"PUBLIC">, z.ZodLiteral<"PRIVATE">, z.ZodLiteral<"HIDDEN">, z.ZodLiteral<"ARCHIVED">, z.ZodLiteral<"DRAFT">, z.ZodLiteral<"DELETED">]>>>;
1188
+ start_time: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
1189
+ end_time: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
1190
+ priority: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"LOW">, z.ZodLiteral<"MEDIUM">, z.ZodLiteral<"HIGH">]>>>;
1191
+ owner_id: z.ZodOptional<z.ZodString>;
1192
+ project_id: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
1193
+ goal_id: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
1194
+ parent_id: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
1195
+ rank: z.ZodOptional<z.ZodOptional<z.ZodString>>;
1196
+ kind: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"task">, z.ZodLiteral<"phase">, z.ZodLiteral<"approval">]>>>;
1197
+ completion_policy: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"manual">, z.ZodLiteral<"auto_children">]>>>;
1198
+ force: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
1199
+ }, "strip", z.ZodTypeAny, {
1200
+ id?: string | null | undefined;
1201
+ kind?: "task" | "phase" | "approval" | undefined;
1202
+ owner_id?: string | undefined;
1203
+ project_id?: string | null | undefined;
1204
+ description?: string | null | undefined;
1205
+ visibility?: "PUBLIC" | "PRIVATE" | "HIDDEN" | "ARCHIVED" | "DRAFT" | "DELETED" | undefined;
1206
+ title?: string | undefined;
1207
+ progress?: "UNSTARTED" | "IN_PROGRESS" | "COMPLETED" | undefined;
1208
+ goal_id?: string | null | undefined;
1209
+ start_time?: string | null | undefined;
1210
+ end_time?: string | null | undefined;
1211
+ summary?: string | null | undefined;
1212
+ priority?: "LOW" | "MEDIUM" | "HIGH" | undefined;
1213
+ parent_id?: string | null | undefined;
1214
+ rank?: string | undefined;
1215
+ completion_policy?: "manual" | "auto_children" | undefined;
1216
+ force?: boolean | undefined;
1217
+ }, {
1218
+ id?: string | null | undefined;
1219
+ kind?: "task" | "phase" | "approval" | undefined;
1220
+ owner_id?: string | undefined;
1221
+ project_id?: string | null | undefined;
1222
+ description?: string | null | undefined;
1223
+ visibility?: "PUBLIC" | "PRIVATE" | "HIDDEN" | "ARCHIVED" | "DRAFT" | "DELETED" | undefined;
1224
+ title?: string | undefined;
1225
+ progress?: "UNSTARTED" | "IN_PROGRESS" | "COMPLETED" | undefined;
1226
+ goal_id?: string | null | undefined;
1227
+ start_time?: string | null | undefined;
1228
+ end_time?: string | null | undefined;
1229
+ summary?: string | null | undefined;
1230
+ priority?: "LOW" | "MEDIUM" | "HIGH" | undefined;
1231
+ parent_id?: string | null | undefined;
1232
+ rank?: string | undefined;
1233
+ completion_policy?: "manual" | "auto_children" | undefined;
1234
+ force?: boolean | undefined;
1235
+ }>;
1236
+ }, "strip", z.ZodTypeAny, {
1237
+ id: string;
1238
+ data: {
1239
+ id?: string | null | undefined;
1240
+ kind?: "task" | "phase" | "approval" | undefined;
1241
+ owner_id?: string | undefined;
1242
+ project_id?: string | null | undefined;
1243
+ description?: string | null | undefined;
1244
+ visibility?: "PUBLIC" | "PRIVATE" | "HIDDEN" | "ARCHIVED" | "DRAFT" | "DELETED" | undefined;
1245
+ title?: string | undefined;
1246
+ progress?: "UNSTARTED" | "IN_PROGRESS" | "COMPLETED" | undefined;
1247
+ goal_id?: string | null | undefined;
1248
+ start_time?: string | null | undefined;
1249
+ end_time?: string | null | undefined;
1250
+ summary?: string | null | undefined;
1251
+ priority?: "LOW" | "MEDIUM" | "HIGH" | undefined;
1252
+ parent_id?: string | null | undefined;
1253
+ rank?: string | undefined;
1254
+ completion_policy?: "manual" | "auto_children" | undefined;
1255
+ force?: boolean | undefined;
1256
+ };
1257
+ op: "update";
1258
+ base_rev: number;
1259
+ }, {
1260
+ id: string;
1261
+ data: {
1262
+ id?: string | null | undefined;
1263
+ kind?: "task" | "phase" | "approval" | undefined;
1264
+ owner_id?: string | undefined;
1265
+ project_id?: string | null | undefined;
1266
+ description?: string | null | undefined;
1267
+ visibility?: "PUBLIC" | "PRIVATE" | "HIDDEN" | "ARCHIVED" | "DRAFT" | "DELETED" | undefined;
1268
+ title?: string | undefined;
1269
+ progress?: "UNSTARTED" | "IN_PROGRESS" | "COMPLETED" | undefined;
1270
+ goal_id?: string | null | undefined;
1271
+ start_time?: string | null | undefined;
1272
+ end_time?: string | null | undefined;
1273
+ summary?: string | null | undefined;
1274
+ priority?: "LOW" | "MEDIUM" | "HIGH" | undefined;
1275
+ parent_id?: string | null | undefined;
1276
+ rank?: string | undefined;
1277
+ completion_policy?: "manual" | "auto_children" | undefined;
1278
+ force?: boolean | undefined;
1279
+ };
1280
+ op: "update";
1281
+ base_rev: number;
1282
+ }>, z.ZodObject<{
1283
+ op: z.ZodLiteral<"reparent">;
1284
+ id: z.ZodString;
1285
+ parent_id: z.ZodNullable<z.ZodString>;
1286
+ base_rev: z.ZodNumber;
1287
+ }, "strip", z.ZodTypeAny, {
1288
+ id: string;
1289
+ parent_id: string | null;
1290
+ op: "reparent";
1291
+ base_rev: number;
1292
+ }, {
1293
+ id: string;
1294
+ parent_id: string | null;
1295
+ op: "reparent";
1296
+ base_rev: number;
1297
+ }>, z.ZodObject<{
1298
+ op: z.ZodLiteral<"link">;
1299
+ link: z.ZodObject<{
1300
+ id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1301
+ src_id: z.ZodString;
1302
+ dst_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1303
+ kind: z.ZodEnum<["blocks", "relates_to", "references", "discovered_from", "tracks_metric"]>;
1304
+ ref: z.ZodOptional<z.ZodNullable<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1305
+ type: z.ZodLiteral<"pr">;
1306
+ url: z.ZodString;
1307
+ }, "strip", z.ZodTypeAny, {
1308
+ type: "pr";
1309
+ url: string;
1310
+ }, {
1311
+ type: "pr";
1312
+ url: string;
1313
+ }>, z.ZodObject<{
1314
+ type: z.ZodLiteral<"commit">;
1315
+ sha: z.ZodString;
1316
+ }, "strip", z.ZodTypeAny, {
1317
+ type: "commit";
1318
+ sha: string;
1319
+ }, {
1320
+ type: "commit";
1321
+ sha: string;
1322
+ }>, z.ZodObject<{
1323
+ type: z.ZodLiteral<"file">;
1324
+ path: z.ZodString;
1325
+ }, "strip", z.ZodTypeAny, {
1326
+ path: string;
1327
+ type: "file";
1328
+ }, {
1329
+ path: string;
1330
+ type: "file";
1331
+ }>, z.ZodObject<{
1332
+ type: z.ZodLiteral<"doc">;
1333
+ doc_id: z.ZodString;
1334
+ }, "strip", z.ZodTypeAny, {
1335
+ type: "doc";
1336
+ doc_id: string;
1337
+ }, {
1338
+ type: "doc";
1339
+ doc_id: string;
1340
+ }>, z.ZodObject<{
1341
+ type: z.ZodLiteral<"metric">;
1342
+ name: z.ZodString;
1343
+ }, "strip", z.ZodTypeAny, {
1344
+ name: string;
1345
+ type: "metric";
1346
+ }, {
1347
+ name: string;
1348
+ type: "metric";
1349
+ }>, z.ZodObject<{
1350
+ type: z.ZodLiteral<"pipeline_run">;
1351
+ run_id: z.ZodString;
1352
+ }, "strip", z.ZodTypeAny, {
1353
+ type: "pipeline_run";
1354
+ run_id: string;
1355
+ }, {
1356
+ type: "pipeline_run";
1357
+ run_id: string;
1358
+ }>]>>>;
1359
+ note: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1360
+ }, "strip", z.ZodTypeAny, {
1361
+ kind: "blocks" | "relates_to" | "references" | "discovered_from" | "tracks_metric";
1362
+ src_id: string;
1363
+ id?: string | null | undefined;
1364
+ ref?: {
1365
+ type: "pr";
1366
+ url: string;
1367
+ } | {
1368
+ type: "commit";
1369
+ sha: string;
1370
+ } | {
1371
+ path: string;
1372
+ type: "file";
1373
+ } | {
1374
+ type: "doc";
1375
+ doc_id: string;
1376
+ } | {
1377
+ name: string;
1378
+ type: "metric";
1379
+ } | {
1380
+ type: "pipeline_run";
1381
+ run_id: string;
1382
+ } | null | undefined;
1383
+ note?: string | null | undefined;
1384
+ dst_id?: string | null | undefined;
1385
+ }, {
1386
+ kind: "blocks" | "relates_to" | "references" | "discovered_from" | "tracks_metric";
1387
+ src_id: string;
1388
+ id?: string | null | undefined;
1389
+ ref?: {
1390
+ type: "pr";
1391
+ url: string;
1392
+ } | {
1393
+ type: "commit";
1394
+ sha: string;
1395
+ } | {
1396
+ path: string;
1397
+ type: "file";
1398
+ } | {
1399
+ type: "doc";
1400
+ doc_id: string;
1401
+ } | {
1402
+ name: string;
1403
+ type: "metric";
1404
+ } | {
1405
+ type: "pipeline_run";
1406
+ run_id: string;
1407
+ } | null | undefined;
1408
+ note?: string | null | undefined;
1409
+ dst_id?: string | null | undefined;
1410
+ }>;
1411
+ }, "strip", z.ZodTypeAny, {
1412
+ link: {
1413
+ kind: "blocks" | "relates_to" | "references" | "discovered_from" | "tracks_metric";
1414
+ src_id: string;
1415
+ id?: string | null | undefined;
1416
+ ref?: {
1417
+ type: "pr";
1418
+ url: string;
1419
+ } | {
1420
+ type: "commit";
1421
+ sha: string;
1422
+ } | {
1423
+ path: string;
1424
+ type: "file";
1425
+ } | {
1426
+ type: "doc";
1427
+ doc_id: string;
1428
+ } | {
1429
+ name: string;
1430
+ type: "metric";
1431
+ } | {
1432
+ type: "pipeline_run";
1433
+ run_id: string;
1434
+ } | null | undefined;
1435
+ note?: string | null | undefined;
1436
+ dst_id?: string | null | undefined;
1437
+ };
1438
+ op: "link";
1439
+ }, {
1440
+ link: {
1441
+ kind: "blocks" | "relates_to" | "references" | "discovered_from" | "tracks_metric";
1442
+ src_id: string;
1443
+ id?: string | null | undefined;
1444
+ ref?: {
1445
+ type: "pr";
1446
+ url: string;
1447
+ } | {
1448
+ type: "commit";
1449
+ sha: string;
1450
+ } | {
1451
+ path: string;
1452
+ type: "file";
1453
+ } | {
1454
+ type: "doc";
1455
+ doc_id: string;
1456
+ } | {
1457
+ name: string;
1458
+ type: "metric";
1459
+ } | {
1460
+ type: "pipeline_run";
1461
+ run_id: string;
1462
+ } | null | undefined;
1463
+ note?: string | null | undefined;
1464
+ dst_id?: string | null | undefined;
1465
+ };
1466
+ op: "link";
1467
+ }>, z.ZodObject<{
1468
+ op: z.ZodLiteral<"unlink">;
1469
+ id: z.ZodString;
1470
+ }, "strip", z.ZodTypeAny, {
1471
+ id: string;
1472
+ op: "unlink";
1473
+ }, {
1474
+ id: string;
1475
+ op: "unlink";
1476
+ }>, z.ZodObject<{
1477
+ op: z.ZodLiteral<"claim">;
1478
+ id: z.ZodString;
1479
+ actor: z.ZodString;
1480
+ base_rev: z.ZodNumber;
1481
+ }, "strip", z.ZodTypeAny, {
1482
+ id: string;
1483
+ op: "claim";
1484
+ base_rev: number;
1485
+ actor: string;
1486
+ }, {
1487
+ id: string;
1488
+ op: "claim";
1489
+ base_rev: number;
1490
+ actor: string;
1491
+ }>, z.ZodObject<{
1492
+ op: z.ZodLiteral<"complete">;
1493
+ id: z.ZodString;
1494
+ base_rev: z.ZodNumber;
1495
+ }, "strip", z.ZodTypeAny, {
1496
+ id: string;
1497
+ op: "complete";
1498
+ base_rev: number;
1499
+ }, {
1500
+ id: string;
1501
+ op: "complete";
1502
+ base_rev: number;
1503
+ }>]>;
1504
+ type ApplyOp = z.infer<typeof apply_op>;
1505
+ declare const apply_request: z.ZodObject<{
1506
+ idempotency_key: z.ZodString;
1507
+ base_revs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
1508
+ ops: z.ZodArray<z.ZodDiscriminatedUnion<"op", [z.ZodObject<{
1509
+ op: z.ZodLiteral<"create">;
1510
+ handle: z.ZodOptional<z.ZodString>;
1511
+ data: z.ZodObject<{
1512
+ id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1513
+ title: z.ZodOptional<z.ZodString>;
1514
+ summary: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1515
+ description: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1516
+ progress: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"UNSTARTED">, z.ZodLiteral<"IN_PROGRESS">, z.ZodLiteral<"COMPLETED">]>>;
1517
+ visibility: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"PUBLIC">, z.ZodLiteral<"PRIVATE">, z.ZodLiteral<"HIDDEN">, z.ZodLiteral<"ARCHIVED">, z.ZodLiteral<"DRAFT">, z.ZodLiteral<"DELETED">]>>;
1518
+ start_time: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1519
+ end_time: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1520
+ priority: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"LOW">, z.ZodLiteral<"MEDIUM">, z.ZodLiteral<"HIGH">]>>;
1521
+ owner_id: z.ZodString;
1522
+ project_id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1523
+ goal_id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1524
+ parent_id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1525
+ rank: z.ZodOptional<z.ZodString>;
1526
+ kind: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"task">, z.ZodLiteral<"phase">, z.ZodLiteral<"approval">]>>;
1527
+ completion_policy: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"manual">, z.ZodLiteral<"auto_children">]>>;
1528
+ force: z.ZodOptional<z.ZodBoolean>;
1529
+ }, "strip", z.ZodTypeAny, {
1530
+ owner_id: string;
1531
+ id?: string | null | undefined;
1532
+ kind?: "task" | "phase" | "approval" | undefined;
1533
+ project_id?: string | null | undefined;
1534
+ description?: string | null | undefined;
1535
+ visibility?: "PUBLIC" | "PRIVATE" | "HIDDEN" | "ARCHIVED" | "DRAFT" | "DELETED" | undefined;
1536
+ title?: string | undefined;
1537
+ progress?: "UNSTARTED" | "IN_PROGRESS" | "COMPLETED" | undefined;
1538
+ goal_id?: string | null | undefined;
1539
+ start_time?: string | null | undefined;
1540
+ end_time?: string | null | undefined;
1541
+ summary?: string | null | undefined;
1542
+ priority?: "LOW" | "MEDIUM" | "HIGH" | undefined;
1543
+ parent_id?: string | null | undefined;
1544
+ rank?: string | undefined;
1545
+ completion_policy?: "manual" | "auto_children" | undefined;
1546
+ force?: boolean | undefined;
1547
+ }, {
1548
+ owner_id: string;
1549
+ id?: string | null | undefined;
1550
+ kind?: "task" | "phase" | "approval" | undefined;
1551
+ project_id?: string | null | undefined;
1552
+ description?: string | null | undefined;
1553
+ visibility?: "PUBLIC" | "PRIVATE" | "HIDDEN" | "ARCHIVED" | "DRAFT" | "DELETED" | undefined;
1554
+ title?: string | undefined;
1555
+ progress?: "UNSTARTED" | "IN_PROGRESS" | "COMPLETED" | undefined;
1556
+ goal_id?: string | null | undefined;
1557
+ start_time?: string | null | undefined;
1558
+ end_time?: string | null | undefined;
1559
+ summary?: string | null | undefined;
1560
+ priority?: "LOW" | "MEDIUM" | "HIGH" | undefined;
1561
+ parent_id?: string | null | undefined;
1562
+ rank?: string | undefined;
1563
+ completion_policy?: "manual" | "auto_children" | undefined;
1564
+ force?: boolean | undefined;
1565
+ }>;
1566
+ }, "strip", z.ZodTypeAny, {
1567
+ data: {
1568
+ owner_id: string;
1569
+ id?: string | null | undefined;
1570
+ kind?: "task" | "phase" | "approval" | undefined;
1571
+ project_id?: string | null | undefined;
1572
+ description?: string | null | undefined;
1573
+ visibility?: "PUBLIC" | "PRIVATE" | "HIDDEN" | "ARCHIVED" | "DRAFT" | "DELETED" | undefined;
1574
+ title?: string | undefined;
1575
+ progress?: "UNSTARTED" | "IN_PROGRESS" | "COMPLETED" | undefined;
1576
+ goal_id?: string | null | undefined;
1577
+ start_time?: string | null | undefined;
1578
+ end_time?: string | null | undefined;
1579
+ summary?: string | null | undefined;
1580
+ priority?: "LOW" | "MEDIUM" | "HIGH" | undefined;
1581
+ parent_id?: string | null | undefined;
1582
+ rank?: string | undefined;
1583
+ completion_policy?: "manual" | "auto_children" | undefined;
1584
+ force?: boolean | undefined;
1585
+ };
1586
+ op: "create";
1587
+ handle?: string | undefined;
1588
+ }, {
1589
+ data: {
1590
+ owner_id: string;
1591
+ id?: string | null | undefined;
1592
+ kind?: "task" | "phase" | "approval" | undefined;
1593
+ project_id?: string | null | undefined;
1594
+ description?: string | null | undefined;
1595
+ visibility?: "PUBLIC" | "PRIVATE" | "HIDDEN" | "ARCHIVED" | "DRAFT" | "DELETED" | undefined;
1596
+ title?: string | undefined;
1597
+ progress?: "UNSTARTED" | "IN_PROGRESS" | "COMPLETED" | undefined;
1598
+ goal_id?: string | null | undefined;
1599
+ start_time?: string | null | undefined;
1600
+ end_time?: string | null | undefined;
1601
+ summary?: string | null | undefined;
1602
+ priority?: "LOW" | "MEDIUM" | "HIGH" | undefined;
1603
+ parent_id?: string | null | undefined;
1604
+ rank?: string | undefined;
1605
+ completion_policy?: "manual" | "auto_children" | undefined;
1606
+ force?: boolean | undefined;
1607
+ };
1608
+ op: "create";
1609
+ handle?: string | undefined;
1610
+ }>, z.ZodObject<{
1611
+ op: z.ZodLiteral<"update">;
1612
+ id: z.ZodString;
1613
+ base_rev: z.ZodNumber;
1614
+ data: z.ZodObject<{
1615
+ id: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
1616
+ title: z.ZodOptional<z.ZodOptional<z.ZodString>>;
1617
+ summary: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
1618
+ description: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
1619
+ progress: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"UNSTARTED">, z.ZodLiteral<"IN_PROGRESS">, z.ZodLiteral<"COMPLETED">]>>>;
1620
+ visibility: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"PUBLIC">, z.ZodLiteral<"PRIVATE">, z.ZodLiteral<"HIDDEN">, z.ZodLiteral<"ARCHIVED">, z.ZodLiteral<"DRAFT">, z.ZodLiteral<"DELETED">]>>>;
1621
+ start_time: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
1622
+ end_time: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
1623
+ priority: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"LOW">, z.ZodLiteral<"MEDIUM">, z.ZodLiteral<"HIGH">]>>>;
1624
+ owner_id: z.ZodOptional<z.ZodString>;
1625
+ project_id: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
1626
+ goal_id: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
1627
+ parent_id: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
1628
+ rank: z.ZodOptional<z.ZodOptional<z.ZodString>>;
1629
+ kind: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"task">, z.ZodLiteral<"phase">, z.ZodLiteral<"approval">]>>>;
1630
+ completion_policy: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"manual">, z.ZodLiteral<"auto_children">]>>>;
1631
+ force: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
1632
+ }, "strip", z.ZodTypeAny, {
1633
+ id?: string | null | undefined;
1634
+ kind?: "task" | "phase" | "approval" | undefined;
1635
+ owner_id?: string | undefined;
1636
+ project_id?: string | null | undefined;
1637
+ description?: string | null | undefined;
1638
+ visibility?: "PUBLIC" | "PRIVATE" | "HIDDEN" | "ARCHIVED" | "DRAFT" | "DELETED" | undefined;
1639
+ title?: string | undefined;
1640
+ progress?: "UNSTARTED" | "IN_PROGRESS" | "COMPLETED" | undefined;
1641
+ goal_id?: string | null | undefined;
1642
+ start_time?: string | null | undefined;
1643
+ end_time?: string | null | undefined;
1644
+ summary?: string | null | undefined;
1645
+ priority?: "LOW" | "MEDIUM" | "HIGH" | undefined;
1646
+ parent_id?: string | null | undefined;
1647
+ rank?: string | undefined;
1648
+ completion_policy?: "manual" | "auto_children" | undefined;
1649
+ force?: boolean | undefined;
1650
+ }, {
1651
+ id?: string | null | undefined;
1652
+ kind?: "task" | "phase" | "approval" | undefined;
1653
+ owner_id?: string | undefined;
1654
+ project_id?: string | null | undefined;
1655
+ description?: string | null | undefined;
1656
+ visibility?: "PUBLIC" | "PRIVATE" | "HIDDEN" | "ARCHIVED" | "DRAFT" | "DELETED" | undefined;
1657
+ title?: string | undefined;
1658
+ progress?: "UNSTARTED" | "IN_PROGRESS" | "COMPLETED" | undefined;
1659
+ goal_id?: string | null | undefined;
1660
+ start_time?: string | null | undefined;
1661
+ end_time?: string | null | undefined;
1662
+ summary?: string | null | undefined;
1663
+ priority?: "LOW" | "MEDIUM" | "HIGH" | undefined;
1664
+ parent_id?: string | null | undefined;
1665
+ rank?: string | undefined;
1666
+ completion_policy?: "manual" | "auto_children" | undefined;
1667
+ force?: boolean | undefined;
1668
+ }>;
1669
+ }, "strip", z.ZodTypeAny, {
1670
+ id: string;
1671
+ data: {
1672
+ id?: string | null | undefined;
1673
+ kind?: "task" | "phase" | "approval" | undefined;
1674
+ owner_id?: string | undefined;
1675
+ project_id?: string | null | undefined;
1676
+ description?: string | null | undefined;
1677
+ visibility?: "PUBLIC" | "PRIVATE" | "HIDDEN" | "ARCHIVED" | "DRAFT" | "DELETED" | undefined;
1678
+ title?: string | undefined;
1679
+ progress?: "UNSTARTED" | "IN_PROGRESS" | "COMPLETED" | undefined;
1680
+ goal_id?: string | null | undefined;
1681
+ start_time?: string | null | undefined;
1682
+ end_time?: string | null | undefined;
1683
+ summary?: string | null | undefined;
1684
+ priority?: "LOW" | "MEDIUM" | "HIGH" | undefined;
1685
+ parent_id?: string | null | undefined;
1686
+ rank?: string | undefined;
1687
+ completion_policy?: "manual" | "auto_children" | undefined;
1688
+ force?: boolean | undefined;
1689
+ };
1690
+ op: "update";
1691
+ base_rev: number;
1692
+ }, {
1693
+ id: string;
1694
+ data: {
1695
+ id?: string | null | undefined;
1696
+ kind?: "task" | "phase" | "approval" | undefined;
1697
+ owner_id?: string | undefined;
1698
+ project_id?: string | null | undefined;
1699
+ description?: string | null | undefined;
1700
+ visibility?: "PUBLIC" | "PRIVATE" | "HIDDEN" | "ARCHIVED" | "DRAFT" | "DELETED" | undefined;
1701
+ title?: string | undefined;
1702
+ progress?: "UNSTARTED" | "IN_PROGRESS" | "COMPLETED" | undefined;
1703
+ goal_id?: string | null | undefined;
1704
+ start_time?: string | null | undefined;
1705
+ end_time?: string | null | undefined;
1706
+ summary?: string | null | undefined;
1707
+ priority?: "LOW" | "MEDIUM" | "HIGH" | undefined;
1708
+ parent_id?: string | null | undefined;
1709
+ rank?: string | undefined;
1710
+ completion_policy?: "manual" | "auto_children" | undefined;
1711
+ force?: boolean | undefined;
1712
+ };
1713
+ op: "update";
1714
+ base_rev: number;
1715
+ }>, z.ZodObject<{
1716
+ op: z.ZodLiteral<"reparent">;
1717
+ id: z.ZodString;
1718
+ parent_id: z.ZodNullable<z.ZodString>;
1719
+ base_rev: z.ZodNumber;
1720
+ }, "strip", z.ZodTypeAny, {
1721
+ id: string;
1722
+ parent_id: string | null;
1723
+ op: "reparent";
1724
+ base_rev: number;
1725
+ }, {
1726
+ id: string;
1727
+ parent_id: string | null;
1728
+ op: "reparent";
1729
+ base_rev: number;
1730
+ }>, z.ZodObject<{
1731
+ op: z.ZodLiteral<"link">;
1732
+ link: z.ZodObject<{
1733
+ id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1734
+ src_id: z.ZodString;
1735
+ dst_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1736
+ kind: z.ZodEnum<["blocks", "relates_to", "references", "discovered_from", "tracks_metric"]>;
1737
+ ref: z.ZodOptional<z.ZodNullable<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1738
+ type: z.ZodLiteral<"pr">;
1739
+ url: z.ZodString;
1740
+ }, "strip", z.ZodTypeAny, {
1741
+ type: "pr";
1742
+ url: string;
1743
+ }, {
1744
+ type: "pr";
1745
+ url: string;
1746
+ }>, z.ZodObject<{
1747
+ type: z.ZodLiteral<"commit">;
1748
+ sha: z.ZodString;
1749
+ }, "strip", z.ZodTypeAny, {
1750
+ type: "commit";
1751
+ sha: string;
1752
+ }, {
1753
+ type: "commit";
1754
+ sha: string;
1755
+ }>, z.ZodObject<{
1756
+ type: z.ZodLiteral<"file">;
1757
+ path: z.ZodString;
1758
+ }, "strip", z.ZodTypeAny, {
1759
+ path: string;
1760
+ type: "file";
1761
+ }, {
1762
+ path: string;
1763
+ type: "file";
1764
+ }>, z.ZodObject<{
1765
+ type: z.ZodLiteral<"doc">;
1766
+ doc_id: z.ZodString;
1767
+ }, "strip", z.ZodTypeAny, {
1768
+ type: "doc";
1769
+ doc_id: string;
1770
+ }, {
1771
+ type: "doc";
1772
+ doc_id: string;
1773
+ }>, z.ZodObject<{
1774
+ type: z.ZodLiteral<"metric">;
1775
+ name: z.ZodString;
1776
+ }, "strip", z.ZodTypeAny, {
1777
+ name: string;
1778
+ type: "metric";
1779
+ }, {
1780
+ name: string;
1781
+ type: "metric";
1782
+ }>, z.ZodObject<{
1783
+ type: z.ZodLiteral<"pipeline_run">;
1784
+ run_id: z.ZodString;
1785
+ }, "strip", z.ZodTypeAny, {
1786
+ type: "pipeline_run";
1787
+ run_id: string;
1788
+ }, {
1789
+ type: "pipeline_run";
1790
+ run_id: string;
1791
+ }>]>>>;
1792
+ note: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1793
+ }, "strip", z.ZodTypeAny, {
1794
+ kind: "blocks" | "relates_to" | "references" | "discovered_from" | "tracks_metric";
1795
+ src_id: string;
1796
+ id?: string | null | undefined;
1797
+ ref?: {
1798
+ type: "pr";
1799
+ url: string;
1800
+ } | {
1801
+ type: "commit";
1802
+ sha: string;
1803
+ } | {
1804
+ path: string;
1805
+ type: "file";
1806
+ } | {
1807
+ type: "doc";
1808
+ doc_id: string;
1809
+ } | {
1810
+ name: string;
1811
+ type: "metric";
1812
+ } | {
1813
+ type: "pipeline_run";
1814
+ run_id: string;
1815
+ } | null | undefined;
1816
+ note?: string | null | undefined;
1817
+ dst_id?: string | null | undefined;
1818
+ }, {
1819
+ kind: "blocks" | "relates_to" | "references" | "discovered_from" | "tracks_metric";
1820
+ src_id: string;
1821
+ id?: string | null | undefined;
1822
+ ref?: {
1823
+ type: "pr";
1824
+ url: string;
1825
+ } | {
1826
+ type: "commit";
1827
+ sha: string;
1828
+ } | {
1829
+ path: string;
1830
+ type: "file";
1831
+ } | {
1832
+ type: "doc";
1833
+ doc_id: string;
1834
+ } | {
1835
+ name: string;
1836
+ type: "metric";
1837
+ } | {
1838
+ type: "pipeline_run";
1839
+ run_id: string;
1840
+ } | null | undefined;
1841
+ note?: string | null | undefined;
1842
+ dst_id?: string | null | undefined;
1843
+ }>;
1844
+ }, "strip", z.ZodTypeAny, {
1845
+ link: {
1846
+ kind: "blocks" | "relates_to" | "references" | "discovered_from" | "tracks_metric";
1847
+ src_id: string;
1848
+ id?: string | null | undefined;
1849
+ ref?: {
1850
+ type: "pr";
1851
+ url: string;
1852
+ } | {
1853
+ type: "commit";
1854
+ sha: string;
1855
+ } | {
1856
+ path: string;
1857
+ type: "file";
1858
+ } | {
1859
+ type: "doc";
1860
+ doc_id: string;
1861
+ } | {
1862
+ name: string;
1863
+ type: "metric";
1864
+ } | {
1865
+ type: "pipeline_run";
1866
+ run_id: string;
1867
+ } | null | undefined;
1868
+ note?: string | null | undefined;
1869
+ dst_id?: string | null | undefined;
1870
+ };
1871
+ op: "link";
1872
+ }, {
1873
+ link: {
1874
+ kind: "blocks" | "relates_to" | "references" | "discovered_from" | "tracks_metric";
1875
+ src_id: string;
1876
+ id?: string | null | undefined;
1877
+ ref?: {
1878
+ type: "pr";
1879
+ url: string;
1880
+ } | {
1881
+ type: "commit";
1882
+ sha: string;
1883
+ } | {
1884
+ path: string;
1885
+ type: "file";
1886
+ } | {
1887
+ type: "doc";
1888
+ doc_id: string;
1889
+ } | {
1890
+ name: string;
1891
+ type: "metric";
1892
+ } | {
1893
+ type: "pipeline_run";
1894
+ run_id: string;
1895
+ } | null | undefined;
1896
+ note?: string | null | undefined;
1897
+ dst_id?: string | null | undefined;
1898
+ };
1899
+ op: "link";
1900
+ }>, z.ZodObject<{
1901
+ op: z.ZodLiteral<"unlink">;
1902
+ id: z.ZodString;
1903
+ }, "strip", z.ZodTypeAny, {
1904
+ id: string;
1905
+ op: "unlink";
1906
+ }, {
1907
+ id: string;
1908
+ op: "unlink";
1909
+ }>, z.ZodObject<{
1910
+ op: z.ZodLiteral<"claim">;
1911
+ id: z.ZodString;
1912
+ actor: z.ZodString;
1913
+ base_rev: z.ZodNumber;
1914
+ }, "strip", z.ZodTypeAny, {
1915
+ id: string;
1916
+ op: "claim";
1917
+ base_rev: number;
1918
+ actor: string;
1919
+ }, {
1920
+ id: string;
1921
+ op: "claim";
1922
+ base_rev: number;
1923
+ actor: string;
1924
+ }>, z.ZodObject<{
1925
+ op: z.ZodLiteral<"complete">;
1926
+ id: z.ZodString;
1927
+ base_rev: z.ZodNumber;
1928
+ }, "strip", z.ZodTypeAny, {
1929
+ id: string;
1930
+ op: "complete";
1931
+ base_rev: number;
1932
+ }, {
1933
+ id: string;
1934
+ op: "complete";
1935
+ base_rev: number;
1936
+ }>]>, "many">;
1937
+ }, "strip", z.ZodTypeAny, {
1938
+ idempotency_key: string;
1939
+ ops: ({
1940
+ data: {
1941
+ owner_id: string;
1942
+ id?: string | null | undefined;
1943
+ kind?: "task" | "phase" | "approval" | undefined;
1944
+ project_id?: string | null | undefined;
1945
+ description?: string | null | undefined;
1946
+ visibility?: "PUBLIC" | "PRIVATE" | "HIDDEN" | "ARCHIVED" | "DRAFT" | "DELETED" | undefined;
1947
+ title?: string | undefined;
1948
+ progress?: "UNSTARTED" | "IN_PROGRESS" | "COMPLETED" | undefined;
1949
+ goal_id?: string | null | undefined;
1950
+ start_time?: string | null | undefined;
1951
+ end_time?: string | null | undefined;
1952
+ summary?: string | null | undefined;
1953
+ priority?: "LOW" | "MEDIUM" | "HIGH" | undefined;
1954
+ parent_id?: string | null | undefined;
1955
+ rank?: string | undefined;
1956
+ completion_policy?: "manual" | "auto_children" | undefined;
1957
+ force?: boolean | undefined;
1958
+ };
1959
+ op: "create";
1960
+ handle?: string | undefined;
1961
+ } | {
1962
+ id: string;
1963
+ data: {
1964
+ id?: string | null | undefined;
1965
+ kind?: "task" | "phase" | "approval" | undefined;
1966
+ owner_id?: string | undefined;
1967
+ project_id?: string | null | undefined;
1968
+ description?: string | null | undefined;
1969
+ visibility?: "PUBLIC" | "PRIVATE" | "HIDDEN" | "ARCHIVED" | "DRAFT" | "DELETED" | undefined;
1970
+ title?: string | undefined;
1971
+ progress?: "UNSTARTED" | "IN_PROGRESS" | "COMPLETED" | undefined;
1972
+ goal_id?: string | null | undefined;
1973
+ start_time?: string | null | undefined;
1974
+ end_time?: string | null | undefined;
1975
+ summary?: string | null | undefined;
1976
+ priority?: "LOW" | "MEDIUM" | "HIGH" | undefined;
1977
+ parent_id?: string | null | undefined;
1978
+ rank?: string | undefined;
1979
+ completion_policy?: "manual" | "auto_children" | undefined;
1980
+ force?: boolean | undefined;
1981
+ };
1982
+ op: "update";
1983
+ base_rev: number;
1984
+ } | {
1985
+ id: string;
1986
+ parent_id: string | null;
1987
+ op: "reparent";
1988
+ base_rev: number;
1989
+ } | {
1990
+ link: {
1991
+ kind: "blocks" | "relates_to" | "references" | "discovered_from" | "tracks_metric";
1992
+ src_id: string;
1993
+ id?: string | null | undefined;
1994
+ ref?: {
1995
+ type: "pr";
1996
+ url: string;
1997
+ } | {
1998
+ type: "commit";
1999
+ sha: string;
2000
+ } | {
2001
+ path: string;
2002
+ type: "file";
2003
+ } | {
2004
+ type: "doc";
2005
+ doc_id: string;
2006
+ } | {
2007
+ name: string;
2008
+ type: "metric";
2009
+ } | {
2010
+ type: "pipeline_run";
2011
+ run_id: string;
2012
+ } | null | undefined;
2013
+ note?: string | null | undefined;
2014
+ dst_id?: string | null | undefined;
2015
+ };
2016
+ op: "link";
2017
+ } | {
2018
+ id: string;
2019
+ op: "unlink";
2020
+ } | {
2021
+ id: string;
2022
+ op: "claim";
2023
+ base_rev: number;
2024
+ actor: string;
2025
+ } | {
2026
+ id: string;
2027
+ op: "complete";
2028
+ base_rev: number;
2029
+ })[];
2030
+ base_revs?: Record<string, number> | undefined;
2031
+ }, {
2032
+ idempotency_key: string;
2033
+ ops: ({
2034
+ data: {
2035
+ owner_id: string;
2036
+ id?: string | null | undefined;
2037
+ kind?: "task" | "phase" | "approval" | undefined;
2038
+ project_id?: string | null | undefined;
2039
+ description?: string | null | undefined;
2040
+ visibility?: "PUBLIC" | "PRIVATE" | "HIDDEN" | "ARCHIVED" | "DRAFT" | "DELETED" | undefined;
2041
+ title?: string | undefined;
2042
+ progress?: "UNSTARTED" | "IN_PROGRESS" | "COMPLETED" | undefined;
2043
+ goal_id?: string | null | undefined;
2044
+ start_time?: string | null | undefined;
2045
+ end_time?: string | null | undefined;
2046
+ summary?: string | null | undefined;
2047
+ priority?: "LOW" | "MEDIUM" | "HIGH" | undefined;
2048
+ parent_id?: string | null | undefined;
2049
+ rank?: string | undefined;
2050
+ completion_policy?: "manual" | "auto_children" | undefined;
2051
+ force?: boolean | undefined;
2052
+ };
2053
+ op: "create";
2054
+ handle?: string | undefined;
2055
+ } | {
2056
+ id: string;
2057
+ data: {
2058
+ id?: string | null | undefined;
2059
+ kind?: "task" | "phase" | "approval" | undefined;
2060
+ owner_id?: string | undefined;
2061
+ project_id?: string | null | undefined;
2062
+ description?: string | null | undefined;
2063
+ visibility?: "PUBLIC" | "PRIVATE" | "HIDDEN" | "ARCHIVED" | "DRAFT" | "DELETED" | undefined;
2064
+ title?: string | undefined;
2065
+ progress?: "UNSTARTED" | "IN_PROGRESS" | "COMPLETED" | undefined;
2066
+ goal_id?: string | null | undefined;
2067
+ start_time?: string | null | undefined;
2068
+ end_time?: string | null | undefined;
2069
+ summary?: string | null | undefined;
2070
+ priority?: "LOW" | "MEDIUM" | "HIGH" | undefined;
2071
+ parent_id?: string | null | undefined;
2072
+ rank?: string | undefined;
2073
+ completion_policy?: "manual" | "auto_children" | undefined;
2074
+ force?: boolean | undefined;
2075
+ };
2076
+ op: "update";
2077
+ base_rev: number;
2078
+ } | {
2079
+ id: string;
2080
+ parent_id: string | null;
2081
+ op: "reparent";
2082
+ base_rev: number;
2083
+ } | {
2084
+ link: {
2085
+ kind: "blocks" | "relates_to" | "references" | "discovered_from" | "tracks_metric";
2086
+ src_id: string;
2087
+ id?: string | null | undefined;
2088
+ ref?: {
2089
+ type: "pr";
2090
+ url: string;
2091
+ } | {
2092
+ type: "commit";
2093
+ sha: string;
2094
+ } | {
2095
+ path: string;
2096
+ type: "file";
2097
+ } | {
2098
+ type: "doc";
2099
+ doc_id: string;
2100
+ } | {
2101
+ name: string;
2102
+ type: "metric";
2103
+ } | {
2104
+ type: "pipeline_run";
2105
+ run_id: string;
2106
+ } | null | undefined;
2107
+ note?: string | null | undefined;
2108
+ dst_id?: string | null | undefined;
2109
+ };
2110
+ op: "link";
2111
+ } | {
2112
+ id: string;
2113
+ op: "unlink";
2114
+ } | {
2115
+ id: string;
2116
+ op: "claim";
2117
+ base_rev: number;
2118
+ actor: string;
2119
+ } | {
2120
+ id: string;
2121
+ op: "complete";
2122
+ base_rev: number;
2123
+ })[];
2124
+ base_revs?: Record<string, number> | undefined;
2125
+ }>;
2126
+ type ApplyRequest = z.infer<typeof apply_request>;
2127
+ declare const claim_request: z.ZodObject<{
2128
+ actor: z.ZodString;
2129
+ base_rev: z.ZodNumber;
2130
+ }, "strip", z.ZodTypeAny, {
2131
+ base_rev: number;
2132
+ actor: string;
2133
+ }, {
2134
+ base_rev: number;
2135
+ actor: string;
2136
+ }>;
2137
+ type ClaimRequest = z.infer<typeof claim_request>;
2138
+
2139
+ type User = InferSelectModel<typeof user>;
2140
+ type Session = InferSelectModel<typeof session>;
2141
+ type ApiKey = InferSelectModel<typeof api_keys>;
2142
+ type Project = InferSelectModel<typeof project>;
2143
+ type Task = InferSelectModel<typeof task>;
2144
+ type Tag = InferSelectModel<typeof tag>;
2145
+ type Milestone = InferSelectModel<typeof milestone>;
2146
+ type Goal = InferSelectModel<typeof goal>;
2147
+ type TaskTag = InferSelectModel<typeof task_tag>;
2148
+ type Action = InferSelectModel<typeof action>;
2149
+ type CodebaseTask = InferSelectModel<typeof codebase_tasks>;
2150
+ type TodoUpdate = InferSelectModel<typeof todo_updates>;
2151
+ type TrackerResult = InferSelectModel<typeof tracker_result>;
2152
+ type TagConfig = InferSelectModel<typeof tag_config>;
2153
+ type IgnorePath = InferSelectModel<typeof ignore_path>;
2154
+ type TaskLink = InferSelectModel<typeof task_link>;
2155
+ type TaskRollup = InferSelectModel<typeof task_rollup>;
2156
+ type ApplyLog = InferSelectModel<typeof apply_log>;
2157
+ type PipelinePackage = InferSelectModel<typeof pipeline_package>;
2158
+ type PipelineRun = InferSelectModel<typeof pipeline_run>;
2159
+ type PipelineStageEvent = InferSelectModel<typeof pipeline_stage_event>;
2160
+ type PipelineGrant = InferSelectModel<typeof pipeline_grant>;
2161
+ type PipelineApproval = InferSelectModel<typeof pipeline_approval>;
2162
+ type PipelineAnalysisTemplate = InferSelectModel<typeof pipeline_analysis_template>;
2163
+ type PipelineOidcTrust = InferSelectModel<typeof pipeline_oidc_trust>;
2164
+ type UpsertPipelinePackage = z.infer<typeof upsert_pipeline_package>;
2165
+ type UpsertPipelineRun = z.infer<typeof upsert_pipeline_run>;
2166
+ type InsertPipelineStageEvent = z.infer<typeof insert_pipeline_stage_event>;
2167
+ type UpsertPipelineGrant = z.infer<typeof upsert_pipeline_grant>;
2168
+ type UpsertPipelineApproval = z.infer<typeof upsert_pipeline_approval>;
2169
+ type UpsertPipelineAnalysisTemplate = z.infer<typeof upsert_pipeline_analysis_template>;
2170
+ type UpsertPipelineOidcTrust = z.infer<typeof upsert_pipeline_oidc_trust>;
2171
+ type UpsertProject = z.infer<typeof upsert_project>;
2172
+ type UpsertTodo = z.infer<typeof upsert_todo>;
2173
+ type UpsertTag = z.infer<typeof upsert_tag>;
2174
+ type UpsertMilestone = z.infer<typeof upsert_milestone>;
2175
+ type UpsertGoal = z.infer<typeof upsert_goal>;
2176
+ type ExternalRef = z.infer<typeof external_ref>;
2177
+ type UpsertTaskLink = z.infer<typeof upsert_task_link>;
2178
+ type UpdateAction = z.infer<typeof update_action>;
2179
+ type ProjectConfig = z.infer<typeof project_config>;
2180
+ type SaveConfigRequest = z.infer<typeof save_config_request>;
2181
+ type TaskWithDetails = {
2182
+ task: Task;
2183
+ codebase_tasks: CodebaseTask | null;
2184
+ tags: string[];
2185
+ };
2186
+ type ProjectWithTasks = {
2187
+ project: Project;
2188
+ tasks: TaskWithDetails[];
2189
+ };
2190
+ type TagWithColor = {
2191
+ id: string;
2192
+ title: string;
2193
+ color: string | null;
2194
+ count?: number;
2195
+ };
2196
+ type GetConfigResult = {
2197
+ config: ProjectConfig;
2198
+ scan_branch: string;
2199
+ };
2200
+ declare const TAG_COLOURS: {
2201
+ readonly red: {
2202
+ readonly colour: "#F28B82";
2203
+ readonly text: "#faeeef";
2204
+ readonly border: "#F5A5A5";
2205
+ };
2206
+ readonly green: {
2207
+ readonly colour: "#CCFF90";
2208
+ readonly text: "#2E7D32";
2209
+ readonly border: "#A5D6A7";
2210
+ };
2211
+ readonly blue: {
2212
+ readonly colour: "#82B1FF";
2213
+ readonly text: "#0D47A1";
2214
+ readonly border: "#90CAF9";
2215
+ };
2216
+ readonly yellow: {
2217
+ readonly colour: "#FFF176";
2218
+ readonly text: "#F57F17";
2219
+ readonly border: "#FFF59D";
2220
+ };
2221
+ readonly purple: {
2222
+ readonly colour: "#E1BEE7";
2223
+ readonly text: "#4A148C";
2224
+ readonly border: "#CE93D8";
2225
+ };
2226
+ readonly orange: {
2227
+ readonly colour: "#FFCC80";
2228
+ readonly text: "#E65100";
2229
+ readonly border: "#FFB74D";
2230
+ };
2231
+ readonly teal: {
2232
+ readonly colour: "#80CBC4";
2233
+ readonly text: "#004D40";
2234
+ readonly border: "#4DB6AC";
2235
+ };
2236
+ readonly pink: {
2237
+ readonly colour: "#F8BBD9";
2238
+ readonly text: "#880E4F";
2239
+ readonly border: "#F48FB1";
2240
+ };
2241
+ readonly gray: {
2242
+ readonly colour: "#CFD8DC";
2243
+ readonly text: "#37474F";
2244
+ readonly border: "#B0BEC5";
2245
+ };
2246
+ readonly cyan: {
2247
+ readonly colour: "#84FFFF";
2248
+ readonly text: "#006064";
2249
+ readonly border: "#4DD0E1";
2250
+ };
2251
+ readonly lime: {
2252
+ readonly colour: "#ddf0bc";
2253
+ readonly text: "#88b47f";
2254
+ readonly border: "#becca5";
2255
+ };
2256
+ };
2257
+ type TagColor = keyof typeof TAG_COLOURS;
2258
+ type _FetchedTag = InferSelectModel<typeof tag>;
2259
+ type TagWithTypedColor = Omit<_FetchedTag, "color"> & {
2260
+ color: TagColor | null;
2261
+ };
2262
+ type Nullable<T> = {
2263
+ [P in keyof T]: T[P] | null;
2264
+ };
2265
+ type TaskView = "list" | "grid";
2266
+ type ScanStatus = "PENDING" | "ACCEPTED" | "REJECTED" | "IGNORED";
2267
+ type HistoryAction = Omit<Action, "updated_at" | "owner_id" | "type"> & {
2268
+ type: ActionType | "SCAN";
2269
+ };
2270
+ type UpdateData = {
2271
+ id: string;
2272
+ tag: string;
2273
+ type: "SAME" | "UPDATE" | "DELETE" | "NEW" | "MOVE";
2274
+ data: {
2275
+ old: {
2276
+ text: string;
2277
+ line: number;
2278
+ file: string;
2279
+ context?: string[];
2280
+ };
2281
+ new: {
2282
+ text: string;
2283
+ line: number;
2284
+ file: string;
2285
+ context?: string[];
2286
+ };
2287
+ };
2288
+ task?: TaskWithDetails;
2289
+ };
2290
+ type UpdateUser = z.infer<typeof update_user>;
2291
+ type ConfigSchemaType = z.infer<typeof config_schema>;
2292
+
2293
+ export { type UpsertPipelineApproval as $, type Action as A, type Task as B, type ClaimRequest as C, type DashboardResponse as D, type ExternalRef as E, type TaskLink as F, type GetConfigResult as G, type HistoryAction as H, type IgnorePath as I, type TaskRollup as J, type TaskTag as K, type TaskView as L, type Milestone as M, type Nullable as N, type TaskWithDetails as O, type PipelineAnalysisTemplate as P, type TodoUpdate as Q, type RolloutShapeZ as R, type SaveConfigRequest as S, TAG_COLOURS as T, type TrackerResult as U, type UpdateAction as V, type UpdateData as W, type UpdateUser as X, type UpsertGoal as Y, type UpsertMilestone as Z, type UpsertPipelineAnalysisTemplate as _, type ApiKey as a, type UpsertPipelineGrant as a0, type UpsertPipelineOidcTrust as a1, type UpsertPipelinePackage as a2, type UpsertPipelineRun as a3, type UpsertProject as a4, type UpsertTag as a5, type UpsertTaskLink as a6, type UpsertTodo as a7, type User as a8, type WebhookEventBody as a9, upsert_goal as aA, upsert_milestone as aB, upsert_pipeline_analysis_template as aC, upsert_pipeline_approval as aD, upsert_pipeline_grant as aE, upsert_pipeline_oidc_trust as aF, upsert_pipeline_package as aG, upsert_pipeline_run as aH, upsert_project as aI, upsert_tag as aJ, upsert_task_link as aK, upsert_todo as aL, webhook_event_body as aM, apply_op as aa, apply_request as ab, approval_decision as ac, claim_request as ad, config_schema as ae, dashboard_response as af, dashboard_window_query as ag, external_ref as ah, forced_atomic_reason as ai, gate_descriptor as aj, grant_scope as ak, insert_pipeline_stage_event as al, pipeline_oidc_provider as am, project_config as an, resolved_gates as ao, resolved_rollout as ap, rollout_shape as aq, rollout_stage as ar, run_kind as as, run_status as at, save_config_request as au, save_tags_request as av, stage_event_kind as aw, task_link_kind as ax, update_action as ay, update_user as az, type ApplyLog as b, type ApplyOp as c, type ApplyRequest as d, type CodebaseTask as e, type ConfigSchemaType as f, type DashboardWindowQuery as g, type Goal as h, type InsertPipelineStageEvent as i, type PipelineApproval as j, type PipelineGrant as k, type PipelineOidcTrust as l, type PipelinePackage as m, type PipelineRun as n, type PipelineStageEvent as o, type Project as p, type ProjectConfig as q, type ProjectWithTasks as r, type RunKindZ as s, type ScanStatus as t, type Session as u, type Tag as v, type TagColor as w, type TagConfig as x, type TagWithColor as y, type TagWithTypedColor as z };