@anchrd/colab-sdk 0.1.54 → 0.1.56

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 (46) hide show
  1. package/dist/action-blocks/action-blocks.d.ts +1 -0
  2. package/dist/action-blocks/action-blocks.js +22 -0
  3. package/dist/actions/actions.d.ts +356 -3
  4. package/dist/actions/actions.js +21 -3
  5. package/dist/boards/boards.d.ts +0 -14
  6. package/dist/boards/boards.js +3 -18
  7. package/dist/documents/documents.d.ts +2 -0
  8. package/dist/flows/flow-runs.d.ts +34 -0
  9. package/dist/flows/flow-runs.js +48 -4
  10. package/dist/flows/flows.d.ts +5 -0
  11. package/dist/flows/flows.js +3 -0
  12. package/dist/gadgets/gadgets.d.ts +4 -0
  13. package/dist/gadgets/gadgets.js +5 -0
  14. package/dist/goals/goals.d.ts +1 -0
  15. package/dist/goals/goals.js +2 -2
  16. package/dist/grammar/grammar.d.ts +1 -2
  17. package/dist/grammar/grammar.js +5 -7
  18. package/dist/home/home.d.ts +2 -0
  19. package/dist/links/links.d.ts +15 -2
  20. package/dist/links/links.js +25 -13
  21. package/dist/messages/messages.js +5 -4
  22. package/dist/nodes/nodes.d.ts +11 -6
  23. package/dist/nodes/nodes.js +11 -7
  24. package/dist/operators/operators.d.ts +87 -4
  25. package/dist/operators/operators.js +55 -2
  26. package/dist/processes/processes.d.ts +1999 -0
  27. package/dist/processes/processes.js +417 -0
  28. package/dist/runs/runs.d.ts +1 -200
  29. package/dist/runs/runs.js +3 -64
  30. package/dist/schedule/schedule.js +3 -3
  31. package/dist/sdk.d.ts +10 -11
  32. package/dist/sdk.js +10 -11
  33. package/dist/skills/skills.d.ts +1 -0
  34. package/dist/sources/sources.d.ts +4 -3
  35. package/dist/tables/tables.d.ts +114 -1
  36. package/dist/tables/tables.js +86 -2
  37. package/dist/tool.d.ts +1 -0
  38. package/dist/users/users.d.ts +30 -0
  39. package/dist/users/users.js +32 -0
  40. package/dist/written/written.d.ts +2 -4
  41. package/dist/written/written.js +2 -5
  42. package/package.json +2 -1
  43. package/dist/relations/relations.d.ts +0 -342
  44. package/dist/relations/relations.js +0 -129
  45. package/dist/types/types.d.ts +0 -181
  46. package/dist/types/types.js +0 -124
