@breign/client 1.0.42 → 1.0.43
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 +28 -1
- package/dist/apis/KnowledgeApi.js +61 -0
- package/dist/models/KnowledgeBaseWithFilesUio.d.ts +75 -0
- package/dist/models/KnowledgeBaseWithFilesUio.js +73 -0
- package/dist/models/KnowledgeFileSummaryKnowledgeBaseIdUio.d.ts +21 -0
- package/dist/models/KnowledgeFileSummaryKnowledgeBaseIdUio.js +37 -0
- package/dist/models/KnowledgeFileSummaryUio.d.ts +45 -0
- package/dist/models/KnowledgeFileSummaryUio.js +57 -0
- package/dist/models/index.d.ts +3 -0
- package/dist/models/index.js +3 -0
- package/dist/openapi.json +162 -4
- 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, DocumentAddRequestUio, FileCreationRequestUio, FileCreationResponseUio, FileStatusUio, FileStatusUpdateRequestUio, FileWithDownloadUrlUio, ImageKnowledgeUio, ImportFileToAgentKnowledge200ResponseUio, S3UploadBodyUio } from '../models/index';
|
|
13
|
+
import type { AgentModuleUio, BodyWithMessageUio, DocumentAddRequestUio, FileCreationRequestUio, FileCreationResponseUio, FileStatusUio, FileStatusUpdateRequestUio, FileWithDownloadUrlUio, ImageKnowledgeUio, ImportFileToAgentKnowledge200ResponseUio, KnowledgeBaseUio, KnowledgeBaseWithFilesUio, S3UploadBodyUio } from '../models/index';
|
|
14
14
|
export interface AddDocumentToKnowledgeBaseRequest {
|
|
15
15
|
agentId: string;
|
|
16
16
|
documentAddRequestUio: DocumentAddRequestUio;
|
|
@@ -36,6 +36,13 @@ export interface DeleteImageFromKnowledgeBaseLibraryRequest {
|
|
|
36
36
|
knowledgebaseId: string;
|
|
37
37
|
imageId: string;
|
|
38
38
|
}
|
|
39
|
+
export interface GetAgentKnowledgeFilesRequest {
|
|
40
|
+
agentId: string;
|
|
41
|
+
}
|
|
42
|
+
export interface GetAvailableKnowledgeBasesRequest {
|
|
43
|
+
organizationId: string;
|
|
44
|
+
agentId: string;
|
|
45
|
+
}
|
|
39
46
|
export interface GetFileFromAgentKnowledgeRequest {
|
|
40
47
|
agentId: string;
|
|
41
48
|
fileId: string;
|
|
@@ -138,6 +145,26 @@ export declare class KnowledgeApi extends runtime.BaseAPI {
|
|
|
138
145
|
* Delete a specific knowledge image from a library image in knowledge base
|
|
139
146
|
*/
|
|
140
147
|
deleteImageFromKnowledgeBaseLibrary(knowledgebaseId: string, imageId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
148
|
+
/**
|
|
149
|
+
* Returns all knowledge bases attached to the agent and their indexed files.
|
|
150
|
+
* Get knowledge bases and files for an agent
|
|
151
|
+
*/
|
|
152
|
+
getAgentKnowledgeFilesRaw(requestParameters: GetAgentKnowledgeFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<KnowledgeBaseWithFilesUio>>>;
|
|
153
|
+
/**
|
|
154
|
+
* Returns all knowledge bases attached to the agent and their indexed files.
|
|
155
|
+
* Get knowledge bases and files for an agent
|
|
156
|
+
*/
|
|
157
|
+
getAgentKnowledgeFiles(agentId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<KnowledgeBaseWithFilesUio>>;
|
|
158
|
+
/**
|
|
159
|
+
* Returns all knowledge bases belonging to the organization that can be assigned to the specified agent…
|
|
160
|
+
* List available knowledge bases for an agent
|
|
161
|
+
*/
|
|
162
|
+
getAvailableKnowledgeBasesRaw(requestParameters: GetAvailableKnowledgeBasesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<KnowledgeBaseUio>>>;
|
|
163
|
+
/**
|
|
164
|
+
* Returns all knowledge bases belonging to the organization that can be assigned to the specified agent…
|
|
165
|
+
* List available knowledge bases for an agent
|
|
166
|
+
*/
|
|
167
|
+
getAvailableKnowledgeBases(organizationId: string, agentId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<KnowledgeBaseUio>>;
|
|
141
168
|
/**
|
|
142
169
|
* Retrieves metadata for a file that has been imported into the agent\'s knowledge base
|
|
143
170
|
* Get a specific knowledge file from an agent
|
|
@@ -250,6 +250,67 @@ class KnowledgeApi extends runtime.BaseAPI {
|
|
|
250
250
|
async deleteImageFromKnowledgeBaseLibrary(knowledgebaseId, imageId, initOverrides) {
|
|
251
251
|
await this.deleteImageFromKnowledgeBaseLibraryRaw({ knowledgebaseId: knowledgebaseId, imageId: imageId }, initOverrides);
|
|
252
252
|
}
|
|
253
|
+
/**
|
|
254
|
+
* Returns all knowledge bases attached to the agent and their indexed files.
|
|
255
|
+
* Get knowledge bases and files for an agent
|
|
256
|
+
*/
|
|
257
|
+
async getAgentKnowledgeFilesRaw(requestParameters, initOverrides) {
|
|
258
|
+
if (requestParameters['agentId'] == null) {
|
|
259
|
+
throw new runtime.RequiredError('agentId', 'Required parameter "agentId" was null or undefined when calling getAgentKnowledgeFiles().');
|
|
260
|
+
}
|
|
261
|
+
const queryParameters = {};
|
|
262
|
+
const headerParameters = {};
|
|
263
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
264
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
265
|
+
}
|
|
266
|
+
const response = await this.request({
|
|
267
|
+
path: `/agents/{agentId}/knowledge-files`.replace(`{${"agentId"}}`, encodeURIComponent(String(requestParameters['agentId']))),
|
|
268
|
+
method: 'GET',
|
|
269
|
+
headers: headerParameters,
|
|
270
|
+
query: queryParameters,
|
|
271
|
+
}, initOverrides);
|
|
272
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.KnowledgeBaseWithFilesUioFromJSON));
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* Returns all knowledge bases attached to the agent and their indexed files.
|
|
276
|
+
* Get knowledge bases and files for an agent
|
|
277
|
+
*/
|
|
278
|
+
async getAgentKnowledgeFiles(agentId, initOverrides) {
|
|
279
|
+
const response = await this.getAgentKnowledgeFilesRaw({ agentId: agentId }, initOverrides);
|
|
280
|
+
return await response.value();
|
|
281
|
+
}
|
|
282
|
+
/**
|
|
283
|
+
* Returns all knowledge bases belonging to the organization that can be assigned to the specified agent…
|
|
284
|
+
* List available knowledge bases for an agent
|
|
285
|
+
*/
|
|
286
|
+
async getAvailableKnowledgeBasesRaw(requestParameters, initOverrides) {
|
|
287
|
+
if (requestParameters['organizationId'] == null) {
|
|
288
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling getAvailableKnowledgeBases().');
|
|
289
|
+
}
|
|
290
|
+
if (requestParameters['agentId'] == null) {
|
|
291
|
+
throw new runtime.RequiredError('agentId', 'Required parameter "agentId" was null or undefined when calling getAvailableKnowledgeBases().');
|
|
292
|
+
}
|
|
293
|
+
const queryParameters = {};
|
|
294
|
+
const headerParameters = {};
|
|
295
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
296
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
297
|
+
}
|
|
298
|
+
const response = await this.request({
|
|
299
|
+
path: `/organizations/{organizationId}/agents/{agentId}/available-knowledge-bases`.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId']))).replace(`{${"agentId"}}`, encodeURIComponent(String(requestParameters['agentId']))),
|
|
300
|
+
method: 'GET',
|
|
301
|
+
headers: headerParameters,
|
|
302
|
+
query: queryParameters,
|
|
303
|
+
}, initOverrides);
|
|
304
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.KnowledgeBaseUioFromJSON));
|
|
305
|
+
}
|
|
306
|
+
/**
|
|
307
|
+
* Returns all knowledge bases belonging to the organization that can be assigned to the specified agent…
|
|
308
|
+
* List available knowledge bases for an agent
|
|
309
|
+
*/
|
|
310
|
+
async getAvailableKnowledgeBases(organizationId, agentId, initOverrides) {
|
|
311
|
+
const response = await this.getAvailableKnowledgeBasesRaw({ organizationId: organizationId, agentId: agentId }, initOverrides);
|
|
312
|
+
return await response.value();
|
|
313
|
+
}
|
|
253
314
|
/**
|
|
254
315
|
* Retrieves metadata for a file that has been imported into the agent\'s knowledge base
|
|
255
316
|
* Get a specific knowledge file from an agent
|
|
@@ -0,0 +1,75 @@
|
|
|
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 { KnowledgeFileSummaryUio } from './KnowledgeFileSummaryUio';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface KnowledgeBaseWithFilesUio
|
|
17
|
+
*/
|
|
18
|
+
export interface KnowledgeBaseWithFilesUio {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof KnowledgeBaseWithFilesUio
|
|
23
|
+
*/
|
|
24
|
+
id: string;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof KnowledgeBaseWithFilesUio
|
|
29
|
+
*/
|
|
30
|
+
name: string;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {boolean}
|
|
34
|
+
* @memberof KnowledgeBaseWithFilesUio
|
|
35
|
+
*/
|
|
36
|
+
indexed: boolean;
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {string}
|
|
40
|
+
* @memberof KnowledgeBaseWithFilesUio
|
|
41
|
+
*/
|
|
42
|
+
organisationId: string;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {Date}
|
|
46
|
+
* @memberof KnowledgeBaseWithFilesUio
|
|
47
|
+
*/
|
|
48
|
+
createdAt?: Date;
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @type {Date}
|
|
52
|
+
* @memberof KnowledgeBaseWithFilesUio
|
|
53
|
+
*/
|
|
54
|
+
updatedAt?: Date;
|
|
55
|
+
/**
|
|
56
|
+
*
|
|
57
|
+
* @type {Array<string>}
|
|
58
|
+
* @memberof KnowledgeBaseWithFilesUio
|
|
59
|
+
*/
|
|
60
|
+
authorizedAgents?: Array<string>;
|
|
61
|
+
/**
|
|
62
|
+
*
|
|
63
|
+
* @type {Array<KnowledgeFileSummaryUio>}
|
|
64
|
+
* @memberof KnowledgeBaseWithFilesUio
|
|
65
|
+
*/
|
|
66
|
+
files: Array<KnowledgeFileSummaryUio>;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Check if a given object implements the KnowledgeBaseWithFilesUio interface.
|
|
70
|
+
*/
|
|
71
|
+
export declare function instanceOfKnowledgeBaseWithFilesUio(value: object): value is KnowledgeBaseWithFilesUio;
|
|
72
|
+
export declare function KnowledgeBaseWithFilesUioFromJSON(json: any): KnowledgeBaseWithFilesUio;
|
|
73
|
+
export declare function KnowledgeBaseWithFilesUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): KnowledgeBaseWithFilesUio;
|
|
74
|
+
export declare function KnowledgeBaseWithFilesUioToJSON(json: any): KnowledgeBaseWithFilesUio;
|
|
75
|
+
export declare function KnowledgeBaseWithFilesUioToJSONTyped(value?: KnowledgeBaseWithFilesUio | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,73 @@
|
|
|
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.instanceOfKnowledgeBaseWithFilesUio = instanceOfKnowledgeBaseWithFilesUio;
|
|
17
|
+
exports.KnowledgeBaseWithFilesUioFromJSON = KnowledgeBaseWithFilesUioFromJSON;
|
|
18
|
+
exports.KnowledgeBaseWithFilesUioFromJSONTyped = KnowledgeBaseWithFilesUioFromJSONTyped;
|
|
19
|
+
exports.KnowledgeBaseWithFilesUioToJSON = KnowledgeBaseWithFilesUioToJSON;
|
|
20
|
+
exports.KnowledgeBaseWithFilesUioToJSONTyped = KnowledgeBaseWithFilesUioToJSONTyped;
|
|
21
|
+
const KnowledgeFileSummaryUio_1 = require("./KnowledgeFileSummaryUio");
|
|
22
|
+
/**
|
|
23
|
+
* Check if a given object implements the KnowledgeBaseWithFilesUio interface.
|
|
24
|
+
*/
|
|
25
|
+
function instanceOfKnowledgeBaseWithFilesUio(value) {
|
|
26
|
+
if (!('id' in value) || value['id'] === undefined)
|
|
27
|
+
return false;
|
|
28
|
+
if (!('name' in value) || value['name'] === undefined)
|
|
29
|
+
return false;
|
|
30
|
+
if (!('indexed' in value) || value['indexed'] === undefined)
|
|
31
|
+
return false;
|
|
32
|
+
if (!('organisationId' in value) || value['organisationId'] === undefined)
|
|
33
|
+
return false;
|
|
34
|
+
if (!('files' in value) || value['files'] === undefined)
|
|
35
|
+
return false;
|
|
36
|
+
return true;
|
|
37
|
+
}
|
|
38
|
+
function KnowledgeBaseWithFilesUioFromJSON(json) {
|
|
39
|
+
return KnowledgeBaseWithFilesUioFromJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
function KnowledgeBaseWithFilesUioFromJSONTyped(json, ignoreDiscriminator) {
|
|
42
|
+
if (json == null) {
|
|
43
|
+
return json;
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
'id': json['id'],
|
|
47
|
+
'name': json['name'],
|
|
48
|
+
'indexed': json['indexed'],
|
|
49
|
+
'organisationId': json['organisationId'],
|
|
50
|
+
'createdAt': json['createdAt'] == null ? undefined : (new Date(json['createdAt'])),
|
|
51
|
+
'updatedAt': json['updatedAt'] == null ? undefined : (new Date(json['updatedAt'])),
|
|
52
|
+
'authorizedAgents': json['authorizedAgents'] == null ? undefined : json['authorizedAgents'],
|
|
53
|
+
'files': (json['files'].map(KnowledgeFileSummaryUio_1.KnowledgeFileSummaryUioFromJSON)),
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
function KnowledgeBaseWithFilesUioToJSON(json) {
|
|
57
|
+
return KnowledgeBaseWithFilesUioToJSONTyped(json, false);
|
|
58
|
+
}
|
|
59
|
+
function KnowledgeBaseWithFilesUioToJSONTyped(value, ignoreDiscriminator = false) {
|
|
60
|
+
if (value == null) {
|
|
61
|
+
return value;
|
|
62
|
+
}
|
|
63
|
+
return {
|
|
64
|
+
'id': value['id'],
|
|
65
|
+
'name': value['name'],
|
|
66
|
+
'indexed': value['indexed'],
|
|
67
|
+
'organisationId': value['organisationId'],
|
|
68
|
+
'createdAt': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()),
|
|
69
|
+
'updatedAt': value['updatedAt'] == null ? undefined : ((value['updatedAt']).toISOString()),
|
|
70
|
+
'authorizedAgents': value['authorizedAgents'],
|
|
71
|
+
'files': (value['files'].map(KnowledgeFileSummaryUio_1.KnowledgeFileSummaryUioToJSON)),
|
|
72
|
+
};
|
|
73
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
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
|
+
* @type KnowledgeFileSummaryKnowledgeBaseIdUio
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
*/
|
|
17
|
+
export type KnowledgeFileSummaryKnowledgeBaseIdUio = Array<string> | string;
|
|
18
|
+
export declare function KnowledgeFileSummaryKnowledgeBaseIdUioFromJSON(json: any): KnowledgeFileSummaryKnowledgeBaseIdUio;
|
|
19
|
+
export declare function KnowledgeFileSummaryKnowledgeBaseIdUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): KnowledgeFileSummaryKnowledgeBaseIdUio;
|
|
20
|
+
export declare function KnowledgeFileSummaryKnowledgeBaseIdUioToJSON(json: any): any;
|
|
21
|
+
export declare function KnowledgeFileSummaryKnowledgeBaseIdUioToJSONTyped(value?: KnowledgeFileSummaryKnowledgeBaseIdUio | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,37 @@
|
|
|
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.KnowledgeFileSummaryKnowledgeBaseIdUioFromJSON = KnowledgeFileSummaryKnowledgeBaseIdUioFromJSON;
|
|
17
|
+
exports.KnowledgeFileSummaryKnowledgeBaseIdUioFromJSONTyped = KnowledgeFileSummaryKnowledgeBaseIdUioFromJSONTyped;
|
|
18
|
+
exports.KnowledgeFileSummaryKnowledgeBaseIdUioToJSON = KnowledgeFileSummaryKnowledgeBaseIdUioToJSON;
|
|
19
|
+
exports.KnowledgeFileSummaryKnowledgeBaseIdUioToJSONTyped = KnowledgeFileSummaryKnowledgeBaseIdUioToJSONTyped;
|
|
20
|
+
function KnowledgeFileSummaryKnowledgeBaseIdUioFromJSON(json) {
|
|
21
|
+
return KnowledgeFileSummaryKnowledgeBaseIdUioFromJSONTyped(json, false);
|
|
22
|
+
}
|
|
23
|
+
function KnowledgeFileSummaryKnowledgeBaseIdUioFromJSONTyped(json, ignoreDiscriminator) {
|
|
24
|
+
if (json == null) {
|
|
25
|
+
return json;
|
|
26
|
+
}
|
|
27
|
+
return {};
|
|
28
|
+
}
|
|
29
|
+
function KnowledgeFileSummaryKnowledgeBaseIdUioToJSON(json) {
|
|
30
|
+
return KnowledgeFileSummaryKnowledgeBaseIdUioToJSONTyped(json, false);
|
|
31
|
+
}
|
|
32
|
+
function KnowledgeFileSummaryKnowledgeBaseIdUioToJSONTyped(value, ignoreDiscriminator = false) {
|
|
33
|
+
if (value == null) {
|
|
34
|
+
return value;
|
|
35
|
+
}
|
|
36
|
+
return {};
|
|
37
|
+
}
|
|
@@ -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 { KnowledgeFileSummaryKnowledgeBaseIdUio } from './KnowledgeFileSummaryKnowledgeBaseIdUio';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface KnowledgeFileSummaryUio
|
|
17
|
+
*/
|
|
18
|
+
export interface KnowledgeFileSummaryUio {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof KnowledgeFileSummaryUio
|
|
23
|
+
*/
|
|
24
|
+
id: string;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof KnowledgeFileSummaryUio
|
|
29
|
+
*/
|
|
30
|
+
name: string;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {KnowledgeFileSummaryKnowledgeBaseIdUio}
|
|
34
|
+
* @memberof KnowledgeFileSummaryUio
|
|
35
|
+
*/
|
|
36
|
+
knowledgeBaseId?: KnowledgeFileSummaryKnowledgeBaseIdUio;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Check if a given object implements the KnowledgeFileSummaryUio interface.
|
|
40
|
+
*/
|
|
41
|
+
export declare function instanceOfKnowledgeFileSummaryUio(value: object): value is KnowledgeFileSummaryUio;
|
|
42
|
+
export declare function KnowledgeFileSummaryUioFromJSON(json: any): KnowledgeFileSummaryUio;
|
|
43
|
+
export declare function KnowledgeFileSummaryUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): KnowledgeFileSummaryUio;
|
|
44
|
+
export declare function KnowledgeFileSummaryUioToJSON(json: any): KnowledgeFileSummaryUio;
|
|
45
|
+
export declare function KnowledgeFileSummaryUioToJSONTyped(value?: KnowledgeFileSummaryUio | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,57 @@
|
|
|
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.instanceOfKnowledgeFileSummaryUio = instanceOfKnowledgeFileSummaryUio;
|
|
17
|
+
exports.KnowledgeFileSummaryUioFromJSON = KnowledgeFileSummaryUioFromJSON;
|
|
18
|
+
exports.KnowledgeFileSummaryUioFromJSONTyped = KnowledgeFileSummaryUioFromJSONTyped;
|
|
19
|
+
exports.KnowledgeFileSummaryUioToJSON = KnowledgeFileSummaryUioToJSON;
|
|
20
|
+
exports.KnowledgeFileSummaryUioToJSONTyped = KnowledgeFileSummaryUioToJSONTyped;
|
|
21
|
+
const KnowledgeFileSummaryKnowledgeBaseIdUio_1 = require("./KnowledgeFileSummaryKnowledgeBaseIdUio");
|
|
22
|
+
/**
|
|
23
|
+
* Check if a given object implements the KnowledgeFileSummaryUio interface.
|
|
24
|
+
*/
|
|
25
|
+
function instanceOfKnowledgeFileSummaryUio(value) {
|
|
26
|
+
if (!('id' in value) || value['id'] === undefined)
|
|
27
|
+
return false;
|
|
28
|
+
if (!('name' in value) || value['name'] === undefined)
|
|
29
|
+
return false;
|
|
30
|
+
return true;
|
|
31
|
+
}
|
|
32
|
+
function KnowledgeFileSummaryUioFromJSON(json) {
|
|
33
|
+
return KnowledgeFileSummaryUioFromJSONTyped(json, false);
|
|
34
|
+
}
|
|
35
|
+
function KnowledgeFileSummaryUioFromJSONTyped(json, ignoreDiscriminator) {
|
|
36
|
+
if (json == null) {
|
|
37
|
+
return json;
|
|
38
|
+
}
|
|
39
|
+
return {
|
|
40
|
+
'id': json['id'],
|
|
41
|
+
'name': json['name'],
|
|
42
|
+
'knowledgeBaseId': json['knowledgeBaseId'] == null ? undefined : (0, KnowledgeFileSummaryKnowledgeBaseIdUio_1.KnowledgeFileSummaryKnowledgeBaseIdUioFromJSON)(json['knowledgeBaseId']),
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
function KnowledgeFileSummaryUioToJSON(json) {
|
|
46
|
+
return KnowledgeFileSummaryUioToJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
function KnowledgeFileSummaryUioToJSONTyped(value, ignoreDiscriminator = false) {
|
|
49
|
+
if (value == null) {
|
|
50
|
+
return value;
|
|
51
|
+
}
|
|
52
|
+
return {
|
|
53
|
+
'id': value['id'],
|
|
54
|
+
'name': value['name'],
|
|
55
|
+
'knowledgeBaseId': (0, KnowledgeFileSummaryKnowledgeBaseIdUio_1.KnowledgeFileSummaryKnowledgeBaseIdUioToJSON)(value['knowledgeBaseId']),
|
|
56
|
+
};
|
|
57
|
+
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -122,6 +122,9 @@ export * from './InstanceUio';
|
|
|
122
122
|
export * from './KnowledgeBaseFilesInnerUio';
|
|
123
123
|
export * from './KnowledgeBasePrivacyUio';
|
|
124
124
|
export * from './KnowledgeBaseUio';
|
|
125
|
+
export * from './KnowledgeBaseWithFilesUio';
|
|
126
|
+
export * from './KnowledgeFileSummaryKnowledgeBaseIdUio';
|
|
127
|
+
export * from './KnowledgeFileSummaryUio';
|
|
125
128
|
export * from './LipsyncUio';
|
|
126
129
|
export * from './ManifestCreateRequestUio';
|
|
127
130
|
export * from './ManifestUio';
|
package/dist/models/index.js
CHANGED
|
@@ -140,6 +140,9 @@ __exportStar(require("./InstanceUio"), exports);
|
|
|
140
140
|
__exportStar(require("./KnowledgeBaseFilesInnerUio"), exports);
|
|
141
141
|
__exportStar(require("./KnowledgeBasePrivacyUio"), exports);
|
|
142
142
|
__exportStar(require("./KnowledgeBaseUio"), exports);
|
|
143
|
+
__exportStar(require("./KnowledgeBaseWithFilesUio"), exports);
|
|
144
|
+
__exportStar(require("./KnowledgeFileSummaryKnowledgeBaseIdUio"), exports);
|
|
145
|
+
__exportStar(require("./KnowledgeFileSummaryUio"), exports);
|
|
143
146
|
__exportStar(require("./LipsyncUio"), exports);
|
|
144
147
|
__exportStar(require("./ManifestCreateRequestUio"), exports);
|
|
145
148
|
__exportStar(require("./ManifestUio"), exports);
|
package/dist/openapi.json
CHANGED
|
@@ -4340,6 +4340,51 @@
|
|
|
4340
4340
|
"tags" : [ "knowledge" ]
|
|
4341
4341
|
}
|
|
4342
4342
|
},
|
|
4343
|
+
"/agents/{agentId}/knowledge-files" : {
|
|
4344
|
+
"get" : {
|
|
4345
|
+
"description" : "Returns all knowledge bases attached to the agent and their indexed files.",
|
|
4346
|
+
"operationId" : "getAgentKnowledgeFiles",
|
|
4347
|
+
"parameters" : [ {
|
|
4348
|
+
"description" : "ID of the agent",
|
|
4349
|
+
"in" : "path",
|
|
4350
|
+
"name" : "agentId",
|
|
4351
|
+
"required" : true,
|
|
4352
|
+
"schema" : {
|
|
4353
|
+
"format" : "uuid",
|
|
4354
|
+
"type" : "string"
|
|
4355
|
+
}
|
|
4356
|
+
} ],
|
|
4357
|
+
"responses" : {
|
|
4358
|
+
"200" : {
|
|
4359
|
+
"content" : {
|
|
4360
|
+
"application/json" : {
|
|
4361
|
+
"schema" : {
|
|
4362
|
+
"items" : {
|
|
4363
|
+
"$ref" : "#/components/schemas/KnowledgeBaseWithFiles"
|
|
4364
|
+
},
|
|
4365
|
+
"type" : "array"
|
|
4366
|
+
}
|
|
4367
|
+
}
|
|
4368
|
+
},
|
|
4369
|
+
"description" : "List of knowledge bases gand their files"
|
|
4370
|
+
},
|
|
4371
|
+
"401" : {
|
|
4372
|
+
"description" : "Unauthorized"
|
|
4373
|
+
},
|
|
4374
|
+
"403" : {
|
|
4375
|
+
"description" : "Forbidden - User cannot access this brain"
|
|
4376
|
+
},
|
|
4377
|
+
"404" : {
|
|
4378
|
+
"description" : "Agent not found or no knowledge base attached"
|
|
4379
|
+
},
|
|
4380
|
+
"500" : {
|
|
4381
|
+
"description" : "Server error"
|
|
4382
|
+
}
|
|
4383
|
+
},
|
|
4384
|
+
"summary" : "Get knowledge bases and files for an agent",
|
|
4385
|
+
"tags" : [ "knowledge" ]
|
|
4386
|
+
}
|
|
4387
|
+
},
|
|
4343
4388
|
"/agents/{agentId}/knowledge/project-imports" : {
|
|
4344
4389
|
"post" : {
|
|
4345
4390
|
"description" : "Imports project data from a local JSON file into the agent's knowledge base",
|
|
@@ -4733,6 +4778,56 @@
|
|
|
4733
4778
|
"tags" : [ "knowledge" ]
|
|
4734
4779
|
}
|
|
4735
4780
|
},
|
|
4781
|
+
"/organizations/{organizationId}/agents/{agentId}/available-knowledge-bases" : {
|
|
4782
|
+
"get" : {
|
|
4783
|
+
"description" : "Returns all knowledge bases belonging to the organization that can be assigned to the specified agent…\n",
|
|
4784
|
+
"operationId" : "getAvailableKnowledgeBases",
|
|
4785
|
+
"parameters" : [ {
|
|
4786
|
+
"in" : "path",
|
|
4787
|
+
"name" : "organizationId",
|
|
4788
|
+
"required" : true,
|
|
4789
|
+
"schema" : {
|
|
4790
|
+
"type" : "string"
|
|
4791
|
+
}
|
|
4792
|
+
}, {
|
|
4793
|
+
"in" : "path",
|
|
4794
|
+
"name" : "agentId",
|
|
4795
|
+
"required" : true,
|
|
4796
|
+
"schema" : {
|
|
4797
|
+
"type" : "string"
|
|
4798
|
+
}
|
|
4799
|
+
} ],
|
|
4800
|
+
"responses" : {
|
|
4801
|
+
"200" : {
|
|
4802
|
+
"content" : {
|
|
4803
|
+
"application/json" : {
|
|
4804
|
+
"schema" : {
|
|
4805
|
+
"items" : {
|
|
4806
|
+
"$ref" : "#/components/schemas/KnowledgeBase"
|
|
4807
|
+
},
|
|
4808
|
+
"type" : "array"
|
|
4809
|
+
}
|
|
4810
|
+
}
|
|
4811
|
+
},
|
|
4812
|
+
"description" : "Successful retrieval of available knowledge bases"
|
|
4813
|
+
},
|
|
4814
|
+
"401" : {
|
|
4815
|
+
"description" : "Unauthorized"
|
|
4816
|
+
},
|
|
4817
|
+
"403" : {
|
|
4818
|
+
"description" : "Forbidden – user does not belong to the organization"
|
|
4819
|
+
},
|
|
4820
|
+
"404" : {
|
|
4821
|
+
"description" : "Organization or agent not found"
|
|
4822
|
+
},
|
|
4823
|
+
"500" : {
|
|
4824
|
+
"description" : "Server error"
|
|
4825
|
+
}
|
|
4826
|
+
},
|
|
4827
|
+
"summary" : "List available knowledge bases for an agent",
|
|
4828
|
+
"tags" : [ "knowledge" ]
|
|
4829
|
+
}
|
|
4830
|
+
},
|
|
4736
4831
|
"/organizations/{organizationId}/knowledge/resets" : {
|
|
4737
4832
|
"post" : {
|
|
4738
4833
|
"description" : "Reset knowledge base",
|
|
@@ -8561,6 +8656,59 @@
|
|
|
8561
8656
|
"required" : [ "shortDesc", "title" ],
|
|
8562
8657
|
"type" : "object"
|
|
8563
8658
|
},
|
|
8659
|
+
"KnowledgeBaseWithFiles" : {
|
|
8660
|
+
"properties" : {
|
|
8661
|
+
"id" : {
|
|
8662
|
+
"type" : "string"
|
|
8663
|
+
},
|
|
8664
|
+
"name" : {
|
|
8665
|
+
"type" : "string"
|
|
8666
|
+
},
|
|
8667
|
+
"indexed" : {
|
|
8668
|
+
"type" : "boolean"
|
|
8669
|
+
},
|
|
8670
|
+
"organisationId" : {
|
|
8671
|
+
"type" : "string"
|
|
8672
|
+
},
|
|
8673
|
+
"createdAt" : {
|
|
8674
|
+
"format" : "date-time",
|
|
8675
|
+
"type" : "string"
|
|
8676
|
+
},
|
|
8677
|
+
"updatedAt" : {
|
|
8678
|
+
"format" : "date-time",
|
|
8679
|
+
"type" : "string"
|
|
8680
|
+
},
|
|
8681
|
+
"authorizedAgents" : {
|
|
8682
|
+
"items" : {
|
|
8683
|
+
"type" : "string"
|
|
8684
|
+
},
|
|
8685
|
+
"type" : "array"
|
|
8686
|
+
},
|
|
8687
|
+
"files" : {
|
|
8688
|
+
"items" : {
|
|
8689
|
+
"$ref" : "#/components/schemas/KnowledgeFileSummary"
|
|
8690
|
+
},
|
|
8691
|
+
"type" : "array"
|
|
8692
|
+
}
|
|
8693
|
+
},
|
|
8694
|
+
"required" : [ "files", "id", "indexed", "name", "organisationId" ],
|
|
8695
|
+
"type" : "object"
|
|
8696
|
+
},
|
|
8697
|
+
"KnowledgeFileSummary" : {
|
|
8698
|
+
"properties" : {
|
|
8699
|
+
"id" : {
|
|
8700
|
+
"type" : "string"
|
|
8701
|
+
},
|
|
8702
|
+
"name" : {
|
|
8703
|
+
"type" : "string"
|
|
8704
|
+
},
|
|
8705
|
+
"knowledgeBaseId" : {
|
|
8706
|
+
"$ref" : "#/components/schemas/KnowledgeFileSummary_knowledgeBaseId"
|
|
8707
|
+
}
|
|
8708
|
+
},
|
|
8709
|
+
"required" : [ "id", "name" ],
|
|
8710
|
+
"type" : "object"
|
|
8711
|
+
},
|
|
8564
8712
|
"DocumentAddRequest" : {
|
|
8565
8713
|
"properties" : {
|
|
8566
8714
|
"document" : {
|
|
@@ -8881,6 +9029,10 @@
|
|
|
8881
9029
|
"required" : [ "message" ],
|
|
8882
9030
|
"type" : "object"
|
|
8883
9031
|
},
|
|
9032
|
+
"KnowledgeBasePrivacy" : {
|
|
9033
|
+
"enum" : [ "private", "public" ],
|
|
9034
|
+
"type" : "string"
|
|
9035
|
+
},
|
|
8884
9036
|
"HealthStatus" : {
|
|
8885
9037
|
"enum" : [ "ok", "degraded", "down" ],
|
|
8886
9038
|
"type" : "string"
|
|
@@ -9022,10 +9174,6 @@
|
|
|
9022
9174
|
"enum" : [ "ELEVENLABS" ],
|
|
9023
9175
|
"type" : "string"
|
|
9024
9176
|
},
|
|
9025
|
-
"KnowledgeBasePrivacy" : {
|
|
9026
|
-
"enum" : [ "private", "public" ],
|
|
9027
|
-
"type" : "string"
|
|
9028
|
-
},
|
|
9029
9177
|
"importFileToAgentKnowledge_request" : {
|
|
9030
9178
|
"properties" : {
|
|
9031
9179
|
"file" : {
|
|
@@ -9359,6 +9507,16 @@
|
|
|
9359
9507
|
"required" : [ "id", "name" ],
|
|
9360
9508
|
"type" : "object"
|
|
9361
9509
|
},
|
|
9510
|
+
"KnowledgeFileSummary_knowledgeBaseId" : {
|
|
9511
|
+
"oneOf" : [ {
|
|
9512
|
+
"type" : "string"
|
|
9513
|
+
}, {
|
|
9514
|
+
"items" : {
|
|
9515
|
+
"type" : "string"
|
|
9516
|
+
},
|
|
9517
|
+
"type" : "array"
|
|
9518
|
+
} ]
|
|
9519
|
+
},
|
|
9362
9520
|
"ToolSecure_configuration" : {
|
|
9363
9521
|
"additionalProperties" : true,
|
|
9364
9522
|
"properties" : {
|