export type GetApiResourcesSsoV1ConfigurationsDomainsOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Get SSO domains configuration * * GET /resources/sso/v1/configurations/domains */ export const getApiResourcesSsoV1ConfigurationsDomains = async (options?: GetApiResourcesSsoV1ConfigurationsDomainsOptions) => { const {baseUrl = "http://localhost:8181", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/resources/sso/v1/configurations/domains${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 };