@vercel/sdk 1.7.4 → 1.7.5

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.
Files changed (164) hide show
  1. package/README.md +6 -6
  2. package/bin/mcp-server.js +559 -272
  3. package/bin/mcp-server.js.map +35 -35
  4. package/docs/sdks/accessgroups/README.md +16 -0
  5. package/docs/sdks/artifacts/README.md +6 -6
  6. package/docs/sdks/authentication/README.md +1 -1
  7. package/docs/sdks/deployments/README.md +8 -14
  8. package/docs/sdks/dns/README.md +12 -26
  9. package/docs/sdks/domains/README.md +2 -2
  10. package/docs/sdks/edgeconfig/README.md +10 -2
  11. package/docs/sdks/marketplace/README.md +77 -97
  12. package/docs/sdks/security/README.md +4 -10
  13. package/docs/sdks/teams/README.md +8 -0
  14. package/docs/sdks/vercel/README.md +2 -2
  15. package/docs/sdks/webhooks/README.md +12 -4
  16. package/esm/__tests__/deployments.test.js +1 -2
  17. package/esm/__tests__/deployments.test.js.map +1 -1
  18. package/esm/__tests__/projects.test.js +13 -15
  19. package/esm/__tests__/projects.test.js.map +1 -1
  20. package/esm/funcs/authenticationExchangeSsoToken.d.ts +1 -1
  21. package/esm/funcs/authenticationExchangeSsoToken.js +1 -1
  22. package/esm/funcs/certsGetCertById.js +1 -1
  23. package/esm/funcs/certsIssueCert.js +1 -1
  24. package/esm/funcs/certsRemoveCert.js +1 -1
  25. package/esm/funcs/certsUploadCert.js +1 -1
  26. package/esm/funcs/deploymentsGetDeploymentFileContents.d.ts +2 -2
  27. package/esm/funcs/deploymentsGetDeploymentFileContents.d.ts.map +1 -1
  28. package/esm/funcs/deploymentsGetDeploymentFileContents.js +4 -3
  29. package/esm/funcs/deploymentsGetDeploymentFileContents.js.map +1 -1
  30. package/esm/funcs/marketplaceExchangeSsoToken.d.ts +1 -1
  31. package/esm/funcs/marketplaceExchangeSsoToken.js +1 -1
  32. package/esm/funcs/projectsRemoveProjectDomain.js +3 -2
  33. package/esm/funcs/projectsRemoveProjectDomain.js.map +1 -1
  34. package/esm/funcs/projectsRequestPromote.js +0 -1
  35. package/esm/funcs/projectsRequestPromote.js.map +1 -1
  36. package/esm/lib/config.d.ts +3 -3
  37. package/esm/lib/config.js +3 -3
  38. package/esm/mcp-server/cli/start/impl.js +2 -2
  39. package/esm/mcp-server/cli/start/impl.js.map +1 -1
  40. package/esm/mcp-server/mcp-server.js +1 -1
  41. package/esm/mcp-server/server.js +1 -1
  42. package/esm/mcp-server/tools/authenticationExchangeSsoToken.js +1 -1
  43. package/esm/mcp-server/tools/authenticationExchangeSsoToken.js.map +1 -1
  44. package/esm/mcp-server/tools/deploymentsGetDeploymentFileContents.d.ts.map +1 -1
  45. package/esm/mcp-server/tools/deploymentsGetDeploymentFileContents.js +1 -2
  46. package/esm/mcp-server/tools/deploymentsGetDeploymentFileContents.js.map +1 -1
  47. package/esm/mcp-server/tools/marketplaceExchangeSsoToken.js +1 -1
  48. package/esm/mcp-server/tools/marketplaceExchangeSsoToken.js.map +1 -1
  49. package/esm/models/canceldeploymentop.d.ts +10 -0
  50. package/esm/models/canceldeploymentop.d.ts.map +1 -1
  51. package/esm/models/canceldeploymentop.js +4 -0
  52. package/esm/models/canceldeploymentop.js.map +1 -1
  53. package/esm/models/createdeploymentop.d.ts +38 -28
  54. package/esm/models/createdeploymentop.d.ts.map +1 -1
  55. package/esm/models/createdeploymentop.js +16 -12
  56. package/esm/models/createdeploymentop.js.map +1 -1
  57. package/esm/models/createprojectop.d.ts +114 -2
  58. package/esm/models/createprojectop.d.ts.map +1 -1
  59. package/esm/models/createprojectop.js +108 -2
  60. package/esm/models/createprojectop.js.map +1 -1
  61. package/esm/models/getdeploymentfilecontentsop.d.ts +0 -31
  62. package/esm/models/getdeploymentfilecontentsop.d.ts.map +1 -1
  63. package/esm/models/getdeploymentfilecontentsop.js +0 -25
  64. package/esm/models/getdeploymentfilecontentsop.js.map +1 -1
  65. package/esm/models/getdeploymentop.d.ts +10 -0
  66. package/esm/models/getdeploymentop.d.ts.map +1 -1
  67. package/esm/models/getdeploymentop.js +4 -0
  68. package/esm/models/getdeploymentop.js.map +1 -1
  69. package/esm/models/getprojectsop.d.ts +114 -2
  70. package/esm/models/getprojectsop.d.ts.map +1 -1
  71. package/esm/models/getprojectsop.js +108 -2
  72. package/esm/models/getprojectsop.js.map +1 -1
  73. package/esm/models/importresourceop.d.ts +9 -0
  74. package/esm/models/importresourceop.d.ts.map +1 -1
  75. package/esm/models/importresourceop.js +2 -0
  76. package/esm/models/importresourceop.js.map +1 -1
  77. package/esm/models/issuecertop.d.ts +2 -2
  78. package/esm/models/issuecertop.d.ts.map +1 -1
  79. package/esm/models/issuecertop.js +2 -2
  80. package/esm/models/issuecertop.js.map +1 -1
  81. package/esm/models/removeprojectdomainop.d.ts +30 -0
  82. package/esm/models/removeprojectdomainop.d.ts.map +1 -1
  83. package/esm/models/removeprojectdomainop.js +38 -0
  84. package/esm/models/removeprojectdomainop.js.map +1 -1
  85. package/esm/models/requestpromoteop.d.ts +0 -5
  86. package/esm/models/requestpromoteop.d.ts.map +1 -1
  87. package/esm/models/requestpromoteop.js +0 -2
  88. package/esm/models/requestpromoteop.js.map +1 -1
  89. package/esm/models/teamlimited.d.ts +13 -13
  90. package/esm/models/teamlimited.d.ts.map +1 -1
  91. package/esm/models/teamlimited.js +6 -6
  92. package/esm/models/teamlimited.js.map +1 -1
  93. package/esm/models/updateprojectdatacacheop.d.ts +114 -2
  94. package/esm/models/updateprojectdatacacheop.d.ts.map +1 -1
  95. package/esm/models/updateprojectdatacacheop.js +108 -2
  96. package/esm/models/updateprojectdatacacheop.js.map +1 -1
  97. package/esm/models/updateprojectop.d.ts +114 -2
  98. package/esm/models/updateprojectop.d.ts.map +1 -1
  99. package/esm/models/updateprojectop.js +108 -2
  100. package/esm/models/updateprojectop.js.map +1 -1
  101. package/esm/models/updateresourcesecretsbyidop.d.ts +9 -0
  102. package/esm/models/updateresourcesecretsbyidop.d.ts.map +1 -1
  103. package/esm/models/updateresourcesecretsbyidop.js +2 -0
  104. package/esm/models/updateresourcesecretsbyidop.js.map +1 -1
  105. package/esm/models/updateresourcesecretsop.d.ts +9 -0
  106. package/esm/models/updateresourcesecretsop.d.ts.map +1 -1
  107. package/esm/models/updateresourcesecretsop.js +2 -0
  108. package/esm/models/updateresourcesecretsop.js.map +1 -1
  109. package/esm/models/uploadcertop.d.ts +2 -2
  110. package/esm/models/uploadcertop.d.ts.map +1 -1
  111. package/esm/models/uploadcertop.js +2 -2
  112. package/esm/models/uploadcertop.js.map +1 -1
  113. package/esm/models/userevent.d.ts +368 -257
  114. package/esm/models/userevent.d.ts.map +1 -1
  115. package/esm/models/userevent.js +423 -315
  116. package/esm/models/userevent.js.map +1 -1
  117. package/esm/sdk/authentication.d.ts +1 -1
  118. package/esm/sdk/authentication.js +1 -1
  119. package/esm/sdk/deployments.d.ts +2 -2
  120. package/esm/sdk/deployments.d.ts.map +1 -1
  121. package/esm/sdk/deployments.js.map +1 -1
  122. package/esm/sdk/marketplace.d.ts +1 -1
  123. package/esm/sdk/marketplace.js +1 -1
  124. package/jsr.json +1 -1
  125. package/package.json +1 -1
  126. package/src/__tests__/deployments.test.ts +1 -2
  127. package/src/__tests__/projects.test.ts +13 -15
  128. package/src/funcs/authenticationExchangeSsoToken.ts +1 -1
  129. package/src/funcs/certsGetCertById.ts +1 -1
  130. package/src/funcs/certsIssueCert.ts +1 -1
  131. package/src/funcs/certsRemoveCert.ts +1 -1
  132. package/src/funcs/certsUploadCert.ts +1 -1
  133. package/src/funcs/deploymentsGetDeploymentFileContents.ts +6 -7
  134. package/src/funcs/marketplaceExchangeSsoToken.ts +1 -1
  135. package/src/funcs/projectsRemoveProjectDomain.ts +3 -2
  136. package/src/funcs/projectsRequestPromote.ts +0 -1
  137. package/src/lib/config.ts +3 -3
  138. package/src/mcp-server/cli/start/impl.ts +2 -2
  139. package/src/mcp-server/mcp-server.ts +1 -1
  140. package/src/mcp-server/server.ts +1 -1
  141. package/src/mcp-server/tools/authenticationExchangeSsoToken.ts +1 -1
  142. package/src/mcp-server/tools/deploymentsGetDeploymentFileContents.ts +1 -3
  143. package/src/mcp-server/tools/marketplaceExchangeSsoToken.ts +1 -1
  144. package/src/models/canceldeploymentop.ts +14 -0
  145. package/src/models/createdeploymentop.ts +30 -16
  146. package/src/models/createprojectop.ts +243 -4
  147. package/src/models/getdeploymentfilecontentsop.ts +0 -69
  148. package/src/models/getdeploymentop.ts +14 -0
  149. package/src/models/getprojectsop.ts +237 -4
  150. package/src/models/importresourceop.ts +7 -0
  151. package/src/models/issuecertop.ts +4 -4
  152. package/src/models/removeprojectdomainop.ts +78 -0
  153. package/src/models/requestpromoteop.ts +0 -7
  154. package/src/models/teamlimited.ts +13 -13
  155. package/src/models/updateprojectdatacacheop.ts +260 -4
  156. package/src/models/updateprojectop.ts +243 -4
  157. package/src/models/updateresourcesecretsbyidop.ts +7 -0
  158. package/src/models/updateresourcesecretsop.ts +7 -0
  159. package/src/models/uploadcertop.ts +4 -4
  160. package/src/models/userevent.ts +798 -582
  161. package/src/sdk/authentication.ts +1 -1
  162. package/src/sdk/deployments.ts +2 -5
  163. package/src/sdk/marketplace.ts +1 -1
  164. package/vercel-spec.json +497 -94
