export type GetApiApiStatusServicesArgs = {async?: boolean | undefined}; export type GetApiApiStatusServicesOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * Information about availability of other service endpoints. * * GET /api/Status/Services */ export const getApiApiStatusServices = async (args: GetApiApiStatusServicesArgs, options: GetApiApiStatusServicesOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args.async != null) query.append("async", String(args.async)) const url = `${baseUrl.replace(/\/+$/, '')}/api/Status/Services${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 };