@vertesia/common 0.70.0 → 0.72.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 +4 -0
- package/lib/cjs/access-control.js.map +1 -1
- package/lib/cjs/apikey.js.map +1 -1
- package/lib/cjs/project.js +1 -2
- package/lib/cjs/project.js.map +1 -1
- package/lib/cjs/refs.js +1 -0
- package/lib/cjs/refs.js.map +1 -1
- package/lib/cjs/store/store.js.map +1 -1
- package/lib/cjs/store/workflow.js.map +1 -1
- package/lib/cjs/user.js +1 -2
- package/lib/cjs/user.js.map +1 -1
- package/lib/esm/access-control.js +4 -0
- package/lib/esm/access-control.js.map +1 -1
- package/lib/esm/apikey.js.map +1 -1
- package/lib/esm/project.js +1 -2
- package/lib/esm/project.js.map +1 -1
- package/lib/esm/refs.js +1 -0
- package/lib/esm/refs.js.map +1 -1
- package/lib/esm/store/store.js.map +1 -1
- package/lib/esm/store/workflow.js.map +1 -1
- package/lib/esm/user.js +0 -1
- package/lib/esm/user.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/types/Progress.d.ts +1 -0
- package/lib/types/access-control.d.ts +7 -2
- package/lib/types/access-control.d.ts.map +1 -1
- package/lib/types/analytics.d.ts +1 -0
- package/lib/types/apikey.d.ts +9 -3
- package/lib/types/apikey.d.ts.map +1 -1
- package/lib/types/apps.d.ts +8 -15
- package/lib/types/apps.d.ts.map +1 -1
- package/lib/types/common.d.ts +1 -0
- package/lib/types/environment.d.ts +1 -0
- package/lib/types/facets.d.ts +1 -0
- package/lib/types/group.d.ts +1 -0
- package/lib/types/index.d.ts +1 -0
- package/lib/types/integrations.d.ts +1 -0
- package/lib/types/interaction.d.ts +1 -0
- package/lib/types/json-schema.d.ts +1 -0
- package/lib/types/json.d.ts +1 -0
- package/lib/types/meters.d.ts +1 -0
- package/lib/types/model_utility.d.ts +1 -0
- package/lib/types/payload.d.ts +1 -0
- package/lib/types/project.d.ts +2 -2
- package/lib/types/project.d.ts.map +1 -1
- package/lib/types/prompt.d.ts +1 -0
- package/lib/types/query.d.ts +1 -0
- package/lib/types/refs.d.ts +2 -0
- package/lib/types/refs.d.ts.map +1 -1
- package/lib/types/runs.d.ts +1 -0
- package/lib/types/store/activity-catalog.d.ts +1 -0
- package/lib/types/store/agent.d.ts +1 -0
- package/lib/types/store/collections.d.ts +1 -0
- package/lib/types/store/common.d.ts +1 -0
- package/lib/types/store/doc-analyzer.d.ts +1 -0
- package/lib/types/store/dsl-workflow.d.ts +1 -0
- package/lib/types/store/index.d.ts +1 -0
- package/lib/types/store/object-types.d.ts +1 -0
- package/lib/types/store/signals.d.ts +1 -0
- package/lib/types/store/store.d.ts +7 -0
- package/lib/types/store/store.d.ts.map +1 -1
- package/lib/types/store/temporalio.d.ts +1 -0
- package/lib/types/store/workflow.d.ts +9 -0
- package/lib/types/store/workflow.d.ts.map +1 -1
- package/lib/types/tenant.d.ts +1 -0
- package/lib/types/training.d.ts +1 -0
- package/lib/types/transient-tokens.d.ts +3 -2
- package/lib/types/transient-tokens.d.ts.map +1 -1
- package/lib/types/user.d.ts +2 -2
- package/lib/types/user.d.ts.map +1 -1
- package/lib/types/utils/auth.d.ts +1 -0
- package/lib/types/utils/schemas.d.ts +1 -0
- package/lib/vertesia-common.js +1 -1
- package/lib/vertesia-common.js.map +1 -1
- package/package.json +1 -1
- package/src/access-control.ts +6 -1
- package/src/apikey.ts +9 -3
- package/src/apps.ts +7 -17
- package/src/project.ts +1 -2
- package/src/refs.ts +1 -0
- package/src/store/store.ts +7 -0
- package/src/store/workflow.ts +10 -0
- package/src/transient-tokens.ts +2 -2
- package/src/user.ts +1 -3
package/package.json
CHANGED
package/src/access-control.ts
CHANGED
|
@@ -41,6 +41,11 @@ export enum Permission {
|
|
|
41
41
|
|
|
42
42
|
workflow_run = "workflow:run",
|
|
43
43
|
workflow_admin = "workflow:admin",
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* whether the user has access to Sutdio App.
|
|
47
|
+
*/
|
|
48
|
+
studio_access = "studio:access",
|
|
44
49
|
}
|
|
45
50
|
|
|
46
51
|
export enum AccessControlResourceType {
|
|
@@ -81,7 +86,7 @@ export interface ACEUpdatePayload extends Partial<ACECreatePayload> {
|
|
|
81
86
|
|
|
82
87
|
export interface AcesQueryOptions {
|
|
83
88
|
|
|
84
|
-
level?: 'resource' | 'project' | 'account'
|
|
89
|
+
level?: 'resource' | 'project' | 'projects' | 'account'
|
|
85
90
|
resource?: string
|
|
86
91
|
principal?: string
|
|
87
92
|
role?: string
|
package/src/apikey.ts
CHANGED
|
@@ -58,10 +58,16 @@ export interface AuthTokenPayload {
|
|
|
58
58
|
project_roles?: ProjectRoles[];
|
|
59
59
|
|
|
60
60
|
/**
|
|
61
|
-
* The
|
|
62
|
-
* The key is the unique app name (kebab-case) and the value a list of roles.
|
|
61
|
+
* The app names enabled for this token. Defaults to an empty array if no apps are enabled.
|
|
63
62
|
*/
|
|
64
|
-
|
|
63
|
+
apps: string[];
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* The user ID (if any) attached to the token.
|
|
67
|
+
* This is set when the token is a user token or an agent token running as a user.
|
|
68
|
+
* Not set for impersonating tokens like project tokens.
|
|
69
|
+
*/
|
|
70
|
+
user_id?: string;
|
|
65
71
|
|
|
66
72
|
/** groups */
|
|
67
73
|
groups?: UserGroupRef[]; //group ids
|
package/src/apps.ts
CHANGED
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
|
|
2
|
-
export interface AppRef {
|
|
3
|
-
id: string;
|
|
4
|
-
name: string;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
2
|
export interface AppUIConfig {
|
|
8
3
|
/**
|
|
9
4
|
* The source URL of the app. The src can be a template which contain
|
|
@@ -12,10 +7,11 @@ export interface AppUIConfig {
|
|
|
12
7
|
*/
|
|
13
8
|
src: string;
|
|
14
9
|
/**
|
|
15
|
-
*
|
|
16
|
-
*
|
|
10
|
+
* The isolation strategy. If not specified it defaults to shadow
|
|
11
|
+
* - shadow - use Shadow DOM to fully isolate the plugin from the host.
|
|
12
|
+
* - css - use CSS processing (like prefixing or other isolation techniques). Ligther but plugins may conflict with the host
|
|
17
13
|
*/
|
|
18
|
-
|
|
14
|
+
isolation?: "shadow" | "css";
|
|
19
15
|
}
|
|
20
16
|
|
|
21
17
|
export interface AppManifestData {
|
|
@@ -25,18 +21,11 @@ export interface AppManifestData {
|
|
|
25
21
|
*/
|
|
26
22
|
name: string;
|
|
27
23
|
|
|
28
|
-
/**
|
|
29
|
-
* Which account is ownning the app.
|
|
30
|
-
* The property is defined only for customer apps.
|
|
31
|
-
* THis is always undefined for vertesia apps.
|
|
32
|
-
*/
|
|
33
|
-
account?: string;
|
|
34
|
-
|
|
35
24
|
/**
|
|
36
25
|
* Whether the app is private to the owner account.
|
|
37
26
|
* If true the account property must be defined.
|
|
38
27
|
*/
|
|
39
|
-
private
|
|
28
|
+
private: boolean;
|
|
40
29
|
|
|
41
30
|
title: string;
|
|
42
31
|
description: string;
|
|
@@ -47,7 +36,7 @@ export interface AppManifestData {
|
|
|
47
36
|
*/
|
|
48
37
|
icon?: string;
|
|
49
38
|
|
|
50
|
-
status: "beta" | "stable" | "deprecated"
|
|
39
|
+
status: "beta" | "stable" | "deprecated"
|
|
51
40
|
|
|
52
41
|
ui?: AppUIConfig
|
|
53
42
|
|
|
@@ -60,6 +49,7 @@ export interface AppManifestData {
|
|
|
60
49
|
}
|
|
61
50
|
export interface AppManifest extends AppManifestData {
|
|
62
51
|
id: string;
|
|
52
|
+
account: string;
|
|
63
53
|
created_at: string;
|
|
64
54
|
updated_at: string;
|
|
65
55
|
}
|
package/src/project.ts
CHANGED
|
@@ -17,8 +17,7 @@ export enum ProjectRoles {
|
|
|
17
17
|
reader = "reader", // can only read (browse)
|
|
18
18
|
billing = "billing", // can only manage billings
|
|
19
19
|
member = "member", // can only access, but no specific permissions
|
|
20
|
-
|
|
21
|
-
app_reader = "app_reader", // can access and perform read operations in the context of an app
|
|
20
|
+
app_member = "app_member", // used to mark an user have access to an application. does not provide any permission on its own
|
|
22
21
|
}
|
|
23
22
|
|
|
24
23
|
export function isRoleIncludedIn(role: string, includingRole: string) {
|
package/src/refs.ts
CHANGED
package/src/store/store.ts
CHANGED
|
@@ -81,6 +81,12 @@ export interface VideoMetadata extends TemporalMediaMetadata {
|
|
|
81
81
|
dimensions?: Dimensions;
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
+
export interface TextSection {
|
|
85
|
+
description: string; // the description of the section
|
|
86
|
+
first_line_index: number;
|
|
87
|
+
last_line_index: number;
|
|
88
|
+
}
|
|
89
|
+
|
|
84
90
|
export interface DocumentMetadata extends ContentMetadata {
|
|
85
91
|
type: "document";
|
|
86
92
|
page_count?: number;
|
|
@@ -93,6 +99,7 @@ export interface DocumentMetadata extends ContentMetadata {
|
|
|
93
99
|
zone_count: number;
|
|
94
100
|
needs_ocr_count?: number;
|
|
95
101
|
};
|
|
102
|
+
sections?: TextSection[]; // List of sections with descriptions and line indexes
|
|
96
103
|
}
|
|
97
104
|
|
|
98
105
|
export interface Transcript {
|
package/src/store/workflow.ts
CHANGED
|
@@ -66,6 +66,16 @@ export interface WorkflowExecutionBaseParams<T = Record<string, any>> {
|
|
|
66
66
|
run_id: string;
|
|
67
67
|
workflow_id: string;
|
|
68
68
|
};
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Whether to route resource intensive tasks to a heavy load queue. Managed by the application.
|
|
72
|
+
*/
|
|
73
|
+
_enable_heavy_task_routing?: boolean;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* The suffix to append to the task queue name for heavy load routing. Managed by the application.
|
|
77
|
+
*/
|
|
78
|
+
_heavy_task_queue_suffix?: string;
|
|
69
79
|
}
|
|
70
80
|
|
|
71
81
|
export interface WorkflowExecutionPayload<T = Record<string, any>> extends WorkflowExecutionBaseParams<T> {
|
package/src/transient-tokens.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ProjectRoles } from "./project.js";
|
|
1
|
+
import { ProjectRef, ProjectRoles } from "./project.js";
|
|
2
2
|
import { AccountRef } from "./user.js";
|
|
3
3
|
|
|
4
4
|
|
|
@@ -25,6 +25,6 @@ export interface UserInviteTokenData {
|
|
|
25
25
|
email: string;
|
|
26
26
|
role: ProjectRoles;
|
|
27
27
|
account: AccountRef;
|
|
28
|
-
|
|
28
|
+
project: ProjectRef;
|
|
29
29
|
invitedBy: { name: string, email: string; };
|
|
30
30
|
}
|
package/src/user.ts
CHANGED
|
@@ -81,12 +81,10 @@ export interface AccountRef {
|
|
|
81
81
|
}
|
|
82
82
|
export const AccountRefPopulate = "id name";
|
|
83
83
|
|
|
84
|
-
export const AppRefPopulate = "id name";
|
|
85
|
-
|
|
86
84
|
export interface InviteUserRequestPayload {
|
|
87
85
|
email: string;
|
|
88
86
|
role: ProjectRoles;
|
|
89
|
-
|
|
87
|
+
project: string;
|
|
90
88
|
}
|
|
91
89
|
|
|
92
90
|
export interface InviteUserResponsePayload {
|