@nvwa-app/frontend-commons-web
Version:
NVWA跨端通用工具类Web端实现
23 lines (19 loc) • 819 B
text/typescript
import { NvwaLocalStorage, INvwa, NvwaAuthClient, NvwaFileStorage, createPostgrestClient, NvwaEdgeFunctions, NvwaHttpClient } from '@nvwa-app/sdk-core';
declare class WebNvwaLocalStorage implements NvwaLocalStorage {
private prefix;
private getKey;
get(key: string): Promise<any | null>;
set(key: string, value: any, expires?: number): Promise<void>;
remove(key: string): Promise<void>;
clear(): Promise<void>;
}
declare const localStorage: WebNvwaLocalStorage;
declare class Nvwa implements INvwa {
auth: NvwaAuthClient;
fileStorage: NvwaFileStorage;
entities: ReturnType<typeof createPostgrestClient>;
functions: NvwaEdgeFunctions;
httpClient: NvwaHttpClient;
constructor(baseUrl: string, handleUnauthorized: () => void);
}
export { Nvwa as default, localStorage };