@maximai/maxim-js
Version:
Maxim AI JS SDK. Visit https://getmaxim.ai for more info.
30 lines (29 loc) • 1.33 kB
TypeScript
import { type DatasetEntry, type DatasetRow, FileVariablePayload } from "../models/dataset";
import { MaximAPI } from "./maxim";
export declare class MaximDatasetAPI extends MaximAPI {
constructor(baseUrl: string, apiKey: string, isDebug?: boolean);
addDatasetEntries(datasetId: string, datasetEntries: DatasetEntry[]): Promise<void>;
uploadFileAttachments(datasetId: string, entryId: string, entry: DatasetEntry): Promise<FileVariablePayload>;
private processAttachment;
private processUrlAttachment;
private processFileAttachment;
getDatasetTotalRows(datasetId: string): Promise<number>;
getDatasetRow(datasetId: string, rowIndex: number): Promise<{
data: DatasetRow;
id: string;
}>;
getDatasetDatastructure(datasetId: string): Promise<Record<string, "INPUT" | "EXPECTED_OUTPUT" | "VARIABLE" | "SCENARIO" | "EXPECTED_STEPS">>;
private getUploadUrlForDatasetAttachment;
uploadToSignedUrl(url: string, data: Buffer, mimeType: string, fileContext?: {
filename?: string;
entryId?: string;
}): Promise<void>;
updateDatasetEntries(datasetId: string, updates: Array<{
entryId: string;
columnName: string;
value: {
type: "file";
payload: FileVariablePayload;
};
}>): Promise<void>;
}