@faiber/faiber-flow 0.24.1 → 1.0.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.
@@ -1,345 +1,50 @@
1
- import type { ApiEnvelope, BackendJson, JsonObject, JsonValue, QueryParams } from "@faiber/sdk-core";
2
1
  /** Generated route contracts. Dynamic payload members remain JSON-safe and are documented with their Rust source type. */
3
2
  /** Backend response type: HealthResponse. */
4
- export interface RouterStatusRouteGetResponseData extends JsonObject {
5
- "version": string;
6
- }
7
- export interface RouterStatusRouteGetResponse extends ApiEnvelope<RouterStatusRouteGetResponseData> {
8
- }
3
+ export type RouterStatusRouteGetResponse = import("./types.js").FlowHealthResponse;
9
4
  /** Backend response type: Vec<crate::catalog::methods::CatalogActionView>. */
10
- export interface CatalogActionsGetResponseItem extends JsonObject {
11
- "service": string;
12
- "event_name": string;
13
- "queue": string;
14
- "payload_fields": JsonValue;
15
- }
16
- export interface CatalogActionsGetResponse extends ApiEnvelope<CatalogActionsGetResponseItem[]> {
17
- }
5
+ export type CatalogActionsGetResponse = import("./types.js").ActionCatalogResponse;
18
6
  /** Backend response type: serde_json::Value. */
19
- export interface CatalogSyncPostResponse extends ApiEnvelope<JsonValue> {
20
- }
7
+ export type CatalogSyncPostResponse = import("./types.js").CatalogSyncResponse;
21
8
  /** Backend response type: Vec<crate::catalog::methods::CatalogTriggerView>. */
22
- export interface CatalogTriggersGetResponseItem extends JsonObject {
23
- "service": string;
24
- "method": string;
25
- "path": string;
26
- "trigger_key": string;
27
- }
28
- export interface CatalogTriggersGetResponse extends ApiEnvelope<CatalogTriggersGetResponseItem[]> {
29
- }
9
+ export type CatalogTriggersGetResponse = import("./types.js").TriggerCatalogResponse;
30
10
  /** Backend request type: serde_json::Value. */
31
- export type EventEmitPostInput = JsonValue;
11
+ export type EventEmitPostInput = import("./types.js").EmitFlowEventInput;
32
12
  /** Backend response type: serde_json::Value. */
33
- export interface EventEmitPostResponse extends ApiEnvelope<JsonValue> {
34
- }
13
+ export type EventEmitPostResponse = import("./types.js").EmitFlowEventResponse;
35
14
  /** Backend response type: Vec<FlowResponse>. */
36
- export interface FlowIndexGetResponseItemGraphNodes extends JsonObject {
37
- "id": string;
38
- "type": string;
39
- "position"?: JsonValue | null;
40
- "data": JsonValue;
41
- }
42
- export interface FlowIndexGetResponseItemGraphEdges extends JsonObject {
43
- "id": string;
44
- "source": string;
45
- "target": string;
46
- "data"?: JsonValue | null;
47
- }
48
- export interface FlowIndexGetResponseItemGraph extends JsonObject {
49
- "nodes": FlowIndexGetResponseItemGraphNodes[];
50
- "edges": FlowIndexGetResponseItemGraphEdges[];
51
- }
52
- export interface FlowIndexGetResponseItem extends JsonObject {
53
- "id": string;
54
- "name": string;
55
- "slug": string;
56
- "enabled": boolean;
57
- "trigger_key": string;
58
- "capture_fields": string[];
59
- "graph": FlowIndexGetResponseItemGraph;
60
- "version": number;
61
- "created_at": string;
62
- "updated_at": string;
63
- }
64
- export interface FlowIndexGetResponse extends ApiEnvelope<FlowIndexGetResponseItem[]> {
65
- }
15
+ export type FlowIndexGetResponse = import("./types.js").FlowListResponse;
66
16
  /** Backend request type: CreateFlowRequest. */
