@oomol-lab/open-flow 0.1.0-beta.3 → 0.1.0-beta.30

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 (123) hide show
  1. package/dist/browser/{_virtual_open-flow-twemoji-DJwKsM_w.js → _virtual_open-flow-twemoji-CpHJOEsk.js} +4028 -2
  2. package/dist/browser/carbon-Cn-DTyjG.js +54 -0
  3. package/dist/browser/createResourceDialog-_y2xHaUA.js +110 -0
  4. package/dist/browser/{dist-DWADUsVB.js → dist-By46o5UV.js} +47 -47
  5. package/dist/browser/dist-CoszrK7m.js +4 -0
  6. package/dist/browser/{dist-CPuF50D9.js → dist-D1VYgicl.js} +426 -305
  7. package/dist/browser/dist-DSe6KRsr.js +1224 -0
  8. package/dist/browser/dist-DYjIVIZC.js +795 -0
  9. package/dist/browser/{dist-3Mj8q8Pr.js → dist-DmuE3M0R.js} +53 -54
  10. package/dist/browser/{dist-BN4ZCyOB.js → dist-DpDLsYtO.js} +14 -15
  11. package/dist/browser/{dist-CJpzJrLM.js → dist-DwvhuMxw.js} +894 -895
  12. package/dist/browser/dist-DxahK_I8.js +2688 -0
  13. package/dist/browser/{dist-C46JByB-.js → dist-Dz6Nglsd.js} +61 -61
  14. package/dist/browser/{dist-DUzA0Ukh.js → dist-TJfrvoIQ.js} +141 -142
  15. package/dist/browser/editorComponent-Dq4IKp5R.js +14790 -0
  16. package/dist/browser/{esm-C2UUqIUP.js → esm-B7A42FzW.js} +68 -59
  17. package/dist/browser/event-sources.d.ts +30 -0
  18. package/dist/browser/flow-authoring-module.d.ts +2 -2
  19. package/dist/browser/flow-authoring-node.d.ts +26 -8
  20. package/dist/browser/flow-authoring.d.ts +1 -1
  21. package/dist/browser/flow-authoring.js +5282 -313
  22. package/dist/browser/flow-change-schema.d.ts +11 -0
  23. package/dist/browser/flow-change.d.ts +193 -18
  24. package/dist/browser/flow-change.js +5192 -137
  25. package/dist/browser/flow-notifications.d.ts +11 -2
  26. package/dist/browser/flowChanges-AdN0Iqma.js +12304 -0
  27. package/dist/browser/{flowRunInputEditorStore-CwvOiIiU.js → flowRunInputEditorStore-CTORQcA2.js} +864 -4000
  28. package/dist/browser/flowWorkspace-BrtzLKWB.js +153066 -0
  29. package/dist/browser/host-conformance.d.ts +7 -0
  30. package/dist/browser/host-conformance.js +39 -0
  31. package/dist/browser/inputValues-DJfFraxG.js +43 -0
  32. package/dist/browser/licenses.md +195 -662
  33. package/dist/browser/lite-BuKZ8joP.js +8545 -0
  34. package/dist/browser/main-BDnNHhkU.js +50 -0
  35. package/dist/browser/{markdownContent-DUfLdnUt.js → markdownContent-D2oHGWc6.js} +53 -53
  36. package/dist/browser/theme.css +527 -34
  37. package/dist/browser/{typeScriptSession-mPCiA9sV.js → typeScriptSession-DnAmJCzu.js} +70 -71
  38. package/dist/browser/ui-input.d.ts +5 -0
  39. package/dist/browser/ui-label.d.ts +3 -0
  40. package/dist/browser/ui-textarea.d.ts +3 -0
  41. package/dist/browser/ui.css +2 -0
  42. package/dist/browser/ui.css.d.ts +1 -0
  43. package/dist/browser/ui.d.ts +34 -0
  44. package/dist/browser/ui.js +2632 -0
  45. package/dist/browser/value-DPg_9yXB.js +93 -0
  46. package/dist/browser/warmCodeTheme-DVv4-rDO.js +35 -0
  47. package/dist/browser/workbench-contract.d.ts +27 -2
  48. package/dist/browser/workbench.css +1 -1
  49. package/dist/browser/workbench.d.ts +2 -0
  50. package/dist/browser/workbench.js +2767 -1406
  51. package/dist/browser/workbenchSelect-BDPIQxYK.js +5967 -0
  52. package/dist/common/authoringExamples.d.ts +28 -0
  53. package/dist/common/control-api-conformance.d.ts +7 -0
  54. package/dist/common/control-api-conformance.js +5568 -171
  55. package/dist/common/control-api-errors.d.ts +37 -0
  56. package/dist/common/control-api.d.ts +394 -47
  57. package/dist/common/control-api.js +6066 -569
  58. package/dist/common/control-requests.d.ts +98 -0
  59. package/dist/common/control-requests.js +5412 -0
  60. package/dist/common/cron-trigger.d.ts +2 -1
  61. package/dist/common/cron-trigger.js +27 -24
  62. package/dist/common/draftOperations.d.ts +14 -0
  63. package/dist/common/engine-contract.d.ts +3 -1
  64. package/dist/common/event-sources.d.ts +50 -0
  65. package/dist/common/feishu-events.d.ts +20 -0
  66. package/dist/common/feishu-subscriptions.d.ts +10 -0
  67. package/dist/common/flow-agent.d.ts +10 -0
  68. package/dist/common/flow-encoding.d.ts +16 -2
  69. package/dist/common/flow-encoding.js +5092 -68
  70. package/dist/common/flow-graph.d.ts +52 -0
  71. package/dist/common/flow-json.d.ts +2 -0
  72. package/dist/common/flow-modules.d.ts +20 -0
  73. package/dist/common/flow-notifications.d.ts +11 -2
  74. package/dist/common/flow-schema.d.ts +17 -0
  75. package/dist/common/flow-semantics.d.ts +12 -6
  76. package/dist/common/flow-semantics.js +15870 -9668
  77. package/dist/common/flowInspection.d.ts +16 -0
  78. package/dist/common/fr-iv1541dF.js +93 -0
  79. package/dist/common/integration-trigger.d.ts +29 -2
  80. package/dist/common/integration-trigger.js +192 -56
  81. package/dist/common/ja-Bq-ZDOD4.js +93 -0
  82. package/dist/common/ko-Z-k9R2c6.js +93 -0
  83. package/dist/common/localization.d.ts +2 -0
  84. package/dist/common/localization.js +37 -1
  85. package/dist/common/mcp-conformance.d.ts +2 -0
  86. package/dist/common/mcp.d.ts +767 -0
  87. package/dist/common/mcp.js +6733 -0
  88. package/dist/common/poll-trigger.d.ts +5 -0
  89. package/dist/common/poll-trigger.js +26 -22
  90. package/dist/common/provider-triggers.d.ts +4 -0
  91. package/dist/common/provider-triggers.js +7310 -1736
  92. package/dist/common/ru-B4gFecYZ.js +93 -0
  93. package/dist/common/run-events.d.ts +2 -2
  94. package/dist/common/run-events.js +13 -17
  95. package/dist/common/run-lifecycle.d.ts +21 -2
  96. package/dist/common/run-lifecycle.js +83 -2
  97. package/dist/common/run-results.d.ts +57 -0
  98. package/dist/common/runtime-contract.d.ts +38 -3
  99. package/dist/common/runtime-contract.js +291 -19
  100. package/dist/common/scheduler.d.ts +97 -19
  101. package/dist/common/scheduler.js +8234 -261
  102. package/dist/common/trigger-catalog.d.ts +17 -0
  103. package/dist/common/trigger-config-options.d.ts +13 -0
  104. package/dist/common/trigger-contract.d.ts +5 -0
  105. package/dist/common/trigger-localization.d.ts +7 -0
  106. package/dist/common/webhook-trigger.d.ts +3 -3
  107. package/dist/common/webhook-trigger.js +64 -18
  108. package/dist/common/zh-CN-ByQ6nYam.js +93 -0
  109. package/dist/common/zh-TW-QjIarvX9.js +93 -0
  110. package/dist/index.d.ts +6 -5
  111. package/package.json +21 -1
  112. package/dist/browser/carbon-DMCVsjHo.js +0 -53
  113. package/dist/browser/createResourceDialog-BkZns-oZ.js +0 -504
  114. package/dist/browser/diagnostics-SDCyFuxm.js +0 -11634
  115. package/dist/browser/dist-BMqL-qR5.js +0 -1894
  116. package/dist/browser/dist-BpopSHwP.js +0 -1543
  117. package/dist/browser/dist-CP0883sY.js +0 -4
  118. package/dist/browser/dist-CUSrALSX.js +0 -1620
  119. package/dist/browser/flowWorkspace-BZ_eiQNR.js +0 -45393
  120. package/dist/browser/getPseudoElementBounds-ESJExRFX.js +0 -7642
  121. package/dist/browser/languages-DgJehE1g.js +0 -62
  122. package/dist/browser/main-DmjVyuWr.js +0 -76
  123. package/dist/browser/workbenchSelect-B2s1HV-Y.js +0 -1374
