UNPKG

casdoor-nodejs-sdk

Version:
34 lines (33 loc) 1.1 kB
import { AxiosResponse } from 'axios'; import { Config } from './config'; import Request from './request'; export interface Adapter { owner: string; name: string; createdTime: string; type?: string; databaseType?: string; host: string; port?: number; user: string; password?: string; database?: string; table?: string; tableNamePrefix?: string; isEnabled?: boolean; } export declare class AdapterSDK { private config; private readonly request; constructor(config: Config, request: Request); getAdapters(): Promise<AxiosResponse<{ data: Adapter[]; }, any>>; getAdapter(id: string): Promise<AxiosResponse<{ data: Adapter; }, any>>; modifyAdapter(method: string, adapter: Adapter): Promise<AxiosResponse<Record<string, unknown>, any>>; addAdapter(adapter: Adapter): Promise<AxiosResponse<Record<string, unknown>, any>>; updateAdapter(adapter: Adapter): Promise<AxiosResponse<Record<string, unknown>, any>>; deleteAdapter(adapter: Adapter): Promise<AxiosResponse<Record<string, unknown>, any>>; }