@breign/client 1.0.93 → 1.0.94
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/AgentApi.d.ts +16 -1
- package/dist/apis/AgentApi.js +35 -0
- package/dist/models/ConversationAttachmentDownloadUrlUio.d.ts +32 -0
- package/dist/models/ConversationAttachmentDownloadUrlUio.js +50 -0
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +1 -0
- package/dist/openapi.json +83 -18
- package/package.json +1 -1
package/dist/apis/AgentApi.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 { AdvancedFlowEditorUio, AdvancedFlowEditorUpdateRequestUio, AgentDuplicateRequestUio, AgentFlowCreateUio, AgentFlowUio, AgentMetricsEventUio, AgentMetricsOverviewUio, AgentModuleUio, AgentPatchUio, AgentRequestUio, AgentSubscriptionUio, AgentUio, AgentUsageMetricsUio, BodyWithIdUio, ChatUio, DeleteMessageAudio200ResponseUio, FileCreationRequestUio, FileCreationResponseUio, FlowEditorUio, FlowEditorUpdateRequestUio, MessageAudioDownloadUrlUio, S3UploadBodyUio } from '../models/index';
|
|
13
|
+
import type { AdvancedFlowEditorUio, AdvancedFlowEditorUpdateRequestUio, AgentDuplicateRequestUio, AgentFlowCreateUio, AgentFlowUio, AgentMetricsEventUio, AgentMetricsOverviewUio, AgentModuleUio, AgentPatchUio, AgentRequestUio, AgentSubscriptionUio, AgentUio, AgentUsageMetricsUio, BodyWithIdUio, ChatUio, ConversationAttachmentDownloadUrlUio, DeleteMessageAudio200ResponseUio, FileCreationRequestUio, FileCreationResponseUio, FlowEditorUio, FlowEditorUpdateRequestUio, MessageAudioDownloadUrlUio, S3UploadBodyUio } from '../models/index';
|
|
14
14
|
export interface AddModuleRequest {
|
|
15
15
|
agentId: string;
|
|
16
16
|
agentModuleUio: AgentModuleUio;
|
|
@@ -67,6 +67,11 @@ export interface GetAgentsRequest {
|
|
|
67
67
|
isCreator?: boolean;
|
|
68
68
|
providerSource?: GetAgentsProviderSourceEnum;
|
|
69
69
|
}
|
|
70
|
+
export interface GetConversationContextAttachmentDownloadUrlRequest {
|
|
71
|
+
agentId: string;
|
|
72
|
+
conversationId: string;
|
|
73
|
+
attachmentId: string;
|
|
74
|
+
}
|
|
70
75
|
export interface GetConversationsForAgentRequest {
|
|
71
76
|
agentId: string;
|
|
72
77
|
page?: number;
|
|
@@ -287,6 +292,16 @@ export declare class AgentApi extends runtime.BaseAPI {
|
|
|
287
292
|
* Get all agents
|
|
288
293
|
*/
|
|
289
294
|
getAgents(isCreator?: boolean, providerSource?: GetAgentsProviderSourceEnum, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<AgentUio>>;
|
|
295
|
+
/**
|
|
296
|
+
* Returns a short-lived presigned URL (or inline data URL for small images) for an attachment linked to a conversation. Call this when displaying or downloading user-attached files in chat history, not when listing conversations.
|
|
297
|
+
* Get presigned download URL for a conversation context attachment
|
|
298
|
+
*/
|
|
299
|
+
getConversationContextAttachmentDownloadUrlRaw(requestParameters: GetConversationContextAttachmentDownloadUrlRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConversationAttachmentDownloadUrlUio>>;
|
|
300
|
+
/**
|
|
301
|
+
* Returns a short-lived presigned URL (or inline data URL for small images) for an attachment linked to a conversation. Call this when displaying or downloading user-attached files in chat history, not when listing conversations.
|
|
302
|
+
* Get presigned download URL for a conversation context attachment
|
|
303
|
+
*/
|
|
304
|
+
getConversationContextAttachmentDownloadUrl(agentId: string, conversationId: string, attachmentId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationAttachmentDownloadUrlUio>;
|
|
290
305
|
/**
|
|
291
306
|
* Get conversations for an agent
|
|
292
307
|
* Get conversations for an agent
|
package/dist/apis/AgentApi.js
CHANGED
|
@@ -504,6 +504,41 @@ class AgentApi extends runtime.BaseAPI {
|
|
|
504
504
|
const response = await this.getAgentsRaw({ isCreator: isCreator, providerSource: providerSource }, initOverrides);
|
|
505
505
|
return await response.value();
|
|
506
506
|
}
|
|
507
|
+
/**
|
|
508
|
+
* Returns a short-lived presigned URL (or inline data URL for small images) for an attachment linked to a conversation. Call this when displaying or downloading user-attached files in chat history, not when listing conversations.
|
|
509
|
+
* Get presigned download URL for a conversation context attachment
|
|
510
|
+
*/
|
|
511
|
+
async getConversationContextAttachmentDownloadUrlRaw(requestParameters, initOverrides) {
|
|
512
|
+
if (requestParameters['agentId'] == null) {
|
|
513
|
+
throw new runtime.RequiredError('agentId', 'Required parameter "agentId" was null or undefined when calling getConversationContextAttachmentDownloadUrl().');
|
|
514
|
+
}
|
|
515
|
+
if (requestParameters['conversationId'] == null) {
|
|
516
|
+
throw new runtime.RequiredError('conversationId', 'Required parameter "conversationId" was null or undefined when calling getConversationContextAttachmentDownloadUrl().');
|
|
517
|
+
}
|
|
518
|
+
if (requestParameters['attachmentId'] == null) {
|
|
519
|
+
throw new runtime.RequiredError('attachmentId', 'Required parameter "attachmentId" was null or undefined when calling getConversationContextAttachmentDownloadUrl().');
|
|
520
|
+
}
|
|
521
|
+
const queryParameters = {};
|
|
522
|
+
const headerParameters = {};
|
|
523
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
524
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
525
|
+
}
|
|
526
|
+
const response = await this.request({
|
|
527
|
+
path: `/agents/{agentId}/conversations/{conversationId}/context-attachments/{attachmentId}/download-url`.replace(`{${"agentId"}}`, encodeURIComponent(String(requestParameters['agentId']))).replace(`{${"conversationId"}}`, encodeURIComponent(String(requestParameters['conversationId']))).replace(`{${"attachmentId"}}`, encodeURIComponent(String(requestParameters['attachmentId']))),
|
|
528
|
+
method: 'GET',
|
|
529
|
+
headers: headerParameters,
|
|
530
|
+
query: queryParameters,
|
|
531
|
+
}, initOverrides);
|
|
532
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ConversationAttachmentDownloadUrlUioFromJSON)(jsonValue));
|
|
533
|
+
}
|
|
534
|
+
/**
|
|
535
|
+
* Returns a short-lived presigned URL (or inline data URL for small images) for an attachment linked to a conversation. Call this when displaying or downloading user-attached files in chat history, not when listing conversations.
|
|
536
|
+
* Get presigned download URL for a conversation context attachment
|
|
537
|
+
*/
|
|
538
|
+
async getConversationContextAttachmentDownloadUrl(agentId, conversationId, attachmentId, initOverrides) {
|
|
539
|
+
const response = await this.getConversationContextAttachmentDownloadUrlRaw({ agentId: agentId, conversationId: conversationId, attachmentId: attachmentId }, initOverrides);
|
|
540
|
+
return await response.value();
|
|
541
|
+
}
|
|
507
542
|
/**
|
|
508
543
|
* Get conversations for an agent
|
|
509
544
|
* Get conversations for an agent
|
|
@@ -0,0 +1,32 @@
|
|
|
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 ConversationAttachmentDownloadUrlUio
|
|
16
|
+
*/
|
|
17
|
+
export interface ConversationAttachmentDownloadUrlUio {
|
|
18
|
+
/**
|
|
19
|
+
* Presigned download URL or inline data URL for the image attachment
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof ConversationAttachmentDownloadUrlUio
|
|
22
|
+
*/
|
|
23
|
+
url: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Check if a given object implements the ConversationAttachmentDownloadUrlUio interface.
|
|
27
|
+
*/
|
|
28
|
+
export declare function instanceOfConversationAttachmentDownloadUrlUio(value: object): value is ConversationAttachmentDownloadUrlUio;
|
|
29
|
+
export declare function ConversationAttachmentDownloadUrlUioFromJSON(json: any): ConversationAttachmentDownloadUrlUio;
|
|
30
|
+
export declare function ConversationAttachmentDownloadUrlUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConversationAttachmentDownloadUrlUio;
|
|
31
|
+
export declare function ConversationAttachmentDownloadUrlUioToJSON(json: any): ConversationAttachmentDownloadUrlUio;
|
|
32
|
+
export declare function ConversationAttachmentDownloadUrlUioToJSONTyped(value?: ConversationAttachmentDownloadUrlUio | 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.instanceOfConversationAttachmentDownloadUrlUio = instanceOfConversationAttachmentDownloadUrlUio;
|
|
17
|
+
exports.ConversationAttachmentDownloadUrlUioFromJSON = ConversationAttachmentDownloadUrlUioFromJSON;
|
|
18
|
+
exports.ConversationAttachmentDownloadUrlUioFromJSONTyped = ConversationAttachmentDownloadUrlUioFromJSONTyped;
|
|
19
|
+
exports.ConversationAttachmentDownloadUrlUioToJSON = ConversationAttachmentDownloadUrlUioToJSON;
|
|
20
|
+
exports.ConversationAttachmentDownloadUrlUioToJSONTyped = ConversationAttachmentDownloadUrlUioToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the ConversationAttachmentDownloadUrlUio interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfConversationAttachmentDownloadUrlUio(value) {
|
|
25
|
+
if (!('url' in value) || value['url'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
function ConversationAttachmentDownloadUrlUioFromJSON(json) {
|
|
30
|
+
return ConversationAttachmentDownloadUrlUioFromJSONTyped(json, false);
|
|
31
|
+
}
|
|
32
|
+
function ConversationAttachmentDownloadUrlUioFromJSONTyped(json, ignoreDiscriminator) {
|
|
33
|
+
if (json == null) {
|
|
34
|
+
return json;
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
'url': json['url'],
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
function ConversationAttachmentDownloadUrlUioToJSON(json) {
|
|
41
|
+
return ConversationAttachmentDownloadUrlUioToJSONTyped(json, false);
|
|
42
|
+
}
|
|
43
|
+
function ConversationAttachmentDownloadUrlUioToJSONTyped(value, ignoreDiscriminator = false) {
|
|
44
|
+
if (value == null) {
|
|
45
|
+
return value;
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
'url': value['url'],
|
|
49
|
+
};
|
|
50
|
+
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -96,6 +96,7 @@ export * from './ConnectOAuth2Tool200ResponseUio';
|
|
|
96
96
|
export * from './ContentsToolsUio';
|
|
97
97
|
export * from './ContextUio';
|
|
98
98
|
export * from './Conversation1Uio';
|
|
99
|
+
export * from './ConversationAttachmentDownloadUrlUio';
|
|
99
100
|
export * from './ConversationMessagesInnerFlowNodeEntrypointsUio';
|
|
100
101
|
export * from './ConversationMessagesInnerFlowNodeUio';
|
|
101
102
|
export * from './ConversationMessagesInnerSuggestionsInnerUio';
|
package/dist/models/index.js
CHANGED
|
@@ -114,6 +114,7 @@ __exportStar(require("./ConnectOAuth2Tool200ResponseUio"), exports);
|
|
|
114
114
|
__exportStar(require("./ContentsToolsUio"), exports);
|
|
115
115
|
__exportStar(require("./ContextUio"), exports);
|
|
116
116
|
__exportStar(require("./Conversation1Uio"), exports);
|
|
117
|
+
__exportStar(require("./ConversationAttachmentDownloadUrlUio"), exports);
|
|
117
118
|
__exportStar(require("./ConversationMessagesInnerFlowNodeEntrypointsUio"), exports);
|
|
118
119
|
__exportStar(require("./ConversationMessagesInnerFlowNodeUio"), exports);
|
|
119
120
|
__exportStar(require("./ConversationMessagesInnerSuggestionsInnerUio"), exports);
|
package/dist/openapi.json
CHANGED
|
@@ -1683,6 +1683,61 @@
|
|
|
1683
1683
|
"tags" : [ "agent" ]
|
|
1684
1684
|
}
|
|
1685
1685
|
},
|
|
1686
|
+
"/agents/{agentId}/conversations/{conversationId}/context-attachments/{attachmentId}/download-url" : {
|
|
1687
|
+
"get" : {
|
|
1688
|
+
"description" : "Returns a short-lived presigned URL (or inline data URL for small images) for an attachment linked to a conversation.\nCall this when displaying or downloading user-attached files in chat history, not when listing conversations.\n",
|
|
1689
|
+
"operationId" : "getConversationContextAttachmentDownloadUrl",
|
|
1690
|
+
"parameters" : [ {
|
|
1691
|
+
"description" : "ID of the agent",
|
|
1692
|
+
"in" : "path",
|
|
1693
|
+
"name" : "agentId",
|
|
1694
|
+
"required" : true,
|
|
1695
|
+
"schema" : {
|
|
1696
|
+
"format" : "uuid",
|
|
1697
|
+
"type" : "string"
|
|
1698
|
+
}
|
|
1699
|
+
}, {
|
|
1700
|
+
"description" : "The ID of the conversation",
|
|
1701
|
+
"in" : "path",
|
|
1702
|
+
"name" : "conversationId",
|
|
1703
|
+
"required" : true,
|
|
1704
|
+
"schema" : {
|
|
1705
|
+
"type" : "string"
|
|
1706
|
+
}
|
|
1707
|
+
}, {
|
|
1708
|
+
"description" : "ID of the attachment",
|
|
1709
|
+
"in" : "path",
|
|
1710
|
+
"name" : "attachmentId",
|
|
1711
|
+
"required" : true,
|
|
1712
|
+
"schema" : {
|
|
1713
|
+
"type" : "string"
|
|
1714
|
+
}
|
|
1715
|
+
} ],
|
|
1716
|
+
"responses" : {
|
|
1717
|
+
"200" : {
|
|
1718
|
+
"content" : {
|
|
1719
|
+
"application/json" : {
|
|
1720
|
+
"schema" : {
|
|
1721
|
+
"$ref" : "#/components/schemas/ConversationAttachmentDownloadUrl"
|
|
1722
|
+
}
|
|
1723
|
+
}
|
|
1724
|
+
},
|
|
1725
|
+
"description" : "Presigned download URL"
|
|
1726
|
+
},
|
|
1727
|
+
"401" : {
|
|
1728
|
+
"description" : "Unauthorized"
|
|
1729
|
+
},
|
|
1730
|
+
"403" : {
|
|
1731
|
+
"description" : "Forbidden - User doesn't have access to this agent"
|
|
1732
|
+
},
|
|
1733
|
+
"404" : {
|
|
1734
|
+
"description" : "Agent, conversation, or attachment not found"
|
|
1735
|
+
}
|
|
1736
|
+
},
|
|
1737
|
+
"summary" : "Get presigned download URL for a conversation context attachment",
|
|
1738
|
+
"tags" : [ "agent" ]
|
|
1739
|
+
}
|
|
1740
|
+
},
|
|
1686
1741
|
"/agents/{agentId}/apps" : {
|
|
1687
1742
|
"get" : {
|
|
1688
1743
|
"description" : "Get apps for agent id",
|
|
@@ -8499,6 +8554,24 @@
|
|
|
8499
8554
|
"type" : "string"
|
|
8500
8555
|
}
|
|
8501
8556
|
},
|
|
8557
|
+
"conversationIdPath" : {
|
|
8558
|
+
"description" : "The ID of the conversation",
|
|
8559
|
+
"in" : "path",
|
|
8560
|
+
"name" : "conversationId",
|
|
8561
|
+
"required" : true,
|
|
8562
|
+
"schema" : {
|
|
8563
|
+
"type" : "string"
|
|
8564
|
+
}
|
|
8565
|
+
},
|
|
8566
|
+
"attachmentIdPath" : {
|
|
8567
|
+
"description" : "ID of the attachment",
|
|
8568
|
+
"in" : "path",
|
|
8569
|
+
"name" : "attachmentId",
|
|
8570
|
+
"required" : true,
|
|
8571
|
+
"schema" : {
|
|
8572
|
+
"type" : "string"
|
|
8573
|
+
}
|
|
8574
|
+
},
|
|
8502
8575
|
"appIdPath" : {
|
|
8503
8576
|
"description" : "ID of the app",
|
|
8504
8577
|
"in" : "path",
|
|
@@ -8607,24 +8680,6 @@
|
|
|
8607
8680
|
"type" : "string"
|
|
8608
8681
|
}
|
|
8609
8682
|
},
|
|
8610
|
-
"conversationIdPath" : {
|
|
8611
|
-
"description" : "The ID of the conversation",
|
|
8612
|
-
"in" : "path",
|
|
8613
|
-
"name" : "conversationId",
|
|
8614
|
-
"required" : true,
|
|
8615
|
-
"schema" : {
|
|
8616
|
-
"type" : "string"
|
|
8617
|
-
}
|
|
8618
|
-
},
|
|
8619
|
-
"attachmentIdPath" : {
|
|
8620
|
-
"description" : "ID of the attachment",
|
|
8621
|
-
"in" : "path",
|
|
8622
|
-
"name" : "attachmentId",
|
|
8623
|
-
"required" : true,
|
|
8624
|
-
"schema" : {
|
|
8625
|
-
"type" : "string"
|
|
8626
|
-
}
|
|
8627
|
-
},
|
|
8628
8683
|
"organizationIdPath" : {
|
|
8629
8684
|
"description" : "ID of the organization",
|
|
8630
8685
|
"in" : "path",
|
|
@@ -10241,6 +10296,16 @@
|
|
|
10241
10296
|
"required" : [ "url" ],
|
|
10242
10297
|
"type" : "object"
|
|
10243
10298
|
},
|
|
10299
|
+
"ConversationAttachmentDownloadUrl" : {
|
|
10300
|
+
"properties" : {
|
|
10301
|
+
"url" : {
|
|
10302
|
+
"description" : "Presigned download URL or inline data URL for the image attachment",
|
|
10303
|
+
"type" : "string"
|
|
10304
|
+
}
|
|
10305
|
+
},
|
|
10306
|
+
"required" : [ "url" ],
|
|
10307
|
+
"type" : "object"
|
|
10308
|
+
},
|
|
10244
10309
|
"AppLight" : {
|
|
10245
10310
|
"properties" : {
|
|
10246
10311
|
"id" : {
|