export type CreateApiApiAuthRevokeSigningKeysOptions = {baseUrl?: string | undefined, DevelocityAccessKeyOrToken?: string | undefined, fetch?: typeof fetch | undefined}; /** * Revoke auth token signing keys * * POST /api/auth/revoke-signing-keys */ export const createApiApiAuthRevokeSigningKeys = async (options?: CreateApiApiAuthRevokeSigningKeysOptions) => { const {baseUrl = "https://develocity.example.com", fetch: fetchFn = fetch, DevelocityAccessKeyOrToken} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (DevelocityAccessKeyOrToken !== undefined) headers.set('authorization', `Bearer ${DevelocityAccessKeyOrToken}`) const url = `${baseUrl.replace(/\/+$/, '')}/api/auth/revoke-signing-keys${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 };