//native
type Vercel = {
token: string;
};
/**
* Delete a Team invite code
* Delete an active Team invite code.
*/
export async function main(auth: Vercel, teamId:string, inviteId: string) {
const url = new URL(
`https://api.vercel.com/v1/teams/${teamId}/invites/${inviteId}`,
);
const response = await fetch(url, {
method: "DELETE",
headers: {
Authorization: "Bearer " + auth.token,
},
body: undefined,
});
if (!response.ok) {
const text = await response.text();
throw new Error(`${response.status} ${text}`);
}
return await response.json();
}
Submitted by hugo697 428 days ago