@breign/db-schemas 0.1.89 → 0.1.91

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.
@@ -13,12 +13,14 @@ export type ToolPermissionKey = 'tool.read' | 'tool.create' | 'tool.update' | 't
13
13
  export type FlowPermissionKey = 'flow.read';
14
14
  export type AiGatewayPermissionKey = 'aiGateway.use' | 'aiGateway.metrics';
15
15
  export type MetricsPermissionKey = 'metrics.read';
16
- export type PermissionKey = OrganizationPermissionKey | AgentPermissionKey | AppPermissionKey | KnowledgePermissionKey | SkillPermissionKey | ModerationPermissionKey | UserPermissionKey | AccessPermissionKey | EnginePermissionKey | ToolPermissionKey | FlowPermissionKey | AiGatewayPermissionKey | MetricsPermissionKey;
17
- export declare const ALL_PERMISSION_KEYS: readonly ["org.read", "agent.read", "agent.update", "agent.delete", "agent.chat", "app.read", "knowledge.read", "knowledge.create", "knowledge.update", "knowledge.delete", "knowledge.file.add", "knowledge.file.delete", "knowledge.file.download", "skill.read", "skill.create", "skill.update", "skill.delete", "skill.file.add", "skill.file.delete", "moderation.read", "moderation.create", "moderation.update", "moderation.delete", "user.read", "user.create", "user.update", "user.delete", "access.manage", "engine.read", "engine.create", "engine.update", "engine.delete", "tool.read", "tool.create", "tool.update", "tool.delete", "flow.read", "aiGateway.use", "aiGateway.metrics", "metrics.read"];
16
+ /** Nœuds d'exécution de l'organisation, groupes de nœuds, leur file et leurs environnements. */
17
+ export type ExecutionPermissionKey = 'executionNode.read' | 'executionNode.manage' | 'nodeGroup.read' | 'nodeGroup.create' | 'nodeGroup.update' | 'nodeGroup.delete' | 'nodeGroup.execution.manage' | 'nodeGroup.environment.release';
18
+ export type PermissionKey = OrganizationPermissionKey | AgentPermissionKey | AppPermissionKey | KnowledgePermissionKey | SkillPermissionKey | ModerationPermissionKey | UserPermissionKey | AccessPermissionKey | EnginePermissionKey | ToolPermissionKey | FlowPermissionKey | AiGatewayPermissionKey | MetricsPermissionKey | ExecutionPermissionKey;
19
+ export declare const ALL_PERMISSION_KEYS: readonly ["org.read", "agent.read", "agent.update", "agent.delete", "agent.chat", "app.read", "knowledge.read", "knowledge.create", "knowledge.update", "knowledge.delete", "knowledge.file.add", "knowledge.file.delete", "knowledge.file.download", "skill.read", "skill.create", "skill.update", "skill.delete", "skill.file.add", "skill.file.delete", "moderation.read", "moderation.create", "moderation.update", "moderation.delete", "user.read", "user.create", "user.update", "user.delete", "access.manage", "engine.read", "engine.create", "engine.update", "engine.delete", "tool.read", "tool.create", "tool.update", "tool.delete", "flow.read", "aiGateway.use", "aiGateway.metrics", "metrics.read", "executionNode.read", "executionNode.manage", "nodeGroup.read", "nodeGroup.create", "nodeGroup.update", "nodeGroup.delete", "nodeGroup.execution.manage", "nodeGroup.environment.release"];
18
20
  /** Seed / défaut : accès complet = toutes les clés connues. */
