export type DeleteApiApiOauth2ApplicationsIdAllowlistUserIdArgs = {id: string, user_id: string}; export type DeleteApiApiOauth2ApplicationsIdAllowlistUserIdOptions = {baseUrl?: string | undefined, bearer?: string | undefined, fetch?: typeof fetch | undefined}; /** * DELETE /api/oauth2/applications/{id}/allowlist/{user_id} */ export const deleteApiApiOauth2ApplicationsIdAllowlistUserId = async (args: DeleteApiApiOauth2ApplicationsIdAllowlistUserIdArgs, options?: DeleteApiApiOauth2ApplicationsIdAllowlistUserIdOptions) => { const {baseUrl = "https://api.rory.server.spacebar.chat", fetch: fetchFn = fetch, bearer} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (bearer !== undefined) headers.set('authorization', `Bearer ${bearer}`) const url = `${baseUrl.replace(/\/+$/, '')}/api/oauth2/applications/${encodeURIComponent(String(args.id))}/allowlist/${encodeURIComponent(String(args.user_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 };