weave-typescript 0.46.0 → 0.47.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/dist/weaveapi/agent/v1/agent.pb.d.ts +14 -14
- package/dist/weaveapi/agent/v1/agent.pb.js +88 -88
- package/dist/weaveapi/agent/v1/service.pb.d.ts +53 -53
- package/dist/weaveapi/agent/v1/service.pb.js +264 -250
- package/dist/weaveapi/chat/v1/chat.pb.d.ts +3 -3
- package/dist/weaveapi/chat/v1/chat.pb.js +33 -33
- package/dist/weaveapi/workflow/v1/service.pb.d.ts +55 -55
- package/dist/weaveapi/workflow/v1/service.pb.js +282 -268
- package/dist/weaveapi/workflow/v1/workflow.pb.d.ts +18 -18
- package/dist/weaveapi/workflow/v1/workflow.pb.js +111 -111
- package/dist/weavesql/weavedb/agent_sql.d.ts +83 -83
- package/dist/weavesql/weavedb/agent_sql.js +110 -110
- package/dist/weavesql/weavedb/workflow_sql.d.ts +93 -93
- package/dist/weavesql/weavedb/workflow_sql.js +120 -120
- package/package.json +2 -2
|
@@ -2,8 +2,8 @@ import { QueryArrayConfig, QueryArrayResult } from "pg";
|
|
|
2
2
|
interface Client {
|
|
3
3
|
query: (config: QueryArrayConfig) => Promise<QueryArrayResult>;
|
|
4
4
|
}
|
|
5
|
-
export declare const
|
|
6
|
-
export interface
|
|
5
|
+
export declare const createWorkflowDefinitionQuery = "-- name: CreateWorkflowDefinition :one\nINSERT INTO weave.workflow_definitions (\n id,\n organization_id,\n slug,\n name,\n description,\n status,\n created_by_user_id\n) VALUES (\n $1,\n $2,\n $3,\n $4,\n $5,\n $6,\n $7\n)\nRETURNING id, organization_id, slug, name, description, status, created_by_user_id, draft_revision, latest_version_id, latest_version, created_at, updated_at";
|
|
6
|
+
export interface CreateWorkflowDefinitionArgs {
|
|
7
7
|
id: string;
|
|
8
8
|
organizationId: string;
|
|
9
9
|
slug: string;
|
|
@@ -12,7 +12,7 @@ export interface CreateWorkflowTemplateArgs {
|
|
|
12
12
|
status: string;
|
|
13
13
|
createdByUserId: string;
|
|
14
14
|
}
|
|
15
|
-
export interface
|
|
15
|
+
export interface CreateWorkflowDefinitionRow {
|
|
16
16
|
id: string;
|
|
17
17
|
organizationId: string;
|
|
18
18
|
slug: string;
|
|
@@ -26,31 +26,31 @@ export interface CreateWorkflowTemplateRow {
|
|
|
26
26
|
createdAt: Date;
|
|
27
27
|
updatedAt: Date;
|
|
28
28
|
}
|
|
29
|
-
export declare function
|
|
30
|
-
export declare const
|
|
31
|
-
export interface
|
|
29
|
+
export declare function createWorkflowDefinition(client: Client, args: CreateWorkflowDefinitionArgs): Promise<CreateWorkflowDefinitionRow | null>;
|
|
30
|
+
export declare const createWorkflowDefinitionDraftQuery = "-- name: CreateWorkflowDefinitionDraft :one\nINSERT INTO weave.workflow_definition_drafts (\n id,\n definition_id,\n organization_id,\n base_version_id,\n revision,\n name,\n description,\n graph,\n input_schema,\n output_schema,\n metadata,\n updated_by_user_id\n) VALUES (\n $1,\n $2,\n $3,\n $4::uuid,\n $5,\n $6,\n $7,\n $8,\n $9,\n $10,\n $11,\n $12\n)\nRETURNING id, definition_id, organization_id, base_version_id, revision, name, description, graph, input_schema, output_schema, metadata, updated_by_user_id, created_at, updated_at";
|
|
31
|
+
export interface CreateWorkflowDefinitionDraftArgs {
|
|
32
32
|
id: string;
|
|
33
|
-
|
|
33
|
+
definitionId: string;
|
|
34
34
|
organizationId: string;
|
|
35
35
|
baseVersionId: string | null;
|
|
36
36
|
revision: number;
|
|
37
37
|
name: string;
|
|
38
38
|
description: string;
|
|
39
|
-
|
|
39
|
+
graph: any;
|
|
40
40
|
inputSchema: any;
|
|
41
41
|
outputSchema: any;
|
|
42
42
|
metadata: any;
|
|
43
43
|
updatedByUserId: string;
|
|
44
44
|
}
|
|
45
|
-
export interface
|
|
45
|
+
export interface CreateWorkflowDefinitionDraftRow {
|
|
46
46
|
id: string;
|
|
47
|
-
|
|
47
|
+
definitionId: string;
|
|
48
48
|
organizationId: string;
|
|
49
49
|
baseVersionId: string | null;
|
|
50
50
|
revision: number;
|
|
51
51
|
name: string;
|
|
52
52
|
description: string;
|
|
53
|
-
|
|
53
|
+
graph: any;
|
|
54
54
|
inputSchema: any;
|
|
55
55
|
outputSchema: any;
|
|
56
56
|
metadata: any;
|
|
@@ -58,13 +58,13 @@ export interface CreateWorkflowTemplateDraftRow {
|
|
|
58
58
|
createdAt: Date;
|
|
59
59
|
updatedAt: Date;
|
|
60
60
|
}
|
|
61
|
-
export declare function
|
|
62
|
-
export declare const
|
|
63
|
-
export interface
|
|
61
|
+
export declare function createWorkflowDefinitionDraft(client: Client, args: CreateWorkflowDefinitionDraftArgs): Promise<CreateWorkflowDefinitionDraftRow | null>;
|
|
62
|
+
export declare const getWorkflowDefinitionByIDQuery = "-- name: GetWorkflowDefinitionByID :one\nSELECT id, organization_id, slug, name, description, status, created_by_user_id, draft_revision, latest_version_id, latest_version, created_at, updated_at FROM weave.workflow_definitions\nWHERE organization_id = $1\n AND id = $2";
|
|
63
|
+
export interface GetWorkflowDefinitionByIDArgs {
|
|
64
64
|
organizationId: string;
|
|
65
|
-
|
|
65
|
+
definitionId: string;
|
|
66
66
|
}
|
|
67
|
-
export interface
|
|
67
|
+
export interface GetWorkflowDefinitionByIDRow {
|
|
68
68
|
id: string;
|
|
69
69
|
organizationId: string;
|
|
70
70
|
slug: string;
|
|
@@ -78,13 +78,13 @@ export interface GetWorkflowTemplateByIDRow {
|
|
|
78
78
|
createdAt: Date;
|
|
79
79
|
updatedAt: Date;
|
|
80
80
|
}
|
|
81
|
-
export declare function
|
|
82
|
-
export declare const
|
|
83
|
-
export interface
|
|
81
|
+
export declare function getWorkflowDefinitionByID(client: Client, args: GetWorkflowDefinitionByIDArgs): Promise<GetWorkflowDefinitionByIDRow | null>;
|
|
82
|
+
export declare const getWorkflowDefinitionBySlugQuery = "-- name: GetWorkflowDefinitionBySlug :one\nSELECT id, organization_id, slug, name, description, status, created_by_user_id, draft_revision, latest_version_id, latest_version, created_at, updated_at FROM weave.workflow_definitions\nWHERE organization_id = $1\n AND slug = $2";
|
|
83
|
+
export interface GetWorkflowDefinitionBySlugArgs {
|
|
84
84
|
organizationId: string;
|
|
85
85
|
slug: string;
|
|
86
86
|
}
|
|
87
|
-
export interface
|
|
87
|
+
export interface GetWorkflowDefinitionBySlugRow {
|
|
88
88
|
id: string;
|
|
89
89
|
organizationId: string;
|
|
90
90
|
slug: string;
|
|
@@ -98,21 +98,21 @@ export interface GetWorkflowTemplateBySlugRow {
|
|
|
98
98
|
createdAt: Date;
|
|
99
99
|
updatedAt: Date;
|
|
100
100
|
}
|
|
101
|
-
export declare function
|
|
102
|
-
export declare const
|
|
103
|
-
export interface
|
|
101
|
+
export declare function getWorkflowDefinitionBySlug(client: Client, args: GetWorkflowDefinitionBySlugArgs): Promise<GetWorkflowDefinitionBySlugRow | null>;
|
|
102
|
+
export declare const getWorkflowDefinitionDraftQuery = "-- name: GetWorkflowDefinitionDraft :one\nSELECT id, definition_id, organization_id, base_version_id, revision, name, description, graph, input_schema, output_schema, metadata, updated_by_user_id, created_at, updated_at FROM weave.workflow_definition_drafts\nWHERE organization_id = $1\n AND definition_id = $2";
|
|
103
|
+
export interface GetWorkflowDefinitionDraftArgs {
|
|
104
104
|
organizationId: string;
|
|
105
|
-
|
|
105
|
+
definitionId: string;
|
|
106
106
|
}
|
|
107
|
-
export interface
|
|
107
|
+
export interface GetWorkflowDefinitionDraftRow {
|
|
108
108
|
id: string;
|
|
109
|
-
|
|
109
|
+
definitionId: string;
|
|
110
110
|
organizationId: string;
|
|
111
111
|
baseVersionId: string | null;
|
|
112
112
|
revision: number;
|
|
113
113
|
name: string;
|
|
114
114
|
description: string;
|
|
115
|
-
|
|
115
|
+
graph: any;
|
|
116
116
|
inputSchema: any;
|
|
117
117
|
outputSchema: any;
|
|
118
118
|
metadata: any;
|
|
@@ -120,15 +120,15 @@ export interface GetWorkflowTemplateDraftRow {
|
|
|
120
120
|
createdAt: Date;
|
|
121
121
|
updatedAt: Date;
|
|
122
122
|
}
|
|
123
|
-
export declare function
|
|
124
|
-
export declare const
|
|
125
|
-
export interface
|
|
123
|
+
export declare function getWorkflowDefinitionDraft(client: Client, args: GetWorkflowDefinitionDraftArgs): Promise<GetWorkflowDefinitionDraftRow | null>;
|
|
124
|
+
export declare const listWorkflowDefinitionsQuery = "-- name: ListWorkflowDefinitions :many\nSELECT id, organization_id, slug, name, description, status, created_by_user_id, draft_revision, latest_version_id, latest_version, created_at, updated_at FROM weave.workflow_definitions\nWHERE organization_id = $1\n AND (\n $2::text IS NULL\n OR status = $2::text\n )\nORDER BY updated_at DESC, created_at DESC\nLIMIT $4 OFFSET $3";
|
|
125
|
+
export interface ListWorkflowDefinitionsArgs {
|
|
126
126
|
organizationId: string;
|
|
127
127
|
status: string | null;
|
|
128
128
|
pageOffset: string;
|
|
129
129
|
pageSize: string;
|
|
130
130
|
}
|
|
131
|
-
export interface
|
|
131
|
+
export interface ListWorkflowDefinitionsRow {
|
|
132
132
|
id: string;
|
|
133
133
|
organizationId: string;
|
|
134
134
|
slug: string;
|
|
@@ -142,16 +142,16 @@ export interface ListWorkflowTemplatesRow {
|
|
|
142
142
|
createdAt: Date;
|
|
143
143
|
updatedAt: Date;
|
|
144
144
|
}
|
|
145
|
-
export declare function
|
|
146
|
-
export declare const
|
|
147
|
-
export interface
|
|
145
|
+
export declare function listWorkflowDefinitions(client: Client, args: ListWorkflowDefinitionsArgs): Promise<ListWorkflowDefinitionsRow[]>;
|
|
146
|
+
export declare const updateWorkflowDefinitionDraftMetadataQuery = "-- name: UpdateWorkflowDefinitionDraftMetadata :one\nUPDATE weave.workflow_definitions\nSET\n name = $1,\n description = $2,\n draft_revision = $3,\n updated_at = now()\nWHERE organization_id = $4\n AND id = $5\nRETURNING id, organization_id, slug, name, description, status, created_by_user_id, draft_revision, latest_version_id, latest_version, created_at, updated_at";
|
|
147
|
+
export interface UpdateWorkflowDefinitionDraftMetadataArgs {
|
|
148
148
|
name: string;
|
|
149
149
|
description: string;
|
|
150
150
|
draftRevision: number;
|
|
151
151
|
organizationId: string;
|
|
152
|
-
|
|
152
|
+
definitionId: string;
|
|
153
153
|
}
|
|
154
|
-
export interface
|
|
154
|
+
export interface UpdateWorkflowDefinitionDraftMetadataRow {
|
|
155
155
|
id: string;
|
|
156
156
|
organizationId: string;
|
|
157
157
|
slug: string;
|
|
@@ -165,14 +165,14 @@ export interface UpdateWorkflowTemplateDraftMetadataRow {
|
|
|
165
165
|
createdAt: Date;
|
|
166
166
|
updatedAt: Date;
|
|
167
167
|
}
|
|
168
|
-
export declare function
|
|
169
|
-
export declare const
|
|
170
|
-
export interface
|
|
168
|
+
export declare function updateWorkflowDefinitionDraftMetadata(client: Client, args: UpdateWorkflowDefinitionDraftMetadataArgs): Promise<UpdateWorkflowDefinitionDraftMetadataRow | null>;
|
|
169
|
+
export declare const updateWorkflowDefinitionStatusQuery = "-- name: UpdateWorkflowDefinitionStatus :one\nUPDATE weave.workflow_definitions\nSET\n status = $1,\n updated_at = now()\nWHERE organization_id = $2\n AND id = $3\nRETURNING id, organization_id, slug, name, description, status, created_by_user_id, draft_revision, latest_version_id, latest_version, created_at, updated_at";
|
|
170
|
+
export interface UpdateWorkflowDefinitionStatusArgs {
|
|
171
171
|
status: string;
|
|
172
172
|
organizationId: string;
|
|
173
|
-
|
|
173
|
+
definitionId: string;
|
|
174
174
|
}
|
|
175
|
-
export interface
|
|
175
|
+
export interface UpdateWorkflowDefinitionStatusRow {
|
|
176
176
|
id: string;
|
|
177
177
|
organizationId: string;
|
|
178
178
|
slug: string;
|
|
@@ -186,30 +186,30 @@ export interface UpdateWorkflowTemplateStatusRow {
|
|
|
186
186
|
createdAt: Date;
|
|
187
187
|
updatedAt: Date;
|
|
188
188
|
}
|
|
189
|
-
export declare function
|
|
190
|
-
export declare const updateWorkflowDraftQuery = "-- name: UpdateWorkflowDraft :one\nUPDATE weave.
|
|
189
|
+
export declare function updateWorkflowDefinitionStatus(client: Client, args: UpdateWorkflowDefinitionStatusArgs): Promise<UpdateWorkflowDefinitionStatusRow | null>;
|
|
190
|
+
export declare const updateWorkflowDraftQuery = "-- name: UpdateWorkflowDraft :one\nUPDATE weave.workflow_definition_drafts\nSET\n base_version_id = $1::uuid,\n revision = revision + 1,\n name = $2,\n description = $3,\n graph = $4,\n input_schema = $5,\n output_schema = $6,\n metadata = $7,\n updated_by_user_id = $8,\n updated_at = now()\nWHERE organization_id = $9\n AND definition_id = $10\n AND revision = $11\nRETURNING id, definition_id, organization_id, base_version_id, revision, name, description, graph, input_schema, output_schema, metadata, updated_by_user_id, created_at, updated_at";
|
|
191
191
|
export interface UpdateWorkflowDraftArgs {
|
|
192
192
|
baseVersionId: string | null;
|
|
193
193
|
name: string;
|
|
194
194
|
description: string;
|
|
195
|
-
|
|
195
|
+
graph: any;
|
|
196
196
|
inputSchema: any;
|
|
197
197
|
outputSchema: any;
|
|
198
198
|
metadata: any;
|
|
199
199
|
updatedByUserId: string;
|
|
200
200
|
organizationId: string;
|
|
201
|
-
|
|
201
|
+
definitionId: string;
|
|
202
202
|
expectedRevision: number;
|
|
203
203
|
}
|
|
204
204
|
export interface UpdateWorkflowDraftRow {
|
|
205
205
|
id: string;
|
|
206
|
-
|
|
206
|
+
definitionId: string;
|
|
207
207
|
organizationId: string;
|
|
208
208
|
baseVersionId: string | null;
|
|
209
209
|
revision: number;
|
|
210
210
|
name: string;
|
|
211
211
|
description: string;
|
|
212
|
-
|
|
212
|
+
graph: any;
|
|
213
213
|
inputSchema: any;
|
|
214
214
|
outputSchema: any;
|
|
215
215
|
metadata: any;
|
|
@@ -218,10 +218,10 @@ export interface UpdateWorkflowDraftRow {
|
|
|
218
218
|
updatedAt: Date;
|
|
219
219
|
}
|
|
220
220
|
export declare function updateWorkflowDraft(client: Client, args: UpdateWorkflowDraftArgs): Promise<UpdateWorkflowDraftRow | null>;
|
|
221
|
-
export declare const insertWorkflowDraftPatchQuery = "-- name: InsertWorkflowDraftPatch :one\nINSERT INTO weave.
|
|
221
|
+
export declare const insertWorkflowDraftPatchQuery = "-- name: InsertWorkflowDraftPatch :one\nINSERT INTO weave.workflow_definition_draft_patches (\n id,\n definition_id,\n organization_id,\n revision,\n patch,\n created_by_user_id\n) VALUES (\n $1,\n $2,\n $3,\n $4,\n $5,\n $6\n)\nRETURNING id, definition_id, organization_id, revision, patch, created_by_user_id, created_at";
|
|
222
222
|
export interface InsertWorkflowDraftPatchArgs {
|
|
223
223
|
id: string;
|
|
224
|
-
|
|
224
|
+
definitionId: string;
|
|
225
225
|
organizationId: string;
|
|
226
226
|
revision: number;
|
|
227
227
|
patch: any;
|
|
@@ -229,7 +229,7 @@ export interface InsertWorkflowDraftPatchArgs {
|
|
|
229
229
|
}
|
|
230
230
|
export interface InsertWorkflowDraftPatchRow {
|
|
231
231
|
id: string;
|
|
232
|
-
|
|
232
|
+
definitionId: string;
|
|
233
233
|
organizationId: string;
|
|
234
234
|
revision: number;
|
|
235
235
|
patch: any;
|
|
@@ -237,45 +237,45 @@ export interface InsertWorkflowDraftPatchRow {
|
|
|
237
237
|
createdAt: Date;
|
|
238
238
|
}
|
|
239
239
|
export declare function insertWorkflowDraftPatch(client: Client, args: InsertWorkflowDraftPatchArgs): Promise<InsertWorkflowDraftPatchRow | null>;
|
|
240
|
-
export declare const
|
|
241
|
-
export interface
|
|
240
|
+
export declare const insertWorkflowDefinitionVersionQuery = "-- name: InsertWorkflowDefinitionVersion :one\nINSERT INTO weave.workflow_definition_versions (\n id,\n definition_id,\n organization_id,\n version,\n source_draft_revision,\n name,\n description,\n graph,\n input_schema,\n output_schema,\n metadata,\n published_by_user_id\n) VALUES (\n $1,\n $2,\n $3,\n $4,\n $5,\n $6,\n $7,\n $8,\n $9,\n $10,\n $11,\n $12\n)\nRETURNING id, definition_id, organization_id, version, source_draft_revision, name, description, graph, input_schema, output_schema, metadata, published_by_user_id, published_at";
|
|
241
|
+
export interface InsertWorkflowDefinitionVersionArgs {
|
|
242
242
|
id: string;
|
|
243
|
-
|
|
243
|
+
definitionId: string;
|
|
244
244
|
organizationId: string;
|
|
245
245
|
version: number;
|
|
246
246
|
sourceDraftRevision: number;
|
|
247
247
|
name: string;
|
|
248
248
|
description: string;
|
|
249
|
-
|
|
249
|
+
graph: any;
|
|
250
250
|
inputSchema: any;
|
|
251
251
|
outputSchema: any;
|
|
252
252
|
metadata: any;
|
|
253
253
|
publishedByUserId: string;
|
|
254
254
|
}
|
|
255
|
-
export interface
|
|
255
|
+
export interface InsertWorkflowDefinitionVersionRow {
|
|
256
256
|
id: string;
|
|
257
|
-
|
|
257
|
+
definitionId: string;
|
|
258
258
|
organizationId: string;
|
|
259
259
|
version: number;
|
|
260
260
|
sourceDraftRevision: number;
|
|
261
261
|
name: string;
|
|
262
262
|
description: string;
|
|
263
|
-
|
|
263
|
+
graph: any;
|
|
264
264
|
inputSchema: any;
|
|
265
265
|
outputSchema: any;
|
|
266
266
|
metadata: any;
|
|
267
267
|
publishedByUserId: string;
|
|
268
268
|
publishedAt: Date;
|
|
269
269
|
}
|
|
270
|
-
export declare function
|
|
271
|
-
export declare const
|
|
272
|
-
export interface
|
|
270
|
+
export declare function insertWorkflowDefinitionVersion(client: Client, args: InsertWorkflowDefinitionVersionArgs): Promise<InsertWorkflowDefinitionVersionRow | null>;
|
|
271
|
+
export declare const setWorkflowDefinitionLatestVersionQuery = "-- name: SetWorkflowDefinitionLatestVersion :one\nUPDATE weave.workflow_definitions\nSET\n latest_version_id = $1,\n latest_version = $2,\n updated_at = now()\nWHERE organization_id = $3\n AND id = $4\nRETURNING id, organization_id, slug, name, description, status, created_by_user_id, draft_revision, latest_version_id, latest_version, created_at, updated_at";
|
|
272
|
+
export interface SetWorkflowDefinitionLatestVersionArgs {
|
|
273
273
|
versionId: string | null;
|
|
274
274
|
version: number;
|
|
275
275
|
organizationId: string;
|
|
276
|
-
|
|
276
|
+
definitionId: string;
|
|
277
277
|
}
|
|
278
|
-
export interface
|
|
278
|
+
export interface SetWorkflowDefinitionLatestVersionRow {
|
|
279
279
|
id: string;
|
|
280
280
|
organizationId: string;
|
|
281
281
|
slug: string;
|
|
@@ -289,78 +289,78 @@ export interface SetWorkflowTemplateLatestVersionRow {
|
|
|
289
289
|
createdAt: Date;
|
|
290
290
|
updatedAt: Date;
|
|
291
291
|
}
|
|
292
|
-
export declare function
|
|
293
|
-
export declare const
|
|
294
|
-
export interface
|
|
292
|
+
export declare function setWorkflowDefinitionLatestVersion(client: Client, args: SetWorkflowDefinitionLatestVersionArgs): Promise<SetWorkflowDefinitionLatestVersionRow | null>;
|
|
293
|
+
export declare const getWorkflowDefinitionVersionByNumberQuery = "-- name: GetWorkflowDefinitionVersionByNumber :one\nSELECT id, definition_id, organization_id, version, source_draft_revision, name, description, graph, input_schema, output_schema, metadata, published_by_user_id, published_at FROM weave.workflow_definition_versions\nWHERE organization_id = $1\n AND definition_id = $2\n AND version = $3";
|
|
294
|
+
export interface GetWorkflowDefinitionVersionByNumberArgs {
|
|
295
295
|
organizationId: string;
|
|
296
|
-
|
|
296
|
+
definitionId: string;
|
|
297
297
|
version: number;
|
|
298
298
|
}
|
|
299
|
-
export interface
|
|
299
|
+
export interface GetWorkflowDefinitionVersionByNumberRow {
|
|
300
300
|
id: string;
|
|
301
|
-
|
|
301
|
+
definitionId: string;
|
|
302
302
|
organizationId: string;
|
|
303
303
|
version: number;
|
|
304
304
|
sourceDraftRevision: number;
|
|
305
305
|
name: string;
|
|
306
306
|
description: string;
|
|
307
|
-
|
|
307
|
+
graph: any;
|
|
308
308
|
inputSchema: any;
|
|
309
309
|
outputSchema: any;
|
|
310
310
|
metadata: any;
|
|
311
311
|
publishedByUserId: string;
|
|
312
312
|
publishedAt: Date;
|
|
313
313
|
}
|
|
314
|
-
export declare function
|
|
315
|
-
export declare const
|
|
316
|
-
export interface
|
|
314
|
+
export declare function getWorkflowDefinitionVersionByNumber(client: Client, args: GetWorkflowDefinitionVersionByNumberArgs): Promise<GetWorkflowDefinitionVersionByNumberRow | null>;
|
|
315
|
+
export declare const getWorkflowDefinitionVersionByIDQuery = "-- name: GetWorkflowDefinitionVersionByID :one\nSELECT id, definition_id, organization_id, version, source_draft_revision, name, description, graph, input_schema, output_schema, metadata, published_by_user_id, published_at FROM weave.workflow_definition_versions\nWHERE organization_id = $1\n AND id = $2";
|
|
316
|
+
export interface GetWorkflowDefinitionVersionByIDArgs {
|
|
317
317
|
organizationId: string;
|
|
318
318
|
versionId: string;
|
|
319
319
|
}
|
|
320
|
-
export interface
|
|
320
|
+
export interface GetWorkflowDefinitionVersionByIDRow {
|
|
321
321
|
id: string;
|
|
322
|
-
|
|
322
|
+
definitionId: string;
|
|
323
323
|
organizationId: string;
|
|
324
324
|
version: number;
|
|
325
325
|
sourceDraftRevision: number;
|
|
326
326
|
name: string;
|
|
327
327
|
description: string;
|
|
328
|
-
|
|
328
|
+
graph: any;
|
|
329
329
|
inputSchema: any;
|
|
330
330
|
outputSchema: any;
|
|
331
331
|
metadata: any;
|
|
332
332
|
publishedByUserId: string;
|
|
333
333
|
publishedAt: Date;
|
|
334
334
|
}
|
|
335
|
-
export declare function
|
|
336
|
-
export declare const
|
|
337
|
-
export interface
|
|
335
|
+
export declare function getWorkflowDefinitionVersionByID(client: Client, args: GetWorkflowDefinitionVersionByIDArgs): Promise<GetWorkflowDefinitionVersionByIDRow | null>;
|
|
336
|
+
export declare const listWorkflowDefinitionVersionsQuery = "-- name: ListWorkflowDefinitionVersions :many\nSELECT id, definition_id, organization_id, version, source_draft_revision, name, description, graph, input_schema, output_schema, metadata, published_by_user_id, published_at FROM weave.workflow_definition_versions\nWHERE organization_id = $1\n AND definition_id = $2\nORDER BY version DESC\nLIMIT $4 OFFSET $3";
|
|
337
|
+
export interface ListWorkflowDefinitionVersionsArgs {
|
|
338
338
|
organizationId: string;
|
|
339
|
-
|
|
339
|
+
definitionId: string;
|
|
340
340
|
pageOffset: string;
|
|
341
341
|
pageSize: string;
|
|
342
342
|
}
|
|
343
|
-
export interface
|
|
343
|
+
export interface ListWorkflowDefinitionVersionsRow {
|
|
344
344
|
id: string;
|
|
345
|
-
|
|
345
|
+
definitionId: string;
|
|
346
346
|
organizationId: string;
|
|
347
347
|
version: number;
|
|
348
348
|
sourceDraftRevision: number;
|
|
349
349
|
name: string;
|
|
350
350
|
description: string;
|
|
351
|
-
|
|
351
|
+
graph: any;
|
|
352
352
|
inputSchema: any;
|
|
353
353
|
outputSchema: any;
|
|
354
354
|
metadata: any;
|
|
355
355
|
publishedByUserId: string;
|
|
356
356
|
publishedAt: Date;
|
|
357
357
|
}
|
|
358
|
-
export declare function
|
|
359
|
-
export declare const createWorkflowRunQuery = "-- name: CreateWorkflowRun :one\nINSERT INTO weave.workflow_runs (\n id,\n organization_id,\n
|
|
358
|
+
export declare function listWorkflowDefinitionVersions(client: Client, args: ListWorkflowDefinitionVersionsArgs): Promise<ListWorkflowDefinitionVersionsRow[]>;
|
|
359
|
+
export declare const createWorkflowRunQuery = "-- name: CreateWorkflowRun :one\nINSERT INTO weave.workflow_runs (\n id,\n organization_id,\n workflow_definition_id,\n workflow_version_id,\n status,\n created_by_user_id,\n chat_session_id,\n input\n) VALUES (\n $1,\n $2,\n $3,\n $4,\n $5,\n $6,\n $7::uuid,\n $8\n)\nRETURNING id, organization_id, workflow_definition_id, workflow_version_id, status, created_by_user_id, chat_session_id, input, output, error_code, safe_error_message, created_at, started_at, finished_at";
|
|
360
360
|
export interface CreateWorkflowRunArgs {
|
|
361
361
|
id: string;
|
|
362
362
|
organizationId: string;
|
|
363
|
-
|
|
363
|
+
workflowDefinitionId: string;
|
|
364
364
|
workflowVersionId: string;
|
|
365
365
|
status: string;
|
|
366
366
|
createdByUserId: string;
|
|
@@ -370,7 +370,7 @@ export interface CreateWorkflowRunArgs {
|
|
|
370
370
|
export interface CreateWorkflowRunRow {
|
|
371
371
|
id: string;
|
|
372
372
|
organizationId: string;
|
|
373
|
-
|
|
373
|
+
workflowDefinitionId: string;
|
|
374
374
|
workflowVersionId: string;
|
|
375
375
|
status: string;
|
|
376
376
|
createdByUserId: string;
|
|
@@ -384,7 +384,7 @@ export interface CreateWorkflowRunRow {
|
|
|
384
384
|
finishedAt: Date | null;
|
|
385
385
|
}
|
|
386
386
|
export declare function createWorkflowRun(client: Client, args: CreateWorkflowRunArgs): Promise<CreateWorkflowRunRow | null>;
|
|
387
|
-
export declare const getWorkflowRunQuery = "-- name: GetWorkflowRun :one\nSELECT id, organization_id,
|
|
387
|
+
export declare const getWorkflowRunQuery = "-- name: GetWorkflowRun :one\nSELECT id, organization_id, workflow_definition_id, workflow_version_id, status, created_by_user_id, chat_session_id, input, output, error_code, safe_error_message, created_at, started_at, finished_at FROM weave.workflow_runs\nWHERE organization_id = $1\n AND id = $2";
|
|
388
388
|
export interface GetWorkflowRunArgs {
|
|
389
389
|
organizationId: string;
|
|
390
390
|
workflowRunId: string;
|
|
@@ -392,7 +392,7 @@ export interface GetWorkflowRunArgs {
|
|
|
392
392
|
export interface GetWorkflowRunRow {
|
|
393
393
|
id: string;
|
|
394
394
|
organizationId: string;
|
|
395
|
-
|
|
395
|
+
workflowDefinitionId: string;
|
|
396
396
|
workflowVersionId: string;
|
|
397
397
|
status: string;
|
|
398
398
|
createdByUserId: string;
|
|
@@ -406,10 +406,10 @@ export interface GetWorkflowRunRow {
|
|
|
406
406
|
finishedAt: Date | null;
|
|
407
407
|
}
|
|
408
408
|
export declare function getWorkflowRun(client: Client, args: GetWorkflowRunArgs): Promise<GetWorkflowRunRow | null>;
|
|
409
|
-
export declare const listWorkflowRunsQuery = "-- name: ListWorkflowRuns :many\nSELECT id, organization_id,
|
|
409
|
+
export declare const listWorkflowRunsQuery = "-- name: ListWorkflowRuns :many\nSELECT id, organization_id, workflow_definition_id, workflow_version_id, status, created_by_user_id, chat_session_id, input, output, error_code, safe_error_message, created_at, started_at, finished_at FROM weave.workflow_runs\nWHERE organization_id = $1\n AND (\n $2::uuid IS NULL\n OR workflow_definition_id = $2::uuid\n )\n AND (\n $3::text IS NULL\n OR status = $3::text\n )\nORDER BY created_at DESC\nLIMIT $5 OFFSET $4";
|
|
410
410
|
export interface ListWorkflowRunsArgs {
|
|
411
411
|
organizationId: string;
|
|
412
|
-
|
|
412
|
+
workflowDefinitionId: string | null;
|
|
413
413
|
status: string | null;
|
|
414
414
|
pageOffset: string;
|
|
415
415
|
pageSize: string;
|
|
@@ -417,7 +417,7 @@ export interface ListWorkflowRunsArgs {
|
|
|
417
417
|
export interface ListWorkflowRunsRow {
|
|
418
418
|
id: string;
|
|
419
419
|
organizationId: string;
|
|
420
|
-
|
|
420
|
+
workflowDefinitionId: string;
|
|
421
421
|
workflowVersionId: string;
|
|
422
422
|
status: string;
|
|
423
423
|
createdByUserId: string;
|
|
@@ -431,7 +431,7 @@ export interface ListWorkflowRunsRow {
|
|
|
431
431
|
finishedAt: Date | null;
|
|
432
432
|
}
|
|
433
433
|
export declare function listWorkflowRuns(client: Client, args: ListWorkflowRunsArgs): Promise<ListWorkflowRunsRow[]>;
|
|
434
|
-
export declare const updateWorkflowRunStatusQuery = "-- name: UpdateWorkflowRunStatus :one\nUPDATE weave.workflow_runs\nSET\n status = $1,\n output = $2,\n error_code = $3,\n safe_error_message = $4,\n started_at = COALESCE(started_at, $5::timestamptz),\n finished_at = $6::timestamptz\nWHERE organization_id = $7\n AND id = $8\nRETURNING id, organization_id,
|
|
434
|
+
export declare const updateWorkflowRunStatusQuery = "-- name: UpdateWorkflowRunStatus :one\nUPDATE weave.workflow_runs\nSET\n status = $1,\n output = $2,\n error_code = $3,\n safe_error_message = $4,\n started_at = COALESCE(started_at, $5::timestamptz),\n finished_at = $6::timestamptz\nWHERE organization_id = $7\n AND id = $8\nRETURNING id, organization_id, workflow_definition_id, workflow_version_id, status, created_by_user_id, chat_session_id, input, output, error_code, safe_error_message, created_at, started_at, finished_at";
|
|
435
435
|
export interface UpdateWorkflowRunStatusArgs {
|
|
436
436
|
status: string;
|
|
437
437
|
output: any;
|
|
@@ -445,7 +445,7 @@ export interface UpdateWorkflowRunStatusArgs {
|
|
|
445
445
|
export interface UpdateWorkflowRunStatusRow {
|
|
446
446
|
id: string;
|
|
447
447
|
organizationId: string;
|
|
448
|
-
|
|
448
|
+
workflowDefinitionId: string;
|
|
449
449
|
workflowVersionId: string;
|
|
450
450
|
status: string;
|
|
451
451
|
createdByUserId: string;
|