@vercel/sdk 1.3.0 → 1.3.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 +6 -0
- package/docs/sdks/accessgroups/README.md +40 -4
- package/docs/sdks/deployments/README.md +22 -0
- package/docs/sdks/marketplace/README.md +54 -22
- package/docs/sdks/projects/README.md +179 -0
- package/docs/sdks/security/README.md +84 -0
- package/docs/sdks/teams/README.md +8 -0
- package/esm/__tests__/projects.test.js +31 -0
- package/esm/__tests__/projects.test.js.map +1 -1
- package/esm/__tests__/security.test.js +33 -0
- package/esm/__tests__/security.test.js.map +1 -1
- package/esm/funcs/projectsAcceptProjectTransferRequest.d.ts +18 -0
- package/esm/funcs/projectsAcceptProjectTransferRequest.d.ts.map +1 -0
- package/esm/funcs/projectsAcceptProjectTransferRequest.js +88 -0
- package/esm/funcs/projectsAcceptProjectTransferRequest.js.map +1 -0
- package/esm/funcs/projectsCreateProjectTransferRequest.d.ts +17 -0
- package/esm/funcs/projectsCreateProjectTransferRequest.d.ts.map +1 -0
- package/esm/funcs/projectsCreateProjectTransferRequest.js +86 -0
- package/esm/funcs/projectsCreateProjectTransferRequest.js.map +1 -0
- package/esm/funcs/securityGetActiveAttackStatus.d.ts +18 -0
- package/esm/funcs/securityGetActiveAttackStatus.d.ts.map +1 -0
- package/esm/funcs/securityGetActiveAttackStatus.js +82 -0
- package/esm/funcs/securityGetActiveAttackStatus.js.map +1 -0
- package/esm/lib/config.d.ts +3 -3
- package/esm/lib/config.js +3 -3
- package/esm/lib/schemas.d.ts +1 -1
- package/esm/lib/schemas.d.ts.map +1 -1
- package/esm/lib/schemas.js +4 -1
- package/esm/lib/schemas.js.map +1 -1
- package/esm/models/acceptprojecttransferrequestop.d.ts +127 -0
- package/esm/models/acceptprojecttransferrequestop.d.ts.map +1 -0
- package/esm/models/acceptprojecttransferrequestop.js +123 -0
- package/esm/models/acceptprojecttransferrequestop.js.map +1 -0
- package/esm/models/addprojectdomainop.d.ts +5 -0
- package/esm/models/addprojectdomainop.d.ts.map +1 -1
- package/esm/models/addprojectdomainop.js +2 -0
- package/esm/models/addprojectdomainop.js.map +1 -1
- package/esm/models/authuser.d.ts +9 -0
- package/esm/models/authuser.d.ts.map +1 -1
- package/esm/models/authuser.js +3 -0
- package/esm/models/authuser.js.map +1 -1
- package/esm/models/createprojectop.d.ts +4 -2
- package/esm/models/createprojectop.d.ts.map +1 -1
- package/esm/models/createprojectop.js +4 -2
- package/esm/models/createprojectop.js.map +1 -1
- package/esm/models/createprojecttransferrequestop.d.ts +66 -0
- package/esm/models/createprojecttransferrequestop.d.ts.map +1 -0
- package/esm/models/createprojecttransferrequestop.js +56 -0
- package/esm/models/createprojecttransferrequestop.js.map +1 -0
- package/esm/models/getactiveattackstatusop.d.ts +242 -0
- package/esm/models/getactiveattackstatusop.d.ts.map +1 -0
- package/esm/models/getactiveattackstatusop.js +248 -0
- package/esm/models/getactiveattackstatusop.js.map +1 -0
- package/esm/models/getprojectsop.d.ts +4 -2
- package/esm/models/getprojectsop.d.ts.map +1 -1
- package/esm/models/getprojectsop.js +4 -2
- package/esm/models/getprojectsop.js.map +1 -1
- package/esm/models/updateprojectdatacacheop.d.ts +4 -2
- package/esm/models/updateprojectdatacacheop.d.ts.map +1 -1
- package/esm/models/updateprojectdatacacheop.js +4 -2
- package/esm/models/updateprojectdatacacheop.js.map +1 -1
- package/esm/models/updateprojectop.d.ts +4 -2
- package/esm/models/updateprojectop.d.ts.map +1 -1
- package/esm/models/updateprojectop.js +4 -2
- package/esm/models/updateprojectop.js.map +1 -1
- package/esm/sdk/projects.d.ts +16 -0
- package/esm/sdk/projects.d.ts.map +1 -1
- package/esm/sdk/projects.js +20 -0
- package/esm/sdk/projects.js.map +1 -1
- package/esm/sdk/security.d.ts +8 -0
- package/esm/sdk/security.d.ts.map +1 -1
- package/esm/sdk/security.js +10 -0
- package/esm/sdk/security.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/__tests__/projects.test.ts +35 -0
- package/src/__tests__/security.test.ts +35 -0
- package/src/funcs/projectsAcceptProjectTransferRequest.ts +169 -0
- package/src/funcs/projectsCreateProjectTransferRequest.ts +161 -0
- package/src/funcs/securityGetActiveAttackStatus.ts +162 -0
- package/src/lib/config.ts +3 -3
- package/src/lib/schemas.ts +5 -0
- package/src/models/acceptprojecttransferrequestop.ts +307 -0
- package/src/models/addprojectdomainop.ts +7 -0
- package/src/models/authuser.ts +3 -0
- package/src/models/createprojectop.ts +8 -4
- package/src/models/createprojecttransferrequestop.ts +152 -0
- package/src/models/getactiveattackstatusop.ts +543 -0
- package/src/models/getprojectsop.ts +8 -4
- package/src/models/updateprojectdatacacheop.ts +8 -4
- package/src/models/updateprojectop.ts +8 -4
- package/src/sdk/projects.ts +44 -0
- package/src/sdk/security.ts +22 -0
- package/vercel-spec.json +425 -0
package/README.md
CHANGED
|
@@ -372,6 +372,8 @@ run();
|
|
|
372
372
|
* [createProjectEnv](docs/sdks/projects/README.md#createprojectenv) - Create one or more environment variables
|
|
373
373
|
* [removeProjectEnv](docs/sdks/projects/README.md#removeprojectenv) - Remove an environment variable
|
|
374
374
|
* [editProjectEnv](docs/sdks/projects/README.md#editprojectenv) - Edit an environment variable
|
|
375
|
+
* [createProjectTransferRequest](docs/sdks/projects/README.md#createprojecttransferrequest) - Create project transfer request
|
|
376
|
+
* [acceptProjectTransferRequest](docs/sdks/projects/README.md#acceptprojecttransferrequest) - Accept project transfer request
|
|
375
377
|
* [updateProjectProtectionBypass](docs/sdks/projects/README.md#updateprojectprotectionbypass) - Update Protection Bypass for Automation
|
|
376
378
|
* [requestPromote](docs/sdks/projects/README.md#requestpromote) - Points all production domains for a project to the given deploy
|
|
377
379
|
* [listPromoteAliases](docs/sdks/projects/README.md#listpromotealiases) - Gets a list of aliases with status for the current promote
|
|
@@ -382,6 +384,7 @@ run();
|
|
|
382
384
|
* [putFirewallConfig](docs/sdks/security/README.md#putfirewallconfig) - Put Firewall Configuration
|
|
383
385
|
* [updateFirewallConfig](docs/sdks/security/README.md#updatefirewallconfig) - Update Firewall Configuration
|
|
384
386
|
* [getFirewallConfig](docs/sdks/security/README.md#getfirewallconfig) - Read Firewall Configuration
|
|
387
|
+
* [getActiveAttackStatus](docs/sdks/security/README.md#getactiveattackstatus) - Read active attack data
|
|
385
388
|
* [getBypassIp](docs/sdks/security/README.md#getbypassip) - Read System Bypass
|
|
386
389
|
* [addBypassIp](docs/sdks/security/README.md#addbypassip) - Create System Bypass Rule
|
|
387
390
|
* [removeBypassIp](docs/sdks/security/README.md#removebypassip) - Remove System Bypass Rule
|
|
@@ -539,9 +542,11 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).
|
|
|
539
542
|
- [`projectMembersAddProjectMember`](docs/sdks/projectmembers/README.md#addprojectmember) - Adds a new member to a project.
|
|
540
543
|
- [`projectMembersGetProjectMembers`](docs/sdks/projectmembers/README.md#getprojectmembers) - List project members
|
|
541
544
|
- [`projectMembersRemoveProjectMember`](docs/sdks/projectmembers/README.md#removeprojectmember) - Remove a Project Member
|
|
545
|
+
- [`projectsAcceptProjectTransferRequest`](docs/sdks/projects/README.md#acceptprojecttransferrequest) - Accept project transfer request
|
|
542
546
|
- [`projectsAddProjectDomain`](docs/sdks/projects/README.md#addprojectdomain) - Add a domain to a project
|
|
543
547
|
- [`projectsCreateProject`](docs/sdks/projects/README.md#createproject) - Create a new project
|
|
544
548
|
- [`projectsCreateProjectEnv`](docs/sdks/projects/README.md#createprojectenv) - Create one or more environment variables
|
|
549
|
+
- [`projectsCreateProjectTransferRequest`](docs/sdks/projects/README.md#createprojecttransferrequest) - Create project transfer request
|
|
545
550
|
- [`projectsDeleteProject`](docs/sdks/projects/README.md#deleteproject) - Delete a Project
|
|
546
551
|
- [`projectsEditProjectEnv`](docs/sdks/projects/README.md#editprojectenv) - Edit an environment variable
|
|
547
552
|
- [`projectsFilterProjectEnvs`](docs/sdks/projects/README.md#filterprojectenvs) - Retrieve the environment variables of a project by id or name
|
|
@@ -559,6 +564,7 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).
|
|
|
559
564
|
- [`projectsUpdateProjectProtectionBypass`](docs/sdks/projects/README.md#updateprojectprotectionbypass) - Update Protection Bypass for Automation
|
|
560
565
|
- [`projectsVerifyProjectDomain`](docs/sdks/projects/README.md#verifyprojectdomain) - Verify project domain
|
|
561
566
|
- [`securityAddBypassIp`](docs/sdks/security/README.md#addbypassip) - Create System Bypass Rule
|
|
567
|
+
- [`securityGetActiveAttackStatus`](docs/sdks/security/README.md#getactiveattackstatus) - Read active attack data
|
|
562
568
|
- [`securityGetBypassIp`](docs/sdks/security/README.md#getbypassip) - Read System Bypass
|
|
563
569
|
- [`securityGetFirewallConfig`](docs/sdks/security/README.md#getfirewallconfig) - Read Firewall Configuration
|
|
564
570
|
- [`securityPutFirewallConfig`](docs/sdks/security/README.md#putfirewallconfig) - Put Firewall Configuration
|
|
@@ -121,7 +121,18 @@ async function run() {
|
|
|
121
121
|
requestBody: {
|
|
122
122
|
name: "My access group",
|
|
123
123
|
projects: [
|
|
124
|
-
|
|
124
|
+
{
|
|
125
|
+
projectId: "prj_ndlgr43fadlPyCtREAqxxdyFK",
|
|
126
|
+
role: "ADMIN",
|
|
127
|
+
},
|
|
128
|
+
],
|
|
129
|
+
membersToAdd: [
|
|
130
|
+
"usr_1a2b3c4d5e6f7g8h9i0j",
|
|
131
|
+
"usr_2b3c4d5e6f7g8h9i0j1k",
|
|
132
|
+
],
|
|
133
|
+
membersToRemove: [
|
|
134
|
+
"usr_1a2b3c4d5e6f7g8h9i0j",
|
|
135
|
+
"usr_2b3c4d5e6f7g8h9i0j1k",
|
|
125
136
|
],
|
|
126
137
|
},
|
|
127
138
|
});
|
|
@@ -155,7 +166,18 @@ async function run() {
|
|
|
155
166
|
requestBody: {
|
|
156
167
|
name: "My access group",
|
|
157
168
|
projects: [
|
|
158
|
-
|
|
169
|
+
{
|
|
170
|
+
projectId: "prj_ndlgr43fadlPyCtREAqxxdyFK",
|
|
171
|
+
role: "ADMIN",
|
|
172
|
+
},
|
|
173
|
+
],
|
|
174
|
+
membersToAdd: [
|
|
175
|
+
"usr_1a2b3c4d5e6f7g8h9i0j",
|
|
176
|
+
"usr_2b3c4d5e6f7g8h9i0j1k",
|
|
177
|
+
],
|
|
178
|
+
membersToRemove: [
|
|
179
|
+
"usr_1a2b3c4d5e6f7g8h9i0j",
|
|
180
|
+
"usr_2b3c4d5e6f7g8h9i0j1k",
|
|
159
181
|
],
|
|
160
182
|
},
|
|
161
183
|
});
|
|
@@ -472,7 +494,14 @@ async function run() {
|
|
|
472
494
|
requestBody: {
|
|
473
495
|
name: "My access group",
|
|
474
496
|
projects: [
|
|
475
|
-
|
|
497
|
+
{
|
|
498
|
+
projectId: "prj_ndlgr43fadlPyCtREAqxxdyFK",
|
|
499
|
+
role: "ADMIN",
|
|
500
|
+
},
|
|
501
|
+
],
|
|
502
|
+
membersToAdd: [
|
|
503
|
+
"usr_1a2b3c4d5e6f7g8h9i0j",
|
|
504
|
+
"usr_2b3c4d5e6f7g8h9i0j1k",
|
|
476
505
|
],
|
|
477
506
|
},
|
|
478
507
|
});
|
|
@@ -505,7 +534,14 @@ async function run() {
|
|
|
505
534
|
requestBody: {
|
|
506
535
|
name: "My access group",
|
|
507
536
|
projects: [
|
|
508
|
-
|
|
537
|
+
{
|
|
538
|
+
projectId: "prj_ndlgr43fadlPyCtREAqxxdyFK",
|
|
539
|
+
role: "ADMIN",
|
|
540
|
+
},
|
|
541
|
+
],
|
|
542
|
+
membersToAdd: [
|
|
543
|
+
"usr_1a2b3c4d5e6f7g8h9i0j",
|
|
544
|
+
"usr_2b3c4d5e6f7g8h9i0j1k",
|
|
509
545
|
],
|
|
510
546
|
},
|
|
511
547
|
});
|
|
@@ -215,6 +215,7 @@ async function run() {
|
|
|
215
215
|
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
|
|
216
216
|
slug: "my-team-url-slug",
|
|
217
217
|
requestBody: {
|
|
218
|
+
deploymentId: "dpl_2qn7PZrx89yxY34vEZPD31Y9XVj6",
|
|
218
219
|
files: [
|
|
219
220
|
{
|
|
220
221
|
file: "folder/file.js",
|
|
@@ -231,11 +232,21 @@ async function run() {
|
|
|
231
232
|
commitSha: "dc36199b2234c6586ebe05ec94078a895c707e29",
|
|
232
233
|
dirty: true,
|
|
233
234
|
},
|
|
235
|
+
gitSource: {
|
|
236
|
+
ref: "main",
|
|
237
|
+
repoId: 123456789,
|
|
238
|
+
sha: "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0",
|
|
239
|
+
type: "github",
|
|
240
|
+
},
|
|
234
241
|
meta: {
|
|
235
242
|
"foo": "bar",
|
|
236
243
|
},
|
|
237
244
|
name: "my-instant-deployment",
|
|
238
245
|
project: "my-deployment-project",
|
|
246
|
+
projectSettings: {
|
|
247
|
+
buildCommand: "next build",
|
|
248
|
+
installCommand: "pnpm install",
|
|
249
|
+
},
|
|
239
250
|
},
|
|
240
251
|
});
|
|
241
252
|
|
|
@@ -265,6 +276,7 @@ async function run() {
|
|
|
265
276
|
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
|
|
266
277
|
slug: "my-team-url-slug",
|
|
267
278
|
requestBody: {
|
|
279
|
+
deploymentId: "dpl_2qn7PZrx89yxY34vEZPD31Y9XVj6",
|
|
268
280
|
files: [
|
|
269
281
|
{
|
|
270
282
|
file: "folder/file.js",
|
|
@@ -281,11 +293,21 @@ async function run() {
|
|
|
281
293
|
commitSha: "dc36199b2234c6586ebe05ec94078a895c707e29",
|
|
282
294
|
dirty: true,
|
|
283
295
|
},
|
|
296
|
+
gitSource: {
|
|
297
|
+
ref: "main",
|
|
298
|
+
repoId: 123456789,
|
|
299
|
+
sha: "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0",
|
|
300
|
+
type: "github",
|
|
301
|
+
},
|
|
284
302
|
meta: {
|
|
285
303
|
"foo": "bar",
|
|
286
304
|
},
|
|
287
305
|
name: "my-instant-deployment",
|
|
288
306
|
project: "my-deployment-project",
|
|
307
|
+
projectSettings: {
|
|
308
|
+
buildCommand: "next build",
|
|
309
|
+
installCommand: "pnpm install",
|
|
310
|
+
},
|
|
289
311
|
},
|
|
290
312
|
});
|
|
291
313
|
|
|
@@ -278,19 +278,35 @@ async function run() {
|
|
|
278
278
|
await vercel.marketplace.submitBillingData({
|
|
279
279
|
integrationConfigurationId: "<id>",
|
|
280
280
|
requestBody: {
|
|
281
|
-
timestamp: new Date("
|
|
282
|
-
eod: new Date("
|
|
281
|
+
timestamp: new Date("2025-09-29T02:38:01.476Z"),
|
|
282
|
+
eod: new Date("2023-12-28T23:46:57.523Z"),
|
|
283
283
|
period: {
|
|
284
|
-
start: new Date("
|
|
285
|
-
end: new Date("
|
|
284
|
+
start: new Date("2023-06-25T19:04:50.518Z"),
|
|
285
|
+
end: new Date("2024-10-17T01:18:36.230Z"),
|
|
286
286
|
},
|
|
287
287
|
billing: {
|
|
288
288
|
items: [
|
|
289
289
|
{
|
|
290
290
|
billingPlanId: "<id>",
|
|
291
291
|
name: "<value>",
|
|
292
|
-
price: "
|
|
293
|
-
quantity:
|
|
292
|
+
price: "511.92",
|
|
293
|
+
quantity: 328.54,
|
|
294
|
+
units: "<value>",
|
|
295
|
+
total: "<value>",
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
billingPlanId: "<id>",
|
|
299
|
+
name: "<value>",
|
|
300
|
+
price: "4.49",
|
|
301
|
+
quantity: 3113.17,
|
|
302
|
+
units: "<value>",
|
|
303
|
+
total: "<value>",
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
billingPlanId: "<id>",
|
|
307
|
+
name: "<value>",
|
|
308
|
+
price: "896.30",
|
|
309
|
+
quantity: 8536.32,
|
|
294
310
|
units: "<value>",
|
|
295
311
|
total: "<value>",
|
|
296
312
|
},
|
|
@@ -302,7 +318,7 @@ async function run() {
|
|
|
302
318
|
name: "<value>",
|
|
303
319
|
type: "rate",
|
|
304
320
|
units: "<value>",
|
|
305
|
-
dayValue: 9439.
|
|
321
|
+
dayValue: 9439.22,
|
|
306
322
|
periodValue: 6958.71,
|
|
307
323
|
},
|
|
308
324
|
{
|
|
@@ -349,19 +365,35 @@ async function run() {
|
|
|
349
365
|
const res = await marketplaceSubmitBillingData(vercel, {
|
|
350
366
|
integrationConfigurationId: "<id>",
|
|
351
367
|
requestBody: {
|
|
352
|
-
timestamp: new Date("
|
|
353
|
-
eod: new Date("
|
|
368
|
+
timestamp: new Date("2025-09-29T02:38:01.476Z"),
|
|
369
|
+
eod: new Date("2023-12-28T23:46:57.523Z"),
|
|
354
370
|
period: {
|
|
355
|
-
start: new Date("
|
|
356
|
-
end: new Date("
|
|
371
|
+
start: new Date("2023-06-25T19:04:50.518Z"),
|
|
372
|
+
end: new Date("2024-10-17T01:18:36.230Z"),
|
|
357
373
|
},
|
|
358
374
|
billing: {
|
|
359
375
|
items: [
|
|
360
376
|
{
|
|
361
377
|
billingPlanId: "<id>",
|
|
362
378
|
name: "<value>",
|
|
363
|
-
price: "
|
|
364
|
-
quantity:
|
|
379
|
+
price: "511.92",
|
|
380
|
+
quantity: 328.54,
|
|
381
|
+
units: "<value>",
|
|
382
|
+
total: "<value>",
|
|
383
|
+
},
|
|
384
|
+
{
|
|
385
|
+
billingPlanId: "<id>",
|
|
386
|
+
name: "<value>",
|
|
387
|
+
price: "4.49",
|
|
388
|
+
quantity: 3113.17,
|
|
389
|
+
units: "<value>",
|
|
390
|
+
total: "<value>",
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
billingPlanId: "<id>",
|
|
394
|
+
name: "<value>",
|
|
395
|
+
price: "896.30",
|
|
396
|
+
quantity: 8536.32,
|
|
365
397
|
units: "<value>",
|
|
366
398
|
total: "<value>",
|
|
367
399
|
},
|
|
@@ -373,7 +405,7 @@ async function run() {
|
|
|
373
405
|
name: "<value>",
|
|
374
406
|
type: "rate",
|
|
375
407
|
units: "<value>",
|
|
376
|
-
dayValue: 9439.
|
|
408
|
+
dayValue: 9439.22,
|
|
377
409
|
periodValue: 6958.71,
|
|
378
410
|
},
|
|
379
411
|
{
|
|
@@ -446,10 +478,10 @@ async function run() {
|
|
|
446
478
|
const result = await vercel.marketplace.submitInvoice({
|
|
447
479
|
integrationConfigurationId: "<id>",
|
|
448
480
|
requestBody: {
|
|
449
|
-
invoiceDate: new Date("
|
|
481
|
+
invoiceDate: new Date("2023-06-05T08:54:16.353Z"),
|
|
450
482
|
period: {
|
|
451
|
-
start: new Date("
|
|
452
|
-
end: new Date("
|
|
483
|
+
start: new Date("2023-07-26T14:15:15.601Z"),
|
|
484
|
+
end: new Date("2025-10-08T09:35:48.520Z"),
|
|
453
485
|
},
|
|
454
486
|
items: [
|
|
455
487
|
{
|
|
@@ -464,7 +496,7 @@ async function run() {
|
|
|
464
496
|
billingPlanId: "<id>",
|
|
465
497
|
name: "<value>",
|
|
466
498
|
price: "84.05",
|
|
467
|
-
quantity: 9130.
|
|
499
|
+
quantity: 9130.95,
|
|
468
500
|
units: "<value>",
|
|
469
501
|
total: "<value>",
|
|
470
502
|
},
|
|
@@ -497,10 +529,10 @@ async function run() {
|
|
|
497
529
|
const res = await marketplaceSubmitInvoice(vercel, {
|
|
498
530
|
integrationConfigurationId: "<id>",
|
|
499
531
|
requestBody: {
|
|
500
|
-
invoiceDate: new Date("
|
|
532
|
+
invoiceDate: new Date("2023-06-05T08:54:16.353Z"),
|
|
501
533
|
period: {
|
|
502
|
-
start: new Date("
|
|
503
|
-
end: new Date("
|
|
534
|
+
start: new Date("2023-07-26T14:15:15.601Z"),
|
|
535
|
+
end: new Date("2025-10-08T09:35:48.520Z"),
|
|
504
536
|
},
|
|
505
537
|
items: [
|
|
506
538
|
{
|
|
@@ -515,7 +547,7 @@ async function run() {
|
|
|
515
547
|
billingPlanId: "<id>",
|
|
516
548
|
name: "<value>",
|
|
517
549
|
price: "84.05",
|
|
518
|
-
quantity: 9130.
|
|
550
|
+
quantity: 9130.95,
|
|
519
551
|
units: "<value>",
|
|
520
552
|
total: "<value>",
|
|
521
553
|
},
|
|
@@ -21,6 +21,8 @@
|
|
|
21
21
|
* [createProjectEnv](#createprojectenv) - Create one or more environment variables
|
|
22
22
|
* [removeProjectEnv](#removeprojectenv) - Remove an environment variable
|
|
23
23
|
* [editProjectEnv](#editprojectenv) - Edit an environment variable
|
|
24
|
+
* [createProjectTransferRequest](#createprojecttransferrequest) - Create project transfer request
|
|
25
|
+
* [acceptProjectTransferRequest](#acceptprojecttransferrequest) - Accept project transfer request
|
|
24
26
|
* [updateProjectProtectionBypass](#updateprojectprotectionbypass) - Update Protection Bypass for Automation
|
|
25
27
|
* [requestPromote](#requestpromote) - Points all production domains for a project to the given deploy
|
|
26
28
|
* [listPromoteAliases](#listpromotealiases) - Gets a list of aliases with status for the current promote
|
|
@@ -468,11 +470,14 @@ const vercel = new Vercel({
|
|
|
468
470
|
async function run() {
|
|
469
471
|
const result = await vercel.projects.getProjectDomains({
|
|
470
472
|
idOrName: "<value>",
|
|
473
|
+
production: "false",
|
|
471
474
|
customEnvironmentId: "env_123abc4567",
|
|
475
|
+
redirects: "true",
|
|
472
476
|
redirect: "example.com",
|
|
473
477
|
limit: 20,
|
|
474
478
|
since: 1609499532000,
|
|
475
479
|
until: 1612264332000,
|
|
480
|
+
order: "DESC",
|
|
476
481
|
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
|
|
477
482
|
slug: "my-team-url-slug",
|
|
478
483
|
});
|
|
@@ -501,11 +506,14 @@ const vercel = new VercelCore({
|
|
|
501
506
|
async function run() {
|
|
502
507
|
const res = await projectsGetProjectDomains(vercel, {
|
|
503
508
|
idOrName: "<value>",
|
|
509
|
+
production: "false",
|
|
504
510
|
customEnvironmentId: "env_123abc4567",
|
|
511
|
+
redirects: "true",
|
|
505
512
|
redirect: "example.com",
|
|
506
513
|
limit: 20,
|
|
507
514
|
since: 1609499532000,
|
|
508
515
|
until: 1612264332000,
|
|
516
|
+
order: "DESC",
|
|
509
517
|
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
|
|
510
518
|
slug: "my-team-url-slug",
|
|
511
519
|
});
|
|
@@ -1462,6 +1470,177 @@ run();
|
|
|
1462
1470
|
| models.VercelForbiddenError | 401 | application/json |
|
|
1463
1471
|
| models.SDKError | 4XX, 5XX | \*/\* |
|
|
1464
1472
|
|
|
1473
|
+
## createProjectTransferRequest
|
|
1474
|
+
|
|
1475
|
+
Initiates a project transfer request from one team to another. <br/> Returns a `code` that remains valid for 24 hours and can be used to accept the transfer request by another team using the `PUT /projects/transfer-request/:code` endpoint. <br/> Users can also accept the project transfer request using the claim URL: `https://vercel.com/claim-deployment?code=<code>&returnUrl=<returnUrl>`. <br/> The `code` parameter specifies the project transfer request code generated using this endpoint. <br/> The `returnUrl` parameter redirects users to a specific page of the application if the claim URL is invalid or expired.
|
|
1476
|
+
|
|
1477
|
+
### Example Usage
|
|
1478
|
+
|
|
1479
|
+
```typescript
|
|
1480
|
+
import { Vercel } from "@vercel/sdk";
|
|
1481
|
+
|
|
1482
|
+
const vercel = new Vercel({
|
|
1483
|
+
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
|
|
1484
|
+
});
|
|
1485
|
+
|
|
1486
|
+
async function run() {
|
|
1487
|
+
const result = await vercel.projects.createProjectTransferRequest({
|
|
1488
|
+
idOrName: "<value>",
|
|
1489
|
+
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
|
|
1490
|
+
slug: "my-team-url-slug",
|
|
1491
|
+
});
|
|
1492
|
+
|
|
1493
|
+
// Handle the result
|
|
1494
|
+
console.log(result);
|
|
1495
|
+
}
|
|
1496
|
+
|
|
1497
|
+
run();
|
|
1498
|
+
```
|
|
1499
|
+
|
|
1500
|
+
### Standalone function
|
|
1501
|
+
|
|
1502
|
+
The standalone function version of this method:
|
|
1503
|
+
|
|
1504
|
+
```typescript
|
|
1505
|
+
import { VercelCore } from "@vercel/sdk/core.js";
|
|
1506
|
+
import { projectsCreateProjectTransferRequest } from "@vercel/sdk/funcs/projectsCreateProjectTransferRequest.js";
|
|
1507
|
+
|
|
1508
|
+
// Use `VercelCore` for best tree-shaking performance.
|
|
1509
|
+
// You can create one instance of it to use across an application.
|
|
1510
|
+
const vercel = new VercelCore({
|
|
1511
|
+
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
|
|
1512
|
+
});
|
|
1513
|
+
|
|
1514
|
+
async function run() {
|
|
1515
|
+
const res = await projectsCreateProjectTransferRequest(vercel, {
|
|
1516
|
+
idOrName: "<value>",
|
|
1517
|
+
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
|
|
1518
|
+
slug: "my-team-url-slug",
|
|
1519
|
+
});
|
|
1520
|
+
|
|
1521
|
+
if (!res.ok) {
|
|
1522
|
+
throw res.error;
|
|
1523
|
+
}
|
|
1524
|
+
|
|
1525
|
+
const { value: result } = res;
|
|
1526
|
+
|
|
1527
|
+
// Handle the result
|
|
1528
|
+
console.log(result);
|
|
1529
|
+
}
|
|
1530
|
+
|
|
1531
|
+
run();
|
|
1532
|
+
```
|
|
1533
|
+
|
|
1534
|
+
### Parameters
|
|
1535
|
+
|
|
1536
|
+
| Parameter | Type | Required | Description |
|
|
1537
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1538
|
+
| `request` | [models.CreateProjectTransferRequestRequest](../../models/createprojecttransferrequestrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
1539
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
1540
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
1541
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
1542
|
+
|
|
1543
|
+
### Response
|
|
1544
|
+
|
|
1545
|
+
**Promise\<[models.CreateProjectTransferRequestResponseBody](../../models/createprojecttransferrequestresponsebody.md)\>**
|
|
1546
|
+
|
|
1547
|
+
### Errors
|
|
1548
|
+
|
|
1549
|
+
| Error Type | Status Code | Content Type |
|
|
1550
|
+
| ---------------------------- | ---------------------------- | ---------------------------- |
|
|
1551
|
+
| models.VercelBadRequestError | 400 | application/json |
|
|
1552
|
+
| models.VercelForbiddenError | 401 | application/json |
|
|
1553
|
+
| models.SDKError | 4XX, 5XX | \*/\* |
|
|
1554
|
+
|
|
1555
|
+
## acceptProjectTransferRequest
|
|
1556
|
+
|
|
1557
|
+
Accept a project transfer request initated by another team. <br/> The `code` is generated using the `POST /projects/:idOrName/transfer-request` endpoint.
|
|
1558
|
+
|
|
1559
|
+
### Example Usage
|
|
1560
|
+
|
|
1561
|
+
```typescript
|
|
1562
|
+
import { Vercel } from "@vercel/sdk";
|
|
1563
|
+
|
|
1564
|
+
const vercel = new Vercel({
|
|
1565
|
+
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
|
|
1566
|
+
});
|
|
1567
|
+
|
|
1568
|
+
async function run() {
|
|
1569
|
+
const result = await vercel.projects.acceptProjectTransferRequest({
|
|
1570
|
+
code: "<value>",
|
|
1571
|
+
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
|
|
1572
|
+
slug: "my-team-url-slug",
|
|
1573
|
+
requestBody: {
|
|
1574
|
+
newProjectName: "a-project-name",
|
|
1575
|
+
},
|
|
1576
|
+
});
|
|
1577
|
+
|
|
1578
|
+
// Handle the result
|
|
1579
|
+
console.log(result);
|
|
1580
|
+
}
|
|
1581
|
+
|
|
1582
|
+
run();
|
|
1583
|
+
```
|
|
1584
|
+
|
|
1585
|
+
### Standalone function
|
|
1586
|
+
|
|
1587
|
+
The standalone function version of this method:
|
|
1588
|
+
|
|
1589
|
+
```typescript
|
|
1590
|
+
import { VercelCore } from "@vercel/sdk/core.js";
|
|
1591
|
+
import { projectsAcceptProjectTransferRequest } from "@vercel/sdk/funcs/projectsAcceptProjectTransferRequest.js";
|
|
1592
|
+
|
|
1593
|
+
// Use `VercelCore` for best tree-shaking performance.
|
|
1594
|
+
// You can create one instance of it to use across an application.
|
|
1595
|
+
const vercel = new VercelCore({
|
|
1596
|
+
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
|
|
1597
|
+
});
|
|
1598
|
+
|
|
1599
|
+
async function run() {
|
|
1600
|
+
const res = await projectsAcceptProjectTransferRequest(vercel, {
|
|
1601
|
+
code: "<value>",
|
|
1602
|
+
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
|
|
1603
|
+
slug: "my-team-url-slug",
|
|
1604
|
+
requestBody: {
|
|
1605
|
+
newProjectName: "a-project-name",
|
|
1606
|
+
},
|
|
1607
|
+
});
|
|
1608
|
+
|
|
1609
|
+
if (!res.ok) {
|
|
1610
|
+
throw res.error;
|
|
1611
|
+
}
|
|
1612
|
+
|
|
1613
|
+
const { value: result } = res;
|
|
1614
|
+
|
|
1615
|
+
// Handle the result
|
|
1616
|
+
console.log(result);
|
|
1617
|
+
}
|
|
1618
|
+
|
|
1619
|
+
run();
|
|
1620
|
+
```
|
|
1621
|
+
|
|
1622
|
+
### Parameters
|
|
1623
|
+
|
|
1624
|
+
| Parameter | Type | Required | Description |
|
|
1625
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1626
|
+
| `request` | [models.AcceptProjectTransferRequestRequest](../../models/acceptprojecttransferrequestrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
1627
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
1628
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
1629
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
1630
|
+
|
|
1631
|
+
### Response
|
|
1632
|
+
|
|
1633
|
+
**Promise\<[models.AcceptProjectTransferRequestResponseBody](../../models/acceptprojecttransferrequestresponsebody.md)\>**
|
|
1634
|
+
|
|
1635
|
+
### Errors
|
|
1636
|
+
|
|
1637
|
+
| Error Type | Status Code | Content Type |
|
|
1638
|
+
| ---------------------------- | ---------------------------- | ---------------------------- |
|
|
1639
|
+
| models.VercelBadRequestError | 400 | application/json |
|
|
1640
|
+
| models.VercelForbiddenError | 401 | application/json |
|
|
1641
|
+
| models.VercelNotFoundError | 404 | application/json |
|
|
1642
|
+
| models.SDKError | 4XX, 5XX | \*/\* |
|
|
1643
|
+
|
|
1465
1644
|
## updateProjectProtectionBypass
|
|
1466
1645
|
|
|
1467
1646
|
Update the deployment protection automation bypass for a project
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* [putFirewallConfig](#putfirewallconfig) - Put Firewall Configuration
|
|
10
10
|
* [updateFirewallConfig](#updatefirewallconfig) - Update Firewall Configuration
|
|
11
11
|
* [getFirewallConfig](#getfirewallconfig) - Read Firewall Configuration
|
|
12
|
+
* [getActiveAttackStatus](#getactiveattackstatus) - Read active attack data
|
|
12
13
|
* [getBypassIp](#getbypassip) - Read System Bypass
|
|
13
14
|
* [addBypassIp](#addbypassip) - Create System Bypass Rule
|
|
14
15
|
* [removeBypassIp](#removebypassip) - Remove System Bypass Rule
|
|
@@ -367,6 +368,89 @@ run();
|
|
|
367
368
|
| models.VercelNotFoundError | 404 | application/json |
|
|
368
369
|
| models.SDKError | 4XX, 5XX | \*/\* |
|
|
369
370
|
|
|
371
|
+
## getActiveAttackStatus
|
|
372
|
+
|
|
373
|
+
Retrieve active attack data within the last 24h window
|
|
374
|
+
|
|
375
|
+
### Example Usage
|
|
376
|
+
|
|
377
|
+
```typescript
|
|
378
|
+
import { Vercel } from "@vercel/sdk";
|
|
379
|
+
|
|
380
|
+
const vercel = new Vercel({
|
|
381
|
+
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
|
|
382
|
+
});
|
|
383
|
+
|
|
384
|
+
async function run() {
|
|
385
|
+
const result = await vercel.security.getActiveAttackStatus({
|
|
386
|
+
projectId: "<id>",
|
|
387
|
+
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
|
|
388
|
+
slug: "my-team-url-slug",
|
|
389
|
+
});
|
|
390
|
+
|
|
391
|
+
// Handle the result
|
|
392
|
+
console.log(result);
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
run();
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
### Standalone function
|
|
399
|
+
|
|
400
|
+
The standalone function version of this method:
|
|
401
|
+
|
|
402
|
+
```typescript
|
|
403
|
+
import { VercelCore } from "@vercel/sdk/core.js";
|
|
404
|
+
import { securityGetActiveAttackStatus } from "@vercel/sdk/funcs/securityGetActiveAttackStatus.js";
|
|
405
|
+
|
|
406
|
+
// Use `VercelCore` for best tree-shaking performance.
|
|
407
|
+
// You can create one instance of it to use across an application.
|
|
408
|
+
const vercel = new VercelCore({
|
|
409
|
+
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
|
|
410
|
+
});
|
|
411
|
+
|
|
412
|
+
async function run() {
|
|
413
|
+
const res = await securityGetActiveAttackStatus(vercel, {
|
|
414
|
+
projectId: "<id>",
|
|
415
|
+
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
|
|
416
|
+
slug: "my-team-url-slug",
|
|
417
|
+
});
|
|
418
|
+
|
|
419
|
+
if (!res.ok) {
|
|
420
|
+
throw res.error;
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
const { value: result } = res;
|
|
424
|
+
|
|
425
|
+
// Handle the result
|
|
426
|
+
console.log(result);
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
run();
|
|
430
|
+
```
|
|
431
|
+
|
|
432
|
+
### Parameters
|
|
433
|
+
|
|
434
|
+
| Parameter | Type | Required | Description |
|
|
435
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
436
|
+
| `request` | [models.GetActiveAttackStatusRequest](../../models/getactiveattackstatusrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
437
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
438
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
439
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
440
|
+
|
|
441
|
+
### Response
|
|
442
|
+
|
|
443
|
+
**Promise\<[models.GetActiveAttackStatusResponseBody](../../models/getactiveattackstatusresponsebody.md)\>**
|
|
444
|
+
|
|
445
|
+
### Errors
|
|
446
|
+
|
|
447
|
+
| Error Type | Status Code | Content Type |
|
|
448
|
+
| ---------------------------- | ---------------------------- | ---------------------------- |
|
|
449
|
+
| models.VercelBadRequestError | 400 | application/json |
|
|
450
|
+
| models.VercelForbiddenError | 401 | application/json |
|
|
451
|
+
| models.VercelNotFoundError | 404 | application/json |
|
|
452
|
+
| models.SDKError | 4XX, 5XX | \*/\* |
|
|
453
|
+
|
|
370
454
|
## getBypassIp
|
|
371
455
|
|
|
372
456
|
Retrieve the system bypass rules configured for the specified project
|
|
@@ -505,6 +505,10 @@ async function run() {
|
|
|
505
505
|
projectId: "prj_ndlgr43fadlPyCtREAqxxdyFK",
|
|
506
506
|
role: "ADMIN",
|
|
507
507
|
},
|
|
508
|
+
{
|
|
509
|
+
projectId: "prj_ndlgr43fadlPyCtREAqxxdyFK",
|
|
510
|
+
role: "ADMIN",
|
|
511
|
+
},
|
|
508
512
|
],
|
|
509
513
|
},
|
|
510
514
|
});
|
|
@@ -542,6 +546,10 @@ async function run() {
|
|
|
542
546
|
projectId: "prj_ndlgr43fadlPyCtREAqxxdyFK",
|
|
543
547
|
role: "ADMIN",
|
|
544
548
|
},
|
|
549
|
+
{
|
|
550
|
+
projectId: "prj_ndlgr43fadlPyCtREAqxxdyFK",
|
|
551
|
+
role: "ADMIN",
|
|
552
|
+
},
|
|
545
553
|
],
|
|
546
554
|
},
|
|
547
555
|
});
|