export type CreateApiAuthSsoSamlCallbackOrganizationIdArgs = {organizationId: string}; export type CreateApiAuthSsoSamlCallbackOrganizationIdOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * SSO callback * * POST /auth/sso/saml/callback/{organizationId} */ export const createApiAuthSsoSamlCallbackOrganizationId = async (args: CreateApiAuthSsoSamlCallbackOrganizationIdArgs, options?: CreateApiAuthSsoSamlCallbackOrganizationIdOptions) => { const {baseUrl = "http://localhost:3001", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/auth/sso/saml/callback/${encodeURIComponent(String(args.organizationId))}${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };