UNPKG

botbuilder-dialogs-adaptive

Version:

Rule system for the Microsoft BotBuilder dialog system.

83 lines (82 loc) 2.09 kB
/** * @module botbuilder-dialogs-adaptive */ /** * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. */ /** * Represents a property found in a JSON schema. */ export declare class PropertySchema { private _parent; private readonly _children; private readonly _entities; private readonly _expectedOnly; /** * Creates a new `PropertySchema` instance. * * @param path Path to this property. * @param schema JSON schema fragment for this property. * @param children Optional. Child properties. */ constructor(path: string, schema: object, children?: PropertySchema[]); /** * Path to schema. * * @remarks * Contains `[]` for arrays and `.` for path segments. */ readonly path: string; /** * JSON Schema object for this property. */ readonly schema: object; /* * Parent property schema if any. * * @returns The parent property schema if any. */ readonly parent: PropertySchema | undefined; /* * Child properties if there are any. * * @returns The child properties if there are any. */ readonly children: PropertySchema[]; /* * List of entity names. * * @returns A list of entity names. */ readonly entities: string[]; /* * List of expected only entity names. * * @returns A List of expected only entity names. */ readonly expectedOnly: string[]; /* * Name for this property. * * @remarks * Array brackets `[]` will have been removed. * @returns The name for this property. */ readonly name: string; /* * JSON Schema type. * * @returns The JSON Schema type. */ readonly type: string; /** * @returns `true` if the property is an array. */ isArray(): boolean; /** * @returns `true` if the property is an enum. */ isEnum(): boolean; } //# sourceMappingURL=propertySchema.d.ts.map