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<{ binary: "binary"; "utf-8": "utf-8"; }>; modifiedAt: z.ZodString; revision: z.ZodOptional; fileName: z.ZodOptional; }, z.core.$strip>; export interface FileBegin { opcode: typeof FileTransferOpcode.FileBegin; requestId: string; metadata: z.infer; 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; } | { 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