67
- export interface FlowStorePostInputGraphNodes extends JsonObject {
68
- "id": string;
69
- "type": string;
70
- "position"?: JsonValue | null;
71
- "data": JsonValue;
72
- }
73
- export interface FlowStorePostInputGraphEdges extends JsonObject {
74
- "id": string;
75
- "source": string;
76
- "target": string;
77
- "data"?: JsonValue | null;
78
- }
79
- export interface FlowStorePostInputGraph extends JsonObject {
80
- "nodes": FlowStorePostInputGraphNodes[];
81
- "edges": FlowStorePostInputGraphEdges[];
82
- }
83
- export interface FlowStorePostInput extends JsonObject {
84
- "name": string;
85
- "slug"?: string | null;
86
- "trigger_key": string;
87
- "enabled"?: boolean | null;
88
- "graph"?: FlowStorePostInputGraph | null;
89
- }
17
+ export type FlowStorePostInput = import("./types.js").CreateFlowInput;
90
18
  /** Backend response type: FlowResponse. */
91
- export interface FlowStorePostResponseDataGraphNodes extends JsonObject {
92
- "id": string;
93
- "type": string;
94
- "position"?: JsonValue | null;
95
- "data": JsonValue;
96
- }
97
- export interface FlowStorePostResponseDataGraphEdges extends JsonObject {
98
- "id": string;
99
- "source": string;
100
- "target": string;
101
- "data"?: JsonValue | null;
102
- }
103
- export interface FlowStorePostResponseDataGraph extends JsonObject {
104
- "nodes": FlowStorePostResponseDataGraphNodes[];
105
- "edges": FlowStorePostResponseDataGraphEdges[];
106
- }
107
- export interface FlowStorePostResponseData extends JsonObject {
108
- "id": string;
109
- "name": string;
110
- "slug": string;
111
- "enabled": boolean;
112
- "trigger_key": string;
113
- "capture_fields": string[];
114
- "graph": FlowStorePostResponseDataGraph;
115
- "version": number;
116
- "created_at": string;
117
- "updated_at": string;
118
- }
119
- export interface FlowStorePostResponse extends ApiEnvelope<FlowStorePostResponseData> {
120
- }
19
+ export type FlowStorePostResponse = import("./types.js").FlowResponse;
121
20
  /** Backend response type: serde_json::Value. */
122
- export interface FlowDestroyDeleteResponse extends ApiEnvelope<JsonValue> {
123
- }
21
+ export type FlowDestroyDeleteResponse = import("./types.js").FlowDeleteResponse;
124
22
  /** Backend response type: FlowResponse. */
125
- export interface FlowShowGetResponseDataGraphNodes extends JsonObject {
126
- "id": string;
127
- "type": string;
128
- "position"?: JsonValue | null;
129
- "data": JsonValue;
130
- }
131
- export interface FlowShowGetResponseDataGraphEdges extends JsonObject {
132
- "id": string;
133
- "source": string;
134
- "target": string;
135
- "data"?: JsonValue | null;
136
- }
137
- export interface FlowShowGetResponseDataGraph extends JsonObject {
138
- "nodes": FlowShowGetResponseDataGraphNodes[];
139
- "edges": FlowShowGetResponseDataGraphEdges[];
140
- }
141
- export interface FlowShowGetResponseData extends JsonObject {
142
- "id": string;
143
- "name": string;
144
- "slug": string;
145
- "enabled": boolean;
146
- "trigger_key": string;
147
- "capture_fields": string[];
148
- "graph": FlowShowGetResponseDataGraph;
149
- "version": number;
150
- "created_at": string;
151
- "updated_at": string;
152
- }
153
- export interface FlowShowGetResponse extends ApiEnvelope<FlowShowGetResponseData> {
154
- }
23
+ export type FlowShowGetResponse = import("./types.js").FlowResponse;
155
24
  /** Backend request type: UpdateFlowRequest. */
156
- export interface FlowUpdatePutInputGraphNodes extends JsonObject {
157
- "id": string;
158
- "type": string;
159
- "position"?: JsonValue | null;
160
- "data": JsonValue;
161
- }
162
- export interface FlowUpdatePutInputGraphEdges extends JsonObject {
163
- "id": string;
164
- "source": string;
165
- "target": string;
166
- "data"?: JsonValue | null;
167
- }
168
- export interface FlowUpdatePutInputGraph extends JsonObject {
169
- "nodes": FlowUpdatePutInputGraphNodes[];
170
- "edges": FlowUpdatePutInputGraphEdges[];
171
- }
172
- export interface FlowUpdatePutInput extends JsonObject {
173
- "name"?: string | null;
174
- "slug"?: string | null;
175
- "trigger_key"?: string | null;
176
- "enabled"?: boolean | null;
177
- "graph"?: FlowUpdatePutInputGraph | null;
178
- }
25
+ export type FlowUpdatePutInput = import("./types.js").UpdateFlowInput;
179
26
  /** Backend response type: FlowResponse. */
