UNPKG

lex-model-validator

Version:
104 lines (103 loc) 2.37 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var ValidationFunctions_1 = require("./ValidationFunctions"); exports.VALIDATION_CONSTRAINTS_SLOT = { name: { type: 'string', minLength: 2 }, priority: { type: 'number', min: 0 }, slotType: { type: 'string', minLength: 2 }, slotTypeVersion: { required: false, type: 'string', minLength: 1 }, slotConstraint: { matches: ['Required', 'Optional'] }, sampleUtterances: { isArray: true, validate: ValidationFunctions_1.VALIDATION_FUNCTION_CHECK_DUPLICATES }, valueElicitationPrompt: { type: 'object' }, 'valueElicitationPrompt.messages': { isArray: true, minLength: 1, validate: ValidationFunctions_1.VALIDATION_FUNCTION_STATEMENT_MESSAGES }, 'valueElicitationPrompt.maxAttempts': { type: 'number', min: 1 } }; exports.VALIDATION_CONSTRAINTS_INTENT = { name: { type: 'string', minLength: 2 }, version: { type: 'string', minLength: 1 }, fulfillmentActivity: { type: 'object' }, 'fulfillmentActivity.type': { type: 'string', minLength: 1 }, sampleUtterances: { isArray: true, minLength: 0, validate: ValidationFunctions_1.VALIDATION_FUNCTION_CHECK_DUPLICATES }, slots: { isArray: true } }; exports.VALIDATION_CONSTRAINTS_SLOT_TYPE = { name: { type: 'string', minLength: 2 }, version: { type: 'string', minLength: 1 }, enumerationValues: { isArray: true }, valueSelectionStrategy: { type: 'string', minLength: 1 } }; exports.VALIDATION_CONSTRAINTS_ENUMERATION_VALUE = { value: { type: 'string', minLength: 1 }, synonyms: { isArray: true, validate: ValidationFunctions_1.VALIDATION_FUNCTION_CHECK_DUPLICATES } }; exports.VALIDATION_CONSTRAINTS_STATEMENT_MESSAGE = { contentType: { type: 'string', minLength: 2 }, content: { type: 'string', minLength: 1 } };