@vercel/sdk 1.7.3 → 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.
- package/README.md +31 -14
- package/bin/mcp-server.js +1215 -958
- package/bin/mcp-server.js.map +38 -38
- package/docs/sdks/accessgroups/README.md +16 -0
- package/docs/sdks/artifacts/README.md +6 -6
- package/docs/sdks/authentication/README.md +1 -1
- package/docs/sdks/deployments/README.md +8 -14
- package/docs/sdks/dns/README.md +12 -26
- package/docs/sdks/domains/README.md +2 -96
- package/docs/sdks/edgeconfig/README.md +10 -2
- package/docs/sdks/marketplace/README.md +77 -97
- package/docs/sdks/security/README.md +4 -10
- package/docs/sdks/teams/README.md +8 -0
- package/docs/sdks/vercel/README.md +78 -0
- package/docs/sdks/webhooks/README.md +12 -4
- package/esm/__tests__/deployments.test.js +1 -2
- package/esm/__tests__/deployments.test.js.map +1 -1
- package/esm/__tests__/domains.test.js +3 -19
- package/esm/__tests__/domains.test.js.map +1 -1
- package/esm/__tests__/vercel.test.js +13 -0
- package/esm/__tests__/vercel.test.js.map +1 -1
- package/esm/funcs/authenticationExchangeSsoToken.d.ts +1 -1
- package/esm/funcs/authenticationExchangeSsoToken.js +1 -1
- package/esm/funcs/certsGetCertById.js +1 -1
- package/esm/funcs/certsIssueCert.js +1 -1
- package/esm/funcs/certsRemoveCert.js +1 -1
- package/esm/funcs/certsUploadCert.js +1 -1
- package/esm/funcs/deploymentsGetDeploymentFileContents.d.ts +2 -2
- package/esm/funcs/deploymentsGetDeploymentFileContents.d.ts.map +1 -1
- package/esm/funcs/deploymentsGetDeploymentFileContents.js +4 -3
- package/esm/funcs/deploymentsGetDeploymentFileContents.js.map +1 -1
- package/esm/funcs/marketplaceExchangeSsoToken.d.ts +1 -1
- package/esm/funcs/marketplaceExchangeSsoToken.js +1 -1
- package/esm/funcs/postDomains.d.ts +13 -0
- package/esm/funcs/postDomains.d.ts.map +1 -0
- package/esm/funcs/{domainsCreateOrTransferDomain.js → postDomains.js} +13 -27
- package/esm/funcs/postDomains.js.map +1 -0
- package/esm/funcs/projectsRemoveProjectDomain.js +3 -2
- package/esm/funcs/projectsRemoveProjectDomain.js.map +1 -1
- package/esm/lib/config.d.ts +3 -3
- package/esm/lib/config.js +3 -3
- package/esm/mcp-server/cli/start/impl.js +2 -2
- package/esm/mcp-server/cli/start/impl.js.map +1 -1
- package/esm/mcp-server/mcp-server.js +1 -1
- package/esm/mcp-server/server.js +3 -3
- package/esm/mcp-server/server.js.map +1 -1
- package/esm/mcp-server/tools/authenticationExchangeSsoToken.js +1 -1
- package/esm/mcp-server/tools/authenticationExchangeSsoToken.js.map +1 -1
- package/esm/mcp-server/tools/deploymentsGetDeploymentFileContents.d.ts.map +1 -1
- package/esm/mcp-server/tools/deploymentsGetDeploymentFileContents.js +1 -2
- package/esm/mcp-server/tools/deploymentsGetDeploymentFileContents.js.map +1 -1
- package/esm/mcp-server/tools/marketplaceExchangeSsoToken.js +1 -1
- package/esm/mcp-server/tools/marketplaceExchangeSsoToken.js.map +1 -1
- package/esm/mcp-server/tools/postDomains.d.ts +7 -0
- package/esm/mcp-server/tools/postDomains.d.ts.map +1 -0
- package/esm/mcp-server/tools/postDomains.js +26 -0
- package/esm/mcp-server/tools/postDomains.js.map +1 -0
- package/esm/models/canceldeploymentop.d.ts +10 -0
- package/esm/models/canceldeploymentop.d.ts.map +1 -1
- package/esm/models/canceldeploymentop.js +4 -0
- package/esm/models/canceldeploymentop.js.map +1 -1
- package/esm/models/createdeploymentop.d.ts +10 -0
- package/esm/models/createdeploymentop.d.ts.map +1 -1
- package/esm/models/createdeploymentop.js +4 -0
- package/esm/models/createdeploymentop.js.map +1 -1
- package/esm/models/createprojectop.d.ts +116 -2
- package/esm/models/createprojectop.d.ts.map +1 -1
- package/esm/models/createprojectop.js +110 -2
- package/esm/models/createprojectop.js.map +1 -1
- package/esm/models/createrecordop.d.ts +43 -43
- package/esm/models/createrecordop.d.ts.map +1 -1
- package/esm/models/createrecordop.js +51 -51
- package/esm/models/createrecordop.js.map +1 -1
- package/esm/models/getdeploymentfilecontentsop.d.ts +0 -31
- package/esm/models/getdeploymentfilecontentsop.d.ts.map +1 -1
- package/esm/models/getdeploymentfilecontentsop.js +0 -25
- package/esm/models/getdeploymentfilecontentsop.js.map +1 -1
- package/esm/models/getdeploymentop.d.ts +10 -0
- package/esm/models/getdeploymentop.d.ts.map +1 -1
- package/esm/models/getdeploymentop.js +4 -0
- package/esm/models/getdeploymentop.js.map +1 -1
- package/esm/models/getdomainop.d.ts +8 -8
- package/esm/models/getdomainop.d.ts.map +1 -1
- package/esm/models/getdomainop.js +12 -13
- package/esm/models/getdomainop.js.map +1 -1
- package/esm/models/getprojectsop.d.ts +116 -2
- package/esm/models/getprojectsop.d.ts.map +1 -1
- package/esm/models/getprojectsop.js +110 -2
- package/esm/models/getprojectsop.js.map +1 -1
- package/esm/models/importresourceop.d.ts +9 -0
- package/esm/models/importresourceop.d.ts.map +1 -1
- package/esm/models/importresourceop.js +2 -0
- package/esm/models/importresourceop.js.map +1 -1
- package/esm/models/issuecertop.d.ts +2 -2
- package/esm/models/issuecertop.d.ts.map +1 -1
- package/esm/models/issuecertop.js +2 -2
- package/esm/models/issuecertop.js.map +1 -1
- package/esm/models/postdomainsop.d.ts +353 -0
- package/esm/models/postdomainsop.d.ts.map +1 -0
- package/esm/models/postdomainsop.js +265 -0
- package/esm/models/postdomainsop.js.map +1 -0
- package/esm/models/removeprojectdomainop.d.ts +30 -0
- package/esm/models/removeprojectdomainop.d.ts.map +1 -1
- package/esm/models/removeprojectdomainop.js +38 -0
- package/esm/models/removeprojectdomainop.js.map +1 -1
- package/esm/models/updateprojectdatacacheop.d.ts +116 -2
- package/esm/models/updateprojectdatacacheop.d.ts.map +1 -1
- package/esm/models/updateprojectdatacacheop.js +110 -2
- package/esm/models/updateprojectdatacacheop.js.map +1 -1
- package/esm/models/updateprojectop.d.ts +116 -2
- package/esm/models/updateprojectop.d.ts.map +1 -1
- package/esm/models/updateprojectop.js +110 -2
- package/esm/models/updateprojectop.js.map +1 -1
- package/esm/models/updateresourcesecretsbyidop.d.ts +9 -0
- package/esm/models/updateresourcesecretsbyidop.d.ts.map +1 -1
- package/esm/models/updateresourcesecretsbyidop.js +2 -0
- package/esm/models/updateresourcesecretsbyidop.js.map +1 -1
- package/esm/models/updateresourcesecretsop.d.ts +9 -0
- package/esm/models/updateresourcesecretsop.d.ts.map +1 -1
- package/esm/models/updateresourcesecretsop.js +2 -0
- package/esm/models/updateresourcesecretsop.js.map +1 -1
- package/esm/models/uploadcertop.d.ts +2 -2
- package/esm/models/uploadcertop.d.ts.map +1 -1
- package/esm/models/uploadcertop.js +2 -2
- package/esm/models/uploadcertop.js.map +1 -1
- package/esm/models/userevent.d.ts +373 -257
- package/esm/models/userevent.d.ts.map +1 -1
- package/esm/models/userevent.js +425 -315
- package/esm/models/userevent.js.map +1 -1
- package/esm/sdk/authentication.d.ts +1 -1
- package/esm/sdk/authentication.js +1 -1
- package/esm/sdk/deployments.d.ts +2 -2
- package/esm/sdk/deployments.d.ts.map +1 -1
- package/esm/sdk/deployments.js.map +1 -1
- package/esm/sdk/domains.d.ts +0 -8
- package/esm/sdk/domains.d.ts.map +1 -1
- package/esm/sdk/domains.js +0 -10
- package/esm/sdk/domains.js.map +1 -1
- package/esm/sdk/marketplace.d.ts +1 -1
- package/esm/sdk/marketplace.js +1 -1
- package/esm/sdk/sdk.d.ts +2 -0
- package/esm/sdk/sdk.d.ts.map +1 -1
- package/esm/sdk/sdk.js +4 -0
- package/esm/sdk/sdk.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/__tests__/deployments.test.ts +1 -2
- package/src/__tests__/domains.test.ts +5 -21
- package/src/__tests__/vercel.test.ts +16 -0
- package/src/funcs/authenticationExchangeSsoToken.ts +1 -1
- package/src/funcs/certsGetCertById.ts +1 -1
- package/src/funcs/certsIssueCert.ts +1 -1
- package/src/funcs/certsRemoveCert.ts +1 -1
- package/src/funcs/certsUploadCert.ts +1 -1
- package/src/funcs/deploymentsGetDeploymentFileContents.ts +6 -7
- package/src/funcs/marketplaceExchangeSsoToken.ts +1 -1
- package/src/funcs/{domainsCreateOrTransferDomain.ts → postDomains.ts} +22 -38
- package/src/funcs/projectsRemoveProjectDomain.ts +3 -2
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/cli/start/impl.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +3 -3
- package/src/mcp-server/tools/authenticationExchangeSsoToken.ts +1 -1
- package/src/mcp-server/tools/deploymentsGetDeploymentFileContents.ts +1 -3
- package/src/mcp-server/tools/marketplaceExchangeSsoToken.ts +1 -1
- package/src/mcp-server/tools/postDomains.ts +35 -0
- package/src/models/canceldeploymentop.ts +14 -0
- package/src/models/createdeploymentop.ts +14 -0
- package/src/models/createprojectop.ts +247 -4
- package/src/models/createrecordop.ts +96 -84
- package/src/models/getdeploymentfilecontentsop.ts +0 -69
- package/src/models/getdeploymentop.ts +14 -0
- package/src/models/getdomainop.ts +16 -14
- package/src/models/getprojectsop.ts +241 -4
- package/src/models/importresourceop.ts +7 -0
- package/src/models/issuecertop.ts +4 -4
- package/src/models/postdomainsop.ts +637 -0
- package/src/models/removeprojectdomainop.ts +78 -0
- package/src/models/updateprojectdatacacheop.ts +264 -4
- package/src/models/updateprojectop.ts +247 -4
- package/src/models/updateresourcesecretsbyidop.ts +7 -0
- package/src/models/updateresourcesecretsop.ts +7 -0
- package/src/models/uploadcertop.ts +4 -4
- package/src/models/userevent.ts +806 -583
- package/src/sdk/authentication.ts +1 -1
- package/src/sdk/deployments.ts +2 -5
- package/src/sdk/domains.ts +0 -22
- package/src/sdk/marketplace.ts +1 -1
- package/src/sdk/sdk.ts +16 -0
- package/vercel-spec.json +508 -87
- package/esm/funcs/domainsCreateOrTransferDomain.d.ts +0 -19
- package/esm/funcs/domainsCreateOrTransferDomain.d.ts.map +0 -1
- package/esm/funcs/domainsCreateOrTransferDomain.js.map +0 -1
- package/esm/mcp-server/tools/domainsCreateOrTransferDomain.d.ts +0 -7
- package/esm/mcp-server/tools/domainsCreateOrTransferDomain.d.ts.map +0 -1
- package/esm/mcp-server/tools/domainsCreateOrTransferDomain.js +0 -28
- package/esm/mcp-server/tools/domainsCreateOrTransferDomain.js.map +0 -1
- package/esm/models/createortransferdomainop.d.ts +0 -388
- package/esm/models/createortransferdomainop.d.ts.map +0 -1
- package/esm/models/createortransferdomainop.js +0 -310
- package/esm/models/createortransferdomainop.js.map +0 -1
- package/src/mcp-server/tools/domainsCreateOrTransferDomain.ts +0 -37
- package/src/models/createortransferdomainop.ts +0 -777
|
@@ -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: "
|
|
38
|
-
event: "
|
|
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: "
|
|
75
|
-
event: "
|
|
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:
|
|
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:
|
|
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.
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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\<
|
|
748
|
+
**Promise\<void\>**
|
|
755
749
|
|
|
756
750
|
### Errors
|
|
757
751
|
|
package/docs/sdks/dns/README.md
CHANGED
|
@@ -118,12 +118,13 @@ async function run() {
|
|
|
118
118
|
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
|
|
119
119
|
slug: "my-team-url-slug",
|
|
120
120
|
requestBody: {
|
|
121
|
-
type: "
|
|
121
|
+
type: "NS",
|
|
122
122
|
ttl: 60,
|
|
123
|
-
|
|
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: "
|
|
160
|
+
type: "NS",
|
|
160
161
|
ttl: 60,
|
|
161
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
});
|
|
@@ -12,7 +12,6 @@
|
|
|
12
12
|
* [getDomainConfig](#getdomainconfig) - Get a Domain's configuration
|
|
13
13
|
* [getDomain](#getdomain) - Get Information for a Single Domain
|
|
14
14
|
* [getDomains](#getdomains) - List all the domains
|
|
15
|
-
* [createOrTransferDomain](#createortransferdomain) - Register or transfer-in a new Domain
|
|
16
15
|
* [patchDomain](#patchdomain) - Update or move apex domain
|
|
17
16
|
* [deleteDomain](#deletedomain) - Remove a domain by name
|
|
18
17
|
|
|
@@ -626,99 +625,6 @@ run();
|
|
|
626
625
|
| models.VercelForbiddenError | 401 | application/json |
|
|
627
626
|
| models.SDKError | 4XX, 5XX | \*/\* |
|
|
628
627
|
|
|
629
|
-
## createOrTransferDomain
|
|
630
|
-
|
|
631
|
-
This endpoint is used for adding a new apex domain name with Vercel for the authenticating user. Can also be used for initiating a domain transfer request from an external Registrar to Vercel.
|
|
632
|
-
|
|
633
|
-
### Example Usage
|
|
634
|
-
|
|
635
|
-
```typescript
|
|
636
|
-
import { Vercel } from "@vercel/sdk";
|
|
637
|
-
|
|
638
|
-
const vercel = new Vercel({
|
|
639
|
-
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
|
|
640
|
-
});
|
|
641
|
-
|
|
642
|
-
async function run() {
|
|
643
|
-
const result = await vercel.domains.createOrTransferDomain({
|
|
644
|
-
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
|
|
645
|
-
slug: "my-team-url-slug",
|
|
646
|
-
requestBody: {
|
|
647
|
-
name: "example.com",
|
|
648
|
-
method: "transfer-in",
|
|
649
|
-
authCode: "fdhfr820ad#@FAdlj$$",
|
|
650
|
-
expectedPrice: 8,
|
|
651
|
-
},
|
|
652
|
-
});
|
|
653
|
-
|
|
654
|
-
// Handle the result
|
|
655
|
-
console.log(result);
|
|
656
|
-
}
|
|
657
|
-
|
|
658
|
-
run();
|
|
659
|
-
```
|
|
660
|
-
|
|
661
|
-
### Standalone function
|
|
662
|
-
|
|
663
|
-
The standalone function version of this method:
|
|
664
|
-
|
|
665
|
-
```typescript
|
|
666
|
-
import { VercelCore } from "@vercel/sdk/core.js";
|
|
667
|
-
import { domainsCreateOrTransferDomain } from "@vercel/sdk/funcs/domainsCreateOrTransferDomain.js";
|
|
668
|
-
|
|
669
|
-
// Use `VercelCore` for best tree-shaking performance.
|
|
670
|
-
// You can create one instance of it to use across an application.
|
|
671
|
-
const vercel = new VercelCore({
|
|
672
|
-
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
|
|
673
|
-
});
|
|
674
|
-
|
|
675
|
-
async function run() {
|
|
676
|
-
const res = await domainsCreateOrTransferDomain(vercel, {
|
|
677
|
-
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
|
|
678
|
-
slug: "my-team-url-slug",
|
|
679
|
-
requestBody: {
|
|
680
|
-
name: "example.com",
|
|
681
|
-
method: "transfer-in",
|
|
682
|
-
authCode: "fdhfr820ad#@FAdlj$$",
|
|
683
|
-
expectedPrice: 8,
|
|
684
|
-
},
|
|
685
|
-
});
|
|
686
|
-
|
|
687
|
-
if (!res.ok) {
|
|
688
|
-
throw res.error;
|
|
689
|
-
}
|
|
690
|
-
|
|
691
|
-
const { value: result } = res;
|
|
692
|
-
|
|
693
|
-
// Handle the result
|
|
694
|
-
console.log(result);
|
|
695
|
-
}
|
|
696
|
-
|
|
697
|
-
run();
|
|
698
|
-
```
|
|
699
|
-
|
|
700
|
-
### Parameters
|
|
701
|
-
|
|
702
|
-
| Parameter | Type | Required | Description |
|
|
703
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
704
|
-
| `request` | [models.CreateOrTransferDomainRequest](../../models/createortransferdomainrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
705
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
706
|
-
| `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. |
|
|
707
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
708
|
-
|
|
709
|
-
### Response
|
|
710
|
-
|
|
711
|
-
**Promise\<[models.CreateOrTransferDomainResponseBody](../../models/createortransferdomainresponsebody.md)\>**
|
|
712
|
-
|
|
713
|
-
### Errors
|
|
714
|
-
|
|
715
|
-
| Error Type | Status Code | Content Type |
|
|
716
|
-
| ---------------------------- | ---------------------------- | ---------------------------- |
|
|
717
|
-
| models.VercelBadRequestError | 400 | application/json |
|
|
718
|
-
| models.VercelForbiddenError | 401 | application/json |
|
|
719
|
-
| models.VercelNotFoundError | 404 | application/json |
|
|
720
|
-
| models.SDKError | 4XX, 5XX | \*/\* |
|
|
721
|
-
|
|
722
628
|
## patchDomain
|
|
723
629
|
|
|
724
630
|
Update or move apex domain.
|
|
@@ -734,7 +640,7 @@ const vercel = new Vercel({
|
|
|
734
640
|
|
|
735
641
|
async function run() {
|
|
736
642
|
const result = await vercel.domains.patchDomain({
|
|
737
|
-
domain: "
|
|
643
|
+
domain: "flimsy-napkin.com",
|
|
738
644
|
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
|
|
739
645
|
slug: "my-team-url-slug",
|
|
740
646
|
requestBody: {
|
|
@@ -765,7 +671,7 @@ const vercel = new VercelCore({
|
|
|
765
671
|
|
|
766
672
|
async function run() {
|
|
767
673
|
const res = await domainsPatchDomain(vercel, {
|
|
768
|
-
domain: "
|
|
674
|
+
domain: "flimsy-napkin.com",
|
|
769
675
|
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
|
|
770
676
|
slug: "my-team-url-slug",
|
|
771
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("
|
|
289
|
-
eod: new Date("2023-
|
|
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-
|
|
292
|
-
end: new Date("
|
|
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: "
|
|
315
|
+
type: "interval",
|
|
326
316
|
units: "<value>",
|
|
327
|
-
dayValue:
|
|
328
|
-
periodValue:
|
|
317
|
+
dayValue: 5212.43,
|
|
318
|
+
periodValue: 4147.35,
|
|
329
319
|
},
|
|
330
320
|
{
|
|
331
321
|
name: "<value>",
|
|
332
|
-
type: "
|
|
322
|
+
type: "interval",
|
|
333
323
|
units: "<value>",
|
|
334
|
-
dayValue:
|
|
335
|
-
periodValue:
|
|
324
|
+
dayValue: 5212.43,
|
|
325
|
+
periodValue: 4147.35,
|
|
336
326
|
},
|
|
337
327
|
{
|
|
338
328
|
name: "<value>",
|
|
339
|
-
type: "
|
|
329
|
+
type: "interval",
|
|
340
330
|
units: "<value>",
|
|
341
|
-
dayValue:
|
|
342
|
-
periodValue:
|
|
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("
|
|
373
|
-
eod: new Date("2023-
|
|
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-
|
|
376
|
-
end: new Date("
|
|
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: "
|
|
389
|
+
type: "interval",
|
|
410
390
|
units: "<value>",
|
|
411
|
-
dayValue:
|
|
412
|
-
periodValue:
|
|
391
|
+
dayValue: 5212.43,
|
|
392
|
+
periodValue: 4147.35,
|
|
413
393
|
},
|
|
414
394
|
{
|
|
415
395
|
name: "<value>",
|
|
416
|
-
type: "
|
|
396
|
+
type: "interval",
|
|
417
397
|
units: "<value>",
|
|
418
|
-
dayValue:
|
|
419
|
-
periodValue:
|
|
398
|
+
dayValue: 5212.43,
|
|
399
|
+
periodValue: 4147.35,
|
|
420
400
|
},
|
|
421
401
|
{
|
|
422
402
|
name: "<value>",
|
|
423
|
-
type: "
|
|
403
|
+
type: "interval",
|
|
424
404
|
units: "<value>",
|
|
425
|
-
dayValue:
|
|
426
|
-
periodValue:
|
|
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-
|
|
462
|
+
invoiceDate: new Date("2023-12-12T13:24:35.882Z"),
|
|
483
463
|
period: {
|
|
484
|
-
start: new Date("
|
|
485
|
-
end: new Date("2025-
|
|
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: "
|
|
492
|
-
quantity:
|
|
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: "
|
|
500
|
-
quantity:
|
|
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-
|
|
513
|
+
invoiceDate: new Date("2023-12-12T13:24:35.882Z"),
|
|
534
514
|
period: {
|
|
535
|
-
start: new Date("
|
|
536
|
-
end: new Date("2025-
|
|
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: "
|
|
543
|
-
quantity:
|
|
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: "
|
|
551
|
-
quantity:
|
|
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.
|
|
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
|
|