180
- export interface FlowUpdatePutResponseDataGraphNodes extends JsonObject {
181
- "id": string;
182
- "type": string;
183
- "position"?: JsonValue | null;
184
- "data": JsonValue;
185
- }
186
- export interface FlowUpdatePutResponseDataGraphEdges extends JsonObject {
187
- "id": string;
188
- "source": string;
189
- "target": string;
190
- "data"?: JsonValue | null;
191
- }
192
- export interface FlowUpdatePutResponseDataGraph extends JsonObject {
193
- "nodes": FlowUpdatePutResponseDataGraphNodes[];
194
- "edges": FlowUpdatePutResponseDataGraphEdges[];
195
- }
196
- export interface FlowUpdatePutResponseData extends JsonObject {
197
- "id": string;
198
- "name": string;
199
- "slug": string;
200
- "enabled": boolean;
201
- "trigger_key": string;
202
- "capture_fields": string[];
203
- "graph": FlowUpdatePutResponseDataGraph;
204
- "version": number;
205
- "created_at": string;
206
- "updated_at": string;
207
- }
208
- export interface FlowUpdatePutResponse extends ApiEnvelope<FlowUpdatePutResponseData> {
209
- }
27
+ export type FlowUpdatePutResponse = import("./types.js").FlowResponse;
210
28
  /** Backend response type: serde_json::Value. */
211
- export interface FlowValidatePostResponse extends ApiEnvelope<JsonValue> {
212
- }
29
+ export type FlowValidatePostResponse = import("./types.js").FlowValidationResponse;
213
30
  /** Backend request type: ImportFlowsRequest. */
214
- export interface FlowImportPostInputFlowsGraphNodes extends JsonObject {
215
- "id": string;
216
- "type": string;
217
- "position"?: JsonValue | null;
218
- "data": JsonValue;
219
- }
220
- export interface FlowImportPostInputFlowsGraphEdges extends JsonObject {
221
- "id": string;
222
- "source": string;
223
- "target": string;
224
- "data"?: JsonValue | null;
225
- }
226
- export interface FlowImportPostInputFlowsGraph extends JsonObject {
227
- "nodes": FlowImportPostInputFlowsGraphNodes[];
228
- "edges": FlowImportPostInputFlowsGraphEdges[];
229
- }
230
- export interface FlowImportPostInputFlows extends JsonObject {
231
- "name": string;
232
- "slug"?: string | null;
233
- "trigger_key": string;
234
- "enabled"?: boolean;
235
- "graph": FlowImportPostInputFlowsGraph;
236
- }
237
- export interface FlowImportPostInputEventBridges extends JsonObject {
238
- "name": string;
239
- "slug"?: string | null;
240
- "event_key": string;
241
- "enabled"?: boolean;
242
- "target_service": string;
243
- "target_event": string;
244
- "queue"?: string | null;
245
- "payload": BackendJson<"serde_json::Map<String, serde_json::Value>">;
246
- "condition"?: JsonValue | null;
247
- }
248
- export interface FlowImportPostInputEventBridgeGroups extends JsonObject {
249
- "name_prefix"?: string | null;
250
- "slug_prefix"?: string | null;
251
- "event_keys": string[];
252
- "enabled"?: boolean;
253
- "target_service": string;
254
- "target_event": string;
255
- "queue"?: string | null;
256
- "payload": BackendJson<"serde_json::Map<String, serde_json::Value>">;
257
- "condition"?: JsonValue | null;
258
- }
259
- export interface FlowImportPostInput extends JsonObject {
260
- "version"?: number | null;
261
- "source"?: string | null;
262
- "dry_run"?: boolean;
263
- "flows"?: FlowImportPostInputFlows[];
264
- "event_bridges"?: FlowImportPostInputEventBridges[];
265
- "event_bridge_groups"?: FlowImportPostInputEventBridgeGroups[];
266
- }
31
+ export type FlowImportPostInput = import("./types.js").ImportFlowsInput;
267
32
  /** Backend response type: ImportFlowsResponse. */
