@breign/client 1.0.42 → 1.0.44

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.
@@ -20,6 +20,9 @@ export interface CreateCustomVariableRequest {
20
20
  [key: string]: string;
21
21
  };
22
22
  }
23
+ export interface DeleteAllAttachmentsRequest {
24
+ conversationId: string;
25
+ }
23
26
  export interface DeleteAllConversationsRequest {
24
27
  organizationId: string;
25
28
  providerSource?: DeleteAllConversationsProviderSourceEnum;
@@ -80,6 +83,16 @@ export declare class ConversationsApi extends runtime.BaseAPI {
80
83
  createCustomVariable(conversationId: string, requestBody: {
81
84
  [key: string]: string;
82
85
  }, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
86
+ /**
87
+ * Remove all attachments from the context of a specific conversation.
88
+ * Delete all attachments from a conversation context.
89
+ */
90
+ deleteAllAttachmentsRaw(requestParameters: DeleteAllAttachmentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
91
+ /**
92
+ * Remove all attachments from the context of a specific conversation.
93
+ * Delete all attachments from a conversation context.
94
+ */
95
+ deleteAllAttachments(conversationId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
83
96
  /**
84
97
  * Delete all conversations created by the authenticated user in the specified organization.
85
98
  * Delete all conversations
@@ -114,6 +114,34 @@ class ConversationsApi extends runtime.BaseAPI {
114
114
  async createCustomVariable(conversationId, requestBody, initOverrides) {
115
115
  await this.createCustomVariableRaw({ conversationId: conversationId, requestBody: requestBody }, initOverrides);
116
116
  }
117
+ /**
118
+ * Remove all attachments from the context of a specific conversation.
119
+ * Delete all attachments from a conversation context.
120
+ */
121
+ async deleteAllAttachmentsRaw(requestParameters, initOverrides) {
122
+ if (requestParameters['conversationId'] == null) {
123
+ throw new runtime.RequiredError('conversationId', 'Required parameter "conversationId" was null or undefined when calling deleteAllAttachments().');
124
+ }
125
+ const queryParameters = {};
126
+ const headerParameters = {};
127
+ if (this.configuration && this.configuration.apiKey) {
128
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
129
+ }
130
+ const response = await this.request({
131
+ path: `/conversations/{conversationId}/context/attachments`.replace(`{${"conversationId"}}`, encodeURIComponent(String(requestParameters['conversationId']))),
132
+ method: 'DELETE',
133
+ headers: headerParameters,
134
+ query: queryParameters,
135
+ }, initOverrides);
136
+ return new runtime.VoidApiResponse(response);
137
+ }
138
+ /**
139
+ * Remove all attachments from the context of a specific conversation.
140
+ * Delete all attachments from a conversation context.
141
+ */
142
+ async deleteAllAttachments(conversationId, initOverrides) {
143
+ await this.deleteAllAttachmentsRaw({ conversationId: conversationId }, initOverrides);
144
+ }
117
145
  /**
118
146
  * Delete all conversations created by the authenticated user in the specified organization.
119
147
  * Delete all conversations
@@ -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
+ }
@@ -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';
@@ -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
@@ -2981,6 +2981,38 @@
2981
2981
  }
2982
2982
  },
2983
2983
  "/conversations/{conversationId}/context/attachments" : {
2984
+ "delete" : {
2985
+ "description" : "Remove all attachments from the context of a specific conversation.",
2986
+ "operationId" : "deleteAllAttachments",
2987
+ "parameters" : [ {
2988
+ "description" : "The ID of the conversation",
2989
+ "in" : "path",
2990
+ "name" : "conversationId",
2991
+ "required" : true,
2992
+ "schema" : {
2993
+ "type" : "string"
2994
+ }
2995
+ } ],
2996
+ "responses" : {
2997
+ "204" : {
2998
+ "description" : "Successfully deleted all attachments."
2999
+ },
3000
+ "401" : {
3001
+ "description" : "Unauthorized"
3002
+ },
3003
+ "403" : {
3004
+ "description" : "Forbidden - User cannot access this conversation"
3005
+ },
3006
+ "404" : {
3007
+ "description" : "Conversation not found"
3008
+ },
3009
+ "500" : {
3010
+ "description" : "Server error"
3011
+ }
3012
+ },
3013
+ "summary" : "Delete all attachments from a conversation context.",
3014
+ "tags" : [ "conversations" ]
3015
+ },
2984
3016
  "post" : {
2985
3017
  "description" : "Upload one file attachment to the context of a specific conversation.",
2986
3018
  "operationId" : "uploadAttachment",
@@ -4340,6 +4372,51 @@
4340
4372
  "tags" : [ "knowledge" ]
4341
4373
  }
4342
4374
  },
4375
+ "/agents/{agentId}/knowledge-files" : {
4376
+ "get" : {
4377
+ "description" : "Returns all knowledge bases attached to the agent and their indexed files.",
4378
+ "operationId" : "getAgentKnowledgeFiles",
4379
+ "parameters" : [ {
4380
+ "description" : "ID of the agent",
4381
+ "in" : "path",
4382
+ "name" : "agentId",
4383
+ "required" : true,
4384
+ "schema" : {
4385
+ "format" : "uuid",
4386
+ "type" : "string"
4387
+ }
4388
+ } ],
4389
+ "responses" : {
4390
+ "200" : {
4391
+ "content" : {
4392
+ "application/json" : {
4393
+ "schema" : {
4394
+ "items" : {
4395
+ "$ref" : "#/components/schemas/KnowledgeBaseWithFiles"
4396
+ },
4397
+ "type" : "array"
4398
+ }
4399
+ }
4400
+ },
4401
+ "description" : "List of knowledge bases gand their files"
4402
+ },
4403
+ "401" : {
4404
+ "description" : "Unauthorized"
4405
+ },
4406
+ "403" : {
4407
+ "description" : "Forbidden - User cannot access this brain"
4408
+ },
4409
+ "404" : {
4410
+ "description" : "Agent not found or no knowledge base attached"
4411
+ },
4412
+ "500" : {
4413
+ "description" : "Server error"
4414
+ }
4415
+ },
4416
+ "summary" : "Get knowledge bases and files for an agent",
4417
+ "tags" : [ "knowledge" ]
4418
+ }
4419
+ },
4343
4420
  "/agents/{agentId}/knowledge/project-imports" : {
4344
4421
  "post" : {
4345
4422
  "description" : "Imports project data from a local JSON file into the agent's knowledge base",
@@ -4733,6 +4810,56 @@
4733
4810
  "tags" : [ "knowledge" ]
4734
4811
  }
4735
4812
  },
4813
+ "/organizations/{organizationId}/agents/{agentId}/available-knowledge-bases" : {
4814
+ "get" : {
4815
+ "description" : "Returns all knowledge bases belonging to the organization that can be assigned to the specified agent…\n",
4816
+ "operationId" : "getAvailableKnowledgeBases",
4817
+ "parameters" : [ {
4818
+ "in" : "path",
4819
+ "name" : "organizationId",
4820
+ "required" : true,
4821
+ "schema" : {
4822
+ "type" : "string"
4823
+ }
4824
+ }, {
4825
+ "in" : "path",
4826
+ "name" : "agentId",
4827
+ "required" : true,
4828
+ "schema" : {
4829
+ "type" : "string"
4830
+ }
4831
+ } ],
4832
+ "responses" : {
4833
+ "200" : {
4834
+ "content" : {
4835
+ "application/json" : {
4836
+ "schema" : {
4837
+ "items" : {
4838
+ "$ref" : "#/components/schemas/KnowledgeBase"
4839
+ },
4840
+ "type" : "array"
4841
+ }
4842
+ }
4843
+ },
4844
+ "description" : "Successful retrieval of available knowledge bases"
4845
+ },
4846
+ "401" : {
4847
+ "description" : "Unauthorized"
4848
+ },
4849
+ "403" : {
4850
+ "description" : "Forbidden – user does not belong to the organization"
4851
+ },
4852
+ "404" : {
4853
+ "description" : "Organization or agent not found"
4854
+ },
4855
+ "500" : {
4856
+ "description" : "Server error"
4857
+ }
4858
+ },
4859
+ "summary" : "List available knowledge bases for an agent",
4860
+ "tags" : [ "knowledge" ]
4861
+ }
4862
+ },
4736
4863
  "/organizations/{organizationId}/knowledge/resets" : {
4737
4864
  "post" : {
4738
4865
  "description" : "Reset knowledge base",
@@ -8561,6 +8688,59 @@
8561
8688
  "required" : [ "shortDesc", "title" ],
8562
8689
  "type" : "object"
8563
8690
  },
8691
+ "KnowledgeBaseWithFiles" : {
8692
+ "properties" : {
8693
+ "id" : {
8694
+ "type" : "string"
8695
+ },
8696
+ "name" : {
8697
+ "type" : "string"
8698
+ },
8699
+ "indexed" : {
8700
+ "type" : "boolean"
8701
+ },
8702
+ "organisationId" : {
8703
+ "type" : "string"
8704
+ },
8705
+ "createdAt" : {
8706
+ "format" : "date-time",
8707
+ "type" : "string"
8708
+ },
8709
+ "updatedAt" : {
8710
+ "format" : "date-time",
8711
+ "type" : "string"
8712
+ },
8713
+ "authorizedAgents" : {
8714
+ "items" : {
8715
+ "type" : "string"
8716
+ },
8717
+ "type" : "array"
8718
+ },
8719
+ "files" : {
8720
+ "items" : {
8721
+ "$ref" : "#/components/schemas/KnowledgeFileSummary"
8722
+ },
8723
+ "type" : "array"
8724
+ }
8725
+ },
8726
+ "required" : [ "files", "id", "indexed", "name", "organisationId" ],
8727
+ "type" : "object"
8728
+ },
8729
+ "KnowledgeFileSummary" : {
8730
+ "properties" : {
8731
+ "id" : {
8732
+ "type" : "string"
8733
+ },
8734
+ "name" : {
8735
+ "type" : "string"
8736
+ },
8737
+ "knowledgeBaseId" : {
8738
+ "$ref" : "#/components/schemas/KnowledgeFileSummary_knowledgeBaseId"
8739
+ }
8740
+ },
8741
+ "required" : [ "id", "name" ],
8742
+ "type" : "object"
8743
+ },
8564
8744
  "DocumentAddRequest" : {
8565
8745
  "properties" : {
8566
8746
  "document" : {
@@ -8881,6 +9061,10 @@
8881
9061
  "required" : [ "message" ],
8882
9062
  "type" : "object"
8883
9063
  },
9064
+ "KnowledgeBasePrivacy" : {
9065
+ "enum" : [ "private", "public" ],
9066
+ "type" : "string"
9067
+ },
8884
9068
  "HealthStatus" : {
8885
9069
  "enum" : [ "ok", "degraded", "down" ],
8886
9070
  "type" : "string"
@@ -9022,10 +9206,6 @@
9022
9206
  "enum" : [ "ELEVENLABS" ],
9023
9207
  "type" : "string"
9024
9208
  },
9025
- "KnowledgeBasePrivacy" : {
9026
- "enum" : [ "private", "public" ],
9027
- "type" : "string"
9028
- },
9029
9209
  "importFileToAgentKnowledge_request" : {
9030
9210
  "properties" : {
9031
9211
  "file" : {
@@ -9359,6 +9539,16 @@
9359
9539
  "required" : [ "id", "name" ],
9360
9540
  "type" : "object"
9361
9541
  },
9542
+ "KnowledgeFileSummary_knowledgeBaseId" : {
9543
+ "oneOf" : [ {
9544
+ "type" : "string"
9545
+ }, {
9546
+ "items" : {
9547
+ "type" : "string"
9548
+ },
9549
+ "type" : "array"
9550
+ } ]
9551
+ },
9362
9552
  "ToolSecure_configuration" : {
9363
9553
  "additionalProperties" : true,
9364
9554
  "properties" : {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@breign/client",
3
- "version": "1.0.42",
3
+ "version": "1.0.44",
4
4
  "main": "dist/index.js",
5
5
  "exports": {
6
6
  ".": "./dist/index.js",