@avallon-labs/mcp 23.7.0 → 23.8.0-staging.529
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/dist/index.js
CHANGED
|
@@ -330,6 +330,24 @@ var revokeApiKey = async (id, options) => {
|
|
|
330
330
|
headers: res.headers
|
|
331
331
|
};
|
|
332
332
|
};
|
|
333
|
+
var getUpdateApiKeyUrl = (id) => {
|
|
334
|
+
return `/platform/api-keys/${id}`;
|
|
335
|
+
};
|
|
336
|
+
var updateApiKey = async (id, updateApiKeyBody, options) => {
|
|
337
|
+
const res = await fetch(getUpdateApiKeyUrl(id), {
|
|
338
|
+
...options,
|
|
339
|
+
method: "PATCH",
|
|
340
|
+
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
341
|
+
body: JSON.stringify(updateApiKeyBody)
|
|
342
|
+
});
|
|
343
|
+
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
344
|
+
const data = body ? JSON.parse(body) : {};
|
|
345
|
+
return {
|
|
346
|
+
data,
|
|
347
|
+
status: res.status,
|
|
348
|
+
headers: res.headers
|
|
349
|
+
};
|
|
350
|
+
};
|
|
333
351
|
var getCreateArtifactUrl = () => {
|
|
334
352
|
return `/v1/artifacts`;
|
|
335
353
|
};
|
|
@@ -2269,6 +2287,17 @@ var revokeApiKeyHandler = async (args) => {
|
|
|
2269
2287
|
]
|
|
2270
2288
|
};
|
|
2271
2289
|
};
|
|
2290
|
+
var updateApiKeyHandler = async (args) => {
|
|
2291
|
+
const res = await updateApiKey(args.pathParams.id, args.bodyParams);
|
|
2292
|
+
return {
|
|
2293
|
+
content: [
|
|
2294
|
+
{
|
|
2295
|
+
type: "text",
|
|
2296
|
+
text: JSON.stringify(res)
|
|
2297
|
+
}
|
|
2298
|
+
]
|
|
2299
|
+
};
|
|
2300
|
+
};
|
|
2272
2301
|
var createArtifactHandler = async (args) => {
|
|
2273
2302
|
const res = await createArtifact(args.bodyParams);
|
|
2274
2303
|
return {
|
|
@@ -4331,6 +4360,7 @@ var ListApiKeysResponse = zod.object({
|
|
|
4331
4360
|
id: zod.string().describe("Unique identifier for the API key"),
|
|
4332
4361
|
name: zod.string().describe("Human-readable name for the API key"),
|
|
4333
4362
|
key_prefix: zod.string().describe("First 12 characters of the key (e.g. ak_live_abc1)"),
|
|
4363
|
+
role: zod.enum(["admin", "avallon_admin", "member"]).describe("Role granted to this API key"),
|
|
4334
4364
|
last_used_at: zod.string().datetime({}).optional().describe("Last usage timestamp, if ever used"),
|
|
4335
4365
|
expires_at: zod.string().datetime({}).optional().describe("Expiration date, if set"),
|
|
4336
4366
|
revoked_at: zod.string().datetime({}).optional().describe("Revocation timestamp, if revoked"),
|
|
@@ -4345,7 +4375,10 @@ var createApiKeyBodyEnvironmentDefault = `live`;
|
|
|
4345
4375
|
var CreateApiKeyBody = zod.object({
|
|
4346
4376
|
name: zod.string().min(1).max(createApiKeyBodyNameMax).describe("Human-readable name for the API key"),
|
|
4347
4377
|
expires_at: zod.string().datetime({}).optional().describe("Optional expiration date (ISO 8601)"),
|
|
4348
|
-
environment: zod.enum(["test", "live"]).default(createApiKeyBodyEnvironmentDefault).describe("Target environment for the key")
|
|
4378
|
+
environment: zod.enum(["test", "live"]).default(createApiKeyBodyEnvironmentDefault).describe("Target environment for the key"),
|
|
4379
|
+
role: zod.enum(["admin", "avallon_admin", "member"]).optional().describe(
|
|
4380
|
+
"Role granted to this API key (defaults to admin). Caller's role caps the maximum grantable role."
|
|
4381
|
+
)
|
|
4349
4382
|
});
|
|
4350
4383
|
var RevokeApiKeyParams = zod.object({
|
|
4351
4384
|
id: zod.string().uuid().describe("The API key ID to revoke")
|
|
@@ -4353,6 +4386,25 @@ var RevokeApiKeyParams = zod.object({
|
|
|
4353
4386
|
var RevokeApiKeyResponse = zod.object({
|
|
4354
4387
|
message: zod.string().describe("Confirmation message")
|
|
4355
4388
|
});
|
|
4389
|
+
var UpdateApiKeyParams = zod.object({
|
|
4390
|
+
id: zod.string().uuid().describe("The API key ID to update")
|
|
4391
|
+
});
|
|
4392
|
+
var UpdateApiKeyBody = zod.object({
|
|
4393
|
+
role: zod.enum(["admin", "avallon_admin", "member"]).describe(
|
|
4394
|
+
"New role to grant this API key. Caller's role caps the maximum grantable role."
|
|
4395
|
+
)
|
|
4396
|
+
});
|
|
4397
|
+
var UpdateApiKeyResponse = zod.object({
|
|
4398
|
+
id: zod.string().describe("Unique identifier for the API key"),
|
|
4399
|
+
name: zod.string().describe("Human-readable name for the API key"),
|
|
4400
|
+
key_prefix: zod.string().describe("First 12 characters of the key (e.g. ak_live_abc1)"),
|
|
4401
|
+
role: zod.enum(["admin", "avallon_admin", "member"]).describe("Role granted to this API key"),
|
|
4402
|
+
last_used_at: zod.string().datetime({}).optional().describe("Last usage timestamp, if ever used"),
|
|
4403
|
+
expires_at: zod.string().datetime({}).optional().describe("Expiration date, if set"),
|
|
4404
|
+
revoked_at: zod.string().datetime({}).optional().describe("Revocation timestamp, if revoked"),
|
|
4405
|
+
created_at: zod.string().datetime({}).describe("Creation timestamp"),
|
|
4406
|
+
updated_at: zod.string().datetime({}).describe("Last update timestamp")
|
|
4407
|
+
});
|
|
4356
4408
|
var createArtifactBodyFileBase64Max = 9e6;
|
|
4357
4409
|
var CreateArtifactBody = zod.object({
|
|
4358
4410
|
document_name: zod.string().min(1),
|
|
@@ -6259,6 +6311,15 @@ server.tool(
|
|
|
6259
6311
|
},
|
|
6260
6312
|
revokeApiKeyHandler
|
|
6261
6313
|
);
|
|
6314
|
+
server.tool(
|
|
6315
|
+
"updateApiKey",
|
|
6316
|
+
"Update API key",
|
|
6317
|
+
{
|
|
6318
|
+
pathParams: UpdateApiKeyParams,
|
|
6319
|
+
bodyParams: UpdateApiKeyBody
|
|
6320
|
+
},
|
|
6321
|
+
updateApiKeyHandler
|
|
6322
|
+
);
|
|
6262
6323
|
server.tool(
|
|
6263
6324
|
"createArtifact",
|
|
6264
6325
|
"Create artifact",
|
|
@@ -6945,4 +7006,4 @@ var transport = new StdioServerTransport();
|
|
|
6945
7006
|
server.connect(transport).then(() => {
|
|
6946
7007
|
console.error("MCP server running on stdio");
|
|
6947
7008
|
}).catch(console.error);
|
|
6948
|
-
//# sourceMappingURL=server-
|
|
7009
|
+
//# sourceMappingURL=server-GWOYZ3EY.js.map
|