/** * S3 Uploader - Handles uploading audio files to S3 using pre-signed URLs */ import { Buffer } from 'buffer'; /** * Upload progress callback */ export type UploadProgressCallback = (progress: number) => void; /** * Upload options */ export interface UploadOptions { /** Content type (default: audio/opus) */ contentType?: string; /** Progress callback */ onProgress?: UploadProgressCallback; /** Abort signal for cancellation */ abortSignal?: AbortSignal; } /** * S3 Uploader class */ export declare class S3Uploader { /** * Upload a file to S3 using a pre-signed URL */ upload(data: Buffer, uploadUrl: string, options?: UploadOptions): Promise; /** * P10: Upload a BLE-e2e ciphertext blob via the backend relay endpoint. * * Used on the BLE sync path when the device encrypted audio chunks for the * project's X25519 backend pubkey before transferring. The SDK never holds * plaintext — the bytes received from the device are opaque ciphertext, * POSTed here for server-side decryption + S3 write. * * The endpoint is `POST /v1/recordings/{id}/upload-relay` and expects * `Content-Type: application/octet-stream`. Auth is a standard Bearer * token (project secret/restricted key, or a device token). */ relayUpload(ciphertext: Buffer, relayUrl: string, bearerToken: string, options?: UploadOptions): Promise; /** * Upload a file in chunks (for larger files) * Note: This requires multipart upload support from the pre-signed URL */ uploadChunked(data: Buffer, uploadUrl: string, options?: UploadOptions): Promise; /** * Notify the backend that upload is complete */ notifyCompletion(completeUrl: string, recordingId: string, uploadToken: string, contentSha256?: string): Promise; } //# sourceMappingURL=S3Uploader.d.ts.map