@vercel/sdk
Version:
<p align="center"> <a href="https://vercel.com"> <img src="https://assets.vercel.com/image/upload/v1588805858/repositories/vercel/logo.png" height="96"> <h3 align="center">Vercel</h3> </a> <p align="center">Develop. Preview. Ship.</p> </p>
168 lines • 6.63 kB
JavaScript
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { teamsCreateTeam } from "../funcs/teamsCreateTeam.js";
import { teamsDeleteMicrofrontendsGroup } from "../funcs/teamsDeleteMicrofrontendsGroup.js";
import { teamsDeleteTeam } from "../funcs/teamsDeleteTeam.js";
import { teamsDeleteTeamInviteCode } from "../funcs/teamsDeleteTeamInviteCode.js";
import { teamsGetTeam } from "../funcs/teamsGetTeam.js";
import { teamsGetTeamAccessRequest } from "../funcs/teamsGetTeamAccessRequest.js";
import { teamsGetTeamMembers } from "../funcs/teamsGetTeamMembers.js";
import { teamsGetTeams } from "../funcs/teamsGetTeams.js";
import { teamsInviteUserToTeam } from "../funcs/teamsInviteUserToTeam.js";
import { teamsJoinTeam } from "../funcs/teamsJoinTeam.js";
import { teamsPatchTeam } from "../funcs/teamsPatchTeam.js";
import { teamsPostTeamDsyncRoles } from "../funcs/teamsPostTeamDsyncRoles.js";
import { teamsRemoveTeamMember } from "../funcs/teamsRemoveTeamMember.js";
import { teamsRequestAccessToTeam } from "../funcs/teamsRequestAccessToTeam.js";
import { teamsUpdateMicrofrontendsGroup } from "../funcs/teamsUpdateMicrofrontendsGroup.js";
import { teamsUpdateTeamMember } from "../funcs/teamsUpdateTeamMember.js";
import { ClientSDK } from "../lib/sdks.js";
import { unwrapAsync } from "../types/fp.js";
export class Teams extends ClientSDK {
/**
* List team members
*
* @remarks
* Get a paginated list of team members for the provided team.
*/
async getTeamMembers(request, options) {
return unwrapAsync(teamsGetTeamMembers(this, request, options));
}
/**
* Invite a user
*
* @remarks
* 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.
*/
async inviteUserToTeam(request, options) {
return unwrapAsync(teamsInviteUserToTeam(this, request, options));
}
/**
* Request access to a team
*
* @remarks
* Request access to a team as a member. An owner has to approve the request. Only 100 users can request access to a team at the same time.
*/
async requestAccessToTeam(request, options) {
return unwrapAsync(teamsRequestAccessToTeam(this, request, options));
}
/**
* Get access request status
*
* @remarks
* 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.
*/
async getTeamAccessRequest(request, options) {
return unwrapAsync(teamsGetTeamAccessRequest(this, request, options));
}
/**
* Join a team
*
* @remarks
* Join a team with a provided invite code or team ID.
*/
async joinTeam(request, options) {
return unwrapAsync(teamsJoinTeam(this, request, options));
}
/**
* Update a Team Member
*
* @remarks
* 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.
*/
async updateTeamMember(request, options) {
return unwrapAsync(teamsUpdateTeamMember(this, request, options));
}
/**
* Remove a Team Member
*
* @remarks
* Remove a Team Member from the Team, or dismiss a user that requested access, or leave a team. Directory Sync members can be removed when their directory email is absent or does not match the user's primary or verified secondary emails.
*/
async removeTeamMember(request, options) {
return unwrapAsync(teamsRemoveTeamMember(this, request, options));
}
/**
* Get a Team
*
* @remarks
* Get information for the Team specified by the `teamId` parameter.
*/
async getTeam(request, options) {
return unwrapAsync(teamsGetTeam(this, request, options));
}
/**
* Update a Team
*
* @remarks
* 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.
*/
async patchTeam(request, options) {
return unwrapAsync(teamsPatchTeam(this, request, options));
}
/**
* List all teams
*
* @remarks
* Get a paginated list of all the Teams the authenticated User is a member of.
*/
async getTeams(request, options) {
return unwrapAsync(teamsGetTeams(this, request, options));
}
/**
* Create a Team
*
* @remarks
* Create a new Team under your account. You need to send a POST request with the desired Team slug, and optionally the Team name.
*/
async createTeam(request, options) {
return unwrapAsync(teamsCreateTeam(this, request, options));
}
/**
* Update Team Directory Sync Role Mappings
*
* @remarks
* Update the Directory Sync role mappings for a Team. This endpoint allows updating the mapping between directory groups and team roles or access groups.
*/
async postTeamDsyncRoles(request, options) {
return unwrapAsync(teamsPostTeamDsyncRoles(this, request, options));
}
/**
* Delete a Team
*
* @remarks
* 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.
*/
async deleteTeam(request, options) {
return unwrapAsync(teamsDeleteTeam(this, request, options));
}
/**
* Delete a Team invite code
*
* @remarks
* Delete an active Team invite code.
*/
async deleteTeamInviteCode(request, options) {
return unwrapAsync(teamsDeleteTeamInviteCode(this, request, options));
}
/**
* Update a microfrontends group
*
* @remarks
* Updates a microfrontends group's settings.
*/
async updateMicrofrontendsGroup(request, options) {
return unwrapAsync(teamsUpdateMicrofrontendsGroup(this, request, options));
}
/**
* Delete a microfrontends group
*
* @remarks
* Deletes a microfrontends group from the team associated with the group ID.
*/
async deleteMicrofrontendsGroup(request, options) {
return unwrapAsync(teamsDeleteMicrofrontendsGroup(this, request, options));
}
}
//# sourceMappingURL=teams.js.map