//native
type Clickup = {
token: string;
};
/**
* Remove Guest From Workspace
* Revoke a guest's access to a Workspace. \
\
***Note:** This endpoint is only available to Workspaces on our [Enterprise Plan](https://clickup.com/pricing).*
*/
export async function main(auth: Clickup, team_id: string, guest_id: string) {
const url = new URL(
`https://api.clickup.com/api/v2/team/${team_id}/guest/${guest_id}`,
);
const response = await fetch(url, {
method: "DELETE",
headers: {
Authorization: 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 235 days ago