@breign/client 1.0.41 → 1.0.42
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.
|
@@ -31,6 +31,10 @@ export interface GetMessageByIdRequest {
|
|
|
31
31
|
conversationId: string;
|
|
32
32
|
messageId: string;
|
|
33
33
|
}
|
|
34
|
+
export interface GetMessageStatusRequest {
|
|
35
|
+
conversationId: string;
|
|
36
|
+
messageId: string;
|
|
37
|
+
}
|
|
34
38
|
export interface SendMessageToConversationRequest {
|
|
35
39
|
conversationId: string;
|
|
36
40
|
messageUio: MessageUio;
|
|
@@ -90,6 +94,16 @@ export declare class PromptsApi extends runtime.BaseAPI {
|
|
|
90
94
|
* Get a specific message from a conversation
|
|
91
95
|
*/
|
|
92
96
|
getMessageById(conversationId: string, messageId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ChatMessageUio>;
|
|
97
|
+
/**
|
|
98
|
+
* Get the status of a message
|
|
99
|
+
* Get the status of a message
|
|
100
|
+
*/
|
|
101
|
+
getMessageStatusRaw(requestParameters: GetMessageStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
102
|
+
/**
|
|
103
|
+
* Get the status of a message
|
|
104
|
+
* Get the status of a message
|
|
105
|
+
*/
|
|
106
|
+
getMessageStatus(conversationId: string, messageId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
93
107
|
/**
|
|
94
108
|
* Adds a new message to an existing conversation and gets the AI response
|
|
95
109
|
* Send a message to an existing conversation
|
package/dist/apis/PromptsApi.js
CHANGED
|
@@ -219,6 +219,37 @@ class PromptsApi extends runtime.BaseAPI {
|
|
|
219
219
|
const response = await this.getMessageByIdRaw({ conversationId: conversationId, messageId: messageId }, initOverrides);
|
|
220
220
|
return await response.value();
|
|
221
221
|
}
|
|
222
|
+
/**
|
|
223
|
+
* Get the status of a message
|
|
224
|
+
* Get the status of a message
|
|
225
|
+
*/
|
|
226
|
+
async getMessageStatusRaw(requestParameters, initOverrides) {
|
|
227
|
+
if (requestParameters['conversationId'] == null) {
|
|
228
|
+
throw new runtime.RequiredError('conversationId', 'Required parameter "conversationId" was null or undefined when calling getMessageStatus().');
|
|
229
|
+
}
|
|
230
|
+
if (requestParameters['messageId'] == null) {
|
|
231
|
+
throw new runtime.RequiredError('messageId', 'Required parameter "messageId" was null or undefined when calling getMessageStatus().');
|
|
232
|
+
}
|
|
233
|
+
const queryParameters = {};
|
|
234
|
+
const headerParameters = {};
|
|
235
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
236
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
237
|
+
}
|
|
238
|
+
const response = await this.request({
|
|
239
|
+
path: `/conversations/{conversationId}/messages/{messageId}/status`.replace(`{${"conversationId"}}`, encodeURIComponent(String(requestParameters['conversationId']))).replace(`{${"messageId"}}`, encodeURIComponent(String(requestParameters['messageId']))),
|
|
240
|
+
method: 'GET',
|
|
241
|
+
headers: headerParameters,
|
|
242
|
+
query: queryParameters,
|
|
243
|
+
}, initOverrides);
|
|
244
|
+
return new runtime.VoidApiResponse(response);
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* Get the status of a message
|
|
248
|
+
* Get the status of a message
|
|
249
|
+
*/
|
|
250
|
+
async getMessageStatus(conversationId, messageId, initOverrides) {
|
|
251
|
+
await this.getMessageStatusRaw({ conversationId: conversationId, messageId: messageId }, initOverrides);
|
|
252
|
+
}
|
|
222
253
|
/**
|
|
223
254
|
* Adds a new message to an existing conversation and gets the AI response
|
|
224
255
|
* Send a message to an existing conversation
|
|
@@ -54,6 +54,12 @@ export interface PromptCreateResponseUio {
|
|
|
54
54
|
* @memberof PromptCreateResponseUio
|
|
55
55
|
*/
|
|
56
56
|
toolsUsed?: Array<ToolUsedUio> | null;
|
|
57
|
+
/**
|
|
58
|
+
*
|
|
59
|
+
* @type {object}
|
|
60
|
+
* @memberof PromptCreateResponseUio
|
|
61
|
+
*/
|
|
62
|
+
agent?: object;
|
|
57
63
|
}
|
|
58
64
|
/**
|
|
59
65
|
* Check if a given object implements the PromptCreateResponseUio interface.
|
|
@@ -49,6 +49,7 @@ function PromptCreateResponseUioFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
49
49
|
'suggestions': json['suggestions'] == null ? undefined : (json['suggestions'].map(SuggestionUio_1.SuggestionUioFromJSON)),
|
|
50
50
|
'input': (0, InputUio_1.InputUioFromJSON)(json['input']),
|
|
51
51
|
'toolsUsed': json['toolsUsed'] == null ? undefined : (json['toolsUsed'].map(ToolUsedUio_1.ToolUsedUioFromJSON)),
|
|
52
|
+
'agent': json['agent'] == null ? undefined : json['agent'],
|
|
52
53
|
};
|
|
53
54
|
}
|
|
54
55
|
function PromptCreateResponseUioToJSON(json) {
|
|
@@ -65,5 +66,6 @@ function PromptCreateResponseUioToJSONTyped(value, ignoreDiscriminator = false)
|
|
|
65
66
|
'suggestions': value['suggestions'] == null ? undefined : (value['suggestions'].map(SuggestionUio_1.SuggestionUioToJSON)),
|
|
66
67
|
'input': (0, InputUio_1.InputUioToJSON)(value['input']),
|
|
67
68
|
'toolsUsed': value['toolsUsed'] == null ? undefined : (value['toolsUsed'].map(ToolUsedUio_1.ToolUsedUioToJSON)),
|
|
69
|
+
'agent': value['agent'],
|
|
68
70
|
};
|
|
69
71
|
}
|
package/dist/openapi.json
CHANGED
|
@@ -5721,6 +5721,48 @@
|
|
|
5721
5721
|
"summary" : "Get a specific message from a conversation",
|
|
5722
5722
|
"tags" : [ "prompts" ]
|
|
5723
5723
|
}
|
|
5724
|
+
},
|
|
5725
|
+
"/conversations/{conversationId}/messages/{messageId}/status" : {
|
|
5726
|
+
"get" : {
|
|
5727
|
+
"description" : "Get the status of a message",
|
|
5728
|
+
"operationId" : "getMessageStatus",
|
|
5729
|
+
"parameters" : [ {
|
|
5730
|
+
"description" : "The ID of the conversation",
|
|
5731
|
+
"in" : "path",
|
|
5732
|
+
"name" : "conversationId",
|
|
5733
|
+
"required" : true,
|
|
5734
|
+
"schema" : {
|
|
5735
|
+
"type" : "string"
|
|
5736
|
+
}
|
|
5737
|
+
}, {
|
|
5738
|
+
"description" : "The ID of the message",
|
|
5739
|
+
"in" : "path",
|
|
5740
|
+
"name" : "messageId",
|
|
5741
|
+
"required" : true,
|
|
5742
|
+
"schema" : {
|
|
5743
|
+
"type" : "string"
|
|
5744
|
+
}
|
|
5745
|
+
} ],
|
|
5746
|
+
"responses" : {
|
|
5747
|
+
"200" : {
|
|
5748
|
+
"description" : "Message status retrieved successfully"
|
|
5749
|
+
},
|
|
5750
|
+
"401" : {
|
|
5751
|
+
"description" : "Unauthorized"
|
|
5752
|
+
},
|
|
5753
|
+
"403" : {
|
|
5754
|
+
"description" : "Forbidden - User cannot access this conversation"
|
|
5755
|
+
},
|
|
5756
|
+
"404" : {
|
|
5757
|
+
"description" : "Conversation or message not found"
|
|
5758
|
+
},
|
|
5759
|
+
"500" : {
|
|
5760
|
+
"description" : "Server error"
|
|
5761
|
+
}
|
|
5762
|
+
},
|
|
5763
|
+
"summary" : "Get the status of a message",
|
|
5764
|
+
"tags" : [ "prompts" ]
|
|
5765
|
+
}
|
|
5724
5766
|
}
|
|
5725
5767
|
},
|
|
5726
5768
|
"components" : {
|
|
@@ -8769,6 +8811,9 @@
|
|
|
8769
8811
|
},
|
|
8770
8812
|
"nullable" : true,
|
|
8771
8813
|
"type" : "array"
|
|
8814
|
+
},
|
|
8815
|
+
"agent" : {
|
|
8816
|
+
"type" : "object"
|
|
8772
8817
|
}
|
|
8773
8818
|
},
|
|
8774
8819
|
"required" : [ "conversationId", "input", "messageId", "text" ],
|