@qawolf/api-contracts 0.2.0 → 0.14.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.
Files changed (74) hide show
  1. package/README.md +1 -1
  2. package/dist/v1/automate/index.d.ts +17 -0
  3. package/dist/v1/automate/index.d.ts.map +1 -0
  4. package/dist/v1/automate/index.js +29 -0
  5. package/dist/v1/automate/index.js.map +1 -0
  6. package/dist/v1/environment/find.d.ts +46 -0
  7. package/dist/v1/environment/find.d.ts.map +1 -0
  8. package/dist/v1/environment/find.js +30 -0
  9. package/dist/v1/environment/find.js.map +1 -0
  10. package/dist/v1/environment/index.d.ts +92 -0
  11. package/dist/v1/environment/index.d.ts.map +1 -0
  12. package/dist/v1/environment/index.js +84 -0
  13. package/dist/v1/environment/index.js.map +1 -0
  14. package/dist/v1/environment/resource.d.ts +29 -0
  15. package/dist/v1/environment/resource.d.ts.map +1 -0
  16. package/dist/v1/environment/resource.js +46 -0
  17. package/dist/v1/environment/resource.js.map +1 -0
  18. package/dist/v1/flow/addTag.d.ts +19 -0
  19. package/dist/v1/flow/addTag.d.ts.map +1 -0
  20. package/dist/v1/flow/addTag.js +29 -0
  21. package/dist/v1/flow/addTag.js.map +1 -0
  22. package/dist/v1/flow/index.d.ts +6 -2
  23. package/dist/v1/flow/index.d.ts.map +1 -1
  24. package/dist/v1/flow/index.js +7 -2
  25. package/dist/v1/flow/index.js.map +1 -1
  26. package/dist/v1/ids.d.ts +5 -2
  27. package/dist/v1/ids.d.ts.map +1 -1
  28. package/dist/v1/ids.js +3 -0
  29. package/dist/v1/ids.js.map +1 -1
  30. package/dist/v1/index.d.ts +878 -9
  31. package/dist/v1/index.d.ts.map +1 -1
  32. package/dist/v1/index.js +42 -8
  33. package/dist/v1/index.js.map +1 -1
  34. package/dist/v1/issue/create.d.ts +77 -0
  35. package/dist/v1/issue/create.d.ts.map +1 -0
  36. package/dist/v1/issue/create.js +44 -0
  37. package/dist/v1/issue/create.js.map +1 -0
  38. package/dist/v1/issue/index.d.ts +167 -0
  39. package/dist/v1/issue/index.d.ts.map +1 -0
  40. package/dist/v1/issue/index.js +82 -0
  41. package/dist/v1/issue/index.js.map +1 -0
  42. package/dist/v1/pagination.d.ts +26 -0
  43. package/dist/v1/pagination.d.ts.map +1 -0
  44. package/dist/v1/pagination.js +37 -0
  45. package/dist/v1/pagination.js.map +1 -0
  46. package/dist/v1/resource.d.ts +20 -0
  47. package/dist/v1/resource.d.ts.map +1 -0
  48. package/dist/v1/resource.js +19 -0
  49. package/dist/v1/resource.js.map +1 -0
  50. package/dist/v1/run/find.d.ts +40 -0
  51. package/dist/v1/run/find.d.ts.map +1 -0
  52. package/dist/v1/run/find.js +35 -0
  53. package/dist/v1/run/find.js.map +1 -0
  54. package/dist/v1/run/flowSelection.d.ts +9 -0
  55. package/dist/v1/run/flowSelection.d.ts.map +1 -0
  56. package/dist/v1/run/flowSelection.js +12 -0
  57. package/dist/v1/run/flowSelection.js.map +1 -0
  58. package/dist/v1/run/get.d.ts +51 -0
  59. package/dist/v1/run/get.d.ts.map +1 -0
  60. package/dist/v1/run/get.js +55 -0
  61. package/dist/v1/run/get.js.map +1 -0
  62. package/dist/v1/run/index.d.ts +17 -6
  63. package/dist/v1/run/index.d.ts.map +1 -1
  64. package/dist/v1/run/index.js +24 -5
  65. package/dist/v1/run/index.js.map +1 -1
  66. package/dist/v1/run/summary.d.ts +23 -0
  67. package/dist/v1/run/summary.d.ts.map +1 -0
  68. package/dist/v1/run/summary.js +31 -0
  69. package/dist/v1/run/summary.js.map +1 -0
  70. package/dist/v1/tag/index.d.ts +24 -0
  71. package/dist/v1/tag/index.d.ts.map +1 -0
  72. package/dist/v1/tag/index.js +41 -0
  73. package/dist/v1/tag/index.js.map +1 -0
  74. package/package.json +9 -9
@@ -1,6 +1,7 @@
1
1
  import type { z } from "zod";
2
2
  export type { AnyPublicApiContract, PublicApiContract, PublicApiContractKind, } from "./definition.js";
3
3
  export { type PublicIdSchema, type PublicIdSchemas, defaultIdSchemas, } from "./ids.js";
4
+ export { makeFlowSelectionSchema } from "./run/index.js";
4
5
  import type { AnyPublicApiContract } from "./definition.js";
5
6
  import { type PublicIdSchema, type PublicIdSchemasOf } from "./ids.js";
6
7
  export type PublicApiInput<Api extends AnyPublicApiContract> = z.input<Api["input"]>;
