@breign/client 1.0.33 → 1.0.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,7 +10,10 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { AttachmentCreateRequestUio, BodyWithMessageUio, ContextUio, FileAttachmentUio } from '../models/index';
13
+ import type { AttachmentCreateRequestUio, BodyWithMessageUio, ContextUio, ConversationSummaryUio, FileAttachmentUio } from '../models/index';
14
+ export interface ArchiveConversationByIdRequest {
15
+ conversationId: string;
16
+ }
14
17
  export interface CreateCustomVariableRequest {
15
18
  conversationId: string;
16
19
  requestBody: {
@@ -35,6 +38,10 @@ export interface GetContextRequest {
35
38
  export interface GetContextCustomVariableRequest {
36
39
  conversationId: string;
37
40
  }
41
+ export interface GetConversationsRequest {
42
+ organizationId?: string;
43
+ providerSource?: GetConversationsProviderSourceEnum;
44
+ }
38
45
  export interface UpdateAttachmentStatusRequest {
39
46
  conversationId: string;
40
47
  attachmentId: string;
@@ -47,6 +54,16 @@ export interface UploadAttachmentRequest {
47
54
  *
48
55
  */
49
56
  export declare class ConversationsApi extends runtime.BaseAPI {
57
+ /**
58
+ * Archives a specific conversation by its ID.
59
+ * Archive a conversation.
60
+ */
61
+ archiveConversationByIdRaw(requestParameters: ArchiveConversationByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
62
+ /**
63
+ * Archives a specific conversation by its ID.
64
+ * Archive a conversation.
65
+ */
66
+ archiveConversationById(conversationId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
50
67
  /**
51
68
  * Create a custom variable in the context of a specific conversation by its ID.
52
69
  * Create a custom variable in the context of a conversation
@@ -113,6 +130,16 @@ export declare class ConversationsApi extends runtime.BaseAPI {
113
130
  getContextCustomVariable(conversationId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{
114
131
  [key: string]: string;
115
132
  }>;
133
+ /**
134
+ * Retrieve a list of conversations for the authenticated user.
135
+ * List conversations
136
+ */
137
+ getConversationsRaw(requestParameters: GetConversationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ConversationSummaryUio>>>;
138
+ /**
139
+ * Retrieve a list of conversations for the authenticated user.
140
+ * List conversations
141
+ */
142
+ getConversations(organizationId?: string, providerSource?: GetConversationsProviderSourceEnum, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ConversationSummaryUio>>;
116
143
  /**
117
144
  * Change the status of an attachment to \'PROCESSING\' after it has been uploaded.
118
145
  * Update the status of an uploaded attachment
@@ -134,3 +161,11 @@ export declare class ConversationsApi extends runtime.BaseAPI {
134
161
  */
135
162
  uploadAttachment(conversationId: string, attachmentCreateRequestUio: AttachmentCreateRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
136
163
  }
164
+ /**
165
+ * @export
166
+ */
167
+ export declare const GetConversationsProviderSourceEnum: {
168
+ readonly External: "EXTERNAL";
169
+ readonly Internal: "INTERNAL";
170
+ };
171
+ export type GetConversationsProviderSourceEnum = typeof GetConversationsProviderSourceEnum[keyof typeof GetConversationsProviderSourceEnum];
@@ -46,13 +46,41 @@ var __importStar = (this && this.__importStar) || (function () {
46
46
  };
47
47
  })();
48
48
  Object.defineProperty(exports, "__esModule", { value: true });
49
- exports.ConversationsApi = void 0;
49
+ exports.GetConversationsProviderSourceEnum = exports.ConversationsApi = void 0;
50
50
  const runtime = __importStar(require("../runtime"));
51
51
  const index_1 = require("../models/index");
52
52
  /**
53
53
  *
54
54
  */
55
55
  class ConversationsApi extends runtime.BaseAPI {
56
+ /**
57
+ * Archives a specific conversation by its ID.
58
+ * Archive a conversation.
59
+ */
60
+ async archiveConversationByIdRaw(requestParameters, initOverrides) {
61
+ if (requestParameters['conversationId'] == null) {
62
+ throw new runtime.RequiredError('conversationId', 'Required parameter "conversationId" was null or undefined when calling archiveConversationById().');
63
+ }
64
+ const queryParameters = {};
65
+ const headerParameters = {};
66
+ if (this.configuration && this.configuration.apiKey) {
67
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
68
+ }
69
+ const response = await this.request({
70
+ path: `/conversations/{conversationId}`.replace(`{${"conversationId"}}`, encodeURIComponent(String(requestParameters['conversationId']))),
71
+ method: 'DELETE',
72
+ headers: headerParameters,
73
+ query: queryParameters,
74
+ }, initOverrides);
75
+ return new runtime.VoidApiResponse(response);
76
+ }
77
+ /**
78
+ * Archives a specific conversation by its ID.
79
+ * Archive a conversation.
80
+ */
81
+ async archiveConversationById(conversationId, initOverrides) {
82
+ await this.archiveConversationByIdRaw({ conversationId: conversationId }, initOverrides);
83
+ }
56
84
  /**
57
85
  * Create a custom variable in the context of a specific conversation by its ID.
58
86
  * Create a custom variable in the context of a conversation
@@ -238,6 +266,38 @@ class ConversationsApi extends runtime.BaseAPI {
238
266
  const response = await this.getContextCustomVariableRaw({ conversationId: conversationId }, initOverrides);
239
267
  return await response.value();
240
268
  }
269
+ /**
270
+ * Retrieve a list of conversations for the authenticated user.
271
+ * List conversations
272
+ */
273
+ async getConversationsRaw(requestParameters, initOverrides) {
274
+ const queryParameters = {};
275
+ if (requestParameters['organizationId'] != null) {
276
+ queryParameters['organizationId'] = requestParameters['organizationId'];
277
+ }
278
+ if (requestParameters['providerSource'] != null) {
279
+ queryParameters['providerSource'] = requestParameters['providerSource'];
280
+ }
281
+ const headerParameters = {};
282
+ if (this.configuration && this.configuration.apiKey) {
283
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
284
+ }
285
+ const response = await this.request({
286
+ path: `/conversations`,
287
+ method: 'GET',
288
+ headers: headerParameters,
289
+ query: queryParameters,
290
+ }, initOverrides);
291
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.ConversationSummaryUioFromJSON));
292
+ }
293
+ /**
294
+ * Retrieve a list of conversations for the authenticated user.
295
+ * List conversations
296
+ */
297
+ async getConversations(organizationId, providerSource, initOverrides) {
298
+ const response = await this.getConversationsRaw({ organizationId: organizationId, providerSource: providerSource }, initOverrides);
299
+ return await response.value();
300
+ }
241
301
  /**
242
302
  * Change the status of an attachment to \'PROCESSING\' after it has been uploaded.
243
303
  * Update the status of an uploaded attachment
@@ -305,3 +365,10 @@ class ConversationsApi extends runtime.BaseAPI {
305
365
  }
306
366
  }
307
367
  exports.ConversationsApi = ConversationsApi;
368
+ /**
369
+ * @export
370
+ */
371
+ exports.GetConversationsProviderSourceEnum = {
372
+ External: 'EXTERNAL',
373
+ Internal: 'INTERNAL'
374
+ };
@@ -71,7 +71,7 @@ class PromptsApi extends runtime.BaseAPI {
71
71
  headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
72
72
  }
73
73
  const response = await this.request({
74
- path: `/conversations`.replace(`{${"agentId"}}`, encodeURIComponent(String(requestParameters['agentId']))),
74
+ path: `/agents/{agentId}/conversations`.replace(`{${"agentId"}}`, encodeURIComponent(String(requestParameters['agentId']))),
75
75
  method: 'POST',
76
76
  headers: headerParameters,
77
77
  query: queryParameters,
@@ -0,0 +1,46 @@
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 ConversationSummaryAgentEngineProviderUio
16
+ */
17
+ export interface ConversationSummaryAgentEngineProviderUio {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof ConversationSummaryAgentEngineProviderUio
22
+ */
23
+ name: string;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof ConversationSummaryAgentEngineProviderUio
28
+ */
29
+ providerSource: ConversationSummaryAgentEngineProviderUioProviderSourceEnum;
30
+ }
31
+ /**
32
+ * @export
33
+ */
34
+ export declare const ConversationSummaryAgentEngineProviderUioProviderSourceEnum: {
35
+ readonly External: "EXTERNAL";
36
+ readonly Internal: "INTERNAL";
37
+ };
38
+ export type ConversationSummaryAgentEngineProviderUioProviderSourceEnum = typeof ConversationSummaryAgentEngineProviderUioProviderSourceEnum[keyof typeof ConversationSummaryAgentEngineProviderUioProviderSourceEnum];
39
+ /**
40
+ * Check if a given object implements the ConversationSummaryAgentEngineProviderUio interface.
41
+ */
42
+ export declare function instanceOfConversationSummaryAgentEngineProviderUio(value: object): value is ConversationSummaryAgentEngineProviderUio;
43
+ export declare function ConversationSummaryAgentEngineProviderUioFromJSON(json: any): ConversationSummaryAgentEngineProviderUio;
44
+ export declare function ConversationSummaryAgentEngineProviderUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConversationSummaryAgentEngineProviderUio;
45
+ export declare function ConversationSummaryAgentEngineProviderUioToJSON(json: any): ConversationSummaryAgentEngineProviderUio;
46
+ export declare function ConversationSummaryAgentEngineProviderUioToJSONTyped(value?: ConversationSummaryAgentEngineProviderUio | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,62 @@
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.ConversationSummaryAgentEngineProviderUioProviderSourceEnum = void 0;
17
+ exports.instanceOfConversationSummaryAgentEngineProviderUio = instanceOfConversationSummaryAgentEngineProviderUio;
18
+ exports.ConversationSummaryAgentEngineProviderUioFromJSON = ConversationSummaryAgentEngineProviderUioFromJSON;
19
+ exports.ConversationSummaryAgentEngineProviderUioFromJSONTyped = ConversationSummaryAgentEngineProviderUioFromJSONTyped;
20
+ exports.ConversationSummaryAgentEngineProviderUioToJSON = ConversationSummaryAgentEngineProviderUioToJSON;
21
+ exports.ConversationSummaryAgentEngineProviderUioToJSONTyped = ConversationSummaryAgentEngineProviderUioToJSONTyped;
22
+ /**
23
+ * @export
24
+ */
25
+ exports.ConversationSummaryAgentEngineProviderUioProviderSourceEnum = {
26
+ External: 'EXTERNAL',
27
+ Internal: 'INTERNAL'
28
+ };
29
+ /**
30
+ * Check if a given object implements the ConversationSummaryAgentEngineProviderUio interface.
31
+ */
32
+ function instanceOfConversationSummaryAgentEngineProviderUio(value) {
33
+ if (!('name' in value) || value['name'] === undefined)
34
+ return false;
35
+ if (!('providerSource' in value) || value['providerSource'] === undefined)
36
+ return false;
37
+ return true;
38
+ }
39
+ function ConversationSummaryAgentEngineProviderUioFromJSON(json) {
40
+ return ConversationSummaryAgentEngineProviderUioFromJSONTyped(json, false);
41
+ }
42
+ function ConversationSummaryAgentEngineProviderUioFromJSONTyped(json, ignoreDiscriminator) {
43
+ if (json == null) {
44
+ return json;
45
+ }
46
+ return {
47
+ 'name': json['name'],
48
+ 'providerSource': json['providerSource'],
49
+ };
50
+ }
51
+ function ConversationSummaryAgentEngineProviderUioToJSON(json) {
52
+ return ConversationSummaryAgentEngineProviderUioToJSONTyped(json, false);
53
+ }
54
+ function ConversationSummaryAgentEngineProviderUioToJSONTyped(value, ignoreDiscriminator = false) {
55
+ if (value == null) {
56
+ return value;
57
+ }
58
+ return {
59
+ 'name': value['name'],
60
+ 'providerSource': value['providerSource'],
61
+ };
62
+ }
@@ -0,0 +1,33 @@
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 { ConversationSummaryAgentEngineProviderUio } from './ConversationSummaryAgentEngineProviderUio';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface ConversationSummaryAgentEngineUio
17
+ */
18
+ export interface ConversationSummaryAgentEngineUio {
19
+ /**
20
+ *
21
+ * @type {ConversationSummaryAgentEngineProviderUio}
22
+ * @memberof ConversationSummaryAgentEngineUio
23
+ */
24
+ provider: ConversationSummaryAgentEngineProviderUio;
25
+ }
26
+ /**
27
+ * Check if a given object implements the ConversationSummaryAgentEngineUio interface.
28
+ */
29
+ export declare function instanceOfConversationSummaryAgentEngineUio(value: object): value is ConversationSummaryAgentEngineUio;
30
+ export declare function ConversationSummaryAgentEngineUioFromJSON(json: any): ConversationSummaryAgentEngineUio;
31
+ export declare function ConversationSummaryAgentEngineUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConversationSummaryAgentEngineUio;
32
+ export declare function ConversationSummaryAgentEngineUioToJSON(json: any): ConversationSummaryAgentEngineUio;
33
+ export declare function ConversationSummaryAgentEngineUioToJSONTyped(value?: ConversationSummaryAgentEngineUio | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,51 @@
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.instanceOfConversationSummaryAgentEngineUio = instanceOfConversationSummaryAgentEngineUio;
17
+ exports.ConversationSummaryAgentEngineUioFromJSON = ConversationSummaryAgentEngineUioFromJSON;
18
+ exports.ConversationSummaryAgentEngineUioFromJSONTyped = ConversationSummaryAgentEngineUioFromJSONTyped;
19
+ exports.ConversationSummaryAgentEngineUioToJSON = ConversationSummaryAgentEngineUioToJSON;
20
+ exports.ConversationSummaryAgentEngineUioToJSONTyped = ConversationSummaryAgentEngineUioToJSONTyped;
21
+ const ConversationSummaryAgentEngineProviderUio_1 = require("./ConversationSummaryAgentEngineProviderUio");
22
+ /**
23
+ * Check if a given object implements the ConversationSummaryAgentEngineUio interface.
24
+ */
25
+ function instanceOfConversationSummaryAgentEngineUio(value) {
26
+ if (!('provider' in value) || value['provider'] === undefined)
27
+ return false;
28
+ return true;
29
+ }
30
+ function ConversationSummaryAgentEngineUioFromJSON(json) {
31
+ return ConversationSummaryAgentEngineUioFromJSONTyped(json, false);
32
+ }
33
+ function ConversationSummaryAgentEngineUioFromJSONTyped(json, ignoreDiscriminator) {
34
+ if (json == null) {
35
+ return json;
36
+ }
37
+ return {
38
+ 'provider': (0, ConversationSummaryAgentEngineProviderUio_1.ConversationSummaryAgentEngineProviderUioFromJSON)(json['provider']),
39
+ };
40
+ }
41
+ function ConversationSummaryAgentEngineUioToJSON(json) {
42
+ return ConversationSummaryAgentEngineUioToJSONTyped(json, false);
43
+ }
44
+ function ConversationSummaryAgentEngineUioToJSONTyped(value, ignoreDiscriminator = false) {
45
+ if (value == null) {
46
+ return value;
47
+ }
48
+ return {
49
+ 'provider': (0, ConversationSummaryAgentEngineProviderUio_1.ConversationSummaryAgentEngineProviderUioToJSON)(value['provider']),
50
+ };
51
+ }
@@ -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 { ConversationSummaryAgentEngineUio } from './ConversationSummaryAgentEngineUio';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface ConversationSummaryAgentUio
17
+ */
18
+ export interface ConversationSummaryAgentUio {
19
+ /**
20
+ *
21
+ * @type {string}
22
+ * @memberof ConversationSummaryAgentUio
23
+ */
24
+ id: string;
25
+ /**
26
+ *
27
+ * @type {string}
28
+ * @memberof ConversationSummaryAgentUio
29
+ */
30
+ name: string;
31
+ /**
32
+ *
33
+ * @type {ConversationSummaryAgentEngineUio}
34
+ * @memberof ConversationSummaryAgentUio
35
+ */
36
+ engine: ConversationSummaryAgentEngineUio;
37
+ }
38
+ /**
39
+ * Check if a given object implements the ConversationSummaryAgentUio interface.
40
+ */
41
+ export declare function instanceOfConversationSummaryAgentUio(value: object): value is ConversationSummaryAgentUio;
42
+ export declare function ConversationSummaryAgentUioFromJSON(json: any): ConversationSummaryAgentUio;
43
+ export declare function ConversationSummaryAgentUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConversationSummaryAgentUio;
44
+ export declare function ConversationSummaryAgentUioToJSON(json: any): ConversationSummaryAgentUio;
45
+ export declare function ConversationSummaryAgentUioToJSONTyped(value?: ConversationSummaryAgentUio | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,59 @@
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.instanceOfConversationSummaryAgentUio = instanceOfConversationSummaryAgentUio;
17
+ exports.ConversationSummaryAgentUioFromJSON = ConversationSummaryAgentUioFromJSON;
18
+ exports.ConversationSummaryAgentUioFromJSONTyped = ConversationSummaryAgentUioFromJSONTyped;
19
+ exports.ConversationSummaryAgentUioToJSON = ConversationSummaryAgentUioToJSON;
20
+ exports.ConversationSummaryAgentUioToJSONTyped = ConversationSummaryAgentUioToJSONTyped;
21
+ const ConversationSummaryAgentEngineUio_1 = require("./ConversationSummaryAgentEngineUio");
22
+ /**
23
+ * Check if a given object implements the ConversationSummaryAgentUio interface.
24
+ */
25
+ function instanceOfConversationSummaryAgentUio(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 (!('engine' in value) || value['engine'] === undefined)
31
+ return false;
32
+ return true;
33
+ }
34
+ function ConversationSummaryAgentUioFromJSON(json) {
35
+ return ConversationSummaryAgentUioFromJSONTyped(json, false);
36
+ }
37
+ function ConversationSummaryAgentUioFromJSONTyped(json, ignoreDiscriminator) {
38
+ if (json == null) {
39
+ return json;
40
+ }
41
+ return {
42
+ 'id': json['id'],
43
+ 'name': json['name'],
44
+ 'engine': (0, ConversationSummaryAgentEngineUio_1.ConversationSummaryAgentEngineUioFromJSON)(json['engine']),
45
+ };
46
+ }
47
+ function ConversationSummaryAgentUioToJSON(json) {
48
+ return ConversationSummaryAgentUioToJSONTyped(json, false);
49
+ }
50
+ function ConversationSummaryAgentUioToJSONTyped(value, ignoreDiscriminator = false) {
51
+ if (value == null) {
52
+ return value;
53
+ }
54
+ return {
55
+ 'id': value['id'],
56
+ 'name': value['name'],
57
+ 'engine': (0, ConversationSummaryAgentEngineUio_1.ConversationSummaryAgentEngineUioToJSON)(value['engine']),
58
+ };
59
+ }
@@ -0,0 +1,57 @@
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 { ConversationSummaryAgentUio } from './ConversationSummaryAgentUio';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface ConversationSummaryUio
17
+ */
18
+ export interface ConversationSummaryUio {
19
+ /**
20
+ *
21
+ * @type {string}
22
+ * @memberof ConversationSummaryUio
23
+ */
24
+ id: string;
25
+ /**
26
+ *
27
+ * @type {string}
28
+ * @memberof ConversationSummaryUio
29
+ */
30
+ title: string;
31
+ /**
32
+ *
33
+ * @type {string}
34
+ * @memberof ConversationSummaryUio
35
+ */
36
+ createdAt: string;
37
+ /**
38
+ *
39
+ * @type {string}
40
+ * @memberof ConversationSummaryUio
41
+ */
42
+ updatedAt: string;
43
+ /**
44
+ *
45
+ * @type {ConversationSummaryAgentUio}
46
+ * @memberof ConversationSummaryUio
47
+ */
48
+ agent: ConversationSummaryAgentUio;
49
+ }
50
+ /**
51
+ * Check if a given object implements the ConversationSummaryUio interface.
52
+ */
53
+ export declare function instanceOfConversationSummaryUio(value: object): value is ConversationSummaryUio;
54
+ export declare function ConversationSummaryUioFromJSON(json: any): ConversationSummaryUio;
55
+ export declare function ConversationSummaryUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConversationSummaryUio;
56
+ export declare function ConversationSummaryUioToJSON(json: any): ConversationSummaryUio;
57
+ export declare function ConversationSummaryUioToJSONTyped(value?: ConversationSummaryUio | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,67 @@
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.instanceOfConversationSummaryUio = instanceOfConversationSummaryUio;
17
+ exports.ConversationSummaryUioFromJSON = ConversationSummaryUioFromJSON;
18
+ exports.ConversationSummaryUioFromJSONTyped = ConversationSummaryUioFromJSONTyped;
19
+ exports.ConversationSummaryUioToJSON = ConversationSummaryUioToJSON;
20
+ exports.ConversationSummaryUioToJSONTyped = ConversationSummaryUioToJSONTyped;
21
+ const ConversationSummaryAgentUio_1 = require("./ConversationSummaryAgentUio");
22
+ /**
23
+ * Check if a given object implements the ConversationSummaryUio interface.
24
+ */
25
+ function instanceOfConversationSummaryUio(value) {
26
+ if (!('id' in value) || value['id'] === undefined)
27
+ return false;
28
+ if (!('title' in value) || value['title'] === undefined)
29
+ return false;
30
+ if (!('createdAt' in value) || value['createdAt'] === undefined)
31
+ return false;
32
+ if (!('updatedAt' in value) || value['updatedAt'] === undefined)
33
+ return false;
34
+ if (!('agent' in value) || value['agent'] === undefined)
35
+ return false;
36
+ return true;
37
+ }
38
+ function ConversationSummaryUioFromJSON(json) {
39
+ return ConversationSummaryUioFromJSONTyped(json, false);
40
+ }
41
+ function ConversationSummaryUioFromJSONTyped(json, ignoreDiscriminator) {
42
+ if (json == null) {
43
+ return json;
44
+ }
45
+ return {
46
+ 'id': json['id'],
47
+ 'title': json['title'],
48
+ 'createdAt': json['createdAt'],
49
+ 'updatedAt': json['updatedAt'],
50
+ 'agent': (0, ConversationSummaryAgentUio_1.ConversationSummaryAgentUioFromJSON)(json['agent']),
51
+ };
52
+ }
53
+ function ConversationSummaryUioToJSON(json) {
54
+ return ConversationSummaryUioToJSONTyped(json, false);
55
+ }
56
+ function ConversationSummaryUioToJSONTyped(value, ignoreDiscriminator = false) {
57
+ if (value == null) {
58
+ return value;
59
+ }
60
+ return {
61
+ 'id': value['id'],
62
+ 'title': value['title'],
63
+ 'createdAt': value['createdAt'],
64
+ 'updatedAt': value['updatedAt'],
65
+ 'agent': (0, ConversationSummaryAgentUio_1.ConversationSummaryAgentUioToJSON)(value['agent']),
66
+ };
67
+ }
@@ -73,6 +73,10 @@ export * from './ContentsToolsUio';
73
73
  export * from './ContextUio';
74
74
  export * from './ConversationFlowNodeEntrypointsUio';
75
75
  export * from './ConversationFlowNodeUio';
76
+ export * from './ConversationSummaryAgentEngineProviderUio';
77
+ export * from './ConversationSummaryAgentEngineUio';
78
+ export * from './ConversationSummaryAgentUio';
79
+ export * from './ConversationSummaryUio';
76
80
  export * from './ConversationUio';
77
81
  export * from './CostMetricUio';
78
82
  export * from './DefaultClientPricesUio';
@@ -91,6 +91,10 @@ __exportStar(require("./ContentsToolsUio"), exports);
91
91
  __exportStar(require("./ContextUio"), exports);
92
92
  __exportStar(require("./ConversationFlowNodeEntrypointsUio"), exports);
93
93
  __exportStar(require("./ConversationFlowNodeUio"), exports);
94
+ __exportStar(require("./ConversationSummaryAgentEngineProviderUio"), exports);
95
+ __exportStar(require("./ConversationSummaryAgentEngineUio"), exports);
96
+ __exportStar(require("./ConversationSummaryAgentUio"), exports);
97
+ __exportStar(require("./ConversationSummaryUio"), exports);
94
98
  __exportStar(require("./ConversationUio"), exports);
95
99
  __exportStar(require("./CostMetricUio"), exports);
96
100
  __exportStar(require("./DefaultClientPricesUio"), exports);
package/dist/openapi.json CHANGED
@@ -1210,6 +1210,59 @@
1210
1210
  },
1211
1211
  "summary" : "Get conversations for an agent",
1212
1212
  "tags" : [ "agent" ]
1213
+ },
1214
+ "post" : {
1215
+ "description" : "Create a new empty conversation for the specified agent.",
1216
+ "operationId" : "createConversation",
1217
+ "parameters" : [ {
1218
+ "description" : "ID of the agent",
1219
+ "in" : "path",
1220
+ "name" : "agentId",
1221
+ "required" : true,
1222
+ "schema" : {
1223
+ "format" : "uuid",
1224
+ "type" : "string"
1225
+ }
1226
+ } ],
1227
+ "requestBody" : {
1228
+ "content" : {
1229
+ "application/json" : {
1230
+ "schema" : {
1231
+ "$ref" : "#/components/schemas/PromptFlowCreateRequest"
1232
+ }
1233
+ }
1234
+ },
1235
+ "required" : true
1236
+ },
1237
+ "responses" : {
1238
+ "201" : {
1239
+ "content" : {
1240
+ "application/json" : {
1241
+ "schema" : {
1242
+ "$ref" : "#/components/schemas/BodyWithId"
1243
+ }
1244
+ }
1245
+ },
1246
+ "description" : "Conversation created successfully"
1247
+ },
1248
+ "400" : {
1249
+ "description" : "Invalid request"
1250
+ },
1251
+ "401" : {
1252
+ "description" : "Unauthorized"
1253
+ },
1254
+ "403" : {
1255
+ "description" : "Forbidden - User cannot access this agent"
1256
+ },
1257
+ "404" : {
1258
+ "description" : "Agent not found"
1259
+ },
1260
+ "500" : {
1261
+ "description" : "Server error"
1262
+ }
1263
+ },
1264
+ "summary" : "Create a new conversation",
1265
+ "tags" : [ "prompts" ]
1213
1266
  }
1214
1267
  },
1215
1268
  "/agents/{agentId}/apps" : {
@@ -2777,6 +2830,53 @@
2777
2830
  "tags" : [ "conversations" ]
2778
2831
  }
2779
2832
  },
2833
+ "/conversations" : {
2834
+ "get" : {
2835
+ "description" : "Retrieve a list of conversations for the authenticated user.",
2836
+ "operationId" : "getConversations",
2837
+ "parameters" : [ {
2838
+ "description" : "Filter conversations by organization ID",
2839
+ "in" : "query",
2840
+ "name" : "organizationId",
2841
+ "required" : false,
2842
+ "schema" : {
2843
+ "type" : "string"
2844
+ }
2845
+ }, {
2846
+ "description" : "Filter conversations by provider source",
2847
+ "in" : "query",
2848
+ "name" : "providerSource",
2849
+ "required" : false,
2850
+ "schema" : {
2851
+ "enum" : [ "EXTERNAL", "INTERNAL" ],
2852
+ "type" : "string"
2853
+ }
2854
+ } ],
2855
+ "responses" : {
2856
+ "200" : {
2857
+ "content" : {
2858
+ "application/json" : {
2859
+ "schema" : {
2860
+ "items" : {
2861
+ "$ref" : "#/components/schemas/ConversationSummary"
2862
+ },
2863
+ "type" : "array"
2864
+ }
2865
+ }
2866
+ },
2867
+ "description" : "Successfully retrieved the list of conversations."
2868
+ },
2869
+ "401" : {
2870
+ "description" : "Unauthorized"
2871
+ },
2872
+ "500" : {
2873
+ "description" : "Server error"
2874
+ }
2875
+ },
2876
+ "summary" : "List conversations",
2877
+ "tags" : [ "conversations" ]
2878
+ }
2879
+ },
2780
2880
  "/conversations/{conversationId}/context" : {
2781
2881
  "get" : {
2782
2882
  "description" : "Retrieve the context of a specific conversation by its ID.",
@@ -5374,62 +5474,39 @@
5374
5474
  "tags" : [ "prompts" ]
5375
5475
  }
5376
5476
  },
5377
- "/conversations" : {
5378
- "post" : {
5379
- "description" : "Create a new empty conversation for the specified agent.",
5380
- "operationId" : "createConversation",
5477
+ "/conversations/{conversationId}" : {
5478
+ "delete" : {
5479
+ "description" : "Archives a specific conversation by its ID.",
5480
+ "operationId" : "archiveConversationById",
5381
5481
  "parameters" : [ {
5382
- "description" : "ID of the agent",
5482
+ "description" : "The ID of the conversation",
5383
5483
  "in" : "path",
5384
- "name" : "agentId",
5484
+ "name" : "conversationId",
5385
5485
  "required" : true,
5386
5486
  "schema" : {
5387
- "format" : "uuid",
5388
5487
  "type" : "string"
5389
5488
  }
5390
5489
  } ],
5391
- "requestBody" : {
5392
- "content" : {
5393
- "application/json" : {
5394
- "schema" : {
5395
- "$ref" : "#/components/schemas/PromptFlowCreateRequest"
5396
- }
5397
- }
5398
- },
5399
- "required" : true
5400
- },
5401
5490
  "responses" : {
5402
- "201" : {
5403
- "content" : {
5404
- "application/json" : {
5405
- "schema" : {
5406
- "$ref" : "#/components/schemas/BodyWithId"
5407
- }
5408
- }
5409
- },
5410
- "description" : "Conversation created successfully"
5411
- },
5412
- "400" : {
5413
- "description" : "Invalid request"
5491
+ "204" : {
5492
+ "description" : "Conversation archived successfully."
5414
5493
  },
5415
5494
  "401" : {
5416
5495
  "description" : "Unauthorized"
5417
5496
  },
5418
5497
  "403" : {
5419
- "description" : "Forbidden - User cannot access this agent"
5498
+ "description" : "Forbidden - User cannot archive this conversation"
5420
5499
  },
5421
5500
  "404" : {
5422
- "description" : "Agent not found"
5501
+ "description" : "Conversation not found"
5423
5502
  },
5424
5503
  "500" : {
5425
5504
  "description" : "Server error"
5426
5505
  }
5427
5506
  },
5428
- "summary" : "Create a new conversation",
5429
- "tags" : [ "prompts" ]
5430
- }
5431
- },
5432
- "/conversations/{conversationId}" : {
5507
+ "summary" : "Archive a conversation.",
5508
+ "tags" : [ "conversations" ]
5509
+ },
5433
5510
  "get" : {
5434
5511
  "description" : "Retrieves details of a specific conversation including all messages",
5435
5512
  "operationId" : "getConversationById",
@@ -7072,6 +7149,21 @@
7072
7149
  "required" : [ "attachments" ],
7073
7150
  "type" : "object"
7074
7151
  },
7152
+ "PromptFlowCreateRequest" : {
7153
+ "properties" : {
7154
+ "lang" : {
7155
+ "description" : "Language code (e.g., 'en', 'fr')",
7156
+ "maxLength" : 2,
7157
+ "type" : "string"
7158
+ },
7159
+ "customUserId" : {
7160
+ "description" : "Optional custom user identifier",
7161
+ "type" : "string"
7162
+ }
7163
+ },
7164
+ "required" : [ "lang" ],
7165
+ "type" : "object"
7166
+ },
7075
7167
  "AppLight" : {
7076
7168
  "properties" : {
7077
7169
  "id" : {
@@ -7828,6 +7920,27 @@
7828
7920
  "$ref" : "#/components/schemas/AudioFile"
7829
7921
  } ]
7830
7922
  },
7923
+ "ConversationSummary" : {
7924
+ "properties" : {
7925
+ "id" : {
7926
+ "type" : "string"
7927
+ },
7928
+ "title" : {
7929
+ "type" : "string"
7930
+ },
7931
+ "createdAt" : {
7932
+ "type" : "string"
7933
+ },
7934
+ "updatedAt" : {
7935
+ "type" : "string"
7936
+ },
7937
+ "agent" : {
7938
+ "$ref" : "#/components/schemas/ConversationSummary_agent"
7939
+ }
7940
+ },
7941
+ "required" : [ "agent", "createdAt", "id", "title", "updatedAt" ],
7942
+ "type" : "object"
7943
+ },
7831
7944
  "Context" : {
7832
7945
  "properties" : {
7833
7946
  "attachments" : {
@@ -8493,21 +8606,6 @@
8493
8606
  "required" : [ "pin", "user" ],
8494
8607
  "type" : "object"
8495
8608
  },
8496
- "PromptFlowCreateRequest" : {
8497
- "properties" : {
8498
- "lang" : {
8499
- "description" : "Language code (e.g., 'en', 'fr')",
8500
- "maxLength" : 2,
8501
- "type" : "string"
8502
- },
8503
- "customUserId" : {
8504
- "description" : "Optional custom user identifier",
8505
- "type" : "string"
8506
- }
8507
- },
8508
- "required" : [ "lang" ],
8509
- "type" : "object"
8510
- },
8511
8609
  "PromptFlowCreateResponse" : {
8512
8610
  "properties" : {
8513
8611
  "conversationId" : {
@@ -9017,6 +9115,43 @@
9017
9115
  "required" : [ "contentType", "ext", "fileName", "size" ],
9018
9116
  "type" : "object"
9019
9117
  },
9118
+ "ConversationSummary_agent_engine_provider" : {
9119
+ "properties" : {
9120
+ "name" : {
9121
+ "type" : "string"
9122
+ },
9123
+ "providerSource" : {
9124
+ "enum" : [ "EXTERNAL", "INTERNAL" ],
9125
+ "type" : "string"
9126
+ }
9127
+ },
9128
+ "required" : [ "name", "providerSource" ],
9129
+ "type" : "object"
9130
+ },
9131
+ "ConversationSummary_agent_engine" : {
9132
+ "properties" : {
9133
+ "provider" : {
9134
+ "$ref" : "#/components/schemas/ConversationSummary_agent_engine_provider"
9135
+ }
9136
+ },
9137
+ "required" : [ "provider" ],
9138
+ "type" : "object"
9139
+ },
9140
+ "ConversationSummary_agent" : {
9141
+ "properties" : {
9142
+ "id" : {
9143
+ "type" : "string"
9144
+ },
9145
+ "name" : {
9146
+ "type" : "string"
9147
+ },
9148
+ "engine" : {
9149
+ "$ref" : "#/components/schemas/ConversationSummary_agent_engine"
9150
+ }
9151
+ },
9152
+ "required" : [ "engine", "id", "name" ],
9153
+ "type" : "object"
9154
+ },
9020
9155
  "MetricForAgent_identifier" : {
9021
9156
  "properties" : {
9022
9157
  "agentId" : {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@breign/client",
3
- "version": "1.0.33",
3
+ "version": "1.0.35",
4
4
  "main": "dist/index.js",
5
5
  "exports": {
6
6
  ".": "./dist/index.js",