@pgflow/client 0.4.1
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/CHANGELOG.md +108 -0
- package/LICENSE +202 -0
- package/README.md +380 -0
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +971 -0
- package/dist/index.js.map +1 -0
- package/dist/package.json +46 -0
- package/dist/pgflow-client.browser.js +2 -0
- package/dist/pgflow-client.browser.js.map +1 -0
- package/dist/src/browser.d.ts +7 -0
- package/dist/src/browser.d.ts.map +1 -0
- package/dist/src/index.d.ts +6 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/lib/FlowRun.d.ts +117 -0
- package/dist/src/lib/FlowRun.d.ts.map +1 -0
- package/dist/src/lib/FlowStep.d.ts +82 -0
- package/dist/src/lib/FlowStep.d.ts.map +1 -0
- package/dist/src/lib/PgflowClient.d.ts +73 -0
- package/dist/src/lib/PgflowClient.d.ts.map +1 -0
- package/dist/src/lib/SupabaseBroadcastAdapter.d.ts +65 -0
- package/dist/src/lib/SupabaseBroadcastAdapter.d.ts.map +1 -0
- package/dist/src/lib/eventAdapters.d.ts +21 -0
- package/dist/src/lib/eventAdapters.d.ts.map +1 -0
- package/dist/src/lib/types.d.ts +308 -0
- package/dist/src/lib/types.d.ts.map +1 -0
- package/package.json +46 -0
|
@@ -0,0 +1,308 @@
|
|
|
1
|
+
import { FlowRun } from './FlowRun.js';
|
|
2
|
+
import { Json, RunRow, StepStateRow, FlowRow, StepRow } from '../../../core/src/index.ts';
|
|
3
|
+
import { AnyFlow, ExtractFlowInput, ExtractFlowOutput, ExtractFlowSteps, StepOutput } from '../../../dsl/src/index.ts';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Flow run status enum
|
|
7
|
+
*/
|
|
8
|
+
export declare enum FlowRunStatus {
|
|
9
|
+
Started = "started",
|
|
10
|
+
Completed = "completed",
|
|
11
|
+
Failed = "failed"
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Flow run event data types - individual event shapes (no circular reference)
|
|
15
|
+
*/
|
|
16
|
+
export type FlowRunEventData<TFlow extends AnyFlow> = {
|
|
17
|
+
started: {
|
|
18
|
+
event_type: 'run:started';
|
|
19
|
+
run_id: string;
|
|
20
|
+
flow_slug: string;
|
|
21
|
+
input: ExtractFlowInput<TFlow>;
|
|
22
|
+
status: FlowRunStatus.Started;
|
|
23
|
+
started_at: string;
|
|
24
|
+
remaining_steps: number;
|
|
25
|
+
};
|
|
26
|
+
completed: {
|
|
27
|
+
event_type: 'run:completed';
|
|
28
|
+
run_id: string;
|
|
29
|
+
flow_slug: string;
|
|
30
|
+
output: ExtractFlowOutput<TFlow>;
|
|
31
|
+
status: FlowRunStatus.Completed;
|
|
32
|
+
completed_at: string;
|
|
33
|
+
};
|
|
34
|
+
failed: {
|
|
35
|
+
event_type: 'run:failed';
|
|
36
|
+
run_id: string;
|
|
37
|
+
flow_slug: string;
|
|
38
|
+
error_message: string;
|
|
39
|
+
status: FlowRunStatus.Failed;
|
|
40
|
+
failed_at: string;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Strong discriminated union for all flow run events (no circular reference)
|
|
45
|
+
*/
|
|
46
|
+
export type FlowRunEvent<TFlow extends AnyFlow> = FlowRunEventData<TFlow>[keyof FlowRunEventData<TFlow>];
|
|
47
|
+
/**
|
|
48
|
+
* Type guard to check if an unknown value is a valid FlowRunEvent
|
|
49
|
+
*/
|
|
50
|
+
export declare function isFlowRunEvent<TFlow extends AnyFlow>(value: unknown): value is FlowRunEvent<TFlow>;
|
|
51
|
+
/**
|
|
52
|
+
* Type guard for started events
|
|
53
|
+
*/
|
|
54
|
+
export declare function isFlowRunStartedEvent<TFlow extends AnyFlow>(event: FlowRunEvent<TFlow>): event is FlowRunEventData<TFlow>['started'];
|
|
55
|
+
/**
|
|
56
|
+
* Type guard for completed events
|
|
57
|
+
*/
|
|
58
|
+
export declare function isFlowRunCompletedEvent<TFlow extends AnyFlow>(event: FlowRunEvent<TFlow>): event is FlowRunEventData<TFlow>['completed'];
|
|
59
|
+
/**
|
|
60
|
+
* Type guard for failed events
|
|
61
|
+
*/
|
|
62
|
+
export declare function isFlowRunFailedEvent<TFlow extends AnyFlow>(event: FlowRunEvent<TFlow>): event is FlowRunEventData<TFlow>['failed'];
|
|
63
|
+
/**
|
|
64
|
+
* Flow run event types matching nanoevents expectations (wildcard added separately)
|
|
65
|
+
*/
|
|
66
|
+
export type FlowRunEvents<TFlow extends AnyFlow> = {
|
|
67
|
+
[K in keyof FlowRunEventData<TFlow>]: (event: FlowRunEventData<TFlow>[K]) => void;
|
|
68
|
+
} & {
|
|
69
|
+
'*': (event: FlowRunEvent<TFlow>) => void;
|
|
70
|
+
};
|
|
71
|
+
/**
|
|
72
|
+
* Flow step status enum
|
|
73
|
+
*/
|
|
74
|
+
export declare enum FlowStepStatus {
|
|
75
|
+
Created = "created",
|
|
76
|
+
Started = "started",
|
|
77
|
+
Completed = "completed",
|
|
78
|
+
Failed = "failed"
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Step event data types (no circular reference)
|
|
82
|
+
*/
|
|
83
|
+
export type StepEventData<TFlow extends AnyFlow, TStepSlug extends keyof ExtractFlowSteps<TFlow> & string> = {
|
|
84
|
+
started: {
|
|
85
|
+
event_type: 'step:started';
|
|
86
|
+
run_id: string;
|
|
87
|
+
step_slug: TStepSlug;
|
|
88
|
+
status: FlowStepStatus.Started;
|
|
89
|
+
started_at: string;
|
|
90
|
+
};
|
|
91
|
+
completed: {
|
|
92
|
+
event_type: 'step:completed';
|
|
93
|
+
run_id: string;
|
|
94
|
+
step_slug: TStepSlug;
|
|
95
|
+
output: StepOutput<TFlow, TStepSlug>;
|
|
96
|
+
status: FlowStepStatus.Completed;
|
|
97
|
+
completed_at: string;
|
|
98
|
+
};
|
|
99
|
+
failed: {
|
|
100
|
+
event_type: 'step:failed';
|
|
101
|
+
run_id: string;
|
|
102
|
+
step_slug: TStepSlug;
|
|
103
|
+
error_message: string;
|
|
104
|
+
status: FlowStepStatus.Failed;
|
|
105
|
+
failed_at: string;
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
/**
|
|
109
|
+
* Strong discriminated union for all step events (no circular reference)
|
|
110
|
+
*/
|
|
111
|
+
export type StepEvent<TFlow extends AnyFlow, TStepSlug extends keyof ExtractFlowSteps<TFlow> & string> = StepEventData<TFlow, TStepSlug>[keyof StepEventData<TFlow, TStepSlug>];
|
|
112
|
+
/**
|
|
113
|
+
* Type guard to check if an unknown value is a valid StepEvent
|
|
114
|
+
*/
|
|
115
|
+
export declare function isStepEvent<TFlow extends AnyFlow, TStepSlug extends keyof ExtractFlowSteps<TFlow> & string>(value: unknown): value is StepEvent<TFlow, TStepSlug>;
|
|
116
|
+
/**
|
|
117
|
+
* Type guard for started step events
|
|
118
|
+
*/
|
|
119
|
+
export declare function isStepStartedEvent<TFlow extends AnyFlow, TStepSlug extends keyof ExtractFlowSteps<TFlow> & string>(event: unknown): event is StepEventData<TFlow, TStepSlug>['started'];
|
|
120
|
+
/**
|
|
121
|
+
* Type guard for completed step events
|
|
122
|
+
*/
|
|
123
|
+
export declare function isStepCompletedEvent<TFlow extends AnyFlow, TStepSlug extends keyof ExtractFlowSteps<TFlow> & string>(event: unknown): event is StepEventData<TFlow, TStepSlug>['completed'];
|
|
124
|
+
/**
|
|
125
|
+
* Type guard for failed step events
|
|
126
|
+
*/
|
|
127
|
+
export declare function isStepFailedEvent<TFlow extends AnyFlow, TStepSlug extends keyof ExtractFlowSteps<TFlow> & string>(event: unknown): event is StepEventData<TFlow, TStepSlug>['failed'];
|
|
128
|
+
/**
|
|
129
|
+
* Step event types matching nanoevents expectations (wildcard added separately)
|
|
130
|
+
*/
|
|
131
|
+
export type StepEvents<TFlow extends AnyFlow, TStepSlug extends keyof ExtractFlowSteps<TFlow> & string> = {
|
|
132
|
+
[K in keyof StepEventData<TFlow, TStepSlug>]: (event: StepEventData<TFlow, TStepSlug>[K]) => void;
|
|
133
|
+
} & {
|
|
134
|
+
'*': (event: StepEvent<TFlow, TStepSlug>) => void;
|
|
135
|
+
};
|
|
136
|
+
/**
|
|
137
|
+
* Function returned by event subscriptions to remove the listener
|
|
138
|
+
*/
|
|
139
|
+
export type Unsubscribe = () => void;
|
|
140
|
+
/**
|
|
141
|
+
* Broadcast run event types for Supabase realtime
|
|
142
|
+
*/
|
|
143
|
+
export type BroadcastRunStartedEvent = {
|
|
144
|
+
event_type: 'run:started';
|
|
145
|
+
run_id: string;
|
|
146
|
+
flow_slug: string;
|
|
147
|
+
status: FlowRunStatus.Started;
|
|
148
|
+
input: Json;
|
|
149
|
+
started_at: string;
|
|
150
|
+
remaining_steps: number;
|
|
151
|
+
error_message?: string;
|
|
152
|
+
};
|
|
153
|
+
export type BroadcastRunCompletedEvent = {
|
|
154
|
+
event_type: 'run:completed';
|
|
155
|
+
run_id: string;
|
|
156
|
+
flow_slug: string;
|
|
157
|
+
status: FlowRunStatus.Completed;
|
|
158
|
+
output: Json;
|
|
159
|
+
completed_at: string;
|
|
160
|
+
error_message?: string;
|
|
161
|
+
};
|
|
162
|
+
export type BroadcastRunFailedEvent = {
|
|
163
|
+
event_type: 'run:failed';
|
|
164
|
+
run_id: string;
|
|
165
|
+
flow_slug: string;
|
|
166
|
+
status: FlowRunStatus.Failed;
|
|
167
|
+
error_message: string;
|
|
168
|
+
failed_at: string;
|
|
169
|
+
};
|
|
170
|
+
export type BroadcastRunEvent = BroadcastRunStartedEvent | BroadcastRunCompletedEvent | BroadcastRunFailedEvent;
|
|
171
|
+
/**
|
|
172
|
+
* Broadcast step event types for Supabase realtime
|
|
173
|
+
*/
|
|
174
|
+
export type BroadcastStepStartedEvent = {
|
|
175
|
+
event_type: 'step:started';
|
|
176
|
+
run_id: string;
|
|
177
|
+
step_slug: string;
|
|
178
|
+
status: FlowStepStatus.Started;
|
|
179
|
+
started_at: string;
|
|
180
|
+
remaining_tasks: number;
|
|
181
|
+
remaining_deps: number;
|
|
182
|
+
error_message?: string;
|
|
183
|
+
output?: Json;
|
|
184
|
+
};
|
|
185
|
+
export type BroadcastStepCompletedEvent = {
|
|
186
|
+
event_type: 'step:completed';
|
|
187
|
+
run_id: string;
|
|
188
|
+
step_slug: string;
|
|
189
|
+
status: FlowStepStatus.Completed;
|
|
190
|
+
output: Json;
|
|
191
|
+
completed_at: string;
|
|
192
|
+
error_message?: string;
|
|
193
|
+
};
|
|
194
|
+
export type BroadcastStepFailedEvent = {
|
|
195
|
+
event_type: 'step:failed';
|
|
196
|
+
run_id: string;
|
|
197
|
+
step_slug: string;
|
|
198
|
+
status: FlowStepStatus.Failed;
|
|
199
|
+
error_message: string;
|
|
200
|
+
failed_at: string;
|
|
201
|
+
output?: Json;
|
|
202
|
+
};
|
|
203
|
+
export type BroadcastStepEvent = BroadcastStepStartedEvent | BroadcastStepCompletedEvent | BroadcastStepFailedEvent;
|
|
204
|
+
/**
|
|
205
|
+
* Flow run state
|
|
206
|
+
*/
|
|
207
|
+
export type FlowRunState<TFlow extends AnyFlow> = {
|
|
208
|
+
run_id: string;
|
|
209
|
+
flow_slug: string;
|
|
210
|
+
status: FlowRunStatus;
|
|
211
|
+
input: ExtractFlowInput<TFlow>;
|
|
212
|
+
output: ExtractFlowOutput<TFlow> | null;
|
|
213
|
+
error: Error | null;
|
|
214
|
+
error_message: string | null;
|
|
215
|
+
started_at: Date | null;
|
|
216
|
+
completed_at: Date | null;
|
|
217
|
+
failed_at: Date | null;
|
|
218
|
+
remaining_steps: number;
|
|
219
|
+
};
|
|
220
|
+
/**
|
|
221
|
+
* Flow step state
|
|
222
|
+
*/
|
|
223
|
+
export type FlowStepState<TFlow extends AnyFlow, TStepSlug extends keyof ExtractFlowSteps<TFlow> & string> = {
|
|
224
|
+
run_id: string;
|
|
225
|
+
step_slug: TStepSlug;
|
|
226
|
+
status: FlowStepStatus;
|
|
227
|
+
output: StepOutput<TFlow, TStepSlug> | null;
|
|
228
|
+
error: Error | null;
|
|
229
|
+
error_message: string | null;
|
|
230
|
+
started_at: Date | null;
|
|
231
|
+
completed_at: Date | null;
|
|
232
|
+
failed_at: Date | null;
|
|
233
|
+
};
|
|
234
|
+
/**
|
|
235
|
+
* Interface for realtime updates (used by client library)
|
|
236
|
+
*/
|
|
237
|
+
export interface IFlowRealtime<TFlow = unknown> {
|
|
238
|
+
/**
|
|
239
|
+
* Fetch flow definition metadata (looks up flows and steps tables)
|
|
240
|
+
*/
|
|
241
|
+
fetchFlowDefinition(flow_slug: string): Promise<{
|
|
242
|
+
flow: FlowRow;
|
|
243
|
+
steps: StepRow[];
|
|
244
|
+
}>;
|
|
245
|
+
/**
|
|
246
|
+
* Register a callback for run events
|
|
247
|
+
* @returns Function to unsubscribe from the event
|
|
248
|
+
*/
|
|
249
|
+
onRunEvent(callback: (event: BroadcastRunEvent) => void): Unsubscribe;
|
|
250
|
+
/**
|
|
251
|
+
* Register a callback for step events
|
|
252
|
+
* @returns Function to unsubscribe from the event
|
|
253
|
+
*/
|
|
254
|
+
onStepEvent(callback: (event: BroadcastStepEvent) => void): Unsubscribe;
|
|
255
|
+
/**
|
|
256
|
+
* Subscribe to a flow run's events
|
|
257
|
+
*/
|
|
258
|
+
subscribeToRun(run_id: string): Promise<Unsubscribe>;
|
|
259
|
+
/**
|
|
260
|
+
* Fetch current state of a run and its steps
|
|
261
|
+
*/
|
|
262
|
+
getRunWithStates(run_id: string): Promise<{
|
|
263
|
+
run: RunRow;
|
|
264
|
+
steps: StepStateRow[];
|
|
265
|
+
}>;
|
|
266
|
+
}
|
|
267
|
+
/**
|
|
268
|
+
* Generic base interface for flow runs that uses proper event types
|
|
269
|
+
*/
|
|
270
|
+
export interface FlowRunBase<TEvt = unknown> {
|
|
271
|
+
readonly run_id: string;
|
|
272
|
+
updateState(event: TEvt): boolean;
|
|
273
|
+
step(stepSlug: string): FlowStepBase<unknown>;
|
|
274
|
+
hasStep(stepSlug: string): boolean;
|
|
275
|
+
dispose(): void;
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* Generic base interface for flow steps that uses proper event types
|
|
279
|
+
*/
|
|
280
|
+
export interface FlowStepBase<TEvt = unknown> {
|
|
281
|
+
updateState(event: TEvt): boolean;
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* Utility type for broadcast events
|
|
285
|
+
*/
|
|
286
|
+
export type BroadcastEvent = BroadcastRunEvent | BroadcastStepEvent;
|
|
287
|
+
/**
|
|
288
|
+
* Composite interface for client
|
|
289
|
+
*/
|
|
290
|
+
export interface IFlowClient<TFlow extends AnyFlow = AnyFlow> extends IFlowRealtime<TFlow> {
|
|
291
|
+
/**
|
|
292
|
+
* Start a flow with optional run_id
|
|
293
|
+
*
|
|
294
|
+
* @param flow_slug - Flow slug to start
|
|
295
|
+
* @param input - Input data for the flow
|
|
296
|
+
* @param run_id - Optional run ID (will be generated if not provided)
|
|
297
|
+
* @returns Promise that resolves with the FlowRun instance
|
|
298
|
+
*/
|
|
299
|
+
startFlow<TSpecificFlow extends TFlow>(flow_slug: string, input: ExtractFlowInput<TSpecificFlow>, run_id?: string): Promise<FlowRun<TSpecificFlow>>;
|
|
300
|
+
/**
|
|
301
|
+
* Get a flow run by ID
|
|
302
|
+
*
|
|
303
|
+
* @param run_id - ID of the run to get
|
|
304
|
+
* @returns Promise that resolves with the FlowRun instance or null if not found
|
|
305
|
+
*/
|
|
306
|
+
getRun<TSpecificFlow extends TFlow = TFlow>(run_id: string): Promise<FlowRun<TSpecificFlow> | null>;
|
|
307
|
+
}
|
|
308
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lib/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EACP,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,UAAU,EACX,MAAM,aAAa,CAA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AAC;CACnC;AAED;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,iBAAiB,GAAG,kBAAkB,CAAC;AAEpE;;GAEG;AACH,MAAM,WAAW,WAAW,CAAC,KAAK,SAAS,OAAO,GAAG,OAAO,CAC1D,SAAQ,aAAa,CAAC,KAAK,CAAC;IAC5B;;;;;;;OAOG;IACH,SAAS,CAAC,aAAa,SAAS,KAAK,EACnC,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,gBAAgB,CAAC,aAAa,CAAC,EACtC,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC;IAEnC;;;;;OAKG;IACH,MAAM,CAAC,aAAa,SAAS,KAAK,GAAG,KAAK,EACxC,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,OAAO,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,CAAC;CAC3C"}
|
package/package.json
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@pgflow/client",
|
|
3
|
+
"version": "0.4.1",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"dependencies": {
|
|
6
|
+
"@supabase/supabase-js": "^2.49.4",
|
|
7
|
+
"nanoevents": "^7.0.1",
|
|
8
|
+
"uuid": "^9.0.0",
|
|
9
|
+
"@pgflow/core": "0.4.1",
|
|
10
|
+
"@pgflow/dsl": "0.4.1"
|
|
11
|
+
},
|
|
12
|
+
"main": "./dist/index.cjs",
|
|
13
|
+
"module": "./dist/index.js",
|
|
14
|
+
"types": "./dist/index.d.ts",
|
|
15
|
+
"unpkg": "./dist/pgflow-client.browser.js",
|
|
16
|
+
"private": false,
|
|
17
|
+
"sideEffects": false,
|
|
18
|
+
"files": [
|
|
19
|
+
"dist/**/*",
|
|
20
|
+
"README.md",
|
|
21
|
+
"LICENSE",
|
|
22
|
+
"CHANGELOG.md"
|
|
23
|
+
],
|
|
24
|
+
"exports": {
|
|
25
|
+
".": {
|
|
26
|
+
"browser": "./dist/pgflow-client.browser.js",
|
|
27
|
+
"types": "./dist/index.d.ts",
|
|
28
|
+
"import": "./dist/index.js",
|
|
29
|
+
"require": "./dist/index.cjs",
|
|
30
|
+
"default": "./dist/index.js"
|
|
31
|
+
},
|
|
32
|
+
"./package.json": "./package.json"
|
|
33
|
+
},
|
|
34
|
+
"publishConfig": {
|
|
35
|
+
"access": "public"
|
|
36
|
+
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@types/uuid": "^10.0.0",
|
|
39
|
+
"postgres": "^3.4.5",
|
|
40
|
+
"supabase": "2.21.1",
|
|
41
|
+
"terser": "^5.43.0",
|
|
42
|
+
"vite-plugin-dts": "~3.8.1",
|
|
43
|
+
"vitest": "1.3.1",
|
|
44
|
+
"@pgflow/dsl": "0.4.1"
|
|
45
|
+
}
|
|
46
|
+
}
|