@breign/client 1.0.32 → 1.0.33

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.
@@ -72,6 +72,7 @@ export interface GetModulesRequest {
72
72
  }
73
73
  export interface ListOrganizationAgentsRequest {
74
74
  organizationId: string;
75
+ isCreator?: boolean;
75
76
  }
76
77
  export interface RemoveAgentProfileImageRequest {
77
78
  agentId: string;
@@ -269,7 +270,7 @@ export declare class AgentApi extends runtime.BaseAPI {
269
270
  /**
270
271
  * List agents for an organization
271
272
  */
272
- listOrganizationAgents(organizationId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<AgentUio>>;
273
+ listOrganizationAgents(organizationId: string, isCreator?: boolean, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<AgentUio>>;
273
274
  /**
274
275
  * Removes the profile image for an agent
275
276
  * Remove agent profile image
@@ -567,6 +567,9 @@ class AgentApi extends runtime.BaseAPI {
567
567
  throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling listOrganizationAgents().');
568
568
  }
569
569
  const queryParameters = {};
570
+ if (requestParameters['isCreator'] != null) {
571
+ queryParameters['isCreator'] = requestParameters['isCreator'];
572
+ }
570
573
  const headerParameters = {};
571
574
  if (this.configuration && this.configuration.apiKey) {
572
575
  headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
@@ -582,8 +585,8 @@ class AgentApi extends runtime.BaseAPI {
582
585
  /**
583
586
  * List agents for an organization
584
587
  */
585
- async listOrganizationAgents(organizationId, initOverrides) {
586
- const response = await this.listOrganizationAgentsRaw({ organizationId: organizationId }, initOverrides);
588
+ async listOrganizationAgents(organizationId, isCreator, initOverrides) {
589
+ const response = await this.listOrganizationAgentsRaw({ organizationId: organizationId, isCreator: isCreator }, initOverrides);
587
590
  return await response.value();
588
591
  }
589
592
  /**
@@ -10,10 +10,13 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { OrganizationUio } from '../models/index';
13
+ import type { OrganizationUio, RoleUio } from '../models/index';
14
14
  export interface GetOrganizationByIdRequest {
15
15
  organizationId: string;
16
16
  }
17
+ export interface ListOrganizationRolesRequest {
18
+ organizationId: string;
19
+ }
17
20
  /**
18
21
  *
19
22
  */
@@ -28,4 +31,14 @@ export declare class OrganizationsApi extends runtime.BaseAPI {
28
31
  * Get an organization by ID
29
32
  */
30
33
  getOrganizationById(organizationId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OrganizationUio>;
34
+ /**
35
+ * Retrieves all roles configured for the given organization
36
+ * List roles of an organization
37
+ */
38
+ listOrganizationRolesRaw(requestParameters: ListOrganizationRolesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<RoleUio>>>;
39
+ /**
40
+ * Retrieves all roles configured for the given organization
41
+ * List roles of an organization
42
+ */
43
+ listOrganizationRoles(organizationId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<RoleUio>>;
31
44
  }
@@ -82,5 +82,34 @@ class OrganizationsApi extends runtime.BaseAPI {
82
82
  const response = await this.getOrganizationByIdRaw({ organizationId: organizationId }, initOverrides);
83
83
  return await response.value();
84
84
  }
85
+ /**
86
+ * Retrieves all roles configured for the given organization
87
+ * List roles of an organization
88
+ */
89
+ async listOrganizationRolesRaw(requestParameters, initOverrides) {
90
+ if (requestParameters['organizationId'] == null) {
91
+ throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling listOrganizationRoles().');
92
+ }
93
+ const queryParameters = {};
94
+ const headerParameters = {};
95
+ if (this.configuration && this.configuration.apiKey) {
96
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
97
+ }
98
+ const response = await this.request({
99
+ path: `/organizations/{organizationId}/roles`.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId']))),
100
+ method: 'GET',
101
+ headers: headerParameters,
102
+ query: queryParameters,
103
+ }, initOverrides);
104
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.RoleUioFromJSON));
105
+ }
106
+ /**
107
+ * Retrieves all roles configured for the given organization
108
+ * List roles of an organization
109
+ */
110
+ async listOrganizationRoles(organizationId, initOverrides) {
111
+ const response = await this.listOrganizationRolesRaw({ organizationId: organizationId }, initOverrides);
112
+ return await response.value();
113
+ }
85
114
  }
86
115
  exports.OrganizationsApi = OrganizationsApi;
@@ -0,0 +1,62 @@
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 RoleUio
16
+ */
17
+ export interface RoleUio {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof RoleUio
22
+ */
23
+ id: string;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof RoleUio
28
+ */
29
+ organizationId: string;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof RoleUio
34
+ */
35
+ name: string;
36
+ /**
37
+ *
38
+ * @type {string}
39
+ * @memberof RoleUio
40
+ */
41
+ color: string;
42
+ /**
43
+ *
44
+ * @type {string}
45
+ * @memberof RoleUio
46
+ */
47
+ description?: string;
48
+ /**
49
+ *
50
+ * @type {string}
51
+ * @memberof RoleUio
52
+ */
53
+ createdAt: string;
54
+ }
55
+ /**
56
+ * Check if a given object implements the RoleUio interface.
57
+ */
58
+ export declare function instanceOfRoleUio(value: object): value is RoleUio;
59
+ export declare function RoleUioFromJSON(json: any): RoleUio;
60
+ export declare function RoleUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): RoleUio;
61
+ export declare function RoleUioToJSON(json: any): RoleUio;
62
+ export declare function RoleUioToJSONTyped(value?: RoleUio | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,68 @@
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.instanceOfRoleUio = instanceOfRoleUio;
17
+ exports.RoleUioFromJSON = RoleUioFromJSON;
18
+ exports.RoleUioFromJSONTyped = RoleUioFromJSONTyped;
19
+ exports.RoleUioToJSON = RoleUioToJSON;
20
+ exports.RoleUioToJSONTyped = RoleUioToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the RoleUio interface.
23
+ */
24
+ function instanceOfRoleUio(value) {
25
+ if (!('id' in value) || value['id'] === undefined)
26
+ return false;
27
+ if (!('organizationId' in value) || value['organizationId'] === undefined)
28
+ return false;
29
+ if (!('name' in value) || value['name'] === undefined)
30
+ return false;
31
+ if (!('color' in value) || value['color'] === undefined)
32
+ return false;
33
+ if (!('createdAt' in value) || value['createdAt'] === undefined)
34
+ return false;
35
+ return true;
36
+ }
37
+ function RoleUioFromJSON(json) {
38
+ return RoleUioFromJSONTyped(json, false);
39
+ }
40
+ function RoleUioFromJSONTyped(json, ignoreDiscriminator) {
41
+ if (json == null) {
42
+ return json;
43
+ }
44
+ return {
45
+ 'id': json['id'],
46
+ 'organizationId': json['organizationId'],
47
+ 'name': json['name'],
48
+ 'color': json['color'],
49
+ 'description': json['description'] == null ? undefined : json['description'],
50
+ 'createdAt': json['createdAt'],
51
+ };
52
+ }
53
+ function RoleUioToJSON(json) {
54
+ return RoleUioToJSONTyped(json, false);
55
+ }
56
+ function RoleUioToJSONTyped(value, ignoreDiscriminator = false) {
57
+ if (value == null) {
58
+ return value;
59
+ }
60
+ return {
61
+ 'id': value['id'],
62
+ 'organizationId': value['organizationId'],
63
+ 'name': value['name'],
64
+ 'color': value['color'],
65
+ 'description': value['description'],
66
+ 'createdAt': value['createdAt'],
67
+ };
68
+ }
@@ -147,6 +147,7 @@ export * from './ProviderUio';
147
147
  export * from './ProviderValiationRequestUio';
148
148
  export * from './RevealTokenRequestUio';
149
149
  export * from './RevealTokenResponseUio';
150
+ export * from './RoleUio';
150
151
  export * from './S3UploadBodyUio';
151
152
  export * from './STTResponseUio';
152
153
  export * from './SetTokenRequestUio';
@@ -165,6 +165,7 @@ __exportStar(require("./ProviderUio"), exports);
165
165
  __exportStar(require("./ProviderValiationRequestUio"), exports);
166
166
  __exportStar(require("./RevealTokenRequestUio"), exports);
167
167
  __exportStar(require("./RevealTokenResponseUio"), exports);
168
+ __exportStar(require("./RoleUio"), exports);
168
169
  __exportStar(require("./S3UploadBodyUio"), exports);
169
170
  __exportStar(require("./STTResponseUio"), exports);
170
171
  __exportStar(require("./SetTokenRequestUio"), exports);
package/dist/openapi.json CHANGED
@@ -159,6 +159,14 @@
159
159
  "schema" : {
160
160
  "type" : "string"
161
161
  }
162
+ }, {
163
+ "description" : "If true, only returns agents created by the authenticated user.\n",
164
+ "in" : "query",
165
+ "name" : "isCreator",
166
+ "required" : false,
167
+ "schema" : {
168
+ "type" : "boolean"
169
+ }
162
170
  } ],
163
171
  "responses" : {
164
172
  "200" : {
@@ -3900,6 +3908,50 @@
3900
3908
  "tags" : [ "organizations" ]
3901
3909
  }
3902
3910
  },
3911
+ "/organizations/{organizationId}/roles" : {
3912
+ "get" : {
3913
+ "description" : "Retrieves all roles configured for the given organization",
3914
+ "operationId" : "listOrganizationRoles",
3915
+ "parameters" : [ {
3916
+ "description" : "ID of the organization",
3917
+ "in" : "path",
3918
+ "name" : "organizationId",
3919
+ "required" : true,
3920
+ "schema" : {
3921
+ "type" : "string"
3922
+ }
3923
+ } ],
3924
+ "responses" : {
3925
+ "200" : {
3926
+ "content" : {
3927
+ "application/json" : {
3928
+ "schema" : {
3929
+ "items" : {
3930
+ "$ref" : "#/components/schemas/Role"
3931
+ },
3932
+ "type" : "array"
3933
+ }
3934
+ }
3935
+ },
3936
+ "description" : "Roles found"
3937
+ },
3938
+ "401" : {
3939
+ "description" : "Unauthorized"
3940
+ },
3941
+ "403" : {
3942
+ "description" : "Forbidden - User doesn't have permission"
3943
+ },
3944
+ "404" : {
3945
+ "description" : "Organization not found"
3946
+ },
3947
+ "500" : {
3948
+ "description" : "Server error"
3949
+ }
3950
+ },
3951
+ "summary" : "List roles of an organization",
3952
+ "tags" : [ "organizations" ]
3953
+ }
3954
+ },
3903
3955
  "/manifests" : {
3904
3956
  "get" : {
3905
3957
  "description" : "Retrieves manifests, filtered by user ID for non-admin users",
@@ -8179,6 +8231,30 @@
8179
8231
  "required" : [ "id", "name" ],
8180
8232
  "type" : "object"
8181
8233
  },
8234
+ "Role" : {
8235
+ "properties" : {
8236
+ "id" : {
8237
+ "type" : "string"
8238
+ },
8239
+ "organizationId" : {
8240
+ "type" : "string"
8241
+ },
8242
+ "name" : {
8243
+ "type" : "string"
8244
+ },
8245
+ "color" : {
8246
+ "type" : "string"
8247
+ },
8248
+ "description" : {
8249
+ "type" : "string"
8250
+ },
8251
+ "createdAt" : {
8252
+ "type" : "string"
8253
+ }
8254
+ },
8255
+ "required" : [ "color", "createdAt", "id", "name", "organizationId" ],
8256
+ "type" : "object"
8257
+ },
8182
8258
  "Manifest" : {
8183
8259
  "additionalProperties" : true,
8184
8260
  "properties" : {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@breign/client",
3
- "version": "1.0.32",
3
+ "version": "1.0.33",
4
4
  "main": "dist/index.js",
5
5
  "exports": {
6
6
  ".": "./dist/index.js",