botbuilder-dialogs-adaptive
Version:
Rule system for the Microsoft BotBuilder dialog system.
82 lines • 2.02 kB
TypeScript
/**
* @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.
*/
get parent(): PropertySchema | undefined;
/**
* Child properties if there are any.
*
* @returns The child properties if there are any.
*/
get children(): PropertySchema[];
/**
* List of entity names.
*
* @returns A list of entity names.
*/
get entities(): string[];
/**
* List of expected only entity names.
*
* @returns A List of expected only entity names.
*/
get expectedOnly(): string[];
/**
* Name for this property.
*
* @remarks
* Array brackets `[]` will have been removed.
* @returns The name for this property.
*/
get name(): string;
/**
* JSON Schema type.
*
* @returns The JSON Schema type.
*/
get 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