19
- export declare const DEFAULT_ADMIN_PERMISSION_KEYS: readonly ["org.read", "agent.read", "agent.update", "agent.delete", "agent.chat", "app.read", "knowledge.read", "knowledge.create", "knowledge.update", "knowledge.delete", "knowledge.file.add", "knowledge.file.delete", "knowledge.file.download", "skill.read", "skill.create", "skill.update", "skill.delete", "skill.file.add", "skill.file.delete", "moderation.read", "moderation.create", "moderation.update", "moderation.delete", "user.read", "user.create", "user.update", "user.delete", "access.manage", "engine.read", "engine.create", "engine.update", "engine.delete", "tool.read", "tool.create", "tool.update", "tool.delete", "flow.read", "aiGateway.use", "aiGateway.metrics", "metrics.read"];
21
+ export declare const DEFAULT_ADMIN_PERMISSION_KEYS: readonly ["org.read", "agent.read", "agent.update", "agent.delete", "agent.chat", "app.read", "knowledge.read", "knowledge.create", "knowledge.update", "knowledge.delete", "knowledge.file.add", "knowledge.file.delete", "knowledge.file.download", "skill.read", "skill.create", "skill.update", "skill.delete", "skill.file.add", "skill.file.delete", "moderation.read", "moderation.create", "moderation.update", "moderation.delete", "user.read", "user.create", "user.update", "user.delete", "access.manage", "engine.read", "engine.create", "engine.update", "engine.delete", "tool.read", "tool.create", "tool.update", "tool.delete", "flow.read", "aiGateway.use", "aiGateway.metrics", "metrics.read", "executionNode.read", "executionNode.manage", "nodeGroup.read", "nodeGroup.create", "nodeGroup.update", "nodeGroup.delete", "nodeGroup.execution.manage", "nodeGroup.environment.release"];
20
22
  /** Seed / défaut : membre standard (lecture + chat). */
