export type DatabaseGroupId = string; export type CreateApiV1GroupsGroupIdAuthInvalidateArgs = {group_id: DatabaseGroupId}; export type CreateApiV1GroupsGroupIdAuthInvalidateOptions = {baseUrl?: string | undefined, Bearer?: string | undefined, fetch?: typeof fetch | undefined}; /** * Invalidate Tokens * * POST /v1/groups/{group_id}/auth/invalidate * * Also accepts auth: AccessKey */ export const createApiV1GroupsGroupIdAuthInvalidate = async (args: CreateApiV1GroupsGroupIdAuthInvalidateArgs, options?: CreateApiV1GroupsGroupIdAuthInvalidateOptions) => { const {baseUrl = "https://api.bunny.net/database", fetch: fetchFn = fetch, Bearer} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (Bearer !== undefined) headers.set("Authorization", Bearer) const url = `${baseUrl.replace(/\/+$/, '')}/v1/groups/${encodeURIComponent(String(args.group_id))}/auth/invalidate${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };