import { VasatConnection } from "./base-models"; export interface VasatAPIResponse { status: number; message: string; time?: number; version?: string; throwable?: any; errorJson?: any; payload?: VasatPayload | any; api?: string; } export declare class VasatError { status: number; message: string; error?: any; throwable?: any; payload?: VasatPayload; errorJson?: any; constructor(resp: VasatAPIResponse, error?: any); } export declare class VasatStorage { ls: any; set(key: string, v: any): void; get(key: string): any; del(key: string): void; getWindow(): any; getLocalStorage(): any; } export declare class VasatConfig { host: string; clientId: string; clientSecret?: string | undefined; debug?: boolean | undefined; appName?: string | undefined; /** * * @param host Host name to connect * @param clientId Application client Id * @param clientSecret Applicataion client Secret * @param debug use to hide/show debug console messages * @param appName Name use to identify the app using this instance of vasat sdk. */ constructor(host: string, clientId: string, clientSecret?: string | undefined, debug?: boolean | undefined, appName?: string | undefined); useCookies: boolean; /** * allows custom implementations to do more work here */ init(v: VasatConnection): void; } export declare class RemoteAuthVasatConfig extends VasatConfig { authHost: string; /** * * @param host Host name to connect * @param clientId Application client Id * @param clientSecret Applicataion client Secret * @param debug use to hide/show debug console messages * @param appName Name use to identify the app using this instance of vasat sdk. */ constructor(host: string, authHost: string, clientId: string, clientSecret?: string, debug?: boolean, appName?: string); } export interface VasatClientConfig { hostname: string; app_name: string; app_logo: string; client_id: string; client_name: string; vasat_version: string; app_version: string; } export interface SubMenu { path: string; name: string; icon?: string; meta?: object; } export interface VasatServiceConfig { name: string; path: string; icon?: string; hidden: boolean; submenu: SubMenu[]; submenu2?: SubMenu[]; meta?: any; [key: string]: any; } export interface VasatServiceInfo { ready?: boolean; name?: string; meta?: { userMeta?: VasatModelDefinition; }; error?: any; path?: string; icon?: string; adminHref?: string; scope?: 'admin' | 'user'; contextObject?: string; models?: VasatModelDefinition[]; config?: any; needsCert?: boolean; } export interface RemoteLoginInfo { name: string; type: string; route: string; } export interface VasatSite { id?: string; logo?: string; name?: string; publicKey?: string; meta?: any; enabled?: boolean; baseURL?: string; domain?: string; } export interface MenuItem { name: string; path?: string; href?: string; icon?: string; children?: MenuItem[]; class?: string; badge?: string; frame?: string; badgeClass?: string; isExternalLink?: boolean; error?: string; ready?: boolean; } export interface UserUI { menus: MenuItem[]; baseHref?: string; contextObject?: VasatModelDefinition; } export interface VasatSiteInfo { initialised: boolean; version?: string; site?: VasatSite; services: VasatServiceInfo[]; remoteSites?: VasatSite[]; remoteServiceInfo?: VasatSiteInfo[]; error?: Error; userUI?: UserUI; hostname?: string; } export interface VasatSiteInitRequest { adminPassword: string; adminUsername: string; siteName?: string; adminUser?: any; registration?: string; certificates?: [ { signature: string; key: string; company?: string; common_name?: string; expiry: number; } ]; } export interface VasatServer { name: string; active: boolean; status?: string; notes?: string; lastHeartbeat?: number; site?: VasatSite; config?: any; cores?: number; diskTotal?: number; diskFree?: number; memTotal?: number; memFree?: number; } export interface VasatPayload { offset?: number; total?: number; results?: T[]; } export interface AdminAction { caption: string; endPoint: string; method: string; qMaps: any[]; icon?: string; string: string; scope?: string; group?: string; } export interface VasatModelDefinition { id: string; displayName?: string; dateMade?: number; dateUpdated?: number; item?: { fields?: { id: string; type: string; style?: string; title?: string; subtitle?: string; obj_type?: string; [key: string]: any; }[]; searchFields?: { id: string; type: string; style?: string; title?: string; subtitle?: string; obj_type?: string; [key: string]: any; }[]; hasFiles?: boolean; name?: string; active?: boolean; description?: string; supportedAcls?: any; versionControlled?: boolean; largeSearchable?: boolean; domain?: string; hidden?: boolean; adminActions?: AdminAction[]; }; }