export type GetApiV1OauthClientsOauthClientInfoOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * GET /v1/oauth_clients/{oauth_client}/info */ export const getApiV1OauthClientsOauthClientInfo = async (options?: GetApiV1OauthClientsOauthClientInfoOptions) => { const {baseUrl = "https://eu-central.aws.thinger.io:443", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('accept', "application/json") const url = `${baseUrl.replace(/\/+$/, '')}/v1/oauth_clients/${encodeURIComponent(String(args.oauth_client))}/info${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 (await res.json()) as unknown };