/** * Minimal structural shape of `@google-cloud/storage`'s `Bucket`. Defined * structurally so this module doesn't pull `@google-cloud/storage` into the * shared package's dependency graph — callers pass the real bucket. */ export interface UploadBucket { file(path: string): { exists(): Promise<[boolean]>; setMetadata(meta: { metadata: Record; }): Promise; }; upload(localPath: string, options: { destination: string; contentType: string; public?: boolean; }): Promise; } export type UploadResult = 'uploaded' | 'skipped'; /** * Upload a local file to a Cloud Storage bucket. The content type is inferred * from the file extension via {@link CONTENT_TYPE_BY_EXTENSION}. Returns * `'skipped'` if the remote file already exists and `overwrite` is falsy, * `'uploaded'` otherwise. Throws if the underlying bucket operation fails. * * Sets a `duration` metadata field (in seconds) from ffprobe when probing * succeeds; metadata failures are swallowed since they're non-fatal. */ export declare function uploadFile({ bucket, localPath, overwrite, remotePath, }: { bucket: UploadBucket; localPath: string; remotePath: string; overwrite?: boolean; }): Promise;