import type { FastifyRequest, FastifyReply } from 'fastify';
export interface ClientPlatformRule {
    minimumVersion?: string;
    message?: string;
}
export interface ClientRule {
    minimumVersion?: string;
    minimumBuild?: number;
    message?: string;
}
export interface ClientMetaConfig {
    version: string;
    build: number;
    platforms?: Record<string, ClientPlatformRule>;
    clients: Record<string, ClientRule>;
}
export interface ClientRuntimeInfo {
    client: string;
    clientVersion: string;
    clientBuild?: number | string | null;
    platform: string;
    platformVersion?: string | null;
}
export interface NormalizedClientRuntimeInfo {
    client: string;
    clientVersion: string;
    clientBuild: number;
    platform: string;
    platformVersion: string;
}
export interface ClientValidationSuccess {
    ok: true;
    normalized: NormalizedClientRuntimeInfo;
}
export interface ClientValidationFailure {
    ok: false;
    code: 'missing_client_metadata' | 'unsupported_client' | 'unsupported_client_version' | 'unsupported_client_build' | 'unsupported_platform_version';
    message?: string;
    requiredVersion?: string;
    requiredBuild?: number;
    requiredPlatformVersion?: string;
    provided?: NormalizedClientRuntimeInfo | null;
    missingHeaders?: string[];
}
export type ClientValidationResult = ClientValidationSuccess | ClientValidationFailure;
export interface ClientErrorResponseBody {
    error: string;
    message: string;
    requiredVersion: string | null;
    requiredBuild: number | null;
    requiredPlatformVersion?: string | null;
    currentVersion: string | null;
    currentBuild: number | null;
    missingHeaders?: string[] | null;
}
export type ClientMetadataExtractor = (request: FastifyRequest) => ClientRuntimeInfo;
export type ClientValidator = (info: ClientRuntimeInfo) => ClientValidationResult;
export type ClientGuard = (request: FastifyRequest, reply: FastifyReply) => Promise<NormalizedClientRuntimeInfo | null>;
//# sourceMappingURL=types.d.ts.map