import * as Either from 'effect/Either'; import type { GenericError, Step } from '@forgerock/sdk-types'; import type { FetchBaseQueryError } from '@reduxjs/toolkit/query'; import type { SerializedError } from '@reduxjs/toolkit'; import type { JourneyStep } from './step.utils.js'; import type { JourneyLoginFailure } from './login-failure.utils.js'; import type { JourneyLoginSuccess } from './login-success.utils.js'; export type JourneyResult = JourneyStep | JourneyLoginSuccess | JourneyLoginFailure | GenericError; /** * Creates a journey object from a raw Step response. * Determines the step type based on the presence of authId or successUrl properties * and returns the appropriate journey object type. * * @param step - The raw Step response from the authentication API * @returns A JourneyStep, JourneyLoginSuccess, JourneyLoginFailure, or GenericError if the step type cannot be determined */ export declare function createJourneyObject(step: Step): JourneyStep | JourneyLoginSuccess | JourneyLoginFailure | GenericError; /** * Parses a resolved RTK Query journey response into Either. * * Right = a valid AM step payload (including LoginFailure — AM sends those as structured steps * over HTTP 4xx, so they are application logic, not transport failures). * Left = the transport broke and there is nothing for the journey state machine to consume. * * Rule out every transport failure first; whatever survives must be a valid step. */ export declare function parseJourneyResponse(res: { data?: Step; error?: FetchBaseQueryError | SerializedError; }): Either.Either; //# sourceMappingURL=journey.utils.d.ts.map