@breign/client 1.0.144 → 1.0.145

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.
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { CreateToolApprovalRequestUio, DeleteOrganizationUser200ResponseUio, EditToolApprovalRequestUio, OrganizationEngineUio, OrganizationMemberUio, OrganizationUio, OrganizationUserInviteRequestUio, OrganizationUserInviteResponseUio, RoleCreateRequestUio, RoleUio, ToolApprovalUio, ToolApprovalsResponseUio } from '../models/index';
13
+ import type { CreateToolApprovalRequestUio, DeleteOrganizationUser200ResponseUio, EditToolApprovalRequestUio, OrganizationEngineUio, OrganizationMemberUio, OrganizationOcrConfigUio, OrganizationOcrConfigUpdateRequestUio, OrganizationUio, OrganizationUserInviteRequestUio, OrganizationUserInviteResponseUio, RoleCreateRequestUio, RoleUio, ToolApprovalUio, ToolApprovalsResponseUio } from '../models/index';
14
14
  export interface CreateOrganizationRoleRequest {
15
15
  organizationId: string;
16
16
  roleCreateRequestUio: RoleCreateRequestUio;
@@ -44,6 +44,9 @@ export interface GetOrganizationBySlugRequest {
44
44
  export interface GetOrganizationEngineRequest {
45
45
  organizationId: string;
46
46
  }
47
+ export interface GetOrganizationOcrConfigRequest {
48
+ organizationId: string;
49
+ }
47
50
  export interface InviteOrganizationUserRequest {
48
51
  organizationId: string;
49
52
  organizationUserInviteRequestUio: OrganizationUserInviteRequestUio;
@@ -62,6 +65,10 @@ export interface RevokeToolApprovalRequest {
62
65
  organizationId: string;
63
66
  approvalId: string;
64
67
  }
68
+ export interface UpdateOrganizationOcrConfigRequest {
69
+ organizationId: string;
70
+ organizationOcrConfigUpdateRequestUio: OrganizationOcrConfigUpdateRequestUio;
71
+ }
65
72
  export interface UpdateOrganizationRoleRequest {
66
73
  organizationId: string;
67
74
  roleId: string;
@@ -159,6 +166,16 @@ export declare class OrganizationsApi extends runtime.BaseAPI {
159
166
  * Get an organization engine configuration
160
167
  */
161
168
  getOrganizationEngine(organizationId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OrganizationEngineUio>;
169
+ /**
170
+ * Retourne la configuration OCR (mode, providerId, modelId) de l\'organisation. Une organisation sans configuration renvoie une configuration désactivée (mode DISABLED) : l\'absence de configuration vaut OCR désactivé.
171
+ * Get an organization OCR configuration
172
+ */
173
+ getOrganizationOcrConfigRaw(requestParameters: GetOrganizationOcrConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OrganizationOcrConfigUio>>;
174
+ /**
175
+ * Retourne la configuration OCR (mode, providerId, modelId) de l\'organisation. Une organisation sans configuration renvoie une configuration désactivée (mode DISABLED) : l\'absence de configuration vaut OCR désactivé.
176
+ * Get an organization OCR configuration
177
+ */
178
+ getOrganizationOcrConfig(organizationId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OrganizationOcrConfigUio>;
162
179
  /**
163
180
  * Invite a user to an organization
164
181
  */
@@ -215,6 +232,16 @@ export declare class OrganizationsApi extends runtime.BaseAPI {
215
232
  * Revoke an approval
216
233
  */
217
234
  revokeToolApproval(organizationId: string, approvalId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
235
+ /**
236
+ * Remplace la configuration OCR de l\'organisation. `mode: DISABLED` supprime la configuration. Sinon `providerId` et `modelId` sont requis, le moteur IA doit appartenir à l\'organisation, et le modèle doit porter la capacité attendue par le mode (`hasVision` pour LLM, `hasOcr` pour les modes MISTRAL_OCR_*).
237
+ * Set an organization OCR configuration
238
+ */
239
+ updateOrganizationOcrConfigRaw(requestParameters: UpdateOrganizationOcrConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OrganizationOcrConfigUio>>;
240
+ /**
241
+ * Remplace la configuration OCR de l\'organisation. `mode: DISABLED` supprime la configuration. Sinon `providerId` et `modelId` sont requis, le moteur IA doit appartenir à l\'organisation, et le modèle doit porter la capacité attendue par le mode (`hasVision` pour LLM, `hasOcr` pour les modes MISTRAL_OCR_*).
242
+ * Set an organization OCR configuration
243
+ */
244
+ updateOrganizationOcrConfig(organizationId: string, organizationOcrConfigUpdateRequestUio: OrganizationOcrConfigUpdateRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OrganizationOcrConfigUio>;
218
245
  /**
219
246
  * Updates an existing agent role in the specified organization
220
247
  * Update a role in an organization
@@ -334,6 +334,35 @@ class OrganizationsApi extends runtime.BaseAPI {
334
334
  const response = await this.getOrganizationEngineRaw({ organizationId: organizationId }, initOverrides);
335
335
  return await response.value();
336
336
  }
337
+ /**
338
+ * Retourne la configuration OCR (mode, providerId, modelId) de l\'organisation. Une organisation sans configuration renvoie une configuration désactivée (mode DISABLED) : l\'absence de configuration vaut OCR désactivé.
339
+ * Get an organization OCR configuration
340
+ */
341
+ async getOrganizationOcrConfigRaw(requestParameters, initOverrides) {
342
+ if (requestParameters['organizationId'] == null) {
343
+ throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling getOrganizationOcrConfig().');
344
+ }
345
+ const queryParameters = {};
346
+ const headerParameters = {};
347
+ if (this.configuration && this.configuration.apiKey) {
348
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
349
+ }
350
+ const response = await this.request({
351
+ path: `/organizations/{organizationId}/ocr`.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId']))),
352
+ method: 'GET',
353
+ headers: headerParameters,
354
+ query: queryParameters,
355
+ }, initOverrides);
356
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.OrganizationOcrConfigUioFromJSON)(jsonValue));
357
+ }
358
+ /**
359
+ * Retourne la configuration OCR (mode, providerId, modelId) de l\'organisation. Une organisation sans configuration renvoie une configuration désactivée (mode DISABLED) : l\'absence de configuration vaut OCR désactivé.
360
+ * Get an organization OCR configuration
361
+ */
362
+ async getOrganizationOcrConfig(organizationId, initOverrides) {
363
+ const response = await this.getOrganizationOcrConfigRaw({ organizationId: organizationId }, initOverrides);
364
+ return await response.value();
365
+ }
337
366
  /**
338
367
  * Invite a user to an organization
339
368
  */
@@ -511,6 +540,40 @@ class OrganizationsApi extends runtime.BaseAPI {
511
540
  async revokeToolApproval(organizationId, approvalId, initOverrides) {
512
541
  await this.revokeToolApprovalRaw({ organizationId: organizationId, approvalId: approvalId }, initOverrides);
513
542
  }
543
+ /**
544
+ * Remplace la configuration OCR de l\'organisation. `mode: DISABLED` supprime la configuration. Sinon `providerId` et `modelId` sont requis, le moteur IA doit appartenir à l\'organisation, et le modèle doit porter la capacité attendue par le mode (`hasVision` pour LLM, `hasOcr` pour les modes MISTRAL_OCR_*).
545
+ * Set an organization OCR configuration
546
+ */
547
+ async updateOrganizationOcrConfigRaw(requestParameters, initOverrides) {
548
+ if (requestParameters['organizationId'] == null) {
549
+ throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling updateOrganizationOcrConfig().');
550
+ }
551
+ if (requestParameters['organizationOcrConfigUpdateRequestUio'] == null) {
552
+ throw new runtime.RequiredError('organizationOcrConfigUpdateRequestUio', 'Required parameter "organizationOcrConfigUpdateRequestUio" was null or undefined when calling updateOrganizationOcrConfig().');
553
+ }
554
+ const queryParameters = {};
555
+ const headerParameters = {};
556
+ headerParameters['Content-Type'] = 'application/json';
557
+ if (this.configuration && this.configuration.apiKey) {
558
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
559
+ }
560
+ const response = await this.request({
561
+ path: `/organizations/{organizationId}/ocr`.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId']))),
562
+ method: 'PUT',
563
+ headers: headerParameters,
564
+ query: queryParameters,
565
+ body: (0, index_1.OrganizationOcrConfigUpdateRequestUioToJSON)(requestParameters['organizationOcrConfigUpdateRequestUio']),
566
+ }, initOverrides);
567
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.OrganizationOcrConfigUioFromJSON)(jsonValue));
568
+ }
569
+ /**
570
+ * Remplace la configuration OCR de l\'organisation. `mode: DISABLED` supprime la configuration. Sinon `providerId` et `modelId` sont requis, le moteur IA doit appartenir à l\'organisation, et le modèle doit porter la capacité attendue par le mode (`hasVision` pour LLM, `hasOcr` pour les modes MISTRAL_OCR_*).
571
+ * Set an organization OCR configuration
572
+ */
573
+ async updateOrganizationOcrConfig(organizationId, organizationOcrConfigUpdateRequestUio, initOverrides) {
574
+ const response = await this.updateOrganizationOcrConfigRaw({ organizationId: organizationId, organizationOcrConfigUpdateRequestUio: organizationOcrConfigUpdateRequestUio }, initOverrides);
575
+ return await response.value();
576
+ }
514
577
  /**
515
578
  * Updates an existing agent role in the specified organization
516
579
  * Update a role in an organization
@@ -63,6 +63,12 @@ export interface ModelDefinitionUio {
63
63
  * @memberof ModelDefinitionUio
64
64
  */
65
65
  hasSpeechToText?: boolean;
66
+ /**
67
+ * Le modèle expose une API d'OCR dédiée (ex. mistral-ocr-latest). Distinct de `hasVision`, qui est la capacité utilisée par le mode OCR `LLM`.
68
+ * @type {boolean}
69
+ * @memberof ModelDefinitionUio
70
+ */
71
+ hasOcr?: boolean;
66
72
  /**
67
73
  *
68
74
  * @type {number}
@@ -44,6 +44,7 @@ function ModelDefinitionUioFromJSONTyped(json, ignoreDiscriminator) {
44
44
  'hasReasoning': json['hasReasoning'] == null ? undefined : json['hasReasoning'],
45
45
  'hasEmbedding': json['hasEmbedding'] == null ? undefined : json['hasEmbedding'],
46
46
  'hasSpeechToText': json['hasSpeechToText'] == null ? undefined : json['hasSpeechToText'],
47
+ 'hasOcr': json['hasOcr'] == null ? undefined : json['hasOcr'],
47
48
  'maxTokens': json['maxTokens'] == null ? undefined : json['maxTokens'],
48
49
  'options': json['options'] == null ? undefined : json['options'],
49
50
  };
@@ -64,6 +65,7 @@ function ModelDefinitionUioToJSONTyped(value, ignoreDiscriminator = false) {
64
65
  'hasReasoning': value['hasReasoning'],
65
66
  'hasEmbedding': value['hasEmbedding'],
66
67
  'hasSpeechToText': value['hasSpeechToText'],
68
+ 'hasOcr': value['hasOcr'],
67
69
  'maxTokens': value['maxTokens'],
68
70
  'options': value['options'],
69
71
  };
@@ -0,0 +1,27 @@
1
+ /**
2
+ * brain-client
3
+ * Api ands models for brain-app and brain-app
4
+ *
5
+ * The version of the OpenAPI document: 0.0.0-SNAPSHOT
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ * Mode d'extraction de texte des documents, configuré par organisation. DISABLED : aucun OCR. LLM : relecture page par page par un modèle de vision. MISTRAL_OCR_IMAGES / MISTRAL_OCR_DOCUMENT : OCR dédié Mistral, page par page ou sur le document entier.
14
+ * @export
15
+ */
16
+ export declare const OcrModeUio: {
17
+ readonly Disabled: "DISABLED";
18
+ readonly Llm: "LLM";
19
+ readonly MistralOcrImages: "MISTRAL_OCR_IMAGES";
20
+ readonly MistralOcrDocument: "MISTRAL_OCR_DOCUMENT";
21
+ };
22
+ export type OcrModeUio = typeof OcrModeUio[keyof typeof OcrModeUio];
23
+ export declare function instanceOfOcrModeUio(value: any): boolean;
24
+ export declare function OcrModeUioFromJSON(json: any): OcrModeUio;
25
+ export declare function OcrModeUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): OcrModeUio;
26
+ export declare function OcrModeUioToJSON(value?: OcrModeUio | null): any;
27
+ export declare function OcrModeUioToJSONTyped(value: any, ignoreDiscriminator: boolean): OcrModeUio;
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * brain-client
6
+ * Api ands models for brain-app and brain-app
7
+ *
8
+ * The version of the OpenAPI document: 0.0.0-SNAPSHOT
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.OcrModeUio = void 0;
17
+ exports.instanceOfOcrModeUio = instanceOfOcrModeUio;
18
+ exports.OcrModeUioFromJSON = OcrModeUioFromJSON;
19
+ exports.OcrModeUioFromJSONTyped = OcrModeUioFromJSONTyped;
20
+ exports.OcrModeUioToJSON = OcrModeUioToJSON;
21
+ exports.OcrModeUioToJSONTyped = OcrModeUioToJSONTyped;
22
+ /**
23
+ * Mode d'extraction de texte des documents, configuré par organisation. DISABLED : aucun OCR. LLM : relecture page par page par un modèle de vision. MISTRAL_OCR_IMAGES / MISTRAL_OCR_DOCUMENT : OCR dédié Mistral, page par page ou sur le document entier.
24
+ * @export
25
+ */
26
+ exports.OcrModeUio = {
27
+ Disabled: 'DISABLED',
28
+ Llm: 'LLM',
29
+ MistralOcrImages: 'MISTRAL_OCR_IMAGES',
30
+ MistralOcrDocument: 'MISTRAL_OCR_DOCUMENT'
31
+ };
32
+ function instanceOfOcrModeUio(value) {
33
+ for (const key in exports.OcrModeUio) {
34
+ if (Object.prototype.hasOwnProperty.call(exports.OcrModeUio, key)) {
35
+ if (exports.OcrModeUio[key] === value) {
36
+ return true;
37
+ }
38
+ }
39
+ }
40
+ return false;
41
+ }
42
+ function OcrModeUioFromJSON(json) {
43
+ return OcrModeUioFromJSONTyped(json, false);
44
+ }
45
+ function OcrModeUioFromJSONTyped(json, ignoreDiscriminator) {
46
+ return json;
47
+ }
48
+ function OcrModeUioToJSON(value) {
49
+ return value;
50
+ }
51
+ function OcrModeUioToJSONTyped(value, ignoreDiscriminator) {
52
+ return value;
53
+ }
@@ -0,0 +1,45 @@
1
+ /**
2
+ * brain-client
3
+ * Api ands models for brain-app and brain-app
4
+ *
5
+ * The version of the OpenAPI document: 0.0.0-SNAPSHOT
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { OcrModeUio } from './OcrModeUio';
13
+ /**
14
+ * Configuration OCR attachée à une organisation. Le mode DISABLED — ou une valeur absente là où le champ est optionnel — vaut OCR désactivé : il n'y a aucun repli sur une configuration d'environnement.
15
+ * @export
16
+ * @interface OrganizationOcrConfigUio
17
+ */
18
+ export interface OrganizationOcrConfigUio {
19
+ /**
20
+ *
21
+ * @type {OcrModeUio}
22
+ * @memberof OrganizationOcrConfigUio
23
+ */
24
+ mode: OcrModeUio;
25
+ /**
26
+ * Moteur IA de l'organisation portant le modèle d'OCR.
27
+ * @type {string}
28
+ * @memberof OrganizationOcrConfigUio
29
+ */
30
+ providerId?: string;
31
+ /**
32
+ * `modelId` du modèle chez le fournisseur (ex. "mistral-ocr-latest"), et non l'identifiant interne `ModelDefinition.id`.
33
+ * @type {string}
34
+ * @memberof OrganizationOcrConfigUio
35
+ */
36
+ modelId?: string;
37
+ }
38
+ /**
39
+ * Check if a given object implements the OrganizationOcrConfigUio interface.
40
+ */
41
+ export declare function instanceOfOrganizationOcrConfigUio(value: object): value is OrganizationOcrConfigUio;
42
+ export declare function OrganizationOcrConfigUioFromJSON(json: any): OrganizationOcrConfigUio;
43
+ export declare function OrganizationOcrConfigUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): OrganizationOcrConfigUio;
44
+ export declare function OrganizationOcrConfigUioToJSON(json: any): OrganizationOcrConfigUio;
45
+ export declare function OrganizationOcrConfigUioToJSONTyped(value?: OrganizationOcrConfigUio | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * brain-client
6
+ * Api ands models for brain-app and brain-app
7
+ *
8
+ * The version of the OpenAPI document: 0.0.0-SNAPSHOT
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfOrganizationOcrConfigUio = instanceOfOrganizationOcrConfigUio;
17
+ exports.OrganizationOcrConfigUioFromJSON = OrganizationOcrConfigUioFromJSON;
18
+ exports.OrganizationOcrConfigUioFromJSONTyped = OrganizationOcrConfigUioFromJSONTyped;
19
+ exports.OrganizationOcrConfigUioToJSON = OrganizationOcrConfigUioToJSON;
20
+ exports.OrganizationOcrConfigUioToJSONTyped = OrganizationOcrConfigUioToJSONTyped;
21
+ const OcrModeUio_1 = require("./OcrModeUio");
22
+ /**
23
+ * Check if a given object implements the OrganizationOcrConfigUio interface.
24
+ */
25
+ function instanceOfOrganizationOcrConfigUio(value) {
26
+ if (!('mode' in value) || value['mode'] === undefined)
27
+ return false;
28
+ return true;
29
+ }
30
+ function OrganizationOcrConfigUioFromJSON(json) {
31
+ return OrganizationOcrConfigUioFromJSONTyped(json, false);
32
+ }
33
+ function OrganizationOcrConfigUioFromJSONTyped(json, ignoreDiscriminator) {
34
+ if (json == null) {
35
+ return json;
36
+ }
37
+ return {
38
+ 'mode': (0, OcrModeUio_1.OcrModeUioFromJSON)(json['mode']),
39
+ 'providerId': json['providerId'] == null ? undefined : json['providerId'],
40
+ 'modelId': json['modelId'] == null ? undefined : json['modelId'],
41
+ };
42
+ }
43
+ function OrganizationOcrConfigUioToJSON(json) {
44
+ return OrganizationOcrConfigUioToJSONTyped(json, false);
45
+ }
46
+ function OrganizationOcrConfigUioToJSONTyped(value, ignoreDiscriminator = false) {
47
+ if (value == null) {
48
+ return value;
49
+ }
50
+ return {
51
+ 'mode': (0, OcrModeUio_1.OcrModeUioToJSON)(value['mode']),
52
+ 'providerId': value['providerId'],
53
+ 'modelId': value['modelId'],
54
+ };
55
+ }
@@ -0,0 +1,45 @@
1
+ /**
2
+ * brain-client
3
+ * Api ands models for brain-app and brain-app
4
+ *
5
+ * The version of the OpenAPI document: 0.0.0-SNAPSHOT
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { OcrModeUio } from './OcrModeUio';
13
+ /**
14
+ * `providerId` et `modelId` sont requis dès que `mode` vaut autre chose que DISABLED. Cette règle conditionnelle est validée côté serveur.
15
+ * @export
16
+ * @interface OrganizationOcrConfigUpdateRequestUio
17
+ */
18
+ export interface OrganizationOcrConfigUpdateRequestUio {
19
+ /**
20
+ *
21
+ * @type {OcrModeUio}
22
+ * @memberof OrganizationOcrConfigUpdateRequestUio
23
+ */
24
+ mode: OcrModeUio;
25
+ /**
26
+ *
27
+ * @type {string}
28
+ * @memberof OrganizationOcrConfigUpdateRequestUio
29
+ */
30
+ providerId?: string | null;
31
+ /**
32
+ *
33
+ * @type {string}
34
+ * @memberof OrganizationOcrConfigUpdateRequestUio
35
+ */
36
+ modelId?: string | null;
37
+ }
38
+ /**
39
+ * Check if a given object implements the OrganizationOcrConfigUpdateRequestUio interface.
40
+ */
41
+ export declare function instanceOfOrganizationOcrConfigUpdateRequestUio(value: object): value is OrganizationOcrConfigUpdateRequestUio;
42
+ export declare function OrganizationOcrConfigUpdateRequestUioFromJSON(json: any): OrganizationOcrConfigUpdateRequestUio;
43
+ export declare function OrganizationOcrConfigUpdateRequestUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): OrganizationOcrConfigUpdateRequestUio;
44
+ export declare function OrganizationOcrConfigUpdateRequestUioToJSON(json: any): OrganizationOcrConfigUpdateRequestUio;
45
+ export declare function OrganizationOcrConfigUpdateRequestUioToJSONTyped(value?: OrganizationOcrConfigUpdateRequestUio | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * brain-client
6
+ * Api ands models for brain-app and brain-app
7
+ *
8
+ * The version of the OpenAPI document: 0.0.0-SNAPSHOT
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfOrganizationOcrConfigUpdateRequestUio = instanceOfOrganizationOcrConfigUpdateRequestUio;
17
+ exports.OrganizationOcrConfigUpdateRequestUioFromJSON = OrganizationOcrConfigUpdateRequestUioFromJSON;
18
+ exports.OrganizationOcrConfigUpdateRequestUioFromJSONTyped = OrganizationOcrConfigUpdateRequestUioFromJSONTyped;
19
+ exports.OrganizationOcrConfigUpdateRequestUioToJSON = OrganizationOcrConfigUpdateRequestUioToJSON;
20
+ exports.OrganizationOcrConfigUpdateRequestUioToJSONTyped = OrganizationOcrConfigUpdateRequestUioToJSONTyped;
21
+ const OcrModeUio_1 = require("./OcrModeUio");
22
+ /**
23
+ * Check if a given object implements the OrganizationOcrConfigUpdateRequestUio interface.
24
+ */
25
+ function instanceOfOrganizationOcrConfigUpdateRequestUio(value) {
26
+ if (!('mode' in value) || value['mode'] === undefined)
27
+ return false;
28
+ return true;
29
+ }
30
+ function OrganizationOcrConfigUpdateRequestUioFromJSON(json) {
31
+ return OrganizationOcrConfigUpdateRequestUioFromJSONTyped(json, false);
32
+ }
33
+ function OrganizationOcrConfigUpdateRequestUioFromJSONTyped(json, ignoreDiscriminator) {
34
+ if (json == null) {
35
+ return json;
36
+ }
37
+ return {
38
+ 'mode': (0, OcrModeUio_1.OcrModeUioFromJSON)(json['mode']),
39
+ 'providerId': json['providerId'] == null ? undefined : json['providerId'],
40
+ 'modelId': json['modelId'] == null ? undefined : json['modelId'],
41
+ };
42
+ }
43
+ function OrganizationOcrConfigUpdateRequestUioToJSON(json) {
44
+ return OrganizationOcrConfigUpdateRequestUioToJSONTyped(json, false);
45
+ }
46
+ function OrganizationOcrConfigUpdateRequestUioToJSONTyped(value, ignoreDiscriminator = false) {
47
+ if (value == null) {
48
+ return value;
49
+ }
50
+ return {
51
+ 'mode': (0, OcrModeUio_1.OcrModeUioToJSON)(value['mode']),
52
+ 'providerId': value['providerId'],
53
+ 'modelId': value['modelId'],
54
+ };
55
+ }
@@ -11,6 +11,7 @@
11
11
  */
12
12
  import type { OrganizationEngineUio } from './OrganizationEngineUio';
13
13
  import type { OrganizationUserUio } from './OrganizationUserUio';
14
+ import type { OrganizationOcrConfigUio } from './OrganizationOcrConfigUio';
14
15
  /**
15
16
  *
16
17
  * @export
@@ -41,6 +42,12 @@ export interface OrganizationUio {
41
42
  * @memberof OrganizationUio
42
43
  */
43
44
  engine?: OrganizationEngineUio | null;
45
+ /**
46
+ *
47
+ * @type {OrganizationOcrConfigUio}
48
+ * @memberof OrganizationUio
49
+ */
50
+ ocr?: OrganizationOcrConfigUio | null;
44
51
  /**
45
52
  *
46
53
  * @type {Array<OrganizationUserUio>}
@@ -20,6 +20,7 @@ exports.OrganizationUioToJSON = OrganizationUioToJSON;
20
20
  exports.OrganizationUioToJSONTyped = OrganizationUioToJSONTyped;
21
21
  const OrganizationEngineUio_1 = require("./OrganizationEngineUio");
22
22
  const OrganizationUserUio_1 = require("./OrganizationUserUio");
23
+ const OrganizationOcrConfigUio_1 = require("./OrganizationOcrConfigUio");
23
24
  /**
24
25
  * Check if a given object implements the OrganizationUio interface.
25
26
  */
@@ -44,6 +45,7 @@ function OrganizationUioFromJSONTyped(json, ignoreDiscriminator) {
44
45
  'name': json['name'],
45
46
  'slug': json['slug'],
46
47
  'engine': json['engine'] == null ? undefined : (0, OrganizationEngineUio_1.OrganizationEngineUioFromJSON)(json['engine']),
48
+ 'ocr': json['ocr'] == null ? undefined : (0, OrganizationOcrConfigUio_1.OrganizationOcrConfigUioFromJSON)(json['ocr']),
47
49
  'users': json['users'] == null ? undefined : (json['users'].map(OrganizationUserUio_1.OrganizationUserUioFromJSON)),
48
50
  };
49
51
  }
@@ -59,6 +61,7 @@ function OrganizationUioToJSONTyped(value, ignoreDiscriminator = false) {
59
61
  'name': value['name'],
60
62
  'slug': value['slug'],
61
63
  'engine': (0, OrganizationEngineUio_1.OrganizationEngineUioToJSON)(value['engine']),
64
+ 'ocr': (0, OrganizationOcrConfigUio_1.OrganizationOcrConfigUioToJSON)(value['ocr']),
62
65
  'users': value['users'] == null ? undefined : (value['users'].map(OrganizationUserUio_1.OrganizationUserUioToJSON)),
63
66
  };
64
67
  }
@@ -316,6 +316,7 @@ export * from './MetricsUsersResponseUio';
316
316
  export * from './ModelAgentUio';
317
317
  export * from './ModelDefinitionUio';
318
318
  export * from './ModelUio';
319
+ export * from './OcrModeUio';
319
320
  export * from './OpenAiChatCompletionRequestStreamOptionsUio';
320
321
  export * from './OpenAiChatCompletionRequestUio';
321
322
  export * from './OpenAiChatCompletionResponseUio';
@@ -325,6 +326,8 @@ export * from './OrgUsageTimeSeriesPointUio';
325
326
  export * from './OrganizationEngineUio';
326
327
  export * from './OrganizationMemberUio';
327
328
  export * from './OrganizationMemberUserUio';
329
+ export * from './OrganizationOcrConfigUio';
330
+ export * from './OrganizationOcrConfigUpdateRequestUio';
328
331
  export * from './OrganizationUio';
329
332
  export * from './OrganizationUserInviteRequestUio';
330
333
  export * from './OrganizationUserInviteResponseUio';
@@ -334,6 +334,7 @@ __exportStar(require("./MetricsUsersResponseUio"), exports);
334
334
  __exportStar(require("./ModelAgentUio"), exports);
335
335
  __exportStar(require("./ModelDefinitionUio"), exports);
336
336
  __exportStar(require("./ModelUio"), exports);
337
+ __exportStar(require("./OcrModeUio"), exports);
337
338
  __exportStar(require("./OpenAiChatCompletionRequestStreamOptionsUio"), exports);
338
339
  __exportStar(require("./OpenAiChatCompletionRequestUio"), exports);
339
340
  __exportStar(require("./OpenAiChatCompletionResponseUio"), exports);
@@ -343,6 +344,8 @@ __exportStar(require("./OrgUsageTimeSeriesPointUio"), exports);
343
344
  __exportStar(require("./OrganizationEngineUio"), exports);
344
345
  __exportStar(require("./OrganizationMemberUio"), exports);
345
346
  __exportStar(require("./OrganizationMemberUserUio"), exports);
347
+ __exportStar(require("./OrganizationOcrConfigUio"), exports);
348
+ __exportStar(require("./OrganizationOcrConfigUpdateRequestUio"), exports);
346
349
  __exportStar(require("./OrganizationUio"), exports);
347
350
  __exportStar(require("./OrganizationUserInviteRequestUio"), exports);
348
351
  __exportStar(require("./OrganizationUserInviteResponseUio"), exports);
package/dist/openapi.json CHANGED
@@ -8094,6 +8094,99 @@
8094
8094
  "tags" : [ "organizations" ]
8095
8095
  }
8096
8096
  },
8097
+ "/organizations/{organizationId}/ocr" : {
8098
+ "get" : {
8099
+ "description" : "Retourne la configuration OCR (mode, providerId, modelId) de l'organisation. Une organisation sans configuration renvoie une configuration désactivée (mode DISABLED) : l'absence de configuration vaut OCR désactivé.",
8100
+ "operationId" : "getOrganizationOcrConfig",
8101
+ "parameters" : [ {
8102
+ "description" : "ID of the organization",
8103
+ "in" : "path",
8104
+ "name" : "organizationId",
8105
+ "required" : true,
8106
+ "schema" : {
8107
+ "type" : "string"
8108
+ }
8109
+ } ],
8110
+ "responses" : {
8111
+ "200" : {
8112
+ "content" : {
8113
+ "application/json" : {
8114
+ "schema" : {
8115
+ "$ref" : "#/components/schemas/OrganizationOcrConfig"
8116
+ }
8117
+ }
8118
+ },
8119
+ "description" : "OCR configuration, or { mode: DISABLED } when not configured"
8120
+ },
8121
+ "401" : {
8122
+ "description" : "Unauthorized"
8123
+ },
8124
+ "403" : {
8125
+ "description" : "Forbidden - User doesn't have permission"
8126
+ },
8127
+ "404" : {
8128
+ "description" : "Organization not found"
8129
+ },
8130
+ "500" : {
8131
+ "description" : "Server error"
8132
+ }
8133
+ },
8134
+ "summary" : "Get an organization OCR configuration",
8135
+ "tags" : [ "organizations" ]
8136
+ },
8137
+ "put" : {
8138
+ "description" : "Remplace la configuration OCR de l'organisation. `mode: DISABLED` supprime la configuration. Sinon `providerId` et `modelId` sont requis, le moteur IA doit appartenir à l'organisation, et le modèle doit porter la capacité attendue par le mode (`hasVision` pour LLM, `hasOcr` pour les modes MISTRAL_OCR_*).",
8139
+ "operationId" : "updateOrganizationOcrConfig",
8140
+ "parameters" : [ {
8141
+ "description" : "ID of the organization",
8142
+ "in" : "path",
8143
+ "name" : "organizationId",
8144
+ "required" : true,
8145
+ "schema" : {
8146
+ "type" : "string"
8147
+ }
8148
+ } ],
8149
+ "requestBody" : {
8150
+ "content" : {
8151
+ "application/json" : {
8152
+ "schema" : {
8153
+ "$ref" : "#/components/schemas/OrganizationOcrConfigUpdateRequest"
8154
+ }
8155
+ }
8156
+ },
8157
+ "required" : true
8158
+ },
8159
+ "responses" : {
8160
+ "200" : {
8161
+ "content" : {
8162
+ "application/json" : {
8163
+ "schema" : {
8164
+ "$ref" : "#/components/schemas/OrganizationOcrConfig"
8165
+ }
8166
+ }
8167
+ },
8168
+ "description" : "OCR configuration updated, or { mode: DISABLED } when disabled"
8169
+ },
8170
+ "400" : {
8171
+ "description" : "Invalid configuration (missing model, or model lacking the required capability)"
8172
+ },
8173
+ "401" : {
8174
+ "description" : "Unauthorized"
8175
+ },
8176
+ "403" : {
8177
+ "description" : "Forbidden - User doesn't have permission"
8178
+ },
8179
+ "404" : {
8180
+ "description" : "Organization not found"
8181
+ },
8182
+ "500" : {
8183
+ "description" : "Server error"
8184
+ }
8185
+ },
8186
+ "summary" : "Set an organization OCR configuration",
8187
+ "tags" : [ "organizations" ]
8188
+ }
8189
+ },
8097
8190
  "/organizations/{organizationId}/agents/{agentId}" : {
8098
8191
  "get" : {
8099
8192
  "description" : "Retrieves metrics for a brain agent",
@@ -19417,6 +19510,10 @@
19417
19510
  "hasSpeechToText" : {
19418
19511
  "type" : "boolean"
19419
19512
  },
19513
+ "hasOcr" : {
19514
+ "description" : "Le modèle expose une API d'OCR dédiée (ex. mistral-ocr-latest). Distinct de `hasVision`, qui est la capacité utilisée par le mode OCR `LLM`.",
19515
+ "type" : "boolean"
19516
+ },
19420
19517
  "maxTokens" : {
19421
19518
  "minimum" : 1,
19422
19519
  "type" : "integer"
@@ -19860,6 +19957,9 @@
19860
19957
  "engine" : {
19861
19958
  "$ref" : "#/components/schemas/OrganizationEngine"
19862
19959
  },
19960
+ "ocr" : {
19961
+ "$ref" : "#/components/schemas/OrganizationOcrConfig"
19962
+ },
19863
19963
  "users" : {
19864
19964
  "items" : {
19865
19965
  "$ref" : "#/components/schemas/OrganizationUser"
@@ -19977,6 +20077,45 @@
19977
20077
  },
19978
20078
  "type" : "object"
19979
20079
  },
20080
+ "OrganizationOcrConfig" : {
20081
+ "additionalProperties" : false,
20082
+ "description" : "Configuration OCR attachée à une organisation. Le mode DISABLED — ou une valeur absente là où le champ est optionnel — vaut OCR désactivé : il n'y a aucun repli sur une configuration d'environnement.",
20083
+ "nullable" : true,
20084
+ "properties" : {
20085
+ "mode" : {
20086
+ "$ref" : "#/components/schemas/OcrMode"
20087
+ },
20088
+ "providerId" : {
20089
+ "description" : "Moteur IA de l'organisation portant le modèle d'OCR.",
20090
+ "type" : "string"
20091
+ },
20092
+ "modelId" : {
20093
+ "description" : "`modelId` du modèle chez le fournisseur (ex. \"mistral-ocr-latest\"), et non l'identifiant interne `ModelDefinition.id`.",
20094
+ "type" : "string"
20095
+ }
20096
+ },
20097
+ "required" : [ "mode" ],
20098
+ "type" : "object"
20099
+ },
20100
+ "OrganizationOcrConfigUpdateRequest" : {
20101
+ "additionalProperties" : false,
20102
+ "description" : "`providerId` et `modelId` sont requis dès que `mode` vaut autre chose que DISABLED. Cette règle conditionnelle est validée côté serveur.",
20103
+ "properties" : {
20104
+ "mode" : {
20105
+ "$ref" : "#/components/schemas/OcrMode"
20106
+ },
20107
+ "providerId" : {
20108
+ "nullable" : true,
20109
+ "type" : "string"
20110
+ },
20111
+ "modelId" : {
20112
+ "nullable" : true,
20113
+ "type" : "string"
20114
+ }
20115
+ },
20116
+ "required" : [ "mode" ],
20117
+ "type" : "object"
20118
+ },
19980
20119
  "MetricsBrainsAgentResponse" : {
19981
20120
  "properties" : {
19982
20121
  "conversationCount" : {
@@ -23326,6 +23465,11 @@
23326
23465
  },
23327
23466
  "type" : "object"
23328
23467
  },
23468
+ "OcrMode" : {
23469
+ "description" : "Mode d'extraction de texte des documents, configuré par organisation. DISABLED : aucun OCR. LLM : relecture page par page par un modèle de vision. MISTRAL_OCR_IMAGES / MISTRAL_OCR_DOCUMENT : OCR dédié Mistral, page par page ou sur le document entier.",
23470
+ "enum" : [ "DISABLED", "LLM", "MISTRAL_OCR_IMAGES", "MISTRAL_OCR_DOCUMENT" ],
23471
+ "type" : "string"
23472
+ },
23329
23473
  "TextToSpeechProvider" : {
23330
23474
  "enum" : [ "ELEVENLABS" ],
23331
23475
  "type" : "string"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@breign/client",
3
- "version": "1.0.144",
3
+ "version": "1.0.145",
4
4
  "main": "dist/index.js",
5
5
  "exports": {
6
6
  ".": "./dist/index.js",