@@ -0,0 +1,417 @@
1
+ import { z } from "zod";
2
+ import { BoardId } from "../boards/boards.js";
3
+ import { ColumnId } from "../columns/columns.js";
4
+ import { GadgetVersionRef } from "../gadgets/gadgets.js";
5
+ import { GoalId } from "../goals/goals.js";
6
+ import { idSchema } from "../ids/ids.js";
7
+ import { Limit } from "../list-input.js";
8
+ import { NodeId, NodePath, NodePerson } from "../nodes/nodes.js";
9
+ import { IdempotencyKey, Rev } from "../primitives/primitives.js";
10
+ import { UserId } from "../users/users.js";
11
+ // Processes (#1258, Nodes › Ordner › Prozess): a folder can be a process. The process is data at the
12
+ // folder: steps (columns), actors (rows, people and Operators only), at each crossing at most one
13
+ // action with an instruction, its starts, its own steps with their nodes and its connections (E291,
14
+ // #1310), and ovals for processes inside and outside. A draft, publish, versions and
15
+ // checks, like a gadget's and a source's. The inputs of `intelligence_process_*` and their answers.
16
+ //
17
+ // ⚠️ The process is identified by its folder: `processId` IS the folder's `node_…` id, so a folder is
18
+ // a process at most once.
19
+ export const ProcessId = NodeId.describe("The process's id: the id of its folder, `node_…`.");
20
+ export const ProcessStepId = idSchema("step").describe("A step (column) of the process, `step_…`.");
21
+ export const ProcessActionId = idSchema("action").describe("An action of the process, `action_…`, chosen when it is added and kept from then on.");
22
+ export const processLimits = {
23
+ steps: 30,
24
+ actors: 30,
25
+ actions: 200,
26
+ connections: 20,
27
+ starts: 10,
28
+ actionSteps: 20,
29
+ // Every node of every step of one action together.
30
+ nodes: 40,
31
+ processes: 30,
32
+ };
33
+ const Name = z.string().trim().min(1).max(200);
34
+ const Instruction = z
35
+ .string()
36
+ .max(20_000)
37
+ .describe("Free text: what is to be done here, in the words of the people who do it.");
38
+ // ---- Steps and actors ----
39
+ export const ProcessStep = z.strictObject({ stepId: ProcessStepId, name: Name });
40
+ export const ProcessActor = z.strictObject({
41
+ userId: UserId.describe("A person or an Operator, `user_…`; never an external machine."),
42
+ });
43
+ // ---- An action's starts (E291) ----
44
+ export const processStartKinds = ["task", "goal", "mention"];
45
+ const When = z
46
+ .string()
47
+ .max(2000)
48
+ .describe("Free text Wann: when it is so, like Eine Karte liegt neu in der Spalte.");
49
+ const PartName = Name.optional().describe("A name of its own; what a sketch is to become, since it has nothing else to show.");
50
+ // Where a start wakes: a card moving into a board's column, a goal's rhythm, or a mention in the
51
+ // chat of a node (without one, in the chat of the process folder or anything below it).
52
+ export const ProcessStartPlace = z
53
+ .discriminatedUnion("kind", [
54
+ z.strictObject({
55
+ kind: z.literal("task"),
56
+ boardId: BoardId,
57
+ columnId: ColumnId.describe("The column of that board a card moves into."),
58
+ }),
59
+ z.strictObject({ kind: z.literal("goal"), goalId: GoalId }),
60
+ z.strictObject({
61
+ kind: z.literal("mention"),
62
+ nodeId: NodeId.optional().describe("The node in whose chat the mention wakes; left out, the process folder and everything below it."),
63
+ }),
64
+ ])
65
+ .describe('Where it wakes: { kind: "task", boardId, columnId } a card moving into that column, { kind: "goal", goalId } a goal\'s rhythm, { kind: "mention", nodeId? } a mention of the actor in that node\'s chat.');
66
+ // A start (E291): a place and Wann. An action may have several, and each wakes. Without a place it
67
+ // is a sketch: its name and Wann say what is to be built.
68
+ export const ProcessStart = z.strictObject({
69
+ place: ProcessStartPlace.nullable().describe("Where it wakes; null: a sketch, not built yet."),
70
+ name: PartName,
71
+ when: When,
72
+ });
73
+ // Weiter an: an action of this process, or a process that stands in it as an oval.
74
+ export const ProcessConnectionTarget = z.union([
75
+ z.strictObject({ actionId: ProcessActionId.describe("An action of this process.") }),
76
+ z.strictObject({
77
+ processId: ProcessId.describe("A process that stands in this one as an oval."),
78
+ }),
79
+ ]);
80
+ // A connection (E291): Weiter an and Wann. Conditions are only here; without a target it is a sketch.
81
+ export const ProcessConnection = z.strictObject({
82
+ to: ProcessConnectionTarget.nullable().describe("Weiter an: { actionId } or { processId }; null: a sketch, not built yet."),
83
+ name: PartName,
84
+ when: When.describe("Free text Wann: when the way goes there, like Was fehlt, geht zurück."),
85
+ });
86
+ // ---- An action's own steps (E291) ----
87
+ // What a node is; a sketch from before #1310 may still name it.
88
+ export const processNodeKinds = [
89
+ "skill",
90
+ "document",
91
+ "table",
92
+ "source",
93
+ "gadget",
94
+ "flow",
95
+ "board",
96
+ "task",
97
+ ];
98
+ export const ProcessNodeKind = z.enum(processNodeKinds);
99
+ // A node of a step: the node and what it is for in this action. Without a node it is a sketch.
100
+ export const ProcessNode = z
101
+ .strictObject({
102
+ nodeId: NodeId.nullable().describe("The node; null: a sketch, not built yet."),
103
+ name: PartName,
104
+ kind: ProcessNodeKind.optional().describe("For a sketch: the kind it is to become."),
105
+ description: Instruction.optional().describe("Optional: what the node is for in this action."),
106
+ })
107
+ .describe("A node of a step: nodeId (or null for a sketch), and an optional description.");
108
+ // A step of its own: a name and its nodes, in the order of the list; no instruction of its own.
109
+ export const ProcessActionStep = z.strictObject({
110
+ name: Name.describe("The step's name, like Stoff lesen."),
111
+ nodes: z.array(ProcessNode).max(processLimits.nodes),
112
+ });
113
+ // ---- Actions ----
114
+ // Always straight on (E291): the starts, then the own steps in their order, then the connections.
115
+ export const ProcessAction = z.strictObject({
116
+ actionId: ProcessActionId,
117
+ name: Name.describe("The action's name on its box, like Prüfen."),
118
+ stepId: ProcessStepId.describe("The step (column) of the process it stands in."),
119
+ userId: UserId.describe("The actor (row) it stands in, one of the process's actors."),
120
+ instruction: Instruction,
121
+ entry: z.boolean().optional().describe("true: a run of the process may begin here (Einstieg)."),
122
+ starts: z
123
+ .array(ProcessStart)
124
+ .max(processLimits.starts)
125
+ .describe("What wakes it: each start wakes; none, or none with a place, and it needs a connection."),
126
+ steps: z
127
+ .array(ProcessActionStep)
128
+ .max(processLimits.actionSteps)
129
+ .describe("Its own steps in order, each with a name and its nodes."),
130
+ connections: z
131
+ .array(ProcessConnection)
132
+ .max(processLimits.connections)
133
+ .describe("Where the way goes on; may be empty, then the action ends there."),
134
+ });
135
+ // ---- Ovals: processes inside and outside ----
136
+ export const processPlacements = ["inner", "outer"];
137
+ export const ProcessPlacement = z.enum(processPlacements);
138
+ const OvalFields = {
139
+ placement: ProcessPlacement.describe("inner: a process inside this one (its folder below this folder); outer: one outside."),
140
+ stepId: ProcessStepId.describe("The step (column) the oval stands over."),
141
+ connections: z.array(ProcessConnection).max(processLimits.connections),
142
+ };
143
+ // What a process holds, without ovals: a new process inside carries this, and no further new ones.
144
+ const BaseFields = {
145
+ instruction: Instruction,
146
+ steps: z.array(ProcessStep).max(processLimits.steps),
147
+ actors: z.array(ProcessActor).max(processLimits.actors),
148
+ actions: z.array(ProcessAction).max(processLimits.actions),
149
+ };
150
+ // An oval that links a process which exists.
151
+ export const ProcessLinked = z.strictObject({
152
+ processId: ProcessId.describe("The folder of the process the oval stands for."),
153
+ ...OvalFields,
154
+ });
155
+ // A process inside this one that is new: part of this draft, its folder made at publish. Its own
156
+ // ovals only link processes that exist.
157
+ export const ProcessNew = z.strictObject({
158
+ processId: ProcessId.optional().describe("The id its folder will get; Colab gives one when it is left out."),
159
+ ...OvalFields,
160
+ placement: z.literal("inner"),
161
+ draft: z
162
+ .strictObject({
163
+ name: Name.describe("The name of its folder."),
164
+ ...BaseFields,
165
+ processes: z.array(ProcessLinked).max(processLimits.processes),
166
+ })
167
+ .describe("The new process inside: its folder's name and its content."),
168
+ });
169
+ export const ProcessOval = z.union([ProcessNew, ProcessLinked]);
170
+ export const ProcessContentInput = z
171
+ .strictObject({
172
+ ...BaseFields,
173
+ processes: z.array(ProcessOval).max(processLimits.processes),
174
+ })
175
+ .describe("The whole process: instruction, steps, actors, actions and processes (ovals), sent whole on every save.");
176
+ // The content as stored and answered: every new process inside carries its id.
177
+ const StoredNew = z.object({ ...ProcessNew.shape, processId: ProcessId });
178
+ export const ProcessContent = z.object({
179
+ ...BaseFields,
180
+ processes: z.array(z.union([StoredNew, ProcessLinked])),
181
+ });
182
+ // What a published version holds (`versions.content`).
183
+ export const ProcessVersionContent = ProcessContent;
184
+ // ---- Checks ----
185
+ export const processFindingCodes = [
186
+ // An action nothing wakes: no start with a place (or each one into the void), and no connection
187
+ // leads to it (E291).
188
+ "unwoken",
189
+ // A board, column, goal, actor, node, connection target or process that is missing, archived or
190
+ // not readable.
191
+ "void",
192
+ // An actor may not read a node of one of their action's steps (E291).
193
+ "right",
194
+ // A sketch: a start without a place, a node entry without a node, a connection without a target.
195
+ "sketch",
196
+ ];
197
+ export const ProcessFindingCode = z.enum(processFindingCodes);
198
+ // Where a finding is: the way through processes inside (outermost first, empty in the process
199
+ // itself), the action and, where there is one, the node; and the part of the action to jump to,
200
+ // each an index from 0: a start, a step with an entry in it, or a connection (E291).
201
+ export const ProcessFindingPlace = z.object({
202
+ path: z.array(z.object({ processId: ProcessId, name: z.string() })),
203
+ actionId: ProcessActionId.nullable(),
204
+ actionName: z.string().nullable(),
205
+ nodeId: NodeId.nullable(),
206
+ nodeName: z.string().nullable(),
207
+ start: z.number().int().nullable(),
208
+ step: z.number().int().nullable(),
209
+ entry: z.number().int().nullable(),
210
+ connection: z.number().int().nullable(),
211
+ });
212
+ export const ProcessFinding = z.object({
213
+ // error refuses a publish; warning does not.
214
+ level: z.enum(["error", "warning"]),
215
+ code: ProcessFindingCode,
216
+ message: z.string(),
217
+ at: ProcessFindingPlace,
218
+ });
219
+ // ---- Inputs ----
220
+ export const ProcessCreateInput = z.strictObject({
221
+ processId: ProcessId.describe("The folder that becomes a process."),
222
+ rev: Rev.describe("The folder's rev as you read it."),
223
+ draft: ProcessContentInput,
224
+ });
225
+ export const ProcessGetInput = z.strictObject({
226
+ processId: ProcessId,
227
+ version: GadgetVersionRef.optional().describe("Which state to read. Leaving it out gives whoever may change the process the draft where there is one and a reader the live version. live, draft or a published version's number ask for one state; draft and a number only with the right to change the folder."),
228
+ });
229
+ export const ProcessUpdateInput = z.strictObject({
230
+ processId: ProcessId,
231
+ rev: Rev,
232
+ draft: ProcessContentInput.optional().describe("The whole process as the draft: it replaces the draft and goes live only when published."),
233
+ responsibleId: UserId.nullable()
234
+ .optional()
235
+ .describe("Who answers for the process, usually an Operator; null: the responsible of the process around it, else the folder's creator. Applies at once."),
236
+ fromVersion: z
237
+ .number()
238
+ .int()
239
+ .min(1)
240
+ .optional()
241
+ .describe("Restore: the draft becomes this published version; it goes live only when published."),
242
+ discard: z
243
+ .literal(true)
244
+ .optional()
245
+ .describe("Throw the draft away: the process is the live version again."),
246
+ });
247
+ export const ProcessPublishInput = z.strictObject({ processId: ProcessId, rev: Rev });
248
+ export const ProcessArchiveInput = z.strictObject({ processId: ProcessId, rev: Rev });
249
+ export const ProcessRestoreInput = z.strictObject({ processId: ProcessId, rev: Rev });
250
+ // ---- The answer ----
251
+ export const ProcessDetail = z.object({
252
+ processId: ProcessId,
253
+ // The folder's name.
254
+ name: z.string(),
255
+ path: NodePath,
256
+ // Which state `content` is: a published version's number, the draft, or null before the first
257
+ // publish for a reader (then `content` is null).
258
+ version: z.union([z.number().int(), z.literal("draft")]).nullable(),
259
+ content: ProcessContent.nullable(),
260
+ // The checks of `content`, each with its place; only for whoever may change the folder.
261
+ findings: z.array(ProcessFinding),
262
+ live: z
263
+ .object({ version: z.number().int(), publishedAt: z.iso.datetime(), publishedBy: NodePerson })
264
+ .nullable(),
265
+ // Set while the draft differs from live: who changed it last, and when; null for a reader.
266
+ draft: z.object({ updatedAt: z.iso.datetime(), updatedBy: NodePerson }).nullable(),
267
+ // Its own responsible, null when it takes over the one of the process around it.
268
+ responsible: NodePerson.nullable(),
269
+ // Who answers for it in fact: its own, else the nearest process around it with one.
270
+ effectiveResponsible: NodePerson,
271
+ // The process around it, where its folder lies inside another process's folder.
272
+ parentProcessId: ProcessId.nullable(),
273
+ rights: z.object({ write: z.boolean() }),
274
+ // The folder's rev, which every change of the process counts up.
275
+ rev: Rev,
276
+ // When the process was deleted (archived); the folder and its content stay.
277
+ archivedAt: z.iso.datetime().nullable(),
278
+ });
279
+ // ---- The role at a wake and the runs of a process (#1260, E286) ----
280
+ //
281
+ // Waking stays E141: the process wakes nobody itself. Where the way a person or an Operator is woken
282
+ // (a card into a start column, a goal's run, a mention) meets the start of a live action whose actor
283
+ // they are, their row in Actions carries the role: the process, the step, the action with its
284
+ // instruction, its micro and its connections, and the run of the process it belongs to.
285
+ export const ProcessRunId = idSchema("run").describe("A run of a process, `run_…`.");
286
+ // An Operator run, `run_…`; named here so this file needs nothing of `operators.ts`.
287
+ const OperatorRunRef = idSchema("run");
288
+ export const processRunStatuses = ["running", "waiting", "completed", "failed"];
289
+ export const ProcessRunStatus = z.enum(processRunStatuses);
290
+ // How a run began (Startweg): by hand (Play), through a goal's run, through a card; a run a goal
291
+ // started names the card its first action laid into a start column once there is one.
292
+ export const ProcessRunStart = z.object({
293
+ manual: z.boolean(),
294
+ goal: z.object({ goalId: GoalId, name: z.string().nullable(), goalRunId: z.string() }).nullable(),
295
+ task: z.object({ taskId: NodeId, name: z.string().nullable() }).nullable(),
296
+ });
297
+ // An action of the run that is done, in the order it was woken.
298
+ export const ProcessRunDone = z.object({
299
+ actionId: ProcessActionId,
300
+ name: z.string(),
301
+ at: z.iso.datetime(),
302
+ });
303
+ // The run a woken row belongs to, and where in it the actor stands.
304
+ export const ProcessRoleRun = z.object({
305
+ runId: ProcessRunId,
306
+ startedAt: z.iso.datetime(),
307
+ start: ProcessRunStart,
308
+ done: z.array(ProcessRunDone),
309
+ });
310
+ export const ProcessRole = z.object({
311
+ process: z.object({ processId: ProcessId, name: z.string(), version: z.number().int() }),
312
+ step: z.object({ stepId: ProcessStepId, name: z.string() }),
313
+ action: z.object({ actionId: ProcessActionId, name: z.string(), instruction: z.string() }),
314
+ // The start that woke the row, with its Wann (E291); `index` is its place among the action's starts.
315
+ start: z.object({
316
+ index: z.number().int(),
317
+ place: ProcessStartPlace,
318
+ name: z.string().nullable(),
319
+ when: z.string(),
320
+ }),
321
+ // The action's own steps in their order, each node with what it is for in this action. `name` and
322
+ // `kind` are null for a node the actor cannot read; a sketch has no `nodeId`, only its name.
323
+ steps: z.array(z.object({
324
+ name: z.string(),
325
+ nodes: z.array(z.object({
326
+ nodeId: NodeId.nullable(),
327
+ kind: z.string().nullable(),
328
+ name: z.string().nullable(),
329
+ description: z.string().nullable(),
330
+ })),
331
+ })),
332
+ // Where the way may go from here, each with its Wann; `name` is the action or process it leads to,
333
+ // or the sketch's own name.
334
+ connections: z.array(z.object({
335
+ to: ProcessConnectionTarget.nullable(),
336
+ name: z.string().nullable(),
337
+ when: z.string(),
338
+ })),
339
+ // Null where no run holds this wake yet: an action that is no entry, outside every run.
340
+ run: ProcessRoleRun.nullable(),
341
+ });
342
+ // One action of a run, as it was woken: who, when, how it ended and what it cost. Only an Operator's
343
+ // actions are entries; a person's turn is read from where the card stands (`ProcessRun.at`).
344
+ export const processRunEntryStatuses = ["running", "completed", "failed"];
345
+ export const ProcessRunEntry = z.object({
346
+ actionId: ProcessActionId,
347
+ name: z.string(),
348
+ actor: NodePerson,
349
+ at: z.iso.datetime(),
350
+ endedAt: z.iso.datetime().nullable(),
351
+ status: z.enum(processRunEntryStatuses),
352
+ // The Operator run's summary, or what made it fail.
353
+ result: z.string().nullable(),
354
+ costUsd: z.number().nullable(),
355
+ operatorRunId: OperatorRunRef.nullable(),
356
+ });
357
+ export const ProcessRun = z.object({
358
+ runId: ProcessRunId,
359
+ processId: ProcessId,
360
+ // The run's name is its start: "Lauf heute, 08:00".
361
+ startedAt: z.iso.datetime(),
362
+ start: ProcessRunStart,
363
+ status: ProcessRunStatus,
364
+ // The entries so far, and the actions of the live process that are no sketch.
365
+ actions: z.number().int(),
366
+ processActions: z.number().int(),
367
+ // The sum of the entries' amounts; null while none has one.
368
+ costUsd: z.number().nullable(),
369
+ // The action whose start the run's card stands in now, with its actor: "Gerade bei …" or
370
+ // "Wartet auf … bei …"; null where the card stands in no start (or the run has no card).
371
+ at: z
372
+ .object({
373
+ actionId: ProcessActionId,
374
+ name: z.string(),
375
+ actor: NodePerson,
376
+ since: z.iso.datetime(),
377
+ })
378
+ .nullable(),
379
+ // The last entry's result: the summary of its Operator run, or why it failed.
380
+ result: z.string().nullable(),
381
+ });
382
+ export const ProcessRunDetail = z.object({
383
+ ...ProcessRun.shape,
384
+ entries: z.array(ProcessRunEntry),
385
+ // Danach laut Prozess: where the way may go from the action the run stands at.
386
+ next: z.array(z.object({ actionId: ProcessActionId, name: z.string() })),
387
+ });
388
+ export const ProcessRunList = z.object({
389
+ items: z.array(ProcessRun),
390
+ nextCursor: z.string().nullable(),
391
+ });
392
+ export const ProcessRunListInput = z.strictObject({
393
+ processId: ProcessId.describe("The process, the id of its folder, which you can read."),
394
+ status: ProcessRunStatus.optional().describe("Only the runs in this state: running, waiting, completed or failed."),
395
+ cursor: z
396
+ .string()
397
+ .max(1000)
398
+ .optional()
399
+ .describe("The nextCursor of the previous page, unchanged. Leaving it out starts at the newest."),
400
+ limit: Limit.optional().describe("How many runs one page holds, 1 to 100. Leaving it out gives 50."),
401
+ });
402
+ export const ProcessRunGetInput = z.strictObject({
403
+ processId: ProcessId.describe("The process, the id of its folder, which you can read."),
404
+ runId: ProcessRunId.describe("The run, as intelligence_process_run_list names it."),
405
+ });
406
+ export const ProcessRunCreateInput = z.strictObject({
407
+ processId: ProcessId.describe("The process to start a run of (Play), one you can change."),
408
+ actionId: ProcessActionId.optional().describe("The entry action the run begins at. Leaving it out takes the one entry the process has; with several, it is needed."),
409
+ title: z
410
+ .string()
411
+ .trim()
412
+ .min(1)
413
+ .max(500)
414
+ .optional()
415
+ .describe("The title of the card the run begins with, for an action started by a card in a column. Not for one started by a goal."),
416
+ idempotencyKey: IdempotencyKey,
417
+ });
@@ -1,202 +1,3 @@
1
- import { z } from "zod";
1
+ import type { z } from "zod";
2
2
  export declare const RunId: z.ZodTemplateLiteral<`run_${string}`>;
