@breign/client 1.0.103 → 1.0.105

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.
@@ -28,6 +28,11 @@ export interface GetScheduledTaskRunRequest {
28
28
  taskId: string;
29
29
  runId: string;
30
30
  }
31
+ export interface ListAgentScheduledTaskRunsRequest {
32
+ agentId: string;
33
+ from: Date;
34
+ to: Date;
35
+ }
31
36
  export interface ListScheduledTaskRunsRequest {
32
37
  agentId: string;
33
38
  taskId: string;
@@ -91,6 +96,14 @@ export declare class ScheduledTasksApi extends runtime.BaseAPI {
91
96
  * Get a specific scheduled task run by ID
92
97
  */
93
98
  getScheduledTaskRun(agentId: string, taskId: string, runId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ScheduledTaskRunUio>;
99
+ /**
100
+ * List all runs for an agent\'s scheduled tasks within a date range
101
+ */
102
+ listAgentScheduledTaskRunsRaw(requestParameters: ListAgentScheduledTaskRunsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ScheduledTaskRunListUio>>;
103
+ /**
104
+ * List all runs for an agent\'s scheduled tasks within a date range
105
+ */
106
+ listAgentScheduledTaskRuns(agentId: string, from: Date, to: Date, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ScheduledTaskRunListUio>;
94
107
  /**
95
108
  * List runs for a scheduled task
96
109
  */
@@ -177,6 +177,45 @@ class ScheduledTasksApi extends runtime.BaseAPI {
177
177
  const response = await this.getScheduledTaskRunRaw({ agentId: agentId, taskId: taskId, runId: runId }, initOverrides);
178
178
  return await response.value();
179
179
  }
180
+ /**
181
+ * List all runs for an agent\'s scheduled tasks within a date range
182
+ */
183
+ async listAgentScheduledTaskRunsRaw(requestParameters, initOverrides) {
184
+ if (requestParameters['agentId'] == null) {
185
+ throw new runtime.RequiredError('agentId', 'Required parameter "agentId" was null or undefined when calling listAgentScheduledTaskRuns().');
186
+ }
187
+ if (requestParameters['from'] == null) {
188
+ throw new runtime.RequiredError('from', 'Required parameter "from" was null or undefined when calling listAgentScheduledTaskRuns().');
189
+ }
190
+ if (requestParameters['to'] == null) {
191
+ throw new runtime.RequiredError('to', 'Required parameter "to" was null or undefined when calling listAgentScheduledTaskRuns().');
192
+ }
193
+ const queryParameters = {};
194
+ if (requestParameters['from'] != null) {
195
+ queryParameters['from'] = requestParameters['from'].toISOString();
196
+ }
197
+ if (requestParameters['to'] != null) {
198
+ queryParameters['to'] = requestParameters['to'].toISOString();
199
+ }
200
+ const headerParameters = {};
201
+ if (this.configuration && this.configuration.apiKey) {
202
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
203
+ }
204
+ const response = await this.request({
205
+ path: `/agents/{agentId}/scheduled-tasks/runs`.replace(`{${"agentId"}}`, encodeURIComponent(String(requestParameters['agentId']))),
206
+ method: 'GET',
207
+ headers: headerParameters,
208
+ query: queryParameters,
209
+ }, initOverrides);
210
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ScheduledTaskRunListUioFromJSON)(jsonValue));
211
+ }
212
+ /**
213
+ * List all runs for an agent\'s scheduled tasks within a date range
214
+ */
215
+ async listAgentScheduledTaskRuns(agentId, from, to, initOverrides) {
216
+ const response = await this.listAgentScheduledTaskRunsRaw({ agentId: agentId, from: from, to: to }, initOverrides);
217
+ return await response.value();
218
+ }
180
219
  /**
181
220
  * List runs for a scheduled task
182
221
  */
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { AgentToolUio, ConnectOAuth2Tool200ResponseUio, IntrospectMcpTool200ResponseUio, RevealTokenRequestUio, RevealTokenResponseUio, STTResponseUio, SetTokenRequestUio, SetupToolRequestUio, TTSRequestUio, TTSResponseUio, ToolCreateRequestUio, ToolSecureUio, ToolUpdateRequestUio } from '../models/index';
13
+ import type { AgentToolUio, ConnectOAuth2Tool200ResponseUio, IntrospectMcpTool200ResponseUio, RevealTokenRequestUio, RevealTokenResponseUio, STTResponseUio, SetTokenRequestUio, SetupToolRequestUio, TTSRequestUio, TTSResponseUio, ToolAllowedToolsRequestUio, ToolAllowedToolsResponseUio, ToolConnectionStatusResponseUio, ToolCreateRequestUio, ToolSecureUio, ToolUpdateRequestUio } from '../models/index';
14
14
  export interface ConnectOAuth2ToolRequest {
15
15
  toolId: string;
16
16
  }
@@ -33,6 +33,9 @@ export interface DeleteToolRequest {
33
33
  export interface DisconnectOAuth2ToolRequest {
34
34
  toolId: string;
35
35
  }
36
+ export interface GetToolConnectionStatusRequest {
37
+ toolId: string;
38
+ }
36
39
  export interface GetToolSecureRequest {
37
40
  toolId: string;
38
41
  }
@@ -58,6 +61,10 @@ export interface SetupToolRequest {
58
61
  toolId: string;
59
62
  setupToolRequestUio?: SetupToolRequestUio;
60
63
  }
64
+ export interface UpdateMcpAllowedToolsRequest {
65
+ toolId: string;
66
+ toolAllowedToolsRequestUio: ToolAllowedToolsRequestUio;
67
+ }
61
68
  export interface UpdateToolRequest {
62
69
  toolId: string;
63
70
  toolUpdateRequestUio: ToolUpdateRequestUio;
@@ -122,6 +129,16 @@ export declare class ToolsApi extends runtime.BaseAPI {
122
129
  * Disconnect OAuth2 from a tool
123
130
  */
124
131
  disconnectOAuth2Tool(toolId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
132
+ /**
133
+ * For organization-scoped tools, returns whether the shared connection is set up. For user-scoped tools, returns whether the caller has connected their own account.
134
+ * Get the current user\'s connection status for a tool
135
+ */
136
+ getToolConnectionStatusRaw(requestParameters: GetToolConnectionStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ToolConnectionStatusResponseUio>>;
137
+ /**
138
+ * For organization-scoped tools, returns whether the shared connection is set up. For user-scoped tools, returns whether the caller has connected their own account.
139
+ * Get the current user\'s connection status for a tool
140
+ */
141
+ getToolConnectionStatus(toolId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ToolConnectionStatusResponseUio>;
125
142
  /**
126
143
  * Get a specific tool (UI-safe)
127
144
  */
@@ -174,6 +191,16 @@ export declare class ToolsApi extends runtime.BaseAPI {
174
191
  * Complete the setup of a tool (oauth2 configuration)
175
192
  */
176
193
  setupTool(toolId: string, setupToolRequestUio?: SetupToolRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
194
+ /**
195
+ * Admins can adjust the catalog of MCP actions exposed to agents at any time. Each name must exist in the tool\'s introspection result.
196
+ * Replace the list of allowed MCP tools for an MCP tool
197
+ */
198
+ updateMcpAllowedToolsRaw(requestParameters: UpdateMcpAllowedToolsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ToolAllowedToolsResponseUio>>;
199
+ /**
200
+ * Admins can adjust the catalog of MCP actions exposed to agents at any time. Each name must exist in the tool\'s introspection result.
201
+ * Replace the list of allowed MCP tools for an MCP tool
202
+ */
203
+ updateMcpAllowedTools(toolId: string, toolAllowedToolsRequestUio: ToolAllowedToolsRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ToolAllowedToolsResponseUio>;
177
204
  /**
178
205
  * Update a tool
179
206
  */
@@ -239,6 +239,35 @@ class ToolsApi extends runtime.BaseAPI {
239
239
  async disconnectOAuth2Tool(toolId, initOverrides) {
240
240
  await this.disconnectOAuth2ToolRaw({ toolId: toolId }, initOverrides);
241
241
  }
242
+ /**
243
+ * For organization-scoped tools, returns whether the shared connection is set up. For user-scoped tools, returns whether the caller has connected their own account.
244
+ * Get the current user\'s connection status for a tool
245
+ */
246
+ async getToolConnectionStatusRaw(requestParameters, initOverrides) {
247
+ if (requestParameters['toolId'] == null) {
248
+ throw new runtime.RequiredError('toolId', 'Required parameter "toolId" was null or undefined when calling getToolConnectionStatus().');
249
+ }
250
+ const queryParameters = {};
251
+ const headerParameters = {};
252
+ if (this.configuration && this.configuration.apiKey) {
253
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
254
+ }
255
+ const response = await this.request({
256
+ path: `/tools/{toolId}/connection-status`.replace(`{${"toolId"}}`, encodeURIComponent(String(requestParameters['toolId']))),
257
+ method: 'GET',
258
+ headers: headerParameters,
259
+ query: queryParameters,
260
+ }, initOverrides);
261
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ToolConnectionStatusResponseUioFromJSON)(jsonValue));
262
+ }
263
+ /**
264
+ * For organization-scoped tools, returns whether the shared connection is set up. For user-scoped tools, returns whether the caller has connected their own account.
265
+ * Get the current user\'s connection status for a tool
266
+ */
267
+ async getToolConnectionStatus(toolId, initOverrides) {
268
+ const response = await this.getToolConnectionStatusRaw({ toolId: toolId }, initOverrides);
269
+ return await response.value();
270
+ }
242
271
  /**
243
272
  * Get a specific tool (UI-safe)
244
273
  */
@@ -430,6 +459,40 @@ class ToolsApi extends runtime.BaseAPI {
430
459
  async setupTool(toolId, setupToolRequestUio, initOverrides) {
431
460
  await this.setupToolRaw({ toolId: toolId, setupToolRequestUio: setupToolRequestUio }, initOverrides);
432
461
  }
462
+ /**
463
+ * Admins can adjust the catalog of MCP actions exposed to agents at any time. Each name must exist in the tool\'s introspection result.
464
+ * Replace the list of allowed MCP tools for an MCP tool
465
+ */
466
+ async updateMcpAllowedToolsRaw(requestParameters, initOverrides) {
467
+ if (requestParameters['toolId'] == null) {
468
+ throw new runtime.RequiredError('toolId', 'Required parameter "toolId" was null or undefined when calling updateMcpAllowedTools().');
469
+ }
470
+ if (requestParameters['toolAllowedToolsRequestUio'] == null) {
471
+ throw new runtime.RequiredError('toolAllowedToolsRequestUio', 'Required parameter "toolAllowedToolsRequestUio" was null or undefined when calling updateMcpAllowedTools().');
472
+ }
473
+ const queryParameters = {};
474
+ const headerParameters = {};
475
+ headerParameters['Content-Type'] = 'application/json';
476
+ if (this.configuration && this.configuration.apiKey) {
477
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
478
+ }
479
+ const response = await this.request({
480
+ path: `/tools/{toolId}/mcp/allowed-tools`.replace(`{${"toolId"}}`, encodeURIComponent(String(requestParameters['toolId']))),
481
+ method: 'PUT',
482
+ headers: headerParameters,
483
+ query: queryParameters,
484
+ body: (0, index_1.ToolAllowedToolsRequestUioToJSON)(requestParameters['toolAllowedToolsRequestUio']),
485
+ }, initOverrides);
486
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ToolAllowedToolsResponseUioFromJSON)(jsonValue));
487
+ }
488
+ /**
489
+ * Admins can adjust the catalog of MCP actions exposed to agents at any time. Each name must exist in the tool\'s introspection result.
490
+ * Replace the list of allowed MCP tools for an MCP tool
491
+ */
492
+ async updateMcpAllowedTools(toolId, toolAllowedToolsRequestUio, initOverrides) {
493
+ const response = await this.updateMcpAllowedToolsRaw({ toolId: toolId, toolAllowedToolsRequestUio: toolAllowedToolsRequestUio }, initOverrides);
494
+ return await response.value();
495
+ }
433
496
  /**
434
497
  * Update a tool
435
498
  */
@@ -45,6 +45,12 @@ export interface AgentToolUio {
45
45
  * @memberof AgentToolUio
46
46
  */
47
47
  description: string;
48
+ /**
49
+ * Credentials scope. Defaults to organization for legacy tools.
50
+ * @type {string}
51
+ * @memberof AgentToolUio
52
+ */
53
+ scope?: AgentToolUioScopeEnum;
48
54
  /**
49
55
  *
50
56
  * @type {{ [key: string]: any; }}
@@ -82,6 +88,14 @@ export interface AgentToolUio {
82
88
  */
83
89
  isSetup?: boolean;
84
90
  }
91
+ /**
92
+ * @export
93
+ */
94
+ export declare const AgentToolUioScopeEnum: {
95
+ readonly Organization: "organization";
96
+ readonly User: "user";
97
+ };
98
+ export type AgentToolUioScopeEnum = typeof AgentToolUioScopeEnum[keyof typeof AgentToolUioScopeEnum];
85
99
  /**
86
100
  * Check if a given object implements the AgentToolUio interface.
87
101
  */
@@ -13,11 +13,19 @@
13
13
  * Do not edit the class manually.
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.AgentToolUioScopeEnum = void 0;
16
17
  exports.instanceOfAgentToolUio = instanceOfAgentToolUio;
17
18
  exports.AgentToolUioFromJSON = AgentToolUioFromJSON;
18
19
  exports.AgentToolUioFromJSONTyped = AgentToolUioFromJSONTyped;
19
20
  exports.AgentToolUioToJSON = AgentToolUioToJSON;
20
21
  exports.AgentToolUioToJSONTyped = AgentToolUioToJSONTyped;
22
+ /**
23
+ * @export
24
+ */
25
+ exports.AgentToolUioScopeEnum = {
26
+ Organization: 'organization',
27
+ User: 'user'
28
+ };
21
29
  /**
22
30
  * Check if a given object implements the AgentToolUio interface.
23
31
  */
@@ -47,6 +55,7 @@ function AgentToolUioFromJSONTyped(json, ignoreDiscriminator) {
47
55
  'type': json['type'],
48
56
  'orgId': json['orgId'],
49
57
  'description': json['description'],
58
+ 'scope': json['scope'] == null ? undefined : json['scope'],
50
59
  'configuration': json['configuration'] == null ? undefined : json['configuration'],
51
60
  'manifest': json['manifest'] == null ? undefined : json['manifest'],
52
61
  'mcp': json['mcp'] == null ? undefined : json['mcp'],
@@ -67,6 +76,7 @@ function AgentToolUioToJSONTyped(value, ignoreDiscriminator = false) {
67
76
  'type': value['type'],
68
77
  'orgId': value['orgId'],
69
78
  'description': value['description'],
79
+ 'scope': value['scope'],
70
80
  'configuration': value['configuration'],
71
81
  'manifest': value['manifest'],
72
82
  'mcp': value['mcp'],
@@ -0,0 +1,32 @@
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 ToolAllowedToolsRequestUio
16
+ */
17
+ export interface ToolAllowedToolsRequestUio {
18
+ /**
19
+ *
20
+ * @type {Set<string>}
21
+ * @memberof ToolAllowedToolsRequestUio
22
+ */
23
+ allowedTools: Set<string>;
24
+ }
25
+ /**
26
+ * Check if a given object implements the ToolAllowedToolsRequestUio interface.
27
+ */
28
+ export declare function instanceOfToolAllowedToolsRequestUio(value: object): value is ToolAllowedToolsRequestUio;
29
+ export declare function ToolAllowedToolsRequestUioFromJSON(json: any): ToolAllowedToolsRequestUio;
30
+ export declare function ToolAllowedToolsRequestUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): ToolAllowedToolsRequestUio;
31
+ export declare function ToolAllowedToolsRequestUioToJSON(json: any): ToolAllowedToolsRequestUio;
32
+ export declare function ToolAllowedToolsRequestUioToJSONTyped(value?: ToolAllowedToolsRequestUio | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,50 @@
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.instanceOfToolAllowedToolsRequestUio = instanceOfToolAllowedToolsRequestUio;
17
+ exports.ToolAllowedToolsRequestUioFromJSON = ToolAllowedToolsRequestUioFromJSON;
18
+ exports.ToolAllowedToolsRequestUioFromJSONTyped = ToolAllowedToolsRequestUioFromJSONTyped;
19
+ exports.ToolAllowedToolsRequestUioToJSON = ToolAllowedToolsRequestUioToJSON;
20
+ exports.ToolAllowedToolsRequestUioToJSONTyped = ToolAllowedToolsRequestUioToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the ToolAllowedToolsRequestUio interface.
23
+ */
24
+ function instanceOfToolAllowedToolsRequestUio(value) {
25
+ if (!('allowedTools' in value) || value['allowedTools'] === undefined)
26
+ return false;
27
+ return true;
28
+ }
29
+ function ToolAllowedToolsRequestUioFromJSON(json) {
30
+ return ToolAllowedToolsRequestUioFromJSONTyped(json, false);
31
+ }
32
+ function ToolAllowedToolsRequestUioFromJSONTyped(json, ignoreDiscriminator) {
33
+ if (json == null) {
34
+ return json;
35
+ }
36
+ return {
37
+ 'allowedTools': new Set(json['allowedTools']),
38
+ };
39
+ }
40
+ function ToolAllowedToolsRequestUioToJSON(json) {
41
+ return ToolAllowedToolsRequestUioToJSONTyped(json, false);
42
+ }
43
+ function ToolAllowedToolsRequestUioToJSONTyped(value, ignoreDiscriminator = false) {
44
+ if (value == null) {
45
+ return value;
46
+ }
47
+ return {
48
+ 'allowedTools': Array.from(value['allowedTools']),
49
+ };
50
+ }
@@ -0,0 +1,32 @@
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 ToolAllowedToolsResponseUio
16
+ */
17
+ export interface ToolAllowedToolsResponseUio {
18
+ /**
19
+ *
20
+ * @type {Array<string>}
21
+ * @memberof ToolAllowedToolsResponseUio
22
+ */
23
+ allowedTools: Array<string>;
24
+ }
25
+ /**
26
+ * Check if a given object implements the ToolAllowedToolsResponseUio interface.
27
+ */
28
+ export declare function instanceOfToolAllowedToolsResponseUio(value: object): value is ToolAllowedToolsResponseUio;
29
+ export declare function ToolAllowedToolsResponseUioFromJSON(json: any): ToolAllowedToolsResponseUio;
30
+ export declare function ToolAllowedToolsResponseUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): ToolAllowedToolsResponseUio;
31
+ export declare function ToolAllowedToolsResponseUioToJSON(json: any): ToolAllowedToolsResponseUio;
32
+ export declare function ToolAllowedToolsResponseUioToJSONTyped(value?: ToolAllowedToolsResponseUio | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,50 @@
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.instanceOfToolAllowedToolsResponseUio = instanceOfToolAllowedToolsResponseUio;
17
+ exports.ToolAllowedToolsResponseUioFromJSON = ToolAllowedToolsResponseUioFromJSON;
18
+ exports.ToolAllowedToolsResponseUioFromJSONTyped = ToolAllowedToolsResponseUioFromJSONTyped;
19
+ exports.ToolAllowedToolsResponseUioToJSON = ToolAllowedToolsResponseUioToJSON;
20
+ exports.ToolAllowedToolsResponseUioToJSONTyped = ToolAllowedToolsResponseUioToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the ToolAllowedToolsResponseUio interface.
23
+ */
24
+ function instanceOfToolAllowedToolsResponseUio(value) {
25
+ if (!('allowedTools' in value) || value['allowedTools'] === undefined)
26
+ return false;
27
+ return true;
28
+ }
29
+ function ToolAllowedToolsResponseUioFromJSON(json) {
30
+ return ToolAllowedToolsResponseUioFromJSONTyped(json, false);
31
+ }
32
+ function ToolAllowedToolsResponseUioFromJSONTyped(json, ignoreDiscriminator) {
33
+ if (json == null) {
34
+ return json;
35
+ }
36
+ return {
37
+ 'allowedTools': json['allowedTools'],
38
+ };
39
+ }
40
+ function ToolAllowedToolsResponseUioToJSON(json) {
41
+ return ToolAllowedToolsResponseUioToJSONTyped(json, false);
42
+ }
43
+ function ToolAllowedToolsResponseUioToJSONTyped(value, ignoreDiscriminator = false) {
44
+ if (value == null) {
45
+ return value;
46
+ }
47
+ return {
48
+ 'allowedTools': value['allowedTools'],
49
+ };
50
+ }
@@ -0,0 +1,46 @@
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 ToolConnectionStatusResponseUio
16
+ */
17
+ export interface ToolConnectionStatusResponseUio {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof ToolConnectionStatusResponseUio
22
+ */
23
+ scope: ToolConnectionStatusResponseUioScopeEnum;
24
+ /**
25
+ *
26
+ * @type {boolean}
27
+ * @memberof ToolConnectionStatusResponseUio
28
+ */
29
+ connected: boolean;
30
+ }
31
+ /**
32
+ * @export
33
+ */
34
+ export declare const ToolConnectionStatusResponseUioScopeEnum: {
35
+ readonly Organization: "organization";
36
+ readonly User: "user";
37
+ };
38
+ export type ToolConnectionStatusResponseUioScopeEnum = typeof ToolConnectionStatusResponseUioScopeEnum[keyof typeof ToolConnectionStatusResponseUioScopeEnum];
39
+ /**
40
+ * Check if a given object implements the ToolConnectionStatusResponseUio interface.
41
+ */
42
+ export declare function instanceOfToolConnectionStatusResponseUio(value: object): value is ToolConnectionStatusResponseUio;
43
+ export declare function ToolConnectionStatusResponseUioFromJSON(json: any): ToolConnectionStatusResponseUio;
44
+ export declare function ToolConnectionStatusResponseUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): ToolConnectionStatusResponseUio;
45
+ export declare function ToolConnectionStatusResponseUioToJSON(json: any): ToolConnectionStatusResponseUio;
46
+ export declare function ToolConnectionStatusResponseUioToJSONTyped(value?: ToolConnectionStatusResponseUio | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,62 @@
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.ToolConnectionStatusResponseUioScopeEnum = void 0;
17
+ exports.instanceOfToolConnectionStatusResponseUio = instanceOfToolConnectionStatusResponseUio;
18
+ exports.ToolConnectionStatusResponseUioFromJSON = ToolConnectionStatusResponseUioFromJSON;
19
+ exports.ToolConnectionStatusResponseUioFromJSONTyped = ToolConnectionStatusResponseUioFromJSONTyped;
20
+ exports.ToolConnectionStatusResponseUioToJSON = ToolConnectionStatusResponseUioToJSON;
21
+ exports.ToolConnectionStatusResponseUioToJSONTyped = ToolConnectionStatusResponseUioToJSONTyped;
22
+ /**
23
+ * @export
24
+ */
25
+ exports.ToolConnectionStatusResponseUioScopeEnum = {
26
+ Organization: 'organization',
27
+ User: 'user'
28
+ };
29
+ /**
30
+ * Check if a given object implements the ToolConnectionStatusResponseUio interface.
31
+ */
32
+ function instanceOfToolConnectionStatusResponseUio(value) {
33
+ if (!('scope' in value) || value['scope'] === undefined)
34
+ return false;
35
+ if (!('connected' in value) || value['connected'] === undefined)
36
+ return false;
37
+ return true;
38
+ }
39
+ function ToolConnectionStatusResponseUioFromJSON(json) {
40
+ return ToolConnectionStatusResponseUioFromJSONTyped(json, false);
41
+ }
42
+ function ToolConnectionStatusResponseUioFromJSONTyped(json, ignoreDiscriminator) {
43
+ if (json == null) {
44
+ return json;
45
+ }
46
+ return {
47
+ 'scope': json['scope'],
48
+ 'connected': json['connected'],
49
+ };
50
+ }
51
+ function ToolConnectionStatusResponseUioToJSON(json) {
52
+ return ToolConnectionStatusResponseUioToJSONTyped(json, false);
53
+ }
54
+ function ToolConnectionStatusResponseUioToJSONTyped(value, ignoreDiscriminator = false) {
55
+ if (value == null) {
56
+ return value;
57
+ }
58
+ return {
59
+ 'scope': value['scope'],
60
+ 'connected': value['connected'],
61
+ };
62
+ }
@@ -39,6 +39,12 @@ export interface ToolCreateRequestUio {
39
39
  * @memberof ToolCreateRequestUio
40
40
  */
41
41
  type: string;
42
+ /**
43
+ * Credentials scope. organization = one shared connection; user = each user connects their own account. Immutable after creation.
44
+ * @type {string}
45
+ * @memberof ToolCreateRequestUio
46
+ */
47
+ scope?: ToolCreateRequestUioScopeEnum;
42
48
  /**
43
49
  *
44
50
  * @type {{ [key: string]: any; }}
@@ -64,6 +70,14 @@ export interface ToolCreateRequestUio {
64
70
  [key: string]: any;
65
71
  };
66
72
  }
73
+ /**
74
+ * @export
75
+ */
76
+ export declare const ToolCreateRequestUioScopeEnum: {
77
+ readonly Organization: "organization";
78
+ readonly User: "user";
79
+ };
80
+ export type ToolCreateRequestUioScopeEnum = typeof ToolCreateRequestUioScopeEnum[keyof typeof ToolCreateRequestUioScopeEnum];
67
81
  /**
68
82
  * Check if a given object implements the ToolCreateRequestUio interface.
69
83
  */
@@ -13,11 +13,19 @@
13
13
  * Do not edit the class manually.
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.ToolCreateRequestUioScopeEnum = void 0;
16
17
  exports.instanceOfToolCreateRequestUio = instanceOfToolCreateRequestUio;
17
18
  exports.ToolCreateRequestUioFromJSON = ToolCreateRequestUioFromJSON;
18
19
  exports.ToolCreateRequestUioFromJSONTyped = ToolCreateRequestUioFromJSONTyped;
19
20
  exports.ToolCreateRequestUioToJSON = ToolCreateRequestUioToJSON;
20
21
  exports.ToolCreateRequestUioToJSONTyped = ToolCreateRequestUioToJSONTyped;
22
+ /**
23
+ * @export
24
+ */
25
+ exports.ToolCreateRequestUioScopeEnum = {
26
+ Organization: 'organization',
27
+ User: 'user'
28
+ };
21
29
  /**
22
30
  * Check if a given object implements the ToolCreateRequestUio interface.
23
31
  */
@@ -44,6 +52,7 @@ function ToolCreateRequestUioFromJSONTyped(json, ignoreDiscriminator) {
44
52
  'orgId': json['orgId'],
45
53
  'description': json['description'] == null ? undefined : json['description'],
46
54
  'type': json['type'],
55
+ 'scope': json['scope'] == null ? undefined : json['scope'],
47
56
  'configuration': json['configuration'],
48
57
  'manifest': json['manifest'] == null ? undefined : json['manifest'],
49
58
  'mcp': json['mcp'] == null ? undefined : json['mcp'],
@@ -61,6 +70,7 @@ function ToolCreateRequestUioToJSONTyped(value, ignoreDiscriminator = false) {
61
70
  'orgId': value['orgId'],
62
71
  'description': value['description'],
63
72
  'type': value['type'],
73
+ 'scope': value['scope'],
64
74
  'configuration': value['configuration'],
65
75
  'manifest': value['manifest'],
66
76
  'mcp': value['mcp'],
@@ -49,6 +49,12 @@ export interface ToolSecureUio {
49
49
  * @memberof ToolSecureUio
50
50
  */
51
51
  type: ToolSecureUioTypeEnum;
52
+ /**
53
+ * Credentials scope. Defaults to organization for legacy tools.
54
+ * @type {string}
55
+ * @memberof ToolSecureUio
56
+ */
57
+ scope?: ToolSecureUioScopeEnum;
52
58
  /**
53
59
  *
54
60
  * @type {ToolSecureConfigurationUio}
@@ -82,6 +88,14 @@ export declare const ToolSecureUioTypeEnum: {
82
88
  readonly Mcp: "mcp";
83
89
  };
84
90
  export type ToolSecureUioTypeEnum = typeof ToolSecureUioTypeEnum[keyof typeof ToolSecureUioTypeEnum];
91
+ /**
92
+ * @export
93
+ */
94
+ export declare const ToolSecureUioScopeEnum: {
95
+ readonly Organization: "organization";
96
+ readonly User: "user";
97
+ };
98
+ export type ToolSecureUioScopeEnum = typeof ToolSecureUioScopeEnum[keyof typeof ToolSecureUioScopeEnum];
85
99
  /**
86
100
  * Check if a given object implements the ToolSecureUio interface.
87
101
  */
@@ -13,7 +13,7 @@
13
13
  * Do not edit the class manually.
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.ToolSecureUioTypeEnum = void 0;
16
+ exports.ToolSecureUioScopeEnum = exports.ToolSecureUioTypeEnum = void 0;
17
17
  exports.instanceOfToolSecureUio = instanceOfToolSecureUio;
18
18
  exports.ToolSecureUioFromJSON = ToolSecureUioFromJSON;
19
19
  exports.ToolSecureUioFromJSONTyped = ToolSecureUioFromJSONTyped;
@@ -29,6 +29,13 @@ exports.ToolSecureUioTypeEnum = {
29
29
  ToolApi: 'tool_api',
30
30
  Mcp: 'mcp'
31
31
  };
32
+ /**
33
+ * @export
34
+ */
35
+ exports.ToolSecureUioScopeEnum = {
36
+ Organization: 'organization',
37
+ User: 'user'
38
+ };
32
39
  /**
33
40
  * Check if a given object implements the ToolSecureUio interface.
34
41
  */
@@ -59,6 +66,7 @@ function ToolSecureUioFromJSONTyped(json, ignoreDiscriminator) {
59
66
  'name': json['name'],
60
67
  'description': json['description'] == null ? undefined : json['description'],
61
68
  'type': json['type'],
69
+ 'scope': json['scope'] == null ? undefined : json['scope'],
62
70
  'configuration': (0, ToolSecureConfigurationUio_1.ToolSecureConfigurationUioFromJSON)(json['configuration']),
63
71
  'manifest': json['manifest'] == null ? undefined : (0, ToolSecureManifestUio_1.ToolSecureManifestUioFromJSON)(json['manifest']),
64
72
  'mcp': json['mcp'] == null ? undefined : (0, ToolSecureMcpUio_1.ToolSecureMcpUioFromJSON)(json['mcp']),
@@ -79,6 +87,7 @@ function ToolSecureUioToJSONTyped(value, ignoreDiscriminator = false) {
79
87
  'name': value['name'],
80
88
  'description': value['description'],
81
89
  'type': value['type'],
90
+ 'scope': value['scope'],
82
91
  'configuration': (0, ToolSecureConfigurationUio_1.ToolSecureConfigurationUioToJSON)(value['configuration']),
83
92
  'manifest': (0, ToolSecureManifestUio_1.ToolSecureManifestUioToJSON)(value['manifest']),
84
93
  'mcp': (0, ToolSecureMcpUio_1.ToolSecureMcpUioToJSON)(value['mcp']),
@@ -268,6 +268,9 @@ export * from './TaskScheduleUio';
268
268
  export * from './TextToSpeechProviderUio';
269
269
  export * from './TokenUsageUio';
270
270
  export * from './ToolActionUio';
271
+ export * from './ToolAllowedToolsRequestUio';
272
+ export * from './ToolAllowedToolsResponseUio';
273
+ export * from './ToolConnectionStatusResponseUio';
271
274
  export * from './ToolCreateRequestUio';
272
275
  export * from './ToolResultUio';
273
276
  export * from './ToolResultsToolUio';
@@ -286,6 +286,9 @@ __exportStar(require("./TaskScheduleUio"), exports);
286
286
  __exportStar(require("./TextToSpeechProviderUio"), exports);
287
287
  __exportStar(require("./TokenUsageUio"), exports);
288
288
  __exportStar(require("./ToolActionUio"), exports);
289
+ __exportStar(require("./ToolAllowedToolsRequestUio"), exports);
290
+ __exportStar(require("./ToolAllowedToolsResponseUio"), exports);
291
+ __exportStar(require("./ToolConnectionStatusResponseUio"), exports);
289
292
  __exportStar(require("./ToolCreateRequestUio"), exports);
290
293
  __exportStar(require("./ToolResultUio"), exports);
291
294
  __exportStar(require("./ToolResultsToolUio"), exports);
package/dist/openapi.json CHANGED
@@ -2163,6 +2163,62 @@
2163
2163
  "tags" : [ "scheduledTasks" ]
2164
2164
  }
2165
2165
  },
2166
+ "/agents/{agentId}/scheduled-tasks/runs" : {
2167
+ "get" : {
2168
+ "operationId" : "listAgentScheduledTaskRuns",
2169
+ "parameters" : [ {
2170
+ "description" : "ID of the agent",
2171
+ "in" : "path",
2172
+ "name" : "agentId",
2173
+ "required" : true,
2174
+ "schema" : {
2175
+ "format" : "uuid",
2176
+ "type" : "string"
2177
+ }
2178
+ }, {
2179
+ "description" : "Start of the date range (inclusive)",
2180
+ "in" : "query",
2181
+ "name" : "from",
2182
+ "required" : true,
2183
+ "schema" : {
2184
+ "format" : "date-time",
2185
+ "type" : "string"
2186
+ }
2187
+ }, {
2188
+ "description" : "End of the date range (exclusive)",
2189
+ "in" : "query",
2190
+ "name" : "to",
2191
+ "required" : true,
2192
+ "schema" : {
2193
+ "format" : "date-time",
2194
+ "type" : "string"
2195
+ }
2196
+ } ],
2197
+ "responses" : {
2198
+ "200" : {
2199
+ "content" : {
2200
+ "application/json" : {
2201
+ "schema" : {
2202
+ "$ref" : "#/components/schemas/ScheduledTaskRunList"
2203
+ }
2204
+ }
2205
+ },
2206
+ "description" : "List of runs for all tasks of the agent in the given date range"
2207
+ },
2208
+ "400" : {
2209
+ "description" : "Missing or invalid from/to parameters"
2210
+ },
2211
+ "401" : {
2212
+ "description" : "Unauthorized"
2213
+ },
2214
+ "403" : {
2215
+ "description" : "Forbidden"
2216
+ }
2217
+ },
2218
+ "summary" : "List all runs for an agent's scheduled tasks within a date range",
2219
+ "tags" : [ "scheduledTasks" ]
2220
+ }
2221
+ },
2166
2222
  "/agents/{agentId}/scheduled-tasks/{taskId}/runs" : {
2167
2223
  "get" : {
2168
2224
  "operationId" : "listScheduledTaskRuns",
@@ -8409,6 +8465,89 @@
8409
8465
  "tags" : [ "tools" ]
8410
8466
  }
8411
8467
  },
8468
+ "/tools/{toolId}/mcp/allowed-tools" : {
8469
+ "put" : {
8470
+ "description" : "Admins can adjust the catalog of MCP actions exposed to agents at any time.\nEach name must exist in the tool's introspection result.\n",
8471
+ "operationId" : "updateMcpAllowedTools",
8472
+ "parameters" : [ {
8473
+ "description" : "Tool identifier",
8474
+ "in" : "path",
8475
+ "name" : "toolId",
8476
+ "required" : true,
8477
+ "schema" : {
8478
+ "type" : "string"
8479
+ }
8480
+ } ],
8481
+ "requestBody" : {
8482
+ "content" : {
8483
+ "application/json" : {
8484
+ "schema" : {
8485
+ "$ref" : "#/components/schemas/ToolAllowedToolsRequest"
8486
+ }
8487
+ }
8488
+ },
8489
+ "required" : true
8490
+ },
8491
+ "responses" : {
8492
+ "200" : {
8493
+ "content" : {
8494
+ "application/json" : {
8495
+ "schema" : {
8496
+ "$ref" : "#/components/schemas/ToolAllowedToolsResponse"
8497
+ }
8498
+ }
8499
+ },
8500
+ "description" : "Updated allowed tools"
8501
+ },
8502
+ "400" : {
8503
+ "description" : "MCP not introspected or unknown tool names"
8504
+ },
8505
+ "403" : {
8506
+ "description" : "Forbidden"
8507
+ },
8508
+ "404" : {
8509
+ "description" : "Tool not found"
8510
+ }
8511
+ },
8512
+ "summary" : "Replace the list of allowed MCP tools for an MCP tool",
8513
+ "tags" : [ "tools" ]
8514
+ }
8515
+ },
8516
+ "/tools/{toolId}/connection-status" : {
8517
+ "get" : {
8518
+ "description" : "For organization-scoped tools, returns whether the shared connection is set up.\nFor user-scoped tools, returns whether the caller has connected their own account.\n",
8519
+ "operationId" : "getToolConnectionStatus",
8520
+ "parameters" : [ {
8521
+ "description" : "Tool identifier",
8522
+ "in" : "path",
8523
+ "name" : "toolId",
8524
+ "required" : true,
8525
+ "schema" : {
8526
+ "type" : "string"
8527
+ }
8528
+ } ],
8529
+ "responses" : {
8530
+ "200" : {
8531
+ "content" : {
8532
+ "application/json" : {
8533
+ "schema" : {
8534
+ "$ref" : "#/components/schemas/ToolConnectionStatusResponse"
8535
+ }
8536
+ }
8537
+ },
8538
+ "description" : "Connection status"
8539
+ },
8540
+ "403" : {
8541
+ "description" : "Forbidden"
8542
+ },
8543
+ "404" : {
8544
+ "description" : "Tool not found"
8545
+ }
8546
+ },
8547
+ "summary" : "Get the current user's connection status for a tool",
8548
+ "tags" : [ "tools" ]
8549
+ }
8550
+ },
8412
8551
  "/skills" : {
8413
8552
  "get" : {
8414
8553
  "description" : "Returns a paginated list of skills scoped to an organization",
@@ -10388,6 +10527,11 @@
10388
10527
  "description" : {
10389
10528
  "type" : "string"
10390
10529
  },
10530
+ "scope" : {
10531
+ "description" : "Credentials scope. Defaults to organization for legacy tools.",
10532
+ "enum" : [ "organization", "user" ],
10533
+ "type" : "string"
10534
+ },
10391
10535
  "configuration" : {
10392
10536
  "additionalProperties" : true,
10393
10537
  "type" : "object"
@@ -13984,6 +14128,11 @@
13984
14128
  "description" : "e.g. tool_api | mcp",
13985
14129
  "type" : "string"
13986
14130
  },
14131
+ "scope" : {
14132
+ "description" : "Credentials scope. organization = one shared connection; user = each user connects their own account. Immutable after creation.",
14133
+ "enum" : [ "organization", "user" ],
14134
+ "type" : "string"
14135
+ },
13987
14136
  "configuration" : {
13988
14137
  "additionalProperties" : true,
13989
14138
  "type" : "object"
@@ -14061,6 +14210,11 @@
14061
14210
  "enum" : [ "tool_api", "mcp" ],
14062
14211
  "type" : "string"
14063
14212
  },
14213
+ "scope" : {
14214
+ "description" : "Credentials scope. Defaults to organization for legacy tools.",
14215
+ "enum" : [ "organization", "user" ],
14216
+ "type" : "string"
14217
+ },
14064
14218
  "configuration" : {
14065
14219
  "$ref" : "#/components/schemas/ToolSecure_configuration"
14066
14220
  },
@@ -14148,6 +14302,50 @@
14148
14302
  "title" : "RevealTokenResponse",
14149
14303
  "type" : "object"
14150
14304
  },
14305
+ "ToolAllowedToolsRequest" : {
14306
+ "additionalProperties" : false,
14307
+ "properties" : {
14308
+ "allowedTools" : {
14309
+ "items" : {
14310
+ "type" : "string"
14311
+ },
14312
+ "type" : "array",
14313
+ "uniqueItems" : true
14314
+ }
14315
+ },
14316
+ "required" : [ "allowedTools" ],
14317
+ "title" : "ToolAllowedToolsRequest",
14318
+ "type" : "object"
14319
+ },
14320
+ "ToolAllowedToolsResponse" : {
14321
+ "additionalProperties" : false,
14322
+ "properties" : {
14323
+ "allowedTools" : {
14324
+ "items" : {
14325
+ "type" : "string"
14326
+ },
14327
+ "type" : "array"
14328
+ }
14329
+ },
14330
+ "required" : [ "allowedTools" ],
14331
+ "title" : "ToolAllowedToolsResponse",
14332
+ "type" : "object"
14333
+ },
14334
+ "ToolConnectionStatusResponse" : {
14335
+ "additionalProperties" : false,
14336
+ "properties" : {
14337
+ "scope" : {
14338
+ "enum" : [ "organization", "user" ],
14339
+ "type" : "string"
14340
+ },
14341
+ "connected" : {
14342
+ "type" : "boolean"
14343
+ }
14344
+ },
14345
+ "required" : [ "connected", "scope" ],
14346
+ "title" : "ToolConnectionStatusResponse",
14347
+ "type" : "object"
14348
+ },
14151
14349
  "Skill" : {
14152
14350
  "properties" : {
14153
14351
  "id" : {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@breign/client",
3
- "version": "1.0.103",
3
+ "version": "1.0.105",
4
4
  "main": "dist/index.js",
5
5
  "exports": {
6
6
  ".": "./dist/index.js",