export type GetApiV1UsersLogoutOptions = {baseUrl?: string | undefined, jwtTokenAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Logout * * GET /v1/users/logout */ export const getApiV1UsersLogout = async (options?: GetApiV1UsersLogoutOptions) => { const {baseUrl = "https://api.exchange.bullish.com/trading-api", fetch: fetchFn = fetch, jwtTokenAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (jwtTokenAuth !== undefined) headers.set('authorization', `Bearer ${jwtTokenAuth}`) const url = `${baseUrl.replace(/\/+$/, '')}/v1/users/logout${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "GET", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };