export type ExcludeEmailFromSSORequestDto = {email: string}; export type CreateApiResourcesSsoV1ConfigurationsExcludedEmailsArgs = {body: ExcludeEmailFromSSORequestDto}; export type CreateApiResourcesSsoV1ConfigurationsExcludedEmailsOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Exclude email from SSO * * POST /resources/sso/v1/configurations/excluded-emails */ export const createApiResourcesSsoV1ConfigurationsExcludedEmails = async (args: CreateApiResourcesSsoV1ConfigurationsExcludedEmailsArgs, options?: CreateApiResourcesSsoV1ConfigurationsExcludedEmailsOptions) => { const {baseUrl = "http://localhost:8181", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") const url = `${baseUrl.replace(/\/+$/, '')}/resources/sso/v1/configurations/excluded-emails${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers, body: JSON.stringify(args.body)}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };