@breign/client 1.0.54 → 1.0.56

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.
@@ -38,6 +38,9 @@ export interface SetToolTokenRequest {
38
38
  toolId: string;
39
39
  setTokenRequestUio: SetTokenRequestUio;
40
40
  }
41
+ export interface SetupToolRequest {
42
+ toolId: string;
43
+ }
41
44
  /**
42
45
  *
43
46
  */
@@ -106,4 +109,12 @@ export declare class ToolsApi extends runtime.BaseAPI {
106
109
  * Set or update the tool secret token
107
110
  */
108
111
  setToolToken(toolId: string, setTokenRequestUio: SetTokenRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
112
+ /**
113
+ * Complete the setup of a tool (oauth2 configuration)
114
+ */
115
+ setupToolRaw(requestParameters: SetupToolRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
116
+ /**
117
+ * Complete the setup of a tool (oauth2 configuration)
118
+ */
119
+ setupTool(toolId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
109
120
  }
@@ -276,5 +276,31 @@ class ToolsApi extends runtime.BaseAPI {
276
276
  async setToolToken(toolId, setTokenRequestUio, initOverrides) {
277
277
  await this.setToolTokenRaw({ toolId: toolId, setTokenRequestUio: setTokenRequestUio }, initOverrides);
278
278
  }
279
+ /**
280
+ * Complete the setup of a tool (oauth2 configuration)
281
+ */
282
+ async setupToolRaw(requestParameters, initOverrides) {
283
+ if (requestParameters['toolId'] == null) {
284
+ throw new runtime.RequiredError('toolId', 'Required parameter "toolId" was null or undefined when calling setupTool().');
285
+ }
286
+ const queryParameters = {};
287
+ const headerParameters = {};
288
+ if (this.configuration && this.configuration.apiKey) {
289
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
290
+ }
291
+ const response = await this.request({
292
+ path: `/tools/{toolId}/setup`.replace(`{${"toolId"}}`, encodeURIComponent(String(requestParameters['toolId']))),
293
+ method: 'POST',
294
+ headers: headerParameters,
295
+ query: queryParameters,
296
+ }, initOverrides);
297
+ return new runtime.VoidApiResponse(response);
298
+ }
299
+ /**
300
+ * Complete the setup of a tool (oauth2 configuration)
301
+ */
302
+ async setupTool(toolId, initOverrides) {
303
+ await this.setupToolRaw({ toolId: toolId }, initOverrides);
304
+ }
279
305
  }
280
306
  exports.ToolsApi = ToolsApi;
@@ -75,6 +75,12 @@ export interface AgentToolUio {
75
75
  * @memberof AgentToolUio
76
76
  */
77
77
  restricted?: boolean;
78
+ /**
79
+ *
80
+ * @type {boolean}
81
+ * @memberof AgentToolUio
82
+ */
83
+ isSetup?: boolean;
78
84
  }
79
85
  /**
80
86
  * Check if a given object implements the AgentToolUio interface.
@@ -51,6 +51,7 @@ function AgentToolUioFromJSONTyped(json, ignoreDiscriminator) {
51
51
  'manifest': json['manifest'] == null ? undefined : json['manifest'],
52
52
  'mcp': json['mcp'] == null ? undefined : json['mcp'],
53
53
  'restricted': json['restricted'] == null ? undefined : json['restricted'],
54
+ 'isSetup': json['isSetup'] == null ? undefined : json['isSetup'],
54
55
  };
55
56
  }
56
57
  function AgentToolUioToJSON(json) {
@@ -70,5 +71,6 @@ function AgentToolUioToJSONTyped(value, ignoreDiscriminator = false) {
70
71
  'manifest': value['manifest'],
71
72
  'mcp': value['mcp'],
72
73
  'restricted': value['restricted'],
74
+ 'isSetup': value['isSetup'],
73
75
  };
74
76
  }
@@ -67,6 +67,12 @@ export interface ToolSecureUio {
67
67
  * @memberof ToolSecureUio
68
68
  */
69
69
  mcp?: ToolSecureMcpUio | null;
70
+ /**
71
+ * Indicates if the tool has completed its setup (for oauth2 tools).
72
+ * @type {boolean}
73
+ * @memberof ToolSecureUio
74
+ */
75
+ isSetup?: boolean;
70
76
  }
71
77
  /**
72
78
  * @export
@@ -62,6 +62,7 @@ function ToolSecureUioFromJSONTyped(json, ignoreDiscriminator) {
62
62
  'configuration': (0, ToolSecureConfigurationUio_1.ToolSecureConfigurationUioFromJSON)(json['configuration']),
63
63
  'manifest': json['manifest'] == null ? undefined : (0, ToolSecureManifestUio_1.ToolSecureManifestUioFromJSON)(json['manifest']),
64
64
  'mcp': json['mcp'] == null ? undefined : (0, ToolSecureMcpUio_1.ToolSecureMcpUioFromJSON)(json['mcp']),
65
+ 'isSetup': json['isSetup'] == null ? undefined : json['isSetup'],
65
66
  };
66
67
  }
67
68
  function ToolSecureUioToJSON(json) {
@@ -81,5 +82,6 @@ function ToolSecureUioToJSONTyped(value, ignoreDiscriminator = false) {
81
82
  'configuration': (0, ToolSecureConfigurationUio_1.ToolSecureConfigurationUioToJSON)(value['configuration']),
82
83
  'manifest': (0, ToolSecureManifestUio_1.ToolSecureManifestUioToJSON)(value['manifest']),
83
84
  'mcp': (0, ToolSecureMcpUio_1.ToolSecureMcpUioToJSON)(value['mcp']),
85
+ 'isSetup': value['isSetup'],
84
86
  };
85
87
  }
package/dist/openapi.json CHANGED
@@ -5561,6 +5561,42 @@
5561
5561
  "tags" : [ "tools" ]
5562
5562
  }
5563
5563
  },
5564
+ "/tools/{toolId}/setup" : {
5565
+ "post" : {
5566
+ "operationId" : "setupTool",
5567
+ "parameters" : [ {
5568
+ "description" : "Tool identifier",
5569
+ "in" : "path",
5570
+ "name" : "toolId",
5571
+ "required" : true,
5572
+ "schema" : {
5573
+ "type" : "string"
5574
+ }
5575
+ } ],
5576
+ "responses" : {
5577
+ "204" : {
5578
+ "description" : "Tool setup completed"
5579
+ },
5580
+ "400" : {
5581
+ "description" : "Tool setup not required or failed."
5582
+ },
5583
+ "401" : {
5584
+ "description" : "Unauthorized"
5585
+ },
5586
+ "403" : {
5587
+ "description" : "Forbidden"
5588
+ },
5589
+ "404" : {
5590
+ "description" : "Tool not found"
5591
+ },
5592
+ "500" : {
5593
+ "description" : "Internal server error"
5594
+ }
5595
+ },
5596
+ "summary" : "Complete the setup of a tool (oauth2 configuration)",
5597
+ "tags" : [ "tools" ]
5598
+ }
5599
+ },
5564
5600
  "/tools/{toolId}/token" : {
5565
5601
  "put" : {
5566
5602
  "operationId" : "setToolToken",
@@ -6685,6 +6721,9 @@
6685
6721
  },
6686
6722
  "restricted" : {
6687
6723
  "type" : "boolean"
6724
+ },
6725
+ "isSetup" : {
6726
+ "type" : "boolean"
6688
6727
  }
6689
6728
  },
6690
6729
  "required" : [ "description", "id", "name", "orgId", "type" ],
@@ -9088,6 +9127,10 @@
9088
9127
  },
9089
9128
  "mcp" : {
9090
9129
  "$ref" : "#/components/schemas/ToolSecure_mcp"
9130
+ },
9131
+ "isSetup" : {
9132
+ "description" : "Indicates if the tool has completed its setup (for oauth2 tools).",
9133
+ "type" : "boolean"
9091
9134
  }
9092
9135
  },
9093
9136
  "required" : [ "_id", "configuration", "name", "orgId", "type" ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@breign/client",
3
- "version": "1.0.54",
3
+ "version": "1.0.56",
4
4
  "main": "dist/index.js",
5
5
  "exports": {
6
6
  ".": "./dist/index.js",