@breign/client 1.0.143 → 1.0.144
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.
- package/dist/apis/KnowledgeApi.d.ts +15 -1
- package/dist/apis/KnowledgeApi.js +34 -0
- package/dist/models/KnowledgeFileSummaryUio.d.ts +6 -0
- package/dist/models/KnowledgeFileSummaryUio.js +2 -0
- package/dist/models/StartKnowledgeBaseScrappingRequestUio.d.ts +20 -0
- package/dist/models/StartKnowledgeBaseScrappingRequestUio.js +6 -0
- package/dist/models/SyncKnowledgeSiteScrapping200ResponseUio.d.ts +44 -0
- package/dist/models/SyncKnowledgeSiteScrapping200ResponseUio.js +58 -0
- package/dist/models/SyncKnowledgeSiteScrappingRequestUio.d.ts +44 -0
- package/dist/models/SyncKnowledgeSiteScrappingRequestUio.js +54 -0
- package/dist/models/index.d.ts +2 -0
- package/dist/models/index.js +2 -0
- package/dist/openapi.json +111 -0
- package/package.json +1 -1
|
@@ -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
|
|
@@ -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
|
}
|
|
@@ -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
|
+
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -390,6 +390,8 @@ export * from './SubscriptionAdditionalMetricUio';
|
|
|
390
390
|
export * from './SubscriptionInteractionsMetricUio';
|
|
391
391
|
export * from './SubscriptionMetricUio';
|
|
392
392
|
export * from './SuggestionUio';
|
|
393
|
+
export * from './SyncKnowledgeSiteScrapping200ResponseUio';
|
|
394
|
+
export * from './SyncKnowledgeSiteScrappingRequestUio';
|
|
393
395
|
export * from './TTSRequestUio';
|
|
394
396
|
export * from './TTSResponseUio';
|
|
395
397
|
export * from './TaskScheduleEndOneOf1Uio';
|
package/dist/models/index.js
CHANGED
|
@@ -408,6 +408,8 @@ __exportStar(require("./SubscriptionAdditionalMetricUio"), exports);
|
|
|
408
408
|
__exportStar(require("./SubscriptionInteractionsMetricUio"), exports);
|
|
409
409
|
__exportStar(require("./SubscriptionMetricUio"), exports);
|
|
410
410
|
__exportStar(require("./SuggestionUio"), exports);
|
|
411
|
+
__exportStar(require("./SyncKnowledgeSiteScrapping200ResponseUio"), exports);
|
|
412
|
+
__exportStar(require("./SyncKnowledgeSiteScrappingRequestUio"), exports);
|
|
411
413
|
__exportStar(require("./TTSRequestUio"), exports);
|
|
412
414
|
__exportStar(require("./TTSResponseUio"), exports);
|
|
413
415
|
__exportStar(require("./TaskScheduleEndOneOf1Uio"), exports);
|
package/dist/openapi.json
CHANGED
|
@@ -9730,6 +9730,57 @@
|
|
|
9730
9730
|
"tags" : [ "knowledge" ]
|
|
9731
9731
|
}
|
|
9732
9732
|
},
|
|
9733
|
+
"/knowledge-files/{fileId}/scrapping-sync" : {
|
|
9734
|
+
"post" : {
|
|
9735
|
+
"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",
|
|
9736
|
+
"operationId" : "syncKnowledgeSiteScrapping",
|
|
9737
|
+
"parameters" : [ {
|
|
9738
|
+
"description" : "The ID of the file",
|
|
9739
|
+
"in" : "path",
|
|
9740
|
+
"name" : "fileId",
|
|
9741
|
+
"required" : true,
|
|
9742
|
+
"schema" : {
|
|
9743
|
+
"type" : "string"
|
|
9744
|
+
}
|
|
9745
|
+
} ],
|
|
9746
|
+
"requestBody" : {
|
|
9747
|
+
"content" : {
|
|
9748
|
+
"application/json" : {
|
|
9749
|
+
"schema" : {
|
|
9750
|
+
"$ref" : "#/components/schemas/syncKnowledgeSiteScrapping_request"
|
|
9751
|
+
}
|
|
9752
|
+
}
|
|
9753
|
+
},
|
|
9754
|
+
"required" : true
|
|
9755
|
+
},
|
|
9756
|
+
"responses" : {
|
|
9757
|
+
"200" : {
|
|
9758
|
+
"content" : {
|
|
9759
|
+
"application/json" : {
|
|
9760
|
+
"schema" : {
|
|
9761
|
+
"$ref" : "#/components/schemas/syncKnowledgeSiteScrapping_200_response"
|
|
9762
|
+
}
|
|
9763
|
+
}
|
|
9764
|
+
},
|
|
9765
|
+
"description" : "Site synchronized successfully"
|
|
9766
|
+
},
|
|
9767
|
+
"400" : {
|
|
9768
|
+
"description" : "Invalid scrapping sync request"
|
|
9769
|
+
},
|
|
9770
|
+
"401" : {
|
|
9771
|
+
"description" : "Unauthorized"
|
|
9772
|
+
},
|
|
9773
|
+
"403" : {
|
|
9774
|
+
"description" : "Forbidden - User is not admin of the organization"
|
|
9775
|
+
},
|
|
9776
|
+
"404" : {
|
|
9777
|
+
"description" : "Knowledge site or knowledge base not found"
|
|
9778
|
+
}
|
|
9779
|
+
},
|
|
9780
|
+
"summary" : "Synchronize a scrapped site after a crawl",
|
|
9781
|
+
"tags" : [ "knowledge" ]
|
|
9782
|
+
}
|
|
9783
|
+
},
|
|
9733
9784
|
"/knowledge-files/{fileId}/status" : {
|
|
9734
9785
|
"post" : {
|
|
9735
9786
|
"description" : "Updates the status of a knowledge file and triggers indexing when uploaded",
|
|
@@ -20115,6 +20166,9 @@
|
|
|
20115
20166
|
},
|
|
20116
20167
|
"knowledgeBaseId" : {
|
|
20117
20168
|
"type" : "string"
|
|
20169
|
+
},
|
|
20170
|
+
"updatedAt" : {
|
|
20171
|
+
"type" : "string"
|
|
20118
20172
|
}
|
|
20119
20173
|
},
|
|
20120
20174
|
"required" : [ "id", "name" ],
|
|
@@ -23590,6 +23644,21 @@
|
|
|
23590
23644
|
"sitePageId" : {
|
|
23591
23645
|
"nullable" : true,
|
|
23592
23646
|
"type" : "string"
|
|
23647
|
+
},
|
|
23648
|
+
"pathPrefix" : {
|
|
23649
|
+
"description" : "Restrict the crawl to a directory of the site, e.g. `/property` only keeps `/property` and its sub-paths.\n",
|
|
23650
|
+
"nullable" : true,
|
|
23651
|
+
"type" : "string"
|
|
23652
|
+
},
|
|
23653
|
+
"resync" : {
|
|
23654
|
+
"description" : "Re-crawl an existing site: known pages are updated in place, new pages are added and pages that disappeared are removed.\n",
|
|
23655
|
+
"nullable" : true,
|
|
23656
|
+
"type" : "boolean"
|
|
23657
|
+
},
|
|
23658
|
+
"siteId" : {
|
|
23659
|
+
"description" : "Existing site to re-attach the crawl to, required when `resync` is set",
|
|
23660
|
+
"nullable" : true,
|
|
23661
|
+
"type" : "string"
|
|
23593
23662
|
}
|
|
23594
23663
|
},
|
|
23595
23664
|
"required" : [ "knowledgeBaseId", "organizationId", "urls", "userId" ],
|
|
@@ -23638,6 +23707,48 @@
|
|
|
23638
23707
|
"required" : [ "isActive" ],
|
|
23639
23708
|
"type" : "object"
|
|
23640
23709
|
},
|
|
23710
|
+
"syncKnowledgeSiteScrapping_request" : {
|
|
23711
|
+
"additionalProperties" : false,
|
|
23712
|
+
"properties" : {
|
|
23713
|
+
"scrapedUrls" : {
|
|
23714
|
+
"description" : "URLs reached during the crawl",
|
|
23715
|
+
"items" : {
|
|
23716
|
+
"type" : "string"
|
|
23717
|
+
},
|
|
23718
|
+
"type" : "array"
|
|
23719
|
+
},
|
|
23720
|
+
"prune" : {
|
|
23721
|
+
"description" : "Remove the site pages missing from `scrapedUrls`",
|
|
23722
|
+
"nullable" : true,
|
|
23723
|
+
"type" : "boolean"
|
|
23724
|
+
},
|
|
23725
|
+
"pathPrefix" : {
|
|
23726
|
+
"description" : "Directory the crawl was restricted to, e.g. `/property`",
|
|
23727
|
+
"nullable" : true,
|
|
23728
|
+
"type" : "string"
|
|
23729
|
+
}
|
|
23730
|
+
},
|
|
23731
|
+
"required" : [ "scrapedUrls" ],
|
|
23732
|
+
"type" : "object"
|
|
23733
|
+
},
|
|
23734
|
+
"syncKnowledgeSiteScrapping_200_response" : {
|
|
23735
|
+
"properties" : {
|
|
23736
|
+
"updatedAt" : {
|
|
23737
|
+
"type" : "string"
|
|
23738
|
+
},
|
|
23739
|
+
"scrapedPages" : {
|
|
23740
|
+
"type" : "number"
|
|
23741
|
+
},
|
|
23742
|
+
"removedPages" : {
|
|
23743
|
+
"items" : {
|
|
23744
|
+
"type" : "string"
|
|
23745
|
+
},
|
|
23746
|
+
"type" : "array"
|
|
23747
|
+
}
|
|
23748
|
+
},
|
|
23749
|
+
"required" : [ "removedPages", "scrapedPages", "updatedAt" ],
|
|
23750
|
+
"type" : "object"
|
|
23751
|
+
},
|
|
23641
23752
|
"knowledgeFileParsingCallback_request" : {
|
|
23642
23753
|
"additionalProperties" : true,
|
|
23643
23754
|
"properties" : {
|