@breign/client 1.0.164 → 1.0.165

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,11 +10,15 @@
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, SyncKnowledgeSiteScrapping200ResponseUio, SyncKnowledgeSiteScrappingRequestUio, UploadImageToKnowledgeBaseLibrary200ResponseUio, UploadImageToKnowledgeBaseLibraryRequestUio, UploadedStatusUpdateRequestUio } from '../models/index';
13
+ import type { AddKnowledgeSiteExclusionRequestUio, AddKnowledgeSiteExclusionResponseUio, AgentModuleUio, BodyWithMessageUio, CreateKnowledgeBaseRequestUio, CreateKnowledgeBaseResponseUio, DeleteKnowledgeSitePage200ResponseUio, FileCreationResponseUio, FileWithDownloadUrlUio, ImageKnowledgeUio, KnowledgeBaseConfigurationUio, KnowledgeBaseConfigurationUpdateRequestUio, KnowledgeBaseUio, KnowledgeBaseWithFilesUio, KnowledgeFileCreationRequestUio, KnowledgeFileParsingCallbackRequestUio, KnowledgeFileSummaryUio, KnowledgeFileUio, KnowledgeFilesByIdsRequestUio, KnowledgeSiteExclusionsUio, KnowledgeSitePageUio, KnowledgeSitePagesRemovalUio, 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;
17
17
  }
