//native
type Xata = {
apiKey: string
}
/**
* Resend Invite notification
* This operation provides a way to resend an Invite notification. Invite notifications can only be sent for Invites not yet accepted.
*/
export async function main(auth: Xata, workspace_id: string, invite_id: string) {
const url = new URL(`https://api.xata.io/workspaces/${workspace_id}/invites/${invite_id}/resend`)
const response = await fetch(url, {
method: 'POST',
headers: {
Authorization: 'Bearer ' + auth.apiKey
},
body: undefined
})
if (!response.ok) {
const text = await response.text()
throw new Error(`${response.status} ${text}`)
}
return await response.text()
}
Submitted by hugo697 428 days ago