3
3
  export type RunId = z.infer<typeof RunId>;
4
- export declare const runStatuses: readonly ["running", "done", "open", "error"];
5
- export declare const RunStatus: z.ZodEnum<{
6
- error: "error";
7
- done: "done";
8
- running: "running";
9
- open: "open";
10
- }>;
11
- export type RunStatus = z.infer<typeof RunStatus>;
12
- export declare const RunListInput: z.ZodObject<{
13
- nodeId: z.ZodTemplateLiteral<`node_${string}`>;
14
- status: z.ZodOptional<z.ZodEnum<{
15
- error: "error";
16
- done: "done";
17
- running: "running";
18
- open: "open";
19
- }>>;
20
- from: z.ZodOptional<z.ZodISODateTime>;
21
- to: z.ZodOptional<z.ZodISODateTime>;
22
- cursor: z.ZodOptional<z.ZodString>;
23
- limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
24
- }, z.core.$strict>;
25
- export type RunListInput = z.infer<typeof RunListInput>;
26
- export declare const RunGetInput: z.ZodObject<{
27
- runId: z.ZodTemplateLiteral<`run_${string}`>;
28
- }, z.core.$strict>;
29
- export type RunGetInput = z.infer<typeof RunGetInput>;
30
- export declare const RunItem: z.ZodObject<{
31
- runId: z.ZodTemplateLiteral<`run_${string}`>;
32
- nodeId: z.ZodTemplateLiteral<`node_${string}`>;
33
- kind: z.ZodEnum<{
34
- process: "process";
35
- }>;
36
- status: z.ZodEnum<{
37
- error: "error";
38
- done: "done";
39
- running: "running";
40
- open: "open";
41
- }>;
42
- dueAt: z.ZodNullable<z.ZodISODateTime>;
43
- startedAt: z.ZodISODateTime;
44
- startedBy: z.ZodObject<{
45
- userId: z.ZodString;
46
- name: z.ZodNullable<z.ZodString>;
47
- kind: z.ZodNullable<z.ZodEnum<{
48
- machine: "machine";
49
- human: "human";
50
- }>>;
51
- }, z.core.$strip>;
52
- completedAt: z.ZodNullable<z.ZodISODateTime>;
53
- completedBy: z.ZodNullable<z.ZodObject<{
54
- userId: z.ZodString;
55
- name: z.ZodNullable<z.ZodString>;
56
- kind: z.ZodNullable<z.ZodEnum<{
57
- machine: "machine";
58
- human: "human";
59
- }>>;
60
- }, z.core.$strip>>;
61
- summary: z.ZodNullable<z.ZodString>;
62
- }, z.core.$strip>;
63
- export type RunItem = z.infer<typeof RunItem>;
64
- export declare const RunList: z.ZodObject<{
65
- items: z.ZodArray<z.ZodObject<{
66
- runId: z.ZodTemplateLiteral<`run_${string}`>;
67
- nodeId: z.ZodTemplateLiteral<`node_${string}`>;
68
- kind: z.ZodEnum<{
69
- process: "process";
70
- }>;
71
- status: z.ZodEnum<{
72
- error: "error";
73
- done: "done";
74
- running: "running";
75
- open: "open";
76
- }>;
77
- dueAt: z.ZodNullable<z.ZodISODateTime>;
78
- startedAt: z.ZodISODateTime;
79
- startedBy: z.ZodObject<{
80
- userId: z.ZodString;
81
- name: z.ZodNullable<z.ZodString>;
82
- kind: z.ZodNullable<z.ZodEnum<{
83
- machine: "machine";
84
- human: "human";
85
- }>>;
86
- }, z.core.$strip>;
87
- completedAt: z.ZodNullable<z.ZodISODateTime>;
88
- completedBy: z.ZodNullable<z.ZodObject<{
89
- userId: z.ZodString;
90
- name: z.ZodNullable<z.ZodString>;
91
- kind: z.ZodNullable<z.ZodEnum<{
92
- machine: "machine";
93
- human: "human";
94
- }>>;
95
- }, z.core.$strip>>;
96
- summary: z.ZodNullable<z.ZodString>;
97
- }, z.core.$strip>>;
98
- nextCursor: z.ZodNullable<z.ZodString>;
99
- }, z.core.$strip>;
100
- export type RunList = z.infer<typeof RunList>;
101
- export declare const RunDetail: z.ZodObject<{
102
- counts: z.ZodNullable<z.ZodRecord<z.ZodEnum<{
103
- archive: "archive";
104
- done: "done";
105
- backlog: "backlog";
106
- open: "open";
107
- progress: "progress";
108
- discarded: "discarded";
109
- blocked: "blocked";
110
- }> & z.core.$partial, z.ZodNumber>>;
111
- columns: z.ZodNullable<z.ZodArray<z.ZodObject<{
112
- columnId: z.ZodTemplateLiteral<`column_${string}`>;
113
- name: z.ZodString;
114
- type: z.ZodEnum<{
115
- archive: "archive";
116
- done: "done";
117
- backlog: "backlog";
118
- open: "open";
119
- progress: "progress";
120
- discarded: "discarded";
121
- blocked: "blocked";
122
- }>;
123
- tasks: z.ZodNumber;
124
- }, z.core.$strip>>>;
125
- cardKinds: z.ZodNullable<z.ZodArray<z.ZodObject<{
126
- kindId: z.ZodTemplateLiteral<`kind_${string}`>;
127
- name: z.ZodString;
128
- icon: z.ZodEnum<{
129
- message: "message";
130
- user: "user";
131
- package: "package";
132
- search: "search";
133
- target: "target";
134
- calendar: "calendar";
135
- flag: "flag";
136
- route: "route";
137
- "arrow-right": "arrow-right";
138
- "square-check": "square-check";
139
- "file-text": "file-text";
140
- bulb: "bulb";
141
- star: "star";
142
- bolt: "bolt";
143
- bug: "bug";
144
- rocket: "rocket";
145
- }>;
146
- description: z.ZodString;
147
- standard: z.ZodBoolean;
148
- fields: z.ZodArray<z.ZodObject<{
149
- fieldId: z.ZodTemplateLiteral<`field_${string}`>;
150
- name: z.ZodString;
151
- type: z.ZodEnum<{
152
- number: "number";
153
- date: "date";
154
- list: "list";
155
- link: "link";
156
- text: "text";
157
- checklist: "checklist";
158
- select: "select";
159
- }>;
160
- description: z.ZodString;
161
- required: z.ZodBoolean;
162
- visible: z.ZodBoolean;
163
- options: z.ZodArray<z.ZodObject<{
164
- optionId: z.ZodTemplateLiteral<`option_${string}`>;
165
- name: z.ZodString;
166
- }, z.core.$strip>>;
167
- }, z.core.$strip>>;
168
- }, z.core.$strip>>>;
169
- instruction: z.ZodNullable<z.ZodString>;
170
- runId: z.ZodTemplateLiteral<`run_${string}`>;
171
- nodeId: z.ZodTemplateLiteral<`node_${string}`>;
172
- kind: z.ZodEnum<{
173
- process: "process";
174
- }>;
175
- status: z.ZodEnum<{
176
- error: "error";
177
- done: "done";
178
- running: "running";
179
- open: "open";
180
- }>;
181
- dueAt: z.ZodNullable<z.ZodISODateTime>;
182
- startedAt: z.ZodISODateTime;
183
- startedBy: z.ZodObject<{
184
- userId: z.ZodString;
185
- name: z.ZodNullable<z.ZodString>;
186
- kind: z.ZodNullable<z.ZodEnum<{
187
- machine: "machine";
188
- human: "human";
189
- }>>;
190
- }, z.core.$strip>;
191
- completedAt: z.ZodNullable<z.ZodISODateTime>;
192
- completedBy: z.ZodNullable<z.ZodObject<{
193
- userId: z.ZodString;
194
- name: z.ZodNullable<z.ZodString>;
195
- kind: z.ZodNullable<z.ZodEnum<{
196
- machine: "machine";
197
- human: "human";
198
- }>>;
199
- }, z.core.$strip>>;
200
- summary: z.ZodNullable<z.ZodString>;
201
- }, z.core.$strip>;
202
- export type RunDetail = z.infer<typeof RunDetail>;