@vercel/sdk 1.6.5 → 1.6.6
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 +2 -0
- package/bin/mcp-server.js +503 -273
- package/bin/mcp-server.js.map +16 -13
- package/docs/sdks/projects/README.md +85 -0
- package/esm/__tests__/accessgroups.test.js +94 -60
- package/esm/__tests__/accessgroups.test.js.map +1 -1
- package/esm/__tests__/aliases.test.js +41 -41
- package/esm/__tests__/aliases.test.js.map +1 -1
- package/esm/__tests__/certs.test.js +2 -2
- package/esm/__tests__/checks.test.js +5 -3
- package/esm/__tests__/checks.test.js.map +1 -1
- package/esm/__tests__/deployments.test.js +51 -35
- package/esm/__tests__/deployments.test.js.map +1 -1
- package/esm/__tests__/dns.test.js +0 -27
- package/esm/__tests__/dns.test.js.map +1 -1
- package/esm/__tests__/domains.test.js +2 -2
- package/esm/__tests__/domains.test.js.map +1 -1
- package/esm/__tests__/edgeconfig.test.js +9 -5
- package/esm/__tests__/edgeconfig.test.js.map +1 -1
- package/esm/__tests__/environment.test.js +15 -27
- package/esm/__tests__/environment.test.js.map +1 -1
- package/esm/__tests__/integrations.test.js +1 -7
- package/esm/__tests__/integrations.test.js.map +1 -1
- package/esm/__tests__/logdrains.test.js +72 -24
- package/esm/__tests__/logdrains.test.js.map +1 -1
- package/esm/__tests__/marketplace.test.js +60 -72
- package/esm/__tests__/marketplace.test.js.map +1 -1
- package/esm/__tests__/projects.test.js +198 -118
- package/esm/__tests__/projects.test.js.map +1 -1
- package/esm/__tests__/security.test.js +97 -120
- package/esm/__tests__/security.test.js.map +1 -1
- package/esm/__tests__/teams.test.js +11 -6
- package/esm/__tests__/teams.test.js.map +1 -1
- package/esm/funcs/projectsMoveProjectDomain.d.ts +18 -0
- package/esm/funcs/projectsMoveProjectDomain.d.ts.map +1 -0
- package/esm/funcs/projectsMoveProjectDomain.js +96 -0
- package/esm/funcs/projectsMoveProjectDomain.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/projectsMoveProjectDomain.d.ts +7 -0
- package/esm/mcp-server/tools/projectsMoveProjectDomain.d.ts.map +1 -0
- package/esm/mcp-server/tools/projectsMoveProjectDomain.js +28 -0
- package/esm/mcp-server/tools/projectsMoveProjectDomain.js.map +1 -0
- package/esm/models/authuser.d.ts +5 -0
- package/esm/models/authuser.d.ts.map +1 -1
- package/esm/models/authuser.js +2 -0
- package/esm/models/authuser.js.map +1 -1
- package/esm/models/createprojectop.d.ts +2 -0
- package/esm/models/createprojectop.d.ts.map +1 -1
- package/esm/models/createprojectop.js +2 -0
- package/esm/models/createprojectop.js.map +1 -1
- package/esm/models/getdomainconfigop.d.ts +0 -7
- package/esm/models/getdomainconfigop.d.ts.map +1 -1
- package/esm/models/getdomainconfigop.js +0 -4
- package/esm/models/getdomainconfigop.js.map +1 -1
- package/esm/models/getprojectsop.d.ts +2 -0
- package/esm/models/getprojectsop.d.ts.map +1 -1
- package/esm/models/getprojectsop.js +2 -0
- package/esm/models/getprojectsop.js.map +1 -1
- package/esm/models/moveprojectdomainop.d.ts +165 -0
- package/esm/models/moveprojectdomainop.d.ts.map +1 -0
- package/esm/models/moveprojectdomainop.js +151 -0
- package/esm/models/moveprojectdomainop.js.map +1 -0
- package/esm/models/updateprojectdatacacheop.d.ts +2 -0
- package/esm/models/updateprojectdatacacheop.d.ts.map +1 -1
- package/esm/models/updateprojectdatacacheop.js +2 -0
- package/esm/models/updateprojectdatacacheop.js.map +1 -1
- package/esm/models/updateprojectop.d.ts +2 -0
- package/esm/models/updateprojectop.d.ts.map +1 -1
- package/esm/models/updateprojectop.js +2 -0
- package/esm/models/updateprojectop.js.map +1 -1
- package/esm/models/userevent.d.ts +43 -0
- package/esm/models/userevent.d.ts.map +1 -1
- package/esm/models/userevent.js +31 -0
- package/esm/models/userevent.js.map +1 -1
- 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/jsr.json +1 -1
- package/package.json +1 -1
- package/src/__tests__/accessgroups.test.ts +94 -63
- package/src/__tests__/aliases.test.ts +47 -47
- package/src/__tests__/certs.test.ts +2 -2
- package/src/__tests__/checks.test.ts +5 -3
- package/src/__tests__/deployments.test.ts +56 -40
- package/src/__tests__/dns.test.ts +0 -30
- package/src/__tests__/domains.test.ts +2 -2
- package/src/__tests__/edgeconfig.test.ts +9 -5
- package/src/__tests__/environment.test.ts +18 -42
- package/src/__tests__/integrations.test.ts +1 -13
- package/src/__tests__/logdrains.test.ts +75 -36
- package/src/__tests__/marketplace.test.ts +63 -83
- package/src/__tests__/projects.test.ts +201 -121
- package/src/__tests__/security.test.ts +97 -123
- package/src/__tests__/teams.test.ts +11 -9
- package/src/funcs/projectsMoveProjectDomain.ts +198 -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/projectsMoveProjectDomain.ts +37 -0
- package/src/models/authuser.ts +7 -0
- package/src/models/createprojectop.ts +4 -0
- package/src/models/getdomainconfigop.ts +0 -11
- package/src/models/getprojectsop.ts +4 -0
- package/src/models/moveprojectdomainop.ts +356 -0
- package/src/models/updateprojectdatacacheop.ts +4 -0
- package/src/models/updateprojectop.ts +4 -0
- package/src/models/userevent.ts +80 -0
- package/src/sdk/projects.ts +22 -0
- package/vercel-spec.json +249 -12
- package/esm/__tests__/apiexperimentation.test.d.ts +0 -2
- package/esm/__tests__/apiexperimentation.test.d.ts.map +0 -1
- package/esm/__tests__/apiexperimentation.test.js +0 -8
- package/esm/__tests__/apiexperimentation.test.js.map +0 -1
- package/src/__tests__/apiexperimentation.test.ts +0 -11
|
@@ -26,7 +26,7 @@ test("Security Update Attack Challenge Mode", async () => {
|
|
|
26
26
|
expect(result).toBeDefined();
|
|
27
27
|
expect(result).toEqual({
|
|
28
28
|
attackModeEnabled: true,
|
|
29
|
-
attackModeUpdatedAt:
|
|
29
|
+
attackModeUpdatedAt: 6133.77,
|
|
30
30
|
});
|
|
31
31
|
});
|
|
32
32
|
|
|
@@ -53,13 +53,13 @@ test("Security Put Firewall Config", async () => {
|
|
|
53
53
|
ownerId: "<id>",
|
|
54
54
|
projectKey: "<value>",
|
|
55
55
|
id: "<id>",
|
|
56
|
-
version:
|
|
57
|
-
updatedAt: "
|
|
56
|
+
version: 892.22,
|
|
57
|
+
updatedAt: "1745792555559",
|
|
58
58
|
firewallEnabled: true,
|
|
59
59
|
crs: {
|
|
60
60
|
sd: {
|
|
61
61
|
active: false,
|
|
62
|
-
action: "
|
|
62
|
+
action: "log",
|
|
63
63
|
},
|
|
64
64
|
ma: {
|
|
65
65
|
active: false,
|
|
@@ -67,18 +67,18 @@ test("Security Put Firewall Config", async () => {
|
|
|
67
67
|
},
|
|
68
68
|
lfi: {
|
|
69
69
|
active: false,
|
|
70
|
-
action: "
|
|
70
|
+
action: "deny",
|
|
71
71
|
},
|
|
72
72
|
rfi: {
|
|
73
73
|
active: false,
|
|
74
74
|
action: "deny",
|
|
75
75
|
},
|
|
76
76
|
rce: {
|
|
77
|
-
active:
|
|
77
|
+
active: true,
|
|
78
78
|
action: "deny",
|
|
79
79
|
},
|
|
80
80
|
php: {
|
|
81
|
-
active:
|
|
81
|
+
active: false,
|
|
82
82
|
action: "deny",
|
|
83
83
|
},
|
|
84
84
|
gen: {
|
|
@@ -86,66 +86,34 @@ test("Security Put Firewall Config", async () => {
|
|
|
86
86
|
action: "deny",
|
|
87
87
|
},
|
|
88
88
|
xss: {
|
|
89
|
-
active: false,
|
|
90
|
-
action: "deny",
|
|
91
|
-
},
|
|
92
|
-
sqli: {
|
|
93
89
|
active: true,
|
|
94
90
|
action: "log",
|
|
95
91
|
},
|
|
96
|
-
|
|
92
|
+
sqli: {
|
|
97
93
|
active: true,
|
|
98
94
|
action: "deny",
|
|
99
95
|
},
|
|
100
|
-
|
|
96
|
+
sf: {
|
|
101
97
|
active: true,
|
|
102
98
|
action: "log",
|
|
103
99
|
},
|
|
100
|
+
java: {
|
|
101
|
+
active: false,
|
|
102
|
+
action: "deny",
|
|
103
|
+
},
|
|
104
104
|
},
|
|
105
105
|
rules: [
|
|
106
106
|
{
|
|
107
107
|
id: "<id>",
|
|
108
108
|
name: "<value>",
|
|
109
|
-
active:
|
|
109
|
+
active: false,
|
|
110
110
|
conditionGroup: [
|
|
111
111
|
{
|
|
112
112
|
conditions: [
|
|
113
113
|
{
|
|
114
|
-
type: "
|
|
115
|
-
op: "suf",
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
type: "geo_as_number",
|
|
114
|
+
type: "geo_city",
|
|
119
115
|
op: "pre",
|
|
120
116
|
},
|
|
121
|
-
{
|
|
122
|
-
type: "ja3_digest",
|
|
123
|
-
op: "inc",
|
|
124
|
-
},
|
|
125
|
-
],
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
conditions: [
|
|
129
|
-
{
|
|
130
|
-
type: "geo_as_number",
|
|
131
|
-
op: "neq",
|
|
132
|
-
},
|
|
133
|
-
{
|
|
134
|
-
type: "protocol",
|
|
135
|
-
op: "sub",
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
type: "ja3_digest",
|
|
139
|
-
op: "suf",
|
|
140
|
-
},
|
|
141
|
-
],
|
|
142
|
-
},
|
|
143
|
-
{
|
|
144
|
-
conditions: [
|
|
145
|
-
{
|
|
146
|
-
type: "region",
|
|
147
|
-
op: "neq",
|
|
148
|
-
},
|
|
149
117
|
],
|
|
150
118
|
},
|
|
151
119
|
],
|
|
@@ -166,16 +134,41 @@ test("Security Put Firewall Config", async () => {
|
|
|
166
134
|
{
|
|
167
135
|
conditions: [
|
|
168
136
|
{
|
|
169
|
-
type: "
|
|
170
|
-
op: "
|
|
137
|
+
type: "ip_address",
|
|
138
|
+
op: "sub",
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
type: "ja3_digest",
|
|
142
|
+
op: "suf",
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
type: "protocol",
|
|
146
|
+
op: "sub",
|
|
171
147
|
},
|
|
172
148
|
],
|
|
173
149
|
},
|
|
174
150
|
{
|
|
175
|
-
conditions: [
|
|
151
|
+
conditions: [
|
|
152
|
+
{
|
|
153
|
+
type: "geo_as_number",
|
|
154
|
+
op: "re",
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
type: "geo_continent",
|
|
158
|
+
op: "nex",
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
type: "region",
|
|
162
|
+
op: "gt",
|
|
163
|
+
},
|
|
164
|
+
],
|
|
176
165
|
},
|
|
177
166
|
{
|
|
178
167
|
conditions: [
|
|
168
|
+
{
|
|
169
|
+
type: "method",
|
|
170
|
+
op: "gte",
|
|
171
|
+
},
|
|
179
172
|
{
|
|
180
173
|
type: "header",
|
|
181
174
|
op: "inc",
|
|
@@ -191,7 +184,11 @@ test("Security Put Firewall Config", async () => {
|
|
|
191
184
|
},
|
|
192
185
|
],
|
|
193
186
|
ips: [],
|
|
194
|
-
changes: [
|
|
187
|
+
changes: [
|
|
188
|
+
{},
|
|
189
|
+
{},
|
|
190
|
+
{},
|
|
191
|
+
],
|
|
195
192
|
},
|
|
196
193
|
});
|
|
197
194
|
});
|
|
@@ -210,8 +207,11 @@ test("Security Update Firewall Config", async () => {
|
|
|
210
207
|
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
|
|
211
208
|
slug: "my-team-url-slug",
|
|
212
209
|
requestBody: {
|
|
213
|
-
action: "
|
|
210
|
+
action: "managedRules.update",
|
|
214
211
|
id: "<id>",
|
|
212
|
+
value: {
|
|
213
|
+
active: true,
|
|
214
|
+
},
|
|
215
215
|
},
|
|
216
216
|
});
|
|
217
217
|
expect(result).toBeDefined();
|
|
@@ -238,16 +238,16 @@ test("Security Get Firewall Config", async () => {
|
|
|
238
238
|
ownerId: "<id>",
|
|
239
239
|
projectKey: "<value>",
|
|
240
240
|
id: "<id>",
|
|
241
|
-
version: 228.
|
|
242
|
-
updatedAt: "
|
|
243
|
-
firewallEnabled:
|
|
241
|
+
version: 228.9,
|
|
242
|
+
updatedAt: "1744362822275",
|
|
243
|
+
firewallEnabled: false,
|
|
244
244
|
crs: {
|
|
245
245
|
sd: {
|
|
246
|
-
active:
|
|
246
|
+
active: true,
|
|
247
247
|
action: "deny",
|
|
248
248
|
},
|
|
249
249
|
ma: {
|
|
250
|
-
active:
|
|
250
|
+
active: false,
|
|
251
251
|
action: "log",
|
|
252
252
|
},
|
|
253
253
|
lfi: {
|
|
@@ -255,12 +255,12 @@ test("Security Get Firewall Config", async () => {
|
|
|
255
255
|
action: "log",
|
|
256
256
|
},
|
|
257
257
|
rfi: {
|
|
258
|
-
active:
|
|
258
|
+
active: true,
|
|
259
259
|
action: "deny",
|
|
260
260
|
},
|
|
261
261
|
rce: {
|
|
262
262
|
active: true,
|
|
263
|
-
action: "
|
|
263
|
+
action: "log",
|
|
264
264
|
},
|
|
265
265
|
php: {
|
|
266
266
|
active: false,
|
|
@@ -268,7 +268,7 @@ test("Security Get Firewall Config", async () => {
|
|
|
268
268
|
},
|
|
269
269
|
gen: {
|
|
270
270
|
active: false,
|
|
271
|
-
action: "
|
|
271
|
+
action: "deny",
|
|
272
272
|
},
|
|
273
273
|
xss: {
|
|
274
274
|
active: true,
|
|
@@ -291,29 +291,13 @@ test("Security Get Firewall Config", async () => {
|
|
|
291
291
|
{
|
|
292
292
|
id: "<id>",
|
|
293
293
|
name: "<value>",
|
|
294
|
-
active:
|
|
294
|
+
active: false,
|
|
295
295
|
conditionGroup: [
|
|
296
296
|
{
|
|
297
297
|
conditions: [
|
|
298
298
|
{
|
|
299
|
-
type: "
|
|
300
|
-
op: "
|
|
301
|
-
},
|
|
302
|
-
],
|
|
303
|
-
},
|
|
304
|
-
{
|
|
305
|
-
conditions: [
|
|
306
|
-
{
|
|
307
|
-
type: "geo_city",
|
|
308
|
-
op: "ex",
|
|
309
|
-
},
|
|
310
|
-
{
|
|
311
|
-
type: "ja4_digest",
|
|
312
|
-
op: "nex",
|
|
313
|
-
},
|
|
314
|
-
{
|
|
315
|
-
type: "ip_address",
|
|
316
|
-
op: "lte",
|
|
299
|
+
type: "path",
|
|
300
|
+
op: "neq",
|
|
317
301
|
},
|
|
318
302
|
],
|
|
319
303
|
},
|
|
@@ -324,12 +308,26 @@ test("Security Get Firewall Config", async () => {
|
|
|
324
308
|
ips: [
|
|
325
309
|
{
|
|
326
310
|
id: "<id>",
|
|
327
|
-
hostname: "
|
|
328
|
-
ip: "
|
|
329
|
-
action: "
|
|
311
|
+
hostname: "crowded-suspension.net",
|
|
312
|
+
ip: "194.99.165.97",
|
|
313
|
+
action: "bypass",
|
|
330
314
|
},
|
|
315
|
+
{
|
|
316
|
+
id: "<id>",
|
|
317
|
+
hostname: "burly-academics.name",
|
|
318
|
+
ip: "42.161.47.142",
|
|
319
|
+
action: "bypass",
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
id: "<id>",
|
|
323
|
+
hostname: "damaged-bracelet.info",
|
|
324
|
+
ip: "8ad7:ffff:b919:0fee:fa4e:54ce:6be3:2203",
|
|
325
|
+
action: "log",
|
|
326
|
+
},
|
|
327
|
+
],
|
|
328
|
+
changes: [
|
|
329
|
+
{},
|
|
331
330
|
],
|
|
332
|
-
changes: [],
|
|
333
331
|
});
|
|
334
332
|
});
|
|
335
333
|
|
|
@@ -349,7 +347,20 @@ test("Security Get Bypass Ip", async () => {
|
|
|
349
347
|
slug: "my-team-url-slug",
|
|
350
348
|
});
|
|
351
349
|
expect(result).toBeDefined();
|
|
352
|
-
expect(result).toEqual({
|
|
350
|
+
expect(result).toEqual({
|
|
351
|
+
result: [
|
|
352
|
+
{
|
|
353
|
+
ownerId: "<id>",
|
|
354
|
+
id: "<id>",
|
|
355
|
+
domain: "sneaky-intervention.info",
|
|
356
|
+
ip: "124.153.161.35",
|
|
357
|
+
createdAt: "1730712703128",
|
|
358
|
+
updatedAt: "1744368534759",
|
|
359
|
+
updatedAtHour: "<value>",
|
|
360
|
+
},
|
|
361
|
+
],
|
|
362
|
+
pagination: "<value>",
|
|
363
|
+
});
|
|
353
364
|
});
|
|
354
365
|
|
|
355
366
|
test("Security Add Bypass Ip", async () => {
|
|
@@ -373,10 +384,10 @@ test("Security Add Bypass Ip", async () => {
|
|
|
373
384
|
{
|
|
374
385
|
ownerId: "<id>",
|
|
375
386
|
id: "<id>",
|
|
376
|
-
domain: "
|
|
387
|
+
domain: "jubilant-outrun.name",
|
|
377
388
|
projectId: "<id>",
|
|
378
389
|
note: "<value>",
|
|
379
|
-
isProjectRule:
|
|
390
|
+
isProjectRule: true,
|
|
380
391
|
},
|
|
381
392
|
],
|
|
382
393
|
pagination: "<value>",
|
|
@@ -402,40 +413,3 @@ test("Security Remove Bypass Ip", async () => {
|
|
|
402
413
|
ok: true,
|
|
403
414
|
});
|
|
404
415
|
});
|
|
405
|
-
|
|
406
|
-
test("Security Get Active Attack Status", async () => {
|
|
407
|
-
const testHttpClient = createTestHTTPClient("getActiveAttackStatus");
|
|
408
|
-
|
|
409
|
-
const vercel = new Vercel({
|
|
410
|
-
serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
|
|
411
|
-
httpClient: testHttpClient,
|
|
412
|
-
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
|
|
413
|
-
});
|
|
414
|
-
|
|
415
|
-
const result = await vercel.security.getActiveAttackStatus({
|
|
416
|
-
projectId: "<id>",
|
|
417
|
-
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
|
|
418
|
-
slug: "my-team-url-slug",
|
|
419
|
-
});
|
|
420
|
-
expect(result).toBeDefined();
|
|
421
|
-
expect(result).toEqual({
|
|
422
|
-
anomalies: [
|
|
423
|
-
{
|
|
424
|
-
ownerId: "<id>",
|
|
425
|
-
projectId: "<id>",
|
|
426
|
-
startTime: 9556.58,
|
|
427
|
-
endTime: 3001.16,
|
|
428
|
-
atMinute: 5447.77,
|
|
429
|
-
affectedHostMap: {},
|
|
430
|
-
},
|
|
431
|
-
{
|
|
432
|
-
ownerId: "<id>",
|
|
433
|
-
projectId: "<id>",
|
|
434
|
-
startTime: 7786.06,
|
|
435
|
-
endTime: 9758.22,
|
|
436
|
-
atMinute: 7118.69,
|
|
437
|
-
affectedHostMap: {},
|
|
438
|
-
},
|
|
439
|
-
],
|
|
440
|
-
});
|
|
441
|
-
});
|
|
@@ -2,16 +2,10 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { expect, test } from "vitest";
|
|
6
6
|
import { Vercel } from "../index.js";
|
|
7
7
|
import { createTestHTTPClient } from "./testclient.js";
|
|
8
8
|
|
|
9
|
-
it.skip("Teams Get Team Members", async () => {
|
|
10
|
-
assert.fail(
|
|
11
|
-
"incomplete test found please make sure to address the following errors: [`workflow step getTeamMembers.test referencing operation getTeamMembers does not contain path parameter teamId`]",
|
|
12
|
-
);
|
|
13
|
-
});
|
|
14
|
-
|
|
15
9
|
test("Teams Request Access To Team", async () => {
|
|
16
10
|
const testHttpClient = createTestHTTPClient("requestAccessToTeam");
|
|
17
11
|
|
|
@@ -115,6 +109,10 @@ test("Teams Update Team Member", async () => {
|
|
|
115
109
|
projectId: "prj_ndlgr43fadlPyCtREAqxxdyFK",
|
|
116
110
|
role: "ADMIN",
|
|
117
111
|
},
|
|
112
|
+
{
|
|
113
|
+
projectId: "prj_ndlgr43fadlPyCtREAqxxdyFK",
|
|
114
|
+
role: "ADMIN",
|
|
115
|
+
},
|
|
118
116
|
],
|
|
119
117
|
},
|
|
120
118
|
});
|
|
@@ -158,7 +156,9 @@ test("Teams Get Team", async () => {
|
|
|
158
156
|
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
|
|
159
157
|
});
|
|
160
158
|
expect(result).toBeDefined();
|
|
161
|
-
expect(result).toEqual({
|
|
159
|
+
expect(result).toEqual({
|
|
160
|
+
"key": "<value>",
|
|
161
|
+
});
|
|
162
162
|
});
|
|
163
163
|
|
|
164
164
|
test("Teams Patch Team", async () => {
|
|
@@ -195,7 +195,9 @@ test("Teams Patch Team", async () => {
|
|
|
195
195
|
},
|
|
196
196
|
});
|
|
197
197
|
expect(result).toBeDefined();
|
|
198
|
-
expect(result).toEqual({
|
|
198
|
+
expect(result).toEqual({
|
|
199
|
+
"key": "<value>",
|
|
200
|
+
});
|
|
199
201
|
});
|
|
200
202
|
|
|
201
203
|
test("Teams Get Teams", async () => {
|
|
@@ -0,0 +1,198 @@
|
|
|
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
|
+
ConnectionError,
|
|
15
|
+
InvalidRequestError,
|
|
16
|
+
RequestAbortedError,
|
|
17
|
+
RequestTimeoutError,
|
|
18
|
+
UnexpectedClientError,
|
|
19
|
+
} from "../models/httpclienterrors.js";
|
|
20
|
+
import {
|
|
21
|
+
MoveProjectDomainRequest,
|
|
22
|
+
MoveProjectDomainRequest$outboundSchema,
|
|
23
|
+
MoveProjectDomainResponseBody,
|
|
24
|
+
MoveProjectDomainResponseBody$inboundSchema,
|
|
25
|
+
} from "../models/moveprojectdomainop.js";
|
|
26
|
+
import { SDKError } from "../models/sdkerror.js";
|
|
27
|
+
import { SDKValidationError } from "../models/sdkvalidationerror.js";
|
|
28
|
+
import {
|
|
29
|
+
VercelBadRequestError,
|
|
30
|
+
VercelBadRequestError$inboundSchema,
|
|
31
|
+
} from "../models/vercelbadrequesterror.js";
|
|
32
|
+
import {
|
|
33
|
+
VercelForbiddenError,
|
|
34
|
+
VercelForbiddenError$inboundSchema,
|
|
35
|
+
} from "../models/vercelforbiddenerror.js";
|
|
36
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
37
|
+
import { Result } from "../types/fp.js";
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Update a project domain
|
|
41
|
+
*
|
|
42
|
+
* @remarks
|
|
43
|
+
* Move one project's domain to another project. Also allows the move of all redirects pointed to that domain in the same project.
|
|
44
|
+
*/
|
|
45
|
+
export function projectsMoveProjectDomain(
|
|
46
|
+
client: VercelCore,
|
|
47
|
+
request: MoveProjectDomainRequest,
|
|
48
|
+
options?: RequestOptions,
|
|
49
|
+
): APIPromise<
|
|
50
|
+
Result<
|
|
51
|
+
MoveProjectDomainResponseBody,
|
|
52
|
+
| VercelBadRequestError
|
|
53
|
+
| VercelForbiddenError
|
|
54
|
+
| SDKError
|
|
55
|
+
| SDKValidationError
|
|
56
|
+
| UnexpectedClientError
|
|
57
|
+
| InvalidRequestError
|
|
58
|
+
| RequestAbortedError
|
|
59
|
+
| RequestTimeoutError
|
|
60
|
+
| ConnectionError
|
|
61
|
+
>
|
|
62
|
+
> {
|
|
63
|
+
return new APIPromise($do(
|
|
64
|
+
client,
|
|
65
|
+
request,
|
|
66
|
+
options,
|
|
67
|
+
));
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
async function $do(
|
|
71
|
+
client: VercelCore,
|
|
72
|
+
request: MoveProjectDomainRequest,
|
|
73
|
+
options?: RequestOptions,
|
|
74
|
+
): Promise<
|
|
75
|
+
[
|
|
76
|
+
Result<
|
|
77
|
+
MoveProjectDomainResponseBody,
|
|
78
|
+
| VercelBadRequestError
|
|
79
|
+
| VercelForbiddenError
|
|
80
|
+
| SDKError
|
|
81
|
+
| SDKValidationError
|
|
82
|
+
| UnexpectedClientError
|
|
83
|
+
| InvalidRequestError
|
|
84
|
+
| RequestAbortedError
|
|
85
|
+
| RequestTimeoutError
|
|
86
|
+
| ConnectionError
|
|
87
|
+
>,
|
|
88
|
+
APICall,
|
|
89
|
+
]
|
|
90
|
+
> {
|
|
91
|
+
const parsed = safeParse(
|
|
92
|
+
request,
|
|
93
|
+
(value) => MoveProjectDomainRequest$outboundSchema.parse(value),
|
|
94
|
+
"Input validation failed",
|
|
95
|
+
);
|
|
96
|
+
if (!parsed.ok) {
|
|
97
|
+
return [parsed, { status: "invalid" }];
|
|
98
|
+
}
|
|
99
|
+
const payload = parsed.value;
|
|
100
|
+
const body = encodeJSON("body", payload.RequestBody, { explode: true });
|
|
101
|
+
|
|
102
|
+
const pathParams = {
|
|
103
|
+
domain: encodeSimple("domain", payload.domain, {
|
|
104
|
+
explode: false,
|
|
105
|
+
charEncoding: "percent",
|
|
106
|
+
}),
|
|
107
|
+
idOrName: encodeSimple("idOrName", payload.idOrName, {
|
|
108
|
+
explode: false,
|
|
109
|
+
charEncoding: "percent",
|
|
110
|
+
}),
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
const path = pathToFunc("/v1/projects/{idOrName}/domains/{domain}/move")(
|
|
114
|
+
pathParams,
|
|
115
|
+
);
|
|
116
|
+
|
|
117
|
+
const query = encodeFormQuery({
|
|
118
|
+
"slug": payload.slug,
|
|
119
|
+
"teamId": payload.teamId,
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
const headers = new Headers(compactMap({
|
|
123
|
+
"Content-Type": "application/json",
|
|
124
|
+
Accept: "application/json",
|
|
125
|
+
}));
|
|
126
|
+
|
|
127
|
+
const secConfig = await extractSecurity(client._options.bearerToken);
|
|
128
|
+
const securityInput = secConfig == null ? {} : { bearerToken: secConfig };
|
|
129
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
130
|
+
|
|
131
|
+
const context = {
|
|
132
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
133
|
+
operationID: "moveProjectDomain",
|
|
134
|
+
oAuth2Scopes: [],
|
|
135
|
+
|
|
136
|
+
resolvedSecurity: requestSecurity,
|
|
137
|
+
|
|
138
|
+
securitySource: client._options.bearerToken,
|
|
139
|
+
retryConfig: options?.retries
|
|
140
|
+
|| client._options.retryConfig
|
|
141
|
+
|| { strategy: "none" },
|
|
142
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
const requestRes = client._createRequest(context, {
|
|
146
|
+
security: requestSecurity,
|
|
147
|
+
method: "POST",
|
|
148
|
+
baseURL: options?.serverURL,
|
|
149
|
+
path: path,
|
|
150
|
+
headers: headers,
|
|
151
|
+
query: query,
|
|
152
|
+
body: body,
|
|
153
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
154
|
+
}, options);
|
|
155
|
+
if (!requestRes.ok) {
|
|
156
|
+
return [requestRes, { status: "invalid" }];
|
|
157
|
+
}
|
|
158
|
+
const req = requestRes.value;
|
|
159
|
+
|
|
160
|
+
const doResult = await client._do(req, {
|
|
161
|
+
context,
|
|
162
|
+
errorCodes: ["400", "401", "403", "409", "4XX", "5XX"],
|
|
163
|
+
retryConfig: context.retryConfig,
|
|
164
|
+
retryCodes: context.retryCodes,
|
|
165
|
+
});
|
|
166
|
+
if (!doResult.ok) {
|
|
167
|
+
return [doResult, { status: "request-error", request: req }];
|
|
168
|
+
}
|
|
169
|
+
const response = doResult.value;
|
|
170
|
+
|
|
171
|
+
const responseFields = {
|
|
172
|
+
HttpMeta: { Response: response, Request: req },
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
const [result] = await M.match<
|
|
176
|
+
MoveProjectDomainResponseBody,
|
|
177
|
+
| VercelBadRequestError
|
|
178
|
+
| VercelForbiddenError
|
|
179
|
+
| SDKError
|
|
180
|
+
| SDKValidationError
|
|
181
|
+
| UnexpectedClientError
|
|
182
|
+
| InvalidRequestError
|
|
183
|
+
| RequestAbortedError
|
|
184
|
+
| RequestTimeoutError
|
|
185
|
+
| ConnectionError
|
|
186
|
+
>(
|
|
187
|
+
M.json(200, MoveProjectDomainResponseBody$inboundSchema),
|
|
188
|
+
M.jsonErr(400, VercelBadRequestError$inboundSchema),
|
|
189
|
+
M.jsonErr(401, VercelForbiddenError$inboundSchema),
|
|
190
|
+
M.fail([403, 409, "4XX"]),
|
|
191
|
+
M.fail("5XX"),
|
|
192
|
+
)(response, { extraFields: responseFields });
|
|
193
|
+
if (!result.ok) {
|
|
194
|
+
return [result, { status: "complete", request: req, response }];
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
return [result, { status: "complete", request: req, response }];
|
|
198
|
+
}
|
package/src/lib/config.ts
CHANGED
|
@@ -57,7 +57,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
57
57
|
export const SDK_METADATA = {
|
|
58
58
|
language: "typescript",
|
|
59
59
|
openapiDocVersion: "0.0.1",
|
|
60
|
-
sdkVersion: "1.6.
|
|
60
|
+
sdkVersion: "1.6.6",
|
|
61
61
|
genVersion: "2.593.4",
|
|
62
|
-
userAgent: "speakeasy-sdk/typescript 1.6.
|
|
62
|
+
userAgent: "speakeasy-sdk/typescript 1.6.6 2.593.4 0.0.1 @vercel/sdk",
|
|
63
63
|
} as const;
|
package/src/mcp-server/server.ts
CHANGED
|
@@ -135,6 +135,7 @@ import { tool$projectsGetProjectDomains } from "./tools/projectsGetProjectDomain
|
|
|
135
135
|
import { tool$projectsGetProjectEnv } from "./tools/projectsGetProjectEnv.js";
|
|
136
136
|
import { tool$projectsGetProjects } from "./tools/projectsGetProjects.js";
|
|
137
137
|
import { tool$projectsListPromoteAliases } from "./tools/projectsListPromoteAliases.js";
|
|
138
|
+
import { tool$projectsMoveProjectDomain } from "./tools/projectsMoveProjectDomain.js";
|
|
138
139
|
import { tool$projectsPauseProject } from "./tools/projectsPauseProject.js";
|
|
139
140
|
import { tool$projectsRemoveProjectDomain } from "./tools/projectsRemoveProjectDomain.js";
|
|
140
141
|
import { tool$projectsRemoveProjectEnv } from "./tools/projectsRemoveProjectEnv.js";
|
|
@@ -184,7 +185,7 @@ export function createMCPServer(deps: {
|
|
|
184
185
|
}) {
|
|
185
186
|
const server = new McpServer({
|
|
186
187
|
name: "Vercel",
|
|
187
|
-
version: "1.6.
|
|
188
|
+
version: "1.6.6",
|
|
188
189
|
});
|
|
189
190
|
|
|
190
191
|
const client = new VercelCore({
|
|
@@ -246,6 +247,7 @@ export function createMCPServer(deps: {
|
|
|
246
247
|
tool(tool$projectsUpdateProjectDomain);
|
|
247
248
|
tool(tool$projectsRemoveProjectDomain);
|
|
248
249
|
tool(tool$projectsAddProjectDomain);
|
|
250
|
+
tool(tool$projectsMoveProjectDomain);
|
|
249
251
|
tool(tool$projectsVerifyProjectDomain);
|
|
250
252
|
tool(tool$projectsFilterProjectEnvs);
|
|
251
253
|
tool(tool$projectsCreateProjectEnv);
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { projectsMoveProjectDomain } from "../../funcs/projectsMoveProjectDomain.js";
|
|
6
|
+
import { MoveProjectDomainRequest$inboundSchema } from "../../models/moveprojectdomainop.js";
|
|
7
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
+
|
|
9
|
+
const args = {
|
|
10
|
+
request: MoveProjectDomainRequest$inboundSchema,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const tool$projectsMoveProjectDomain: ToolDefinition<typeof args> = {
|
|
14
|
+
name: "projects-move-project-domain",
|
|
15
|
+
description: `Update a project domain
|
|
16
|
+
|
|
17
|
+
Move one project's domain to another project. Also allows the move of all redirects pointed to that domain in the same project.`,
|
|
18
|
+
args,
|
|
19
|
+
tool: async (client, args, ctx) => {
|
|
20
|
+
const [result, apiCall] = await projectsMoveProjectDomain(
|
|
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
|
+
};
|