UNPKG

@eclipse-emfcloud/modelserver-client

Version:

Typescript rest client to interact with an EMF.cloud modelserver

75 lines 3.27 kB
import { DataValueType, ModelServerObject, ModelServerReferenceDescription } from './base-model'; import { ChangeDescription } from './change-model'; export declare namespace ModelServerCommandPackage { const NS_URI = "http://www.eclipse.org/emfcloud/modelserver/command"; } export declare class ModelServerCommand extends ModelServerObject { type: string; properties?: { [key: string]: string; } | undefined; static readonly URI: string; eClass: string; owner?: ModelServerReferenceDescription; feature?: string; indices?: number[]; dataValues?: DataValueType[]; objectValues?: ModelServerReferenceDescription[]; objectsToAdd?: ModelServerObject[]; constructor(type: string, properties?: { [key: string]: string; } | undefined); setProperty(key: string, value: string): void; getProperty(key: string): undefined | string; static is(object?: unknown): object is ModelServerCommand; } export declare class CompoundCommand extends ModelServerCommand { commands: ModelServerCommand[]; static readonly TYPE = "compound"; static readonly URI: string; eClass: string; constructor(commands?: ModelServerCommand[]); static is(object?: unknown): object is ModelServerCommand; } export declare class RemoveCommand extends ModelServerCommand { owner: ModelServerReferenceDescription; feature: string; static readonly TYPE = "remove"; constructor(owner: ModelServerReferenceDescription, feature: string, indices: number[]); constructor(owner: ModelServerReferenceDescription, feature: string, objectValues: ModelServerReferenceDescription[]); static is(object?: unknown): object is ModelServerCommand; } export declare class AddCommand extends ModelServerCommand { owner: ModelServerReferenceDescription; feature: string; static readonly TYPE = "add"; constructor(owner: ModelServerReferenceDescription, feature: string, toAdd: DataValueType[] | ModelServerObject[]); constructor(owner: ModelServerReferenceDescription, feature: string, toAdd: DataValueType[] | ModelServerObject[], index: number); static is(object?: unknown): object is ModelServerCommand; } export declare class SetCommand extends ModelServerCommand { owner: ModelServerReferenceDescription; feature: string; static readonly TYPE = "set"; constructor(owner: ModelServerReferenceDescription, feature: string, changedValues: DataValueType[] | ModelServerReferenceDescription[] | ModelServerObject[]); static is(object?: unknown): object is ModelServerCommand; } export declare namespace CommandExecutionType { const EXECCUTE = "execute"; const UNDO = "undo"; const REDO = "redo"; } export declare class CommandExecutionResult implements ModelServerObject { type: string; source: ModelServerCommand; changeDescription: ChangeDescription; static readonly URI: string; eClass: string; affectedObjects?: ModelServerReferenceDescription[]; details?: { [key: string]: string; }; constructor(type: string, source: ModelServerCommand, changeDescription: ChangeDescription); static is(object?: unknown): object is CommandExecutionResult; } //# sourceMappingURL=command-model.d.ts.map