@@ -12,8 +13,168 @@ export type PublicApiOutput<Api extends AnyPublicApiContract> = z.infer<Api["out
12
13
  * the same factory with its own strict id schemas, so the contract shape can
13
14
  * never drift between the two while validation strictness stays server-owned.
14
15
  */
15
- export declare const makeContractsV1: <EnvironmentId extends PublicIdSchema, FlowId extends PublicIdSchema, RunId extends PublicIdSchema>(ids: PublicIdSchemasOf<EnvironmentId, FlowId, RunId>) => {
16
+ export declare const makeContractsV1: <EnvironmentId extends PublicIdSchema, FlowId extends PublicIdSchema, RunId extends PublicIdSchema, AutomationId extends PublicIdSchema = PublicIdSchema, IssueId extends PublicIdSchema = PublicIdSchema, WorkspaceId extends PublicIdSchema = PublicIdSchema>(ids: PublicIdSchemasOf<EnvironmentId, FlowId, RunId, AutomationId, IssueId, WorkspaceId>) => {
17
+ automate: {
18
+ readonly description: "Request an automation that builds the selected draft flows in an environment.";
19
+ readonly input: z.ZodObject<{
20
+ environmentId: EnvironmentId;
21
+ flowIds: z.ZodArray<FlowId>;
22
+ patch: z.ZodOptional<z.ZodString>;
23
+ }, z.core.$strip>;
24
+ readonly kind: "write";
25
+ readonly name: "automate";
26
+ readonly output: z.ZodObject<{
27
+ automationId: AutomationId;
28
+ url: z.ZodURL;
29
+ }, z.core.$strip>;
30
+ };
31
+ environment: {
32
+ create: {
33
+ readonly description: "Create an environment on the caller's team and return it in the environment.get shape.";
34
+ readonly input: z.ZodObject<{
35
+ name: z.ZodString;
36
+ workspaceId: z.ZodOptional<WorkspaceId>;
37
+ }, z.core.$strip>;
38
+ readonly kind: "write";
39
+ readonly name: "environment.create";
40
+ readonly output: z.ZodObject<{
41
+ flowCodeBranch: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
42
+ lastSyncedCommitHash: z.ZodString;
43
+ name: z.ZodString;
44
+ syncStatus: z.ZodLiteral<"reconciled">;
45
+ }, z.core.$strip>, z.ZodObject<{
46
+ name: z.ZodString;
47
+ syncStatus: z.ZodLiteral<"not-reconciled">;
48
+ }, z.core.$strip>], "syncStatus">>;
49
+ id: EnvironmentId;
50
+ kind: z.ZodEnum<{
51
+ static: "static";
52
+ preview: "preview";
53
+ }>;
54
+ name: z.ZodString;
55
+ status: z.ZodEnum<{
56
+ blocked: "blocked";
57
+ "needs-investigation": "needs-investigation";
58
+ ready: "ready";
59
+ running: "running";
60
+ }>;
61
+ terminatedAt: z.ZodOptional<z.ZodISODateTime>;
62
+ url: z.ZodURL;
63
+ }, z.core.$strip>;
64
+ };
65
+ find: {
66
+ readonly description: "List the team's environments, newest first.";
67
+ readonly input: z.ZodObject<{
68
+ cursor: z.ZodOptional<z.ZodString>;
69
+ limit: z.ZodDefault<z.ZodNumber>;
70
+ includeTerminated: z.ZodDefault<z.ZodBoolean>;
71
+ kind: z.ZodOptional<z.ZodEnum<{
72
+ static: "static";
73
+ preview: "preview";
74
+ }>>;
75
+ }, z.core.$strip>;
76
+ readonly kind: "read";
77
+ readonly name: "environment.find";
78
+ readonly output: z.ZodObject<{
79
+ environments: z.ZodArray<z.ZodObject<{
80
+ flowCodeBranch: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
81
+ lastSyncedCommitHash: z.ZodString;
82
+ name: z.ZodString;
83
+ syncStatus: z.ZodLiteral<"reconciled">;
84
+ }, z.core.$strip>, z.ZodObject<{
85
+ name: z.ZodString;
86
+ syncStatus: z.ZodLiteral<"not-reconciled">;
87
+ }, z.core.$strip>], "syncStatus">>;
88
+ id: EnvironmentId;
89
+ kind: z.ZodEnum<{
90
+ static: "static";
91
+ preview: "preview";
92
+ }>;
93
+ name: z.ZodString;
94
+ status: z.ZodEnum<{
95
+ blocked: "blocked";
96
+ "needs-investigation": "needs-investigation";
97
+ ready: "ready";
98
+ running: "running";
99
+ }>;
100
+ terminatedAt: z.ZodOptional<z.ZodISODateTime>;
101
+ url: z.ZodURL;
102
+ }, z.core.$strip>>;
103
+ nextCursor: z.ZodOptional<z.ZodString>;
104
+ }, z.core.$strip>;
105
+ };
106
+ get: {
107
+ readonly description: "Read a single environment's name, kind, health status, and termination state.";
108
+ readonly input: z.ZodObject<{
109
+ environmentId: EnvironmentId;
110
+ }, z.core.$strip>;
111
+ readonly kind: "read";
112
+ readonly name: "environment.get";
113
+ readonly output: z.ZodObject<{
114
+ flowCodeBranch: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
115
+ lastSyncedCommitHash: z.ZodString;
116
+ name: z.ZodString;
117
+ syncStatus: z.ZodLiteral<"reconciled">;
118
+ }, z.core.$strip>, z.ZodObject<{
119
+ name: z.ZodString;
120
+ syncStatus: z.ZodLiteral<"not-reconciled">;
121
+ }, z.core.$strip>], "syncStatus">>;
122
+ id: EnvironmentId;
123
+ kind: z.ZodEnum<{
124
+ static: "static";
125
+ preview: "preview";
126
+ }>;
127
+ name: z.ZodString;
128
+ status: z.ZodEnum<{
129
+ blocked: "blocked";
130
+ "needs-investigation": "needs-investigation";
131
+ ready: "ready";
132
+ running: "running";
133
+ }>;
134
+ terminatedAt: z.ZodOptional<z.ZodISODateTime>;
135
+ url: z.ZodURL;
136
+ }, z.core.$strip>;
137
+ };
138
+ listVariableNames: {
139
+ readonly description: "List the names of an environment's variables, sorted. Names only — values never leave the server.";
140
+ readonly input: z.ZodObject<{
141
+ environmentId: EnvironmentId;
142
+ }, z.core.$strip>;
143
+ readonly kind: "read";
144
+ readonly name: "environment.listVariableNames";
145
+ readonly output: z.ZodObject<{
146
+ variableNames: z.ZodArray<z.ZodString>;
147
+ }, z.core.$strip>;
148
+ };
149
+ setVariable: {
150
+ readonly description: "Create or replace one environment variable by name and return its stored name. The value is never returned.";
151
+ readonly input: z.ZodObject<{
152
+ environmentId: EnvironmentId;
153
+ name: z.ZodString;
154
+ value: z.ZodString;
155
+ }, z.core.$strip>;
156
+ readonly kind: "write";
157
+ readonly name: "environment.setVariable";
158
+ readonly output: z.ZodObject<{
159
+ name: z.ZodString;
160
+ }, z.core.$strip>;
161
+ };
162
+ };
16
163
  flow: {
164
+ addTag: {
165
+ readonly description: "Assign an existing tag to the selected flows. Create tags with tag.create.";
166
+ readonly input: z.ZodObject<{
167
+ flowIds: z.ZodArray<FlowId>;
168
+ tagName: z.ZodString;
169
+ }, z.core.$strip>;
170
+ readonly kind: "write";
171
+ readonly name: "flow.addTag";
172
+ readonly output: z.ZodObject<{
173
+ color: z.ZodString;
174
+ name: z.ZodString;
175
+ url: z.ZodURL;
176
+ }, z.core.$strip>;
177
+ };
17
178
  list: {
18
179
  readonly description: "List the flows of an environment at its latest reconciled commit.";
19
180
  readonly input: z.ZodObject<{
@@ -29,29 +190,463 @@ export declare const makeContractsV1: <EnvironmentId extends PublicIdSchema, Flo
29
190
  name: z.ZodString;
30
191
  path: z.ZodString;
31
192
  tags: z.ZodArray<z.ZodString>;
193
+ url: z.ZodURL;
32
194
  }, z.core.$strip>>;
33
195
  }, z.core.$strip>;
34
196
  };