18
+ export interface AddKnowledgeSiteExclusionRequest {
19
+ fileId: string;
20
+ addKnowledgeSiteExclusionRequestUio: AddKnowledgeSiteExclusionRequestUio;
21
+ }
18
22
  export interface CreateKnowledgeBaseRequest {
19
23
  organizationId: string;
20
24
  createKnowledgeBaseRequestUio: CreateKnowledgeBaseRequestUio;
@@ -36,6 +40,10 @@ export interface DeleteKnowledgeFileRequest {
36
40
  export interface DeleteKnowledgeSitePageRequest {
37
41
  knowledgeSitePageId: string;
38
42
  }
43
+ export interface DeleteKnowledgeSitePagesUnderPathRequest {
44
+ fileId: string;
45
+ pathPrefix: string;
46
+ }
39
47
  export interface GetAgentKnowledgeFilesRequest {
40
48
  agentId: string;
41
49
  searchName?: string;
@@ -94,6 +102,10 @@ export interface PatchKnowledgeFileRequest {
94
102
  fileId: string;
95
103
  patchKnowledgeFileRequestUio: PatchKnowledgeFileRequestUio;
96
104
  }
105
+ export interface RemoveKnowledgeSiteExclusionRequest {
106
+ fileId: string;
107
+ url: string;
108
+ }
97
109
  export interface SearchKnowledgeBaseRequest {
98
110
  knowledgebaseId: string;
99
111
  searchKnowledgeBaseRequestUio: SearchKnowledgeBaseRequestUio;
@@ -141,6 +153,16 @@ export declare class KnowledgeApi extends runtime.BaseAPI {
141
153
  * Add a file to the knowledge base
142
154
  */
143
155
  addFileToKnowledgeBase(knowledgebaseId: string, knowledgeFileCreationRequestUio: KnowledgeFileCreationRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FileCreationResponseUio>;
156
+ /**
157
+ * Saves the URL among the site exclusions, which every resync applies, and removes the site pages it covers right away. An exclusion covers the URL and everything below it (`/blog` covers `/blog/a` but not `/blog-news`); an exclusion without a path covers the whole host. Adding a URL already excluded is a no-op.
158
+ * Exclude a page or directory from a scrapped site
159
+ */
160
+ addKnowledgeSiteExclusionRaw(requestParameters: AddKnowledgeSiteExclusionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AddKnowledgeSiteExclusionResponseUio>>;
161
+ /**
162
+ * Saves the URL among the site exclusions, which every resync applies, and removes the site pages it covers right away. An exclusion covers the URL and everything below it (`/blog` covers `/blog/a` but not `/blog-news`); an exclusion without a path covers the whole host. Adding a URL already excluded is a no-op.
163
+ * Exclude a page or directory from a scrapped site
164
+ */
165
+ addKnowledgeSiteExclusion(fileId: string, addKnowledgeSiteExclusionRequestUio: AddKnowledgeSiteExclusionRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AddKnowledgeSiteExclusionResponseUio>;
144
166
  /**
145
167
  * Creates a knowledge base and provisions its vector store collection. `embeddingConfig` est obligatoire lorsque `vectorStoreType` vaut `qdrant`.
146
168
  * Create a knowledge base
@@ -201,6 +223,16 @@ export declare class KnowledgeApi extends runtime.BaseAPI {
201
223
  * Delete a knowledge site page
202
224
  */
203
225
  deleteKnowledgeSitePage(knowledgeSitePageId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DeleteKnowledgeSitePage200ResponseUio>;
226
+ /**
227
+ * Removes every page located in `pathPrefix` or below it, along with its chunks and stored content. The pages are not excluded: the next resync brings them back.
228
+ * Delete the knowledge site pages of a directory
229
+ */
230
+ deleteKnowledgeSitePagesUnderPathRaw(requestParameters: DeleteKnowledgeSitePagesUnderPathRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<KnowledgeSitePagesRemovalUio>>;
231
+ /**
232
+ * Removes every page located in `pathPrefix` or below it, along with its chunks and stored content. The pages are not excluded: the next resync brings them back.
233
+ * Delete the knowledge site pages of a directory
234
+ */
235
+ deleteKnowledgeSitePagesUnderPath(fileId: string, pathPrefix: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<KnowledgeSitePagesRemovalUio>;
204
236
  /**
205
237
  * Returns all knowledge bases attached to the agent and their indexed files.
206
238
  * Get knowledge bases and files for an agent
@@ -379,6 +411,16 @@ export declare class KnowledgeApi extends runtime.BaseAPI {
379
411
  * Update a knowledge file
380
412
  */
381
413
  patchKnowledgeFile(fileId: string, patchKnowledgeFileRequestUio: PatchKnowledgeFileRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BodyWithMessageUio>;
414
+ /**
415
+ * The pages it covered are not scrapped again here: they come back with the next resync.
416
+ * Remove an exclusion from a scrapped site
417
+ */
418
+ removeKnowledgeSiteExclusionRaw(requestParameters: RemoveKnowledgeSiteExclusionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<KnowledgeSiteExclusionsUio>>;
419
+ /**
420
+ * The pages it covered are not scrapped again here: they come back with the next resync.
421
+ * Remove an exclusion from a scrapped site
422
+ */
423
+ removeKnowledgeSiteExclusion(fileId: string, url: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<KnowledgeSiteExclusionsUio>;
382
424
  /**
383
425
  * Run a vector search on a knowledge base and return matching chunks with their source files
384
426
  * Search a knowledge base
@@ -87,6 +87,40 @@ class KnowledgeApi extends runtime.BaseAPI {
87
87
  const response = await this.addFileToKnowledgeBaseRaw({ knowledgebaseId: knowledgebaseId, knowledgeFileCreationRequestUio: knowledgeFileCreationRequestUio }, initOverrides);
88
88
  return await response.value();
89
89
  }
90
+ /**
91
+ * Saves the URL among the site exclusions, which every resync applies, and removes the site pages it covers right away. An exclusion covers the URL and everything below it (`/blog` covers `/blog/a` but not `/blog-news`); an exclusion without a path covers the whole host. Adding a URL already excluded is a no-op.
92
+ * Exclude a page or directory from a scrapped site
93
+ */
94
+ async addKnowledgeSiteExclusionRaw(requestParameters, initOverrides) {
95
+ if (requestParameters['fileId'] == null) {
96
+ throw new runtime.RequiredError('fileId', 'Required parameter "fileId" was null or undefined when calling addKnowledgeSiteExclusion().');
97
+ }
98
+ if (requestParameters['addKnowledgeSiteExclusionRequestUio'] == null) {
99
+ throw new runtime.RequiredError('addKnowledgeSiteExclusionRequestUio', 'Required parameter "addKnowledgeSiteExclusionRequestUio" was null or undefined when calling addKnowledgeSiteExclusion().');
100
+ }
101
+ const queryParameters = {};
102
+ const headerParameters = {};
103
+ headerParameters['Content-Type'] = 'application/json';
104
+ if (this.configuration && this.configuration.apiKey) {
105
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
106
+ }
107
+ const response = await this.request({
108
+ path: `/knowledge-files/{fileId}/scraping-exclusions`.replace(`{${"fileId"}}`, encodeURIComponent(String(requestParameters['fileId']))),
109
+ method: 'POST',
110
+ headers: headerParameters,
111
+ query: queryParameters,
112
+ body: (0, index_1.AddKnowledgeSiteExclusionRequestUioToJSON)(requestParameters['addKnowledgeSiteExclusionRequestUio']),
113
+ }, initOverrides);
114
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AddKnowledgeSiteExclusionResponseUioFromJSON)(jsonValue));
115
+ }
116
+ /**
117
+ * Saves the URL among the site exclusions, which every resync applies, and removes the site pages it covers right away. An exclusion covers the URL and everything below it (`/blog` covers `/blog/a` but not `/blog-news`); an exclusion without a path covers the whole host. Adding a URL already excluded is a no-op.
118
+ * Exclude a page or directory from a scrapped site
119
+ */
120
+ async addKnowledgeSiteExclusion(fileId, addKnowledgeSiteExclusionRequestUio, initOverrides) {
121
+ const response = await this.addKnowledgeSiteExclusionRaw({ fileId: fileId, addKnowledgeSiteExclusionRequestUio: addKnowledgeSiteExclusionRequestUio }, initOverrides);
122
+ return await response.value();
123
+ }
90
124
  /**
91
125
  * Creates a knowledge base and provisions its vector store collection. `embeddingConfig` est obligatoire lorsque `vectorStoreType` vaut `qdrant`.
92
126
  * Create a knowledge base
@@ -272,6 +306,41 @@ class KnowledgeApi extends runtime.BaseAPI {
272
306
  const response = await this.deleteKnowledgeSitePageRaw({ knowledgeSitePageId: knowledgeSitePageId }, initOverrides);
273
307
  return await response.value();
274
308
  }
309
+ /**
310
+ * Removes every page located in `pathPrefix` or below it, along with its chunks and stored content. The pages are not excluded: the next resync brings them back.
311
+ * Delete the knowledge site pages of a directory
312
+ */
313
+ async deleteKnowledgeSitePagesUnderPathRaw(requestParameters, initOverrides) {
314
+ if (requestParameters['fileId'] == null) {
315
+ throw new runtime.RequiredError('fileId', 'Required parameter "fileId" was null or undefined when calling deleteKnowledgeSitePagesUnderPath().');
316
+ }
317
+ if (requestParameters['pathPrefix'] == null) {
318
+ throw new runtime.RequiredError('pathPrefix', 'Required parameter "pathPrefix" was null or undefined when calling deleteKnowledgeSitePagesUnderPath().');
319
+ }
320
+ const queryParameters = {};
321
+ if (requestParameters['pathPrefix'] != null) {
322
+ queryParameters['pathPrefix'] = requestParameters['pathPrefix'];
323
+ }
324
+ const headerParameters = {};
325
+ if (this.configuration && this.configuration.apiKey) {
326
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
327
+ }
328
+ const response = await this.request({
329
+ path: `/knowledge-files/{fileId}/knowledge-site-pages`.replace(`{${"fileId"}}`, encodeURIComponent(String(requestParameters['fileId']))),
330
+ method: 'DELETE',
331
+ headers: headerParameters,
332
+ query: queryParameters,
333
+ }, initOverrides);
334
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.KnowledgeSitePagesRemovalUioFromJSON)(jsonValue));
335
+ }
336
+ /**
337
+ * Removes every page located in `pathPrefix` or below it, along with its chunks and stored content. The pages are not excluded: the next resync brings them back.
338
+ * Delete the knowledge site pages of a directory
339
+ */
340
+ async deleteKnowledgeSitePagesUnderPath(fileId, pathPrefix, initOverrides) {
341
+ const response = await this.deleteKnowledgeSitePagesUnderPathRaw({ fileId: fileId, pathPrefix: pathPrefix }, initOverrides);
342
+ return await response.value();
343
+ }
275
344
  /**
276
345
  * Returns all knowledge bases attached to the agent and their indexed files.
277
346
  * Get knowledge bases and files for an agent
@@ -800,6 +869,41 @@ class KnowledgeApi extends runtime.BaseAPI {
800
869
  const response = await this.patchKnowledgeFileRaw({ fileId: fileId, patchKnowledgeFileRequestUio: patchKnowledgeFileRequestUio }, initOverrides);
801
870
  return await response.value();
802
871
  }
872
+ /**
873
+ * The pages it covered are not scrapped again here: they come back with the next resync.
874
+ * Remove an exclusion from a scrapped site
875
+ */
876
+ async removeKnowledgeSiteExclusionRaw(requestParameters, initOverrides) {
877
+ if (requestParameters['fileId'] == null) {
878
+ throw new runtime.RequiredError('fileId', 'Required parameter "fileId" was null or undefined when calling removeKnowledgeSiteExclusion().');
879
+ }
880
+ if (requestParameters['url'] == null) {
881
+ throw new runtime.RequiredError('url', 'Required parameter "url" was null or undefined when calling removeKnowledgeSiteExclusion().');
882
+ }
883
+ const queryParameters = {};
884
+ if (requestParameters['url'] != null) {
885
+ queryParameters['url'] = requestParameters['url'];
886
+ }
887
+ const headerParameters = {};
888
+ if (this.configuration && this.configuration.apiKey) {
889
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
890
+ }
891
+ const response = await this.request({
892
+ path: `/knowledge-files/{fileId}/scraping-exclusions`.replace(`{${"fileId"}}`, encodeURIComponent(String(requestParameters['fileId']))),
893
+ method: 'DELETE',
894
+ headers: headerParameters,
895
+ query: queryParameters,
896
+ }, initOverrides);
897
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.KnowledgeSiteExclusionsUioFromJSON)(jsonValue));
898
+ }
899
+ /**
900
+ * The pages it covered are not scrapped again here: they come back with the next resync.
901
+ * Remove an exclusion from a scrapped site
902
+ */
903
+ async removeKnowledgeSiteExclusion(fileId, url, initOverrides) {
904
+ const response = await this.removeKnowledgeSiteExclusionRaw({ fileId: fileId, url: url }, initOverrides);
905
+ return await response.value();
906
+ }
803
907
  /**
804
908
  * Run a vector search on a knowledge base and return matching chunks with their source files
805
909
  * Search a knowledge base
@@ -0,0 +1,32 @@
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 AddKnowledgeSiteExclusionRequestUio
16
+ */
17
+ export interface AddKnowledgeSiteExclusionRequestUio {
18
+ /**
19
+ * Page or directory of the site to exclude, e.g. `https://site.com/blog`
20
+ * @type {string}
21
+ * @memberof AddKnowledgeSiteExclusionRequestUio
22
+ */
23
+ url: string;
24
+ }
25
+ /**
26
+ * Check if a given object implements the AddKnowledgeSiteExclusionRequestUio interface.
27
+ */
28
+ export declare function instanceOfAddKnowledgeSiteExclusionRequestUio(value: object): value is AddKnowledgeSiteExclusionRequestUio;
29
+ export declare function AddKnowledgeSiteExclusionRequestUioFromJSON(json: any): AddKnowledgeSiteExclusionRequestUio;
30
+ export declare function AddKnowledgeSiteExclusionRequestUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): AddKnowledgeSiteExclusionRequestUio;
31
+ export declare function AddKnowledgeSiteExclusionRequestUioToJSON(json: any): AddKnowledgeSiteExclusionRequestUio;
32
+ export declare function AddKnowledgeSiteExclusionRequestUioToJSONTyped(value?: AddKnowledgeSiteExclusionRequestUio | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,50 @@
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.instanceOfAddKnowledgeSiteExclusionRequestUio = instanceOfAddKnowledgeSiteExclusionRequestUio;
17
+ exports.AddKnowledgeSiteExclusionRequestUioFromJSON = AddKnowledgeSiteExclusionRequestUioFromJSON;
18
+ exports.AddKnowledgeSiteExclusionRequestUioFromJSONTyped = AddKnowledgeSiteExclusionRequestUioFromJSONTyped;
19
+ exports.AddKnowledgeSiteExclusionRequestUioToJSON = AddKnowledgeSiteExclusionRequestUioToJSON;
20
+ exports.AddKnowledgeSiteExclusionRequestUioToJSONTyped = AddKnowledgeSiteExclusionRequestUioToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the AddKnowledgeSiteExclusionRequestUio interface.
23
+ */
24
+ function instanceOfAddKnowledgeSiteExclusionRequestUio(value) {
25
+ if (!('url' in value) || value['url'] === undefined)
26
+ return false;
27
+ return true;
28
+ }
29
+ function AddKnowledgeSiteExclusionRequestUioFromJSON(json) {
30
+ return AddKnowledgeSiteExclusionRequestUioFromJSONTyped(json, false);
31
+ }
32
+ function AddKnowledgeSiteExclusionRequestUioFromJSONTyped(json, ignoreDiscriminator) {
33
+ if (json == null) {
34
+ return json;
35
+ }
36
+ return {
37
+ 'url': json['url'],
38
+ };
39
+ }
40
+ function AddKnowledgeSiteExclusionRequestUioToJSON(json) {
41
+ return AddKnowledgeSiteExclusionRequestUioToJSONTyped(json, false);
42
+ }
43
+ function AddKnowledgeSiteExclusionRequestUioToJSONTyped(value, ignoreDiscriminator = false) {
44
+ if (value == null) {
45
+ return value;
46
+ }
47
+ return {
48
+ 'url': value['url'],
49
+ };
50
+ }
@@ -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 AddKnowledgeSiteExclusionResponseUio
16
+ */
17
+ export interface AddKnowledgeSiteExclusionResponseUio {
18
+ /**
19
+ *
20
+ * @type {Array<string>}
21
+ * @memberof AddKnowledgeSiteExclusionResponseUio
22
+ */
23
+ scrapingExclusions: Array<string>;
24
+ /**
25
+ * URLs of the removed pages
26
+ * @type {Array<string>}
27
+ * @memberof AddKnowledgeSiteExclusionResponseUio
28
+ */
29
+ removedPages: Array<string>;
30
+ /**
31
+ * URLs of the pages that could not be removed
32
+ * @type {Array<string>}
33
+ * @memberof AddKnowledgeSiteExclusionResponseUio
34
+ */
35
+ failedPages: Array<string>;
36
+ }
37
+ /**
38
+ * Check if a given object implements the AddKnowledgeSiteExclusionResponseUio interface.
39
+ */
40
+ export declare function instanceOfAddKnowledgeSiteExclusionResponseUio(value: object): value is AddKnowledgeSiteExclusionResponseUio;
41
+ export declare function AddKnowledgeSiteExclusionResponseUioFromJSON(json: any): AddKnowledgeSiteExclusionResponseUio;
42
+ export declare function AddKnowledgeSiteExclusionResponseUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): AddKnowledgeSiteExclusionResponseUio;
43
+ export declare function AddKnowledgeSiteExclusionResponseUioToJSON(json: any): AddKnowledgeSiteExclusionResponseUio;
44
+ export declare function AddKnowledgeSiteExclusionResponseUioToJSONTyped(value?: AddKnowledgeSiteExclusionResponseUio | 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.instanceOfAddKnowledgeSiteExclusionResponseUio = instanceOfAddKnowledgeSiteExclusionResponseUio;
17
+ exports.AddKnowledgeSiteExclusionResponseUioFromJSON = AddKnowledgeSiteExclusionResponseUioFromJSON;
18
+ exports.AddKnowledgeSiteExclusionResponseUioFromJSONTyped = AddKnowledgeSiteExclusionResponseUioFromJSONTyped;
19
+ exports.AddKnowledgeSiteExclusionResponseUioToJSON = AddKnowledgeSiteExclusionResponseUioToJSON;
20
+ exports.AddKnowledgeSiteExclusionResponseUioToJSONTyped = AddKnowledgeSiteExclusionResponseUioToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the AddKnowledgeSiteExclusionResponseUio interface.
23
+ */
24
+ function instanceOfAddKnowledgeSiteExclusionResponseUio(value) {
25
+ if (!('scrapingExclusions' in value) || value['scrapingExclusions'] === undefined)
26
+ return false;
27
+ if (!('removedPages' in value) || value['removedPages'] === undefined)
28
+ return false;
29
+ if (!('failedPages' in value) || value['failedPages'] === undefined)
30
+ return false;
31
+ return true;
32
+ }
33
+ function AddKnowledgeSiteExclusionResponseUioFromJSON(json) {
34
+ return AddKnowledgeSiteExclusionResponseUioFromJSONTyped(json, false);
35
+ }
36
+ function AddKnowledgeSiteExclusionResponseUioFromJSONTyped(json, ignoreDiscriminator) {
37
+ if (json == null) {
38
+ return json;
39
+ }
40
+ return {
41
+ 'scrapingExclusions': json['scrapingExclusions'],
42
+ 'removedPages': json['removedPages'],
43
+ 'failedPages': json['failedPages'],
44
+ };
45
+ }
46
+ function AddKnowledgeSiteExclusionResponseUioToJSON(json) {
47
+ return AddKnowledgeSiteExclusionResponseUioToJSONTyped(json, false);
48
+ }
49
+ function AddKnowledgeSiteExclusionResponseUioToJSONTyped(value, ignoreDiscriminator = false) {
50
+ if (value == null) {
51
+ return value;
52
+ }
53
+ return {
54
+ 'scrapingExclusions': value['scrapingExclusions'],
55
+ 'removedPages': value['removedPages'],
56
+ 'failedPages': value['failedPages'],
57
+ };
58
+ }
@@ -133,6 +133,13 @@ export interface FileCreationResponseUio {
133
133
  * @memberof FileCreationResponseUio
134
134
  */
135
135
  isActive?: boolean;
136
+ /**
137
+ * Websites only. URLs never scraped, each one along with everything below it, applied on every resync.
138
+ *
139
+ * @type {Array<string>}
140
+ * @memberof FileCreationResponseUio
141
+ */
142
+ scrapingExclusions?: Array<string>;
136
143
  /**
137
144
  *
138
145
  * @type {UploadMethodUio}
@@ -72,6 +72,7 @@ function FileCreationResponseUioFromJSONTyped(json, ignoreDiscriminator) {
72
72
  'status': json['status'] == null ? undefined : (0, FileStatusUio_1.FileStatusUioFromJSON)(json['status']),
73
73
  'error': json['error'] == null ? undefined : json['error'],
74
74
  'isActive': json['isActive'] == null ? undefined : json['isActive'],
75
+ 'scrapingExclusions': json['scrapingExclusions'] == null ? undefined : json['scrapingExclusions'],
75
76
  'method': (0, UploadMethodUio_1.UploadMethodUioFromJSON)(json['method']),
76
77
  'headers': json['headers'],
77
78
  };
@@ -103,6 +104,7 @@ function FileCreationResponseUioToJSONTyped(value, ignoreDiscriminator = false)
103
104
  'status': (0, FileStatusUio_1.FileStatusUioToJSON)(value['status']),
104
105
  'error': value['error'],
105
106
  'isActive': value['isActive'],
107
+ 'scrapingExclusions': value['scrapingExclusions'],
106
108
  'method': (0, UploadMethodUio_1.UploadMethodUioToJSON)(value['method']),
107
109
  'headers': value['headers'],
108
110
  };
@@ -132,6 +132,13 @@ export interface FileUio {
132
132
  * @memberof FileUio
133
133
  */
134
134
  isActive?: boolean;
135
+ /**
136
+ * Websites only. URLs never scraped, each one along with everything below it, applied on every resync.
137
+ *
138
+ * @type {Array<string>}
139
+ * @memberof FileUio
140
+ */
141
+ scrapingExclusions?: Array<string>;
135
142
  }
136
143
  /**
137
144
  * @export
@@ -63,6 +63,7 @@ function FileUioFromJSONTyped(json, ignoreDiscriminator) {
63
63
  'status': json['status'] == null ? undefined : (0, FileStatusUio_1.FileStatusUioFromJSON)(json['status']),
64
64
  'error': json['error'] == null ? undefined : json['error'],
65
65
  'isActive': json['isActive'] == null ? undefined : json['isActive'],
66
+ 'scrapingExclusions': json['scrapingExclusions'] == null ? undefined : json['scrapingExclusions'],
66
67
  };
67
68
  }
68
69
  function FileUioToJSON(json) {
@@ -92,5 +93,6 @@ function FileUioToJSONTyped(value, ignoreDiscriminator = false) {
92
93
  'status': (0, FileStatusUio_1.FileStatusUioToJSON)(value['status']),
93
94
  'error': value['error'],
94
95
  'isActive': value['isActive'],
96
+ 'scrapingExclusions': value['scrapingExclusions'],
95
97
  };
96
98
  }
@@ -132,6 +132,13 @@ export interface FileWithDownloadUrlUio {
132
132
  * @memberof FileWithDownloadUrlUio
133
133
  */
134
134
  isActive?: boolean;
135
+ /**
136
+ * Websites only. URLs never scraped, each one along with everything below it, applied on every resync.
137
+ *
138
+ * @type {Array<string>}
139
+ * @memberof FileWithDownloadUrlUio
140
+ */
141
+ scrapingExclusions?: Array<string>;
135
142
  /**
136
143
  * Temporary URL to download the file
137
144
  * @type {string}
@@ -65,6 +65,7 @@ function FileWithDownloadUrlUioFromJSONTyped(json, ignoreDiscriminator) {
65
65
  'status': json['status'] == null ? undefined : (0, FileStatusUio_1.FileStatusUioFromJSON)(json['status']),
66
66
  'error': json['error'] == null ? undefined : json['error'],
67
67
  'isActive': json['isActive'] == null ? undefined : json['isActive'],
68
+ 'scrapingExclusions': json['scrapingExclusions'] == null ? undefined : json['scrapingExclusions'],
68
69
  'downloadURL': json['downloadURL'],
69
70
  };
70
71
  }
@@ -95,6 +96,7 @@ function FileWithDownloadUrlUioToJSONTyped(value, ignoreDiscriminator = false) {
95
96
  'status': (0, FileStatusUio_1.FileStatusUioToJSON)(value['status']),
96
97
  'error': value['error'],
97
98
  'isActive': value['isActive'],
99
+ 'scrapingExclusions': value['scrapingExclusions'],
98
100
  'downloadURL': value['downloadURL'],
99
101
  };
100
102
  }
@@ -132,6 +132,13 @@ export interface KnowledgeFileUio {
132
132
  * @memberof KnowledgeFileUio
133
133
  */
134
134
  isActive?: boolean;
135
+ /**
136
+ * Websites only. URLs never scraped, each one along with everything below it, applied on every resync.
137
+ *
138
+ * @type {Array<string>}
139
+ * @memberof KnowledgeFileUio
140
+ */
141
+ scrapingExclusions?: Array<string>;
135
142
  }
136
143
  /**
137
144
  * @export
@@ -63,6 +63,7 @@ function KnowledgeFileUioFromJSONTyped(json, ignoreDiscriminator) {
63
63
  'status': json['status'] == null ? undefined : (0, FileStatusUio_1.FileStatusUioFromJSON)(json['status']),
64
64
  'error': json['error'] == null ? undefined : json['error'],
65
65
  'isActive': json['isActive'] == null ? undefined : json['isActive'],
66
+ 'scrapingExclusions': json['scrapingExclusions'] == null ? undefined : json['scrapingExclusions'],
66
67
  };
67
68
  }
68
69
  function KnowledgeFileUioToJSON(json) {
@@ -92,5 +93,6 @@ function KnowledgeFileUioToJSONTyped(value, ignoreDiscriminator = false) {
92
93
  'status': (0, FileStatusUio_1.FileStatusUioToJSON)(value['status']),
93
94
  'error': value['error'],
94
95
  'isActive': value['isActive'],
96
+ 'scrapingExclusions': value['scrapingExclusions'],
95
97
  };
96
98
  }
@@ -0,0 +1,32 @@
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 KnowledgeSiteExclusionsUio
16
+ */
17
+ export interface KnowledgeSiteExclusionsUio {
18
+ /**
19
+ *
20
+ * @type {Array<string>}
21
+ * @memberof KnowledgeSiteExclusionsUio
22
+ */
23
+ scrapingExclusions: Array<string>;
24
+ }
25
+ /**
26
+ * Check if a given object implements the KnowledgeSiteExclusionsUio interface.
27
+ */
28
+ export declare function instanceOfKnowledgeSiteExclusionsUio(value: object): value is KnowledgeSiteExclusionsUio;
29
+ export declare function KnowledgeSiteExclusionsUioFromJSON(json: any): KnowledgeSiteExclusionsUio;
30
+ export declare function KnowledgeSiteExclusionsUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): KnowledgeSiteExclusionsUio;
31
+ export declare function KnowledgeSiteExclusionsUioToJSON(json: any): KnowledgeSiteExclusionsUio;
32
+ export declare function KnowledgeSiteExclusionsUioToJSONTyped(value?: KnowledgeSiteExclusionsUio | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,50 @@
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.instanceOfKnowledgeSiteExclusionsUio = instanceOfKnowledgeSiteExclusionsUio;
17
+ exports.KnowledgeSiteExclusionsUioFromJSON = KnowledgeSiteExclusionsUioFromJSON;
18
+ exports.KnowledgeSiteExclusionsUioFromJSONTyped = KnowledgeSiteExclusionsUioFromJSONTyped;
19
+ exports.KnowledgeSiteExclusionsUioToJSON = KnowledgeSiteExclusionsUioToJSON;
20
+ exports.KnowledgeSiteExclusionsUioToJSONTyped = KnowledgeSiteExclusionsUioToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the KnowledgeSiteExclusionsUio interface.
23
+ */
24
+ function instanceOfKnowledgeSiteExclusionsUio(value) {
25
+ if (!('scrapingExclusions' in value) || value['scrapingExclusions'] === undefined)
26
+ return false;
27
+ return true;
28
+ }
29
+ function KnowledgeSiteExclusionsUioFromJSON(json) {
30
+ return KnowledgeSiteExclusionsUioFromJSONTyped(json, false);
31
+ }
32
+ function KnowledgeSiteExclusionsUioFromJSONTyped(json, ignoreDiscriminator) {
33
+ if (json == null) {
34
+ return json;
35
+ }
36
+ return {
37
+ 'scrapingExclusions': json['scrapingExclusions'],
38
+ };
39
+ }
40
+ function KnowledgeSiteExclusionsUioToJSON(json) {
41
+ return KnowledgeSiteExclusionsUioToJSONTyped(json, false);
42
+ }
43
+ function KnowledgeSiteExclusionsUioToJSONTyped(value, ignoreDiscriminator = false) {
44
+ if (value == null) {
45
+ return value;
46
+ }
47
+ return {
48
+ 'scrapingExclusions': value['scrapingExclusions'],
49
+ };
50
+ }
@@ -0,0 +1,38 @@
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 KnowledgeSitePagesRemovalUio
16
+ */
17
+ export interface KnowledgeSitePagesRemovalUio {
18
+ /**
19
+ * URLs of the removed pages
20
+ * @type {Array<string>}
21
+ * @memberof KnowledgeSitePagesRemovalUio
22
+ */
23
+ removedPages: Array<string>;
24
+ /**
25
+ * URLs of the pages that could not be removed
26
+ * @type {Array<string>}
27
+ * @memberof KnowledgeSitePagesRemovalUio
28
+ */
29
+ failedPages: Array<string>;
30
+ }
31
+ /**
32
+ * Check if a given object implements the KnowledgeSitePagesRemovalUio interface.
33
+ */
34
+ export declare function instanceOfKnowledgeSitePagesRemovalUio(value: object): value is KnowledgeSitePagesRemovalUio;
35
+ export declare function KnowledgeSitePagesRemovalUioFromJSON(json: any): KnowledgeSitePagesRemovalUio;
36
+ export declare function KnowledgeSitePagesRemovalUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): KnowledgeSitePagesRemovalUio;
37
+ export declare function KnowledgeSitePagesRemovalUioToJSON(json: any): KnowledgeSitePagesRemovalUio;
38
+ export declare function KnowledgeSitePagesRemovalUioToJSONTyped(value?: KnowledgeSitePagesRemovalUio | 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.instanceOfKnowledgeSitePagesRemovalUio = instanceOfKnowledgeSitePagesRemovalUio;
17
+ exports.KnowledgeSitePagesRemovalUioFromJSON = KnowledgeSitePagesRemovalUioFromJSON;
18
+ exports.KnowledgeSitePagesRemovalUioFromJSONTyped = KnowledgeSitePagesRemovalUioFromJSONTyped;
19
+ exports.KnowledgeSitePagesRemovalUioToJSON = KnowledgeSitePagesRemovalUioToJSON;
20
+ exports.KnowledgeSitePagesRemovalUioToJSONTyped = KnowledgeSitePagesRemovalUioToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the KnowledgeSitePagesRemovalUio interface.
23
+ */
24
+ function instanceOfKnowledgeSitePagesRemovalUio(value) {
25
+ if (!('removedPages' in value) || value['removedPages'] === undefined)
26
+ return false;
27
+ if (!('failedPages' in value) || value['failedPages'] === undefined)
28
+ return false;
29
+ return true;
30
+ }
31
+ function KnowledgeSitePagesRemovalUioFromJSON(json) {
32
+ return KnowledgeSitePagesRemovalUioFromJSONTyped(json, false);
33
+ }
34
+ function KnowledgeSitePagesRemovalUioFromJSONTyped(json, ignoreDiscriminator) {
35
+ if (json == null) {
36
+ return json;
37
+ }
38
+ return {
39
+ 'removedPages': json['removedPages'],
40
+ 'failedPages': json['failedPages'],
41
+ };
42
+ }
43
+ function KnowledgeSitePagesRemovalUioToJSON(json) {
44
+ return KnowledgeSitePagesRemovalUioToJSONTyped(json, false);
45
+ }
46
+ function KnowledgeSitePagesRemovalUioToJSONTyped(value, ignoreDiscriminator = false) {
47
+ if (value == null) {
48
+ return value;
49
+ }
50
+ return {
51
+ 'removedPages': value['removedPages'],
52
+ 'failedPages': value['failedPages'],
53
+ };
54
+ }
@@ -52,6 +52,7 @@ export interface StartKnowledgeBaseScrappingRequestUio {
52
52
  */
53
53
  spiderName?: string | null;
54
54
  /**
55
+ * URLs to exclude, each one along with everything below it. Saved on the site when the crawl creates it. Ignored with `resync`, which applies the exclusions saved on the site.
55
56
  *
56
57
  * @type {Array<string>}
57
58
  * @memberof StartKnowledgeBaseScrappingRequestUio
@@ -5,6 +5,8 @@ export * from './AccessRoleUpdateRequestUio';
5
5
  export * from './AddCustomFiller201ResponseFillerUio';
6
6
  export * from './AddCustomFiller201ResponseUio';
7
7
  export * from './AddCustomFillerRequestUio';
8
+ export * from './AddKnowledgeSiteExclusionRequestUio';
9
+ export * from './AddKnowledgeSiteExclusionResponseUio';
8
10
  export * from './AddModuleRequestUio';
9
11
  export * from './AdditionalUio';
10
12
  export * from './AdvancedFlowEditorEdgeUio';
@@ -301,7 +303,9 @@ export * from './KnowledgeFileParsingCallbackRequestUio';
301
303
  export * from './KnowledgeFileSummaryUio';
302
304
  export * from './KnowledgeFileUio';
303
305
  export * from './KnowledgeFilesByIdsRequestUio';
306
+ export * from './KnowledgeSiteExclusionsUio';
304
307
  export * from './KnowledgeSitePageUio';
308
+ export * from './KnowledgeSitePagesRemovalUio';
305
309
  export * from './LibraryAgentBundleSummaryUio';
306
310
  export * from './LibraryAgentDiffResponseUio';
307
311
  export * from './LibraryAgentDiffVersionRefUio';
@@ -23,6 +23,8 @@ __exportStar(require("./AccessRoleUpdateRequestUio"), exports);
23
23
  __exportStar(require("./AddCustomFiller201ResponseFillerUio"), exports);
24
24
  __exportStar(require("./AddCustomFiller201ResponseUio"), exports);
25
25
  __exportStar(require("./AddCustomFillerRequestUio"), exports);
26
+ __exportStar(require("./AddKnowledgeSiteExclusionRequestUio"), exports);
27
+ __exportStar(require("./AddKnowledgeSiteExclusionResponseUio"), exports);
26
28
  __exportStar(require("./AddModuleRequestUio"), exports);
27
29
  __exportStar(require("./AdditionalUio"), exports);
28
30
  __exportStar(require("./AdvancedFlowEditorEdgeUio"), exports);
@@ -319,7 +321,9 @@ __exportStar(require("./KnowledgeFileParsingCallbackRequestUio"), exports);
319
321
  __exportStar(require("./KnowledgeFileSummaryUio"), exports);
320
322
  __exportStar(require("./KnowledgeFileUio"), exports);
321
323
  __exportStar(require("./KnowledgeFilesByIdsRequestUio"), exports);
324
+ __exportStar(require("./KnowledgeSiteExclusionsUio"), exports);
322
325
  __exportStar(require("./KnowledgeSitePageUio"), exports);
326
+ __exportStar(require("./KnowledgeSitePagesRemovalUio"), exports);
323
327
  __exportStar(require("./LibraryAgentBundleSummaryUio"), exports);
324
328
  __exportStar(require("./LibraryAgentDiffResponseUio"), exports);
325
329
  __exportStar(require("./LibraryAgentDiffVersionRefUio"), exports);
package/dist/openapi.json CHANGED
@@ -10839,6 +10839,56 @@
10839
10839
  }
10840
10840
  },
10841
10841
  "/knowledge-files/{fileId}/knowledge-site-pages" : {
10842
+ "delete" : {
10843
+ "description" : "Removes every page located in `pathPrefix` or below it, along with its chunks and stored content. The pages are not excluded: the next resync brings them back.\n",
10844
+ "operationId" : "deleteKnowledgeSitePagesUnderPath",
10845
+ "parameters" : [ {
10846
+ "description" : "The ID of the file",
10847
+ "in" : "path",
10848
+ "name" : "fileId",
10849
+ "required" : true,
10850
+ "schema" : {
10851
+ "type" : "string"
10852
+ }
10853
+ }, {
10854
+ "description" : "Directory of the site, e.g. `/blog`",
10855
+ "in" : "query",
10856
+ "name" : "pathPrefix",
10857
+ "required" : true,
10858
+ "schema" : {
10859
+ "type" : "string"
10860
+ }
10861
+ } ],
10862
+ "responses" : {
10863
+ "200" : {
10864
+ "content" : {
10865
+ "application/json" : {
10866
+ "schema" : {
10867
+ "$ref" : "#/components/schemas/KnowledgeSitePagesRemoval"
10868
+ }
10869
+ }
10870
+ },
10871
+ "description" : "Pages removed"
10872
+ },
10873
+ "400" : {
10874
+ "description" : "Not a website, or empty `pathPrefix`"
10875
+ },
10876
+ "401" : {
10877
+ "description" : "Unauthorized"
10878
+ },
10879
+ "403" : {
10880
+ "description" : "Forbidden - User is not admin of the organization"
10881
+ },
10882
+ "404" : {
10883
+ "description" : "Knowledge site or knowledge base not found"
10884
+ },
10885
+ "409" : {
10886
+ "description" : "The directory holds every page of the site (`SITE_WOULD_BE_EMPTY`)"
10887
+ }
10888
+ },
10889
+ "summary" : "Delete the knowledge site pages of a directory",
10890
+ "tags" : [ "knowledge" ]
10891
+ },
10842
10892
  "get" : {
10843
10893
  "description" : "Get the scraped site pages attached to a knowledge file of type website",
10844
10894
  "operationId" : "getKnowledgeSitePagesForFile",
@@ -10930,6 +10980,107 @@
10930
10980
  "tags" : [ "knowledge" ]
10931
10981
  }
10932
10982
  },
10983
+ "/knowledge-files/{fileId}/scraping-exclusions" : {
10984
+ "delete" : {
10985
+ "description" : "The pages it covered are not scrapped again here: they come back with the next resync.\n",
10986
+ "operationId" : "removeKnowledgeSiteExclusion",
10987
+ "parameters" : [ {
10988
+ "description" : "The ID of the file",
10989
+ "in" : "path",
10990
+ "name" : "fileId",
10991
+ "required" : true,
10992
+ "schema" : {
10993
+ "type" : "string"
10994
+ }
10995
+ }, {
10996
+ "description" : "The exclusion to remove, as returned in `scrapingExclusions`",
10997
+ "in" : "query",
10998
+ "name" : "url",
10999
+ "required" : true,
11000
+ "schema" : {
11001
+ "type" : "string"
11002
+ }
11003
+ } ],
11004
+ "responses" : {
11005
+ "200" : {
11006
+ "content" : {
11007
+ "application/json" : {
11008
+ "schema" : {
11009
+ "$ref" : "#/components/schemas/KnowledgeSiteExclusions"
11010
+ }
11011
+ }
11012
+ },
11013
+ "description" : "Exclusion removed"
11014
+ },
11015
+ "400" : {
11016
+ "description" : "Not a website or invalid URL"
11017
+ },
11018
+ "401" : {
11019
+ "description" : "Unauthorized"
11020
+ },
11021
+ "403" : {
11022
+ "description" : "Forbidden - User is not admin of the organization"
11023
+ },
11024
+ "404" : {
11025
+ "description" : "Knowledge site, knowledge base or exclusion not found"
11026
+ }
11027
+ },
11028
+ "summary" : "Remove an exclusion from a scrapped site",
11029
+ "tags" : [ "knowledge" ]
11030
+ },
11031
+ "post" : {
11032
+ "description" : "Saves the URL among the site exclusions, which every resync applies, and removes the site pages it covers right away. An exclusion covers the URL and everything below it (`/blog` covers `/blog/a` but not `/blog-news`); an exclusion without a path covers the whole host. Adding a URL already excluded is a no-op.\n",
11033
+ "operationId" : "addKnowledgeSiteExclusion",
11034
+ "parameters" : [ {
11035
+ "description" : "The ID of the file",
11036
+ "in" : "path",
11037
+ "name" : "fileId",
11038
+ "required" : true,
11039
+ "schema" : {
11040
+ "type" : "string"
11041
+ }
11042
+ } ],
11043
+ "requestBody" : {
11044
+ "content" : {
11045
+ "application/json" : {
11046
+ "schema" : {
11047
+ "$ref" : "#/components/schemas/AddKnowledgeSiteExclusionRequest"
11048
+ }
11049
+ }
11050
+ },
11051
+ "required" : true
11052
+ },
11053
+ "responses" : {
11054
+ "200" : {
11055
+ "content" : {
11056
+ "application/json" : {
11057
+ "schema" : {
11058
+ "$ref" : "#/components/schemas/AddKnowledgeSiteExclusionResponse"
11059
+ }
11060
+ }
11061
+ },
11062
+ "description" : "Exclusion saved and covered pages removed"
11063
+ },
11064
+ "400" : {
11065
+ "description" : "Not a website, invalid URL, URL outside the site, or too many exclusions"
11066
+ },
11067
+ "401" : {
11068
+ "description" : "Unauthorized"
11069
+ },
11070
+ "403" : {
11071
+ "description" : "Forbidden - User is not admin of the organization"
11072
+ },
11073
+ "404" : {
11074
+ "description" : "Knowledge site or knowledge base not found"
11075
+ },
11076
+ "409" : {
11077
+ "description" : "The exclusion covers every page of the site (`SITE_WOULD_BE_EMPTY`)"
11078
+ }
11079
+ },
11080
+ "summary" : "Exclude a page or directory from a scrapped site",
11081
+ "tags" : [ "knowledge" ]
11082
+ }
11083
+ },
10933
11084
  "/knowledge-files/{fileId}/status" : {
10934
11085
  "post" : {
10935
11086
  "description" : "Updates the status of a knowledge file and triggers indexing when uploaded",
@@ -18615,6 +18766,13 @@
18615
18766
  },
18616
18767
  "isActive" : {
18617
18768
  "type" : "boolean"
18769
+ },
18770
+ "scrapingExclusions" : {
18771
+ "description" : "Websites only. URLs never scraped, each one along with everything below it, applied on every resync.\n",
18772
+ "items" : {
18773
+ "type" : "string"
18774
+ },
18775
+ "type" : "array"
18618
18776
  }
18619
18777
  },
18620
18778
  "required" : [ "id" ],
@@ -23042,6 +23200,58 @@
23042
23200
  "required" : [ "createdAt", "id", "isActive", "key", "knowledgeBaseId", "name", "siteId", "status", "updatedAt", "url" ],
23043
23201
  "type" : "object"
23044
23202
  },
23203
+ "KnowledgeSitePagesRemoval" : {
23204
+ "properties" : {
23205
+ "removedPages" : {
23206
+ "description" : "URLs of the removed pages",
23207
+ "items" : {
23208
+ "type" : "string"
23209
+ },
23210
+ "type" : "array"
23211
+ },
23212
+ "failedPages" : {
23213
+ "description" : "URLs of the pages that could not be removed",
23214
+ "items" : {
23215
+ "type" : "string"
23216
+ },
23217
+ "type" : "array"
23218
+ }
23219
+ },
23220
+ "required" : [ "failedPages", "removedPages" ],
23221
+ "type" : "object"
23222
+ },
23223
+ "AddKnowledgeSiteExclusionRequest" : {
23224
+ "additionalProperties" : false,
23225
+ "properties" : {
23226
+ "url" : {
23227
+ "description" : "Page or directory of the site to exclude, e.g. `https://site.com/blog`",
23228
+ "maxLength" : 2048,
23229
+ "minLength" : 1,
23230
+ "type" : "string"
23231
+ }
23232
+ },
23233
+ "required" : [ "url" ],
23234
+ "type" : "object"
23235
+ },
23236
+ "AddKnowledgeSiteExclusionResponse" : {
23237
+ "allOf" : [ {
23238
+ "$ref" : "#/components/schemas/KnowledgeSiteExclusions"
23239
+ }, {
23240
+ "$ref" : "#/components/schemas/KnowledgeSitePagesRemoval"
23241
+ } ]
23242
+ },
23243
+ "KnowledgeSiteExclusions" : {
23244
+ "properties" : {
23245
+ "scrapingExclusions" : {
23246
+ "items" : {
23247
+ "type" : "string"
23248
+ },
23249
+ "type" : "array"
23250
+ }
23251
+ },
23252
+ "required" : [ "scrapingExclusions" ],
23253
+ "type" : "object"
23254
+ },
23045
23255
  "KnowledgeFilesByIdsRequest" : {
23046
23256
  "properties" : {
23047
23257
  "ids" : {
@@ -26529,6 +26739,7 @@
26529
26739
  "type" : "string"
26530
26740
  },
26531
26741
  "excludeDomains" : {
26742
+ "description" : "URLs to exclude, each one along with everything below it. Saved on the site when the crawl creates it. Ignored with `resync`, which applies the exclusions saved on the site.\n",
26532
26743
  "items" : {
26533
26744
  "type" : "string"
26534
26745
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@breign/client",
3
- "version": "1.0.164",
3
+ "version": "1.0.165",
4
4
  "main": "dist/index.js",
5
5
  "exports": {
6
6
  ".": "./dist/index.js",