export type MigrationArtifactErrorCode = 'ARTIFACT_TOO_LARGE' | 'ARTIFACT_INVALID_JSON' | 'ARTIFACT_SECRET_MATERIAL' | 'ARTIFACT_LOCKED' | 'ARTIFACT_EXISTS' | 'ARTIFACT_VERSION_UNSUPPORTED' | 'ARTIFACT_RECOVERY_FAILED'; export declare const MIGRATION_ERROR_CODES: { readonly validation: "MIGRATION_VALIDATION_FAILED"; readonly configuration: "MIGRATION_CONFIGURATION_INVALID"; readonly external: "MIGRATION_EXTERNAL_OPERATION_FAILED"; }; export declare function structuredMigrationError(error: unknown): string; export declare class MigrationArtifactError extends Error { readonly code: MigrationArtifactErrorCode; constructor(code: MigrationArtifactErrorCode, message: string); } export declare function readMigrationJson(file: string, maxBytes?: number): T; export declare function writeMigrationJson(file: string, value: unknown, opts?: { createOnly?: boolean; backup?: boolean; mode?: number; }): void; export declare function recoverMigrationJson(file: string): void; export declare function migrateMigrationJson(file: string, output: string): void;