@meetkai/mka1 0.55.20 → 0.55.21
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.
- package/README.md +411 -404
- package/bin/mcp-server.js +3395 -3072
- package/bin/mcp-server.js.map +14 -10
- package/dist/commonjs/funcs/authApiKeysDelete.d.ts +20 -0
- package/dist/commonjs/funcs/authApiKeysDelete.d.ts.map +1 -0
- package/dist/commonjs/funcs/authApiKeysDelete.js +132 -0
- package/dist/commonjs/funcs/authApiKeysDelete.js.map +1 -0
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/server.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/server.js +3 -1
- package/dist/commonjs/mcp-server/server.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/authApiKeysDelete.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/authApiKeysDelete.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/authApiKeysDelete.js +64 -0
- package/dist/commonjs/mcp-server/tools/authApiKeysDelete.js.map +1 -0
- package/dist/commonjs/models/errors/deletescopedapikey.d.ts +188 -0
- package/dist/commonjs/models/errors/deletescopedapikey.d.ts.map +1 -0
- package/dist/commonjs/models/errors/deletescopedapikey.js +270 -0
- package/dist/commonjs/models/errors/deletescopedapikey.js.map +1 -0
- package/dist/commonjs/models/errors/index.d.ts +1 -0
- package/dist/commonjs/models/errors/index.d.ts.map +1 -1
- package/dist/commonjs/models/errors/index.js +1 -0
- package/dist/commonjs/models/errors/index.js.map +1 -1
- package/dist/commonjs/models/operations/deletescopedapikey.d.ts +53 -0
- package/dist/commonjs/models/operations/deletescopedapikey.d.ts.map +1 -0
- package/dist/commonjs/models/operations/deletescopedapikey.js +107 -0
- package/dist/commonjs/models/operations/deletescopedapikey.js.map +1 -0
- package/dist/commonjs/models/operations/index.d.ts +1 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +1 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/updatescopedapikey.d.ts +8 -24
- package/dist/commonjs/models/operations/updatescopedapikey.d.ts.map +1 -1
- package/dist/commonjs/models/operations/updatescopedapikey.js +8 -24
- package/dist/commonjs/models/operations/updatescopedapikey.js.map +1 -1
- package/dist/commonjs/models/operations/updateserviceaccountapikey.d.ts +2 -0
- package/dist/commonjs/models/operations/updateserviceaccountapikey.d.ts.map +1 -1
- package/dist/commonjs/models/operations/updateserviceaccountapikey.js +2 -0
- package/dist/commonjs/models/operations/updateserviceaccountapikey.js.map +1 -1
- package/dist/commonjs/react-query/authApiKeysDelete.d.ts +29 -0
- package/dist/commonjs/react-query/authApiKeysDelete.d.ts.map +1 -0
- package/dist/commonjs/react-query/authApiKeysDelete.js +47 -0
- package/dist/commonjs/react-query/authApiKeysDelete.js.map +1 -0
- package/dist/commonjs/react-query/index.d.ts +1 -0
- package/dist/commonjs/react-query/index.d.ts.map +1 -1
- package/dist/commonjs/react-query/index.js +1 -0
- package/dist/commonjs/react-query/index.js.map +1 -1
- package/dist/commonjs/sdk/apikeys.d.ts +7 -0
- package/dist/commonjs/sdk/apikeys.d.ts.map +1 -1
- package/dist/commonjs/sdk/apikeys.js +10 -0
- package/dist/commonjs/sdk/apikeys.js.map +1 -1
- package/dist/esm/funcs/authApiKeysDelete.d.ts +20 -0
- package/dist/esm/funcs/authApiKeysDelete.d.ts.map +1 -0
- package/dist/esm/funcs/authApiKeysDelete.js +96 -0
- package/dist/esm/funcs/authApiKeysDelete.js.map +1 -0
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/server.d.ts.map +1 -1
- package/dist/esm/mcp-server/server.js +3 -1
- package/dist/esm/mcp-server/server.js.map +1 -1
- package/dist/esm/mcp-server/tools/authApiKeysDelete.d.ts +8 -0
- package/dist/esm/mcp-server/tools/authApiKeysDelete.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/authApiKeysDelete.js +28 -0
- package/dist/esm/mcp-server/tools/authApiKeysDelete.js.map +1 -0
- package/dist/esm/models/errors/deletescopedapikey.d.ts +188 -0
- package/dist/esm/models/errors/deletescopedapikey.d.ts.map +1 -0
- package/dist/esm/models/errors/deletescopedapikey.js +227 -0
- package/dist/esm/models/errors/deletescopedapikey.js.map +1 -0
- package/dist/esm/models/errors/index.d.ts +1 -0
- package/dist/esm/models/errors/index.d.ts.map +1 -1
- package/dist/esm/models/errors/index.js +1 -0
- package/dist/esm/models/errors/index.js.map +1 -1
- package/dist/esm/models/operations/deletescopedapikey.d.ts +53 -0
- package/dist/esm/models/operations/deletescopedapikey.d.ts.map +1 -0
- package/dist/esm/models/operations/deletescopedapikey.js +65 -0
- package/dist/esm/models/operations/deletescopedapikey.js.map +1 -0
- package/dist/esm/models/operations/index.d.ts +1 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +1 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/updatescopedapikey.d.ts +8 -24
- package/dist/esm/models/operations/updatescopedapikey.d.ts.map +1 -1
- package/dist/esm/models/operations/updatescopedapikey.js +8 -24
- package/dist/esm/models/operations/updatescopedapikey.js.map +1 -1
- package/dist/esm/models/operations/updateserviceaccountapikey.d.ts +2 -0
- package/dist/esm/models/operations/updateserviceaccountapikey.d.ts.map +1 -1
- package/dist/esm/models/operations/updateserviceaccountapikey.js +2 -0
- package/dist/esm/models/operations/updateserviceaccountapikey.js.map +1 -1
- package/dist/esm/react-query/authApiKeysDelete.d.ts +29 -0
- package/dist/esm/react-query/authApiKeysDelete.d.ts.map +1 -0
- package/dist/esm/react-query/authApiKeysDelete.js +42 -0
- package/dist/esm/react-query/authApiKeysDelete.js.map +1 -0
- package/dist/esm/react-query/index.d.ts +1 -0
- package/dist/esm/react-query/index.d.ts.map +1 -1
- package/dist/esm/react-query/index.js +1 -0
- package/dist/esm/react-query/index.js.map +1 -1
- package/dist/esm/sdk/apikeys.d.ts +7 -0
- package/dist/esm/sdk/apikeys.d.ts.map +1 -1
- package/dist/esm/sdk/apikeys.js +10 -0
- package/dist/esm/sdk/apikeys.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/authApiKeysDelete.ts +230 -0
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +3 -1
- package/src/mcp-server/tools/authApiKeysDelete.ts +37 -0
- package/src/models/errors/deletescopedapikey.ts +461 -0
- package/src/models/errors/index.ts +1 -0
- package/src/models/operations/deletescopedapikey.ts +168 -0
- package/src/models/operations/index.ts +1 -0
- package/src/models/operations/updatescopedapikey.ts +18 -48
- package/src/models/operations/updateserviceaccountapikey.ts +6 -0
- package/src/react-query/authApiKeysDelete.ts +117 -0
- package/src/react-query/index.ts +1 -0
- package/src/sdk/apikeys.ts +18 -0
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { SDKCore } from "../core.js";
|
|
6
|
+
import { encodeJSON, encodeSimple } from "../lib/encodings.js";
|
|
7
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
8
|
+
import * as M from "../lib/matchers.js";
|
|
9
|
+
import { compactMap } from "../lib/primitives.js";
|
|
10
|
+
import { safeParse } from "../lib/schemas.js";
|
|
11
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
12
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
13
|
+
import { pathToFunc } from "../lib/url.js";
|
|
14
|
+
import {
|
|
15
|
+
ConnectionError,
|
|
16
|
+
InvalidRequestError,
|
|
17
|
+
RequestAbortedError,
|
|
18
|
+
RequestTimeoutError,
|
|
19
|
+
UnexpectedClientError,
|
|
20
|
+
} from "../models/errors/httpclienterrors.js";
|
|
21
|
+
import * as errors from "../models/errors/index.js";
|
|
22
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
23
|
+
import { SDKError } from "../models/errors/sdkerror.js";
|
|
24
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
25
|
+
import * as operations from "../models/operations/index.js";
|
|
26
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
27
|
+
import { Result } from "../types/fp.js";
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Delete a scoped API key
|
|
31
|
+
*
|
|
32
|
+
* @remarks
|
|
33
|
+
* Delete one of the caller's own keys. A key caller needs `write:apikeys` and may delete only keys in its own organization whose scopes it holds, including itself. Takes effect immediately.
|
|
34
|
+
*
|
|
35
|
+
* If set, this operation will use {@link Security.bearerAuth} from the global security.
|
|
36
|
+
*/
|
|
37
|
+
export function authApiKeysDelete(
|
|
38
|
+
client: SDKCore,
|
|
39
|
+
request: operations.DeleteScopedApiKeyRequest,
|
|
40
|
+
options?: RequestOptions,
|
|
41
|
+
): APIPromise<
|
|
42
|
+
Result<
|
|
43
|
+
operations.DeleteScopedApiKeyResponseBody,
|
|
44
|
+
| errors.DeleteScopedApiKeyResponseBody
|
|
45
|
+
| errors.DeleteScopedApiKeyAuthApiKeysResponseBody
|
|
46
|
+
| errors.DeleteScopedApiKeyAuthApiKeysResponseResponseBody
|
|
47
|
+
| errors.DeleteScopedApiKeyAuthApiKeysResponse404ResponseBody
|
|
48
|
+
| errors.DeleteScopedApiKeyAuthApiKeysResponse409ResponseBody
|
|
49
|
+
| errors.DeleteScopedApiKeyAuthApiKeysResponse410ResponseBody
|
|
50
|
+
| errors.DeleteScopedApiKeyAuthApiKeysResponse429ResponseBody
|
|
51
|
+
| SDKError
|
|
52
|
+
| ResponseValidationError
|
|
53
|
+
| ConnectionError
|
|
54
|
+
| RequestAbortedError
|
|
55
|
+
| RequestTimeoutError
|
|
56
|
+
| InvalidRequestError
|
|
57
|
+
| UnexpectedClientError
|
|
58
|
+
| SDKValidationError
|
|
59
|
+
>
|
|
60
|
+
> {
|
|
61
|
+
return new APIPromise($do(
|
|
62
|
+
client,
|
|
63
|
+
request,
|
|
64
|
+
options,
|
|
65
|
+
));
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
async function $do(
|
|
69
|
+
client: SDKCore,
|
|
70
|
+
request: operations.DeleteScopedApiKeyRequest,
|
|
71
|
+
options?: RequestOptions,
|
|
72
|
+
): Promise<
|
|
73
|
+
[
|
|
74
|
+
Result<
|
|
75
|
+
operations.DeleteScopedApiKeyResponseBody,
|
|
76
|
+
| errors.DeleteScopedApiKeyResponseBody
|
|
77
|
+
| errors.DeleteScopedApiKeyAuthApiKeysResponseBody
|
|
78
|
+
| errors.DeleteScopedApiKeyAuthApiKeysResponseResponseBody
|
|
79
|
+
| errors.DeleteScopedApiKeyAuthApiKeysResponse404ResponseBody
|
|
80
|
+
| errors.DeleteScopedApiKeyAuthApiKeysResponse409ResponseBody
|
|
81
|
+
| errors.DeleteScopedApiKeyAuthApiKeysResponse410ResponseBody
|
|
82
|
+
| errors.DeleteScopedApiKeyAuthApiKeysResponse429ResponseBody
|
|
83
|
+
| SDKError
|
|
84
|
+
| ResponseValidationError
|
|
85
|
+
| ConnectionError
|
|
86
|
+
| RequestAbortedError
|
|
87
|
+
| RequestTimeoutError
|
|
88
|
+
| InvalidRequestError
|
|
89
|
+
| UnexpectedClientError
|
|
90
|
+
| SDKValidationError
|
|
91
|
+
>,
|
|
92
|
+
APICall,
|
|
93
|
+
]
|
|
94
|
+
> {
|
|
95
|
+
const parsed = safeParse(
|
|
96
|
+
request,
|
|
97
|
+
(value) => operations.DeleteScopedApiKeyRequest$outboundSchema.parse(value),
|
|
98
|
+
"Input validation failed",
|
|
99
|
+
);
|
|
100
|
+
if (!parsed.ok) {
|
|
101
|
+
return [parsed, { status: "invalid" }];
|
|
102
|
+
}
|
|
103
|
+
const payload = parsed.value;
|
|
104
|
+
const body = encodeJSON("body", payload.RequestBody, { explode: true });
|
|
105
|
+
|
|
106
|
+
const path = pathToFunc("/api/v1/authentication/api-key/scoped/delete")();
|
|
107
|
+
|
|
108
|
+
const headers = new Headers(compactMap({
|
|
109
|
+
"Content-Type": "application/json",
|
|
110
|
+
Accept: "application/json",
|
|
111
|
+
"X-On-Behalf-Of": encodeSimple(
|
|
112
|
+
"X-On-Behalf-Of",
|
|
113
|
+
payload["X-On-Behalf-Of"],
|
|
114
|
+
{ explode: false, charEncoding: "none" },
|
|
115
|
+
),
|
|
116
|
+
}));
|
|
117
|
+
|
|
118
|
+
const secConfig = await extractSecurity(client._options.bearerAuth);
|
|
119
|
+
const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
|
|
120
|
+
const requestSecurity = resolveGlobalSecurity(securityInput, [0]);
|
|
121
|
+
|
|
122
|
+
const context = {
|
|
123
|
+
options: client._options,
|
|
124
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
125
|
+
operationID: "deleteScopedApiKey",
|
|
126
|
+
oAuth2Scopes: null,
|
|
127
|
+
|
|
128
|
+
resolvedSecurity: requestSecurity,
|
|
129
|
+
|
|
130
|
+
securitySource: client._options.bearerAuth,
|
|
131
|
+
retryConfig: options?.retries
|
|
132
|
+
|| client._options.retryConfig
|
|
133
|
+
|| {
|
|
134
|
+
strategy: "backoff",
|
|
135
|
+
backoff: {
|
|
136
|
+
initialInterval: 500,
|
|
137
|
+
maxInterval: 5000,
|
|
138
|
+
exponent: 1.5,
|
|
139
|
+
maxElapsedTime: 15000,
|
|
140
|
+
},
|
|
141
|
+
retryConnectionErrors: true,
|
|
142
|
+
}
|
|
143
|
+
|| { strategy: "none" },
|
|
144
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
const requestRes = client._createRequest(context, {
|
|
148
|
+
security: requestSecurity,
|
|
149
|
+
method: "POST",
|
|
150
|
+
baseURL: options?.serverURL,
|
|
151
|
+
path: path,
|
|
152
|
+
headers: headers,
|
|
153
|
+
body: body,
|
|
154
|
+
userAgent: client._options.userAgent,
|
|
155
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
156
|
+
}, options);
|
|
157
|
+
if (!requestRes.ok) {
|
|
158
|
+
return [requestRes, { status: "invalid" }];
|
|
159
|
+
}
|
|
160
|
+
const req = requestRes.value;
|
|
161
|
+
|
|
162
|
+
const doResult = await client._do(req, {
|
|
163
|
+
context,
|
|
164
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
165
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
166
|
+
retryConfig: context.retryConfig,
|
|
167
|
+
retryCodes: context.retryCodes,
|
|
168
|
+
});
|
|
169
|
+
if (!doResult.ok) {
|
|
170
|
+
return [doResult, { status: "request-error", request: req }];
|
|
171
|
+
}
|
|
172
|
+
const response = doResult.value;
|
|
173
|
+
|
|
174
|
+
const responseFields = {
|
|
175
|
+
HttpMeta: { Response: response, Request: req },
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
const [result] = await M.match<
|
|
179
|
+
operations.DeleteScopedApiKeyResponseBody,
|
|
180
|
+
| errors.DeleteScopedApiKeyResponseBody
|
|
181
|
+
| errors.DeleteScopedApiKeyAuthApiKeysResponseBody
|
|
182
|
+
| errors.DeleteScopedApiKeyAuthApiKeysResponseResponseBody
|
|
183
|
+
| errors.DeleteScopedApiKeyAuthApiKeysResponse404ResponseBody
|
|
184
|
+
| errors.DeleteScopedApiKeyAuthApiKeysResponse409ResponseBody
|
|
185
|
+
| errors.DeleteScopedApiKeyAuthApiKeysResponse410ResponseBody
|
|
186
|
+
| errors.DeleteScopedApiKeyAuthApiKeysResponse429ResponseBody
|
|
187
|
+
| SDKError
|
|
188
|
+
| ResponseValidationError
|
|
189
|
+
| ConnectionError
|
|
190
|
+
| RequestAbortedError
|
|
191
|
+
| RequestTimeoutError
|
|
192
|
+
| InvalidRequestError
|
|
193
|
+
| UnexpectedClientError
|
|
194
|
+
| SDKValidationError
|
|
195
|
+
>(
|
|
196
|
+
M.json(200, operations.DeleteScopedApiKeyResponseBody$inboundSchema),
|
|
197
|
+
M.jsonErr(400, errors.DeleteScopedApiKeyResponseBody$inboundSchema),
|
|
198
|
+
M.jsonErr(
|
|
199
|
+
401,
|
|
200
|
+
errors.DeleteScopedApiKeyAuthApiKeysResponseBody$inboundSchema,
|
|
201
|
+
),
|
|
202
|
+
M.jsonErr(
|
|
203
|
+
403,
|
|
204
|
+
errors.DeleteScopedApiKeyAuthApiKeysResponseResponseBody$inboundSchema,
|
|
205
|
+
),
|
|
206
|
+
M.jsonErr(
|
|
207
|
+
404,
|
|
208
|
+
errors.DeleteScopedApiKeyAuthApiKeysResponse404ResponseBody$inboundSchema,
|
|
209
|
+
),
|
|
210
|
+
M.jsonErr(
|
|
211
|
+
409,
|
|
212
|
+
errors.DeleteScopedApiKeyAuthApiKeysResponse409ResponseBody$inboundSchema,
|
|
213
|
+
),
|
|
214
|
+
M.jsonErr(
|
|
215
|
+
410,
|
|
216
|
+
errors.DeleteScopedApiKeyAuthApiKeysResponse410ResponseBody$inboundSchema,
|
|
217
|
+
),
|
|
218
|
+
M.jsonErr(
|
|
219
|
+
429,
|
|
220
|
+
errors.DeleteScopedApiKeyAuthApiKeysResponse429ResponseBody$inboundSchema,
|
|
221
|
+
),
|
|
222
|
+
M.fail("4XX"),
|
|
223
|
+
M.fail("5XX"),
|
|
224
|
+
)(response, req, { extraFields: responseFields });
|
|
225
|
+
if (!result.ok) {
|
|
226
|
+
return [result, { status: "complete", request: req, response }];
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
return [result, { status: "complete", request: req, response }];
|
|
230
|
+
}
|
package/src/lib/config.ts
CHANGED
|
@@ -65,7 +65,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
65
65
|
export const SDK_METADATA = {
|
|
66
66
|
language: "typescript",
|
|
67
67
|
openapiDocVersion: "1.1.0",
|
|
68
|
-
sdkVersion: "0.55.
|
|
68
|
+
sdkVersion: "0.55.21",
|
|
69
69
|
genVersion: "2.950.2",
|
|
70
|
-
userAgent: "speakeasy-sdk/typescript 0.55.
|
|
70
|
+
userAgent: "speakeasy-sdk/typescript 0.55.21 2.950.2 1.1.0 @meetkai/mka1",
|
|
71
71
|
} as const;
|
package/src/mcp-server/server.ts
CHANGED
|
@@ -60,6 +60,7 @@ import { tool$analyticsQuery } from "./tools/analyticsQuery.js";
|
|
|
60
60
|
import { tool$analyticsVisitorsSearch } from "./tools/analyticsVisitorsSearch.js";
|
|
61
61
|
import { tool$authApiKeyGetJwtFromKey } from "./tools/authApiKeyGetJwtFromKey.js";
|
|
62
62
|
import { tool$authApiKeysCreate } from "./tools/authApiKeysCreate.js";
|
|
63
|
+
import { tool$authApiKeysDelete } from "./tools/authApiKeysDelete.js";
|
|
63
64
|
import { tool$authApiKeysExchangeToken } from "./tools/authApiKeysExchangeToken.js";
|
|
64
65
|
import { tool$authApiKeysList } from "./tools/authApiKeysList.js";
|
|
65
66
|
import { tool$authApiKeysRegenerate } from "./tools/authApiKeysRegenerate.js";
|
|
@@ -513,7 +514,7 @@ export function createMCPServer(deps: {
|
|
|
513
514
|
}) {
|
|
514
515
|
const server = new McpServer({
|
|
515
516
|
name: "SDK",
|
|
516
|
-
version: "0.55.
|
|
517
|
+
version: "0.55.21",
|
|
517
518
|
});
|
|
518
519
|
|
|
519
520
|
const client = new SDKCore({
|
|
@@ -935,6 +936,7 @@ export function createMCPServer(deps: {
|
|
|
935
936
|
tool(tool$authApiKeysList);
|
|
936
937
|
tool(tool$authApiKeysUpdate);
|
|
937
938
|
tool(tool$authApiKeysRegenerate);
|
|
939
|
+
tool(tool$authApiKeysDelete);
|
|
938
940
|
tool(tool$authApiKeysExchangeToken);
|
|
939
941
|
tool(tool$authServiceAccountsCreate);
|
|
940
942
|
tool(tool$authServiceAccountsList);
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { authApiKeysDelete } from "../../funcs/authApiKeysDelete.js";
|
|
6
|
+
import * as operations from "../../models/operations/index.js";
|
|
7
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
+
|
|
9
|
+
const args = {
|
|
10
|
+
request: operations.DeleteScopedApiKeyRequest$inboundSchema,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const tool$authApiKeysDelete: ToolDefinition<typeof args> = {
|
|
14
|
+
name: "auth-api-keys-delete",
|
|
15
|
+
description: `Delete a scoped API key
|
|
16
|
+
|
|
17
|
+
Delete one of the caller's own keys. A key caller needs \`write:apikeys\` and may delete only keys in its own organization whose scopes it holds, including itself. Takes effect immediately.`,
|
|
18
|
+
args,
|
|
19
|
+
tool: async (client, args, ctx) => {
|
|
20
|
+
const [result, apiCall] = await authApiKeysDelete(
|
|
21
|
+
client,
|
|
22
|
+
args.request,
|
|
23
|
+
{ fetchOptions: { signal: ctx.mcpReq.signal } },
|
|
24
|
+
).$inspect();
|
|
25
|
+
|
|
26
|
+
if (!result.ok) {
|
|
27
|
+
return {
|
|
28
|
+
content: [{ type: "text", text: result.error.message }],
|
|
29
|
+
isError: true,
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const value = result.value;
|
|
34
|
+
|
|
35
|
+
return formatResult(value, apiCall);
|
|
36
|
+
},
|
|
37
|
+
};
|