@breign/client 1.0.83 → 1.0.85
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 +73 -1
- package/dist/apis/KnowledgeApi.js +166 -0
- package/dist/apis/ToolsApi.d.ts +12 -1
- package/dist/apis/ToolsApi.js +27 -0
- package/dist/models/IntrospectMcpTool200ResponseUio.d.ts +48 -0
- package/dist/models/IntrospectMcpTool200ResponseUio.js +52 -0
- package/dist/models/KnowledgeBaseConfigurationAuthenticationOneOfUio.d.ts +45 -0
- package/dist/models/KnowledgeBaseConfigurationAuthenticationOneOfUio.js +57 -0
- package/dist/models/KnowledgeBaseConfigurationAuthenticationUio.d.ts +22 -0
- package/dist/models/KnowledgeBaseConfigurationAuthenticationUio.js +50 -0
- package/dist/models/KnowledgeBaseConfigurationUio.d.ts +151 -0
- package/dist/models/KnowledgeBaseConfigurationUio.js +98 -0
- package/dist/models/KnowledgeFilePagePreviewUio.d.ts +44 -0
- package/dist/models/KnowledgeFilePagePreviewUio.js +56 -0
- package/dist/models/index.d.ts +5 -0
- package/dist/models/index.js +5 -0
- package/dist/openapi.json +403 -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, DocumentAddRequestUio, FileCreationRequestUio, FileCreationResponseUio, FileStatusUio, FileStatusUpdateRequestUio, FileWithDownloadUrlUio, ImageKnowledgeUio, ImportFileToAgentKnowledge200ResponseUio, KnowledgeBaseUio, KnowledgeBaseWithFilesUio, KnowledgeFileSummaryUio, KnowledgeFilesByIdsRequestUio, S3UploadBodyUio } from '../models/index';
|
|
13
|
+
import type { AgentModuleUio, BodyWithMessageUio, DocumentAddRequestUio, FileCreationRequestUio, FileCreationResponseUio, FileStatusUio, FileStatusUpdateRequestUio, FileWithDownloadUrlUio, ImageKnowledgeUio, ImportFileToAgentKnowledge200ResponseUio, KnowledgeBaseConfigurationUio, KnowledgeBaseUio, KnowledgeBaseWithFilesUio, KnowledgeFilePagePreviewUio, KnowledgeFileSummaryUio, KnowledgeFilesByIdsRequestUio, S3UploadBodyUio } from '../models/index';
|
|
14
14
|
export interface AddDocumentToKnowledgeBaseRequest {
|
|
15
15
|
agentId: string;
|
|
16
16
|
documentAddRequestUio: DocumentAddRequestUio;
|
|
@@ -56,6 +56,16 @@ export interface GetImagesFromKnowledgeBaseLibraryRequest {
|
|
|
56
56
|
export interface GetInactiveKnowledgeFileIdsRequest {
|
|
57
57
|
knowledgebaseId: string;
|
|
58
58
|
}
|
|
59
|
+
export interface GetKnowledgeBaseConfigurationRequest {
|
|
60
|
+
knowledgebaseId: string;
|
|
61
|
+
}
|
|
62
|
+
export interface GetKnowledgeFileRequest {
|
|
63
|
+
fileId: string;
|
|
64
|
+
}
|
|
65
|
+
export interface GetKnowledgeFilePagePreviewRequest {
|
|
66
|
+
fileId: string;
|
|
67
|
+
pageIndex: number;
|
|
68
|
+
}
|
|
59
69
|
export interface GetKnowledgeFilesByIdsRequest {
|
|
60
70
|
knowledgeFilesByIdsRequestUio: KnowledgeFilesByIdsRequestUio;
|
|
61
71
|
}
|
|
@@ -86,6 +96,14 @@ export interface UpdateImageStatusInKnowledgeBaseLibraryRequest {
|
|
|
86
96
|
imageId: string;
|
|
87
97
|
fileStatusUpdateRequestUio: FileStatusUpdateRequestUio;
|
|
88
98
|
}
|
|
99
|
+
export interface UpdateKnowledgeBaseConfigurationRequest {
|
|
100
|
+
knowledgebaseId: string;
|
|
101
|
+
knowledgeBaseConfigurationUio: KnowledgeBaseConfigurationUio;
|
|
102
|
+
}
|
|
103
|
+
export interface UpdateKnowledgeFileStatusRequest {
|
|
104
|
+
fileId: string;
|
|
105
|
+
fileStatusUpdateRequestUio: FileStatusUpdateRequestUio;
|
|
106
|
+
}
|
|
89
107
|
export interface UploadImageToKnowledgeBaseLibraryRequest {
|
|
90
108
|
knowledgebaseId: string;
|
|
91
109
|
image: Blob;
|
|
@@ -204,6 +222,36 @@ export declare class KnowledgeApi extends runtime.BaseAPI {
|
|
|
204
222
|
* Get inactive knowledge file IDs for a knowledge base
|
|
205
223
|
*/
|
|
206
224
|
getInactiveKnowledgeFileIds(knowledgebaseId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<string>>;
|
|
225
|
+
/**
|
|
226
|
+
* Returns the current configuration for a knowledge base
|
|
227
|
+
* Get knowledge base configuration
|
|
228
|
+
*/
|
|
229
|
+
getKnowledgeBaseConfigurationRaw(requestParameters: GetKnowledgeBaseConfigurationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<KnowledgeBaseConfigurationUio>>;
|
|
230
|
+
/**
|
|
231
|
+
* Returns the current configuration for a knowledge base
|
|
232
|
+
* Get knowledge base configuration
|
|
233
|
+
*/
|
|
234
|
+
getKnowledgeBaseConfiguration(knowledgebaseId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<KnowledgeBaseConfigurationUio>;
|
|
235
|
+
/**
|
|
236
|
+
* Retrieves metadata for a specific knowledge file by file ID
|
|
237
|
+
* Get a specific knowledge file
|
|
238
|
+
*/
|
|
239
|
+
getKnowledgeFileRaw(requestParameters: GetKnowledgeFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FileWithDownloadUrlUio>>;
|
|
240
|
+
/**
|
|
241
|
+
* Retrieves metadata for a specific knowledge file by file ID
|
|
242
|
+
* Get a specific knowledge file
|
|
243
|
+
*/
|
|
244
|
+
getKnowledgeFile(fileId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FileWithDownloadUrlUio>;
|
|
245
|
+
/**
|
|
246
|
+
* Returns a presigned URL to preview a specific page image (ColPali knowledge bases only).
|
|
247
|
+
* Get a presigned preview URL for a knowledge file page
|
|
248
|
+
*/
|
|
249
|
+
getKnowledgeFilePagePreviewRaw(requestParameters: GetKnowledgeFilePagePreviewRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<KnowledgeFilePagePreviewUio>>;
|
|
250
|
+
/**
|
|
251
|
+
* Returns a presigned URL to preview a specific page image (ColPali knowledge bases only).
|
|
252
|
+
* Get a presigned preview URL for a knowledge file page
|
|
253
|
+
*/
|
|
254
|
+
getKnowledgeFilePagePreview(fileId: string, pageIndex: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<KnowledgeFilePagePreviewUio>;
|
|
207
255
|
/**
|
|
208
256
|
* Returns knowledge file summaries (id and name) for the given file IDs.
|
|
209
257
|
* Get knowledge files by IDs
|
|
@@ -284,6 +332,30 @@ export declare class KnowledgeApi extends runtime.BaseAPI {
|
|
|
284
332
|
* Update the status of a specific knowledge image in a library image in knowledge base
|
|
285
333
|
*/
|
|
286
334
|
updateImageStatusInKnowledgeBaseLibrary(knowledgebaseId: string, imageId: string, fileStatusUpdateRequestUio: FileStatusUpdateRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FileStatusUio>;
|
|
335
|
+
/**
|
|
336
|
+
* Updates the module configuration for a knowledge base
|
|
337
|
+
* Update knowledge base configuration
|
|
338
|
+
*/
|
|
339
|
+
updateKnowledgeBaseConfigurationRaw(requestParameters: UpdateKnowledgeBaseConfigurationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<{
|
|
340
|
+
[key: string]: any;
|
|
341
|
+
}>>;
|
|
342
|
+
/**
|
|
343
|
+
* Updates the module configuration for a knowledge base
|
|
344
|
+
* Update knowledge base configuration
|
|
345
|
+
*/
|
|
346
|
+
updateKnowledgeBaseConfiguration(knowledgebaseId: string, knowledgeBaseConfigurationUio: KnowledgeBaseConfigurationUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{
|
|
347
|
+
[key: string]: any;
|
|
348
|
+
}>;
|
|
349
|
+
/**
|
|
350
|
+
* Updates the status of a knowledge file and triggers indexing when uploaded
|
|
351
|
+
* Update knowledge file status
|
|
352
|
+
*/
|
|
353
|
+
updateKnowledgeFileStatusRaw(requestParameters: UpdateKnowledgeFileStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<any>>;
|
|
354
|
+
/**
|
|
355
|
+
* Updates the status of a knowledge file and triggers indexing when uploaded
|
|
356
|
+
* Update knowledge file status
|
|
357
|
+
*/
|
|
358
|
+
updateKnowledgeFileStatus(fileId: string, fileStatusUpdateRequestUio: FileStatusUpdateRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<any>;
|
|
287
359
|
/**
|
|
288
360
|
* Upload a new image to a library image in knowledge base and return the upload URL
|
|
289
361
|
* Upload a new image to a library image in knowledge base
|
|
@@ -410,6 +410,99 @@ class KnowledgeApi extends runtime.BaseAPI {
|
|
|
410
410
|
const response = await this.getInactiveKnowledgeFileIdsRaw({ knowledgebaseId: knowledgebaseId }, initOverrides);
|
|
411
411
|
return await response.value();
|
|
412
412
|
}
|
|
413
|
+
/**
|
|
414
|
+
* Returns the current configuration for a knowledge base
|
|
415
|
+
* Get knowledge base configuration
|
|
416
|
+
*/
|
|
417
|
+
async getKnowledgeBaseConfigurationRaw(requestParameters, initOverrides) {
|
|
418
|
+
if (requestParameters['knowledgebaseId'] == null) {
|
|
419
|
+
throw new runtime.RequiredError('knowledgebaseId', 'Required parameter "knowledgebaseId" was null or undefined when calling getKnowledgeBaseConfiguration().');
|
|
420
|
+
}
|
|
421
|
+
const queryParameters = {};
|
|
422
|
+
const headerParameters = {};
|
|
423
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
424
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
425
|
+
}
|
|
426
|
+
const response = await this.request({
|
|
427
|
+
path: `/knowledge-bases/{knowledgebaseId}/configuration`.replace(`{${"knowledgebaseId"}}`, encodeURIComponent(String(requestParameters['knowledgebaseId']))),
|
|
428
|
+
method: 'GET',
|
|
429
|
+
headers: headerParameters,
|
|
430
|
+
query: queryParameters,
|
|
431
|
+
}, initOverrides);
|
|
432
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.KnowledgeBaseConfigurationUioFromJSON)(jsonValue));
|
|
433
|
+
}
|
|
434
|
+
/**
|
|
435
|
+
* Returns the current configuration for a knowledge base
|
|
436
|
+
* Get knowledge base configuration
|
|
437
|
+
*/
|
|
438
|
+
async getKnowledgeBaseConfiguration(knowledgebaseId, initOverrides) {
|
|
439
|
+
const response = await this.getKnowledgeBaseConfigurationRaw({ knowledgebaseId: knowledgebaseId }, initOverrides);
|
|
440
|
+
return await response.value();
|
|
441
|
+
}
|
|
442
|
+
/**
|
|
443
|
+
* Retrieves metadata for a specific knowledge file by file ID
|
|
444
|
+
* Get a specific knowledge file
|
|
445
|
+
*/
|
|
446
|
+
async getKnowledgeFileRaw(requestParameters, initOverrides) {
|
|
447
|
+
if (requestParameters['fileId'] == null) {
|
|
448
|
+
throw new runtime.RequiredError('fileId', 'Required parameter "fileId" was null or undefined when calling getKnowledgeFile().');
|
|
449
|
+
}
|
|
450
|
+
const queryParameters = {};
|
|
451
|
+
const headerParameters = {};
|
|
452
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
453
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
454
|
+
}
|
|
455
|
+
const response = await this.request({
|
|
456
|
+
path: `/knowledge-files/{fileId}`.replace(`{${"fileId"}}`, encodeURIComponent(String(requestParameters['fileId']))),
|
|
457
|
+
method: 'GET',
|
|
458
|
+
headers: headerParameters,
|
|
459
|
+
query: queryParameters,
|
|
460
|
+
}, initOverrides);
|
|
461
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.FileWithDownloadUrlUioFromJSON)(jsonValue));
|
|
462
|
+
}
|
|
463
|
+
/**
|
|
464
|
+
* Retrieves metadata for a specific knowledge file by file ID
|
|
465
|
+
* Get a specific knowledge file
|
|
466
|
+
*/
|
|
467
|
+
async getKnowledgeFile(fileId, initOverrides) {
|
|
468
|
+
const response = await this.getKnowledgeFileRaw({ fileId: fileId }, initOverrides);
|
|
469
|
+
return await response.value();
|
|
470
|
+
}
|
|
471
|
+
/**
|
|
472
|
+
* Returns a presigned URL to preview a specific page image (ColPali knowledge bases only).
|
|
473
|
+
* Get a presigned preview URL for a knowledge file page
|
|
474
|
+
*/
|
|
475
|
+
async getKnowledgeFilePagePreviewRaw(requestParameters, initOverrides) {
|
|
476
|
+
if (requestParameters['fileId'] == null) {
|
|
477
|
+
throw new runtime.RequiredError('fileId', 'Required parameter "fileId" was null or undefined when calling getKnowledgeFilePagePreview().');
|
|
478
|
+
}
|
|
479
|
+
if (requestParameters['pageIndex'] == null) {
|
|
480
|
+
throw new runtime.RequiredError('pageIndex', 'Required parameter "pageIndex" was null or undefined when calling getKnowledgeFilePagePreview().');
|
|
481
|
+
}
|
|
482
|
+
const queryParameters = {};
|
|
483
|
+
if (requestParameters['pageIndex'] != null) {
|
|
484
|
+
queryParameters['pageIndex'] = requestParameters['pageIndex'];
|
|
485
|
+
}
|
|
486
|
+
const headerParameters = {};
|
|
487
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
488
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
489
|
+
}
|
|
490
|
+
const response = await this.request({
|
|
491
|
+
path: `/knowledge-files/{fileId}/page-preview`.replace(`{${"fileId"}}`, encodeURIComponent(String(requestParameters['fileId']))),
|
|
492
|
+
method: 'GET',
|
|
493
|
+
headers: headerParameters,
|
|
494
|
+
query: queryParameters,
|
|
495
|
+
}, initOverrides);
|
|
496
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.KnowledgeFilePagePreviewUioFromJSON)(jsonValue));
|
|
497
|
+
}
|
|
498
|
+
/**
|
|
499
|
+
* Returns a presigned URL to preview a specific page image (ColPali knowledge bases only).
|
|
500
|
+
* Get a presigned preview URL for a knowledge file page
|
|
501
|
+
*/
|
|
502
|
+
async getKnowledgeFilePagePreview(fileId, pageIndex, initOverrides) {
|
|
503
|
+
const response = await this.getKnowledgeFilePagePreviewRaw({ fileId: fileId, pageIndex: pageIndex }, initOverrides);
|
|
504
|
+
return await response.value();
|
|
505
|
+
}
|
|
413
506
|
/**
|
|
414
507
|
* Returns knowledge file summaries (id and name) for the given file IDs.
|
|
415
508
|
* Get knowledge files by IDs
|
|
@@ -690,6 +783,79 @@ class KnowledgeApi extends runtime.BaseAPI {
|
|
|
690
783
|
const response = await this.updateImageStatusInKnowledgeBaseLibraryRaw({ knowledgebaseId: knowledgebaseId, imageId: imageId, fileStatusUpdateRequestUio: fileStatusUpdateRequestUio }, initOverrides);
|
|
691
784
|
return await response.value();
|
|
692
785
|
}
|
|
786
|
+
/**
|
|
787
|
+
* Updates the module configuration for a knowledge base
|
|
788
|
+
* Update knowledge base configuration
|
|
789
|
+
*/
|
|
790
|
+
async updateKnowledgeBaseConfigurationRaw(requestParameters, initOverrides) {
|
|
791
|
+
if (requestParameters['knowledgebaseId'] == null) {
|
|
792
|
+
throw new runtime.RequiredError('knowledgebaseId', 'Required parameter "knowledgebaseId" was null or undefined when calling updateKnowledgeBaseConfiguration().');
|
|
793
|
+
}
|
|
794
|
+
if (requestParameters['knowledgeBaseConfigurationUio'] == null) {
|
|
795
|
+
throw new runtime.RequiredError('knowledgeBaseConfigurationUio', 'Required parameter "knowledgeBaseConfigurationUio" was null or undefined when calling updateKnowledgeBaseConfiguration().');
|
|
796
|
+
}
|
|
797
|
+
const queryParameters = {};
|
|
798
|
+
const headerParameters = {};
|
|
799
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
800
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
801
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
802
|
+
}
|
|
803
|
+
const response = await this.request({
|
|
804
|
+
path: `/knowledge-bases/{knowledgebaseId}/configuration`.replace(`{${"knowledgebaseId"}}`, encodeURIComponent(String(requestParameters['knowledgebaseId']))),
|
|
805
|
+
method: 'PUT',
|
|
806
|
+
headers: headerParameters,
|
|
807
|
+
query: queryParameters,
|
|
808
|
+
body: (0, index_1.KnowledgeBaseConfigurationUioToJSON)(requestParameters['knowledgeBaseConfigurationUio']),
|
|
809
|
+
}, initOverrides);
|
|
810
|
+
return new runtime.JSONApiResponse(response);
|
|
811
|
+
}
|
|
812
|
+
/**
|
|
813
|
+
* Updates the module configuration for a knowledge base
|
|
814
|
+
* Update knowledge base configuration
|
|
815
|
+
*/
|
|
816
|
+
async updateKnowledgeBaseConfiguration(knowledgebaseId, knowledgeBaseConfigurationUio, initOverrides) {
|
|
817
|
+
const response = await this.updateKnowledgeBaseConfigurationRaw({ knowledgebaseId: knowledgebaseId, knowledgeBaseConfigurationUio: knowledgeBaseConfigurationUio }, initOverrides);
|
|
818
|
+
return await response.value();
|
|
819
|
+
}
|
|
820
|
+
/**
|
|
821
|
+
* Updates the status of a knowledge file and triggers indexing when uploaded
|
|
822
|
+
* Update knowledge file status
|
|
823
|
+
*/
|
|
824
|
+
async updateKnowledgeFileStatusRaw(requestParameters, initOverrides) {
|
|
825
|
+
if (requestParameters['fileId'] == null) {
|
|
826
|
+
throw new runtime.RequiredError('fileId', 'Required parameter "fileId" was null or undefined when calling updateKnowledgeFileStatus().');
|
|
827
|
+
}
|
|
828
|
+
if (requestParameters['fileStatusUpdateRequestUio'] == null) {
|
|
829
|
+
throw new runtime.RequiredError('fileStatusUpdateRequestUio', 'Required parameter "fileStatusUpdateRequestUio" was null or undefined when calling updateKnowledgeFileStatus().');
|
|
830
|
+
}
|
|
831
|
+
const queryParameters = {};
|
|
832
|
+
const headerParameters = {};
|
|
833
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
834
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
835
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
836
|
+
}
|
|
837
|
+
const response = await this.request({
|
|
838
|
+
path: `/knowledge-files/{fileId}/status`.replace(`{${"fileId"}}`, encodeURIComponent(String(requestParameters['fileId']))),
|
|
839
|
+
method: 'POST',
|
|
840
|
+
headers: headerParameters,
|
|
841
|
+
query: queryParameters,
|
|
842
|
+
body: (0, index_1.FileStatusUpdateRequestUioToJSON)(requestParameters['fileStatusUpdateRequestUio']),
|
|
843
|
+
}, initOverrides);
|
|
844
|
+
if (this.isJsonMime(response.headers.get('content-type'))) {
|
|
845
|
+
return new runtime.JSONApiResponse(response);
|
|
846
|
+
}
|
|
847
|
+
else {
|
|
848
|
+
return new runtime.TextApiResponse(response);
|
|
849
|
+
}
|
|
850
|
+
}
|
|
851
|
+
/**
|
|
852
|
+
* Updates the status of a knowledge file and triggers indexing when uploaded
|
|
853
|
+
* Update knowledge file status
|
|
854
|
+
*/
|
|
855
|
+
async updateKnowledgeFileStatus(fileId, fileStatusUpdateRequestUio, initOverrides) {
|
|
856
|
+
const response = await this.updateKnowledgeFileStatusRaw({ fileId: fileId, fileStatusUpdateRequestUio: fileStatusUpdateRequestUio }, initOverrides);
|
|
857
|
+
return await response.value();
|
|
858
|
+
}
|
|
693
859
|
/**
|
|
694
860
|
* Upload a new image to a library image in knowledge base and return the upload URL
|
|
695
861
|
* Upload a new image to a library image in knowledge base
|
package/dist/apis/ToolsApi.d.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { AgentToolUio, ConnectOAuth2Tool200ResponseUio, RevealTokenRequestUio, RevealTokenResponseUio, STTResponseUio, SetTokenRequestUio, TTSRequestUio, TTSResponseUio, ToolCreateRequestUio, ToolSecureUio, ToolUpdateRequestUio } from '../models/index';
|
|
13
|
+
import type { AgentToolUio, ConnectOAuth2Tool200ResponseUio, IntrospectMcpTool200ResponseUio, RevealTokenRequestUio, RevealTokenResponseUio, STTResponseUio, SetTokenRequestUio, TTSRequestUio, TTSResponseUio, ToolCreateRequestUio, ToolSecureUio, ToolUpdateRequestUio } from '../models/index';
|
|
14
14
|
export interface ConnectOAuth2ToolRequest {
|
|
15
15
|
toolId: string;
|
|
16
16
|
}
|
|
@@ -36,6 +36,9 @@ export interface DisconnectOAuth2ToolRequest {
|
|
|
36
36
|
export interface GetToolSecureRequest {
|
|
37
37
|
toolId: string;
|
|
38
38
|
}
|
|
39
|
+
export interface IntrospectMcpToolRequest {
|
|
40
|
+
toolId: string;
|
|
41
|
+
}
|
|
39
42
|
export interface RevealToolTokenRequest {
|
|
40
43
|
toolId: string;
|
|
41
44
|
revealTokenRequestUio: RevealTokenRequestUio;
|
|
@@ -126,6 +129,14 @@ export declare class ToolsApi extends runtime.BaseAPI {
|
|
|
126
129
|
* Get a specific tool (UI-safe)
|
|
127
130
|
*/
|
|
128
131
|
getToolSecure(toolId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ToolSecureUio>;
|
|
132
|
+
/**
|
|
133
|
+
* Introspect an MCP tool server to refresh available actions
|
|
134
|
+
*/
|
|
135
|
+
introspectMcpToolRaw(requestParameters: IntrospectMcpToolRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IntrospectMcpTool200ResponseUio>>;
|
|
136
|
+
/**
|
|
137
|
+
* Introspect an MCP tool server to refresh available actions
|
|
138
|
+
*/
|
|
139
|
+
introspectMcpTool(toolId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IntrospectMcpTool200ResponseUio>;
|
|
129
140
|
/**
|
|
130
141
|
* Returns the raw token if it exists and the caller is authorized.
|
|
131
142
|
* Reveal stored tool token (masked in GET)
|
package/dist/apis/ToolsApi.js
CHANGED
|
@@ -266,6 +266,33 @@ class ToolsApi extends runtime.BaseAPI {
|
|
|
266
266
|
const response = await this.getToolSecureRaw({ toolId: toolId }, initOverrides);
|
|
267
267
|
return await response.value();
|
|
268
268
|
}
|
|
269
|
+
/**
|
|
270
|
+
* Introspect an MCP tool server to refresh available actions
|
|
271
|
+
*/
|
|
272
|
+
async introspectMcpToolRaw(requestParameters, initOverrides) {
|
|
273
|
+
if (requestParameters['toolId'] == null) {
|
|
274
|
+
throw new runtime.RequiredError('toolId', 'Required parameter "toolId" was null or undefined when calling introspectMcpTool().');
|
|
275
|
+
}
|
|
276
|
+
const queryParameters = {};
|
|
277
|
+
const headerParameters = {};
|
|
278
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
279
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
280
|
+
}
|
|
281
|
+
const response = await this.request({
|
|
282
|
+
path: `/tools/{toolId}/mcp/introspect`.replace(`{${"toolId"}}`, encodeURIComponent(String(requestParameters['toolId']))),
|
|
283
|
+
method: 'GET',
|
|
284
|
+
headers: headerParameters,
|
|
285
|
+
query: queryParameters,
|
|
286
|
+
}, initOverrides);
|
|
287
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.IntrospectMcpTool200ResponseUioFromJSON)(jsonValue));
|
|
288
|
+
}
|
|
289
|
+
/**
|
|
290
|
+
* Introspect an MCP tool server to refresh available actions
|
|
291
|
+
*/
|
|
292
|
+
async introspectMcpTool(toolId, initOverrides) {
|
|
293
|
+
const response = await this.introspectMcpToolRaw({ toolId: toolId }, initOverrides);
|
|
294
|
+
return await response.value();
|
|
295
|
+
}
|
|
269
296
|
/**
|
|
270
297
|
* Returns the raw token if it exists and the caller is authorized.
|
|
271
298
|
* Reveal stored tool token (masked in GET)
|
|
@@ -0,0 +1,48 @@
|
|
|
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 IntrospectMcpTool200ResponseUio
|
|
16
|
+
*/
|
|
17
|
+
export interface IntrospectMcpTool200ResponseUio {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {{ [key: string]: any; }}
|
|
21
|
+
* @memberof IntrospectMcpTool200ResponseUio
|
|
22
|
+
*/
|
|
23
|
+
introspection?: {
|
|
24
|
+
[key: string]: any;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
*
|
|
28
|
+
* @type {{ [key: string]: any; }}
|
|
29
|
+
* @memberof IntrospectMcpTool200ResponseUio
|
|
30
|
+
*/
|
|
31
|
+
definition?: {
|
|
32
|
+
[key: string]: any;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {Array<string>}
|
|
37
|
+
* @memberof IntrospectMcpTool200ResponseUio
|
|
38
|
+
*/
|
|
39
|
+
allowedTools?: Array<string>;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Check if a given object implements the IntrospectMcpTool200ResponseUio interface.
|
|
43
|
+
*/
|
|
44
|
+
export declare function instanceOfIntrospectMcpTool200ResponseUio(value: object): value is IntrospectMcpTool200ResponseUio;
|
|
45
|
+
export declare function IntrospectMcpTool200ResponseUioFromJSON(json: any): IntrospectMcpTool200ResponseUio;
|
|
46
|
+
export declare function IntrospectMcpTool200ResponseUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): IntrospectMcpTool200ResponseUio;
|
|
47
|
+
export declare function IntrospectMcpTool200ResponseUioToJSON(json: any): IntrospectMcpTool200ResponseUio;
|
|
48
|
+
export declare function IntrospectMcpTool200ResponseUioToJSONTyped(value?: IntrospectMcpTool200ResponseUio | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,52 @@
|
|
|
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.instanceOfIntrospectMcpTool200ResponseUio = instanceOfIntrospectMcpTool200ResponseUio;
|
|
17
|
+
exports.IntrospectMcpTool200ResponseUioFromJSON = IntrospectMcpTool200ResponseUioFromJSON;
|
|
18
|
+
exports.IntrospectMcpTool200ResponseUioFromJSONTyped = IntrospectMcpTool200ResponseUioFromJSONTyped;
|
|
19
|
+
exports.IntrospectMcpTool200ResponseUioToJSON = IntrospectMcpTool200ResponseUioToJSON;
|
|
20
|
+
exports.IntrospectMcpTool200ResponseUioToJSONTyped = IntrospectMcpTool200ResponseUioToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the IntrospectMcpTool200ResponseUio interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfIntrospectMcpTool200ResponseUio(value) {
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
function IntrospectMcpTool200ResponseUioFromJSON(json) {
|
|
28
|
+
return IntrospectMcpTool200ResponseUioFromJSONTyped(json, false);
|
|
29
|
+
}
|
|
30
|
+
function IntrospectMcpTool200ResponseUioFromJSONTyped(json, ignoreDiscriminator) {
|
|
31
|
+
if (json == null) {
|
|
32
|
+
return json;
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
'introspection': json['introspection'] == null ? undefined : json['introspection'],
|
|
36
|
+
'definition': json['definition'] == null ? undefined : json['definition'],
|
|
37
|
+
'allowedTools': json['allowedTools'] == null ? undefined : json['allowedTools'],
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
function IntrospectMcpTool200ResponseUioToJSON(json) {
|
|
41
|
+
return IntrospectMcpTool200ResponseUioToJSONTyped(json, false);
|
|
42
|
+
}
|
|
43
|
+
function IntrospectMcpTool200ResponseUioToJSONTyped(value, ignoreDiscriminator = false) {
|
|
44
|
+
if (value == null) {
|
|
45
|
+
return value;
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
'introspection': value['introspection'],
|
|
49
|
+
'definition': value['definition'],
|
|
50
|
+
'allowedTools': value['allowedTools'],
|
|
51
|
+
};
|
|
52
|
+
}
|
|
@@ -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
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface KnowledgeBaseConfigurationAuthenticationOneOfUio
|
|
16
|
+
*/
|
|
17
|
+
export interface KnowledgeBaseConfigurationAuthenticationOneOfUio {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof KnowledgeBaseConfigurationAuthenticationOneOfUio
|
|
22
|
+
*/
|
|
23
|
+
apiKey?: string;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof KnowledgeBaseConfigurationAuthenticationOneOfUio
|
|
28
|
+
*/
|
|
29
|
+
type?: KnowledgeBaseConfigurationAuthenticationOneOfUioTypeEnum;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* @export
|
|
33
|
+
*/
|
|
34
|
+
export declare const KnowledgeBaseConfigurationAuthenticationOneOfUioTypeEnum: {
|
|
35
|
+
readonly ApiKey: "API_KEY";
|
|
36
|
+
};
|
|
37
|
+
export type KnowledgeBaseConfigurationAuthenticationOneOfUioTypeEnum = typeof KnowledgeBaseConfigurationAuthenticationOneOfUioTypeEnum[keyof typeof KnowledgeBaseConfigurationAuthenticationOneOfUioTypeEnum];
|
|
38
|
+
/**
|
|
39
|
+
* Check if a given object implements the KnowledgeBaseConfigurationAuthenticationOneOfUio interface.
|
|
40
|
+
*/
|
|
41
|
+
export declare function instanceOfKnowledgeBaseConfigurationAuthenticationOneOfUio(value: object): value is KnowledgeBaseConfigurationAuthenticationOneOfUio;
|
|
42
|
+
export declare function KnowledgeBaseConfigurationAuthenticationOneOfUioFromJSON(json: any): KnowledgeBaseConfigurationAuthenticationOneOfUio;
|
|
43
|
+
export declare function KnowledgeBaseConfigurationAuthenticationOneOfUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): KnowledgeBaseConfigurationAuthenticationOneOfUio;
|
|
44
|
+
export declare function KnowledgeBaseConfigurationAuthenticationOneOfUioToJSON(json: any): KnowledgeBaseConfigurationAuthenticationOneOfUio;
|
|
45
|
+
export declare function KnowledgeBaseConfigurationAuthenticationOneOfUioToJSONTyped(value?: KnowledgeBaseConfigurationAuthenticationOneOfUio | 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.KnowledgeBaseConfigurationAuthenticationOneOfUioTypeEnum = void 0;
|
|
17
|
+
exports.instanceOfKnowledgeBaseConfigurationAuthenticationOneOfUio = instanceOfKnowledgeBaseConfigurationAuthenticationOneOfUio;
|
|
18
|
+
exports.KnowledgeBaseConfigurationAuthenticationOneOfUioFromJSON = KnowledgeBaseConfigurationAuthenticationOneOfUioFromJSON;
|
|
19
|
+
exports.KnowledgeBaseConfigurationAuthenticationOneOfUioFromJSONTyped = KnowledgeBaseConfigurationAuthenticationOneOfUioFromJSONTyped;
|
|
20
|
+
exports.KnowledgeBaseConfigurationAuthenticationOneOfUioToJSON = KnowledgeBaseConfigurationAuthenticationOneOfUioToJSON;
|
|
21
|
+
exports.KnowledgeBaseConfigurationAuthenticationOneOfUioToJSONTyped = KnowledgeBaseConfigurationAuthenticationOneOfUioToJSONTyped;
|
|
22
|
+
/**
|
|
23
|
+
* @export
|
|
24
|
+
*/
|
|
25
|
+
exports.KnowledgeBaseConfigurationAuthenticationOneOfUioTypeEnum = {
|
|
26
|
+
ApiKey: 'API_KEY'
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Check if a given object implements the KnowledgeBaseConfigurationAuthenticationOneOfUio interface.
|
|
30
|
+
*/
|
|
31
|
+
function instanceOfKnowledgeBaseConfigurationAuthenticationOneOfUio(value) {
|
|
32
|
+
return true;
|
|
33
|
+
}
|
|
34
|
+
function KnowledgeBaseConfigurationAuthenticationOneOfUioFromJSON(json) {
|
|
35
|
+
return KnowledgeBaseConfigurationAuthenticationOneOfUioFromJSONTyped(json, false);
|
|
36
|
+
}
|
|
37
|
+
function KnowledgeBaseConfigurationAuthenticationOneOfUioFromJSONTyped(json, ignoreDiscriminator) {
|
|
38
|
+
if (json == null) {
|
|
39
|
+
return json;
|
|
40
|
+
}
|
|
41
|
+
return {
|
|
42
|
+
'apiKey': json['apiKey'] == null ? undefined : json['apiKey'],
|
|
43
|
+
'type': json['type'] == null ? undefined : json['type'],
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
function KnowledgeBaseConfigurationAuthenticationOneOfUioToJSON(json) {
|
|
47
|
+
return KnowledgeBaseConfigurationAuthenticationOneOfUioToJSONTyped(json, false);
|
|
48
|
+
}
|
|
49
|
+
function KnowledgeBaseConfigurationAuthenticationOneOfUioToJSONTyped(value, ignoreDiscriminator = false) {
|
|
50
|
+
if (value == null) {
|
|
51
|
+
return value;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
'apiKey': value['apiKey'],
|
|
55
|
+
'type': value['type'],
|
|
56
|
+
};
|
|
57
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
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 { KnowledgeBaseConfigurationAuthenticationOneOfUio } from './KnowledgeBaseConfigurationAuthenticationOneOfUio';
|
|
13
|
+
/**
|
|
14
|
+
* @type KnowledgeBaseConfigurationAuthenticationUio
|
|
15
|
+
*
|
|
16
|
+
* @export
|
|
17
|
+
*/
|
|
18
|
+
export type KnowledgeBaseConfigurationAuthenticationUio = KnowledgeBaseConfigurationAuthenticationOneOfUio | string;
|
|
19
|
+
export declare function KnowledgeBaseConfigurationAuthenticationUioFromJSON(json: any): KnowledgeBaseConfigurationAuthenticationUio;
|
|
20
|
+
export declare function KnowledgeBaseConfigurationAuthenticationUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): KnowledgeBaseConfigurationAuthenticationUio;
|
|
21
|
+
export declare function KnowledgeBaseConfigurationAuthenticationUioToJSON(json: any): any;
|
|
22
|
+
export declare function KnowledgeBaseConfigurationAuthenticationUioToJSONTyped(value?: KnowledgeBaseConfigurationAuthenticationUio | 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.KnowledgeBaseConfigurationAuthenticationUioFromJSON = KnowledgeBaseConfigurationAuthenticationUioFromJSON;
|
|
17
|
+
exports.KnowledgeBaseConfigurationAuthenticationUioFromJSONTyped = KnowledgeBaseConfigurationAuthenticationUioFromJSONTyped;
|
|
18
|
+
exports.KnowledgeBaseConfigurationAuthenticationUioToJSON = KnowledgeBaseConfigurationAuthenticationUioToJSON;
|
|
19
|
+
exports.KnowledgeBaseConfigurationAuthenticationUioToJSONTyped = KnowledgeBaseConfigurationAuthenticationUioToJSONTyped;
|
|
20
|
+
const KnowledgeBaseConfigurationAuthenticationOneOfUio_1 = require("./KnowledgeBaseConfigurationAuthenticationOneOfUio");
|
|
21
|
+
function KnowledgeBaseConfigurationAuthenticationUioFromJSON(json) {
|
|
22
|
+
return KnowledgeBaseConfigurationAuthenticationUioFromJSONTyped(json, false);
|
|
23
|
+
}
|
|
24
|
+
function KnowledgeBaseConfigurationAuthenticationUioFromJSONTyped(json, ignoreDiscriminator) {
|
|
25
|
+
if (json == null) {
|
|
26
|
+
return json;
|
|
27
|
+
}
|
|
28
|
+
if (typeof json !== 'object') {
|
|
29
|
+
return json;
|
|
30
|
+
}
|
|
31
|
+
if ((0, KnowledgeBaseConfigurationAuthenticationOneOfUio_1.instanceOfKnowledgeBaseConfigurationAuthenticationOneOfUio)(json)) {
|
|
32
|
+
return (0, KnowledgeBaseConfigurationAuthenticationOneOfUio_1.KnowledgeBaseConfigurationAuthenticationOneOfUioFromJSONTyped)(json, true);
|
|
33
|
+
}
|
|
34
|
+
return {};
|
|
35
|
+
}
|
|
36
|
+
function KnowledgeBaseConfigurationAuthenticationUioToJSON(json) {
|
|
37
|
+
return KnowledgeBaseConfigurationAuthenticationUioToJSONTyped(json, false);
|
|
38
|
+
}
|
|
39
|
+
function KnowledgeBaseConfigurationAuthenticationUioToJSONTyped(value, ignoreDiscriminator = false) {
|
|
40
|
+
if (value == null) {
|
|
41
|
+
return value;
|
|
42
|
+
}
|
|
43
|
+
if (typeof value !== 'object') {
|
|
44
|
+
return value;
|
|
45
|
+
}
|
|
46
|
+
if ((0, KnowledgeBaseConfigurationAuthenticationOneOfUio_1.instanceOfKnowledgeBaseConfigurationAuthenticationOneOfUio)(value)) {
|
|
47
|
+
return (0, KnowledgeBaseConfigurationAuthenticationOneOfUio_1.KnowledgeBaseConfigurationAuthenticationOneOfUioToJSON)(value);
|
|
48
|
+
}
|
|
49
|
+
return {};
|
|
50
|
+
}
|