@breign/db-schemas 0.1.77 → 0.1.79

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.
@@ -7,8 +7,11 @@ export type Provider = {
7
7
  apiKey: string;
8
8
  endpoint?: string;
9
9
  createdAt: Date;
10
- organizationId: string;
10
+ /** Null pour un moteur plateforme, dont la clé appartient à Breign. */
11
+ organizationId: string | null;
11
12
  providerSource?: ProviderSource;
13
+ /** Moteur configuré par un superadmin et proposé aux organisations autorisées. */
14
+ isPlatform?: boolean;
12
15
  };
13
16
  export type ProviderSource = 'INTERNAL' | 'EXTERNAL';
14
17
  export type ProviderSimple = Pick<Provider, 'id' | 'name' | 'providerType' | 'models'>;
@@ -11,6 +11,8 @@ export type Organization = {
11
11
  };
12
12
  /** Configuration OCR de l'organisation. Absente ⇒ OCR désactivé. */
13
13
  ocr?: OrganizationOcrConfig | null;
14
+ /** L'organisation peut choisir les moteurs plateforme (clé Breign). */
15
+ allowPlatformEngines?: boolean;
14
16
  users: {
15
17
  id: string;
16
18
  role: 'admin' | 'user' | string;
@@ -16,6 +16,11 @@ export type MemberRef = {
16
16
  * `direct`, le ticket est créé tout de suite et la création reste annulable.
17
17
  */
18
18
  export type AgentTicketCreation = 'confirm' | 'direct';
19
+ /**
20
+ * Ce qui se passe quand un agent assigne un autre agent du projet à un ticket : `confirm`, l'agent
21
+ * assigné attend le feu vert d'un responsable humain ; `direct`, il se met au travail tout de suite.
22
+ */
23
+ export type AgentAssignment = 'confirm' | 'direct';
19
24
  /** `now` : les agents assignés commencent dès l'assignation ; `hold` : ils attendent un feu vert. */
20
25
  export type TicketStartMode = 'now' | 'hold';
21
26
  export type ProjectSettings = {
@@ -26,6 +31,8 @@ export type ProjectSettings = {
26
31
  * leur parle. Absent = activé.
27
32
  */
28
33
  agentsAutoWork?: boolean;
34
+ /** Assignation d'un agent par un autre agent. Absent = `confirm`. */
35
+ agentAssignment?: AgentAssignment;
29
36
  };
30
37
  export type Project = {
31
38
  id: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@breign/db-schemas",
3
- "version": "0.1.77",
3
+ "version": "0.1.79",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {
@@ -8,8 +8,11 @@ export type Provider = {
8
8
  apiKey: string;
9
9
  endpoint?: string; // TODO: mandatory ?
10
10
  createdAt: Date;
11
- organizationId: string;
11
+ /** Null pour un moteur plateforme, dont la clé appartient à Breign. */
12
+ organizationId: string | null;
12
13
  providerSource?: ProviderSource;
14
+ /** Moteur configuré par un superadmin et proposé aux organisations autorisées. */
15
+ isPlatform?: boolean;
13
16
  };
14
17
 
15
18
  export type ProviderSource = 'INTERNAL' | 'EXTERNAL';
@@ -12,6 +12,8 @@ export type Organization = {
12
12
  };
13
13
  /** Configuration OCR de l'organisation. Absente ⇒ OCR désactivé. */
14
14
  ocr?: OrganizationOcrConfig | null;
15
+ /** L'organisation peut choisir les moteurs plateforme (clé Breign). */
16
+ allowPlatformEngines?: boolean;
15
17
  users: {
16
18
  id: string;
17
19
  role: 'admin' | 'user' | string;
@@ -21,6 +21,12 @@ export type MemberRef = {
21
21
  */
22
22
  export type AgentTicketCreation = 'confirm' | 'direct';
23
23
 
24
+ /**
25
+ * Ce qui se passe quand un agent assigne un autre agent du projet à un ticket : `confirm`, l'agent
26
+ * assigné attend le feu vert d'un responsable humain ; `direct`, il se met au travail tout de suite.
27
+ */
28
+ export type AgentAssignment = 'confirm' | 'direct';
29
+
24
30
  /** `now` : les agents assignés commencent dès l'assignation ; `hold` : ils attendent un feu vert. */
25
31
  export type TicketStartMode = 'now' | 'hold';
26
32
 
@@ -32,6 +38,8 @@ export type ProjectSettings = {
32
38
  * leur parle. Absent = activé.
33
39
  */
34
40
  agentsAutoWork?: boolean;
41
+ /** Assignation d'un agent par un autre agent. Absent = `confirm`. */
42
+ agentAssignment?: AgentAssignment;
35
43
  };
36
44
 
37
45
  export type Project = {