import type { ManagementClient } from '../../client/management';
import type { LocalContent } from '../content/reader';
type DiagnosticSeverity = 'error' | 'warning' | 'info';
export declare const MEDIA_GUARD_DIAGNOSTIC_CODES: readonly ["missing_identifier", "invalid_identifier", "unresolved_identifier", "resolution_api_error", "identifier_normalized", "legacy_fields_stripped"];
export type MediaGuardDiagnosticCode = typeof MEDIA_GUARD_DIAGNOSTIC_CODES[number];
export interface MediaGuardDiagnostic {
    code: MediaGuardDiagnosticCode;
    severity: DiagnosticSeverity;
    message: string;
    location: string;
    identifier?: string;
    details?: Record<string, string>;
}
export type MediaWritePolicy = {
    mode: 'resolve-or-reject';
    client: ManagementClient;
} | {
    mode: 'reject-only';
};
export declare const MEDIA_GUARD_BYPASS_ENV_VAR = "RIVERBANK_SKIP_MEDIA_GUARD";
export declare const isMediaGuardBypassed: () => boolean;
export interface MediaWriteGuardResult<TPayload> {
    payload: TPayload;
    diagnostics: MediaGuardDiagnostic[];
    hasBlockingErrors: boolean;
}
export type MediaValidationResult = {
    skipped: true;
    warning: string;
} | {
    skipped: false;
    diagnostics: MediaGuardDiagnostic[];
    hasBlockingErrors: boolean;
};
export declare const formatMediaGuardDiagnostic: (diagnostic: MediaGuardDiagnostic) => string;
export declare function buildEntryGuardContent(contentType: string, identifier: string, data: Record<string, unknown>): LocalContent;
export declare function buildBlockGuardContent(pageIdentifier: string, blockIdentifier: string, blockKind: string, data: Record<string, unknown>): LocalContent;
export declare function guardLocalContentMediaWrites(content: LocalContent, policy: MediaWritePolicy): Promise<MediaWriteGuardResult<LocalContent>>;
export declare function guardEntryDataForWrite(options: {
    contentType: string;
    identifier: string;
    data: Record<string, unknown>;
    policy: MediaWritePolicy;
}): Promise<MediaWriteGuardResult<Record<string, unknown>>>;
export declare function guardBlockDataForWrite(options: {
    pageIdentifier: string;
    blockIdentifier: string;
    blockKind: string;
    data: Record<string, unknown>;
    policy: MediaWritePolicy;
}): Promise<MediaWriteGuardResult<Record<string, unknown>>>;
export {};
