import { Id, Layer } from '../shared'; import { ResourceSchema } from '../system'; import { EndpointNode, EndpointNodeDef } from './node'; import { NamedInterface } from './interface'; import { Model } from './model'; import { ResultSet, ModelSet, FieldSet } from './util'; /** * Represents the model type: * - `model` - ordinary model, i.e. not a field and not a value * - `field` - field of a model * - `value` - special model representing a data value */ export declare type ModelType = 'model' | 'field' | 'value'; /** * The Universe class represents a VYZE modeling, including its models, description and dependencies. * * See also {@linkcode loadUniverse}, {@linkcode ServiceClient.loadUniverse}, {@linkcode loadUniverseFromFile} */ export declare class Universe { private readonly _id?; private readonly _name; private readonly _description; private readonly _bases; private readonly _dependencies; private readonly _models; private readonly _objects; private readonly _endpoints; private readonly _interfaces; private readonly _layers; private readonly _definition?; constructor(id: Id | undefined, name: string, description: string, bases: string[], dependencies: string[], definition?: string); get id(): Id | undefined; get name(): string; get description(): string; get bases(): string[]; get dependencies(): string[]; get models(): ModelSet; get fields(): FieldSet; get objects(): ResultSet; get endpoints(): ResultSet; get interfaces(): ResultSet; get layers(): ResultSet; get definition(): string | undefined; /** * Obtains the ID for a model inside this universe, unless it is already an ID. * @param name name of the model or an ID * @returns id of the object or `undefined` if not available */ resolve(name: string): Id | undefined; /** * Obtains {@linkcode Model} instance by name. * @param name name of the model * @returns {@linkcode Model} instance or `undefined` if not available */ getModel(name: string): Model | undefined; /** * Obtains {@linkcode EndpointNode} by name. * @param name name of the endpoint node * @returns {@linkcode EndpointNode} or `undefined` if not available */ getEndpoint(name: string): EndpointNode | undefined; /** * Obtains {@linkcode NamedInterface} by name. * @param name name of the interface * @returns {@linkcode NamedInterface} or `undefined` if not available */ getInterface(name: string): NamedInterface | undefined; /** * Searches for {@linkcode Model} instance by its corresponding object id. * @param id id of the model object * @returns {@linkcode Model} instance or `undefined` if not available */ getObject(id: Id): Model | undefined; addEndpointDefinition(def: EndpointNodeDef): void; addInterfaceDefinition(def: NamedInterface): void; } export declare function loadUniverseYaml(universeYaml: string): Universe | undefined; export declare function resolve(universe: Universe, name: string): Id | undefined; /** * Resolves model ids inside the provided schema. * @param universe modeling to resolve ids from * @param schema schema to resolve */ export declare function resolveSchema(universe: Universe, schema: ResourceSchema): void; export interface UniverseInfo { [_: string]: any; id: Id; name: string; owner: Id; root: Id; description: string; layer: Id; public: boolean; extensible: boolean; } //# sourceMappingURL=universe.d.ts.map