import { Id, RequestOptions, Response } from '../shared'; import { EndpointNode, EndpointNodeDef, Interface, NamedInterface, Universe, UniverseInfo } from '../modeling'; import { User } from './user'; import { JSONValue, LayerProfile } from '../system'; import { AppRoute, Component, ComponentType, FlexView, ViewComponent, VyzeApp, WebView } from "../app"; export declare type Languages = 'ts' | 'go'; export interface AccountResponse { [_: string]: any; user: User; token: string; } export interface AppRouteView { [_: string]: any; app: VyzeApp; route: AppRoute; view: ViewComponent; } export declare class ServiceError { code: number; message: string; constructor(code: number, message: string); } export declare class ServiceClient { private url; private decoder; private universeIdCache; private universeCache; private userCache; private _token?; private _decoder; constructor(url?: string); set token(token: string | undefined); get token(): string | undefined; login(username: string, password: string): Promise; newAccount(): Promise; getUniverses(): Promise; resolveUniverse(universeName: string, useCache?: boolean): Promise; loadUniverse(universeId: Id, useCache?: boolean): Promise; loadUniverseYaml(universeId: Id): Promise; updateUniverse(universeId: Id, description: string | undefined, isPublic: boolean | undefined, extensible: boolean | undefined): Promise; createModel(universeId: Id, name: string, object: Id, type: 'model' | 'field' | 'value', description: string): Promise; deleteModel(universeId: Id, name: string): Promise; updateModel(universeId: Id, name: string, description: string | undefined): Promise; createEndpoint(universeId: Id, endpointNode: EndpointNode): Promise; updateEndpoint(universeId: Id, endpointNode: EndpointNode): Promise; deleteEndpoint(universeId: Id, name: string): Promise; getEndpointInterfaces(universeId: Id, endpointName: string): Promise; createInterface(universeId: Id, namedInterface: NamedInterface): Promise; deleteInterface(universeId: Id, name: string): Promise; getUniverseJSONSchema(universeName: string): Promise; getUniverseCode(universeName: string, language: Languages): Promise; getInterfaceCode(universeName: string, interfaceName: string, language: Languages): Promise; getEndpointCode(universeName: string, endpointName: string, language: Languages): Promise; getLayerProfile(profileId: Id): Promise; getUser(userId: Id, useCache?: boolean): Promise; getComponents(universeId?: Id, type?: ComponentType, subType?: string): Promise; getComponent(componentId: Id): Promise; getComponentByName(componentName: string): Promise; createComponent(name: string, universeId: Id, type: ComponentType, subType: string): Promise; updateComponent(componentId: Id, name?: string, description?: string, isPublic?: boolean, listed?: boolean, title?: string): Promise; deleteComponent(componentId: Id): Promise; getView(componentId: Id): Promise; updateView(componentId: Id, model?: string, list?: boolean): Promise; getWebView(componentId: Id): Promise; updateWebView(componentId: Id, tag?: string): Promise; getFlexView(componentId: Id): Promise; updateFlexView(componentId: Id, definition?: string): Promise; getAppRouteView(appName: string, path: string): Promise; createApp(name: string, universeId: Id, isPublic: boolean): Promise; getApps(): Promise; getApp(appId: Id): Promise; getAppByName(appName: string): Promise; updateApp(appId: Id, isPublic?: boolean, name?: string, description?: string, path?: string, title?: string): Promise; createAppRoute(appId: Id, route: string, viewId: Id): Promise; getAppRoutes(appId: Id): Promise; deleteAppRoute(routeId: Id): Promise; private buildUrl; get(url: string, requestOptions: RequestOptions): Promise; post(url: string, body: JSONValue | ArrayBuffer, requestOptions: RequestOptions): Promise; put(url: string, body: JSONValue | ArrayBuffer, requestOptions: RequestOptions): Promise; delete(url: string, requestOptions: RequestOptions): Promise; request(method: 'GET' | 'POST' | 'PUT' | 'DELETE', url: string, body: JSONValue | ArrayBuffer | undefined, options: RequestOptions, headers?: { [_: string]: string; }): Promise<[T | undefined, Response]>; private handleError; } export declare function newServiceClient(url?: string): ServiceClient; //# sourceMappingURL=client.d.ts.map