@breign/client 1.0.161 → 1.0.162

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,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { AddModuleRequestUio, AdvancedFlowEditorUio, AdvancedFlowEditorUpdateRequestUio, AgentDuplicateRequestUio, AgentFlowCreateUio, AgentFlowUio, AgentImportRequestUio, AgentImportResponseUio, AgentMetricsEventUio, AgentMetricsOverviewUio, AgentModuleUio, AgentPatchUio, AgentRequestUio, AgentSubscriptionUio, AgentToolAllowedMethodsRequestUio, AgentUio, AgentUsageMetricsUio, BodyWithIdUio, ChatUio, ConversationAttachmentDownloadUrlUio, DeleteMessageAudio200ResponseUio, EphemeralInstancesMetricsResponseUio, FileCreationRequestUio, FileCreationResponseUio, FlowEditorUio, FlowEditorUpdateRequestUio, MessageAudioDownloadUrlUio, OrgUsageMetricsResponseUio, S3UploadBodyUio, STTResponseUio } from '../models/index';
13
+ import type { AddModuleRequestUio, AdvancedFlowEditorUio, AdvancedFlowEditorUpdateRequestUio, AgentDuplicateRequestUio, AgentFlowCreateUio, AgentFlowUio, AgentImportRequestUio, AgentImportResponseUio, AgentMetricsEventUio, AgentMetricsOverviewUio, AgentModuleUio, AgentPatchUio, AgentRequestUio, AgentSubscriptionUio, AgentToolAllowedMethodsRequestUio, AgentUio, AgentUsageMetricsUio, BodyWithIdUio, ChatUio, ConversationAttachmentDownloadUrlUio, ConversationMessageImagesUio, DeleteMessageAudio200ResponseUio, EphemeralInstancesMetricsResponseUio, FileCreationRequestUio, FileCreationResponseUio, FlowEditorUio, FlowEditorUpdateRequestUio, MessageAudioDownloadUrlUio, OrgUsageMetricsResponseUio, S3UploadBodyUio, STTResponseUio } from '../models/index';
14
14
  export interface AddModuleRequest {
15
15
  agentId: string;
16
16
  addModuleRequestUio: AddModuleRequestUio;
@@ -104,6 +104,11 @@ export interface GetConversationContextAttachmentDownloadUrlRequest {
104
104
  conversationId: string;
105
105
  attachmentId: string;
106
106
  }
107
+ export interface GetConversationMessageImagesRequest {
108
+ agentId: string;
109
+ conversationId: string;
110
+ messageId: string;
111
+ }
107
112
  export interface GetConversationsForAgentRequest {
108
113
  agentId: string;
109
114
  page?: number;
@@ -400,6 +405,16 @@ export declare class AgentApi extends runtime.BaseAPI {
400
405
  * Get presigned download URL for a conversation context attachment
401
406
  */
402
407
  getConversationContextAttachmentDownloadUrl(agentId: string, conversationId: string, attachmentId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationAttachmentDownloadUrlUio>;
408
+ /**
409
+ * Returns the images of documents the language model received while answering, with presigned URLs created on each call. For an assistant message, the images of every tool message of its turn; for a tool (System) message, its own. Returns an empty list for a turn without images. Call this when displaying a message\'s \"consulted images\" block, live or in history.
410
+ * Get the document images the agent was given in a conversation turn
411
+ */
412
+ getConversationMessageImagesRaw(requestParameters: GetConversationMessageImagesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConversationMessageImagesUio>>;
413
+ /**
414
+ * Returns the images of documents the language model received while answering, with presigned URLs created on each call. For an assistant message, the images of every tool message of its turn; for a tool (System) message, its own. Returns an empty list for a turn without images. Call this when displaying a message\'s \"consulted images\" block, live or in history.
415
+ * Get the document images the agent was given in a conversation turn
416
+ */
417
+ getConversationMessageImages(agentId: string, conversationId: string, messageId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationMessageImagesUio>;
403
418
  /**
404
419
  * Get conversations for an agent
405
420
  * Get conversations for an agent
@@ -742,6 +742,41 @@ class AgentApi extends runtime.BaseAPI {
742
742
  const response = await this.getConversationContextAttachmentDownloadUrlRaw({ agentId: agentId, conversationId: conversationId, attachmentId: attachmentId }, initOverrides);
743
743
  return await response.value();
744
744
  }
745
+ /**
746
+ * Returns the images of documents the language model received while answering, with presigned URLs created on each call. For an assistant message, the images of every tool message of its turn; for a tool (System) message, its own. Returns an empty list for a turn without images. Call this when displaying a message\'s \"consulted images\" block, live or in history.
747
+ * Get the document images the agent was given in a conversation turn
748
+ */
749
+ async getConversationMessageImagesRaw(requestParameters, initOverrides) {
750
+ if (requestParameters['agentId'] == null) {
751
+ throw new runtime.RequiredError('agentId', 'Required parameter "agentId" was null or undefined when calling getConversationMessageImages().');
752
+ }
753
+ if (requestParameters['conversationId'] == null) {
754
+ throw new runtime.RequiredError('conversationId', 'Required parameter "conversationId" was null or undefined when calling getConversationMessageImages().');
755
+ }
756
+ if (requestParameters['messageId'] == null) {
757
+ throw new runtime.RequiredError('messageId', 'Required parameter "messageId" was null or undefined when calling getConversationMessageImages().');
758
+ }
759
+ const queryParameters = {};
760
+ const headerParameters = {};
761
+ if (this.configuration && this.configuration.apiKey) {
762
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
763
+ }
764
+ const response = await this.request({
765
+ path: `/agents/{agentId}/conversations/{conversationId}/messages/{messageId}/images`.replace(`{${"agentId"}}`, encodeURIComponent(String(requestParameters['agentId']))).replace(`{${"conversationId"}}`, encodeURIComponent(String(requestParameters['conversationId']))).replace(`{${"messageId"}}`, encodeURIComponent(String(requestParameters['messageId']))),
766
+ method: 'GET',
767
+ headers: headerParameters,
768
+ query: queryParameters,
769
+ }, initOverrides);
770
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ConversationMessageImagesUioFromJSON)(jsonValue));
771
+ }
772
+ /**
773
+ * Returns the images of documents the language model received while answering, with presigned URLs created on each call. For an assistant message, the images of every tool message of its turn; for a tool (System) message, its own. Returns an empty list for a turn without images. Call this when displaying a message\'s \"consulted images\" block, live or in history.
774
+ * Get the document images the agent was given in a conversation turn
775
+ */
776
+ async getConversationMessageImages(agentId, conversationId, messageId, initOverrides) {
777
+ const response = await this.getConversationMessageImagesRaw({ agentId: agentId, conversationId: conversationId, messageId: messageId }, initOverrides);
778
+ return await response.value();
779
+ }
745
780
  /**
746
781
  * Get conversations for an agent
747
782
  * Get conversations for an agent
@@ -0,0 +1,44 @@
1
+ /**
2
+ * brain-client
3
+ * Api ands models for brain-app and brain-app
4
+ *
5
+ * The version of the OpenAPI document: 0.0.0-SNAPSHOT
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface ConversationMessageImageUio
16
+ */
17
+ export interface ConversationMessageImageUio {
18
+ /**
19
+ * Identifier of the image within its document (16 hexadecimal characters)
20
+ * @type {string}
21
+ * @memberof ConversationMessageImageUio
22
+ */
23
+ imageId: string;
24
+ /**
25
+ * Alternative text of the image, empty when the document gives none
26
+ * @type {string}
27
+ * @memberof ConversationMessageImageUio
28
+ */
29
+ alt: string;
30
+ /**
31
+ * Presigned download URL, short-lived and created on each call
32
+ * @type {string}
33
+ * @memberof ConversationMessageImageUio
34
+ */
35
+ url: string;
36
+ }
37
+ /**
38
+ * Check if a given object implements the ConversationMessageImageUio interface.
39
+ */
40
+ export declare function instanceOfConversationMessageImageUio(value: object): value is ConversationMessageImageUio;
41
+ export declare function ConversationMessageImageUioFromJSON(json: any): ConversationMessageImageUio;
42
+ export declare function ConversationMessageImageUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConversationMessageImageUio;
43
+ export declare function ConversationMessageImageUioToJSON(json: any): ConversationMessageImageUio;
44
+ export declare function ConversationMessageImageUioToJSONTyped(value?: ConversationMessageImageUio | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * brain-client
6
+ * Api ands models for brain-app and brain-app
7
+ *
8
+ * The version of the OpenAPI document: 0.0.0-SNAPSHOT
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfConversationMessageImageUio = instanceOfConversationMessageImageUio;
17
+ exports.ConversationMessageImageUioFromJSON = ConversationMessageImageUioFromJSON;
18
+ exports.ConversationMessageImageUioFromJSONTyped = ConversationMessageImageUioFromJSONTyped;
19
+ exports.ConversationMessageImageUioToJSON = ConversationMessageImageUioToJSON;
20
+ exports.ConversationMessageImageUioToJSONTyped = ConversationMessageImageUioToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the ConversationMessageImageUio interface.
23
+ */
24
+ function instanceOfConversationMessageImageUio(value) {
25
+ if (!('imageId' in value) || value['imageId'] === undefined)
26
+ return false;
27
+ if (!('alt' in value) || value['alt'] === undefined)
28
+ return false;
29
+ if (!('url' in value) || value['url'] === undefined)
30
+ return false;
31
+ return true;
32
+ }
33
+ function ConversationMessageImageUioFromJSON(json) {
34
+ return ConversationMessageImageUioFromJSONTyped(json, false);
35
+ }
36
+ function ConversationMessageImageUioFromJSONTyped(json, ignoreDiscriminator) {
37
+ if (json == null) {
38
+ return json;
39
+ }
40
+ return {
41
+ 'imageId': json['imageId'],
42
+ 'alt': json['alt'],
43
+ 'url': json['url'],
44
+ };
45
+ }
46
+ function ConversationMessageImageUioToJSON(json) {
47
+ return ConversationMessageImageUioToJSONTyped(json, false);
48
+ }
49
+ function ConversationMessageImageUioToJSONTyped(value, ignoreDiscriminator = false) {
50
+ if (value == null) {
51
+ return value;
52
+ }
53
+ return {
54
+ 'imageId': value['imageId'],
55
+ 'alt': value['alt'],
56
+ 'url': value['url'],
57
+ };
58
+ }
@@ -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 { ConversationMessageImageUio } from './ConversationMessageImageUio';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface ConversationMessageImagesUio
17
+ */
18
+ export interface ConversationMessageImagesUio {
19
+ /**
20
+ *
21
+ * @type {Array<ConversationMessageImageUio>}
22
+ * @memberof ConversationMessageImagesUio
23
+ */
24
+ images: Array<ConversationMessageImageUio>;
25
+ }
26
+ /**
27
+ * Check if a given object implements the ConversationMessageImagesUio interface.
28
+ */
29
+ export declare function instanceOfConversationMessageImagesUio(value: object): value is ConversationMessageImagesUio;
30
+ export declare function ConversationMessageImagesUioFromJSON(json: any): ConversationMessageImagesUio;
31
+ export declare function ConversationMessageImagesUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConversationMessageImagesUio;
32
+ export declare function ConversationMessageImagesUioToJSON(json: any): ConversationMessageImagesUio;
33
+ export declare function ConversationMessageImagesUioToJSONTyped(value?: ConversationMessageImagesUio | 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.instanceOfConversationMessageImagesUio = instanceOfConversationMessageImagesUio;
17
+ exports.ConversationMessageImagesUioFromJSON = ConversationMessageImagesUioFromJSON;
18
+ exports.ConversationMessageImagesUioFromJSONTyped = ConversationMessageImagesUioFromJSONTyped;
19
+ exports.ConversationMessageImagesUioToJSON = ConversationMessageImagesUioToJSON;
20
+ exports.ConversationMessageImagesUioToJSONTyped = ConversationMessageImagesUioToJSONTyped;
21
+ const ConversationMessageImageUio_1 = require("./ConversationMessageImageUio");
22
+ /**
23
+ * Check if a given object implements the ConversationMessageImagesUio interface.
24
+ */
25
+ function instanceOfConversationMessageImagesUio(value) {
26
+ if (!('images' in value) || value['images'] === undefined)
27
+ return false;
28
+ return true;
29
+ }
30
+ function ConversationMessageImagesUioFromJSON(json) {
31
+ return ConversationMessageImagesUioFromJSONTyped(json, false);
32
+ }
33
+ function ConversationMessageImagesUioFromJSONTyped(json, ignoreDiscriminator) {
34
+ if (json == null) {
35
+ return json;
36
+ }
37
+ return {
38
+ 'images': (json['images'].map(ConversationMessageImageUio_1.ConversationMessageImageUioFromJSON)),
39
+ };
40
+ }
41
+ function ConversationMessageImagesUioToJSON(json) {
42
+ return ConversationMessageImagesUioToJSONTyped(json, false);
43
+ }
44
+ function ConversationMessageImagesUioToJSONTyped(value, ignoreDiscriminator = false) {
45
+ if (value == null) {
46
+ return value;
47
+ }
48
+ return {
49
+ 'images': (value['images'].map(ConversationMessageImageUio_1.ConversationMessageImageUioToJSON)),
50
+ };
51
+ }
@@ -188,6 +188,8 @@ export * from './ConversationDetailUio';
188
188
  export * from './ConversationHumanRequestRequestedByUio';
189
189
  export * from './ConversationHumanRequestUio';
190
190
  export * from './ConversationMessageApprovalUio';
191
+ export * from './ConversationMessageImageUio';
192
+ export * from './ConversationMessageImagesUio';
191
193
  export * from './ConversationMessagesInnerFlowNodeEntrypointsUio';
192
194
  export * from './ConversationMessagesInnerFlowNodeUio';
193
195
  export * from './ConversationMessagesInnerSuggestionsInnerUio';
@@ -206,6 +206,8 @@ __exportStar(require("./ConversationDetailUio"), exports);
206
206
  __exportStar(require("./ConversationHumanRequestRequestedByUio"), exports);
207
207
  __exportStar(require("./ConversationHumanRequestUio"), exports);
208
208
  __exportStar(require("./ConversationMessageApprovalUio"), exports);
209
+ __exportStar(require("./ConversationMessageImageUio"), exports);
210
+ __exportStar(require("./ConversationMessageImagesUio"), exports);
209
211
  __exportStar(require("./ConversationMessagesInnerFlowNodeEntrypointsUio"), exports);
210
212
  __exportStar(require("./ConversationMessagesInnerFlowNodeUio"), exports);
211
213
  __exportStar(require("./ConversationMessagesInnerSuggestionsInnerUio"), exports);
package/dist/openapi.json CHANGED
@@ -2349,6 +2349,61 @@
2349
2349
  "tags" : [ "agent" ]
2350
2350
  }
2351
2351
  },
2352
+ "/agents/{agentId}/conversations/{conversationId}/messages/{messageId}/images" : {
2353
+ "get" : {
2354
+ "description" : "Returns the images of documents the language model received while answering, with presigned\nURLs created on each call. For an assistant message, the images of every tool message of its\nturn; for a tool (System) message, its own. Returns an empty list for a turn without images.\nCall this when displaying a message's \"consulted images\" block, live or in history.\n",
2355
+ "operationId" : "getConversationMessageImages",
2356
+ "parameters" : [ {
2357
+ "description" : "ID of the agent",
2358
+ "in" : "path",
2359
+ "name" : "agentId",
2360
+ "required" : true,
2361
+ "schema" : {
2362
+ "format" : "uuid",
2363
+ "type" : "string"
2364
+ }
2365
+ }, {
2366
+ "description" : "The ID of the conversation",
2367
+ "in" : "path",
2368
+ "name" : "conversationId",
2369
+ "required" : true,
2370
+ "schema" : {
2371
+ "type" : "string"
2372
+ }
2373
+ }, {
2374
+ "description" : "The ID of the message",
2375
+ "in" : "path",
2376
+ "name" : "messageId",
2377
+ "required" : true,
2378
+ "schema" : {
2379
+ "type" : "string"
2380
+ }
2381
+ } ],
2382
+ "responses" : {
2383
+ "200" : {
2384
+ "content" : {
2385
+ "application/json" : {
2386
+ "schema" : {
2387
+ "$ref" : "#/components/schemas/ConversationMessageImages"
2388
+ }
2389
+ }
2390
+ },
2391
+ "description" : "The images of the turn, each with a short-lived presigned URL"
2392
+ },
2393
+ "401" : {
2394
+ "description" : "Unauthorized"
2395
+ },
2396
+ "403" : {
2397
+ "description" : "Forbidden - User doesn't have access to this agent"
2398
+ },
2399
+ "404" : {
2400
+ "description" : "Agent, conversation, or message not found, or the message is a user message"
2401
+ }
2402
+ },
2403
+ "summary" : "Get the document images the agent was given in a conversation turn",
2404
+ "tags" : [ "agent" ]
2405
+ }
2406
+ },
2352
2407
  "/agents/{agentId}/scheduled-tasks" : {
2353
2408
  "get" : {
2354
2409
  "operationId" : "listScheduledTasks",
@@ -16396,6 +16451,15 @@
16396
16451
  "type" : "string"
16397
16452
  }
16398
16453
  },
16454
+ "messageIdPath" : {
16455
+ "description" : "The ID of the message",
16456
+ "in" : "path",
16457
+ "name" : "messageId",
16458
+ "required" : true,
16459
+ "schema" : {
16460
+ "type" : "string"
16461
+ }
16462
+ },
16399
16463
  "taskIdPath" : {
16400
16464
  "description" : "ID of the scheduled task",
16401
16465
  "in" : "path",
@@ -16691,15 +16755,6 @@
16691
16755
  "type" : "boolean"
16692
16756
  }
16693
16757
  },
16694
- "messageIdPath" : {
16695
- "description" : "The ID of the message",
16696
- "in" : "path",
16697
- "name" : "messageId",
16698
- "required" : true,
16699
- "schema" : {
16700
- "type" : "string"
16701
- }
16702
- },
16703
16758
  "languagePath" : {
16704
16759
  "description" : "Language code",
16705
16760
  "in" : "path",
@@ -18994,6 +19049,36 @@
18994
19049
  "required" : [ "url" ],
18995
19050
  "type" : "object"
18996
19051
  },
19052
+ "ConversationMessageImages" : {
19053
+ "properties" : {
19054
+ "images" : {
19055
+ "items" : {
19056
+ "$ref" : "#/components/schemas/ConversationMessageImage"
19057
+ },
19058
+ "type" : "array"
19059
+ }
19060
+ },
19061
+ "required" : [ "images" ],
19062
+ "type" : "object"
19063
+ },
19064
+ "ConversationMessageImage" : {
19065
+ "properties" : {
19066
+ "imageId" : {
19067
+ "description" : "Identifier of the image within its document (16 hexadecimal characters)",
19068
+ "type" : "string"
19069
+ },
19070
+ "alt" : {
19071
+ "description" : "Alternative text of the image, empty when the document gives none",
19072
+ "type" : "string"
19073
+ },
19074
+ "url" : {
19075
+ "description" : "Presigned download URL, short-lived and created on each call",
19076
+ "type" : "string"
19077
+ }
19078
+ },
19079
+ "required" : [ "alt", "imageId", "url" ],
19080
+ "type" : "object"
19081
+ },
18997
19082
  "ScheduledTaskList" : {
18998
19083
  "properties" : {
18999
19084
  "tasks" : {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@breign/client",
3
- "version": "1.0.161",
3
+ "version": "1.0.162",
4
4
  "main": "dist/index.js",
5
5
  "exports": {
6
6
  ".": "./dist/index.js",