21
- export declare const DEFAULT_USER_PERMISSION_KEYS: readonly ["org.read", "agent.read", "agent.chat", "app.read", "knowledge.read", "skill.read", "moderation.read", "engine.read", "tool.read", "flow.read"];
23
+ export declare const DEFAULT_USER_PERMISSION_KEYS: readonly ["org.read", "agent.read", "agent.chat", "app.read", "knowledge.read", "skill.read", "moderation.read", "engine.read", "tool.read", "flow.read", "nodeGroup.read"];
22
24
  export type PermissionEntry = {
23
25
  permission: PermissionKey;
24
26
  allowed: boolean;
@@ -42,6 +42,14 @@ exports.ALL_PERMISSION_KEYS = [
42
42
  'aiGateway.use',
43
43
  'aiGateway.metrics',
44
44
  'metrics.read',
45
+ 'executionNode.read',
46
+ 'executionNode.manage',
47
+ 'nodeGroup.read',
48
+ 'nodeGroup.create',
49
+ 'nodeGroup.update',
50
+ 'nodeGroup.delete',
51
+ 'nodeGroup.execution.manage',
52
+ 'nodeGroup.environment.release',
45
53
  ];
46
54
  /** Seed / défaut : accès complet = toutes les clés connues. */
47
55
  exports.DEFAULT_ADMIN_PERMISSION_KEYS = exports.ALL_PERMISSION_KEYS;
@@ -57,4 +65,5 @@ exports.DEFAULT_USER_PERMISSION_KEYS = [
57
65
  'engine.read',
58
66
  'tool.read',
59
67
  'flow.read',
68
+ 'nodeGroup.read',
60
69
  ];
@@ -37,7 +37,10 @@ export type ProjectSettings = {
37
37
  export type Project = {
38
38
  id: string;
39
39
  organizationId: string;
40
- /** Préfixe des identifiants de tickets (BRN donne BRN-142), unique dans l'organisation. */
40
+ /**
41
+ * Préfixe des identifiants de tickets (BRN donne BRN-142), unique dans l'organisation, sauf `PERSO`
42
+ * que partagent tous les espaces personnels.
43
+ */
41
44
  key: string;
42
45
  name: string;
43
46
  description: string | null;
@@ -47,6 +50,11 @@ export type Project = {
47
50
  /** Dernier numéro de ticket attribué ; incrémenté à chaque création. */
48
51
  ticketSeq: number;
49
52
  archivedAt: string | null;
53
+ /**
54
+ * Espace de travail personnel : l'utilisateur à qui il appartient, seul humain à le voir. Un par
55
+ * utilisateur et par organisation, clé `PERSO`. Absent ou null pour un espace partagé.
56
+ */
57
+ personalUserId?: string | null;
50
58
  createdBy: ActorRef;
51
59
  createdAt: string;
52
60
  updatedAt: string;
@@ -6,7 +6,7 @@ export type Ticket = {
6
6
  organizationId: string;
7
7
  projectId: string;
8
8
  number: number;
9
- /** Clé du projet suivie du numéro (BRN-142), unique dans l'organisation. */
9
+ /** Clé du projet suivie du numéro (BRN-142), unique dans l'organisation hors espaces personnels (PERSO-3). */
10
10
  key: string;
11
11
  title: string;
12
12
  description: string | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@breign/db-schemas",
3
- "version": "0.1.89",
3
+ "version": "0.1.91",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {
@@ -60,6 +60,17 @@ export type AiGatewayPermissionKey = 'aiGateway.use' | 'aiGateway.metrics';
60
60
 
61
61
  export type MetricsPermissionKey = 'metrics.read';
62
62
 
63
+ /** Nœuds d'exécution de l'organisation, groupes de nœuds, leur file et leurs environnements. */
64
+ export type ExecutionPermissionKey =
65
+ | 'executionNode.read'
66
+ | 'executionNode.manage'
67
+ | 'nodeGroup.read'
68
+ | 'nodeGroup.create'
69
+ | 'nodeGroup.update'
70
+ | 'nodeGroup.delete'
71
+ | 'nodeGroup.execution.manage'
72
+ | 'nodeGroup.environment.release';
73
+
63
74
  export type PermissionKey =
64
75
  | OrganizationPermissionKey
65
76
  | AgentPermissionKey
@@ -73,7 +84,8 @@ export type PermissionKey =
73
84
  | ToolPermissionKey
74
85
  | FlowPermissionKey
75
86
  | AiGatewayPermissionKey
76
- | MetricsPermissionKey;
87
+ | MetricsPermissionKey
88
+ | ExecutionPermissionKey;
77
89
 
78
90
  export const ALL_PERMISSION_KEYS = [
79
91
  'org.read',
@@ -116,6 +128,14 @@ export const ALL_PERMISSION_KEYS = [
116
128
  'aiGateway.use',
117
129
  'aiGateway.metrics',
118
130
  'metrics.read',
131
+ 'executionNode.read',
132
+ 'executionNode.manage',
133
+ 'nodeGroup.read',
134
+ 'nodeGroup.create',
135
+ 'nodeGroup.update',
136
+ 'nodeGroup.delete',
137
+ 'nodeGroup.execution.manage',
138
+ 'nodeGroup.environment.release',
119
139
  ] as const satisfies readonly PermissionKey[];
120
140
 
121
141
  /** Seed / défaut : accès complet = toutes les clés connues. */
@@ -133,6 +153,7 @@ export const DEFAULT_USER_PERMISSION_KEYS = [
133
153
  'engine.read',
134
154
  'tool.read',
135
155
  'flow.read',
156
+ 'nodeGroup.read',
136
157
  ] as const satisfies readonly PermissionKey[];
137
158
 
138
159
  export type PermissionEntry = {
@@ -45,7 +45,10 @@ export type ProjectSettings = {
45
45
  export type Project = {
46
46
  id: string;
47
47
  organizationId: string;
48
- /** Préfixe des identifiants de tickets (BRN donne BRN-142), unique dans l'organisation. */
48
+ /**
49
+ * Préfixe des identifiants de tickets (BRN donne BRN-142), unique dans l'organisation, sauf `PERSO`
50
+ * que partagent tous les espaces personnels.
51
+ */
49
52
  key: string;
50
53
  name: string;
51
54
  description: string | null;
@@ -55,6 +58,11 @@ export type Project = {
55
58
  /** Dernier numéro de ticket attribué ; incrémenté à chaque création. */
56
59
  ticketSeq: number;
57
60
  archivedAt: string | null;
61
+ /**
62
+ * Espace de travail personnel : l'utilisateur à qui il appartient, seul humain à le voir. Un par
63
+ * utilisateur et par organisation, clé `PERSO`. Absent ou null pour un espace partagé.
64
+ */
65
+ personalUserId?: string | null;
58
66
  createdBy: ActorRef;
59
67
  createdAt: string;
60
68
  updatedAt: string;
@@ -15,7 +15,7 @@ export type Ticket = {
15
15
  organizationId: string;
16
16
  projectId: string;
17
17
  number: number;
18
- /** Clé du projet suivie du numéro (BRN-142), unique dans l'organisation. */
18
+ /** Clé du projet suivie du numéro (BRN-142), unique dans l'organisation hors espaces personnels (PERSO-3). */
19
19
  key: string;
20
20
  title: string;
21
21
  description: string | null;