UNPKG

express-msteams-host

Version:
22 lines 1.47 kB
"use strict"; // Copyright (c) Wictor Wilén. All rights reserved. // Licensed under the MIT license. Object.defineProperty(exports, "__esModule", { value: true }); exports.BotDeclaration = void 0; require("reflect-metadata"); /** * Decorator function for Bots * @param endpoint The endpoint to expose for the bot (typically '/api/messages') * @param storage The Storage to use for the bot (ex: new MemoryStorage()) * @param appId The App Id for the bot, string or function that returns a string * @param appPassword The app password for the bot, string or function that returns a string * @param certificatePrivateKey (Optional) Client Certificate Credential - PK, , string or function that returns a string * @param certificateThumbprint (Optional) Client Certificate Credential - TP, , string or function that returns a string * @param namespace (Optional) Namespace to be appended to storage keys, defaults to empty string */ function BotDeclaration(endpoint, storage, appId, appPassword, certificatePrivateKey, certificateThumbprint, namespace) { // tslint:disable-next-line: ban-types return function (target) { return Reflect.defineMetadata("msteams:bot", { endpoint: endpoint, storage: storage, appId: appId, appPassword: appPassword, certificatePrivateKey: certificatePrivateKey, certificateThumbprint: certificateThumbprint, namespace: namespace }, target); }; } exports.BotDeclaration = BotDeclaration; //# sourceMappingURL=BotDeclaration.js.map