import { Node } from 'jsonc-parser'; import { ElementContext } from '../validate/validation-context'; /** * check that property is a non empty string * @param node JSON node * @param parserContext context of the validation, ex. method or element name * @param propertyName name of the property */ export declare function assertNotEmptyString(node: Node, parserContext: string, propertyName: string): string; /** * Check that parent node contains given property and it's a non-empty string * @param parentNode JSON node * @param parserContext validation context * @param objectName name of the property * @returns non empty value */ export declare function assertHasNotEmptyString(parentNode: Node, parserContext: string, objectName: string): string; /** * Check that each array member is a non empty string * @param node JSON node * @param structure context of the validation, ex. method or element name * @param key name of the array property */ export declare function assertArrayMemberIsString(node: Node, structure: string, key: string): void; /** * Check that node is an array * @param node JSON node * @param structure validation context * @param objectName property name */ export declare function assertOptionalNotEmptyArray(node: Node, structure: string, objectName: string): void; /** * Check that parent node contains given property and it's non empty array * @param parentNode JSON node * @param structure validation context * @param objectName property name */ export declare function assertNotEmptyArray(parentNode: Node, structure: string, objectName: string): Node; /** * check that array member is an object, does not need key name because it's not a map * @param node - JSON node to check * @param structure - string to identify structure * @param objectName - name of the object in array */ export declare function assertIsArrayMemberObject(node: Node, structure: string, objectName: string): void; /** * Check that parent node contains given property and it's non null object * @param parentNode JSON node * @param structure validation context * @param objectName property name */ export declare function assertNotNullObject(parentNode: Node, structure: string, objectName: string): Node; /** * Check that parent node contains given object or null * @param parentNode JSON node * @param structure validation context * @param objectName property name */ export declare function assertOptionalObject(parentNode: Node, structure: string, objectName: string): Node | null; /** * Check that node is an object * @param node JSON node * @param structure validation context * @param objectName property name */ export declare function assertIsObject(node: Node, structure: string, objectName: string): void; /** * Check if optional property is of boolean type * @param parentNode node that contains the property * @param validationContext context for message * @param propertyName name of the property * @returns value of the property or false */ export declare function assertBooleanProperty(parentNode: Node, validationContext: string, propertyName: string): boolean; /** * Check that only supported properties present * @param node container node * @param validationContext context for message * @param properties array of supported properties */ export declare function assertValidKeys(node: Node, validationContext: string, properties: string[]): void; /** * Check if the element is allowed to have nested elements * @param nestedElementsNode elements node * @param elementContext context of the element */ export declare function assertElementIsNestable(nestedElementsNode: Node, elementContext: ElementContext): void; //# sourceMappingURL=assertions.d.ts.map