@breign/client 1.0.143 → 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 { AgentModuleUio, BodyWithMessageUio, CreateKnowledgeBaseRequestUio, CreateKnowledgeBaseResponseUio, DeleteKnowledgeSitePage200ResponseUio, FileCreationResponseUio, FileWithDownloadUrlUio, ImageKnowledgeUio, KnowledgeBaseConfigurationUio, KnowledgeBaseConfigurationUpdateRequestUio, KnowledgeBaseUio, KnowledgeBaseWithFilesUio, KnowledgeFileCreationRequestUio, KnowledgeFileParsingCallbackRequestUio, KnowledgeFileSummaryUio, KnowledgeFileUio, KnowledgeFilesByIdsRequestUio, KnowledgeSitePageUio, PatchKnowledgeBaseRequestUio, PatchKnowledgeFileRequestUio, SearchKnowledgeBase200ResponseInnerUio, SearchKnowledgeBaseRequestUio, StartKnowledgeBaseScrappingRequestUio, UploadImageToKnowledgeBaseLibrary200ResponseUio, UploadImageToKnowledgeBaseLibraryRequestUio, UploadedStatusUpdateRequestUio } from '../models/index';
13
+ import type { AgentModuleUio, BodyWithMessageUio, CreateKnowledgeBaseRequestUio, CreateKnowledgeBaseResponseUio, DeleteKnowledgeSitePage200ResponseUio, FileCreationResponseUio, FileWithDownloadUrlUio, ImageKnowledgeUio, KnowledgeBaseConfigurationUio, KnowledgeBaseConfigurationUpdateRequestUio, KnowledgeBaseUio, KnowledgeBaseWithFilesUio, KnowledgeFileCreationRequestUio, KnowledgeFileParsingCallbackRequestUio, KnowledgeFileSummaryUio, KnowledgeFileUio, KnowledgeFilesByIdsRequestUio, KnowledgeSitePageUio, PatchKnowledgeBaseRequestUio, PatchKnowledgeFileRequestUio, SearchKnowledgeBase200ResponseInnerUio, SearchKnowledgeBaseRequestUio, StartKnowledgeBaseScrappingRequestUio, SyncKnowledgeSiteScrapping200ResponseUio, SyncKnowledgeSiteScrappingRequestUio, UploadImageToKnowledgeBaseLibrary200ResponseUio, UploadImageToKnowledgeBaseLibraryRequestUio, UploadedStatusUpdateRequestUio } from '../models/index';
14
14
  export interface AddFileToKnowledgeBaseRequest {
15
15
  knowledgebaseId: string;
16
16
  knowledgeFileCreationRequestUio: KnowledgeFileCreationRequestUio;
@@ -102,6 +102,10 @@ export interface StartKnowledgeBaseScrappingRequest {
102
102
  knowledgebaseId: string;
103
103
  startKnowledgeBaseScrappingRequestUio: StartKnowledgeBaseScrappingRequestUio;
104
104
  }
105
+ export interface SyncKnowledgeSiteScrappingRequest {
106
+ fileId: string;
107
+ syncKnowledgeSiteScrappingRequestUio: SyncKnowledgeSiteScrappingRequestUio;
108
+ }
105
109
  export interface UpdateImageStatusInKnowledgeBaseLibraryRequest {
106
110
  knowledgebaseId: string;
107
111
  imageId: string;
@@ -399,6 +403,16 @@ export declare class KnowledgeApi extends runtime.BaseAPI {
399
403
  startKnowledgeBaseScrapping(knowledgebaseId: string, startKnowledgeBaseScrappingRequestUio: StartKnowledgeBaseScrappingRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{
400
404
  [key: string]: any;
401
405
  }>;
406
+ /**
407
+ * Called by the scrapping service when a crawl ends. Refreshes the site `updatedAt`, which acts as its last scrapping date, and when `prune` is set removes the site pages that were not found during the crawl. `pathPrefix` restricts the removal to a single directory of the site, leaving the pages located elsewhere untouched.
408
+ * Synchronize a scrapped site after a crawl
409
+ */
410
+ syncKnowledgeSiteScrappingRaw(requestParameters: SyncKnowledgeSiteScrappingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SyncKnowledgeSiteScrapping200ResponseUio>>;
411
+ /**
412
+ * Called by the scrapping service when a crawl ends. Refreshes the site `updatedAt`, which acts as its last scrapping date, and when `prune` is set removes the site pages that were not found during the crawl. `pathPrefix` restricts the removal to a single directory of the site, leaving the pages located elsewhere untouched.
413
+ * Synchronize a scrapped site after a crawl
414
+ */
415
+ syncKnowledgeSiteScrapping(fileId: string, syncKnowledgeSiteScrappingRequestUio: SyncKnowledgeSiteScrappingRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SyncKnowledgeSiteScrapping200ResponseUio>;
402
416
  /**
403
417
  * Update the status of a specific knowledge image in a library image in knowledge base
404
418
  * Update the status of a specific knowledge image in a library image in knowledge base
@@ -868,6 +868,40 @@ class KnowledgeApi extends runtime.BaseAPI {
868
868
  const response = await this.startKnowledgeBaseScrappingRaw({ knowledgebaseId: knowledgebaseId, startKnowledgeBaseScrappingRequestUio: startKnowledgeBaseScrappingRequestUio }, initOverrides);
869
869
  return await response.value();
870
870
  }
871
+ /**
872
+ * Called by the scrapping service when a crawl ends. Refreshes the site `updatedAt`, which acts as its last scrapping date, and when `prune` is set removes the site pages that were not found during the crawl. `pathPrefix` restricts the removal to a single directory of the site, leaving the pages located elsewhere untouched.
873
+ * Synchronize a scrapped site after a crawl
874
+ */
875
+ async syncKnowledgeSiteScrappingRaw(requestParameters, initOverrides) {
876
+ if (requestParameters['fileId'] == null) {
877
+ throw new runtime.RequiredError('fileId', 'Required parameter "fileId" was null or undefined when calling syncKnowledgeSiteScrapping().');
878
+ }
879
+ if (requestParameters['syncKnowledgeSiteScrappingRequestUio'] == null) {
880
+ throw new runtime.RequiredError('syncKnowledgeSiteScrappingRequestUio', 'Required parameter "syncKnowledgeSiteScrappingRequestUio" was null or undefined when calling syncKnowledgeSiteScrapping().');
881
+ }
882
+ const queryParameters = {};
883
+ const headerParameters = {};
884
+ headerParameters['Content-Type'] = 'application/json';
885
+ if (this.configuration && this.configuration.apiKey) {
886
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
887
+ }
888
+ const response = await this.request({
889
+ path: `/knowledge-files/{fileId}/scrapping-sync`.replace(`{${"fileId"}}`, encodeURIComponent(String(requestParameters['fileId']))),
890
+ method: 'POST',
891
+ headers: headerParameters,
892
+ query: queryParameters,
893
+ body: (0, index_1.SyncKnowledgeSiteScrappingRequestUioToJSON)(requestParameters['syncKnowledgeSiteScrappingRequestUio']),
894
+ }, initOverrides);
895
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.SyncKnowledgeSiteScrapping200ResponseUioFromJSON)(jsonValue));
896
+ }
897
+ /**
898
+ * Called by the scrapping service when a crawl ends. Refreshes the site `updatedAt`, which acts as its last scrapping date, and when `prune` is set removes the site pages that were not found during the crawl. `pathPrefix` restricts the removal to a single directory of the site, leaving the pages located elsewhere untouched.
899
+ * Synchronize a scrapped site after a crawl
900
+ */
901
+ async syncKnowledgeSiteScrapping(fileId, syncKnowledgeSiteScrappingRequestUio, initOverrides) {
902
+ const response = await this.syncKnowledgeSiteScrappingRaw({ fileId: fileId, syncKnowledgeSiteScrappingRequestUio: syncKnowledgeSiteScrappingRequestUio }, initOverrides);
903
+ return await response.value();
904
+ }
871
905
  /**
872
906
  * Update the status of a specific knowledge image in a library image in knowledge base
873
907
  * Update the status of a specific knowledge image in a library image in knowledge base
@@ -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
@@ -33,6 +33,12 @@ export interface KnowledgeFileSummaryUio {
33
33
  * @memberof KnowledgeFileSummaryUio
34
34
  */
35
35
  knowledgeBaseId?: string;
36
+ /**
37
+ *
38
+ * @type {string}
39
+ * @memberof KnowledgeFileSummaryUio
40
+ */
41
+ updatedAt?: string;
36
42
  }
37
43
  /**
38
44
  * Check if a given object implements the KnowledgeFileSummaryUio interface.
@@ -39,6 +39,7 @@ function KnowledgeFileSummaryUioFromJSONTyped(json, ignoreDiscriminator) {
39
39
  'id': json['id'],
40
40
  'name': json['name'],
41
41
  'knowledgeBaseId': json['knowledgeBaseId'] == null ? undefined : json['knowledgeBaseId'],
42
+ 'updatedAt': json['updatedAt'] == null ? undefined : json['updatedAt'],
42
43
  };
43
44
  }
44
45
  function KnowledgeFileSummaryUioToJSON(json) {
@@ -52,5 +53,6 @@ function KnowledgeFileSummaryUioToJSONTyped(value, ignoreDiscriminator = false)
52
53
  'id': value['id'],
53
54
  'name': value['name'],
54
55
  'knowledgeBaseId': value['knowledgeBaseId'],
56
+ 'updatedAt': value['updatedAt'],
55
57
  };
56
58
  }
@@ -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
  }
@@ -77,6 +77,26 @@ export interface StartKnowledgeBaseScrappingRequestUio {
77
77
  * @memberof StartKnowledgeBaseScrappingRequestUio
78
78
  */
79
79
  sitePageId?: string | null;
80
+ /**
81
+ * Restrict the crawl to a directory of the site, e.g. `/property` only keeps `/property` and its sub-paths.
82
+ *
83
+ * @type {string}
84
+ * @memberof StartKnowledgeBaseScrappingRequestUio
85
+ */
86
+ pathPrefix?: string | null;
87
+ /**
88
+ * Re-crawl an existing site: known pages are updated in place, new pages are added and pages that disappeared are removed.
89
+ *
90
+ * @type {boolean}
91
+ * @memberof StartKnowledgeBaseScrappingRequestUio
92
+ */
93
+ resync?: boolean | null;
94
+ /**
95
+ * Existing site to re-attach the crawl to, required when `resync` is set
96
+ * @type {string}
97
+ * @memberof StartKnowledgeBaseScrappingRequestUio
98
+ */
99
+ siteId?: string | null;
80
100
  }
81
101
  /**
82
102
  * Check if a given object implements the StartKnowledgeBaseScrappingRequestUio interface.
@@ -50,6 +50,9 @@ function StartKnowledgeBaseScrappingRequestUioFromJSONTyped(json, ignoreDiscrimi
50
50
  'customSettings': json['customSettings'] == null ? undefined : json['customSettings'],
51
51
  'onlyThisSite': json['onlyThisSite'] == null ? undefined : json['onlyThisSite'],
52
52
  'sitePageId': json['sitePageId'] == null ? undefined : json['sitePageId'],
53
+ 'pathPrefix': json['pathPrefix'] == null ? undefined : json['pathPrefix'],
54
+ 'resync': json['resync'] == null ? undefined : json['resync'],
55
+ 'siteId': json['siteId'] == null ? undefined : json['siteId'],
53
56
  };
54
57
  }
55
58
  function StartKnowledgeBaseScrappingRequestUioToJSON(json) {
@@ -70,5 +73,8 @@ function StartKnowledgeBaseScrappingRequestUioToJSONTyped(value, ignoreDiscrimin
70
73
  'customSettings': value['customSettings'],
71
74
  'onlyThisSite': value['onlyThisSite'],
72
75
  'sitePageId': value['sitePageId'],
76
+ 'pathPrefix': value['pathPrefix'],
77
+ 'resync': value['resync'],
78
+ 'siteId': value['siteId'],
73
79
  };
74
80
  }
@@ -0,0 +1,44 @@
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
+ *
14
+ * @export
15
+ * @interface SyncKnowledgeSiteScrapping200ResponseUio
16
+ */
17
+ export interface SyncKnowledgeSiteScrapping200ResponseUio {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof SyncKnowledgeSiteScrapping200ResponseUio
22
+ */
23
+ updatedAt: string;
24
+ /**
25
+ *
26
+ * @type {number}
27
+ * @memberof SyncKnowledgeSiteScrapping200ResponseUio
28
+ */
29
+ scrapedPages: number;
30
+ /**
31
+ *
32
+ * @type {Array<string>}
33
+ * @memberof SyncKnowledgeSiteScrapping200ResponseUio
34
+ */
35
+ removedPages: Array<string>;
36
+ }
37
+ /**
38
+ * Check if a given object implements the SyncKnowledgeSiteScrapping200ResponseUio interface.
39
+ */
40
+ export declare function instanceOfSyncKnowledgeSiteScrapping200ResponseUio(value: object): value is SyncKnowledgeSiteScrapping200ResponseUio;
41
+ export declare function SyncKnowledgeSiteScrapping200ResponseUioFromJSON(json: any): SyncKnowledgeSiteScrapping200ResponseUio;
42
+ export declare function SyncKnowledgeSiteScrapping200ResponseUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): SyncKnowledgeSiteScrapping200ResponseUio;
43
+ export declare function SyncKnowledgeSiteScrapping200ResponseUioToJSON(json: any): SyncKnowledgeSiteScrapping200ResponseUio;
44
+ export declare function SyncKnowledgeSiteScrapping200ResponseUioToJSONTyped(value?: SyncKnowledgeSiteScrapping200ResponseUio | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,58 @@
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.instanceOfSyncKnowledgeSiteScrapping200ResponseUio = instanceOfSyncKnowledgeSiteScrapping200ResponseUio;
17
+ exports.SyncKnowledgeSiteScrapping200ResponseUioFromJSON = SyncKnowledgeSiteScrapping200ResponseUioFromJSON;
18
+ exports.SyncKnowledgeSiteScrapping200ResponseUioFromJSONTyped = SyncKnowledgeSiteScrapping200ResponseUioFromJSONTyped;
19
+ exports.SyncKnowledgeSiteScrapping200ResponseUioToJSON = SyncKnowledgeSiteScrapping200ResponseUioToJSON;
20
+ exports.SyncKnowledgeSiteScrapping200ResponseUioToJSONTyped = SyncKnowledgeSiteScrapping200ResponseUioToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the SyncKnowledgeSiteScrapping200ResponseUio interface.
23
+ */
24
+ function instanceOfSyncKnowledgeSiteScrapping200ResponseUio(value) {
25
+ if (!('updatedAt' in value) || value['updatedAt'] === undefined)
26
+ return false;
27
+ if (!('scrapedPages' in value) || value['scrapedPages'] === undefined)
28
+ return false;
29
+ if (!('removedPages' in value) || value['removedPages'] === undefined)
30
+ return false;
31
+ return true;
32
+ }
33
+ function SyncKnowledgeSiteScrapping200ResponseUioFromJSON(json) {
34
+ return SyncKnowledgeSiteScrapping200ResponseUioFromJSONTyped(json, false);
35
+ }
36
+ function SyncKnowledgeSiteScrapping200ResponseUioFromJSONTyped(json, ignoreDiscriminator) {
37
+ if (json == null) {
38
+ return json;
39
+ }
40
+ return {
41
+ 'updatedAt': json['updatedAt'],
42
+ 'scrapedPages': json['scrapedPages'],
43
+ 'removedPages': json['removedPages'],
44
+ };
45
+ }
46
+ function SyncKnowledgeSiteScrapping200ResponseUioToJSON(json) {
47
+ return SyncKnowledgeSiteScrapping200ResponseUioToJSONTyped(json, false);
48
+ }
49
+ function SyncKnowledgeSiteScrapping200ResponseUioToJSONTyped(value, ignoreDiscriminator = false) {
50
+ if (value == null) {
51
+ return value;
52
+ }
53
+ return {
54
+ 'updatedAt': value['updatedAt'],
55
+ 'scrapedPages': value['scrapedPages'],
56
+ 'removedPages': value['removedPages'],
57
+ };
58
+ }
@@ -0,0 +1,44 @@
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
+ *
14
+ * @export
15
+ * @interface SyncKnowledgeSiteScrappingRequestUio
16
+ */
17
+ export interface SyncKnowledgeSiteScrappingRequestUio {
18
+ /**
19
+ * URLs reached during the crawl
20
+ * @type {Array<string>}
21
+ * @memberof SyncKnowledgeSiteScrappingRequestUio
22
+ */
23
+ scrapedUrls: Array<string>;
24
+ /**
25
+ * Remove the site pages missing from `scrapedUrls`
26
+ * @type {boolean}
27
+ * @memberof SyncKnowledgeSiteScrappingRequestUio
28
+ */
29
+ prune?: boolean | null;
30
+ /**
31
+ * Directory the crawl was restricted to, e.g. `/property`
32
+ * @type {string}
33
+ * @memberof SyncKnowledgeSiteScrappingRequestUio
34
+ */
35
+ pathPrefix?: string | null;
36
+ }
37
+ /**
38
+ * Check if a given object implements the SyncKnowledgeSiteScrappingRequestUio interface.
39
+ */
40
+ export declare function instanceOfSyncKnowledgeSiteScrappingRequestUio(value: object): value is SyncKnowledgeSiteScrappingRequestUio;
41
+ export declare function SyncKnowledgeSiteScrappingRequestUioFromJSON(json: any): SyncKnowledgeSiteScrappingRequestUio;
42
+ export declare function SyncKnowledgeSiteScrappingRequestUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): SyncKnowledgeSiteScrappingRequestUio;
43
+ export declare function SyncKnowledgeSiteScrappingRequestUioToJSON(json: any): SyncKnowledgeSiteScrappingRequestUio;
44
+ export declare function SyncKnowledgeSiteScrappingRequestUioToJSONTyped(value?: SyncKnowledgeSiteScrappingRequestUio | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,54 @@
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.instanceOfSyncKnowledgeSiteScrappingRequestUio = instanceOfSyncKnowledgeSiteScrappingRequestUio;
17
+ exports.SyncKnowledgeSiteScrappingRequestUioFromJSON = SyncKnowledgeSiteScrappingRequestUioFromJSON;
18
+ exports.SyncKnowledgeSiteScrappingRequestUioFromJSONTyped = SyncKnowledgeSiteScrappingRequestUioFromJSONTyped;
19
+ exports.SyncKnowledgeSiteScrappingRequestUioToJSON = SyncKnowledgeSiteScrappingRequestUioToJSON;
20
+ exports.SyncKnowledgeSiteScrappingRequestUioToJSONTyped = SyncKnowledgeSiteScrappingRequestUioToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the SyncKnowledgeSiteScrappingRequestUio interface.
23
+ */
24
+ function instanceOfSyncKnowledgeSiteScrappingRequestUio(value) {
25
+ if (!('scrapedUrls' in value) || value['scrapedUrls'] === undefined)
26
+ return false;
27
+ return true;
28
+ }
29
+ function SyncKnowledgeSiteScrappingRequestUioFromJSON(json) {
30
+ return SyncKnowledgeSiteScrappingRequestUioFromJSONTyped(json, false);
31
+ }
32
+ function SyncKnowledgeSiteScrappingRequestUioFromJSONTyped(json, ignoreDiscriminator) {
33
+ if (json == null) {
34
+ return json;
35
+ }
36
+ return {
37
+ 'scrapedUrls': json['scrapedUrls'],
38
+ 'prune': json['prune'] == null ? undefined : json['prune'],
39
+ 'pathPrefix': json['pathPrefix'] == null ? undefined : json['pathPrefix'],
40
+ };
41
+ }
42
+ function SyncKnowledgeSiteScrappingRequestUioToJSON(json) {
43
+ return SyncKnowledgeSiteScrappingRequestUioToJSONTyped(json, false);
44
+ }
45
+ function SyncKnowledgeSiteScrappingRequestUioToJSONTyped(value, ignoreDiscriminator = false) {
46
+ if (value == null) {
47
+ return value;
48
+ }
49
+ return {
50
+ 'scrapedUrls': value['scrapedUrls'],
51
+ 'prune': value['prune'],
52
+ 'pathPrefix': value['pathPrefix'],
53
+ };
54
+ }
@@ -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';
@@ -390,6 +393,8 @@ export * from './SubscriptionAdditionalMetricUio';
390
393
  export * from './SubscriptionInteractionsMetricUio';
391
394
  export * from './SubscriptionMetricUio';
392
395
  export * from './SuggestionUio';
396
+ export * from './SyncKnowledgeSiteScrapping200ResponseUio';
397
+ export * from './SyncKnowledgeSiteScrappingRequestUio';
393
398
  export * from './TTSRequestUio';
394
399
  export * from './TTSResponseUio';
395
400
  export * from './TaskScheduleEndOneOf1Uio';
@@ -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);
@@ -408,6 +411,8 @@ __exportStar(require("./SubscriptionAdditionalMetricUio"), exports);
408
411
  __exportStar(require("./SubscriptionInteractionsMetricUio"), exports);
409
412
  __exportStar(require("./SubscriptionMetricUio"), exports);
410
413
  __exportStar(require("./SuggestionUio"), exports);
414
+ __exportStar(require("./SyncKnowledgeSiteScrapping200ResponseUio"), exports);
415
+ __exportStar(require("./SyncKnowledgeSiteScrappingRequestUio"), exports);
411
416
  __exportStar(require("./TTSRequestUio"), exports);
412
417
  __exportStar(require("./TTSResponseUio"), exports);
413
418
  __exportStar(require("./TaskScheduleEndOneOf1Uio"), 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",
@@ -9730,6 +9823,57 @@
9730
9823
  "tags" : [ "knowledge" ]
9731
9824
  }
9732
9825
  },
