import type { SerializedError } from '@reduxjs/toolkit'; import type { FetchBaseQueryError } from '@reduxjs/toolkit/query'; import type { WellknownResponse, GetAuthorizationUrlOptions } from '@forgerock/sdk-types'; import type { AuthPromptValue } from '@forgerock/sdk-utilities'; import type { AuthorizationError, OptionalAuthorizeOptions } from './authorize.request.types.js'; import type { OidcConfig } from './config.types.js'; export type ParUrlParams = { authorizationEndpoint: string; clientId: string; requestUri: string; prompt?: AuthPromptValue; }; export declare function isStringRecord(value: unknown): value is Record; export declare function hasPushRequestUri(data: unknown): data is { request_uri: string; }; export declare function buildAuthorizeOptions(wellknown: WellknownResponse, config: OidcConfig, options?: OptionalAuthorizeOptions): [string, GetAuthorizationUrlOptions]; /** * Type guard for RTK FetchBaseQueryError vs SerializedError. * FetchBaseQueryError always carries a `status` field; SerializedError does not. */ export declare function isFetchBaseQueryError(error: FetchBaseQueryError | SerializedError): error is FetchBaseQueryError; /** * Safely narrows an unknown value to AuthorizationError shape. * Validates that the data has the required 'error' string field, otherwise returns * a default unknown error response. */ export declare function toAuthorizationError(data: unknown): AuthorizationError; /** * Constructs the slim PAR authorize URL containing only client_id and request_uri * (and optionally prompt). Keeping sensitive params out of the browser address bar * is the core security value of PAR (RFC 9126). */ export declare function buildParAuthorizeUrl({ authorizationEndpoint, clientId, requestUri, prompt, }: ParUrlParams): string; /** * Converts an RTK Query dispatch error to a typed AuthorizationError. * oidc.api.ts normalizes all FetchBaseQueryErrors so that error.data always * contains { error, error_description, type }. SerializedErrors fall back to * their code/message fields. */ export declare function toDispatchError(error: FetchBaseQueryError | SerializedError): AuthorizationError; //# sourceMappingURL=authorize.request.utils.d.ts.map