268
- export interface FlowImportPostResponseData extends JsonObject {
269
- "validated": number;
270
- "created": number;
271
- "updated": number;
272
- "unchanged": number;
273
- "dry_run": boolean;
274
- }
275
- export interface FlowImportPostResponse extends ApiEnvelope<FlowImportPostResponseData> {
276
- }
33
+ export type FlowImportPostResponse = import("./types.js").ImportFlowsResponse;
277
34
  /** Backend response type: infera_flow_sdk::FlowIntegrationResponse. */
278
- export interface RouterIntegrationFlowGetResponse extends ApiEnvelope<BackendJson<"infera_flow_sdk::FlowIntegrationResponse">> {
279
- }
35
+ export type RouterIntegrationFlowGetResponse = import("./types.js").FlowIntegrationResponse;
280
36
  /** Backend query type: RegistryQuery. */
281
- export interface RegistryActiveTriggersGetQuery extends QueryParams {
282
- "service"?: string | null;
283
- }
37
+ export type RegistryActiveTriggersGetQuery = import("./types.js").ActiveTriggersQuery;
284
38
  /** Backend response type: ActiveTriggersResponse. */
285
- export interface RegistryActiveTriggersGetResponseDataTriggers extends JsonObject {
286
- "trigger_key": string;
287
- "capture_fields": string[];
288
- }
289
- export interface RegistryActiveTriggersGetResponseData extends JsonObject {
290
- "version": number;
291
- "triggers": RegistryActiveTriggersGetResponseDataTriggers[];
292
- }
293
- export interface RegistryActiveTriggersGetResponse extends ApiEnvelope<RegistryActiveTriggersGetResponseData> {
294
- }
39
+ export type RegistryActiveTriggersGetResponse = import("./types.js").ActiveTriggersResponse;
295
40
  /** Backend query type: RunsQuery. */
296
- export interface RunIndexGetQuery extends QueryParams {
297
- "limit"?: number | null;
298
- }
41
+ export type RunIndexGetQuery = import("./types.js").FlowRunsQuery;
299
42
  /** Backend response type: Vec<crate::run::methods::FlowRunView>. */
300
- export interface RunIndexGetResponseItem extends JsonObject {
301
- "id": string;
302
- "flow_id": string;
303
- "trigger_event_id": string;
304
- "status": string;
305
- "error"?: string | null;
306
- "started_at": string;
307
- "finished_at"?: string | null;
308
- }
309
- export interface RunIndexGetResponse extends ApiEnvelope<RunIndexGetResponseItem[]> {
310
- }
43
+ export type RunIndexGetResponse = import("./types.js").FlowRunListResponse;
311
44
  /** Backend response type: crate::run::methods::FlowRunDetailView. */
312
- export interface RunShowGetResponseDataSteps extends JsonObject {
313
- "id": string;
314
- "node_id": string;
315
- "condition_passed": boolean;
316
- "emitted_event"?: string | null;
317
- "payload"?: JsonValue | null;
318
- "created_at": string;
319
- }
320
- export interface RunShowGetResponseData extends JsonObject {
321
- "id": string;
322
- "flow_id": string;
323
- "trigger_event_id": string;
324
- "status": string;
325
- "error"?: string | null;
326
- "started_at": string;
327
- "finished_at"?: string | null;
328
- "context"?: JsonValue | null;
329
- "steps": RunShowGetResponseDataSteps[];
330
- }
331
- export interface RunShowGetResponse extends ApiEnvelope<RunShowGetResponseData> {
332
- }
45
+ export type RunShowGetResponse = import("./types.js").FlowRunResponse;
333
46
  /** Backend response type: HealthResponse. */
