UNPKG

closevector-web

Version:

CloseVector is fundamentally a vector database. We have made dedicated libraries available for both browsers and node.js, aiming for easy integration no matter your platform. One feature we've been working on is its potential for scalability. Instead of b

51 lines (50 loc) 1.53 kB
export declare const END_POINT = "https://vector-kv.mega-ug.uk"; export declare enum FileVisibility { Public = 0, Private = 1 } export declare const chunkArray: <T>(arr: T[], chunkSize: number) => T[][]; export declare function encryptToken(object: Record<string, any>, secret: string): Promise<string>; export declare function createUploadFileOperationUrl(options: { uuid?: string; public?: boolean; description: string; accessKey: string; secret: string; }): Promise<{ url: string; uuid: string; }>; export declare function createPublicGetFileOperationUrl(options: { uuid: string; accessKey: string; }): Promise<{ url: string; uuid: string; }>; export declare function createGetFileOperationUrl(options: { uuid: string; accessKey: string; secret: string; }): Promise<{ url: string; }>; /** * * @param url * @param options * @returns response returned by fetch * @summary should not be used in web */ export declare const fetchUsingToken: (url: string, options: RequestInit & { accessKey: string; secret: string; }) => Promise<Response>; export declare class IDBFS { static writeBufferToFile(path: string, buffer: Uint8Array): Promise<void>; static writeStringToFile(path: string, data: string): Promise<void>; static getBufferFromFile(path: string): Promise<Uint8Array>; static getStringFromFile(path: string): Promise<string>; static writeFs(): Promise<void>; } export declare function pathJoin(...parts: string[]): string;