@breign/client 1.0.39 → 1.0.41

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.
@@ -56,6 +56,10 @@ export interface GetAgentMetricsOverviewRequest {
56
56
  startDate?: Date;
57
57
  endDate?: Date;
58
58
  }
59
+ export interface GetAgentsRequest {
60
+ isCreator?: boolean;
61
+ providerSource?: GetAgentsProviderSourceEnum;
62
+ }
59
63
  export interface GetConversationsForAgentRequest {
60
64
  agentId: string;
61
65
  page?: number;
@@ -73,6 +77,7 @@ export interface GetModulesRequest {
73
77
  export interface ListOrganizationAgentsRequest {
74
78
  organizationId: string;
75
79
  isCreator?: boolean;
80
+ providerSource?: ListOrganizationAgentsProviderSourceEnum;
76
81
  }
77
82
  export interface RemoveAgentProfileImageRequest {
78
83
  agentId: string;
@@ -214,15 +219,15 @@ export declare class AgentApi extends runtime.BaseAPI {
214
219
  */
215
220
  getAgentMetricsOverview(agentId: string, startDate?: Date, endDate?: Date, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AgentMetricsOverviewUio>;
216
221
  /**
217
- * Get all agents (admin only)
222
+ * Get all agents accessible to user
218
223
  * Get all agents
219
224
  */
220
- getAgentsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<AgentUio>>>;
225
+ getAgentsRaw(requestParameters: GetAgentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<AgentUio>>>;
221
226
  /**
222
- * Get all agents (admin only)
227
+ * Get all agents accessible to user
223
228
  * Get all agents
224
229
  */
225
- getAgents(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<AgentUio>>;
230
+ getAgents(isCreator?: boolean, providerSource?: GetAgentsProviderSourceEnum, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<AgentUio>>;
226
231
  /**
227
232
  * Get conversations for an agent
228
233
  * Get conversations for an agent
@@ -270,7 +275,7 @@ export declare class AgentApi extends runtime.BaseAPI {
270
275
  /**
271
276
  * List agents for an organization
272
277
  */
273
- listOrganizationAgents(organizationId: string, isCreator?: boolean, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<AgentUio>>;
278
+ listOrganizationAgents(organizationId: string, isCreator?: boolean, providerSource?: ListOrganizationAgentsProviderSourceEnum, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<AgentUio>>;
274
279
  /**
275
280
  * Removes the profile image for an agent
276
281
  * Remove agent profile image
@@ -340,3 +345,19 @@ export declare class AgentApi extends runtime.BaseAPI {
340
345
  */
341
346
  uploadAgentProfileImage(agentId: string, fileCreationRequestUio: FileCreationRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FileCreationResponseUio>;
342
347
  }
348
+ /**
349
+ * @export
350
+ */
351
+ export declare const GetAgentsProviderSourceEnum: {
352
+ readonly External: "EXTERNAL";
353
+ readonly Internal: "INTERNAL";
354
+ };
355
+ export type GetAgentsProviderSourceEnum = typeof GetAgentsProviderSourceEnum[keyof typeof GetAgentsProviderSourceEnum];
356
+ /**
357
+ * @export
358
+ */
359
+ export declare const ListOrganizationAgentsProviderSourceEnum: {
360
+ readonly External: "EXTERNAL";
361
+ readonly Internal: "INTERNAL";
362
+ };
363
+ export type ListOrganizationAgentsProviderSourceEnum = typeof ListOrganizationAgentsProviderSourceEnum[keyof typeof ListOrganizationAgentsProviderSourceEnum];
@@ -46,7 +46,7 @@ var __importStar = (this && this.__importStar) || (function () {
46
46
  };
47
47
  })();
48
48
  Object.defineProperty(exports, "__esModule", { value: true });
49
- exports.AgentApi = void 0;
49
+ exports.ListOrganizationAgentsProviderSourceEnum = exports.GetAgentsProviderSourceEnum = exports.AgentApi = void 0;
50
50
  const runtime = __importStar(require("../runtime"));
51
51
  const index_1 = require("../models/index");
52
52
  /**
@@ -412,11 +412,17 @@ class AgentApi extends runtime.BaseAPI {
412
412
  return await response.value();
413
413
  }
414
414
  /**
415
- * Get all agents (admin only)
415
+ * Get all agents accessible to user
416
416
  * Get all agents
417
417
  */
418
- async getAgentsRaw(initOverrides) {
418
+ async getAgentsRaw(requestParameters, initOverrides) {
419
419
  const queryParameters = {};
420
+ if (requestParameters['isCreator'] != null) {
421
+ queryParameters['isCreator'] = requestParameters['isCreator'];
422
+ }
423
+ if (requestParameters['providerSource'] != null) {
424
+ queryParameters['providerSource'] = requestParameters['providerSource'];
425
+ }
420
426
  const headerParameters = {};
421
427
  if (this.configuration && this.configuration.apiKey) {
422
428
  headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
@@ -430,11 +436,11 @@ class AgentApi extends runtime.BaseAPI {
430
436
  return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.AgentUioFromJSON));
431
437
  }
432
438
  /**
433
- * Get all agents (admin only)
439
+ * Get all agents accessible to user
434
440
  * Get all agents
435
441
  */
436
- async getAgents(initOverrides) {
437
- const response = await this.getAgentsRaw(initOverrides);
442
+ async getAgents(isCreator, providerSource, initOverrides) {
443
+ const response = await this.getAgentsRaw({ isCreator: isCreator, providerSource: providerSource }, initOverrides);
438
444
  return await response.value();
439
445
  }
440
446
  /**
@@ -570,6 +576,9 @@ class AgentApi extends runtime.BaseAPI {
570
576
  if (requestParameters['isCreator'] != null) {
571
577
  queryParameters['isCreator'] = requestParameters['isCreator'];
572
578
  }
579
+ if (requestParameters['providerSource'] != null) {
580
+ queryParameters['providerSource'] = requestParameters['providerSource'];
581
+ }
573
582
  const headerParameters = {};
574
583
  if (this.configuration && this.configuration.apiKey) {
575
584
  headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
@@ -585,8 +594,8 @@ class AgentApi extends runtime.BaseAPI {
585
594
  /**
586
595
  * List agents for an organization
587
596
  */
588
- async listOrganizationAgents(organizationId, isCreator, initOverrides) {
589
- const response = await this.listOrganizationAgentsRaw({ organizationId: organizationId, isCreator: isCreator }, initOverrides);
597
+ async listOrganizationAgents(organizationId, isCreator, providerSource, initOverrides) {
598
+ const response = await this.listOrganizationAgentsRaw({ organizationId: organizationId, isCreator: isCreator, providerSource: providerSource }, initOverrides);
590
599
  return await response.value();
591
600
  }
592
601
  /**
@@ -818,3 +827,17 @@ class AgentApi extends runtime.BaseAPI {
818
827
  }
819
828
  }
820
829
  exports.AgentApi = AgentApi;
830
+ /**
831
+ * @export
832
+ */
833
+ exports.GetAgentsProviderSourceEnum = {
834
+ External: 'EXTERNAL',
835
+ Internal: 'INTERNAL'
836
+ };
837
+ /**
838
+ * @export
839
+ */
840
+ exports.ListOrganizationAgentsProviderSourceEnum = {
841
+ External: 'EXTERNAL',
842
+ Internal: 'INTERNAL'
843
+ };
@@ -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'],
@@ -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
@@ -90,8 +90,26 @@
90
90
  },
91
91
  "/agents" : {
92
92
  "get" : {
93
- "description" : "Get all agents (admin only)",
93
+ "description" : "Get all agents accessible to user",
94
94
  "operationId" : "getAgents",
95
+ "parameters" : [ {
96
+ "description" : "If true, only returns agents created by the authenticated user.\n",
97
+ "in" : "query",
98
+ "name" : "isCreator",
99
+ "required" : false,
100
+ "schema" : {
101
+ "type" : "boolean"
102
+ }
103
+ }, {
104
+ "description" : "Filter by provider source.",
105
+ "in" : "query",
106
+ "name" : "providerSource",
107
+ "required" : false,
108
+ "schema" : {
109
+ "enum" : [ "EXTERNAL", "INTERNAL" ],
110
+ "type" : "string"
111
+ }
112
+ } ],
95
113
  "responses" : {
96
114
  "200" : {
97
115
  "content" : {
@@ -167,6 +185,15 @@
167
185
  "schema" : {
168
186
  "type" : "boolean"
169
187
  }
188
+ }, {
189
+ "description" : "Filter by provider source.",
190
+ "in" : "query",
191
+ "name" : "providerSource",
192
+ "required" : false,
193
+ "schema" : {
194
+ "enum" : [ "EXTERNAL", "INTERNAL" ],
195
+ "type" : "string"
196
+ }
170
197
  } ],
171
198
  "responses" : {
172
199
  "200" : {
@@ -5698,6 +5725,16 @@
5698
5725
  },
5699
5726
  "components" : {
5700
5727
  "parameters" : {
5728
+ "providerSource" : {
5729
+ "description" : "Filter by provider source.",
5730
+ "in" : "query",
5731
+ "name" : "providerSource",
5732
+ "required" : false,
5733
+ "schema" : {
5734
+ "enum" : [ "EXTERNAL", "INTERNAL" ],
5735
+ "type" : "string"
5736
+ }
5737
+ },
5701
5738
  "agentIdPath" : {
5702
5739
  "description" : "ID of the agent",
5703
5740
  "in" : "path",
@@ -6243,6 +6280,9 @@
6243
6280
  "role" : {
6244
6281
  "type" : "string"
6245
6282
  },
6283
+ "roleDetails" : {
6284
+ "$ref" : "#/components/schemas/Agent_roleDetails"
6285
+ },
6246
6286
  "defaultLanguage" : {
6247
6287
  "type" : "string"
6248
6288
  },
@@ -9020,6 +9060,23 @@
9020
9060
  },
9021
9061
  "type" : "object"
9022
9062
  },
9063
+ "Agent_roleDetails" : {
9064
+ "properties" : {
9065
+ "id" : {
9066
+ "type" : "string"
9067
+ },
9068
+ "name" : {
9069
+ "type" : "string"
9070
+ },
9071
+ "description" : {
9072
+ "type" : "string"
9073
+ },
9074
+ "color" : {
9075
+ "type" : "string"
9076
+ }
9077
+ },
9078
+ "type" : "object"
9079
+ },
9023
9080
  "Agent_creator_user" : {
9024
9081
  "properties" : {
9025
9082
  "name" : {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@breign/client",
3
- "version": "1.0.39",
3
+ "version": "1.0.41",
4
4
  "main": "dist/index.js",
5
5
  "exports": {
6
6
  ".": "./dist/index.js",