@@ -5,9 +5,16 @@ export declare const controlErrorCode: {
5
5
  readonly connectorActionNotFound: 'connector.action-not-found';
6
6
  readonly connectorUnconfigured: 'connector.unconfigured';
7
7
  readonly connectorUnavailable: 'connector.unavailable';
8
+ readonly connectorConsoleUnconfigured: 'connector.console-unconfigured';
8
9
  readonly engineUnavailable: 'engine.unavailable';
9
10
  readonly engineUnsupported: 'engine.unsupported';
11
+ readonly eventSourceInvalid: 'event-source.invalid';
12
+ readonly eventSourceIdentityUnavailable: 'event-source.identity-unavailable';
13
+ readonly eventSourceNotFound: 'event-source.not-found';
14
+ readonly eventSourceConflict: 'event-source.conflict';
10
15
  readonly flowInvalid: 'flow.invalid';
16
+ readonly flowRepairRequired: 'flow.repair-required';
17
+ readonly flowUpgradeRequired: 'flow.upgrade-required';
11
18
  readonly flowNotFound: 'flow.not-found';
12
19
  readonly flowBusy: 'flow.busy';
13
20
  readonly flowConflict: 'flow.conflict';
@@ -27,6 +34,7 @@ export declare const controlErrorCode: {
27
34
  readonly runNotFound: 'run.not-found';
28
35
  readonly runNotTerminal: 'run.not-terminal';
29
36
  readonly runOverloaded: 'run.overloaded';
37
+ readonly runWaitNotFound: 'run.wait-not-found';
30
38
  readonly triggerKeyInvalid: 'trigger-key.invalid';
31
39
  readonly triggerKeyNotFound: 'trigger-key.not-found';
32
40
  readonly triggerNotFound: 'trigger.not-found';
@@ -36,6 +44,18 @@ export declare const controlErrorCode: {
36
44
  };
37
45
  export type ControlErrorCode = (typeof controlErrorCode)[keyof typeof controlErrorCode];
38
46
  export declare const controlErrorMetadata: {
47
+ readonly "event-source.invalid": {
48
+ readonly status: 400;
49
+ };
50
+ readonly "event-source.identity-unavailable": {
51
+ readonly status: 409;
52
+ };
53
+ readonly "event-source.not-found": {
54
+ readonly status: 404;
55
+ };
56
+ readonly "event-source.conflict": {
57
+ readonly status: 409;
58
+ };
39
59
  readonly "authentication.required": {
40
60
  readonly status: 401;
41
61
  };
@@ -54,6 +74,9 @@ export declare const controlErrorMetadata: {
54
74
  readonly "connector.unavailable": {
55
75
  readonly status: 503;
56
76
  };
77
+ readonly "connector.console-unconfigured": {
78
+ readonly status: 503;
79
+ };
57
80
  readonly "engine.unavailable": {
58
81
  readonly status: 503;
59
82
  };
@@ -63,6 +86,12 @@ export declare const controlErrorMetadata: {
63
86
  readonly "flow.invalid": {
64
87
  readonly status: 400;
65
88
  };
89
+ readonly "flow.repair-required": {
90
+ readonly status: 409;
91
+ };
92
+ readonly "flow.upgrade-required": {
93
+ readonly status: 409;
94
+ };
66
95
  readonly "flow.not-found": {
67
96
  readonly status: 404;
68
97
  };
@@ -120,6 +149,9 @@ export declare const controlErrorMetadata: {
120
149
  readonly "run.overloaded": {
121
150
  readonly status: 429;
122
151
  };
152
+ readonly "run.wait-not-found": {
153
+ readonly status: 404;
154
+ };
123
155
  readonly "trigger-key.invalid": {
124
156
  readonly status: 409;
125
157
  };
@@ -139,3 +171,8 @@ export declare const controlErrorMetadata: {
139
171
  readonly status: 404;
140
172
  };
141
173
  };
174
+ export declare class ApiError extends Error {
175
+ readonly code: string;
176
+ readonly status: number;
177
+ constructor(status: number, code: string, message: string);
178
+ }
@@ -1,11 +1,29 @@
1
+ import type { DraftOperation } from './draftOperations.js';
2
+ export { inspectFlowDraft } from './flowInspection.js';
3
+ export type { DraftOperation } from './draftOperations.js';
4
+ import type { SchemaMismatch } from '../browser/flow-change.js';
5
+ import type { CreateEventSource, UpdateEventSource, EventSource } from './event-sources.js';
6
+ export { decodeEventSource, decodeEventSources, type CreateEventSource, type UpdateEventSource, type EventSource } from './event-sources.js';
7
+ import type { TriggerCatalogCache } from './trigger-catalog.js';
8
+ export { decodeTriggerCatalog, type TriggerCatalog, type TriggerCatalogCache, type TriggerDisplay } from './trigger-catalog.js';
9
+ import type { TriggerConfigOption } from './trigger-config-options.js';
10
+ export type { TriggerConfigOption } from './trigger-config-options.js';
11
+ import type { ResultQuery } from './run-results.js';
12
+ import { decodeResultList, decodeResultRead } from './run-results.js';
13
+ export { readResult, parseResultQuery, decodeResultList, decodeResultRead, type ResultCall, type ResultInfo, type ResultPage, type ResultQuery, } from './run-results.js';
1
14
  import type { RunStatus } from './run-lifecycle.js';
2
- import type { ChangeOperation, InputPortDefinition, JsonValue, PortDefinition, RevisionContent, TriggerKeySnapshot } from '../browser/flow-change.js';
3
- export type { JsonValue, TriggerKeySnapshot } from '../browser/flow-change.js';
15
+ import type { InputPortDefinition, JsonValue, PortDefinition, RevisionContent, TriggerKeySnapshot, WaitAction } from '../browser/flow-change.js';
16
+ export type { JsonValue, TriggerKeySnapshot, WaitAction } from '../browser/flow-change.js';
4
17
  export type { RunStatus } from './run-lifecycle.js';
5
- export { controlErrorCode, controlErrorMetadata, type ControlErrorCode } from './control-api-errors.js';
18
+ export { ApiError, controlErrorCode, controlErrorMetadata, type ControlErrorCode } from './control-api-errors.js';
6
19
  export type { FlowCatalogEvent, FlowChangeEvent } from './flow-notifications.js';
7
20
  export type ControlRequest = (path: string, init?: RequestInit) => Promise<Response>;
8
21
  export interface Flow {
22
+ readonly live?: {
23
+ readonly enabled: boolean;
24
+ readonly publicationId: string;
25
+ readonly revisionId: string;
26
+ };
9
27
  readonly createdAt: string;
10
28
  readonly draftRevisionId: string;
11
29
  readonly flowId: string;
@@ -14,6 +32,12 @@ export interface Flow {
14
32
  readonly updatedAt: string;
15
33
  readonly version: 1;
16
34
  }
35
+ export interface Presentation {
36
+ readonly revision: number;
37
+ readonly updatedAt: string;
38
+ readonly value: Readonly<Record<string, JsonValue>>;
39
+ readonly version: 1;
40
+ }
17
41
  export interface FlowPage {
18
42
  readonly flows: readonly Flow[];
19
43
  readonly nextCursor?: string;
@@ -35,6 +59,10 @@ export interface TriggerKeySummary {
35
59
  readonly type: TriggerKeySnapshot['type'];
36
60
  }
37
61
  export interface TriggerBinding {
62
+ readonly listener?: {
63
+ readonly health: 'healthy' | 'failed' | 'needs_reauth';
64
+ readonly lastErrorCode?: string;
65
+ };
38
66
  readonly currentPublicationId?: string;
39
67
  readonly currentRevisionId?: string;
40
68
  readonly endpointUrl?: string;
@@ -72,17 +100,25 @@ export interface PollTriggerTestResult {
72
100
  readonly version: 1;
73
101
  }
74
102
  export interface ConnectorConnection {
103
+ readonly providerAccountId?: string;
104
+ readonly builtInAccount?: boolean;
105
+ readonly alias?: string;
75
106
  readonly connectionId: string;
76
107
  readonly displayName: string;
77
108
  readonly isDefault: boolean;
78
109
  readonly serviceId: string;
79
110
  readonly status: 'active' | 'disconnected' | 'error' | 'reauth_required';
80
111
  }
81
- export interface ConnectorAction {
112
+ /** Action metadata independent of account availability and selection. */
113
+ export interface ConnectorActionMetadata {
114
+ /** Upstream operation classification; unknown values remain uncategorized. */
115
+ readonly operationType?: string;
116
+ readonly inputSchema?: JsonValue;
117
+ readonly outputSchema?: JsonValue;
82
118
  readonly actionId: string;
83
119
  readonly authenticated: boolean;
84
- readonly defaultConnection?: ConnectorConnection;
85
120
  readonly description: string;
121
+ readonly homepageUrl?: string;
86
122
  readonly icon?: string;
87
123
  readonly inputs: Readonly<Record<string, InputPortDefinition>>;
88
124
  readonly name: string;
@@ -90,7 +126,13 @@ export interface ConnectorAction {
90
126
  readonly serviceId: string;
91
127
  readonly serviceName: string;
92
128
  }
129
+ /** Existing CLI/MCP representation, including the currently preferred account. */
130
+ export interface ConnectorAction extends ConnectorActionMetadata {
131
+ readonly defaultConnection?: ConnectorConnection;
132
+ }
93
133
  export interface ConnectorProvider {
134
+ readonly noSetup?: boolean;
135
+ readonly homepageUrl?: string;
94
136
  readonly icon?: string;
95
137
  readonly serviceId: string;
96
138
  readonly serviceName: string;
@@ -112,18 +154,11 @@ export interface DraftChange {
112
154
  readonly revision: RevisionMetadata;
113
155
  readonly version: 1;
114
156
  }
115
- export type DraftSync = {
116
- readonly kind: 'changes';
117
- readonly revisions: readonly {
118
- readonly operations: readonly ChangeOperation[];
119
- readonly revision: RevisionMetadata;
120
- }[];
121
- readonly version: 1;
122
- } | {
157
+ export interface DraftSync {
123
158
  readonly draft: Draft;
124
159
  readonly kind: 'snapshot';
125
160
  readonly version: 1;
126
- };
161
+ }
127
162
  export interface Publication {
128
163
  readonly actorId: string;
129
164
  readonly closureDigest: string;
@@ -174,6 +209,7 @@ export interface Diagnostic {
174
209
  readonly column: number;
175
210
  readonly line: number;
176
211
  readonly message: string;
212
+ readonly mismatch?: SchemaMismatch;
177
213
  readonly path: string;
178
214
  readonly values?: Readonly<Record<string, string | number>>;
179
215
  }
@@ -213,14 +249,23 @@ export interface Run {
213
249
  readonly status: RunStatus;
214
250
  readonly version: 1;
215
251
  }
216
- interface RunDetailsBase extends Run {
252
+ export interface RunWait {
253
+ readonly actions: readonly ['continue'] | readonly ['approve', 'reject'];
254
+ readonly expiresAt: string;
255
+ readonly nodeId: string;
256
+ readonly prompt: string;
257
+ readonly waitId: string;
258
+ readonly waitingSince: string;
259
+ }
260
+ type RunDetailsBase = Run & {
217
261
  readonly closureDigest: string;
218
262
  readonly engineContract: string;
219
263
  readonly engineDigest: string;
220
264
  readonly eventsExpiresAt?: string;
221
265
  readonly modelVersion: number;
222
266
  readonly revisionDigest: string;
223
- }
267
+ readonly waits: readonly RunWait[];
268
+ };
224
269
  export type DraftRun = RunDetailsBase & {
225
270
  readonly source: 'draft';
226
271
  };
@@ -241,14 +286,8 @@ export interface RunPage {
241
286
  readonly runs: readonly Run[];
242
287
  readonly version: 1;
243
288
  }
244
- export type RunEventKind = 'node.artifact' | 'node.completed' | 'node.failed' | 'node.log' | 'node.output' | 'node.progress' | 'node.started' | 'run.canceled' | 'run.completed' | 'run.events-truncated' | 'run.failed' | 'run.indeterminate' | 'run.progress' | 'run.queued' | 'run.started';
245
- export interface RunEvent {
246
- readonly createdAt: string;
247
- readonly kind: RunEventKind;
248
- readonly payload: Readonly<Record<string, JsonValue>>;
249
- readonly sequence: number;
250
- readonly sourceSequence?: number;
251
- }
289
+ export type RunEvent = Readonly<ReturnType<typeof decodeRunEvent>>;
290
+ export type RunEventKind = RunEvent['kind'];
252
291
  export interface RunEvents {
253
292
  readonly done: boolean;
254
293
  readonly events: readonly RunEvent[];
@@ -286,17 +325,280 @@ export type RunResult = {
286
325
  readonly version: 1;
287
326
  };
288
327
  interface RunOptions {
328
+ readonly trigger: {
329
+ readonly nodeId: string;
330
+ readonly outputs: Readonly<Record<string, JsonValue>>;
331
+ };
289
332
  readonly idempotencyKey?: string;
290
333
  readonly inputs?: Readonly<Record<string, Readonly<Record<string, JsonValue>>>>;
291
334
  }
292
335
  interface PublicationOptions {
293
336
  readonly idempotencyKey?: string;
294
337
  }
295
- export declare class ApiError extends Error {
296
- readonly code: string;
297
- readonly status: number;
298
- constructor(status: number, code: string, message: string);
299
- }
338
+ export declare function decodeRunEvent(value: unknown): {
339
+ readonly createdAt: string;
340
+ readonly sequence: number;
341
+ readonly kind: "run.queued";
342
+ readonly payload: {
343
+ readonly flowId?: undefined;
344
+ readonly scopeId?: undefined;
345
+ readonly progress?: undefined;
346
+ readonly waitIds?: undefined;
347
+ readonly expiresAt?: undefined;
348
+ readonly nodeId?: undefined;
349
+ readonly waitingSince?: undefined;
350
+ readonly action?: undefined;
351
+ readonly resolvedAt?: undefined;
352
+ readonly waitId?: undefined;
353
+ readonly result?: undefined;
354
+ };
355
+ } | {
356
+ readonly createdAt: string;
357
+ readonly sequence: number;
358
+ readonly kind: "run.started";
359
+ readonly payload: {
360
+ readonly flowId: string;
361
+ readonly scopeId: string;
362
+ readonly parentScopeId?: string | undefined;
363
+ readonly progress?: undefined;
364
+ readonly waitIds?: undefined;
365
+ readonly expiresAt?: undefined;
366
+ readonly nodeId?: undefined;
367
+ readonly waitingSince?: undefined;
368
+ readonly action?: undefined;
369
+ readonly resolvedAt?: undefined;
370
+ readonly waitId?: undefined;
371
+ readonly result?: undefined;
372
+ };
373
+ } | {
374
+ readonly createdAt: string;
375
+ readonly sequence: number;
376
+ readonly kind: "run.progress";
377
+ readonly payload: {
378
+ readonly flowId: string;
379
+ readonly scopeId: string;
380
+ readonly progress: number;
381
+ readonly waitIds?: undefined;
382
+ readonly expiresAt?: undefined;
383
+ readonly nodeId?: undefined;
384
+ readonly waitingSince?: undefined;
385
+ readonly action?: undefined;
386
+ readonly resolvedAt?: undefined;
387
+ readonly waitId?: undefined;
388
+ readonly result?: undefined;
389
+ };
390
+ } | {
391
+ readonly createdAt: string;
392
+ readonly sequence: number;
393
+ readonly kind: "run.waiting";
394
+ readonly payload: {
395
+ readonly flowId?: undefined;
396
+ readonly scopeId?: undefined;
397
+ readonly progress?: undefined;
398
+ readonly waitIds: string[];
399
+ readonly expiresAt?: undefined;
400
+ readonly nodeId?: undefined;
401
+ readonly waitingSince?: undefined;
402
+ readonly action?: undefined;
403
+ readonly resolvedAt?: undefined;
404
+ readonly waitId?: undefined;
405
+ readonly result?: undefined;
406
+ };
407
+ } | {
408
+ readonly createdAt: string;
409
+ readonly sequence: number;
410
+ readonly kind: "wait.created";
411
+ readonly payload: {
412
+ readonly flowId?: undefined;
413
+ readonly scopeId?: undefined;
414
+ readonly progress?: undefined;
415
+ readonly waitIds?: undefined;
416
+ readonly expiresAt: string;
417
+ readonly nodeId: string;
418
+ readonly waitId: string;
419
+ readonly waitingSince: string;
420
+ readonly action?: undefined;
421
+ readonly resolvedAt?: undefined;
422
+ readonly result?: undefined;
423
+ };
424
+ } | {
425
+ readonly createdAt: string;
426
+ readonly sequence: number;
427
+ readonly kind: "run.resolved";
428
+ readonly payload: {
429
+ readonly flowId?: undefined;
430
+ readonly scopeId?: undefined;
431
+ readonly progress?: undefined;
432
+ readonly waitIds?: undefined;
433
+ readonly expiresAt?: undefined;
434
+ readonly nodeId?: undefined;
435
+ readonly waitingSince?: undefined;
436
+ readonly action: "approve" | "continue" | "reject";
437
+ readonly resolvedAt: string;
438
+ readonly waitId: string;
439
+ readonly result?: undefined;
440
+ };
441
+ } | {
442
+ readonly createdAt: string;
443
+ readonly sequence: number;
444
+ readonly kind: "run.canceled" | "run.completed" | "run.failed" | "run.indeterminate";
445
+ readonly payload: {
446
+ readonly flowId?: undefined;
447
+ readonly scopeId?: undefined;
448
+ readonly progress?: undefined;
449
+ readonly waitIds?: undefined;
450
+ readonly expiresAt?: undefined;
451
+ readonly nodeId?: undefined;
452
+ readonly waitingSince?: undefined;
453
+ readonly action?: undefined;
454
+ readonly resolvedAt?: undefined;
455
+ readonly waitId?: undefined;
456
+ readonly result: JsonValue;
457
+ };
458
+ } | {
459
+ readonly createdAt: string;
460
+ readonly sequence: number;
461
+ readonly kind: "run.events-truncated";
462
+ readonly payload: {
463
+ [k: string]: JsonValue;
464
+ };
465
+ } | {
466
+ readonly createdAt: string;
467
+ readonly sequence: number;
468
+ readonly kind: "node.started";
469
+ readonly payload: {
470
+ readonly progress?: undefined;
471
+ readonly waitIds?: undefined;
472
+ readonly expiresAt?: undefined;
473
+ readonly waitingSince?: undefined;
474
+ readonly action?: undefined;
475
+ readonly resolvedAt?: undefined;
476
+ readonly waitId?: undefined;
477
+ readonly result?: undefined;
478
+ readonly flowId: string;
479
+ readonly scopeId: string;
480
+ readonly nodeId: string;
481
+ readonly executionId: string;
482
+ readonly nodeKind?: string | undefined;
483
+ readonly nodeTitle?: string | undefined;
484
+ readonly operation?: string | undefined;
485
+ };
486
+ } | {
487
+ readonly createdAt: string;
488
+ readonly sequence: number;
489
+ readonly kind: "node.completed";
490
+ readonly payload: {
491
+ readonly progress?: undefined;
492
+ readonly waitIds?: undefined;
493
+ readonly expiresAt?: undefined;
494
+ readonly waitingSince?: undefined;
495
+ readonly action?: undefined;
496
+ readonly resolvedAt?: undefined;
497
+ readonly waitId?: undefined;
498
+ readonly result?: undefined;
499
+ readonly flowId: string;
500
+ readonly scopeId: string;
501
+ readonly nodeId: string;
502
+ readonly executionId: string;
503
+ readonly outputs: {
504
+ [k: string]: JsonValue;
505
+ };
506
+ };
507
+ } | {
508
+ readonly createdAt: string;
509
+ readonly sequence: number;
510
+ readonly kind: "node.failed";
511
+ readonly payload: {
512
+ readonly progress?: undefined;
513
+ readonly waitIds?: undefined;
514
+ readonly expiresAt?: undefined;
515
+ readonly waitingSince?: undefined;
516
+ readonly action?: undefined;
517
+ readonly resolvedAt?: undefined;
518
+ readonly waitId?: undefined;
519
+ readonly result?: undefined;
520
+ readonly flowId: string;
521
+ readonly scopeId: string;
522
+ readonly nodeId: string;
523
+ readonly executionId: string;
524
+ readonly error: {
525
+ readonly code: string;
526
+ readonly message: string;
527
+ };
528
+ };
529
+ } | {
530
+ readonly createdAt: string;
531
+ readonly sequence: number;
532
+ readonly kind: "node.log";
533
+ readonly payload: {
534
+ readonly progress?: undefined;
535
+ readonly waitIds?: undefined;
536
+ readonly expiresAt?: undefined;
537
+ readonly waitingSince?: undefined;
538
+ readonly action?: undefined;
539
+ readonly resolvedAt?: undefined;
540
+ readonly waitId?: undefined;
541
+ readonly result?: undefined;
542
+ readonly flowId: string;
543
+ readonly scopeId: string;
544
+ readonly nodeId: string;
545
+ readonly executionId: string;
546
+ readonly level: "debug" | "error" | "info" | "warn";
547
+ readonly message: string;
548
+ };
549
+ } | {
550
+ readonly createdAt: string;
551
+ readonly sequence: number;
552
+ readonly kind: "node.progress";
553
+ readonly payload: {
554
+ readonly waitIds?: undefined;
555
+ readonly expiresAt?: undefined;
556
+ readonly waitingSince?: undefined;
557
+ readonly action?: undefined;
558
+ readonly resolvedAt?: undefined;
559
+ readonly waitId?: undefined;
560
+ readonly result?: undefined;
561
+ readonly flowId: string;
562
+ readonly scopeId: string;
563
+ readonly nodeId: string;
564
+ readonly executionId: string;
565
+ readonly progress: number;
566
+ };
567
+ } | {
568
+ readonly createdAt: string;
569
+ readonly sequence: number;
570
+ readonly kind: "node.artifact";
571
+ readonly payload: {
572
+ readonly progress?: undefined;
573
+ readonly waitIds?: undefined;
574
+ readonly expiresAt?: undefined;
575
+ readonly waitingSince?: undefined;
576
+ readonly action?: undefined;
577
+ readonly resolvedAt?: undefined;
578
+ readonly waitId?: undefined;
579
+ readonly result?: undefined;
580
+ readonly flowId: string;
581
+ readonly scopeId: string;
582
+ readonly nodeId: string;
583
+ readonly executionId: string;
584
+ readonly artifact: {
585
+ readonly kind: 'artifact';
586
+ readonly id: string;
587
+ readonly name: string;
588
+ readonly size: number;
589
+ readonly digest: string;
590
+ readonly mediaType?: string | undefined;
591
+ };
592
+ };
593
+ };
594
+ export type ConditionalResult<T> = {
595
+ readonly modified: true;
596
+ readonly data: T;
597
+ readonly etag: string | null;
598
+ } | {
599
+ readonly modified: false;
600
+ readonly etag: string | null;
601
+ };
300
602
  export declare class ControlClient {
301
603
  private readonly requestControl;
302
604
  constructor(requestControl: ControlRequest);
@@ -305,6 +607,15 @@ export declare class ControlClient {
305
607
  readonly includeTotal?: boolean;
306
608
  readonly limit?: number;
307
609
  }): Promise<FlowPage>;
610
+ listEventSources(flowId?: string, signal?: AbortSignal): Promise<{
611
+ readonly version: 1;
612
+ readonly sources: readonly EventSource[];
613
+ readonly teamId?: string | null;
614
+ }>;
615
+ listEventSourceConnections(teamId: string | null, signal?: AbortSignal): Promise<readonly ConnectorConnection[]>;
616
+ createEventSource(input: CreateEventSource): Promise<EventSource>;
617
+ updateEventSource(sourceId: string, input: UpdateEventSource): Promise<EventSource>;
618
+ deleteEventSource(sourceId: string, expectedRevision: number): Promise<void>;
308
619
  listVariables(): Promise<{
309
620
  readonly variables: readonly Variable[];
310
621
  readonly version: 1;
@@ -316,10 +627,15 @@ export declare class ControlClient {
316
627
  getFlow(flowId: string): Promise<Flow>;
317
628
  renameFlow(flowId: string, name: string): Promise<Flow>;
318
629
  deleteFlow(flowId: string): Promise<Flow>;
319
- listTriggerKeys(signal?: AbortSignal): Promise<readonly TriggerKeySummary[]>;
630
+ listTriggerKeys(signal?: AbortSignal, locale?: string): Promise<readonly TriggerKeySummary[]>;
320
631
  listTriggerDefinitions(signal?: AbortSignal): Promise<readonly TriggerKeySnapshot[]>;
632
+ readCatalog<T>(query: {
633
+ readonly path: string;
634
+ readonly decode: (data: unknown) => T;
635
+ }, etag: string | null, signal?: AbortSignal): Promise<ConditionalResult<T>>;
636
+ getTriggerCatalog(locale: string, cached?: TriggerCatalogCache, signal?: AbortSignal): Promise<TriggerCatalogCache>;
321
637
  getTriggerKey(key: string, signal?: AbortSignal): Promise<TriggerKeySnapshot>;
322
- listFlowTriggerBindings(flowId: string): Promise<readonly TriggerBinding[]>;
638
+ listFlowTriggerBindings(flowId: string, signal?: AbortSignal): Promise<readonly TriggerBinding[]>;
323
639
  getFlowTriggerBinding(flowId: string, triggerNodeId: string): Promise<TriggerBindingDetail>;
324
640
  listFlowTriggerActivities(flowId: string, triggerNodeId: string, options?: {
325
641
  readonly cursor?: string;
@@ -328,40 +644,71 @@ export declare class ControlClient {
328
644
  pauseFlowTrigger(flowId: string, triggerNodeId: string): Promise<TriggerBinding>;
329
645
  resumeFlowTrigger(flowId: string, triggerNodeId: string): Promise<TriggerBinding>;
330
646
  testFlowPollTrigger(flowId: string, triggerNodeId: string): Promise<PollTriggerTestResult>;
647
+ getEditor(flowId: string): Promise<{
648
+ readonly flow: Flow;
649
+ readonly draft: Draft;
650
+ readonly live: Live;
651
+ readonly presentation: Presentation;
652
+ readonly version: 1;
653
+ }>;
654
+ getPresentation(flowId: string): Promise<Presentation>;
331
655
  getDraft(flowId: string): Promise<Draft>;
332
- syncDraft(flowId: string, fromRevisionId?: string): Promise<DraftSync>;
656
+ syncDraft(flowId: string): Promise<DraftSync>;
333
657
  getRevision(flowId: string, revisionId: string): Promise<Draft>;
334
- listConnectorProviders(signal?: AbortSignal, flowId?: string): Promise<readonly ConnectorProvider[]>;
335
- listConnectorActions(serviceId?: string, signal?: AbortSignal, flowId?: string): Promise<readonly ConnectorAction[]>;
336
- searchConnectorActions(query: string, signal?: AbortSignal, flowId?: string): Promise<readonly ConnectorAction[]>;
337
- getConnectorAction(actionId: string, signal?: AbortSignal, flowId?: string): Promise<ConnectorAction>;
338
- listConnectorConnections(serviceId: string, signal?: AbortSignal, flowId?: string): Promise<readonly ConnectorConnection[]>;
339
- createConnectorConnectionPage(serviceId: string, flowId?: string): Promise<string>;
340
- changeDraft(flowId: string, expectedRevisionId: string, operations: readonly ChangeOperation[]): Promise<DraftChange>;
658
+ listTriggerConfigOptions(flowId: string, nodeId: string, field: string, signal?: AbortSignal): Promise<readonly TriggerConfigOption[]>;
659
+ listConnectorProviders(signal?: AbortSignal, flowId?: string, locale?: string): Promise<readonly ConnectorProvider[]>;
660
+ listConnectorActions(serviceId?: string, signal?: AbortSignal, flowId?: string, locale?: string): Promise<readonly ConnectorAction[]>;
661
+ searchConnectorActions(query: string, signal?: AbortSignal, flowId?: string, locale?: string): Promise<readonly ConnectorAction[]>;
662
+ getConnectorAction(actionId: string, signal?: AbortSignal, flowId?: string, locale?: string, fresh?: boolean): Promise<ConnectorAction>;
663
+ listAllConnectorConnections(signal?: AbortSignal, flowId?: string, fresh?: boolean): Promise<readonly ConnectorConnection[]>;
664
+ listConnectorConnections(serviceId: string, signal?: AbortSignal, flowId?: string, fresh?: boolean): Promise<readonly ConnectorConnection[]>;
665
+ createConnectorConnectionPage(serviceId: string, flowId?: string, teamId?: string): Promise<string>;
666
+ changeDraft(flowId: string, expectedRevisionId: string, operations: readonly DraftOperation[], changeId?: string): Promise<DraftChange>;
667
+ repairDraft(flowId: string, expectedRevisionId: string, changeId?: string): Promise<DraftChange>;
341
668
  checkFlow(flowId: string, revisionId: string): Promise<FlowCheck>;
342
- getLive(flowId: string): Promise<Live>;
669
+ getLive(flowId: string, signal?: AbortSignal): Promise<Live>;
343
670
  listPublications(flowId: string, options?: {
344
671
  readonly cursor?: string;
345
672
  readonly includeTotal?: boolean;
346
673
  readonly limit?: number;
347
- }): Promise<PublicationPage>;
348
- createDraftRun(flowId: string, revisionId: string, options?: RunOptions): Promise<DraftRun>;
349
- createLiveRun(publicationId: string, options?: RunOptions): Promise<LiveRun>;
674
+ }, signal?: AbortSignal): Promise<PublicationPage>;
675
+ createDraftRun(flowId: string, revisionId: string, options: RunOptions): Promise<DraftRun>;
676
+ createLiveRun(publicationId: string, options: RunOptions): Promise<LiveRun>;
677
+ setFlowEnabled(flowId: string, publicationId: string, enabled: boolean): Promise<Flow>;
350
678
  publishFlow(flowId: string, revisionId: string, expectedLivePublicationId: string | null, options?: PublicationOptions): Promise<PublishOperation>;
351
- getPublishOperation(flowId: string, operationId: string): Promise<PublishOperation>;
679
+ getPublishOperation(flowId: string, operationId: string, signal?: AbortSignal): Promise<PublishOperation>;
352
680
  rollbackFlow(flowId: string, publicationId: string, expectedLivePublicationId: string, options?: PublicationOptions): Promise<Publication>;
353
- getRun(runId: string): Promise<RunDetails>;
681
+ getRun(runId: string, signal?: AbortSignal): Promise<RunDetails>;
354
682
  listRuns(flowId: string, options?: {
683
+ readonly createdBefore?: string;
684
+ readonly createdFrom?: string;
355
685
  readonly cursor?: string;
356
686
  readonly limit?: number;
687
+ readonly pendingWait?: boolean;
688
+ readonly runId?: string;
689
+ readonly source?: Run['source'];
357
690
  readonly status?: RunStatus;
358
691
  }): Promise<RunPage>;
359
692
  getRunEvents(runId: string, options?: {
360
693
  readonly after?: number;
361
694
  readonly limit?: number;
362
- }): Promise<RunEvents>;
363
- getRunResult(runId: string): Promise<RunResult>;
695
+ }, signal?: AbortSignal): Promise<RunEvents>;
696
+ listRunResults(runId: string, after?: string, signal?: AbortSignal): Promise<ReturnType<typeof decodeResultList>>;
697
+ readRunResult(runId: string, resultId: string, options?: ResultQuery, signal?: AbortSignal): Promise<ReturnType<typeof decodeResultRead>>;
698
+ downloadRunResult(runId: string, resultId: string, signal?: AbortSignal): Promise<Blob>;
699
+ getRunResult(runId: string, signal?: AbortSignal): Promise<RunResult>;
364
700
  cancelRun(runId: string): Promise<RunCancellation>;
701
+ resolveRunWait(runId: string, waitId: string, action: WaitAction): Promise<{
702
+ readonly action: WaitAction | null;
703
+ readonly resolutionAccepted: boolean;
704
+ readonly resolvedAt: string | null;
705
+ readonly runId: string;
706
+ readonly status: RunStatus;
707
+ readonly version: 1;
708
+ readonly waitId: string;
709
+ }>;
365
710
  private connectorActions;
711
+ protected connectorRequest<Value>(path: string, _kind: 'providers' | 'actions' | 'connections', signal: AbortSignal | undefined, decode: (value: unknown) => Value, _fresh?: boolean): Promise<Value>;
712
+ protected response(path: string, init: RequestInit, allowNotModified?: boolean): Promise<Response>;
366
713
  protected request<Value = unknown>(path: string, init?: RequestInit): Promise<Value>;
367
714
  }