@vertesia/common 0.70.0 → 0.71.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vertesia/common",
3
- "version": "0.70.0",
3
+ "version": "0.71.0",
4
4
  "type": "module",
5
5
  "types": "./lib/types/index.d.ts",
6
6
  "files": [
@@ -81,7 +81,7 @@ export interface ACEUpdatePayload extends Partial<ACECreatePayload> {
81
81
 
82
82
  export interface AcesQueryOptions {
83
83
 
84
- level?: 'resource' | 'project' | 'account'
84
+ level?: 'resource' | 'project' | 'projects' | 'account'
85
85
  resource?: string
86
86
  principal?: string
87
87
  role?: string
package/src/apikey.ts CHANGED
@@ -63,6 +63,13 @@ export interface AuthTokenPayload {
63
63
  */
64
64
  apps_roles: Record<string, string[]>,
65
65
 
66
+ /**
67
+ * The user ID (if any) attached to the token.
68
+ * This is set when the token is a user token or an agent token running as a user.
69
+ * Not set for impersonating tokens like project tokens.
70
+ */
71
+ user_id?: string;
72
+
66
73
  /** groups */
67
74
  groups?: UserGroupRef[]; //group ids
68
75
 
package/src/refs.ts CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  export enum ResolvableRefType {
4
4
  project = "Project",
5
+ projects = "Projects",
5
6
  environment = "Environment",
6
7
  user = "User",
7
8
  account = "Account",
@@ -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> {
@@ -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
- projects?: string[];
28
+ project: ProjectRef;
29
29
  invitedBy: { name: string, email: string; };
30
30
  }
package/src/user.ts CHANGED
@@ -86,7 +86,7 @@ export const AppRefPopulate = "id name";
86
86
  export interface InviteUserRequestPayload {
87
87
  email: string;
88
88
  role: ProjectRoles;
89
- projects?: string[];
89
+ project: string;
90
90
  }
91
91
 
92
92
  export interface InviteUserResponsePayload {