import { AuthTransportScope } from '../types/errors.js'; export type { AuthTransportScope } from '../types/errors.js'; export type AuthServiceHealth = { status: "unknown"; } | { lastSuccessAt: number; lastSuccessScope: AuthTransportScope; status: "healthy"; } | { failures: string[]; lastSuccessAt?: number; status: "degraded"; } | { scope: AuthTransportScope; since: number; status: "unreachable"; }; export type AuthOperationKind = "success" | "failure"; export declare function isCanonicalAuthTransportScope(scope: AuthTransportScope): boolean; export declare function getAuthServiceHealth(): AuthServiceHealth; export declare function resetAuthServiceHealth(): void; export declare function recordAuthSuccess(scope: AuthTransportScope, at?: number): AuthServiceHealth; export declare function recordAuthFailure(scope: AuthTransportScope, code?: string, at?: number): AuthServiceHealth; /** * Global Auth-service unreachable copy is allowed only for canonical * identity/session transport when no later canonical success has landed. */ export declare function allowsAuthConnectivityCopy(scope: AuthTransportScope | undefined, snapshot?: AuthServiceHealth): boolean;