35
197
  };
36
- run: {
198
+ issue: {
37
199
  create: {
38
- readonly description: "Create a run for selected flows in an environment.";
200
+ readonly description: string;
201
+ readonly input: z.ZodDiscriminatedUnion<[z.ZodObject<{
202
+ type: z.ZodLiteral<"bug">;
203
+ description: z.ZodOptional<z.ZodString>;
204
+ name: z.ZodString;
205
+ priority: z.ZodOptional<z.ZodEnum<{
206
+ unprioritized: "unprioritized";
207
+ low: "low";
208
+ medium: "medium";
209
+ high: "high";
210
+ urgent: "urgent";
211
+ }>>;
212
+ workspaceId: z.ZodOptional<WorkspaceId>;
213
+ }, z.core.$strip>, z.ZodObject<{
214
+ estimatedDueDate: z.ZodOptional<z.ZodISODate>;
215
+ type: z.ZodLiteral<"coverageRequest">;
216
+ description: z.ZodOptional<z.ZodString>;
217
+ name: z.ZodString;
218
+ priority: z.ZodOptional<z.ZodEnum<{
219
+ unprioritized: "unprioritized";
220
+ low: "low";
221
+ medium: "medium";
222
+ high: "high";
223
+ urgent: "urgent";
224
+ }>>;
225
+ workspaceId: z.ZodOptional<WorkspaceId>;
226
+ }, z.core.$strip>], "type">;
227
+ readonly kind: "write";
228
+ readonly name: "issue.create";
229
+ readonly output: z.ZodObject<{
230
+ issue: z.ZodObject<{
231
+ createdAt: z.ZodCoercedDate<unknown>;
232
+ description: z.ZodString;
233
+ issueId: IssueId;
234
+ name: z.ZodString;
235
+ number: z.ZodNumber;
236
+ priority: z.ZodEnum<{
237
+ unprioritized: "unprioritized";
238
+ low: "low";
239
+ medium: "medium";
240
+ high: "high";
241
+ urgent: "urgent";
242
+ }>;
243
+ reproductions: z.ZodArray<z.ZodObject<{
244
+ environmentId: EnvironmentId;
245
+ firstReproducedInRunId: RunId;
246
+ flowId: FlowId;
247
+ isActive: z.ZodBoolean;
248
+ lastReproducedInRunId: RunId;
249
+ }, z.core.$strip>>;
250
+ status: z.ZodEnum<{
251
+ pending: "pending";
252
+ inProgress: "inProgress";
253
+ paused: "paused";
254
+ resolved: "resolved";
255
+ canceled: "canceled";
256
+ archived: "archived";
257
+ }>;
258
+ type: z.ZodEnum<{
259
+ bug: "bug";
260
+ coverageRequest: "coverageRequest";
261
+ maintenance: "maintenance";
262
+ }>;
263
+ url: z.ZodURL;
264
+ }, z.core.$strip>;
265
+ }, z.core.$strip>;
266
+ };
267
+ find: {
268
+ readonly description: "List the team's bug reports, maintenance reports, or coverage requests, newest first.";
39
269
  readonly input: z.ZodObject<{
270
+ statuses: z.ZodDefault<z.ZodArray<z.ZodEnum<{
271
+ pending: "pending";
272
+ inProgress: "inProgress";
273
+ paused: "paused";
274
+ resolved: "resolved";
275
+ canceled: "canceled";
276
+ archived: "archived";
277
+ }>>>;
278
+ type: z.ZodEnum<{
279
+ bug: "bug";
280
+ coverageRequest: "coverageRequest";
281
+ maintenance: "maintenance";
282
+ }>;
283
+ workspaceId: z.ZodOptional<WorkspaceId>;
284
+ cursor: z.ZodOptional<z.ZodString>;
285
+ limit: z.ZodDefault<z.ZodNumber>;
286
+ }, z.core.$strip>;
287
+ readonly kind: "read";
288
+ readonly name: "issue.find";
289
+ readonly output: z.ZodObject<{
290
+ issues: z.ZodArray<z.ZodObject<{
291
+ createdAt: z.ZodCoercedDate<unknown>;
292
+ description: z.ZodString;
293
+ issueId: IssueId;
294
+ name: z.ZodString;
295
+ number: z.ZodNumber;
296
+ priority: z.ZodEnum<{
297
+ unprioritized: "unprioritized";
298
+ low: "low";
299
+ medium: "medium";
300
+ high: "high";
301
+ urgent: "urgent";
302
+ }>;
303
+ reproductions: z.ZodArray<z.ZodObject<{
304
+ environmentId: EnvironmentId;
305
+ firstReproducedInRunId: RunId;
306
+ flowId: FlowId;
307
+ isActive: z.ZodBoolean;
308
+ lastReproducedInRunId: RunId;
309
+ }, z.core.$strip>>;
310
+ status: z.ZodEnum<{
311
+ pending: "pending";
312
+ inProgress: "inProgress";
313
+ paused: "paused";
314
+ resolved: "resolved";
315
+ canceled: "canceled";
316
+ archived: "archived";
317
+ }>;
318
+ type: z.ZodEnum<{
319
+ bug: "bug";
320
+ coverageRequest: "coverageRequest";
321
+ maintenance: "maintenance";
322
+ }>;
323
+ url: z.ZodURL;
324
+ }, z.core.$strip>>;
325
+ nextCursor: z.ZodOptional<z.ZodString>;
326
+ }, z.core.$strip>;
327
+ };
328
+ get: {
329
+ readonly description: "Get an issue by id.";
330
+ readonly input: z.ZodObject<{
331
+ issueId: IssueId;
332
+ }, z.core.$strip>;
333
+ readonly kind: "read";
334
+ readonly name: "issue.get";
335
+ readonly output: z.ZodObject<{
336
+ issue: z.ZodObject<{
337
+ createdAt: z.ZodCoercedDate<unknown>;
338
+ description: z.ZodString;
339
+ issueId: IssueId;
340
+ name: z.ZodString;
341
+ number: z.ZodNumber;
342
+ priority: z.ZodEnum<{
343
+ unprioritized: "unprioritized";
344
+ low: "low";
345
+ medium: "medium";
346
+ high: "high";
347
+ urgent: "urgent";
348
+ }>;
349
+ reproductions: z.ZodArray<z.ZodObject<{
350
+ environmentId: EnvironmentId;
351
+ firstReproducedInRunId: RunId;
352
+ flowId: FlowId;
353
+ isActive: z.ZodBoolean;
354
+ lastReproducedInRunId: RunId;
355
+ }, z.core.$strip>>;
356
+ status: z.ZodEnum<{
357
+ pending: "pending";
358
+ inProgress: "inProgress";
359
+ paused: "paused";
360
+ resolved: "resolved";
361
+ canceled: "canceled";
362
+ archived: "archived";
363
+ }>;
364
+ type: z.ZodEnum<{
365
+ bug: "bug";
366
+ coverageRequest: "coverageRequest";
367
+ maintenance: "maintenance";
368
+ }>;
369
+ url: z.ZodURL;
370
+ }, z.core.$strip>;
371
+ }, z.core.$strip>;
372
+ };
373
+ };
374
+ run: {
375
+ create: {
376
+ readonly description: "Create a run for the selected flows and/or tags in an environment.";
377
+ readonly input: z.ZodIntersection<z.ZodObject<{
40
378
  environmentId: EnvironmentId;
41
379
  environmentVariables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
42
- flowIds: z.ZodArray<FlowId>;
43
380
  ignoreRules: z.ZodDefault<z.ZodBoolean>;
44
- }, z.core.$strip>;
381
+ pullRequestNumber: z.ZodOptional<z.ZodNumber>;
382
+ repository: z.ZodOptional<z.ZodString>;
383
+ }, z.core.$strip>, z.ZodObject<{
384
+ flowIds: z.ZodDefault<z.ZodArray<FlowId>>;
385
+ tagNames: z.ZodDefault<z.ZodArray<z.ZodString>>;
386
+ }, z.core.$strip>>;
45
387
  readonly kind: "write";
46
388
  readonly name: "run.create";
47
389
  readonly output: z.ZodObject<{
48
390
  runId: RunId;
391
+ url: z.ZodURL;
392
+ }, z.core.$strip>;
393
+ };
394
+ find: {
395
+ readonly description: "List an environment's recent runs, newest first.";
396
+ readonly input: z.ZodObject<{
397
+ environmentId: EnvironmentId;
398
+ cursor: z.ZodOptional<z.ZodString>;
399
+ limit: z.ZodDefault<z.ZodNumber>;
400
+ createdAfter: z.ZodOptional<z.ZodISODateTime>;
401
+ }, z.core.$strip>;
402
+ readonly kind: "read";
403
+ readonly name: "run.find";
404
+ readonly output: z.ZodObject<{
405
+ nextCursor: z.ZodOptional<z.ZodString>;
406
+ runs: z.ZodArray<z.ZodObject<{
407
+ completedAt: z.ZodOptional<z.ZodISODateTime>;
408
+ createdAt: z.ZodISODateTime;
409
+ git: z.ZodObject<{
410
+ branch: z.ZodOptional<z.ZodString>;
411
+ commitMessage: z.ZodOptional<z.ZodString>;
412
+ commitSha: z.ZodOptional<z.ZodString>;
413
+ commitUrl: z.ZodOptional<z.ZodString>;
414
+ }, z.core.$strip>;
415
+ runId: RunId;
416
+ status: z.ZodEnum<{
417
+ running: "running";
418
+ canceled: "canceled";
419
+ queued: "queued";
420
+ passed: "passed";
421
+ failed: "failed";
422
+ }>;
423
+ url: z.ZodURL;
424
+ }, z.core.$strip>>;
425
+ }, z.core.$strip>;
426
+ };
427
+ get: {
428
+ readonly description: "Get a run's status, per-flow results, and links.";
429
+ readonly input: z.ZodObject<{
430
+ runId: RunId;
431
+ }, z.core.$strip>;
432
+ readonly kind: "read";
433
+ readonly name: "run.get";
434
+ readonly output: z.ZodObject<{
435
+ flows: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
436
+ failure: z.ZodObject<{
437
+ error: z.ZodString;
438
+ }, z.core.$strip>;
439
+ flowId: FlowId;
440
+ name: z.ZodString;
441
+ status: z.ZodLiteral<"failed">;
442
+ }, z.core.$strip>, z.ZodObject<{
443
+ flowId: FlowId;
444
+ name: z.ZodString;
445
+ status: z.ZodEnum<{
446
+ running: "running";
447
+ canceled: "canceled";
448
+ queued: "queued";
449
+ passed: "passed";
450
+ }>;
451
+ }, z.core.$strip>], "status">>;
452
+ completedAt: z.ZodOptional<z.ZodISODateTime>;
453
+ createdAt: z.ZodISODateTime;
454
+ git: z.ZodObject<{
455
+ branch: z.ZodOptional<z.ZodString>;
456
+ commitMessage: z.ZodOptional<z.ZodString>;
457
+ commitSha: z.ZodOptional<z.ZodString>;
458
+ commitUrl: z.ZodOptional<z.ZodString>;
459
+ }, z.core.$strip>;
460
+ runId: RunId;
461
+ status: z.ZodEnum<{
462
+ running: "running";
463
+ canceled: "canceled";
464
+ queued: "queued";
465
+ passed: "passed";
466
+ failed: "failed";
467
+ }>;
468
+ url: z.ZodURL;
469
+ }, z.core.$strip>;
470
+ };
471
+ };
472
+ tag: {
473
+ create: {
474
+ readonly description: "Create a tag on the caller's team. Tags select flows in run.create.";
475
+ readonly input: z.ZodObject<{
476
+ name: z.ZodString;
477
+ }, z.core.$strip>;
478
+ readonly kind: "write";
479
+ readonly name: "tag.create";
480
+ readonly output: z.ZodObject<{
481
+ color: z.ZodString;
482
+ name: z.ZodString;
483
+ url: z.ZodURL;
49
484
  }, z.core.$strip>;
50
485
  };
51
486
  };
