@vertesia/common 0.64.0 → 0.66.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/lib/cjs/access-control.js +16 -8
- package/lib/cjs/access-control.js.map +1 -1
- package/lib/cjs/apikey.js.map +1 -1
- package/lib/cjs/group.js +5 -0
- package/lib/cjs/group.js.map +1 -0
- package/lib/cjs/index.js +4 -2
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/interaction.js.map +1 -1
- package/lib/cjs/model_utility.js +6 -0
- package/lib/cjs/model_utility.js.map +1 -0
- package/lib/cjs/refs.js +1 -0
- package/lib/cjs/refs.js.map +1 -1
- package/lib/cjs/store/workflow.js.map +1 -1
- package/lib/cjs/user.js.map +1 -1
- package/lib/esm/access-control.js +15 -7
- package/lib/esm/access-control.js.map +1 -1
- package/lib/esm/apikey.js.map +1 -1
- package/lib/esm/group.js +2 -0
- package/lib/esm/group.js.map +1 -0
- package/lib/esm/index.js +4 -2
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/interaction.js.map +1 -1
- package/lib/esm/model_utility.js +2 -0
- package/lib/esm/model_utility.js.map +1 -0
- package/lib/esm/refs.js +1 -0
- package/lib/esm/refs.js.map +1 -1
- package/lib/esm/store/workflow.js.map +1 -1
- package/lib/esm/user.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/types/access-control.d.ts +12 -4
- package/lib/types/access-control.d.ts.map +1 -1
- package/lib/types/apikey.d.ts +3 -0
- package/lib/types/apikey.d.ts.map +1 -1
- package/lib/types/group.d.ts +21 -0
- package/lib/types/group.d.ts.map +1 -0
- package/lib/types/index.d.ts +4 -2
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/interaction.d.ts +10 -5
- package/lib/types/interaction.d.ts.map +1 -1
- package/lib/types/model_utility.d.ts +1 -0
- package/lib/types/model_utility.d.ts.map +1 -0
- package/lib/types/payload.d.ts +2 -3
- package/lib/types/payload.d.ts.map +1 -1
- package/lib/types/query.d.ts +6 -1
- package/lib/types/query.d.ts.map +1 -1
- package/lib/types/refs.d.ts +2 -1
- package/lib/types/refs.d.ts.map +1 -1
- package/lib/types/store/workflow.d.ts +67 -0
- package/lib/types/store/workflow.d.ts.map +1 -1
- package/lib/types/user.d.ts +1 -0
- package/lib/types/user.d.ts.map +1 -1
- package/lib/vertesia-common.js +1 -1
- package/lib/vertesia-common.js.map +1 -1
- package/package.json +2 -2
- package/src/access-control.ts +13 -3
- package/src/apikey.ts +6 -0
- package/src/group.ts +26 -0
- package/src/index.ts +5 -2
- package/src/interaction.ts +14 -5
- package/src/model_utility.ts +1 -0
- package/src/payload.ts +2 -4
- package/src/query.ts +6 -1
- package/src/refs.ts +2 -1
- package/src/store/workflow.ts +74 -0
- package/src/user.ts +3 -1
package/src/refs.ts
CHANGED
package/src/store/workflow.ts
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
import { JSONSchema4 } from "json-schema";
|
2
|
+
import { InteractionRef } from "../interaction.js";
|
3
|
+
|
1
4
|
export enum ContentEventName {
|
2
5
|
create = "create",
|
3
6
|
change_type = "change_type",
|
@@ -178,6 +181,16 @@ export interface ListWorkflowRunsPayload {
|
|
178
181
|
query?: string;
|
179
182
|
|
180
183
|
type?: string;
|
184
|
+
|
185
|
+
/**
|
186
|
+
* The maximum number of results to return per page.
|
187
|
+
*/
|
188
|
+
page_size?: number;
|
189
|
+
|
190
|
+
/**
|
191
|
+
* The page token for Temporal pagination.
|
192
|
+
*/
|
193
|
+
next_page_token?: string;
|
181
194
|
}
|
182
195
|
|
183
196
|
interface WorkflowRunEvent {
|
@@ -195,6 +208,31 @@ interface WorkflowRunEvent {
|
|
195
208
|
startedEventId?: string;
|
196
209
|
};
|
197
210
|
|
211
|
+
childWorkflow?: {
|
212
|
+
workflowId?: string,
|
213
|
+
workflowType?: string,
|
214
|
+
runId?: string,
|
215
|
+
scheduledEventId?: string,
|
216
|
+
startedEventId?: string,
|
217
|
+
input?: any,
|
218
|
+
result?: any,
|
219
|
+
};
|
220
|
+
|
221
|
+
signal?: {
|
222
|
+
direction: "receiving" | "sending";
|
223
|
+
signalName?: string,
|
224
|
+
input?: any,
|
225
|
+
sender?: {
|
226
|
+
workflowId?: string,
|
227
|
+
runId?: string
|
228
|
+
}
|
229
|
+
recipient?: {
|
230
|
+
workflowId?: string,
|
231
|
+
runId?: string
|
232
|
+
},
|
233
|
+
initiatedEventId?: string,
|
234
|
+
}
|
235
|
+
|
198
236
|
error?: {
|
199
237
|
message?: string;
|
200
238
|
source?: string;
|
@@ -219,7 +257,10 @@ export interface WorkflowRun {
|
|
219
257
|
run_id?: string;
|
220
258
|
workflow_id?: string;
|
221
259
|
initiated_by?: string;
|
260
|
+
interaction_name?: string;
|
261
|
+
input?: any;
|
222
262
|
result?: any;
|
263
|
+
error?:any,
|
223
264
|
raw?: any;
|
224
265
|
/**
|
225
266
|
* The Vertesia Workflow Type of this Workflow Run.
|
@@ -228,6 +269,10 @@ export interface WorkflowRun {
|
|
228
269
|
* - For non-DSL workflows, the vertesia_type is the name of the Temporal Workflow Type.
|
229
270
|
*/
|
230
271
|
vertesia_workflow_type?: string;
|
272
|
+
/**
|
273
|
+
* An interaction is used to start the agent, the data is stored on temporal "vars"
|
274
|
+
*/
|
275
|
+
interactions?: InteractionRef[];
|
231
276
|
}
|
232
277
|
|
233
278
|
export interface WorkflowRunWithDetails extends WorkflowRun {
|
@@ -235,9 +280,38 @@ export interface WorkflowRunWithDetails extends WorkflowRun {
|
|
235
280
|
memo?: {
|
236
281
|
[key: string]: any;
|
237
282
|
} | null;
|
283
|
+
pendingActivities?: {
|
284
|
+
activityId?: string;
|
285
|
+
activityType?: string;
|
286
|
+
attempt: number;
|
287
|
+
maximumAttempts: number;
|
288
|
+
lastFailure?: string;
|
289
|
+
lastStartedTime?: number;
|
290
|
+
}[];
|
238
291
|
}
|
239
292
|
export interface ListWorkflowRunsResponse {
|
240
293
|
runs: WorkflowRun[];
|
294
|
+
next_page_token?: string;
|
295
|
+
has_more?: boolean;
|
296
|
+
}
|
297
|
+
|
298
|
+
export interface ListWorkflowInteractionsResponse {
|
299
|
+
workflow_id: string,
|
300
|
+
run_id: string,
|
301
|
+
interaction: WorkflowInteraction
|
302
|
+
}
|
303
|
+
|
304
|
+
export interface WorkflowInteraction {
|
305
|
+
type: string,
|
306
|
+
model: string,
|
307
|
+
tools: [],
|
308
|
+
interaction: string,
|
309
|
+
environment: string,
|
310
|
+
prompt_data: JSONSchema4,
|
311
|
+
interactive: boolean,
|
312
|
+
interactionParamsSchema?: JSONSchema4
|
313
|
+
debug_mode?: boolean;
|
314
|
+
collection_id?: string;
|
241
315
|
}
|
242
316
|
|
243
317
|
export interface MultiDocumentsInteractionParams extends Omit<WorkflowExecutionPayload, "config"> {
|
package/src/user.ts
CHANGED
@@ -4,6 +4,7 @@ import { ProjectRoles } from "./project.js";
|
|
4
4
|
export interface UserWithAccounts extends User {
|
5
5
|
accounts: AccountRef[];
|
6
6
|
}
|
7
|
+
|
7
8
|
export interface User {
|
8
9
|
id: string;
|
9
10
|
externalId: string;
|
@@ -15,6 +16,7 @@ export interface User {
|
|
15
16
|
phone?: string;
|
16
17
|
sign_in_provider?: string;
|
17
18
|
last_selected_account?: string;
|
19
|
+
source?: 'firebase' | 'scim';
|
18
20
|
}
|
19
21
|
|
20
22
|
export interface UserRef {
|
@@ -33,7 +35,7 @@ export enum Datacenters {
|
|
33
35
|
|
34
36
|
export enum BillingMethod {
|
35
37
|
stripe = 'stripe',
|
36
|
-
invoice ='invoice'
|
38
|
+
invoice = 'invoice'
|
37
39
|
}
|
38
40
|
|
39
41
|
|