334
- export interface RouterStatusRouteGetHealthResponseData extends JsonObject {
335
- "version": string;
336
- }
337
- export interface RouterStatusRouteGetHealthResponse extends ApiEnvelope<RouterStatusRouteGetHealthResponseData> {
338
- }
47
+ export type RouterStatusRouteGetHealthResponse = import("./types.js").FlowHealthResponse;
339
48
  /** Backend response type: HealthResponse. */
340
- export interface RouterStatusRouteGetUpResponseData extends JsonObject {
341
- "version": string;
342
- }
343
- export interface RouterStatusRouteGetUpResponse extends ApiEnvelope<RouterStatusRouteGetUpResponseData> {
344
- }
49
+ export type RouterStatusRouteGetUpResponse = import("./types.js").FlowHealthResponse;
345
50
  //# sourceMappingURL=operations.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"operations.types.d.ts","sourceRoot":"","sources":["../src/operations.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAc,MAAM,kBAAkB,CAAC;AAEjH,0HAA0H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,EAAE,eAAe,CAAC;AAEtE,6CAA6C;AAC7C,MAAM,MAAM,kCAAkC,GAAG,OAAO,YAAY,EAAE,kBAAkB,CAAC;AAEzF,6CAA6C;AAC7C,MAAM,MAAM,8BAA8B,GAAG,OAAO,YAAY,EAAE,kBAAkB,CAAC"}
