UNPKG

msbot

Version:

MSBot command line tool for manipulating Microsoft Bot Framework .bot files

28 lines 1.17 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); /** * Copyright(c) Microsoft Corporation.All rights reserved. * Licensed under the MIT License. */ const schema_1 = require("../schema"); const connectedService_1 = require("./connectedService"); const url = require("url"); class QnaMakerService extends connectedService_1.ConnectedService { constructor(source = {}) { super(source); this.type = schema_1.ServiceType.QnA; this.kbId = ''; this.subscriptionKey = ''; this.hostname = ''; this.endpointKey = ''; let { kbId = '', name = '', subscriptionKey = '', endpointKey = '', hostname = '' } = source; hostname = url.resolve(source.hostname, '/qnamaker'); Object.assign(this, { kbId, name, subscriptionKey, endpointKey, hostname }); } toJSON() { const { kbId, id, name, subscriptionKey, endpointKey, hostname } = this; return { kbId, name, type: schema_1.ServiceType.QnA, subscriptionKey, id, endpointKey, hostname }; } } exports.QnaMakerService = QnaMakerService; //# sourceMappingURL=qnaMakerService.js.map