@vercel/sdk 1.6.4 → 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 +517 -275
- package/bin/mcp-server.js.map +17 -14
- 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 -24
- 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 +106 -118
- 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 +3 -3
- package/esm/lib/config.js +3 -3
- 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/getv9projectsidornamecustomenvironmentsop.d.ts +31 -1
- package/esm/models/getv9projectsidornamecustomenvironmentsop.d.ts.map +1 -1
- package/esm/models/getv9projectsidornamecustomenvironmentsop.js +27 -0
- package/esm/models/getv9projectsidornamecustomenvironmentsop.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 +20 -41
- 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 +106 -121
- package/src/__tests__/teams.test.ts +11 -9
- package/src/funcs/projectsMoveProjectDomain.ts +198 -0
- package/src/lib/config.ts +3 -3
- 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/getv9projectsidornamecustomenvironmentsop.ts +62 -1
- 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 +269 -17
- 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
|
@@ -2,7 +2,7 @@
|
|
|
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
|
|
|
@@ -78,19 +78,35 @@ test("Marketplace Submit Billing Data", async () => {
|
|
|
78
78
|
await vercel.marketplace.submitBillingData({
|
|
79
79
|
integrationConfigurationId: "<id>",
|
|
80
80
|
requestBody: {
|
|
81
|
-
timestamp: new Date("
|
|
82
|
-
eod: new Date("
|
|
81
|
+
timestamp: new Date("2025-09-29T02:38:01.476Z"),
|
|
82
|
+
eod: new Date("2023-12-28T23:46:57.523Z"),
|
|
83
83
|
period: {
|
|
84
|
-
start: new Date("
|
|
85
|
-
end: new Date("
|
|
84
|
+
start: new Date("2023-06-25T19:04:50.518Z"),
|
|
85
|
+
end: new Date("2024-10-17T01:18:36.230Z"),
|
|
86
86
|
},
|
|
87
87
|
billing: {
|
|
88
88
|
items: [
|
|
89
89
|
{
|
|
90
90
|
billingPlanId: "<id>",
|
|
91
91
|
name: "<value>",
|
|
92
|
-
price: "
|
|
93
|
-
quantity:
|
|
92
|
+
price: "511.92",
|
|
93
|
+
quantity: 328.54,
|
|
94
|
+
units: "<value>",
|
|
95
|
+
total: "<value>",
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
billingPlanId: "<id>",
|
|
99
|
+
name: "<value>",
|
|
100
|
+
price: "4.49",
|
|
101
|
+
quantity: 3113.17,
|
|
102
|
+
units: "<value>",
|
|
103
|
+
total: "<value>",
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
billingPlanId: "<id>",
|
|
107
|
+
name: "<value>",
|
|
108
|
+
price: "896.30",
|
|
109
|
+
quantity: 8536.32,
|
|
94
110
|
units: "<value>",
|
|
95
111
|
total: "<value>",
|
|
96
112
|
},
|
|
@@ -98,15 +114,13 @@ test("Marketplace Submit Billing Data", async () => {
|
|
|
98
114
|
},
|
|
99
115
|
usage: [
|
|
100
116
|
{
|
|
101
|
-
resourceId: "<id>",
|
|
102
117
|
name: "<value>",
|
|
103
118
|
type: "rate",
|
|
104
119
|
units: "<value>",
|
|
105
|
-
dayValue: 9439.
|
|
120
|
+
dayValue: 9439.22,
|
|
106
121
|
periodValue: 6958.71,
|
|
107
122
|
},
|
|
108
123
|
{
|
|
109
|
-
resourceId: "<id>",
|
|
110
124
|
name: "<value>",
|
|
111
125
|
type: "total",
|
|
112
126
|
units: "<value>",
|
|
@@ -114,7 +128,6 @@ test("Marketplace Submit Billing Data", async () => {
|
|
|
114
128
|
periodValue: 4749.62,
|
|
115
129
|
},
|
|
116
130
|
{
|
|
117
|
-
resourceId: "<id>",
|
|
118
131
|
name: "<value>",
|
|
119
132
|
type: "rate",
|
|
120
133
|
units: "<value>",
|
|
@@ -138,10 +151,10 @@ test("Marketplace Submit Invoice", async () => {
|
|
|
138
151
|
const result = await vercel.marketplace.submitInvoice({
|
|
139
152
|
integrationConfigurationId: "<id>",
|
|
140
153
|
requestBody: {
|
|
141
|
-
invoiceDate: new Date("
|
|
154
|
+
invoiceDate: new Date("2023-06-05T08:54:16.353Z"),
|
|
142
155
|
period: {
|
|
143
|
-
start: new Date("
|
|
144
|
-
end: new Date("
|
|
156
|
+
start: new Date("2023-07-26T14:15:15.601Z"),
|
|
157
|
+
end: new Date("2025-10-08T09:35:48.520Z"),
|
|
145
158
|
},
|
|
146
159
|
items: [
|
|
147
160
|
{
|
|
@@ -156,7 +169,7 @@ test("Marketplace Submit Invoice", async () => {
|
|
|
156
169
|
billingPlanId: "<id>",
|
|
157
170
|
name: "<value>",
|
|
158
171
|
price: "84.05",
|
|
159
|
-
quantity: 9130.
|
|
172
|
+
quantity: 9130.95,
|
|
160
173
|
units: "<value>",
|
|
161
174
|
total: "<value>",
|
|
162
175
|
},
|
|
@@ -182,9 +195,8 @@ test("Marketplace Get Invoice", async () => {
|
|
|
182
195
|
});
|
|
183
196
|
expect(result).toBeDefined();
|
|
184
197
|
expect(result).toEqual({
|
|
185
|
-
test: false,
|
|
186
198
|
invoiceId: "<id>",
|
|
187
|
-
state: "
|
|
199
|
+
state: "invoiced",
|
|
188
200
|
invoiceDate: "<value>",
|
|
189
201
|
period: {
|
|
190
202
|
start: "<value>",
|
|
@@ -194,8 +206,8 @@ test("Marketplace Get Invoice", async () => {
|
|
|
194
206
|
{
|
|
195
207
|
billingPlanId: "<id>",
|
|
196
208
|
name: "<value>",
|
|
197
|
-
price: "
|
|
198
|
-
quantity:
|
|
209
|
+
price: "813.89",
|
|
210
|
+
quantity: 2100.54,
|
|
199
211
|
units: "<value>",
|
|
200
212
|
total: "<value>",
|
|
201
213
|
},
|
|
@@ -226,6 +238,20 @@ test("Marketplace Update Invoice", async () => {
|
|
|
226
238
|
});
|
|
227
239
|
});
|
|
228
240
|
|
|
241
|
+
test("Marketplace Submit Prepayment Balances", async () => {
|
|
242
|
+
const testHttpClient = createTestHTTPClient("submit-prepayment-balances");
|
|
243
|
+
|
|
244
|
+
const vercel = new Vercel({
|
|
245
|
+
serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
|
|
246
|
+
httpClient: testHttpClient,
|
|
247
|
+
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
|
|
248
|
+
});
|
|
249
|
+
|
|
250
|
+
await vercel.marketplace.submitPrepaymentBalances({
|
|
251
|
+
integrationConfigurationId: "<id>",
|
|
252
|
+
});
|
|
253
|
+
});
|
|
254
|
+
|
|
229
255
|
test("Marketplace Update Resource Secrets", async () => {
|
|
230
256
|
const testHttpClient = createTestHTTPClient("update-resource-secrets");
|
|
231
257
|
|
|
@@ -260,57 +286,43 @@ test("Marketplace Update Resource Secrets By Id", async () => {
|
|
|
260
286
|
});
|
|
261
287
|
});
|
|
262
288
|
|
|
263
|
-
test("Marketplace
|
|
264
|
-
const testHttpClient = createTestHTTPClient("
|
|
289
|
+
test("Marketplace Import Resource", async () => {
|
|
290
|
+
const testHttpClient = createTestHTTPClient("import-resource");
|
|
265
291
|
|
|
266
292
|
const vercel = new Vercel({
|
|
267
293
|
serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
|
|
268
294
|
httpClient: testHttpClient,
|
|
295
|
+
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
|
|
269
296
|
});
|
|
270
297
|
|
|
271
|
-
const result = await vercel.marketplace.
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
clientSecret: "<value>",
|
|
298
|
+
const result = await vercel.marketplace.importResource({
|
|
299
|
+
integrationConfigurationId: "<id>",
|
|
300
|
+
resourceId: "<id>",
|
|
275
301
|
});
|
|
276
302
|
expect(result).toBeDefined();
|
|
277
303
|
expect(result).toEqual({
|
|
278
|
-
|
|
279
|
-
accessToken: "<value>",
|
|
280
|
-
tokenType: "<value>",
|
|
281
|
-
});
|
|
282
|
-
});
|
|
283
|
-
|
|
284
|
-
test("Marketplace Submit Prepayment Balances", async () => {
|
|
285
|
-
const testHttpClient = createTestHTTPClient("submit-prepayment-balances");
|
|
286
|
-
|
|
287
|
-
const vercel = new Vercel({
|
|
288
|
-
serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
|
|
289
|
-
httpClient: testHttpClient,
|
|
290
|
-
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
|
|
291
|
-
});
|
|
292
|
-
|
|
293
|
-
await vercel.marketplace.submitPrepaymentBalances({
|
|
294
|
-
integrationConfigurationId: "<id>",
|
|
304
|
+
name: "<value>",
|
|
295
305
|
});
|
|
296
306
|
});
|
|
297
307
|
|
|
298
|
-
test("Marketplace
|
|
299
|
-
const testHttpClient = createTestHTTPClient("
|
|
308
|
+
test("Marketplace Exchange Sso Token", async () => {
|
|
309
|
+
const testHttpClient = createTestHTTPClient("exchange-sso-token");
|
|
300
310
|
|
|
301
311
|
const vercel = new Vercel({
|
|
302
312
|
serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
|
|
303
313
|
httpClient: testHttpClient,
|
|
304
|
-
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
|
|
305
314
|
});
|
|
306
315
|
|
|
307
|
-
const result = await vercel.marketplace.
|
|
308
|
-
|
|
309
|
-
|
|
316
|
+
const result = await vercel.marketplace.exchangeSsoToken({
|
|
317
|
+
code: "<value>",
|
|
318
|
+
clientId: "<id>",
|
|
319
|
+
clientSecret: "<value>",
|
|
310
320
|
});
|
|
311
321
|
expect(result).toBeDefined();
|
|
312
322
|
expect(result).toEqual({
|
|
313
|
-
|
|
323
|
+
idToken: "<value>",
|
|
324
|
+
accessToken: "<value>",
|
|
325
|
+
tokenType: "<value>",
|
|
314
326
|
});
|
|
315
327
|
});
|
|
316
328
|
|
|
@@ -367,33 +379,6 @@ test("Marketplace Delete /V1 /Installations/{integration Configuration Id}/resou
|
|
|
367
379
|
});
|
|
368
380
|
});
|
|
369
381
|
|
|
370
|
-
test("Marketplace Head /V1 /Installations/{integration Configuration Id}/resources/{resource Id}/experimentation/edge Config", async () => {
|
|
371
|
-
const testHttpClient = createTestHTTPClient(
|
|
372
|
-
"head_/v1/installations/{integrationConfigurationId}/resources/{resourceId}/experimentation/edge-config",
|
|
373
|
-
);
|
|
374
|
-
|
|
375
|
-
const vercel = new Vercel({
|
|
376
|
-
serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
|
|
377
|
-
httpClient: testHttpClient,
|
|
378
|
-
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
|
|
379
|
-
});
|
|
380
|
-
|
|
381
|
-
const result = await vercel.marketplace
|
|
382
|
-
.createInstallationIntegrationEdgeConfig({
|
|
383
|
-
integrationConfigurationId: "<id>",
|
|
384
|
-
resourceId: "<id>",
|
|
385
|
-
});
|
|
386
|
-
expect(result).toBeDefined();
|
|
387
|
-
expect(result).toEqual({
|
|
388
|
-
items: {
|
|
389
|
-
"key": {},
|
|
390
|
-
"key1": true,
|
|
391
|
-
},
|
|
392
|
-
updatedAt: 6086.93,
|
|
393
|
-
digest: "<value>",
|
|
394
|
-
});
|
|
395
|
-
});
|
|
396
|
-
|
|
397
382
|
test("Marketplace Put /V1 /Installations/{integration Configuration Id}/resources/{resource Id}/experimentation/edge Config", async () => {
|
|
398
383
|
const testHttpClient = createTestHTTPClient(
|
|
399
384
|
"put_/v1/installations/{integrationConfigurationId}/resources/{resourceId}/experimentation/edge-config",
|
|
@@ -414,14 +399,9 @@ test("Marketplace Put /V1 /Installations/{integration Configuration Id}/resource
|
|
|
414
399
|
expect(result).toEqual({
|
|
415
400
|
items: {
|
|
416
401
|
"key": true,
|
|
402
|
+
"key1": "<value>",
|
|
417
403
|
},
|
|
418
|
-
updatedAt:
|
|
404
|
+
updatedAt: 8687.23,
|
|
419
405
|
digest: "<value>",
|
|
420
406
|
});
|
|
421
407
|
});
|
|
422
|
-
|
|
423
|
-
it.skip("Marketplace Query Experimentation Items", async () => {
|
|
424
|
-
assert.fail(
|
|
425
|
-
"incomplete test found please make sure to address the following errors: [`workflow step queryExperimentationItems.test referencing operation queryExperimentationItems not found in document`]",
|
|
426
|
-
);
|
|
427
|
-
});
|