@vercel/sdk 1.12.0 → 1.12.1
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 +8 -6
- package/bin/mcp-server.js +1174 -998
- package/bin/mcp-server.js.map +28 -25
- package/docs/sdks/edgecache/README.md +2 -2
- package/docs/sdks/projects/README.md +81 -0
- package/esm/__tests__/accessgroups.test.js +3 -1
- package/esm/__tests__/accessgroups.test.js.map +1 -1
- package/esm/__tests__/domains.test.js +9 -6
- package/esm/__tests__/domains.test.js.map +1 -1
- package/esm/__tests__/edgeconfig.test.js +6 -6
- package/esm/__tests__/edgeconfig.test.js.map +1 -1
- package/esm/__tests__/integrations.test.js +2 -2
- package/esm/__tests__/integrations.test.js.map +1 -1
- package/esm/__tests__/logdrains.test.js +9 -3
- package/esm/__tests__/logdrains.test.js.map +1 -1
- package/esm/__tests__/projects.test.js +21 -0
- package/esm/__tests__/projects.test.js.map +1 -1
- package/esm/__tests__/rollingrelease.test.js +5 -2
- package/esm/__tests__/rollingrelease.test.js.map +1 -1
- package/esm/__tests__/security.test.js +4 -4
- package/esm/__tests__/security.test.js.map +1 -1
- package/esm/funcs/edgeCacheDangerouslyDeleteByTags.d.ts +1 -1
- package/esm/funcs/edgeCacheDangerouslyDeleteByTags.js +1 -1
- package/esm/funcs/edgeCacheInvalidateByTags.d.ts +1 -1
- package/esm/funcs/edgeCacheInvalidateByTags.js +1 -1
- package/esm/funcs/edgeConfigCreateEdgeConfigToken.js +2 -2
- package/esm/funcs/edgeConfigCreateEdgeConfigToken.js.map +1 -1
- package/esm/funcs/edgeConfigDeleteEdgeConfig.js +2 -2
- package/esm/funcs/edgeConfigDeleteEdgeConfig.js.map +1 -1
- package/esm/funcs/edgeConfigDeleteEdgeConfigSchema.js +2 -2
- package/esm/funcs/edgeConfigDeleteEdgeConfigSchema.js.map +1 -1
- package/esm/funcs/edgeConfigDeleteEdgeConfigTokens.js +2 -2
- package/esm/funcs/edgeConfigDeleteEdgeConfigTokens.js.map +1 -1
- package/esm/funcs/edgeConfigPatchEdgeConfigSchema.js +2 -2
- package/esm/funcs/edgeConfigPatchEdgeConfigSchema.js.map +1 -1
- package/esm/funcs/edgeConfigUpdateEdgeConfig.js +2 -2
- package/esm/funcs/edgeConfigUpdateEdgeConfig.js.map +1 -1
- package/esm/funcs/integrationsCreateIntegrationStoreDirect.js +2 -2
- package/esm/funcs/integrationsCreateIntegrationStoreDirect.js.map +1 -1
- package/esm/funcs/integrationsDeleteConfiguration.js +2 -2
- package/esm/funcs/integrationsDeleteConfiguration.js.map +1 -1
- package/esm/funcs/projectsBatchRemoveProjectEnv.d.ts +20 -0
- package/esm/funcs/projectsBatchRemoveProjectEnv.d.ts.map +1 -0
- package/esm/funcs/projectsBatchRemoveProjectEnv.js +95 -0
- package/esm/funcs/projectsBatchRemoveProjectEnv.js.map +1 -0
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/mcp-server/mcp-server.js +1 -1
- package/esm/mcp-server/server.d.ts.map +1 -1
- package/esm/mcp-server/server.js +3 -1
- package/esm/mcp-server/server.js.map +1 -1
- package/esm/mcp-server/tools/edgeCacheDangerouslyDeleteByTags.js +1 -1
- package/esm/mcp-server/tools/edgeCacheInvalidateByTags.js +1 -1
- package/esm/mcp-server/tools/projectsBatchRemoveProjectEnv.d.ts +7 -0
- package/esm/mcp-server/tools/projectsBatchRemoveProjectEnv.d.ts.map +1 -0
- package/esm/mcp-server/tools/projectsBatchRemoveProjectEnv.js +28 -0
- package/esm/mcp-server/tools/projectsBatchRemoveProjectEnv.js.map +1 -0
- package/esm/models/batchremoveprojectenvop.d.ts +99 -0
- package/esm/models/batchremoveprojectenvop.d.ts.map +1 -0
- package/esm/models/batchremoveprojectenvop.js +100 -0
- package/esm/models/batchremoveprojectenvop.js.map +1 -0
- package/esm/models/createintegrationstoredirectop.d.ts +285 -285
- package/esm/models/createintegrationstoredirectop.js +351 -351
- package/esm/models/createwebhookop.d.ts +6 -0
- package/esm/models/createwebhookop.d.ts.map +1 -1
- package/esm/models/createwebhookop.js +2 -0
- package/esm/models/createwebhookop.js.map +1 -1
- package/esm/models/getbillingplansop.d.ts +2 -2
- package/esm/models/getbillingplansop.d.ts.map +1 -1
- package/esm/models/getbillingplansop.js +2 -2
- package/esm/models/getbillingplansop.js.map +1 -1
- package/esm/models/getconfigurationop.d.ts +302 -302
- package/esm/models/getconfigurationop.d.ts.map +1 -1
- package/esm/models/getconfigurationop.js +212 -212
- package/esm/models/getconfigurationop.js.map +1 -1
- package/esm/models/getconfigurationproductsop.d.ts +375 -375
- package/esm/models/getconfigurationproductsop.js +465 -465
- package/esm/models/getwebhookop.d.ts +3 -0
- package/esm/models/getwebhookop.d.ts.map +1 -1
- package/esm/models/getwebhookop.js +1 -0
- package/esm/models/getwebhookop.js.map +1 -1
- package/esm/models/getwebhooksop.d.ts +6 -0
- package/esm/models/getwebhooksop.d.ts.map +1 -1
- package/esm/models/getwebhooksop.js +2 -0
- package/esm/models/getwebhooksop.js.map +1 -1
- package/esm/sdk/edgecache.d.ts +2 -2
- package/esm/sdk/edgecache.js +2 -2
- package/esm/sdk/projects.d.ts +8 -0
- package/esm/sdk/projects.d.ts.map +1 -1
- package/esm/sdk/projects.js +10 -0
- package/esm/sdk/projects.js.map +1 -1
- package/examples/package-lock.json +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/__tests__/accessgroups.test.ts +3 -1
- package/src/__tests__/domains.test.ts +9 -6
- package/src/__tests__/edgeconfig.test.ts +6 -6
- package/src/__tests__/integrations.test.ts +3 -3
- package/src/__tests__/logdrains.test.ts +9 -3
- package/src/__tests__/projects.test.ts +24 -0
- package/src/__tests__/rollingrelease.test.ts +5 -2
- package/src/__tests__/security.test.ts +4 -4
- package/src/funcs/edgeCacheDangerouslyDeleteByTags.ts +1 -1
- package/src/funcs/edgeCacheInvalidateByTags.ts +1 -1
- package/src/funcs/edgeConfigCreateEdgeConfigToken.ts +2 -2
- package/src/funcs/edgeConfigDeleteEdgeConfig.ts +2 -2
- package/src/funcs/edgeConfigDeleteEdgeConfigSchema.ts +2 -2
- package/src/funcs/edgeConfigDeleteEdgeConfigTokens.ts +2 -2
- package/src/funcs/edgeConfigPatchEdgeConfigSchema.ts +2 -2
- package/src/funcs/edgeConfigUpdateEdgeConfig.ts +2 -2
- package/src/funcs/integrationsCreateIntegrationStoreDirect.ts +2 -2
- package/src/funcs/integrationsDeleteConfiguration.ts +2 -2
- package/src/funcs/projectsBatchRemoveProjectEnv.ts +206 -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/edgeCacheDangerouslyDeleteByTags.ts +1 -1
- package/src/mcp-server/tools/edgeCacheInvalidateByTags.ts +1 -1
- package/src/mcp-server/tools/projectsBatchRemoveProjectEnv.ts +37 -0
- package/src/models/batchremoveprojectenvop.ts +228 -0
- package/src/models/createintegrationstoredirectop.ts +604 -604
- package/src/models/createwebhookop.ts +2 -0
- package/src/models/getbillingplansop.ts +4 -4
- package/src/models/getconfigurationop.ts +651 -651
- package/src/models/getconfigurationproductsop.ts +802 -802
- package/src/models/getwebhookop.ts +1 -0
- package/src/models/getwebhooksop.ts +2 -0
- package/src/sdk/edgecache.ts +2 -2
- package/src/sdk/projects.ts +22 -0
- package/vercel-spec.json +401 -239
|
@@ -162,7 +162,7 @@ async function $do(
|
|
|
162
162
|
|
|
163
163
|
const doResult = await client._do(req, {
|
|
164
164
|
context,
|
|
165
|
-
errorCodes: ["400", "401", "403", "404", "4XX", "5XX"],
|
|
165
|
+
errorCodes: ["400", "401", "403", "404", "409", "4XX", "5XX"],
|
|
166
166
|
retryConfig: context.retryConfig,
|
|
167
167
|
retryCodes: context.retryCodes,
|
|
168
168
|
});
|
|
@@ -193,7 +193,7 @@ async function $do(
|
|
|
193
193
|
M.jsonErr(400, VercelBadRequestError$inboundSchema),
|
|
194
194
|
M.jsonErr(401, VercelForbiddenError$inboundSchema),
|
|
195
195
|
M.jsonErr(404, VercelNotFoundError$inboundSchema),
|
|
196
|
-
M.fail([403, "4XX"]),
|
|
196
|
+
M.fail([403, 409, "4XX"]),
|
|
197
197
|
M.fail("5XX"),
|
|
198
198
|
)(response, req, { extraFields: responseFields });
|
|
199
199
|
if (!result.ok) {
|
|
@@ -162,7 +162,7 @@ async function $do(
|
|
|
162
162
|
|
|
163
163
|
const doResult = await client._do(req, {
|
|
164
164
|
context,
|
|
165
|
-
errorCodes: ["400", "401", "402", "403", "404", "4XX", "5XX"],
|
|
165
|
+
errorCodes: ["400", "401", "402", "403", "404", "409", "4XX", "5XX"],
|
|
166
166
|
retryConfig: context.retryConfig,
|
|
167
167
|
retryCodes: context.retryCodes,
|
|
168
168
|
});
|
|
@@ -193,7 +193,7 @@ async function $do(
|
|
|
193
193
|
M.jsonErr(400, VercelBadRequestError$inboundSchema),
|
|
194
194
|
M.jsonErr(401, VercelForbiddenError$inboundSchema),
|
|
195
195
|
M.jsonErr(404, VercelNotFoundError$inboundSchema),
|
|
196
|
-
M.fail([402, 403, "4XX"]),
|
|
196
|
+
M.fail([402, 403, 409, "4XX"]),
|
|
197
197
|
M.fail("5XX"),
|
|
198
198
|
)(response, req, { extraFields: responseFields });
|
|
199
199
|
if (!result.ok) {
|
|
@@ -163,7 +163,7 @@ async function $do(
|
|
|
163
163
|
|
|
164
164
|
const doResult = await client._do(req, {
|
|
165
165
|
context,
|
|
166
|
-
errorCodes: ["400", "401", "402", "403", "404", "4XX", "5XX"],
|
|
166
|
+
errorCodes: ["400", "401", "402", "403", "404", "409", "4XX", "5XX"],
|
|
167
167
|
retryConfig: context.retryConfig,
|
|
168
168
|
retryCodes: context.retryCodes,
|
|
169
169
|
});
|
|
@@ -194,7 +194,7 @@ async function $do(
|
|
|
194
194
|
M.jsonErr(400, VercelBadRequestError$inboundSchema),
|
|
195
195
|
M.jsonErr(401, VercelForbiddenError$inboundSchema),
|
|
196
196
|
M.jsonErr(404, VercelNotFoundError$inboundSchema),
|
|
197
|
-
M.fail([402, 403, "4XX"]),
|
|
197
|
+
M.fail([402, 403, 409, "4XX"]),
|
|
198
198
|
M.fail("5XX"),
|
|
199
199
|
)(response, req, { extraFields: responseFields });
|
|
200
200
|
if (!result.ok) {
|
|
@@ -165,7 +165,7 @@ async function $do(
|
|
|
165
165
|
|
|
166
166
|
const doResult = await client._do(req, {
|
|
167
167
|
context,
|
|
168
|
-
errorCodes: ["400", "401", "402", "403", "404", "4XX", "5XX"],
|
|
168
|
+
errorCodes: ["400", "401", "402", "403", "404", "409", "4XX", "5XX"],
|
|
169
169
|
retryConfig: context.retryConfig,
|
|
170
170
|
retryCodes: context.retryCodes,
|
|
171
171
|
});
|
|
@@ -196,7 +196,7 @@ async function $do(
|
|
|
196
196
|
M.jsonErr(400, VercelBadRequestError$inboundSchema),
|
|
197
197
|
M.jsonErr(401, VercelForbiddenError$inboundSchema),
|
|
198
198
|
M.jsonErr(404, VercelNotFoundError$inboundSchema),
|
|
199
|
-
M.fail([402, 403, "4XX"]),
|
|
199
|
+
M.fail([402, 403, 409, "4XX"]),
|
|
200
200
|
M.fail("5XX"),
|
|
201
201
|
)(response, req, { extraFields: responseFields });
|
|
202
202
|
if (!result.ok) {
|
|
@@ -164,7 +164,7 @@ async function $do(
|
|
|
164
164
|
|
|
165
165
|
const doResult = await client._do(req, {
|
|
166
166
|
context,
|
|
167
|
-
errorCodes: ["400", "401", "402", "403", "404", "4XX", "5XX"],
|
|
167
|
+
errorCodes: ["400", "401", "402", "403", "404", "409", "4XX", "5XX"],
|
|
168
168
|
retryConfig: context.retryConfig,
|
|
169
169
|
retryCodes: context.retryCodes,
|
|
170
170
|
});
|
|
@@ -195,7 +195,7 @@ async function $do(
|
|
|
195
195
|
M.jsonErr(400, VercelBadRequestError$inboundSchema),
|
|
196
196
|
M.jsonErr(401, VercelForbiddenError$inboundSchema),
|
|
197
197
|
M.jsonErr(404, VercelNotFoundError$inboundSchema),
|
|
198
|
-
M.fail([402, 403, "4XX"]),
|
|
198
|
+
M.fail([402, 403, 409, "4XX"]),
|
|
199
199
|
M.fail("5XX"),
|
|
200
200
|
)(response, req, { extraFields: responseFields });
|
|
201
201
|
if (!result.ok) {
|
|
@@ -163,7 +163,7 @@ async function $do(
|
|
|
163
163
|
|
|
164
164
|
const doResult = await client._do(req, {
|
|
165
165
|
context,
|
|
166
|
-
errorCodes: ["400", "401", "402", "403", "404", "429", "4XX", "5XX"],
|
|
166
|
+
errorCodes: ["400", "401", "402", "403", "404", "409", "429", "4XX", "5XX"],
|
|
167
167
|
retryConfig: context.retryConfig,
|
|
168
168
|
retryCodes: context.retryCodes,
|
|
169
169
|
});
|
|
@@ -196,7 +196,7 @@ async function $do(
|
|
|
196
196
|
M.jsonErr(401, VercelForbiddenError$inboundSchema),
|
|
197
197
|
M.jsonErr(404, VercelNotFoundError$inboundSchema),
|
|
198
198
|
M.jsonErr(429, VercelRateLimitError$inboundSchema),
|
|
199
|
-
M.fail([402, 403, "4XX"]),
|
|
199
|
+
M.fail([402, 403, 409, "4XX"]),
|
|
200
200
|
M.fail("5XX"),
|
|
201
201
|
)(response, req, { extraFields: responseFields });
|
|
202
202
|
if (!result.ok) {
|
|
@@ -162,7 +162,7 @@ async function $do(
|
|
|
162
162
|
|
|
163
163
|
const doResult = await client._do(req, {
|
|
164
164
|
context,
|
|
165
|
-
errorCodes: ["400", "401", "403", "404", "4XX", "5XX"],
|
|
165
|
+
errorCodes: ["400", "401", "403", "404", "409", "4XX", "5XX"],
|
|
166
166
|
retryConfig: context.retryConfig,
|
|
167
167
|
retryCodes: context.retryCodes,
|
|
168
168
|
});
|
|
@@ -193,7 +193,7 @@ async function $do(
|
|
|
193
193
|
M.jsonErr(400, VercelBadRequestError$inboundSchema),
|
|
194
194
|
M.jsonErr(401, VercelForbiddenError$inboundSchema),
|
|
195
195
|
M.jsonErr(404, VercelNotFoundError$inboundSchema),
|
|
196
|
-
M.fail([403, "4XX"]),
|
|
196
|
+
M.fail([403, 409, "4XX"]),
|
|
197
197
|
M.fail("5XX"),
|
|
198
198
|
)(response, req, { extraFields: responseFields });
|
|
199
199
|
if (!result.ok) {
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { VercelCore } from "../core.js";
|
|
6
|
+
import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js";
|
|
7
|
+
import * as M from "../lib/matchers.js";
|
|
8
|
+
import { compactMap } from "../lib/primitives.js";
|
|
9
|
+
import { safeParse } from "../lib/schemas.js";
|
|
10
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
11
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
|
+
import { pathToFunc } from "../lib/url.js";
|
|
13
|
+
import {
|
|
14
|
+
BatchRemoveProjectEnvRequest,
|
|
15
|
+
BatchRemoveProjectEnvRequest$outboundSchema,
|
|
16
|
+
BatchRemoveProjectEnvResponseBody,
|
|
17
|
+
BatchRemoveProjectEnvResponseBody$inboundSchema,
|
|
18
|
+
} from "../models/batchremoveprojectenvop.js";
|
|
19
|
+
import {
|
|
20
|
+
ConnectionError,
|
|
21
|
+
InvalidRequestError,
|
|
22
|
+
RequestAbortedError,
|
|
23
|
+
RequestTimeoutError,
|
|
24
|
+
UnexpectedClientError,
|
|
25
|
+
} from "../models/httpclienterrors.js";
|
|
26
|
+
import { ResponseValidationError } from "../models/responsevalidationerror.js";
|
|
27
|
+
import { SDKValidationError } from "../models/sdkvalidationerror.js";
|
|
28
|
+
import {
|
|
29
|
+
VercelBadRequestError,
|
|
30
|
+
VercelBadRequestError$inboundSchema,
|
|
31
|
+
} from "../models/vercelbadrequesterror.js";
|
|
32
|
+
import { VercelError } from "../models/vercelerror.js";
|
|
33
|
+
import {
|
|
34
|
+
VercelForbiddenError,
|
|
35
|
+
VercelForbiddenError$inboundSchema,
|
|
36
|
+
} from "../models/vercelforbiddenerror.js";
|
|
37
|
+
import {
|
|
38
|
+
VercelNotFoundError,
|
|
39
|
+
VercelNotFoundError$inboundSchema,
|
|
40
|
+
} from "../models/vercelnotfounderror.js";
|
|
41
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
42
|
+
import { Result } from "../types/fp.js";
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Batch remove environment variables
|
|
46
|
+
*
|
|
47
|
+
* @remarks
|
|
48
|
+
* Delete multiple environment variables for a given project in a single batch operation.
|
|
49
|
+
*/
|
|
50
|
+
export function projectsBatchRemoveProjectEnv(
|
|
51
|
+
client: VercelCore,
|
|
52
|
+
request: BatchRemoveProjectEnvRequest,
|
|
53
|
+
options?: RequestOptions,
|
|
54
|
+
): APIPromise<
|
|
55
|
+
Result<
|
|
56
|
+
BatchRemoveProjectEnvResponseBody,
|
|
57
|
+
| VercelBadRequestError
|
|
58
|
+
| VercelForbiddenError
|
|
59
|
+
| VercelNotFoundError
|
|
60
|
+
| VercelError
|
|
61
|
+
| ResponseValidationError
|
|
62
|
+
| ConnectionError
|
|
63
|
+
| RequestAbortedError
|
|
64
|
+
| RequestTimeoutError
|
|
65
|
+
| InvalidRequestError
|
|
66
|
+
| UnexpectedClientError
|
|
67
|
+
| SDKValidationError
|
|
68
|
+
>
|
|
69
|
+
> {
|
|
70
|
+
return new APIPromise($do(
|
|
71
|
+
client,
|
|
72
|
+
request,
|
|
73
|
+
options,
|
|
74
|
+
));
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
async function $do(
|
|
78
|
+
client: VercelCore,
|
|
79
|
+
request: BatchRemoveProjectEnvRequest,
|
|
80
|
+
options?: RequestOptions,
|
|
81
|
+
): Promise<
|
|
82
|
+
[
|
|
83
|
+
Result<
|
|
84
|
+
BatchRemoveProjectEnvResponseBody,
|
|
85
|
+
| VercelBadRequestError
|
|
86
|
+
| VercelForbiddenError
|
|
87
|
+
| VercelNotFoundError
|
|
88
|
+
| VercelError
|
|
89
|
+
| ResponseValidationError
|
|
90
|
+
| ConnectionError
|
|
91
|
+
| RequestAbortedError
|
|
92
|
+
| RequestTimeoutError
|
|
93
|
+
| InvalidRequestError
|
|
94
|
+
| UnexpectedClientError
|
|
95
|
+
| SDKValidationError
|
|
96
|
+
>,
|
|
97
|
+
APICall,
|
|
98
|
+
]
|
|
99
|
+
> {
|
|
100
|
+
const parsed = safeParse(
|
|
101
|
+
request,
|
|
102
|
+
(value) => BatchRemoveProjectEnvRequest$outboundSchema.parse(value),
|
|
103
|
+
"Input validation failed",
|
|
104
|
+
);
|
|
105
|
+
if (!parsed.ok) {
|
|
106
|
+
return [parsed, { status: "invalid" }];
|
|
107
|
+
}
|
|
108
|
+
const payload = parsed.value;
|
|
109
|
+
const body = encodeJSON("body", payload.RequestBody, { explode: true });
|
|
110
|
+
|
|
111
|
+
const pathParams = {
|
|
112
|
+
idOrName: encodeSimple("idOrName", payload.idOrName, {
|
|
113
|
+
explode: false,
|
|
114
|
+
charEncoding: "percent",
|
|
115
|
+
}),
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
const path = pathToFunc("/v1/projects/{idOrName}/env")(pathParams);
|
|
119
|
+
|
|
120
|
+
const query = encodeFormQuery({
|
|
121
|
+
"slug": payload.slug,
|
|
122
|
+
"teamId": payload.teamId,
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
const headers = new Headers(compactMap({
|
|
126
|
+
"Content-Type": "application/json",
|
|
127
|
+
Accept: "application/json",
|
|
128
|
+
}));
|
|
129
|
+
|
|
130
|
+
const secConfig = await extractSecurity(client._options.bearerToken);
|
|
131
|
+
const securityInput = secConfig == null ? {} : { bearerToken: secConfig };
|
|
132
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
133
|
+
|
|
134
|
+
const context = {
|
|
135
|
+
options: client._options,
|
|
136
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
137
|
+
operationID: "batchRemoveProjectEnv",
|
|
138
|
+
oAuth2Scopes: [],
|
|
139
|
+
|
|
140
|
+
resolvedSecurity: requestSecurity,
|
|
141
|
+
|
|
142
|
+
securitySource: client._options.bearerToken,
|
|
143
|
+
retryConfig: options?.retries
|
|
144
|
+
|| client._options.retryConfig
|
|
145
|
+
|| { strategy: "none" },
|
|
146
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
const requestRes = client._createRequest(context, {
|
|
150
|
+
security: requestSecurity,
|
|
151
|
+
method: "DELETE",
|
|
152
|
+
baseURL: options?.serverURL,
|
|
153
|
+
path: path,
|
|
154
|
+
headers: headers,
|
|
155
|
+
query: query,
|
|
156
|
+
body: body,
|
|
157
|
+
userAgent: client._options.userAgent,
|
|
158
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
159
|
+
}, options);
|
|
160
|
+
if (!requestRes.ok) {
|
|
161
|
+
return [requestRes, { status: "invalid" }];
|
|
162
|
+
}
|
|
163
|
+
const req = requestRes.value;
|
|
164
|
+
|
|
165
|
+
const doResult = await client._do(req, {
|
|
166
|
+
context,
|
|
167
|
+
errorCodes: ["400", "401", "403", "404", "409", "4XX", "5XX"],
|
|
168
|
+
retryConfig: context.retryConfig,
|
|
169
|
+
retryCodes: context.retryCodes,
|
|
170
|
+
});
|
|
171
|
+
if (!doResult.ok) {
|
|
172
|
+
return [doResult, { status: "request-error", request: req }];
|
|
173
|
+
}
|
|
174
|
+
const response = doResult.value;
|
|
175
|
+
|
|
176
|
+
const responseFields = {
|
|
177
|
+
HttpMeta: { Response: response, Request: req },
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
const [result] = await M.match<
|
|
181
|
+
BatchRemoveProjectEnvResponseBody,
|
|
182
|
+
| VercelBadRequestError
|
|
183
|
+
| VercelForbiddenError
|
|
184
|
+
| VercelNotFoundError
|
|
185
|
+
| VercelError
|
|
186
|
+
| ResponseValidationError
|
|
187
|
+
| ConnectionError
|
|
188
|
+
| RequestAbortedError
|
|
189
|
+
| RequestTimeoutError
|
|
190
|
+
| InvalidRequestError
|
|
191
|
+
| UnexpectedClientError
|
|
192
|
+
| SDKValidationError
|
|
193
|
+
>(
|
|
194
|
+
M.json(200, BatchRemoveProjectEnvResponseBody$inboundSchema),
|
|
195
|
+
M.jsonErr(400, VercelBadRequestError$inboundSchema),
|
|
196
|
+
M.jsonErr(401, VercelForbiddenError$inboundSchema),
|
|
197
|
+
M.jsonErr(404, VercelNotFoundError$inboundSchema),
|
|
198
|
+
M.fail([403, 409, "4XX"]),
|
|
199
|
+
M.fail("5XX"),
|
|
200
|
+
)(response, req, { extraFields: responseFields });
|
|
201
|
+
if (!result.ok) {
|
|
202
|
+
return [result, { status: "complete", request: req, response }];
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
return [result, { status: "complete", request: req, response }];
|
|
206
|
+
}
|
package/src/lib/config.ts
CHANGED
|
@@ -61,7 +61,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
61
61
|
export const SDK_METADATA = {
|
|
62
62
|
language: "typescript",
|
|
63
63
|
openapiDocVersion: "0.0.1",
|
|
64
|
-
sdkVersion: "1.12.
|
|
64
|
+
sdkVersion: "1.12.1",
|
|
65
65
|
genVersion: "2.721.0",
|
|
66
|
-
userAgent: "speakeasy-sdk/typescript 1.12.
|
|
66
|
+
userAgent: "speakeasy-sdk/typescript 1.12.1 2.721.0 0.0.1 @vercel/sdk",
|
|
67
67
|
} as const;
|
package/src/mcp-server/server.ts
CHANGED
|
@@ -133,6 +133,7 @@ import { tool$projectMembersGetProjectMembers } from "./tools/projectMembersGetP
|
|
|
133
133
|
import { tool$projectMembersRemoveProjectMember } from "./tools/projectMembersRemoveProjectMember.js";
|
|
134
134
|
import { tool$projectsAcceptProjectTransferRequest } from "./tools/projectsAcceptProjectTransferRequest.js";
|
|
135
135
|
import { tool$projectsAddProjectDomain } from "./tools/projectsAddProjectDomain.js";
|
|
136
|
+
import { tool$projectsBatchRemoveProjectEnv } from "./tools/projectsBatchRemoveProjectEnv.js";
|
|
136
137
|
import { tool$projectsCreateProject } from "./tools/projectsCreateProject.js";
|
|
137
138
|
import { tool$projectsCreateProjectEnv } from "./tools/projectsCreateProjectEnv.js";
|
|
138
139
|
import { tool$projectsCreateProjectTransferRequest } from "./tools/projectsCreateProjectTransferRequest.js";
|
|
@@ -201,7 +202,7 @@ export function createMCPServer(deps: {
|
|
|
201
202
|
}) {
|
|
202
203
|
const server = new McpServer({
|
|
203
204
|
name: "Vercel",
|
|
204
|
-
version: "1.12.
|
|
205
|
+
version: "1.12.1",
|
|
205
206
|
});
|
|
206
207
|
|
|
207
208
|
const client = new VercelCore({
|
|
@@ -270,6 +271,7 @@ export function createMCPServer(deps: {
|
|
|
270
271
|
tool(tool$projectsGetProjectEnv);
|
|
271
272
|
tool(tool$projectsRemoveProjectEnv);
|
|
272
273
|
tool(tool$projectsEditProjectEnv);
|
|
274
|
+
tool(tool$projectsBatchRemoveProjectEnv);
|
|
273
275
|
tool(tool$projectsCreateProjectTransferRequest);
|
|
274
276
|
tool(tool$projectsAcceptProjectTransferRequest);
|
|
275
277
|
tool(tool$projectsUpdateProjectProtectionBypass);
|
|
@@ -14,7 +14,7 @@ export const tool$edgeCacheDangerouslyDeleteByTags: ToolDefinition<
|
|
|
14
14
|
typeof args
|
|
15
15
|
> = {
|
|
16
16
|
name: "edge-cache-dangerously-delete-by-tags",
|
|
17
|
-
description: `Dangerously delete
|
|
17
|
+
description: `Dangerously delete by tag
|
|
18
18
|
|
|
19
19
|
Marks a cache tag as deleted, causing cache entries associated with that tag to be revalidated in the foreground on the next request. Use this method with caution because one tag can be associated with many paths and deleting the cache can cause many concurrent requests to the origin leading to cache stampede problem. A good use case for deleting the cache is when the origin has also been deleted, for example it returns a 404 or 410 status code.`,
|
|
20
20
|
args,
|
|
@@ -12,7 +12,7 @@ const args = {
|
|
|
12
12
|
|
|
13
13
|
export const tool$edgeCacheInvalidateByTags: ToolDefinition<typeof args> = {
|
|
14
14
|
name: "edge-cache-invalidate-by-tags",
|
|
15
|
-
description: `Invalidate
|
|
15
|
+
description: `Invalidate by tag
|
|
16
16
|
|
|
17
17
|
Marks a cache tag as stale, causing cache entries associated with that tag to be revalidated in the background on the next request.`,
|
|
18
18
|
args,
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { projectsBatchRemoveProjectEnv } from "../../funcs/projectsBatchRemoveProjectEnv.js";
|
|
6
|
+
import { BatchRemoveProjectEnvRequest$inboundSchema } from "../../models/batchremoveprojectenvop.js";
|
|
7
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
+
|
|
9
|
+
const args = {
|
|
10
|
+
request: BatchRemoveProjectEnvRequest$inboundSchema,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const tool$projectsBatchRemoveProjectEnv: ToolDefinition<typeof args> = {
|
|
14
|
+
name: "projects-batch-remove-project-env",
|
|
15
|
+
description: `Batch remove environment variables
|
|
16
|
+
|
|
17
|
+
Delete multiple environment variables for a given project in a single batch operation.`,
|
|
18
|
+
args,
|
|
19
|
+
tool: async (client, args, ctx) => {
|
|
20
|
+
const [result, apiCall] = await projectsBatchRemoveProjectEnv(
|
|
21
|
+
client,
|
|
22
|
+
args.request,
|
|
23
|
+
{ fetchOptions: { signal: ctx.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
|
+
};
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "./sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
export type BatchRemoveProjectEnvRequestBody = {
|
|
12
|
+
/**
|
|
13
|
+
* Array of environment variable IDs to delete
|
|
14
|
+
*/
|
|
15
|
+
ids: Array<string>;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export type BatchRemoveProjectEnvRequest = {
|
|
19
|
+
/**
|
|
20
|
+
* The unique project identifier or the project name
|
|
21
|
+
*/
|
|
22
|
+
idOrName: string;
|
|
23
|
+
/**
|
|
24
|
+
* The Team identifier to perform the request on behalf of.
|
|
25
|
+
*/
|
|
26
|
+
teamId?: string | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* The Team slug to perform the request on behalf of.
|
|
29
|
+
*/
|
|
30
|
+
slug?: string | undefined;
|
|
31
|
+
requestBody?: BatchRemoveProjectEnvRequestBody | undefined;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export type BatchRemoveProjectEnvResponseBody = {
|
|
35
|
+
deleted: number;
|
|
36
|
+
ids: Array<string>;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/** @internal */
|
|
40
|
+
export const BatchRemoveProjectEnvRequestBody$inboundSchema: z.ZodType<
|
|
41
|
+
BatchRemoveProjectEnvRequestBody,
|
|
42
|
+
z.ZodTypeDef,
|
|
43
|
+
unknown
|
|
44
|
+
> = z.object({
|
|
45
|
+
ids: z.array(z.string()),
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
/** @internal */
|
|
49
|
+
export type BatchRemoveProjectEnvRequestBody$Outbound = {
|
|
50
|
+
ids: Array<string>;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
/** @internal */
|
|
54
|
+
export const BatchRemoveProjectEnvRequestBody$outboundSchema: z.ZodType<
|
|
55
|
+
BatchRemoveProjectEnvRequestBody$Outbound,
|
|
56
|
+
z.ZodTypeDef,
|
|
57
|
+
BatchRemoveProjectEnvRequestBody
|
|
58
|
+
> = z.object({
|
|
59
|
+
ids: z.array(z.string()),
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* @internal
|
|
64
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
65
|
+
*/
|
|
66
|
+
export namespace BatchRemoveProjectEnvRequestBody$ {
|
|
67
|
+
/** @deprecated use `BatchRemoveProjectEnvRequestBody$inboundSchema` instead. */
|
|
68
|
+
export const inboundSchema = BatchRemoveProjectEnvRequestBody$inboundSchema;
|
|
69
|
+
/** @deprecated use `BatchRemoveProjectEnvRequestBody$outboundSchema` instead. */
|
|
70
|
+
export const outboundSchema = BatchRemoveProjectEnvRequestBody$outboundSchema;
|
|
71
|
+
/** @deprecated use `BatchRemoveProjectEnvRequestBody$Outbound` instead. */
|
|
72
|
+
export type Outbound = BatchRemoveProjectEnvRequestBody$Outbound;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function batchRemoveProjectEnvRequestBodyToJSON(
|
|
76
|
+
batchRemoveProjectEnvRequestBody: BatchRemoveProjectEnvRequestBody,
|
|
77
|
+
): string {
|
|
78
|
+
return JSON.stringify(
|
|
79
|
+
BatchRemoveProjectEnvRequestBody$outboundSchema.parse(
|
|
80
|
+
batchRemoveProjectEnvRequestBody,
|
|
81
|
+
),
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export function batchRemoveProjectEnvRequestBodyFromJSON(
|
|
86
|
+
jsonString: string,
|
|
87
|
+
): SafeParseResult<BatchRemoveProjectEnvRequestBody, SDKValidationError> {
|
|
88
|
+
return safeParse(
|
|
89
|
+
jsonString,
|
|
90
|
+
(x) => BatchRemoveProjectEnvRequestBody$inboundSchema.parse(JSON.parse(x)),
|
|
91
|
+
`Failed to parse 'BatchRemoveProjectEnvRequestBody' from JSON`,
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/** @internal */
|
|
96
|
+
export const BatchRemoveProjectEnvRequest$inboundSchema: z.ZodType<
|
|
97
|
+
BatchRemoveProjectEnvRequest,
|
|
98
|
+
z.ZodTypeDef,
|
|
99
|
+
unknown
|
|
100
|
+
> = z.object({
|
|
101
|
+
idOrName: z.string(),
|
|
102
|
+
teamId: z.string().optional(),
|
|
103
|
+
slug: z.string().optional(),
|
|
104
|
+
RequestBody: z.lazy(() => BatchRemoveProjectEnvRequestBody$inboundSchema)
|
|
105
|
+
.optional(),
|
|
106
|
+
}).transform((v) => {
|
|
107
|
+
return remap$(v, {
|
|
108
|
+
"RequestBody": "requestBody",
|
|
109
|
+
});
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
/** @internal */
|
|
113
|
+
export type BatchRemoveProjectEnvRequest$Outbound = {
|
|
114
|
+
idOrName: string;
|
|
115
|
+
teamId?: string | undefined;
|
|
116
|
+
slug?: string | undefined;
|
|
117
|
+
RequestBody?: BatchRemoveProjectEnvRequestBody$Outbound | undefined;
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
/** @internal */
|
|
121
|
+
export const BatchRemoveProjectEnvRequest$outboundSchema: z.ZodType<
|
|
122
|
+
BatchRemoveProjectEnvRequest$Outbound,
|
|
123
|
+
z.ZodTypeDef,
|
|
124
|
+
BatchRemoveProjectEnvRequest
|
|
125
|
+
> = z.object({
|
|
126
|
+
idOrName: z.string(),
|
|
127
|
+
teamId: z.string().optional(),
|
|
128
|
+
slug: z.string().optional(),
|
|
129
|
+
requestBody: z.lazy(() => BatchRemoveProjectEnvRequestBody$outboundSchema)
|
|
130
|
+
.optional(),
|
|
131
|
+
}).transform((v) => {
|
|
132
|
+
return remap$(v, {
|
|
133
|
+
requestBody: "RequestBody",
|
|
134
|
+
});
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* @internal
|
|
139
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
140
|
+
*/
|
|
141
|
+
export namespace BatchRemoveProjectEnvRequest$ {
|
|
142
|
+
/** @deprecated use `BatchRemoveProjectEnvRequest$inboundSchema` instead. */
|
|
143
|
+
export const inboundSchema = BatchRemoveProjectEnvRequest$inboundSchema;
|
|
144
|
+
/** @deprecated use `BatchRemoveProjectEnvRequest$outboundSchema` instead. */
|
|
145
|
+
export const outboundSchema = BatchRemoveProjectEnvRequest$outboundSchema;
|
|
146
|
+
/** @deprecated use `BatchRemoveProjectEnvRequest$Outbound` instead. */
|
|
147
|
+
export type Outbound = BatchRemoveProjectEnvRequest$Outbound;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export function batchRemoveProjectEnvRequestToJSON(
|
|
151
|
+
batchRemoveProjectEnvRequest: BatchRemoveProjectEnvRequest,
|
|
152
|
+
): string {
|
|
153
|
+
return JSON.stringify(
|
|
154
|
+
BatchRemoveProjectEnvRequest$outboundSchema.parse(
|
|
155
|
+
batchRemoveProjectEnvRequest,
|
|
156
|
+
),
|
|
157
|
+
);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export function batchRemoveProjectEnvRequestFromJSON(
|
|
161
|
+
jsonString: string,
|
|
162
|
+
): SafeParseResult<BatchRemoveProjectEnvRequest, SDKValidationError> {
|
|
163
|
+
return safeParse(
|
|
164
|
+
jsonString,
|
|
165
|
+
(x) => BatchRemoveProjectEnvRequest$inboundSchema.parse(JSON.parse(x)),
|
|
166
|
+
`Failed to parse 'BatchRemoveProjectEnvRequest' from JSON`,
|
|
167
|
+
);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/** @internal */
|
|
171
|
+
export const BatchRemoveProjectEnvResponseBody$inboundSchema: z.ZodType<
|
|
172
|
+
BatchRemoveProjectEnvResponseBody,
|
|
173
|
+
z.ZodTypeDef,
|
|
174
|
+
unknown
|
|
175
|
+
> = z.object({
|
|
176
|
+
deleted: z.number(),
|
|
177
|
+
ids: z.array(z.string()),
|
|
178
|
+
});
|
|
179
|
+
|
|
180
|
+
/** @internal */
|
|
181
|
+
export type BatchRemoveProjectEnvResponseBody$Outbound = {
|
|
182
|
+
deleted: number;
|
|
183
|
+
ids: Array<string>;
|
|
184
|
+
};
|
|
185
|
+
|
|
186
|
+
/** @internal */
|
|
187
|
+
export const BatchRemoveProjectEnvResponseBody$outboundSchema: z.ZodType<
|
|
188
|
+
BatchRemoveProjectEnvResponseBody$Outbound,
|
|
189
|
+
z.ZodTypeDef,
|
|
190
|
+
BatchRemoveProjectEnvResponseBody
|
|
191
|
+
> = z.object({
|
|
192
|
+
deleted: z.number(),
|
|
193
|
+
ids: z.array(z.string()),
|
|
194
|
+
});
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* @internal
|
|
198
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
199
|
+
*/
|
|
200
|
+
export namespace BatchRemoveProjectEnvResponseBody$ {
|
|
201
|
+
/** @deprecated use `BatchRemoveProjectEnvResponseBody$inboundSchema` instead. */
|
|
202
|
+
export const inboundSchema = BatchRemoveProjectEnvResponseBody$inboundSchema;
|
|
203
|
+
/** @deprecated use `BatchRemoveProjectEnvResponseBody$outboundSchema` instead. */
|
|
204
|
+
export const outboundSchema =
|
|
205
|
+
BatchRemoveProjectEnvResponseBody$outboundSchema;
|
|
206
|
+
/** @deprecated use `BatchRemoveProjectEnvResponseBody$Outbound` instead. */
|
|
207
|
+
export type Outbound = BatchRemoveProjectEnvResponseBody$Outbound;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
export function batchRemoveProjectEnvResponseBodyToJSON(
|
|
211
|
+
batchRemoveProjectEnvResponseBody: BatchRemoveProjectEnvResponseBody,
|
|
212
|
+
): string {
|
|
213
|
+
return JSON.stringify(
|
|
214
|
+
BatchRemoveProjectEnvResponseBody$outboundSchema.parse(
|
|
215
|
+
batchRemoveProjectEnvResponseBody,
|
|
216
|
+
),
|
|
217
|
+
);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
export function batchRemoveProjectEnvResponseBodyFromJSON(
|
|
221
|
+
jsonString: string,
|
|
222
|
+
): SafeParseResult<BatchRemoveProjectEnvResponseBody, SDKValidationError> {
|
|
223
|
+
return safeParse(
|
|
224
|
+
jsonString,
|
|
225
|
+
(x) => BatchRemoveProjectEnvResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
226
|
+
`Failed to parse 'BatchRemoveProjectEnvResponseBody' from JSON`,
|
|
227
|
+
);
|
|
228
|
+
}
|