@breign/db-schemas 0.1.59 → 0.1.61

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.
@@ -90,3 +90,11 @@ export type App = {
90
90
  maxInstances: number;
91
91
  };
92
92
  };
93
+ /** Commande websocket INPUT envoyée à l'app à l'arrivée d'un message utilisateur. */
94
+ export type AppInputNotification = {
95
+ type: 'INPUT';
96
+ messageId: string;
97
+ conversationId?: string;
98
+ text: string;
99
+ hasFillers: boolean;
100
+ };
@@ -106,6 +106,7 @@ export type ConversationMessage = {
106
106
  flowNodeRequirementsCheckReason?: string;
107
107
  flowNodeIterations?: number;
108
108
  timestamp: string;
109
+ hasFillers?: boolean;
109
110
  actions?: ToolAction[];
110
111
  attachments?: ConversationAttachment[];
111
112
  /**
@@ -9,6 +9,7 @@ export * from './file';
9
9
  export * from './flow';
10
10
  export * from './flow-editor';
11
11
  export * from './knowledge';
12
+ export * from './ocr';
12
13
  export * from './organization';
13
14
  export * from './pending-tool-call';
14
15
  export * from './permissions';
@@ -25,6 +25,7 @@ __exportStar(require("./file"), exports);
25
25
  __exportStar(require("./flow"), exports);
26
26
  __exportStar(require("./flow-editor"), exports);
27
27
  __exportStar(require("./knowledge"), exports);
28
+ __exportStar(require("./ocr"), exports);
28
29
  __exportStar(require("./organization"), exports);
29
30
  __exportStar(require("./pending-tool-call"), exports);
30
31
  __exportStar(require("./permissions"), exports);
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Modes d'OCR supportés par la document-api.
3
+ *
4
+ * `DISABLED` n'est jamais stocké : c'est une valeur du contrat d'écriture (le PUT
5
+ * de la configuration d'organisation), qui se traduit par la suppression de la
6
+ * ligne. L'absence de configuration vaut OCR désactivé — il n'y a aucun repli sur
7
+ * une configuration d'environnement.
8
+ */
9
+ export type OcrMode = 'DISABLED' | 'LLM' | 'MISTRAL_OCR_IMAGES' | 'MISTRAL_OCR_DOCUMENT';
10
+ /**
11
+ * Configuration OCR d'une organisation : le mode, et le modèle d'un de ses
12
+ * moteurs IA. Le modèle est désigné par son `modelId` côté fournisseur (et non
13
+ * par l'identifiant interne `ModelDefinition.id`), puisque c'est cette chaîne que
14
+ * la document-api envoie au fournisseur.
15
+ */
16
+ export type OrganizationOcrConfig = {
17
+ mode: Exclude<OcrMode, 'DISABLED'>;
18
+ providerId: string;
19
+ modelId: string;
20
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,4 +1,5 @@
1
1
  import { EngineOptions } from './engine';
2
+ import { OrganizationOcrConfig } from './ocr';
2
3
  export type Organization = {
3
4
  id: string;
4
5
  slug: string;
@@ -8,6 +9,8 @@ export type Organization = {
8
9
  model: string;
9
10
  options?: EngineOptions;
10
11
  };
12
+ /** Configuration OCR de l'organisation. Absente ⇒ OCR désactivé. */
13
+ ocr?: OrganizationOcrConfig | null;
11
14
  users: {
12
15
  id: string;
13
16
  role: 'admin' | 'user' | string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@breign/db-schemas",
3
- "version": "0.1.59",
3
+ "version": "0.1.61",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {
package/src/types/app.ts CHANGED
@@ -84,3 +84,12 @@ export type App = {
84
84
  maxInstances: number;
85
85
  };
86
86
  };
87
+
88
+ /** Commande websocket INPUT envoyée à l'app à l'arrivée d'un message utilisateur. */
89
+ export type AppInputNotification = {
90
+ type: 'INPUT';
91
+ messageId: string;
92
+ conversationId?: string;
93
+ text: string;
94
+ hasFillers: boolean;
95
+ };
@@ -112,6 +112,7 @@ export type ConversationMessage = {
112
112
  flowNodeRequirementsCheckReason?: string;
113
113
  flowNodeIterations?: number;
114
114
  timestamp: string;
115
+ hasFillers?: boolean;
115
116
  actions?: ToolAction[];
116
117
  attachments?: ConversationAttachment[];
117
118
  /**
@@ -9,6 +9,7 @@ export * from './file';
9
9
  export * from './flow';
10
10
  export * from './flow-editor';
11
11
  export * from './knowledge';
12
+ export * from './ocr';
12
13
  export * from './organization';
13
14
  export * from './pending-tool-call';
14
15
  export * from './permissions';
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Modes d'OCR supportés par la document-api.
3
+ *
4
+ * `DISABLED` n'est jamais stocké : c'est une valeur du contrat d'écriture (le PUT
5
+ * de la configuration d'organisation), qui se traduit par la suppression de la
6
+ * ligne. L'absence de configuration vaut OCR désactivé — il n'y a aucun repli sur
7
+ * une configuration d'environnement.
8
+ */
9
+ export type OcrMode = 'DISABLED' | 'LLM' | 'MISTRAL_OCR_IMAGES' | 'MISTRAL_OCR_DOCUMENT';
10
+
11
+ /**
12
+ * Configuration OCR d'une organisation : le mode, et le modèle d'un de ses
13
+ * moteurs IA. Le modèle est désigné par son `modelId` côté fournisseur (et non
14
+ * par l'identifiant interne `ModelDefinition.id`), puisque c'est cette chaîne que
15
+ * la document-api envoie au fournisseur.
16
+ */
17
+ export type OrganizationOcrConfig = {
18
+ mode: Exclude<OcrMode, 'DISABLED'>;
19
+ providerId: string;
20
+ modelId: string;
21
+ };
@@ -1,4 +1,5 @@
1
1
  import { EngineOptions } from './engine';
2
+ import { OrganizationOcrConfig } from './ocr';
2
3
 
3
4
  export type Organization = {
4
5
  id: string;
@@ -9,6 +10,8 @@ export type Organization = {
9
10
  model: string;
10
11
  options?: EngineOptions;
11
12
  };
13
+ /** Configuration OCR de l'organisation. Absente ⇒ OCR désactivé. */
14
+ ocr?: OrganizationOcrConfig | null;
12
15
  users: {
13
16
  id: string;
14
17
  role: 'admin' | 'user' | string;