@breign/client 1.0.103 → 1.0.104

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.
@@ -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
@@ -8409,6 +8409,89 @@
8409
8409
  "tags" : [ "tools" ]
8410
8410
  }
8411
8411
  },
8412
+ "/tools/{toolId}/mcp/allowed-tools" : {
8413
+ "put" : {
8414
+ "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",
8415
+ "operationId" : "updateMcpAllowedTools",
8416
+ "parameters" : [ {
8417
+ "description" : "Tool identifier",
8418
+ "in" : "path",
8419
+ "name" : "toolId",
8420
+ "required" : true,
8421
+ "schema" : {
8422
+ "type" : "string"
8423
+ }
8424
+ } ],
8425
+ "requestBody" : {
8426
+ "content" : {
8427
+ "application/json" : {
8428
+ "schema" : {
8429
+ "$ref" : "#/components/schemas/ToolAllowedToolsRequest"
8430
+ }
8431
+ }
8432
+ },
8433
+ "required" : true
8434
+ },
8435
+ "responses" : {
8436
+ "200" : {
8437
+ "content" : {
8438
+ "application/json" : {
8439
+ "schema" : {
8440
+ "$ref" : "#/components/schemas/ToolAllowedToolsResponse"
8441
+ }
8442
+ }
8443
+ },
8444
+ "description" : "Updated allowed tools"
8445
+ },
8446
+ "400" : {
8447
+ "description" : "MCP not introspected or unknown tool names"
8448
+ },
8449
+ "403" : {
8450
+ "description" : "Forbidden"
8451
+ },
8452
+ "404" : {
8453
+ "description" : "Tool not found"
8454
+ }
8455
+ },
8456
+ "summary" : "Replace the list of allowed MCP tools for an MCP tool",
8457
+ "tags" : [ "tools" ]
8458
+ }
8459
+ },
8460
+ "/tools/{toolId}/connection-status" : {
8461
+ "get" : {
8462
+ "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",
8463
+ "operationId" : "getToolConnectionStatus",
8464
+ "parameters" : [ {
8465
+ "description" : "Tool identifier",
8466
+ "in" : "path",
8467
+ "name" : "toolId",
8468
+ "required" : true,
8469
+ "schema" : {
8470
+ "type" : "string"
8471
+ }
8472
+ } ],
8473
+ "responses" : {
8474
+ "200" : {
8475
+ "content" : {
8476
+ "application/json" : {
8477
+ "schema" : {
8478
+ "$ref" : "#/components/schemas/ToolConnectionStatusResponse"
8479
+ }
8480
+ }
8481
+ },
8482
+ "description" : "Connection status"
8483
+ },
8484
+ "403" : {
8485
+ "description" : "Forbidden"
8486
+ },
8487
+ "404" : {
8488
+ "description" : "Tool not found"
8489
+ }
8490
+ },
8491
+ "summary" : "Get the current user's connection status for a tool",
8492
+ "tags" : [ "tools" ]
8493
+ }
8494
+ },
8412
8495
  "/skills" : {
8413
8496
  "get" : {
8414
8497
  "description" : "Returns a paginated list of skills scoped to an organization",
@@ -10388,6 +10471,11 @@
10388
10471
  "description" : {
10389
10472
  "type" : "string"
10390
10473
  },
10474
+ "scope" : {
10475
+ "description" : "Credentials scope. Defaults to organization for legacy tools.",
10476
+ "enum" : [ "organization", "user" ],
10477
+ "type" : "string"
10478
+ },
10391
10479
  "configuration" : {
10392
10480
  "additionalProperties" : true,
10393
10481
  "type" : "object"
@@ -13984,6 +14072,11 @@
13984
14072
  "description" : "e.g. tool_api | mcp",
13985
14073
  "type" : "string"
13986
14074
  },
14075
+ "scope" : {
14076
+ "description" : "Credentials scope. organization = one shared connection; user = each user connects their own account. Immutable after creation.",
14077
+ "enum" : [ "organization", "user" ],
14078
+ "type" : "string"
14079
+ },
13987
14080
  "configuration" : {
13988
14081
  "additionalProperties" : true,
13989
14082
  "type" : "object"
@@ -14061,6 +14154,11 @@
14061
14154
  "enum" : [ "tool_api", "mcp" ],
14062
14155
  "type" : "string"
14063
14156
  },
14157
+ "scope" : {
14158
+ "description" : "Credentials scope. Defaults to organization for legacy tools.",
14159
+ "enum" : [ "organization", "user" ],
14160
+ "type" : "string"
14161
+ },
14064
14162
  "configuration" : {
14065
14163
  "$ref" : "#/components/schemas/ToolSecure_configuration"
14066
14164
  },
@@ -14148,6 +14246,50 @@
14148
14246
  "title" : "RevealTokenResponse",
14149
14247
  "type" : "object"
14150
14248
  },
14249
+ "ToolAllowedToolsRequest" : {
14250
+ "additionalProperties" : false,
14251
+ "properties" : {
14252
+ "allowedTools" : {
14253
+ "items" : {
14254
+ "type" : "string"
14255
+ },
14256
+ "type" : "array",
14257
+ "uniqueItems" : true
14258
+ }
14259
+ },
14260
+ "required" : [ "allowedTools" ],
14261
+ "title" : "ToolAllowedToolsRequest",
14262
+ "type" : "object"
14263
+ },
14264
+ "ToolAllowedToolsResponse" : {
14265
+ "additionalProperties" : false,
14266
+ "properties" : {
14267
+ "allowedTools" : {
14268
+ "items" : {
14269
+ "type" : "string"
14270
+ },
14271
+ "type" : "array"
14272
+ }
14273
+ },
14274
+ "required" : [ "allowedTools" ],
14275
+ "title" : "ToolAllowedToolsResponse",
14276
+ "type" : "object"
14277
+ },
14278
+ "ToolConnectionStatusResponse" : {
14279
+ "additionalProperties" : false,
14280
+ "properties" : {
14281
+ "scope" : {
14282
+ "enum" : [ "organization", "user" ],
14283
+ "type" : "string"
14284
+ },
14285
+ "connected" : {
14286
+ "type" : "boolean"
14287
+ }
14288
+ },
14289
+ "required" : [ "connected", "scope" ],
14290
+ "title" : "ToolConnectionStatusResponse",
14291
+ "type" : "object"
14292
+ },
14151
14293
  "Skill" : {
14152
14294
  "properties" : {
14153
14295
  "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.104",
4
4
  "main": "dist/index.js",
5
5
  "exports": {
6
6
  ".": "./dist/index.js",