@lovable.dev/workflows-sdk 0.0.0-dev.26 → 0.0.0-dev.28
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 +10 -9
- package/dist/{branch-metadata-IXuazOmY.js → branch-metadata-CZSd2-Zh.js} +1 -1
- package/dist/{context-escapes-x0J0HUgC.js → context-escapes-B0s8Zd-K.js} +1 -1
- package/dist/{duplicate-ids-NnTrnieX.js → duplicate-ids-DYq29CI7.js} +1 -1
- package/dist/generate-Cns4YbeL.js +6898 -0
- package/dist/{graph-Qx9mvqnC.js → graph-Bdvk16K9.js} +146 -83
- package/dist/index.d.ts +611 -124
- package/dist/index.js +1 -1
- package/dist/{nested-operations-DYVa5c5A.js → nested-operations-D1XKtDSh.js} +1 -1
- package/dist/{operation-descriptions-BLZC8bxV.js → operation-descriptions-bE60irWv.js} +1 -1
- package/dist/{step-metadata-MjyYQjOy.js → step-metadata-VvCbyokO.js} +1 -1
- package/dist/vite.js +3 -3
- package/package.json +2 -1
- package/dist/generate-DHIXkk21.js +0 -287
package/dist/index.d.ts
CHANGED
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
import { AnyWorkflowDefinition, AnyWorkflowDefinition as AnyWorkflowDefinition$1, Ctx, RunStore, StepContext, StepOptions, WorkflowDefinition, WorkflowEvent, WorkflowInput, WorkflowInput as WorkflowInput$1, WorkflowMetadata, WorkflowOutput, WorkflowState, createMiddleware, createWorkflow } from "@tanstack/workflow-core";
|
|
2
|
-
import "typescript";
|
|
3
2
|
//#region src/core/cadence.d.ts
|
|
4
3
|
type Weekday = "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
|
|
5
4
|
type Cadence = {
|
|
6
5
|
readonly kind: "hourly";
|
|
7
6
|
} | {
|
|
8
7
|
readonly kind: "daily";
|
|
9
|
-
readonly at: readonly number[]
|
|
10
|
-
|
|
8
|
+
readonly at: readonly number[];
|
|
9
|
+
} | {
|
|
10
|
+
readonly kind: "weekly";
|
|
11
|
+
readonly on: readonly Weekday[];
|
|
12
|
+
readonly at: readonly number[];
|
|
11
13
|
};
|
|
12
14
|
declare function hourly(options?: never): Cadence;
|
|
13
|
-
declare function daily(options
|
|
14
|
-
at
|
|
15
|
-
days?: readonly string[];
|
|
15
|
+
declare function daily(options: {
|
|
16
|
+
at: number[];
|
|
16
17
|
}): Cadence;
|
|
17
18
|
declare function weekly(options: {
|
|
18
|
-
on: string;
|
|
19
|
-
at
|
|
19
|
+
on: string[];
|
|
20
|
+
at: number[];
|
|
20
21
|
}): Cadence;
|
|
21
22
|
//#endregion
|
|
22
23
|
//#region src/core/schedule.d.ts
|
|
@@ -68,127 +69,613 @@ type WorkflowStepMetadata = WorkflowOperationMetadata & {
|
|
|
68
69
|
group?: WorkflowStepGroup;
|
|
69
70
|
};
|
|
70
71
|
//#endregion
|
|
71
|
-
//#region
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
groupId: string;
|
|
88
|
-
cardinality: "dynamic";
|
|
89
|
-
execution: "sequential";
|
|
90
|
-
operation: {
|
|
91
|
-
kind: "step";
|
|
92
|
-
stepIdTemplate: string;
|
|
93
|
-
description: string;
|
|
94
|
-
};
|
|
95
|
-
} | {
|
|
96
|
-
kind: "approve";
|
|
97
|
-
stepId: string;
|
|
98
|
-
description: string;
|
|
99
|
-
config: {
|
|
100
|
-
title: string;
|
|
101
|
-
description: string;
|
|
102
|
-
};
|
|
103
|
-
} | {
|
|
104
|
-
kind: "wait-for-event";
|
|
105
|
-
stepId: string;
|
|
106
|
-
description: string;
|
|
107
|
-
config: {
|
|
108
|
-
event: string;
|
|
109
|
-
deadline?: number;
|
|
110
|
-
};
|
|
111
|
-
} | {
|
|
112
|
-
kind: "sleep";
|
|
113
|
-
stepId: string;
|
|
114
|
-
description: string;
|
|
115
|
-
config: {
|
|
116
|
-
ms: number;
|
|
117
|
-
};
|
|
118
|
-
} | {
|
|
119
|
-
kind: "sleep-until";
|
|
120
|
-
stepId: string;
|
|
121
|
-
description: string;
|
|
122
|
-
config: {
|
|
123
|
-
timestamp: number;
|
|
124
|
-
};
|
|
125
|
-
} | {
|
|
126
|
-
kind: "now";
|
|
127
|
-
stepId: string;
|
|
128
|
-
description: string;
|
|
129
|
-
} | {
|
|
130
|
-
kind: "uuid";
|
|
131
|
-
stepId: string;
|
|
132
|
-
description: string;
|
|
133
|
-
} | {
|
|
134
|
-
kind: "branch";
|
|
135
|
-
branchId: string;
|
|
136
|
-
condition: string;
|
|
137
|
-
description: string;
|
|
138
|
-
} | {
|
|
139
|
-
kind: "unknown";
|
|
140
|
-
};
|
|
141
|
-
type WorkflowGraphNode = {
|
|
142
|
-
id: string;
|
|
143
|
-
label: string;
|
|
144
|
-
} & WorkflowGraphNodeDetails;
|
|
145
|
-
type WorkflowGraphEdge = {
|
|
146
|
-
source: string;
|
|
147
|
-
target: string;
|
|
148
|
-
kind: "order";
|
|
149
|
-
} | {
|
|
150
|
-
source: string;
|
|
151
|
-
target: string;
|
|
152
|
-
kind: "branch";
|
|
153
|
-
outcome: boolean;
|
|
72
|
+
//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@bufbuild/protobuf/2.10.1/b0955b226816adda68977638196f96a6e65cec2605734621338f49f7ea29042e/node_modules/@bufbuild/protobuf/dist/esm/json-value.d.ts
|
|
73
|
+
/**
|
|
74
|
+
* Represents any possible JSON value:
|
|
75
|
+
* - number
|
|
76
|
+
* - string
|
|
77
|
+
* - boolean
|
|
78
|
+
* - null
|
|
79
|
+
* - object (with any JSON value as property)
|
|
80
|
+
* - array (with any JSON value as element)
|
|
81
|
+
*/
|
|
82
|
+
type JsonValue = number | string | boolean | null | JsonObject | JsonValue[];
|
|
83
|
+
/**
|
|
84
|
+
* Represents a JSON object.
|
|
85
|
+
*/
|
|
86
|
+
type JsonObject = {
|
|
87
|
+
[k: string]: JsonValue;
|
|
154
88
|
};
|
|
155
|
-
interface WorkflowGraph {
|
|
156
|
-
source: "inferred";
|
|
157
|
-
scope: "handler";
|
|
158
|
-
complete: boolean;
|
|
159
|
-
nodes: WorkflowGraphNode[];
|
|
160
|
-
edges: WorkflowGraphEdge[];
|
|
161
|
-
diagnostics: string[];
|
|
162
|
-
}
|
|
163
89
|
//#endregion
|
|
164
|
-
//#region
|
|
165
|
-
|
|
166
|
-
|
|
90
|
+
//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@bufbuild/protobuf/2.10.1/b0955b226816adda68977638196f96a6e65cec2605734621338f49f7ea29042e/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/struct_pb.d.ts
|
|
91
|
+
/**
|
|
92
|
+
* `Value` represents a dynamically typed value which can be either
|
|
93
|
+
* null, a number, a string, a boolean, a recursive struct value, or a
|
|
94
|
+
* list of values. A producer of value is expected to set one of these
|
|
95
|
+
* variants. Absence of any variant indicates an error.
|
|
96
|
+
*
|
|
97
|
+
* The JSON representation for `Value` is JSON value.
|
|
98
|
+
*
|
|
99
|
+
* @generated from message google.protobuf.Value
|
|
100
|
+
*/
|
|
101
|
+
type ValueJson = JsonValue;
|
|
102
|
+
//#endregion
|
|
103
|
+
//#region src/proto/lovable/appworkflows/v1/workflow_manifest_pb.d.ts
|
|
104
|
+
/**
|
|
105
|
+
* Describes the static SDK-produced manifest for one workflow.
|
|
106
|
+
*
|
|
107
|
+
* @generated from message lovable.appworkflows.v1.WorkflowManifestV1
|
|
108
|
+
*/
|
|
109
|
+
type WorkflowManifestV1Json = {
|
|
110
|
+
/**
|
|
111
|
+
* Identifies the manifest schema; V1 emitters set this to 1.
|
|
112
|
+
*
|
|
113
|
+
* @generated from field: uint32 manifest_version = 1;
|
|
114
|
+
*/
|
|
115
|
+
manifestVersion?: number;
|
|
116
|
+
/**
|
|
117
|
+
* Records the exact @lovable.dev/workflows-sdk version that emitted the manifest.
|
|
118
|
+
*
|
|
119
|
+
* @generated from field: string sdk_version = 2;
|
|
120
|
+
*/
|
|
121
|
+
sdkVersion?: string;
|
|
122
|
+
/**
|
|
123
|
+
* Identifies the workflow within its app.
|
|
124
|
+
*
|
|
125
|
+
* @generated from field: string workflow_id = 3;
|
|
126
|
+
*/
|
|
127
|
+
workflowId?: string;
|
|
128
|
+
/**
|
|
129
|
+
* @generated from field: optional string description = 4;
|
|
130
|
+
*/
|
|
131
|
+
description?: string;
|
|
132
|
+
/**
|
|
133
|
+
* Carries the author-supplied workflow version, not a content digest.
|
|
134
|
+
*
|
|
135
|
+
* @generated from field: optional string workflow_version = 5;
|
|
136
|
+
*/
|
|
137
|
+
workflowVersion?: string;
|
|
138
|
+
/**
|
|
139
|
+
* Carries the workflow input JSON Schema when the workflow declares one.
|
|
140
|
+
*
|
|
141
|
+
* @generated from field: google.protobuf.Value input_schema = 6;
|
|
142
|
+
*/
|
|
143
|
+
inputSchema?: ValueJson;
|
|
144
|
+
/**
|
|
145
|
+
* Carries the workflow output JSON Schema when the workflow declares one.
|
|
146
|
+
*
|
|
147
|
+
* @generated from field: google.protobuf.Value output_schema = 7;
|
|
148
|
+
*/
|
|
149
|
+
outputSchema?: ValueJson;
|
|
150
|
+
/**
|
|
151
|
+
* Carries the workflow state JSON Schema when the workflow declares one.
|
|
152
|
+
*
|
|
153
|
+
* @generated from field: google.protobuf.Value state_schema = 8;
|
|
154
|
+
*/
|
|
155
|
+
stateSchema?: ValueJson;
|
|
156
|
+
/**
|
|
157
|
+
* Lists the workflow's statically declared triggers.
|
|
158
|
+
*
|
|
159
|
+
* @generated from field: repeated lovable.appworkflows.v1.WorkflowManifestTriggerV1 triggers = 9;
|
|
160
|
+
*/
|
|
161
|
+
triggers?: WorkflowManifestTriggerV1Json[];
|
|
162
|
+
/**
|
|
163
|
+
* Describes the durable-operation graph inferred from the workflow handler.
|
|
164
|
+
*
|
|
165
|
+
* @generated from field: lovable.appworkflows.v1.WorkflowManifestGraphV1 graph = 10;
|
|
166
|
+
*/
|
|
167
|
+
graph?: WorkflowManifestGraphV1Json;
|
|
167
168
|
};
|
|
169
|
+
/**
|
|
170
|
+
* Identifies a trigger and exactly one trigger-specific configuration.
|
|
171
|
+
*
|
|
172
|
+
* @generated from message lovable.appworkflows.v1.WorkflowManifestTriggerV1
|
|
173
|
+
*/
|
|
174
|
+
type WorkflowManifestTriggerV1Json = {
|
|
175
|
+
/**
|
|
176
|
+
* Identifies the trigger within its app.
|
|
177
|
+
*
|
|
178
|
+
* @generated from field: string id = 1;
|
|
179
|
+
*/
|
|
180
|
+
id?: string;
|
|
181
|
+
/**
|
|
182
|
+
* @generated from field: lovable.appworkflows.v1.WorkflowManifestScheduleTriggerV1 schedule = 2;
|
|
183
|
+
*/
|
|
184
|
+
schedule?: WorkflowManifestScheduleTriggerV1Json;
|
|
185
|
+
};
|
|
186
|
+
/**
|
|
187
|
+
* Configures a clock-based trigger.
|
|
188
|
+
*
|
|
189
|
+
* @generated from message lovable.appworkflows.v1.WorkflowManifestScheduleTriggerV1
|
|
190
|
+
*/
|
|
191
|
+
type WorkflowManifestScheduleTriggerV1Json = {
|
|
192
|
+
/**
|
|
193
|
+
* @generated from field: lovable.appworkflows.v1.WorkflowManifestCadenceV1 cadence = 1;
|
|
194
|
+
*/
|
|
195
|
+
cadence?: WorkflowManifestCadenceV1Json;
|
|
196
|
+
/**
|
|
197
|
+
* Uses a canonical IANA time-zone name or UTC.
|
|
198
|
+
*
|
|
199
|
+
* @generated from field: string time_zone = 2;
|
|
200
|
+
*/
|
|
201
|
+
timeZone?: string;
|
|
202
|
+
/**
|
|
203
|
+
* Pauses the schedule when false; SDK emitters always resolve this value.
|
|
204
|
+
*
|
|
205
|
+
* @generated from field: optional bool enabled = 3;
|
|
206
|
+
*/
|
|
207
|
+
enabled?: boolean;
|
|
208
|
+
/**
|
|
209
|
+
* Controls concurrent runs: "skip", "allow", or "buffer-one".
|
|
210
|
+
*
|
|
211
|
+
* @generated from field: string overlap_policy = 4;
|
|
212
|
+
*/
|
|
213
|
+
overlapPolicy?: string;
|
|
214
|
+
/**
|
|
215
|
+
* Supplies the workflow input for every run started by this schedule.
|
|
216
|
+
*
|
|
217
|
+
* @generated from field: google.protobuf.Value input = 5;
|
|
218
|
+
*/
|
|
219
|
+
input?: ValueJson;
|
|
220
|
+
};
|
|
221
|
+
/**
|
|
222
|
+
* Selects exactly one clock cadence.
|
|
223
|
+
*
|
|
224
|
+
* @generated from message lovable.appworkflows.v1.WorkflowManifestCadenceV1
|
|
225
|
+
*/
|
|
226
|
+
type WorkflowManifestCadenceV1Json = {
|
|
227
|
+
/**
|
|
228
|
+
* @generated from field: lovable.appworkflows.v1.WorkflowManifestHourlyCadenceV1 hourly = 1;
|
|
229
|
+
*/
|
|
230
|
+
hourly?: WorkflowManifestHourlyCadenceV1Json;
|
|
231
|
+
/**
|
|
232
|
+
* @generated from field: lovable.appworkflows.v1.WorkflowManifestDailyCadenceV1 daily = 2;
|
|
233
|
+
*/
|
|
234
|
+
daily?: WorkflowManifestDailyCadenceV1Json;
|
|
235
|
+
/**
|
|
236
|
+
* @generated from field: lovable.appworkflows.v1.WorkflowManifestWeeklyCadenceV1 weekly = 3;
|
|
237
|
+
*/
|
|
238
|
+
weekly?: WorkflowManifestWeeklyCadenceV1Json;
|
|
239
|
+
};
|
|
240
|
+
/**
|
|
241
|
+
* Runs once per hour at a platform-selected offset within the hour.
|
|
242
|
+
*
|
|
243
|
+
* @generated from message lovable.appworkflows.v1.WorkflowManifestHourlyCadenceV1
|
|
244
|
+
*/
|
|
245
|
+
type WorkflowManifestHourlyCadenceV1Json = {};
|
|
246
|
+
/**
|
|
247
|
+
* Runs daily during the selected hours in the schedule's time zone.
|
|
248
|
+
*
|
|
249
|
+
* @generated from message lovable.appworkflows.v1.WorkflowManifestDailyCadenceV1
|
|
250
|
+
*/
|
|
251
|
+
type WorkflowManifestDailyCadenceV1Json = {
|
|
252
|
+
/**
|
|
253
|
+
* Contains at least one unique whole hour from 0 through 23 in ascending order.
|
|
254
|
+
*
|
|
255
|
+
* @generated from field: repeated uint32 hours = 1;
|
|
256
|
+
*/
|
|
257
|
+
hours?: number[];
|
|
258
|
+
};
|
|
259
|
+
/**
|
|
260
|
+
* Runs at every selected hour on every selected weekday in the schedule's time zone.
|
|
261
|
+
*
|
|
262
|
+
* @generated from message lovable.appworkflows.v1.WorkflowManifestWeeklyCadenceV1
|
|
263
|
+
*/
|
|
264
|
+
type WorkflowManifestWeeklyCadenceV1Json = {
|
|
265
|
+
/**
|
|
266
|
+
* Contains at least one unique weekday in Monday-to-Sunday order and never UNSPECIFIED.
|
|
267
|
+
*
|
|
268
|
+
* @generated from field: repeated lovable.appworkflows.v1.WorkflowManifestWeekdayV1 days = 1;
|
|
269
|
+
*/
|
|
270
|
+
days?: WorkflowManifestWeekdayV1Json[];
|
|
271
|
+
/**
|
|
272
|
+
* Contains at least one unique whole hour from 0 through 23 in ascending order.
|
|
273
|
+
*
|
|
274
|
+
* @generated from field: repeated uint32 hours = 2;
|
|
275
|
+
*/
|
|
276
|
+
hours?: number[];
|
|
277
|
+
};
|
|
278
|
+
/**
|
|
279
|
+
* Describes the workflow handler's statically inferred durable-operation graph.
|
|
280
|
+
*
|
|
281
|
+
* @generated from message lovable.appworkflows.v1.WorkflowManifestGraphV1
|
|
282
|
+
*/
|
|
283
|
+
type WorkflowManifestGraphV1Json = {
|
|
284
|
+
/**
|
|
285
|
+
* Identifies how the graph was produced; SDK emitters currently use "inferred".
|
|
286
|
+
*
|
|
287
|
+
* @generated from field: string source = 1;
|
|
288
|
+
*/
|
|
289
|
+
source?: string;
|
|
290
|
+
/**
|
|
291
|
+
* Identifies the analyzed source region; SDK emitters currently use "handler".
|
|
292
|
+
*
|
|
293
|
+
* @generated from field: string scope = 2;
|
|
294
|
+
*/
|
|
295
|
+
scope?: string;
|
|
296
|
+
/**
|
|
297
|
+
* Is false when unsupported or dynamic source prevents complete inference.
|
|
298
|
+
*
|
|
299
|
+
* @generated from field: optional bool complete = 3;
|
|
300
|
+
*/
|
|
301
|
+
complete?: boolean;
|
|
302
|
+
/**
|
|
303
|
+
* @generated from field: repeated lovable.appworkflows.v1.WorkflowManifestGraphNodeV1 nodes = 4;
|
|
304
|
+
*/
|
|
305
|
+
nodes?: WorkflowManifestGraphNodeV1Json[];
|
|
306
|
+
/**
|
|
307
|
+
* @generated from field: repeated lovable.appworkflows.v1.WorkflowManifestGraphEdgeV1 edges = 5;
|
|
308
|
+
*/
|
|
309
|
+
edges?: WorkflowManifestGraphEdgeV1Json[];
|
|
310
|
+
/**
|
|
311
|
+
* Explains each reason complete is false.
|
|
312
|
+
*
|
|
313
|
+
* @generated from field: repeated string diagnostics = 6;
|
|
314
|
+
*/
|
|
315
|
+
diagnostics?: string[];
|
|
316
|
+
};
|
|
317
|
+
/**
|
|
318
|
+
* Describes one durable operation, repeated group, branch, or inference gap.
|
|
319
|
+
*
|
|
320
|
+
* @generated from message lovable.appworkflows.v1.WorkflowManifestGraphNodeV1
|
|
321
|
+
*/
|
|
322
|
+
type WorkflowManifestGraphNodeV1Json = {
|
|
323
|
+
/**
|
|
324
|
+
* Identifies the node within this graph.
|
|
325
|
+
*
|
|
326
|
+
* @generated from field: string id = 1;
|
|
327
|
+
*/
|
|
328
|
+
id?: string;
|
|
329
|
+
/**
|
|
330
|
+
* Supplies the display label used by graph consumers.
|
|
331
|
+
*
|
|
332
|
+
* @generated from field: string label = 2;
|
|
333
|
+
*/
|
|
334
|
+
label?: string;
|
|
335
|
+
/**
|
|
336
|
+
* @generated from field: lovable.appworkflows.v1.WorkflowManifestStepNodeV1 step = 3;
|
|
337
|
+
*/
|
|
338
|
+
step?: WorkflowManifestStepNodeV1Json;
|
|
339
|
+
/**
|
|
340
|
+
* @generated from field: lovable.appworkflows.v1.WorkflowManifestParallelNodeV1 parallel = 4;
|
|
341
|
+
*/
|
|
342
|
+
parallel?: WorkflowManifestParallelNodeV1Json;
|
|
343
|
+
/**
|
|
344
|
+
* @generated from field: lovable.appworkflows.v1.WorkflowManifestLoopNodeV1 loop = 5;
|
|
345
|
+
*/
|
|
346
|
+
loop?: WorkflowManifestLoopNodeV1Json;
|
|
347
|
+
/**
|
|
348
|
+
* @generated from field: lovable.appworkflows.v1.WorkflowManifestApproveNodeV1 approve = 6;
|
|
349
|
+
*/
|
|
350
|
+
approve?: WorkflowManifestApproveNodeV1Json;
|
|
351
|
+
/**
|
|
352
|
+
* @generated from field: lovable.appworkflows.v1.WorkflowManifestWaitForEventNodeV1 wait_for_event = 7;
|
|
353
|
+
*/
|
|
354
|
+
waitForEvent?: WorkflowManifestWaitForEventNodeV1Json;
|
|
355
|
+
/**
|
|
356
|
+
* @generated from field: lovable.appworkflows.v1.WorkflowManifestSleepNodeV1 sleep = 8;
|
|
357
|
+
*/
|
|
358
|
+
sleep?: WorkflowManifestSleepNodeV1Json;
|
|
359
|
+
/**
|
|
360
|
+
* @generated from field: lovable.appworkflows.v1.WorkflowManifestSleepUntilNodeV1 sleep_until = 9;
|
|
361
|
+
*/
|
|
362
|
+
sleepUntil?: WorkflowManifestSleepUntilNodeV1Json;
|
|
363
|
+
/**
|
|
364
|
+
* @generated from field: lovable.appworkflows.v1.WorkflowManifestNowNodeV1 now = 10;
|
|
365
|
+
*/
|
|
366
|
+
now?: WorkflowManifestNowNodeV1Json;
|
|
367
|
+
/**
|
|
368
|
+
* @generated from field: lovable.appworkflows.v1.WorkflowManifestUuidNodeV1 uuid = 11;
|
|
369
|
+
*/
|
|
370
|
+
uuid?: WorkflowManifestUuidNodeV1Json;
|
|
371
|
+
/**
|
|
372
|
+
* @generated from field: lovable.appworkflows.v1.WorkflowManifestBranchNodeV1 branch = 12;
|
|
373
|
+
*/
|
|
374
|
+
branch?: WorkflowManifestBranchNodeV1Json;
|
|
375
|
+
/**
|
|
376
|
+
* @generated from field: lovable.appworkflows.v1.WorkflowManifestUnknownNodeV1 unknown = 13;
|
|
377
|
+
*/
|
|
378
|
+
unknown?: WorkflowManifestUnknownNodeV1Json;
|
|
379
|
+
};
|
|
380
|
+
/**
|
|
381
|
+
* Appears for a statically described ctx.step call.
|
|
382
|
+
*
|
|
383
|
+
* @generated from message lovable.appworkflows.v1.WorkflowManifestStepNodeV1
|
|
384
|
+
*/
|
|
385
|
+
type WorkflowManifestStepNodeV1Json = {
|
|
386
|
+
/**
|
|
387
|
+
* @generated from field: string step_id = 1;
|
|
388
|
+
*/
|
|
389
|
+
stepId?: string;
|
|
390
|
+
/**
|
|
391
|
+
* @generated from field: string description = 2;
|
|
392
|
+
*/
|
|
393
|
+
description?: string;
|
|
394
|
+
/**
|
|
395
|
+
* @generated from field: lovable.appworkflows.v1.WorkflowManifestStepExecutionPolicyV1 execution_policy = 3;
|
|
396
|
+
*/
|
|
397
|
+
executionPolicy?: WorkflowManifestStepExecutionPolicyV1Json;
|
|
398
|
+
};
|
|
399
|
+
/**
|
|
400
|
+
* Appears for Promise.all over mapped ctx.step calls with static group metadata.
|
|
401
|
+
*
|
|
402
|
+
* @generated from message lovable.appworkflows.v1.WorkflowManifestParallelNodeV1
|
|
403
|
+
*/
|
|
404
|
+
type WorkflowManifestParallelNodeV1Json = {
|
|
405
|
+
/**
|
|
406
|
+
* @generated from field: string group_id = 1;
|
|
407
|
+
*/
|
|
408
|
+
groupId?: string;
|
|
409
|
+
/**
|
|
410
|
+
* @generated from field: lovable.appworkflows.v1.WorkflowManifestRepeatedStepV1 step = 2;
|
|
411
|
+
*/
|
|
412
|
+
step?: WorkflowManifestRepeatedStepV1Json;
|
|
413
|
+
};
|
|
414
|
+
/**
|
|
415
|
+
* Appears for a directly awaited ctx.step in a for-of loop with static group metadata.
|
|
416
|
+
*
|
|
417
|
+
* @generated from message lovable.appworkflows.v1.WorkflowManifestLoopNodeV1
|
|
418
|
+
*/
|
|
419
|
+
type WorkflowManifestLoopNodeV1Json = {
|
|
420
|
+
/**
|
|
421
|
+
* @generated from field: string group_id = 1;
|
|
422
|
+
*/
|
|
423
|
+
groupId?: string;
|
|
424
|
+
/**
|
|
425
|
+
* @generated from field: lovable.appworkflows.v1.WorkflowManifestRepeatedStepV1 step = 2;
|
|
426
|
+
*/
|
|
427
|
+
step?: WorkflowManifestRepeatedStepV1Json;
|
|
428
|
+
};
|
|
429
|
+
/**
|
|
430
|
+
* Describes the step repeated by a dynamic loop or parallel group.
|
|
431
|
+
*
|
|
432
|
+
* @generated from message lovable.appworkflows.v1.WorkflowManifestRepeatedStepV1
|
|
433
|
+
*/
|
|
434
|
+
type WorkflowManifestRepeatedStepV1Json = {
|
|
435
|
+
/**
|
|
436
|
+
* Preserves the source-level step ID expression as a display template.
|
|
437
|
+
*
|
|
438
|
+
* @generated from field: string step_id_template = 1;
|
|
439
|
+
*/
|
|
440
|
+
stepIdTemplate?: string;
|
|
441
|
+
/**
|
|
442
|
+
* @generated from field: string description = 2;
|
|
443
|
+
*/
|
|
444
|
+
description?: string;
|
|
445
|
+
/**
|
|
446
|
+
* @generated from field: lovable.appworkflows.v1.WorkflowManifestStepExecutionPolicyV1 execution_policy = 3;
|
|
447
|
+
*/
|
|
448
|
+
executionPolicy?: WorkflowManifestStepExecutionPolicyV1Json;
|
|
449
|
+
};
|
|
450
|
+
/**
|
|
451
|
+
* Describes the effective execution policy for one ctx.step callsite.
|
|
452
|
+
*
|
|
453
|
+
* @generated from message lovable.appworkflows.v1.WorkflowManifestStepExecutionPolicyV1
|
|
454
|
+
*/
|
|
455
|
+
type WorkflowManifestStepExecutionPolicyV1Json = {
|
|
456
|
+
/**
|
|
457
|
+
* Includes the first attempt.
|
|
458
|
+
*
|
|
459
|
+
* @generated from field: uint32 max_attempts = 1;
|
|
460
|
+
*/
|
|
461
|
+
maxAttempts?: number;
|
|
462
|
+
/**
|
|
463
|
+
* @generated from field: lovable.appworkflows.v1.WorkflowManifestRetryBackoffStrategyV1 retry_backoff_strategy = 2;
|
|
464
|
+
*/
|
|
465
|
+
retryBackoffStrategy?: WorkflowManifestRetryBackoffStrategyV1Json;
|
|
466
|
+
/**
|
|
467
|
+
* @generated from field: double retry_base_ms = 3;
|
|
468
|
+
*/
|
|
469
|
+
retryBaseMs?: number | "NaN" | "Infinity" | "-Infinity";
|
|
470
|
+
/**
|
|
471
|
+
* @generated from field: bool has_custom_should_retry = 4;
|
|
472
|
+
*/
|
|
473
|
+
hasCustomShouldRetry?: boolean;
|
|
474
|
+
/**
|
|
475
|
+
* Applies independently to each attempt when present.
|
|
476
|
+
*
|
|
477
|
+
* @generated from field: optional double timeout_ms = 5;
|
|
478
|
+
*/
|
|
479
|
+
timeoutMs?: number | "NaN" | "Infinity" | "-Infinity";
|
|
480
|
+
};
|
|
481
|
+
/**
|
|
482
|
+
* Appears for a statically described ctx.approve call.
|
|
483
|
+
*
|
|
484
|
+
* @generated from message lovable.appworkflows.v1.WorkflowManifestApproveNodeV1
|
|
485
|
+
*/
|
|
486
|
+
type WorkflowManifestApproveNodeV1Json = {
|
|
487
|
+
/**
|
|
488
|
+
* @generated from field: string step_id = 1;
|
|
489
|
+
*/
|
|
490
|
+
stepId?: string;
|
|
491
|
+
/**
|
|
492
|
+
* @generated from field: string description = 2;
|
|
493
|
+
*/
|
|
494
|
+
description?: string;
|
|
495
|
+
/**
|
|
496
|
+
* @generated from field: string title = 3;
|
|
497
|
+
*/
|
|
498
|
+
title?: string;
|
|
499
|
+
};
|
|
500
|
+
/**
|
|
501
|
+
* Appears for a statically described ctx.waitForEvent call.
|
|
502
|
+
*
|
|
503
|
+
* @generated from message lovable.appworkflows.v1.WorkflowManifestWaitForEventNodeV1
|
|
504
|
+
*/
|
|
505
|
+
type WorkflowManifestWaitForEventNodeV1Json = {
|
|
506
|
+
/**
|
|
507
|
+
* @generated from field: string step_id = 1;
|
|
508
|
+
*/
|
|
509
|
+
stepId?: string;
|
|
510
|
+
/**
|
|
511
|
+
* @generated from field: string description = 2;
|
|
512
|
+
*/
|
|
513
|
+
description?: string;
|
|
514
|
+
/**
|
|
515
|
+
* @generated from field: string event = 3;
|
|
516
|
+
*/
|
|
517
|
+
event?: string;
|
|
518
|
+
/**
|
|
519
|
+
* @generated from field: optional double deadline = 4;
|
|
520
|
+
*/
|
|
521
|
+
deadline?: number | "NaN" | "Infinity" | "-Infinity";
|
|
522
|
+
};
|
|
523
|
+
/**
|
|
524
|
+
* Appears for a ctx.sleep call with a static duration and description.
|
|
525
|
+
*
|
|
526
|
+
* @generated from message lovable.appworkflows.v1.WorkflowManifestSleepNodeV1
|
|
527
|
+
*/
|
|
528
|
+
type WorkflowManifestSleepNodeV1Json = {
|
|
529
|
+
/**
|
|
530
|
+
* @generated from field: string step_id = 1;
|
|
531
|
+
*/
|
|
532
|
+
stepId?: string;
|
|
533
|
+
/**
|
|
534
|
+
* @generated from field: string description = 2;
|
|
535
|
+
*/
|
|
536
|
+
description?: string;
|
|
537
|
+
/**
|
|
538
|
+
* @generated from field: double ms = 3;
|
|
539
|
+
*/
|
|
540
|
+
ms?: number | "NaN" | "Infinity" | "-Infinity";
|
|
541
|
+
};
|
|
542
|
+
/**
|
|
543
|
+
* Appears for a ctx.sleepUntil call with a static timestamp and description.
|
|
544
|
+
*
|
|
545
|
+
* @generated from message lovable.appworkflows.v1.WorkflowManifestSleepUntilNodeV1
|
|
546
|
+
*/
|
|
547
|
+
type WorkflowManifestSleepUntilNodeV1Json = {
|
|
548
|
+
/**
|
|
549
|
+
* @generated from field: string step_id = 1;
|
|
550
|
+
*/
|
|
551
|
+
stepId?: string;
|
|
552
|
+
/**
|
|
553
|
+
* @generated from field: string description = 2;
|
|
554
|
+
*/
|
|
555
|
+
description?: string;
|
|
556
|
+
/**
|
|
557
|
+
* @generated from field: double timestamp = 3;
|
|
558
|
+
*/
|
|
559
|
+
timestamp?: number | "NaN" | "Infinity" | "-Infinity";
|
|
560
|
+
};
|
|
561
|
+
/**
|
|
562
|
+
* Appears for a statically described ctx.now call.
|
|
563
|
+
*
|
|
564
|
+
* @generated from message lovable.appworkflows.v1.WorkflowManifestNowNodeV1
|
|
565
|
+
*/
|
|
566
|
+
type WorkflowManifestNowNodeV1Json = {
|
|
567
|
+
/**
|
|
568
|
+
* @generated from field: string step_id = 1;
|
|
569
|
+
*/
|
|
570
|
+
stepId?: string;
|
|
571
|
+
/**
|
|
572
|
+
* @generated from field: string description = 2;
|
|
573
|
+
*/
|
|
574
|
+
description?: string;
|
|
575
|
+
};
|
|
576
|
+
/**
|
|
577
|
+
* Appears for a statically described ctx.uuid call.
|
|
578
|
+
*
|
|
579
|
+
* @generated from message lovable.appworkflows.v1.WorkflowManifestUuidNodeV1
|
|
580
|
+
*/
|
|
581
|
+
type WorkflowManifestUuidNodeV1Json = {
|
|
582
|
+
/**
|
|
583
|
+
* @generated from field: string step_id = 1;
|
|
584
|
+
*/
|
|
585
|
+
stepId?: string;
|
|
586
|
+
/**
|
|
587
|
+
* @generated from field: string description = 2;
|
|
588
|
+
*/
|
|
589
|
+
description?: string;
|
|
590
|
+
};
|
|
591
|
+
/**
|
|
592
|
+
* Appears for an if statement carrying static branch metadata.
|
|
593
|
+
*
|
|
594
|
+
* @generated from message lovable.appworkflows.v1.WorkflowManifestBranchNodeV1
|
|
595
|
+
*/
|
|
596
|
+
type WorkflowManifestBranchNodeV1Json = {
|
|
597
|
+
/**
|
|
598
|
+
* @generated from field: string branch_id = 1;
|
|
599
|
+
*/
|
|
600
|
+
branchId?: string;
|
|
601
|
+
/**
|
|
602
|
+
* @generated from field: string condition = 2;
|
|
603
|
+
*/
|
|
604
|
+
condition?: string;
|
|
605
|
+
/**
|
|
606
|
+
* @generated from field: string description = 3;
|
|
607
|
+
*/
|
|
608
|
+
description?: string;
|
|
609
|
+
};
|
|
610
|
+
/**
|
|
611
|
+
* Appears where static inference cannot follow the workflow source; label contains the reason.
|
|
612
|
+
*
|
|
613
|
+
* @generated from message lovable.appworkflows.v1.WorkflowManifestUnknownNodeV1
|
|
614
|
+
*/
|
|
615
|
+
type WorkflowManifestUnknownNodeV1Json = {};
|
|
616
|
+
/**
|
|
617
|
+
* Connects two graph nodes in execution or branch order.
|
|
618
|
+
*
|
|
619
|
+
* @generated from message lovable.appworkflows.v1.WorkflowManifestGraphEdgeV1
|
|
620
|
+
*/
|
|
621
|
+
type WorkflowManifestGraphEdgeV1Json = {
|
|
622
|
+
/**
|
|
623
|
+
* @generated from field: string source = 1;
|
|
624
|
+
*/
|
|
625
|
+
source?: string;
|
|
626
|
+
/**
|
|
627
|
+
* @generated from field: string target = 2;
|
|
628
|
+
*/
|
|
629
|
+
target?: string;
|
|
630
|
+
/**
|
|
631
|
+
* @generated from field: lovable.appworkflows.v1.WorkflowManifestOrderEdgeV1 order = 3;
|
|
632
|
+
*/
|
|
633
|
+
order?: WorkflowManifestOrderEdgeV1Json;
|
|
634
|
+
/**
|
|
635
|
+
* @generated from field: lovable.appworkflows.v1.WorkflowManifestBranchEdgeV1 branch = 4;
|
|
636
|
+
*/
|
|
637
|
+
branch?: WorkflowManifestBranchEdgeV1Json;
|
|
638
|
+
};
|
|
639
|
+
/**
|
|
640
|
+
* Connects operations that execute sequentially.
|
|
641
|
+
*
|
|
642
|
+
* @generated from message lovable.appworkflows.v1.WorkflowManifestOrderEdgeV1
|
|
643
|
+
*/
|
|
644
|
+
type WorkflowManifestOrderEdgeV1Json = {};
|
|
645
|
+
/**
|
|
646
|
+
* Connects a condition to its true or false path.
|
|
647
|
+
*
|
|
648
|
+
* @generated from message lovable.appworkflows.v1.WorkflowManifestBranchEdgeV1
|
|
649
|
+
*/
|
|
650
|
+
type WorkflowManifestBranchEdgeV1Json = {
|
|
651
|
+
/**
|
|
652
|
+
* Is true for the then-path and false for the else-path.
|
|
653
|
+
*
|
|
654
|
+
* @generated from field: bool outcome = 1;
|
|
655
|
+
*/
|
|
656
|
+
outcome?: boolean;
|
|
657
|
+
};
|
|
658
|
+
/**
|
|
659
|
+
* Names a weekday independently of locale.
|
|
660
|
+
*
|
|
661
|
+
* @generated from enum lovable.appworkflows.v1.WorkflowManifestWeekdayV1
|
|
662
|
+
*/
|
|
663
|
+
type WorkflowManifestWeekdayV1Json = "WORKFLOW_MANIFEST_WEEKDAY_V1_UNSPECIFIED" | "WORKFLOW_MANIFEST_WEEKDAY_V1_MONDAY" | "WORKFLOW_MANIFEST_WEEKDAY_V1_TUESDAY" | "WORKFLOW_MANIFEST_WEEKDAY_V1_WEDNESDAY" | "WORKFLOW_MANIFEST_WEEKDAY_V1_THURSDAY" | "WORKFLOW_MANIFEST_WEEKDAY_V1_FRIDAY" | "WORKFLOW_MANIFEST_WEEKDAY_V1_SATURDAY" | "WORKFLOW_MANIFEST_WEEKDAY_V1_SUNDAY";
|
|
664
|
+
/**
|
|
665
|
+
* Selects the delay calculation between step attempts.
|
|
666
|
+
*
|
|
667
|
+
* @generated from enum lovable.appworkflows.v1.WorkflowManifestRetryBackoffStrategyV1
|
|
668
|
+
*/
|
|
669
|
+
type WorkflowManifestRetryBackoffStrategyV1Json = "WORKFLOW_MANIFEST_RETRY_BACKOFF_STRATEGY_V1_UNSPECIFIED" | "WORKFLOW_MANIFEST_RETRY_BACKOFF_STRATEGY_V1_EXPONENTIAL" | "WORKFLOW_MANIFEST_RETRY_BACKOFF_STRATEGY_V1_FIXED" | "WORKFLOW_MANIFEST_RETRY_BACKOFF_STRATEGY_V1_CUSTOM";
|
|
168
670
|
//#endregion
|
|
169
671
|
//#region src/manifests/generate.d.ts
|
|
170
|
-
|
|
171
|
-
|
|
672
|
+
type WorkflowManifest = WorkflowManifestV1Json & {
|
|
673
|
+
manifestVersion: 1;
|
|
172
674
|
sdkVersion: string;
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
inputSchema?: JsonValue;
|
|
178
|
-
outputSchema?: JsonValue;
|
|
179
|
-
stateSchema?: JsonValue;
|
|
180
|
-
};
|
|
181
|
-
triggers: {
|
|
182
|
-
type: "schedule";
|
|
183
|
-
id: string;
|
|
184
|
-
cadence: Cadence;
|
|
185
|
-
timeZone: string;
|
|
186
|
-
enabled: boolean;
|
|
187
|
-
overlapPolicy: OverlapPolicy;
|
|
188
|
-
input: JsonValue;
|
|
189
|
-
}[];
|
|
190
|
-
graph: WorkflowGraph;
|
|
191
|
-
}
|
|
675
|
+
workflowId: string;
|
|
676
|
+
triggers: NonNullable<WorkflowManifestV1Json["triggers"]>;
|
|
677
|
+
graph: NonNullable<WorkflowManifestV1Json["graph"]>;
|
|
678
|
+
};
|
|
192
679
|
declare function generateManifests(definition: WorkflowsDefinition): Promise<WorkflowManifest[]>;
|
|
193
680
|
//#endregion
|
|
194
681
|
//#region src/stacks/tanstack/handlers.d.ts
|
|
@@ -334,4 +821,4 @@ declare function createStepsHandler(collection: WorkflowCollection, options?: St
|
|
|
334
821
|
*/
|
|
335
822
|
declare function toServerSentEventsResponse(events: AsyncIterable<WorkflowEvent>): Response;
|
|
336
823
|
//#endregion
|
|
337
|
-
export { type AnyWorkflowDefinition, type Cadence, type Ctx, type MemoEntry, type OverlapPolicy, type ReplayOutcome, type ResolvedSchedule, type ResolvedTrigger, type ScheduleDefinition, type StepContext, type StepIntent, type StepKind, type StepOptions, type StepReference, type StepResult, type StepsDisposition, type StepsHandler, type StepsHandlerOptions, type StepsRequest, type StepsResponse, type TanStackWorkflowHandler, type TanStackWorkflowHandlerOptions, type TriggerDefinition, type Weekday, type WorkflowBranchMetadata, type WorkflowCollection, type WorkflowDefinition, type
|
|
824
|
+
export { type AnyWorkflowDefinition, type Cadence, type Ctx, type MemoEntry, type OverlapPolicy, type ReplayOutcome, type ResolvedSchedule, type ResolvedTrigger, type ScheduleDefinition, type StepContext, type StepIntent, type StepKind, type StepOptions, type StepReference, type StepResult, type StepsDisposition, type StepsHandler, type StepsHandlerOptions, type StepsRequest, type StepsResponse, type TanStackWorkflowHandler, type TanStackWorkflowHandlerOptions, type TriggerDefinition, type Weekday, type WorkflowBranchMetadata, type WorkflowCollection, type WorkflowDefinition, type WorkflowInput, type WorkflowManifest, type WorkflowOperationMetadata, type WorkflowOutput, type WorkflowState, type WorkflowStepGroup, type WorkflowStepMetadata, type WorkflowsDefinition, createMiddleware, createStepsHandler, createTanStackWorkflowHandler, createWorkflow, daily, defineSchedule, generateManifests, hourly, registerWorkflows, toServerSentEventsResponse, weekly };
|