import { TraceloopClient } from "../traceloop-client"; import { BaseDatasetEntity } from "./base-dataset"; import { RowResponse, RowData, RowUpdateOptions } from "../../interfaces"; import { Attachment, ExternalAttachment, AttachmentReference } from "./attachment"; export declare class Row extends BaseDatasetEntity { private _data; private _deleted; constructor(client: TraceloopClient, data: RowResponse); get id(): string; get datasetId(): string; get datasetSlug(): string; get data(): RowData; get createdAt(): string; get updatedAt(): string; get deleted(): boolean; getValue(columnName: string): string | number | boolean | Date | null | object; hasColumn(columnName: string): boolean; getColumns(): string[]; update(options: RowUpdateOptions): Promise; partialUpdate(updates: Partial): Promise; delete(): Promise; toJSON(): RowData; toCSVRow(columns?: string[], delimiter?: string): string; validate(columnValidators?: { [columnName: string]: (value: any) => boolean; }): { valid: boolean; errors: string[]; }; clone(): Row; /** * Gets an attachment reference from a column * @param columnName The name of the column containing the attachment * @returns AttachmentReference if the column contains an attachment, null otherwise */ getAttachment(columnName: string): AttachmentReference | null; /** * Checks if a column contains an attachment * @param columnName The name of the column to check */ hasAttachment(columnName: string): boolean; /** * Sets/uploads an attachment to a column * @param columnSlug The slug of the column to set the attachment in * @param attachment The attachment to upload (Attachment or ExternalAttachment) * @returns The created AttachmentReference * * @example * // Upload from file * await row.setAttachment("image", new Attachment({ filePath: "./photo.jpg" })); * * @example * // Set external URL * await row.setAttachment("document", new ExternalAttachment({ url: "https://example.com/doc.pdf" })); */ setAttachment(columnSlug: string, attachment: Attachment | ExternalAttachment): Promise; /** * Downloads an attachment from a column * @param columnName The name of the column containing the attachment * @param outputPath Optional file path to save the downloaded file * @returns Buffer if no outputPath provided, void if saved to file * * @example * // Get as buffer * const data = await row.downloadAttachment("image"); * * @example * // Save to file * await row.downloadAttachment("image", "./downloaded-image.png"); */ downloadAttachment(columnName: string, outputPath?: string): Promise; } //# sourceMappingURL=row.d.ts.map