@@ -498,6 +498,14 @@ async function run() {
498
498
  projectId: "prj_ndlgr43fadlPyCtREAqxxdyFK",
499
499
  role: "ADMIN",
500
500
  },
501
+ {
502
+ projectId: "prj_ndlgr43fadlPyCtREAqxxdyFK",
503
+ role: "ADMIN",
504
+ },
505
+ {
506
+ projectId: "prj_ndlgr43fadlPyCtREAqxxdyFK",
507
+ role: "ADMIN",
508
+ },
501
509
  ],
502
510
  membersToAdd: [
503
511
  "usr_1a2b3c4d5e6f7g8h9i0j",
@@ -538,6 +546,14 @@ async function run() {
538
546
  projectId: "prj_ndlgr43fadlPyCtREAqxxdyFK",
539
547
  role: "ADMIN",
540
548
  },
549
+ {
550
+ projectId: "prj_ndlgr43fadlPyCtREAqxxdyFK",
551
+ role: "ADMIN",
552
+ },
553
+ {
554
+ projectId: "prj_ndlgr43fadlPyCtREAqxxdyFK",
555
+ role: "ADMIN",
556
+ },
541
557
  ],
542
558
  membersToAdd: [
543
559
  "usr_1a2b3c4d5e6f7g8h9i0j",
@@ -34,8 +34,8 @@ async function run() {
34
34
  requestBody: [
35
35
  {
36
36
  sessionId: "<id>",
37
- source: "LOCAL",
38
- event: "HIT",
37
+ source: "REMOTE",
38
+ event: "MISS",
39
39
  hash: "12HKQaOmR5t5Uy6vdcQsNIiZgHGB",
40
40
  duration: 400,
41
41
  },
@@ -71,8 +71,8 @@ async function run() {
71
71
  requestBody: [
72
72
  {
73
73
  sessionId: "<id>",
74
- source: "LOCAL",
75
- event: "HIT",
74
+ source: "REMOTE",
75
+ event: "MISS",
76
76
  hash: "12HKQaOmR5t5Uy6vdcQsNIiZgHGB",
77
77
  duration: 400,
78
78
  },
@@ -208,7 +208,7 @@ const vercel = new Vercel({
208
208
 
209
209
  async function run() {
210
210
  const result = await vercel.artifacts.uploadArtifact({
211
- contentLength: 4504.13,
211
+ contentLength: 3848.22,
212
212
  xArtifactDuration: 400,
213
213
  xArtifactClientCi: "VERCEL",
214
214
  xArtifactClientInteractive: 0,
@@ -243,7 +243,7 @@ const vercel = new VercelCore({
243
243
 
244
244
  async function run() {
245
245
  const res = await artifactsUploadArtifact(vercel, {
246
- contentLength: 4504.13,
246
+ contentLength: 3848.22,
247
247
  xArtifactDuration: 400,
248
248
  xArtifactClientCi: "VERCEL",
249
249
  xArtifactClientInteractive: 0,
@@ -13,7 +13,7 @@
13
13
 
14
14
  ## exchangeSsoToken
15
15
 
16
- During the autorization process, Vercel sends the user to the provider [redirectLoginUrl](https://vercel.com/docs/integrations/create-integration/submit-integration#redirect-login-url), that includes the OAuth authorization `code` parameter. The provider then calls the SSO Token Exchange endpoint with the sent code and receives the OIDC token. They log the user in based on this token and redirects the user back to the Vercel account using deep-link parameters included the redirectLoginUrl. This is used to verify the identity of the user during the [**Open in Provider** flow](https://vercel.com/docs/integrations/marketplace-flows#open-in-provider-button-flow). Providers should not persist the returned `id_token` in a database since the token will expire.
16
+ During the autorization process, Vercel sends the user to the provider [redirectLoginUrl](https://vercel.com/docs/integrations/create-integration/submit-integration#redirect-login-url), that includes the OAuth authorization `code` parameter. The provider then calls the SSO Token Exchange endpoint with the sent code and receives the OIDC token. They log the user in based on this token and redirects the user back to the Vercel account using deep-link parameters included the redirectLoginUrl. Providers should not persist the returned `id_token` in a database since the token will expire. See [**Authentication with SSO**](https://vercel.com/docs/integrations/create-integration/marketplace-api#authentication-with-sso) for more details.
17
17
 
18
18
  ### Example Usage
19
19
 
@@ -303,9 +303,6 @@ async function run() {
303
303
  {
304
304
  file: "folder/file.js",
305
305
  },
306
- {
307
- file: "folder/file.js",
308
- },
309
306
  ],
310
307
  gitMetadata: {
311
308
  remoteUrl: "https://github.com/vercel/next.js",
@@ -316,8 +313,9 @@ async function run() {
316
313
  dirty: true,
317
314
  },
318
315
  gitSource: {
316
+ org: "vercel",
319
317
  ref: "main",
320
- repoId: 123456789,
318
+ repo: "next.js",
321
319
  sha: "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0",
322
320
  type: "github",
323
321
  },
@@ -365,9 +363,6 @@ async function run() {
365
363
  {
366
364
  file: "folder/file.js",
367
365
  },
368
- {
369
- file: "folder/file.js",
370
- },
371
366
  ],
372
367
  gitMetadata: {
373
368
  remoteUrl: "https://github.com/vercel/next.js",
@@ -378,8 +373,9 @@ async function run() {
378
373
  dirty: true,
379
374
  },
380
375
  gitSource: {
376
+ org: "vercel",
381
377
  ref: "main",
382
- repoId: 123456789,
378
+ repo: "next.js",
383
379
  sha: "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0",
384
380
  type: "github",
385
381
  },
@@ -691,15 +687,14 @@ const vercel = new Vercel({
691
687
  });
692
688
 
693
689
  async function run() {
694
- const result = await vercel.deployments.getDeploymentFileContents({
690
+ await vercel.deployments.getDeploymentFileContents({
695
691
  id: "<id>",
696
692
  fileId: "<id>",
697
693
  teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
698
694
  slug: "my-team-url-slug",
699
695
  });
700
696
 
701
- // Handle the result
702
- console.log(result);
697
+
703
698
  }
704
699
 
705
700
  run();
@@ -733,8 +728,7 @@ async function run() {
733
728
 
734
729
  const { value: result } = res;
735
730
 
736
- // Handle the result
737
- console.log(result);
731
+
738
732
  }
739
733
 
740
734
  run();
@@ -751,7 +745,7 @@ run();
751
745
 
752
746
  ### Response
753
747
 
754
- **Promise\<[models.GetDeploymentFileContentsResponseBody](../../models/getdeploymentfilecontentsresponsebody.md)\>**
748
+ **Promise\<void\>**
755
749
 
756
750
  ### Errors
757
751
 
@@ -118,12 +118,13 @@ async function run() {
118
118
  teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
119
119
  slug: "my-team-url-slug",
120
120
  requestBody: {
121
- type: "CNAME",
121
+ type: "NS",
122
122
  ttl: 60,
123
- https: {
123
+ srv: {
124
124
  priority: 10,
125
+ weight: 10,
126
+ port: 5000,
125
127
  target: "host.example.com",
126
- params: "alpn=h2,h3",
127
128
  },
128
129
  comment: "used to verify ownership of domain",
129
130
  },
@@ -156,12 +157,13 @@ async function run() {
156
157
  teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
157
158
  slug: "my-team-url-slug",
158
159
  requestBody: {
159
- type: "CNAME",
160
+ type: "NS",
160
161
  ttl: 60,
161
- https: {
162
+ srv: {
162
163
  priority: 10,
164
+ weight: 10,
165
+ port: 5000,
163
166
  target: "host.example.com",
164
- params: "alpn=h2,h3",
165
167
  },
166
168
  comment: "used to verify ownership of domain",
167
169
  },
@@ -225,16 +227,8 @@ async function run() {
225
227
  value: "google.com",
226
228
  type: "A",
227
229
  ttl: 60,
228
- srv: {
229
- target: "example2.com.",
230
- weight: 97604,
231
- port: 570172,
232
- priority: 199524,
233
- },
234
- https: {
235
- priority: 35000,
236
- target: "example2.com.",
237
- },
230
+ srv: null,
231
+ https: null,
238
232
  comment: "used to verify ownership of domain",
239
233
  },
240
234
  });
@@ -270,16 +264,8 @@ async function run() {
270
264
  value: "google.com",
271
265
  type: "A",
272
266
  ttl: 60,
273
- srv: {
274
- target: "example2.com.",
275
- weight: 97604,
276
- port: 570172,
277
- priority: 199524,
278
- },
279
- https: {
280
- priority: 35000,
281
- target: "example2.com.",
282
- },
267
+ srv: null,
268
+ https: null,
283
269
  comment: "used to verify ownership of domain",
284
270
  },
285
271
  });
@@ -640,7 +640,7 @@ const vercel = new Vercel({
640
640
 
641
641
  async function run() {
642
642
  const result = await vercel.domains.patchDomain({
643
- domain: "tight-secrecy.info",
643
+ domain: "flimsy-napkin.com",
644
644
  teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
645
645
  slug: "my-team-url-slug",
646
646
  requestBody: {
@@ -671,7 +671,7 @@ const vercel = new VercelCore({
671
671
 
672
672
  async function run() {
673
673
  const res = await domainsPatchDomain(vercel, {
674
- domain: "tight-secrecy.info",
674
+ domain: "flimsy-napkin.com",
675
675
  teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
676
676
  slug: "my-team-url-slug",
677
677
  requestBody: {
@@ -964,7 +964,11 @@ async function run() {
964
964
  teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
965
965
  slug: "my-team-url-slug",
966
966
  requestBody: {
967
- tokens: [],
967
+ tokens: [
968
+ "<value 1>",
969
+ "<value 2>",
970
+ "<value 3>",
971
+ ],
968
972
  },
969
973
  });
970
974
 
@@ -994,7 +998,11 @@ async function run() {
994
998
  teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
995
999
  slug: "my-team-url-slug",
996
1000
  requestBody: {
997
- tokens: [],
1001
+ tokens: [
1002
+ "<value 1>",
1003
+ "<value 2>",
1004
+ "<value 3>",
1005
+ ],
998
1006
  },
999
1007
  });
1000
1008
 
@@ -285,61 +285,51 @@ async function run() {
285
285
  await vercel.marketplace.submitBillingData({
286
286
  integrationConfigurationId: "<id>",
287
287
  requestBody: {
288
- timestamp: new Date("2025-09-29T02:38:01.476Z"),
289
- eod: new Date("2023-12-28T23:46:57.523Z"),
288
+ timestamp: new Date("2023-11-26T05:03:03.977Z"),
289
+ eod: new Date("2023-04-14T04:58:49.647Z"),
290
290
  period: {
291
- start: new Date("2023-06-25T19:04:50.518Z"),
292
- end: new Date("2024-10-17T01:18:36.230Z"),
293
- },
294
- billing: {
295
- items: [
296
- {
297
- billingPlanId: "<id>",
298
- name: "<value>",
299
- price: "511.92",
300
- quantity: 328.54,
301
- units: "<value>",
302
- total: "<value>",
303
- },
304
- {
305
- billingPlanId: "<id>",
306
- name: "<value>",
307
- price: "4.49",
308
- quantity: 3113.17,
309
- units: "<value>",
310
- total: "<value>",
311
- },
312
- {
313
- billingPlanId: "<id>",
314
- name: "<value>",
315
- price: "896.30",
316
- quantity: 8536.32,
317
- units: "<value>",
318
- total: "<value>",
319
- },
320
- ],
291
+ start: new Date("2023-03-12T13:32:00.895Z"),
292
+ end: new Date("2023-12-15T15:17:13.187Z"),
321
293
  },
294
+ billing: [
295
+ {
296
+ billingPlanId: "<id>",
297
+ name: "<value>",
298
+ price: "694.00",
299
+ quantity: 228.64,
300
+ units: "<value>",
301
+ total: "<value>",
302
+ },
303
+ {
304
+ billingPlanId: "<id>",
305
+ name: "<value>",
306
+ price: "694.00",
307
+ quantity: 228.64,
308
+ units: "<value>",
309
+ total: "<value>",
310
+ },
311
+ ],
322
312
  usage: [
323
313
  {
324
314
  name: "<value>",
325
- type: "rate",
315
+ type: "interval",
326
316
  units: "<value>",
327
- dayValue: 9439.22,
328
- periodValue: 6958.71,
317
+ dayValue: 5212.43,
318
+ periodValue: 4147.35,
329
319
  },
330
320
  {
331
321
  name: "<value>",
332
- type: "total",
322
+ type: "interval",
333
323
  units: "<value>",
334
- dayValue: 9892.22,
335
- periodValue: 4749.62,
324
+ dayValue: 5212.43,
325
+ periodValue: 4147.35,
336
326
  },
337
327
  {
338
328
  name: "<value>",
339
- type: "rate",
329
+ type: "interval",
340
330
  units: "<value>",
341
- dayValue: 7119.53,
342
- periodValue: 6310.47,
331
+ dayValue: 5212.43,
332
+ periodValue: 4147.35,
343
333
  },
344
334
  ],
345
335
  },
@@ -369,61 +359,51 @@ async function run() {
369
359
  const res = await marketplaceSubmitBillingData(vercel, {
370
360
  integrationConfigurationId: "<id>",
371
361
  requestBody: {
372
- timestamp: new Date("2025-09-29T02:38:01.476Z"),
373
- eod: new Date("2023-12-28T23:46:57.523Z"),
362
+ timestamp: new Date("2023-11-26T05:03:03.977Z"),
363
+ eod: new Date("2023-04-14T04:58:49.647Z"),
374
364
  period: {
375
- start: new Date("2023-06-25T19:04:50.518Z"),
376
- end: new Date("2024-10-17T01:18:36.230Z"),
377
- },
378
- billing: {
379
- items: [
380
- {
381
- billingPlanId: "<id>",
382
- name: "<value>",
383
- price: "511.92",
384
- quantity: 328.54,
385
- units: "<value>",
386
- total: "<value>",
387
- },
388
- {
389
- billingPlanId: "<id>",
390
- name: "<value>",
391
- price: "4.49",
392
- quantity: 3113.17,
393
- units: "<value>",
394
- total: "<value>",
395
- },
396
- {
397
- billingPlanId: "<id>",
398
- name: "<value>",
399
- price: "896.30",
400
- quantity: 8536.32,
401
- units: "<value>",
402
- total: "<value>",
403
- },
404
- ],
365
+ start: new Date("2023-03-12T13:32:00.895Z"),
366
+ end: new Date("2023-12-15T15:17:13.187Z"),
405
367
  },
368
+ billing: [
369
+ {
370
+ billingPlanId: "<id>",
371
+ name: "<value>",
372
+ price: "694.00",
373
+ quantity: 228.64,
374
+ units: "<value>",
375
+ total: "<value>",
376
+ },
377
+ {
378
+ billingPlanId: "<id>",
379
+ name: "<value>",
380
+ price: "694.00",
381
+ quantity: 228.64,
382
+ units: "<value>",
383
+ total: "<value>",
384
+ },
385
+ ],
406
386
  usage: [
407
387
  {
408
388
  name: "<value>",
409
- type: "rate",
389
+ type: "interval",
410
390
  units: "<value>",
411
- dayValue: 9439.22,
412
- periodValue: 6958.71,
391
+ dayValue: 5212.43,
392
+ periodValue: 4147.35,
413
393
  },
414
394
  {
415
395
  name: "<value>",
416
- type: "total",
396
+ type: "interval",
417
397
  units: "<value>",
418
- dayValue: 9892.22,
419
- periodValue: 4749.62,
398
+ dayValue: 5212.43,
399
+ periodValue: 4147.35,
420
400
  },
421
401
  {
422
402
  name: "<value>",
423
- type: "rate",
403
+ type: "interval",
424
404
  units: "<value>",
425
- dayValue: 7119.53,
426
- periodValue: 6310.47,
405
+ dayValue: 5212.43,
406
+ periodValue: 4147.35,
427
407
  },
428
408
  ],
429
409
  },
@@ -479,25 +459,25 @@ async function run() {
479
459
  const result = await vercel.marketplace.submitInvoice({
480
460
  integrationConfigurationId: "<id>",
481
461
  requestBody: {
482
- invoiceDate: new Date("2023-06-05T08:54:16.353Z"),
462
+ invoiceDate: new Date("2023-12-12T13:24:35.882Z"),
483
463
  period: {
484
- start: new Date("2023-07-26T14:15:15.601Z"),
485
- end: new Date("2025-10-08T09:35:48.520Z"),
464
+ start: new Date("2024-10-20T02:46:19.279Z"),
465
+ end: new Date("2025-06-06T21:30:28.107Z"),
486
466
  },
487
467
  items: [
488
468
  {
489
469
  billingPlanId: "<id>",
490
470
  name: "<value>",
491
- price: "905.89",
492
- quantity: 1684.76,
471
+ price: "469.29",
472
+ quantity: 3808.42,
493
473
  units: "<value>",
494
474
  total: "<value>",
495
475
  },
496
476
  {
497
477
  billingPlanId: "<id>",
498
478
  name: "<value>",
499
- price: "84.05",
500
- quantity: 9130.95,
479
+ price: "469.29",
480
+ quantity: 3808.42,
501
481
  units: "<value>",
502
482
  total: "<value>",
503
483
  },
@@ -530,25 +510,25 @@ async function run() {
530
510
  const res = await marketplaceSubmitInvoice(vercel, {
531
511
  integrationConfigurationId: "<id>",
532
512
  requestBody: {
533
- invoiceDate: new Date("2023-06-05T08:54:16.353Z"),
513
+ invoiceDate: new Date("2023-12-12T13:24:35.882Z"),
534
514
  period: {
535
- start: new Date("2023-07-26T14:15:15.601Z"),
536
- end: new Date("2025-10-08T09:35:48.520Z"),
515
+ start: new Date("2024-10-20T02:46:19.279Z"),
516
+ end: new Date("2025-06-06T21:30:28.107Z"),
537
517
  },
538
518
  items: [
539
519
  {
540
520
  billingPlanId: "<id>",
541
521
  name: "<value>",
542
- price: "905.89",
543
- quantity: 1684.76,
522
+ price: "469.29",
523
+ quantity: 3808.42,
544
524
  units: "<value>",
545
525
  total: "<value>",
546
526
  },
547
527
  {
548
528
  billingPlanId: "<id>",
549
529
  name: "<value>",
550
- price: "84.05",
551
- quantity: 9130.95,
530
+ price: "469.29",
531
+ quantity: 3808.42,
552
532
  units: "<value>",
553
533
  total: "<value>",
554
534
  },
@@ -1085,7 +1065,7 @@ run();
1085
1065
 
1086
1066
  ## exchangeSsoToken
1087
1067
 
1088
- During the autorization process, Vercel sends the user to the provider [redirectLoginUrl](https://vercel.com/docs/integrations/create-integration/submit-integration#redirect-login-url), that includes the OAuth authorization `code` parameter. The provider then calls the SSO Token Exchange endpoint with the sent code and receives the OIDC token. They log the user in based on this token and redirects the user back to the Vercel account using deep-link parameters included the redirectLoginUrl. This is used to verify the identity of the user during the [**Open in Provider** flow](https://vercel.com/docs/integrations/marketplace-flows#open-in-provider-button-flow). Providers should not persist the returned `id_token` in a database since the token will expire.
1068
+ During the autorization process, Vercel sends the user to the provider [redirectLoginUrl](https://vercel.com/docs/integrations/create-integration/submit-integration#redirect-login-url), that includes the OAuth authorization `code` parameter. The provider then calls the SSO Token Exchange endpoint with the sent code and receives the OIDC token. They log the user in based on this token and redirects the user back to the Vercel account using deep-link parameters included the redirectLoginUrl. Providers should not persist the returned `id_token` in a database since the token will expire. See [**Authentication with SSO**](https://vercel.com/docs/integrations/create-integration/marketplace-api#authentication-with-sso) for more details.
1089
1069
 
1090
1070
  ### Example Usage
1091
1071
 
@@ -33,7 +33,7 @@ async function run() {
33
33
  slug: "my-team-url-slug",
34
34
  requestBody: {
35
35
  projectId: "<id>",
36
- attackModeEnabled: true,
36
+ attackModeEnabled: false,
37
37
  },
38
38
  });
39
39
 
@@ -64,7 +64,7 @@ async function run() {
64
64
  slug: "my-team-url-slug",
65
65
  requestBody: {
66
66
  projectId: "<id>",
67
- attackModeEnabled: true,
67
+ attackModeEnabled: false,
68
68
  },
69
69
  });
70
70
 
@@ -211,11 +211,8 @@ async function run() {
211
211
  teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
212
212
  slug: "my-team-url-slug",
213
213
  requestBody: {
214
- action: "managedRules.update",
214
+ action: "ip.remove",
215
215
  id: "<id>",
216
- value: {
217
- active: true,
218
- },
219
216
  },
220
217
  });
221
218
 
@@ -246,11 +243,8 @@ async function run() {
246
243
  teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
247
244
  slug: "my-team-url-slug",
248
245
  requestBody: {
249
- action: "managedRules.update",
246
+ action: "ip.remove",
250
247
  id: "<id>",
251
- value: {
252
- active: true,
253
- },
254
248
  },
255
249
  });
256
250
 
@@ -504,6 +504,10 @@ async function run() {
504
504
  projectId: "prj_ndlgr43fadlPyCtREAqxxdyFK",
505
505
  role: "ADMIN",
506
506
  },
507
+ {
508
+ projectId: "prj_ndlgr43fadlPyCtREAqxxdyFK",
509
+ role: "ADMIN",
510
+ },
507
511
  ],
508
512
  },
509
513
  });
@@ -544,6 +548,10 @@ async function run() {
544
548
  projectId: "prj_ndlgr43fadlPyCtREAqxxdyFK",
545
549
  role: "ADMIN",
546
550
  },
551
+ {
552
+ projectId: "prj_ndlgr43fadlPyCtREAqxxdyFK",
553
+ role: "ADMIN",
554
+ },
547
555
  ],
548
556
  },
549
557
  });
@@ -24,8 +24,8 @@ const vercel = new Vercel();
24
24
  async function run() {
25
25
  const result = await vercel.postDomains({
26
26
  name: "example.com",
27
- cdnEnabled: true,
28
27
  method: "transfer-in",
28
+ token: "fdhfr820ad#@FAdlj$$",
29
29
  });
30
30
 
31
31
  // Handle the result
@@ -50,8 +50,8 @@ const vercel = new VercelCore();
50
50
  async function run() {
51
51
  const res = await postDomains(vercel, {
52
52
  name: "example.com",
53
- cdnEnabled: true,
54
53
  method: "transfer-in",
54
+ token: "fdhfr820ad#@FAdlj$$",
55
55
  });
56
56
 
57
57
  if (!res.ok) {
@@ -28,8 +28,12 @@ async function run() {
28
28
  teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
29
29
  slug: "my-team-url-slug",
30
30
  requestBody: {
31
- url: "https://woeful-yin.biz",
32
- events: [],
31
+ url: "https://experienced-sailor.biz/",
32
+ events: [
33
+ "deployment.promoted",
34
+ "deployment.error",
35
+ "deployment.integration.action.cancel",
36
+ ],
33
37
  },
34
38
  });
35
39
 
@@ -59,8 +63,12 @@ async function run() {
59
63
  teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
60
64
  slug: "my-team-url-slug",
61
65
  requestBody: {
62
- url: "https://woeful-yin.biz",
63
- events: [],
66
+ url: "https://experienced-sailor.biz/",
67
+ events: [
68
+ "deployment.promoted",
69
+ "deployment.error",
70
+ "deployment.integration.action.cancel",
71
+ ],
64
72
  },
65
73
  });
66
74
 
@@ -151,13 +151,12 @@ test("Deployments Get Deployment File Contents", async () => {
151
151
  httpClient: testHttpClient,
152
152
  bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
153
153
  });
154
- const result = await vercel.deployments.getDeploymentFileContents({
154
+ await vercel.deployments.getDeploymentFileContents({
155
155
  id: "<id>",
156
156
  fileId: "<id>",
157
157
  teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
158
158
  slug: "my-team-url-slug",
159
159
  });
160
- expect(result).toBeDefined();
161
160
  });
162
161
  test("Deployments Get Deployments", async () => {
163
162
  const testHttpClient = createTestHTTPClient("getDeployments");