52
487
  };
53
488
  export declare const publicContractsV1: {
489
+ automate: {
490
+ readonly description: "Request an automation that builds the selected draft flows in an environment.";
491
+ readonly input: z.ZodObject<{
492
+ environmentId: PublicIdSchema;
493
+ flowIds: z.ZodArray<PublicIdSchema>;
494
+ patch: z.ZodOptional<z.ZodString>;
495
+ }, z.core.$strip>;
496
+ readonly kind: "write";
497
+ readonly name: "automate";
498
+ readonly output: z.ZodObject<{
499
+ automationId: PublicIdSchema;
500
+ url: z.ZodURL;
501
+ }, z.core.$strip>;
502
+ };
503
+ environment: {
504
+ create: {
505
+ readonly description: "Create an environment on the caller's team and return it in the environment.get shape.";
506
+ readonly input: z.ZodObject<{
507
+ name: z.ZodString;
508
+ workspaceId: z.ZodOptional<PublicIdSchema>;
509
+ }, z.core.$strip>;
510
+ readonly kind: "write";
511
+ readonly name: "environment.create";
512
+ readonly output: z.ZodObject<{
513
+ flowCodeBranch: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
514
+ lastSyncedCommitHash: z.ZodString;
515
+ name: z.ZodString;
516
+ syncStatus: z.ZodLiteral<"reconciled">;
517
+ }, z.core.$strip>, z.ZodObject<{
518
+ name: z.ZodString;
519
+ syncStatus: z.ZodLiteral<"not-reconciled">;
520
+ }, z.core.$strip>], "syncStatus">>;
521
+ id: PublicIdSchema;
522
+ kind: z.ZodEnum<{
523
+ static: "static";
524
+ preview: "preview";
525
+ }>;
526
+ name: z.ZodString;
527
+ status: z.ZodEnum<{
528
+ blocked: "blocked";
529
+ "needs-investigation": "needs-investigation";
530
+ ready: "ready";
531
+ running: "running";
532
+ }>;
533
+ terminatedAt: z.ZodOptional<z.ZodISODateTime>;
534
+ url: z.ZodURL;
535
+ }, z.core.$strip>;
536
+ };
537
+ find: {
538
+ readonly description: "List the team's environments, newest first.";
539
+ readonly input: z.ZodObject<{
540
+ cursor: z.ZodOptional<z.ZodString>;
541
+ limit: z.ZodDefault<z.ZodNumber>;
542
+ includeTerminated: z.ZodDefault<z.ZodBoolean>;
543
+ kind: z.ZodOptional<z.ZodEnum<{
544
+ static: "static";
545
+ preview: "preview";
546
+ }>>;
547
+ }, z.core.$strip>;
548
+ readonly kind: "read";
549
+ readonly name: "environment.find";
550
+ readonly output: z.ZodObject<{
551
+ environments: z.ZodArray<z.ZodObject<{
552
+ flowCodeBranch: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
553
+ lastSyncedCommitHash: z.ZodString;
554
+ name: z.ZodString;
555
+ syncStatus: z.ZodLiteral<"reconciled">;
556
+ }, z.core.$strip>, z.ZodObject<{
557
+ name: z.ZodString;
558
+ syncStatus: z.ZodLiteral<"not-reconciled">;
559
+ }, z.core.$strip>], "syncStatus">>;
560
+ id: PublicIdSchema;
561
+ kind: z.ZodEnum<{
562
+ static: "static";
563
+ preview: "preview";
564
+ }>;
565
+ name: z.ZodString;
566
+ status: z.ZodEnum<{
567
+ blocked: "blocked";
568
+ "needs-investigation": "needs-investigation";
569
+ ready: "ready";
570
+ running: "running";
571
+ }>;
572
+ terminatedAt: z.ZodOptional<z.ZodISODateTime>;
573
+ url: z.ZodURL;
574
+ }, z.core.$strip>>;
575
+ nextCursor: z.ZodOptional<z.ZodString>;
576
+ }, z.core.$strip>;
577
+ };
578
+ get: {
579
+ readonly description: "Read a single environment's name, kind, health status, and termination state.";
580
+ readonly input: z.ZodObject<{
581
+ environmentId: PublicIdSchema;
582
+ }, z.core.$strip>;
583
+ readonly kind: "read";
584
+ readonly name: "environment.get";
585
+ readonly output: z.ZodObject<{
586
+ flowCodeBranch: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
587
+ lastSyncedCommitHash: z.ZodString;
588
+ name: z.ZodString;
589
+ syncStatus: z.ZodLiteral<"reconciled">;
590
+ }, z.core.$strip>, z.ZodObject<{
591
+ name: z.ZodString;
592
+ syncStatus: z.ZodLiteral<"not-reconciled">;
593
+ }, z.core.$strip>], "syncStatus">>;
594
+ id: PublicIdSchema;
595
+ kind: z.ZodEnum<{
596
+ static: "static";
597
+ preview: "preview";
598
+ }>;
599
+ name: z.ZodString;
600
+ status: z.ZodEnum<{
601
+ blocked: "blocked";
602
+ "needs-investigation": "needs-investigation";
603
+ ready: "ready";
604
+ running: "running";
605
+ }>;
606
+ terminatedAt: z.ZodOptional<z.ZodISODateTime>;
607
+ url: z.ZodURL;
608
+ }, z.core.$strip>;
609
+ };
610
+ listVariableNames: {
611
+ readonly description: "List the names of an environment's variables, sorted. Names only — values never leave the server.";
612
+ readonly input: z.ZodObject<{
613
+ environmentId: PublicIdSchema;
614
+ }, z.core.$strip>;
615
+ readonly kind: "read";
616
+ readonly name: "environment.listVariableNames";
617
+ readonly output: z.ZodObject<{
618
+ variableNames: z.ZodArray<z.ZodString>;
619
+ }, z.core.$strip>;
620
+ };
621
+ setVariable: {
622
+ readonly description: "Create or replace one environment variable by name and return its stored name. The value is never returned.";
623
+ readonly input: z.ZodObject<{
624
+ environmentId: PublicIdSchema;
625
+ name: z.ZodString;
626
+ value: z.ZodString;
627
+ }, z.core.$strip>;
628
+ readonly kind: "write";
629
+ readonly name: "environment.setVariable";
630
+ readonly output: z.ZodObject<{
631
+ name: z.ZodString;
632
+ }, z.core.$strip>;
633
+ };
634
+ };
54
635
  flow: {
636
+ addTag: {
637
+ readonly description: "Assign an existing tag to the selected flows. Create tags with tag.create.";
638
+ readonly input: z.ZodObject<{
639
+ flowIds: z.ZodArray<PublicIdSchema>;
640
+ tagName: z.ZodString;
641
+ }, z.core.$strip>;
642
+ readonly kind: "write";
643
+ readonly name: "flow.addTag";
644
+ readonly output: z.ZodObject<{
645
+ color: z.ZodString;
646
+ name: z.ZodString;
647
+ url: z.ZodURL;
648
+ }, z.core.$strip>;
649
+ };
55
650
  list: {
56
651
  readonly description: "List the flows of an environment at its latest reconciled commit.";
57
652
  readonly input: z.ZodObject<{
@@ -67,23 +662,297 @@ export declare const publicContractsV1: {
67
662
  name: z.ZodString;
68
663
  path: z.ZodString;
69
664
  tags: z.ZodArray<z.ZodString>;
665
+ url: z.ZodURL;
70
666
  }, z.core.$strip>>;
71
667
  }, z.core.$strip>;
72
668
  };
73
669
  };
