@breign/client 1.0.40 → 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
@@ -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
@@ -0,0 +1,50 @@
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 AgentRoleDetailsUio
16
+ */
17
+ export interface AgentRoleDetailsUio {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof AgentRoleDetailsUio
22
+ */
23
+ id?: string;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof AgentRoleDetailsUio
28
+ */
29
+ name?: string;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof AgentRoleDetailsUio
34
+ */
35
+ description?: string;
36
+ /**
37
+ *
38
+ * @type {string}
39
+ * @memberof AgentRoleDetailsUio
40
+ */
41
+ color?: string;
42
+ }
43
+ /**
44
+ * Check if a given object implements the AgentRoleDetailsUio interface.
45
+ */
46
+ export declare function instanceOfAgentRoleDetailsUio(value: object): value is AgentRoleDetailsUio;
47
+ export declare function AgentRoleDetailsUioFromJSON(json: any): AgentRoleDetailsUio;
48
+ export declare function AgentRoleDetailsUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): AgentRoleDetailsUio;
49
+ export declare function AgentRoleDetailsUioToJSON(json: any): AgentRoleDetailsUio;
50
+ export declare function AgentRoleDetailsUioToJSONTyped(value?: AgentRoleDetailsUio | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,54 @@
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.instanceOfAgentRoleDetailsUio = instanceOfAgentRoleDetailsUio;
17
+ exports.AgentRoleDetailsUioFromJSON = AgentRoleDetailsUioFromJSON;
18
+ exports.AgentRoleDetailsUioFromJSONTyped = AgentRoleDetailsUioFromJSONTyped;
19
+ exports.AgentRoleDetailsUioToJSON = AgentRoleDetailsUioToJSON;
20
+ exports.AgentRoleDetailsUioToJSONTyped = AgentRoleDetailsUioToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the AgentRoleDetailsUio interface.
23
+ */
24
+ function instanceOfAgentRoleDetailsUio(value) {
25
+ return true;
26
+ }
27
+ function AgentRoleDetailsUioFromJSON(json) {
28
+ return AgentRoleDetailsUioFromJSONTyped(json, false);
29
+ }
30
+ function AgentRoleDetailsUioFromJSONTyped(json, ignoreDiscriminator) {
31
+ if (json == null) {
32
+ return json;
33
+ }
34
+ return {
35
+ 'id': json['id'] == null ? undefined : json['id'],
36
+ 'name': json['name'] == null ? undefined : json['name'],
37
+ 'description': json['description'] == null ? undefined : json['description'],
38
+ 'color': json['color'] == null ? undefined : json['color'],
39
+ };
40
+ }
41
+ function AgentRoleDetailsUioToJSON(json) {
42
+ return AgentRoleDetailsUioToJSONTyped(json, false);
43
+ }
44
+ function AgentRoleDetailsUioToJSONTyped(value, ignoreDiscriminator = false) {
45
+ if (value == null) {
46
+ return value;
47
+ }
48
+ return {
49
+ 'id': value['id'],
50
+ 'name': value['name'],
51
+ 'description': value['description'],
52
+ 'color': value['color'],
53
+ };
54
+ }
@@ -9,6 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import type { AgentRoleDetailsUio } from './AgentRoleDetailsUio';
12
13
  import type { AgentSubscriptionUio } from './AgentSubscriptionUio';
13
14
  import type { AgentToolUio } from './AgentToolUio';
14
15
  import type { PersonaUio } from './PersonaUio';
@@ -110,6 +111,12 @@ export interface AgentUio {
110
111
  * @memberof AgentUio
111
112
  */
112
113
  role?: string;
114
+ /**
115
+ *
116
+ * @type {AgentRoleDetailsUio}
117
+ * @memberof AgentUio
118
+ */
119
+ roleDetails?: AgentRoleDetailsUio;
113
120
  /**
114
121
  *
115
122
  * @type {string}
@@ -18,6 +18,7 @@ exports.AgentUioFromJSON = AgentUioFromJSON;
18
18
  exports.AgentUioFromJSONTyped = AgentUioFromJSONTyped;
19
19
  exports.AgentUioToJSON = AgentUioToJSON;
20
20
  exports.AgentUioToJSONTyped = AgentUioToJSONTyped;
21
+ const AgentRoleDetailsUio_1 = require("./AgentRoleDetailsUio");
21
22
  const AgentSubscriptionUio_1 = require("./AgentSubscriptionUio");
22
23
  const AgentToolUio_1 = require("./AgentToolUio");
23
24
  const PersonaUio_1 = require("./PersonaUio");
@@ -65,6 +66,7 @@ function AgentUioFromJSONTyped(json, ignoreDiscriminator) {
65
66
  'profilePicture': json['profilePicture'] == null ? undefined : json['profilePicture'],
66
67
  'organisationId': json['organisationId'],
67
68
  'role': json['role'] == null ? undefined : json['role'],
69
+ 'roleDetails': json['roleDetails'] == null ? undefined : (0, AgentRoleDetailsUio_1.AgentRoleDetailsUioFromJSON)(json['roleDetails']),
68
70
  'defaultLanguage': json['defaultLanguage'] == null ? undefined : json['defaultLanguage'],
69
71
  'description': json['description'] == null ? undefined : json['description'],
70
72
  'template': json['template'] == null ? undefined : json['template'],
@@ -104,6 +106,7 @@ function AgentUioToJSONTyped(value, ignoreDiscriminator = false) {
104
106
  'profilePicture': value['profilePicture'],
105
107
  'organisationId': value['organisationId'],
106
108
  'role': value['role'],
109
+ 'roleDetails': (0, AgentRoleDetailsUio_1.AgentRoleDetailsUioToJSON)(value['roleDetails']),
107
110
  'defaultLanguage': value['defaultLanguage'],
108
111
  'description': value['description'],
109
112
  'template': value['template'],
@@ -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
  }
@@ -14,6 +14,7 @@ export * from './AgentPatchEngineUio';
14
14
  export * from './AgentPatchUio';
15
15
  export * from './AgentRequestProfilePictureUio';
16
16
  export * from './AgentRequestUio';
17
+ export * from './AgentRoleDetailsUio';
17
18
  export * from './AgentSubscriptionTextInteractionsUio';
18
19
  export * from './AgentSubscriptionUio';
19
20
  export * from './AgentToolUio';
@@ -32,6 +32,7 @@ __exportStar(require("./AgentPatchEngineUio"), exports);
32
32
  __exportStar(require("./AgentPatchUio"), exports);
33
33
  __exportStar(require("./AgentRequestProfilePictureUio"), exports);
34
34
  __exportStar(require("./AgentRequestUio"), exports);
35
+ __exportStar(require("./AgentRoleDetailsUio"), exports);
35
36
  __exportStar(require("./AgentSubscriptionTextInteractionsUio"), exports);
36
37
  __exportStar(require("./AgentSubscriptionUio"), exports);
37
38
  __exportStar(require("./AgentToolUio"), exports);
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" : {
@@ -6280,6 +6322,9 @@
6280
6322
  "role" : {
6281
6323
  "type" : "string"
6282
6324
  },
6325
+ "roleDetails" : {
6326
+ "$ref" : "#/components/schemas/Agent_roleDetails"
6327
+ },
6283
6328
  "defaultLanguage" : {
6284
6329
  "type" : "string"
6285
6330
  },
@@ -8766,6 +8811,9 @@
8766
8811
  },
8767
8812
  "nullable" : true,
8768
8813
  "type" : "array"
8814
+ },
8815
+ "agent" : {
8816
+ "type" : "object"
8769
8817
  }
8770
8818
  },
8771
8819
  "required" : [ "conversationId", "input", "messageId", "text" ],
@@ -9057,6 +9105,23 @@
9057
9105
  },
9058
9106
  "type" : "object"
9059
9107
  },
9108
+ "Agent_roleDetails" : {
9109
+ "properties" : {
9110
+ "id" : {
9111
+ "type" : "string"
9112
+ },
9113
+ "name" : {
9114
+ "type" : "string"
9115
+ },
9116
+ "description" : {
9117
+ "type" : "string"
9118
+ },
9119
+ "color" : {
9120
+ "type" : "string"
9121
+ }
9122
+ },
9123
+ "type" : "object"
9124
+ },
9060
9125
  "Agent_creator_user" : {
9061
9126
  "properties" : {
9062
9127
  "name" : {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@breign/client",
3
- "version": "1.0.40",
3
+ "version": "1.0.42",
4
4
  "main": "dist/index.js",
5
5
  "exports": {
6
6
  ".": "./dist/index.js",