export type DeleteApiV1BusinessesClientIdInvitesInviteIdArgs = {client_id: number, invite_id: number}; export type DeleteApiV1BusinessesClientIdInvitesInviteIdOptions = {baseUrl?: string | undefined, BearerAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Cancel invite * * DELETE /v1/businesses/{client_id}/invites/{invite_id} */ export const deleteApiV1BusinessesClientIdInvitesInviteId = async (args: DeleteApiV1BusinessesClientIdInvitesInviteIdArgs, options?: DeleteApiV1BusinessesClientIdInvitesInviteIdOptions) => { const {baseUrl = "https://public.letsweel.com", fetch: fetchFn = fetch, BearerAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (BearerAuth !== undefined) headers.set('authorization', `Bearer ${BearerAuth}`) const url = `${baseUrl.replace(/\/+$/, '')}/v1/businesses/${encodeURIComponent(String(args.client_id))}/invites/${encodeURIComponent(String(args.invite_id))}${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "DELETE", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };