import { TraceloopClient } from "../traceloop-client"; import { Attachment, ExternalAttachment, AttachmentReference, FileCellType, AttachmentMetadata } from "./attachment"; /** * Response from the upload URL endpoint */ export interface UploadUrlResponse { uploadUrl: string; storageKey: string; expiresAt?: string; method?: string; } /** * Handles attachment upload and registration operations */ export declare class AttachmentUploader { private client; constructor(client: TraceloopClient); /** * Requests a presigned upload URL from the API */ getUploadUrl(datasetSlug: string, rowId: string, columnSlug: string, fileName: string, contentType: string, fileType: FileCellType, metadata?: AttachmentMetadata): Promise; /** * Uploads file data directly to S3 using the presigned URL */ uploadToS3(uploadUrl: string, data: Buffer, contentType: string): Promise; /** * Confirms the upload status with the API */ confirmUpload(datasetSlug: string, rowId: string, columnSlug: string, status: "success" | "failed", metadata?: AttachmentMetadata): Promise; /** * Registers an external URL as an attachment */ registerExternalUrl(datasetSlug: string, rowId: string, columnSlug: string, url: string, fileType: FileCellType, metadata?: AttachmentMetadata): Promise; /** * Uploads an Attachment through the full flow: * 1. Get presigned URL * 2. Upload to S3 * 3. Confirm upload */ uploadAttachment(datasetSlug: string, rowId: string, columnSlug: string, attachment: Attachment): Promise; /** * Processes an ExternalAttachment by registering the URL */ processExternalAttachment(datasetSlug: string, rowId: string, columnSlug: string, attachment: ExternalAttachment): Promise; /** * Processes any attachment type (Attachment or ExternalAttachment) */ processAnyAttachment(datasetSlug: string, rowId: string, columnSlug: string, attachmentObj: Attachment | ExternalAttachment): Promise; } //# sourceMappingURL=attachment-uploader.d.ts.map