@breign/client 1.0.8 → 1.0.10

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.
@@ -70,6 +70,9 @@ export interface GetFlowsRequest {
70
70
  export interface GetModulesRequest {
71
71
  agentId: string;
72
72
  }
73
+ export interface ListOrganizationAgentsRequest {
74
+ organizationId: string;
75
+ }
73
76
  export interface RemoveAgentProfileImageRequest {
74
77
  agentId: string;
75
78
  }
@@ -259,6 +262,14 @@ export declare class AgentApi extends runtime.BaseAPI {
259
262
  * Get agent modules
260
263
  */
261
264
  getModules(agentId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AgentModuleUio>;
265
+ /**
266
+ * List agents for an organization
267
+ */
268
+ listOrganizationAgentsRaw(requestParameters: ListOrganizationAgentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<AgentUio>>>;
269
+ /**
270
+ * List agents for an organization
271
+ */
272
+ listOrganizationAgents(organizationId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<AgentUio>>;
262
273
  /**
263
274
  * Removes the profile image for an agent
264
275
  * Remove agent profile image
@@ -559,6 +559,33 @@ class AgentApi extends runtime.BaseAPI {
559
559
  const response = await this.getModulesRaw({ agentId: agentId }, initOverrides);
560
560
  return await response.value();
561
561
  }
562
+ /**
563
+ * List agents for an organization
564
+ */
565
+ async listOrganizationAgentsRaw(requestParameters, initOverrides) {
566
+ if (requestParameters['organizationId'] == null) {
567
+ throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling listOrganizationAgents().');
568
+ }
569
+ const queryParameters = {};
570
+ const headerParameters = {};
571
+ if (this.configuration && this.configuration.apiKey) {
572
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
573
+ }
574
+ const response = await this.request({
575
+ path: `/organizations/{organizationId}/agents`.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId']))),
576
+ method: 'GET',
577
+ headers: headerParameters,
578
+ query: queryParameters,
579
+ }, initOverrides);
580
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.AgentUioFromJSON));
581
+ }
582
+ /**
583
+ * List agents for an organization
584
+ */
585
+ async listOrganizationAgents(organizationId, initOverrides) {
586
+ const response = await this.listOrganizationAgentsRaw({ organizationId: organizationId }, initOverrides);
587
+ return await response.value();
588
+ }
562
589
  /**
563
590
  * Removes the profile image for an agent
564
591
  * Remove agent profile image
@@ -30,10 +30,12 @@ export interface AgentModuleUio {
30
30
  name: string;
31
31
  /**
32
32
  *
33
- * @type {object}
33
+ * @type {{ [key: string]: any; }}
34
34
  * @memberof AgentModuleUio
35
35
  */
36
- _configuration: object;
36
+ _configuration: {
37
+ [key: string]: any;
38
+ };
37
39
  /**
38
40
  *
39
41
  * @type {boolean}
package/dist/openapi.json CHANGED
@@ -148,6 +148,49 @@
148
148
  "tags" : [ "agent" ]
149
149
  }
150
150
  },
151
+ "/organizations/{organizationId}/agents" : {
152
+ "get" : {
153
+ "operationId" : "listOrganizationAgents",
154
+ "parameters" : [ {
155
+ "description" : "Organization ID",
156
+ "in" : "path",
157
+ "name" : "organizationId",
158
+ "required" : true,
159
+ "schema" : {
160
+ "type" : "string"
161
+ }
162
+ } ],
163
+ "responses" : {
164
+ "200" : {
165
+ "content" : {
166
+ "application/json" : {
167
+ "schema" : {
168
+ "items" : {
169
+ "$ref" : "#/components/schemas/Agent"
170
+ },
171
+ "type" : "array"
172
+ }
173
+ }
174
+ },
175
+ "description" : "Agents of the specified organization"
176
+ },
177
+ "401" : {
178
+ "description" : "Unauthorized"
179
+ },
180
+ "403" : {
181
+ "description" : "Forbidden - user is not a member of the organization"
182
+ },
183
+ "404" : {
184
+ "description" : "Organization not found"
185
+ }
186
+ },
187
+ "security" : [ {
188
+ "bearerAuth" : [ ]
189
+ } ],
190
+ "summary" : "List agents for an organization",
191
+ "tags" : [ "agent" ]
192
+ }
193
+ },
151
194
  "/agents/{agentId}" : {
152
195
  "delete" : {
153
196
  "description" : "Deletes an agent and all its associated flows",
@@ -5612,6 +5655,7 @@
5612
5655
  "type" : "string"
5613
5656
  },
5614
5657
  "configuration" : {
5658
+ "additionalProperties" : true,
5615
5659
  "type" : "object"
5616
5660
  },
5617
5661
  "restricted" : {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@breign/client",
3
- "version": "1.0.8",
3
+ "version": "1.0.10",
4
4
  "main": "dist/index.js",
5
5
  "exports": {
6
6
  ".": "./dist/index.js",