- getTeamMembers - List team members
- inviteUserToTeam - Invite a user
- requestAccessToTeam - Request access to a team
- getTeamAccessRequest - Get access request status
- joinTeam - Join a team
- updateTeamMember - Update a Team Member
- removeTeamMember - Remove a Team Member
- getTeam - Get a Team
- patchTeam - Update a Team
- getTeams - List all teams
- createTeam - Create a Team
- postTeamDsyncRoles - Update Team Directory Sync Role Mappings
- deleteTeam - Delete a Team
- deleteTeamInviteCode - Delete a Team invite code
- updateMicrofrontendsGroup - Update a microfrontends group
- deleteMicrofrontendsGroup - Delete a microfrontends group
Get a paginated list of team members for the provided team.
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await vercel.teams.getTeamMembers({
limit: 20,
since: 1540095775951,
until: 1540095775951,
role: "OWNER",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
});
console.log(result);
}
run();The standalone function version of this method:
import { VercelCore } from "@vercel/sdk/core.js";
import { teamsGetTeamMembers } from "@vercel/sdk/funcs/teamsGetTeamMembers.js";
// Use `VercelCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const vercel = new VercelCore({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const res = await teamsGetTeamMembers(vercel, {
limit: 20,
since: 1540095775951,
until: 1540095775951,
role: "OWNER",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("teamsGetTeamMembers failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
models.GetTeamMembersRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | 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. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<models.GetTeamMembersResponseBody>
| Error Type | Status Code | Content Type |
|---|---|---|
| models.SDKError | 4XX, 5XX | */* |
Invite a user to join the team specified in the URL. The authenticated user needs to be an OWNER in order to successfully invoke this endpoint. The user to be invited must be specified by email.
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await vercel.teams.inviteUserToTeam({
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
requestBody: [
{
email: "john@example.com",
role: "DEVELOPER",
projects: [
{
projectId: "prj_ndlgr43fadlPyCtREAqxxdyFK",
role: "ADMIN",
},
{
projectId: "prj_ndlgr43fadlPyCtREAqxxdyFK",
role: "ADMIN",
},
],
},
],
});
console.log(result);
}
run();The standalone function version of this method:
import { VercelCore } from "@vercel/sdk/core.js";
import { teamsInviteUserToTeam } from "@vercel/sdk/funcs/teamsInviteUserToTeam.js";
// Use `VercelCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const vercel = new VercelCore({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const res = await teamsInviteUserToTeam(vercel, {
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
requestBody: [
{
email: "john@example.com",
role: "DEVELOPER",
projects: [
{
projectId: "prj_ndlgr43fadlPyCtREAqxxdyFK",
role: "ADMIN",
},
{
projectId: "prj_ndlgr43fadlPyCtREAqxxdyFK",
role: "ADMIN",
},
],
},
],
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("teamsInviteUserToTeam failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
models.InviteUserToTeamRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | 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. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<models.InvitedTeamMember>
| Error Type | Status Code | Content Type |
|---|---|---|
| models.SDKError | 4XX, 5XX | */* |
Request access to a team as a member. An owner has to approve the request. Only 10 users can request access to a team at the same time.
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await vercel.teams.requestAccessToTeam({
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
requestBody: {
joinedFrom: {
origin: "github",
commitId: "f498d25d8bd654b578716203be73084b31130cd7",
repoId: "67753070",
repoPath: "jane-doe/example",
gitUserId: 103053343,
gitUserLogin: "jane-doe",
},
},
});
console.log(result);
}
run();The standalone function version of this method:
import { VercelCore } from "@vercel/sdk/core.js";
import { teamsRequestAccessToTeam } from "@vercel/sdk/funcs/teamsRequestAccessToTeam.js";
// Use `VercelCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const vercel = new VercelCore({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const res = await teamsRequestAccessToTeam(vercel, {
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
requestBody: {
joinedFrom: {
origin: "github",
commitId: "f498d25d8bd654b578716203be73084b31130cd7",
repoId: "67753070",
repoPath: "jane-doe/example",
gitUserId: 103053343,
gitUserLogin: "jane-doe",
},
},
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("teamsRequestAccessToTeam failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
models.RequestAccessToTeamRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | 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. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<models.RequestAccessToTeamResponseBody>
| Error Type | Status Code | Content Type |
|---|---|---|
| models.SDKError | 4XX, 5XX | */* |
Check the status of a join request. It'll respond with a 404 if the request has been declined. If no userId path segment was provided, this endpoint will instead return the status of the authenticated user.
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await vercel.teams.getTeamAccessRequest({
userId: "<id>",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
});
console.log(result);
}
run();The standalone function version of this method:
import { VercelCore } from "@vercel/sdk/core.js";
import { teamsGetTeamAccessRequest } from "@vercel/sdk/funcs/teamsGetTeamAccessRequest.js";
// Use `VercelCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const vercel = new VercelCore({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const res = await teamsGetTeamAccessRequest(vercel, {
userId: "<id>",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("teamsGetTeamAccessRequest failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
models.GetTeamAccessRequestRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | 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. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<models.GetTeamAccessRequestResponseBody>
| Error Type | Status Code | Content Type |
|---|---|---|
| models.SDKError | 4XX, 5XX | */* |
Join a team with a provided invite code or team ID.
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await vercel.teams.joinTeam({
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
requestBody: {
inviteCode: "fisdh38aejkeivn34nslfore9vjtn4ls",
},
});
console.log(result);
}
run();The standalone function version of this method:
import { VercelCore } from "@vercel/sdk/core.js";
import { teamsJoinTeam } from "@vercel/sdk/funcs/teamsJoinTeam.js";
// Use `VercelCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const vercel = new VercelCore({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const res = await teamsJoinTeam(vercel, {
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
requestBody: {
inviteCode: "fisdh38aejkeivn34nslfore9vjtn4ls",
},
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("teamsJoinTeam failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
models.JoinTeamRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | 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. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<models.JoinTeamResponseBody>
| Error Type | Status Code | Content Type |
|---|---|---|
| models.SDKError | 4XX, 5XX | */* |
Update the membership of a Team Member on the Team specified by teamId, such as changing the role of the member, or confirming a request to join the Team for an unconfirmed member. The authenticated user must be an OWNER of the Team.
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await vercel.teams.updateTeamMember({
uid: "ndfasllgPyCtREAqxxdyFKb",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
requestBody: {
role: "VIEWER",
teamPermissions: [
"CreateProject",
"FullProductionDeployment",
],
projects: [
{
projectId: "prj_ndlgr43fadlPyCtREAqxxdyFK",
role: "ADMIN",
},
{
projectId: "prj_ndlgr43fadlPyCtREAqxxdyFK",
role: "ADMIN",
},
{
projectId: "prj_ndlgr43fadlPyCtREAqxxdyFK",
role: "ADMIN",
},
],
},
});
console.log(result);
}
run();The standalone function version of this method:
import { VercelCore } from "@vercel/sdk/core.js";
import { teamsUpdateTeamMember } from "@vercel/sdk/funcs/teamsUpdateTeamMember.js";
// Use `VercelCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const vercel = new VercelCore({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const res = await teamsUpdateTeamMember(vercel, {
uid: "ndfasllgPyCtREAqxxdyFKb",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
requestBody: {
role: "VIEWER",
teamPermissions: [
"CreateProject",
"FullProductionDeployment",
],
projects: [
{
projectId: "prj_ndlgr43fadlPyCtREAqxxdyFK",
role: "ADMIN",
},
{
projectId: "prj_ndlgr43fadlPyCtREAqxxdyFK",
role: "ADMIN",
},
{
projectId: "prj_ndlgr43fadlPyCtREAqxxdyFK",
role: "ADMIN",
},
],
},
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("teamsUpdateTeamMember failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
models.UpdateTeamMemberRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | 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. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<models.UpdateTeamMemberResponseBody>
| Error Type | Status Code | Content Type |
|---|---|---|
| models.SDKError | 4XX, 5XX | */* |
Remove a Team Member from the Team, or dismiss a user that requested access, or leave a team.
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await vercel.teams.removeTeamMember({
uid: "ndlgr43fadlPyCtREAqxxdyFK",
newDefaultTeamId: "team_nllPyCtREAqxxdyFKbbMDlxd",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
});
console.log(result);
}
run();The standalone function version of this method:
import { VercelCore } from "@vercel/sdk/core.js";
import { teamsRemoveTeamMember } from "@vercel/sdk/funcs/teamsRemoveTeamMember.js";
// Use `VercelCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const vercel = new VercelCore({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const res = await teamsRemoveTeamMember(vercel, {
uid: "ndlgr43fadlPyCtREAqxxdyFK",
newDefaultTeamId: "team_nllPyCtREAqxxdyFKbbMDlxd",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("teamsRemoveTeamMember failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
models.RemoveTeamMemberRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | 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. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<models.RemoveTeamMemberResponseBody>
| Error Type | Status Code | Content Type |
|---|---|---|
| models.SDKError | 4XX, 5XX | */* |
Get information for the Team specified by the teamId parameter.
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await vercel.teams.getTeam({
slug: "my-team-url-slug",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
});
console.log(result);
}
run();The standalone function version of this method:
import { VercelCore } from "@vercel/sdk/core.js";
import { teamsGetTeam } from "@vercel/sdk/funcs/teamsGetTeam.js";
// Use `VercelCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const vercel = new VercelCore({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const res = await teamsGetTeam(vercel, {
slug: "my-team-url-slug",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("teamsGetTeam failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
models.GetTeamRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | 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. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<models.Team>
| Error Type | Status Code | Content Type |
|---|---|---|
| models.SDKError | 4XX, 5XX | */* |
Update the information of a Team specified by the teamId parameter. The request body should contain the information that will be updated on the Team.
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await vercel.teams.patchTeam({
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
requestBody: {
description: "Our mission is to make cloud computing accessible to everyone",
emailDomain: "example.com",
name: "My Team",
previewDeploymentSuffix: "example.dev",
regenerateInviteCode: true,
saml: {
enforced: true,
},
slug: "my-team",
enablePreviewFeedback: "on",
enableProductionFeedback: "on",
sensitiveEnvironmentVariablePolicy: "on",
remoteCaching: {
enabled: true,
},
hideIpAddresses: false,
hideIpAddressesInLogDrains: false,
defaultExpirationSettings: {
expiration: "1y",
expirationProduction: "1y",
expirationCanceled: "1y",
expirationErrored: "1y",
},
strictDeploymentProtectionSettings: {
enabled: true,
},
strictShareableLinks: {
enabled: true,
},
resourceConfig: {
buildMachine: {
default: "standard",
},
},
},
});
console.log(result);
}
run();The standalone function version of this method:
import { VercelCore } from "@vercel/sdk/core.js";
import { teamsPatchTeam } from "@vercel/sdk/funcs/teamsPatchTeam.js";
// Use `VercelCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const vercel = new VercelCore({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const res = await teamsPatchTeam(vercel, {
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
requestBody: {
description: "Our mission is to make cloud computing accessible to everyone",
emailDomain: "example.com",
name: "My Team",
previewDeploymentSuffix: "example.dev",
regenerateInviteCode: true,
saml: {
enforced: true,
},
slug: "my-team",
enablePreviewFeedback: "on",
enableProductionFeedback: "on",
sensitiveEnvironmentVariablePolicy: "on",
remoteCaching: {
enabled: true,
},
hideIpAddresses: false,
hideIpAddressesInLogDrains: false,
defaultExpirationSettings: {
expiration: "1y",
expirationProduction: "1y",
expirationCanceled: "1y",
expirationErrored: "1y",
},
strictDeploymentProtectionSettings: {
enabled: true,
},
strictShareableLinks: {
enabled: true,
},
resourceConfig: {
buildMachine: {
default: "standard",
},
},
},
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("teamsPatchTeam failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
models.PatchTeamRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | 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. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<models.Team>
| Error Type | Status Code | Content Type |
|---|---|---|
| models.SDKError | 4XX, 5XX | */* |
Get a paginated list of all the Teams the authenticated User is a member of.
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await vercel.teams.getTeams({
limit: 20,
since: 1540095775951,
until: 1540095775951,
});
console.log(result);
}
run();The standalone function version of this method:
import { VercelCore } from "@vercel/sdk/core.js";
import { teamsGetTeams } from "@vercel/sdk/funcs/teamsGetTeams.js";
// Use `VercelCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const vercel = new VercelCore({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const res = await teamsGetTeams(vercel, {
limit: 20,
since: 1540095775951,
until: 1540095775951,
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("teamsGetTeams failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
models.GetTeamsRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | 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. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<models.GetTeamsResponseBody>
| Error Type | Status Code | Content Type |
|---|---|---|
| models.SDKError | 4XX, 5XX | */* |
Create a new Team under your account. You need to send a POST request with the desired Team slug, and optionally the Team name.
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await vercel.teams.createTeam({
slug: "a-random-team",
name: "A Random Team",
});
console.log(result);
}
run();The standalone function version of this method:
import { VercelCore } from "@vercel/sdk/core.js";
import { teamsCreateTeam } from "@vercel/sdk/funcs/teamsCreateTeam.js";
// Use `VercelCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const vercel = new VercelCore({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const res = await teamsCreateTeam(vercel, {
slug: "a-random-team",
name: "A Random Team",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("teamsCreateTeam failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
models.CreateTeamRequestBody | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | 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. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<models.CreateTeamResponseBody>
| Error Type | Status Code | Content Type |
|---|---|---|
| models.SDKError | 4XX, 5XX | */* |
Update the Directory Sync role mappings for a Team. This endpoint allows updating the mapping between directory groups and team roles or access groups.
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await vercel.teams.postTeamDsyncRoles({
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
});
console.log(result);
}
run();The standalone function version of this method:
import { VercelCore } from "@vercel/sdk/core.js";
import { teamsPostTeamDsyncRoles } from "@vercel/sdk/funcs/teamsPostTeamDsyncRoles.js";
// Use `VercelCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const vercel = new VercelCore({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const res = await teamsPostTeamDsyncRoles(vercel, {
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("teamsPostTeamDsyncRoles failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
models.PostTeamDsyncRolesRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | 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. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<models.PostTeamDsyncRolesResponseBody>
| Error Type | Status Code | Content Type |
|---|---|---|
| models.SDKError | 4XX, 5XX | */* |
Delete a team under your account. You need to send a DELETE request with the desired team id. An optional array of reasons for deletion may also be sent.
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await vercel.teams.deleteTeam({
newDefaultTeamId: "team_LLHUOMOoDlqOp8wPE4kFo9pE",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
requestBody: {},
});
console.log(result);
}
run();The standalone function version of this method:
import { VercelCore } from "@vercel/sdk/core.js";
import { teamsDeleteTeam } from "@vercel/sdk/funcs/teamsDeleteTeam.js";
// Use `VercelCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const vercel = new VercelCore({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const res = await teamsDeleteTeam(vercel, {
newDefaultTeamId: "team_LLHUOMOoDlqOp8wPE4kFo9pE",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
requestBody: {},
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("teamsDeleteTeam failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
models.DeleteTeamRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | 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. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<models.DeleteTeamResponseBody>
| Error Type | Status Code | Content Type |
|---|---|---|
| models.SDKError | 4XX, 5XX | */* |
Delete an active Team invite code.
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await vercel.teams.deleteTeamInviteCode({
inviteId: "2wn2hudbr4chb1ecywo9dvzo7g9sscs6mzcz8htdde0txyom4l",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
});
console.log(result);
}
run();The standalone function version of this method:
import { VercelCore } from "@vercel/sdk/core.js";
import { teamsDeleteTeamInviteCode } from "@vercel/sdk/funcs/teamsDeleteTeamInviteCode.js";
// Use `VercelCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const vercel = new VercelCore({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const res = await teamsDeleteTeamInviteCode(vercel, {
inviteId: "2wn2hudbr4chb1ecywo9dvzo7g9sscs6mzcz8htdde0txyom4l",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("teamsDeleteTeamInviteCode failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
models.DeleteTeamInviteCodeRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | 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. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<models.DeleteTeamInviteCodeResponseBody>
| Error Type | Status Code | Content Type |
|---|---|---|
| models.SDKError | 4XX, 5XX | */* |
Updates the name (and slug) of a microfrontends group.
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await vercel.teams.updateMicrofrontendsGroup({
groupId: "<id>",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
requestBody: {
name: "MFE Group 1",
},
});
console.log(result);
}
run();The standalone function version of this method:
import { VercelCore } from "@vercel/sdk/core.js";
import { teamsUpdateMicrofrontendsGroup } from "@vercel/sdk/funcs/teamsUpdateMicrofrontendsGroup.js";
// Use `VercelCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const vercel = new VercelCore({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const res = await teamsUpdateMicrofrontendsGroup(vercel, {
groupId: "<id>",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
requestBody: {
name: "MFE Group 1",
},
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("teamsUpdateMicrofrontendsGroup failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
models.UpdateMicrofrontendsGroupRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | 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. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<models.UpdateMicrofrontendsGroupResponseBody>
| Error Type | Status Code | Content Type |
|---|---|---|
| models.SDKError | 4XX, 5XX | */* |
Deletes a microfrontends group from the team associated with the group ID.
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await vercel.teams.deleteMicrofrontendsGroup({
groupId: "mfe_",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
});
console.log(result);
}
run();The standalone function version of this method:
import { VercelCore } from "@vercel/sdk/core.js";
import { teamsDeleteMicrofrontendsGroup } from "@vercel/sdk/funcs/teamsDeleteMicrofrontendsGroup.js";
// Use `VercelCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const vercel = new VercelCore({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const res = await teamsDeleteMicrofrontendsGroup(vercel, {
groupId: "mfe_",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("teamsDeleteMicrofrontendsGroup failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
models.DeleteMicrofrontendsGroupRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | 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. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<models.DeleteMicrofrontendsGroupResponseBody>
| Error Type | Status Code | Content Type |
|---|---|---|
| models.SDKError | 4XX, 5XX | */* |