import { z } from "zod";
export declare const FileTransferOpcode: {
    readonly FileBegin: 16;
    readonly FileChunk: 17;
    readonly FileEnd: 18;
};
export type FileTransferOpcode = (typeof FileTransferOpcode)[keyof typeof FileTransferOpcode];
export declare const FileBeginMetadataSchema: z.ZodObject<{
    mime: z.ZodString;
    size: z.ZodNumber;
    encoding: z.ZodEnum<["utf-8", "binary"]>;
    modifiedAt: z.ZodString;
}, "strict", z.ZodTypeAny, {
    size: number;
    encoding: "utf-8" | "binary";
    modifiedAt: string;
    mime: string;
}, {
    size: number;
    encoding: "utf-8" | "binary";
    modifiedAt: string;
    mime: string;
}>;
export interface FileBegin {
    opcode: typeof FileTransferOpcode.FileBegin;
    requestId: string;
    metadata: z.infer<typeof FileBeginMetadataSchema>;
    payload: Uint8Array;
}
export interface FileChunk {
    opcode: typeof FileTransferOpcode.FileChunk;
    requestId: string;
    payload: Uint8Array;
}
export interface FileEnd {
    opcode: typeof FileTransferOpcode.FileEnd;
    requestId: string;
    payload: Uint8Array;
}
export type FileTransferFrame = FileBegin | FileChunk | FileEnd;
type FileTransferFrameInput = {
    opcode: typeof FileTransferOpcode.FileBegin;
    requestId: string;
    metadata: z.infer<typeof FileBeginMetadataSchema>;
} | {
    opcode: typeof FileTransferOpcode.FileChunk;
    requestId: string;
    payload?: Uint8Array | ArrayBuffer | string;
} | {
    opcode: typeof FileTransferOpcode.FileEnd;
    requestId: string;
};
export declare function encodeFileTransferFrame(input: FileTransferFrameInput): Uint8Array;
export declare function decodeFileTransferFrame(bytes: Uint8Array): FileTransferFrame | null;
export {};
//# sourceMappingURL=file-transfer.d.ts.map