@microsoft/teams-js 1.6.0-beta.9 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack://microsoftTeams/webpack/universalModuleDefinition","webpack://microsoftTeams/webpack/bootstrap","webpack://microsoftTeams/./src/internal/globalVars.ts","webpack://microsoftTeams/./src/internal/internalAPIs.ts","webpack://microsoftTeams/./src/internal/constants.ts","webpack://microsoftTeams/./src/internal/utils.ts","webpack://microsoftTeams/./src/public/publicAPIs.ts","webpack://microsoftTeams/./src/public/settings.ts","webpack://microsoftTeams/./src/private/logs.ts","webpack://microsoftTeams/./src/public/appWindow.ts","webpack://microsoftTeams/./src/index.ts","webpack://microsoftTeams/./src/private/index.ts","webpack://microsoftTeams/./src/private/bot.ts","webpack://microsoftTeams/./src/private/menus.ts","webpack://microsoftTeams/./src/private/privateAPIs.ts","webpack://microsoftTeams/./src/private/conversations.ts","webpack://microsoftTeams/./src/public/index.ts","webpack://microsoftTeams/./src/public/appInitialization.ts","webpack://microsoftTeams/./src/public/authentication.ts","webpack://microsoftTeams/./src/public/tasks.ts"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kDAA0C,gCAAgC;AAC1E;AACA;;AAEA;AACA;AACA;AACA,gEAAwD,kBAAkB;AAC1E;AACA,yDAAiD,cAAc;AAC/D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAyC,iCAAiC;AAC1E,wHAAgH,mBAAmB,EAAE;AACrI;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE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AC,IAAI,CAAC,CAAC;QAE7D,6GAA6G;QAC7G,iCAAkB,CAAC,uBAAU,CAAC,YAAY,EAAE,oBAAoB,EAAE;YAChE,MAAM;YACN,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;SAC1C,CAAC,CAAC;IACL,CAAC;IARe,gBAAU,aAQzB;AACH,CAAC,EA3CgB,KAAK,GAAL,aAAK,KAAL,aAAK,QA2CrB","file":"MicrosoftTeams.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"microsoftTeams\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"microsoftTeams\"] = factory();\n\telse\n\t\troot[\"microsoftTeams\"] = factory();\n})(window, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 8);\n","import { MessageRequest } from './interfaces';\r\nimport { ConversationResponse, LoadContext } from '../public/interfaces';\r\nexport class GlobalVars {\r\n public static initializeCalled: boolean = false;\r\n public static initializeCompleted: boolean = false;\r\n public static initializeCallbacks: { (): void }[] = [];\r\n public static currentWindow: Window | any;\r\n public static parentWindow: Window | any;\r\n public static isFramelessWindow: boolean = false;\r\n public static parentOrigin: string;\r\n public static frameContext: string;\r\n public static childWindow: Window;\r\n public static childOrigin: string;\r\n public static parentMessageQueue: MessageRequest[] = [];\r\n public static childMessageQueue: MessageRequest[] = [];\r\n public static nextMessageId: number = 0;\r\n public static handlers: {\r\n [func: string]: Function;\r\n } = {};\r\n public static callbacks: {\r\n [id: number]: Function;\r\n } = {};\r\n public static hostClientType: string;\r\n public static printCapabilityEnabled: boolean = false;\r\n public static themeChangeHandler: (theme: string) => void;\r\n public static fullScreenChangeHandler: (isFullScreen: boolean) => void;\r\n public static backButtonPressHandler: () => boolean;\r\n public static loadHandler: (context: LoadContext) => void;\r\n public static beforeUnloadHandler: (readyToUnload: () => void) => boolean;\r\n public static changeSettingsHandler: () => void;\r\n public static onStartConversationHandler: (conversationResponse: ConversationResponse) => void;\r\n public static onCloseConversationHandler: (conversationResponse: ConversationResponse) => void;\r\n public static getLogHandler: () => string;\r\n}\r\n","import { navigateBack } from '../public/publicAPIs';\r\nimport { LoadContext } from '../public/interfaces';\r\nimport { validOriginRegExp } from './constants';\r\nimport { GlobalVars } from './globalVars';\r\nimport { MessageResponse, MessageRequest, ExtendedWindow, MessageEvent } from './interfaces';\r\n\r\n// ::::::::::::::::::::MicrosoftTeams SDK Internal :::::::::::::::::\r\nGlobalVars.handlers['themeChange'] = handleThemeChange;\r\nGlobalVars.handlers['fullScreenChange'] = handleFullScreenChange;\r\nGlobalVars.handlers['backButtonPress'] = handleBackButtonPress;\r\nGlobalVars.handlers['load'] = handleLoad;\r\nGlobalVars.handlers['beforeUnload'] = handleBeforeUnload;\r\nGlobalVars.handlers['changeSettings'] = handleChangeSettings;\r\nGlobalVars.handlers['startConversation'] = handleStartConversation;\r\nGlobalVars.handlers['closeConversation'] = handleCloseConversation;\r\n\r\nfunction handleStartConversation(\r\n subEntityId: string,\r\n conversationId: string,\r\n channelId: string,\r\n entityId: string,\r\n): void {\r\n if (GlobalVars.onStartConversationHandler) {\r\n GlobalVars.onStartConversationHandler({\r\n subEntityId: subEntityId,\r\n conversationId: conversationId,\r\n channelId: channelId,\r\n entityId: entityId,\r\n });\r\n }\r\n}\r\n\r\nfunction handleCloseConversation(\r\n subEntityId: string,\r\n conversationId?: string,\r\n channelId?: string,\r\n entityId?: string,\r\n): void {\r\n if (GlobalVars.onCloseConversationHandler) {\r\n GlobalVars.onCloseConversationHandler({\r\n subEntityId: subEntityId,\r\n conversationId: conversationId,\r\n channelId: channelId,\r\n entityId: entityId,\r\n });\r\n }\r\n}\r\n\r\nfunction handleThemeChange(theme: string): void {\r\n if (GlobalVars.themeChangeHandler) {\r\n GlobalVars.themeChangeHandler(theme);\r\n }\r\n\r\n if (GlobalVars.childWindow) {\r\n sendMessageRequest(GlobalVars.childWindow, 'themeChange', [theme]);\r\n }\r\n}\r\n\r\nfunction handleFullScreenChange(isFullScreen: boolean): void {\r\n if (GlobalVars.fullScreenChangeHandler) {\r\n GlobalVars.fullScreenChangeHandler(isFullScreen);\r\n }\r\n}\r\n\r\nfunction handleBackButtonPress(): void {\r\n if (!GlobalVars.backButtonPressHandler || !GlobalVars.backButtonPressHandler()) {\r\n navigateBack();\r\n }\r\n}\r\n\r\nfunction handleLoad(context: LoadContext): void {\r\n if (GlobalVars.loadHandler) {\r\n GlobalVars.loadHandler(context);\r\n }\r\n\r\n if (GlobalVars.childWindow) {\r\n sendMessageRequest(GlobalVars.childWindow, 'load', [context]);\r\n }\r\n}\r\n\r\nfunction handleBeforeUnload(): void {\r\n const readyToUnload = (): void => {\r\n sendMessageRequest(GlobalVars.parentWindow, 'readyToUnload', []);\r\n };\r\n\r\n if (!GlobalVars.beforeUnloadHandler || !GlobalVars.beforeUnloadHandler(readyToUnload)) {\r\n readyToUnload();\r\n }\r\n}\r\n\r\nfunction handleChangeSettings(): void {\r\n if (GlobalVars.changeSettingsHandler) {\r\n GlobalVars.changeSettingsHandler();\r\n }\r\n}\r\n\r\nexport function ensureInitialized(...expectedFrameContexts: string[]): void {\r\n if (!GlobalVars.initializeCalled) {\r\n throw new Error('The library has not yet been initialized');\r\n }\r\n\r\n if (GlobalVars.frameContext && expectedFrameContexts && expectedFrameContexts.length > 0) {\r\n let found = false;\r\n for (let i = 0; i < expectedFrameContexts.length; i++) {\r\n if (expectedFrameContexts[i] === GlobalVars.frameContext) {\r\n found = true;\r\n break;\r\n }\r\n }\r\n\r\n if (!found) {\r\n throw new Error(\"This call is not allowed in the '\" + GlobalVars.frameContext + \"' context\");\r\n }\r\n }\r\n}\r\n\r\nexport function processMessage(evt: MessageEvent): void {\r\n // Process only if we received a valid message\r\n if (!evt || !evt.data || typeof evt.data !== 'object') {\r\n return;\r\n }\r\n\r\n // Process only if the message is coming from a different window and a valid origin\r\n const messageSource = evt.source || evt.originalEvent.source;\r\n const messageOrigin = evt.origin || evt.originalEvent.origin;\r\n if (\r\n messageSource === GlobalVars.currentWindow ||\r\n (messageOrigin !== GlobalVars.currentWindow.location.origin && !validOriginRegExp.test(messageOrigin.toLowerCase()))\r\n ) {\r\n return;\r\n }\r\n\r\n // Update our parent and child relationships based on this message\r\n updateRelationships(messageSource, messageOrigin);\r\n\r\n // Handle the message\r\n if (messageSource === GlobalVars.parentWindow) {\r\n handleParentMessage(evt);\r\n } else if (messageSource === GlobalVars.childWindow) {\r\n handleChildMessage(evt);\r\n }\r\n}\r\n\r\nfunction updateRelationships(messageSource: Window, messageOrigin: string): void {\r\n // Determine whether the source of the message is our parent or child and update our\r\n // window and origin pointer accordingly\r\n if (!GlobalVars.parentWindow || messageSource === GlobalVars.parentWindow) {\r\n GlobalVars.parentWindow = messageSource;\r\n GlobalVars.parentOrigin = messageOrigin;\r\n } else if (!GlobalVars.childWindow || messageSource === GlobalVars.childWindow) {\r\n GlobalVars.childWindow = messageSource;\r\n GlobalVars.childOrigin = messageOrigin;\r\n }\r\n\r\n // Clean up pointers to closed parent and child windows\r\n if (GlobalVars.parentWindow && GlobalVars.parentWindow.closed) {\r\n GlobalVars.parentWindow = null;\r\n GlobalVars.parentOrigin = null;\r\n }\r\n if (GlobalVars.childWindow && GlobalVars.childWindow.closed) {\r\n GlobalVars.childWindow = null;\r\n GlobalVars.childOrigin = null;\r\n }\r\n\r\n // If we have any messages in our queue, send them now\r\n flushMessageQueue(GlobalVars.parentWindow);\r\n flushMessageQueue(GlobalVars.childWindow);\r\n}\r\n\r\nexport function handleParentMessage(evt: MessageEvent): void {\r\n if ('id' in evt.data) {\r\n // Call any associated GlobalVars.callbacks\r\n const message = evt.data as MessageResponse;\r\n const callback = GlobalVars.callbacks[message.id];\r\n if (callback) {\r\n callback.apply(null, message.args);\r\n\r\n // Remove the callback to ensure that the callback is called only once and to free up memory.\r\n delete GlobalVars.callbacks[message.id];\r\n }\r\n } else if ('func' in evt.data) {\r\n // Delegate the request to the proper handler\r\n const message = evt.data as MessageRequest;\r\n const handler = GlobalVars.handlers[message.func];\r\n if (handler) {\r\n // We don't expect any handler to respond at this point\r\n handler.apply(this, message.args);\r\n }\r\n }\r\n}\r\n\r\nfunction handleChildMessage(evt: MessageEvent): void {\r\n if ('id' in evt.data && 'func' in evt.data) {\r\n // Try to delegate the request to the proper handler\r\n const message = evt.data as MessageRequest;\r\n const handler = GlobalVars.handlers[message.func];\r\n if (handler) {\r\n const result = handler.apply(this, message.args);\r\n if (result) {\r\n sendMessageResponse(GlobalVars.childWindow, message.id, Array.isArray(result) ? result : [result]);\r\n }\r\n } else {\r\n // Proxy to parent\r\n const messageId = sendMessageRequest(GlobalVars.parentWindow, message.func, message.args);\r\n\r\n // tslint:disable-next-line:no-any\r\n GlobalVars.callbacks[messageId] = (...args: any[]): void => {\r\n if (GlobalVars.childWindow) {\r\n sendMessageResponse(GlobalVars.childWindow, message.id, args);\r\n }\r\n };\r\n }\r\n }\r\n}\r\n\r\nfunction getTargetMessageQueue(targetWindow: Window): MessageRequest[] {\r\n return targetWindow === GlobalVars.parentWindow\r\n ? GlobalVars.parentMessageQueue\r\n : targetWindow === GlobalVars.childWindow\r\n ? GlobalVars.childMessageQueue\r\n : [];\r\n}\r\n\r\nfunction getTargetOrigin(targetWindow: Window): string {\r\n return targetWindow === GlobalVars.parentWindow\r\n ? GlobalVars.parentOrigin\r\n : targetWindow === GlobalVars.childWindow\r\n ? GlobalVars.childOrigin\r\n : null;\r\n}\r\n\r\nfunction flushMessageQueue(targetWindow: Window | any): void {\r\n const targetOrigin = getTargetOrigin(targetWindow);\r\n const targetMessageQueue = getTargetMessageQueue(targetWindow);\r\n while (targetWindow && targetOrigin && targetMessageQueue.length > 0) {\r\n targetWindow.postMessage(targetMessageQueue.shift(), targetOrigin);\r\n }\r\n}\r\n\r\nexport function waitForMessageQueue(targetWindow: Window, callback: () => void): void {\r\n const messageQueueMonitor = GlobalVars.currentWindow.setInterval(() => {\r\n if (getTargetMessageQueue(targetWindow).length === 0) {\r\n clearInterval(messageQueueMonitor);\r\n callback();\r\n }\r\n }, 100);\r\n}\r\n\r\nexport function sendMessageRequest(\r\n targetWindow: Window | any,\r\n actionName: string,\r\n // tslint:disable-next-line: no-any\r\n args?: any[],\r\n): number {\r\n const request = createMessageRequest(actionName, args);\r\n if (GlobalVars.isFramelessWindow) {\r\n if (GlobalVars.currentWindow && GlobalVars.currentWindow.nativeInterface) {\r\n (GlobalVars.currentWindow as ExtendedWindow).nativeInterface.framelessPostMessage(JSON.stringify(request));\r\n }\r\n } else {\r\n const targetOrigin = getTargetOrigin(targetWindow);\r\n\r\n // If the target window isn't closed and we already know its origin, send the message right away; otherwise,\r\n // queue the message and send it after the origin is established\r\n if (targetWindow && targetOrigin) {\r\n targetWindow.postMessage(request, targetOrigin);\r\n } else {\r\n getTargetMessageQueue(targetWindow).push(request);\r\n }\r\n }\r\n return request.id;\r\n}\r\n\r\nfunction sendMessageResponse(\r\n targetWindow: Window | any,\r\n id: number,\r\n // tslint:disable-next-line:no-any\r\n args?: any[],\r\n): void {\r\n const response = createMessageResponse(id, args);\r\n const targetOrigin = getTargetOrigin(targetWindow);\r\n if (targetWindow && targetOrigin) {\r\n targetWindow.postMessage(response, targetOrigin);\r\n }\r\n}\r\n\r\n// tslint:disable-next-line:no-any\r\nfunction createMessageRequest(func: string, args: any[]): MessageRequest {\r\n return {\r\n id: GlobalVars.nextMessageId++,\r\n func: func,\r\n args: args || [],\r\n };\r\n}\r\n\r\n// tslint:disable-next-line:no-any\r\nfunction createMessageResponse(id: number, args: any[]): MessageResponse {\r\n return {\r\n id: id,\r\n args: args || [],\r\n };\r\n}\r\n","import { generateRegExpFromUrls } from './utils';\r\n\r\nexport const version = '1.4.1';\r\n\r\nexport const validOrigins = [\r\n 'https://teams.microsoft.com',\r\n 'https://teams.microsoft.us',\r\n 'https://gov.teams.microsoft.us',\r\n 'https://dod.teams.microsoft.us',\r\n 'https://int.teams.microsoft.com',\r\n 'https://devspaces.skype.com',\r\n 'https://ssauth.skype.com',\r\n 'http://dev.local', // local development\r\n 'http://dev.local:8080', // local development\r\n 'https://msft.spoppe.com',\r\n 'https://*.sharepoint.com',\r\n 'https://*.sharepoint-df.com',\r\n 'https://*.sharepointonline.com',\r\n 'https://outlook.office.com',\r\n 'https://outlook-sdf.office.com',\r\n];\r\n\r\n// Ensure these declarations stay in sync with the framework.\r\nexport const frameContexts = {\r\n settings: 'settings',\r\n content: 'content',\r\n authentication: 'authentication',\r\n remove: 'remove',\r\n task: 'task',\r\n};\r\n\r\nexport const validOriginRegExp = generateRegExpFromUrls(validOrigins);\r\n","// This will return a reg expression a given url\r\nfunction generateRegExpFromUrl(url: string): string {\r\n let urlRegExpPart = '^';\r\n const urlParts = url.split('.');\r\n for (let j = 0; j < urlParts.length; j++) {\r\n urlRegExpPart += (j > 0 ? '[.]' : '') + urlParts[j].replace('*', '[^/^.]+');\r\n }\r\n urlRegExpPart += '$';\r\n return urlRegExpPart;\r\n}\r\n\r\n// This will return a reg expression for list of url\r\nexport function generateRegExpFromUrls(urls: string[]): RegExp {\r\n let urlRegExp = '';\r\n for (let i = 0; i < urls.length; i++) {\r\n urlRegExp += (i === 0 ? '' : '|') + generateRegExpFromUrl(urls[i]);\r\n }\r\n return new RegExp(urlRegExp);\r\n}\r\n\r\nexport function getGenericOnCompleteHandler(errorMessage?: string): (success: boolean, reason?: string) => void {\r\n return (success: boolean, reason: string): void => {\r\n if (!success) {\r\n throw new Error(errorMessage ? errorMessage : reason);\r\n }\r\n };\r\n}\r\n","import { processMessage, ensureInitialized, sendMessageRequest, handleParentMessage } from '../internal/internalAPIs';\r\nimport { GlobalVars } from '../internal/globalVars';\r\nimport { version, frameContexts } from '../internal/constants';\r\nimport { ExtendedWindow, MessageEvent } from '../internal/interfaces';\r\nimport { settings } from './settings';\r\nimport {\r\n TabInformation,\r\n TabInstanceParameters,\r\n TabInstance,\r\n DeepLinkParameters,\r\n Context,\r\n LoadContext,\r\n} from './interfaces';\r\nimport { getGenericOnCompleteHandler } from '../internal/utils';\r\nimport { logs } from '../private/logs';\r\n\r\n// ::::::::::::::::::::::: MicrosoftTeams SDK public API ::::::::::::::::::::\r\n/**\r\n * Initializes the library. This must be called before any other SDK calls\r\n * but after the frame is loaded successfully.\r\n */\r\nexport function initialize(callback?: () => void): void {\r\n // Independent components might not know whether the SDK is initialized so might call it to be safe.\r\n // Just no-op if that happens to make it easier to use.\r\n if (!GlobalVars.initializeCalled) {\r\n GlobalVars.initializeCalled = true;\r\n\r\n // Listen for messages post to our window\r\n const messageListener = (evt: MessageEvent): void => processMessage(evt);\r\n\r\n // If we are in an iframe, our parent window is the one hosting us (i.e., window.parent); otherwise,\r\n // it's the window that opened us (i.e., window.opener)\r\n GlobalVars.currentWindow = GlobalVars.currentWindow || window;\r\n GlobalVars.parentWindow =\r\n GlobalVars.currentWindow.parent !== GlobalVars.currentWindow.self\r\n ? GlobalVars.currentWindow.parent\r\n : GlobalVars.currentWindow.opener;\r\n\r\n if (!GlobalVars.parentWindow) {\r\n GlobalVars.isFramelessWindow = true;\r\n (window as ExtendedWindow).onNativeMessage = handleParentMessage;\r\n } else {\r\n // For iFrame scenario, add listener to listen 'message'\r\n GlobalVars.currentWindow.addEventListener('message', messageListener, false);\r\n }\r\n\r\n try {\r\n // Send the initialized message to any origin, because at this point we most likely don't know the origin\r\n // of the parent window, and this message contains no data that could pose a security risk.\r\n GlobalVars.parentOrigin = '*';\r\n const messageId = sendMessageRequest(GlobalVars.parentWindow, 'initialize', [version]);\r\n GlobalVars.callbacks[messageId] = (context: string, clientType: string) => {\r\n GlobalVars.frameContext = context;\r\n GlobalVars.hostClientType = clientType;\r\n\r\n // Notify all waiting callers that the initialization has completed\r\n GlobalVars.initializeCallbacks.forEach(initCallback => initCallback());\r\n GlobalVars.initializeCallbacks = [];\r\n GlobalVars.initializeCompleted = true;\r\n };\r\n } finally {\r\n GlobalVars.parentOrigin = null;\r\n }\r\n\r\n // Undocumented function used to clear state between unit tests\r\n this._uninitialize = () => {\r\n if (GlobalVars.frameContext) {\r\n registerOnThemeChangeHandler(null);\r\n registerFullScreenHandler(null);\r\n registerBackButtonHandler(null);\r\n registerBeforeUnloadHandler(null);\r\n registerOnLoadHandler(null);\r\n logs.registerGetLogHandler(null);\r\n }\r\n\r\n if (GlobalVars.frameContext === frameContexts.settings) {\r\n settings.registerOnSaveHandler(null);\r\n }\r\n\r\n if (GlobalVars.frameContext === frameContexts.remove) {\r\n settings.registerOnRemoveHandler(null);\r\n }\r\n\r\n if (!GlobalVars.isFramelessWindow) {\r\n GlobalVars.currentWindow.removeEventListener('message', messageListener, false);\r\n }\r\n\r\n GlobalVars.initializeCalled = false;\r\n GlobalVars.initializeCompleted = false;\r\n GlobalVars.initializeCallbacks = [];\r\n GlobalVars.parentWindow = null;\r\n GlobalVars.parentOrigin = null;\r\n GlobalVars.parentMessageQueue = [];\r\n GlobalVars.childWindow = null;\r\n GlobalVars.childOrigin = null;\r\n GlobalVars.childMessageQueue = [];\r\n GlobalVars.nextMessageId = 0;\r\n GlobalVars.callbacks = {};\r\n GlobalVars.frameContext = null;\r\n GlobalVars.hostClientType = null;\r\n GlobalVars.isFramelessWindow = false;\r\n };\r\n }\r\n\r\n // Handle the callback if specified:\r\n // 1. If initialization has already completed then just call it right away\r\n // 2. If initialization hasn't completed then add it to the array of callbacks\r\n // that should be invoked once initialization does complete\r\n if (callback) {\r\n GlobalVars.initializeCompleted ? callback() : GlobalVars.initializeCallbacks.push(callback);\r\n }\r\n}\r\n\r\n/**\r\n * @private\r\n * Hide from docs.\r\n * ------\r\n * Undocumented function used to set a mock window for unit tests\r\n */\r\nexport function _initialize(hostWindow: any): void {\r\n GlobalVars.currentWindow = hostWindow;\r\n}\r\n\r\n/**\r\n * @private\r\n * Hide from docs.\r\n * ------\r\n * Undocumented function used to clear state between unit tests\r\n */\r\nexport function _uninitialize(): void {}\r\n\r\n/**\r\n * Enable print capability to support printing page using Ctrl+P and cmd+P\r\n */\r\nexport function enablePrintCapability(): void {\r\n if (!GlobalVars.printCapabilityEnabled) {\r\n GlobalVars.printCapabilityEnabled = true;\r\n ensureInitialized();\r\n // adding ctrl+P and cmd+P handler\r\n document.addEventListener('keydown', (event: KeyboardEvent) => {\r\n if ((event.ctrlKey || event.metaKey) && event.keyCode === 80) {\r\n print();\r\n event.cancelBubble = true;\r\n event.preventDefault();\r\n event.stopImmediatePropagation();\r\n }\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * default print handler\r\n */\r\nexport function print(): void {\r\n window.print();\r\n}\r\n\r\n/**\r\n * Retrieves the current context the frame is running in.\r\n * @param callback The callback to invoke when the {@link Context} object is retrieved.\r\n */\r\nexport function getContext(callback: (context: Context) => void): void {\r\n ensureInitialized();\r\n\r\n const messageId = sendMessageRequest(GlobalVars.parentWindow, 'getContext');\r\n GlobalVars.callbacks[messageId] = callback;\r\n}\r\n\r\n/**\r\n * Registers a handler for theme changes.\r\n * Only one handler can be registered at a time. A subsequent registration replaces an existing registration.\r\n * @param handler The handler to invoke when the user changes their theme.\r\n */\r\nexport function registerOnThemeChangeHandler(handler: (theme: string) => void): void {\r\n ensureInitialized();\r\n GlobalVars.themeChangeHandler = handler;\r\n handler && sendMessageRequest(GlobalVars.parentWindow, 'registerHandler', ['themeChange']);\r\n}\r\n\r\n/**\r\n * Registers a handler for changes from or to full-screen view for a tab.\r\n * Only one handler can be registered at a time. A subsequent registration replaces an existing registration.\r\n * @param handler The handler to invoke when the user toggles full-screen view for a tab.\r\n */\r\nexport function registerFullScreenHandler(handler: (isFullScreen: boolean) => void): void {\r\n ensureInitialized();\r\n\r\n GlobalVars.fullScreenChangeHandler = handler;\r\n handler && sendMessageRequest(GlobalVars.parentWindow, 'registerHandler', ['fullScreen']);\r\n}\r\n\r\n/**\r\n * Registers a handler for user presses of the Team client's back button. Experiences that maintain an internal\r\n * navigation stack should use this handler to navigate the user back within their frame. If an app finds\r\n * that after running its back button handler it cannot handle the event it should call the navigateBack\r\n * method to ask the Teams client to handle it instead.\r\n * @param handler The handler to invoke when the user presses their Team client's back button.\r\n */\r\nexport function registerBackButtonHandler(handler: () => boolean): void {\r\n ensureInitialized();\r\n\r\n GlobalVars.backButtonPressHandler = handler;\r\n handler && sendMessageRequest(GlobalVars.parentWindow, 'registerHandler', ['backButton']);\r\n}\r\n\r\n/**\r\n * Navigates back in the Teams client. See registerBackButtonHandler for more information on when\r\n * it's appropriate to use this method.\r\n */\r\nexport function navigateBack(onComplete?: (status: boolean, reason?: string) => void): void {\r\n ensureInitialized();\r\n\r\n const messageId = sendMessageRequest(GlobalVars.parentWindow, 'navigateBack', []);\r\n const errorMessage = 'Back navigation is not supported in the current client or context.';\r\n GlobalVars.callbacks[messageId] = onComplete ? onComplete : getGenericOnCompleteHandler(errorMessage);\r\n}\r\n\r\n/**\r\n * @private\r\n * Registers a handler to be called when the page has been requested to load.\r\n * @param handler The handler to invoke when the page is loaded.\r\n */\r\nexport function registerOnLoadHandler(handler: (context: LoadContext) => void): void {\r\n ensureInitialized();\r\n\r\n GlobalVars.loadHandler = handler;\r\n handler && sendMessageRequest(GlobalVars.parentWindow, 'registerHandler', ['load']);\r\n}\r\n\r\n/**\r\n * @private\r\n * Registers a handler to be called before the page is unloaded.\r\n * @param handler The handler to invoke before the page is unloaded. If this handler returns true the page should\r\n * invoke the readyToUnload function provided to it once it's ready to be unloaded.\r\n */\r\nexport function registerBeforeUnloadHandler(handler: (readyToUnload: () => void) => boolean): void {\r\n ensureInitialized();\r\n\r\n GlobalVars.beforeUnloadHandler = handler;\r\n handler && sendMessageRequest(GlobalVars.parentWindow, 'registerHandler', ['beforeUnload']);\r\n}\r\n\r\n/**\r\n * Registers a handler for when the user reconfigurated tab\r\n * @param handler The handler to invoke when the user click on Settings.\r\n */\r\nexport function registerChangeSettingsHandler(handler: () => void): void {\r\n ensureInitialized(frameContexts.content);\r\n\r\n GlobalVars.changeSettingsHandler = handler;\r\n handler && sendMessageRequest(GlobalVars.parentWindow, 'registerHandler', ['changeSettings']);\r\n}\r\n\r\n/**\r\n * Navigates the frame to a new cross-domain URL. The domain of this URL must match at least one of the\r\n * valid domains specified in the validDomains block of the manifest; otherwise, an exception will be\r\n * thrown. This function needs to be used only when navigating the frame to a URL in a different domain\r\n * than the current one in a way that keeps the app informed of the change and allows the SDK to\r\n * continue working.\r\n * @param url The URL to navigate the frame to.\r\n */\r\nexport function navigateCrossDomain(url: string, onComplete?: (status: boolean, reason?: string) => void): void {\r\n ensureInitialized(frameContexts.content, frameContexts.settings, frameContexts.remove, frameContexts.task);\r\n\r\n const messageId = sendMessageRequest(GlobalVars.parentWindow, 'navigateCrossDomain', [url]);\r\n const errorMessage =\r\n 'Cross-origin navigation is only supported for URLs matching the pattern registered in the manifest.';\r\n GlobalVars.callbacks[messageId] = onComplete ? onComplete : getGenericOnCompleteHandler(errorMessage);\r\n}\r\n\r\n/**\r\n * Allows an app to retrieve for this user tabs that are owned by this app.\r\n * If no TabInstanceParameters are passed, the app defaults to favorite teams and favorite channels.\r\n * @param callback The callback to invoke when the {@link TabInstanceParameters} object is retrieved.\r\n * @param tabInstanceParameters OPTIONAL Flags that specify whether to scope call to favorite teams or channels.\r\n */\r\nexport function getTabInstances(\r\n callback: (tabInfo: TabInformation) => void,\r\n tabInstanceParameters?: TabInstanceParameters,\r\n): void {\r\n ensureInitialized();\r\n\r\n const messageId = sendMessageRequest(GlobalVars.parentWindow, 'getTabInstances', [tabInstanceParameters]);\r\n GlobalVars.callbacks[messageId] = callback;\r\n}\r\n\r\n/**\r\n * Allows an app to retrieve the most recently used tabs for this user.\r\n * @param callback The callback to invoke when the {@link TabInformation} object is retrieved.\r\n * @param tabInstanceParameters OPTIONAL Ignored, kept for future use\r\n */\r\nexport function getMruTabInstances(\r\n callback: (tabInfo: TabInformation) => void,\r\n tabInstanceParameters?: TabInstanceParameters,\r\n): void {\r\n ensureInitialized();\r\n\r\n const messageId = sendMessageRequest(GlobalVars.parentWindow, 'getMruTabInstances', [tabInstanceParameters]);\r\n GlobalVars.callbacks[messageId] = callback;\r\n}\r\n\r\n/**\r\n * Shares a deep link that a user can use to navigate back to a specific state in this page.\r\n * @param deepLinkParameters ID and label for the link and fallback URL.\r\n */\r\nexport function shareDeepLink(deepLinkParameters: DeepLinkParameters): void {\r\n ensureInitialized(frameContexts.content);\r\n\r\n sendMessageRequest(GlobalVars.parentWindow, 'shareDeepLink', [\r\n deepLinkParameters.subEntityId,\r\n deepLinkParameters.subEntityLabel,\r\n deepLinkParameters.subEntityWebUrl,\r\n ]);\r\n}\r\n\r\n/**\r\n * execute deep link API.\r\n * @param deepLink deep link.\r\n */\r\nexport function executeDeepLink(deepLink: string, onComplete?: (status: boolean, reason?: string) => void): void {\r\n ensureInitialized(frameContexts.content, frameContexts.task);\r\n const messageId = sendMessageRequest(GlobalVars.parentWindow, 'executeDeepLink', [deepLink]);\r\n GlobalVars.callbacks[messageId] = onComplete ? onComplete : getGenericOnCompleteHandler();\r\n}\r\n\r\n/**\r\n * Navigates the Microsoft Teams app to the specified tab instance.\r\n * @param tabInstance The tab instance to navigate to.\r\n */\r\nexport function navigateToTab(tabInstance: TabInstance, onComplete?: (status: boolean, reason?: string) => void): void {\r\n ensureInitialized();\r\n\r\n const messageId = sendMessageRequest(GlobalVars.parentWindow, 'navigateToTab', [tabInstance]);\r\n\r\n const errorMessage = 'Invalid internalTabInstanceId and/or channelId were/was provided';\r\n GlobalVars.callbacks[messageId] = onComplete ? onComplete : getGenericOnCompleteHandler(errorMessage);\r\n}\r\n","import { ensureInitialized, sendMessageRequest } from '../internal/internalAPIs';\r\nimport { GlobalVars } from '../internal/globalVars';\r\nimport { frameContexts } from '../internal/constants';\r\nimport { getGenericOnCompleteHandler } from '../internal/utils';\r\n\r\n/**\r\n * Namespace to interact with the settings-specific part of the SDK.\r\n * This object is usable only on the settings frame.\r\n */\r\nexport namespace settings {\r\n let saveHandler: (evt: SaveEvent) => void;\r\n let removeHandler: (evt: RemoveEvent) => void;\r\n GlobalVars.handlers['settings.save'] = handleSave;\r\n GlobalVars.handlers['settings.remove'] = handleRemove;\r\n\r\n /**\r\n * Sets the validity state for the settings.\r\n * The initial value is false, so the user cannot save the settings until this is called with true.\r\n * @param validityState Indicates whether the save or remove button is enabled for the user.\r\n */\r\n export function setValidityState(validityState: boolean): void {\r\n ensureInitialized(frameContexts.settings, frameContexts.remove);\r\n sendMessageRequest(GlobalVars.parentWindow, 'settings.setValidityState', [validityState]);\r\n }\r\n\r\n /**\r\n * Gets the settings for the current instance.\r\n * @param callback The callback to invoke when the {@link Settings} object is retrieved.\r\n */\r\n export function getSettings(callback: (instanceSettings: Settings) => void): void {\r\n ensureInitialized(frameContexts.content, frameContexts.settings, frameContexts.remove);\r\n const messageId = sendMessageRequest(GlobalVars.parentWindow, 'settings.getSettings');\r\n GlobalVars.callbacks[messageId] = callback;\r\n }\r\n\r\n /**\r\n * Sets the settings for the current instance.\r\n * This is an asynchronous operation; calls to getSettings are not guaranteed to reflect the changed state.\r\n * @param settings The desired settings for this instance.\r\n */\r\n export function setSettings(\r\n instanceSettings: Settings,\r\n onComplete?: (status: boolean, reason?: string) => void,\r\n ): void {\r\n ensureInitialized(frameContexts.content, frameContexts.settings);\r\n const messageId = sendMessageRequest(GlobalVars.parentWindow, 'settings.setSettings', [instanceSettings]);\r\n GlobalVars.callbacks[messageId] = onComplete ? onComplete : getGenericOnCompleteHandler();\r\n }\r\n\r\n /**\r\n * Registers a handler for when the user attempts to save the settings. This handler should be used\r\n * to create or update the underlying resource powering the content.\r\n * The object passed to the handler must be used to notify whether to proceed with the save.\r\n * Only one handler can be registered at a time. A subsequent registration replaces an existing registration.\r\n * @param handler The handler to invoke when the user selects the save button.\r\n */\r\n export function registerOnSaveHandler(handler: (evt: SaveEvent) => void): void {\r\n ensureInitialized(frameContexts.settings);\r\n saveHandler = handler;\r\n handler && sendMessageRequest(GlobalVars.parentWindow, 'registerHandler', ['save']);\r\n }\r\n\r\n /**\r\n * Registers a handler for user attempts to remove content. This handler should be used\r\n * to remove the underlying resource powering the content.\r\n * The object passed to the handler must be used to indicate whether to proceed with the removal.\r\n * Only one handler may be registered at a time. Subsequent registrations will override the first.\r\n * @param handler The handler to invoke when the user selects the remove button.\r\n */\r\n export function registerOnRemoveHandler(handler: (evt: RemoveEvent) => void): void {\r\n ensureInitialized(frameContexts.remove);\r\n removeHandler = handler;\r\n handler && sendMessageRequest(GlobalVars.parentWindow, 'registerHandler', ['remove']);\r\n }\r\n\r\n function handleSave(result?: SaveParameters): void {\r\n const saveEvent = new SaveEventImpl(result);\r\n if (saveHandler) {\r\n saveHandler(saveEvent);\r\n } else {\r\n // If no handler is registered, we assume success.\r\n saveEvent.notifySuccess();\r\n }\r\n }\r\n\r\n export interface Settings {\r\n /**\r\n * A suggested display name for the new content.\r\n * In the settings for an existing instance being updated, this call has no effect.\r\n */\r\n suggestedDisplayName?: string;\r\n /**\r\n * Sets the URL to use for the content of this instance.\r\n */\r\n contentUrl: string;\r\n /**\r\n * Sets the URL for the removal configuration experience.\r\n */\r\n removeUrl?: string;\r\n /**\r\n * Sets the URL to use for the external link to view the underlying resource in a browser.\r\n */\r\n websiteUrl?: string;\r\n /**\r\n * The developer-defined unique ID for the entity to which this content points.\r\n */\r\n entityId: string;\r\n }\r\n\r\n export interface SaveEvent {\r\n /**\r\n * Object containing properties passed as arguments to the settings.save event.\r\n */\r\n result: SaveParameters;\r\n /**\r\n * Indicates that the underlying resource has been created and the settings can be saved.\r\n */\r\n notifySuccess(): void;\r\n /**\r\n * Indicates that creation of the underlying resource failed and that the settings cannot be saved.\r\n * @param reason Specifies a reason for the failure. If provided, this string is displayed to the user; otherwise a generic error is displayed.\r\n */\r\n notifyFailure(reason?: string): void;\r\n }\r\n\r\n export interface RemoveEvent {\r\n /**\r\n * Indicates that the underlying resource has been removed and the content can be removed.\r\n */\r\n notifySuccess(): void;\r\n /**\r\n * Indicates that removal of the underlying resource failed and that the content cannot be removed.\r\n * @param reason Specifies a reason for the failure. If provided, this string is displayed to the user; otherwise a generic error is displayed.\r\n */\r\n notifyFailure(reason?: string): void;\r\n }\r\n\r\n export interface SaveParameters {\r\n /**\r\n * Connector's webhook Url returned as arguments to settings.save event as part of user clicking on Save\r\n */\r\n webhookUrl?: string;\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs, since this class is not directly used.\r\n */\r\n class SaveEventImpl implements SaveEvent {\r\n public notified: boolean = false;\r\n public result: SaveParameters;\r\n public constructor(result?: SaveParameters) {\r\n this.result = result ? result : {};\r\n }\r\n public notifySuccess(): void {\r\n this.ensureNotNotified();\r\n sendMessageRequest(GlobalVars.parentWindow, 'settings.save.success');\r\n this.notified = true;\r\n }\r\n public notifyFailure(reason?: string): void {\r\n this.ensureNotNotified();\r\n sendMessageRequest(GlobalVars.parentWindow, 'settings.save.failure', [reason]);\r\n this.notified = true;\r\n }\r\n private ensureNotNotified(): void {\r\n if (this.notified) {\r\n throw new Error('The SaveEvent may only notify success or failure once.');\r\n }\r\n }\r\n }\r\n\r\n function handleRemove(): void {\r\n const removeEvent = new RemoveEventImpl();\r\n if (removeHandler) {\r\n removeHandler(removeEvent);\r\n } else {\r\n // If no handler is registered, we assume success.\r\n removeEvent.notifySuccess();\r\n }\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs, since this class is not directly used.\r\n */\r\n class RemoveEventImpl implements RemoveEvent {\r\n public notified: boolean = false;\r\n\r\n public notifySuccess(): void {\r\n this.ensureNotNotified();\r\n sendMessageRequest(GlobalVars.parentWindow, 'settings.remove.success');\r\n this.notified = true;\r\n }\r\n\r\n public notifyFailure(reason?: string): void {\r\n this.ensureNotNotified();\r\n sendMessageRequest(GlobalVars.parentWindow, 'settings.remove.failure', [reason]);\r\n this.notified = true;\r\n }\r\n\r\n private ensureNotNotified(): void {\r\n if (this.notified) {\r\n throw new Error('The removeEvent may only notify success or failure once.');\r\n }\r\n }\r\n }\r\n}\r\n","import { ensureInitialized, sendMessageRequest } from '../internal/internalAPIs';\r\nimport { GlobalVars } from '../internal/globalVars';\r\n\r\n/**\r\n * Namespace to interact with the logging part of the SDK.\r\n * This object is used to send the app logs on demand to the host client\r\n *\r\n * @private\r\n * Hide from docs\r\n */\r\nexport namespace logs {\r\n GlobalVars.handlers['log.request'] = handleGetLogRequest;\r\n\r\n function handleGetLogRequest(): void {\r\n if (GlobalVars.getLogHandler) {\r\n const log: string = GlobalVars.getLogHandler();\r\n sendMessageRequest(GlobalVars.parentWindow, 'log.receive', [log]);\r\n }\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n * ------\r\n * Registers a handler for getting app log\r\n * @param handler The handler to invoke to get the app log\r\n */\r\n export function registerGetLogHandler(handler: () => string): void {\r\n ensureInitialized();\r\n\r\n GlobalVars.getLogHandler = handler;\r\n handler && sendMessageRequest(GlobalVars.parentWindow, 'registerHandler', ['log.request']);\r\n }\r\n}\r\n","import { ensureInitialized, sendMessageRequest } from '../internal/internalAPIs';\r\nimport { GlobalVars } from '../internal/globalVars';\r\nimport { frameContexts } from '../internal/constants';\r\nimport { getGenericOnCompleteHandler } from '../internal/utils';\r\n\r\nexport interface IAppWindow {\r\n postMessage(message): void;\r\n addEventListener(type: string, listener: Function): void;\r\n}\r\n\r\nexport class ChildAppWindow implements IAppWindow {\r\n public postMessage(message: any, onComplete?: (status: boolean, reason?: string) => void): void {\r\n ensureInitialized();\r\n const messageId = sendMessageRequest(GlobalVars.parentWindow, 'messageForChild', [message]);\r\n GlobalVars.callbacks[messageId] = onComplete ? onComplete : getGenericOnCompleteHandler();\r\n }\r\n\r\n public addEventListener(type: string, listener: (message: any) => void): void {\r\n if (type === 'message') {\r\n GlobalVars.handlers['messageForParent'] = listener;\r\n }\r\n }\r\n}\r\n\r\nexport class ParentAppWindow implements IAppWindow {\r\n private static _instance: ParentAppWindow;\r\n public static get Instance(): IAppWindow {\r\n // Do you need arguments? Make it a regular method instead.\r\n return this._instance || (this._instance = new this());\r\n }\r\n\r\n public postMessage(message: any, onComplete?: (status: boolean, reason?: string) => void): void {\r\n ensureInitialized(frameContexts.task);\r\n const messageId = sendMessageRequest(GlobalVars.parentWindow, 'messageForParent', [message]);\r\n\r\n GlobalVars.callbacks[messageId] = onComplete ? onComplete : getGenericOnCompleteHandler();\r\n }\r\n\r\n public addEventListener(type: string, listener: (message: any) => void): void {\r\n if (type === 'message') {\r\n GlobalVars.handlers['messageForChild'] = listener;\r\n }\r\n }\r\n}\r\n","export * from './private/index';\r\nexport * from './public/index';\r\n","export { bot } from './bot';\r\nexport { menus } from './menus';\r\nexport { logs } from './logs';\r\nexport {\r\n ChatMembersInformation,\r\n FilePreviewParameters,\r\n NotificationTypes,\r\n ShowNotificationParameters,\r\n TeamInstanceParameters,\r\n ThreadMember,\r\n UserJoinedTeamsInformation,\r\n} from './interfaces';\r\nexport {\r\n enterFullscreen,\r\n exitFullscreen,\r\n getChatMembers,\r\n getConfigSetting,\r\n getUserJoinedTeams,\r\n openFilePreview,\r\n sendCustomMessage,\r\n showNotification,\r\n uploadCustomApp,\r\n} from './privateAPIs';\r\nexport { conversations } from './conversations';\r\n","import { GlobalVars } from '../internal/globalVars';\r\nimport { ensureInitialized, sendMessageRequest } from '../internal/internalAPIs';\r\n\r\n/**\r\n * @private\r\n * Namespace to interact with bots using the SDK.\r\n */\r\nexport namespace bot {\r\n /**\r\n * @private\r\n * Hide from docs until release.\r\n * ------\r\n * Sends query to bot in order to retrieve data.\r\n * @param botRequest query to send to bot.\r\n * @param onSuccess callback to invoke when data is retrieved from bot\r\n * @param onError callback to invoke should an error occur\r\n */\r\n export function sendQuery(\r\n botRequest: QueryRequest,\r\n onSuccess?: (data: QueryResponse) => void,\r\n onError?: (error: string) => void,\r\n ): void {\r\n ensureInitialized();\r\n\r\n const messageId = sendMessageRequest(GlobalVars.parentWindow, 'bot.executeQuery', [botRequest]);\r\n\r\n GlobalVars.callbacks[messageId] = (success: boolean, response: string | QueryResponse) => {\r\n if (success) {\r\n onSuccess(response as QueryResponse);\r\n } else {\r\n onError(response as string);\r\n }\r\n };\r\n }\r\n /**\r\n * @private\r\n * Hide from docs until release.\r\n * -----\r\n * Retrieves list of support commands from bot\r\n * @param onSuccess callback to invoke when data is retrieved from bot\r\n * @param onError callback to invoke should an error occur\r\n */\r\n export function getSupportedCommands(\r\n onSuccess?: (response: Command[]) => void,\r\n onError?: (error: string) => void,\r\n ): void {\r\n ensureInitialized();\r\n\r\n const messageId = sendMessageRequest(GlobalVars.parentWindow, 'bot.getSupportedCommands');\r\n\r\n GlobalVars.callbacks[messageId] = (success: boolean, response: string | Command[]) => {\r\n if (success) {\r\n onSuccess(response as Command[]);\r\n } else {\r\n onError(response as string);\r\n }\r\n };\r\n }\r\n /**\r\n * @private\r\n * Hide from docs until release.\r\n * -----\r\n * Authenticates a user for json tab\r\n * @param authRequest callback to invoke when data is retrieved from bot\r\n * @param onSuccess callback to invoke when user is authenticated\r\n * @param onError callback to invoke should an error occur\r\n */\r\n export function authenticate(\r\n authRequest: AuthQueryRequest,\r\n onSuccess?: (results: Results) => void,\r\n onError?: (error: string) => void,\r\n ): void {\r\n ensureInitialized();\r\n\r\n const messageId = sendMessageRequest(GlobalVars.parentWindow, 'bot.authenticate', [authRequest]);\r\n\r\n GlobalVars.callbacks[messageId] = (success: boolean, response: string | Results) => {\r\n if (success) {\r\n onSuccess(response as Results);\r\n } else {\r\n onError(response as string);\r\n }\r\n };\r\n }\r\n\r\n export interface QueryRequest {\r\n /**\r\n * Query to search for\r\n */\r\n query: string;\r\n commandId?: string;\r\n option?: {\r\n skip: number;\r\n count: number;\r\n };\r\n }\r\n\r\n export interface QueryResponse {\r\n data: Results | Auth;\r\n type: ResponseType;\r\n }\r\n\r\n export interface Results {\r\n attachments: Attachment[];\r\n layout: any;\r\n botId: string;\r\n }\r\n\r\n export interface Auth {\r\n url: string;\r\n title: string;\r\n }\r\n\r\n export interface AuthQueryRequest extends QueryRequest {\r\n url: string;\r\n }\r\n\r\n export interface Attachment {\r\n card: any;\r\n previewCard: any;\r\n previewRawPayload: any;\r\n rawPayload: any;\r\n }\r\n\r\n export interface Command {\r\n title: string;\r\n id: string;\r\n initialRun: boolean;\r\n }\r\n\r\n export enum ResponseType {\r\n Results = 'Results',\r\n Auth = 'Auth',\r\n }\r\n}\r\n","import { ensureInitialized, sendMessageRequest } from '../internal/internalAPIs';\r\nimport { GlobalVars } from '../internal/globalVars';\r\n/**\r\n * Namespace to interact with the menu-specific part of the SDK.\r\n * This object is used to show View Configuration, Action Menu and Navigation Bar Menu.\r\n *\r\n * @private\r\n * Hide from docs until feature is complete\r\n */\r\nexport namespace menus {\r\n /**\r\n * Represents information about item in View Configuration.\r\n */\r\n export interface ViewConfiguration {\r\n /**\r\n * Unique identifier of view.\r\n */\r\n id: string;\r\n /**\r\n * Display title of the view.\r\n */\r\n title: string;\r\n /**\r\n * Additional information for accessibility.\r\n */\r\n contentDescription?: string;\r\n }\r\n /**\r\n * Represents information about menu item for Action Menu and Navigation Bar Menu.\r\n */\r\n export class MenuItem {\r\n /**\r\n * Unique identifier for the menu item.\r\n */\r\n public id: string;\r\n /**\r\n * Display title of the menu item.\r\n */\r\n public title: string;\r\n /**\r\n * Display icon of the menu item. The icon value must be a string having SVG icon content.\r\n */\r\n public icon?: string;\r\n /**\r\n * Selected state display icon of the menu item. The icon value must be a string having SVG icon content.\r\n */\r\n public iconSelected?: string;\r\n /**\r\n * Additional information for accessibility.\r\n */\r\n public contentDescription?: string;\r\n /**\r\n * State of the menu item\r\n */\r\n public enabled: boolean = true;\r\n /**\r\n * Interface to show list of items on selection of menu item.\r\n */\r\n public viewData: ViewData;\r\n }\r\n /**\r\n * Represents information about view to show on Navigation Bar Menu item selection\r\n */\r\n export interface ViewData {\r\n /**\r\n * Display header title of the item list.\r\n */\r\n listTitle?: string;\r\n /**\r\n * Type of the menu item.\r\n */\r\n listType: MenuListType;\r\n /**\r\n * Array of MenuItem. Icon value will be required for all items in the list.\r\n */\r\n listItems: MenuItem[];\r\n }\r\n /**\r\n * Represents information about type of list to display in Navigation Bar Menu.\r\n */\r\n export enum MenuListType {\r\n dropDown = 'dropDown',\r\n popOver = 'popOver',\r\n }\r\n let navBarMenuItemPressHandler: (id: string) => boolean;\r\n GlobalVars.handlers['navBarMenuItemPress'] = handleNavBarMenuItemPress;\r\n let actionMenuItemPressHandler: (id: string) => boolean;\r\n GlobalVars.handlers['actionMenuItemPress'] = handleActionMenuItemPress;\r\n let viewConfigItemPressHandler: (id: string) => boolean;\r\n GlobalVars.handlers['setModuleView'] = handleViewConfigItemPress;\r\n /**\r\n * Registers list of view configurations and it's handler.\r\n * Handler is responsible for listening selection of View Configuration.\r\n * @param viewConfig List of view configurations. Minimum 1 value is required.\r\n * @param handler The handler to invoke when the user selects view configuration.\r\n */\r\n export function setUpViews(viewConfig: ViewConfiguration[], handler: (id: string) => boolean): void {\r\n ensureInitialized();\r\n viewConfigItemPressHandler = handler;\r\n sendMessageRequest(GlobalVars.parentWindow, 'setUpViews', [viewConfig]);\r\n }\r\n function handleViewConfigItemPress(id: string): void {\r\n if (!viewConfigItemPressHandler || !viewConfigItemPressHandler(id)) {\r\n ensureInitialized();\r\n sendMessageRequest(GlobalVars.parentWindow, 'viewConfigItemPress', [id]);\r\n }\r\n }\r\n /**\r\n * Used to set menu items on the Navigation Bar. If icon is available, icon will be shown, otherwise title will be shown.\r\n * @param items List of MenuItems for Navigation Bar Menu.\r\n * @param handler The handler to invoke when the user selects menu item.\r\n */\r\n export function setNavBarMenu(items: MenuItem[], handler: (id: string) => boolean): void {\r\n ensureInitialized();\r\n navBarMenuItemPressHandler = handler;\r\n sendMessageRequest(GlobalVars.parentWindow, 'setNavBarMenu', [items]);\r\n }\r\n function handleNavBarMenuItemPress(id: string): void {\r\n if (!navBarMenuItemPressHandler || !navBarMenuItemPressHandler(id)) {\r\n ensureInitialized();\r\n sendMessageRequest(GlobalVars.parentWindow, 'handleNavBarMenuItemPress', [id]);\r\n }\r\n }\r\n export interface ActionMenuParameters {\r\n /**\r\n * Display title for Action Menu\r\n */\r\n title: string;\r\n /**\r\n * List of MenuItems for Action Menu\r\n */\r\n items: MenuItem[];\r\n }\r\n /**\r\n * Used to show Action Menu.\r\n * @param params Parameters for Menu Parameters\r\n * @param handler The handler to invoke when the user selects menu item.\r\n */\r\n export function showActionMenu(params: ActionMenuParameters, handler: (id: string) => boolean): void {\r\n ensureInitialized();\r\n actionMenuItemPressHandler = handler;\r\n sendMessageRequest(GlobalVars.parentWindow, 'showActionMenu', [params]);\r\n }\r\n function handleActionMenuItemPress(id: string): void {\r\n if (!actionMenuItemPressHandler || !actionMenuItemPressHandler(id)) {\r\n ensureInitialized();\r\n sendMessageRequest(GlobalVars.parentWindow, 'handleActionMenuItemPress', [id]);\r\n }\r\n }\r\n}\r\n","import { ensureInitialized, sendMessageRequest } from '../internal/internalAPIs';\r\nimport { GlobalVars } from '../internal/globalVars';\r\nimport { frameContexts } from '../internal/constants';\r\nimport {\r\n ChatMembersInformation,\r\n ShowNotificationParameters,\r\n FilePreviewParameters,\r\n TeamInstanceParameters,\r\n UserJoinedTeamsInformation,\r\n} from './interfaces';\r\nimport { getGenericOnCompleteHandler } from '../internal/utils';\r\n\r\n/**\r\n * @private\r\n * Hide from docs\r\n * ------\r\n * Allows an app to retrieve information of all user joined teams\r\n * @param callback The callback to invoke when the {@link TeamInstanceParameters} object is retrieved.\r\n * @param teamInstanceParameters OPTIONAL Flags that specify whether to scope call to favorite teams\r\n */\r\nexport function getUserJoinedTeams(\r\n callback: (userJoinedTeamsInformation: UserJoinedTeamsInformation) => void,\r\n teamInstanceParameters?: TeamInstanceParameters,\r\n): void {\r\n ensureInitialized();\r\n\r\n const messageId = sendMessageRequest(GlobalVars.parentWindow, 'getUserJoinedTeams', [teamInstanceParameters]);\r\n GlobalVars.callbacks[messageId] = callback;\r\n}\r\n\r\n/**\r\n * @private\r\n * Hide from docs\r\n * ------\r\n * Place the tab into full-screen mode.\r\n */\r\nexport function enterFullscreen(): void {\r\n ensureInitialized(frameContexts.content);\r\n sendMessageRequest(GlobalVars.parentWindow, 'enterFullscreen', []);\r\n}\r\n\r\n/**\r\n * @private\r\n * Hide from docs\r\n * ------\r\n * Reverts the tab into normal-screen mode.\r\n */\r\nexport function exitFullscreen(): void {\r\n ensureInitialized(frameContexts.content);\r\n sendMessageRequest(GlobalVars.parentWindow, 'exitFullscreen', []);\r\n}\r\n\r\n/**\r\n * @private\r\n * Hide from docs.\r\n * ------\r\n * Opens a client-friendly preview of the specified file.\r\n * @param file The file to preview.\r\n */\r\nexport function openFilePreview(filePreviewParameters: FilePreviewParameters): void {\r\n ensureInitialized(frameContexts.content);\r\n\r\n const params = [\r\n filePreviewParameters.entityId,\r\n filePreviewParameters.title,\r\n filePreviewParameters.description,\r\n filePreviewParameters.type,\r\n filePreviewParameters.objectUrl,\r\n filePreviewParameters.downloadUrl,\r\n filePreviewParameters.webPreviewUrl,\r\n filePreviewParameters.webEditUrl,\r\n filePreviewParameters.baseUrl,\r\n filePreviewParameters.editFile,\r\n filePreviewParameters.subEntityId,\r\n ];\r\n\r\n sendMessageRequest(GlobalVars.parentWindow, 'openFilePreview', params);\r\n}\r\n\r\n/**\r\n * @private\r\n * Hide from docs.\r\n * ------\r\n * display notification API.\r\n * @param message Notification message.\r\n * @param notificationType Notification type\r\n */\r\nexport function showNotification(showNotificationParameters: ShowNotificationParameters): void {\r\n ensureInitialized(frameContexts.content);\r\n const params = [showNotificationParameters.message, showNotificationParameters.notificationType];\r\n sendMessageRequest(GlobalVars.parentWindow, 'showNotification', params);\r\n}\r\n\r\n/**\r\n * @private\r\n * Hide from docs.\r\n * ------\r\n * Upload a custom App manifest directly to both team and personal scopes.\r\n * This method works just for the first party Apps.\r\n */\r\nexport function uploadCustomApp(manifestBlob: Blob, onComplete?: (status: boolean, reason?: string) => void): void {\r\n ensureInitialized();\r\n\r\n const messageId = sendMessageRequest(GlobalVars.parentWindow, 'uploadCustomApp', [manifestBlob]);\r\n GlobalVars.callbacks[messageId] = onComplete ? onComplete : getGenericOnCompleteHandler();\r\n}\r\n\r\n/**\r\n * @private\r\n * Internal use only\r\n * Sends a custom action message to Teams.\r\n * @param actionName Specifies name of the custom action to be sent\r\n * @param args Specifies additional arguments passed to the action\r\n * @returns id of sent message\r\n */\r\nexport function sendCustomMessage(\r\n actionName: string,\r\n // tslint:disable-next-line:no-any\r\n args?: any[],\r\n): number {\r\n ensureInitialized();\r\n return sendMessageRequest(GlobalVars.parentWindow, actionName, args);\r\n}\r\n\r\n/**\r\n * @private\r\n * Hide from docs\r\n * ------\r\n * Allows an app to retrieve information of all chat members\r\n * Because a malicious party run your content in a browser, this value should\r\n * be used only as a hint as to who the members are and never as proof of membership.\r\n * @param callback The callback to invoke when the {@link ChatMembersInformation} object is retrieved.\r\n */\r\nexport function getChatMembers(callback: (chatMembersInformation: ChatMembersInformation) => void): void {\r\n ensureInitialized();\r\n\r\n const messageId = sendMessageRequest(GlobalVars.parentWindow, 'getChatMembers');\r\n GlobalVars.callbacks[messageId] = callback;\r\n}\r\n\r\n/**\r\n * @private\r\n * Hide from docs\r\n * ------\r\n * Allows an app to get the configuration setting value\r\n * @param callback The callback to invoke when the value is retrieved.\r\n * @param key The key for the config setting\r\n */\r\nexport function getConfigSetting(callback: (value: string) => void, key: string): void {\r\n ensureInitialized();\r\n\r\n const messageId = sendMessageRequest(GlobalVars.parentWindow, 'getConfigSetting', [key]);\r\n GlobalVars.callbacks[messageId] = callback;\r\n}\r\n","import { ensureInitialized, sendMessageRequest } from '../internal/internalAPIs';\r\nimport { GlobalVars } from '../internal/globalVars';\r\nimport { frameContexts } from '../internal/constants';\r\nimport { OpenConversationRequest } from '../public/interfaces';\r\n\r\n/**\r\n * Namespace to interact with the conversational subEntities inside the tab\r\n */\r\nexport namespace conversations {\r\n /**\r\n * @private\r\n * Hide from docs\r\n * --------------\r\n * Allows the user to start or continue a conversation with each subentity inside the tab\r\n */\r\n export function openConversation(openConversationRequest: OpenConversationRequest): void {\r\n ensureInitialized(frameContexts.content);\r\n const messageId = sendMessageRequest(GlobalVars.parentWindow, 'conversations.openConversation', [\r\n {\r\n title: openConversationRequest.title,\r\n subEntityId: openConversationRequest.subEntityId,\r\n conversationId: openConversationRequest.conversationId,\r\n channelId: openConversationRequest.channelId,\r\n entityId: openConversationRequest.entityId,\r\n },\r\n ]);\r\n GlobalVars.onCloseConversationHandler = openConversationRequest.onCloseConversation;\r\n GlobalVars.onStartConversationHandler = openConversationRequest.onStartConversation;\r\n GlobalVars.callbacks[messageId] = (status: boolean, reason: string) => {\r\n if (!status) {\r\n throw new Error(reason);\r\n }\r\n };\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n * --------------\r\n * Allows the user to close the conversation in the right pane\r\n */\r\n export function closeConversation(): void {\r\n ensureInitialized(frameContexts.content);\r\n sendMessageRequest(GlobalVars.parentWindow, 'conversations.closeConversation');\r\n GlobalVars.onCloseConversationHandler = null;\r\n GlobalVars.onStartConversationHandler = null;\r\n }\r\n}\r\n","export { appInitialization } from './appInitialization';\r\nexport { authentication } from './authentication';\r\nexport { HostClientType, TaskModuleDimension, TeamType, UserTeamRole } from './constants';\r\nexport {\r\n Context,\r\n DeepLinkParameters,\r\n LoadContext,\r\n TabInformation,\r\n TabInstance,\r\n TabInstanceParameters,\r\n TaskInfo,\r\n TeamInformation,\r\n} from './interfaces';\r\nexport {\r\n enablePrintCapability,\r\n executeDeepLink,\r\n getContext,\r\n getMruTabInstances,\r\n getTabInstances,\r\n initialize,\r\n navigateBack,\r\n navigateCrossDomain,\r\n navigateToTab,\r\n print,\r\n registerBackButtonHandler,\r\n registerBeforeUnloadHandler,\r\n registerChangeSettingsHandler,\r\n registerFullScreenHandler,\r\n registerOnLoadHandler,\r\n registerOnThemeChangeHandler,\r\n shareDeepLink,\r\n} from './publicAPIs';\r\nexport { settings } from './settings';\r\nexport { tasks } from './tasks';\r\nexport { ChildAppWindow, IAppWindow, ParentAppWindow } from './appWindow';\r\n","import { ensureInitialized, sendMessageRequest } from '../internal/internalAPIs';\r\nimport { GlobalVars } from '../internal/globalVars';\r\nimport { version } from '../internal/constants';\r\n\r\nexport namespace appInitialization {\r\n /**\r\n * To notify app loaded to hide loading indicator\r\n */\r\n export function notifyAppLoaded(): void {\r\n ensureInitialized();\r\n sendMessageRequest(GlobalVars.parentWindow, 'appInitialization.appLoaded', [version]);\r\n }\r\n\r\n /**\r\n * To notify app Initialization successs and ready for user interaction\r\n */\r\n export function notifySuccess(): void {\r\n ensureInitialized();\r\n sendMessageRequest(GlobalVars.parentWindow, 'appInitialization.success', [version]);\r\n }\r\n\r\n /**\r\n * To notify app Initialization failed\r\n */\r\n export function notifyFailure(appInitializationFailedRequest: appInitialization.IFailedRequest): void {\r\n ensureInitialized();\r\n sendMessageRequest(GlobalVars.parentWindow, 'appInitialization.failure', [\r\n appInitializationFailedRequest.reason,\r\n appInitializationFailedRequest.message,\r\n ]);\r\n }\r\n\r\n export const enum FailedReason {\r\n AuthFailed = 'AuthFailed',\r\n Timeout = 'Timeout',\r\n Other = 'Other',\r\n }\r\n\r\n export interface IFailedRequest {\r\n reason: appInitialization.FailedReason;\r\n message?: string;\r\n }\r\n}\r\n","import { ensureInitialized, sendMessageRequest, waitForMessageQueue } from '../internal/internalAPIs';\r\nimport { GlobalVars } from '../internal/globalVars';\r\nimport { frameContexts } from '../internal/constants';\r\nimport { HostClientType } from './constants';\r\n\r\n/**\r\n * Namespace to interact with the authentication-specific part of the SDK.\r\n * This object is used for starting or completing authentication flows.\r\n */\r\nexport namespace authentication {\r\n let authParams: AuthenticateParameters;\r\n let authWindowMonitor: number;\r\n GlobalVars.handlers['authentication.authenticate.success'] = handleSuccess;\r\n GlobalVars.handlers['authentication.authenticate.failure'] = handleFailure;\r\n\r\n /**\r\n * Registers the authentication GlobalVars.handlers\r\n * @param authenticateParameters A set of values that configure the authentication pop-up.\r\n */\r\n export function registerAuthenticationHandlers(authenticateParameters: AuthenticateParameters): void {\r\n authParams = authenticateParameters;\r\n }\r\n\r\n /**\r\n * Initiates an authentication request, which opens a new window with the specified settings.\r\n */\r\n export function authenticate(authenticateParameters?: AuthenticateParameters): void {\r\n const authenticateParams = authenticateParameters !== undefined ? authenticateParameters : authParams;\r\n ensureInitialized(frameContexts.content, frameContexts.settings, frameContexts.remove, frameContexts.task);\r\n if (\r\n GlobalVars.hostClientType === HostClientType.desktop ||\r\n GlobalVars.hostClientType === HostClientType.android ||\r\n GlobalVars.hostClientType === HostClientType.ios ||\r\n GlobalVars.hostClientType === HostClientType.rigel\r\n ) {\r\n // Convert any relative URLs into absolute URLs before sending them over to the parent window.\r\n const link = document.createElement('a');\r\n link.href = authenticateParams.url;\r\n // Ask the parent window to open an authentication window with the parameters provided by the caller.\r\n const messageId = sendMessageRequest(GlobalVars.parentWindow, 'authentication.authenticate', [\r\n link.href,\r\n authenticateParams.width,\r\n authenticateParams.height,\r\n ]);\r\n GlobalVars.callbacks[messageId] = (success: boolean, response: string) => {\r\n if (success) {\r\n authenticateParams.successCallback(response);\r\n } else {\r\n authenticateParams.failureCallback(response);\r\n }\r\n };\r\n } else {\r\n // Open an authentication window with the parameters provided by the caller.\r\n openAuthenticationWindow(authenticateParams);\r\n }\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs.\r\n * ------\r\n * Requests an Azure AD token to be issued on behalf of the app. The token is acquired from the cache\r\n * if it is not expired. Otherwise a request is sent to Azure AD to obtain a new token.\r\n * @param authTokenRequest A set of values that configure the token request.\r\n */\r\n export function getAuthToken(authTokenRequest: AuthTokenRequest): void {\r\n ensureInitialized();\r\n const messageId = sendMessageRequest(GlobalVars.parentWindow, 'authentication.getAuthToken', [\r\n authTokenRequest.resources,\r\n ]);\r\n GlobalVars.callbacks[messageId] = (success: boolean, result: string) => {\r\n if (success) {\r\n authTokenRequest.successCallback(result);\r\n } else {\r\n authTokenRequest.failureCallback(result);\r\n }\r\n };\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs.\r\n * ------\r\n * Requests the decoded Azure AD user identity on behalf of the app.\r\n */\r\n export function getUser(userRequest: UserRequest): void {\r\n ensureInitialized();\r\n const messageId = sendMessageRequest(GlobalVars.parentWindow, 'authentication.getUser');\r\n GlobalVars.callbacks[messageId] = (success: boolean, result: UserProfile | string) => {\r\n if (success) {\r\n userRequest.successCallback(result as UserProfile);\r\n } else {\r\n userRequest.failureCallback(result as string);\r\n }\r\n };\r\n }\r\n\r\n function closeAuthenticationWindow(): void {\r\n // Stop monitoring the authentication window\r\n stopAuthenticationWindowMonitor();\r\n // Try to close the authentication window and clear all properties associated with it\r\n try {\r\n if (GlobalVars.childWindow) {\r\n GlobalVars.childWindow.close();\r\n }\r\n } finally {\r\n GlobalVars.childWindow = null;\r\n GlobalVars.childOrigin = null;\r\n }\r\n }\r\n\r\n function openAuthenticationWindow(authenticateParameters: AuthenticateParameters): void {\r\n authParams = authenticateParameters;\r\n // Close the previously opened window if we have one\r\n closeAuthenticationWindow();\r\n // Start with a sensible default size\r\n let width = authParams.width || 600;\r\n let height = authParams.height || 400;\r\n // Ensure that the new window is always smaller than our app's window so that it never fully covers up our app\r\n width = Math.min(width, GlobalVars.currentWindow.outerWidth - 400);\r\n height = Math.min(height, GlobalVars.currentWindow.outerHeight - 200);\r\n // Convert any relative URLs into absolute URLs before sending them over to the parent window\r\n const link = document.createElement('a');\r\n link.href = authParams.url;\r\n // We are running in the browser, so we need to center the new window ourselves\r\n let left: number =\r\n typeof GlobalVars.currentWindow.screenLeft !== 'undefined'\r\n ? GlobalVars.currentWindow.screenLeft\r\n : GlobalVars.currentWindow.screenX;\r\n let top: number =\r\n typeof GlobalVars.currentWindow.screenTop !== 'undefined'\r\n ? GlobalVars.currentWindow.screenTop\r\n : GlobalVars.currentWindow.screenY;\r\n left += GlobalVars.currentWindow.outerWidth / 2 - width / 2;\r\n top += GlobalVars.currentWindow.outerHeight / 2 - height / 2;\r\n // Open a child window with a desired set of standard browser features\r\n GlobalVars.childWindow = GlobalVars.currentWindow.open(\r\n link.href,\r\n '_blank',\r\n 'toolbar=no, location=yes, status=no, menubar=no, scrollbars=yes, top=' +\r\n top +\r\n ', left=' +\r\n left +\r\n ', width=' +\r\n width +\r\n ', height=' +\r\n height,\r\n );\r\n if (GlobalVars.childWindow) {\r\n // Start monitoring the authentication window so that we can detect if it gets closed before the flow completes\r\n startAuthenticationWindowMonitor();\r\n } else {\r\n // If we failed to open the window, fail the authentication flow\r\n handleFailure('FailedToOpenWindow');\r\n }\r\n }\r\n\r\n function stopAuthenticationWindowMonitor(): void {\r\n if (authWindowMonitor) {\r\n clearInterval(authWindowMonitor);\r\n authWindowMonitor = 0;\r\n }\r\n delete GlobalVars.handlers['initialize'];\r\n delete GlobalVars.handlers['navigateCrossDomain'];\r\n }\r\n\r\n function startAuthenticationWindowMonitor(): void {\r\n // Stop the previous window monitor if one is running\r\n stopAuthenticationWindowMonitor();\r\n // Create an interval loop that\r\n // - Notifies the caller of failure if it detects that the authentication window is closed\r\n // - Keeps pinging the authentication window while it is open to re-establish\r\n // contact with any pages along the authentication flow that need to communicate\r\n // with us\r\n authWindowMonitor = GlobalVars.currentWindow.setInterval(() => {\r\n if (!GlobalVars.childWindow || GlobalVars.childWindow.closed) {\r\n handleFailure('CancelledByUser');\r\n } else {\r\n const savedChildOrigin = GlobalVars.childOrigin;\r\n try {\r\n GlobalVars.childOrigin = '*';\r\n sendMessageRequest(GlobalVars.childWindow, 'ping');\r\n } finally {\r\n GlobalVars.childOrigin = savedChildOrigin;\r\n }\r\n }\r\n }, 100);\r\n // Set up an initialize-message handler that gives the authentication window its frame context\r\n GlobalVars.handlers['initialize'] = () => {\r\n return [frameContexts.authentication, GlobalVars.hostClientType];\r\n };\r\n // Set up a navigateCrossDomain message handler that blocks cross-domain re-navigation attempts\r\n // in the authentication window. We could at some point choose to implement this method via a call to\r\n // authenticationWindow.location.href = url; however, we would first need to figure out how to\r\n // validate the URL against the tab's list of valid domains.\r\n GlobalVars.handlers['navigateCrossDomain'] = () => {\r\n return false;\r\n };\r\n }\r\n\r\n /**\r\n * Notifies the frame that initiated this authentication request that the request was successful.\r\n * This function is usable only on the authentication window.\r\n * This call causes the authentication window to be closed.\r\n * @param result Specifies a result for the authentication. If specified, the frame that initiated the authentication pop-up receives this value in its callback.\r\n * @param callbackUrl Specifies the url to redirect back to if the client is Win32 Outlook.\r\n */\r\n export function notifySuccess(result?: string, callbackUrl?: string): void {\r\n redirectIfWin32Outlook(callbackUrl, 'result', result);\r\n ensureInitialized(frameContexts.authentication);\r\n sendMessageRequest(GlobalVars.parentWindow, 'authentication.authenticate.success', [result]);\r\n // Wait for the message to be sent before closing the window\r\n waitForMessageQueue(GlobalVars.parentWindow, () => setTimeout(() => GlobalVars.currentWindow.close(), 200));\r\n }\r\n\r\n /**\r\n * Notifies the frame that initiated this authentication request that the request failed.\r\n * This function is usable only on the authentication window.\r\n * This call causes the authentication window to be closed.\r\n * @param result Specifies a result for the authentication. If specified, the frame that initiated the authentication pop-up receives this value in its callback.\r\n * @param callbackUrl Specifies the url to redirect back to if the client is Win32 Outlook.\r\n */\r\n export function notifyFailure(reason?: string, callbackUrl?: string): void {\r\n redirectIfWin32Outlook(callbackUrl, 'reason', reason);\r\n ensureInitialized(frameContexts.authentication);\r\n sendMessageRequest(GlobalVars.parentWindow, 'authentication.authenticate.failure', [reason]);\r\n // Wait for the message to be sent before closing the window\r\n waitForMessageQueue(GlobalVars.parentWindow, () => setTimeout(() => GlobalVars.currentWindow.close(), 200));\r\n }\r\n\r\n function handleSuccess(result?: string): void {\r\n try {\r\n if (authParams && authParams.successCallback) {\r\n authParams.successCallback(result);\r\n }\r\n } finally {\r\n authParams = null;\r\n closeAuthenticationWindow();\r\n }\r\n }\r\n\r\n function handleFailure(reason?: string): void {\r\n try {\r\n if (authParams && authParams.failureCallback) {\r\n authParams.failureCallback(reason);\r\n }\r\n } finally {\r\n authParams = null;\r\n closeAuthenticationWindow();\r\n }\r\n }\r\n\r\n /**\r\n * Validates that the callbackUrl param is a valid connector url, appends the result/reason and authSuccess/authFailure as URL fragments and redirects the window\r\n * @param callbackUrl - the connectors url to redirect to\r\n * @param key - \"result\" in case of success and \"reason\" in case of failure\r\n * @param value - the value of the passed result/reason parameter\r\n */\r\n function redirectIfWin32Outlook(callbackUrl?: string, key?: string, value?: string): void {\r\n if (callbackUrl) {\r\n const link = document.createElement('a');\r\n link.href = decodeURIComponent(callbackUrl);\r\n if (\r\n link.host &&\r\n link.host !== window.location.host &&\r\n link.host === 'outlook.office.com' &&\r\n link.search.indexOf('client_type=Win32_Outlook') > -1\r\n ) {\r\n if (key && key === 'result') {\r\n if (value) {\r\n link.href = updateUrlParameter(link.href, 'result', value);\r\n }\r\n GlobalVars.currentWindow.location.assign(updateUrlParameter(link.href, 'authSuccess', ''));\r\n }\r\n if (key && key === 'reason') {\r\n if (value) {\r\n link.href = updateUrlParameter(link.href, 'reason', value);\r\n }\r\n GlobalVars.currentWindow.location.assign(updateUrlParameter(link.href, 'authFailure', ''));\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Appends either result or reason as a fragment to the 'callbackUrl'\r\n * @param uri - the url to modify\r\n * @param key - the fragment key\r\n * @param value - the fragment value\r\n */\r\n function updateUrlParameter(uri: string, key: string, value: string): string {\r\n const i = uri.indexOf('#');\r\n let hash = i === -1 ? '#' : uri.substr(i);\r\n hash = hash + '&' + key + (value !== '' ? '=' + value : '');\r\n uri = i === -1 ? uri : uri.substr(0, i);\r\n return uri + hash;\r\n }\r\n\r\n export interface AuthenticateParameters {\r\n /**\r\n * The URL for the authentication pop-up.\r\n */\r\n url: string;\r\n /**\r\n * The preferred width for the pop-up. This value can be ignored if outside the acceptable bounds.\r\n */\r\n width?: number;\r\n /**\r\n * The preferred height for the pop-up. This value can be ignored if outside the acceptable bounds.\r\n */\r\n height?: number;\r\n /**\r\n * A function that is called if the authentication succeeds, with the result returned from the authentication pop-up.\r\n */\r\n successCallback?: (result?: string) => void;\r\n /**\r\n * A function that is called if the authentication fails, with the reason for the failure returned from the authentication pop-up.\r\n */\r\n failureCallback?: (reason?: string) => void;\r\n }\r\n /**\r\n * @private\r\n * Hide from docs.\r\n * ------\r\n */\r\n export interface AuthTokenRequest {\r\n /**\r\n * An array of resource URIs identifying the target resources for which the token should be requested.\r\n */\r\n resources: string[];\r\n /**\r\n * A function that is called if the token request succeeds, with the resulting token.\r\n */\r\n successCallback?: (token: string) => void;\r\n /**\r\n * A function that is called if the token request fails, with the reason for the failure.\r\n */\r\n failureCallback?: (reason: string) => void;\r\n }\r\n /**\r\n * @private\r\n * Hide from docs.\r\n * ------\r\n */\r\n export interface UserRequest {\r\n /**\r\n * A function that is called if the token request succeeds, with the resulting token.\r\n */\r\n successCallback?: (user: UserProfile) => void;\r\n /**\r\n * A function that is called if the token request fails, with the reason for the failure.\r\n */\r\n failureCallback?: (reason: string) => void;\r\n }\r\n /**\r\n * @private\r\n * Hide from docs.\r\n * ------\r\n */\r\n export interface UserProfile {\r\n /**\r\n * The intended recipient of the token. The application that receives the token must verify that the audience\r\n * value is correct and reject any tokens intended for a different audience.\r\n */\r\n aud: string;\r\n /**\r\n * Identifies how the subject of the token was authenticated.\r\n */\r\n amr: string[];\r\n /**\r\n * Stores the time at which the token was issued. It is often used to measure token freshness.\r\n */\r\n iat: number;\r\n /**\r\n * Identifies the security token service (STS) that constructs and returns the token. In the tokens that Azure AD\r\n * returns, the issuer is sts.windows.net. The GUID in the issuer claim value is the tenant ID of the Azure AD\r\n * directory. The tenant ID is an immutable and reliable identifier of the directory.\r\n */\r\n iss: string;\r\n /**\r\n * Provides the last name, surname, or family name of the user as defined in the Azure AD user object.\r\n */\r\n family_name: string;\r\n /**\r\n * Provides the first or \"given\" name of the user, as set on the Azure AD user object.\r\n */\r\n given_name: string;\r\n /**\r\n * Provides a human-readable value that identifies the subject of the token. This value is not guaranteed to\r\n * be unique within a tenant and is designed to be used only for display purposes.\r\n */\r\n unique_name: string;\r\n /**\r\n * Contains a unique identifier of an object in Azure AD. This value is immutable and cannot be reassigned or\r\n * reused. Use the object ID to identify an object in queries to Azure AD.\r\n */\r\n oid: string;\r\n /**\r\n * Identifies the principal about which the token asserts information, such as the user of an application.\r\n * This value is immutable and cannot be reassigned or reused, so it can be used to perform authorization\r\n * checks safely. Because the subject is always present in the tokens the Azure AD issues, we recommended\r\n * using this value in a general-purpose authorization system.\r\n */\r\n sub: string;\r\n /**\r\n * An immutable, non-reusable identifier that identifies the directory tenant that issued the token. You can\r\n * use this value to access tenant-specific directory resources in a multitenant application. For example,\r\n * you can use this value to identify the tenant in a call to the Graph API.\r\n */\r\n tid: string;\r\n /**\r\n * Defines the time interval within which a token is valid. The service that validates the token should verify\r\n * that the current date is within the token lifetime; otherwise it should reject the token. The service might\r\n * allow for up to five minutes beyond the token lifetime to account for any differences in clock time (\"time\r\n * skew\") between Azure AD and the service.\r\n */\r\n exp: number;\r\n nbf: number;\r\n /**\r\n * Stores the user name of the user principal.\r\n */\r\n upn: string;\r\n /**\r\n * Stores the version number of the token.\r\n */\r\n ver: string;\r\n }\r\n}\r\n","import { TaskInfo } from './interfaces';\r\nimport { ensureInitialized, sendMessageRequest } from '../internal/internalAPIs';\r\nimport { GlobalVars } from '../internal/globalVars';\r\nimport { frameContexts } from '../internal/constants';\r\nimport { IAppWindow, ChildAppWindow } from './appWindow';\r\n\r\n/**\r\n * Namespace to interact with the task module-specific part of the SDK.\r\n * This object is usable only on the content frame.\r\n */\r\nexport namespace tasks {\r\n /**\r\n * Allows an app to open the task module.\r\n * @param taskInfo An object containing the parameters of the task module\r\n * @param submitHandler Handler to call when the task module is completed\r\n */\r\n export function startTask(taskInfo: TaskInfo, submitHandler?: (err: string, result: string) => void): IAppWindow {\r\n ensureInitialized(frameContexts.content);\r\n\r\n const messageId = sendMessageRequest(GlobalVars.parentWindow, 'tasks.startTask', [taskInfo]);\r\n GlobalVars.callbacks[messageId] = submitHandler;\r\n return new ChildAppWindow();\r\n }\r\n\r\n /**\r\n * Update height/width task info properties.\r\n * @param taskInfo An object containing width and height properties\r\n */\r\n export function updateTask(taskInfo: TaskInfo): void {\r\n ensureInitialized(frameContexts.content, frameContexts.task);\r\n const { width, height, ...extra } = taskInfo;\r\n\r\n if (!Object.keys(extra).length) {\r\n sendMessageRequest(GlobalVars.parentWindow, 'tasks.updateTask', [taskInfo]);\r\n } else {\r\n throw new Error('updateTask requires a taskInfo argument containing only width and height');\r\n }\r\n }\r\n\r\n /**\r\n * Submit the task module.\r\n * @param result Contains the result to be sent to the bot or the app. Typically a JSON object or a serialized version of it\r\n * @param appIds Helps to validate that the call originates from the same appId as the one that invoked the task module\r\n */\r\n export function submitTask(result?: string | object, appIds?: string | string[]): void {\r\n ensureInitialized(frameContexts.content, frameContexts.task);\r\n\r\n // Send tasks.completeTask instead of tasks.submitTask message for backward compatibility with Mobile clients\r\n sendMessageRequest(GlobalVars.parentWindow, 'tasks.completeTask', [\r\n result,\r\n Array.isArray(appIds) ? appIds : [appIds],\r\n ]);\r\n }\r\n}\r\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack://microsoftTeams/webpack/universalModuleDefinition","webpack://microsoftTeams/webpack/bootstrap","webpack://microsoftTeams/./src/internal/globalVars.ts","webpack://microsoftTeams/./src/internal/internalAPIs.ts","webpack://microsoftTeams/./src/internal/constants.ts","webpack://microsoftTeams/./src/internal/utils.ts","webpack://microsoftTeams/./src/public/publicAPIs.ts","webpack://microsoftTeams/./src/public/settings.ts","webpack://microsoftTeams/./src/private/logs.ts","webpack://microsoftTeams/./src/public/appWindow.ts","webpack://microsoftTeams/./src/index.ts","webpack://microsoftTeams/./src/private/index.ts","webpack://microsoftTeams/./src/private/bot.ts","webpack://microsoftTeams/./src/private/menus.ts","webpack://microsoftTeams/./src/private/privateAPIs.ts","webpack://microsoftTeams/./src/private/conversations.ts","webpack://microsoftTeams/./src/public/index.ts","webpack://microsoftTeams/./src/public/appInitialization.ts","webpack://microsoftTeams/./src/public/authentication.ts","webpack://microsoftTeams/./src/public/tasks.ts"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kDAA0C,gCAAgC;AAC1E;AACA;;AAEA;AACA;AACA;AACA,gEAAwD,kBAAkB;AAC1E;AACA,yDAAiD,cAAc;AAC/D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAyC,iCAAiC;AAC1E,wHAAgH,mBAAmB,EAAE;AACrI;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;;AAGA;AACA;;;;;;;;;;AChFA;IAAA;IAiCA,CAAC;IAhCe,2BAAgB,GAAY,KAAK,CAAC;IAClC,8BAAmB,GAAY,KAAK,CAAC;IACrC,iCAAsB,GAAa,EAAE,CAAC;IACtC,uCAA4B,GAAW,IAAI,CAAC;IAC5C,8BAAmB,GAAmB,EAAE,CAAC;IAGzC,4BAAiB,GAAY,KAAK,CAAC;IAKnC,6BAAkB,GAAqB,EAAE,CAAC;IAC1C,4BAAiB,GAAqB,EAAE,CAAC;IACzC,wBAAa,GAAW,CAAC,CAAC;IAC1B,mBAAQ,GAElB,EAAE,CAAC;IACO,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AAC;IANe,eAAS,YAMxB;IAED;;;OAGG;IACH,oBAA2B,QAAkB;QAC3C,gCAAiB,CAAC,yBAAa,CAAC,OAAO,EAAE,yBAAa,CAAC,IAAI,CAAC,CAAC;QACrD,0BAAK,EAAE,wBAAM,EAAE,6CAAQ,CAAc;QAE7C,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE;YAC9B,yCAA0B,CAAC,kBAAkB,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;SAC5D;aAAM;YACL,MAAM,IAAI,KAAK,CAAC,0EAA0E,CAAC,CAAC;SAC7F;IACH,CAAC;IATe,gBAAU,aASzB;IAED;;;;OAIG;IACH,oBAA2B,MAAwB,EAAE,MAA0B;QAC7E,gCAAiB,CAAC,yBAAa,CAAC,OAAO,EAAE,yBAAa,CAAC,IAAI,CAAC,CAAC;QAE7D,6GAA6G;QAC7G,yCAA0B,CAAC,oBAAoB,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IACxG,CAAC;IALe,gBAAU,aAKzB;AACH,CAAC,EAxCgB,KAAK,GAAL,aAAK,KAAL,aAAK,QAwCrB","file":"MicrosoftTeams.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"microsoftTeams\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"microsoftTeams\"] = factory();\n\telse\n\t\troot[\"microsoftTeams\"] = factory();\n})(window, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 8);\n","import { MessageRequest } from './interfaces';\r\nimport { ConversationResponse, LoadContext } from '../public/interfaces';\r\nexport class GlobalVars {\r\n public static initializeCalled: boolean = false;\r\n public static initializeCompleted: boolean = false;\r\n public static additionalValidOrigins: string[] = [];\r\n public static additionalValidOriginsRegexp: RegExp = null;\r\n public static initializeCallbacks: { (): void }[] = [];\r\n public static currentWindow: Window | any;\r\n public static parentWindow: Window | any;\r\n public static isFramelessWindow: boolean = false;\r\n public static parentOrigin: string;\r\n public static frameContext: string;\r\n public static childWindow: Window;\r\n public static childOrigin: string;\r\n public static parentMessageQueue: MessageRequest[] = [];\r\n public static childMessageQueue: MessageRequest[] = [];\r\n public static nextMessageId: number = 0;\r\n public static handlers: {\r\n [func: string]: Function;\r\n } = {};\r\n public static callbacks: {\r\n [id: number]: Function;\r\n } = {};\r\n public static hostClientType: string;\r\n public static printCapabilityEnabled: boolean = false;\r\n public static themeChangeHandler: (theme: string) => void;\r\n public static fullScreenChangeHandler: (isFullScreen: boolean) => void;\r\n public static backButtonPressHandler: () => boolean;\r\n public static loadHandler: (context: LoadContext) => void;\r\n public static beforeUnloadHandler: (readyToUnload: () => void) => boolean;\r\n public static changeSettingsHandler: () => void;\r\n public static onStartConversationHandler: (conversationResponse: ConversationResponse) => void;\r\n public static onCloseConversationHandler: (conversationResponse: ConversationResponse) => void;\r\n public static getLogHandler: () => string;\r\n}\r\n","import { navigateBack } from '../public/publicAPIs';\r\nimport { LoadContext } from '../public/interfaces';\r\nimport { validOriginRegExp, userOriginUrlValidationRegExp } from './constants';\r\nimport { GlobalVars } from './globalVars';\r\nimport { MessageResponse, MessageRequest, ExtendedWindow, DOMMessageEvent } from './interfaces';\r\nimport { generateRegExpFromUrls } from './utils';\r\n\r\n// ::::::::::::::::::::MicrosoftTeams SDK Internal :::::::::::::::::\r\nGlobalVars.handlers['themeChange'] = handleThemeChange;\r\nGlobalVars.handlers['fullScreenChange'] = handleFullScreenChange;\r\nGlobalVars.handlers['backButtonPress'] = handleBackButtonPress;\r\nGlobalVars.handlers['load'] = handleLoad;\r\nGlobalVars.handlers['beforeUnload'] = handleBeforeUnload;\r\nGlobalVars.handlers['changeSettings'] = handleChangeSettings;\r\nGlobalVars.handlers['startConversation'] = handleStartConversation;\r\nGlobalVars.handlers['closeConversation'] = handleCloseConversation;\r\n\r\nfunction handleStartConversation(\r\n subEntityId: string,\r\n conversationId: string,\r\n channelId: string,\r\n entityId: string,\r\n): void {\r\n if (GlobalVars.onStartConversationHandler) {\r\n GlobalVars.onStartConversationHandler({\r\n subEntityId: subEntityId,\r\n conversationId: conversationId,\r\n channelId: channelId,\r\n entityId: entityId,\r\n });\r\n }\r\n}\r\n\r\nfunction handleCloseConversation(\r\n subEntityId: string,\r\n conversationId?: string,\r\n channelId?: string,\r\n entityId?: string,\r\n): void {\r\n if (GlobalVars.onCloseConversationHandler) {\r\n GlobalVars.onCloseConversationHandler({\r\n subEntityId: subEntityId,\r\n conversationId: conversationId,\r\n channelId: channelId,\r\n entityId: entityId,\r\n });\r\n }\r\n}\r\n\r\nfunction handleThemeChange(theme: string): void {\r\n if (GlobalVars.themeChangeHandler) {\r\n GlobalVars.themeChangeHandler(theme);\r\n }\r\n\r\n if (GlobalVars.childWindow) {\r\n sendMessageEventToChild('themeChange', [theme]);\r\n }\r\n}\r\n\r\nfunction handleFullScreenChange(isFullScreen: boolean): void {\r\n if (GlobalVars.fullScreenChangeHandler) {\r\n GlobalVars.fullScreenChangeHandler(isFullScreen);\r\n }\r\n}\r\n\r\nfunction handleBackButtonPress(): void {\r\n if (!GlobalVars.backButtonPressHandler || !GlobalVars.backButtonPressHandler()) {\r\n navigateBack();\r\n }\r\n}\r\n\r\nfunction handleLoad(context: LoadContext): void {\r\n if (GlobalVars.loadHandler) {\r\n GlobalVars.loadHandler(context);\r\n }\r\n\r\n if (GlobalVars.childWindow) {\r\n sendMessageEventToChild('load', [context]);\r\n }\r\n}\r\n\r\nfunction handleBeforeUnload(): void {\r\n const readyToUnload = (): void => {\r\n sendMessageRequestToParent('readyToUnload', []);\r\n };\r\n\r\n if (!GlobalVars.beforeUnloadHandler || !GlobalVars.beforeUnloadHandler(readyToUnload)) {\r\n readyToUnload();\r\n }\r\n}\r\n\r\nfunction handleChangeSettings(): void {\r\n if (GlobalVars.changeSettingsHandler) {\r\n GlobalVars.changeSettingsHandler();\r\n }\r\n}\r\n\r\nexport function ensureInitialized(...expectedFrameContexts: string[]): void {\r\n if (!GlobalVars.initializeCalled) {\r\n throw new Error('The library has not yet been initialized');\r\n }\r\n\r\n if (GlobalVars.frameContext && expectedFrameContexts && expectedFrameContexts.length > 0) {\r\n let found = false;\r\n for (let i = 0; i < expectedFrameContexts.length; i++) {\r\n if (expectedFrameContexts[i] === GlobalVars.frameContext) {\r\n found = true;\r\n break;\r\n }\r\n }\r\n\r\n if (!found) {\r\n throw new Error(\"This call is not allowed in the '\" + GlobalVars.frameContext + \"' context\");\r\n }\r\n }\r\n}\r\n\r\nexport function processMessage(evt: DOMMessageEvent): void {\r\n // Process only if we received a valid message\r\n if (!evt || !evt.data || typeof evt.data !== 'object') {\r\n return;\r\n }\r\n\r\n // Process only if the message is coming from a different window and a valid origin\r\n // valid origins are either a pre-known\r\n const messageSource = evt.source || (evt.originalEvent && evt.originalEvent.source);\r\n const messageOrigin = evt.origin || (evt.originalEvent && evt.originalEvent.origin);\r\n if (!shouldProcessMessage(messageSource, messageOrigin)) {\r\n return;\r\n }\r\n\r\n // Update our parent and child relationships based on this message\r\n updateRelationships(messageSource, messageOrigin);\r\n\r\n // Handle the message\r\n if (messageSource === GlobalVars.parentWindow) {\r\n handleParentMessage(evt);\r\n } else if (messageSource === GlobalVars.childWindow) {\r\n handleChildMessage(evt);\r\n }\r\n}\r\n\r\n/**\r\n * Validates the message source and origin, if it should be processed\r\n */\r\nfunction shouldProcessMessage(messageSource: Window, messageOrigin: string): boolean {\r\n // Process if message source is a different window and if origin is either in\r\n // Teams' pre-known whitelist or supplied as valid origin by user during initialization\r\n if (GlobalVars.currentWindow && messageSource === GlobalVars.currentWindow) {\r\n return false;\r\n } else if (\r\n GlobalVars.currentWindow &&\r\n GlobalVars.currentWindow.location &&\r\n messageOrigin &&\r\n messageOrigin === GlobalVars.currentWindow.location.origin\r\n ) {\r\n return true;\r\n } else if (\r\n validOriginRegExp.test(messageOrigin.toLowerCase()) ||\r\n (GlobalVars.additionalValidOriginsRegexp &&\r\n GlobalVars.additionalValidOriginsRegexp.test(messageOrigin.toLowerCase()))\r\n ) {\r\n return true;\r\n }\r\n return false;\r\n}\r\n\r\nfunction updateRelationships(messageSource: Window, messageOrigin: string): void {\r\n // Determine whether the source of the message is our parent or child and update our\r\n // window and origin pointer accordingly\r\n if (!GlobalVars.parentWindow || messageSource === GlobalVars.parentWindow) {\r\n GlobalVars.parentWindow = messageSource;\r\n GlobalVars.parentOrigin = messageOrigin;\r\n } else if (!GlobalVars.childWindow || messageSource === GlobalVars.childWindow) {\r\n GlobalVars.childWindow = messageSource;\r\n GlobalVars.childOrigin = messageOrigin;\r\n }\r\n\r\n // Clean up pointers to closed parent and child windows\r\n if (GlobalVars.parentWindow && GlobalVars.parentWindow.closed) {\r\n GlobalVars.parentWindow = null;\r\n GlobalVars.parentOrigin = null;\r\n }\r\n if (GlobalVars.childWindow && GlobalVars.childWindow.closed) {\r\n GlobalVars.childWindow = null;\r\n GlobalVars.childOrigin = null;\r\n }\r\n\r\n // If we have any messages in our queue, send them now\r\n flushMessageQueue(GlobalVars.parentWindow);\r\n flushMessageQueue(GlobalVars.childWindow);\r\n}\r\n\r\nexport function handleParentMessage(evt: DOMMessageEvent): void {\r\n if ('id' in evt.data && typeof evt.data.id === 'number') {\r\n // Call any associated GlobalVars.callbacks\r\n const message = evt.data as MessageResponse;\r\n const callback = GlobalVars.callbacks[message.id];\r\n if (callback) {\r\n callback.apply(null, message.args);\r\n\r\n // Remove the callback to ensure that the callback is called only once and to free up memory.\r\n delete GlobalVars.callbacks[message.id];\r\n }\r\n } else if ('func' in evt.data && typeof evt.data.func === 'string') {\r\n // Delegate the request to the proper handler\r\n const message = evt.data as MessageRequest;\r\n const handler = GlobalVars.handlers[message.func];\r\n if (handler) {\r\n // We don't expect any handler to respond at this point\r\n handler.apply(this, message.args);\r\n }\r\n }\r\n}\r\n\r\nfunction handleChildMessage(evt: DOMMessageEvent): void {\r\n if ('id' in evt.data && 'func' in evt.data) {\r\n // Try to delegate the request to the proper handler, if defined\r\n const message = evt.data as MessageRequest;\r\n const handler = message.func ? GlobalVars.handlers[message.func] : null;\r\n if (handler) {\r\n const result = handler.apply(this, message.args);\r\n if (typeof result !== 'undefined') {\r\n sendMessageResponseToChild(message.id, Array.isArray(result) ? result : [result]);\r\n }\r\n } else {\r\n // No handler, proxy to parent\r\n const messageId = sendMessageRequestToParent(message.func, message.args);\r\n // tslint:disable-next-line:no-any\r\n GlobalVars.callbacks[messageId] = (...args: any[]): void => {\r\n if (GlobalVars.childWindow) {\r\n sendMessageResponseToChild(message.id, args);\r\n }\r\n };\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Processes the valid origins specifuied by the user, de-duplicates and converts them into a regexp\r\n * which is used later for message source/origin validation\r\n */\r\nexport function processAdditionalValidOrigins(validMessageOrigins: string[]): void {\r\n let combinedOriginUrls = GlobalVars.additionalValidOrigins.concat(\r\n validMessageOrigins.filter((_origin: string) => {\r\n return typeof _origin === 'string' && userOriginUrlValidationRegExp.test(_origin);\r\n }),\r\n );\r\n let dedupUrls: { [url: string]: boolean } = {};\r\n combinedOriginUrls = combinedOriginUrls.filter(_originUrl => {\r\n if (dedupUrls[_originUrl]) {\r\n return false;\r\n }\r\n dedupUrls[_originUrl] = true;\r\n return true;\r\n });\r\n GlobalVars.additionalValidOrigins = combinedOriginUrls;\r\n if (GlobalVars.additionalValidOrigins.length > 0) {\r\n GlobalVars.additionalValidOriginsRegexp = generateRegExpFromUrls(GlobalVars.additionalValidOrigins);\r\n } else {\r\n GlobalVars.additionalValidOriginsRegexp = null;\r\n }\r\n}\r\n\r\nfunction getTargetMessageQueue(targetWindow: Window): MessageRequest[] {\r\n return targetWindow === GlobalVars.parentWindow\r\n ? GlobalVars.parentMessageQueue\r\n : targetWindow === GlobalVars.childWindow\r\n ? GlobalVars.childMessageQueue\r\n : [];\r\n}\r\n\r\nfunction getTargetOrigin(targetWindow: Window): string {\r\n return targetWindow === GlobalVars.parentWindow\r\n ? GlobalVars.parentOrigin\r\n : targetWindow === GlobalVars.childWindow\r\n ? GlobalVars.childOrigin\r\n : null;\r\n}\r\n\r\nfunction flushMessageQueue(targetWindow: Window | any): void {\r\n const targetOrigin = getTargetOrigin(targetWindow);\r\n const targetMessageQueue = getTargetMessageQueue(targetWindow);\r\n while (targetWindow && targetOrigin && targetMessageQueue.length > 0) {\r\n targetWindow.postMessage(targetMessageQueue.shift(), targetOrigin);\r\n }\r\n}\r\n\r\nexport function waitForMessageQueue(targetWindow: Window, callback: () => void): void {\r\n const messageQueueMonitor = GlobalVars.currentWindow.setInterval(() => {\r\n if (getTargetMessageQueue(targetWindow).length === 0) {\r\n clearInterval(messageQueueMonitor);\r\n callback();\r\n }\r\n }, 100);\r\n}\r\n\r\n/**\r\n * Send a message to parent. Uses nativeInterface on mobile to communicate with parent context\r\n */\r\nexport function sendMessageRequestToParent(\r\n actionName: string,\r\n // tslint:disable-next-line: no-any\r\n args?: any[],\r\n): number {\r\n const targetWindow = GlobalVars.parentWindow;\r\n const request = createMessageRequest(actionName, args);\r\n if (GlobalVars.isFramelessWindow) {\r\n if (GlobalVars.currentWindow && GlobalVars.currentWindow.nativeInterface) {\r\n (GlobalVars.currentWindow as ExtendedWindow).nativeInterface.framelessPostMessage(JSON.stringify(request));\r\n }\r\n } else {\r\n const targetOrigin = getTargetOrigin(targetWindow);\r\n\r\n // If the target window isn't closed and we already know its origin, send the message right away; otherwise,\r\n // queue the message and send it after the origin is established\r\n if (targetWindow && targetOrigin) {\r\n targetWindow.postMessage(request, targetOrigin);\r\n } else {\r\n getTargetMessageQueue(targetWindow).push(request);\r\n }\r\n }\r\n return request.id;\r\n}\r\n\r\n/**\r\n * Send a response to child for a message request that was from child\r\n */\r\nfunction sendMessageResponseToChild(\r\n id: number,\r\n // tslint:disable-next-line:no-any\r\n args?: any[],\r\n): void {\r\n const targetWindow = GlobalVars.childWindow;\r\n const response = createMessageResponse(id, args);\r\n const targetOrigin = getTargetOrigin(targetWindow);\r\n if (targetWindow && targetOrigin) {\r\n targetWindow.postMessage(response, targetOrigin);\r\n }\r\n}\r\n\r\n/**\r\n * Send a custom message object that can be sent to child window,\r\n * instead of a response message to a child\r\n */\r\nexport function sendMessageEventToChild(\r\n actionName: string,\r\n // tslint:disable-next-line: no-any\r\n args?: any[],\r\n): void {\r\n const targetWindow = GlobalVars.childWindow;\r\n const customEvent = createMessageEvent(actionName, args);\r\n const targetOrigin = getTargetOrigin(targetWindow);\r\n\r\n // If the target window isn't closed and we already know its origin, send the message right away; otherwise,\r\n // queue the message and send it after the origin is established\r\n if (targetWindow && targetOrigin) {\r\n targetWindow.postMessage(customEvent, targetOrigin);\r\n } else {\r\n getTargetMessageQueue(targetWindow).push(customEvent);\r\n }\r\n}\r\n\r\n// tslint:disable-next-line:no-any\r\nfunction createMessageRequest(func: string, args: any[]): MessageRequest {\r\n return {\r\n id: GlobalVars.nextMessageId++,\r\n func: func,\r\n args: args || [],\r\n };\r\n}\r\n\r\n// tslint:disable-next-line:no-any\r\nfunction createMessageResponse(id: number, args: any[]): MessageResponse {\r\n return {\r\n id: id,\r\n args: args || [],\r\n };\r\n}\r\n\r\n/**\r\n * Creates a message object without any id, used for custom actions being sent to child frame/window\r\n */\r\n// tslint:disable-next-line:no-any\r\nfunction createMessageEvent(func: string, args: any[]): MessageRequest {\r\n return {\r\n func: func,\r\n args: args || [],\r\n };\r\n}\r\n","import { generateRegExpFromUrls } from './utils';\r\n\r\nexport const version = '1.6.0';\r\n\r\nexport const validOrigins = [\r\n 'https://teams.microsoft.com',\r\n 'https://teams.microsoft.us',\r\n 'https://gov.teams.microsoft.us',\r\n 'https://dod.teams.microsoft.us',\r\n 'https://int.teams.microsoft.com',\r\n 'https://devspaces.skype.com',\r\n 'https://ssauth.skype.com',\r\n 'https://local.teams.office.com', // local development\r\n 'https://local.teams.office.com:8080', // local development\r\n 'https://msft.spoppe.com',\r\n 'https://*.sharepoint.com',\r\n 'https://*.sharepoint-df.com',\r\n 'https://*.sharepointonline.com',\r\n 'https://outlook.office.com',\r\n 'https://outlook-sdf.office.com',\r\n 'https://*.teams.microsoft.com',\r\n];\r\n\r\n// Ensure these declarations stay in sync with the framework.\r\nexport const frameContexts = {\r\n settings: 'settings',\r\n content: 'content',\r\n authentication: 'authentication',\r\n remove: 'remove',\r\n task: 'task',\r\n};\r\n\r\nexport const validOriginRegExp = generateRegExpFromUrls(validOrigins);\r\n\r\n/**\r\n * USer specified message origins should satisfy this test\r\n */\r\nexport const userOriginUrlValidationRegExp = /^https\\:\\/\\//;\r\n","// This will return a reg expression a given url\r\nfunction generateRegExpFromUrl(url: string): string {\r\n let urlRegExpPart = '^';\r\n const urlParts = url.split('.');\r\n for (let j = 0; j < urlParts.length; j++) {\r\n urlRegExpPart += (j > 0 ? '[.]' : '') + urlParts[j].replace('*', '[^/^.]+');\r\n }\r\n urlRegExpPart += '$';\r\n return urlRegExpPart;\r\n}\r\n\r\n// This will return a reg expression for list of url\r\nexport function generateRegExpFromUrls(urls: string[]): RegExp {\r\n let urlRegExp = '';\r\n for (let i = 0; i < urls.length; i++) {\r\n urlRegExp += (i === 0 ? '' : '|') + generateRegExpFromUrl(urls[i]);\r\n }\r\n return new RegExp(urlRegExp);\r\n}\r\n\r\nexport function getGenericOnCompleteHandler(errorMessage?: string): (success: boolean, reason?: string) => void {\r\n return (success: boolean, reason: string): void => {\r\n if (!success) {\r\n throw new Error(errorMessage ? errorMessage : reason);\r\n }\r\n };\r\n}\r\n","import {\r\n processMessage,\r\n ensureInitialized,\r\n sendMessageRequestToParent,\r\n handleParentMessage,\r\n processAdditionalValidOrigins,\r\n} from '../internal/internalAPIs';\r\nimport { GlobalVars } from '../internal/globalVars';\r\nimport { version, frameContexts } from '../internal/constants';\r\nimport { ExtendedWindow, DOMMessageEvent } from '../internal/interfaces';\r\nimport { settings } from './settings';\r\nimport {\r\n TabInformation,\r\n TabInstanceParameters,\r\n TabInstance,\r\n DeepLinkParameters,\r\n Context,\r\n LoadContext,\r\n FrameContext,\r\n} from './interfaces';\r\nimport { getGenericOnCompleteHandler } from '../internal/utils';\r\nimport { logs } from '../private/logs';\r\n\r\n// ::::::::::::::::::::::: MicrosoftTeams SDK public API ::::::::::::::::::::\r\n/**\r\n * Initializes the library. This must be called before any other SDK calls\r\n * but after the frame is loaded successfully.\r\n * @param callback Optionally specify a callback to invoke when Teams SDK has successfully initialized\r\n * @param validMessageOrigins Optionally specify a list of cross frame message origins. There must have\r\n * https: protocol otherwise they will be ignored. Example: https://www.example.com\r\n */\r\nexport function initialize(callback?: () => void, validMessageOrigins?: string[]): void {\r\n // Independent components might not know whether the SDK is initialized so might call it to be safe.\r\n // Just no-op if that happens to make it easier to use.\r\n if (!GlobalVars.initializeCalled) {\r\n GlobalVars.initializeCalled = true;\r\n\r\n // Listen for messages post to our window\r\n const messageListener = (evt: DOMMessageEvent): void => processMessage(evt);\r\n\r\n // If we are in an iframe, our parent window is the one hosting us (i.e., window.parent); otherwise,\r\n // it's the window that opened us (i.e., window.opener)\r\n GlobalVars.currentWindow = GlobalVars.currentWindow || window;\r\n GlobalVars.parentWindow =\r\n GlobalVars.currentWindow.parent !== GlobalVars.currentWindow.self\r\n ? GlobalVars.currentWindow.parent\r\n : GlobalVars.currentWindow.opener;\r\n\r\n if (!GlobalVars.parentWindow) {\r\n GlobalVars.isFramelessWindow = true;\r\n (window as ExtendedWindow).onNativeMessage = handleParentMessage;\r\n } else {\r\n // For iFrame scenario, add listener to listen 'message'\r\n GlobalVars.currentWindow.addEventListener('message', messageListener, false);\r\n }\r\n\r\n try {\r\n // Send the initialized message to any origin, because at this point we most likely don't know the origin\r\n // of the parent window, and this message contains no data that could pose a security risk.\r\n GlobalVars.parentOrigin = '*';\r\n const messageId = sendMessageRequestToParent('initialize', [version]);\r\n GlobalVars.callbacks[messageId] = (context: string, clientType: string) => {\r\n GlobalVars.frameContext = context;\r\n GlobalVars.hostClientType = clientType;\r\n\r\n // Notify all waiting callers that the initialization has completed\r\n GlobalVars.initializeCallbacks.forEach(initCallback => initCallback());\r\n GlobalVars.initializeCallbacks = [];\r\n GlobalVars.initializeCompleted = true;\r\n };\r\n } finally {\r\n GlobalVars.parentOrigin = null;\r\n }\r\n\r\n // Undocumented function used to clear state between unit tests\r\n this._uninitialize = () => {\r\n if (GlobalVars.frameContext) {\r\n registerOnThemeChangeHandler(null);\r\n registerFullScreenHandler(null);\r\n registerBackButtonHandler(null);\r\n registerBeforeUnloadHandler(null);\r\n registerOnLoadHandler(null);\r\n logs.registerGetLogHandler(null);\r\n }\r\n\r\n if (GlobalVars.frameContext === frameContexts.settings) {\r\n settings.registerOnSaveHandler(null);\r\n }\r\n\r\n if (GlobalVars.frameContext === frameContexts.remove) {\r\n settings.registerOnRemoveHandler(null);\r\n }\r\n\r\n if (!GlobalVars.isFramelessWindow) {\r\n GlobalVars.currentWindow.removeEventListener('message', messageListener, false);\r\n }\r\n\r\n GlobalVars.initializeCalled = false;\r\n GlobalVars.initializeCompleted = false;\r\n GlobalVars.initializeCallbacks = [];\r\n GlobalVars.additionalValidOrigins = [];\r\n GlobalVars.parentWindow = null;\r\n GlobalVars.parentOrigin = null;\r\n GlobalVars.parentMessageQueue = [];\r\n GlobalVars.childWindow = null;\r\n GlobalVars.childOrigin = null;\r\n GlobalVars.childMessageQueue = [];\r\n GlobalVars.nextMessageId = 0;\r\n GlobalVars.callbacks = {};\r\n GlobalVars.frameContext = null;\r\n GlobalVars.hostClientType = null;\r\n GlobalVars.isFramelessWindow = false;\r\n };\r\n }\r\n\r\n // Handle additional valid message origins if specified\r\n if (Array.isArray(validMessageOrigins)) {\r\n processAdditionalValidOrigins(validMessageOrigins);\r\n }\r\n\r\n // Handle the callback if specified:\r\n // 1. If initialization has already completed then just call it right away\r\n // 2. If initialization hasn't completed then add it to the array of callbacks\r\n // that should be invoked once initialization does complete\r\n if (callback) {\r\n GlobalVars.initializeCompleted ? callback() : GlobalVars.initializeCallbacks.push(callback);\r\n }\r\n}\r\n\r\n/**\r\n * @private\r\n * Hide from docs.\r\n * ------\r\n * Undocumented function used to set a mock window for unit tests\r\n */\r\nexport function _initialize(hostWindow: any): void {\r\n GlobalVars.currentWindow = hostWindow;\r\n}\r\n\r\n/**\r\n * @private\r\n * Hide from docs.\r\n * ------\r\n * Undocumented function used to clear state between unit tests\r\n */\r\nexport function _uninitialize(): void {}\r\n\r\n/**\r\n * Enable print capability to support printing page using Ctrl+P and cmd+P\r\n */\r\nexport function enablePrintCapability(): void {\r\n if (!GlobalVars.printCapabilityEnabled) {\r\n GlobalVars.printCapabilityEnabled = true;\r\n ensureInitialized();\r\n // adding ctrl+P and cmd+P handler\r\n document.addEventListener('keydown', (event: KeyboardEvent) => {\r\n if ((event.ctrlKey || event.metaKey) && event.keyCode === 80) {\r\n print();\r\n event.cancelBubble = true;\r\n event.preventDefault();\r\n event.stopImmediatePropagation();\r\n }\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * default print handler\r\n */\r\nexport function print(): void {\r\n window.print();\r\n}\r\n\r\n/**\r\n * Retrieves the current context the frame is running in.\r\n * @param callback The callback to invoke when the {@link Context} object is retrieved.\r\n */\r\nexport function getContext(callback: (context: Context) => void): void {\r\n ensureInitialized();\r\n\r\n const messageId = sendMessageRequestToParent('getContext');\r\n GlobalVars.callbacks[messageId] = callback;\r\n}\r\n\r\n/**\r\n * Registers a handler for theme changes.\r\n * Only one handler can be registered at a time. A subsequent registration replaces an existing registration.\r\n * @param handler The handler to invoke when the user changes their theme.\r\n */\r\nexport function registerOnThemeChangeHandler(handler: (theme: string) => void): void {\r\n ensureInitialized();\r\n GlobalVars.themeChangeHandler = handler;\r\n handler && sendMessageRequestToParent('registerHandler', ['themeChange']);\r\n}\r\n\r\n/**\r\n * Registers a handler for changes from or to full-screen view for a tab.\r\n * Only one handler can be registered at a time. A subsequent registration replaces an existing registration.\r\n * @param handler The handler to invoke when the user toggles full-screen view for a tab.\r\n */\r\nexport function registerFullScreenHandler(handler: (isFullScreen: boolean) => void): void {\r\n ensureInitialized();\r\n\r\n GlobalVars.fullScreenChangeHandler = handler;\r\n handler && sendMessageRequestToParent('registerHandler', ['fullScreen']);\r\n}\r\n\r\n/**\r\n * Registers a handler for user presses of the Team client's back button. Experiences that maintain an internal\r\n * navigation stack should use this handler to navigate the user back within their frame. If an app finds\r\n * that after running its back button handler it cannot handle the event it should call the navigateBack\r\n * method to ask the Teams client to handle it instead.\r\n * @param handler The handler to invoke when the user presses their Team client's back button.\r\n */\r\nexport function registerBackButtonHandler(handler: () => boolean): void {\r\n ensureInitialized();\r\n\r\n GlobalVars.backButtonPressHandler = handler;\r\n handler && sendMessageRequestToParent('registerHandler', ['backButton']);\r\n}\r\n\r\n/**\r\n * Navigates back in the Teams client. See registerBackButtonHandler for more information on when\r\n * it's appropriate to use this method.\r\n */\r\nexport function navigateBack(onComplete?: (status: boolean, reason?: string) => void): void {\r\n ensureInitialized();\r\n\r\n const messageId = sendMessageRequestToParent('navigateBack', []);\r\n const errorMessage = 'Back navigation is not supported in the current client or context.';\r\n GlobalVars.callbacks[messageId] = onComplete ? onComplete : getGenericOnCompleteHandler(errorMessage);\r\n}\r\n\r\n/**\r\n * @private\r\n * Registers a handler to be called when the page has been requested to load.\r\n * @param handler The handler to invoke when the page is loaded.\r\n */\r\nexport function registerOnLoadHandler(handler: (context: LoadContext) => void): void {\r\n ensureInitialized();\r\n\r\n GlobalVars.loadHandler = handler;\r\n handler && sendMessageRequestToParent('registerHandler', ['load']);\r\n}\r\n\r\n/**\r\n * @private\r\n * Registers a handler to be called before the page is unloaded.\r\n * @param handler The handler to invoke before the page is unloaded. If this handler returns true the page should\r\n * invoke the readyToUnload function provided to it once it's ready to be unloaded.\r\n */\r\nexport function registerBeforeUnloadHandler(handler: (readyToUnload: () => void) => boolean): void {\r\n ensureInitialized();\r\n\r\n GlobalVars.beforeUnloadHandler = handler;\r\n handler && sendMessageRequestToParent('registerHandler', ['beforeUnload']);\r\n}\r\n\r\n/**\r\n * Registers a handler for when the user reconfigurated tab\r\n * @param handler The handler to invoke when the user click on Settings.\r\n */\r\nexport function registerChangeSettingsHandler(handler: () => void): void {\r\n ensureInitialized(frameContexts.content);\r\n\r\n GlobalVars.changeSettingsHandler = handler;\r\n handler && sendMessageRequestToParent('registerHandler', ['changeSettings']);\r\n}\r\n\r\n/**\r\n * Navigates the frame to a new cross-domain URL. The domain of this URL must match at least one of the\r\n * valid domains specified in the validDomains block of the manifest; otherwise, an exception will be\r\n * thrown. This function needs to be used only when navigating the frame to a URL in a different domain\r\n * than the current one in a way that keeps the app informed of the change and allows the SDK to\r\n * continue working.\r\n * @param url The URL to navigate the frame to.\r\n */\r\nexport function navigateCrossDomain(url: string, onComplete?: (status: boolean, reason?: string) => void): void {\r\n ensureInitialized(frameContexts.content, frameContexts.settings, frameContexts.remove, frameContexts.task);\r\n\r\n const messageId = sendMessageRequestToParent('navigateCrossDomain', [url]);\r\n const errorMessage =\r\n 'Cross-origin navigation is only supported for URLs matching the pattern registered in the manifest.';\r\n GlobalVars.callbacks[messageId] = onComplete ? onComplete : getGenericOnCompleteHandler(errorMessage);\r\n}\r\n\r\n/**\r\n * Allows an app to retrieve for this user tabs that are owned by this app.\r\n * If no TabInstanceParameters are passed, the app defaults to favorite teams and favorite channels.\r\n * @param callback The callback to invoke when the {@link TabInstanceParameters} object is retrieved.\r\n * @param tabInstanceParameters OPTIONAL Flags that specify whether to scope call to favorite teams or channels.\r\n */\r\nexport function getTabInstances(\r\n callback: (tabInfo: TabInformation) => void,\r\n tabInstanceParameters?: TabInstanceParameters,\r\n): void {\r\n ensureInitialized();\r\n\r\n const messageId = sendMessageRequestToParent('getTabInstances', [tabInstanceParameters]);\r\n GlobalVars.callbacks[messageId] = callback;\r\n}\r\n\r\n/**\r\n * Allows an app to retrieve the most recently used tabs for this user.\r\n * @param callback The callback to invoke when the {@link TabInformation} object is retrieved.\r\n * @param tabInstanceParameters OPTIONAL Ignored, kept for future use\r\n */\r\nexport function getMruTabInstances(\r\n callback: (tabInfo: TabInformation) => void,\r\n tabInstanceParameters?: TabInstanceParameters,\r\n): void {\r\n ensureInitialized();\r\n\r\n const messageId = sendMessageRequestToParent('getMruTabInstances', [tabInstanceParameters]);\r\n GlobalVars.callbacks[messageId] = callback;\r\n}\r\n\r\n/**\r\n * Shares a deep link that a user can use to navigate back to a specific state in this page.\r\n * @param deepLinkParameters ID and label for the link and fallback URL.\r\n */\r\nexport function shareDeepLink(deepLinkParameters: DeepLinkParameters): void {\r\n ensureInitialized(frameContexts.content);\r\n\r\n sendMessageRequestToParent('shareDeepLink', [\r\n deepLinkParameters.subEntityId,\r\n deepLinkParameters.subEntityLabel,\r\n deepLinkParameters.subEntityWebUrl,\r\n ]);\r\n}\r\n\r\n/**\r\n * execute deep link API.\r\n * @param deepLink deep link.\r\n */\r\nexport function executeDeepLink(deepLink: string, onComplete?: (status: boolean, reason?: string) => void): void {\r\n ensureInitialized(frameContexts.content, frameContexts.task);\r\n const messageId = sendMessageRequestToParent('executeDeepLink', [deepLink]);\r\n GlobalVars.callbacks[messageId] = onComplete ? onComplete : getGenericOnCompleteHandler();\r\n}\r\n\r\n/**\r\n * Navigates the Microsoft Teams app to the specified tab instance.\r\n * @param tabInstance The tab instance to navigate to.\r\n */\r\nexport function navigateToTab(tabInstance: TabInstance, onComplete?: (status: boolean, reason?: string) => void): void {\r\n ensureInitialized();\r\n\r\n const messageId = sendMessageRequestToParent('navigateToTab', [tabInstance]);\r\n\r\n const errorMessage = 'Invalid internalTabInstanceId and/or channelId were/was provided';\r\n GlobalVars.callbacks[messageId] = onComplete ? onComplete : getGenericOnCompleteHandler(errorMessage);\r\n}\r\n\r\nexport function setFrameContext(frameContext: FrameContext): void {\r\n ensureInitialized(frameContexts.content);\r\n sendMessageRequestToParent('setFrameContext', [frameContext]);\r\n}\r\n\r\nexport function initializeWithFrameContext(\r\n frameContext: FrameContext,\r\n callback?: () => void,\r\n validMessageOrigins?: string[],\r\n): void {\r\n initialize(callback, validMessageOrigins);\r\n setFrameContext(frameContext);\r\n}\r\n","import { ensureInitialized, sendMessageRequestToParent } from '../internal/internalAPIs';\r\nimport { GlobalVars } from '../internal/globalVars';\r\nimport { frameContexts } from '../internal/constants';\r\nimport { getGenericOnCompleteHandler } from '../internal/utils';\r\n\r\n/**\r\n * Namespace to interact with the settings-specific part of the SDK.\r\n * This object is usable only on the settings frame.\r\n */\r\nexport namespace settings {\r\n let saveHandler: (evt: SaveEvent) => void;\r\n let removeHandler: (evt: RemoveEvent) => void;\r\n GlobalVars.handlers['settings.save'] = handleSave;\r\n GlobalVars.handlers['settings.remove'] = handleRemove;\r\n\r\n /**\r\n * Sets the validity state for the settings.\r\n * The initial value is false, so the user cannot save the settings until this is called with true.\r\n * @param validityState Indicates whether the save or remove button is enabled for the user.\r\n */\r\n export function setValidityState(validityState: boolean): void {\r\n ensureInitialized(frameContexts.settings, frameContexts.remove);\r\n sendMessageRequestToParent('settings.setValidityState', [validityState]);\r\n }\r\n\r\n /**\r\n * Gets the settings for the current instance.\r\n * @param callback The callback to invoke when the {@link Settings} object is retrieved.\r\n */\r\n export function getSettings(callback: (instanceSettings: Settings) => void): void {\r\n ensureInitialized(frameContexts.content, frameContexts.settings, frameContexts.remove);\r\n const messageId = sendMessageRequestToParent('settings.getSettings');\r\n GlobalVars.callbacks[messageId] = callback;\r\n }\r\n\r\n /**\r\n * Sets the settings for the current instance.\r\n * This is an asynchronous operation; calls to getSettings are not guaranteed to reflect the changed state.\r\n * @param settings The desired settings for this instance.\r\n */\r\n export function setSettings(\r\n instanceSettings: Settings,\r\n onComplete?: (status: boolean, reason?: string) => void,\r\n ): void {\r\n ensureInitialized(frameContexts.content, frameContexts.settings);\r\n const messageId = sendMessageRequestToParent('settings.setSettings', [instanceSettings]);\r\n GlobalVars.callbacks[messageId] = onComplete ? onComplete : getGenericOnCompleteHandler();\r\n }\r\n\r\n /**\r\n * Registers a handler for when the user attempts to save the settings. This handler should be used\r\n * to create or update the underlying resource powering the content.\r\n * The object passed to the handler must be used to notify whether to proceed with the save.\r\n * Only one handler can be registered at a time. A subsequent registration replaces an existing registration.\r\n * @param handler The handler to invoke when the user selects the save button.\r\n */\r\n export function registerOnSaveHandler(handler: (evt: SaveEvent) => void): void {\r\n ensureInitialized(frameContexts.settings);\r\n saveHandler = handler;\r\n handler && sendMessageRequestToParent('registerHandler', ['save']);\r\n }\r\n\r\n /**\r\n * Registers a handler for user attempts to remove content. This handler should be used\r\n * to remove the underlying resource powering the content.\r\n * The object passed to the handler must be used to indicate whether to proceed with the removal.\r\n * Only one handler may be registered at a time. Subsequent registrations will override the first.\r\n * @param handler The handler to invoke when the user selects the remove button.\r\n */\r\n export function registerOnRemoveHandler(handler: (evt: RemoveEvent) => void): void {\r\n ensureInitialized(frameContexts.remove);\r\n removeHandler = handler;\r\n handler && sendMessageRequestToParent('registerHandler', ['remove']);\r\n }\r\n\r\n function handleSave(result?: SaveParameters): void {\r\n const saveEvent = new SaveEventImpl(result);\r\n if (saveHandler) {\r\n saveHandler(saveEvent);\r\n } else {\r\n // If no handler is registered, we assume success.\r\n saveEvent.notifySuccess();\r\n }\r\n }\r\n\r\n export interface Settings {\r\n /**\r\n * A suggested display name for the new content.\r\n * In the settings for an existing instance being updated, this call has no effect.\r\n */\r\n suggestedDisplayName?: string;\r\n /**\r\n * Sets the URL to use for the content of this instance.\r\n */\r\n contentUrl: string;\r\n /**\r\n * Sets the URL for the removal configuration experience.\r\n */\r\n removeUrl?: string;\r\n /**\r\n * Sets the URL to use for the external link to view the underlying resource in a browser.\r\n */\r\n websiteUrl?: string;\r\n /**\r\n * The developer-defined unique ID for the entity to which this content points.\r\n */\r\n entityId: string;\r\n }\r\n\r\n export interface SaveEvent {\r\n /**\r\n * Object containing properties passed as arguments to the settings.save event.\r\n */\r\n result: SaveParameters;\r\n /**\r\n * Indicates that the underlying resource has been created and the settings can be saved.\r\n */\r\n notifySuccess(): void;\r\n /**\r\n * Indicates that creation of the underlying resource failed and that the settings cannot be saved.\r\n * @param reason Specifies a reason for the failure. If provided, this string is displayed to the user; otherwise a generic error is displayed.\r\n */\r\n notifyFailure(reason?: string): void;\r\n }\r\n\r\n export interface RemoveEvent {\r\n /**\r\n * Indicates that the underlying resource has been removed and the content can be removed.\r\n */\r\n notifySuccess(): void;\r\n /**\r\n * Indicates that removal of the underlying resource failed and that the content cannot be removed.\r\n * @param reason Specifies a reason for the failure. If provided, this string is displayed to the user; otherwise a generic error is displayed.\r\n */\r\n notifyFailure(reason?: string): void;\r\n }\r\n\r\n export interface SaveParameters {\r\n /**\r\n * Connector's webhook Url returned as arguments to settings.save event as part of user clicking on Save\r\n */\r\n webhookUrl?: string;\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs, since this class is not directly used.\r\n */\r\n class SaveEventImpl implements SaveEvent {\r\n public notified: boolean = false;\r\n public result: SaveParameters;\r\n public constructor(result?: SaveParameters) {\r\n this.result = result ? result : {};\r\n }\r\n public notifySuccess(): void {\r\n this.ensureNotNotified();\r\n sendMessageRequestToParent('settings.save.success');\r\n this.notified = true;\r\n }\r\n public notifyFailure(reason?: string): void {\r\n this.ensureNotNotified();\r\n sendMessageRequestToParent('settings.save.failure', [reason]);\r\n this.notified = true;\r\n }\r\n private ensureNotNotified(): void {\r\n if (this.notified) {\r\n throw new Error('The SaveEvent may only notify success or failure once.');\r\n }\r\n }\r\n }\r\n\r\n function handleRemove(): void {\r\n const removeEvent = new RemoveEventImpl();\r\n if (removeHandler) {\r\n removeHandler(removeEvent);\r\n } else {\r\n // If no handler is registered, we assume success.\r\n removeEvent.notifySuccess();\r\n }\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs, since this class is not directly used.\r\n */\r\n class RemoveEventImpl implements RemoveEvent {\r\n public notified: boolean = false;\r\n\r\n public notifySuccess(): void {\r\n this.ensureNotNotified();\r\n sendMessageRequestToParent('settings.remove.success');\r\n this.notified = true;\r\n }\r\n\r\n public notifyFailure(reason?: string): void {\r\n this.ensureNotNotified();\r\n sendMessageRequestToParent('settings.remove.failure', [reason]);\r\n this.notified = true;\r\n }\r\n\r\n private ensureNotNotified(): void {\r\n if (this.notified) {\r\n throw new Error('The removeEvent may only notify success or failure once.');\r\n }\r\n }\r\n }\r\n}\r\n","import { ensureInitialized, sendMessageRequestToParent } from '../internal/internalAPIs';\r\nimport { GlobalVars } from '../internal/globalVars';\r\n\r\n/**\r\n * Namespace to interact with the logging part of the SDK.\r\n * This object is used to send the app logs on demand to the host client\r\n *\r\n * @private\r\n * Hide from docs\r\n */\r\nexport namespace logs {\r\n GlobalVars.handlers['log.request'] = handleGetLogRequest;\r\n\r\n function handleGetLogRequest(): void {\r\n if (GlobalVars.getLogHandler) {\r\n const log: string = GlobalVars.getLogHandler();\r\n sendMessageRequestToParent('log.receive', [log]);\r\n }\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n * ------\r\n * Registers a handler for getting app log\r\n * @param handler The handler to invoke to get the app log\r\n */\r\n export function registerGetLogHandler(handler: () => string): void {\r\n ensureInitialized();\r\n\r\n GlobalVars.getLogHandler = handler;\r\n handler && sendMessageRequestToParent('registerHandler', ['log.request']);\r\n }\r\n}\r\n","import { ensureInitialized, sendMessageRequestToParent } from '../internal/internalAPIs';\r\nimport { GlobalVars } from '../internal/globalVars';\r\nimport { frameContexts } from '../internal/constants';\r\nimport { getGenericOnCompleteHandler } from '../internal/utils';\r\n\r\nexport interface IAppWindow {\r\n postMessage(message): void;\r\n addEventListener(type: string, listener: Function): void;\r\n}\r\n\r\nexport class ChildAppWindow implements IAppWindow {\r\n public postMessage(message: any, onComplete?: (status: boolean, reason?: string) => void): void {\r\n ensureInitialized();\r\n const messageId = sendMessageRequestToParent('messageForChild', [message]);\r\n GlobalVars.callbacks[messageId] = onComplete ? onComplete : getGenericOnCompleteHandler();\r\n }\r\n\r\n public addEventListener(type: string, listener: (message: any) => void): void {\r\n if (type === 'message') {\r\n GlobalVars.handlers['messageForParent'] = listener;\r\n }\r\n }\r\n}\r\n\r\nexport class ParentAppWindow implements IAppWindow {\r\n private static _instance: ParentAppWindow;\r\n public static get Instance(): IAppWindow {\r\n // Do you need arguments? Make it a regular method instead.\r\n return this._instance || (this._instance = new this());\r\n }\r\n\r\n public postMessage(message: any, onComplete?: (status: boolean, reason?: string) => void): void {\r\n ensureInitialized(frameContexts.task);\r\n const messageId = sendMessageRequestToParent('messageForParent', [message]);\r\n\r\n GlobalVars.callbacks[messageId] = onComplete ? onComplete : getGenericOnCompleteHandler();\r\n }\r\n\r\n public addEventListener(type: string, listener: (message: any) => void): void {\r\n if (type === 'message') {\r\n GlobalVars.handlers['messageForChild'] = listener;\r\n }\r\n }\r\n}\r\n","export * from './private/index';\r\nexport * from './public/index';\r\n","export { bot } from './bot';\r\nexport { menus } from './menus';\r\nexport { logs } from './logs';\r\nexport {\r\n ChatMembersInformation,\r\n FilePreviewParameters,\r\n NotificationTypes,\r\n ShowNotificationParameters,\r\n TeamInstanceParameters,\r\n ThreadMember,\r\n UserJoinedTeamsInformation,\r\n} from './interfaces';\r\nexport {\r\n enterFullscreen,\r\n exitFullscreen,\r\n getChatMembers,\r\n getConfigSetting,\r\n getUserJoinedTeams,\r\n openFilePreview,\r\n sendCustomMessage,\r\n showNotification,\r\n sendCustomEvent,\r\n registerCustomHandler,\r\n uploadCustomApp,\r\n} from './privateAPIs';\r\nexport { conversations } from './conversations';\r\n","import { GlobalVars } from '../internal/globalVars';\r\nimport { ensureInitialized, sendMessageRequestToParent } from '../internal/internalAPIs';\r\n\r\n/**\r\n * @private\r\n * Namespace to interact with bots using the SDK.\r\n */\r\nexport namespace bot {\r\n /**\r\n * @private\r\n * Hide from docs until release.\r\n * ------\r\n * Sends query to bot in order to retrieve data.\r\n * @param botRequest query to send to bot.\r\n * @param onSuccess callback to invoke when data is retrieved from bot\r\n * @param onError callback to invoke should an error occur\r\n */\r\n export function sendQuery(\r\n botRequest: QueryRequest,\r\n onSuccess?: (data: QueryResponse) => void,\r\n onError?: (error: string) => void,\r\n ): void {\r\n ensureInitialized();\r\n\r\n const messageId = sendMessageRequestToParent('bot.executeQuery', [botRequest]);\r\n\r\n GlobalVars.callbacks[messageId] = (success: boolean, response: string | QueryResponse) => {\r\n if (success) {\r\n onSuccess(response as QueryResponse);\r\n } else {\r\n onError(response as string);\r\n }\r\n };\r\n }\r\n /**\r\n * @private\r\n * Hide from docs until release.\r\n * -----\r\n * Retrieves list of support commands from bot\r\n * @param onSuccess callback to invoke when data is retrieved from bot\r\n * @param onError callback to invoke should an error occur\r\n */\r\n export function getSupportedCommands(\r\n onSuccess?: (response: Command[]) => void,\r\n onError?: (error: string) => void,\r\n ): void {\r\n ensureInitialized();\r\n\r\n const messageId = sendMessageRequestToParent('bot.getSupportedCommands');\r\n\r\n GlobalVars.callbacks[messageId] = (success: boolean, response: string | Command[]) => {\r\n if (success) {\r\n onSuccess(response as Command[]);\r\n } else {\r\n onError(response as string);\r\n }\r\n };\r\n }\r\n /**\r\n * @private\r\n * Hide from docs until release.\r\n * -----\r\n * Authenticates a user for json tab\r\n * @param authRequest callback to invoke when data is retrieved from bot\r\n * @param onSuccess callback to invoke when user is authenticated\r\n * @param onError callback to invoke should an error occur\r\n */\r\n export function authenticate(\r\n authRequest: AuthQueryRequest,\r\n onSuccess?: (results: Results) => void,\r\n onError?: (error: string) => void,\r\n ): void {\r\n ensureInitialized();\r\n\r\n const messageId = sendMessageRequestToParent('bot.authenticate', [authRequest]);\r\n\r\n GlobalVars.callbacks[messageId] = (success: boolean, response: string | Results) => {\r\n if (success) {\r\n onSuccess(response as Results);\r\n } else {\r\n onError(response as string);\r\n }\r\n };\r\n }\r\n\r\n export interface QueryRequest {\r\n /**\r\n * Query to search for\r\n */\r\n query: string;\r\n commandId?: string;\r\n option?: {\r\n skip: number;\r\n count: number;\r\n };\r\n }\r\n\r\n export interface QueryResponse {\r\n data: Results | Auth;\r\n type: ResponseType;\r\n }\r\n\r\n export interface Results {\r\n attachments: Attachment[];\r\n layout: any;\r\n botId: string;\r\n }\r\n\r\n export interface Auth {\r\n url: string;\r\n title: string;\r\n }\r\n\r\n export interface AuthQueryRequest extends QueryRequest {\r\n url: string;\r\n }\r\n\r\n export interface Attachment {\r\n card: any;\r\n previewCard: any;\r\n previewRawPayload: any;\r\n rawPayload: any;\r\n }\r\n\r\n export interface Command {\r\n title: string;\r\n id: string;\r\n initialRun: boolean;\r\n }\r\n\r\n export enum ResponseType {\r\n Results = 'Results',\r\n Auth = 'Auth',\r\n }\r\n}\r\n","import { ensureInitialized, sendMessageRequestToParent } from '../internal/internalAPIs';\r\nimport { GlobalVars } from '../internal/globalVars';\r\n/**\r\n * Namespace to interact with the menu-specific part of the SDK.\r\n * This object is used to show View Configuration, Action Menu and Navigation Bar Menu.\r\n *\r\n * @private\r\n * Hide from docs until feature is complete\r\n */\r\nexport namespace menus {\r\n /**\r\n * Represents information about item in View Configuration.\r\n */\r\n export interface ViewConfiguration {\r\n /**\r\n * Unique identifier of view.\r\n */\r\n id: string;\r\n /**\r\n * Display title of the view.\r\n */\r\n title: string;\r\n /**\r\n * Additional information for accessibility.\r\n */\r\n contentDescription?: string;\r\n }\r\n /**\r\n * Represents information about menu item for Action Menu and Navigation Bar Menu.\r\n */\r\n export class MenuItem {\r\n /**\r\n * Unique identifier for the menu item.\r\n */\r\n public id: string;\r\n /**\r\n * Display title of the menu item.\r\n */\r\n public title: string;\r\n /**\r\n * Display icon of the menu item. The icon value must be a string having SVG icon content.\r\n */\r\n public icon?: string;\r\n /**\r\n * Selected state display icon of the menu item. The icon value must be a string having SVG icon content.\r\n */\r\n public iconSelected?: string;\r\n /**\r\n * Additional information for accessibility.\r\n */\r\n public contentDescription?: string;\r\n /**\r\n * State of the menu item\r\n */\r\n public enabled: boolean = true;\r\n /**\r\n * Interface to show list of items on selection of menu item.\r\n */\r\n public viewData: ViewData;\r\n }\r\n /**\r\n * Represents information about view to show on Navigation Bar Menu item selection\r\n */\r\n export interface ViewData {\r\n /**\r\n * Display header title of the item list.\r\n */\r\n listTitle?: string;\r\n /**\r\n * Type of the menu item.\r\n */\r\n listType: MenuListType;\r\n /**\r\n * Array of MenuItem. Icon value will be required for all items in the list.\r\n */\r\n listItems: MenuItem[];\r\n }\r\n /**\r\n * Represents information about type of list to display in Navigation Bar Menu.\r\n */\r\n export enum MenuListType {\r\n dropDown = 'dropDown',\r\n popOver = 'popOver',\r\n }\r\n let navBarMenuItemPressHandler: (id: string) => boolean;\r\n GlobalVars.handlers['navBarMenuItemPress'] = handleNavBarMenuItemPress;\r\n let actionMenuItemPressHandler: (id: string) => boolean;\r\n GlobalVars.handlers['actionMenuItemPress'] = handleActionMenuItemPress;\r\n let viewConfigItemPressHandler: (id: string) => boolean;\r\n GlobalVars.handlers['setModuleView'] = handleViewConfigItemPress;\r\n /**\r\n * Registers list of view configurations and it's handler.\r\n * Handler is responsible for listening selection of View Configuration.\r\n * @param viewConfig List of view configurations. Minimum 1 value is required.\r\n * @param handler The handler to invoke when the user selects view configuration.\r\n */\r\n export function setUpViews(viewConfig: ViewConfiguration[], handler: (id: string) => boolean): void {\r\n ensureInitialized();\r\n viewConfigItemPressHandler = handler;\r\n sendMessageRequestToParent('setUpViews', [viewConfig]);\r\n }\r\n function handleViewConfigItemPress(id: string): void {\r\n if (!viewConfigItemPressHandler || !viewConfigItemPressHandler(id)) {\r\n ensureInitialized();\r\n sendMessageRequestToParent('viewConfigItemPress', [id]);\r\n }\r\n }\r\n /**\r\n * Used to set menu items on the Navigation Bar. If icon is available, icon will be shown, otherwise title will be shown.\r\n * @param items List of MenuItems for Navigation Bar Menu.\r\n * @param handler The handler to invoke when the user selects menu item.\r\n */\r\n export function setNavBarMenu(items: MenuItem[], handler: (id: string) => boolean): void {\r\n ensureInitialized();\r\n navBarMenuItemPressHandler = handler;\r\n sendMessageRequestToParent('setNavBarMenu', [items]);\r\n }\r\n function handleNavBarMenuItemPress(id: string): void {\r\n if (!navBarMenuItemPressHandler || !navBarMenuItemPressHandler(id)) {\r\n ensureInitialized();\r\n sendMessageRequestToParent('handleNavBarMenuItemPress', [id]);\r\n }\r\n }\r\n export interface ActionMenuParameters {\r\n /**\r\n * Display title for Action Menu\r\n */\r\n title: string;\r\n /**\r\n * List of MenuItems for Action Menu\r\n */\r\n items: MenuItem[];\r\n }\r\n /**\r\n * Used to show Action Menu.\r\n * @param params Parameters for Menu Parameters\r\n * @param handler The handler to invoke when the user selects menu item.\r\n */\r\n export function showActionMenu(params: ActionMenuParameters, handler: (id: string) => boolean): void {\r\n ensureInitialized();\r\n actionMenuItemPressHandler = handler;\r\n sendMessageRequestToParent('showActionMenu', [params]);\r\n }\r\n function handleActionMenuItemPress(id: string): void {\r\n if (!actionMenuItemPressHandler || !actionMenuItemPressHandler(id)) {\r\n ensureInitialized();\r\n sendMessageRequestToParent('handleActionMenuItemPress', [id]);\r\n }\r\n }\r\n}\r\n","import { ensureInitialized, sendMessageRequestToParent, sendMessageEventToChild } from '../internal/internalAPIs';\r\nimport { GlobalVars } from '../internal/globalVars';\r\nimport { frameContexts } from '../internal/constants';\r\nimport {\r\n ChatMembersInformation,\r\n ShowNotificationParameters,\r\n FilePreviewParameters,\r\n TeamInstanceParameters,\r\n UserJoinedTeamsInformation,\r\n} from './interfaces';\r\nimport { getGenericOnCompleteHandler } from '../internal/utils';\r\n\r\n/**\r\n * @private\r\n * Hide from docs\r\n * ------\r\n * Allows an app to retrieve information of all user joined teams\r\n * @param callback The callback to invoke when the {@link TeamInstanceParameters} object is retrieved.\r\n * @param teamInstanceParameters OPTIONAL Flags that specify whether to scope call to favorite teams\r\n */\r\nexport function getUserJoinedTeams(\r\n callback: (userJoinedTeamsInformation: UserJoinedTeamsInformation) => void,\r\n teamInstanceParameters?: TeamInstanceParameters,\r\n): void {\r\n ensureInitialized();\r\n\r\n const messageId = sendMessageRequestToParent('getUserJoinedTeams', [teamInstanceParameters]);\r\n GlobalVars.callbacks[messageId] = callback;\r\n}\r\n\r\n/**\r\n * @private\r\n * Hide from docs\r\n * ------\r\n * Place the tab into full-screen mode.\r\n */\r\nexport function enterFullscreen(): void {\r\n ensureInitialized(frameContexts.content);\r\n sendMessageRequestToParent('enterFullscreen', []);\r\n}\r\n\r\n/**\r\n * @private\r\n * Hide from docs\r\n * ------\r\n * Reverts the tab into normal-screen mode.\r\n */\r\nexport function exitFullscreen(): void {\r\n ensureInitialized(frameContexts.content);\r\n sendMessageRequestToParent('exitFullscreen', []);\r\n}\r\n\r\n/**\r\n * @private\r\n * Hide from docs.\r\n * ------\r\n * Opens a client-friendly preview of the specified file.\r\n * @param file The file to preview.\r\n */\r\nexport function openFilePreview(filePreviewParameters: FilePreviewParameters): void {\r\n ensureInitialized(frameContexts.content);\r\n\r\n const params = [\r\n filePreviewParameters.entityId,\r\n filePreviewParameters.title,\r\n filePreviewParameters.description,\r\n filePreviewParameters.type,\r\n filePreviewParameters.objectUrl,\r\n filePreviewParameters.downloadUrl,\r\n filePreviewParameters.webPreviewUrl,\r\n filePreviewParameters.webEditUrl,\r\n filePreviewParameters.baseUrl,\r\n filePreviewParameters.editFile,\r\n filePreviewParameters.subEntityId,\r\n ];\r\n\r\n sendMessageRequestToParent('openFilePreview', params);\r\n}\r\n\r\n/**\r\n * @private\r\n * Hide from docs.\r\n * ------\r\n * display notification API.\r\n * @param message Notification message.\r\n * @param notificationType Notification type\r\n */\r\nexport function showNotification(showNotificationParameters: ShowNotificationParameters): void {\r\n ensureInitialized(frameContexts.content);\r\n const params = [showNotificationParameters.message, showNotificationParameters.notificationType];\r\n sendMessageRequestToParent('showNotification', params);\r\n}\r\n\r\n/**\r\n * @private\r\n * Hide from docs.\r\n * ------\r\n * Upload a custom App manifest directly to both team and personal scopes.\r\n * This method works just for the first party Apps.\r\n */\r\nexport function uploadCustomApp(manifestBlob: Blob, onComplete?: (status: boolean, reason?: string) => void): void {\r\n ensureInitialized();\r\n\r\n const messageId = sendMessageRequestToParent('uploadCustomApp', [manifestBlob]);\r\n GlobalVars.callbacks[messageId] = onComplete ? onComplete : getGenericOnCompleteHandler();\r\n}\r\n\r\n/**\r\n * @private\r\n * Internal use only\r\n * Sends a custom action MessageRequest to Teams or parent window\r\n * @param actionName Specifies name of the custom action to be sent\r\n * @param args Specifies additional arguments passed to the action\r\n * @param callback Optionally specify a callback to receive response parameters from the parent\r\n * @returns id of sent message\r\n */\r\nexport function sendCustomMessage(\r\n actionName: string,\r\n // tslint:disable-next-line:no-any\r\n args?: any[],\r\n // tslint:disable-next-line:no-any\r\n callback?: (...args: any[]) => void,\r\n): number {\r\n ensureInitialized();\r\n\r\n const messageId = sendMessageRequestToParent(actionName, args);\r\n if (typeof callback === 'function') {\r\n GlobalVars.callbacks[messageId] = (...args: any[]): void => {\r\n callback.apply(null, args);\r\n };\r\n }\r\n return messageId;\r\n}\r\n\r\n/**\r\n * @private\r\n * Internal use only\r\n * Sends a custom action MessageEvent to a child iframe/window, only if you are not using auth popup.\r\n * Otherwise it will go to the auth popup (which becomes the child)\r\n * @param actionName Specifies name of the custom action to be sent\r\n * @param args Specifies additional arguments passed to the action\r\n * @returns id of sent message\r\n */\r\nexport function sendCustomEvent(\r\n actionName: string,\r\n // tslint:disable-next-line:no-any\r\n args?: any[],\r\n): void {\r\n ensureInitialized();\r\n\r\n //validate childWindow\r\n if (!GlobalVars.childWindow) {\r\n throw new Error('The child window has not yet been initialized or is not present');\r\n }\r\n sendMessageEventToChild(actionName, args);\r\n}\r\n\r\n/**\r\n * @private\r\n * Internal use only\r\n * Adds a handler for an action sent by a child window or parent window\r\n * @param actionName Specifies name of the action message to handle\r\n * @param customHandler The callback to invoke when the action message is received. The return value is sent to the child\r\n */\r\nexport function registerCustomHandler(\r\n actionName: string,\r\n customHandler: (\r\n // tslint:disable-next-line:no-any\r\n ...args: any[]\r\n ) => any[],\r\n): void {\r\n ensureInitialized();\r\n GlobalVars.handlers[actionName] = (...args: any[]) => {\r\n return customHandler.apply(this, args);\r\n };\r\n}\r\n\r\n/**\r\n * @private\r\n * Hide from docs\r\n * ------\r\n * Allows an app to retrieve information of all chat members\r\n * Because a malicious party run your content in a browser, this value should\r\n * be used only as a hint as to who the members are and never as proof of membership.\r\n * @param callback The callback to invoke when the {@link ChatMembersInformation} object is retrieved.\r\n */\r\nexport function getChatMembers(callback: (chatMembersInformation: ChatMembersInformation) => void): void {\r\n ensureInitialized();\r\n\r\n const messageId = sendMessageRequestToParent('getChatMembers');\r\n GlobalVars.callbacks[messageId] = callback;\r\n}\r\n\r\n/**\r\n * @private\r\n * Hide from docs\r\n * ------\r\n * Allows an app to get the configuration setting value\r\n * @param callback The callback to invoke when the value is retrieved.\r\n * @param key The key for the config setting\r\n */\r\nexport function getConfigSetting(callback: (value: string) => void, key: string): void {\r\n ensureInitialized();\r\n\r\n const messageId = sendMessageRequestToParent('getConfigSetting', [key]);\r\n GlobalVars.callbacks[messageId] = callback;\r\n}\r\n","import { ensureInitialized, sendMessageRequestToParent } from '../internal/internalAPIs';\r\nimport { GlobalVars } from '../internal/globalVars';\r\nimport { frameContexts } from '../internal/constants';\r\nimport { OpenConversationRequest } from '../public/interfaces';\r\n\r\n/**\r\n * Namespace to interact with the conversational subEntities inside the tab\r\n */\r\nexport namespace conversations {\r\n /**\r\n * @private\r\n * Hide from docs\r\n * --------------\r\n * Allows the user to start or continue a conversation with each subentity inside the tab\r\n */\r\n export function openConversation(openConversationRequest: OpenConversationRequest): void {\r\n ensureInitialized(frameContexts.content);\r\n const messageId = sendMessageRequestToParent('conversations.openConversation', [\r\n {\r\n title: openConversationRequest.title,\r\n subEntityId: openConversationRequest.subEntityId,\r\n conversationId: openConversationRequest.conversationId,\r\n channelId: openConversationRequest.channelId,\r\n entityId: openConversationRequest.entityId,\r\n },\r\n ]);\r\n GlobalVars.onCloseConversationHandler = openConversationRequest.onCloseConversation;\r\n GlobalVars.onStartConversationHandler = openConversationRequest.onStartConversation;\r\n GlobalVars.callbacks[messageId] = (status: boolean, reason: string) => {\r\n if (!status) {\r\n throw new Error(reason);\r\n }\r\n };\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n * --------------\r\n * Allows the user to close the conversation in the right pane\r\n */\r\n export function closeConversation(): void {\r\n ensureInitialized(frameContexts.content);\r\n sendMessageRequestToParent('conversations.closeConversation');\r\n GlobalVars.onCloseConversationHandler = null;\r\n GlobalVars.onStartConversationHandler = null;\r\n }\r\n}\r\n","export { appInitialization } from './appInitialization';\r\nexport { authentication } from './authentication';\r\nexport { HostClientType, TaskModuleDimension, TeamType, UserTeamRole } from './constants';\r\nexport {\r\n Context,\r\n DeepLinkParameters,\r\n LoadContext,\r\n TabInformation,\r\n TabInstance,\r\n TabInstanceParameters,\r\n TaskInfo,\r\n TeamInformation,\r\n} from './interfaces';\r\nexport {\r\n enablePrintCapability,\r\n executeDeepLink,\r\n getContext,\r\n getMruTabInstances,\r\n getTabInstances,\r\n initialize,\r\n initializeWithFrameContext,\r\n navigateBack,\r\n navigateCrossDomain,\r\n navigateToTab,\r\n print,\r\n registerBackButtonHandler,\r\n registerBeforeUnloadHandler,\r\n registerChangeSettingsHandler,\r\n registerFullScreenHandler,\r\n registerOnLoadHandler,\r\n registerOnThemeChangeHandler,\r\n setFrameContext,\r\n shareDeepLink,\r\n} from './publicAPIs';\r\nexport { settings } from './settings';\r\nexport { tasks } from './tasks';\r\nexport { ChildAppWindow, IAppWindow, ParentAppWindow } from './appWindow';\r\n","import { ensureInitialized, sendMessageRequestToParent } from '../internal/internalAPIs';\r\nimport { version } from '../internal/constants';\r\n\r\nexport namespace appInitialization {\r\n /**\r\n * To notify app loaded to hide loading indicator\r\n */\r\n export function notifyAppLoaded(): void {\r\n ensureInitialized();\r\n sendMessageRequestToParent('appInitialization.appLoaded', [version]);\r\n }\r\n\r\n /**\r\n * To notify app Initialization successs and ready for user interaction\r\n */\r\n export function notifySuccess(): void {\r\n ensureInitialized();\r\n sendMessageRequestToParent('appInitialization.success', [version]);\r\n }\r\n\r\n /**\r\n * To notify app Initialization failed\r\n */\r\n export function notifyFailure(appInitializationFailedRequest: appInitialization.IFailedRequest): void {\r\n ensureInitialized();\r\n sendMessageRequestToParent('appInitialization.failure', [\r\n appInitializationFailedRequest.reason,\r\n appInitializationFailedRequest.message,\r\n ]);\r\n }\r\n\r\n export const enum FailedReason {\r\n AuthFailed = 'AuthFailed',\r\n Timeout = 'Timeout',\r\n Other = 'Other',\r\n }\r\n\r\n export interface IFailedRequest {\r\n reason: appInitialization.FailedReason;\r\n message?: string;\r\n }\r\n}\r\n","import {\r\n ensureInitialized,\r\n sendMessageRequestToParent,\r\n waitForMessageQueue,\r\n sendMessageEventToChild,\r\n} from '../internal/internalAPIs';\r\nimport { GlobalVars } from '../internal/globalVars';\r\nimport { frameContexts } from '../internal/constants';\r\nimport { HostClientType } from './constants';\r\n\r\n/**\r\n * Namespace to interact with the authentication-specific part of the SDK.\r\n * This object is used for starting or completing authentication flows.\r\n */\r\nexport namespace authentication {\r\n let authParams: AuthenticateParameters;\r\n let authWindowMonitor: number;\r\n GlobalVars.handlers['authentication.authenticate.success'] = handleSuccess;\r\n GlobalVars.handlers['authentication.authenticate.failure'] = handleFailure;\r\n\r\n /**\r\n * Registers the authentication GlobalVars.handlers\r\n * @param authenticateParameters A set of values that configure the authentication pop-up.\r\n */\r\n export function registerAuthenticationHandlers(authenticateParameters: AuthenticateParameters): void {\r\n authParams = authenticateParameters;\r\n }\r\n\r\n /**\r\n * Initiates an authentication request, which opens a new window with the specified settings.\r\n */\r\n export function authenticate(authenticateParameters?: AuthenticateParameters): void {\r\n const authenticateParams = authenticateParameters !== undefined ? authenticateParameters : authParams;\r\n ensureInitialized(frameContexts.content, frameContexts.settings, frameContexts.remove, frameContexts.task);\r\n if (\r\n GlobalVars.hostClientType === HostClientType.desktop ||\r\n GlobalVars.hostClientType === HostClientType.android ||\r\n GlobalVars.hostClientType === HostClientType.ios ||\r\n GlobalVars.hostClientType === HostClientType.rigel\r\n ) {\r\n // Convert any relative URLs into absolute URLs before sending them over to the parent window.\r\n const link = document.createElement('a');\r\n link.href = authenticateParams.url;\r\n // Ask the parent window to open an authentication window with the parameters provided by the caller.\r\n const messageId = sendMessageRequestToParent('authentication.authenticate', [\r\n link.href,\r\n authenticateParams.width,\r\n authenticateParams.height,\r\n ]);\r\n GlobalVars.callbacks[messageId] = (success: boolean, response: string) => {\r\n if (success) {\r\n authenticateParams.successCallback(response);\r\n } else {\r\n authenticateParams.failureCallback(response);\r\n }\r\n };\r\n } else {\r\n // Open an authentication window with the parameters provided by the caller.\r\n openAuthenticationWindow(authenticateParams);\r\n }\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs.\r\n * ------\r\n * Requests an Azure AD token to be issued on behalf of the app. The token is acquired from the cache\r\n * if it is not expired. Otherwise a request is sent to Azure AD to obtain a new token.\r\n * @param authTokenRequest A set of values that configure the token request.\r\n */\r\n export function getAuthToken(authTokenRequest: AuthTokenRequest): void {\r\n ensureInitialized();\r\n const messageId = sendMessageRequestToParent('authentication.getAuthToken', [authTokenRequest.resources]);\r\n GlobalVars.callbacks[messageId] = (success: boolean, result: string) => {\r\n if (success) {\r\n authTokenRequest.successCallback(result);\r\n } else {\r\n authTokenRequest.failureCallback(result);\r\n }\r\n };\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs.\r\n * ------\r\n * Requests the decoded Azure AD user identity on behalf of the app.\r\n */\r\n export function getUser(userRequest: UserRequest): void {\r\n ensureInitialized();\r\n const messageId = sendMessageRequestToParent('authentication.getUser');\r\n GlobalVars.callbacks[messageId] = (success: boolean, result: UserProfile | string) => {\r\n if (success) {\r\n userRequest.successCallback(result as UserProfile);\r\n } else {\r\n userRequest.failureCallback(result as string);\r\n }\r\n };\r\n }\r\n\r\n function closeAuthenticationWindow(): void {\r\n // Stop monitoring the authentication window\r\n stopAuthenticationWindowMonitor();\r\n // Try to close the authentication window and clear all properties associated with it\r\n try {\r\n if (GlobalVars.childWindow) {\r\n GlobalVars.childWindow.close();\r\n }\r\n } finally {\r\n GlobalVars.childWindow = null;\r\n GlobalVars.childOrigin = null;\r\n }\r\n }\r\n\r\n function openAuthenticationWindow(authenticateParameters: AuthenticateParameters): void {\r\n authParams = authenticateParameters;\r\n // Close the previously opened window if we have one\r\n closeAuthenticationWindow();\r\n // Start with a sensible default size\r\n let width = authParams.width || 600;\r\n let height = authParams.height || 400;\r\n // Ensure that the new window is always smaller than our app's window so that it never fully covers up our app\r\n width = Math.min(width, GlobalVars.currentWindow.outerWidth - 400);\r\n height = Math.min(height, GlobalVars.currentWindow.outerHeight - 200);\r\n // Convert any relative URLs into absolute URLs before sending them over to the parent window\r\n const link = document.createElement('a');\r\n link.href = authParams.url;\r\n // We are running in the browser, so we need to center the new window ourselves\r\n let left: number =\r\n typeof GlobalVars.currentWindow.screenLeft !== 'undefined'\r\n ? GlobalVars.currentWindow.screenLeft\r\n : GlobalVars.currentWindow.screenX;\r\n let top: number =\r\n typeof GlobalVars.currentWindow.screenTop !== 'undefined'\r\n ? GlobalVars.currentWindow.screenTop\r\n : GlobalVars.currentWindow.screenY;\r\n left += GlobalVars.currentWindow.outerWidth / 2 - width / 2;\r\n top += GlobalVars.currentWindow.outerHeight / 2 - height / 2;\r\n // Open a child window with a desired set of standard browser features\r\n GlobalVars.childWindow = GlobalVars.currentWindow.open(\r\n link.href,\r\n '_blank',\r\n 'toolbar=no, location=yes, status=no, menubar=no, scrollbars=yes, top=' +\r\n top +\r\n ', left=' +\r\n left +\r\n ', width=' +\r\n width +\r\n ', height=' +\r\n height,\r\n );\r\n if (GlobalVars.childWindow) {\r\n // Start monitoring the authentication window so that we can detect if it gets closed before the flow completes\r\n startAuthenticationWindowMonitor();\r\n } else {\r\n // If we failed to open the window, fail the authentication flow\r\n handleFailure('FailedToOpenWindow');\r\n }\r\n }\r\n\r\n function stopAuthenticationWindowMonitor(): void {\r\n if (authWindowMonitor) {\r\n clearInterval(authWindowMonitor);\r\n authWindowMonitor = 0;\r\n }\r\n delete GlobalVars.handlers['initialize'];\r\n delete GlobalVars.handlers['navigateCrossDomain'];\r\n }\r\n\r\n function startAuthenticationWindowMonitor(): void {\r\n // Stop the previous window monitor if one is running\r\n stopAuthenticationWindowMonitor();\r\n // Create an interval loop that\r\n // - Notifies the caller of failure if it detects that the authentication window is closed\r\n // - Keeps pinging the authentication window while it is open to re-establish\r\n // contact with any pages along the authentication flow that need to communicate\r\n // with us\r\n authWindowMonitor = GlobalVars.currentWindow.setInterval(() => {\r\n if (!GlobalVars.childWindow || GlobalVars.childWindow.closed) {\r\n handleFailure('CancelledByUser');\r\n } else {\r\n const savedChildOrigin = GlobalVars.childOrigin;\r\n try {\r\n GlobalVars.childOrigin = '*';\r\n sendMessageEventToChild('ping');\r\n } finally {\r\n GlobalVars.childOrigin = savedChildOrigin;\r\n }\r\n }\r\n }, 100);\r\n // Set up an initialize-message handler that gives the authentication window its frame context\r\n GlobalVars.handlers['initialize'] = () => {\r\n return [frameContexts.authentication, GlobalVars.hostClientType];\r\n };\r\n // Set up a navigateCrossDomain message handler that blocks cross-domain re-navigation attempts\r\n // in the authentication window. We could at some point choose to implement this method via a call to\r\n // authenticationWindow.location.href = url; however, we would first need to figure out how to\r\n // validate the URL against the tab's list of valid domains.\r\n GlobalVars.handlers['navigateCrossDomain'] = () => {\r\n return false;\r\n };\r\n }\r\n\r\n /**\r\n * Notifies the frame that initiated this authentication request that the request was successful.\r\n * This function is usable only on the authentication window.\r\n * This call causes the authentication window to be closed.\r\n * @param result Specifies a result for the authentication. If specified, the frame that initiated the authentication pop-up receives this value in its callback.\r\n * @param callbackUrl Specifies the url to redirect back to if the client is Win32 Outlook.\r\n */\r\n export function notifySuccess(result?: string, callbackUrl?: string): void {\r\n redirectIfWin32Outlook(callbackUrl, 'result', result);\r\n ensureInitialized(frameContexts.authentication);\r\n sendMessageRequestToParent('authentication.authenticate.success', [result]);\r\n // Wait for the message to be sent before closing the window\r\n waitForMessageQueue(GlobalVars.parentWindow, () => setTimeout(() => GlobalVars.currentWindow.close(), 200));\r\n }\r\n\r\n /**\r\n * Notifies the frame that initiated this authentication request that the request failed.\r\n * This function is usable only on the authentication window.\r\n * This call causes the authentication window to be closed.\r\n * @param result Specifies a result for the authentication. If specified, the frame that initiated the authentication pop-up receives this value in its callback.\r\n * @param callbackUrl Specifies the url to redirect back to if the client is Win32 Outlook.\r\n */\r\n export function notifyFailure(reason?: string, callbackUrl?: string): void {\r\n redirectIfWin32Outlook(callbackUrl, 'reason', reason);\r\n ensureInitialized(frameContexts.authentication);\r\n sendMessageRequestToParent('authentication.authenticate.failure', [reason]);\r\n // Wait for the message to be sent before closing the window\r\n waitForMessageQueue(GlobalVars.parentWindow, () => setTimeout(() => GlobalVars.currentWindow.close(), 200));\r\n }\r\n\r\n function handleSuccess(result?: string): void {\r\n try {\r\n if (authParams && authParams.successCallback) {\r\n authParams.successCallback(result);\r\n }\r\n } finally {\r\n authParams = null;\r\n closeAuthenticationWindow();\r\n }\r\n }\r\n\r\n function handleFailure(reason?: string): void {\r\n try {\r\n if (authParams && authParams.failureCallback) {\r\n authParams.failureCallback(reason);\r\n }\r\n } finally {\r\n authParams = null;\r\n closeAuthenticationWindow();\r\n }\r\n }\r\n\r\n /**\r\n * Validates that the callbackUrl param is a valid connector url, appends the result/reason and authSuccess/authFailure as URL fragments and redirects the window\r\n * @param callbackUrl - the connectors url to redirect to\r\n * @param key - \"result\" in case of success and \"reason\" in case of failure\r\n * @param value - the value of the passed result/reason parameter\r\n */\r\n function redirectIfWin32Outlook(callbackUrl?: string, key?: string, value?: string): void {\r\n if (callbackUrl) {\r\n const link = document.createElement('a');\r\n link.href = decodeURIComponent(callbackUrl);\r\n if (\r\n link.host &&\r\n link.host !== window.location.host &&\r\n link.host === 'outlook.office.com' &&\r\n link.search.indexOf('client_type=Win32_Outlook') > -1\r\n ) {\r\n if (key && key === 'result') {\r\n if (value) {\r\n link.href = updateUrlParameter(link.href, 'result', value);\r\n }\r\n GlobalVars.currentWindow.location.assign(updateUrlParameter(link.href, 'authSuccess', ''));\r\n }\r\n if (key && key === 'reason') {\r\n if (value) {\r\n link.href = updateUrlParameter(link.href, 'reason', value);\r\n }\r\n GlobalVars.currentWindow.location.assign(updateUrlParameter(link.href, 'authFailure', ''));\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Appends either result or reason as a fragment to the 'callbackUrl'\r\n * @param uri - the url to modify\r\n * @param key - the fragment key\r\n * @param value - the fragment value\r\n */\r\n function updateUrlParameter(uri: string, key: string, value: string): string {\r\n const i = uri.indexOf('#');\r\n let hash = i === -1 ? '#' : uri.substr(i);\r\n hash = hash + '&' + key + (value !== '' ? '=' + value : '');\r\n uri = i === -1 ? uri : uri.substr(0, i);\r\n return uri + hash;\r\n }\r\n\r\n export interface AuthenticateParameters {\r\n /**\r\n * The URL for the authentication pop-up.\r\n */\r\n url: string;\r\n /**\r\n * The preferred width for the pop-up. This value can be ignored if outside the acceptable bounds.\r\n */\r\n width?: number;\r\n /**\r\n * The preferred height for the pop-up. This value can be ignored if outside the acceptable bounds.\r\n */\r\n height?: number;\r\n /**\r\n * A function that is called if the authentication succeeds, with the result returned from the authentication pop-up.\r\n */\r\n successCallback?: (result?: string) => void;\r\n /**\r\n * A function that is called if the authentication fails, with the reason for the failure returned from the authentication pop-up.\r\n */\r\n failureCallback?: (reason?: string) => void;\r\n }\r\n /**\r\n * @private\r\n * Hide from docs.\r\n * ------\r\n */\r\n export interface AuthTokenRequest {\r\n /**\r\n * An array of resource URIs identifying the target resources for which the token should be requested.\r\n */\r\n resources: string[];\r\n /**\r\n * A function that is called if the token request succeeds, with the resulting token.\r\n */\r\n successCallback?: (token: string) => void;\r\n /**\r\n * A function that is called if the token request fails, with the reason for the failure.\r\n */\r\n failureCallback?: (reason: string) => void;\r\n }\r\n /**\r\n * @private\r\n * Hide from docs.\r\n * ------\r\n */\r\n export interface UserRequest {\r\n /**\r\n * A function that is called if the token request succeeds, with the resulting token.\r\n */\r\n successCallback?: (user: UserProfile) => void;\r\n /**\r\n * A function that is called if the token request fails, with the reason for the failure.\r\n */\r\n failureCallback?: (reason: string) => void;\r\n }\r\n /**\r\n * @private\r\n * Hide from docs.\r\n * ------\r\n */\r\n export interface UserProfile {\r\n /**\r\n * The intended recipient of the token. The application that receives the token must verify that the audience\r\n * value is correct and reject any tokens intended for a different audience.\r\n */\r\n aud: string;\r\n /**\r\n * Identifies how the subject of the token was authenticated.\r\n */\r\n amr: string[];\r\n /**\r\n * Stores the time at which the token was issued. It is often used to measure token freshness.\r\n */\r\n iat: number;\r\n /**\r\n * Identifies the security token service (STS) that constructs and returns the token. In the tokens that Azure AD\r\n * returns, the issuer is sts.windows.net. The GUID in the issuer claim value is the tenant ID of the Azure AD\r\n * directory. The tenant ID is an immutable and reliable identifier of the directory.\r\n */\r\n iss: string;\r\n /**\r\n * Provides the last name, surname, or family name of the user as defined in the Azure AD user object.\r\n */\r\n family_name: string;\r\n /**\r\n * Provides the first or \"given\" name of the user, as set on the Azure AD user object.\r\n */\r\n given_name: string;\r\n /**\r\n * Provides a human-readable value that identifies the subject of the token. This value is not guaranteed to\r\n * be unique within a tenant and is designed to be used only for display purposes.\r\n */\r\n unique_name: string;\r\n /**\r\n * Contains a unique identifier of an object in Azure AD. This value is immutable and cannot be reassigned or\r\n * reused. Use the object ID to identify an object in queries to Azure AD.\r\n */\r\n oid: string;\r\n /**\r\n * Identifies the principal about which the token asserts information, such as the user of an application.\r\n * This value is immutable and cannot be reassigned or reused, so it can be used to perform authorization\r\n * checks safely. Because the subject is always present in the tokens the Azure AD issues, we recommended\r\n * using this value in a general-purpose authorization system.\r\n */\r\n sub: string;\r\n /**\r\n * An immutable, non-reusable identifier that identifies the directory tenant that issued the token. You can\r\n * use this value to access tenant-specific directory resources in a multitenant application. For example,\r\n * you can use this value to identify the tenant in a call to the Graph API.\r\n */\r\n tid: string;\r\n /**\r\n * Defines the time interval within which a token is valid. The service that validates the token should verify\r\n * that the current date is within the token lifetime; otherwise it should reject the token. The service might\r\n * allow for up to five minutes beyond the token lifetime to account for any differences in clock time (\"time\r\n * skew\") between Azure AD and the service.\r\n */\r\n exp: number;\r\n nbf: number;\r\n /**\r\n * Stores the user name of the user principal.\r\n */\r\n upn: string;\r\n /**\r\n * Stores the version number of the token.\r\n */\r\n ver: string;\r\n }\r\n}\r\n","import { TaskInfo } from './interfaces';\r\nimport { ensureInitialized, sendMessageRequestToParent } from '../internal/internalAPIs';\r\nimport { GlobalVars } from '../internal/globalVars';\r\nimport { frameContexts } from '../internal/constants';\r\nimport { IAppWindow, ChildAppWindow } from './appWindow';\r\n\r\n/**\r\n * Namespace to interact with the task module-specific part of the SDK.\r\n * This object is usable only on the content frame.\r\n */\r\nexport namespace tasks {\r\n /**\r\n * Allows an app to open the task module.\r\n * @param taskInfo An object containing the parameters of the task module\r\n * @param submitHandler Handler to call when the task module is completed\r\n */\r\n export function startTask(taskInfo: TaskInfo, submitHandler?: (err: string, result: string) => void): IAppWindow {\r\n ensureInitialized(frameContexts.content);\r\n\r\n const messageId = sendMessageRequestToParent('tasks.startTask', [taskInfo]);\r\n GlobalVars.callbacks[messageId] = submitHandler;\r\n return new ChildAppWindow();\r\n }\r\n\r\n /**\r\n * Update height/width task info properties.\r\n * @param taskInfo An object containing width and height properties\r\n */\r\n export function updateTask(taskInfo: TaskInfo): void {\r\n ensureInitialized(frameContexts.content, frameContexts.task);\r\n const { width, height, ...extra } = taskInfo;\r\n\r\n if (!Object.keys(extra).length) {\r\n sendMessageRequestToParent('tasks.updateTask', [taskInfo]);\r\n } else {\r\n throw new Error('updateTask requires a taskInfo argument containing only width and height');\r\n }\r\n }\r\n\r\n /**\r\n * Submit the task module.\r\n * @param result Contains the result to be sent to the bot or the app. Typically a JSON object or a serialized version of it\r\n * @param appIds Helps to validate that the call originates from the same appId as the one that invoked the task module\r\n */\r\n export function submitTask(result?: string | object, appIds?: string | string[]): void {\r\n ensureInitialized(frameContexts.content, frameContexts.task);\r\n\r\n // Send tasks.completeTask instead of tasks.submitTask message for backward compatibility with Mobile clients\r\n sendMessageRequestToParent('tasks.completeTask', [result, Array.isArray(appIds) ? appIds : [appIds]]);\r\n }\r\n}\r\n"],"sourceRoot":""}