Variables
Const CL_DEVELOPER
CL_DEVELOPER: "ConversationLearnerDeveloper" = "ConversationLearnerDeveloper"
Const DEFAULT_MAX_SESSION_LENGTH
DEFAULT_MAX_SESSION_LENGTH: number = 20 * 60 * 1000
Const MAX_BROWSER_SLOTS
MAX_BROWSER_SLOTS: 10 = 10
Const MESSAGE_TIMEOUT
MESSAGE_TIMEOUT: 10000 = 10000
Const NEGATIVE_PREFIX
NEGATIVE_PREFIX: "~" = "~"
Const UI_RUNNER_APPID
UI_RUNNER_APPID: "UIRunner_AppId" = "UIRunner_AppId"
Const apimSubscriptionIdHeader
apimSubscriptionIdHeader: "apim-subscription-id" = "apim-subscription-id"
Const apimSubscriptionKeyHeader
apimSubscriptionKeyHeader: "Ocp-Apim-Subscription-Key" = "Ocp-Apim-Subscription-Key"
Const app
app: Express = express()
Const delay
delay: __promisify__ = util.promisify(setTimeout)
Const listener
listener: Server = app.listen(port, () =>console.log(`Navigate to http://localhost:${listener.address().port}/ui to view Conversation Learner administration application.`)).on('error', (error: NodeJS.ErrnoException) => {if (error.code === 'EADDRINUSE') {console.log(`ERROR: The UI is already running or the port (${port}) is in use by another process`)return}throw error})
Const luisAuthoringKeyHeader
luisAuthoringKeyHeader: "x-luis-authoring-key" = "x-luis-authoring-key"
Const luisSubscriptionKeyHeader
luisSubscriptionKeyHeader: "x-luis-subscription-key" = "x-luis-subscription-key"
Const packageJsonPath
packageJsonPath: string = path.join(__dirname, '..', 'package.json')
Const port
port: 5053 = 5053
Const requestMethodMap
requestMethodMap: Map<"GET" | "PUT" | "POST" | "DELETE", get | post> = new Map<HTTP_METHOD, typeof Request.get | typeof Request.post>([['GET', Request.get],['PUT', Request.put],['POST', Request.post],['DELETE', Request.delete]])
Const router
router: Router = express.Router({ caseSensitive: false })
Const statusEndpoint
statusEndpoint: "https://blisstorage.blob.core.windows.net/status/status.json" = "https://blisstorage.blob.core.windows.net/status/status.json"
Const versionEndpoint
versionEndpoint: "https://blisstorage.blob.core.windows.net/version/version.json" = "https://blisstorage.blob.core.windows.net/version/version.json"
Processes messages received from the user. Called by the dialog system.