74
- run: {
670
+ issue: {
75
671
  create: {
76
- readonly description: "Create a run for selected flows in an environment.";
672
+ readonly description: string;
673
+ readonly input: z.ZodDiscriminatedUnion<[z.ZodObject<{
674
+ type: z.ZodLiteral<"bug">;
675
+ description: z.ZodOptional<z.ZodString>;
676
+ name: z.ZodString;
677
+ priority: z.ZodOptional<z.ZodEnum<{
678
+ unprioritized: "unprioritized";
679
+ low: "low";
680
+ medium: "medium";
681
+ high: "high";
682
+ urgent: "urgent";
683
+ }>>;
684
+ workspaceId: z.ZodOptional<PublicIdSchema>;
685
+ }, z.core.$strip>, z.ZodObject<{
686
+ estimatedDueDate: z.ZodOptional<z.ZodISODate>;
687
+ type: z.ZodLiteral<"coverageRequest">;
688
+ description: z.ZodOptional<z.ZodString>;
689
+ name: z.ZodString;
690
+ priority: z.ZodOptional<z.ZodEnum<{
691
+ unprioritized: "unprioritized";
692
+ low: "low";
693
+ medium: "medium";
694
+ high: "high";
695
+ urgent: "urgent";
696
+ }>>;
697
+ workspaceId: z.ZodOptional<PublicIdSchema>;
698
+ }, z.core.$strip>], "type">;
699
+ readonly kind: "write";
700
+ readonly name: "issue.create";
701
+ readonly output: z.ZodObject<{
702
+ issue: z.ZodObject<{
703
+ createdAt: z.ZodCoercedDate<unknown>;
704
+ description: z.ZodString;
705
+ issueId: PublicIdSchema;
706
+ name: z.ZodString;
707
+ number: z.ZodNumber;
708
+ priority: z.ZodEnum<{
709
+ unprioritized: "unprioritized";
710
+ low: "low";
711
+ medium: "medium";
712
+ high: "high";
713
+ urgent: "urgent";
714
+ }>;
715
+ reproductions: z.ZodArray<z.ZodObject<{
716
+ environmentId: PublicIdSchema;
717
+ firstReproducedInRunId: PublicIdSchema;
718
+ flowId: PublicIdSchema;
719
+ isActive: z.ZodBoolean;
720
+ lastReproducedInRunId: PublicIdSchema;
721
+ }, z.core.$strip>>;
722
+ status: z.ZodEnum<{
723
+ pending: "pending";
724
+ inProgress: "inProgress";
725
+ paused: "paused";
726
+ resolved: "resolved";
727
+ canceled: "canceled";
728
+ archived: "archived";
729
+ }>;
730
+ type: z.ZodEnum<{
731
+ bug: "bug";
732
+ coverageRequest: "coverageRequest";
733
+ maintenance: "maintenance";
734
+ }>;
735
+ url: z.ZodURL;
736
+ }, z.core.$strip>;
737
+ }, z.core.$strip>;
738
+ };
739
+ find: {
740
+ readonly description: "List the team's bug reports, maintenance reports, or coverage requests, newest first.";
77
741
  readonly input: z.ZodObject<{
742
+ statuses: z.ZodDefault<z.ZodArray<z.ZodEnum<{
743
+ pending: "pending";
744
+ inProgress: "inProgress";
745
+ paused: "paused";
746
+ resolved: "resolved";
747
+ canceled: "canceled";
748
+ archived: "archived";
749
+ }>>>;
750
+ type: z.ZodEnum<{
751
+ bug: "bug";
752
+ coverageRequest: "coverageRequest";
753
+ maintenance: "maintenance";
754
+ }>;
755
+ workspaceId: z.ZodOptional<PublicIdSchema>;
756
+ cursor: z.ZodOptional<z.ZodString>;
757
+ limit: z.ZodDefault<z.ZodNumber>;
758
+ }, z.core.$strip>;
759
+ readonly kind: "read";
760
+ readonly name: "issue.find";
761
+ readonly output: z.ZodObject<{
762
+ issues: z.ZodArray<z.ZodObject<{
763
+ createdAt: z.ZodCoercedDate<unknown>;
764
+ description: z.ZodString;
765
+ issueId: PublicIdSchema;
766
+ name: z.ZodString;
767
+ number: z.ZodNumber;
768
+ priority: z.ZodEnum<{
769
+ unprioritized: "unprioritized";
770
+ low: "low";
771
+ medium: "medium";
772
+ high: "high";
773
+ urgent: "urgent";
774
+ }>;
775
+ reproductions: z.ZodArray<z.ZodObject<{
776
+ environmentId: PublicIdSchema;
777
+ firstReproducedInRunId: PublicIdSchema;
778
+ flowId: PublicIdSchema;
779
+ isActive: z.ZodBoolean;
780
+ lastReproducedInRunId: PublicIdSchema;
781
+ }, z.core.$strip>>;
782
+ status: z.ZodEnum<{
783
+ pending: "pending";
784
+ inProgress: "inProgress";
785
+ paused: "paused";
786
+ resolved: "resolved";
787
+ canceled: "canceled";
788
+ archived: "archived";
789
+ }>;
790
+ type: z.ZodEnum<{
791
+ bug: "bug";
792
+ coverageRequest: "coverageRequest";
793
+ maintenance: "maintenance";
794
+ }>;
795
+ url: z.ZodURL;
796
+ }, z.core.$strip>>;
797
+ nextCursor: z.ZodOptional<z.ZodString>;
798
+ }, z.core.$strip>;
799
+ };
800
+ get: {
801
+ readonly description: "Get an issue by id.";
802
+ readonly input: z.ZodObject<{
803
+ issueId: PublicIdSchema;
804
+ }, z.core.$strip>;
805
+ readonly kind: "read";
806
+ readonly name: "issue.get";
807
+ readonly output: z.ZodObject<{
808
+ issue: z.ZodObject<{
809
+ createdAt: z.ZodCoercedDate<unknown>;
810
+ description: z.ZodString;
811
+ issueId: PublicIdSchema;
812
+ name: z.ZodString;
813
+ number: z.ZodNumber;
814
+ priority: z.ZodEnum<{
815
+ unprioritized: "unprioritized";
816
+ low: "low";
817
+ medium: "medium";
818
+ high: "high";
819
+ urgent: "urgent";
820
+ }>;
821
+ reproductions: z.ZodArray<z.ZodObject<{
822
+ environmentId: PublicIdSchema;
823
+ firstReproducedInRunId: PublicIdSchema;
824
+ flowId: PublicIdSchema;
825
+ isActive: z.ZodBoolean;
826
+ lastReproducedInRunId: PublicIdSchema;
827
+ }, z.core.$strip>>;
828
+ status: z.ZodEnum<{
829
+ pending: "pending";
830
+ inProgress: "inProgress";
831
+ paused: "paused";
832
+ resolved: "resolved";
833
+ canceled: "canceled";
834
+ archived: "archived";
835
+ }>;
836
+ type: z.ZodEnum<{
837
+ bug: "bug";
838
+ coverageRequest: "coverageRequest";
839
+ maintenance: "maintenance";
840
+ }>;
841
+ url: z.ZodURL;
842
+ }, z.core.$strip>;
843
+ }, z.core.$strip>;
844
+ };
845
+ };
846
+ run: {
847
+ create: {
848
+ readonly description: "Create a run for the selected flows and/or tags in an environment.";
849
+ readonly input: z.ZodIntersection<z.ZodObject<{
78
850
  environmentId: PublicIdSchema;
79
851
  environmentVariables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
80
- flowIds: z.ZodArray<PublicIdSchema>;
81
852
  ignoreRules: z.ZodDefault<z.ZodBoolean>;
82
- }, z.core.$strip>;
853
+ pullRequestNumber: z.ZodOptional<z.ZodNumber>;
854
+ repository: z.ZodOptional<z.ZodString>;
855
+ }, z.core.$strip>, z.ZodObject<{
856
+ flowIds: z.ZodDefault<z.ZodArray<PublicIdSchema>>;
857
+ tagNames: z.ZodDefault<z.ZodArray<z.ZodString>>;
858
+ }, z.core.$strip>>;
83
859
  readonly kind: "write";
84
860
  readonly name: "run.create";
85
861
  readonly output: z.ZodObject<{
86
862
  runId: PublicIdSchema;
863
+ url: z.ZodURL;
864
+ }, z.core.$strip>;
865
+ };
866
+ find: {
867
+ readonly description: "List an environment's recent runs, newest first.";
868
+ readonly input: z.ZodObject<{
869
+ environmentId: PublicIdSchema;
870
+ cursor: z.ZodOptional<z.ZodString>;
871
+ limit: z.ZodDefault<z.ZodNumber>;
872
+ createdAfter: z.ZodOptional<z.ZodISODateTime>;
873
+ }, z.core.$strip>;
874
+ readonly kind: "read";
875
+ readonly name: "run.find";
876
+ readonly output: z.ZodObject<{
877
+ nextCursor: z.ZodOptional<z.ZodString>;
878
+ runs: z.ZodArray<z.ZodObject<{
879
+ completedAt: z.ZodOptional<z.ZodISODateTime>;
880
+ createdAt: z.ZodISODateTime;
881
+ git: z.ZodObject<{
882
+ branch: z.ZodOptional<z.ZodString>;
883
+ commitMessage: z.ZodOptional<z.ZodString>;
884
+ commitSha: z.ZodOptional<z.ZodString>;
885
+ commitUrl: z.ZodOptional<z.ZodString>;
886
+ }, z.core.$strip>;
887
+ runId: PublicIdSchema;
888
+ status: z.ZodEnum<{
889
+ running: "running";
890
+ canceled: "canceled";
891
+ queued: "queued";
892
+ passed: "passed";
893
+ failed: "failed";
894
+ }>;
895
+ url: z.ZodURL;
896
+ }, z.core.$strip>>;
897
+ }, z.core.$strip>;
898
+ };
899
+ get: {
900
+ readonly description: "Get a run's status, per-flow results, and links.";
901
+ readonly input: z.ZodObject<{
902
+ runId: PublicIdSchema;
903
+ }, z.core.$strip>;
904
+ readonly kind: "read";
905
+ readonly name: "run.get";
906
+ readonly output: z.ZodObject<{
907
+ flows: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
908
+ failure: z.ZodObject<{
909
+ error: z.ZodString;
910
+ }, z.core.$strip>;
911
+ flowId: PublicIdSchema;
912
+ name: z.ZodString;
913
+ status: z.ZodLiteral<"failed">;
914
+ }, z.core.$strip>, z.ZodObject<{
915
+ flowId: PublicIdSchema;
916
+ name: z.ZodString;
917
+ status: z.ZodEnum<{
918
+ running: "running";
919
+ canceled: "canceled";
920
+ queued: "queued";
921
+ passed: "passed";
922
+ }>;
923
+ }, z.core.$strip>], "status">>;
924
+ completedAt: z.ZodOptional<z.ZodISODateTime>;
925
+ createdAt: z.ZodISODateTime;
926
+ git: z.ZodObject<{
927
+ branch: z.ZodOptional<z.ZodString>;
928
+ commitMessage: z.ZodOptional<z.ZodString>;
929
+ commitSha: z.ZodOptional<z.ZodString>;
930
+ commitUrl: z.ZodOptional<z.ZodString>;
931
+ }, z.core.$strip>;
932
+ runId: PublicIdSchema;
933
+ status: z.ZodEnum<{
934
+ running: "running";
935
+ canceled: "canceled";
936
+ queued: "queued";
937
+ passed: "passed";
938
+ failed: "failed";
939
+ }>;
940
+ url: z.ZodURL;
941
+ }, z.core.$strip>;
942
+ };
943
+ };
944
+ tag: {
945
+ create: {
946
+ readonly description: "Create a tag on the caller's team. Tags select flows in run.create.";
947
+ readonly input: z.ZodObject<{
948
+ name: z.ZodString;
949
+ }, z.core.$strip>;
950
+ readonly kind: "write";
951
+ readonly name: "tag.create";
952
+ readonly output: z.ZodObject<{
953
+ color: z.ZodString;
954
+ name: z.ZodString;
955
+ url: z.ZodURL;
87
956
  }, z.core.$strip>;
88
957
  };
89
958
  };