/******************************************************************************** * Copyright (c) 2021-2023 STMicroelectronics and others. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at * https://www.eclipse.org/legal/epl-2.0, or the MIT License which is * available at https://opensource.org/licenses/MIT. * * SPDX-License-Identifier: EPL-2.0 OR MIT *******************************************************************************/ import { AxiosInstance, AxiosRequestConfig, AxiosResponse } from 'axios'; import WebSocket from 'isomorphic-ws'; import URI from 'urijs'; import { ModelServerClientApiV1, ModelServerError, ServerConfiguration, SubscriptionOptions } from './model-server-client-api-v1'; import { Mapper, MessageDataMapper, Model, ModelServerMessage } from './model-server-message'; import { ModelServerCommand } from './model/command-model'; import { Diagnostic } from './model/diagnostic'; import { SubscriptionListener } from './subscription-listener'; import { AnyObject, TypeGuard } from './utils/type-util'; /** * A client to interact with a model server. */ export declare class ModelServerClient implements ModelServerClientApiV1 { protected restClient: AxiosInstance; protected openSockets: Map; protected _baseUrl: URI; protected defaultFormat: string; initialize(baseUrl: URI): void | Promise; protected getAxisConfig(baseURL: URI): AxiosRequestConfig | undefined; get(modeluri: URI): Promise; get(modeluri: URI, typeGuard: TypeGuard): Promise; get(modeluri: URI, format: string): Promise; getAll(): Promise; getAll(typeGuard: TypeGuard): Promise[]>; getAll(format: string): Promise[]>; getModelUris(): Promise; getElementById(modeluri: URI, elementid: string): Promise; getElementById(modeluri: URI, elementid: string, typeGuard: TypeGuard): Promise; getElementById(modeluri: URI, elementid: string, format: string): Promise; getElementByName(modeluri: URI, elementname: string): Promise; getElementByName(modeluri: URI, elementname: string, typeGuard: TypeGuard, format?: string): Promise; getElementByName(modeluri: URI, elementname: string, format: string): Promise; create(modeluri: URI, model: AnyObject | string): Promise; create(modeluri: URI, model: AnyObject | string, format: string): Promise; create(modeluri: URI, model: AnyObject | string, typeGuard: TypeGuard): Promise; update(modeluri: URI, model: AnyObject | string): Promise; update(modeluri: URI, model: string | string, typeGuard: TypeGuard): Promise; update(modeluri: URI, model: AnyObject | string, format: string): Promise; delete(modeluri: URI): Promise; close(modeluri: URI): Promise; save(modeluri: URI): Promise; saveAll(): Promise; validate(modeluri: URI): Promise; getValidationConstraints(modeluri: URI): Promise; getTypeSchema(modeluri: URI): Promise; getUiSchema(schemaname: string): Promise; configureServer(configuration: ServerConfiguration): Promise; ping(): Promise; edit(modeluri: URI, command: ModelServerCommand): Promise; undo(modeluri: URI): Promise; redo(modeluri: URI): Promise; send(modeluri: URI, message: ModelServerMessage): boolean; subscribe(modeluri: URI, options?: SubscriptionOptions): void; unsubscribe(modeluri: URI): boolean; protected createSubscriptionPath(modeluri: URI, options: SubscriptionOptions): URI; protected doSubscribe(listener: SubscriptionListener, modeluri: URI, path: URI): void; protected isSocketOpen(modeluri: URI): boolean; protected process(request: Promise>, mapper: MessageDataMapper): Promise; protected processMessageAsData(request: Promise>): Promise; protected processGeneric(request: Promise>, mapper: Mapper, erroResponse: (message: M) => ModelServerError | undefined): Promise; } //# sourceMappingURL=model-server-client.d.ts.map