package/dist/types.d.ts CHANGED
@@ -1,62 +1,230 @@
1
- import type { ApiEnvelope, JsonObject, ResourceListResponse, ResourceResponse } from "@faiber/sdk-core";
2
- export interface Flow extends JsonObject {
1
+ import type { JsonObject, JsonValue, QueryParams } from "@faiber/sdk-core";
2
+ /** Flow success envelope; application errors instead return { error: string }. */
3
+ export interface FlowEnvelope<T> {
4
+ status: "success";
5
+ message: "ok";
6
+ data: T;
7
+ }
8
+ export interface FlowErrorResponse {
9
+ error: string;
10
+ }
11
+ export interface FlowHealth {
12
+ version: string;
13
+ }
14
+ export type FlowHealthResponse = FlowEnvelope<FlowHealth>;
15
+ /** Backend stores arbitrary JSON editor position and node data, including custom node types. */
16
+ export interface FlowNode {
3
17
  id: string;
4
- name: string;
5
- status: string;
6
- trigger?: JsonObject;
7
- actions?: JsonObject[];
18
+ type: string;
19
+ position?: JsonValue | null;
20
+ data: JsonValue;
8
21
  }
9
- export interface CreateFlowInput extends JsonObject {
10
- name: string;
11
- trigger: JsonObject;
12
- actions: JsonObject[];
13
- status?: string;
22
+ /** Edge data is an extensible JSON document; condition is interpreted by the execution engine. */
23
+ export interface FlowEdge {
24
+ id: string;
25
+ source: string;
26
+ target: string;
27
+ data?: JsonValue | null;
14
28
  }
15
- export interface UpdateFlowInput extends Partial<CreateFlowInput> {
29
+ export interface FlowGraph {
30
+ nodes: FlowNode[];
31
+ edges: FlowEdge[];
16
32
  }
17
- export interface FlowRun extends JsonObject {
33
+ /** Serialized graph retains nullable position/data fields even when inputs omitted them. */
34
+ export interface FlowResponseNode {
18
35
  id: string;
19
- flow_id: string;
20
- status: string;
21
- started_at?: string;
22
- finished_at?: string;
23
- }
24
- export interface TriggerDefinition extends JsonObject {
25
36
  type: string;
26
- name: string;
27
- schema?: JsonObject;
37
+ position: JsonValue | null;
38
+ data: JsonValue;
28
39
  }
29
- export interface ActionDefinition extends JsonObject {
30
- type: string;
31
- name: string;
32
- schema?: JsonObject;
40
+ export interface FlowResponseEdge {
41
+ id: string;
42
+ source: string;
43
+ target: string;
44
+ data: JsonValue | null;
33
45
  }
34
- export interface FlowValidationResult extends JsonObject {
46
+ export interface FlowResponseGraph {
47
+ nodes: FlowResponseNode[];
48
+ edges: FlowResponseEdge[];
49
+ }
50
+ export interface Flow {
51
+ id: string;
52
+ name: string;
53
+ slug: string;
54
+ enabled: boolean;
55
+ trigger_key: string;
56
+ capture_fields: string[];
57
+ graph: FlowResponseGraph;
58
+ version: number;
59
+ created_at: string;
60
+ updated_at: string;
61
+ }
62
+ /** Name length 1..200, nonempty trigger_key. Enabled defaults false; null/omitted graph creates one trigger. */
63
+ export interface CreateFlowInput {
64
+ name: string;
65
+ slug?: string | null;
66
+ trigger_key: string;
67
+ enabled?: boolean | null;
68
+ graph?: FlowGraph | null;
69
+ }
70
+ /** PUT is a partial update. Null and omitted fields preserve existing values. */
71
+ export interface UpdateFlowInput {
72
+ name?: string | null;
73
+ slug?: string | null;
74
+ trigger_key?: string | null;
75
+ enabled?: boolean | null;
76
+ graph?: FlowGraph | null;
77
+ }
78
+ export type FlowListQuery = Record<string, never>;
79
+ export type FlowListResponse = FlowEnvelope<Flow[]>;
80
+ export type FlowResponse = FlowEnvelope<Flow>;
81
+ export interface FlowDeleteResult {
82
+ deleted: true;
83
+ }
84
+ export type FlowDeleteResponse = FlowEnvelope<FlowDeleteResult>;
85
+ export interface FlowValidationResult {
35
86
  valid: boolean;
36
87
  errors: string[];
37
88
  }
38
- export interface ActiveTrigger extends JsonObject {
39
- flow_id: string;
40
- type: string;
41
- }
42
- export interface FlowListResponse extends ResourceListResponse<Flow> {
43
- }
44
- export interface FlowResponse extends ResourceResponse<Flow> {
45
- }
46
- export interface FlowRunListResponse extends ResourceListResponse<FlowRun> {
47
- }
48
- export interface FlowRunResponse extends ResourceResponse<FlowRun> {
49
- }
50
- export interface FlowValidationResponse extends ApiEnvelope<FlowValidationResult> {
89
+ export type FlowValidationResponse = FlowEnvelope<FlowValidationResult>;
90
+ export interface ImportFlowEntry {
91
+ name: string;
92
+ slug?: string | null;
93
+ trigger_key: string;
94
+ enabled?: boolean;
95
+ graph: FlowGraph;
51
96
  }
52
- export interface TriggerCatalogResponse extends ApiEnvelope<TriggerDefinition[]> {
97
+ /** Payload is a backend-declared arbitrary JSON mapping of downstream event fields and expression specifications. */
98
+ export interface ImportEventBridgeEntry {
99
+ name: string;
100
+ slug?: string | null;
101
+ event_key: string;
102
+ enabled?: boolean;
103
+ target_service: string;
104
+ target_event: string;
105
+ queue?: string | null;
106
+ payload: JsonObject;
107
+ condition?: JsonValue | null;
108
+ }
109
+ export interface ImportEventBridgeGroupEntry {
110
+ name_prefix?: string | null;
111
+ slug_prefix?: string | null;
112
+ event_keys: string[];
113
+ enabled?: boolean;
114
+ target_service: string;
115
+ target_event: string;
116
+ queue?: string | null;
117
+ payload: JsonObject;
118
+ condition?: JsonValue | null;
119
+ }
120
+ /** version/source are accepted metadata and not inspected. Arrays default empty; dry_run defaults false. */
121
+ export interface ImportFlowsInput {
122
+ version?: number | null;
123
+ source?: string | null;
124
+ dry_run?: boolean;
125
+ flows?: ImportFlowEntry[];
126
+ event_bridges?: ImportEventBridgeEntry[];
127
+ event_bridge_groups?: ImportEventBridgeGroupEntry[];
128
+ }
129
+ export interface ImportFlowsResult {
130
+ validated: number;
131
+ created: number;
132
+ updated: number;
133
+ unchanged: number;
134
+ dry_run: boolean;
135
+ }
136
+ export type ImportFlowsResponse = FlowEnvelope<ImportFlowsResult>;
137
+ /** Arbitrary event JSON becomes EndpointEvent.request. JSON null is valid; an absent body is not. */
138
+ export type EmitFlowEventInput = JsonValue;
139
+ export interface EmitFlowEventResult {
140
+ accepted: true;
141
+ event_id: string;
142
+ trigger_key: string;
143
+ }
144
+ export type EmitFlowEventResponse = FlowEnvelope<EmitFlowEventResult>;
145
+ export interface FlowRun {
146
+ id: string;
147
+ flow_id: string;
148
+ trigger_event_id: string;
149
+ status: string;
150
+ error: string | null;
151
+ started_at: string;
152
+ finished_at: string | null;
53
153
  }
54
- export interface ActionCatalogResponse extends ApiEnvelope<ActionDefinition[]> {
154
+ /** Runtime payload is arbitrary downstream JSON; duplicate node records are suppressed by the backend. */
155
+ export interface FlowRunStep {
156
+ id: string;
157
+ node_id: string;
158
+ condition_passed: boolean;
159
+ emitted_event: string | null;
160
+ payload: JsonValue | null;
161
+ created_at: string;
162
+ }
163
+ /** Backend persists EndpointEvent as JSON context and allows null for historical runs. */
164
+ export interface FlowRunDetail extends FlowRun {
165
+ context: JsonValue | null;
166
+ steps: FlowRunStep[];
167
+ }
168
+ /** Nonnegative u64 limit; defaults 50 with no application clamp. Use safe JavaScript integers. */
169
+ export interface FlowRunsQuery extends QueryParams {
170
+ limit?: number | null;
171
+ }
172
+ export type FlowRunListResponse = FlowEnvelope<FlowRun[]>;
173
+ export type FlowRunResponse = FlowEnvelope<FlowRunDetail>;
174
+ export interface TriggerDefinition {
175
+ service: string;
176
+ method: string;
177
+ path: string;
178
+ trigger_key: string;
179
+ }
180
+ /** payload_fields is imported/stored verbatim from external service metadata as arbitrary JSON. */
181
+ export interface ActionDefinition {
182
+ service: string;
183
+ event_name: string;
184
+ queue: string;
185
+ payload_fields: JsonValue;
186
+ }
187
+ export type TriggerCatalogResponse = FlowEnvelope<TriggerDefinition[]>;
188
+ export type ActionCatalogResponse = FlowEnvelope<ActionDefinition[]>;
189
+ export interface ActiveTrigger {
190
+ trigger_key: string;
191
+ capture_fields: string[];
192
+ }
193
+ export interface ActiveTriggersResult {
194
+ version: number;
195
+ triggers: ActiveTrigger[];
196
+ }
197
+ /** Filter matches endpoint.{service}. prefix; generic event triggers are excluded when set. */
198
+ export interface ActiveTriggersQuery extends QueryParams {
199
+ service?: string | null;
200
+ }
201
+ export type ActiveTriggersResponse = FlowEnvelope<ActiveTriggersResult>;
202
+ export interface CatalogSyncFailure {
203
+ service: string;
204
+ source: string;
205
+ error: string;
206
+ }
207
+ export interface CatalogSyncResult {
208
+ triggers: number;
209
+ actions: number;
210
+ succeeded_services: string[];
211
+ failed_services: CatalogSyncFailure[];
212
+ }
213
+ export type CatalogSyncResponse = FlowEnvelope<CatalogSyncResult>;
214
+ /** Shared Flow integration metadata shape; exact external dependency revision remains a native acceptance gate. */
215
+ export interface FlowIntegrationField {
216
+ name: string;
217
+ field_type: string;
218
+ required: boolean;
219
+ description: string;
55
220
  }
56
- export interface ActiveTriggersResponse extends ApiEnvelope<ActiveTrigger[]> {
221
+ export interface FlowIntegrationEvent {
222
+ event_name: string;
223
+ payload_fields: FlowIntegrationField[];
57
224
  }
58
- export interface CatalogSyncResponse extends ApiEnvelope<{
59
- synced: boolean;
60
- }> {
225
+ export interface FlowIntegrationResult {
226
+ queue: string;
227
+ events: FlowIntegrationEvent[];
61
228
  }
229
+ export type FlowIntegrationResponse = FlowEnvelope<FlowIntegrationResult>;
62
230
  //# sourceMappingURL=types.d.ts.map