export declare const FileScope: { readonly WORKSPACE: "WORKSPACE"; readonly FLOW: "FLOW"; readonly EXECUTION: "EXECUTION"; }; export type FileScope = (typeof FileScope)[keyof typeof FileScope]; export type FileScopes = typeof FileScope; export interface FlowrunnerContextFilesOptions { serverURL: string; appId: string; apiKey: string; runtimeKey: string; flowId?: string | null; executionId?: string | null; retrieveNewS3Token: (runtimeKey: string) => Promise<{ filesS3Token: string; }>; } export interface UploadFileOptions { scope?: FileScope; filename?: string; ttl?: number; generateUrl?: boolean; objectTtl?: number; overwrite?: boolean; } export interface ListOptions { scope?: FileScope; ttl?: number; generateUrl?: boolean; limit?: number; cursor?: string; } export interface GetOptions { scope?: FileScope; ttl?: number; generateUrl?: boolean; } export interface DeleteOptions { scope?: FileScope; } export interface UploadResult { key: string; filename: string; url: string; size: number; urlExpiresAt: string; objectExpiresAt: string | null; overwritten: boolean; } export interface FileInfo { key: string; filename: string; url: string; size: number; createdAt: string; urlExpiresAt: string; objectExpiresAt: string | null; } export interface ListResult { files: FileInfo[]; cursor: string | null; hasMore: boolean; } export interface DeleteResult { key: string; freedBytes: number; deleted: boolean; } export interface UsageResult { workspaceId: string; usedBytes: number; quotaBytes: number; usedFormatted: string; quotaFormatted: string; utilizationPercent: number; fileCount: number; } export interface FilesApi { uploadFile(file: Buffer | Uint8Array, options?: UploadFileOptions): Promise; list(options?: ListOptions): Promise; get(filename: string, options?: GetOptions): Promise; delete(filename: string, options?: DeleteOptions): Promise; usage(): Promise; } export declare class FlowrunnerContextFiles implements FilesApi { appId: string; apiKey: string; runtimeKey: string; serverURL: string; flowId: string | null; executionId: string | null; retrieveNewS3Token: (runtimeKey: string) => Promise<{ filesS3Token: string; }>; constructor({ appId, apiKey, runtimeKey, serverURL, flowId, executionId, retrieveNewS3Token, }: FlowrunnerContextFilesOptions); get base(): string; private collectionPath; private filePath; private resolveFilesS3Token; private request; uploadFile(file: Buffer | Uint8Array, options?: UploadFileOptions): Promise; list(options?: ListOptions): Promise; get(filename: string, options?: GetOptions): Promise; delete(filename: string, options?: DeleteOptions): Promise; usage(): Promise; }