9826
+ "/knowledge-files/{fileId}/scrapping-sync" : {
9827
+ "post" : {
9828
+ "description" : "Called by the scrapping service when a crawl ends. Refreshes the site `updatedAt`, which acts as its last scrapping date, and when `prune` is set removes the site pages that were not found during the crawl. `pathPrefix` restricts the removal to a single directory of the site, leaving the pages located elsewhere untouched.\n",
9829
+ "operationId" : "syncKnowledgeSiteScrapping",
9830
+ "parameters" : [ {
9831
+ "description" : "The ID of the file",
9832
+ "in" : "path",
9833
+ "name" : "fileId",
9834
+ "required" : true,
9835
+ "schema" : {
9836
+ "type" : "string"
9837
+ }
9838
+ } ],
9839
+ "requestBody" : {
9840
+ "content" : {
9841
+ "application/json" : {
9842
+ "schema" : {
9843
+ "$ref" : "#/components/schemas/syncKnowledgeSiteScrapping_request"
9844
+ }
9845
+ }
9846
+ },
9847
+ "required" : true
9848
+ },
9849
+ "responses" : {
9850
+ "200" : {
9851
+ "content" : {
9852
+ "application/json" : {
9853
+ "schema" : {
9854
+ "$ref" : "#/components/schemas/syncKnowledgeSiteScrapping_200_response"
9855
+ }
9856
+ }
9857
+ },
9858
+ "description" : "Site synchronized successfully"
9859
+ },
9860
+ "400" : {
9861
+ "description" : "Invalid scrapping sync request"
9862
+ },
9863
+ "401" : {
9864
+ "description" : "Unauthorized"
9865
+ },
9866
+ "403" : {
9867
+ "description" : "Forbidden - User is not admin of the organization"
9868
+ },
9869
+ "404" : {
9870
+ "description" : "Knowledge site or knowledge base not found"
9871
+ }
9872
+ },
9873
+ "summary" : "Synchronize a scrapped site after a crawl",
9874
+ "tags" : [ "knowledge" ]
9875
+ }
9876
+ },
9733
9877
  "/knowledge-files/{fileId}/status" : {
9734
9878
  "post" : {
9735
9879
  "description" : "Updates the status of a knowledge file and triggers indexing when uploaded",
@@ -19366,6 +19510,10 @@
19366
19510
  "hasSpeechToText" : {
19367
19511
  "type" : "boolean"
19368
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
+ },
19369
19517
  "maxTokens" : {
19370
19518
  "minimum" : 1,
19371
19519
  "type" : "integer"
@@ -19809,6 +19957,9 @@
19809
19957
  "engine" : {
19810
19958
  "$ref" : "#/components/schemas/OrganizationEngine"
19811
19959
  },
19960
+ "ocr" : {
19961
+ "$ref" : "#/components/schemas/OrganizationOcrConfig"
19962
+ },
19812
19963
  "users" : {
19813
19964
  "items" : {
19814
19965
  "$ref" : "#/components/schemas/OrganizationUser"
@@ -19926,6 +20077,45 @@
19926
20077
  },
19927
20078
  "type" : "object"
19928
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
+ },
19929
20119
  "MetricsBrainsAgentResponse" : {
19930
20120
  "properties" : {
19931
20121
  "conversationCount" : {
@@ -20115,6 +20305,9 @@
20115
20305
  },
20116
20306
  "knowledgeBaseId" : {
20117
20307
  "type" : "string"
20308
+ },
20309
+ "updatedAt" : {
20310
+ "type" : "string"
20118
20311
  }
20119
20312
  },
20120
20313
  "required" : [ "id", "name" ],
@@ -23272,6 +23465,11 @@
23272
23465
  },
23273
23466
  "type" : "object"
23274
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
+ },
23275
23473
  "TextToSpeechProvider" : {
23276
23474
  "enum" : [ "ELEVENLABS" ],
23277
23475
  "type" : "string"
@@ -23590,6 +23788,21 @@
23590
23788
  "sitePageId" : {
23591
23789
  "nullable" : true,
23592
23790
  "type" : "string"
23791
+ },
23792
+ "pathPrefix" : {
23793
+ "description" : "Restrict the crawl to a directory of the site, e.g. `/property` only keeps `/property` and its sub-paths.\n",
23794
+ "nullable" : true,
23795
+ "type" : "string"
23796
+ },
23797
+ "resync" : {
23798
+ "description" : "Re-crawl an existing site: known pages are updated in place, new pages are added and pages that disappeared are removed.\n",
23799
+ "nullable" : true,
23800
+ "type" : "boolean"
23801
+ },
23802
+ "siteId" : {
23803
+ "description" : "Existing site to re-attach the crawl to, required when `resync` is set",
23804
+ "nullable" : true,
23805
+ "type" : "string"
23593
23806
  }
23594
23807
  },
23595
23808
  "required" : [ "knowledgeBaseId", "organizationId", "urls", "userId" ],
@@ -23638,6 +23851,48 @@
23638
23851
  "required" : [ "isActive" ],
23639
23852
  "type" : "object"
23640
23853
  },
23854
+ "syncKnowledgeSiteScrapping_request" : {
23855
+ "additionalProperties" : false,
23856
+ "properties" : {
23857
+ "scrapedUrls" : {
23858
+ "description" : "URLs reached during the crawl",
23859
+ "items" : {
23860
+ "type" : "string"
23861
+ },
23862
+ "type" : "array"
23863
+ },
23864
+ "prune" : {
23865
+ "description" : "Remove the site pages missing from `scrapedUrls`",
23866
+ "nullable" : true,
23867
+ "type" : "boolean"
23868
+ },
23869
+ "pathPrefix" : {
23870
+ "description" : "Directory the crawl was restricted to, e.g. `/property`",
23871
+ "nullable" : true,
23872
+ "type" : "string"
23873
+ }
23874
+ },
23875
+ "required" : [ "scrapedUrls" ],
23876
+ "type" : "object"
23877
+ },
23878
+ "syncKnowledgeSiteScrapping_200_response" : {
23879
+ "properties" : {
23880
+ "updatedAt" : {
23881
+ "type" : "string"
23882
+ },
23883
+ "scrapedPages" : {
23884
+ "type" : "number"
23885
+ },
23886
+ "removedPages" : {
23887
+ "items" : {
23888
+ "type" : "string"
23889
+ },
23890
+ "type" : "array"
23891
+ }
23892
+ },
23893
+ "required" : [ "removedPages", "scrapedPages", "updatedAt" ],
23894
+ "type" : "object"
23895
+ },
23641
23896
  "knowledgeFileParsingCallback_request" : {
23642
23897
  "additionalProperties" : true,
23643
23898
  "properties" : {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@breign/client",
3
- "version": "1.0.143",
3
+ "version": "1.0.145",
4
4
  "main": "dist/index.js",
5
5
  "exports": {
6
6
  ".": "./dist/index.js",