portkey-ai
Version:
Node client library for the Portkey API
39 lines (38 loc) • 1.46 kB
TypeScript
import { ApiClientInterface } from '../_types/generalTypes';
import { ApiResource } from '../apiResource';
import { RequestOptions } from '../baseClient';
export declare class MainFiles extends ApiResource {
create(_body: FileCreateParams, params?: ApiClientInterface, opts?: RequestOptions): Promise<FileObject>;
list(_query?: FileListParams, params?: ApiClientInterface, opts?: RequestOptions): Promise<any>;
retrieve(fileId: string, params?: ApiClientInterface, opts?: RequestOptions): Promise<any>;
del(fileId: string, params?: ApiClientInterface, opts?: RequestOptions): Promise<any>;
content(fileId: string, params?: ApiClientInterface, opts?: RequestOptions): Promise<any>;
retrieveContent(fileId: string, params?: ApiClientInterface, opts?: RequestOptions): Promise<any>;
waitForProcessing(id: string, _body: PollOptions, params?: ApiClientInterface): Promise<FileObject>;
}
interface PollOptions {
pollInterval?: number | undefined;
maxWait?: number | undefined;
}
export interface FileCreateParams {
file: any;
purpose?: string;
[key: string]: any;
}
export interface FileObject {
id: string;
bytes?: number;
created_at?: number;
filename?: string;
object?: string;
purpose?: string;
status?: string;
status_details?: string;
[key: string]: any;
}
export interface FileListParams {
purpose?: string;
order?: 'asc' | 'desc';
[key: string]: any;
}
export {};