@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.
- package/README.md +29 -38
- package/dist/.tsbuildinfo +1 -1
- package/dist/index.d.ts +20 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -2
- package/dist/index.js.map +1 -1
- package/dist/operations.d.ts +72 -72
- package/dist/operations.js +55 -55
- package/dist/operations.js.map +1 -1
- package/dist/operations.types.d.ts +24 -319
- package/dist/operations.types.d.ts.map +1 -1
- package/dist/types.d.ts +213 -45
- package/dist/types.d.ts.map +1 -1
- package/package.json +4 -3
- package/provenance.json +26 -0
|
@@ -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
|
|
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
|
|
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
|
|
20
|
-
}
|
|
7
|
+
export type CatalogSyncPostResponse = import("./types.js").CatalogSyncResponse;
|
|
21
8
|
/** Backend response type: Vec<crate::catalog::methods::CatalogTriggerView>. */
|
|
22
|
-
export
|
|
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 =
|
|
11
|
+
export type EventEmitPostInput = import("./types.js").EmitFlowEventInput;
|
|
32
12
|
/** Backend response type: serde_json::Value. */
|
|
33
|
-
export
|
|
34
|
-
}
|
|
13
|
+
export type EventEmitPostResponse = import("./types.js").EmitFlowEventResponse;
|
|
35
14
|
/** Backend response type: Vec<FlowResponse>. */
|
|
36
|
-
export
|
|
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
|
|
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
|
|
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
|
|
123
|
-
}
|
|
21
|
+
export type FlowDestroyDeleteResponse = import("./types.js").FlowDeleteResponse;
|
|
124
22
|
/** Backend response type: FlowResponse. */
|
|
125
|
-
export
|
|
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
|
|
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
|
|
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
|
|
212
|
-
}
|
|
29
|
+
export type FlowValidatePostResponse = import("./types.js").FlowValidationResponse;
|
|
213
30
|
/** Backend request type: ImportFlowsRequest. */
|
|
214
|
-
export
|
|
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
|
|
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
|
|
279
|
-
}
|
|
35
|
+
export type RouterIntegrationFlowGetResponse = import("./types.js").FlowIntegrationResponse;
|
|
280
36
|
/** Backend query type: RegistryQuery. */
|
|
281
|
-
export
|
|
282
|
-
"service"?: string | null;
|
|
283
|
-
}
|
|
37
|
+
export type RegistryActiveTriggersGetQuery = import("./types.js").ActiveTriggersQuery;
|
|
284
38
|
/** Backend response type: ActiveTriggersResponse. */
|
|
285
|
-
export
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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":"
|
|
1
|
+
{"version":3,"file":"operations.types.d.ts","sourceRoot":"","sources":["../src/operations.types.ts"],"names":[],"mappings":"AAEA,0HAA0H;AAC1H,6CAA6C;AAC7C,MAAM,MAAM,4BAA4B,GAAG,OAAO,YAAY,EAAE,kBAAkB,CAAC;AAEnF,8EAA8E;AAC9E,MAAM,MAAM,yBAAyB,GAAG,OAAO,YAAY,EAAE,qBAAqB,CAAC;AAEnF,gDAAgD;AAChD,MAAM,MAAM,uBAAuB,GAAG,OAAO,YAAY,EAAE,mBAAmB,CAAC;AAE/E,+EAA+E;AAC/E,MAAM,MAAM,0BAA0B,GAAG,OAAO,YAAY,EAAE,sBAAsB,CAAC;AAErF,+CAA+C;AAC/C,MAAM,MAAM,kBAAkB,GAAG,OAAO,YAAY,EAAE,kBAAkB,CAAC;AACzE,gDAAgD;AAChD,MAAM,MAAM,qBAAqB,GAAG,OAAO,YAAY,EAAE,qBAAqB,CAAC;AAE/E,gDAAgD;AAChD,MAAM,MAAM,oBAAoB,GAAG,OAAO,YAAY,EAAE,gBAAgB,CAAC;AAEzE,+CAA+C;AAC/C,MAAM,MAAM,kBAAkB,GAAG,OAAO,YAAY,EAAE,eAAe,CAAC;AACtE,2CAA2C;AAC3C,MAAM,MAAM,qBAAqB,GAAG,OAAO,YAAY,EAAE,YAAY,CAAC;AAEtE,gDAAgD;AAChD,MAAM,MAAM,yBAAyB,GAAG,OAAO,YAAY,EAAE,kBAAkB,CAAC;AAEhF,2CAA2C;AAC3C,MAAM,MAAM,mBAAmB,GAAG,OAAO,YAAY,EAAE,YAAY,CAAC;AAEpE,+CAA+C;AAC/C,MAAM,MAAM,kBAAkB,GAAG,OAAO,YAAY,EAAE,eAAe,CAAC;AACtE,2CAA2C;AAC3C,MAAM,MAAM,qBAAqB,GAAG,OAAO,YAAY,EAAE,YAAY,CAAC;AAEtE,gDAAgD;AAChD,MAAM,MAAM,wBAAwB,GAAG,OAAO,YAAY,EAAE,sBAAsB,CAAC;AAEnF,gDAAgD;AAChD,MAAM,MAAM,mBAAmB,GAAG,OAAO,YAAY,EAAE,gBAAgB,CAAC;AACxE,kDAAkD;AAClD,MAAM,MAAM,sBAAsB,GAAG,OAAO,YAAY,EAAE,mBAAmB,CAAC;AAE9E,uEAAuE;AACvE,MAAM,MAAM,gCAAgC,GAAG,OAAO,YAAY,EAAE,uBAAuB,CAAC;AAE5F,yCAAyC;AACzC,MAAM,MAAM,8BAA8B,GAAG,OAAO,YAAY,EAAE,mBAAmB,CAAC;AACtF,qDAAqD;AACrD,MAAM,MAAM,iCAAiC,GAAG,OAAO,YAAY,EAAE,sBAAsB,CAAC;AAE5F,qCAAqC;AACrC,MAAM,MAAM,gBAAgB,GAAG,OAAO,YAAY,EAAE,aAAa,CAAC;AAClE,oEAAoE;AACpE,MAAM,MAAM,mBAAmB,GAAG,OAAO,YAAY,EAAE,mBAAmB,CAAC;AAE3E,qEAAqE;AACrE,MAAM,MAAM,kBAAkB,GAAG,OAAO,YAAY,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 {
|
|
2
|
-
|
|
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
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
actions?: JsonObject[];
|
|
18
|
+
type: string;
|
|
19
|
+
position?: JsonValue | null;
|
|
20
|
+
data: JsonValue;
|
|
8
21
|
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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
|
|
29
|
+
export interface FlowGraph {
|
|
30
|
+
nodes: FlowNode[];
|
|
31
|
+
edges: FlowEdge[];
|
|
16
32
|
}
|
|
17
|
-
|
|
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
|
-
|
|
27
|
-
|
|
37
|
+
position: JsonValue | null;
|
|
38
|
+
data: JsonValue;
|
|
28
39
|
}
|
|
29
|
-
export interface
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
40
|
+
export interface FlowResponseEdge {
|
|
41
|
+
id: string;
|
|
42
|
+
source: string;
|
|
43
|
+
target: string;
|
|
44
|
+
data: JsonValue | null;
|
|
33
45
|
}
|
|
34
|
-
export interface
|
|
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
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
221
|
+
export interface FlowIntegrationEvent {
|
|
222
|
+
event_name: string;
|
|
223
|
+
payload_fields: FlowIntegrationField[];
|
|
57
224
|
}
|
|
58
|
-
export interface
|
|
59
|
-
|
|
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
|